diff --git a/.codecov.yml b/.codecov.yml deleted file mode 100644 index fbe067df..00000000 --- a/.codecov.yml +++ /dev/null @@ -1,3 +0,0 @@ -ignore: - - "Pods" # can ignore folder and everything inside - - "tests" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4767fef7..6b1d1a3f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ + +# Created by https://www.gitignore.io/api/macos,swift,xcode,objective-c + +### macOS ### *.DS_Store .AppleDouble .LSOverride @@ -25,6 +29,7 @@ Network Trash Folder Temporary Items .apdisk +### Objective-C ### # Xcode # # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore @@ -38,6 +43,7 @@ Products/ # Xcode # build/ +## Various settings *.pbxuser !default.pbxuser *.mode1v3 @@ -51,6 +57,8 @@ xcuserdata/ ## Other *.moved-aside *.xcuserstate +*.xccheckout +*.xcscmblueprint ## Obj-C/Swift specific *.hmap @@ -58,6 +66,45 @@ xcuserdata/ *.dSYM.zip *.dSYM +# CocoaPods - Refactored to standalone file + + +# Carthage - Refactored to standalone file + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output + +# Code Injection +# +# After new code Injection tools there's a generated folder /iOSInjectionProject +# https://github.com/johnno1962/injectionforxcode + +iOSInjectionProject/ + +### Objective-C Patch ### + +### Swift ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated + +## Various settings + +## Other + +## Obj-C/Swift specific + ## Playgrounds timeline.xctimeline playground.xcworkspace @@ -73,7 +120,7 @@ xcuserdata DerivedData *.hmap *.ipa -*.xcuserstate +*.xcuserstate # CocoaPods # @@ -81,7 +128,7 @@ DerivedData # you should judge for yourself, the pros and cons are mentioned at: # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control # -#Pods/ +Pods/ # Carthage # @@ -89,6 +136,12 @@ DerivedData # Carthage/Checkouts Carthage/Build +# Package.pins +.build/ + +# CocoaPods - Refactored to standalone file + +# Carthage - Refactored to standalone file # fastlane # @@ -109,3 +162,37 @@ examples/*/*.xcassets/*/*.pdf playgrounds .version +# https://docs.fastlane.tools/best-practices/source-control/#source-control + + +### Xcode ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated + +## Various settings + +## Other + +### Xcode Patch ### +*.xcodeproj/* +!*.xcodeproj/project.pbxproj +!*.xcodeproj/xcshareddata/ +!*.xcworkspace/contents.xcworkspacedata +/*.gcno + +# End of https://www.gitignore.io/api/macos,swift,xcode,objective-c + +Products +*tests/*.png +*tests/*.pdf + +CairoSVG.xcconfig +autorevision.json +applications/mac/assets/assets +tmp + +certs/*.cer +certs/*.p12 diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..00355e29 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.3.7 diff --git a/.slather.yml b/.slather.yml deleted file mode 100644 index 7ed248b6..00000000 --- a/.slather.yml +++ /dev/null @@ -1,5 +0,0 @@ -coverage_service: cobertura_xml -workspace: speculid.xcworkspace -xcodeproj: speculid.xcodeproj -scheme: Speculid -source_directory: framework \ No newline at end of file diff --git a/.swiftlint.yml b/.swiftlint.yml new file mode 100644 index 00000000..7707cf04 --- /dev/null +++ b/.swiftlint.yml @@ -0,0 +1,5 @@ +excluded: # paths to ignore during linting. Takes precedence over `included`. + - Pods + - __archive + - examples + - frameworks/speculid/Models/VCS.swift diff --git a/.travis.yml b/.travis.yml index 677e2c0a..bbdbb7e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,31 +1,55 @@ language: objective-c +env: + global: + - secure: hVl7EFbdJhUsIzMXOZ0BESzmcMwro5fSHoFD33xCoWF+4Ov5TtiW5iy02Z4096fbgziD5SBdNG/4y87Z0kqRPPJgcGOObfwE3VWkIYj6dIHaXXnGlmieTEMRkq4a4GOjXJFpJODkKPmMSL1NLqdxUYFmn3rvCyBEQjiRQzygTj4= branches: - except: - - develop - - gh-pages -osx_image: xcode8.2 -xcode_workspace: speculid.xcworkspace # path to your xcodeproj folder -xcode_scheme: Speculid + except: + - develop + - gh-pages +osx_image: xcode9.4 +xcode_workspace: speculid.xcworkspace +xcode_scheme: Speculid-Mac-App before_install: - - brew update - - ./brew-install homebrew/gui/inkscape - - ./brew-install imagemagick - - rvm use $RVM_RUBY_VERSION -install: bundle install --without=documentation -script: - - xcodebuild -workspace speculid.xcworkspace -scheme "Speculid Application" -derivedDataPath ./build build -configuration "Release" - - diff examples/shasum <(./shasum.sh) - - xcodebuild -workspace speculid.xcworkspace -scheme Speculid test -after_success: - - slather - - bash <(curl -s https://codecov.io/bash) -f cobertura.xml +- bundler install +- pod repo update +- pod install +script: +- "./scripts/decrypt-certs.sh" +- "./scripts/build-keychain.sh" +- xcodebuild test -workspace speculid.xcworkspace -scheme "Speculid" +- xcodebuild archive -workspace speculid.xcworkspace -scheme "Speculid-Mac-App" -configuration + Release -derivedDataPath ./build -archivePath ./build/Products/Speculid.xcarchive +- xcodebuild -exportArchive -archivePath ./build/Products/Speculid.xcarchive -exportOptionsPlist + ./exportOptions.plist -exportPath ./build/Products/App +- ditto -c -k --sequesterRsrc --keepParent ./build/Products/App/Speculid.app build/Speculid.zip +- open Build/Products/App/Speculid.app +- osascript -e 'tell application "Speculid" to quit' +- diff examples/shasum <(./scripts/shasum.sh) +before_deploy: +- git config --global user.email "builds@travis-ci.com" +- git config --global user.name "Travis CI" +- export GIT_TAG=v`./bin/package.sh ./build/Products/App/Speculid.app`.$TRAVIS_BUILD_NUMBER-dev +- git tag $GIT_TAG -a -m "Generated tag from TravisCI for build $TRAVIS_BUILD_NUMBER" +- git push -q https://${TRAVIS_SECURE_TOKEN_NAME}@github.com/brightdigit/speculid + --tags +deploy: + provider: releases + prerelease: true + api_key: + secure: kB1IJxdHO6n3vTU6qR4klgASWhMzZmiiKYuKppgjZ5zq/dwTma8Ls3PabZcCoo8Bb+tZVXrohLweKwqP+IjH+oydV+9qt4oh2Q6po6gS+Qj3bTMQ+KrZYc699p32JVASQsRgLkYSUQHFT1wR4R5tlGw3A+tevJFlG56tC2WV1Sw= + file: build/Speculid.zip + skip_cleanup: true + on: + tags: false + all_branches: true after_failure: - - ./shasum.sh - - find "examples/Assets/." -type f \( -iname \*.icns -o -iname \*.png -o -iname \*.pdf \) -print0 | sort -z | xargs -0 shasum -a 512 +- "./scripts/shasum.sh" +- find "examples/Assets/." -type f \( -iname \*.icns -o -iname \*.png -o -iname \*.pdf + \) -print0 | sort -z | xargs -0 shasum -a 512 notifications: webhooks: urls: - - https://webhooks.gitter.im/e/f596466e5c30701b566d - on_success: change # options: [always|never|change] default: always - on_failure: always # options: [always|never|change] default: always - on_start: never # options: [always|never|change] default: always + - https://webhooks.gitter.im/e/f596466e5c30701b566d + on_success: change + on_failure: always + on_start: never diff --git a/CNAME b/CNAME deleted file mode 100644 index 4e3fc49a..00000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -speculid.com diff --git a/CairoSVG.debug.xcconfig b/CairoSVG.debug.xcconfig new file mode 100644 index 00000000..34891081 --- /dev/null +++ b/CairoSVG.debug.xcconfig @@ -0,0 +1,2 @@ +#include "Pods/Target Support Files/Pods-CairoSVG/Pods-CairoSVG.debug.xcconfig" +#include "CairoSVG.xcconfig" diff --git a/CairoSVG.release.xcconfig b/CairoSVG.release.xcconfig new file mode 100644 index 00000000..162fe2b0 --- /dev/null +++ b/CairoSVG.release.xcconfig @@ -0,0 +1,2 @@ +#include "Pods/Target Support Files/Pods-CairoSVG/Pods-CairoSVG.release.xcconfig" +#include "CairoSVG.xcconfig" diff --git a/CairoSVG/CarioSVG.h b/CairoSVG/CarioSVG.h new file mode 100644 index 00000000..2381c38d --- /dev/null +++ b/CairoSVG/CarioSVG.h @@ -0,0 +1,18 @@ +// +// CarioSVG.h +// CarioSVG +// +// Created by Leo Dion on 6/28/18. +// + +#import + +//! Project version number for CarioSVG. +FOUNDATION_EXPORT double CarioSVGVersionNumber; + +//! Project version string for CarioSVG. +FOUNDATION_EXPORT const unsigned char CarioSVGVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/CairoSVG/ImageHandleBuilder.h b/CairoSVG/ImageHandleBuilder.h new file mode 100644 index 00000000..fa5a1365 --- /dev/null +++ b/CairoSVG/ImageHandleBuilder.h @@ -0,0 +1,17 @@ +// +// ImageHandleBuilder.h +// CairoSVG +// +// Created by Leo Dion on 6/28/18. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface ImageHandleBuilder : NSObject +- (RsvgHandle *)rsvgHandleFromURL:(NSURL*) url; +@end + +NS_ASSUME_NONNULL_END diff --git a/CairoSVG/ImageHandleBuilder.m b/CairoSVG/ImageHandleBuilder.m new file mode 100644 index 00000000..8f051715 --- /dev/null +++ b/CairoSVG/ImageHandleBuilder.m @@ -0,0 +1,20 @@ +// +// ImageHandleBuilder.m +// CairoSVG +// +// Created by Leo Dion on 6/28/18. +// + +#import "ImageHandleBuilder.h" +//#import "GlibError.h" + +@implementation ImageHandleBuilder + +- (RsvgHandle *)rsvgHandleFromURL:(NSURL*) url{ + GError * gerror = nil; + RsvgHandle * rsvgHandle; + rsvgHandle = rsvg_handle_new_from_file(url.path.UTF8String , &gerror); + + return rsvgHandle; +} +@end diff --git a/CairoSVG/Info.plist b/CairoSVG/Info.plist new file mode 100644 index 00000000..e1fe4cfb --- /dev/null +++ b/CairoSVG/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + + diff --git a/CairoSVG/cairo/cairo-config.h b/CairoSVG/cairo/cairo-config.h new file mode 100644 index 00000000..cbd9c91d --- /dev/null +++ b/CairoSVG/cairo/cairo-config.h @@ -0,0 +1,417 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* whether memory barriers are needed around atomic operations */ +/* #undef ATOMIC_OP_NEEDS_MEMORY_BARRIER */ + +/* Define to 1 if the PDF backend can be tested (need poppler and other + dependencies for pdf2png) */ +/* #undef CAIRO_CAN_TEST_PDF_SURFACE */ + +/* Define to 1 if the PS backend can be tested (needs ghostscript) */ +#define CAIRO_CAN_TEST_PS_SURFACE 1 + +/* Define to 1 if the SVG backend can be tested */ +/* #undef CAIRO_CAN_TEST_SVG_SURFACE */ + +/* Define to 1 if the Win32 Printing backend can be tested (needs ghostscript) + */ +/* #undef CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE */ + +/* Define to 1 if dlsym is available */ +#define CAIRO_HAS_DLSYM 1 + +/* Define to 1 to enable cairo's cairo-script-interpreter feature */ +#define CAIRO_HAS_INTERPRETER 1 + +/* Define to 1 to enable cairo's pthread feature */ +#define CAIRO_HAS_PTHREAD 1 + +/* Define to 1 if we have full pthread support */ +#define CAIRO_HAS_REAL_PTHREAD 1 + +/* Define to 1 if libspectre is available */ +/* #undef CAIRO_HAS_SPECTRE */ + +/* Define to 1 to enable cairo's symbol-lookup feature */ +/* #undef CAIRO_HAS_SYMBOL_LOOKUP */ + +/* Define to 1 to enable cairo's test surfaces feature */ +/* #undef CAIRO_HAS_TEST_SURFACES */ + +/* Define to 1 to enable cairo's cairo-trace feature */ +#define CAIRO_HAS_TRACE 1 + +/* Define to 1 to disable certain code paths that rely heavily on double + precision floating-point calculation */ +/* #undef DISABLE_SOME_FLOATING_POINT */ + +/* Define to 1 if your system stores words within floats with the most + significant word first */ +/* #undef FLOAT_WORDS_BIGENDIAN */ + +/* Enable pixman glyph cache */ +#define HAS_PIXMAN_GLYPHS 1 + +/* Define to 1 if you have the `alarm' function. */ +#define HAVE_ALARM 1 + +/* Define to 1 if you have the binutils development files installed */ +/* #undef HAVE_BFD */ + +/* Define to 1 if your compiler supports the __builtin_return_address() + intrinsic. */ +#define HAVE_BUILTIN_RETURN_ADDRESS 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the `clock_gettime' function. */ +#define HAVE_CLOCK_GETTIME 1 + +/* Define to 1 if you have the `ctime_r' function. */ +#define HAVE_CTIME_R 1 + +/* Enable if your compiler supports the GCC __atomic_* atomic primitives */ +#define HAVE_CXX11_ATOMIC_PRIMITIVES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the `drand48' function. */ +#define HAVE_DRAND48 1 + +/* Define to 1 if you have the `FcFini' function. */ +/* #undef HAVE_FCFINI */ + +/* Define to 1 if you have the `FcInit' function. */ +/* #undef HAVE_FCINIT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `feclearexcept' function. */ +#define HAVE_FECLEAREXCEPT 1 + +/* Define to 1 if you have the `fedisableexcept' function. */ +/* #undef HAVE_FEDISABLEEXCEPT */ + +/* Define to 1 if you have the `feenableexcept' function. */ +/* #undef HAVE_FEENABLEEXCEPT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_FENV_H 1 + +/* Define to 1 if you have the `flockfile' function. */ +#define HAVE_FLOCKFILE 1 + +/* Define to 1 if you have the `fork' function. */ +#define HAVE_FORK 1 + +/* Define to 1 if you have the `FT_Get_X11_Font_Format' function. */ +/* #undef HAVE_FT_GET_X11_FONT_FORMAT */ + +/* Define to 1 if you have the `FT_GlyphSlot_Embolden' function. */ +/* #undef HAVE_FT_GLYPHSLOT_EMBOLDEN */ + +/* Define to 1 if you have the `FT_GlyphSlot_Oblique' function. */ +/* #undef HAVE_FT_GLYPHSLOT_OBLIQUE */ + +/* Define to 1 if you have the `FT_Library_SetLcdFilter' function. */ +/* #undef HAVE_FT_LIBRARY_SETLCDFILTER */ + +/* Define to 1 if you have the `FT_Load_Sfnt_Table' function. */ +/* #undef HAVE_FT_LOAD_SFNT_TABLE */ + +/* Define to 1 if you have the `funlockfile' function. */ +#define HAVE_FUNLOCKFILE 1 + +/* Whether you have gcov */ +/* #undef HAVE_GCOV */ + +/* Define to 1 if you have the `getline' function. */ +#define HAVE_GETLINE 1 + +/* Enable if your compiler supports the Intel __sync_* atomic primitives */ +/* #undef HAVE_INTEL_ATOMIC_PRIMITIVES */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIBGEN_H 1 + +/* Define to 1 if you have the `rt' library (-lrt). */ +/* #undef HAVE_LIBRT */ + +/* Enable if you have libatomic-ops-dev installed */ +/* #undef HAVE_LIB_ATOMIC_OPS */ + +/* Define to 1 if you have the `link' function. */ +#define HAVE_LINK 1 + +/* Define to 1 if you have the Valgrind lockdep tool */ +/* #undef HAVE_LOCKDEP */ + +/* Define to 1 if you have lzo available */ +/* #undef HAVE_LZO */ + +/* Define to 1 if you have the Valgrind memfault tool */ +/* #undef HAVE_MEMFAULT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to non-zero if your system has mkdir, and to 2 if your version of + mkdir requires a mode parameter */ +#define HAVE_MKDIR 2 + +/* Define to 1 if you have the `mmap' function. */ +#define HAVE_MMAP 1 + +/* Enable if you have MacOS X atomic operations */ +/* #undef HAVE_OS_ATOMIC_OPS */ + +/* Define to 1 if you have the `poppler_page_render' function. */ +/* #undef HAVE_POPPLER_PAGE_RENDER */ + +/* Define to 1 if you have the `raise' function. */ +#define HAVE_RAISE 1 + +/* Define to 1 if you have the `rsvg_pixbuf_from_file' function. */ +/* #undef HAVE_RSVG_PIXBUF_FROM_FILE */ + +/* Define to 1 if you have the `sched_getaffinity' function. */ +/* #undef HAVE_SCHED_GETAFFINITY */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SCHED_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SETJMP_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SIGNAL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strndup' function. */ +#define HAVE_STRNDUP 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_INT_TYPES_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_POLL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if the system has the type `uint128_t'. */ +/* #undef HAVE_UINT128_T */ + +/* Define to 1 if the system has the type `uint64_t'. */ +#define HAVE_UINT64_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have Valgrind */ +/* #undef HAVE_VALGRIND */ + +/* Define to 1 if you have the `waitpid' function. */ +#define HAVE_WAITPID 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_X11_EXTENSIONS_SHMPROTO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_X11_EXTENSIONS_SHMSTR_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_X11_EXTENSIONS_XSHM_H */ + +/* Define to 1 if you have the `XRenderCreateConicalGradient' function. */ +/* #undef HAVE_XRENDERCREATECONICALGRADIENT */ + +/* Define to 1 if you have the `XRenderCreateLinearGradient' function. */ +/* #undef HAVE_XRENDERCREATELINEARGRADIENT */ + +/* Define to 1 if you have the `XRenderCreateRadialGradient' function. */ +/* #undef HAVE_XRENDERCREATERADIALGRADIENT */ + +/* Define to 1 if you have the `XRenderCreateSolidFill' function. */ +/* #undef HAVE_XRENDERCREATESOLIDFILL */ + +/* Define to 1 if you have zlib available */ +#define HAVE_ZLIB 1 + +/* Define to 1 if the system has the type `__uint128_t'. */ +#undef HAVE___UINT128_T + +/* Define to 1 if shared memory segments are released deferred. */ +/* #undef IPC_RMID_DEFERRED_RELEASE */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "http://bugs.freedesktop.org/enter_bug.cgi?product=cairo" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME USE_cairo_INSTEAD + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING USE_cairo_version_OR_cairo_version_string_INSTEAD + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME USE_cairo_INSTEAD + +/* Define to the home page for this package. */ +#define PACKAGE_URL "http://cairographics.org/" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION USE_cairo_version_OR_cairo_version_string_INSTEAD + +/* Shared library file extension */ +#define SHARED_LIB_EXT "dylib" + +/* The size of `int', as computed by sizeof. */ +#define SIZEOF_INT 4 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 8 + +/* The size of `void *', as computed by sizeof. */ +#define SIZEOF_VOID_P 8 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Define to the value your compiler uses to support the warn-unused-result + attribute */ +#define WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + + +/* Deal with multiple architecture compiles on Mac OS X */ +#ifdef __APPLE_CC__ +#ifdef __BIG_ENDIAN__ +#define WORDS_BIGENDIAN 1 +#define FLOAT_WORDS_BIGENDIAN 1 +#else +/* #undef WORDS_BIGENDIAN */ +/* #undef FLOAT_WORDS_BIGENDIAN */ +#endif +#endif + + +/* Define to 1 if the X Window System is missing or not being used. */ +/* #undef X_DISPLAY_MISSING */ + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif diff --git a/CairoSVG/pixman/pixman-config.h b/CairoSVG/pixman/pixman-config.h new file mode 100755 index 00000000..2e70d72e --- /dev/null +++ b/CairoSVG/pixman/pixman-config.h @@ -0,0 +1,184 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +#define AC_APPLE_UNIVERSAL_BUILD + +/* Whether we have alarm() */ +#undef HAVE_ALARM + +/* Whether the compiler supports __builtin_clz */ +#undef HAVE_BUILTIN_CLZ + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Whether we have FE_DIVBYZERO */ +#undef HAVE_FEDIVBYZERO + +/* Whether we have feenableexcept() */ +#undef HAVE_FEENABLEEXCEPT + +/* Define to 1 if we have */ +#undef HAVE_FENV_H + +/* Whether the tool chain supports __float128 */ +#undef HAVE_FLOAT128 + +/* Whether the compiler supports GCC vector extensions */ +#undef HAVE_GCC_VECTOR_EXTENSIONS + +/* Define to 1 if you have the `getisax' function. */ +#undef HAVE_GETISAX + +/* Whether we have getpagesize() */ +#undef HAVE_GETPAGESIZE + +/* Whether we have gettimeofday() */ +#undef HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `pixman-1' library (-lpixman-1). */ +#undef HAVE_LIBPIXMAN_1 + +/* Whether we have libpng */ +#undef HAVE_LIBPNG + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Whether we have mmap() */ +#undef HAVE_MMAP + +/* Whether we have mprotect() */ +#undef HAVE_MPROTECT + +/* Whether we have posix_memalign() */ +#undef HAVE_POSIX_MEMALIGN + +/* Whether pthreads is supported */ +#define HAVE_PTHREADS + +/* Whether we have sigaction() */ +#undef HAVE_SIGACTION + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if we have */ +#undef HAVE_SYS_MMAN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#undef LT_OBJDIR + +/* Name of package */ +#define PACKAGE "pixman" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "pixman@lists.freedesktop.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "pixman" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "pixman 0.34.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "pixman" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "0.34.0" + +/* enable TIMER_BEGIN/TIMER_END macros */ +#undef PIXMAN_TIMERS + +/* The size of `long', as computed by sizeof. */ +#undef SIZEOF_LONG + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* The compiler supported TLS storage class */ +#undef TLS + +/* Whether the tool chain supports __attribute__((constructor)) */ +#undef TOOLCHAIN_SUPPORTS_ATTRIBUTE_CONSTRUCTOR + +/* use ARM IWMMXT compiler intrinsics */ +#undef USE_ARM_IWMMXT + +/* use ARM NEON assembly optimizations */ +//#define USE_ARM_NEON + +/* use ARM SIMD assembly optimizations */ +//#define USE_ARM_SIMD + +/* use GNU-style inline assembler */ +#define USE_GCC_INLINE_ASM + +/* use Loongson Multimedia Instructions */ +#undef USE_LOONGSON_MMI + +/* use MIPS DSPr2 assembly optimizations */ +#undef USE_MIPS_DSPR2 + +/* use OpenMP in the test suite */ +#undef USE_OPENMP + +/* use SSE2 compiler intrinsics */ +#undef USE_SSE2 + +/* use SSSE3 compiler intrinsics */ +#undef USE_SSSE3 + +/* use VMX compiler intrinsics */ +#undef USE_VMX + +/* use x86 MMX compiler intrinsics */ +#undef USE_X86_MMX + +/* Version number of package */ +#define VERSION "0.34.0" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define to sqrt if you do not have the `sqrtf' function. */ +#undef sqrtf diff --git a/CairoSVGTests/CarioSVGTests.m b/CairoSVGTests/CarioSVGTests.m new file mode 100644 index 00000000..024c8c39 --- /dev/null +++ b/CairoSVGTests/CarioSVGTests.m @@ -0,0 +1,47 @@ +// +// CarioSVGTests.m +// CarioSVGTests +// +// Created by Leo Dion on 6/28/18. +// + +#import +#import +#import "ImageHandleBuilder.h" + +@interface CarioSVGTests : XCTestCase + +@end + +@implementation CarioSVGTests + +- (void)setUp { + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testExample { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + ImageHandleBuilder * builder = [[ImageHandleBuilder alloc] init]; +// builder rsvgHandleFromURL:<#(nonnull NSURL *)#> + NSBundle * bundle = [NSBundle bundleForClass:[self class]]; + NSURL * url = [bundle URLForResource:@"geometry" withExtension:@"svg"]; + NSLog(@"%@", url); + RsvgHandle * handle = [builder rsvgHandleFromURL:url]; + NSLog(@"%@", handle); +} + +- (void)testPerformanceExample { + // This is an example of a performance test case. + [self measureBlock:^{ + // Put the code you want to measure the time of here. + }]; +} + +@end diff --git a/CairoSVGTests/Info.plist b/CairoSVGTests/Info.plist new file mode 100644 index 00000000..6c40a6cd --- /dev/null +++ b/CairoSVGTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/CairoSVGTests/geometry.svg b/CairoSVGTests/geometry.svg new file mode 100644 index 00000000..669ac916 --- /dev/null +++ b/CairoSVGTests/geometry.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gemfile b/Gemfile index 0e1ded50..a24f09b2 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,9 @@ -source 'http://rubygems.org' +# frozen_string_literal: true -gem 'slather' +source "https://rubygems.org" + +git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } + +# gem "rails" + +gem "cocoapods", "~> 1.5" diff --git a/Gemfile.lock b/Gemfile.lock index 2659f117..84a9eadf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,41 +1,76 @@ GEM - remote: http://rubygems.org/ + remote: https://rubygems.org/ specs: - activesupport (4.2.7.1) + CFPropertyList (3.0.0) + activesupport (4.2.10) i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - claide (1.0.0) - clamp (0.6.5) - colored (1.2) - i18n (0.7.0) - json (1.8.3) - mini_portile2 (2.1.0) - minitest (5.9.1) - nokogiri (1.6.8) - mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) - pkg-config (1.1.7) - slather (2.3.0) + atomos (0.1.2) + claide (1.0.2) + cocoapods (1.5.3) activesupport (>= 4.0.2, < 5) - clamp (~> 0.6) - nokogiri (~> 1.6.3) - xcodeproj (>= 0.20, < 2.0.0) - thread_safe (0.3.5) - tzinfo (1.2.2) + claide (>= 1.0.2, < 2.0) + cocoapods-core (= 1.5.3) + cocoapods-deintegrate (>= 1.0.2, < 2.0) + cocoapods-downloader (>= 1.2.0, < 2.0) + cocoapods-plugins (>= 1.0.0, < 2.0) + cocoapods-search (>= 1.0.0, < 2.0) + cocoapods-stats (>= 1.0.0, < 2.0) + cocoapods-trunk (>= 1.3.0, < 2.0) + cocoapods-try (>= 1.1.0, < 2.0) + colored2 (~> 3.1) + escape (~> 0.0.4) + fourflusher (~> 2.0.1) + gh_inspector (~> 1.0) + molinillo (~> 0.6.5) + nap (~> 1.0) + ruby-macho (~> 1.1) + xcodeproj (>= 1.5.7, < 2.0) + cocoapods-core (1.5.3) + activesupport (>= 4.0.2, < 6) + fuzzy_match (~> 2.0.4) + nap (~> 1.0) + cocoapods-deintegrate (1.0.2) + cocoapods-downloader (1.2.1) + cocoapods-plugins (1.0.0) + nap + cocoapods-search (1.0.0) + cocoapods-stats (1.0.0) + cocoapods-trunk (1.3.0) + nap (>= 0.8, < 2.0) + netrc (~> 0.11) + cocoapods-try (1.1.0) + colored2 (3.1.2) + concurrent-ruby (1.0.5) + escape (0.0.4) + fourflusher (2.0.1) + fuzzy_match (2.0.4) + gh_inspector (1.1.3) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + minitest (5.11.3) + molinillo (0.6.5) + nanaimo (0.2.6) + nap (1.1.0) + netrc (0.11.0) + ruby-macho (1.2.0) + thread_safe (0.3.6) + tzinfo (1.2.5) thread_safe (~> 0.1) - xcodeproj (1.3.1) - activesupport (>= 3) - claide (>= 1.0.0, < 2.0) - colored (~> 1.2) + xcodeproj (1.5.9) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.2) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.2.5) PLATFORMS ruby DEPENDENCIES - slather + cocoapods (~> 1.5) BUNDLED WITH - 1.12.5 + 1.16.2 diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 43c48226..00000000 --- a/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 BrightDigit - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/Podfile b/Podfile index 992b48c6..0f35a384 100644 --- a/Podfile +++ b/Podfile @@ -1,23 +1,55 @@ # Uncomment the next line to define a global platform for your project -platform :osx, '10.10' +platform :osx, '10.12' -target 'Speculid-App' do +pod 'SwiftFormat/CLI' +pod 'SwiftLint' + +target 'CairoSVG' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! - # Pods for Speculid-App - target 'Speculid' do - # Comment the next line if you're not using Swift and don't want to use dynamic frameworks - use_frameworks! + # Pods for CairoSVG + + target 'CairoSVGTests' do + inherit! :search_paths + # Pods for testing + end + +end + +target 'Speculid' do + # Comment the next line if you're not using Swift and don't want to use dynamic frameworks + use_frameworks! + + # Pods for Speculid + pod 'SwiftVer' + + target 'SpeculidTests' do + inherit! :search_paths + # Pods for testing + end + +end - # Pods for Speculid - pod 'SwiftVer', '~> 1.0' +target 'Speculid-Mac-App' do + # Comment the next line if you're not using Swift and don't want to use dynamic frameworks + use_frameworks! - target 'SpeculidTests' do - inherit! :search_paths - # Pods for testing - pod 'RandomKit', :git => 'https://github.com/nvzqz/RandomKit.git', :branch => 'master' - end + # Pods for Speculid-Mac-App + pod 'SwiftVer' + target 'Speculid-Mac-AppUITests' do + inherit! :search_paths + # Pods for testing end + +end + +target 'Speculid-Mac-XPC' do + # Comment the next line if you're not using Swift and don't want to use dynamic frameworks + use_frameworks! + + # Pods for Speculid-Mac-XPC + pod 'SwiftVer' + end diff --git a/Podfile.lock b/Podfile.lock index 0b855dd4..9e82c812 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,25 +1,24 @@ PODS: - - RandomKit (1.6.0) - - SwiftVer (1.0.0) + - SwiftFormat/CLI (0.34.1) + - SwiftLint (0.27.0) + - SwiftVer (2.0.4) DEPENDENCIES: - - RandomKit (from `https://github.com/nvzqz/RandomKit.git`, branch `master`) - - SwiftVer (~> 1.0) + - SwiftFormat/CLI + - SwiftLint + - SwiftVer -EXTERNAL SOURCES: - RandomKit: - :branch: master - :git: https://github.com/nvzqz/RandomKit.git - -CHECKOUT OPTIONS: - RandomKit: - :commit: c4c8649dd2eeafaed72d07c988936819e4617c82 - :git: https://github.com/nvzqz/RandomKit.git +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - SwiftFormat + - SwiftLint + - SwiftVer SPEC CHECKSUMS: - RandomKit: 193d11478a87943021780e38f3be07a1c7c8419e - SwiftVer: 5a3cf6ae27a079efab5575d0161e5319cb7fbe15 + SwiftFormat: 30408c64fbbb409387426b5cdd8225e0bd357e15 + SwiftLint: 3207c1faa2240bf8973b191820a116113cd11073 + SwiftVer: 85fca0c0087660e0b07fe021efdd4b794046e465 -PODFILE CHECKSUM: 303e38c4e8692b7a8020ae6a60bb9cd05c73ac0a +PODFILE CHECKSUM: 2ecd26879e8bf7a7ac71ae7dbb51d7fe0d3d478d -COCOAPODS: 1.1.1 +COCOAPODS: 1.5.3 diff --git a/Pods/Local Podspecs/RandomKit.podspec.json b/Pods/Local Podspecs/RandomKit.podspec.json deleted file mode 100644 index 2266721d..00000000 --- a/Pods/Local Podspecs/RandomKit.podspec.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "RandomKit", - "version": "1.6.0", - "summary": "Random data generation in Swift.", - "homepage": "https://github.com/nvzqz/RandomKit", - "license": { - "type": "MIT", - "file": "LICENSE.md" - }, - "authors": "Nikolai Vazquez", - "platforms": { - "ios": "8.0", - "osx": "10.9", - "watchos": "2.0", - "tvos": "9.0" - }, - "source": { - "git": "https://github.com/nvzqz/RandomKit.git", - "tag": "v1.6.0" - }, - "source_files": "Sources/**/*.swift" -} diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock deleted file mode 100644 index 0b855dd4..00000000 --- a/Pods/Manifest.lock +++ /dev/null @@ -1,25 +0,0 @@ -PODS: - - RandomKit (1.6.0) - - SwiftVer (1.0.0) - -DEPENDENCIES: - - RandomKit (from `https://github.com/nvzqz/RandomKit.git`, branch `master`) - - SwiftVer (~> 1.0) - -EXTERNAL SOURCES: - RandomKit: - :branch: master - :git: https://github.com/nvzqz/RandomKit.git - -CHECKOUT OPTIONS: - RandomKit: - :commit: c4c8649dd2eeafaed72d07c988936819e4617c82 - :git: https://github.com/nvzqz/RandomKit.git - -SPEC CHECKSUMS: - RandomKit: 193d11478a87943021780e38f3be07a1c7c8419e - SwiftVer: 5a3cf6ae27a079efab5575d0161e5319cb7fbe15 - -PODFILE CHECKSUM: 303e38c4e8692b7a8020ae6a60bb9cd05c73ac0a - -COCOAPODS: 1.1.1 diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj deleted file mode 100644 index a98fecd0..00000000 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1181 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 005A936EC81AE376BBC9D558F8C19CD7 /* Pods-SpeculidTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BD42AE3191B7A5ED41E37EB8CDFA7250 /* Pods-SpeculidTests-dummy.m */; }; - 06BC86125FCCF51D4F94EA2F7D9F81A3 /* Pods-SpeculidTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B9ACAAFE1918C36DED1733A8BBEB3913 /* Pods-SpeculidTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0A8685D6E4073BF292A98A8BD1F944DE /* VersionControlType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9E8ABE9D6C59EDA90D8BCD2F050DAFF /* VersionControlType.swift */; }; - 11896BE65DB906623399E2EB9F778039 /* Collection+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C32AA0083E0536285549A047C6FFA96 /* Collection+RandomKit.swift */; }; - 249768C0B08DFC1502A6D8AB54100112 /* Array+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 265B800B70631563FB2D4C43ED9AF33F /* Array+RandomKit.swift */; }; - 2A70D9DC67B1971CCCB1E67DAC71730E /* Character+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31AD8AB4265B6D35E3111DECBDD27921 /* Character+RandomKit.swift */; }; - 3955304E433BC86498DF54FC71702CE9 /* Color+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4F0CA11780D7060AD13D221CFC80FCB /* Color+RandomKit.swift */; }; - 3D95F927D306EBAA8B4221D701209918 /* CGFloat+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B5C3871CB6BA47C60C078C0EF73980C /* CGFloat+RandomKit.swift */; }; - 408C40C19D28E156900913218268F71A /* NSNumber+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B517E9C0FE89A2BB63698B2E07BC63 /* NSNumber+RandomKit.swift */; }; - 49EECDBF068D518FAA61711F3C39D778 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 270DD1219F1E6CF00379D39F252D87C6 /* Cocoa.framework */; }; - 4A7B132D54CF97B55B2493863002D8D6 /* Pods-Speculid-App-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 291F6BED9AEFBE48174D0576127A5B23 /* Pods-Speculid-App-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4FF4F8B3183DDFC421D810C2990E72EB /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 270DD1219F1E6CF00379D39F252D87C6 /* Cocoa.framework */; }; - 53DAF3CF1743BA167E84FF9747204E53 /* SwiftVer-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 04C9499206C0A3E97616EAC8CF9FAE0C /* SwiftVer-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5655AF7C28F37EF2900F64EF46DB2E9F /* Float80+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7E92454A0FCD877E7DB39404E088601 /* Float80+RandomKit.swift */; }; - 5940CABE6D284DB357A3A7BBB27E6F3C /* Sequence+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 004F0329E7FF66B97DB1B61FE2F62339 /* Sequence+RandomKit.swift */; }; - 5C77EBF34CD77C3AF9EB81400DB66063 /* String+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28351ED24E5E9302AC1022C8C268ADF0 /* String+RandomKit.swift */; }; - 606F21F8B7920101386435ACCDC9C6BF /* CGPoint+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = C55EB03AF7DCD6A928BAC312A9568E9D /* CGPoint+RandomKit.swift */; }; - 63026CC806DBBA86EF2B11EF58A35651 /* Float+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C1531D495CFB3FF169709D5264AAF6A /* Float+RandomKit.swift */; }; - 667FC3EBB472BD755584F5B836316808 /* Date+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03B75C1D052B9A06B8928782A87AC2E4 /* Date+RandomKit.swift */; }; - 6A3648833EB7DB16C104118624531EDF /* CharacterSet+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 401D182289F7CD30085A9A1565E2CB05 /* CharacterSet+RandomKit.swift */; }; - 6FD753B68375C9E28168586BA40B07E9 /* VersionContainerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D2DDAA82105F4A221BC2D3826483265 /* VersionContainerProtocol.swift */; }; - 71CF1052D3ED507CB2F9F473EAC665F0 /* Set+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA7DBF8D5E2B0064D2EE324576B6A222 /* Set+RandomKit.swift */; }; - 783628C3D8872B2CF8A1575AD5B2E660 /* CGSize+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D826C3982E53E43ECC31DDDEB5E9C65 /* CGSize+RandomKit.swift */; }; - 7EF64A8E1CA26F618F8913B507D041BC /* RandomKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F8D9D6EC8BB6A4A83B98B2B14ABEDEF7 /* RandomKit-dummy.m */; }; - 7FFEB120BAA97DF937AEC2E000C07D0F /* URL+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3186EDFE301F2DCE8C5CE407615EFF08 /* URL+RandomKit.swift */; }; - 8561A8771715305ECE124BBA63C8BF4E /* CGVector+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FE9FBF24E41E19C0001BC720C881192 /* CGVector+RandomKit.swift */; }; - 8612FDE9D8CD651D128645E5D9DF3214 /* Dictionary+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FC4E8FE2FF3F55D82FDB24EEDBAD8AD /* Dictionary+RandomKit.swift */; }; - 8BBEB05A0D606613CCF94AE9A5322790 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 270DD1219F1E6CF00379D39F252D87C6 /* Cocoa.framework */; }; - 929B72A8EA8C3B0FBE369696DA41F835 /* Pods-Speculid-App-Speculid-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 835921A9A6FFB61DEB25F4146F9F1810 /* Pods-Speculid-App-Speculid-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A968548695BD745AED7FDBA536A06431 /* SemVer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FA30BE76FED0A2776FC0826B3C295DF /* SemVer.swift */; }; - ABC34C3041848CC393029101DFE7BC59 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 270DD1219F1E6CF00379D39F252D87C6 /* Cocoa.framework */; }; - ACD35C58495B749EF900BF90FF2ABDE2 /* Version.swift in Sources */ = {isa = PBXBuildFile; fileRef = 688B988998C412A31E9D94141A4E2763 /* Version.swift */; }; - BAC6711FB8EBD8EC7FA5291B9C015D3F /* ShuffleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2093F66D0FD029BDD36943210A32FC36 /* ShuffleType.swift */; }; - BC6EC7058D224F53AD9892EB86F75AFA /* RandomType.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8FFCCD0BC1E4641D177A4C510207A0C /* RandomType.swift */; }; - C53958448F8141102C8891967274CE36 /* Bool+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F3F7DE954BC5BE80A4C4ABC9147FA9D /* Bool+RandomKit.swift */; }; - D300ACC12196EDB4B65B8376A6E963CE /* VersionControlInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1338C074F5C1BB72C98E491DAE61E191 /* VersionControlInfo.swift */; }; - D312C42C1D8499C074258B6496B2F1D0 /* Pods-Speculid-App-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 022ACAC6E8FD9FF44D37120C1F578CD6 /* Pods-Speculid-App-dummy.m */; }; - E3A692FAA3746240C00EB7B15B48CBB2 /* Pods-Speculid-App-Speculid-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C75B3F2B821A046D1593DD1B1329BD89 /* Pods-Speculid-App-Speculid-dummy.m */; }; - E55D1A92945A8DC8C0AF93AD18AF225C /* rfc3339.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F2F37A94D7C6BCF8AA811D40A12AC97 /* rfc3339.swift */; }; - E6BC052E317B0E09820777F5CD8E918D /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06164A34B563191CAB3565739217187B /* Random.swift */; }; - F5FD67E482D0D3BEAA19468E3EB0162D /* CGRect+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10B2A9EE746842C58A1C543CF5A23EB6 /* CGRect+RandomKit.swift */; }; - F6CBE088DFBAD81A76818DC6066381AB /* Double+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02B1DBA066E76E54E4435A28F760F8E2 /* Double+RandomKit.swift */; }; - F70618F8CB7B3BBF1991723D957FBA7A /* SwiftVer-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 401F6CDF163571DDF3571463B0367256 /* SwiftVer-dummy.m */; }; - FAB892D135B1184E061E61D4A811E548 /* RandomKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A28343DD8B08857A03FC8AA9B5162F1D /* RandomKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FB2AB1BD85D212497E4A22445FECFB80 /* Int+RandomKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2486DF70FF7CED02C2BCEFC76C633FFB /* Int+RandomKit.swift */; }; - FF08851D2E82B7A9F8444CDC43D717F5 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 270DD1219F1E6CF00379D39F252D87C6 /* Cocoa.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 05CA13AA59677A1AA07CDDDD427D4543 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6B4186CE44A8ABF7BE40C3D93E6C2575; - remoteInfo = SwiftVer; - }; - 21F197F53D322402DFDBF1592CADB28F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6D15953639425373453EC29444BEB0B9; - remoteInfo = RandomKit; - }; - 3CBFE0FFFCC4612BFD7313CB42594103 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6B4186CE44A8ABF7BE40C3D93E6C2575; - remoteInfo = SwiftVer; - }; - 4F08B8E0068EF2E803B4986FA4D212E8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6B4186CE44A8ABF7BE40C3D93E6C2575; - remoteInfo = SwiftVer; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 004F0329E7FF66B97DB1B61FE2F62339 /* Sequence+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Sequence+RandomKit.swift"; path = "Sources/Sequence+RandomKit.swift"; sourceTree = ""; }; - 022ACAC6E8FD9FF44D37120C1F578CD6 /* Pods-Speculid-App-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Speculid-App-dummy.m"; sourceTree = ""; }; - 02B1DBA066E76E54E4435A28F760F8E2 /* Double+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Double+RandomKit.swift"; path = "Sources/Double+RandomKit.swift"; sourceTree = ""; }; - 03B75C1D052B9A06B8928782A87AC2E4 /* Date+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Date+RandomKit.swift"; path = "Sources/Date+RandomKit.swift"; sourceTree = ""; }; - 04C9499206C0A3E97616EAC8CF9FAE0C /* SwiftVer-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftVer-umbrella.h"; sourceTree = ""; }; - 06164A34B563191CAB3565739217187B /* Random.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Random.swift; path = Sources/Random.swift; sourceTree = ""; }; - 0C32AA0083E0536285549A047C6FFA96 /* Collection+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Collection+RandomKit.swift"; path = "Sources/Collection+RandomKit.swift"; sourceTree = ""; }; - 10B2A9EE746842C58A1C543CF5A23EB6 /* CGRect+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CGRect+RandomKit.swift"; path = "Sources/CGRect+RandomKit.swift"; sourceTree = ""; }; - 1338C074F5C1BB72C98E491DAE61E191 /* VersionControlInfo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VersionControlInfo.swift; path = Source/VersionControlInfo.swift; sourceTree = ""; }; - 153D488EFDD4970D0C0C38F0C4AB0AB4 /* Pods-SpeculidTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SpeculidTests-acknowledgements.markdown"; sourceTree = ""; }; - 15996322066B29F90775748D85C57973 /* Pods-SpeculidTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SpeculidTests-resources.sh"; sourceTree = ""; }; - 2093F66D0FD029BDD36943210A32FC36 /* ShuffleType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShuffleType.swift; path = Sources/ShuffleType.swift; sourceTree = ""; }; - 2486DF70FF7CED02C2BCEFC76C633FFB /* Int+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Int+RandomKit.swift"; path = "Sources/Int+RandomKit.swift"; sourceTree = ""; }; - 265B800B70631563FB2D4C43ED9AF33F /* Array+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+RandomKit.swift"; path = "Sources/Array+RandomKit.swift"; sourceTree = ""; }; - 270DD1219F1E6CF00379D39F252D87C6 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; }; - 27AED05CB2E9CB0AF773075DBC8A782B /* RandomKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RandomKit-prefix.pch"; sourceTree = ""; }; - 27B517E9C0FE89A2BB63698B2E07BC63 /* NSNumber+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSNumber+RandomKit.swift"; path = "Sources/NSNumber+RandomKit.swift"; sourceTree = ""; }; - 28351ED24E5E9302AC1022C8C268ADF0 /* String+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+RandomKit.swift"; path = "Sources/String+RandomKit.swift"; sourceTree = ""; }; - 291F6BED9AEFBE48174D0576127A5B23 /* Pods-Speculid-App-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Speculid-App-umbrella.h"; sourceTree = ""; }; - 2C1531D495CFB3FF169709D5264AAF6A /* Float+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Float+RandomKit.swift"; path = "Sources/Float+RandomKit.swift"; sourceTree = ""; }; - 2F2F37A94D7C6BCF8AA811D40A12AC97 /* rfc3339.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = rfc3339.swift; path = Source/rfc3339.swift; sourceTree = ""; }; - 3186EDFE301F2DCE8C5CE407615EFF08 /* URL+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URL+RandomKit.swift"; path = "Sources/URL+RandomKit.swift"; sourceTree = ""; }; - 31AD8AB4265B6D35E3111DECBDD27921 /* Character+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Character+RandomKit.swift"; path = "Sources/Character+RandomKit.swift"; sourceTree = ""; }; - 401D182289F7CD30085A9A1565E2CB05 /* CharacterSet+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CharacterSet+RandomKit.swift"; path = "Sources/CharacterSet+RandomKit.swift"; sourceTree = ""; }; - 401F6CDF163571DDF3571463B0367256 /* SwiftVer-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftVer-dummy.m"; sourceTree = ""; }; - 45C2A49780BC8178289DB2E9140621E6 /* Pods-SpeculidTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SpeculidTests.release.xcconfig"; sourceTree = ""; }; - 4B9027F477AE5EC96D118E37BB55A67B /* Pods-Speculid-App-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Speculid-App-acknowledgements.plist"; sourceTree = ""; }; - 508889B4D5A01594474811CCE19C5665 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5B5C3871CB6BA47C60C078C0EF73980C /* CGFloat+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CGFloat+RandomKit.swift"; path = "Sources/CGFloat+RandomKit.swift"; sourceTree = ""; }; - 5D2DDAA82105F4A221BC2D3826483265 /* VersionContainerProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VersionContainerProtocol.swift; path = Source/VersionContainerProtocol.swift; sourceTree = ""; }; - 640C0481775673994087BFBD93D1DF45 /* Pods_Speculid_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Speculid_App.framework; path = "Pods-Speculid-App.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 688B988998C412A31E9D94141A4E2763 /* Version.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Version.swift; path = Source/Version.swift; sourceTree = ""; }; - 6F16EA13EBF9CB101BF42FE7E2CC052B /* Pods-Speculid-App-Speculid-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Speculid-App-Speculid-acknowledgements.markdown"; sourceTree = ""; }; - 74A13FD9CD8CA0785B03A0711A7F8A76 /* Pods_Speculid_App_Speculid.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Speculid_App_Speculid.framework; path = "Pods-Speculid-App-Speculid.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 74C2DD9D23FC539B049B47E5900917BA /* Pods-Speculid-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Speculid-App.release.xcconfig"; sourceTree = ""; }; - 76F0F426B67709C63AA6AC575DBB1348 /* Pods-SpeculidTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SpeculidTests.debug.xcconfig"; sourceTree = ""; }; - 7D250FF4409A5196DDE944E63D7FEB3C /* Pods-SpeculidTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SpeculidTests-acknowledgements.plist"; sourceTree = ""; }; - 7D826C3982E53E43ECC31DDDEB5E9C65 /* CGSize+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CGSize+RandomKit.swift"; path = "Sources/CGSize+RandomKit.swift"; sourceTree = ""; }; - 7F5DA1FA93FC5368A6EC9E975BF7597C /* RandomKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = RandomKit.framework; path = RandomKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7FA30BE76FED0A2776FC0826B3C295DF /* SemVer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SemVer.swift; path = Source/SemVer.swift; sourceTree = ""; }; - 835921A9A6FFB61DEB25F4146F9F1810 /* Pods-Speculid-App-Speculid-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Speculid-App-Speculid-umbrella.h"; sourceTree = ""; }; - 86C9E842C30A7FCBCB4F3CEE71052B73 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8F3F7DE954BC5BE80A4C4ABC9147FA9D /* Bool+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bool+RandomKit.swift"; path = "Sources/Bool+RandomKit.swift"; sourceTree = ""; }; - 8FC4E8FE2FF3F55D82FDB24EEDBAD8AD /* Dictionary+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Dictionary+RandomKit.swift"; path = "Sources/Dictionary+RandomKit.swift"; sourceTree = ""; }; - 91C057B907E9DC56C0F57FE1F38BB7F1 /* RandomKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RandomKit.xcconfig; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 941D2B28CC16BE41D2E49D822346EA7E /* Pods-Speculid-App-Speculid-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Speculid-App-Speculid-acknowledgements.plist"; sourceTree = ""; }; - 990B4DA87204E82371D676BE799CE81E /* RandomKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = RandomKit.modulemap; sourceTree = ""; }; - 9BD8E876F98A7917E1F93FF6ECD6A801 /* Pods-Speculid-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Speculid-App.debug.xcconfig"; sourceTree = ""; }; - 9FE9FBF24E41E19C0001BC720C881192 /* CGVector+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CGVector+RandomKit.swift"; path = "Sources/CGVector+RandomKit.swift"; sourceTree = ""; }; - A1E6A1087E507A0ACF14BEDD2DE3C4DF /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - A28343DD8B08857A03FC8AA9B5162F1D /* RandomKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RandomKit-umbrella.h"; sourceTree = ""; }; - A47E4DEFC97C767B0D6CB7B284392141 /* SwiftVer.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = SwiftVer.modulemap; sourceTree = ""; }; - B2477086C9E8C95BF42A80CB4DAAE9BB /* Pods_SpeculidTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SpeculidTests.framework; path = "Pods-SpeculidTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - B81B8F9B67B6234D653F667986A7A627 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - B9ACAAFE1918C36DED1733A8BBEB3913 /* Pods-SpeculidTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SpeculidTests-umbrella.h"; sourceTree = ""; }; - BA13D1D67FB778EFA378D6897A4C4758 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BB98A5E27EEE21BD7584BFD1E1CE1374 /* Pods-Speculid-App-Speculid.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-Speculid-App-Speculid.modulemap"; sourceTree = ""; }; - BD42AE3191B7A5ED41E37EB8CDFA7250 /* Pods-SpeculidTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SpeculidTests-dummy.m"; sourceTree = ""; }; - C0E4D3221AAEDEA247864AD2D2F41294 /* Pods-Speculid-App-Speculid.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Speculid-App-Speculid.debug.xcconfig"; sourceTree = ""; }; - C55EB03AF7DCD6A928BAC312A9568E9D /* CGPoint+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CGPoint+RandomKit.swift"; path = "Sources/CGPoint+RandomKit.swift"; sourceTree = ""; }; - C56B9E6A924CB2DABC8461EA5D0ED05D /* Pods-Speculid-App-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Speculid-App-acknowledgements.markdown"; sourceTree = ""; }; - C659030EF04E589EBCEB532A55FB7BC2 /* SwiftVer.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftVer.xcconfig; sourceTree = ""; }; - C75B3F2B821A046D1593DD1B1329BD89 /* Pods-Speculid-App-Speculid-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Speculid-App-Speculid-dummy.m"; sourceTree = ""; }; - C9E8ABE9D6C59EDA90D8BCD2F050DAFF /* VersionControlType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VersionControlType.swift; path = Source/VersionControlType.swift; sourceTree = ""; }; - CA7DBF8D5E2B0064D2EE324576B6A222 /* Set+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Set+RandomKit.swift"; path = "Sources/Set+RandomKit.swift"; sourceTree = ""; }; - CA8E53055D64E3059F55DD8E02FB0495 /* Pods-Speculid-App-Speculid.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Speculid-App-Speculid.release.xcconfig"; sourceTree = ""; }; - CE7F61E4AB8BF4771DD94F0071CDB1DD /* Pods-Speculid-App.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-Speculid-App.modulemap"; sourceTree = ""; }; - D1059B8D867BE717235AB56443596C35 /* SwiftVer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SwiftVer.framework; path = SwiftVer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D55D4F4EC67EEAE276A1D7BFB7D9C84F /* Pods-Speculid-App-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Speculid-App-resources.sh"; sourceTree = ""; }; - D7E92454A0FCD877E7DB39404E088601 /* Float80+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Float80+RandomKit.swift"; path = "Sources/Float80+RandomKit.swift"; sourceTree = ""; }; - E27CC09E6D4B60552CC4B95E4D4EDEE2 /* Pods-SpeculidTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-SpeculidTests.modulemap"; sourceTree = ""; }; - E4F0CA11780D7060AD13D221CFC80FCB /* Color+RandomKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Color+RandomKit.swift"; path = "Sources/Color+RandomKit.swift"; sourceTree = ""; }; - E683CBBDDB09DB9223EA40FF9D6C7D74 /* Pods-Speculid-App-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Speculid-App-frameworks.sh"; sourceTree = ""; }; - E8FFCCD0BC1E4641D177A4C510207A0C /* RandomType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomType.swift; path = Sources/RandomType.swift; sourceTree = ""; }; - F3F236A3F1770B5133C9DB681AE97104 /* Pods-Speculid-App-Speculid-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Speculid-App-Speculid-resources.sh"; sourceTree = ""; }; - F8D9D6EC8BB6A4A83B98B2B14ABEDEF7 /* RandomKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RandomKit-dummy.m"; sourceTree = ""; }; - FA5A0A518FCDEC46731E70CA3638F78B /* Pods-SpeculidTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SpeculidTests-frameworks.sh"; sourceTree = ""; }; - FC30B81B2B53ACE06C11740EB370CB47 /* SwiftVer-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftVer-prefix.pch"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 03AB454A128271832851E3FE549B9150 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 4FF4F8B3183DDFC421D810C2990E72EB /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 64DA85657E18973ABC2B5E2B1B7C4AD6 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ABC34C3041848CC393029101DFE7BC59 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E53D02037A891B8D957632CC045D6A46 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8BBEB05A0D606613CCF94AE9A5322790 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB4851595EC17E25F986967258F514FA /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - FF08851D2E82B7A9F8444CDC43D717F5 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - ECD6EE7695946D83498CC5C0822546E6 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 49EECDBF068D518FAA61711F3C39D778 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 04C068A18C5413F804A2959126093416 /* OS X */ = { - isa = PBXGroup; - children = ( - 270DD1219F1E6CF00379D39F252D87C6 /* Cocoa.framework */, - ); - name = "OS X"; - sourceTree = ""; - }; - 35D163A2698FA876629B4E7D49AC1A47 /* SwiftVer */ = { - isa = PBXGroup; - children = ( - 2F2F37A94D7C6BCF8AA811D40A12AC97 /* rfc3339.swift */, - 7FA30BE76FED0A2776FC0826B3C295DF /* SemVer.swift */, - 688B988998C412A31E9D94141A4E2763 /* Version.swift */, - 5D2DDAA82105F4A221BC2D3826483265 /* VersionContainerProtocol.swift */, - 1338C074F5C1BB72C98E491DAE61E191 /* VersionControlInfo.swift */, - C9E8ABE9D6C59EDA90D8BCD2F050DAFF /* VersionControlType.swift */, - CC9C447A168964A8A2600872E49905A7 /* Support Files */, - ); - name = SwiftVer; - path = SwiftVer; - sourceTree = ""; - }; - 39E9EE8210D861DFD82346C1F5EB7218 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 04C068A18C5413F804A2959126093416 /* OS X */, - ); - name = Frameworks; - sourceTree = ""; - }; - 3BFB4D5DB7832C2EEBEE1BCD2E7AC109 /* Products */ = { - isa = PBXGroup; - children = ( - 640C0481775673994087BFBD93D1DF45 /* Pods_Speculid_App.framework */, - 74A13FD9CD8CA0785B03A0711A7F8A76 /* Pods_Speculid_App_Speculid.framework */, - B2477086C9E8C95BF42A80CB4DAAE9BB /* Pods_SpeculidTests.framework */, - 7F5DA1FA93FC5368A6EC9E975BF7597C /* RandomKit.framework */, - D1059B8D867BE717235AB56443596C35 /* SwiftVer.framework */, - ); - name = Products; - sourceTree = ""; - }; - 5E8E73CF14A60C2517A118E3C038988A /* Pods-SpeculidTests */ = { - isa = PBXGroup; - children = ( - BA13D1D67FB778EFA378D6897A4C4758 /* Info.plist */, - E27CC09E6D4B60552CC4B95E4D4EDEE2 /* Pods-SpeculidTests.modulemap */, - 153D488EFDD4970D0C0C38F0C4AB0AB4 /* Pods-SpeculidTests-acknowledgements.markdown */, - 7D250FF4409A5196DDE944E63D7FEB3C /* Pods-SpeculidTests-acknowledgements.plist */, - BD42AE3191B7A5ED41E37EB8CDFA7250 /* Pods-SpeculidTests-dummy.m */, - FA5A0A518FCDEC46731E70CA3638F78B /* Pods-SpeculidTests-frameworks.sh */, - 15996322066B29F90775748D85C57973 /* Pods-SpeculidTests-resources.sh */, - B9ACAAFE1918C36DED1733A8BBEB3913 /* Pods-SpeculidTests-umbrella.h */, - 76F0F426B67709C63AA6AC575DBB1348 /* Pods-SpeculidTests.debug.xcconfig */, - 45C2A49780BC8178289DB2E9140621E6 /* Pods-SpeculidTests.release.xcconfig */, - ); - name = "Pods-SpeculidTests"; - path = "Target Support Files/Pods-SpeculidTests"; - sourceTree = ""; - }; - 5FCEF7D1CB4DBE90F7D2CE7A23D938A8 /* Pods */ = { - isa = PBXGroup; - children = ( - FBC86BCC0292E1A15C79A172FD0090C1 /* RandomKit */, - 35D163A2698FA876629B4E7D49AC1A47 /* SwiftVer */, - ); - name = Pods; - sourceTree = ""; - }; - 7DB346D0F39D3F0E887471402A8071AB = { - isa = PBXGroup; - children = ( - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - 39E9EE8210D861DFD82346C1F5EB7218 /* Frameworks */, - 5FCEF7D1CB4DBE90F7D2CE7A23D938A8 /* Pods */, - 3BFB4D5DB7832C2EEBEE1BCD2E7AC109 /* Products */, - 9A76FAEDF72C8F42AF4E9C75D39F1600 /* Targets Support Files */, - ); - sourceTree = ""; - }; - 96670B039762A9E498C0863F13A61A8A /* Support Files */ = { - isa = PBXGroup; - children = ( - 86C9E842C30A7FCBCB4F3CEE71052B73 /* Info.plist */, - 990B4DA87204E82371D676BE799CE81E /* RandomKit.modulemap */, - 91C057B907E9DC56C0F57FE1F38BB7F1 /* RandomKit.xcconfig */, - F8D9D6EC8BB6A4A83B98B2B14ABEDEF7 /* RandomKit-dummy.m */, - 27AED05CB2E9CB0AF773075DBC8A782B /* RandomKit-prefix.pch */, - A28343DD8B08857A03FC8AA9B5162F1D /* RandomKit-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/RandomKit"; - sourceTree = ""; - }; - 9A76FAEDF72C8F42AF4E9C75D39F1600 /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - B7298A000A06A3F6FBBD39CF18314B32 /* Pods-Speculid-App */, - B4C74BAC14A656F785FD4920CA2C60E1 /* Pods-Speculid-App-Speculid */, - 5E8E73CF14A60C2517A118E3C038988A /* Pods-SpeculidTests */, - ); - name = "Targets Support Files"; - sourceTree = ""; - }; - B4C74BAC14A656F785FD4920CA2C60E1 /* Pods-Speculid-App-Speculid */ = { - isa = PBXGroup; - children = ( - A1E6A1087E507A0ACF14BEDD2DE3C4DF /* Info.plist */, - BB98A5E27EEE21BD7584BFD1E1CE1374 /* Pods-Speculid-App-Speculid.modulemap */, - 6F16EA13EBF9CB101BF42FE7E2CC052B /* Pods-Speculid-App-Speculid-acknowledgements.markdown */, - 941D2B28CC16BE41D2E49D822346EA7E /* Pods-Speculid-App-Speculid-acknowledgements.plist */, - C75B3F2B821A046D1593DD1B1329BD89 /* Pods-Speculid-App-Speculid-dummy.m */, - F3F236A3F1770B5133C9DB681AE97104 /* Pods-Speculid-App-Speculid-resources.sh */, - 835921A9A6FFB61DEB25F4146F9F1810 /* Pods-Speculid-App-Speculid-umbrella.h */, - C0E4D3221AAEDEA247864AD2D2F41294 /* Pods-Speculid-App-Speculid.debug.xcconfig */, - CA8E53055D64E3059F55DD8E02FB0495 /* Pods-Speculid-App-Speculid.release.xcconfig */, - ); - name = "Pods-Speculid-App-Speculid"; - path = "Target Support Files/Pods-Speculid-App-Speculid"; - sourceTree = ""; - }; - B7298A000A06A3F6FBBD39CF18314B32 /* Pods-Speculid-App */ = { - isa = PBXGroup; - children = ( - B81B8F9B67B6234D653F667986A7A627 /* Info.plist */, - CE7F61E4AB8BF4771DD94F0071CDB1DD /* Pods-Speculid-App.modulemap */, - C56B9E6A924CB2DABC8461EA5D0ED05D /* Pods-Speculid-App-acknowledgements.markdown */, - 4B9027F477AE5EC96D118E37BB55A67B /* Pods-Speculid-App-acknowledgements.plist */, - 022ACAC6E8FD9FF44D37120C1F578CD6 /* Pods-Speculid-App-dummy.m */, - E683CBBDDB09DB9223EA40FF9D6C7D74 /* Pods-Speculid-App-frameworks.sh */, - D55D4F4EC67EEAE276A1D7BFB7D9C84F /* Pods-Speculid-App-resources.sh */, - 291F6BED9AEFBE48174D0576127A5B23 /* Pods-Speculid-App-umbrella.h */, - 9BD8E876F98A7917E1F93FF6ECD6A801 /* Pods-Speculid-App.debug.xcconfig */, - 74C2DD9D23FC539B049B47E5900917BA /* Pods-Speculid-App.release.xcconfig */, - ); - name = "Pods-Speculid-App"; - path = "Target Support Files/Pods-Speculid-App"; - sourceTree = ""; - }; - CC9C447A168964A8A2600872E49905A7 /* Support Files */ = { - isa = PBXGroup; - children = ( - 508889B4D5A01594474811CCE19C5665 /* Info.plist */, - A47E4DEFC97C767B0D6CB7B284392141 /* SwiftVer.modulemap */, - C659030EF04E589EBCEB532A55FB7BC2 /* SwiftVer.xcconfig */, - 401F6CDF163571DDF3571463B0367256 /* SwiftVer-dummy.m */, - FC30B81B2B53ACE06C11740EB370CB47 /* SwiftVer-prefix.pch */, - 04C9499206C0A3E97616EAC8CF9FAE0C /* SwiftVer-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/SwiftVer"; - sourceTree = ""; - }; - FBC86BCC0292E1A15C79A172FD0090C1 /* RandomKit */ = { - isa = PBXGroup; - children = ( - 265B800B70631563FB2D4C43ED9AF33F /* Array+RandomKit.swift */, - 8F3F7DE954BC5BE80A4C4ABC9147FA9D /* Bool+RandomKit.swift */, - 5B5C3871CB6BA47C60C078C0EF73980C /* CGFloat+RandomKit.swift */, - C55EB03AF7DCD6A928BAC312A9568E9D /* CGPoint+RandomKit.swift */, - 10B2A9EE746842C58A1C543CF5A23EB6 /* CGRect+RandomKit.swift */, - 7D826C3982E53E43ECC31DDDEB5E9C65 /* CGSize+RandomKit.swift */, - 9FE9FBF24E41E19C0001BC720C881192 /* CGVector+RandomKit.swift */, - 31AD8AB4265B6D35E3111DECBDD27921 /* Character+RandomKit.swift */, - 401D182289F7CD30085A9A1565E2CB05 /* CharacterSet+RandomKit.swift */, - 0C32AA0083E0536285549A047C6FFA96 /* Collection+RandomKit.swift */, - E4F0CA11780D7060AD13D221CFC80FCB /* Color+RandomKit.swift */, - 03B75C1D052B9A06B8928782A87AC2E4 /* Date+RandomKit.swift */, - 8FC4E8FE2FF3F55D82FDB24EEDBAD8AD /* Dictionary+RandomKit.swift */, - 02B1DBA066E76E54E4435A28F760F8E2 /* Double+RandomKit.swift */, - 2C1531D495CFB3FF169709D5264AAF6A /* Float+RandomKit.swift */, - D7E92454A0FCD877E7DB39404E088601 /* Float80+RandomKit.swift */, - 2486DF70FF7CED02C2BCEFC76C633FFB /* Int+RandomKit.swift */, - 27B517E9C0FE89A2BB63698B2E07BC63 /* NSNumber+RandomKit.swift */, - 06164A34B563191CAB3565739217187B /* Random.swift */, - E8FFCCD0BC1E4641D177A4C510207A0C /* RandomType.swift */, - 004F0329E7FF66B97DB1B61FE2F62339 /* Sequence+RandomKit.swift */, - CA7DBF8D5E2B0064D2EE324576B6A222 /* Set+RandomKit.swift */, - 2093F66D0FD029BDD36943210A32FC36 /* ShuffleType.swift */, - 28351ED24E5E9302AC1022C8C268ADF0 /* String+RandomKit.swift */, - 3186EDFE301F2DCE8C5CE407615EFF08 /* URL+RandomKit.swift */, - 96670B039762A9E498C0863F13A61A8A /* Support Files */, - ); - name = RandomKit; - path = RandomKit; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 17047FEDADB4D2E37B2A2AE7A0DAAFE0 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 4A7B132D54CF97B55B2493863002D8D6 /* Pods-Speculid-App-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 61A0565F2AB83A391BFF4A38ADD3E0B9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - FAB892D135B1184E061E61D4A811E548 /* RandomKit-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 750F98BBA470D089C48DAB0EE969E40F /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 53DAF3CF1743BA167E84FF9747204E53 /* SwiftVer-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B396F4476A4FAE4587B5ABA782F6744F /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 929B72A8EA8C3B0FBE369696DA41F835 /* Pods-Speculid-App-Speculid-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DD156A6E86E648C13FE16B3EA10A219F /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 06BC86125FCCF51D4F94EA2F7D9F81A3 /* Pods-SpeculidTests-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 6B4186CE44A8ABF7BE40C3D93E6C2575 /* SwiftVer */ = { - isa = PBXNativeTarget; - buildConfigurationList = F2619F6C0C5E5E3364B2A0E1FEFE8CB5 /* Build configuration list for PBXNativeTarget "SwiftVer" */; - buildPhases = ( - C63D04BAD5E253F4B4848F25F5ECF02A /* Sources */, - EB4851595EC17E25F986967258F514FA /* Frameworks */, - 750F98BBA470D089C48DAB0EE969E40F /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SwiftVer; - productName = SwiftVer; - productReference = D1059B8D867BE717235AB56443596C35 /* SwiftVer.framework */; - productType = "com.apple.product-type.framework"; - }; - 6D15953639425373453EC29444BEB0B9 /* RandomKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9D09A2CFA36EE8EF2556A8B2FFF1FD72 /* Build configuration list for PBXNativeTarget "RandomKit" */; - buildPhases = ( - 183E89F5B228310BD22A62BD38F7AA70 /* Sources */, - 64DA85657E18973ABC2B5E2B1B7C4AD6 /* Frameworks */, - 61A0565F2AB83A391BFF4A38ADD3E0B9 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = RandomKit; - productName = RandomKit; - productReference = 7F5DA1FA93FC5368A6EC9E975BF7597C /* RandomKit.framework */; - productType = "com.apple.product-type.framework"; - }; - 6D84EE5FA82F70D03B06AA3ADAC6F0FC /* Pods-Speculid-App-Speculid */ = { - isa = PBXNativeTarget; - buildConfigurationList = 777F0C3B7CA8175ED6EF8DBDB8C5BE0A /* Build configuration list for PBXNativeTarget "Pods-Speculid-App-Speculid" */; - buildPhases = ( - AF26EEA8BF991B443ACF3C8C1B9FC049 /* Sources */, - E53D02037A891B8D957632CC045D6A46 /* Frameworks */, - B396F4476A4FAE4587B5ABA782F6744F /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - B921D5A3E2602AB7DB2D0D9BA89A1C10 /* PBXTargetDependency */, - ); - name = "Pods-Speculid-App-Speculid"; - productName = "Pods-Speculid-App-Speculid"; - productReference = 74A13FD9CD8CA0785B03A0711A7F8A76 /* Pods_Speculid_App_Speculid.framework */; - productType = "com.apple.product-type.framework"; - }; - 809C56B9170C07691F92E12F560336C7 /* Pods-SpeculidTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 4F18298FB0B1BAC2D9EA0DE1685B3EC5 /* Build configuration list for PBXNativeTarget "Pods-SpeculidTests" */; - buildPhases = ( - 54865116EB4DD1C1B2E0C96ECD0874F8 /* Sources */, - 03AB454A128271832851E3FE549B9150 /* Frameworks */, - DD156A6E86E648C13FE16B3EA10A219F /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - FA7D3E47581CE39090D8AFEBC1671EC2 /* PBXTargetDependency */, - 00CD493E35E81FD1148D910B27B204CB /* PBXTargetDependency */, - ); - name = "Pods-SpeculidTests"; - productName = "Pods-SpeculidTests"; - productReference = B2477086C9E8C95BF42A80CB4DAAE9BB /* Pods_SpeculidTests.framework */; - productType = "com.apple.product-type.framework"; - }; - EEC273D31AF2696EEC668C3D0D055F8C /* Pods-Speculid-App */ = { - isa = PBXNativeTarget; - buildConfigurationList = BFA868C0433B39991B1FE947CBD8891D /* Build configuration list for PBXNativeTarget "Pods-Speculid-App" */; - buildPhases = ( - 3B32D0295E4362EFAFA3ACA4EB3A6AFA /* Sources */, - ECD6EE7695946D83498CC5C0822546E6 /* Frameworks */, - 17047FEDADB4D2E37B2A2AE7A0DAAFE0 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - 46960C6D10B88896F4E3484DCDB14299 /* PBXTargetDependency */, - ); - name = "Pods-Speculid-App"; - productName = "Pods-Speculid-App"; - productReference = 640C0481775673994087BFBD93D1DF45 /* Pods_Speculid_App.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0700; - }; - buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = 3BFB4D5DB7832C2EEBEE1BCD2E7AC109 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - EEC273D31AF2696EEC668C3D0D055F8C /* Pods-Speculid-App */, - 6D84EE5FA82F70D03B06AA3ADAC6F0FC /* Pods-Speculid-App-Speculid */, - 809C56B9170C07691F92E12F560336C7 /* Pods-SpeculidTests */, - 6D15953639425373453EC29444BEB0B9 /* RandomKit */, - 6B4186CE44A8ABF7BE40C3D93E6C2575 /* SwiftVer */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 183E89F5B228310BD22A62BD38F7AA70 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 249768C0B08DFC1502A6D8AB54100112 /* Array+RandomKit.swift in Sources */, - C53958448F8141102C8891967274CE36 /* Bool+RandomKit.swift in Sources */, - 3D95F927D306EBAA8B4221D701209918 /* CGFloat+RandomKit.swift in Sources */, - 606F21F8B7920101386435ACCDC9C6BF /* CGPoint+RandomKit.swift in Sources */, - F5FD67E482D0D3BEAA19468E3EB0162D /* CGRect+RandomKit.swift in Sources */, - 783628C3D8872B2CF8A1575AD5B2E660 /* CGSize+RandomKit.swift in Sources */, - 8561A8771715305ECE124BBA63C8BF4E /* CGVector+RandomKit.swift in Sources */, - 2A70D9DC67B1971CCCB1E67DAC71730E /* Character+RandomKit.swift in Sources */, - 6A3648833EB7DB16C104118624531EDF /* CharacterSet+RandomKit.swift in Sources */, - 11896BE65DB906623399E2EB9F778039 /* Collection+RandomKit.swift in Sources */, - 3955304E433BC86498DF54FC71702CE9 /* Color+RandomKit.swift in Sources */, - 667FC3EBB472BD755584F5B836316808 /* Date+RandomKit.swift in Sources */, - 8612FDE9D8CD651D128645E5D9DF3214 /* Dictionary+RandomKit.swift in Sources */, - F6CBE088DFBAD81A76818DC6066381AB /* Double+RandomKit.swift in Sources */, - 63026CC806DBBA86EF2B11EF58A35651 /* Float+RandomKit.swift in Sources */, - 5655AF7C28F37EF2900F64EF46DB2E9F /* Float80+RandomKit.swift in Sources */, - FB2AB1BD85D212497E4A22445FECFB80 /* Int+RandomKit.swift in Sources */, - 408C40C19D28E156900913218268F71A /* NSNumber+RandomKit.swift in Sources */, - E6BC052E317B0E09820777F5CD8E918D /* Random.swift in Sources */, - 7EF64A8E1CA26F618F8913B507D041BC /* RandomKit-dummy.m in Sources */, - BC6EC7058D224F53AD9892EB86F75AFA /* RandomType.swift in Sources */, - 5940CABE6D284DB357A3A7BBB27E6F3C /* Sequence+RandomKit.swift in Sources */, - 71CF1052D3ED507CB2F9F473EAC665F0 /* Set+RandomKit.swift in Sources */, - BAC6711FB8EBD8EC7FA5291B9C015D3F /* ShuffleType.swift in Sources */, - 5C77EBF34CD77C3AF9EB81400DB66063 /* String+RandomKit.swift in Sources */, - 7FFEB120BAA97DF937AEC2E000C07D0F /* URL+RandomKit.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3B32D0295E4362EFAFA3ACA4EB3A6AFA /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D312C42C1D8499C074258B6496B2F1D0 /* Pods-Speculid-App-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 54865116EB4DD1C1B2E0C96ECD0874F8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 005A936EC81AE376BBC9D558F8C19CD7 /* Pods-SpeculidTests-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - AF26EEA8BF991B443ACF3C8C1B9FC049 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E3A692FAA3746240C00EB7B15B48CBB2 /* Pods-Speculid-App-Speculid-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - C63D04BAD5E253F4B4848F25F5ECF02A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E55D1A92945A8DC8C0AF93AD18AF225C /* rfc3339.swift in Sources */, - A968548695BD745AED7FDBA536A06431 /* SemVer.swift in Sources */, - F70618F8CB7B3BBF1991723D957FBA7A /* SwiftVer-dummy.m in Sources */, - ACD35C58495B749EF900BF90FF2ABDE2 /* Version.swift in Sources */, - 6FD753B68375C9E28168586BA40B07E9 /* VersionContainerProtocol.swift in Sources */, - D300ACC12196EDB4B65B8376A6E963CE /* VersionControlInfo.swift in Sources */, - 0A8685D6E4073BF292A98A8BD1F944DE /* VersionControlType.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 00CD493E35E81FD1148D910B27B204CB /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = SwiftVer; - target = 6B4186CE44A8ABF7BE40C3D93E6C2575 /* SwiftVer */; - targetProxy = 05CA13AA59677A1AA07CDDDD427D4543 /* PBXContainerItemProxy */; - }; - 46960C6D10B88896F4E3484DCDB14299 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = SwiftVer; - target = 6B4186CE44A8ABF7BE40C3D93E6C2575 /* SwiftVer */; - targetProxy = 4F08B8E0068EF2E803B4986FA4D212E8 /* PBXContainerItemProxy */; - }; - B921D5A3E2602AB7DB2D0D9BA89A1C10 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = SwiftVer; - target = 6B4186CE44A8ABF7BE40C3D93E6C2575 /* SwiftVer */; - targetProxy = 3CBFE0FFFCC4612BFD7313CB42594103 /* PBXContainerItemProxy */; - }; - FA7D3E47581CE39090D8AFEBC1671EC2 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RandomKit; - target = 6D15953639425373453EC29444BEB0B9 /* RandomKit */; - targetProxy = 21F197F53D322402DFDBF1592CADB28F /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 05A8AED1F11DD17092FD5AD0BDC6690F /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 91C057B907E9DC56C0F57FE1F38BB7F1 /* RandomKit.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_VERSION = A; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/RandomKit/RandomKit-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RandomKit/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "Target Support Files/RandomKit/RandomKit.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = RandomKit; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 0D956F6DD2C8FE85FE8E50898B6F0EA0 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 74C2DD9D23FC539B049B47E5900917BA /* Pods-Speculid-App.release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_VERSION = A; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-Speculid-App/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = "Target Support Files/Pods-Speculid-App/Pods-Speculid-App.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_Speculid_App; - SDKROOT = macosx; - SKIP_INSTALL = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 151AE9C8ECD2C1C5982C4A8692125172 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 91C057B907E9DC56C0F57FE1F38BB7F1 /* RandomKit.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_VERSION = A; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/RandomKit/RandomKit-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RandomKit/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "Target Support Files/RandomKit/RandomKit.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = RandomKit; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 3B2B04186B5732FFDC8A94E27F94D746 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = CA8E53055D64E3059F55DD8E02FB0495 /* Pods-Speculid-App-Speculid.release.xcconfig */; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_VERSION = A; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-Speculid-App-Speculid/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = "Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_Speculid_App_Speculid; - SDKROOT = macosx; - SKIP_INSTALL = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 4F868C0F96A0AA793AB81B6F6E4D25BD /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = C659030EF04E589EBCEB532A55FB7BC2 /* SwiftVer.xcconfig */; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_VERSION = A; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/SwiftVer/SwiftVer-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SwiftVer/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = "Target Support Files/SwiftVer/SwiftVer.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = SwiftVer; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 9420A7205B8F85520AF134F4EE25F7CC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.10; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97000BD144D7D1B42F6BB188C1463451 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = C0E4D3221AAEDEA247864AD2D2F41294 /* Pods-Speculid-App-Speculid.debug.xcconfig */; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_VERSION = A; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-Speculid-App-Speculid/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = "Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_Speculid_App_Speculid; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 9DD90A5A944E901813D159D439638D0E /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 45C2A49780BC8178289DB2E9140621E6 /* Pods-SpeculidTests.release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_VERSION = A; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-SpeculidTests/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = "Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_SpeculidTests; - SDKROOT = macosx; - SKIP_INSTALL = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 9FF390075AF74ADA90AD9439F4D9E0C2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 76F0F426B67709C63AA6AC575DBB1348 /* Pods-SpeculidTests.debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_VERSION = A; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-SpeculidTests/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = "Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_SpeculidTests; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - A58D15CFDF502864459CD823AE6630B8 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = C659030EF04E589EBCEB532A55FB7BC2 /* SwiftVer.xcconfig */; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_VERSION = A; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/SwiftVer/SwiftVer-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SwiftVer/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = "Target Support Files/SwiftVer/SwiftVer.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = SwiftVer; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - C74E8CA1C80E4129D187BB44E31FF0AE /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9BD8E876F98A7917E1F93FF6ECD6A801 /* Pods-Speculid-App.debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_VERSION = A; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-Speculid-App/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = "Target Support Files/Pods-Speculid-App/Pods-Speculid-App.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_Speculid_App; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - F653E316AB5F825D3AD0CAE700E37071 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.10; - ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - F653E316AB5F825D3AD0CAE700E37071 /* Debug */, - 9420A7205B8F85520AF134F4EE25F7CC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4F18298FB0B1BAC2D9EA0DE1685B3EC5 /* Build configuration list for PBXNativeTarget "Pods-SpeculidTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9FF390075AF74ADA90AD9439F4D9E0C2 /* Debug */, - 9DD90A5A944E901813D159D439638D0E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 777F0C3B7CA8175ED6EF8DBDB8C5BE0A /* Build configuration list for PBXNativeTarget "Pods-Speculid-App-Speculid" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97000BD144D7D1B42F6BB188C1463451 /* Debug */, - 3B2B04186B5732FFDC8A94E27F94D746 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9D09A2CFA36EE8EF2556A8B2FFF1FD72 /* Build configuration list for PBXNativeTarget "RandomKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 151AE9C8ECD2C1C5982C4A8692125172 /* Debug */, - 05A8AED1F11DD17092FD5AD0BDC6690F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BFA868C0433B39991B1FE947CBD8891D /* Build configuration list for PBXNativeTarget "Pods-Speculid-App" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C74E8CA1C80E4129D187BB44E31FF0AE /* Debug */, - 0D956F6DD2C8FE85FE8E50898B6F0EA0 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - F2619F6C0C5E5E3364B2A0E1FEFE8CB5 /* Build configuration list for PBXNativeTarget "SwiftVer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4F868C0F96A0AA793AB81B6F6E4D25BD /* Debug */, - A58D15CFDF502864459CD823AE6630B8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; -} diff --git a/Pods/RandomKit/LICENSE.md b/Pods/RandomKit/LICENSE.md deleted file mode 100644 index 5824cea6..00000000 --- a/Pods/RandomKit/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -# The MIT License (MIT) - -**Copyright (c) 2015-2016 Nikolai Vazquez** - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Pods/RandomKit/README.md b/Pods/RandomKit/README.md deleted file mode 100644 index 0f509fdf..00000000 --- a/Pods/RandomKit/README.md +++ /dev/null @@ -1,413 +0,0 @@ -

- RandomKit -

- -

- Platform - Language: Swift - - CocoaPods - RandomKit - - - Carthage - - - GITTER: join chat - - License -

- -

- Installation - • Usage - • License -

- -RandomKit is a Swift framework that makes random data generation simple and easy. - -## Installation - -### Compatibility - -- Xcode - - Version: **8.0** - - Language: **Swift 3.0** -- OS X - - Compatible With: **OS X 10.11** - - Deployment Target: **OS X 10.9** -- iOS - - Compatible With: **iOS 9.1** - - Deployment Target: **iOS 8.0** -- watchOS - - Compatible With: **watchOS 2.0** - - Deployment Target: **watchOS 2.0** -- tvOS - - Compatible With: **tvOS 9.0** - - Deployment Target: **tvOS 9.0** - -### Install Using CocoaPods -[CocoaPods](https://cocoapods.org/) is a centralized dependency manager for -Objective-C and Swift. Go [here](https://guides.cocoapods.org/using/index.html) -to learn more. - -1. Add the project to your [Podfile](https://guides.cocoapods.org/using/the-podfile.html). - - ```ruby - use_frameworks! - - pod 'RandomKit', '~> 1.6.0' - ``` - -2. Run `pod install` and open the `.xcworkspace` file to launch Xcode. - -3. Import the RandomKit framework. - - ```swift - import RandomKit - ``` - -### Install Using Carthage -[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency -manager for Objective-C and Swift. - -1. Add the project to your [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile). - - ``` - github "nvzqz/RandomKit" - ``` - -2. Run `carthage update` and follow [the additional steps](https://github.com/Carthage/Carthage#getting-started) - in order to add RandomKit to your project. - -3. Import the RandomKit framework. - - ```swift - import RandomKit - ``` - -## Usage - -Try it out for yourself! Download the repo and open 'RandomKit.playground'. - -### Fake Random Data - -Fake data can be generated from static methods found in `Random`. - -#### Gender - -Generate a random gender with a 50/50 chance of being "Male" or "Female". - -```swift -Random.fakeGender() -``` - -#### Phone Number - -Generate a random phone number for a given US state. - -```swift -Random.fakePhoneNumber() // 5808680873 -Random.fakePhoneNumber(.Florida) // 7865276359 -``` - -The default value for state is `._Any`. - -#### English Honorific - -Generate a random English honorific for a given type and gender. - -```swift -Random.fakeEnglishHonorific() // "Prof." -Random.fakeEnglishHonorific(type: .Professional) // "Dr." -Random.fakeEnglishHonorific(type: .Common, gender: .Male) // "Mr." -Random.fakeEnglishHonorific(gender: .Female) // "Lady" -``` - -The default values for type and gender are `._Any` and `.Either` respectively. - -### Protocols - -#### RandomType - -A protocol for types that can generate random values. - -##### `randomGenerator()` - -Returns a generator for infinite random values of `Self`. - -```swift -let generator = Int.randomGenerator() -while let val = generator.next() { - print(val) // 62 -} // 66 - // 45... -``` - -##### `randomGenerator(maxCount:)` - -Returns a generator for random values of `Self` within `maxCount`. - -```swift -let generator = Int.randomGenerator(maxCount: 2) -while let val = generator.next() { - print(val) // 45 -} // 79 -``` - -##### `randomSequence()` - -Returns a sequence of infinite random values of `Self`. - -```swift -for val in Int.randomSequence() { - print(val) // 10 -} // 83 - // 47... -``` - -##### `randomSequence(maxCount:)` - -Returns a sequence of random values of `Self` within `maxCount`. - -```swift -for val in Int.randomSequence(maxCount: 2) { - print(val) // 8 -} // 56 -``` - -##### `Array(randomCount:)` - -Creates an Array of random elements within `randomCount`. - -```swift -[Int](randomCount: 7) // [3, 55, 100, 50, 77, 23, 49] -[String](randomCount: 2) // [";qYFOH10no", "V,Q[+koi>n"] -``` - -##### `Dictionary(randomCount:)` - -Creates a Dictionary of random key-value pairs within `randomCount`. - -```swift -[Int : Int](randomCount: 3) // [43: 45, 56: 16, 44: 89] -``` - -##### `Set(randomCount:)` - -Creates a Set of random elements within `randomCount`. - -```swift -Set(randomCount: 5) // {15, 78, 68, 77, 40} -``` - -###### Warning: - -The `randomCount` parameter must be less than or equal to the total number of possible -values that the given `RandomType` can produce. Otherwise, the initializer will -never finish. - -An example of this is using `Bool` with a `randomCount` greater than 2. - -#### RandomIntervalType - -A protocol for types that can generate random values within a closed interval. - -```swift -Int.random(-100...100) // -79 -Character.random("a"..."z") // "f" -``` - -There are also random generators and random sequences available to -`RandomIntervalType` that can be made for values within an interval. - -#### ShuffleType - -A protocol for types whose elements can be shuffled. - -```swift -// Array -[1, 2, 3, 4, 5].shuffle() // [3, 4, 1, 5, 2] - -// Dictionary -["a": 1, "b": 2, "c": 3].shuffle() // ["a": 3, "b": 1, "c": 2] -``` - -There is also the `shuffleInPlace()` method that shuffles the values in `self` -rather than return the shuffled result. - -### Swift Types - -#### Int - -Generate a random `Int` from within an interval or `0...100` by default. - -```swift -Int.random() // An Int within 0 and 100 -Int.random(10...20) // An Int within 10 and 20 -``` - -#### Double, Float, and Float80 - -Generate a random floating point value from within an interval or `0.0...1.0` by -default. - -```swift -Double.random(-10...10) // -4.03042337718197 -Float.random(-10...10) // 5.167088 -Float80.random(-10...10) // -3.63204542399198874 -``` - -#### Bool - -`Bool.random()` has a 50/50 chance of being `true`. - -#### String and Character - -Generate a random `String` or `Character` from within a `Character` interval or -`" "..."~"` by default. - -```swift -String.random(10) // "}+[=Ng>$w1" -String.random(10, "A"..."z") // "poUtXJIbv[" - -Character.random() // "#" -Character.random("A"..."z") // "s" -``` - -A random `String` or `Character` can also be generated from an `NSCharacterSet`. - -```swift -String.random(10, .uppercaseLetterCharacterSet()) // "ṤƠˆđ•®đ˜ê»á¹„ԱMÄŦ" - -Character.random(.uppercaseLetterCharacterSet()) // "đ™" -``` - -#### Sequence and Collection - -All types that conform to `Sequence` and/or `Collection` have a `random` -property that returns a random element, or `nil` if the collection is empty. - -```swift -["Bob", "Cindy", "May", "Charles", "Javier"].random // "Charles" - -"Hello".characters.random // "e" -``` - -Even Objective-C types that conform to either protocol get this property. - -```swift -NSDictionary(dictionary: ["k1":"v1", "k2":"v2"]).random // (k1, v1) - -NSSet(array: ["First", "Second", "Third", "Fourth"]).random // "Third" -``` - -### Objective-C Types - -#### URL - -Generate a random `URL` from a list of values. - -```swift -URL.random() // https://medium.com/ - // https://stackoverflow.com/ - // https://github.com/ - // ... -``` - -#### Date - -Generate a random date between two `TimeInterval` values, or between `0.0` and -`TimeInterval(UInt32.max)`. - -```swift -Date.random() // "Aug 28, 2006, 3:38 AM" -``` - -#### NSColor and UIColor - -Generate a random color with or without the alpha being random as well. - -```swift -NSColor.random() // r 0.694 g 0.506 b 0.309 a 1.0 -NSColor.random(alpha: true) // r 0.859 g 0.57 b 0.409 a 0.047 - -UIColor.random() // r 0.488 g 0.805 b 0.679 a 1.0 -UIColor.random(alpha: true) // r 0.444 g 0.121 b 0.602 a 0.085 -``` - -#### NSNumber - -Generate a random number from within an integer or double interval, or `0...100` by default. - -```swift -NSNumber.random() // 79 -NSNumber.random(-50...100) // -27 -NSNumber.random(0...200.0) // 149.6156950363926 -``` - -#### CharacterSet - -Get a random character from a character set. - -```swift -CharacterSet.uppercaseLetterCharacterSet().randomCharacter // "Ǩ" -``` - -#### CoreGraphics Types - -##### CGFloat - -Generate a random float like how you would with Double.random() or Float.random(). The default interval is `0.0...1.0`. - -```swift -CGFloat.random() // 0.699803650379181 -CGFloat.random(0...100) // 43.27969591675319 -``` - -##### CGPoint - -Generate a random point from within intervals for x and y. - -```swift -CGPoint.random() // {x 70.093 y 95.721} -CGPoint.random(0...200, 0...10) // {x 73.795 y 0.991} -``` - -##### CGSize - -Generate a random size from within intervals for width and height. - -```swift -CGSize.random() // {w 3.744 h 35.932} -CGSize.random(0...50, 0...400) // {w 38.271 h 239.636} -``` - -##### CGRect - -Generate a random rectangle from within intervals for x, y, width, and height. - -```swift -CGRect.random() // {x 3.872 y 46.15 w 8.852 h 20.201} -CGRect.random(0...50, 0...100, 0...25, 0...10) // {x 13.212 y 79.147 w 20.656 h 5.663} -``` - -##### CGVector - -Generate a random vector from within intervals for dx and dy. - -```swift -CGVector.random() // {dx 13.992 dy 89.376} -CGVector.random(0...50, 0...10) // {dx 35.224 dy 13.463} -``` - -## License - -RandomKit and its assets are released under the [MIT License](LICENSE.md). Assets -can be found in the [`assets`](https://github.com/nvzqz/RandomKit/tree/assets) -branch. diff --git a/Pods/RandomKit/Sources/Array+RandomKit.swift b/Pods/RandomKit/Sources/Array+RandomKit.swift deleted file mode 100644 index 87a7cca8..00000000 --- a/Pods/RandomKit/Sources/Array+RandomKit.swift +++ /dev/null @@ -1,124 +0,0 @@ -// -// Array+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -extension Array: ShuffleType { - - /// Shuffles the elements in `self` and returns the result. - public func shuffle() -> Array { - return indices.reduce(self) { (array, i) in - var mutableArray = array - - let j = Int.random(startIndex ... endIndex - 1) - if j != i { - swap(&mutableArray[i], &mutableArray[j]) - } - return mutableArray - } - } - -} - -extension Array where Element: RandomType { - - /// Construct an Array of random elements. - public init(randomCount: Int) { - self = Array(Element.randomSequence(maxCount: randomCount)) - } - -} - -extension Array where Element: RandomIntervalType { - - /// Construct an Array of random elements from inside of the closed interval. - public init(randomCount: Int, _ interval: ClosedRange) { - self = Array(Element.randomSequence(interval, maxCount: randomCount)) - } - -} - -extension Array { - - /// Returns an array of randomly choosen elements. - /// - /// If `elementCount` >= `count` a copy of this array is returned - /// - /// - Parameters: - /// - elementCount: The number of element to return - public func randomSlice(_ elementCount: Int) -> Array { - if elementCount <= 0 { - return [] - } - if elementCount >= self.count { - return Array(self) - } - // Algorithm R - // fill the reservoir array - var result = Array(self[0..= `count` or `weights.count` < `count` - /// a copy of this array is returned - /// - /// - Parameters: - /// - elementCount: The number of element to return - /// - weights: Apply weights on element. - public func randomSlice(_ elementCount: Int, weights: [Double]) -> Array { - if elementCount <= 0 { - return [] - } - if elementCount >= self.count || weights.count < self.count { - return Array(self) - } - - // Algorithm A-Chao - var result = Array(self[0.. Bool { - return Int.random(0...1) == 0 - } - -} diff --git a/Pods/RandomKit/Sources/CGFloat+RandomKit.swift b/Pods/RandomKit/Sources/CGFloat+RandomKit.swift deleted file mode 100644 index 5eb77b78..00000000 --- a/Pods/RandomKit/Sources/CGFloat+RandomKit.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// CGFloat+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import CoreGraphics - -extension CGFloat: RandomType { - - /// Generates a random `CGFloat`. - /// - /// - Returns: Random value within `0.0...1.0`. - public static func random() -> CGFloat { - return random(0.0...1.0) - } - - /// Generates a random `CGFloat` inside of the closed interval. - /// - /// - Parameters: - /// - interval: The interval within which the number - /// will be generated. - public static func random(_ interval: ClosedRange) -> CGFloat { - return CGFloat(NativeType.random(interval)) - } - -} diff --git a/Pods/RandomKit/Sources/CGPoint+RandomKit.swift b/Pods/RandomKit/Sources/CGPoint+RandomKit.swift deleted file mode 100644 index a897764f..00000000 --- a/Pods/RandomKit/Sources/CGPoint+RandomKit.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// CGPoint+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import CoreGraphics - -extension CGPoint: RandomType { - - /// Generates a random `CGPoint`. - /// - /// - Returns: Random value within `0...100` for both `x` and `y`. - public static func random() -> CGPoint { - return random(0...100, 0...100) - } - - /// Generates a random `CGPoint` inside of the closed intervals. - /// - /// - Parameters: - /// - xInterval: The interval within which `x` will be generated. - /// - yInterval: The interval within which `y` will be generated. - public static func random(_ xInterval: ClosedRange, _ yInterval: ClosedRange) -> CGPoint { - return CGPoint(x: CGFloat.random(xInterval), y: CGFloat.random(yInterval)) - } - -} diff --git a/Pods/RandomKit/Sources/CGRect+RandomKit.swift b/Pods/RandomKit/Sources/CGRect+RandomKit.swift deleted file mode 100644 index 5c09f0dc..00000000 --- a/Pods/RandomKit/Sources/CGRect+RandomKit.swift +++ /dev/null @@ -1,55 +0,0 @@ -// -// CGRect+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import CoreGraphics - -extension CGRect: RandomType { - - /// Generates a random `CGRect`. - /// - /// - Returns: Random value from random `CGPoint` and `CGSize`. - public static func random() -> CGRect { - return CGRect(origin: .random(), size: .random()) - } - - /// Generates a random `CGRect` inside of the closed intervals. - /// - /// - Parameters: - /// - xInterval: The interval within which `x` will be generated. - /// - yInterval: The interval within which `y` will be generated. - /// - widthInterval: The interval within which `width` will be generated. - /// - heightInterval: The interval within which `height` will be generated. - public static func random( - _ xInterval: ClosedRange, - _ yInterval: ClosedRange, - _ widthInterval: ClosedRange, - _ heightInterval: ClosedRange) - -> CGRect { - return CGRect(origin: .random(xInterval, yInterval), size: .random(widthInterval, heightInterval)) - } - -} diff --git a/Pods/RandomKit/Sources/CGSize+RandomKit.swift b/Pods/RandomKit/Sources/CGSize+RandomKit.swift deleted file mode 100644 index d283ef18..00000000 --- a/Pods/RandomKit/Sources/CGSize+RandomKit.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// CGSize+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import CoreGraphics - -extension CGSize: RandomType { - - /// Generates a random `CGSize`. - /// - /// - Returns: Random value within `0...100` for both `width` and `height`. - public static func random() -> CGSize { - return random(0...100, 0...100) - } - - /// Generates a random `CGSize` inside of the closed intervals. - /// - /// - Parameters: - /// - widthInterval: The interval within which `width` will be generated. - /// - heightInterval: The interval within which `height` will be generated. - public static func random(_ widthInterval: ClosedRange, _ heightInterval: ClosedRange) -> CGSize { - return CGSize(width: CGFloat.random(widthInterval), height: CGFloat.random(heightInterval)) - } - -} diff --git a/Pods/RandomKit/Sources/CGVector+RandomKit.swift b/Pods/RandomKit/Sources/CGVector+RandomKit.swift deleted file mode 100644 index b569da07..00000000 --- a/Pods/RandomKit/Sources/CGVector+RandomKit.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// CGVector+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import CoreGraphics - -extension CGVector: RandomType { - - /// Generates a random `CGVector`. - /// - /// - Returns: Random value within `0...100` for both `dx` and `dy`. - public static func random() -> CGVector { - return random(0...100, 0...100) - } - - /// Generates a random `CGVector` inside of the closed intervals. - /// - /// - Parameters: - /// - dxInterval: The interval within which `dx` will be generated. - /// - dyInterval: The interval within which `dy` will be generated. - public static func random(_ dxInterval: ClosedRange, _ dyInterval: ClosedRange) -> CGVector { - let rx = CGFloat.NativeType.random(dxInterval) - let ry = CGFloat.NativeType.random(dyInterval) - return CGVector(dx: CGFloat(rx), dy: CGFloat(ry)) - } - -} diff --git a/Pods/RandomKit/Sources/Character+RandomKit.swift b/Pods/RandomKit/Sources/Character+RandomKit.swift deleted file mode 100644 index 11b87285..00000000 --- a/Pods/RandomKit/Sources/Character+RandomKit.swift +++ /dev/null @@ -1,68 +0,0 @@ -// -// Character+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) - import Darwin -#elseif os(Linux) - import Glibc -#endif - -extension Character : RandomType, RandomIntervalType { - - /// Generates a random `Character`. - /// - /// - Returns: Random value within `" "..."~"`. - public static func random() -> Character { - return random(" "..."~") - } - - /// Generates a random `Character` inside of the closed interval. - /// - /// - Parameters: - /// - interval: The interval within which the character - /// will be generated. - public static func random(_ interval: ClosedRange) -> Character { - var randomValue: UInt32 { - let start = interval.lowerBound.scalar.value - let end = interval.upperBound.scalar.value - let greater = max(start, end) - let lesser = min(start, end) - return lesser + arc4random_uniform(greater - lesser + 1) - } - return Character(UnicodeScalar(randomValue)!) - } - - private var scalar: UnicodeScalar { - get { - return String(self).unicodeScalars.first! - } - mutating set { - self = Character(newValue) - } - } - -} diff --git a/Pods/RandomKit/Sources/CharacterSet+RandomKit.swift b/Pods/RandomKit/Sources/CharacterSet+RandomKit.swift deleted file mode 100644 index 3863c2e9..00000000 --- a/Pods/RandomKit/Sources/CharacterSet+RandomKit.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// NSCharacterSet+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Character { - - /// Generates a random `Character` inside of the character set. - /// - /// - Parameters: - /// - characterSet: The character set within which the character - /// will be generated. - public static func random(_ characterSet: CharacterSet) -> Character? { - return characterSet.randomCharacter - } - -} - -extension String { - - /// Generates a random `String` of a given length inside of - /// the character set. - /// - /// - Parameters: - /// - length: The length for the generated string. - /// Default value is `10`. - /// - characterSet: The character set within which the string - /// will be generated. - public static func random(_ length: UInt = 10, _ characterSet: CharacterSet) -> String { - guard length > 0 else { return "" } - let characters = characterSet.asCharacterArray - return (0 ..< length).reduce("") { value, _ in - guard let character = characters.random else { return value } - return value + String(character) - } - } - -} - -extension CharacterSet { - - /// Returns a random character from `self`, or `nil` if `self` is empty. - public var randomCharacter: Character? { - return self.asCharacterArray.random - } - - fileprivate var asCharacterArray: [Character] { - var value: [Character] = [] - for plane: UTF32Char in 0...16 { - if self.hasMember(inPlane: UInt8(plane)) { - var char: UTF32Char = plane << 16 - - while char < (plane + 1) { - if let string = NSString(bytes: &char, length: 4, encoding: String.Encoding.utf32LittleEndian.rawValue) as? String, self.contains(UnicodeScalar(char)!), - let char: UnicodeScalar = string.unicodeScalars.first { - value.append(Character(char)) - } - - char += 1 - } - } - } - return value - } - -} diff --git a/Pods/RandomKit/Sources/Collection+RandomKit.swift b/Pods/RandomKit/Sources/Collection+RandomKit.swift deleted file mode 100644 index 34329070..00000000 --- a/Pods/RandomKit/Sources/Collection+RandomKit.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// CollectionType+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) - import Darwin -#elseif os(Linux) - import Glibc -#endif - -extension Collection where IndexDistance == Int { - - /// Returns a random element of `self`, or `nil` if `self` is empty. - public var random: Self.Iterator.Element? { - guard !self.isEmpty else { return nil } - let distance = self.distance(from: startIndex, to: endIndex) - let elementIndex = Int(arc4random_uniform(UInt32(distance))) - - return self[self.index(self.startIndex, offsetBy: elementIndex)] - } - -} diff --git a/Pods/RandomKit/Sources/Color+RandomKit.swift b/Pods/RandomKit/Sources/Color+RandomKit.swift deleted file mode 100644 index 36d0845e..00000000 --- a/Pods/RandomKit/Sources/Color+RandomKit.swift +++ /dev/null @@ -1,91 +0,0 @@ -// -// Color+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -#if os(OSX) -import Cocoa - -extension NSColor: RandomType { - - /// Generates a random color. - /// - /// - Returns: Random color without random alpha. - public class func random() -> Self { - return random(alpha: false) - } - - /// Generates a random color. - /// - /// - Parameters: - /// - alpha: If `true`, the alpha value will be random. - /// If `false`, the alpha value will be `1.0`. - public class func random(alpha flag: Bool) -> Self { - return self.init( - red: CGFloat.random(), - green: CGFloat.random(), - blue: CGFloat.random(), - alpha: flag ? CGFloat.random() : 1.0) - } - -} - -#elseif os(iOS) -import UIKit - -#elseif os(watchOS) -import WatchKit - -#endif - - -#if os(iOS) || os(watchOS) -extension UIColor: RandomType { - - /// Generates a random color. - /// - /// - Returns: Random color without random alpha. - public class func random() -> Self { - return random(alpha: false) - } - - /// Generates a random color. - /// - /// - Parameters: - /// - alpha: If `true`, the alpha value will be random. - /// If `false`, the alpha value will be `1.0`. - public class func random(alpha flag: Bool) -> Self { - return self.init( - red: CGFloat.random(), - green: CGFloat.random(), - blue: CGFloat.random(), - alpha: flag ? CGFloat.random() : 1.0) - } - -} -#endif - - - diff --git a/Pods/RandomKit/Sources/Date+RandomKit.swift b/Pods/RandomKit/Sources/Date+RandomKit.swift deleted file mode 100644 index e9dd1504..00000000 --- a/Pods/RandomKit/Sources/Date+RandomKit.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// NSDate+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Date: RandomType { - - /// Generates a random date. - /// - /// - Returns: Random date within `0.0...NSTimeInterval(UInt32.max)`. - public static func random() -> Date { - return random(0.0...TimeInterval(UInt32.max)) - } - - /// Generates a random date inside of the closed interval. - /// - /// - Parameters: - /// - interval: The interval within which the date - /// will be generated. - public static func random(_ interval: ClosedRange) -> Date { - return self.init(timeIntervalSince1970: .random(interval)) - } - -} diff --git a/Pods/RandomKit/Sources/Dictionary+RandomKit.swift b/Pods/RandomKit/Sources/Dictionary+RandomKit.swift deleted file mode 100644 index 506324c9..00000000 --- a/Pods/RandomKit/Sources/Dictionary+RandomKit.swift +++ /dev/null @@ -1,86 +0,0 @@ -// -// Dictionary+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -extension Dictionary: ShuffleType { - - /// Shuffles the elements in `self` and returns the result. - public func shuffle() -> Dictionary { - let values = Array(self.values).shuffle() - return zip(keys, values).reduce(Dictionary(minimumCapacity: values.count)) { (dict, pair) in - var mutableDict = dict - - let (key, value) = pair - mutableDict[key] = value - - return mutableDict - } - } - -} - -extension Dictionary where Key: RandomType, Value: RandomType { - - fileprivate init(_ randomCount: Int, _ keys: AnySequence, _ values: AnySequence, _ keyGenerator: @autoclosure() -> Key) { - self = zip(keys, values).reduce(Dictionary(minimumCapacity: randomCount)) { (dict, pair) in - var mutableDict = dict - var (key, value) = pair - - while dict[key] != nil { // in case of duplicate key - key = keyGenerator() - } - mutableDict[key] = value - - return mutableDict - } - } - - /// Construct a Dictionary of random elements. - public init(randomCount: Int) { - self.init( - randomCount, - Key.randomSequence(maxCount: randomCount), - Value.randomSequence(maxCount: randomCount), - Key.random()) - } - -} - -extension Dictionary where Key: RandomIntervalType, Value: RandomIntervalType { - - /// Construct a Dictionary of random elements from inside of the closed intervals. - /// - /// - Precondition: Number of elements within `keyInterval` >= `randomCount`. - /// - public init(randomCount: Int, _ keyInterval: ClosedRange, _ valueInterval: ClosedRange) { - self.init( - randomCount, - Key.randomSequence(keyInterval, maxCount: randomCount), - Value.randomSequence(valueInterval, maxCount: randomCount), - Key.random(keyInterval)) - } - -} diff --git a/Pods/RandomKit/Sources/Double+RandomKit.swift b/Pods/RandomKit/Sources/Double+RandomKit.swift deleted file mode 100644 index 5324e5da..00000000 --- a/Pods/RandomKit/Sources/Double+RandomKit.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// Double+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) - import Darwin -#elseif os(Linux) - import Glibc -#endif - -extension Double : RandomType, RandomIntervalType { - - /// Generates a random `Double`. - /// - /// - Returns: Random value within `0.0...1.0`. - public static func random() -> Double { - return random(0.0...1.0) - } - - /// Generates a random `Double` inside of the closed interval. - /// - /// - Parameters: - /// - interval: The interval within which the number - /// will be generated. - public static func random(_ interval: ClosedRange) -> Double { - return interval.lowerBound + (interval.upperBound - interval.lowerBound) * (Double(arc4random()) / Double(UInt32.max)) - } - -} diff --git a/Pods/RandomKit/Sources/Float+RandomKit.swift b/Pods/RandomKit/Sources/Float+RandomKit.swift deleted file mode 100644 index 23caa397..00000000 --- a/Pods/RandomKit/Sources/Float+RandomKit.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// Float+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) - import Darwin -#elseif os(Linux) - import Glibc -#endif - -extension Float : RandomType, RandomIntervalType { - - /// Generates a random `Float`. - /// - /// - Returns: Random value within `0.0...1.0`. - public static func random() -> Float { - return random(0.0...1.0) - } - - /// Generates a random `Float` inside of the closed interval. - /// - /// - Parameters: - /// - interval: The interval within which the number - /// will be generated. - public static func random(_ interval: ClosedRange) -> Float { - return interval.lowerBound + (interval.upperBound - interval.lowerBound) * (Float(arc4random()) / Float(UInt32.max)) - } - -} diff --git a/Pods/RandomKit/Sources/Float80+RandomKit.swift b/Pods/RandomKit/Sources/Float80+RandomKit.swift deleted file mode 100644 index 07403d22..00000000 --- a/Pods/RandomKit/Sources/Float80+RandomKit.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// Float80+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -#if os(OSX) - -import Darwin - -extension Float80 : RandomType, RandomIntervalType { - - /// Generates a random `Float80`. - /// - /// - Returns: Random value within `0.0...1.0`. - public static func random() -> Float80 { - return random(0.0...1.0) - } - - /// Generates a random `Float80` inside of the closed interval. - /// - /// - Parameters: - /// - interval: The interval within which the number - /// will be generated. - public static func random(_ interval: ClosedRange) -> Float80 { - return interval.lowerBound + (interval.upperBound - interval.lowerBound) * (Float80(arc4random()) / Float80(UInt32.max)) - } - -} - -#endif diff --git a/Pods/RandomKit/Sources/Int+RandomKit.swift b/Pods/RandomKit/Sources/Int+RandomKit.swift deleted file mode 100644 index 32f46d1c..00000000 --- a/Pods/RandomKit/Sources/Int+RandomKit.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// Int+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) - import Darwin -#elseif os(Linux) - import Glibc -#endif - -extension Int : RandomType, RandomIntervalType { - - /// Generates a random `Int`. - /// - /// - Returns: Random value within `0...100`. - public static func random() -> Int { - return random(0...100) - } - - /// Generates a random `Int` inside of the closed interval. - /// - /// - Parameters: - /// - interval: The interval within which the number - /// will be generated. - public static func random(_ interval: ClosedRange) -> Int { - return interval.lowerBound + Int(arc4random_uniform(UInt32(interval.upperBound - interval.lowerBound + 1))) - } -} diff --git a/Pods/RandomKit/Sources/NSNumber+RandomKit.swift b/Pods/RandomKit/Sources/NSNumber+RandomKit.swift deleted file mode 100644 index 3f27c5a5..00000000 --- a/Pods/RandomKit/Sources/NSNumber+RandomKit.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// NSNumber+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension NSNumber: RandomType { - - /// Generates a random number. - /// - /// - Returns: Random value within `0...100`. - public class func random() -> Self { - return random(0...100) - } - - /// Generates a random integer inside of the closed interval. - /// - /// - Parameters: - /// - interval: The interval within which the integer - /// will be generated. - public class func random(_ interval: ClosedRange) -> Self { - return self.init(value: .random(interval)) - } - - /// Generates a random double inside of the closed interval. - /// - /// - Parameters: - /// - interval: The interval within which the double - /// will be generated. - public class func random(_ interval: ClosedRange) -> Self { - return self.init(value: .random(interval)) - } - -} - diff --git a/Pods/RandomKit/Sources/Random.swift b/Pods/RandomKit/Sources/Random.swift deleted file mode 100644 index 73ab167e..00000000 --- a/Pods/RandomKit/Sources/Random.swift +++ /dev/null @@ -1,228 +0,0 @@ -// -// Random.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -internal extension Array where Element : Hashable { - fileprivate func removeDuplicates() -> Array { - var seen: [Element : Bool] = [:] - return filter { seen.updateValue(true, forKey: $0) == nil } - } -} - -public struct Random { - - /// Generates a random fake gender: "Male" or "Female". - public static func gender() -> String { - return Bool.random() ? "Male" : "Female" - } - - public enum USState: String { - case _Any - case Alabama - case Alaska - case Arizona - case Arkansas - case California - case Colorado - case Connecticut - case Delaware - case Florida - case Georgia - case Hawaii - case Idaho - case Illinois - case Indiana - case Iowa - case Kansas - case Kentucky - case Louisiana - case Maine - case Maryland - case Massachusetts - case Michigan - case Minnesota - case Mississippi - case Missouri - case Montana - case Nebraska - case Nevada - case NewHampshire - case NewJersey - case NewMexico - case NewYork - case NorthCarolina - case NorthDakota - case Ohio - case Oklahoma - case Oregon - case Pennsylvania - case PuertoRico - case RhodeIsland - case SouthCarolina - case SouthDakota - case Tennessee - case Texas - case Utah - case Vermont - case Virginia - case Washington - case WashingtonDC - case WestVirginia - case Wisconsin - case Wyoming - } - - internal static let areaCodes: [USState : [Int]] = [ - .Alabama : [205, 251, 256, 334, 938], - .Alaska : [907], - .Arizona : [480, 520, 602, 923, 928], - .Arkansas : [479, 501, 870], - .California : [209, 213, 310, 323, 408, 415, 424, 442, 510, 530, - 559, 562, 619, 626, 650, 657, 661, 669, 707, 714, - 747, 760, 805, 818, 831, 858, 909, 916, 925, 949, - 951], - .Colorado : [303, 719, 720, 970], - .Connecticut : [203, 475, 860], - .Delaware : [302], - .Florida : [239, 305, 321, 352, 386, 407, 561, 727, 754, 772, - 786, 813, 850, 863, 904, 941, 954], - .Georgia : [229, 404, 470, 478, 678, 706, 762, 770, 912], - .Hawaii : [808], - .Idaho : [208], - .Illinois : [217, 224, 309, 312, 331, 618, 630, 708, 773, 779, - 815, 847, 872], - .Indiana : [219, 260, 317, 574, 765, 812], - .Iowa : [319, 515, 563, 641, 712], - .Kansas : [316, 620, 785, 913], - .Kentucky : [270, 502, 606, 859], - .Louisiana : [225, 318, 337, 504, 985], - .Maine : [207], - .Maryland : [240, 301, 410, 443, 667], - .Massachusetts : [339, 351, 413, 508, 617, 774, 781, 857, 978], - .Michigan : [231, 248, 269, 313, 517, 586, 616, 734, 810, 906, - 947, 989], - .Minnesota : [218, 320, 507, 612, 651, 763, 952], - .Mississippi : [228, 601, 662, 769], - .Missouri : [314, 417, 573, 636, 660, 816], - .Montana : [406], - .Nebraska : [308, 402, 531], - .Nevada : [702, 725, 775], - .NewHampshire : [603], - .NewJersey : [201, 551, 609, 732, 848, 856, 862, 908, 973], - .NewMexico : [505, 575], - .NewYork : [212, 315, 347, 516, 518, 585, 607, 631, 646, 716, - 718, 845, 914, 917, 929], - .NorthCarolina : [252, 336, 704, 828, 910, 919, 980, 984], - .NorthDakota : [701], - .Ohio : [216, 234, 330, 419, 440, 513, 567, 614, 740, 937], - .Oklahoma : [405, 539, 580, 918], - .Oregon : [458, 503, 541, 971], - .Pennsylvania : [215, 267, 272, 412, 484, 570, 610, 717, 724, 814, - 878], - .PuertoRico : [787, 939], - .RhodeIsland : [401], - .SouthCarolina : [803, 843, 864], - .SouthDakota : [605], - .Tennessee : [423, 615, 731, 865, 901, 931], - .Texas : [210, 214, 254, 281, 325, 346, 361, 409, 430, 432, - 469, 512, 682, 713, 737, 806, 817, 830, 832, 903, - 915, 936, 940, 956, 972, 979], - .Utah : [385, 435, 801], - .Vermont : [802], - .Virginia : [276, 434, 540, 571, 703, 757, 804], - .Washington : [206, 253, 360, 425, 509], - .WashingtonDC : [202], - .WestVirginia : [304, 681], - .Wisconsin : [262, 414, 534, 608, 715, 920], - .Wyoming : [307] - ] - - /// Generates a random fake phone number for a given US state. - /// - /// - Parameter state: The US state for the area code of the generated - /// number. Default value is `._Any`. - public static func phoneNumber(_ state: USState = ._Any) -> Int64 { - let areaCode = state == ._Any - ? areaCodes.random!.1.random! - : areaCodes[state]!.random! - let number = (1...7).reduce(String(areaCode)) { number, _ in - return number + String(Int.random(0...9)) - } - return Int64(number)! - } - - public enum GenderType { - case male - case female - case either - } - - public enum HonorificType { - - case _Any, common, formal, professional, religious - - private func anyProperties(_ block: (HonorificType) -> [T]) -> [T] { - return [HonorificType.common, HonorificType.formal, HonorificType.professional, HonorificType.religious].reduce([]) { - $0 + block($1) - } - } - - internal func titles(_ gender: GenderType) -> [String] { - switch (self, gender) { - case (.common, .male): - return ["Mr.", "Master", "Mx."] - case (.common, .female): - return ["Mz.", "Ms.", "Mrs.", "Mx."] - case (.formal, .male): - return ["Sir", "Lord"] - case (.formal, .female): - return ["Madam", "Lady"] - case (.professional, _): - return ["Dr.", "Prof."] - case (.religious, .male): - return ["Br.", "Fr.", "Pr.", "Elder", "Rabbi", "Rev."] - case (.religious, .female): - return ["Sr.", "Rev."] - case (_, .either): - return (titles(.male) + titles(.female)).removeDuplicates() - default: - return anyProperties { $0.titles(gender) } - } - } - } - - /// Generates a random English honorific for a given type. - /// - /// - Parameters: - /// - type: The type of the generated honorific. - /// Default value is `._Any`. - /// - gender: The gender for the generated honorific. - /// Default value is `.Either`. - public static func englishHonorific(type honorificType: HonorificType = ._Any, gender: GenderType = .either) -> String { - return honorificType.titles(gender).random! - } - -} diff --git a/Pods/RandomKit/Sources/RandomType.swift b/Pods/RandomKit/Sources/RandomType.swift deleted file mode 100644 index d7900440..00000000 --- a/Pods/RandomKit/Sources/RandomType.swift +++ /dev/null @@ -1,99 +0,0 @@ -// -// RandomType.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -/// A type that can generate a random value. -public protocol RandomType { - - /// Generates a random value of `Self`. - static func random() -> Self - -} - -extension RandomType { - - /// Returns a generator for infinite random values of `Self`. - public static func randomGenerator() -> AnyIterator { - return AnyIterator { random() } - } - - /// Returns a generator for random values of `Self` within `maxCount`. - public static func randomGenerator(maxCount count: Int) -> AnyIterator { - var n = 0 - return AnyIterator { - defer { n += 1 } - return n < count ? random() : nil - } - } - - /// Returns a sequence of infinite random values of `Self`. - public static func randomSequence() -> AnySequence { - return AnySequence(randomGenerator()) - } - - /// Returns a sequence of random values of `Self` within `maxCount`. - public static func randomSequence(maxCount count: Int) -> AnySequence { - return AnySequence(randomGenerator(maxCount: count)) - } - -} - -/// A type that can generate a random value from inside of a closed interval. -public protocol RandomIntervalType : RandomType, Comparable { - - /// Returns a random value of `Self` inside of the closed interval. - static func random(_ interval: ClosedRange) -> Self - -} - -extension RandomIntervalType { - - /// Returns a generator for infinite random values of `Self` inside of the closed interval. - public static func randomGenerator(_ interval: ClosedRange) -> AnyIterator { - return AnyIterator { random(interval) } - } - - /// Returns a generator for random values of `Self` inside of the closed interval within `maxCount`. - public static func randomGenerator(_ interval: ClosedRange, maxCount count: Int) -> AnyIterator { - var n = 0 - return AnyIterator { - defer { n += 1 } - return n < count ? random(interval) : nil - } - } - - /// Returns a sequence of infinite random values of `Self` inside of the closed interval. - public static func randomSequence(_ interval: ClosedRange) -> AnySequence { - return AnySequence(randomGenerator(interval)) - } - - /// Returns a sequence of random values of `Self` inside of the closed interval within `maxCount`. - public static func randomSequence(_ interval: ClosedRange, maxCount count: Int) -> AnySequence { - return AnySequence(randomGenerator(interval, maxCount: count)) - } - -} - diff --git a/Pods/RandomKit/Sources/Sequence+RandomKit.swift b/Pods/RandomKit/Sources/Sequence+RandomKit.swift deleted file mode 100644 index a9225276..00000000 --- a/Pods/RandomKit/Sources/Sequence+RandomKit.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// Sequence+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -extension Sequence { - - /// Returns a random element of `self`, or `nil` if `self` is empty. - public var random: Self.Iterator.Element? { - return Array(self).random - } - -} diff --git a/Pods/RandomKit/Sources/Set+RandomKit.swift b/Pods/RandomKit/Sources/Set+RandomKit.swift deleted file mode 100644 index b1588547..00000000 --- a/Pods/RandomKit/Sources/Set+RandomKit.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// Set+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -extension Set where Element: RandomType { - - fileprivate init(_ randomCount: Int, _ sequence: AnySequence, _ elementGenerator: @autoclosure () -> Element) { - self = sequence.reduce(Set(minimumCapacity: randomCount)) { (set, element) in - var mutableSet = set - var mutableElement = element - - while set.contains(mutableElement) { mutableElement = elementGenerator() } - mutableSet.insert(mutableElement) - - return mutableSet - } - } - - /// Construct a Set of random elements. - public init(randomCount: Int) { - self.init( - randomCount, - Element.randomSequence(maxCount: randomCount), - Element.random() - ) - } - -} - -extension Set where Element: RandomIntervalType { - - /// Construct a Set of random elements from inside of the closed interval. - /// - /// - Precondition: Number of elements within `interval` >= `randomCount`. - /// - public init(randomCount: Int, _ interval: ClosedRange) { - self.init( - randomCount, - Element.randomSequence(interval, maxCount: randomCount), - Element.random(interval) - ) - } - -} diff --git a/Pods/RandomKit/Sources/ShuffleType.swift b/Pods/RandomKit/Sources/ShuffleType.swift deleted file mode 100644 index c87b8120..00000000 --- a/Pods/RandomKit/Sources/ShuffleType.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// ShuffleType.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -/// A type whose elements can be shuffled. -public protocol ShuffleType { - - /// Shuffles the elements in `self` and returns the result. - func shuffle() -> Self - -} - -public extension ShuffleType { - - /// Shuffles the elements in `self`. - public mutating func shuffleInPlace() { - self = self.shuffle() - } - -} diff --git a/Pods/RandomKit/Sources/String+RandomKit.swift b/Pods/RandomKit/Sources/String+RandomKit.swift deleted file mode 100644 index 99dcb429..00000000 --- a/Pods/RandomKit/Sources/String+RandomKit.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// String+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -extension String: RandomType { - - /// Generates a random `String`. - /// - /// - Returns: Random value within `" "..."~"` with length of `10`. - public static func random() -> String { - return random(10, " "..."~") - } - - /// Generates a random `String` of a given length inside of - /// the closed interval. - /// - /// - Parameters: - /// - length: The length for the generated string. - /// Default value is `10`. - /// - interval: The interval within which the string - /// will be generated. - public static func random(_ length: UInt = 10, _ interval: ClosedRange) -> String { - return (0 ..< length).reduce("") { value, _ in - value + String(Character.random(interval)) - } - } - -} - -extension String: ShuffleType { - - /// Shuffles the elements in `self` and returns the result. - public func shuffle() -> String { - return Array(characters).shuffle().reduce("") { - $0 + String($1) - } - } - -} - -extension String.CharacterView: ShuffleType { - - /// Shuffles the elements in `self` and returns the result. - public func shuffle() -> String.CharacterView { - return String(self).shuffle().characters - } - -} diff --git a/Pods/RandomKit/Sources/URL+RandomKit.swift b/Pods/RandomKit/Sources/URL+RandomKit.swift deleted file mode 100644 index 097eba7e..00000000 --- a/Pods/RandomKit/Sources/URL+RandomKit.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// NSURL+RandomKit.swift -// RandomKit -// -// The MIT License (MIT) -// -// Copyright (c) 2015-2016 Nikolai Vazquez -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension URL: RandomType { - - /// Generates a random URL. - /// - /// - Returns: A random URL within: - /// - https://github.com/ - /// - https://bitbucket.org/ - /// - https://stackoverflow.com/ - /// - https://www.reddit.com/ - /// - https://medium.com/ - /// - https://www.google.com/ - /// - https://www.youtube.com/ - public static func random() -> URL { - return random(fromValues: [ - "https://github.com/", - "https://bitbucket.org/", - "https://stackoverflow.com/", - "https://www.reddit.com/", - "https://medium.com/", - "https://www.google.com/", - "https://www.youtube.com/" - ]) - } - - /// Generates a random URL from within the given values. - /// - /// If `values` is empty, a URL pointing to www.google.com is returned. - /// - /// - Parameters: - /// - values: The values from which the URL is generated. - public static func random(fromValues values: [String]) -> URL { - guard let value = values.random, let url = self.init(string: value) else { - return self.init(string: "https://www.google.com/")! - } - return url - } - -} diff --git a/Pods/SwiftVer/LICENSE b/Pods/SwiftVer/LICENSE deleted file mode 100755 index d51b4449..00000000 --- a/Pods/SwiftVer/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2016 Leo G Dion - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Pods/SwiftVer/README.md b/Pods/SwiftVer/README.md deleted file mode 100755 index 08adce53..00000000 --- a/Pods/SwiftVer/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# WARNING - -Thank you for using SwiftVer. Before you release your awesome project to the world, complete the following steps. - -THIS LIST IS EASY, CHECK IT OFF ONE-BY-ONE BABY! - - - [ ] Open the project in Xcode and add features to SwiftVer - - [ ] Make sure you are using Swift 3 ("Convert to latest Swift syntax") - - [ ] Fix all build errors and warnings, add tests (yes really) - - [ ] Add a screenshot or AT LEAST some picture, and fill in this readme - - [ ] Add all details to your [Podspec](SwiftVer.podspec) - - [ ] Delete all this crap up here - - [ ] Make one release (full steps are in [CONTRIBUTING.md] in case you forget) - -THEN YOU'RE DONE, GO STAR [swift3-module-template](https://github.com/fulldecent/swift3-module-template) FOR UPDATES. - ----- - -# SwiftVer - -[![CI Status](http://img.shields.io/travis/brightdigit/SwiftVer.svg?style=flat)](https://travis-ci.org/brightdigit/SwiftVer) -[![Version](https://img.shields.io/cocoapods/v/SwiftVer.svg?style=flat)](https://cocoapods.org/pods/SwiftVer) -[![License](https://img.shields.io/cocoapods/l/SwiftVer.svg?style=flat)](https://cocoapods.org/pods/SwiftVer) -[![Platform](https://img.shields.io/cocoapods/p/SwiftVer.svg?style=flat)](https://cocoapods.org/pods/SwiftVer) -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) - -Screenshot - - -## Example - -To run the example project, clone the repo, and run `pod install` from the Example directory first. - - -## Requirements - - -## Installation - -### CocoaPods - -[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: - -```bash -$ gem install cocoapods -``` - -To integrate SwiftVer into your Xcode project using CocoaPods, specify it in your `Podfile`: - -```ruby -use_frameworks! - -pod 'SwiftVer' -``` - -Then, run the following command: - -```bash -$ pod install -``` - - -### Carthage - -[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. - -You can install Carthage with [Homebrew](http://brew.sh/) using the following command: - -```bash -$ brew update -$ brew install carthage -``` - -To integrate SwiftVer into your Xcode project using Carthage, specify it in your `Cartfile`: - -```ogdl -github "brightdigit/SwiftVer" ~> 0.1 -``` - -Run `carthage update` to build the framework and drag the built `SwiftVer.framework` into your Xcode project. - - -## Author - -Leo G Dion - - -## License - -SwiftVer is available under the MIT license. See the LICENSE file for more info. diff --git a/Pods/SwiftVer/Source/SemVer.swift b/Pods/SwiftVer/Source/SemVer.swift deleted file mode 100644 index 50d284a9..00000000 --- a/Pods/SwiftVer/Source/SemVer.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// SemVer.swift -// SwiftVer -// -// Created by Leo Dion on 9/21/16. -// Copyright © 2016 BrightDigit, LLC. All rights reserved. -// - -import Foundation - -public struct SemVer : CustomStringConvertible { - public let major:UInt8 - public let minor:UInt8 - public let patch:UInt8? - - public init?(versionString: String) { - let values = versionString.components(separatedBy: ".").map{ UInt8($0) } - - if case let major?? = values.first, let minor = values[1], values.count == 2 || values.count == 3 { - self.major = major - self.minor = minor - self.patch = values.count == 3 ? values[2] : nil - } else { - return nil - } - } - - public var description:String { - if let patch = self.patch { - return "\(self.major).\(self.minor).\(patch)" - } else { - return "\(self.major).\(self.minor)" - } - } -} diff --git a/Pods/SwiftVer/Source/Version.swift b/Pods/SwiftVer/Source/Version.swift deleted file mode 100644 index 91dfaa56..00000000 --- a/Pods/SwiftVer/Source/Version.swift +++ /dev/null @@ -1,55 +0,0 @@ -// -// Version.swift -// swiftver -// -// Created by Leo Dion on 11/25/15. -// Copyright © 2015 BrightDigit. All rights reserved. -// - -import Foundation - -public struct Version { - public let semver:SemVer - public let build:UInt8 - public let versionControl: VersionControlInfo? - - public struct InfoDictionaryKeys { - public static let version = "CFBundleShortVersionString" - public static let build = "CFBundleVersion" - } - - public init?(bundle: VersionContainerProtocol, versionControl: VersionControlInfo? = nil) { - let keys = type(of: self).InfoDictionaryKeys.self - - guard let versionString = bundle.infoDictionary?[keys.version] as? String else { - return nil - } - - guard let semver = SemVer(versionString: versionString) else { - return nil - } - - - guard let buildValue = bundle.infoDictionary?[keys.build] else { - return nil - } - - let buildOpt: UInt8? - - if let buildInt = buildValue as? Int { - buildOpt = UInt8(buildInt) - } else if let buildString = buildValue as? String { - buildOpt = UInt8(buildString) - } else { - return nil - } - - guard let build = buildOpt else { - return nil - } - - self.build = build - self.semver = semver - self.versionControl = versionControl - } -} diff --git a/Pods/SwiftVer/Source/VersionContainerProtocol.swift b/Pods/SwiftVer/Source/VersionContainerProtocol.swift deleted file mode 100644 index cbf4c261..00000000 --- a/Pods/SwiftVer/Source/VersionContainerProtocol.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// VersionContainerProtocol.swift -// SwiftVer -// -// Created by Leo Dion on 9/21/16. -// Copyright © 2016 BrightDigit, LLC. All rights reserved. -// - -import Foundation - -public protocol VersionContainerProtocol { - var infoDictionary : [String : Any]? { get } -} - -extension Bundle : VersionContainerProtocol { - -} diff --git a/Pods/SwiftVer/Source/VersionControlInfo.swift b/Pods/SwiftVer/Source/VersionControlInfo.swift deleted file mode 100644 index 0b093842..00000000 --- a/Pods/SwiftVer/Source/VersionControlInfo.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// VersionControlInfo.swift -// SwiftVer -// -// Created by Leo Dion on 9/21/16. -// Copyright © 2016 BrightDigit, LLC. All rights reserved. -// - -import Foundation - -public struct VersionControlInfo { - public let TYPE:VersionControlType - public let BASENAME:String - public let UUID: String? - public let NUM: Int - public let DATE: Date? - public let BRANCH: String - public let TAG: String? - public let TICK: Int? - public let EXTRA: String? - - public let FULL_HASH: String - public let SHORT_HASH: String - - public let WC_MODIFIED: Bool - - public init (TYPE:String - ,BASENAME:String - ,UUID: String? - ,NUM: Int - ,DATE: String - ,BRANCH: String - ,TAG: String? - ,TICK: Int? - ,EXTRA: String? - - ,FULL_HASH: String - ,SHORT_HASH: String - - ,WC_MODIFIED: Bool) { - self.TYPE = VersionControlType(TYPE: TYPE) - self.BASENAME = BASENAME - self.UUID = UUID - self.NUM = NUM - self.DATE = date(forRFC3339DateTimeString: DATE) - self.BRANCH = BRANCH - self.TAG = TAG - self.TICK = TICK - self.EXTRA = EXTRA - self.FULL_HASH = FULL_HASH - self.SHORT_HASH = SHORT_HASH - self.WC_MODIFIED = WC_MODIFIED - } -} diff --git a/Pods/SwiftVer/Source/VersionControlType.swift b/Pods/SwiftVer/Source/VersionControlType.swift deleted file mode 100644 index 04b784f8..00000000 --- a/Pods/SwiftVer/Source/VersionControlType.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// VersionControlType.swift -// SwiftVer -// -// Created by Leo Dion on 9/21/16. -// Copyright © 2016 BrightDigit, LLC. All rights reserved. -// - -import Foundation - -extension Dictionary where Value : Equatable { - func allKeysForValue(val : Value) -> [Key] { - return self.filter { $1 == val }.map { $0.0 } - } -} - -public enum VersionControlType : CustomStringConvertible { - public static let lookup: [String:VersionControlType] = ["git": .git, "mercurial": .mercurial, "subversion": .subversion, "bazaar" : .bazaar] - case git, mercurial, subversion, bazaar, unknown - - public init (TYPE: String) { - if let value = VersionControlType.lookup[TYPE.lowercased()] { - self = value - } else { - self = .unknown - } - } - - public var description: String { - return VersionControlType.lookup.allKeysForValue(val: self).first?.capitalized ?? "Unknown" - } -} diff --git a/Pods/SwiftVer/Source/rfc3339.swift b/Pods/SwiftVer/Source/rfc3339.swift deleted file mode 100644 index ceaaafb5..00000000 --- a/Pods/SwiftVer/Source/rfc3339.swift +++ /dev/null @@ -1,49 +0,0 @@ -import Foundation - - -/// Parse RFC 3339 date string to NSDate -/// -/// :param: rfc3339DateTimeString string with format "yyyy-MM-ddTHH:mm:ssZ" -/// :returns: NSDate, or nil if string cannot be parsed -public func date(forRFC3339DateTimeString rfc3339DateTimeString: String) -> Date? { - let formatter = getThreadLocalRFC3339DateFormatter() - return formatter.date(from: rfc3339DateTimeString) -} - -/// Generate RFC 3339 date string for an NSDate -/// -/// :param: date NSDate -/// :returns: String -public func rfc3339DateTimeStringForDate(_ date: Date) -> String { - let formatter = getThreadLocalRFC3339DateFormatter() - return formatter.string(from: date) -} - -// Date formatters are not thread-safe, so use a thread-local instance -private func getThreadLocalRFC3339DateFormatter() -> DateFormatter { - return cachedThreadLocalObjectWithKey(key: "com.brightdigit.getThreadLocalRFC3339DateFormatter") { - let en_US_POSIX = Locale(identifier: "en_US_POSIX") - let rfc3339DateFormatter = DateFormatter() - rfc3339DateFormatter.locale = en_US_POSIX - rfc3339DateFormatter.dateFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ssXXX" - rfc3339DateFormatter.timeZone = TimeZone(secondsFromGMT: 0) - return rfc3339DateFormatter - } -} - -/// Return a thread-local object, creating it if it has not already been created -/// -/// :param: create closure that will be invoked to create the object -/// :returns: object of type T -private func cachedThreadLocalObjectWithKey(key: String, create: () -> T) -> T { - let threadDictionary = Thread.current.threadDictionary - if let cachedObject = threadDictionary[key] as? T { - return cachedObject - } - else { - let newObject = create() - threadDictionary[key] = newObject - return newObject - } - -} diff --git a/Pods/Target Support Files/Pods-Speculid-App-Speculid/Info.plist b/Pods/Target Support Files/Pods-Speculid-App-Speculid/Info.plist deleted file mode 100644 index 2243fe6e..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App-Speculid/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid-acknowledgements.markdown b/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid-acknowledgements.markdown deleted file mode 100644 index ca613214..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid-acknowledgements.markdown +++ /dev/null @@ -1,26 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## SwiftVer - -Copyright (c) 2016 Leo G Dion - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -Generated by CocoaPods - https://cocoapods.org diff --git a/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid-acknowledgements.plist b/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid-acknowledgements.plist deleted file mode 100644 index b9ef749e..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid-acknowledgements.plist +++ /dev/null @@ -1,58 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2016 Leo G Dion - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - License - MIT - Title - SwiftVer - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid-dummy.m b/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid-dummy.m deleted file mode 100644 index 0681e7f7..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_Speculid_App_Speculid : NSObject -@end -@implementation PodsDummy_Pods_Speculid_App_Speculid -@end diff --git a/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid-resources.sh b/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid-resources.sh deleted file mode 100755 index 25e9d377..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid-resources.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh -set -e - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -case "${TARGETED_DEVICE_FAMILY}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi diff --git a/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid-umbrella.h b/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid-umbrella.h deleted file mode 100644 index f1079235..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid-umbrella.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - - -FOUNDATION_EXPORT double Pods_Speculid_App_SpeculidVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_Speculid_App_SpeculidVersionString[]; - diff --git a/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid.debug.xcconfig b/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid.debug.xcconfig deleted file mode 100644 index 2a7822c9..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid.debug.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO -CODE_SIGN_IDENTITY = -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SwiftVer" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/../Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftVer/SwiftVer.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "SwiftVer" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT}/Pods diff --git a/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid.modulemap b/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid.modulemap deleted file mode 100644 index a5e0be39..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_Speculid_App_Speculid { - umbrella header "Pods-Speculid-App-Speculid-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid.release.xcconfig b/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid.release.xcconfig deleted file mode 100644 index 2a7822c9..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid.release.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO -CODE_SIGN_IDENTITY = -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SwiftVer" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/../Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftVer/SwiftVer.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "SwiftVer" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT}/Pods diff --git a/Pods/Target Support Files/Pods-Speculid-App/Info.plist b/Pods/Target Support Files/Pods-Speculid-App/Info.plist deleted file mode 100644 index 2243fe6e..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-acknowledgements.markdown b/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-acknowledgements.markdown deleted file mode 100644 index ca613214..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-acknowledgements.markdown +++ /dev/null @@ -1,26 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## SwiftVer - -Copyright (c) 2016 Leo G Dion - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -Generated by CocoaPods - https://cocoapods.org diff --git a/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-acknowledgements.plist b/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-acknowledgements.plist deleted file mode 100644 index b9ef749e..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-acknowledgements.plist +++ /dev/null @@ -1,58 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2016 Leo G Dion - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - License - MIT - Title - SwiftVer - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-dummy.m b/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-dummy.m deleted file mode 100644 index 6c9da294..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_Speculid_App : NSObject -@end -@implementation PodsDummy_Pods_Speculid_App -@end diff --git a/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-frameworks.sh b/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-frameworks.sh deleted file mode 100755 index c723d65a..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-frameworks.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/sh -set -e - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" - -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" - fi - - # use filter instead of exclude so missing patterns dont' throw errors - echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identitiy - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" - fi -} - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - # Get architectures for current file - archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" - stripped="" - for arch in $archs; do - if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" || exit 1 - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi -} - - -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/SwiftVer/SwiftVer.framework" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/SwiftVer/SwiftVer.framework" -fi diff --git a/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-resources.sh b/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-resources.sh deleted file mode 100755 index 25e9d377..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-resources.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh -set -e - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -case "${TARGETED_DEVICE_FAMILY}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi diff --git a/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-umbrella.h b/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-umbrella.h deleted file mode 100644 index 7d81c951..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-umbrella.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - - -FOUNDATION_EXPORT double Pods_Speculid_AppVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_Speculid_AppVersionString[]; - diff --git a/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App.debug.xcconfig b/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App.debug.xcconfig deleted file mode 100644 index bd33f256..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App.debug.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -CODE_SIGN_IDENTITY = -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SwiftVer" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/../Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftVer/SwiftVer.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "SwiftVer" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT}/Pods diff --git a/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App.modulemap b/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App.modulemap deleted file mode 100644 index 3553823c..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_Speculid_App { - umbrella header "Pods-Speculid-App-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App.release.xcconfig b/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App.release.xcconfig deleted file mode 100644 index bd33f256..00000000 --- a/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App.release.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -CODE_SIGN_IDENTITY = -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SwiftVer" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/../Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftVer/SwiftVer.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "SwiftVer" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT}/Pods diff --git a/Pods/Target Support Files/Pods-SpeculidTests/Info.plist b/Pods/Target Support Files/Pods-SpeculidTests/Info.plist deleted file mode 100644 index 2243fe6e..00000000 --- a/Pods/Target Support Files/Pods-SpeculidTests/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-acknowledgements.markdown b/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-acknowledgements.markdown deleted file mode 100644 index e5a89780..00000000 --- a/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-acknowledgements.markdown +++ /dev/null @@ -1,51 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## RandomKit - -# The MIT License (MIT) - -**Copyright (c) 2015-2016 Nikolai Vazquez** - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -## SwiftVer - -Copyright (c) 2016 Leo G Dion - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -Generated by CocoaPods - https://cocoapods.org diff --git a/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-acknowledgements.plist b/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-acknowledgements.plist deleted file mode 100644 index 87e252f5..00000000 --- a/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-acknowledgements.plist +++ /dev/null @@ -1,89 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - # The MIT License (MIT) - -**Copyright (c) 2015-2016 Nikolai Vazquez** - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - License - MIT - Title - RandomKit - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2016 Leo G Dion - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - License - MIT - Title - SwiftVer - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-dummy.m b/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-dummy.m deleted file mode 100644 index 4ef9fdac..00000000 --- a/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_SpeculidTests : NSObject -@end -@implementation PodsDummy_Pods_SpeculidTests -@end diff --git a/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-frameworks.sh b/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-frameworks.sh deleted file mode 100755 index 234f3961..00000000 --- a/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-frameworks.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh -set -e - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" - -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" - fi - - # use filter instead of exclude so missing patterns dont' throw errors - echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identitiy - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" - fi -} - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - # Get architectures for current file - archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" - stripped="" - for arch in $archs; do - if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" || exit 1 - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi -} - - -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/RandomKit/RandomKit.framework" - install_framework "$BUILT_PRODUCTS_DIR/SwiftVer/SwiftVer.framework" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/RandomKit/RandomKit.framework" - install_framework "$BUILT_PRODUCTS_DIR/SwiftVer/SwiftVer.framework" -fi diff --git a/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-resources.sh b/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-resources.sh deleted file mode 100755 index 25e9d377..00000000 --- a/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-resources.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh -set -e - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -case "${TARGETED_DEVICE_FAMILY}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi diff --git a/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-umbrella.h b/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-umbrella.h deleted file mode 100644 index 88391e0d..00000000 --- a/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-umbrella.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - - -FOUNDATION_EXPORT double Pods_SpeculidTestsVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_SpeculidTestsVersionString[]; - diff --git a/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests.debug.xcconfig b/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests.debug.xcconfig deleted file mode 100644 index 0812d5b6..00000000 --- a/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests.debug.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -CODE_SIGN_IDENTITY = -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/RandomKit" "$PODS_CONFIGURATION_BUILD_DIR/SwiftVer" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/../Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/RandomKit/RandomKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftVer/SwiftVer.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "RandomKit" -framework "SwiftVer" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT}/Pods diff --git a/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests.modulemap b/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests.modulemap deleted file mode 100644 index e20c2d04..00000000 --- a/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_SpeculidTests { - umbrella header "Pods-SpeculidTests-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests.release.xcconfig b/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests.release.xcconfig deleted file mode 100644 index 0812d5b6..00000000 --- a/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests.release.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -CODE_SIGN_IDENTITY = -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/RandomKit" "$PODS_CONFIGURATION_BUILD_DIR/SwiftVer" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/../Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/RandomKit/RandomKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftVer/SwiftVer.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "RandomKit" -framework "SwiftVer" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT}/Pods diff --git a/Pods/Target Support Files/RandomKit/Info.plist b/Pods/Target Support Files/RandomKit/Info.plist deleted file mode 100644 index 2f66809b..00000000 --- a/Pods/Target Support Files/RandomKit/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.6.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/RandomKit/RandomKit-dummy.m b/Pods/Target Support Files/RandomKit/RandomKit-dummy.m deleted file mode 100644 index 5158dd61..00000000 --- a/Pods/Target Support Files/RandomKit/RandomKit-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_RandomKit : NSObject -@end -@implementation PodsDummy_RandomKit -@end diff --git a/Pods/Target Support Files/RandomKit/RandomKit-prefix.pch b/Pods/Target Support Files/RandomKit/RandomKit-prefix.pch deleted file mode 100644 index b9c163b4..00000000 --- a/Pods/Target Support Files/RandomKit/RandomKit-prefix.pch +++ /dev/null @@ -1,4 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - diff --git a/Pods/Target Support Files/RandomKit/RandomKit-umbrella.h b/Pods/Target Support Files/RandomKit/RandomKit-umbrella.h deleted file mode 100644 index 2db34068..00000000 --- a/Pods/Target Support Files/RandomKit/RandomKit-umbrella.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - - -FOUNDATION_EXPORT double RandomKitVersionNumber; -FOUNDATION_EXPORT const unsigned char RandomKitVersionString[]; - diff --git a/Pods/Target Support Files/RandomKit/RandomKit.modulemap b/Pods/Target Support Files/RandomKit/RandomKit.modulemap deleted file mode 100644 index e24dfc09..00000000 --- a/Pods/Target Support Files/RandomKit/RandomKit.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module RandomKit { - umbrella header "RandomKit-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/RandomKit/RandomKit.xcconfig b/Pods/Target Support Files/RandomKit/RandomKit.xcconfig deleted file mode 100644 index d296a382..00000000 --- a/Pods/Target Support Files/RandomKit/RandomKit.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CODE_SIGN_IDENTITY = -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/RandomKit -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/Pods/Target Support Files/SwiftVer/Info.plist b/Pods/Target Support Files/SwiftVer/Info.plist deleted file mode 100644 index 2243fe6e..00000000 --- a/Pods/Target Support Files/SwiftVer/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/SwiftVer/SwiftVer-dummy.m b/Pods/Target Support Files/SwiftVer/SwiftVer-dummy.m deleted file mode 100644 index 9c7953c4..00000000 --- a/Pods/Target Support Files/SwiftVer/SwiftVer-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_SwiftVer : NSObject -@end -@implementation PodsDummy_SwiftVer -@end diff --git a/Pods/Target Support Files/SwiftVer/SwiftVer-prefix.pch b/Pods/Target Support Files/SwiftVer/SwiftVer-prefix.pch deleted file mode 100644 index b9c163b4..00000000 --- a/Pods/Target Support Files/SwiftVer/SwiftVer-prefix.pch +++ /dev/null @@ -1,4 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - diff --git a/Pods/Target Support Files/SwiftVer/SwiftVer-umbrella.h b/Pods/Target Support Files/SwiftVer/SwiftVer-umbrella.h deleted file mode 100644 index 9b3d7e25..00000000 --- a/Pods/Target Support Files/SwiftVer/SwiftVer-umbrella.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - - -FOUNDATION_EXPORT double SwiftVerVersionNumber; -FOUNDATION_EXPORT const unsigned char SwiftVerVersionString[]; - diff --git a/Pods/Target Support Files/SwiftVer/SwiftVer.modulemap b/Pods/Target Support Files/SwiftVer/SwiftVer.modulemap deleted file mode 100644 index ba0f3b74..00000000 --- a/Pods/Target Support Files/SwiftVer/SwiftVer.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module SwiftVer { - umbrella header "SwiftVer-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/SwiftVer/SwiftVer.xcconfig b/Pods/Target Support Files/SwiftVer/SwiftVer.xcconfig deleted file mode 100644 index 4de64bd2..00000000 --- a/Pods/Target Support Files/SwiftVer/SwiftVer.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CODE_SIGN_IDENTITY = -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SwiftVer -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/Speculid.entitlements b/Speculid.entitlements new file mode 100644 index 00000000..0c67376e --- /dev/null +++ b/Speculid.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/Speculid.xcodeproj/project.pbxproj b/Speculid.xcodeproj/project.pbxproj new file mode 100644 index 00000000..09276ecb --- /dev/null +++ b/Speculid.xcodeproj/project.pbxproj @@ -0,0 +1,15226 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + 205A5AF735ED0AFE6D8E3753 /* Pods_CairoSVG.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F8599C40CCA72FBF9FA1098 /* Pods_CairoSVG.framework */; }; + 63B850290A8C8F568F554912 /* Pods_SpeculidTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D7E00CC4EE1B4A785089460 /* Pods_SpeculidTests.framework */; }; + 71C6A7B0A517CC55637B2E17 /* Pods_Speculid_Mac_XPC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5EA075855931F18A5DA87B15 /* Pods_Speculid_Mac_XPC.framework */; }; + 8673F38CC6D59040A2F46D0E /* Pods_CairoSVGTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E776BC2A0843F84E3CBC279B /* Pods_CairoSVGTests.framework */; }; + 8B89F9F58D273C27DCE0A008 /* Pods_Speculid_Mac_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 054FC9E3CE2F6BD2F948CF5D /* Pods_Speculid_Mac_App.framework */; }; + 8CFE676AD2939E9961A20D07 /* Pods_Speculid_Mac_AppUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63BDAD4963D80A5FF54A9272 /* Pods_Speculid_Mac_AppUITests.framework */; }; + B3033B1E1F9AEFC100787279 /* AssetSpecificationDocumentProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3033B1D1F9AEFC100787279 /* AssetSpecificationDocumentProtocol.swift */; }; + B3033B201F9AEFE600787279 /* AssetSpecificationDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3033B1F1F9AEFE600787279 /* AssetSpecificationDocument.swift */; }; + B3136DCD1F90E3F30002B7AB /* Speculid.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B37C74731F8C5ADA00DF505B /* Speculid.framework */; }; + B3136DCE1F90E45F0002B7AB /* ErrorCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DC91F90E2A20002B7AB /* ErrorCollection.swift */; }; + B3136DCF1F90E45F0002B7AB /* FileFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DC11F90E27B0002B7AB /* FileFormat.swift */; }; + B3136DD11F90E45F0002B7AB /* ImageFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DBB1F90E27B0002B7AB /* ImageFile.swift */; }; + B3136DD41F90E45F0002B7AB /* Service.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DCC1F90E2A20002B7AB /* Service.swift */; }; + B3136DD51F90E45F0002B7AB /* ServiceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DC61F90E2A20002B7AB /* ServiceProtocol.swift */; }; + B3136DD61F90E45F0002B7AB /* Speculid_Mac_Framework.h in Headers */ = {isa = PBXBuildFile; fileRef = B3136DBC1F90E27B0002B7AB /* Speculid_Mac_Framework.h */; }; + B3136DD71F90E4AC0002B7AB /* layers.svg in Resources */ = {isa = PBXBuildFile; fileRef = B3136DC31F90E2A10002B7AB /* layers.svg */; }; + B3136DD91F90E96A0002B7AB /* cairo.h in Headers */ = {isa = PBXBuildFile; fileRef = B3136DD81F90E96A0002B7AB /* cairo.h */; }; + B3136DDE1F90EF470002B7AB /* Application.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DDD1F90EF460002B7AB /* Application.swift */; }; + B3136DDF1F90EFB10002B7AB /* Application.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DDB1F90EF370002B7AB /* Application.swift */; }; + B3136E251F90F73B0002B7AB /* CairoConversionSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DE81F90F73A0002B7AB /* CairoConversionSet.swift */; }; + B3136E271F90F73B0002B7AB /* AnalyticsTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DEA1F90F73A0002B7AB /* AnalyticsTracker.swift */; }; + B3136E291F90F73B0002B7AB /* ClientIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DEC1F90F73A0002B7AB /* ClientIdentifier.swift */; }; + B3136E2D1F90F73B0002B7AB /* ImageConversionSetBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DF01F90F73A0002B7AB /* ImageConversionSetBuilder.swift */; }; + B3136E2E1F90F73B0002B7AB /* AnalyticsSessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DF11F90F73A0002B7AB /* AnalyticsSessionManager.swift */; }; + B3136E2F1F90F73B0002B7AB /* SpeculidBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DF21F90F73A0002B7AB /* SpeculidBuilder.swift */; }; + B3136E301F90F73B0002B7AB /* ImageConversionBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DF31F90F73A0002B7AB /* ImageConversionBuilder.swift */; }; + B3136E311F90F73B0002B7AB /* CairoConversionSetBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DF41F90F73A0002B7AB /* CairoConversionSetBuilder.swift */; }; + B3136E321F90F73B0002B7AB /* NSColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DF61F90F73A0002B7AB /* NSColor.swift */; }; + B3136E331F90F73B0002B7AB /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DF71F90F73A0002B7AB /* String.swift */; }; + B3136E341F90F73B0002B7AB /* CGFloat.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DF81F90F73A0002B7AB /* CGFloat.swift */; }; + B3136E351F90F73B0002B7AB /* AnalyticsParameterDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DFA1F90F73A0002B7AB /* AnalyticsParameterDictionary.swift */; }; + B3136E361F90F73B0002B7AB /* Geometry.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DFB1F90F73A0002B7AB /* Geometry.swift */; }; + B3136E371F90F73B0002B7AB /* SpeculidSpecificationsFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DFC1F90F73A0002B7AB /* SpeculidSpecificationsFile.swift */; }; + B3136E3B1F90F73B0002B7AB /* ScaledGeometry.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E001F90F73A0002B7AB /* ScaledGeometry.swift */; }; + B3136E3C1F90F73B0002B7AB /* SpeculidDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E011F90F73A0002B7AB /* SpeculidDocument.swift */; }; + B3136E3D1F90F73B0002B7AB /* AnalyticsParameterKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E021F90F73A0002B7AB /* AnalyticsParameterKey.swift */; }; + B3136E3E1F90F73B0002B7AB /* GeometryValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E031F90F73A0002B7AB /* GeometryValue.swift */; }; + B3136E3F1F90F73B0002B7AB /* AssetSpecification.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E041F90F73A0002B7AB /* AssetSpecification.swift */; }; + B3136E401F90F73B0002B7AB /* AnalyticsConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E051F90F73A0002B7AB /* AnalyticsConfiguration.swift */; }; + B3136E421F90F73B0002B7AB /* ImageIdiom.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E071F90F73A0002B7AB /* ImageIdiom.swift */; }; + B3136E431F90F73B0002B7AB /* SpeculidSpecificationsFileProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E091F90F73B0002B7AB /* SpeculidSpecificationsFileProtocol.swift */; }; + B3136E451F90F73B0002B7AB /* ImageConversionSetBuilderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E0B1F90F73B0002B7AB /* ImageConversionSetBuilderProtocol.swift */; }; + B3136E461F90F73B0002B7AB /* ImageConversionTaskProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E0C1F90F73B0002B7AB /* ImageConversionTaskProtocol.swift */; }; + B3136E471F90F73B0002B7AB /* ClientIdentifierDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E0D1F90F73B0002B7AB /* ClientIdentifierDelegate.swift */; }; + B3136E491F90F73B0002B7AB /* ImageConversionSetProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E0F1F90F73B0002B7AB /* ImageConversionSetProtocol.swift */; }; + B3136E4A1F90F73B0002B7AB /* SpeculidDocumentProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E101F90F73B0002B7AB /* SpeculidDocumentProtocol.swift */; }; + B3136E4B1F90F73B0002B7AB /* SpeculidConfigurationProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E111F90F73B0002B7AB /* SpeculidConfigurationProtocol.swift */; }; + B3136E4C1F90F73B0002B7AB /* AnalyticsEventProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E121F90F73B0002B7AB /* AnalyticsEventProtocol.swift */; }; + B3136E4D1F90F73B0002B7AB /* AnalyticsSessionManagerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E131F90F73B0002B7AB /* AnalyticsSessionManagerProtocol.swift */; }; + B3136E4E1F90F73B0002B7AB /* AssetSpecificationProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E141F90F73B0002B7AB /* AssetSpecificationProtocol.swift */; }; + B3136E4F1F90F73B0002B7AB /* GeometryProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E151F90F73B0002B7AB /* GeometryProtocol.swift */; }; + B3136E501F90F73B0002B7AB /* SpeculidArgumentsProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E161F90F73B0002B7AB /* SpeculidArgumentsProtocol.swift */; }; + B3136E511F90F73B0002B7AB /* AnalyticsConfigurationProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E171F90F73B0002B7AB /* AnalyticsConfigurationProtocol.swift */; }; + B3136E521F90F73B0002B7AB /* AnalyticsTrackerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E181F90F73B0002B7AB /* AnalyticsTrackerProtocol.swift */; }; + B3136E531F90F73B0002B7AB /* SpeculidBuilderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E191F90F73B0002B7AB /* SpeculidBuilderProtocol.swift */; }; + B3136E541F90F73B0002B7AB /* ApplicationProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E1A1F90F73B0002B7AB /* ApplicationProtocol.swift */; }; + B3136E551F90F73B0002B7AB /* ImageConversionBuilderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E1B1F90F73B0002B7AB /* ImageConversionBuilderProtocol.swift */; }; + B3136E561F90F73B0002B7AB /* versions.plist in Resources */ = {isa = PBXBuildFile; fileRef = B3136E1C1F90F73B0002B7AB /* versions.plist */; }; + B3136E571F90F73B0002B7AB /* MissingRequiredInstallationError.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E1E1F90F73B0002B7AB /* MissingRequiredInstallationError.swift */; }; + B3136E581F90F73B0002B7AB /* ProcessError.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E1F1F90F73B0002B7AB /* ProcessError.swift */; }; + B3136E591F90F73B0002B7AB /* ArrayError.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E201F90F73B0002B7AB /* ArrayError.swift */; }; + B3136E5A1F90F73B0002B7AB /* UnknownConversionError.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E211F90F73B0002B7AB /* UnknownConversionError.swift */; }; + B3136E5B1F90FB710002B7AB /* ImageSpecification.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136DBE1F90E27B0002B7AB /* ImageSpecification.swift */; }; + B3136E631F90FCCF0002B7AB /* SpeculidUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E621F90FCCF0002B7AB /* SpeculidUITests.swift */; }; + B3136E831F90FD2E0002B7AB /* Speculid.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B37C74731F8C5ADA00DF505B /* Speculid.framework */; }; + B3136E901F90FD3D0002B7AB /* CairoSVGTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3136E8F1F90FD3D0002B7AB /* CairoSVGTests.swift */; }; + B3136E921F90FD3D0002B7AB /* CairoSVG.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B37C74891F8C5B5C00DF505B /* CairoSVG.framework */; }; + B3136EA31F910BC90002B7AB /* svg-appicon.speculid in Resources */ = {isa = PBXBuildFile; fileRef = B3136EA11F910BC90002B7AB /* svg-appicon.speculid */; }; + B3136EB01F9124730002B7AB /* svg-trayicon.speculid in Resources */ = {isa = PBXBuildFile; fileRef = B3136EA21F910BC90002B7AB /* svg-trayicon.speculid */; }; + B317B0D11FA560EE00BB5E57 /* QuitMenuItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = B317B0D01FA560EE00BB5E57 /* QuitMenuItem.swift */; }; + B318906A1F918F0300D0EFA0 /* GeometryValue.Multiply.swift in Sources */ = {isa = PBXBuildFile; fileRef = B31890691F918F0300D0EFA0 /* GeometryValue.Multiply.swift */; }; + B31BD6E920E7A6A400A560C2 /* libffi.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8073F20E5855F00030497 /* libffi.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BD6EA20E7A6A400A560C2 /* libffi.6.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8074120E5855F00030497 /* libffi.6.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BD91520E7E0D800A560C2 /* translit.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD70020E7E0D500A560C2 /* translit.h */; }; + B31BD91620E7E0D800A560C2 /* ustdio.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD70120E7E0D500A560C2 /* ustdio.h */; }; + B31BD91720E7E0D800A560C2 /* utf_old.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD70220E7E0D500A560C2 /* utf_old.h */; }; + B31BD91820E7E0D800A560C2 /* ucsdet.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD70320E7E0D500A560C2 /* ucsdet.h */; }; + B31BD91920E7E0D800A560C2 /* tzfmt.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD70420E7E0D500A560C2 /* tzfmt.h */; }; + B31BD91A20E7E0D800A560C2 /* ubrk.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD70520E7E0D500A560C2 /* ubrk.h */; }; + B31BD91B20E7E0D800A560C2 /* ufieldpositer.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD70620E7E0D500A560C2 /* ufieldpositer.h */; }; + B31BD91C20E7E0D800A560C2 /* stringpiece.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD70720E7E0D500A560C2 /* stringpiece.h */; }; + B31BD91D20E7E0D800A560C2 /* ucat.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD70820E7E0D500A560C2 /* ucat.h */; }; + B31BD91E20E7E0D800A560C2 /* tblcoll.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD70920E7E0D500A560C2 /* tblcoll.h */; }; + B31BD91F20E7E0D800A560C2 /* stringoptions.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD70A20E7E0D500A560C2 /* stringoptions.h */; }; + B31BD92020E7E0D800A560C2 /* dtfmtsym.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD70B20E7E0D500A560C2 /* dtfmtsym.h */; }; + B31BD92120E7E0D800A560C2 /* unirepl.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD70C20E7E0D500A560C2 /* unirepl.h */; }; + B31BD92220E7E0D800A560C2 /* ptypes.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD70D20E7E0D500A560C2 /* ptypes.h */; }; + B31BD92320E7E0D800A560C2 /* fmtable.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD70E20E7E0D500A560C2 /* fmtable.h */; }; + B31BD92420E7E0D800A560C2 /* dtitvfmt.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD70F20E7E0D500A560C2 /* dtitvfmt.h */; }; + B31BD92520E7E0D800A560C2 /* choicfmt.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD71020E7E0D500A560C2 /* choicfmt.h */; }; + B31BD92620E7E0D800A560C2 /* usetiter.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD71120E7E0D500A560C2 /* usetiter.h */; }; + B31BD92720E7E0D800A560C2 /* errorcode.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD71220E7E0D500A560C2 /* errorcode.h */; }; + B31BD92820E7E0D800A560C2 /* tznames.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD71320E7E0D500A560C2 /* tznames.h */; }; + B31BD92920E7E0D800A560C2 /* dtintrv.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD71420E7E0D500A560C2 /* dtintrv.h */; }; + B31BD92A20E7E0D900A560C2 /* ucurr.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD71520E7E0D500A560C2 /* ucurr.h */; }; + B31BD92B20E7E0D900A560C2 /* icuplug.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD71620E7E0D500A560C2 /* icuplug.h */; }; + B31BD92C20E7E0D900A560C2 /* uregion.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD71720E7E0D500A560C2 /* uregion.h */; }; + B31BD92D20E7E0D900A560C2 /* utext.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD71820E7E0D500A560C2 /* utext.h */; }; + B31BD92E20E7E0D900A560C2 /* edits.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD71920E7E0D500A560C2 /* edits.h */; }; + B31BD92F20E7E0D900A560C2 /* parsepos.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD71A20E7E0D500A560C2 /* parsepos.h */; }; + B31BD93020E7E0D900A560C2 /* ucal.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD71B20E7E0D500A560C2 /* ucal.h */; }; + B31BD93120E7E0D900A560C2 /* fpositer.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD71C20E7E0D500A560C2 /* fpositer.h */; }; + B31BD93220E7E0D900A560C2 /* dtitvinf.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD71D20E7E0D500A560C2 /* dtitvinf.h */; }; + B31BD93320E7E0D900A560C2 /* rbnf.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD71E20E7E0D500A560C2 /* rbnf.h */; }; + B31BD93420E7E0D900A560C2 /* udat.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD71F20E7E0D500A560C2 /* udat.h */; }; + B31BD93520E7E0D900A560C2 /* urep.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD72020E7E0D500A560C2 /* urep.h */; }; + B31BD93620E7E0D900A560C2 /* utf32.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD72120E7E0D500A560C2 /* utf32.h */; }; + B31BD93720E7E0D900A560C2 /* vtzone.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD72220E7E0D500A560C2 /* vtzone.h */; }; + B31BD93820E7E0D900A560C2 /* ustring.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD72320E7E0D500A560C2 /* ustring.h */; }; + B31BD93920E7E0D900A560C2 /* ubiditransform.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD72420E7E0D500A560C2 /* ubiditransform.h */; }; + B31BD93A20E7E0D900A560C2 /* uenum.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD72520E7E0D500A560C2 /* uenum.h */; }; + B31BD93B20E7E0D900A560C2 /* appendable.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD72620E7E0D500A560C2 /* appendable.h */; }; + B31BD93C20E7E0D900A560C2 /* usearch.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD72720E7E0D500A560C2 /* usearch.h */; }; + B31BD93D20E7E0D900A560C2 /* numsys.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD72820E7E0D500A560C2 /* numsys.h */; }; + B31BD93E20E7E0D900A560C2 /* timezone.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD72920E7E0D500A560C2 /* timezone.h */; }; + B31BD93F20E7E0D900A560C2 /* uset.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD72A20E7E0D500A560C2 /* uset.h */; }; + B31BD94020E7E0D900A560C2 /* casemap.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD72B20E7E0D500A560C2 /* casemap.h */; }; + B31BD94120E7E0D900A560C2 /* coleitr.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD72C20E7E0D500A560C2 /* coleitr.h */; }; + B31BD94220E7E0D900A560C2 /* schriter.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD72D20E7E0D500A560C2 /* schriter.h */; }; + B31BD94320E7E0D900A560C2 /* msgfmt.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD72E20E7E0D500A560C2 /* msgfmt.h */; }; + B31BD94420E7E0D900A560C2 /* fieldpos.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD72F20E7E0D500A560C2 /* fieldpos.h */; }; + B31BD94520E7E0D900A560C2 /* simpletz.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD73020E7E0D500A560C2 /* simpletz.h */; }; + B31BD94620E7E0D900A560C2 /* uldnames.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD73120E7E0D500A560C2 /* uldnames.h */; }; + B31BD94720E7E0D900A560C2 /* uiter.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD73220E7E0D500A560C2 /* uiter.h */; }; + B31BD94820E7E0D900A560C2 /* umsg.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD73320E7E0D500A560C2 /* umsg.h */; }; + B31BD94920E7E0D900A560C2 /* sortkey.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD73420E7E0D500A560C2 /* sortkey.h */; }; + B31BD94A20E7E0D900A560C2 /* docmain.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD73520E7E0D500A560C2 /* docmain.h */; }; + B31BD94B20E7E0D900A560C2 /* uniset.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD73620E7E0D500A560C2 /* uniset.h */; }; + B31BD94C20E7E0D900A560C2 /* basictz.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD73720E7E0D500A560C2 /* basictz.h */; }; + B31BD94D20E7E0D900A560C2 /* udata.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD73820E7E0D500A560C2 /* udata.h */; }; + B31BD94E20E7E0D900A560C2 /* stringtriebuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD73920E7E0D500A560C2 /* stringtriebuilder.h */; }; + B31BD94F20E7E0D900A560C2 /* chariter.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD73A20E7E0D500A560C2 /* chariter.h */; }; + B31BD95020E7E0D900A560C2 /* umisc.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD73B20E7E0D500A560C2 /* umisc.h */; }; + B31BD95120E7E0D900A560C2 /* reldatefmt.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD73C20E7E0D500A560C2 /* reldatefmt.h */; }; + B31BD95220E7E0D900A560C2 /* uloc.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD73D20E7E0D500A560C2 /* uloc.h */; }; + B31BD95320E7E0D900A560C2 /* plurrule.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD73E20E7E0D500A560C2 /* plurrule.h */; }; + B31BD95420E7E0D900A560C2 /* bytestriebuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD73F20E7E0D500A560C2 /* bytestriebuilder.h */; }; + B31BD95520E7E0D900A560C2 /* measunit.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD74020E7E0D500A560C2 /* measunit.h */; }; + B31BD95620E7E0D900A560C2 /* utrace.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD74120E7E0D500A560C2 /* utrace.h */; }; + B31BD95720E7E0D900A560C2 /* locdspnm.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD74220E7E0D500A560C2 /* locdspnm.h */; }; + B31BD95820E7E0D900A560C2 /* gregocal.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD74320E7E0D500A560C2 /* gregocal.h */; }; + B31BD95920E7E0D900A560C2 /* uchriter.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD74420E7E0D500A560C2 /* uchriter.h */; }; + B31BD95A20E7E0D900A560C2 /* enumset.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD74520E7E0D500A560C2 /* enumset.h */; }; + B31BD95B20E7E0D900A560C2 /* nounit.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD74620E7E0D500A560C2 /* nounit.h */; }; + B31BD95C20E7E0D900A560C2 /* utf.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD74720E7E0D500A560C2 /* utf.h */; }; + B31BD95D20E7E0D900A560C2 /* measure.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD74820E7E0D500A560C2 /* measure.h */; }; + B31BD95E20E7E0D900A560C2 /* tzrule.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD74920E7E0D500A560C2 /* tzrule.h */; }; + B31BD95F20E7E0D900A560C2 /* strenum.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD74A20E7E0D500A560C2 /* strenum.h */; }; + B31BD96020E7E0D900A560C2 /* regex.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD74B20E7E0D500A560C2 /* regex.h */; }; + B31BD96120E7E0D900A560C2 /* gender.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD74C20E7E0D500A560C2 /* gender.h */; }; + B31BD96220E7E0D900A560C2 /* dcfmtsym.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD74D20E7E0D500A560C2 /* dcfmtsym.h */; }; + B31BD96320E7E0D900A560C2 /* ucnv_err.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD74E20E7E0D500A560C2 /* ucnv_err.h */; }; + B31BD96420E7E0D900A560C2 /* decimfmt.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD74F20E7E0D500A560C2 /* decimfmt.h */; }; + B31BD96520E7E0D900A560C2 /* bytestrie.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD75020E7E0D500A560C2 /* bytestrie.h */; }; + B31BD96620E7E0D900A560C2 /* udatpg.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD75120E7E0D500A560C2 /* udatpg.h */; }; + B31BD96720E7E0D900A560C2 /* listformatter.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD75220E7E0D500A560C2 /* listformatter.h */; }; + B31BD96820E7E0D900A560C2 /* uobject.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD75320E7E0D500A560C2 /* uobject.h */; }; + B31BD96920E7E0D900A560C2 /* calendar.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD75420E7E0D500A560C2 /* calendar.h */; }; + B31BD96A20E7E0D900A560C2 /* ures.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD75520E7E0D500A560C2 /* ures.h */; }; + B31BD96B20E7E0D900A560C2 /* normlzr.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD75620E7E0D500A560C2 /* normlzr.h */; }; + B31BD96C20E7E0D900A560C2 /* usprep.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD75720E7E0D500A560C2 /* usprep.h */; }; + B31BD96D20E7E0D900A560C2 /* urename.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD75820E7E0D500A560C2 /* urename.h */; }; + B31BD96E20E7E0D900A560C2 /* caniter.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD75920E7E0D500A560C2 /* caniter.h */; }; + B31BD96F20E7E0D900A560C2 /* ucol.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD75A20E7E0D500A560C2 /* ucol.h */; }; + B31BD97020E7E0D900A560C2 /* upluralrules.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD75B20E7E0D500A560C2 /* upluralrules.h */; }; + B31BD97120E7E0D900A560C2 /* ucharstrie.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD75C20E7E0D500A560C2 /* ucharstrie.h */; }; + B31BD97220E7E0D900A560C2 /* tmunit.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD75D20E7E0D500A560C2 /* tmunit.h */; }; + B31BD97320E7E0D900A560C2 /* unistr.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD75E20E7E0D500A560C2 /* unistr.h */; }; + B31BD97420E7E0D900A560C2 /* rbbi.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD75F20E7E0D500A560C2 /* rbbi.h */; }; + B31BD97520E7E0D900A560C2 /* ulocdata.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD76020E7E0D500A560C2 /* ulocdata.h */; }; + B31BD97620E7E0D900A560C2 /* idna.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD76120E7E0D500A560C2 /* idna.h */; }; + B31BD97720E7E0D900A560C2 /* unorm2.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD76220E7E0D500A560C2 /* unorm2.h */; }; + B31BD97820E7E0D900A560C2 /* dtptngen.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD76320E7E0D500A560C2 /* dtptngen.h */; }; + B31BD97920E7E0D900A560C2 /* dbbi.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD76420E7E0D500A560C2 /* dbbi.h */; }; + B31BD97A20E7E0D900A560C2 /* bytestream.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD76520E7E0D500A560C2 /* bytestream.h */; }; + B31BD97B20E7E0D900A560C2 /* uversion.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD76620E7E0D500A560C2 /* uversion.h */; }; + B31BD97C20E7E0D900A560C2 /* messagepattern.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD76720E7E0D500A560C2 /* messagepattern.h */; }; + B31BD97D20E7E0D900A560C2 /* uidna.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD76820E7E0D500A560C2 /* uidna.h */; }; + B31BD97E20E7E0D900A560C2 /* filteredbrk.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD76920E7E0D500A560C2 /* filteredbrk.h */; }; + B31BD97F20E7E0D900A560C2 /* tmutamt.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD76A20E7E0D500A560C2 /* tmutamt.h */; }; + B31BD98020E7E0D900A560C2 /* char16ptr.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD76B20E7E0D500A560C2 /* char16ptr.h */; }; + B31BD98120E7E0D900A560C2 /* symtable.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD76C20E7E0D500A560C2 /* symtable.h */; }; + B31BD98220E7E0D900A560C2 /* ucasemap.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD76D20E7E0D500A560C2 /* ucasemap.h */; }; + B31BD98320E7E0D900A560C2 /* ucoleitr.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD76E20E7E0D500A560C2 /* ucoleitr.h */; }; + B31BD98420E7E0D900A560C2 /* compactdecimalformat.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD76F20E7E0D500A560C2 /* compactdecimalformat.h */; }; + B31BD98520E7E0D900A560C2 /* unum.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD77020E7E0D500A560C2 /* unum.h */; }; + B31BD98620E7E0D900A560C2 /* udisplaycontext.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD77120E7E0D500A560C2 /* udisplaycontext.h */; }; + B31BD98720E7E0D900A560C2 /* tztrans.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD77220E7E0D500A560C2 /* tztrans.h */; }; + B31BD98820E7E0D900A560C2 /* umachine.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD77320E7E0D500A560C2 /* umachine.h */; }; + B31BD98920E7E0D900A560C2 /* numberformatter.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD77420E7E0D500A560C2 /* numberformatter.h */; }; + B31BD98A20E7E0D900A560C2 /* datefmt.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD77520E7E0D500A560C2 /* datefmt.h */; }; + B31BD98B20E7E0D900A560C2 /* utmscale.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD77620E7E0D500A560C2 /* utmscale.h */; }; + B31BD98C20E7E0D900A560C2 /* coll.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD77720E7E0D500A560C2 /* coll.h */; }; + B31BD98D20E7E0D900A560C2 /* currpinf.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD77820E7E0D500A560C2 /* currpinf.h */; }; + B31BD98E20E7E0D900A560C2 /* uregex.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD77920E7E0D500A560C2 /* uregex.h */; }; + B31BD98F20E7E0D900A560C2 /* tmutfmt.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD77A20E7E0D500A560C2 /* tmutfmt.h */; }; + B31BD99020E7E0D900A560C2 /* plurfmt.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD77B20E7E0D500A560C2 /* plurfmt.h */; }; + B31BD99120E7E0D900A560C2 /* ustringtrie.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD77C20E7E0D500A560C2 /* ustringtrie.h */; }; + B31BD99220E7E0D900A560C2 /* smpdtfmt.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD77D20E7E0D500A560C2 /* smpdtfmt.h */; }; + B31BD99320E7E0D900A560C2 /* icudataver.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD77E20E7E0D500A560C2 /* icudataver.h */; }; + B31BD99420E7E0D900A560C2 /* uchar.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD77F20E7E0D500A560C2 /* uchar.h */; }; + B31BD99520E7E0D900A560C2 /* unorm.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD78020E7E0D500A560C2 /* unorm.h */; }; + B31BD99620E7E0D900A560C2 /* ushape.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD78120E7E0D500A560C2 /* ushape.h */; }; + B31BD99720E7E0D900A560C2 /* unifunct.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD78220E7E0D500A560C2 /* unifunct.h */; }; + B31BD99820E7E0D900A560C2 /* ugender.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD78320E7E0D500A560C2 /* ugender.h */; }; + B31BD99920E7E0D900A560C2 /* selfmt.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD78420E7E0D500A560C2 /* selfmt.h */; }; + B31BD99A20E7E0D900A560C2 /* uformattable.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD78520E7E0D500A560C2 /* uformattable.h */; }; + B31BD99B20E7E0D900A560C2 /* ustream.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD78620E7E0D500A560C2 /* ustream.h */; }; + B31BD99C20E7E0D900A560C2 /* simpleformatter.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD78720E7E0D500A560C2 /* simpleformatter.h */; }; + B31BD99D20E7E0D900A560C2 /* ucnv_cb.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD78820E7E0D500A560C2 /* ucnv_cb.h */; }; + B31BD99E20E7E0D900A560C2 /* curramt.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD78920E7E0D500A560C2 /* curramt.h */; }; + B31BD99F20E7E0D900A560C2 /* locid.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD78A20E7E0D500A560C2 /* locid.h */; }; + B31BD9A020E7E0D900A560C2 /* udateintervalformat.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD78B20E7E0D500A560C2 /* udateintervalformat.h */; }; + B31BD9A120E7E0D900A560C2 /* resbund.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD78C20E7E0D500A560C2 /* resbund.h */; }; + B31BD9A220E7E0D900A560C2 /* ubidi.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD78D20E7E0D500A560C2 /* ubidi.h */; }; + B31BD9A320E7E0D900A560C2 /* stsearch.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD78E20E7E0D500A560C2 /* stsearch.h */; }; + B31BD9A420E7E0D900A560C2 /* alphaindex.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD78F20E7E0D500A560C2 /* alphaindex.h */; }; + B31BD9A520E7E0D900A560C2 /* uvernum.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD79020E7E0D500A560C2 /* uvernum.h */; }; + B31BD9A620E7E0D900A560C2 /* unimatch.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD79120E7E0D600A560C2 /* unimatch.h */; }; + B31BD9A720E7E0D900A560C2 /* rbtz.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD79220E7E0D600A560C2 /* rbtz.h */; }; + B31BD9A820E7E0D900A560C2 /* ucnvsel.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD79320E7E0D600A560C2 /* ucnvsel.h */; }; + B31BD9A920E7E0D900A560C2 /* uspoof.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD79420E7E0D600A560C2 /* uspoof.h */; }; + B31BD9AA20E7E0D900A560C2 /* region.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD79520E7E0D600A560C2 /* region.h */; }; + B31BD9AB20E7E0D900A560C2 /* ureldatefmt.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD79620E7E0D600A560C2 /* ureldatefmt.h */; }; + B31BD9AC20E7E0D900A560C2 /* utrans.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD79720E7E0D600A560C2 /* utrans.h */; }; + B31BD9AD20E7E0D900A560C2 /* parseerr.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD79820E7E0D600A560C2 /* parseerr.h */; }; + B31BD9AE20E7E0D900A560C2 /* putil.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD79920E7E0D600A560C2 /* putil.h */; }; + B31BD9AF20E7E0D900A560C2 /* format.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD79A20E7E0D600A560C2 /* format.h */; }; + B31BD9B020E7E0D900A560C2 /* scientificnumberformatter.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD79B20E7E0D600A560C2 /* scientificnumberformatter.h */; }; + B31BD9B120E7E0D900A560C2 /* normalizer2.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD79C20E7E0D600A560C2 /* normalizer2.h */; }; + B31BD9B220E7E0D900A560C2 /* dtrule.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD79D20E7E0D600A560C2 /* dtrule.h */; }; + B31BD9B320E7E0D900A560C2 /* ucnv.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD79E20E7E0D600A560C2 /* ucnv.h */; }; + B31BD9B420E7E0D900A560C2 /* ucharstriebuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD79F20E7E0D600A560C2 /* ucharstriebuilder.h */; }; + B31BD9B520E7E0D900A560C2 /* search.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD7A020E7E0D600A560C2 /* search.h */; }; + B31BD9B620E7E0D900A560C2 /* unumsys.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD7A120E7E0D600A560C2 /* unumsys.h */; }; + B31BD9B720E7E0D900A560C2 /* uconfig.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD7A220E7E0D600A560C2 /* uconfig.h */; }; + B31BD9B820E7E0D900A560C2 /* utf16.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD7A320E7E0D600A560C2 /* utf16.h */; }; + B31BD9B920E7E0D900A560C2 /* brkiter.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD7A420E7E0D600A560C2 /* brkiter.h */; }; + B31BD9BA20E7E0D900A560C2 /* platform.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD7A520E7E0D600A560C2 /* platform.h */; }; + B31BD9BB20E7E0D900A560C2 /* rep.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD7A620E7E0D600A560C2 /* rep.h */; }; + B31BD9BC20E7E0D900A560C2 /* std_string.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD7A720E7E0D600A560C2 /* std_string.h */; }; + B31BD9BD20E7E0D900A560C2 /* utf8.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD7A820E7E0D600A560C2 /* utf8.h */; }; + B31BD9BE20E7E0D900A560C2 /* localpointer.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD7A920E7E0D600A560C2 /* localpointer.h */; }; + B31BD9BF20E7E0D900A560C2 /* uclean.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD7AA20E7E0D600A560C2 /* uclean.h */; }; + B31BD9C020E7E0D900A560C2 /* uscript.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD7AB20E7E0D600A560C2 /* uscript.h */; }; + B31BD9C120E7E0D900A560C2 /* numfmt.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD7AC20E7E0D600A560C2 /* numfmt.h */; }; + B31BD9C220E7E0D900A560C2 /* currunit.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD7AD20E7E0D600A560C2 /* currunit.h */; }; + B31BD9C320E7E0D900A560C2 /* utypes.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD7AE20E7E0D600A560C2 /* utypes.h */; }; + B31BD9C420E7E0D900A560C2 /* ulistformatter.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD7AF20E7E0D600A560C2 /* ulistformatter.h */; }; + B31BD9C520E7E0D900A560C2 /* measfmt.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD7B020E7E0D600A560C2 /* measfmt.h */; }; + B31BD9C620E7E0D900A560C2 /* unifilt.h in Headers */ = {isa = PBXBuildFile; fileRef = B31BD7B120E7E0D600A560C2 /* unifilt.h */; }; + B31BD9CE20E7E0DA00A560C2 /* libicutest.61.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B31BD7BB20E7E0D600A560C2 /* libicutest.61.dylib */; }; + B31BD9D320E7E0DA00A560C2 /* libicuio.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B31BD7C120E7E0D600A560C2 /* libicuio.dylib */; }; + B31BD9D520E7E0DA00A560C2 /* libicutest.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B31BD7C320E7E0D600A560C2 /* libicutest.dylib */; }; + B31BD9D620E7E0DA00A560C2 /* libicuio.61.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B31BD7C420E7E0D600A560C2 /* libicuio.61.dylib */; }; + B31BD9D820E7E0DA00A560C2 /* libicudata.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B31BD7C620E7E0D600A560C2 /* libicudata.dylib */; }; + B31BD9D920E7E0DA00A560C2 /* libicuio.61.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B31BD7C720E7E0D600A560C2 /* libicuio.61.1.dylib */; }; + B31BD9DB20E7E0DA00A560C2 /* libicutu.61.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B31BD7C920E7E0D600A560C2 /* libicutu.61.dylib */; }; + B31BD9DC20E7E0DA00A560C2 /* libicui18n.61.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B31BD7CA20E7E0D600A560C2 /* libicui18n.61.1.dylib */; }; + B31BD9DD20E7E0DA00A560C2 /* libicutu.61.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B31BD7CB20E7E0D600A560C2 /* libicutu.61.1.dylib */; }; + B31BD9DE20E7E0DA00A560C2 /* libicudata.61.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B31BD7CC20E7E0D600A560C2 /* libicudata.61.dylib */; }; + B31BD9DF20E7E0DA00A560C2 /* libicuuc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B31BD7CD20E7E0D600A560C2 /* libicuuc.dylib */; }; + B31BD9E220E7E0DA00A560C2 /* libicutu.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B31BD7D020E7E0D600A560C2 /* libicutu.dylib */; }; + B31BD9E320E7E0DA00A560C2 /* libicui18n.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B31BD7D120E7E0D600A560C2 /* libicui18n.dylib */; }; + B31BD9E420E7E0DA00A560C2 /* libicui18n.61.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B31BD7D220E7E0D600A560C2 /* libicui18n.61.dylib */; }; + B31BD9E520E7E0DA00A560C2 /* libicuuc.61.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B31BD7D320E7E0D600A560C2 /* libicuuc.61.dylib */; }; + B31BD9E620E7E0DA00A560C2 /* libicudata.61.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B31BD7D420E7E0D600A560C2 /* libicudata.61.1.dylib */; }; + B31BD9E720E7E0DA00A560C2 /* libicutest.61.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B31BD7D520E7E0D600A560C2 /* libicutest.61.1.dylib */; }; + B31BD9EE20E7E0DA00A560C2 /* libicuuc.61.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B31BD7DF20E7E0D600A560C2 /* libicuuc.61.1.dylib */; }; + B31BDAFC20E7E26200A560C2 /* libicutest.61.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B31BD7BB20E7E0D600A560C2 /* libicutest.61.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BDAFD20E7E26200A560C2 /* libicuio.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B31BD7C120E7E0D600A560C2 /* libicuio.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BDAFE20E7E26200A560C2 /* libicutest.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B31BD7C320E7E0D600A560C2 /* libicutest.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BDAFF20E7E26200A560C2 /* libicuio.61.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B31BD7C420E7E0D600A560C2 /* libicuio.61.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BDB0020E7E26200A560C2 /* libicudata.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B31BD7C620E7E0D600A560C2 /* libicudata.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BDB0120E7E26200A560C2 /* libicuio.61.1.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B31BD7C720E7E0D600A560C2 /* libicuio.61.1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BDB0220E7E26200A560C2 /* libicutu.61.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B31BD7C920E7E0D600A560C2 /* libicutu.61.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BDB0320E7E26200A560C2 /* libicui18n.61.1.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B31BD7CA20E7E0D600A560C2 /* libicui18n.61.1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BDB0420E7E26200A560C2 /* libicutu.61.1.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B31BD7CB20E7E0D600A560C2 /* libicutu.61.1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BDB0520E7E26200A560C2 /* libicudata.61.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B31BD7CC20E7E0D600A560C2 /* libicudata.61.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BDB0620E7E26200A560C2 /* libicuuc.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B31BD7CD20E7E0D600A560C2 /* libicuuc.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BDB0720E7E26200A560C2 /* libicutu.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B31BD7D020E7E0D600A560C2 /* libicutu.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BDB0820E7E26200A560C2 /* libicui18n.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B31BD7D120E7E0D600A560C2 /* libicui18n.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BDB0920E7E26200A560C2 /* libicui18n.61.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B31BD7D220E7E0D600A560C2 /* libicui18n.61.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BDB0A20E7E26200A560C2 /* libicuuc.61.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B31BD7D320E7E0D600A560C2 /* libicuuc.61.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BDB0B20E7E26200A560C2 /* libicudata.61.1.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B31BD7D420E7E0D600A560C2 /* libicudata.61.1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BDB0C20E7E26200A560C2 /* libicutest.61.1.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B31BD7D520E7E0D600A560C2 /* libicutest.61.1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BDB0D20E7E26200A560C2 /* libicuuc.61.1.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B31BD7DF20E7E0D600A560C2 /* libicuuc.61.1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B31BEAFA1F96268700496E7A /* RegularExpressionSetBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B31BEAF81F96268000496E7A /* RegularExpressionSetBuilder.swift */; }; + B31BEAFC1F96269F00496E7A /* RegularExpressionSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = B31BEAFB1F96269F00496E7A /* RegularExpressionSet.swift */; }; + B31BEAFE1F9626AC00496E7A /* RegularExpressionSetProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B31BEAFD1F9626AC00496E7A /* RegularExpressionSetProtocol.swift */; }; + B31BEB001F9626BB00496E7A /* RegularExpressionSetBuilderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B31BEAFF1F9626BB00496E7A /* RegularExpressionSetBuilderProtocol.swift */; }; + B33A533E1F954FF800E74800 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = B33A533D1F954FF800E74800 /* Result.swift */; }; + B33F0BB61F958640004A87DD /* StatusItemProviderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B33A53391F954E4B00E74800 /* StatusItemProviderProtocol.swift */; }; + B33F0BB71F958640004A87DD /* RemoteObjectInterfaceProviderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B33A533B1F954F8C00E74800 /* RemoteObjectInterfaceProviderProtocol.swift */; }; + B33F0BB91F958695004A87DD /* RemoteObjectInterfaceProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = B33F0BB81F958695004A87DD /* RemoteObjectInterfaceProvider.swift */; }; + B33F0BBB1F9586A9004A87DD /* StatusItemProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = B33F0BBA1F9586A9004A87DD /* StatusItemProvider.swift */; }; + B341888A1F9A44A700C5F356 /* CommandLineArgumentProviderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34188891F9A44A700C5F356 /* CommandLineArgumentProviderProtocol.swift */; }; + B341888E1F9A460300C5F356 /* CommandLineArgumentProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = B341888D1F9A460300C5F356 /* CommandLineArgumentProvider.swift */; }; + B34188911F9A479900C5F356 /* SpeculidApplicationModeParserTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34188901F9A479900C5F356 /* SpeculidApplicationModeParserTest.swift */; }; + B34E82FB1F8FD4EF0032268F /* ImageFileFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = B34E82FA1F8FD4EF0032268F /* ImageFileFormat.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B34E82FF1F8FD6860032268F /* ImageFileProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = B34E82FE1F8FD6860032268F /* ImageFileProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B34E83041F8FD90C0032268F /* GlibError.h in Headers */ = {isa = PBXBuildFile; fileRef = B34E83021F8FD90C0032268F /* GlibError.h */; }; + B34E83051F8FD90C0032268F /* GlibError.m in Sources */ = {isa = PBXBuildFile; fileRef = B34E83031F8FD90C0032268F /* GlibError.m */; }; + B34E83071F8FDCA30032268F /* GeometryDimension.h in Headers */ = {isa = PBXBuildFile; fileRef = B34E83061F8FDC4C0032268F /* GeometryDimension.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B34E83091F8FDCB80032268F /* Dimension.h in Headers */ = {isa = PBXBuildFile; fileRef = B34E83081F8FDCB80032268F /* Dimension.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B34E830B1F8FDDAC0032268F /* CairoColorProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = B34E830A1F8FDDAC0032268F /* CairoColorProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B35B71231F9041B900BE477E /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = B35B71221F9041B900BE477E /* main.swift */; }; + B35B71271F904CF100BE477E /* SurfaceHandleBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = B35B71251F904CF100BE477E /* SurfaceHandleBuilder.h */; }; + B35B71281F904CF100BE477E /* SurfaceHandleBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = B35B71261F904CF100BE477E /* SurfaceHandleBuilder.m */; }; + B35B712A1F9052B200BE477E /* CairoSize.h in Headers */ = {isa = PBXBuildFile; fileRef = B35B71291F9052B200BE477E /* CairoSize.h */; }; + B36C2E8B1FA5B876003F48BD /* build.list in Resources */ = {isa = PBXBuildFile; fileRef = B36C2E8A1FA5B876003F48BD /* build.list */; }; + B37C74441F8C58F300DF505B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B37C74431F8C58F300DF505B /* Assets.xcassets */; }; + B37C745E1F8C590D00DF505B /* Speculid-Mac-XPC.xpc in Embed XPC Services */ = {isa = PBXBuildFile; fileRef = B37C74531F8C590D00DF505B /* Speculid-Mac-XPC.xpc */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + B37C74641F8C592400DF505B /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = B37C74631F8C592400DF505B /* main.swift */; }; + B37C746B1F8C598500DF505B /* ServiceDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B37C74681F8C598500DF505B /* ServiceDelegate.swift */; }; + B37C747A1F8C5ADA00DF505B /* Speculid.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B37C74731F8C5ADA00DF505B /* Speculid.framework */; }; + B37C747B1F8C5ADA00DF505B /* Speculid.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B37C74731F8C5ADA00DF505B /* Speculid.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + B37C748D1F8C5B5C00DF505B /* CairoSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = B37C748B1F8C5B5C00DF505B /* CairoSVG.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B37C74901F8C5B5C00DF505B /* CairoSVG.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B37C74891F8C5B5C00DF505B /* CairoSVG.framework */; }; + B37C74911F8C5B5C00DF505B /* CairoSVG.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B37C74891F8C5B5C00DF505B /* CairoSVG.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + B37C74A41F8C5C7400DF505B /* SVGImageHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = B37C74951F8C5C7200DF505B /* SVGImageHandle.h */; }; + B37C74A51F8C5C7400DF505B /* PNGImageHandle.m in Sources */ = {isa = PBXBuildFile; fileRef = B37C74961F8C5C7200DF505B /* PNGImageHandle.m */; }; + B37C74A61F8C5C7400DF505B /* CairoInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = B37C74971F8C5C7300DF505B /* CairoInterface.m */; }; + B37C74A71F8C5C7400DF505B /* PDFSurface.h in Headers */ = {isa = PBXBuildFile; fileRef = B37C74981F8C5C7300DF505B /* PDFSurface.h */; }; + B37C74A81F8C5C7400DF505B /* ImageSpecificationProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = B37C74991F8C5C7300DF505B /* ImageSpecificationProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B37C74A91F8C5C7400DF505B /* CairoInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B37C749A1F8C5C7300DF505B /* CairoInterface.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B37C74AA1F8C5C7400DF505B /* SurfaceHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = B37C749B1F8C5C7300DF505B /* SurfaceHandle.h */; }; + B37C74AB1F8C5C7400DF505B /* ImageHandleBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = B37C749C1F8C5C7300DF505B /* ImageHandleBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B37C74AC1F8C5C7400DF505B /* PDFSurface.m in Sources */ = {isa = PBXBuildFile; fileRef = B37C749D1F8C5C7300DF505B /* PDFSurface.m */; }; + B37C74AD1F8C5C7400DF505B /* SVGImageHandle.m in Sources */ = {isa = PBXBuildFile; fileRef = B37C749E1F8C5C7300DF505B /* SVGImageHandle.m */; }; + B37C74AE1F8C5C7400DF505B /* PNGSurface.m in Sources */ = {isa = PBXBuildFile; fileRef = B37C749F1F8C5C7300DF505B /* PNGSurface.m */; }; + B37C74AF1F8C5C7400DF505B /* ImageHandleBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = B37C74A01F8C5C7400DF505B /* ImageHandleBuilder.m */; }; + B37C74B01F8C5C7400DF505B /* ImageHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = B37C74A11F8C5C7400DF505B /* ImageHandle.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B37C74B11F8C5C7400DF505B /* PNGSurface.h in Headers */ = {isa = PBXBuildFile; fileRef = B37C74A21F8C5C7400DF505B /* PNGSurface.h */; }; + B37C74B21F8C5C7400DF505B /* PNGImageHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = B37C74A31F8C5C7400DF505B /* PNGImageHandle.h */; }; + B37C74BC1F8C5D2A00DF505B /* CairoSVG.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B37C74891F8C5B5C00DF505B /* CairoSVG.framework */; }; + B3825EFC20F91807008F2A02 /* Segment.h in Headers */ = {isa = PBXBuildFile; fileRef = B3825EF320F91806008F2A02 /* Segment.h */; }; + B3825EFD20F91807008F2A02 /* Types.h in Headers */ = {isa = PBXBuildFile; fileRef = B3825EF420F91806008F2A02 /* Types.h */; }; + B3825EFE20F91807008F2A02 /* Log.h in Headers */ = {isa = PBXBuildFile; fileRef = B3825EF520F91806008F2A02 /* Log.h */; }; + B3825EFF20F91807008F2A02 /* Font.h in Headers */ = {isa = PBXBuildFile; fileRef = B3825EF620F91806008F2A02 /* Font.h */; }; + B3825F0020F91807008F2A02 /* libgraphite2.3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3825EF820F91806008F2A02 /* libgraphite2.3.dylib */; }; + B3825F0120F91807008F2A02 /* libgraphite2.3.0.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3825EF920F91806008F2A02 /* libgraphite2.3.0.1.dylib */; }; + B3825F0220F91807008F2A02 /* libgraphite2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3825EFA20F91806008F2A02 /* libgraphite2.dylib */; }; + B3825F0320F9183E008F2A02 /* libgraphite2.3.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3825EF820F91806008F2A02 /* libgraphite2.3.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3825F0420F9183F008F2A02 /* libgraphite2.3.0.1.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3825EF920F91806008F2A02 /* libgraphite2.3.0.1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3825F0520F91841008F2A02 /* libgraphite2.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3825EFA20F91806008F2A02 /* libgraphite2.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3891B8320F6402F00FEDF89 /* libcroco-0.6.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8078920E5858100030497 /* libcroco-0.6.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3891B8420F6402F00FEDF89 /* libcroco-0.6.3.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8078C20E5858100030497 /* libcroco-0.6.3.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3891B8520F6406B00FEDF89 /* libfribidi.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8083020E585BF00030497 /* libfribidi.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3891B8620F6406B00FEDF89 /* libfribidi.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8083220E585BF00030497 /* libfribidi.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3891BBE20F7CE010095E1FD /* CwlSysctl.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3891BBD20F7CE010095E1FD /* CwlSysctl.swift */; }; + B3B5E9DA1F96C1C1004A6BEB /* SpeculidConfigurationBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B5E9D81F96C1BE004A6BEB /* SpeculidConfigurationBuilder.swift */; }; + B3B5E9DC1F96C1D2004A6BEB /* SpeculidConfigurationBuilderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B5E9DB1F96C1D2004A6BEB /* SpeculidConfigurationBuilderProtocol.swift */; }; + B3B5E9DE1F96C2A2004A6BEB /* SpeculidConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B5E9DD1F96C2A2004A6BEB /* SpeculidConfiguration.swift */; }; + B3B5E9E01F96C416004A6BEB /* SpeculidApplicationMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B5E9DF1F96C416004A6BEB /* SpeculidApplicationMode.swift */; }; + B3B5E9E21F96C44D004A6BEB /* SpeculidCommandArgumentSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B5E9E11F96C44D004A6BEB /* SpeculidCommandArgumentSet.swift */; }; + B3B5E9E41F96C5F1004A6BEB /* CommandLineActivityProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B5E9E31F96C5F1004A6BEB /* CommandLineActivityProtocol.swift */; }; + B3B5E9E61F96C604004A6BEB /* CommandLineRunnerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B5E9E51F96C604004A6BEB /* CommandLineRunnerProtocol.swift */; }; + B3B5E9E81F96C74C004A6BEB /* CommandLineRunner.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B5E9E71F96C74C004A6BEB /* CommandLineRunner.swift */; }; + B3B5E9EA1F96C777004A6BEB /* SpeculidApplicationModeParserProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B5E9E91F96C777004A6BEB /* SpeculidApplicationModeParserProtocol.swift */; }; + B3B5E9EC1F96C7D5004A6BEB /* SpeculidApplicationModeParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B5E9EB1F96C7D5004A6BEB /* SpeculidApplicationModeParser.swift */; }; + B3C6CA8E2114C9EB000D5120 /* dummy in Resources */ = {isa = PBXBuildFile; fileRef = B3C6CA8D2114C9EB000D5120 /* dummy */; }; + B3CB15702113AA8C00A6DC5C /* VersionProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3CB156F2113AA8C00A6DC5C /* VersionProvider.swift */; }; + B3D32A021F9A5D760042B46F /* help.txt in Resources */ = {isa = PBXBuildFile; fileRef = B3D32A011F9A5D750042B46F /* help.txt */; }; + B3D32A041F9A5E8F0042B46F /* CommandLineRunnerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3D32A031F9A5E8F0042B46F /* CommandLineRunnerTest.swift */; }; + B3D32A061F9A5FEE0042B46F /* FileHandle.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3D32A051F9A5FEE0042B46F /* FileHandle.swift */; }; + B3D32A081F9A73740042B46F /* AsyncBlockOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3D32A071F9A73740042B46F /* AsyncBlockOperation.swift */; }; + B3E204B020E568C3009EA554 /* pixman.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4C220E568A5009EA554 /* pixman.h */; }; + B3E204B120E568C3009EA554 /* pixman-version.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4C320E568A5009EA554 /* pixman-version.h */; }; + B3E204B620E568C3009EA554 /* libpixman-1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F4CA20E568A5009EA554 /* libpixman-1.dylib */; }; + B3E204B820E568C3009EA554 /* libpixman-1.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F4CC20E568A5009EA554 /* libpixman-1.0.dylib */; }; + B3E204BD20E568C3009EA554 /* ftsnames.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4D820E568A5009EA554 /* ftsnames.h */; }; + B3E204BE20E568C3009EA554 /* ftwinfnt.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4D920E568A5009EA554 /* ftwinfnt.h */; }; + B3E204BF20E568C3009EA554 /* ftsizes.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4DA20E568A5009EA554 /* ftsizes.h */; }; + B3E204C020E568C3009EA554 /* fttypes.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4DB20E568A5009EA554 /* fttypes.h */; }; + B3E204C120E568C3009EA554 /* ftparams.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4DC20E568A5009EA554 /* ftparams.h */; }; + B3E204C220E568C3009EA554 /* ftmm.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4DD20E568A5009EA554 /* ftmm.h */; }; + B3E204C320E568C3009EA554 /* ftstdlib.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4DF20E568A5009EA554 /* ftstdlib.h */; }; + B3E204C420E568C3009EA554 /* ftheader.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4E020E568A5009EA554 /* ftheader.h */; }; + B3E204C520E568C3009EA554 /* ftconfig.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4E120E568A5009EA554 /* ftconfig.h */; }; + B3E204C620E568C3009EA554 /* ftoption.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4E220E568A5009EA554 /* ftoption.h */; }; + B3E204C720E568C3009EA554 /* ftmodule.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4E320E568A5009EA554 /* ftmodule.h */; }; + B3E204C820E568C3009EA554 /* ftmodapi.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4E420E568A5009EA554 /* ftmodapi.h */; }; + B3E204C920E568C3009EA554 /* ftbzip2.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4E520E568A5009EA554 /* ftbzip2.h */; }; + B3E204CA20E568C3009EA554 /* fttrigon.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4E620E568A5009EA554 /* fttrigon.h */; }; + B3E204CB20E568C3009EA554 /* ftbbox.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4E720E568A5009EA554 /* ftbbox.h */; }; + B3E204CC20E568C3009EA554 /* ftgzip.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4E820E568A5009EA554 /* ftgzip.h */; }; + B3E204CD20E568C3009EA554 /* ftdriver.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4E920E568A5009EA554 /* ftdriver.h */; }; + B3E204CE20E568C3009EA554 /* ftoutln.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4EA20E568A6009EA554 /* ftoutln.h */; }; + B3E204CF20E568C3009EA554 /* ftadvanc.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4EB20E568A6009EA554 /* ftadvanc.h */; }; + B3E204D020E568C3009EA554 /* ftsynth.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4EC20E568A6009EA554 /* ftsynth.h */; }; + B3E204D120E568C3009EA554 /* fterrors.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4ED20E568A6009EA554 /* fterrors.h */; }; + B3E204D220E568C3009EA554 /* ftgasp.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4EE20E568A6009EA554 /* ftgasp.h */; }; + B3E204D320E568C3009EA554 /* ftstroke.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4EF20E568A6009EA554 /* ftstroke.h */; }; + B3E204D420E568C3009EA554 /* ftcache.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4F020E568A6009EA554 /* ftcache.h */; }; + B3E204D520E568C3009EA554 /* ftotval.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4F120E568A6009EA554 /* ftotval.h */; }; + B3E204D620E568C3009EA554 /* freetype.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4F220E568A6009EA554 /* freetype.h */; }; + B3E204D720E568C3009EA554 /* ftincrem.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4F320E568A6009EA554 /* ftincrem.h */; }; + B3E204D820E568C3009EA554 /* ftfntfmt.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4F420E568A6009EA554 /* ftfntfmt.h */; }; + B3E204D920E568C3009EA554 /* fterrdef.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4F520E568A6009EA554 /* fterrdef.h */; }; + B3E204DA20E568C3009EA554 /* ttnameid.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4F620E568A6009EA554 /* ttnameid.h */; }; + B3E204DB20E568C3009EA554 /* ftpfr.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4F720E568A6009EA554 /* ftpfr.h */; }; + B3E204DC20E568C3009EA554 /* ftgxval.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4F820E568A6009EA554 /* ftgxval.h */; }; + B3E204DD20E568C3009EA554 /* ftchapters.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4F920E568A6009EA554 /* ftchapters.h */; }; + B3E204DE20E568C3009EA554 /* tttags.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4FA20E568A6009EA554 /* tttags.h */; }; + B3E204DF20E568C3009EA554 /* ftlzw.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4FB20E568A6009EA554 /* ftlzw.h */; }; + B3E204E020E568C3009EA554 /* ftsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4FC20E568A6009EA554 /* ftsystem.h */; }; + B3E204E120E568C3009EA554 /* t1tables.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4FD20E568A6009EA554 /* t1tables.h */; }; + B3E204E220E568C3009EA554 /* ftimage.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4FE20E568A6009EA554 /* ftimage.h */; }; + B3E204E320E568C3009EA554 /* tttables.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F4FF20E568A6009EA554 /* tttables.h */; }; + B3E204E420E568C3009EA554 /* ftcid.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F50020E568A6009EA554 /* ftcid.h */; }; + B3E204E520E568C3009EA554 /* ftglyph.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F50120E568A6009EA554 /* ftglyph.h */; }; + B3E204E620E568C3009EA554 /* ftmoderr.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F50220E568A6009EA554 /* ftmoderr.h */; }; + B3E204E720E568C3009EA554 /* ftbitmap.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F50320E568A6009EA554 /* ftbitmap.h */; }; + B3E204E820E568C3009EA554 /* ftlist.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F50420E568A6009EA554 /* ftlist.h */; }; + B3E204E920E568C3009EA554 /* ftmac.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F50520E568A6009EA554 /* ftmac.h */; }; + B3E204EA20E568C3009EA554 /* ftlcdfil.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F50620E568A6009EA554 /* ftlcdfil.h */; }; + B3E204EB20E568C3009EA554 /* ftbdf.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F50720E568A6009EA554 /* ftbdf.h */; }; + B3E204EC20E568C3009EA554 /* ftrender.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F50820E568A6009EA554 /* ftrender.h */; }; + B3E204ED20E568C3009EA554 /* ft2build.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F50920E568A6009EA554 /* ft2build.h */; }; + B3E204EF20E568C3009EA554 /* libfreetype.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F50C20E568A6009EA554 /* libfreetype.dylib */; }; + B3E204F220E568C3009EA554 /* libfreetype.6.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F51020E568A6009EA554 /* libfreetype.6.dylib */; }; + B3E204FC20E568C3009EA554 /* gdk-pixbuf-animation.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F52520E568A6009EA554 /* gdk-pixbuf-animation.h */; }; + B3E204FD20E568C3009EA554 /* gdk-pixbuf-marshal.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F52620E568A6009EA554 /* gdk-pixbuf-marshal.h */; }; + B3E204FE20E568C3009EA554 /* gdk-pixbuf-io.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F52720E568A6009EA554 /* gdk-pixbuf-io.h */; }; + B3E204FF20E568C3009EA554 /* gdk-pixbuf.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F52820E568A6009EA554 /* gdk-pixbuf.h */; }; + B3E2050020E568C3009EA554 /* gdk-pixbuf-macros.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F52920E568A6009EA554 /* gdk-pixbuf-macros.h */; }; + B3E2050120E568C3009EA554 /* gdk-pixbuf-loader.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F52A20E568A6009EA554 /* gdk-pixbuf-loader.h */; }; + B3E2050220E568C3009EA554 /* gdk-pixbuf-autocleanups.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F52B20E568A6009EA554 /* gdk-pixbuf-autocleanups.h */; }; + B3E2050320E568C3009EA554 /* gdk-pixbuf-enum-types.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F52C20E568A6009EA554 /* gdk-pixbuf-enum-types.h */; }; + B3E2050420E568C3009EA554 /* gdk-pixdata.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F52D20E568A6009EA554 /* gdk-pixdata.h */; }; + B3E2050520E568C3009EA554 /* gdk-pixbuf-transform.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F52E20E568A6009EA554 /* gdk-pixbuf-transform.h */; }; + B3E2050620E568C3009EA554 /* gdk-pixbuf-core.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F52F20E568A6009EA554 /* gdk-pixbuf-core.h */; }; + B3E2050720E568C3009EA554 /* gdk-pixbuf-features.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F53020E568A6009EA554 /* gdk-pixbuf-features.h */; }; + B3E2050820E568C3009EA554 /* gdk-pixbuf-simple-anim.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F53120E568A6009EA554 /* gdk-pixbuf-simple-anim.h */; }; + B3E2050C20E568C3009EA554 /* libgdk_pixbuf-2.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F53620E568A6009EA554 /* libgdk_pixbuf-2.0.dylib */; }; + B3E2050E20E568C3009EA554 /* libgdk_pixbuf-2.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F53920E568A6009EA554 /* libgdk_pixbuf-2.0.0.dylib */; }; + B3E205D020E568C4009EA554 /* gunixfdlist.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6E320E568A9009EA554 /* gunixfdlist.h */; }; + B3E205D120E568C4009EA554 /* gunixsocketaddress.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6E420E568A9009EA554 /* gunixsocketaddress.h */; }; + B3E205D220E568C4009EA554 /* gdesktopappinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6E520E568A9009EA554 /* gdesktopappinfo.h */; }; + B3E205D320E568C4009EA554 /* gunixconnection.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6E620E568A9009EA554 /* gunixconnection.h */; }; + B3E205D420E568C4009EA554 /* gunixoutputstream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6E720E568A9009EA554 /* gunixoutputstream.h */; }; + B3E205D520E568C4009EA554 /* gunixcredentialsmessage.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6E820E568A9009EA554 /* gunixcredentialsmessage.h */; }; + B3E205D620E568C4009EA554 /* gunixinputstream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6E920E568A9009EA554 /* gunixinputstream.h */; }; + B3E205D720E568C4009EA554 /* gunixmounts.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6EA20E568A9009EA554 /* gunixmounts.h */; }; + B3E205D820E568C4009EA554 /* gunixfdmessage.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6EB20E568A9009EA554 /* gunixfdmessage.h */; }; + B3E205D920E568C4009EA554 /* gfiledescriptorbased.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6EC20E568A9009EA554 /* gfiledescriptorbased.h */; }; + B3E205DA20E568C4009EA554 /* glib-object.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6EE20E568A9009EA554 /* glib-object.h */; }; + B3E205DB20E568C4009EA554 /* gparam.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6F020E568A9009EA554 /* gparam.h */; }; + B3E205DC20E568C4009EA554 /* gparamspecs.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6F120E568A9009EA554 /* gparamspecs.h */; }; + B3E205DD20E568C4009EA554 /* gsignal.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6F220E568A9009EA554 /* gsignal.h */; }; + B3E205DE20E568C4009EA554 /* genums.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6F320E568A9009EA554 /* genums.h */; }; + B3E205DF20E568C4009EA554 /* gclosure.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6F420E568A9009EA554 /* gclosure.h */; }; + B3E205E020E568C4009EA554 /* gvaluearray.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6F520E568A9009EA554 /* gvaluearray.h */; }; + B3E205E120E568C4009EA554 /* gbinding.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6F620E568A9009EA554 /* gbinding.h */; }; + B3E205E220E568C4009EA554 /* gtypeplugin.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6F720E568A9009EA554 /* gtypeplugin.h */; }; + B3E205E420E568C4009EA554 /* gsourceclosure.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6F920E568A9009EA554 /* gsourceclosure.h */; }; + B3E205E520E568C4009EA554 /* glib-types.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6FA20E568A9009EA554 /* glib-types.h */; }; + B3E205E620E568C4009EA554 /* gtype.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6FB20E568A9009EA554 /* gtype.h */; }; + B3E205E720E568C4009EA554 /* gvaluetypes.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6FC20E568A9009EA554 /* gvaluetypes.h */; }; + B3E205E820E568C4009EA554 /* gboxed.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6FD20E568A9009EA554 /* gboxed.h */; }; + B3E205E920E568C4009EA554 /* gtypemodule.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6FE20E568A9009EA554 /* gtypemodule.h */; }; + B3E205EA20E568C4009EA554 /* gvalue.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F6FF20E568A9009EA554 /* gvalue.h */; }; + B3E205EB20E568C4009EA554 /* gvaluecollector.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F70020E568AA009EA554 /* gvaluecollector.h */; }; + B3E205EC20E568C4009EA554 /* gobject-autocleanups.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F70120E568AA009EA554 /* gobject-autocleanups.h */; }; + B3E205ED20E568C4009EA554 /* gobject.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F70220E568AA009EA554 /* gobject.h */; }; + B3E205EE20E568C4009EA554 /* gmarshal.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F70320E568AA009EA554 /* gmarshal.h */; }; + B3E205EF20E568C4009EA554 /* glib-unix.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F70420E568AA009EA554 /* glib-unix.h */; }; + B3E205F020E568C4009EA554 /* glib.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F70520E568AA009EA554 /* glib.h */; }; + B3E205F120E568C4009EA554 /* gmarkup.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F70720E568AA009EA554 /* gmarkup.h */; }; + B3E205F220E568C4009EA554 /* ghmac.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F70820E568AA009EA554 /* ghmac.h */; }; + B3E205F320E568C4009EA554 /* gtimer.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F70920E568AA009EA554 /* gtimer.h */; }; + B3E205F420E568C4009EA554 /* gvariant.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F70A20E568AA009EA554 /* gvariant.h */; }; + B3E205F520E568C4009EA554 /* glist.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F70B20E568AA009EA554 /* glist.h */; }; + B3E205F620E568C4009EA554 /* gtrashstack.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F70C20E568AA009EA554 /* gtrashstack.h */; }; + B3E205F720E568C4009EA554 /* gbookmarkfile.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F70D20E568AA009EA554 /* gbookmarkfile.h */; }; + B3E205F820E568C4009EA554 /* gprimes.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F70E20E568AA009EA554 /* gprimes.h */; }; + B3E205F920E568C4009EA554 /* grand.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F70F20E568AA009EA554 /* grand.h */; }; + B3E205FA20E568C4009EA554 /* gurifuncs.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F71020E568AA009EA554 /* gurifuncs.h */; }; + B3E205FB20E568C4009EA554 /* gchecksum.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F71120E568AA009EA554 /* gchecksum.h */; }; + B3E205FC20E568C4009EA554 /* gtestutils.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F71220E568AA009EA554 /* gtestutils.h */; }; + B3E205FD20E568C4009EA554 /* gslist.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F71320E568AA009EA554 /* gslist.h */; }; + B3E205FE20E568C4009EA554 /* gthreadpool.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F71420E568AA009EA554 /* gthreadpool.h */; }; + B3E205FF20E568C4009EA554 /* garray.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F71520E568AA009EA554 /* garray.h */; }; + B3E2060020E568C4009EA554 /* gbytes.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F71620E568AA009EA554 /* gbytes.h */; }; + B3E2060120E568C4009EA554 /* gconvert.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F71720E568AA009EA554 /* gconvert.h */; }; + B3E2060220E568C4009EA554 /* gdir.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F71820E568AA009EA554 /* gdir.h */; }; + B3E2060320E568C4009EA554 /* gkeyfile.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F71920E568AA009EA554 /* gkeyfile.h */; }; + B3E2060420E568C4009EA554 /* gstrfuncs.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F71A20E568AA009EA554 /* gstrfuncs.h */; }; + B3E2060520E568C4009EA554 /* gmappedfile.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F71B20E568AA009EA554 /* gmappedfile.h */; }; + B3E2060620E568C4009EA554 /* gstdio.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F71C20E568AA009EA554 /* gstdio.h */; }; + B3E2060720E568C4009EA554 /* gpoll.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F71D20E568AA009EA554 /* gpoll.h */; }; + B3E2060820E568C4009EA554 /* gunicode.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F71E20E568AA009EA554 /* gunicode.h */; }; + B3E2060920E568C4009EA554 /* gdataset.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F71F20E568AA009EA554 /* gdataset.h */; }; + B3E2060A20E568C4009EA554 /* gqueue.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F72020E568AA009EA554 /* gqueue.h */; }; + B3E2060B20E568C4009EA554 /* gsequence.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F72120E568AA009EA554 /* gsequence.h */; }; + B3E2060C20E568C4009EA554 /* gvarianttype.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F72220E568AA009EA554 /* gvarianttype.h */; }; + B3E2060D20E568C4009EA554 /* ghash.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F72320E568AA009EA554 /* ghash.h */; }; + B3E2060E20E568C4009EA554 /* gqsort.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F72420E568AA009EA554 /* gqsort.h */; }; + B3E2060F20E568C4009EA554 /* gscanner.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F72520E568AA009EA554 /* gscanner.h */; }; + B3E2061020E568C4009EA554 /* ggettext.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F72620E568AA009EA554 /* ggettext.h */; }; + B3E2061120E568C4009EA554 /* gbase64.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F72720E568AA009EA554 /* gbase64.h */; }; + B3E2061220E568C4009EA554 /* gasyncqueue.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F72820E568AA009EA554 /* gasyncqueue.h */; }; + B3E2061320E568C4009EA554 /* gmem.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F72920E568AA009EA554 /* gmem.h */; }; + B3E2061420E568C4009EA554 /* genviron.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F72A20E568AA009EA554 /* genviron.h */; }; + B3E2061520E568C4009EA554 /* gshell.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F72B20E568AA009EA554 /* gshell.h */; }; + B3E2061620E568C4009EA554 /* gbacktrace.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F72C20E568AA009EA554 /* gbacktrace.h */; }; + B3E2061720E568C4009EA554 /* gerror.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F72D20E568AA009EA554 /* gerror.h */; }; + B3E2061820E568C4009EA554 /* gmain.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F72E20E568AA009EA554 /* gmain.h */; }; + B3E2061920E568C4009EA554 /* gfileutils.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F72F20E568AA009EA554 /* gfileutils.h */; }; + B3E2061A20E568C4009EA554 /* gutils.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F73020E568AA009EA554 /* gutils.h */; }; + B3E2061B20E568C4009EA554 /* gpattern.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F73120E568AA009EA554 /* gpattern.h */; }; + B3E2061C20E568C4009EA554 /* ghostutils.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F73220E568AA009EA554 /* ghostutils.h */; }; + B3E2061D20E568C4009EA554 /* gtypes.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F73320E568AA009EA554 /* gtypes.h */; }; + B3E2061E20E568C4009EA554 /* gstringchunk.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F73420E568AA009EA554 /* gstringchunk.h */; }; + B3E2061F20E568C4009EA554 /* guuid.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F73520E568AA009EA554 /* guuid.h */; }; + B3E2062020E568C4009EA554 /* gcharset.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F73620E568AA009EA554 /* gcharset.h */; }; + B3E2062120E568C4009EA554 /* gquark.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F73720E568AA009EA554 /* gquark.h */; }; + B3E2062220E568C4009EA554 /* gi18n-lib.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F73820E568AA009EA554 /* gi18n-lib.h */; }; + B3E2062320E568C4009EA554 /* gatomic.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F73920E568AA009EA554 /* gatomic.h */; }; + B3E2062420E568C4009EA554 /* gdatetime.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F73A20E568AA009EA554 /* gdatetime.h */; }; + B3E2062520E568C4009EA554 /* gstring.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F73B20E568AA009EA554 /* gstring.h */; }; + B3E2062620E568C4009EA554 /* goption.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F73C20E568AA009EA554 /* goption.h */; }; + B3E2062720E568C4009EA554 /* gdate.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F73D20E568AA009EA554 /* gdate.h */; }; + B3E2062820E568C4009EA554 /* gversion.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F73E20E568AA009EA554 /* gversion.h */; }; + B3E2062920E568C4009EA554 /* gslice.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F73F20E568AA009EA554 /* gslice.h */; }; + B3E2062A20E568C4009EA554 /* ghook.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F74020E568AA009EA554 /* ghook.h */; }; + B3E2062B20E568C4009EA554 /* glib-autocleanups.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F74120E568AA009EA554 /* glib-autocleanups.h */; }; + B3E2062C20E568C4009EA554 /* galloca.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F74220E568AA009EA554 /* galloca.h */; }; + B3E2062D20E568C4009EA554 /* gprintf.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F74320E568AA009EA554 /* gprintf.h */; }; + B3E2062E20E568C4009EA554 /* gthread.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F74420E568AA009EA554 /* gthread.h */; }; + B3E2062F20E568C4009EA554 /* gversionmacros.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F74520E568AA009EA554 /* gversionmacros.h */; }; + B3E2063020E568C4009EA554 /* gtimezone.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F74620E568AA009EA554 /* gtimezone.h */; }; + B3E2063120E568C4009EA554 /* gmacros.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F74720E568AA009EA554 /* gmacros.h */; }; + B3E2063220E568C4009EA554 /* giochannel.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F74820E568AA009EA554 /* giochannel.h */; }; + B3E2063320E568C4009EA554 /* gwin32.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F74920E568AA009EA554 /* gwin32.h */; }; + B3E2063420E568C4009EA554 /* gi18n.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F74A20E568AA009EA554 /* gi18n.h */; }; + B3E2063520E568C4009EA554 /* gbitlock.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F74B20E568AA009EA554 /* gbitlock.h */; }; + B3E2063620E568C4009EA554 /* gnode.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F74C20E568AA009EA554 /* gnode.h */; }; + B3E2063720E568C4009EA554 /* gmessages.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F74D20E568AA009EA554 /* gmessages.h */; }; + B3E2063820E568C4009EA554 /* gregex.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F74E20E568AA009EA554 /* gregex.h */; }; + B3E2063920E568C4009EA554 /* gspawn.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F74F20E568AA009EA554 /* gspawn.h */; }; + B3E2063A20E568C4009EA554 /* gtree.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F75020E568AA009EA554 /* gtree.h */; }; + B3E2063B20E568C4009EA554 /* gcompletion.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F75220E568AA009EA554 /* gcompletion.h */; }; + B3E2063C20E568C4009EA554 /* gallocator.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F75320E568AA009EA554 /* gallocator.h */; }; + B3E2063D20E568C4009EA554 /* grel.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F75420E568AA009EA554 /* grel.h */; }; + B3E2063E20E568C4009EA554 /* gmain.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F75520E568AA009EA554 /* gmain.h */; }; + B3E2063F20E568C4009EA554 /* gcache.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F75620E568AA009EA554 /* gcache.h */; }; + B3E2064020E568C4009EA554 /* gthread.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F75720E568AA009EA554 /* gthread.h */; }; + B3E2064120E568C4009EA554 /* gmodule.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F75820E568AA009EA554 /* gmodule.h */; }; + B3E2064220E568C4009EA554 /* gdbusobject.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F75A20E568AA009EA554 /* gdbusobject.h */; }; + B3E2064320E568C4009EA554 /* gsimpleproxyresolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F75B20E568AA009EA554 /* gsimpleproxyresolver.h */; }; + B3E2064420E568C4009EA554 /* gconverterinputstream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F75C20E568AA009EA554 /* gconverterinputstream.h */; }; + B3E2064520E568C4009EA554 /* gsubprocesslauncher.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F75D20E568AA009EA554 /* gsubprocesslauncher.h */; }; + B3E2064620E568C4009EA554 /* gsimpleactiongroup.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F75E20E568AA009EA554 /* gsimpleactiongroup.h */; }; + B3E2064720E568C4009EA554 /* gdbusaddress.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F75F20E568AA009EA554 /* gdbusaddress.h */; }; + B3E2064820E568C4009EA554 /* gtlsinteraction.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F76020E568AA009EA554 /* gtlsinteraction.h */; }; + B3E2064920E568C4009EA554 /* gthreadedsocketservice.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F76120E568AA009EA554 /* gthreadedsocketservice.h */; }; + B3E2064A20E568C4009EA554 /* gsocketservice.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F76220E568AA009EA554 /* gsocketservice.h */; }; + B3E2064B20E568C4009EA554 /* gnetworkaddress.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F76320E568AA009EA554 /* gnetworkaddress.h */; }; + B3E2064C20E568C4009EA554 /* gasyncresult.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F76420E568AA009EA554 /* gasyncresult.h */; }; + B3E2064D20E568C4009EA554 /* gproxy.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F76520E568AA009EA554 /* gproxy.h */; }; + B3E2064E20E568C4009EA554 /* gio.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F76620E568AA009EA554 /* gio.h */; }; + B3E2064F20E568C4009EA554 /* gmemoryoutputstream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F76720E568AA009EA554 /* gmemoryoutputstream.h */; }; + B3E2065020E568C4009EA554 /* gvolumemonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F76820E568AA009EA554 /* gvolumemonitor.h */; }; + B3E2065120E568C4009EA554 /* gdatagrambased.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F76920E568AA009EA554 /* gdatagrambased.h */; }; + B3E2065220E568C4009EA554 /* gcontenttype.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F76A20E568AA009EA554 /* gcontenttype.h */; }; + B3E2065320E568C4009EA554 /* gsocketcontrolmessage.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F76B20E568AA009EA554 /* gsocketcontrolmessage.h */; }; + B3E2065420E568C4009EA554 /* gdbusnameowning.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F76C20E568AA009EA554 /* gdbusnameowning.h */; }; + B3E2065520E568C4009EA554 /* gfilemonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F76D20E568AA009EA554 /* gfilemonitor.h */; }; + B3E2065620E568C4009EA554 /* gpollableoutputstream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F76E20E568AA009EA554 /* gpollableoutputstream.h */; }; + B3E2065720E568C4009EA554 /* gseekable.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F76F20E568AA009EA554 /* gseekable.h */; }; + B3E2065820E568C4009EA554 /* gdbusobjectproxy.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F77020E568AA009EA554 /* gdbusobjectproxy.h */; }; + B3E2065920E568C4009EA554 /* gpropertyaction.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F77120E568AA009EA554 /* gpropertyaction.h */; }; + B3E2065A20E568C4009EA554 /* gsimpleiostream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F77220E568AA009EA554 /* gsimpleiostream.h */; }; + B3E2065B20E568C4009EA554 /* gasyncinitable.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F77320E568AA009EA554 /* gasyncinitable.h */; }; + B3E2065C20E568C4009EA554 /* gremoteactiongroup.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F77420E568AA009EA554 /* gremoteactiongroup.h */; }; + B3E2065D20E568C4009EA554 /* gdbusmessage.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F77520E568AA009EA554 /* gdbusmessage.h */; }; + B3E2065E20E568C4009EA554 /* gmenu.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F77620E568AA009EA554 /* gmenu.h */; }; + B3E2065F20E568C4009EA554 /* gdbusinterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F77720E568AA009EA554 /* gdbusinterface.h */; }; + B3E2066020E568C4009EA554 /* gaction.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F77820E568AA009EA554 /* gaction.h */; }; + B3E2066120E568C4009EA554 /* gio-autocleanups.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F77920E568AA009EA554 /* gio-autocleanups.h */; }; + B3E2066220E568C4009EA554 /* gproxyaddress.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F77A20E568AA009EA554 /* gproxyaddress.h */; }; + B3E2066320E568C4009EA554 /* gdbusproxy.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F77B20E568AA009EA554 /* gdbusproxy.h */; }; + B3E2066420E568C4009EA554 /* giomodule.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F77C20E568AA009EA554 /* giomodule.h */; }; + B3E2066520E568C4009EA554 /* gdbusmethodinvocation.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F77D20E568AA009EA554 /* gdbusmethodinvocation.h */; }; + B3E2066620E568C4009EA554 /* gactionmap.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F77E20E568AA009EA554 /* gactionmap.h */; }; + B3E2066720E568C4009EA554 /* gbufferedinputstream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F77F20E568AA009EA554 /* gbufferedinputstream.h */; }; + B3E2066820E568C4009EA554 /* gdbusnamewatching.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F78020E568AA009EA554 /* gdbusnamewatching.h */; }; + B3E2066920E568C4009EA554 /* gzlibcompressor.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F78120E568AA009EA554 /* gzlibcompressor.h */; }; + B3E2066A20E568C4009EA554 /* gloadableicon.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F78220E568AA009EA554 /* gloadableicon.h */; }; + B3E2066B20E568C4009EA554 /* gpermission.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F78320E568AA009EA554 /* gpermission.h */; }; + B3E2066C20E568C4009EA554 /* gioenums.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F78420E568AA009EA554 /* gioenums.h */; }; + B3E2066D20E568C5009EA554 /* gsocketaddressenumerator.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F78520E568AA009EA554 /* gsocketaddressenumerator.h */; }; + B3E2066E20E568C5009EA554 /* gmount.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F78620E568AA009EA554 /* gmount.h */; }; + B3E2066F20E568C5009EA554 /* gdbusserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F78720E568AA009EA554 /* gdbusserver.h */; }; + B3E2067020E568C5009EA554 /* gresource.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F78820E568AA009EA554 /* gresource.h */; }; + B3E2067120E568C5009EA554 /* gdbusconnection.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F78920E568AA009EA554 /* gdbusconnection.h */; }; + B3E2067220E568C5009EA554 /* gtlsconnection.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F78A20E568AA009EA554 /* gtlsconnection.h */; }; + B3E2067320E568C5009EA554 /* gsettingsbackend.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F78B20E568AA009EA554 /* gsettingsbackend.h */; }; + B3E2067420E568C5009EA554 /* gdbusintrospection.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F78C20E568AA009EA554 /* gdbusintrospection.h */; }; + B3E2067520E568C5009EA554 /* gfileicon.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F78D20E568AA009EA554 /* gfileicon.h */; }; + B3E2067620E568C5009EA554 /* gsocketaddress.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F78E20E568AA009EA554 /* gsocketaddress.h */; }; + B3E2067720E568C5009EA554 /* gnetworkservice.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F78F20E568AA009EA554 /* gnetworkservice.h */; }; + B3E2067820E568C5009EA554 /* gdbusmenumodel.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F79020E568AA009EA554 /* gdbusmenumodel.h */; }; + B3E2067920E568C5009EA554 /* gmenumodel.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F79120E568AA009EA554 /* gmenumodel.h */; }; + B3E2067A20E568C5009EA554 /* gdtlsconnection.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F79220E568AA009EA554 /* gdtlsconnection.h */; }; + B3E2067B20E568C5009EA554 /* gresolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F79320E568AA009EA554 /* gresolver.h */; }; + B3E2067C20E568C5009EA554 /* gproxyaddressenumerator.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F79420E568AA009EA554 /* gproxyaddressenumerator.h */; }; + B3E2067D20E568C5009EA554 /* ginputstream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F79520E568AA009EA554 /* ginputstream.h */; }; + B3E2067E20E568C5009EA554 /* gproxyresolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F79620E568AA009EA554 /* gproxyresolver.h */; }; + B3E2067F20E568C5009EA554 /* gemblem.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F79720E568AA009EA554 /* gemblem.h */; }; + B3E2068020E568C5009EA554 /* gcredentials.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F79820E568AA009EA554 /* gcredentials.h */; }; + B3E2068120E568C5009EA554 /* gbytesicon.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F79920E568AA009EA554 /* gbytesicon.h */; }; + B3E2068220E568C5009EA554 /* gdbusobjectmanagerclient.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F79A20E568AA009EA554 /* gdbusobjectmanagerclient.h */; }; + B3E2068320E568C5009EA554 /* gdbusobjectmanagerserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F79B20E568AA009EA554 /* gdbusobjectmanagerserver.h */; }; + B3E2068420E568C5009EA554 /* gtask.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F79C20E568AA009EA554 /* gtask.h */; }; + B3E2068520E568C5009EA554 /* gvolume.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F79D20E568AA009EA554 /* gvolume.h */; }; + B3E2068620E568C5009EA554 /* gsocketclient.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F79E20E568AA009EA554 /* gsocketclient.h */; }; + B3E2068720E568C5009EA554 /* gappinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F79F20E568AA009EA554 /* gappinfo.h */; }; + B3E2068820E568C5009EA554 /* gtcpconnection.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7A020E568AA009EA554 /* gtcpconnection.h */; }; + B3E2068920E568C5009EA554 /* gpollableutils.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7A120E568AA009EA554 /* gpollableutils.h */; }; + B3E2068A20E568C5009EA554 /* gdataoutputstream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7A220E568AA009EA554 /* gdataoutputstream.h */; }; + B3E2068B20E568C5009EA554 /* gfilenamecompleter.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7A320E568AA009EA554 /* gfilenamecompleter.h */; }; + B3E2068C20E568C5009EA554 /* gfilteroutputstream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7A420E568AA009EA554 /* gfilteroutputstream.h */; }; + B3E2068D20E568C5009EA554 /* gfileattribute.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7A520E568AA009EA554 /* gfileattribute.h */; }; + B3E2068E20E568C5009EA554 /* gmenuexporter.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7A620E568AA009EA554 /* gmenuexporter.h */; }; + B3E2068F20E568C5009EA554 /* gthemedicon.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7A720E568AA009EA554 /* gthemedicon.h */; }; + B3E2069020E568C5009EA554 /* gapplication.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7A820E568AA009EA554 /* gapplication.h */; }; + B3E2069120E568C5009EA554 /* gtlsserverconnection.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7A920E568AA009EA554 /* gtlsserverconnection.h */; }; + B3E2069220E568C5009EA554 /* gfileoutputstream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7AA20E568AA009EA554 /* gfileoutputstream.h */; }; + B3E2069320E568C5009EA554 /* gdbusobjectmanager.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7AB20E568AA009EA554 /* gdbusobjectmanager.h */; }; + B3E2069420E568C5009EA554 /* gactiongroupexporter.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7AC20E568AA009EA554 /* gactiongroupexporter.h */; }; + B3E2069520E568C5009EA554 /* gdtlsclientconnection.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7AD20E568AA009EA554 /* gdtlsclientconnection.h */; }; + B3E2069620E568C5009EA554 /* gmemoryinputstream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7AE20E568AA009EA554 /* gmemoryinputstream.h */; }; + B3E2069720E568C5009EA554 /* gioenumtypes.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7AF20E568AA009EA554 /* gioenumtypes.h */; }; + B3E2069820E568C5009EA554 /* gbufferedoutputstream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7B020E568AB009EA554 /* gbufferedoutputstream.h */; }; + B3E2069920E568C5009EA554 /* gliststore.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7B120E568AB009EA554 /* gliststore.h */; }; + B3E2069A20E568C5009EA554 /* gsocket.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7B220E568AB009EA554 /* gsocket.h */; }; + B3E2069B20E568C5009EA554 /* gmountoperation.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7B320E568AB009EA554 /* gmountoperation.h */; }; + B3E2069C20E568C5009EA554 /* gsocketconnectable.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7B420E568AB009EA554 /* gsocketconnectable.h */; }; + B3E2069D20E568C5009EA554 /* ginetaddress.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7B520E568AB009EA554 /* ginetaddress.h */; }; + B3E2069E20E568C5009EA554 /* gtcpwrapperconnection.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7B620E568AB009EA554 /* gtcpwrapperconnection.h */; }; + B3E2069F20E568C5009EA554 /* gfileiostream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7B720E568AB009EA554 /* gfileiostream.h */; }; + B3E206A020E568C5009EA554 /* gdbusauthobserver.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7B820E568AB009EA554 /* gdbusauthobserver.h */; }; + B3E206A120E568C5009EA554 /* gnotification.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7B920E568AB009EA554 /* gnotification.h */; }; + B3E206A220E568C5009EA554 /* goutputstream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7BA20E568AB009EA554 /* goutputstream.h */; }; + B3E206A320E568C5009EA554 /* ginetsocketaddress.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7BB20E568AB009EA554 /* ginetsocketaddress.h */; }; + B3E206A420E568C5009EA554 /* gcharsetconverter.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7BC20E568AB009EA554 /* gcharsetconverter.h */; }; + B3E206A520E568C5009EA554 /* gdatainputstream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7BD20E568AB009EA554 /* gdatainputstream.h */; }; + B3E206A620E568C5009EA554 /* gtlsdatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7BE20E568AB009EA554 /* gtlsdatabase.h */; }; + B3E206A720E568C5009EA554 /* gfileenumerator.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7BF20E568AB009EA554 /* gfileenumerator.h */; }; + B3E206A820E568C5009EA554 /* ginitable.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7C020E568AB009EA554 /* ginitable.h */; }; + B3E206A920E568C5009EA554 /* gnativevolumemonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7C120E568AB009EA554 /* gnativevolumemonitor.h */; }; + B3E206AA20E568C5009EA554 /* gsrvtarget.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7C220E568AB009EA554 /* gsrvtarget.h */; }; + B3E206AB20E568C5009EA554 /* gtlscertificate.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7C320E568AB009EA554 /* gtlscertificate.h */; }; + B3E206AC20E568C5009EA554 /* gfile.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7C420E568AB009EA554 /* gfile.h */; }; + B3E206AD20E568C5009EA554 /* gtlsbackend.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7C520E568AB009EA554 /* gtlsbackend.h */; }; + B3E206AE20E568C5009EA554 /* gpollableinputstream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7C620E568AB009EA554 /* gpollableinputstream.h */; }; + B3E206AF20E568C5009EA554 /* gfilterinputstream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7C720E568AB009EA554 /* gfilterinputstream.h */; }; + B3E206B020E568C5009EA554 /* gzlibdecompressor.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7C820E568AB009EA554 /* gzlibdecompressor.h */; }; + B3E206B120E568C5009EA554 /* gdbusutils.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7C920E568AB009EA554 /* gdbusutils.h */; }; + B3E206B220E568C5009EA554 /* gtestdbus.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7CA20E568AB009EA554 /* gtestdbus.h */; }; + B3E206B320E568C5009EA554 /* gdbusobjectskeleton.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7CB20E568AB009EA554 /* gdbusobjectskeleton.h */; }; + B3E206B420E568C5009EA554 /* gvfs.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7CC20E568AB009EA554 /* gvfs.h */; }; + B3E206B520E568C5009EA554 /* gioerror.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7CD20E568AB009EA554 /* gioerror.h */; }; + B3E206B620E568C5009EA554 /* gtlsclientconnection.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7CE20E568AB009EA554 /* gtlsclientconnection.h */; }; + B3E206B720E568C5009EA554 /* gnetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7CF20E568AB009EA554 /* gnetworking.h */; }; + B3E206B820E568C5009EA554 /* gtlsfiledatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7D020E568AB009EA554 /* gtlsfiledatabase.h */; }; + B3E206B920E568C5009EA554 /* gdbuserror.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7D120E568AB009EA554 /* gdbuserror.h */; }; + B3E206BA20E568C5009EA554 /* gicon.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7D220E568AB009EA554 /* gicon.h */; }; + B3E206BB20E568C5009EA554 /* gdbusinterfaceskeleton.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7D320E568AB009EA554 /* gdbusinterfaceskeleton.h */; }; + B3E206BC20E568C5009EA554 /* gapplicationcommandline.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7D420E568AB009EA554 /* gapplicationcommandline.h */; }; + B3E206BD20E568C5009EA554 /* gconverter.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7D520E568AB009EA554 /* gconverter.h */; }; + B3E206BE20E568C5009EA554 /* gdtlsserverconnection.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7D620E568AB009EA554 /* gdtlsserverconnection.h */; }; + B3E206BF20E568C5009EA554 /* gnetworkmonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7D720E568AB009EA554 /* gnetworkmonitor.h */; }; + B3E206C020E568C5009EA554 /* gtlspassword.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7D820E568AB009EA554 /* gtlspassword.h */; }; + B3E206C120E568C5009EA554 /* glistmodel.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7D920E568AB009EA554 /* glistmodel.h */; }; + B3E206C220E568C5009EA554 /* gioscheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7DA20E568AB009EA554 /* gioscheduler.h */; }; + B3E206C320E568C5009EA554 /* gsettings.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7DB20E568AB009EA554 /* gsettings.h */; }; + B3E206C420E568C5009EA554 /* gfileinputstream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7DC20E568AB009EA554 /* gfileinputstream.h */; }; + B3E206C520E568C5009EA554 /* giotypes.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7DD20E568AB009EA554 /* giotypes.h */; }; + B3E206C620E568C5009EA554 /* gsimplepermission.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7DE20E568AB009EA554 /* gsimplepermission.h */; }; + B3E206C720E568C5009EA554 /* gconverteroutputstream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7DF20E568AB009EA554 /* gconverteroutputstream.h */; }; + B3E206C820E568C5009EA554 /* gsimpleaction.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7E020E568AB009EA554 /* gsimpleaction.h */; }; + B3E206C920E568C5009EA554 /* gsocketlistener.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7E120E568AB009EA554 /* gsocketlistener.h */; }; + B3E206CA20E568C5009EA554 /* gcancellable.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7E220E568AB009EA554 /* gcancellable.h */; }; + B3E206CB20E568C5009EA554 /* gsubprocess.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7E320E568AB009EA554 /* gsubprocess.h */; }; + B3E206CC20E568C5009EA554 /* gemblemedicon.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7E420E568AB009EA554 /* gemblemedicon.h */; }; + B3E206CD20E568C5009EA554 /* gsettingsschema.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7E520E568AB009EA554 /* gsettingsschema.h */; }; + B3E206CE20E568C5009EA554 /* gfileinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7E620E568AB009EA554 /* gfileinfo.h */; }; + B3E206CF20E568C5009EA554 /* gsimpleasyncresult.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7E720E568AB009EA554 /* gsimpleasyncresult.h */; }; + B3E206D020E568C5009EA554 /* gdbusactiongroup.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7E820E568AB009EA554 /* gdbusactiongroup.h */; }; + B3E206D120E568C5009EA554 /* gdrive.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7E920E568AB009EA554 /* gdrive.h */; }; + B3E206D220E568C5009EA554 /* gactiongroup.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7EA20E568AB009EA554 /* gactiongroup.h */; }; + B3E206D320E568C5009EA554 /* ginetaddressmask.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7EB20E568AB009EA554 /* ginetaddressmask.h */; }; + B3E206D420E568C5009EA554 /* gsocketconnection.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7EC20E568AB009EA554 /* gsocketconnection.h */; }; + B3E206D520E568C5009EA554 /* giostream.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F7ED20E568AB009EA554 /* giostream.h */; }; + B3E206D920E568C5009EA554 /* libgmodule-2.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F7F220E568AB009EA554 /* libgmodule-2.0.dylib */; }; + B3E206DB20E568C5009EA554 /* libgthread-2.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F7F420E568AB009EA554 /* libgthread-2.0.dylib */; }; + B3E206E520E568C5009EA554 /* libgobject-2.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F7FF20E568AB009EA554 /* libgobject-2.0.dylib */; }; + B3E206E620E568C5009EA554 /* libglib-2.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F80020E568AB009EA554 /* libglib-2.0.0.dylib */; }; + B3E206E720E568C5009EA554 /* libgio-2.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F80120E568AB009EA554 /* libgio-2.0.dylib */; }; + B3E206E820E568C5009EA554 /* libglib-2.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F80220E568AB009EA554 /* libglib-2.0.dylib */; }; + B3E206E920E568C5009EA554 /* libgobject-2.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F80320E568AB009EA554 /* libgobject-2.0.0.dylib */; }; + B3E206EB20E568C5009EA554 /* libgmodule-2.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F80520E568AB009EA554 /* libgmodule-2.0.0.dylib */; }; + B3E206EE20E568C5009EA554 /* libgthread-2.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F80820E568AB009EA554 /* libgthread-2.0.0.dylib */; }; + B3E206EF20E568C5009EA554 /* glibconfig.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F80B20E568AB009EA554 /* glibconfig.h */; }; + B3E206F020E568C5009EA554 /* libgio-2.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F80C20E568AB009EA554 /* libgio-2.0.0.dylib */; }; + B3E2077120E568C5009EA554 /* cairo-version.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F96D20E568AD009EA554 /* cairo-version.h */; }; + B3E2077220E568C5009EA554 /* cairo-script-interpreter.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F96E20E568AD009EA554 /* cairo-script-interpreter.h */; }; + B3E2077320E568C5009EA554 /* cairo-svg.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F96F20E568AD009EA554 /* cairo-svg.h */; }; + B3E2077420E568C5009EA554 /* cairo-quartz-image.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F97020E568AD009EA554 /* cairo-quartz-image.h */; }; + B3E2077520E568C5009EA554 /* cairo.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F97120E568AD009EA554 /* cairo.h */; }; + B3E2077620E568C5009EA554 /* cairo-script.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F97220E568AD009EA554 /* cairo-script.h */; }; + B3E2077720E568C5009EA554 /* cairo-quartz.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F97320E568AD009EA554 /* cairo-quartz.h */; }; + B3E2077820E568C5009EA554 /* cairo-deprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F97420E568AD009EA554 /* cairo-deprecated.h */; }; + B3E2077920E568C5009EA554 /* cairo-pdf.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F97520E568AD009EA554 /* cairo-pdf.h */; }; + B3E2077A20E568C5009EA554 /* cairo-features.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F97620E568AD009EA554 /* cairo-features.h */; }; + B3E2077B20E568C5009EA554 /* cairo-gobject.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F97720E568AD009EA554 /* cairo-gobject.h */; }; + B3E2077C20E568C5009EA554 /* cairo-tee.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F97820E568AE009EA554 /* cairo-tee.h */; }; + B3E2077D20E568C5009EA554 /* cairo-ft.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F97920E568AE009EA554 /* cairo-ft.h */; }; + B3E2077E20E568C5009EA554 /* cairo-ps.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F97A20E568AE009EA554 /* cairo-ps.h */; }; + B3E2079020E568C6009EA554 /* libcairo.2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F98E20E568AE009EA554 /* libcairo.2.dylib */; }; + B3E2079120E568C6009EA554 /* libcairo-gobject.2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F98F20E568AE009EA554 /* libcairo-gobject.2.dylib */; }; + B3E2079220E568C6009EA554 /* libcairo.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F99020E568AE009EA554 /* libcairo.dylib */; }; + B3E2079A20E568C6009EA554 /* libcairo-trace.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F99920E568AE009EA554 /* libcairo-trace.0.dylib */; }; + B3E2079C20E568C6009EA554 /* libcairo-trace.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F99B20E568AE009EA554 /* libcairo-trace.dylib */; }; + B3E2079D20E568C6009EA554 /* libcairo-script-interpreter.2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F99C20E568AE009EA554 /* libcairo-script-interpreter.2.dylib */; }; + B3E2079E20E568C6009EA554 /* libcairo-gobject.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2F99D20E568AE009EA554 /* libcairo-gobject.dylib */; }; + B3E207EE20E568C6009EA554 /* fontconfig.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F9F720E568AE009EA554 /* fontconfig.h */; }; + B3E207EF20E568C6009EA554 /* fcprivate.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F9F820E568AE009EA554 /* fcprivate.h */; }; + B3E207F020E568C6009EA554 /* fcfreetype.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2F9F920E568AE009EA554 /* fcfreetype.h */; }; + B3E207F520E568C6009EA554 /* libfontconfig.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2FA0020E568AE009EA554 /* libfontconfig.dylib */; }; + B3E207F620E568C6009EA554 /* libfontconfig.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2FA0120E568AE009EA554 /* libfontconfig.1.dylib */; }; + B3E209FA20E568C8009EA554 /* autosprintf.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2FC1C20E568B2009EA554 /* autosprintf.h */; }; + B3E209FB20E568C8009EA554 /* gettext-po.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2FC1D20E568B2009EA554 /* gettext-po.h */; }; + B3E209FC20E568C8009EA554 /* libintl.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2FC1E20E568B2009EA554 /* libintl.h */; }; + B3E20A0020E568C8009EA554 /* libgettextlib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2FC2320E568B2009EA554 /* libgettextlib.dylib */; }; + B3E20A0120E568C8009EA554 /* libgettextpo.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2FC2420E568B2009EA554 /* libgettextpo.0.dylib */; }; + B3E20A0320E568C8009EA554 /* libintl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2FC2620E568B2009EA554 /* libintl.dylib */; }; + B3E20A0420E568C8009EA554 /* libintl.8.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2FC2720E568B2009EA554 /* libintl.8.dylib */; }; + B3E20A0C20E568C8009EA554 /* libgettextsrc-0.19.8.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2FC3020E568B2009EA554 /* libgettextsrc-0.19.8.1.dylib */; }; + B3E20A0E20E568C8009EA554 /* libgettextsrc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2FC3220E568B2009EA554 /* libgettextsrc.dylib */; }; + B3E20A1120E568C8009EA554 /* libgettextpo.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2FC3520E568B2009EA554 /* libgettextpo.dylib */; }; + B3E20B1020E568C9009EA554 /* gettext.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2FD9C20E568B4009EA554 /* gettext.h */; }; + B3E2117420E568D0009EA554 /* librsvg-features.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2046A20E568C0009EA554 /* librsvg-features.h */; }; + B3E2117520E568D0009EA554 /* rsvg-cairo.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2046B20E568C0009EA554 /* rsvg-cairo.h */; }; + B3E2117620E568D0009EA554 /* librsvg-enum-types.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2046C20E568C0009EA554 /* librsvg-enum-types.h */; }; + B3E2117720E568D0009EA554 /* rsvg.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E2046D20E568C0009EA554 /* rsvg.h */; }; + B3E2117C20E568D0009EA554 /* librsvg-2.2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2047420E568C0009EA554 /* librsvg-2.2.dylib */; }; + B3E2118120E568D0009EA554 /* librsvg-2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2047D20E568C0009EA554 /* librsvg-2.dylib */; }; + B3E211A720E572B2009EA554 /* libcairo.2.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F98E20E568AE009EA554 /* libcairo.2.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211A920E57A99009EA554 /* librsvg-2.2.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2047420E568C0009EA554 /* librsvg-2.2.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211AA20E57AC3009EA554 /* libcairo-script-interpreter.2.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F99C20E568AE009EA554 /* libcairo-script-interpreter.2.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211AB20E57B5E009EA554 /* libpixman-1.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F4CA20E568A5009EA554 /* libpixman-1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211AC20E57B5E009EA554 /* libpixman-1.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F4CC20E568A5009EA554 /* libpixman-1.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211AD20E57B5E009EA554 /* libfreetype.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F50C20E568A6009EA554 /* libfreetype.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211AE20E57B5E009EA554 /* libfreetype.6.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F51020E568A6009EA554 /* libfreetype.6.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211AF20E57B5E009EA554 /* libgdk_pixbuf-2.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F53620E568A6009EA554 /* libgdk_pixbuf-2.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211B020E57B5E009EA554 /* libgdk_pixbuf-2.0.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F53920E568A6009EA554 /* libgdk_pixbuf-2.0.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211B120E57B5E009EA554 /* libgmodule-2.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F7F220E568AB009EA554 /* libgmodule-2.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211B220E57B5E009EA554 /* libgthread-2.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F7F420E568AB009EA554 /* libgthread-2.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211B320E57B5E009EA554 /* libgobject-2.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F7FF20E568AB009EA554 /* libgobject-2.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211B420E57B5E009EA554 /* libglib-2.0.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F80020E568AB009EA554 /* libglib-2.0.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211B520E57B5E009EA554 /* libgio-2.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F80120E568AB009EA554 /* libgio-2.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211B620E57B5E009EA554 /* libglib-2.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F80220E568AB009EA554 /* libglib-2.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211B720E57B5E009EA554 /* libgobject-2.0.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F80320E568AB009EA554 /* libgobject-2.0.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211B820E57B5E009EA554 /* libgmodule-2.0.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F80520E568AB009EA554 /* libgmodule-2.0.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211B920E57B5E009EA554 /* libgthread-2.0.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F80820E568AB009EA554 /* libgthread-2.0.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211BA20E57B5E009EA554 /* libgio-2.0.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F80C20E568AB009EA554 /* libgio-2.0.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211BB20E57B5E009EA554 /* libcairo-gobject.2.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F98F20E568AE009EA554 /* libcairo-gobject.2.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211BC20E57B5E009EA554 /* libcairo-trace.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2F99920E568AE009EA554 /* libcairo-trace.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211BD20E57B5E009EA554 /* libfontconfig.1.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2FA0120E568AE009EA554 /* libfontconfig.1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211BE20E57B5E009EA554 /* libgettextlib.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2FC2320E568B2009EA554 /* libgettextlib.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211BF20E57B5E009EA554 /* libgettextpo.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2FC2420E568B2009EA554 /* libgettextpo.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211C020E57B5E009EA554 /* libasprintf.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2FC2520E568B2009EA554 /* libasprintf.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211C120E57B5E009EA554 /* libintl.8.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2FC2720E568B2009EA554 /* libintl.8.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211C220E57B5E009EA554 /* libgettextsrc.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2FC3220E568B2009EA554 /* libgettextsrc.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211C320E57B5E009EA554 /* libgettextpo.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2FC3520E568B2009EA554 /* libgettextpo.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211C420E57BA0009EA554 /* libgettextlib-0.19.8.1.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2FC3420E568B2009EA554 /* libgettextlib-0.19.8.1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E211C520E57BCC009EA554 /* libgettextsrc-0.19.8.1.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3E2FC3020E568B2009EA554 /* libgettextsrc-0.19.8.1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3E9A9011FB4DCCA00FD8E7A /* autorevision.json in Resources */ = {isa = PBXBuildFile; fileRef = B3E9A9001FB4DCCA00FD8E7A /* autorevision.json */; }; + B3E9A9031FB4DDE400FD8E7A /* Version.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3E9A9021FB4DDE400FD8E7A /* Version.swift */; }; + B3F0ECF01F9E6A4D0078690E /* SpeculidImageSpecificationBuilderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3F0ECEF1F9E6A4D0078690E /* SpeculidImageSpecificationBuilderProtocol.swift */; }; + B3F0ECF21F9E6AAD0078690E /* SpeculidImageSpecificationBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3F0ECF11F9E6AAD0078690E /* SpeculidImageSpecificationBuilder.swift */; }; + B3F804D420E5820B00030497 /* pango.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8046220E5820B00030497 /* pango.h */; }; + B3F804D520E5820B00030497 /* pangoft2.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8046320E5820B00030497 /* pangoft2.h */; }; + B3F804D620E5820B00030497 /* pango-item.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8046420E5820B00030497 /* pango-item.h */; }; + B3F804D720E5820B00030497 /* pango-coverage.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8046520E5820B00030497 /* pango-coverage.h */; }; + B3F804D820E5820B00030497 /* pango-version-macros.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8046620E5820B00030497 /* pango-version-macros.h */; }; + B3F804D920E5820B00030497 /* pango-language.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8046720E5820B00030497 /* pango-language.h */; }; + B3F804DA20E5820B00030497 /* pango-matrix.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8046820E5820B00030497 /* pango-matrix.h */; }; + B3F804DB20E5820B00030497 /* pango-renderer.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8046920E5820B00030497 /* pango-renderer.h */; }; + B3F804DC20E5820B00030497 /* pango-ot.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8046A20E5820B00030497 /* pango-ot.h */; }; + B3F804DD20E5820B00030497 /* pango-enum-types.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8046B20E5820B00030497 /* pango-enum-types.h */; }; + B3F804DE20E5820B00030497 /* pango-glyph.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8046C20E5820B00030497 /* pango-glyph.h */; }; + B3F804DF20E5820B00030497 /* pango-features.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8046D20E5820B00030497 /* pango-features.h */; }; + B3F804E020E5820B00030497 /* pango-modules.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8046E20E5820B00030497 /* pango-modules.h */; }; + B3F804E120E5820B00030497 /* pango-fontset.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8046F20E5820B00030497 /* pango-fontset.h */; }; + B3F804E220E5820B00030497 /* pango-engine.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8047020E5820B00030497 /* pango-engine.h */; }; + B3F804E320E5820B00030497 /* pango-break.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8047120E5820B00030497 /* pango-break.h */; }; + B3F804E420E5820B00030497 /* pango-script.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8047220E5820B00030497 /* pango-script.h */; }; + B3F804E520E5820B00030497 /* pangocairo.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8047320E5820B00030497 /* pangocairo.h */; }; + B3F804E620E5820B00030497 /* pango-glyph-item.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8047420E5820B00030497 /* pango-glyph-item.h */; }; + B3F804E720E5820B00030497 /* pango-bidi-type.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8047520E5820B00030497 /* pango-bidi-type.h */; }; + B3F804E820E5820B00030497 /* pango-font.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8047620E5820B00030497 /* pango-font.h */; }; + B3F804E920E5820B00030497 /* pangofc-fontmap.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8047720E5820B00030497 /* pangofc-fontmap.h */; }; + B3F804EA20E5820B00030497 /* pango-context.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8047820E5820B00030497 /* pango-context.h */; }; + B3F804EB20E5820B00030497 /* pangofc-font.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8047920E5820B00030497 /* pangofc-font.h */; }; + B3F804EC20E5820B00030497 /* pango-fontmap.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8047A20E5820B00030497 /* pango-fontmap.h */; }; + B3F804ED20E5820B00030497 /* pangofc-decoder.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8047B20E5820B00030497 /* pangofc-decoder.h */; }; + B3F804EE20E5820B00030497 /* pango-types.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8047C20E5820B00030497 /* pango-types.h */; }; + B3F804EF20E5820B00030497 /* pango-attributes.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8047D20E5820B00030497 /* pango-attributes.h */; }; + B3F804F020E5820B00030497 /* pango-utils.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8047E20E5820B00030497 /* pango-utils.h */; }; + B3F804F120E5820B00030497 /* pango-layout.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8047F20E5820B00030497 /* pango-layout.h */; }; + B3F804F220E5820B00030497 /* pango-tabs.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8048020E5820B00030497 /* pango-tabs.h */; }; + B3F804F320E5820B00030497 /* pango-gravity.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8048120E5820B00030497 /* pango-gravity.h */; }; + B3F804F420E5820B00030497 /* pangocoretext.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8048220E5820B00030497 /* pangocoretext.h */; }; + B3F804F820E5820B00030497 /* libpango-1.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8048720E5820B00030497 /* libpango-1.0.0.dylib */; }; + B3F804F920E5820B00030497 /* libpangoft2-1.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8048820E5820B00030497 /* libpangoft2-1.0.0.dylib */; }; + B3F804FD20E5820B00030497 /* libpangocairo-1.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8048D20E5820B00030497 /* libpangocairo-1.0.dylib */; }; + B3F804FE20E5820B00030497 /* libpangocairo-1.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8048E20E5820B00030497 /* libpangocairo-1.0.0.dylib */; }; + B3F8050120E5820B00030497 /* libpangoft2-1.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8049120E5820B00030497 /* libpangoft2-1.0.dylib */; }; + B3F8050220E5820B00030497 /* libpango-1.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8049220E5820B00030497 /* libpango-1.0.dylib */; }; + B3F8050620E5820B00030497 /* libpango-1.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8049720E5820B00030497 /* libpango-1.0.a */; }; + B3F8053820E5823600030497 /* libpango-1.0.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8048720E5820B00030497 /* libpango-1.0.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F8053920E5823600030497 /* libpangoft2-1.0.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8048820E5820B00030497 /* libpangoft2-1.0.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F8053A20E5823600030497 /* libpangocairo-1.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8048D20E5820B00030497 /* libpangocairo-1.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F8053B20E5823600030497 /* libpangocairo-1.0.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8048E20E5820B00030497 /* libpangocairo-1.0.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F8053C20E5823600030497 /* libpangoft2-1.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8049120E5820B00030497 /* libpangoft2-1.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F8053D20E5823600030497 /* libpango-1.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8049220E5820B00030497 /* libpango-1.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F8056C20E584B300030497 /* png.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8054C20E584B300030497 /* png.h */; }; + B3F8056D20E584B300030497 /* pnglibconf.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8054D20E584B300030497 /* pnglibconf.h */; }; + B3F8056E20E584B300030497 /* pngconf.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8054E20E584B300030497 /* pngconf.h */; }; + B3F8056F20E584B300030497 /* png.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8054F20E584B300030497 /* png.h */; }; + B3F8057020E584B300030497 /* pnglibconf.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8055020E584B300030497 /* pnglibconf.h */; }; + B3F8057120E584B300030497 /* pngconf.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8055120E584B300030497 /* pngconf.h */; }; + B3F8057820E584B300030497 /* libpng16.16.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8055A20E584B300030497 /* libpng16.16.dylib */; }; + B3F8057920E584B300030497 /* libpng.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8055B20E584B300030497 /* libpng.dylib */; }; + B3F8057A20E584B300030497 /* libpng16.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8055C20E584B300030497 /* libpng16.dylib */; }; + B3F8057E20E584E700030497 /* libpng16.16.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8055A20E584B300030497 /* libpng16.16.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F8066120E5851A00030497 /* pcrecpparg.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8058C20E5851900030497 /* pcrecpparg.h */; }; + B3F8066220E5851A00030497 /* pcreposix.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8058D20E5851900030497 /* pcreposix.h */; }; + B3F8066320E5851A00030497 /* pcre_scanner.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8058E20E5851900030497 /* pcre_scanner.h */; }; + B3F8066420E5851A00030497 /* pcre_stringpiece.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8058F20E5851900030497 /* pcre_stringpiece.h */; }; + B3F8066520E5851A00030497 /* pcre.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8059020E5851900030497 /* pcre.h */; }; + B3F8066620E5851A00030497 /* pcrecpp.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8059120E5851900030497 /* pcrecpp.h */; }; + B3F8066A20E5851A00030497 /* libpcre.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8059620E5851900030497 /* libpcre.1.dylib */; }; + B3F8067020E5851A00030497 /* libpcreposix.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8059D20E5851900030497 /* libpcreposix.0.dylib */; }; + B3F8067120E5851A00030497 /* libpcre.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8059E20E5851900030497 /* libpcre.dylib */; }; + B3F8067320E5851A00030497 /* libpcrecpp.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F805A020E5851900030497 /* libpcrecpp.0.dylib */; }; + B3F8067420E5851A00030497 /* libpcreposix.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F805A120E5851900030497 /* libpcreposix.dylib */; }; + B3F8067620E5851A00030497 /* libpcre16.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F805A320E5851900030497 /* libpcre16.0.dylib */; }; + B3F8067720E5851A00030497 /* libpcre32.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F805A420E5851900030497 /* libpcre32.dylib */; }; + B3F8067820E5851A00030497 /* libpcre16.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F805A520E5851900030497 /* libpcre16.dylib */; }; + B3F8067A20E5851A00030497 /* libpcrecpp.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F805A720E5851900030497 /* libpcrecpp.dylib */; }; + B3F8067B20E5851A00030497 /* libpcre32.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F805A820E5851900030497 /* libpcre32.0.dylib */; }; + B3F8072620E5853700030497 /* libpcre.1.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8059620E5851900030497 /* libpcre.1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F8072720E5853700030497 /* libpcreposix.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8059D20E5851900030497 /* libpcreposix.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F8072820E5853700030497 /* libpcre.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8059E20E5851900030497 /* libpcre.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F8072920E5853700030497 /* libpcrecpp.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F805A020E5851900030497 /* libpcrecpp.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F8072A20E5853700030497 /* libpcreposix.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F805A120E5851900030497 /* libpcreposix.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F8072B20E5853700030497 /* libpcre16.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F805A320E5851900030497 /* libpcre16.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F8072C20E5853700030497 /* libpcre32.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F805A420E5851900030497 /* libpcre32.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F8072D20E5853700030497 /* libpcre16.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F805A520E5851900030497 /* libpcre16.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F8072E20E5853700030497 /* libpcrecpp.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F805A720E5851900030497 /* libpcrecpp.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F8072F20E5853700030497 /* libpcre32.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F805A820E5851900030497 /* libpcre32.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F8075120E5855F00030497 /* ffitarget.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8073D20E5855F00030497 /* ffitarget.h */; }; + B3F8075220E5855F00030497 /* ffi.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8073E20E5855F00030497 /* ffi.h */; }; + B3F8075320E5855F00030497 /* libffi.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8073F20E5855F00030497 /* libffi.dylib */; }; + B3F8075520E5855F00030497 /* libffi.6.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8074120E5855F00030497 /* libffi.6.dylib */; }; + B3F807BE20E5858200030497 /* cr-parser.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8076820E5858100030497 /* cr-parser.h */; }; + B3F807BF20E5858200030497 /* cr-token.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8076920E5858100030497 /* cr-token.h */; }; + B3F807C020E5858200030497 /* cr-attr-sel.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8076A20E5858100030497 /* cr-attr-sel.h */; }; + B3F807C120E5858200030497 /* cr-tknzr.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8076B20E5858100030497 /* cr-tknzr.h */; }; + B3F807C220E5858200030497 /* cr-parsing-location.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8076C20E5858100030497 /* cr-parsing-location.h */; }; + B3F807C320E5858200030497 /* cr-doc-handler.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8076D20E5858100030497 /* cr-doc-handler.h */; }; + B3F807C420E5858200030497 /* cr-stylesheet.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8076E20E5858100030497 /* cr-stylesheet.h */; }; + B3F807C520E5858200030497 /* cr-enc-handler.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8076F20E5858100030497 /* cr-enc-handler.h */; }; + B3F807C620E5858200030497 /* cr-term.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8077020E5858100030497 /* cr-term.h */; }; + B3F807C720E5858200030497 /* cr-prop-list.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8077120E5858100030497 /* cr-prop-list.h */; }; + B3F807C820E5858200030497 /* cr-simple-sel.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8077220E5858100030497 /* cr-simple-sel.h */; }; + B3F807C920E5858200030497 /* cr-declaration.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8077320E5858100030497 /* cr-declaration.h */; }; + B3F807CA20E5858200030497 /* cr-rgb.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8077420E5858100030497 /* cr-rgb.h */; }; + B3F807CB20E5858200030497 /* cr-string.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8077520E5858100030497 /* cr-string.h */; }; + B3F807CC20E5858200030497 /* cr-pseudo.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8077620E5858100030497 /* cr-pseudo.h */; }; + B3F807CD20E5858200030497 /* cr-sel-eng.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8077720E5858100030497 /* cr-sel-eng.h */; }; + B3F807CE20E5858200030497 /* cr-style.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8077820E5858100030497 /* cr-style.h */; }; + B3F807CF20E5858200030497 /* cr-om-parser.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8077920E5858100030497 /* cr-om-parser.h */; }; + B3F807D020E5858200030497 /* cr-statement.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8077A20E5858100030497 /* cr-statement.h */; }; + B3F807D120E5858200030497 /* cr-fonts.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8077B20E5858100030497 /* cr-fonts.h */; }; + B3F807D220E5858200030497 /* libcroco.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8077C20E5858100030497 /* libcroco.h */; }; + B3F807D320E5858200030497 /* cr-input.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8077D20E5858100030497 /* cr-input.h */; }; + B3F807D420E5858200030497 /* cr-num.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8077E20E5858100030497 /* cr-num.h */; }; + B3F807D520E5858200030497 /* cr-selector.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8077F20E5858100030497 /* cr-selector.h */; }; + B3F807D620E5858200030497 /* cr-cascade.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8078020E5858100030497 /* cr-cascade.h */; }; + B3F807D720E5858200030497 /* cr-additional-sel.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8078120E5858100030497 /* cr-additional-sel.h */; }; + B3F807D820E5858200030497 /* cr-utils.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8078220E5858100030497 /* cr-utils.h */; }; + B3F807D920E5858200030497 /* libcroco-config.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8078320E5858100030497 /* libcroco-config.h */; }; + B3F807DE20E5858200030497 /* libcroco-0.6.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8078920E5858100030497 /* libcroco-0.6.dylib */; }; + B3F807E020E5858200030497 /* libcroco-0.6.3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8078C20E5858100030497 /* libcroco-0.6.3.dylib */; }; + B3F807E120E5858200030497 /* libcroco-0.6.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8078D20E5858100030497 /* libcroco-0.6.a */; }; + B3F808A620E585C000030497 /* fribidi-begindecls.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8081320E585BF00030497 /* fribidi-begindecls.h */; }; + B3F808A720E585C000030497 /* fribidi-config.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8081420E585BF00030497 /* fribidi-config.h */; }; + B3F808A820E585C000030497 /* fribidi-joining-types.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8081520E585BF00030497 /* fribidi-joining-types.h */; }; + B3F808A920E585C000030497 /* fribidi-char-sets.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8081620E585BF00030497 /* fribidi-char-sets.h */; }; + B3F808AA20E585C000030497 /* fribidi-char-sets-list.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8081720E585BF00030497 /* fribidi-char-sets-list.h */; }; + B3F808AB20E585C000030497 /* fribidi-unicode-version.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8081820E585BF00030497 /* fribidi-unicode-version.h */; }; + B3F808AC20E585C000030497 /* fribidi-common.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8081920E585BF00030497 /* fribidi-common.h */; }; + B3F808AD20E585C000030497 /* fribidi-unicode.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8081A20E585BF00030497 /* fribidi-unicode.h */; }; + B3F808AE20E585C000030497 /* fribidi-types.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8081B20E585BF00030497 /* fribidi-types.h */; }; + B3F808AF20E585C000030497 /* fribidi-bidi-types.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8081C20E585BF00030497 /* fribidi-bidi-types.h */; }; + B3F808B020E585C000030497 /* fribidi-deprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8081D20E585BF00030497 /* fribidi-deprecated.h */; }; + B3F808B120E585C000030497 /* fribidi-mirroring.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8081E20E585BF00030497 /* fribidi-mirroring.h */; }; + B3F808B220E585C000030497 /* fribidi-joining.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8081F20E585BF00030497 /* fribidi-joining.h */; }; + B3F808B320E585C000030497 /* fribidi-enddecls.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8082020E585BF00030497 /* fribidi-enddecls.h */; }; + B3F808B420E585C000030497 /* fribidi-flags.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8082120E585BF00030497 /* fribidi-flags.h */; }; + B3F808B520E585C000030497 /* fribidi.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8082220E585BF00030497 /* fribidi.h */; }; + B3F808B620E585C000030497 /* fribidi-bidi.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8082320E585BF00030497 /* fribidi-bidi.h */; }; + B3F808B720E585C000030497 /* fribidi-brackets.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8082420E585BF00030497 /* fribidi-brackets.h */; }; + B3F808B820E585C000030497 /* fribidi-bidi-types-list.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8082520E585BF00030497 /* fribidi-bidi-types-list.h */; }; + B3F808B920E585C000030497 /* fribidi-arabic.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8082620E585BF00030497 /* fribidi-arabic.h */; }; + B3F808BA20E585C000030497 /* fribidi-shape.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8082720E585BF00030497 /* fribidi-shape.h */; }; + B3F808BB20E585C000030497 /* fribidi-joining-types-list.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8082820E585BF00030497 /* fribidi-joining-types-list.h */; }; + B3F808C120E585C000030497 /* libfribidi.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8083020E585BF00030497 /* libfribidi.dylib */; }; + B3F808C320E585C000030497 /* libfribidi.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8083220E585BF00030497 /* libfribidi.0.dylib */; }; + B3F80B0320E585E900030497 /* hb-buffer.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8093320E585E800030497 /* hb-buffer.h */; }; + B3F80B0420E585E900030497 /* hb-set.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8093420E585E800030497 /* hb-set.h */; }; + B3F80B0520E585E900030497 /* hb-face.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8093520E585E800030497 /* hb-face.h */; }; + B3F80B0620E585E900030497 /* hb-gobject-structs.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8093620E585E800030497 /* hb-gobject-structs.h */; }; + B3F80B0720E585E900030497 /* hb-common.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8093720E585E800030497 /* hb-common.h */; }; + B3F80B0820E585E900030497 /* hb-version.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8093820E585E800030497 /* hb-version.h */; }; + B3F80B0920E585E900030497 /* hb-font.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8093920E585E800030497 /* hb-font.h */; }; + B3F80B0A20E585E900030497 /* hb-coretext.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8093A20E585E800030497 /* hb-coretext.h */; }; + B3F80B0B20E585E900030497 /* hb-ot-tag.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8093B20E585E800030497 /* hb-ot-tag.h */; }; + B3F80B0C20E585E900030497 /* hb-deprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8093C20E585E800030497 /* hb-deprecated.h */; }; + B3F80B0D20E585E900030497 /* hb-ot.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8093D20E585E800030497 /* hb-ot.h */; }; + B3F80B0E20E585E900030497 /* hb-ot-layout.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8093E20E585E800030497 /* hb-ot-layout.h */; }; + B3F80B0F20E585E900030497 /* hb-ot-var.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8093F20E585E800030497 /* hb-ot-var.h */; }; + B3F80B1020E585E900030497 /* hb-gobject-enums.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8094020E585E800030497 /* hb-gobject-enums.h */; }; + B3F80B1120E585E900030497 /* hb-shape.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8094120E585E800030497 /* hb-shape.h */; }; + B3F80B1220E585E900030497 /* hb-subset-plan.hh in Headers */ = {isa = PBXBuildFile; fileRef = B3F8094220E585E800030497 /* hb-subset-plan.hh */; }; + B3F80B1320E585E900030497 /* hb-shape-plan.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8094320E585E800030497 /* hb-shape-plan.h */; }; + B3F80B1420E585E900030497 /* hb-ot-font.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8094420E585E800030497 /* hb-ot-font.h */; }; + B3F80B1520E585E900030497 /* hb-unicode.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8094520E585E800030497 /* hb-unicode.h */; }; + B3F80B1620E585E900030497 /* hb-ot-shape.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8094620E585E800030497 /* hb-ot-shape.h */; }; + B3F80B1720E585E900030497 /* hb-blob.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8094720E585E800030497 /* hb-blob.h */; }; + B3F80B1820E585E900030497 /* hb-subset-private.hh in Headers */ = {isa = PBXBuildFile; fileRef = B3F8094820E585E800030497 /* hb-subset-private.hh */; }; + B3F80B1920E585E900030497 /* hb.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8094920E585E800030497 /* hb.h */; }; + B3F80B1A20E585E900030497 /* hb-glib.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8094A20E585E800030497 /* hb-glib.h */; }; + B3F80B1B20E585E900030497 /* hb-subset-glyf.hh in Headers */ = {isa = PBXBuildFile; fileRef = B3F8094B20E585E800030497 /* hb-subset-glyf.hh */; }; + B3F80B1C20E585E900030497 /* hb-graphite2.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8094C20E585E800030497 /* hb-graphite2.h */; }; + B3F80B1D20E585E900030497 /* hb-subset.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8094D20E585E800030497 /* hb-subset.h */; }; + B3F80B1E20E585E900030497 /* hb-gobject.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8094E20E585E800030497 /* hb-gobject.h */; }; + B3F80B1F20E585E900030497 /* hb-ot-math.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8094F20E585E800030497 /* hb-ot-math.h */; }; + B3F80B2020E585EA00030497 /* hb-icu.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8095020E585E800030497 /* hb-icu.h */; }; + B3F80B2120E585EA00030497 /* hb-ft.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8095120E585E800030497 /* hb-ft.h */; }; + B3F80B2720E585EA00030497 /* libharfbuzz-icu.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8095820E585E800030497 /* libharfbuzz-icu.dylib */; }; + B3F80B2820E585EA00030497 /* libharfbuzz-subset.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8095920E585E800030497 /* libharfbuzz-subset.0.dylib */; }; + B3F80B2D20E585EA00030497 /* libharfbuzz-gobject.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8095F20E585E800030497 /* libharfbuzz-gobject.0.dylib */; }; + B3F80B3020E585EA00030497 /* libharfbuzz.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8096420E585E800030497 /* libharfbuzz.0.dylib */; }; + B3F80B3320E585EA00030497 /* libharfbuzz-gobject.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8096720E585E800030497 /* libharfbuzz-gobject.dylib */; }; + B3F80B3520E585EA00030497 /* libharfbuzz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8096A20E585E800030497 /* libharfbuzz.dylib */; }; + B3F80B3620E585EA00030497 /* libharfbuzz-icu.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8096B20E585E800030497 /* libharfbuzz-icu.0.dylib */; }; + B3F80B3720E585EA00030497 /* libharfbuzz-subset.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3F8096C20E585E800030497 /* libharfbuzz-subset.dylib */; }; + B3F80CA720E5866A00030497 /* libpng16.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8055C20E584B300030497 /* libpng16.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F80CA820E586A000030497 /* libharfbuzz-icu.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8095820E585E800030497 /* libharfbuzz-icu.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F80CA920E586A000030497 /* libharfbuzz-subset.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8095920E585E800030497 /* libharfbuzz-subset.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F80CAA20E586A000030497 /* libharfbuzz-gobject.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8095F20E585E800030497 /* libharfbuzz-gobject.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F80CAB20E586A000030497 /* libharfbuzz.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8096420E585E800030497 /* libharfbuzz.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F80CAC20E586A000030497 /* libharfbuzz-gobject.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8096720E585E800030497 /* libharfbuzz-gobject.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F80CAD20E586A000030497 /* libharfbuzz.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8096A20E585E800030497 /* libharfbuzz.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F80CAE20E586A000030497 /* libharfbuzz-icu.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8096B20E585E800030497 /* libharfbuzz-icu.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3F80CAF20E586A000030497 /* libharfbuzz-subset.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3F8096C20E585E800030497 /* libharfbuzz-subset.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + B3FAD3EB1FA564D0004381A7 /* VersionMenuItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3FAD3EA1FA564D0004381A7 /* VersionMenuItem.swift */; }; + CBE9EF18228D2DADFC9D264F /* Pods_Speculid.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DCB0AF202D3672415910AFDE /* Pods_Speculid.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + B3136E651F90FCCF0002B7AB /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B37C74361F8C58F300DF505B /* Project object */; + proxyType = 1; + remoteGlobalIDString = B37C743D1F8C58F300DF505B; + remoteInfo = "Speculid-Mac-App"; + }; + B3136E841F90FD2E0002B7AB /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B37C74361F8C58F300DF505B /* Project object */; + proxyType = 1; + remoteGlobalIDString = B37C74721F8C5ADA00DF505B; + remoteInfo = Speculid; + }; + B3136E931F90FD3D0002B7AB /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B37C74361F8C58F300DF505B /* Project object */; + proxyType = 1; + remoteGlobalIDString = B37C74881F8C5B5C00DF505B; + remoteInfo = CairoSVG; + }; + B37C745C1F8C590D00DF505B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B37C74361F8C58F300DF505B /* Project object */; + proxyType = 1; + remoteGlobalIDString = B37C74521F8C590D00DF505B; + remoteInfo = "Speculid-Mac-XPC"; + }; + B37C74781F8C5ADA00DF505B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B37C74361F8C58F300DF505B /* Project object */; + proxyType = 1; + remoteGlobalIDString = B37C74721F8C5ADA00DF505B; + remoteInfo = "Speculid-Mac-Framework"; + }; + B37C748E1F8C5B5C00DF505B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B37C74361F8C58F300DF505B /* Project object */; + proxyType = 1; + remoteGlobalIDString = B37C74881F8C5B5C00DF505B; + remoteInfo = "CairoSVG-Mac-Framework"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + B33A533F1F95568F00E74800 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 7; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B37C74621F8C590D00DF505B /* Embed XPC Services */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(CONTENTS_FOLDER_PATH)/XPCServices"; + dstSubfolderSpec = 16; + files = ( + B37C745E1F8C590D00DF505B /* Speculid-Mac-XPC.xpc in Embed XPC Services */, + ); + name = "Embed XPC Services"; + runOnlyForDeploymentPostprocessing = 0; + }; + B37C747F1F8C5ADA00DF505B /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + B37C74911F8C5B5C00DF505B /* CairoSVG.framework in Embed Frameworks */, + B37C747B1F8C5ADA00DF505B /* Speculid.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + B3E211A620E57290009EA554 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + B3825F0320F9183E008F2A02 /* libgraphite2.3.dylib in CopyFiles */, + B3825F0420F9183F008F2A02 /* libgraphite2.3.0.1.dylib in CopyFiles */, + B3F80CAB20E586A000030497 /* libharfbuzz.0.dylib in CopyFiles */, + B3891B8520F6406B00FEDF89 /* libfribidi.dylib in CopyFiles */, + B3825F0520F91841008F2A02 /* libgraphite2.dylib in CopyFiles */, + B3891B8620F6406B00FEDF89 /* libfribidi.0.dylib in CopyFiles */, + B3F8057E20E584E700030497 /* libpng16.16.dylib in CopyFiles */, + B3F80CA720E5866A00030497 /* libpng16.dylib in CopyFiles */, + B31BDAFC20E7E26200A560C2 /* libicutest.61.dylib in CopyFiles */, + B3F80CAA20E586A000030497 /* libharfbuzz-gobject.0.dylib in CopyFiles */, + B3891B8320F6402F00FEDF89 /* libcroco-0.6.dylib in CopyFiles */, + B3891B8420F6402F00FEDF89 /* libcroco-0.6.3.dylib in CopyFiles */, + B3F80CAC20E586A000030497 /* libharfbuzz-gobject.dylib in CopyFiles */, + B3F80CAD20E586A000030497 /* libharfbuzz.dylib in CopyFiles */, + B3F80CAE20E586A000030497 /* libharfbuzz-icu.0.dylib in CopyFiles */, + B3F80CAF20E586A000030497 /* libharfbuzz-subset.dylib in CopyFiles */, + B31BDAFD20E7E26200A560C2 /* libicuio.dylib in CopyFiles */, + B31BDAFE20E7E26200A560C2 /* libicutest.dylib in CopyFiles */, + B31BDAFF20E7E26200A560C2 /* libicuio.61.dylib in CopyFiles */, + B31BDB0020E7E26200A560C2 /* libicudata.dylib in CopyFiles */, + B31BDB0120E7E26200A560C2 /* libicuio.61.1.dylib in CopyFiles */, + B31BDB0220E7E26200A560C2 /* libicutu.61.dylib in CopyFiles */, + B31BDB0320E7E26200A560C2 /* libicui18n.61.1.dylib in CopyFiles */, + B31BDB0420E7E26200A560C2 /* libicutu.61.1.dylib in CopyFiles */, + B31BDB0520E7E26200A560C2 /* libicudata.61.dylib in CopyFiles */, + B31BDB0620E7E26200A560C2 /* libicuuc.dylib in CopyFiles */, + B31BDB0720E7E26200A560C2 /* libicutu.dylib in CopyFiles */, + B31BDB0820E7E26200A560C2 /* libicui18n.dylib in CopyFiles */, + B31BDB0920E7E26200A560C2 /* libicui18n.61.dylib in CopyFiles */, + B31BDB0A20E7E26200A560C2 /* libicuuc.61.dylib in CopyFiles */, + B31BDB0B20E7E26200A560C2 /* libicudata.61.1.dylib in CopyFiles */, + B31BDB0C20E7E26200A560C2 /* libicutest.61.1.dylib in CopyFiles */, + B31BDB0D20E7E26200A560C2 /* libicuuc.61.1.dylib in CopyFiles */, + B3F80CA820E586A000030497 /* libharfbuzz-icu.dylib in CopyFiles */, + B31BD6E920E7A6A400A560C2 /* libffi.dylib in CopyFiles */, + B31BD6EA20E7A6A400A560C2 /* libffi.6.dylib in CopyFiles */, + B3F80CA920E586A000030497 /* libharfbuzz-subset.0.dylib in CopyFiles */, + B3F8072620E5853700030497 /* libpcre.1.dylib in CopyFiles */, + B3F8072720E5853700030497 /* libpcreposix.0.dylib in CopyFiles */, + B3F8072820E5853700030497 /* libpcre.dylib in CopyFiles */, + B3F8072920E5853700030497 /* libpcrecpp.0.dylib in CopyFiles */, + B3F8072A20E5853700030497 /* libpcreposix.dylib in CopyFiles */, + B3F8072B20E5853700030497 /* libpcre16.0.dylib in CopyFiles */, + B3F8072C20E5853700030497 /* libpcre32.dylib in CopyFiles */, + B3F8072D20E5853700030497 /* libpcre16.dylib in CopyFiles */, + B3F8072E20E5853700030497 /* libpcrecpp.dylib in CopyFiles */, + B3F8072F20E5853700030497 /* libpcre32.0.dylib in CopyFiles */, + B3E211C520E57BCC009EA554 /* libgettextsrc-0.19.8.1.dylib in CopyFiles */, + B3F8053820E5823600030497 /* libpango-1.0.0.dylib in CopyFiles */, + B3F8053920E5823600030497 /* libpangoft2-1.0.0.dylib in CopyFiles */, + B3F8053A20E5823600030497 /* libpangocairo-1.0.dylib in CopyFiles */, + B3F8053B20E5823600030497 /* libpangocairo-1.0.0.dylib in CopyFiles */, + B3F8053C20E5823600030497 /* libpangoft2-1.0.dylib in CopyFiles */, + B3F8053D20E5823600030497 /* libpango-1.0.dylib in CopyFiles */, + B3E211AA20E57AC3009EA554 /* libcairo-script-interpreter.2.dylib in CopyFiles */, + B3E211C420E57BA0009EA554 /* libgettextlib-0.19.8.1.dylib in CopyFiles */, + B3E211A920E57A99009EA554 /* librsvg-2.2.dylib in CopyFiles */, + B3E211A720E572B2009EA554 /* libcairo.2.dylib in CopyFiles */, + B3E211AB20E57B5E009EA554 /* libpixman-1.dylib in CopyFiles */, + B3E211AC20E57B5E009EA554 /* libpixman-1.0.dylib in CopyFiles */, + B3E211AD20E57B5E009EA554 /* libfreetype.dylib in CopyFiles */, + B3E211AE20E57B5E009EA554 /* libfreetype.6.dylib in CopyFiles */, + B3E211AF20E57B5E009EA554 /* libgdk_pixbuf-2.0.dylib in CopyFiles */, + B3E211B020E57B5E009EA554 /* libgdk_pixbuf-2.0.0.dylib in CopyFiles */, + B3E211B120E57B5E009EA554 /* libgmodule-2.0.dylib in CopyFiles */, + B3E211B220E57B5E009EA554 /* libgthread-2.0.dylib in CopyFiles */, + B3E211B320E57B5E009EA554 /* libgobject-2.0.dylib in CopyFiles */, + B3E211B420E57B5E009EA554 /* libglib-2.0.0.dylib in CopyFiles */, + B3E211B520E57B5E009EA554 /* libgio-2.0.dylib in CopyFiles */, + B3E211B620E57B5E009EA554 /* libglib-2.0.dylib in CopyFiles */, + B3E211B720E57B5E009EA554 /* libgobject-2.0.0.dylib in CopyFiles */, + B3E211B820E57B5E009EA554 /* libgmodule-2.0.0.dylib in CopyFiles */, + B3E211B920E57B5E009EA554 /* libgthread-2.0.0.dylib in CopyFiles */, + B3E211BA20E57B5E009EA554 /* libgio-2.0.0.dylib in CopyFiles */, + B3E211BB20E57B5E009EA554 /* libcairo-gobject.2.dylib in CopyFiles */, + B3E211BC20E57B5E009EA554 /* libcairo-trace.0.dylib in CopyFiles */, + B3E211BD20E57B5E009EA554 /* libfontconfig.1.dylib in CopyFiles */, + B3E211BE20E57B5E009EA554 /* libgettextlib.dylib in CopyFiles */, + B3E211BF20E57B5E009EA554 /* libgettextpo.0.dylib in CopyFiles */, + B3E211C020E57B5E009EA554 /* libasprintf.dylib in CopyFiles */, + B3E211C120E57B5E009EA554 /* libintl.8.dylib in CopyFiles */, + B3E211C220E57B5E009EA554 /* libgettextsrc.dylib in CopyFiles */, + B3E211C320E57B5E009EA554 /* libgettextpo.dylib in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 054FC9E3CE2F6BD2F948CF5D /* Pods_Speculid_Mac_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Speculid_Mac_App.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A1D3098AA00507F322B5177 /* Pods-SpeculidTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SpeculidTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests.debug.xcconfig"; sourceTree = ""; }; + 33189C1A2DCDF9FDE0D52DB2 /* Pods-CairoSVGTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CairoSVGTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-CairoSVGTests/Pods-CairoSVGTests.release.xcconfig"; sourceTree = ""; }; + 4D7E00CC4EE1B4A785089460 /* Pods_SpeculidTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SpeculidTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 503182BFEED5FCC7A0FD7113 /* Pods-Speculid-Mac-AppUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Speculid-Mac-AppUITests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Speculid-Mac-AppUITests/Pods-Speculid-Mac-AppUITests.debug.xcconfig"; sourceTree = ""; }; + 5598DB627CD85D918F6EAC73 /* Pods-Speculid-Mac-AppUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Speculid-Mac-AppUITests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Speculid-Mac-AppUITests/Pods-Speculid-Mac-AppUITests.release.xcconfig"; sourceTree = ""; }; + 5EA075855931F18A5DA87B15 /* Pods_Speculid_Mac_XPC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Speculid_Mac_XPC.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 63BDAD4963D80A5FF54A9272 /* Pods_Speculid_Mac_AppUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Speculid_Mac_AppUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 72377B2194FCD69B6D9FED05 /* Pods-CairoSVG.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CairoSVG.release.xcconfig"; path = "Pods/Target Support Files/Pods-CairoSVG/Pods-CairoSVG.release.xcconfig"; sourceTree = ""; }; + 75FAFD8D34A5758295CE7C3E /* Pods-Speculid-Mac-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Speculid-Mac-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Speculid-Mac-App/Pods-Speculid-Mac-App.debug.xcconfig"; sourceTree = ""; }; + 7DD68C68194F71BF3C7B683C /* Pods-CairoSVG.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CairoSVG.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CairoSVG/Pods-CairoSVG.debug.xcconfig"; sourceTree = ""; }; + 87434B3EFCD8AF7732299E58 /* Pods-Speculid.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Speculid.release.xcconfig"; path = "Pods/Target Support Files/Pods-Speculid/Pods-Speculid.release.xcconfig"; sourceTree = ""; }; + 9F8599C40CCA72FBF9FA1098 /* Pods_CairoSVG.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CairoSVG.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B3033B191F9AEE9900787279 /* .travis.yml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .travis.yml; sourceTree = ""; }; + B3033B1A1F9AEE9A00787279 /* .gitignore */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .gitignore; sourceTree = ""; }; + B3033B1D1F9AEFC100787279 /* AssetSpecificationDocumentProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AssetSpecificationDocumentProtocol.swift; sourceTree = ""; }; + B3033B1F1F9AEFE600787279 /* AssetSpecificationDocument.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AssetSpecificationDocument.swift; sourceTree = ""; }; + B3033B211F9AF03F00787279 /* Contents.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = Contents.json; path = Assets.xcassets/AppIcon.appiconset/Contents.json; sourceTree = ""; }; + B3033B231F9AF05900787279 /* Contents.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = Contents.json; path = Assets.xcassets/TrayIcon.imageset/Contents.json; sourceTree = ""; }; + B3136DBB1F90E27B0002B7AB /* ImageFile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageFile.swift; sourceTree = ""; }; + B3136DBC1F90E27B0002B7AB /* Speculid_Mac_Framework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Speculid_Mac_Framework.h; sourceTree = ""; }; + B3136DBE1F90E27B0002B7AB /* ImageSpecification.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageSpecification.swift; sourceTree = ""; }; + B3136DC01F90E27B0002B7AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B3136DC11F90E27B0002B7AB /* FileFormat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileFormat.swift; sourceTree = ""; }; + B3136DC31F90E2A10002B7AB /* layers.svg */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = layers.svg; sourceTree = ""; }; + B3136DC61F90E2A20002B7AB /* ServiceProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServiceProtocol.swift; sourceTree = ""; }; + B3136DC91F90E2A20002B7AB /* ErrorCollection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorCollection.swift; sourceTree = ""; }; + B3136DCC1F90E2A20002B7AB /* Service.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Service.swift; sourceTree = ""; }; + B3136DD81F90E96A0002B7AB /* cairo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cairo.h; sourceTree = ""; }; + B3136DDA1F90EA520002B7AB /* rsvg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = rsvg.h; sourceTree = ""; }; + B3136DDB1F90EF370002B7AB /* Application.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Application.swift; sourceTree = ""; }; + B3136DDD1F90EF460002B7AB /* Application.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Application.swift; sourceTree = ""; }; + B3136DE81F90F73A0002B7AB /* CairoConversionSet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CairoConversionSet.swift; sourceTree = ""; }; + B3136DEA1F90F73A0002B7AB /* AnalyticsTracker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsTracker.swift; sourceTree = ""; }; + B3136DEC1F90F73A0002B7AB /* ClientIdentifier.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClientIdentifier.swift; sourceTree = ""; }; + B3136DF01F90F73A0002B7AB /* ImageConversionSetBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageConversionSetBuilder.swift; sourceTree = ""; }; + B3136DF11F90F73A0002B7AB /* AnalyticsSessionManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsSessionManager.swift; sourceTree = ""; }; + B3136DF21F90F73A0002B7AB /* SpeculidBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeculidBuilder.swift; sourceTree = ""; }; + B3136DF31F90F73A0002B7AB /* ImageConversionBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageConversionBuilder.swift; sourceTree = ""; }; + B3136DF41F90F73A0002B7AB /* CairoConversionSetBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CairoConversionSetBuilder.swift; sourceTree = ""; }; + B3136DF61F90F73A0002B7AB /* NSColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSColor.swift; sourceTree = ""; }; + B3136DF71F90F73A0002B7AB /* String.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + B3136DF81F90F73A0002B7AB /* CGFloat.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CGFloat.swift; sourceTree = ""; }; + B3136DFA1F90F73A0002B7AB /* AnalyticsParameterDictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsParameterDictionary.swift; sourceTree = ""; }; + B3136DFB1F90F73A0002B7AB /* Geometry.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Geometry.swift; sourceTree = ""; }; + B3136DFC1F90F73A0002B7AB /* SpeculidSpecificationsFile.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeculidSpecificationsFile.swift; sourceTree = ""; }; + B3136E001F90F73A0002B7AB /* ScaledGeometry.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScaledGeometry.swift; sourceTree = ""; }; + B3136E011F90F73A0002B7AB /* SpeculidDocument.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeculidDocument.swift; sourceTree = ""; }; + B3136E021F90F73A0002B7AB /* AnalyticsParameterKey.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsParameterKey.swift; sourceTree = ""; }; + B3136E031F90F73A0002B7AB /* GeometryValue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeometryValue.swift; sourceTree = ""; }; + B3136E041F90F73A0002B7AB /* AssetSpecification.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AssetSpecification.swift; sourceTree = ""; }; + B3136E051F90F73A0002B7AB /* AnalyticsConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsConfiguration.swift; sourceTree = ""; }; + B3136E071F90F73A0002B7AB /* ImageIdiom.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageIdiom.swift; sourceTree = ""; }; + B3136E091F90F73B0002B7AB /* SpeculidSpecificationsFileProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeculidSpecificationsFileProtocol.swift; sourceTree = ""; }; + B3136E0B1F90F73B0002B7AB /* ImageConversionSetBuilderProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageConversionSetBuilderProtocol.swift; sourceTree = ""; }; + B3136E0C1F90F73B0002B7AB /* ImageConversionTaskProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageConversionTaskProtocol.swift; sourceTree = ""; }; + B3136E0D1F90F73B0002B7AB /* ClientIdentifierDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClientIdentifierDelegate.swift; sourceTree = ""; }; + B3136E0F1F90F73B0002B7AB /* ImageConversionSetProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageConversionSetProtocol.swift; sourceTree = ""; }; + B3136E101F90F73B0002B7AB /* SpeculidDocumentProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeculidDocumentProtocol.swift; sourceTree = ""; }; + B3136E111F90F73B0002B7AB /* SpeculidConfigurationProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeculidConfigurationProtocol.swift; sourceTree = ""; }; + B3136E121F90F73B0002B7AB /* AnalyticsEventProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsEventProtocol.swift; sourceTree = ""; }; + B3136E131F90F73B0002B7AB /* AnalyticsSessionManagerProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsSessionManagerProtocol.swift; sourceTree = ""; }; + B3136E141F90F73B0002B7AB /* AssetSpecificationProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AssetSpecificationProtocol.swift; sourceTree = ""; }; + B3136E151F90F73B0002B7AB /* GeometryProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeometryProtocol.swift; sourceTree = ""; }; + B3136E161F90F73B0002B7AB /* SpeculidArgumentsProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeculidArgumentsProtocol.swift; sourceTree = ""; }; + B3136E171F90F73B0002B7AB /* AnalyticsConfigurationProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsConfigurationProtocol.swift; sourceTree = ""; }; + B3136E181F90F73B0002B7AB /* AnalyticsTrackerProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsTrackerProtocol.swift; sourceTree = ""; }; + B3136E191F90F73B0002B7AB /* SpeculidBuilderProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeculidBuilderProtocol.swift; sourceTree = ""; }; + B3136E1A1F90F73B0002B7AB /* ApplicationProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ApplicationProtocol.swift; sourceTree = ""; }; + B3136E1B1F90F73B0002B7AB /* ImageConversionBuilderProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageConversionBuilderProtocol.swift; sourceTree = ""; }; + B3136E1C1F90F73B0002B7AB /* versions.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = versions.plist; sourceTree = ""; }; + B3136E1E1F90F73B0002B7AB /* MissingRequiredInstallationError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MissingRequiredInstallationError.swift; sourceTree = ""; }; + B3136E1F1F90F73B0002B7AB /* ProcessError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProcessError.swift; sourceTree = ""; }; + B3136E201F90F73B0002B7AB /* ArrayError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ArrayError.swift; sourceTree = ""; }; + B3136E211F90F73B0002B7AB /* UnknownConversionError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnknownConversionError.swift; sourceTree = ""; }; + B3136E601F90FCCF0002B7AB /* Speculid-Mac-AppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Speculid-Mac-AppUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + B3136E621F90FCCF0002B7AB /* SpeculidUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpeculidUITests.swift; sourceTree = ""; }; + B3136E641F90FCCF0002B7AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B3136E7E1F90FD2E0002B7AB /* SpeculidTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SpeculidTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + B3136E821F90FD2E0002B7AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B3136E8D1F90FD3D0002B7AB /* CairoSVGTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CairoSVGTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + B3136E8F1F90FD3D0002B7AB /* CairoSVGTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CairoSVGTests.swift; sourceTree = ""; }; + B3136E911F90FD3D0002B7AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B3136EA11F910BC90002B7AB /* svg-appicon.speculid */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "svg-appicon.speculid"; sourceTree = ""; }; + B3136EA21F910BC90002B7AB /* svg-trayicon.speculid */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "svg-trayicon.speculid"; sourceTree = ""; }; + B317B0D01FA560EE00BB5E57 /* QuitMenuItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuitMenuItem.swift; sourceTree = ""; }; + B31890691F918F0300D0EFA0 /* GeometryValue.Multiply.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeometryValue.Multiply.swift; sourceTree = ""; }; + B318906D1F91A06B00D0EFA0 /* .swiftlint.yml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .swiftlint.yml; sourceTree = ""; }; + B31BD6ED20E7E0D500A560C2 /* INSTALL_RECEIPT.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = INSTALL_RECEIPT.json; sourceTree = ""; }; + B31BD6F020E7E0D500A560C2 /* makeconv */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = makeconv; sourceTree = ""; }; + B31BD6F120E7E0D500A560C2 /* gencnval */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = gencnval; sourceTree = ""; }; + B31BD6F220E7E0D500A560C2 /* icu-config */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "icu-config"; sourceTree = ""; }; + B31BD6F320E7E0D500A560C2 /* gencfu */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = gencfu; sourceTree = ""; }; + B31BD6F420E7E0D500A560C2 /* icuinfo */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = icuinfo; sourceTree = ""; }; + B31BD6F520E7E0D500A560C2 /* gendict */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = gendict; sourceTree = ""; }; + B31BD6F620E7E0D500A560C2 /* genrb */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = genrb; sourceTree = ""; }; + B31BD6F720E7E0D500A560C2 /* pkgdata */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = pkgdata; sourceTree = ""; }; + B31BD6F820E7E0D500A560C2 /* genbrk */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = genbrk; sourceTree = ""; }; + B31BD6F920E7E0D500A560C2 /* derb */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = derb; sourceTree = ""; }; + B31BD6FA20E7E0D500A560C2 /* uconv */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = uconv; sourceTree = ""; }; + B31BD6FC20E7E0D500A560C2 /* icu4c.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = icu4c.rb; sourceTree = ""; }; + B31BD6FD20E7E0D500A560C2 /* license.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = license.html; sourceTree = ""; }; + B31BD70020E7E0D500A560C2 /* translit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = translit.h; sourceTree = ""; }; + B31BD70120E7E0D500A560C2 /* ustdio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ustdio.h; sourceTree = ""; }; + B31BD70220E7E0D500A560C2 /* utf_old.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utf_old.h; sourceTree = ""; }; + B31BD70320E7E0D500A560C2 /* ucsdet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucsdet.h; sourceTree = ""; }; + B31BD70420E7E0D500A560C2 /* tzfmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tzfmt.h; sourceTree = ""; }; + B31BD70520E7E0D500A560C2 /* ubrk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ubrk.h; sourceTree = ""; }; + B31BD70620E7E0D500A560C2 /* ufieldpositer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ufieldpositer.h; sourceTree = ""; }; + B31BD70720E7E0D500A560C2 /* stringpiece.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stringpiece.h; sourceTree = ""; }; + B31BD70820E7E0D500A560C2 /* ucat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucat.h; sourceTree = ""; }; + B31BD70920E7E0D500A560C2 /* tblcoll.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tblcoll.h; sourceTree = ""; }; + B31BD70A20E7E0D500A560C2 /* stringoptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stringoptions.h; sourceTree = ""; }; + B31BD70B20E7E0D500A560C2 /* dtfmtsym.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dtfmtsym.h; sourceTree = ""; }; + B31BD70C20E7E0D500A560C2 /* unirepl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unirepl.h; sourceTree = ""; }; + B31BD70D20E7E0D500A560C2 /* ptypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ptypes.h; sourceTree = ""; }; + B31BD70E20E7E0D500A560C2 /* fmtable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fmtable.h; sourceTree = ""; }; + B31BD70F20E7E0D500A560C2 /* dtitvfmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dtitvfmt.h; sourceTree = ""; }; + B31BD71020E7E0D500A560C2 /* choicfmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = choicfmt.h; sourceTree = ""; }; + B31BD71120E7E0D500A560C2 /* usetiter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = usetiter.h; sourceTree = ""; }; + B31BD71220E7E0D500A560C2 /* errorcode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = errorcode.h; sourceTree = ""; }; + B31BD71320E7E0D500A560C2 /* tznames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tznames.h; sourceTree = ""; }; + B31BD71420E7E0D500A560C2 /* dtintrv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dtintrv.h; sourceTree = ""; }; + B31BD71520E7E0D500A560C2 /* ucurr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucurr.h; sourceTree = ""; }; + B31BD71620E7E0D500A560C2 /* icuplug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = icuplug.h; sourceTree = ""; }; + B31BD71720E7E0D500A560C2 /* uregion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uregion.h; sourceTree = ""; }; + B31BD71820E7E0D500A560C2 /* utext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utext.h; sourceTree = ""; }; + B31BD71920E7E0D500A560C2 /* edits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = edits.h; sourceTree = ""; }; + B31BD71A20E7E0D500A560C2 /* parsepos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parsepos.h; sourceTree = ""; }; + B31BD71B20E7E0D500A560C2 /* ucal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucal.h; sourceTree = ""; }; + B31BD71C20E7E0D500A560C2 /* fpositer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fpositer.h; sourceTree = ""; }; + B31BD71D20E7E0D500A560C2 /* dtitvinf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dtitvinf.h; sourceTree = ""; }; + B31BD71E20E7E0D500A560C2 /* rbnf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rbnf.h; sourceTree = ""; }; + B31BD71F20E7E0D500A560C2 /* udat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = udat.h; sourceTree = ""; }; + B31BD72020E7E0D500A560C2 /* urep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = urep.h; sourceTree = ""; }; + B31BD72120E7E0D500A560C2 /* utf32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utf32.h; sourceTree = ""; }; + B31BD72220E7E0D500A560C2 /* vtzone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vtzone.h; sourceTree = ""; }; + B31BD72320E7E0D500A560C2 /* ustring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ustring.h; sourceTree = ""; }; + B31BD72420E7E0D500A560C2 /* ubiditransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ubiditransform.h; sourceTree = ""; }; + B31BD72520E7E0D500A560C2 /* uenum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uenum.h; sourceTree = ""; }; + B31BD72620E7E0D500A560C2 /* appendable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = appendable.h; sourceTree = ""; }; + B31BD72720E7E0D500A560C2 /* usearch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = usearch.h; sourceTree = ""; }; + B31BD72820E7E0D500A560C2 /* numsys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = numsys.h; sourceTree = ""; }; + B31BD72920E7E0D500A560C2 /* timezone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timezone.h; sourceTree = ""; }; + B31BD72A20E7E0D500A560C2 /* uset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uset.h; sourceTree = ""; }; + B31BD72B20E7E0D500A560C2 /* casemap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = casemap.h; sourceTree = ""; }; + B31BD72C20E7E0D500A560C2 /* coleitr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = coleitr.h; sourceTree = ""; }; + B31BD72D20E7E0D500A560C2 /* schriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = schriter.h; sourceTree = ""; }; + B31BD72E20E7E0D500A560C2 /* msgfmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = msgfmt.h; sourceTree = ""; }; + B31BD72F20E7E0D500A560C2 /* fieldpos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fieldpos.h; sourceTree = ""; }; + B31BD73020E7E0D500A560C2 /* simpletz.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = simpletz.h; sourceTree = ""; }; + B31BD73120E7E0D500A560C2 /* uldnames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uldnames.h; sourceTree = ""; }; + B31BD73220E7E0D500A560C2 /* uiter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uiter.h; sourceTree = ""; }; + B31BD73320E7E0D500A560C2 /* umsg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = umsg.h; sourceTree = ""; }; + B31BD73420E7E0D500A560C2 /* sortkey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sortkey.h; sourceTree = ""; }; + B31BD73520E7E0D500A560C2 /* docmain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = docmain.h; sourceTree = ""; }; + B31BD73620E7E0D500A560C2 /* uniset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uniset.h; sourceTree = ""; }; + B31BD73720E7E0D500A560C2 /* basictz.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = basictz.h; sourceTree = ""; }; + B31BD73820E7E0D500A560C2 /* udata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = udata.h; sourceTree = ""; }; + B31BD73920E7E0D500A560C2 /* stringtriebuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stringtriebuilder.h; sourceTree = ""; }; + B31BD73A20E7E0D500A560C2 /* chariter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chariter.h; sourceTree = ""; }; + B31BD73B20E7E0D500A560C2 /* umisc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = umisc.h; sourceTree = ""; }; + B31BD73C20E7E0D500A560C2 /* reldatefmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = reldatefmt.h; sourceTree = ""; }; + B31BD73D20E7E0D500A560C2 /* uloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uloc.h; sourceTree = ""; }; + B31BD73E20E7E0D500A560C2 /* plurrule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = plurrule.h; sourceTree = ""; }; + B31BD73F20E7E0D500A560C2 /* bytestriebuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bytestriebuilder.h; sourceTree = ""; }; + B31BD74020E7E0D500A560C2 /* measunit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = measunit.h; sourceTree = ""; }; + B31BD74120E7E0D500A560C2 /* utrace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utrace.h; sourceTree = ""; }; + B31BD74220E7E0D500A560C2 /* locdspnm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = locdspnm.h; sourceTree = ""; }; + B31BD74320E7E0D500A560C2 /* gregocal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gregocal.h; sourceTree = ""; }; + B31BD74420E7E0D500A560C2 /* uchriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uchriter.h; sourceTree = ""; }; + B31BD74520E7E0D500A560C2 /* enumset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = enumset.h; sourceTree = ""; }; + B31BD74620E7E0D500A560C2 /* nounit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nounit.h; sourceTree = ""; }; + B31BD74720E7E0D500A560C2 /* utf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utf.h; sourceTree = ""; }; + B31BD74820E7E0D500A560C2 /* measure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = measure.h; sourceTree = ""; }; + B31BD74920E7E0D500A560C2 /* tzrule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tzrule.h; sourceTree = ""; }; + B31BD74A20E7E0D500A560C2 /* strenum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strenum.h; sourceTree = ""; }; + B31BD74B20E7E0D500A560C2 /* regex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = regex.h; sourceTree = ""; }; + B31BD74C20E7E0D500A560C2 /* gender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gender.h; sourceTree = ""; }; + B31BD74D20E7E0D500A560C2 /* dcfmtsym.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dcfmtsym.h; sourceTree = ""; }; + B31BD74E20E7E0D500A560C2 /* ucnv_err.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucnv_err.h; sourceTree = ""; }; + B31BD74F20E7E0D500A560C2 /* decimfmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = decimfmt.h; sourceTree = ""; }; + B31BD75020E7E0D500A560C2 /* bytestrie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bytestrie.h; sourceTree = ""; }; + B31BD75120E7E0D500A560C2 /* udatpg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = udatpg.h; sourceTree = ""; }; + B31BD75220E7E0D500A560C2 /* listformatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = listformatter.h; sourceTree = ""; }; + B31BD75320E7E0D500A560C2 /* uobject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uobject.h; sourceTree = ""; }; + B31BD75420E7E0D500A560C2 /* calendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = calendar.h; sourceTree = ""; }; + B31BD75520E7E0D500A560C2 /* ures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ures.h; sourceTree = ""; }; + B31BD75620E7E0D500A560C2 /* normlzr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = normlzr.h; sourceTree = ""; }; + B31BD75720E7E0D500A560C2 /* usprep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = usprep.h; sourceTree = ""; }; + B31BD75820E7E0D500A560C2 /* urename.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = urename.h; sourceTree = ""; }; + B31BD75920E7E0D500A560C2 /* caniter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = caniter.h; sourceTree = ""; }; + B31BD75A20E7E0D500A560C2 /* ucol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucol.h; sourceTree = ""; }; + B31BD75B20E7E0D500A560C2 /* upluralrules.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = upluralrules.h; sourceTree = ""; }; + B31BD75C20E7E0D500A560C2 /* ucharstrie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucharstrie.h; sourceTree = ""; }; + B31BD75D20E7E0D500A560C2 /* tmunit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tmunit.h; sourceTree = ""; }; + B31BD75E20E7E0D500A560C2 /* unistr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unistr.h; sourceTree = ""; }; + B31BD75F20E7E0D500A560C2 /* rbbi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rbbi.h; sourceTree = ""; }; + B31BD76020E7E0D500A560C2 /* ulocdata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ulocdata.h; sourceTree = ""; }; + B31BD76120E7E0D500A560C2 /* idna.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = idna.h; sourceTree = ""; }; + B31BD76220E7E0D500A560C2 /* unorm2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unorm2.h; sourceTree = ""; }; + B31BD76320E7E0D500A560C2 /* dtptngen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dtptngen.h; sourceTree = ""; }; + B31BD76420E7E0D500A560C2 /* dbbi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dbbi.h; sourceTree = ""; }; + B31BD76520E7E0D500A560C2 /* bytestream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bytestream.h; sourceTree = ""; }; + B31BD76620E7E0D500A560C2 /* uversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uversion.h; sourceTree = ""; }; + B31BD76720E7E0D500A560C2 /* messagepattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = messagepattern.h; sourceTree = ""; }; + B31BD76820E7E0D500A560C2 /* uidna.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uidna.h; sourceTree = ""; }; + B31BD76920E7E0D500A560C2 /* filteredbrk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = filteredbrk.h; sourceTree = ""; }; + B31BD76A20E7E0D500A560C2 /* tmutamt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tmutamt.h; sourceTree = ""; }; + B31BD76B20E7E0D500A560C2 /* char16ptr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = char16ptr.h; sourceTree = ""; }; + B31BD76C20E7E0D500A560C2 /* symtable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = symtable.h; sourceTree = ""; }; + B31BD76D20E7E0D500A560C2 /* ucasemap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucasemap.h; sourceTree = ""; }; + B31BD76E20E7E0D500A560C2 /* ucoleitr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucoleitr.h; sourceTree = ""; }; + B31BD76F20E7E0D500A560C2 /* compactdecimalformat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = compactdecimalformat.h; sourceTree = ""; }; + B31BD77020E7E0D500A560C2 /* unum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unum.h; sourceTree = ""; }; + B31BD77120E7E0D500A560C2 /* udisplaycontext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = udisplaycontext.h; sourceTree = ""; }; + B31BD77220E7E0D500A560C2 /* tztrans.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tztrans.h; sourceTree = ""; }; + B31BD77320E7E0D500A560C2 /* umachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = umachine.h; sourceTree = ""; }; + B31BD77420E7E0D500A560C2 /* numberformatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = numberformatter.h; sourceTree = ""; }; + B31BD77520E7E0D500A560C2 /* datefmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = datefmt.h; sourceTree = ""; }; + B31BD77620E7E0D500A560C2 /* utmscale.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utmscale.h; sourceTree = ""; }; + B31BD77720E7E0D500A560C2 /* coll.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = coll.h; sourceTree = ""; }; + B31BD77820E7E0D500A560C2 /* currpinf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = currpinf.h; sourceTree = ""; }; + B31BD77920E7E0D500A560C2 /* uregex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uregex.h; sourceTree = ""; }; + B31BD77A20E7E0D500A560C2 /* tmutfmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tmutfmt.h; sourceTree = ""; }; + B31BD77B20E7E0D500A560C2 /* plurfmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = plurfmt.h; sourceTree = ""; }; + B31BD77C20E7E0D500A560C2 /* ustringtrie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ustringtrie.h; sourceTree = ""; }; + B31BD77D20E7E0D500A560C2 /* smpdtfmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = smpdtfmt.h; sourceTree = ""; }; + B31BD77E20E7E0D500A560C2 /* icudataver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = icudataver.h; sourceTree = ""; }; + B31BD77F20E7E0D500A560C2 /* uchar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uchar.h; sourceTree = ""; }; + B31BD78020E7E0D500A560C2 /* unorm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unorm.h; sourceTree = ""; }; + B31BD78120E7E0D500A560C2 /* ushape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ushape.h; sourceTree = ""; }; + B31BD78220E7E0D500A560C2 /* unifunct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unifunct.h; sourceTree = ""; }; + B31BD78320E7E0D500A560C2 /* ugender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ugender.h; sourceTree = ""; }; + B31BD78420E7E0D500A560C2 /* selfmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = selfmt.h; sourceTree = ""; }; + B31BD78520E7E0D500A560C2 /* uformattable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uformattable.h; sourceTree = ""; }; + B31BD78620E7E0D500A560C2 /* ustream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ustream.h; sourceTree = ""; }; + B31BD78720E7E0D500A560C2 /* simpleformatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = simpleformatter.h; sourceTree = ""; }; + B31BD78820E7E0D500A560C2 /* ucnv_cb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucnv_cb.h; sourceTree = ""; }; + B31BD78920E7E0D500A560C2 /* curramt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = curramt.h; sourceTree = ""; }; + B31BD78A20E7E0D500A560C2 /* locid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = locid.h; sourceTree = ""; }; + B31BD78B20E7E0D500A560C2 /* udateintervalformat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = udateintervalformat.h; sourceTree = ""; }; + B31BD78C20E7E0D500A560C2 /* resbund.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = resbund.h; sourceTree = ""; }; + B31BD78D20E7E0D500A560C2 /* ubidi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ubidi.h; sourceTree = ""; }; + B31BD78E20E7E0D500A560C2 /* stsearch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stsearch.h; sourceTree = ""; }; + B31BD78F20E7E0D500A560C2 /* alphaindex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = alphaindex.h; sourceTree = ""; }; + B31BD79020E7E0D500A560C2 /* uvernum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uvernum.h; sourceTree = ""; }; + B31BD79120E7E0D600A560C2 /* unimatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unimatch.h; sourceTree = ""; }; + B31BD79220E7E0D600A560C2 /* rbtz.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rbtz.h; sourceTree = ""; }; + B31BD79320E7E0D600A560C2 /* ucnvsel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucnvsel.h; sourceTree = ""; }; + B31BD79420E7E0D600A560C2 /* uspoof.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uspoof.h; sourceTree = ""; }; + B31BD79520E7E0D600A560C2 /* region.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = region.h; sourceTree = ""; }; + B31BD79620E7E0D600A560C2 /* ureldatefmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ureldatefmt.h; sourceTree = ""; }; + B31BD79720E7E0D600A560C2 /* utrans.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utrans.h; sourceTree = ""; }; + B31BD79820E7E0D600A560C2 /* parseerr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parseerr.h; sourceTree = ""; }; + B31BD79920E7E0D600A560C2 /* putil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = putil.h; sourceTree = ""; }; + B31BD79A20E7E0D600A560C2 /* format.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = format.h; sourceTree = ""; }; + B31BD79B20E7E0D600A560C2 /* scientificnumberformatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = scientificnumberformatter.h; sourceTree = ""; }; + B31BD79C20E7E0D600A560C2 /* normalizer2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = normalizer2.h; sourceTree = ""; }; + B31BD79D20E7E0D600A560C2 /* dtrule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dtrule.h; sourceTree = ""; }; + B31BD79E20E7E0D600A560C2 /* ucnv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucnv.h; sourceTree = ""; }; + B31BD79F20E7E0D600A560C2 /* ucharstriebuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucharstriebuilder.h; sourceTree = ""; }; + B31BD7A020E7E0D600A560C2 /* search.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = search.h; sourceTree = ""; }; + B31BD7A120E7E0D600A560C2 /* unumsys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unumsys.h; sourceTree = ""; }; + B31BD7A220E7E0D600A560C2 /* uconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uconfig.h; sourceTree = ""; }; + B31BD7A320E7E0D600A560C2 /* utf16.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utf16.h; sourceTree = ""; }; + B31BD7A420E7E0D600A560C2 /* brkiter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = brkiter.h; sourceTree = ""; }; + B31BD7A520E7E0D600A560C2 /* platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = platform.h; sourceTree = ""; }; + B31BD7A620E7E0D600A560C2 /* rep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rep.h; sourceTree = ""; }; + B31BD7A720E7E0D600A560C2 /* std_string.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = std_string.h; sourceTree = ""; }; + B31BD7A820E7E0D600A560C2 /* utf8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utf8.h; sourceTree = ""; }; + B31BD7A920E7E0D600A560C2 /* localpointer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = localpointer.h; sourceTree = ""; }; + B31BD7AA20E7E0D600A560C2 /* uclean.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uclean.h; sourceTree = ""; }; + B31BD7AB20E7E0D600A560C2 /* uscript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uscript.h; sourceTree = ""; }; + B31BD7AC20E7E0D600A560C2 /* numfmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = numfmt.h; sourceTree = ""; }; + B31BD7AD20E7E0D600A560C2 /* currunit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = currunit.h; sourceTree = ""; }; + B31BD7AE20E7E0D600A560C2 /* utypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utypes.h; sourceTree = ""; }; + B31BD7AF20E7E0D600A560C2 /* ulistformatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ulistformatter.h; sourceTree = ""; }; + B31BD7B020E7E0D600A560C2 /* measfmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = measfmt.h; sourceTree = ""; }; + B31BD7B120E7E0D600A560C2 /* unifilt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unifilt.h; sourceTree = ""; }; + B31BD7B320E7E0D600A560C2 /* gennorm2 */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = gennorm2; sourceTree = ""; }; + B31BD7B420E7E0D600A560C2 /* escapesrc */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = escapesrc; sourceTree = ""; }; + B31BD7B520E7E0D600A560C2 /* gensprep */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = gensprep; sourceTree = ""; }; + B31BD7B620E7E0D600A560C2 /* icupkg */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = icupkg; sourceTree = ""; }; + B31BD7B720E7E0D600A560C2 /* gencmn */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = gencmn; sourceTree = ""; }; + B31BD7B820E7E0D600A560C2 /* genccode */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = genccode; sourceTree = ""; }; + B31BD7B920E7E0D600A560C2 /* readme.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = readme.html; sourceTree = ""; }; + B31BD7BB20E7E0D600A560C2 /* libicutest.61.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicutest.61.dylib; sourceTree = ""; }; + B31BD7BC20E7E0D600A560C2 /* libicui18n.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libicui18n.a; sourceTree = ""; }; + B31BD7BE20E7E0D600A560C2 /* icu-uc.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "icu-uc.pc"; sourceTree = ""; }; + B31BD7BF20E7E0D600A560C2 /* icu-io.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "icu-io.pc"; sourceTree = ""; }; + B31BD7C020E7E0D600A560C2 /* icu-i18n.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "icu-i18n.pc"; sourceTree = ""; }; + B31BD7C120E7E0D600A560C2 /* libicuio.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicuio.dylib; sourceTree = ""; }; + B31BD7C220E7E0D600A560C2 /* libicutest.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libicutest.a; sourceTree = ""; }; + B31BD7C320E7E0D600A560C2 /* libicutest.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicutest.dylib; sourceTree = ""; }; + B31BD7C420E7E0D600A560C2 /* libicuio.61.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicuio.61.dylib; sourceTree = ""; }; + B31BD7C520E7E0D600A560C2 /* libicuio.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libicuio.a; sourceTree = ""; }; + B31BD7C620E7E0D600A560C2 /* libicudata.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicudata.dylib; sourceTree = ""; }; + B31BD7C720E7E0D600A560C2 /* libicuio.61.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicuio.61.1.dylib; sourceTree = ""; }; + B31BD7C820E7E0D600A560C2 /* libicudata.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libicudata.a; sourceTree = ""; }; + B31BD7C920E7E0D600A560C2 /* libicutu.61.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicutu.61.dylib; sourceTree = ""; }; + B31BD7CA20E7E0D600A560C2 /* libicui18n.61.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicui18n.61.1.dylib; sourceTree = ""; }; + B31BD7CB20E7E0D600A560C2 /* libicutu.61.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicutu.61.1.dylib; sourceTree = ""; }; + B31BD7CC20E7E0D600A560C2 /* libicudata.61.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicudata.61.dylib; sourceTree = ""; }; + B31BD7CD20E7E0D600A560C2 /* libicuuc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicuuc.dylib; sourceTree = ""; }; + B31BD7CE20E7E0D600A560C2 /* libicuuc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libicuuc.a; sourceTree = ""; }; + B31BD7CF20E7E0D600A560C2 /* libicutu.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libicutu.a; sourceTree = ""; }; + B31BD7D020E7E0D600A560C2 /* libicutu.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicutu.dylib; sourceTree = ""; }; + B31BD7D120E7E0D600A560C2 /* libicui18n.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicui18n.dylib; sourceTree = ""; }; + B31BD7D220E7E0D600A560C2 /* libicui18n.61.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicui18n.61.dylib; sourceTree = ""; }; + B31BD7D320E7E0D600A560C2 /* libicuuc.61.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicuuc.61.dylib; sourceTree = ""; }; + B31BD7D420E7E0D600A560C2 /* libicudata.61.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicudata.61.1.dylib; sourceTree = ""; }; + B31BD7D520E7E0D600A560C2 /* libicutest.61.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicutest.61.1.dylib; sourceTree = ""; }; + B31BD7D820E7E0D600A560C2 /* pkgdata.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = pkgdata.inc; sourceTree = ""; }; + B31BD7D920E7E0D600A560C2 /* Makefile.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = Makefile.inc; sourceTree = ""; }; + B31BD7DA20E7E0D600A560C2 /* pkgdata.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = pkgdata.inc; sourceTree = ""; }; + B31BD7DC20E7E0D600A560C2 /* pkgdata.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = pkgdata.inc; sourceTree = ""; }; + B31BD7DD20E7E0D600A560C2 /* Makefile.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = Makefile.inc; sourceTree = ""; }; + B31BD7DE20E7E0D600A560C2 /* Makefile.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = Makefile.inc; sourceTree = ""; }; + B31BD7DF20E7E0D600A560C2 /* libicuuc.61.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicuuc.61.1.dylib; sourceTree = ""; }; + B31BD7E320E7E0D600A560C2 /* gensprep.8 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gensprep.8; sourceTree = ""; }; + B31BD7E420E7E0D600A560C2 /* genccode.8 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = genccode.8; sourceTree = ""; }; + B31BD7E520E7E0D600A560C2 /* icupkg.8 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = icupkg.8; sourceTree = ""; }; + B31BD7E620E7E0D600A560C2 /* gencmn.8 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gencmn.8; sourceTree = ""; }; + B31BD7E820E7E0D600A560C2 /* icu-config.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = "icu-config.1"; sourceTree = ""; }; + B31BD7E920E7E0D600A560C2 /* pkgdata.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = pkgdata.1; sourceTree = ""; }; + B31BD7EA20E7E0D600A560C2 /* gendict.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = gendict.1; sourceTree = ""; }; + B31BD7EB20E7E0D600A560C2 /* genrb.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = genrb.1; sourceTree = ""; }; + B31BD7EC20E7E0D600A560C2 /* genbrk.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = genbrk.1; sourceTree = ""; }; + B31BD7ED20E7E0D600A560C2 /* gencnval.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = gencnval.1; sourceTree = ""; }; + B31BD7EE20E7E0D600A560C2 /* uconv.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = uconv.1; sourceTree = ""; }; + B31BD7EF20E7E0D600A560C2 /* makeconv.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = makeconv.1; sourceTree = ""; }; + B31BD7F020E7E0D600A560C2 /* gencfu.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = gencfu.1; sourceTree = ""; }; + B31BD7F120E7E0D600A560C2 /* derb.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = derb.1; sourceTree = ""; }; + B31BD7F420E7E0D600A560C2 /* install-sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "install-sh"; sourceTree = ""; }; + B31BD7F720E7E0D600A560C2 /* mh-darwin */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "mh-darwin"; sourceTree = ""; }; + B31BD7F820E7E0D600A560C2 /* mkinstalldirs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = mkinstalldirs; sourceTree = ""; }; + B31BEAF81F96268000496E7A /* RegularExpressionSetBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegularExpressionSetBuilder.swift; sourceTree = ""; }; + B31BEAFB1F96269F00496E7A /* RegularExpressionSet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegularExpressionSet.swift; sourceTree = ""; }; + B31BEAFD1F9626AC00496E7A /* RegularExpressionSetProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegularExpressionSetProtocol.swift; sourceTree = ""; }; + B31BEAFF1F9626BB00496E7A /* RegularExpressionSetBuilderProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegularExpressionSetBuilderProtocol.swift; sourceTree = ""; }; + B3220A4721154D1A00047BF6 /* fix_dylibs.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = fix_dylibs.sh; sourceTree = ""; }; + B3220A4821154D1A00047BF6 /* codesign-framework.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "codesign-framework.sh"; sourceTree = ""; }; + B3220A4921154D1A00047BF6 /* decrypt-certs.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "decrypt-certs.sh"; sourceTree = ""; }; + B3220A4A21154D1A00047BF6 /* shasum.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = shasum.sh; sourceTree = ""; }; + B3220A4B21154D1A00047BF6 /* build-keychain.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "build-keychain.sh"; sourceTree = ""; }; + B32D69EA1F9EC5CA00C21C8C /* Speculid.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Speculid.entitlements; sourceTree = ""; }; + B33A53391F954E4B00E74800 /* StatusItemProviderProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusItemProviderProtocol.swift; sourceTree = ""; }; + B33A533B1F954F8C00E74800 /* RemoteObjectInterfaceProviderProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoteObjectInterfaceProviderProtocol.swift; sourceTree = ""; }; + B33A533D1F954FF800E74800 /* Result.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Result.swift; sourceTree = ""; }; + B33F0BB81F958695004A87DD /* RemoteObjectInterfaceProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoteObjectInterfaceProvider.swift; sourceTree = ""; }; + B33F0BBA1F9586A9004A87DD /* StatusItemProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusItemProvider.swift; sourceTree = ""; }; + B34188891F9A44A700C5F356 /* CommandLineArgumentProviderProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommandLineArgumentProviderProtocol.swift; sourceTree = ""; }; + B341888D1F9A460300C5F356 /* CommandLineArgumentProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommandLineArgumentProvider.swift; sourceTree = ""; }; + B34188901F9A479900C5F356 /* SpeculidApplicationModeParserTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpeculidApplicationModeParserTest.swift; sourceTree = ""; }; + B34E82FA1F8FD4EF0032268F /* ImageFileFormat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ImageFileFormat.h; sourceTree = ""; }; + B34E82FE1F8FD6860032268F /* ImageFileProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ImageFileProtocol.h; sourceTree = ""; }; + B34E83021F8FD90C0032268F /* GlibError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GlibError.h; sourceTree = ""; }; + B34E83031F8FD90C0032268F /* GlibError.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GlibError.m; sourceTree = ""; }; + B34E83061F8FDC4C0032268F /* GeometryDimension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeometryDimension.h; sourceTree = ""; }; + B34E83081F8FDCB80032268F /* Dimension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Dimension.h; sourceTree = ""; }; + B34E830A1F8FDDAC0032268F /* CairoColorProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CairoColorProtocol.h; sourceTree = ""; }; + B35B71221F9041B900BE477E /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; + B35B71251F904CF100BE477E /* SurfaceHandleBuilder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SurfaceHandleBuilder.h; sourceTree = ""; }; + B35B71261F904CF100BE477E /* SurfaceHandleBuilder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SurfaceHandleBuilder.m; sourceTree = ""; }; + B35B71291F9052B200BE477E /* CairoSize.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CairoSize.h; sourceTree = ""; }; + B36C2E8A1FA5B876003F48BD /* build.list */ = {isa = PBXFileReference; lastKnownFileType = text; path = build.list; sourceTree = ""; }; + B37C743E1F8C58F300DF505B /* Speculid.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Speculid.app; sourceTree = BUILT_PRODUCTS_DIR; }; + B37C74431F8C58F300DF505B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + B37C74481F8C58F300DF505B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B37C74491F8C58F300DF505B /* Speculid_Mac_App.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Speculid_Mac_App.entitlements; sourceTree = ""; }; + B37C74531F8C590D00DF505B /* Speculid-Mac-XPC.xpc */ = {isa = PBXFileReference; explicitFileType = "wrapper.xpc-service"; includeInIndex = 0; path = "Speculid-Mac-XPC.xpc"; sourceTree = BUILT_PRODUCTS_DIR; }; + B37C745B1F8C590D00DF505B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B37C74631F8C592400DF505B /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; + B37C74681F8C598500DF505B /* ServiceDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ServiceDelegate.swift; sourceTree = ""; }; + B37C74731F8C5ADA00DF505B /* Speculid.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Speculid.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B37C74891F8C5B5C00DF505B /* CairoSVG.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CairoSVG.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B37C748B1F8C5B5C00DF505B /* CairoSVG.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CairoSVG.h; sourceTree = ""; }; + B37C748C1F8C5B5C00DF505B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B37C74951F8C5C7200DF505B /* SVGImageHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageHandle.h; sourceTree = ""; }; + B37C74961F8C5C7200DF505B /* PNGImageHandle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNGImageHandle.m; sourceTree = ""; }; + B37C74971F8C5C7300DF505B /* CairoInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CairoInterface.m; sourceTree = ""; }; + B37C74981F8C5C7300DF505B /* PDFSurface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDFSurface.h; sourceTree = ""; }; + B37C74991F8C5C7300DF505B /* ImageSpecificationProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageSpecificationProtocol.h; sourceTree = ""; }; + B37C749A1F8C5C7300DF505B /* CairoInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CairoInterface.h; sourceTree = ""; }; + B37C749B1F8C5C7300DF505B /* SurfaceHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SurfaceHandle.h; sourceTree = ""; }; + B37C749C1F8C5C7300DF505B /* ImageHandleBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageHandleBuilder.h; sourceTree = ""; }; + B37C749D1F8C5C7300DF505B /* PDFSurface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDFSurface.m; sourceTree = ""; }; + B37C749E1F8C5C7300DF505B /* SVGImageHandle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImageHandle.m; sourceTree = ""; }; + B37C749F1F8C5C7300DF505B /* PNGSurface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNGSurface.m; sourceTree = ""; }; + B37C74A01F8C5C7400DF505B /* ImageHandleBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageHandleBuilder.m; sourceTree = ""; }; + B37C74A11F8C5C7400DF505B /* ImageHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageHandle.h; sourceTree = ""; }; + B37C74A21F8C5C7400DF505B /* PNGSurface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNGSurface.h; sourceTree = ""; }; + B37C74A31F8C5C7400DF505B /* PNGImageHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNGImageHandle.h; sourceTree = ""; }; + B3825EF320F91806008F2A02 /* Segment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Segment.h; sourceTree = ""; }; + B3825EF420F91806008F2A02 /* Types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Types.h; sourceTree = ""; }; + B3825EF520F91806008F2A02 /* Log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Log.h; sourceTree = ""; }; + B3825EF620F91806008F2A02 /* Font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Font.h; sourceTree = ""; }; + B3825EF820F91806008F2A02 /* libgraphite2.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libgraphite2.3.dylib; sourceTree = ""; }; + B3825EF920F91806008F2A02 /* libgraphite2.3.0.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libgraphite2.3.0.1.dylib; sourceTree = ""; }; + B3825EFA20F91806008F2A02 /* libgraphite2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libgraphite2.dylib; sourceTree = ""; }; + B3891BBD20F7CE010095E1FD /* CwlSysctl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CwlSysctl.swift; sourceTree = ""; }; + B3B049C81FA262A8002906B1 /* exportOptions.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = exportOptions.plist; sourceTree = ""; }; + B3B049CB1FA27D96002906B1 /* certs */ = {isa = PBXFileReference; lastKnownFileType = folder; path = certs; sourceTree = ""; }; + B3B5E9D81F96C1BE004A6BEB /* SpeculidConfigurationBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpeculidConfigurationBuilder.swift; sourceTree = ""; }; + B3B5E9DB1F96C1D2004A6BEB /* SpeculidConfigurationBuilderProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpeculidConfigurationBuilderProtocol.swift; sourceTree = ""; }; + B3B5E9DD1F96C2A2004A6BEB /* SpeculidConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpeculidConfiguration.swift; sourceTree = ""; }; + B3B5E9DF1F96C416004A6BEB /* SpeculidApplicationMode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpeculidApplicationMode.swift; sourceTree = ""; }; + B3B5E9E11F96C44D004A6BEB /* SpeculidCommandArgumentSet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpeculidCommandArgumentSet.swift; sourceTree = ""; }; + B3B5E9E31F96C5F1004A6BEB /* CommandLineActivityProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommandLineActivityProtocol.swift; sourceTree = ""; }; + B3B5E9E51F96C604004A6BEB /* CommandLineRunnerProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommandLineRunnerProtocol.swift; sourceTree = ""; }; + B3B5E9E71F96C74C004A6BEB /* CommandLineRunner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommandLineRunner.swift; sourceTree = ""; }; + B3B5E9E91F96C777004A6BEB /* SpeculidApplicationModeParserProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpeculidApplicationModeParserProtocol.swift; sourceTree = ""; }; + B3B5E9EB1F96C7D5004A6BEB /* SpeculidApplicationModeParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpeculidApplicationModeParser.swift; sourceTree = ""; }; + B3C6CA8D2114C9EB000D5120 /* dummy */ = {isa = PBXFileReference; lastKnownFileType = text; path = dummy; sourceTree = ""; }; + B3CB156F2113AA8C00A6DC5C /* VersionProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VersionProvider.swift; sourceTree = ""; }; + B3CEF3C41FB611D200F1DF87 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + B3D32A011F9A5D750042B46F /* help.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = help.txt; sourceTree = ""; }; + B3D32A031F9A5E8F0042B46F /* CommandLineRunnerTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommandLineRunnerTest.swift; sourceTree = ""; }; + B3D32A051F9A5FEE0042B46F /* FileHandle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileHandle.swift; sourceTree = ""; }; + B3D32A071F9A73740042B46F /* AsyncBlockOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AsyncBlockOperation.swift; sourceTree = ""; }; + B3E2046020E568C0009EA554 /* INSTALL_RECEIPT.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = INSTALL_RECEIPT.json; sourceTree = ""; }; + B3E2046220E568C0009EA554 /* rsvg-convert */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "rsvg-convert"; sourceTree = ""; }; + B3E2046420E568C0009EA554 /* librsvg.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = librsvg.rb; sourceTree = ""; }; + B3E2046520E568C0009EA554 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = ""; }; + B3E2046620E568C0009EA554 /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUTHORS; sourceTree = ""; }; + B3E2046A20E568C0009EA554 /* librsvg-features.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "librsvg-features.h"; sourceTree = ""; }; + B3E2046B20E568C0009EA554 /* rsvg-cairo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "rsvg-cairo.h"; sourceTree = ""; }; + B3E2046C20E568C0009EA554 /* librsvg-enum-types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "librsvg-enum-types.h"; sourceTree = ""; }; + B3E2046D20E568C0009EA554 /* rsvg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rsvg.h; sourceTree = ""; }; + B3E2046E20E568C0009EA554 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + B3E2046F20E568C0009EA554 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; + B3E2047020E568C0009EA554 /* NEWS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NEWS; sourceTree = ""; }; + B3E2047320E568C0009EA554 /* librsvg-2.0.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "librsvg-2.0.pc"; sourceTree = ""; }; + B3E2047420E568C0009EA554 /* librsvg-2.2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "librsvg-2.2.dylib"; sourceTree = ""; }; + B3E2047820E568C0009EA554 /* libpixbufloader-svg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpixbufloader-svg.a"; sourceTree = ""; }; + B3E2047A20E568C0009EA554 /* librsvg-2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "librsvg-2.a"; sourceTree = ""; }; + B3E2047C20E568C0009EA554 /* Rsvg-2.0.typelib */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Rsvg-2.0.typelib"; sourceTree = ""; }; + B3E2047D20E568C0009EA554 /* librsvg-2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "librsvg-2.dylib"; sourceTree = ""; }; + B3E2048120E568C1009EA554 /* rsvg-convert.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = "rsvg-convert.1"; sourceTree = ""; }; + B3E2048520E568C1009EA554 /* api-index-full.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-full.html"; sourceTree = ""; }; + B3E2048620E568C1009EA554 /* rsvg-Using-RSVG-with-cairo.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "rsvg-Using-RSVG-with-cairo.html"; sourceTree = ""; }; + B3E2048720E568C1009EA554 /* rsvg-Using-RSVG-with-GIO.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "rsvg-Using-RSVG-with-GIO.html"; sourceTree = ""; }; + B3E2048820E568C1009EA554 /* up-insensitive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "up-insensitive.png"; sourceTree = ""; }; + B3E2048920E568C1009EA554 /* api-index-2-32.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-2-32.html"; sourceTree = ""; }; + B3E2048A20E568C1009EA554 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = ""; }; + B3E2048B20E568C1009EA554 /* rsvg.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = rsvg.html; sourceTree = ""; }; + B3E2048C20E568C1009EA554 /* up.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = up.png; sourceTree = ""; }; + B3E2048D20E568C1009EA554 /* right-insensitive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "right-insensitive.png"; sourceTree = ""; }; + B3E2048E20E568C1009EA554 /* home.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = home.png; sourceTree = ""; }; + B3E2048F20E568C1009EA554 /* rsvg-RsvgHandle.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "rsvg-RsvgHandle.html"; sourceTree = ""; }; + B3E2049020E568C1009EA554 /* api-index-2-14.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-2-14.html"; sourceTree = ""; }; + B3E2049120E568C1009EA554 /* ch01.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = ch01.html; sourceTree = ""; }; + B3E2049220E568C1009EA554 /* object-tree.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "object-tree.html"; sourceTree = ""; }; + B3E2049320E568C1009EA554 /* api-index-2-22.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-2-22.html"; sourceTree = ""; }; + B3E2049420E568C1009EA554 /* api-index-2-8.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-2-8.html"; sourceTree = ""; }; + B3E2049520E568C1009EA554 /* left.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = left.png; sourceTree = ""; }; + B3E2049620E568C1009EA554 /* api-index-deprecated.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-deprecated.html"; sourceTree = ""; }; + B3E2049720E568C1009EA554 /* rsvg-Version-check-and-feature-tests.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "rsvg-Version-check-and-feature-tests.html"; sourceTree = ""; }; + B3E2049820E568C1009EA554 /* api-index-2-4.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-2-4.html"; sourceTree = ""; }; + B3E2049920E568C1009EA554 /* annotation-glossary.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "annotation-glossary.html"; sourceTree = ""; }; + B3E2049A20E568C1009EA554 /* style.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = style.css; sourceTree = ""; }; + B3E2049B20E568C1009EA554 /* api-index-2-9.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-2-9.html"; sourceTree = ""; }; + B3E2049C20E568C1009EA554 /* api-index-2-36.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-2-36.html"; sourceTree = ""; }; + B3E2049D20E568C1009EA554 /* licence.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = licence.html; sourceTree = ""; }; + B3E2049E20E568C1009EA554 /* left-insensitive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "left-insensitive.png"; sourceTree = ""; }; + B3E2049F20E568C1009EA554 /* rsvg-2.0.devhelp2 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "rsvg-2.0.devhelp2"; sourceTree = ""; }; + B3E204A020E568C1009EA554 /* rsvg-Using-RSVG-with-GdkPixbuf.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "rsvg-Using-RSVG-with-GdkPixbuf.html"; sourceTree = ""; }; + B3E204A120E568C1009EA554 /* right.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = right.png; sourceTree = ""; }; + B3E204A320E568C1009EA554 /* librsvg.thumbnailer */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = librsvg.thumbnailer; sourceTree = ""; }; + B3E204A520E568C1009EA554 /* Rsvg-2.0.gir */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Rsvg-2.0.gir"; sourceTree = ""; }; + B3E204A820E568C1009EA554 /* code_of_conduct.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = code_of_conduct.md; sourceTree = ""; }; + B3E204A920E568C1009EA554 /* COMPILING.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = COMPILING.md; sourceTree = ""; }; + B3E204AA20E568C1009EA554 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + B3E204AB20E568C1009EA554 /* CONTRIBUTING.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CONTRIBUTING.md; sourceTree = ""; }; + B3E2F4C220E568A5009EA554 /* pixman.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pixman.h; sourceTree = ""; }; + B3E2F4C320E568A5009EA554 /* pixman-version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pixman-version.h"; sourceTree = ""; }; + B3E2F4C920E568A5009EA554 /* pixman-1.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "pixman-1.pc"; sourceTree = ""; }; + B3E2F4CA20E568A5009EA554 /* libpixman-1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libpixman-1.dylib"; sourceTree = ""; }; + B3E2F4CB20E568A5009EA554 /* libpixman-1.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpixman-1.a"; sourceTree = ""; }; + B3E2F4CC20E568A5009EA554 /* libpixman-1.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libpixman-1.0.dylib"; sourceTree = ""; }; + B3E2F4CF20E568A5009EA554 /* INSTALL_RECEIPT.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = INSTALL_RECEIPT.json; sourceTree = ""; }; + B3E2F4D120E568A5009EA554 /* freetype-config */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "freetype-config"; sourceTree = ""; }; + B3E2F4D320E568A5009EA554 /* freetype.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = freetype.rb; sourceTree = ""; }; + B3E2F4D420E568A5009EA554 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = ""; }; + B3E2F4D820E568A5009EA554 /* ftsnames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftsnames.h; sourceTree = ""; }; + B3E2F4D920E568A5009EA554 /* ftwinfnt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftwinfnt.h; sourceTree = ""; }; + B3E2F4DA20E568A5009EA554 /* ftsizes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftsizes.h; sourceTree = ""; }; + B3E2F4DB20E568A5009EA554 /* fttypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fttypes.h; sourceTree = ""; }; + B3E2F4DC20E568A5009EA554 /* ftparams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftparams.h; sourceTree = ""; }; + B3E2F4DD20E568A5009EA554 /* ftmm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftmm.h; sourceTree = ""; }; + B3E2F4DF20E568A5009EA554 /* ftstdlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftstdlib.h; sourceTree = ""; }; + B3E2F4E020E568A5009EA554 /* ftheader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftheader.h; sourceTree = ""; }; + B3E2F4E120E568A5009EA554 /* ftconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftconfig.h; sourceTree = ""; }; + B3E2F4E220E568A5009EA554 /* ftoption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftoption.h; sourceTree = ""; }; + B3E2F4E320E568A5009EA554 /* ftmodule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftmodule.h; sourceTree = ""; }; + B3E2F4E420E568A5009EA554 /* ftmodapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftmodapi.h; sourceTree = ""; }; + B3E2F4E520E568A5009EA554 /* ftbzip2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftbzip2.h; sourceTree = ""; }; + B3E2F4E620E568A5009EA554 /* fttrigon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fttrigon.h; sourceTree = ""; }; + B3E2F4E720E568A5009EA554 /* ftbbox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftbbox.h; sourceTree = ""; }; + B3E2F4E820E568A5009EA554 /* ftgzip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftgzip.h; sourceTree = ""; }; + B3E2F4E920E568A5009EA554 /* ftdriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftdriver.h; sourceTree = ""; }; + B3E2F4EA20E568A6009EA554 /* ftoutln.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftoutln.h; sourceTree = ""; }; + B3E2F4EB20E568A6009EA554 /* ftadvanc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftadvanc.h; sourceTree = ""; }; + B3E2F4EC20E568A6009EA554 /* ftsynth.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftsynth.h; sourceTree = ""; }; + B3E2F4ED20E568A6009EA554 /* fterrors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fterrors.h; sourceTree = ""; }; + B3E2F4EE20E568A6009EA554 /* ftgasp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftgasp.h; sourceTree = ""; }; + B3E2F4EF20E568A6009EA554 /* ftstroke.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftstroke.h; sourceTree = ""; }; + B3E2F4F020E568A6009EA554 /* ftcache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftcache.h; sourceTree = ""; }; + B3E2F4F120E568A6009EA554 /* ftotval.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftotval.h; sourceTree = ""; }; + B3E2F4F220E568A6009EA554 /* freetype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = freetype.h; sourceTree = ""; }; + B3E2F4F320E568A6009EA554 /* ftincrem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftincrem.h; sourceTree = ""; }; + B3E2F4F420E568A6009EA554 /* ftfntfmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftfntfmt.h; sourceTree = ""; }; + B3E2F4F520E568A6009EA554 /* fterrdef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fterrdef.h; sourceTree = ""; }; + B3E2F4F620E568A6009EA554 /* ttnameid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ttnameid.h; sourceTree = ""; }; + B3E2F4F720E568A6009EA554 /* ftpfr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftpfr.h; sourceTree = ""; }; + B3E2F4F820E568A6009EA554 /* ftgxval.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftgxval.h; sourceTree = ""; }; + B3E2F4F920E568A6009EA554 /* ftchapters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftchapters.h; sourceTree = ""; }; + B3E2F4FA20E568A6009EA554 /* tttags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tttags.h; sourceTree = ""; }; + B3E2F4FB20E568A6009EA554 /* ftlzw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftlzw.h; sourceTree = ""; }; + B3E2F4FC20E568A6009EA554 /* ftsystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftsystem.h; sourceTree = ""; }; + B3E2F4FD20E568A6009EA554 /* t1tables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = t1tables.h; sourceTree = ""; }; + B3E2F4FE20E568A6009EA554 /* ftimage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftimage.h; sourceTree = ""; }; + B3E2F4FF20E568A6009EA554 /* tttables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tttables.h; sourceTree = ""; }; + B3E2F50020E568A6009EA554 /* ftcid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftcid.h; sourceTree = ""; }; + B3E2F50120E568A6009EA554 /* ftglyph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftglyph.h; sourceTree = ""; }; + B3E2F50220E568A6009EA554 /* ftmoderr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftmoderr.h; sourceTree = ""; }; + B3E2F50320E568A6009EA554 /* ftbitmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftbitmap.h; sourceTree = ""; }; + B3E2F50420E568A6009EA554 /* ftlist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftlist.h; sourceTree = ""; }; + B3E2F50520E568A6009EA554 /* ftmac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftmac.h; sourceTree = ""; }; + B3E2F50620E568A6009EA554 /* ftlcdfil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftlcdfil.h; sourceTree = ""; }; + B3E2F50720E568A6009EA554 /* ftbdf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftbdf.h; sourceTree = ""; }; + B3E2F50820E568A6009EA554 /* ftrender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftrender.h; sourceTree = ""; }; + B3E2F50920E568A6009EA554 /* ft2build.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ft2build.h; sourceTree = ""; }; + B3E2F50A20E568A6009EA554 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + B3E2F50C20E568A6009EA554 /* libfreetype.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libfreetype.dylib; sourceTree = ""; }; + B3E2F50E20E568A6009EA554 /* freetype2.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = freetype2.pc; sourceTree = ""; }; + B3E2F50F20E568A6009EA554 /* libfreetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libfreetype.a; sourceTree = ""; }; + B3E2F51020E568A6009EA554 /* libfreetype.6.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libfreetype.6.dylib; sourceTree = ""; }; + B3E2F51420E568A6009EA554 /* freetype-config.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = "freetype-config.1"; sourceTree = ""; }; + B3E2F51620E568A6009EA554 /* freetype2.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = freetype2.m4; sourceTree = ""; }; + B3E2F51920E568A6009EA554 /* INSTALL_RECEIPT.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = INSTALL_RECEIPT.json; sourceTree = ""; }; + B3E2F51B20E568A6009EA554 /* gdk-pixbuf-pixdata */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "gdk-pixbuf-pixdata"; sourceTree = ""; }; + B3E2F51C20E568A6009EA554 /* gdk-pixbuf-query-loaders */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "gdk-pixbuf-query-loaders"; sourceTree = ""; }; + B3E2F51D20E568A6009EA554 /* gdk-pixbuf-csource */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "gdk-pixbuf-csource"; sourceTree = ""; }; + B3E2F51E20E568A6009EA554 /* gdk-pixbuf-thumbnailer */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "gdk-pixbuf-thumbnailer"; sourceTree = ""; }; + B3E2F52020E568A6009EA554 /* gdk-pixbuf.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = "gdk-pixbuf.rb"; sourceTree = ""; }; + B3E2F52120E568A6009EA554 /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUTHORS; sourceTree = ""; }; + B3E2F52520E568A6009EA554 /* gdk-pixbuf-animation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gdk-pixbuf-animation.h"; sourceTree = ""; }; + B3E2F52620E568A6009EA554 /* gdk-pixbuf-marshal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gdk-pixbuf-marshal.h"; sourceTree = ""; }; + B3E2F52720E568A6009EA554 /* gdk-pixbuf-io.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gdk-pixbuf-io.h"; sourceTree = ""; }; + B3E2F52820E568A6009EA554 /* gdk-pixbuf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gdk-pixbuf.h"; sourceTree = ""; }; + B3E2F52920E568A6009EA554 /* gdk-pixbuf-macros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gdk-pixbuf-macros.h"; sourceTree = ""; }; + B3E2F52A20E568A6009EA554 /* gdk-pixbuf-loader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gdk-pixbuf-loader.h"; sourceTree = ""; }; + B3E2F52B20E568A6009EA554 /* gdk-pixbuf-autocleanups.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gdk-pixbuf-autocleanups.h"; sourceTree = ""; }; + B3E2F52C20E568A6009EA554 /* gdk-pixbuf-enum-types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gdk-pixbuf-enum-types.h"; sourceTree = ""; }; + B3E2F52D20E568A6009EA554 /* gdk-pixdata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gdk-pixdata.h"; sourceTree = ""; }; + B3E2F52E20E568A6009EA554 /* gdk-pixbuf-transform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gdk-pixbuf-transform.h"; sourceTree = ""; }; + B3E2F52F20E568A6009EA554 /* gdk-pixbuf-core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gdk-pixbuf-core.h"; sourceTree = ""; }; + B3E2F53020E568A6009EA554 /* gdk-pixbuf-features.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gdk-pixbuf-features.h"; sourceTree = ""; }; + B3E2F53120E568A6009EA554 /* gdk-pixbuf-simple-anim.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gdk-pixbuf-simple-anim.h"; sourceTree = ""; }; + B3E2F53220E568A6009EA554 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + B3E2F53320E568A6009EA554 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; + B3E2F53420E568A6009EA554 /* NEWS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NEWS; sourceTree = ""; }; + B3E2F53620E568A6009EA554 /* libgdk_pixbuf-2.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libgdk_pixbuf-2.0.dylib"; sourceTree = ""; }; + B3E2F53820E568A6009EA554 /* gdk-pixbuf-2.0.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "gdk-pixbuf-2.0.pc"; sourceTree = ""; }; + B3E2F53920E568A6009EA554 /* libgdk_pixbuf-2.0.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libgdk_pixbuf-2.0.0.dylib"; sourceTree = ""; }; + B3E2F53D20E568A6009EA554 /* libpixbufloader-tiff.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpixbufloader-tiff.a"; sourceTree = ""; }; + B3E2F53E20E568A6009EA554 /* libpixbufloader-bmp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpixbufloader-bmp.a"; sourceTree = ""; }; + B3E2F53F20E568A6009EA554 /* libpixbufloader-ani.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpixbufloader-ani.a"; sourceTree = ""; }; + B3E2F54020E568A6009EA554 /* libpixbufloader-qtif.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpixbufloader-qtif.a"; sourceTree = ""; }; + B3E2F54220E568A6009EA554 /* libpixbufloader-gif.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpixbufloader-gif.a"; sourceTree = ""; }; + B3E2F54420E568A6009EA554 /* libpixbufloader-tga.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpixbufloader-tga.a"; sourceTree = ""; }; + B3E2F54620E568A6009EA554 /* libpixbufloader-png.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpixbufloader-png.a"; sourceTree = ""; }; + B3E2F54720E568A6009EA554 /* libpixbufloader-pnm.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpixbufloader-pnm.a"; sourceTree = ""; }; + B3E2F54820E568A6009EA554 /* libpixbufloader-xpm.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpixbufloader-xpm.a"; sourceTree = ""; }; + B3E2F55020E568A6009EA554 /* libpixbufloader-xbm.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpixbufloader-xbm.a"; sourceTree = ""; }; + B3E2F55220E568A6009EA554 /* libpixbufloader-icns.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpixbufloader-icns.a"; sourceTree = ""; }; + B3E2F55320E568A6009EA554 /* libpixbufloader-jpeg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpixbufloader-jpeg.a"; sourceTree = ""; }; + B3E2F55620E568A6009EA554 /* libpixbufloader-ico.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpixbufloader-ico.a"; sourceTree = ""; }; + B3E2F55820E568A6009EA554 /* GdkPixbuf-2.0.typelib */ = {isa = PBXFileReference; lastKnownFileType = file; path = "GdkPixbuf-2.0.typelib"; sourceTree = ""; }; + B3E2F55920E568A6009EA554 /* libgdk_pixbuf-2.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libgdk_pixbuf-2.0.a"; sourceTree = ""; }; + B3E2F55D20E568A6009EA554 /* gdk-pixbuf-query-loaders.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = "gdk-pixbuf-query-loaders.1"; sourceTree = ""; }; + B3E2F55E20E568A6009EA554 /* gdk-pixbuf-csource.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = "gdk-pixbuf-csource.1"; sourceTree = ""; }; + B3E2F56220E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F56520E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F56820E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F56B20E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F56E20E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F57120E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F57420E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F57720E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F57A20E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F57D20E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F58020E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F58320E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F58620E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F58920E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F58C20E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F58F20E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F59220E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F59520E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F59820E568A6009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F59B20E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F59E20E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5A120E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5A420E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5A720E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5AA20E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5AD20E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5B020E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5B320E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5B620E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5B920E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5BC20E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5BF20E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5C220E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5C520E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5C820E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5CB20E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5CE20E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5D120E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5D420E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5D720E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5DA20E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5DD20E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5E020E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5E320E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5E620E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5E920E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5EC20E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5EF20E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5F220E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5F520E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5F820E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5FB20E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F5FE20E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F60120E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F60420E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F60720E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F60A20E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F60D20E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F61020E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F61320E568A7009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F61620E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F61920E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F61C20E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F61F20E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F62220E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F62520E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F62820E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F62B20E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F62E20E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F63120E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F63420E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F63720E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F63A20E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F63D20E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F64020E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F64320E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F64620E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F64920E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F64C20E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F64F20E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F65220E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F65520E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F65820E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F65B20E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F65E20E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F66120E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F66420E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F66720E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F66A20E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F66D20E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F67020E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F67320E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F67620E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F67920E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F67C20E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F67F20E568A8009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F68220E568A9009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F68520E568A9009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F68820E568A9009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F68B20E568A9009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F68E20E568A9009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F69120E568A9009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F69420E568A9009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F69720E568A9009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F69A20E568A9009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F69D20E568A9009EA554 /* gdk-pixbuf.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gdk-pixbuf.mo"; sourceTree = ""; }; + B3E2F6A120E568A9009EA554 /* api-index-full.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-full.html"; sourceTree = ""; }; + B3E2F6A220E568A9009EA554 /* rn02.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = rn02.html; sourceTree = ""; }; + B3E2F6A320E568A9009EA554 /* gdk-pixbuf-The-GdkPixbuf-Structure.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-The-GdkPixbuf-Structure.html"; sourceTree = ""; }; + B3E2F6A420E568A9009EA554 /* gdk-pixbuf-Xlib-Rendering.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-Xlib-Rendering.html"; sourceTree = ""; }; + B3E2F6A520E568A9009EA554 /* gdk-pixbuf-Module-Interface.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-Module-Interface.html"; sourceTree = ""; }; + B3E2F6A620E568A9009EA554 /* gdk-pixbuf-File-saving.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-File-saving.html"; sourceTree = ""; }; + B3E2F6A720E568A9009EA554 /* gdk-pixbuf-X-Drawables-to-Pixbufs.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-X-Drawables-to-Pixbufs.html"; sourceTree = ""; }; + B3E2F6A820E568A9009EA554 /* up-insensitive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "up-insensitive.png"; sourceTree = ""; }; + B3E2F6A920E568A9009EA554 /* gdk-pixbuf-XlibRGB.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-XlibRGB.html"; sourceTree = ""; }; + B3E2F6AA20E568A9009EA554 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = ""; }; + B3E2F6AB20E568A9009EA554 /* gdk-pixbuf-gdk-pixbuf-rendering.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-gdk-pixbuf-rendering.html"; sourceTree = ""; }; + B3E2F6AC20E568A9009EA554 /* gdk-pixbuf-csource.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-csource.html"; sourceTree = ""; }; + B3E2F6AD20E568A9009EA554 /* up.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = up.png; sourceTree = ""; }; + B3E2F6AE20E568A9009EA554 /* license.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = license.html; sourceTree = ""; }; + B3E2F6AF20E568A9009EA554 /* gdk-pixbuf-Versioning.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-Versioning.html"; sourceTree = ""; }; + B3E2F6B020E568A9009EA554 /* right-insensitive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "right-insensitive.png"; sourceTree = ""; }; + B3E2F6B120E568A9009EA554 /* composite.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = composite.png; sourceTree = ""; }; + B3E2F6B220E568A9009EA554 /* gdk-pixbuf-gdk-pixbuf-from-drawables.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-gdk-pixbuf-from-drawables.html"; sourceTree = ""; }; + B3E2F6B320E568A9009EA554 /* home.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = home.png; sourceTree = ""; }; + B3E2F6B420E568A9009EA554 /* gdk-pixbuf.devhelp2 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "gdk-pixbuf.devhelp2"; sourceTree = ""; }; + B3E2F6B520E568A9009EA554 /* gdk-pixbuf-gdk-pixbuf-Xlib-initialization.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-gdk-pixbuf-Xlib-initialization.html"; sourceTree = ""; }; + B3E2F6B620E568A9009EA554 /* left.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = left.png; sourceTree = ""; }; + B3E2F6B720E568A9009EA554 /* gdk-pixbuf-Inline-data.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-Inline-data.html"; sourceTree = ""; }; + B3E2F6B820E568A9009EA554 /* annotation-glossary.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "annotation-glossary.html"; sourceTree = ""; }; + B3E2F6B920E568A9009EA554 /* gdk-pixbuf-Utilities.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-Utilities.html"; sourceTree = ""; }; + B3E2F6BA20E568A9009EA554 /* gdk-pixbuf-Animations.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-Animations.html"; sourceTree = ""; }; + B3E2F6BB20E568A9009EA554 /* gdk-pixbuf-query-loaders.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-query-loaders.html"; sourceTree = ""; }; + B3E2F6BC20E568A9009EA554 /* style.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = style.css; sourceTree = ""; }; + B3E2F6BD20E568A9009EA554 /* gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html"; sourceTree = ""; }; + B3E2F6BE20E568A9009EA554 /* gdk-pixbuf-File-Loading.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-File-Loading.html"; sourceTree = ""; }; + B3E2F6BF20E568A9009EA554 /* gdk-pixbuf-Scaling.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-Scaling.html"; sourceTree = ""; }; + B3E2F6C020E568A9009EA554 /* left-insensitive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "left-insensitive.png"; sourceTree = ""; }; + B3E2F6C120E568A9009EA554 /* GdkPixbufLoader.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = GdkPixbufLoader.html; sourceTree = ""; }; + B3E2F6C220E568A9009EA554 /* gdk-pixbuf-Image-Data-in-Memory.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "gdk-pixbuf-Image-Data-in-Memory.html"; sourceTree = ""; }; + B3E2F6C320E568A9009EA554 /* right.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = right.png; sourceTree = ""; }; + B3E2F6C420E568A9009EA554 /* rn01.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = rn01.html; sourceTree = ""; }; + B3E2F6C620E568A9009EA554 /* gdk-pixbuf-thumbnailer.thumbnailer */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "gdk-pixbuf-thumbnailer.thumbnailer"; sourceTree = ""; }; + B3E2F6C820E568A9009EA554 /* GdkPixbuf-2.0.gir */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "GdkPixbuf-2.0.gir"; sourceTree = ""; }; + B3E2F6CB20E568A9009EA554 /* INSTALL_RECEIPT.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = INSTALL_RECEIPT.json; sourceTree = ""; }; + B3E2F6CD20E568A9009EA554 /* gtester */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = gtester; sourceTree = ""; }; + B3E2F6CE20E568A9009EA554 /* gdbus-codegen */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "gdbus-codegen"; sourceTree = ""; }; + B3E2F6CF20E568A9009EA554 /* gsettings */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = gsettings; sourceTree = ""; }; + B3E2F6D020E568A9009EA554 /* glib-compile-schemas */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "glib-compile-schemas"; sourceTree = ""; }; + B3E2F6D120E568A9009EA554 /* gobject-query */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "gobject-query"; sourceTree = ""; }; + B3E2F6D220E568A9009EA554 /* gio-querymodules */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "gio-querymodules"; sourceTree = ""; }; + B3E2F6D320E568A9009EA554 /* gapplication */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = gapplication; sourceTree = ""; }; + B3E2F6D420E568A9009EA554 /* glib-compile-resources */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "glib-compile-resources"; sourceTree = ""; }; + B3E2F6D520E568A9009EA554 /* gresource */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = gresource; sourceTree = ""; }; + B3E2F6D620E568A9009EA554 /* gtester-report */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = "gtester-report"; sourceTree = ""; }; + B3E2F6D720E568A9009EA554 /* glib-gettextize */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "glib-gettextize"; sourceTree = ""; }; + B3E2F6D820E568A9009EA554 /* gdbus */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = gdbus; sourceTree = ""; }; + B3E2F6D920E568A9009EA554 /* glib-genmarshal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "glib-genmarshal"; sourceTree = ""; }; + B3E2F6DA20E568A9009EA554 /* glib-mkenums */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "glib-mkenums"; sourceTree = ""; }; + B3E2F6DB20E568A9009EA554 /* gio */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = gio; sourceTree = ""; }; + B3E2F6DD20E568A9009EA554 /* glib.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = glib.rb; sourceTree = ""; }; + B3E2F6DE20E568A9009EA554 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = ""; }; + B3E2F6DF20E568A9009EA554 /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUTHORS; sourceTree = ""; }; + B3E2F6E320E568A9009EA554 /* gunixfdlist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gunixfdlist.h; sourceTree = ""; }; + B3E2F6E420E568A9009EA554 /* gunixsocketaddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gunixsocketaddress.h; sourceTree = ""; }; + B3E2F6E520E568A9009EA554 /* gdesktopappinfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdesktopappinfo.h; sourceTree = ""; }; + B3E2F6E620E568A9009EA554 /* gunixconnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gunixconnection.h; sourceTree = ""; }; + B3E2F6E720E568A9009EA554 /* gunixoutputstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gunixoutputstream.h; sourceTree = ""; }; + B3E2F6E820E568A9009EA554 /* gunixcredentialsmessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gunixcredentialsmessage.h; sourceTree = ""; }; + B3E2F6E920E568A9009EA554 /* gunixinputstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gunixinputstream.h; sourceTree = ""; }; + B3E2F6EA20E568A9009EA554 /* gunixmounts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gunixmounts.h; sourceTree = ""; }; + B3E2F6EB20E568A9009EA554 /* gunixfdmessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gunixfdmessage.h; sourceTree = ""; }; + B3E2F6EC20E568A9009EA554 /* gfiledescriptorbased.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gfiledescriptorbased.h; sourceTree = ""; }; + B3E2F6EE20E568A9009EA554 /* glib-object.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "glib-object.h"; sourceTree = ""; }; + B3E2F6F020E568A9009EA554 /* gparam.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gparam.h; sourceTree = ""; }; + B3E2F6F120E568A9009EA554 /* gparamspecs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gparamspecs.h; sourceTree = ""; }; + B3E2F6F220E568A9009EA554 /* gsignal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsignal.h; sourceTree = ""; }; + B3E2F6F320E568A9009EA554 /* genums.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = genums.h; sourceTree = ""; }; + B3E2F6F420E568A9009EA554 /* gclosure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gclosure.h; sourceTree = ""; }; + B3E2F6F520E568A9009EA554 /* gvaluearray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gvaluearray.h; sourceTree = ""; }; + B3E2F6F620E568A9009EA554 /* gbinding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gbinding.h; sourceTree = ""; }; + B3E2F6F720E568A9009EA554 /* gtypeplugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtypeplugin.h; sourceTree = ""; }; + B3E2F6F920E568A9009EA554 /* gsourceclosure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsourceclosure.h; sourceTree = ""; }; + B3E2F6FA20E568A9009EA554 /* glib-types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "glib-types.h"; sourceTree = ""; }; + B3E2F6FB20E568A9009EA554 /* gtype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtype.h; sourceTree = ""; }; + B3E2F6FC20E568A9009EA554 /* gvaluetypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gvaluetypes.h; sourceTree = ""; }; + B3E2F6FD20E568A9009EA554 /* gboxed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gboxed.h; sourceTree = ""; }; + B3E2F6FE20E568A9009EA554 /* gtypemodule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtypemodule.h; sourceTree = ""; }; + B3E2F6FF20E568A9009EA554 /* gvalue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gvalue.h; sourceTree = ""; }; + B3E2F70020E568AA009EA554 /* gvaluecollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gvaluecollector.h; sourceTree = ""; }; + B3E2F70120E568AA009EA554 /* gobject-autocleanups.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gobject-autocleanups.h"; sourceTree = ""; }; + B3E2F70220E568AA009EA554 /* gobject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gobject.h; sourceTree = ""; }; + B3E2F70320E568AA009EA554 /* gmarshal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gmarshal.h; sourceTree = ""; }; + B3E2F70420E568AA009EA554 /* glib-unix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "glib-unix.h"; sourceTree = ""; }; + B3E2F70520E568AA009EA554 /* glib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = glib.h; sourceTree = ""; }; + B3E2F70720E568AA009EA554 /* gmarkup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gmarkup.h; sourceTree = ""; }; + B3E2F70820E568AA009EA554 /* ghmac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ghmac.h; sourceTree = ""; }; + B3E2F70920E568AA009EA554 /* gtimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtimer.h; sourceTree = ""; }; + B3E2F70A20E568AA009EA554 /* gvariant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gvariant.h; sourceTree = ""; }; + B3E2F70B20E568AA009EA554 /* glist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = glist.h; sourceTree = ""; }; + B3E2F70C20E568AA009EA554 /* gtrashstack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtrashstack.h; sourceTree = ""; }; + B3E2F70D20E568AA009EA554 /* gbookmarkfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gbookmarkfile.h; sourceTree = ""; }; + B3E2F70E20E568AA009EA554 /* gprimes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gprimes.h; sourceTree = ""; }; + B3E2F70F20E568AA009EA554 /* grand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = grand.h; sourceTree = ""; }; + B3E2F71020E568AA009EA554 /* gurifuncs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gurifuncs.h; sourceTree = ""; }; + B3E2F71120E568AA009EA554 /* gchecksum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gchecksum.h; sourceTree = ""; }; + B3E2F71220E568AA009EA554 /* gtestutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtestutils.h; sourceTree = ""; }; + B3E2F71320E568AA009EA554 /* gslist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gslist.h; sourceTree = ""; }; + B3E2F71420E568AA009EA554 /* gthreadpool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gthreadpool.h; sourceTree = ""; }; + B3E2F71520E568AA009EA554 /* garray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = garray.h; sourceTree = ""; }; + B3E2F71620E568AA009EA554 /* gbytes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gbytes.h; sourceTree = ""; }; + B3E2F71720E568AA009EA554 /* gconvert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gconvert.h; sourceTree = ""; }; + B3E2F71820E568AA009EA554 /* gdir.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdir.h; sourceTree = ""; }; + B3E2F71920E568AA009EA554 /* gkeyfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gkeyfile.h; sourceTree = ""; }; + B3E2F71A20E568AA009EA554 /* gstrfuncs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gstrfuncs.h; sourceTree = ""; }; + B3E2F71B20E568AA009EA554 /* gmappedfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gmappedfile.h; sourceTree = ""; }; + B3E2F71C20E568AA009EA554 /* gstdio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gstdio.h; sourceTree = ""; }; + B3E2F71D20E568AA009EA554 /* gpoll.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gpoll.h; sourceTree = ""; }; + B3E2F71E20E568AA009EA554 /* gunicode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gunicode.h; sourceTree = ""; }; + B3E2F71F20E568AA009EA554 /* gdataset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdataset.h; sourceTree = ""; }; + B3E2F72020E568AA009EA554 /* gqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gqueue.h; sourceTree = ""; }; + B3E2F72120E568AA009EA554 /* gsequence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsequence.h; sourceTree = ""; }; + B3E2F72220E568AA009EA554 /* gvarianttype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gvarianttype.h; sourceTree = ""; }; + B3E2F72320E568AA009EA554 /* ghash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ghash.h; sourceTree = ""; }; + B3E2F72420E568AA009EA554 /* gqsort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gqsort.h; sourceTree = ""; }; + B3E2F72520E568AA009EA554 /* gscanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gscanner.h; sourceTree = ""; }; + B3E2F72620E568AA009EA554 /* ggettext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ggettext.h; sourceTree = ""; }; + B3E2F72720E568AA009EA554 /* gbase64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gbase64.h; sourceTree = ""; }; + B3E2F72820E568AA009EA554 /* gasyncqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gasyncqueue.h; sourceTree = ""; }; + B3E2F72920E568AA009EA554 /* gmem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gmem.h; sourceTree = ""; }; + B3E2F72A20E568AA009EA554 /* genviron.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = genviron.h; sourceTree = ""; }; + B3E2F72B20E568AA009EA554 /* gshell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gshell.h; sourceTree = ""; }; + B3E2F72C20E568AA009EA554 /* gbacktrace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gbacktrace.h; sourceTree = ""; }; + B3E2F72D20E568AA009EA554 /* gerror.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gerror.h; sourceTree = ""; }; + B3E2F72E20E568AA009EA554 /* gmain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gmain.h; sourceTree = ""; }; + B3E2F72F20E568AA009EA554 /* gfileutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gfileutils.h; sourceTree = ""; }; + B3E2F73020E568AA009EA554 /* gutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gutils.h; sourceTree = ""; }; + B3E2F73120E568AA009EA554 /* gpattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gpattern.h; sourceTree = ""; }; + B3E2F73220E568AA009EA554 /* ghostutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ghostutils.h; sourceTree = ""; }; + B3E2F73320E568AA009EA554 /* gtypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtypes.h; sourceTree = ""; }; + B3E2F73420E568AA009EA554 /* gstringchunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gstringchunk.h; sourceTree = ""; }; + B3E2F73520E568AA009EA554 /* guuid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = guuid.h; sourceTree = ""; }; + B3E2F73620E568AA009EA554 /* gcharset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gcharset.h; sourceTree = ""; }; + B3E2F73720E568AA009EA554 /* gquark.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gquark.h; sourceTree = ""; }; + B3E2F73820E568AA009EA554 /* gi18n-lib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gi18n-lib.h"; sourceTree = ""; }; + B3E2F73920E568AA009EA554 /* gatomic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gatomic.h; sourceTree = ""; }; + B3E2F73A20E568AA009EA554 /* gdatetime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdatetime.h; sourceTree = ""; }; + B3E2F73B20E568AA009EA554 /* gstring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gstring.h; sourceTree = ""; }; + B3E2F73C20E568AA009EA554 /* goption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = goption.h; sourceTree = ""; }; + B3E2F73D20E568AA009EA554 /* gdate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdate.h; sourceTree = ""; }; + B3E2F73E20E568AA009EA554 /* gversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gversion.h; sourceTree = ""; }; + B3E2F73F20E568AA009EA554 /* gslice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gslice.h; sourceTree = ""; }; + B3E2F74020E568AA009EA554 /* ghook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ghook.h; sourceTree = ""; }; + B3E2F74120E568AA009EA554 /* glib-autocleanups.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "glib-autocleanups.h"; sourceTree = ""; }; + B3E2F74220E568AA009EA554 /* galloca.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = galloca.h; sourceTree = ""; }; + B3E2F74320E568AA009EA554 /* gprintf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gprintf.h; sourceTree = ""; }; + B3E2F74420E568AA009EA554 /* gthread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gthread.h; sourceTree = ""; }; + B3E2F74520E568AA009EA554 /* gversionmacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gversionmacros.h; sourceTree = ""; }; + B3E2F74620E568AA009EA554 /* gtimezone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtimezone.h; sourceTree = ""; }; + B3E2F74720E568AA009EA554 /* gmacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gmacros.h; sourceTree = ""; }; + B3E2F74820E568AA009EA554 /* giochannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = giochannel.h; sourceTree = ""; }; + B3E2F74920E568AA009EA554 /* gwin32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gwin32.h; sourceTree = ""; }; + B3E2F74A20E568AA009EA554 /* gi18n.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gi18n.h; sourceTree = ""; }; + B3E2F74B20E568AA009EA554 /* gbitlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gbitlock.h; sourceTree = ""; }; + B3E2F74C20E568AA009EA554 /* gnode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gnode.h; sourceTree = ""; }; + B3E2F74D20E568AA009EA554 /* gmessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gmessages.h; sourceTree = ""; }; + B3E2F74E20E568AA009EA554 /* gregex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gregex.h; sourceTree = ""; }; + B3E2F74F20E568AA009EA554 /* gspawn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gspawn.h; sourceTree = ""; }; + B3E2F75020E568AA009EA554 /* gtree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtree.h; sourceTree = ""; }; + B3E2F75220E568AA009EA554 /* gcompletion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gcompletion.h; sourceTree = ""; }; + B3E2F75320E568AA009EA554 /* gallocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gallocator.h; sourceTree = ""; }; + B3E2F75420E568AA009EA554 /* grel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = grel.h; sourceTree = ""; }; + B3E2F75520E568AA009EA554 /* gmain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gmain.h; sourceTree = ""; }; + B3E2F75620E568AA009EA554 /* gcache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gcache.h; sourceTree = ""; }; + B3E2F75720E568AA009EA554 /* gthread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gthread.h; sourceTree = ""; }; + B3E2F75820E568AA009EA554 /* gmodule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gmodule.h; sourceTree = ""; }; + B3E2F75A20E568AA009EA554 /* gdbusobject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusobject.h; sourceTree = ""; }; + B3E2F75B20E568AA009EA554 /* gsimpleproxyresolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsimpleproxyresolver.h; sourceTree = ""; }; + B3E2F75C20E568AA009EA554 /* gconverterinputstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gconverterinputstream.h; sourceTree = ""; }; + B3E2F75D20E568AA009EA554 /* gsubprocesslauncher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsubprocesslauncher.h; sourceTree = ""; }; + B3E2F75E20E568AA009EA554 /* gsimpleactiongroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsimpleactiongroup.h; sourceTree = ""; }; + B3E2F75F20E568AA009EA554 /* gdbusaddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusaddress.h; sourceTree = ""; }; + B3E2F76020E568AA009EA554 /* gtlsinteraction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtlsinteraction.h; sourceTree = ""; }; + B3E2F76120E568AA009EA554 /* gthreadedsocketservice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gthreadedsocketservice.h; sourceTree = ""; }; + B3E2F76220E568AA009EA554 /* gsocketservice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsocketservice.h; sourceTree = ""; }; + B3E2F76320E568AA009EA554 /* gnetworkaddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gnetworkaddress.h; sourceTree = ""; }; + B3E2F76420E568AA009EA554 /* gasyncresult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gasyncresult.h; sourceTree = ""; }; + B3E2F76520E568AA009EA554 /* gproxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gproxy.h; sourceTree = ""; }; + B3E2F76620E568AA009EA554 /* gio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gio.h; sourceTree = ""; }; + B3E2F76720E568AA009EA554 /* gmemoryoutputstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gmemoryoutputstream.h; sourceTree = ""; }; + B3E2F76820E568AA009EA554 /* gvolumemonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gvolumemonitor.h; sourceTree = ""; }; + B3E2F76920E568AA009EA554 /* gdatagrambased.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdatagrambased.h; sourceTree = ""; }; + B3E2F76A20E568AA009EA554 /* gcontenttype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gcontenttype.h; sourceTree = ""; }; + B3E2F76B20E568AA009EA554 /* gsocketcontrolmessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsocketcontrolmessage.h; sourceTree = ""; }; + B3E2F76C20E568AA009EA554 /* gdbusnameowning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusnameowning.h; sourceTree = ""; }; + B3E2F76D20E568AA009EA554 /* gfilemonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gfilemonitor.h; sourceTree = ""; }; + B3E2F76E20E568AA009EA554 /* gpollableoutputstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gpollableoutputstream.h; sourceTree = ""; }; + B3E2F76F20E568AA009EA554 /* gseekable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gseekable.h; sourceTree = ""; }; + B3E2F77020E568AA009EA554 /* gdbusobjectproxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusobjectproxy.h; sourceTree = ""; }; + B3E2F77120E568AA009EA554 /* gpropertyaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gpropertyaction.h; sourceTree = ""; }; + B3E2F77220E568AA009EA554 /* gsimpleiostream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsimpleiostream.h; sourceTree = ""; }; + B3E2F77320E568AA009EA554 /* gasyncinitable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gasyncinitable.h; sourceTree = ""; }; + B3E2F77420E568AA009EA554 /* gremoteactiongroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gremoteactiongroup.h; sourceTree = ""; }; + B3E2F77520E568AA009EA554 /* gdbusmessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusmessage.h; sourceTree = ""; }; + B3E2F77620E568AA009EA554 /* gmenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gmenu.h; sourceTree = ""; }; + B3E2F77720E568AA009EA554 /* gdbusinterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusinterface.h; sourceTree = ""; }; + B3E2F77820E568AA009EA554 /* gaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gaction.h; sourceTree = ""; }; + B3E2F77920E568AA009EA554 /* gio-autocleanups.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gio-autocleanups.h"; sourceTree = ""; }; + B3E2F77A20E568AA009EA554 /* gproxyaddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gproxyaddress.h; sourceTree = ""; }; + B3E2F77B20E568AA009EA554 /* gdbusproxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusproxy.h; sourceTree = ""; }; + B3E2F77C20E568AA009EA554 /* giomodule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = giomodule.h; sourceTree = ""; }; + B3E2F77D20E568AA009EA554 /* gdbusmethodinvocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusmethodinvocation.h; sourceTree = ""; }; + B3E2F77E20E568AA009EA554 /* gactionmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gactionmap.h; sourceTree = ""; }; + B3E2F77F20E568AA009EA554 /* gbufferedinputstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gbufferedinputstream.h; sourceTree = ""; }; + B3E2F78020E568AA009EA554 /* gdbusnamewatching.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusnamewatching.h; sourceTree = ""; }; + B3E2F78120E568AA009EA554 /* gzlibcompressor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gzlibcompressor.h; sourceTree = ""; }; + B3E2F78220E568AA009EA554 /* gloadableicon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gloadableicon.h; sourceTree = ""; }; + B3E2F78320E568AA009EA554 /* gpermission.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gpermission.h; sourceTree = ""; }; + B3E2F78420E568AA009EA554 /* gioenums.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gioenums.h; sourceTree = ""; }; + B3E2F78520E568AA009EA554 /* gsocketaddressenumerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsocketaddressenumerator.h; sourceTree = ""; }; + B3E2F78620E568AA009EA554 /* gmount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gmount.h; sourceTree = ""; }; + B3E2F78720E568AA009EA554 /* gdbusserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusserver.h; sourceTree = ""; }; + B3E2F78820E568AA009EA554 /* gresource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gresource.h; sourceTree = ""; }; + B3E2F78920E568AA009EA554 /* gdbusconnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusconnection.h; sourceTree = ""; }; + B3E2F78A20E568AA009EA554 /* gtlsconnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtlsconnection.h; sourceTree = ""; }; + B3E2F78B20E568AA009EA554 /* gsettingsbackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsettingsbackend.h; sourceTree = ""; }; + B3E2F78C20E568AA009EA554 /* gdbusintrospection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusintrospection.h; sourceTree = ""; }; + B3E2F78D20E568AA009EA554 /* gfileicon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gfileicon.h; sourceTree = ""; }; + B3E2F78E20E568AA009EA554 /* gsocketaddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsocketaddress.h; sourceTree = ""; }; + B3E2F78F20E568AA009EA554 /* gnetworkservice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gnetworkservice.h; sourceTree = ""; }; + B3E2F79020E568AA009EA554 /* gdbusmenumodel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusmenumodel.h; sourceTree = ""; }; + B3E2F79120E568AA009EA554 /* gmenumodel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gmenumodel.h; sourceTree = ""; }; + B3E2F79220E568AA009EA554 /* gdtlsconnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdtlsconnection.h; sourceTree = ""; }; + B3E2F79320E568AA009EA554 /* gresolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gresolver.h; sourceTree = ""; }; + B3E2F79420E568AA009EA554 /* gproxyaddressenumerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gproxyaddressenumerator.h; sourceTree = ""; }; + B3E2F79520E568AA009EA554 /* ginputstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ginputstream.h; sourceTree = ""; }; + B3E2F79620E568AA009EA554 /* gproxyresolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gproxyresolver.h; sourceTree = ""; }; + B3E2F79720E568AA009EA554 /* gemblem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gemblem.h; sourceTree = ""; }; + B3E2F79820E568AA009EA554 /* gcredentials.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gcredentials.h; sourceTree = ""; }; + B3E2F79920E568AA009EA554 /* gbytesicon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gbytesicon.h; sourceTree = ""; }; + B3E2F79A20E568AA009EA554 /* gdbusobjectmanagerclient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusobjectmanagerclient.h; sourceTree = ""; }; + B3E2F79B20E568AA009EA554 /* gdbusobjectmanagerserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusobjectmanagerserver.h; sourceTree = ""; }; + B3E2F79C20E568AA009EA554 /* gtask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtask.h; sourceTree = ""; }; + B3E2F79D20E568AA009EA554 /* gvolume.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gvolume.h; sourceTree = ""; }; + B3E2F79E20E568AA009EA554 /* gsocketclient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsocketclient.h; sourceTree = ""; }; + B3E2F79F20E568AA009EA554 /* gappinfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gappinfo.h; sourceTree = ""; }; + B3E2F7A020E568AA009EA554 /* gtcpconnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtcpconnection.h; sourceTree = ""; }; + B3E2F7A120E568AA009EA554 /* gpollableutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gpollableutils.h; sourceTree = ""; }; + B3E2F7A220E568AA009EA554 /* gdataoutputstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdataoutputstream.h; sourceTree = ""; }; + B3E2F7A320E568AA009EA554 /* gfilenamecompleter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gfilenamecompleter.h; sourceTree = ""; }; + B3E2F7A420E568AA009EA554 /* gfilteroutputstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gfilteroutputstream.h; sourceTree = ""; }; + B3E2F7A520E568AA009EA554 /* gfileattribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gfileattribute.h; sourceTree = ""; }; + B3E2F7A620E568AA009EA554 /* gmenuexporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gmenuexporter.h; sourceTree = ""; }; + B3E2F7A720E568AA009EA554 /* gthemedicon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gthemedicon.h; sourceTree = ""; }; + B3E2F7A820E568AA009EA554 /* gapplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gapplication.h; sourceTree = ""; }; + B3E2F7A920E568AA009EA554 /* gtlsserverconnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtlsserverconnection.h; sourceTree = ""; }; + B3E2F7AA20E568AA009EA554 /* gfileoutputstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gfileoutputstream.h; sourceTree = ""; }; + B3E2F7AB20E568AA009EA554 /* gdbusobjectmanager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusobjectmanager.h; sourceTree = ""; }; + B3E2F7AC20E568AA009EA554 /* gactiongroupexporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gactiongroupexporter.h; sourceTree = ""; }; + B3E2F7AD20E568AA009EA554 /* gdtlsclientconnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdtlsclientconnection.h; sourceTree = ""; }; + B3E2F7AE20E568AA009EA554 /* gmemoryinputstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gmemoryinputstream.h; sourceTree = ""; }; + B3E2F7AF20E568AA009EA554 /* gioenumtypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gioenumtypes.h; sourceTree = ""; }; + B3E2F7B020E568AB009EA554 /* gbufferedoutputstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gbufferedoutputstream.h; sourceTree = ""; }; + B3E2F7B120E568AB009EA554 /* gliststore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gliststore.h; sourceTree = ""; }; + B3E2F7B220E568AB009EA554 /* gsocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsocket.h; sourceTree = ""; }; + B3E2F7B320E568AB009EA554 /* gmountoperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gmountoperation.h; sourceTree = ""; }; + B3E2F7B420E568AB009EA554 /* gsocketconnectable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsocketconnectable.h; sourceTree = ""; }; + B3E2F7B520E568AB009EA554 /* ginetaddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ginetaddress.h; sourceTree = ""; }; + B3E2F7B620E568AB009EA554 /* gtcpwrapperconnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtcpwrapperconnection.h; sourceTree = ""; }; + B3E2F7B720E568AB009EA554 /* gfileiostream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gfileiostream.h; sourceTree = ""; }; + B3E2F7B820E568AB009EA554 /* gdbusauthobserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusauthobserver.h; sourceTree = ""; }; + B3E2F7B920E568AB009EA554 /* gnotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gnotification.h; sourceTree = ""; }; + B3E2F7BA20E568AB009EA554 /* goutputstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = goutputstream.h; sourceTree = ""; }; + B3E2F7BB20E568AB009EA554 /* ginetsocketaddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ginetsocketaddress.h; sourceTree = ""; }; + B3E2F7BC20E568AB009EA554 /* gcharsetconverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gcharsetconverter.h; sourceTree = ""; }; + B3E2F7BD20E568AB009EA554 /* gdatainputstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdatainputstream.h; sourceTree = ""; }; + B3E2F7BE20E568AB009EA554 /* gtlsdatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtlsdatabase.h; sourceTree = ""; }; + B3E2F7BF20E568AB009EA554 /* gfileenumerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gfileenumerator.h; sourceTree = ""; }; + B3E2F7C020E568AB009EA554 /* ginitable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ginitable.h; sourceTree = ""; }; + B3E2F7C120E568AB009EA554 /* gnativevolumemonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gnativevolumemonitor.h; sourceTree = ""; }; + B3E2F7C220E568AB009EA554 /* gsrvtarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsrvtarget.h; sourceTree = ""; }; + B3E2F7C320E568AB009EA554 /* gtlscertificate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtlscertificate.h; sourceTree = ""; }; + B3E2F7C420E568AB009EA554 /* gfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gfile.h; sourceTree = ""; }; + B3E2F7C520E568AB009EA554 /* gtlsbackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtlsbackend.h; sourceTree = ""; }; + B3E2F7C620E568AB009EA554 /* gpollableinputstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gpollableinputstream.h; sourceTree = ""; }; + B3E2F7C720E568AB009EA554 /* gfilterinputstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gfilterinputstream.h; sourceTree = ""; }; + B3E2F7C820E568AB009EA554 /* gzlibdecompressor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gzlibdecompressor.h; sourceTree = ""; }; + B3E2F7C920E568AB009EA554 /* gdbusutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusutils.h; sourceTree = ""; }; + B3E2F7CA20E568AB009EA554 /* gtestdbus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtestdbus.h; sourceTree = ""; }; + B3E2F7CB20E568AB009EA554 /* gdbusobjectskeleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusobjectskeleton.h; sourceTree = ""; }; + B3E2F7CC20E568AB009EA554 /* gvfs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gvfs.h; sourceTree = ""; }; + B3E2F7CD20E568AB009EA554 /* gioerror.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gioerror.h; sourceTree = ""; }; + B3E2F7CE20E568AB009EA554 /* gtlsclientconnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtlsclientconnection.h; sourceTree = ""; }; + B3E2F7CF20E568AB009EA554 /* gnetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gnetworking.h; sourceTree = ""; }; + B3E2F7D020E568AB009EA554 /* gtlsfiledatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtlsfiledatabase.h; sourceTree = ""; }; + B3E2F7D120E568AB009EA554 /* gdbuserror.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbuserror.h; sourceTree = ""; }; + B3E2F7D220E568AB009EA554 /* gicon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gicon.h; sourceTree = ""; }; + B3E2F7D320E568AB009EA554 /* gdbusinterfaceskeleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusinterfaceskeleton.h; sourceTree = ""; }; + B3E2F7D420E568AB009EA554 /* gapplicationcommandline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gapplicationcommandline.h; sourceTree = ""; }; + B3E2F7D520E568AB009EA554 /* gconverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gconverter.h; sourceTree = ""; }; + B3E2F7D620E568AB009EA554 /* gdtlsserverconnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdtlsserverconnection.h; sourceTree = ""; }; + B3E2F7D720E568AB009EA554 /* gnetworkmonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gnetworkmonitor.h; sourceTree = ""; }; + B3E2F7D820E568AB009EA554 /* gtlspassword.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtlspassword.h; sourceTree = ""; }; + B3E2F7D920E568AB009EA554 /* glistmodel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = glistmodel.h; sourceTree = ""; }; + B3E2F7DA20E568AB009EA554 /* gioscheduler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gioscheduler.h; sourceTree = ""; }; + B3E2F7DB20E568AB009EA554 /* gsettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsettings.h; sourceTree = ""; }; + B3E2F7DC20E568AB009EA554 /* gfileinputstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gfileinputstream.h; sourceTree = ""; }; + B3E2F7DD20E568AB009EA554 /* giotypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = giotypes.h; sourceTree = ""; }; + B3E2F7DE20E568AB009EA554 /* gsimplepermission.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsimplepermission.h; sourceTree = ""; }; + B3E2F7DF20E568AB009EA554 /* gconverteroutputstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gconverteroutputstream.h; sourceTree = ""; }; + B3E2F7E020E568AB009EA554 /* gsimpleaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsimpleaction.h; sourceTree = ""; }; + B3E2F7E120E568AB009EA554 /* gsocketlistener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsocketlistener.h; sourceTree = ""; }; + B3E2F7E220E568AB009EA554 /* gcancellable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gcancellable.h; sourceTree = ""; }; + B3E2F7E320E568AB009EA554 /* gsubprocess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsubprocess.h; sourceTree = ""; }; + B3E2F7E420E568AB009EA554 /* gemblemedicon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gemblemedicon.h; sourceTree = ""; }; + B3E2F7E520E568AB009EA554 /* gsettingsschema.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsettingsschema.h; sourceTree = ""; }; + B3E2F7E620E568AB009EA554 /* gfileinfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gfileinfo.h; sourceTree = ""; }; + B3E2F7E720E568AB009EA554 /* gsimpleasyncresult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsimpleasyncresult.h; sourceTree = ""; }; + B3E2F7E820E568AB009EA554 /* gdbusactiongroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbusactiongroup.h; sourceTree = ""; }; + B3E2F7E920E568AB009EA554 /* gdrive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdrive.h; sourceTree = ""; }; + B3E2F7EA20E568AB009EA554 /* gactiongroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gactiongroup.h; sourceTree = ""; }; + B3E2F7EB20E568AB009EA554 /* ginetaddressmask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ginetaddressmask.h; sourceTree = ""; }; + B3E2F7EC20E568AB009EA554 /* gsocketconnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gsocketconnection.h; sourceTree = ""; }; + B3E2F7ED20E568AB009EA554 /* giostream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = giostream.h; sourceTree = ""; }; + B3E2F7EE20E568AB009EA554 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + B3E2F7EF20E568AB009EA554 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; + B3E2F7F020E568AB009EA554 /* NEWS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NEWS; sourceTree = ""; }; + B3E2F7F220E568AB009EA554 /* libgmodule-2.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libgmodule-2.0.dylib"; sourceTree = ""; }; + B3E2F7F320E568AB009EA554 /* libgmodule-2.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libgmodule-2.0.a"; sourceTree = ""; }; + B3E2F7F420E568AB009EA554 /* libgthread-2.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libgthread-2.0.dylib"; sourceTree = ""; }; + B3E2F7F520E568AB009EA554 /* libgobject-2.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libgobject-2.0.a"; sourceTree = ""; }; + B3E2F7F720E568AB009EA554 /* gio-2.0.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "gio-2.0.pc"; sourceTree = ""; }; + B3E2F7F820E568AB009EA554 /* gio-unix-2.0.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "gio-unix-2.0.pc"; sourceTree = ""; }; + B3E2F7F920E568AB009EA554 /* gobject-2.0.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "gobject-2.0.pc"; sourceTree = ""; }; + B3E2F7FA20E568AB009EA554 /* glib-2.0.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "glib-2.0.pc"; sourceTree = ""; }; + B3E2F7FB20E568AB009EA554 /* gmodule-export-2.0.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "gmodule-export-2.0.pc"; sourceTree = ""; }; + B3E2F7FC20E568AB009EA554 /* gthread-2.0.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "gthread-2.0.pc"; sourceTree = ""; }; + B3E2F7FD20E568AB009EA554 /* gmodule-no-export-2.0.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "gmodule-no-export-2.0.pc"; sourceTree = ""; }; + B3E2F7FE20E568AB009EA554 /* gmodule-2.0.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "gmodule-2.0.pc"; sourceTree = ""; }; + B3E2F7FF20E568AB009EA554 /* libgobject-2.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libgobject-2.0.dylib"; sourceTree = ""; }; + B3E2F80020E568AB009EA554 /* libglib-2.0.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libglib-2.0.0.dylib"; sourceTree = ""; }; + B3E2F80120E568AB009EA554 /* libgio-2.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libgio-2.0.dylib"; sourceTree = ""; }; + B3E2F80220E568AB009EA554 /* libglib-2.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libglib-2.0.dylib"; sourceTree = ""; }; + B3E2F80320E568AB009EA554 /* libgobject-2.0.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libgobject-2.0.0.dylib"; sourceTree = ""; }; + B3E2F80420E568AB009EA554 /* libglib-2.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libglib-2.0.a"; sourceTree = ""; }; + B3E2F80520E568AB009EA554 /* libgmodule-2.0.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libgmodule-2.0.0.dylib"; sourceTree = ""; }; + B3E2F80620E568AB009EA554 /* libgio-2.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libgio-2.0.a"; sourceTree = ""; }; + B3E2F80720E568AB009EA554 /* libgthread-2.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libgthread-2.0.a"; sourceTree = ""; }; + B3E2F80820E568AB009EA554 /* libgthread-2.0.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libgthread-2.0.0.dylib"; sourceTree = ""; }; + B3E2F80B20E568AB009EA554 /* glibconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = glibconfig.h; sourceTree = ""; }; + B3E2F80C20E568AB009EA554 /* libgio-2.0.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libgio-2.0.0.dylib"; sourceTree = ""; }; + B3E2F80F20E568AB009EA554 /* gsettings.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gsettings.m4; sourceTree = ""; }; + B3E2F81020E568AB009EA554 /* glib-2.0.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "glib-2.0.m4"; sourceTree = ""; }; + B3E2F81120E568AB009EA554 /* glib-gettext.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "glib-gettext.m4"; sourceTree = ""; }; + B3E2F81F20E568AB009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F82220E568AB009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F82520E568AB009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F82820E568AB009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F82B20E568AB009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F82E20E568AB009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F83120E568AB009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F83420E568AB009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F83720E568AB009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F83A20E568AB009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F83D20E568AB009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F84020E568AB009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F84320E568AB009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F84620E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F84920E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F84C20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F84F20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F85220E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F85520E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F85820E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F85B20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F85E20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F86120E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F86420E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F86720E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F86A20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F86D20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F87020E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F87320E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F87620E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F87920E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F87C20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F87F20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F88220E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F88520E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F88820E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F88B20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F88E20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F89120E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F89420E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F89720E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F89A20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F89D20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8A020E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8A320E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8A620E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8A920E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8AC20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8AF20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8B220E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8B520E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8B820E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8BB20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8BE20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8C120E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8C420E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8C720E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8CA20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8CD20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8D020E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8D320E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8D620E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8D920E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8DC20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8DF20E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8E220E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8E520E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8E820E568AC009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8EB20E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8EE20E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8F120E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8F420E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8F720E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8FA20E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F8FD20E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F90020E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F90320E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F90620E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F90920E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F90C20E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F90F20E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F91220E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F91520E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F91820E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F91B20E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F91E20E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F92120E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F92420E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F92720E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F92A20E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F92D20E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F93020E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F93320E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F93620E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F93920E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F93C20E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F93F20E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F94220E568AD009EA554 /* glib20.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = glib20.mo; sourceTree = ""; }; + B3E2F94520E568AD009EA554 /* gschema.its */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = gschema.its; sourceTree = ""; }; + B3E2F94620E568AD009EA554 /* gschema.loc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = gschema.loc; sourceTree = ""; }; + B3E2F94920E568AD009EA554 /* gobject_gdb.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = gobject_gdb.py; sourceTree = ""; }; + B3E2F94A20E568AD009EA554 /* glib_gdb.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = glib_gdb.py; sourceTree = ""; }; + B3E2F94C20E568AD009EA554 /* config.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = config.py; sourceTree = ""; }; + B3E2F94D20E568AD009EA554 /* codegen_docbook.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = codegen_docbook.py; sourceTree = ""; }; + B3E2F94E20E568AD009EA554 /* __init__.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = __init__.py; sourceTree = ""; }; + B3E2F94F20E568AD009EA554 /* parser.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = parser.py; sourceTree = ""; }; + B3E2F95020E568AD009EA554 /* utils.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = utils.py; sourceTree = ""; }; + B3E2F95120E568AD009EA554 /* codegen_main.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = codegen_main.py; sourceTree = ""; }; + B3E2F95220E568AD009EA554 /* dbustypes.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = dbustypes.py; sourceTree = ""; }; + B3E2F95320E568AD009EA554 /* codegen.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = codegen.py; sourceTree = ""; }; + B3E2F95520E568AD009EA554 /* gschema.dtd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = gschema.dtd; sourceTree = ""; }; + B3E2F95820E568AD009EA554 /* Makefile.in.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Makefile.in.in; sourceTree = ""; }; + B3E2F95A20E568AD009EA554 /* glib.supp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = glib.supp; sourceTree = ""; }; + B3E2F95D20E568AD009EA554 /* gsettings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gsettings; sourceTree = ""; }; + B3E2F95E20E568AD009EA554 /* gapplication */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gapplication; sourceTree = ""; }; + B3E2F95F20E568AD009EA554 /* gresource */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gresource; sourceTree = ""; }; + B3E2F96020E568AD009EA554 /* gdbus */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gdbus; sourceTree = ""; }; + B3E2F96320E568AD009EA554 /* INSTALL_RECEIPT.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = INSTALL_RECEIPT.json; sourceTree = ""; }; + B3E2F96520E568AD009EA554 /* cairo-trace */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "cairo-trace"; sourceTree = ""; }; + B3E2F96620E568AD009EA554 /* cairo-sphinx */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "cairo-sphinx"; sourceTree = ""; }; + B3E2F96820E568AD009EA554 /* cairo.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = cairo.rb; sourceTree = ""; }; + B3E2F96920E568AD009EA554 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = ""; }; + B3E2F96A20E568AD009EA554 /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUTHORS; sourceTree = ""; }; + B3E2F96D20E568AD009EA554 /* cairo-version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cairo-version.h"; sourceTree = ""; }; + B3E2F96E20E568AD009EA554 /* cairo-script-interpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cairo-script-interpreter.h"; sourceTree = ""; }; + B3E2F96F20E568AD009EA554 /* cairo-svg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cairo-svg.h"; sourceTree = ""; }; + B3E2F97020E568AD009EA554 /* cairo-quartz-image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cairo-quartz-image.h"; sourceTree = ""; }; + B3E2F97120E568AD009EA554 /* cairo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cairo.h; sourceTree = ""; }; + B3E2F97220E568AD009EA554 /* cairo-script.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cairo-script.h"; sourceTree = ""; }; + B3E2F97320E568AD009EA554 /* cairo-quartz.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cairo-quartz.h"; sourceTree = ""; }; + B3E2F97420E568AD009EA554 /* cairo-deprecated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cairo-deprecated.h"; sourceTree = ""; }; + B3E2F97520E568AD009EA554 /* cairo-pdf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cairo-pdf.h"; sourceTree = ""; }; + B3E2F97620E568AD009EA554 /* cairo-features.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cairo-features.h"; sourceTree = ""; }; + B3E2F97720E568AD009EA554 /* cairo-gobject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cairo-gobject.h"; sourceTree = ""; }; + B3E2F97820E568AE009EA554 /* cairo-tee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cairo-tee.h"; sourceTree = ""; }; + B3E2F97920E568AE009EA554 /* cairo-ft.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cairo-ft.h"; sourceTree = ""; }; + B3E2F97A20E568AE009EA554 /* cairo-ps.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cairo-ps.h"; sourceTree = ""; }; + B3E2F97B20E568AE009EA554 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + B3E2F97C20E568AE009EA554 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; + B3E2F97D20E568AE009EA554 /* NEWS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NEWS; sourceTree = ""; }; + B3E2F97F20E568AE009EA554 /* libcairo.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libcairo.a; sourceTree = ""; }; + B3E2F98120E568AE009EA554 /* cairo-ft.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "cairo-ft.pc"; sourceTree = ""; }; + B3E2F98220E568AE009EA554 /* cairo-quartz-image.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "cairo-quartz-image.pc"; sourceTree = ""; }; + B3E2F98320E568AE009EA554 /* cairo-tee.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "cairo-tee.pc"; sourceTree = ""; }; + B3E2F98420E568AE009EA554 /* cairo-gobject.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "cairo-gobject.pc"; sourceTree = ""; }; + B3E2F98520E568AE009EA554 /* cairo-pdf.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "cairo-pdf.pc"; sourceTree = ""; }; + B3E2F98620E568AE009EA554 /* cairo-fc.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "cairo-fc.pc"; sourceTree = ""; }; + B3E2F98720E568AE009EA554 /* cairo.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cairo.pc; sourceTree = ""; }; + B3E2F98820E568AE009EA554 /* cairo-png.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "cairo-png.pc"; sourceTree = ""; }; + B3E2F98920E568AE009EA554 /* cairo-svg.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "cairo-svg.pc"; sourceTree = ""; }; + B3E2F98A20E568AE009EA554 /* cairo-quartz.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "cairo-quartz.pc"; sourceTree = ""; }; + B3E2F98B20E568AE009EA554 /* cairo-quartz-font.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "cairo-quartz-font.pc"; sourceTree = ""; }; + B3E2F98C20E568AE009EA554 /* cairo-ps.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "cairo-ps.pc"; sourceTree = ""; }; + B3E2F98D20E568AE009EA554 /* cairo-script.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "cairo-script.pc"; sourceTree = ""; }; + B3E2F98E20E568AE009EA554 /* libcairo.2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libcairo.2.dylib; sourceTree = ""; }; + B3E2F98F20E568AE009EA554 /* libcairo-gobject.2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libcairo-gobject.2.dylib"; sourceTree = ""; }; + B3E2F99020E568AE009EA554 /* libcairo.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libcairo.dylib; sourceTree = ""; }; + B3E2F99120E568AE009EA554 /* libcairo-script-interpreter.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libcairo-script-interpreter.dylib"; sourceTree = ""; }; + B3E2F99320E568AE009EA554 /* cairo-fdr.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "cairo-fdr.a"; sourceTree = ""; }; + B3E2F99420E568AE009EA554 /* cairo-sphinx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "cairo-sphinx.a"; sourceTree = ""; }; + B3E2F99720E568AE009EA554 /* libcairo-trace.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libcairo-trace.a"; sourceTree = ""; }; + B3E2F99920E568AE009EA554 /* libcairo-trace.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libcairo-trace.0.dylib"; sourceTree = ""; }; + B3E2F99B20E568AE009EA554 /* libcairo-trace.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libcairo-trace.dylib"; sourceTree = ""; }; + B3E2F99C20E568AE009EA554 /* libcairo-script-interpreter.2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libcairo-script-interpreter.2.dylib"; sourceTree = ""; }; + B3E2F99D20E568AE009EA554 /* libcairo-gobject.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libcairo-gobject.dylib"; sourceTree = ""; }; + B3E2F99E20E568AE009EA554 /* libcairo-gobject.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libcairo-gobject.a"; sourceTree = ""; }; + B3E2F99F20E568AE009EA554 /* libcairo-script-interpreter.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libcairo-script-interpreter.a"; sourceTree = ""; }; + B3E2F9A420E568AE009EA554 /* cairo-surfaces.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-surfaces.html"; sourceTree = ""; }; + B3E2F9A520E568AE009EA554 /* cairo-Win32-Fonts.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-Win32-Fonts.html"; sourceTree = ""; }; + B3E2F9A620E568AE009EA554 /* cairo-cairo-font-face-t.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-cairo-font-face-t.html"; sourceTree = ""; }; + B3E2F9A720E568AE009EA554 /* up-insensitive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "up-insensitive.png"; sourceTree = ""; }; + B3E2F9A820E568AE009EA554 /* cairo-PNG-Support.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-PNG-Support.html"; sourceTree = ""; }; + B3E2F9A920E568AE009EA554 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = ""; }; + B3E2F9AA20E568AE009EA554 /* index-1.10.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "index-1.10.html"; sourceTree = ""; }; + B3E2F9AB20E568AE009EA554 /* bindings-patterns.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "bindings-patterns.html"; sourceTree = ""; }; + B3E2F9AC20E568AE009EA554 /* cairo-User-Fonts.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-User-Fonts.html"; sourceTree = ""; }; + B3E2F9AD20E568AE009EA554 /* bindings-return-values.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "bindings-return-values.html"; sourceTree = ""; }; + B3E2F9AE20E568AE009EA554 /* cairo-cairo-surface-t.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-cairo-surface-t.html"; sourceTree = ""; }; + B3E2F9AF20E568AE009EA554 /* cairo-Quartz-Surfaces.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-Quartz-Surfaces.html"; sourceTree = ""; }; + B3E2F9B020E568AE009EA554 /* cairo-text.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-text.html"; sourceTree = ""; }; + B3E2F9B120E568AE009EA554 /* up.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = up.png; sourceTree = ""; }; + B3E2F9B220E568AE009EA554 /* cairo-PDF-Surfaces.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-PDF-Surfaces.html"; sourceTree = ""; }; + B3E2F9B320E568AE009EA554 /* cairo-Regions.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-Regions.html"; sourceTree = ""; }; + B3E2F9B420E568AE009EA554 /* cairo-Types.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-Types.html"; sourceTree = ""; }; + B3E2F9B520E568AE009EA554 /* bindings-streams.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "bindings-streams.html"; sourceTree = ""; }; + B3E2F9B620E568AE009EA554 /* cairo-cairo-pattern-t.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-cairo-pattern-t.html"; sourceTree = ""; }; + B3E2F9B720E568AE009EA554 /* index-all.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "index-all.html"; sourceTree = ""; }; + B3E2F9B820E568AE009EA554 /* right-insensitive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "right-insensitive.png"; sourceTree = ""; }; + B3E2F9B920E568AE009EA554 /* index-1.6.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "index-1.6.html"; sourceTree = ""; }; + B3E2F9BA20E568AE009EA554 /* home.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = home.png; sourceTree = ""; }; + B3E2F9BB20E568AE009EA554 /* cairo-XLib-Surfaces.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-XLib-Surfaces.html"; sourceTree = ""; }; + B3E2F9BC20E568AE009EA554 /* cairo-support.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-support.html"; sourceTree = ""; }; + B3E2F9BD20E568AE009EA554 /* language-bindings.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "language-bindings.html"; sourceTree = ""; }; + B3E2F9BE20E568AE009EA554 /* cairo-Error-handling.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-Error-handling.html"; sourceTree = ""; }; + B3E2F9BF20E568AE009EA554 /* cairo-XCB-Surfaces.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-XCB-Surfaces.html"; sourceTree = ""; }; + B3E2F9C020E568AE009EA554 /* cairo-Script-Surfaces.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-Script-Surfaces.html"; sourceTree = ""; }; + B3E2F9C120E568AE009EA554 /* cairo-Paths.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-Paths.html"; sourceTree = ""; }; + B3E2F9C220E568AE009EA554 /* cairo-XLib-XRender-Backend.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-XLib-XRender-Backend.html"; sourceTree = ""; }; + B3E2F9C320E568AE009EA554 /* left.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = left.png; sourceTree = ""; }; + B3E2F9C420E568AE009EA554 /* cairo-Transformations.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-Transformations.html"; sourceTree = ""; }; + B3E2F9C520E568AE009EA554 /* cairo-Win32-Surfaces.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-Win32-Surfaces.html"; sourceTree = ""; }; + B3E2F9C620E568AE009EA554 /* cairo-cairo-font-options-t.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-cairo-font-options-t.html"; sourceTree = ""; }; + B3E2F9C720E568AE009EA554 /* cairo-FreeType-Fonts.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-FreeType-Fonts.html"; sourceTree = ""; }; + B3E2F9C820E568AE009EA554 /* bindings-errors.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "bindings-errors.html"; sourceTree = ""; }; + B3E2F9C920E568AE009EA554 /* cairo-Raster-Sources.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-Raster-Sources.html"; sourceTree = ""; }; + B3E2F9CA20E568AE009EA554 /* cairo-drawing.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-drawing.html"; sourceTree = ""; }; + B3E2F9CB20E568AE009EA554 /* cairo-cairo-device-t.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-cairo-device-t.html"; sourceTree = ""; }; + B3E2F9CC20E568AE009EA554 /* cairo.devhelp2 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = cairo.devhelp2; sourceTree = ""; }; + B3E2F9CD20E568AE009EA554 /* index-1.4.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "index-1.4.html"; sourceTree = ""; }; + B3E2F9CE20E568AE009EA554 /* style.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = style.css; sourceTree = ""; }; + B3E2F9CF20E568AE009EA554 /* index-1.14.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "index-1.14.html"; sourceTree = ""; }; + B3E2F9D020E568AE009EA554 /* bindings-fonts.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "bindings-fonts.html"; sourceTree = ""; }; + B3E2F9D120E568AE009EA554 /* index-1.8.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "index-1.8.html"; sourceTree = ""; }; + B3E2F9D220E568AE009EA554 /* cairo-Image-Surfaces.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-Image-Surfaces.html"; sourceTree = ""; }; + B3E2F9D320E568AE009EA554 /* bindings-overloading.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "bindings-overloading.html"; sourceTree = ""; }; + B3E2F9D420E568AE009EA554 /* cairo-cairo-scaled-font-t.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-cairo-scaled-font-t.html"; sourceTree = ""; }; + B3E2F9D520E568AE009EA554 /* cairo-Quartz-(CGFont)-Fonts.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-Quartz-(CGFont)-Fonts.html"; sourceTree = ""; }; + B3E2F9D620E568AE009EA554 /* left-insensitive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "left-insensitive.png"; sourceTree = ""; }; + B3E2F9D720E568AE009EA554 /* bindings-path.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "bindings-path.html"; sourceTree = ""; }; + B3E2F9D820E568AE009EA554 /* cairo-SVG-Surfaces.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-SVG-Surfaces.html"; sourceTree = ""; }; + B3E2F9D920E568AE009EA554 /* cairo-fonts.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-fonts.html"; sourceTree = ""; }; + B3E2F9DA20E568AE009EA554 /* index-1.12.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "index-1.12.html"; sourceTree = ""; }; + B3E2F9DB20E568AE009EA554 /* cairo-cairo-t.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-cairo-t.html"; sourceTree = ""; }; + B3E2F9DC20E568AE009EA554 /* bindings-surfaces.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "bindings-surfaces.html"; sourceTree = ""; }; + B3E2F9DD20E568AE009EA554 /* cairo-Recording-Surfaces.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-Recording-Surfaces.html"; sourceTree = ""; }; + B3E2F9DE20E568AE009EA554 /* cairo-Version-Information.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-Version-Information.html"; sourceTree = ""; }; + B3E2F9DF20E568AE009EA554 /* right.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = right.png; sourceTree = ""; }; + B3E2F9E020E568AE009EA554 /* cairo-PostScript-Surfaces.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-PostScript-Surfaces.html"; sourceTree = ""; }; + B3E2F9E120E568AE009EA554 /* bindings-memory.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "bindings-memory.html"; sourceTree = ""; }; + B3E2F9E220E568AE009EA554 /* index-1.2.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "index-1.2.html"; sourceTree = ""; }; + B3E2F9E320E568AE009EA554 /* cairo-cairo-matrix-t.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "cairo-cairo-matrix-t.html"; sourceTree = ""; }; + B3E2F9E620E568AE009EA554 /* INSTALL_RECEIPT.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = INSTALL_RECEIPT.json; sourceTree = ""; }; + B3E2F9E820E568AE009EA554 /* fc-list */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "fc-list"; sourceTree = ""; }; + B3E2F9E920E568AE009EA554 /* fc-pattern */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "fc-pattern"; sourceTree = ""; }; + B3E2F9EA20E568AE009EA554 /* fc-validate */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "fc-validate"; sourceTree = ""; }; + B3E2F9EB20E568AE009EA554 /* fc-query */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "fc-query"; sourceTree = ""; }; + B3E2F9EC20E568AE009EA554 /* fc-cache */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "fc-cache"; sourceTree = ""; }; + B3E2F9ED20E568AE009EA554 /* fc-cat */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "fc-cat"; sourceTree = ""; }; + B3E2F9EE20E568AE009EA554 /* fc-match */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "fc-match"; sourceTree = ""; }; + B3E2F9EF20E568AE009EA554 /* fc-conflist */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "fc-conflist"; sourceTree = ""; }; + B3E2F9F020E568AE009EA554 /* fc-scan */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "fc-scan"; sourceTree = ""; }; + B3E2F9F220E568AE009EA554 /* fontconfig.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = fontconfig.rb; sourceTree = ""; }; + B3E2F9F320E568AE009EA554 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = ""; }; + B3E2F9F420E568AE009EA554 /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUTHORS; sourceTree = ""; }; + B3E2F9F720E568AE009EA554 /* fontconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fontconfig.h; sourceTree = ""; }; + B3E2F9F820E568AE009EA554 /* fcprivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fcprivate.h; sourceTree = ""; }; + B3E2F9F920E568AE009EA554 /* fcfreetype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fcfreetype.h; sourceTree = ""; }; + B3E2F9FA20E568AE009EA554 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + B3E2F9FB20E568AE009EA554 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; + B3E2F9FC20E568AE009EA554 /* NEWS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NEWS; sourceTree = ""; }; + B3E2F9FF20E568AE009EA554 /* fontconfig.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fontconfig.pc; sourceTree = ""; }; + B3E2FA0020E568AE009EA554 /* libfontconfig.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libfontconfig.dylib; sourceTree = ""; }; + B3E2FA0120E568AE009EA554 /* libfontconfig.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libfontconfig.1.dylib; sourceTree = ""; }; + B3E2FA0220E568AE009EA554 /* libfontconfig.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libfontconfig.a; sourceTree = ""; }; + B3E2FA0620E568AE009EA554 /* fonts.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = fonts.conf; sourceTree = ""; }; + B3E2FA0820E568AE009EA554 /* 65-nonlatin.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "65-nonlatin.conf"; sourceTree = ""; }; + B3E2FA0920E568AE009EA554 /* 30-metric-aliases.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "30-metric-aliases.conf"; sourceTree = ""; }; + B3E2FA0A20E568AE009EA554 /* 80-delicious.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "80-delicious.conf"; sourceTree = ""; }; + B3E2FA0B20E568AE009EA554 /* 20-unhint-small-vera.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "20-unhint-small-vera.conf"; sourceTree = ""; }; + B3E2FA0C20E568AE009EA554 /* 65-fonts-persian.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "65-fonts-persian.conf"; sourceTree = ""; }; + B3E2FA0D20E568AE009EA554 /* 10-hinting-slight.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "10-hinting-slight.conf"; sourceTree = ""; }; + B3E2FA0E20E568AE009EA554 /* 51-local.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "51-local.conf"; sourceTree = ""; }; + B3E2FA0F20E568AE009EA554 /* 45-latin.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "45-latin.conf"; sourceTree = ""; }; + B3E2FA1020E568AE009EA554 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + B3E2FA1120E568AE009EA554 /* 49-sansserif.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "49-sansserif.conf"; sourceTree = ""; }; + B3E2FA1220E568AE009EA554 /* 40-nonlatin.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "40-nonlatin.conf"; sourceTree = ""; }; + B3E2FA1320E568AE009EA554 /* 60-latin.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "60-latin.conf"; sourceTree = ""; }; + B3E2FA1420E568AE009EA554 /* 60-generic.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "60-generic.conf"; sourceTree = ""; }; + B3E2FA1520E568AE009EA554 /* 45-generic.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "45-generic.conf"; sourceTree = ""; }; + B3E2FA1620E568AE009EA554 /* 69-unifont.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "69-unifont.conf"; sourceTree = ""; }; + B3E2FA1720E568AE009EA554 /* 50-user.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "50-user.conf"; sourceTree = ""; }; + B3E2FA1820E568AE009EA554 /* 10-scale-bitmap-fonts.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "10-scale-bitmap-fonts.conf"; sourceTree = ""; }; + B3E2FA1920E568AE009EA554 /* 90-synthetic.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "90-synthetic.conf"; sourceTree = ""; }; + B3E2FA1D20E568AE009EA554 /* fonts-conf.5 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "fonts-conf.5"; sourceTree = ""; }; + B3E2FA1F20E568AE009EA554 /* FcDefaultSubstitute.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcDefaultSubstitute.3; sourceTree = ""; }; + B3E2FA2020E568AE009EA554 /* FcIsLower.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcIsLower.3; sourceTree = ""; }; + B3E2FA2120E568AE009EA554 /* FcStrCmpIgnoreCase.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrCmpIgnoreCase.3; sourceTree = ""; }; + B3E2FA2220E568AE009EA554 /* FcLangGetCharSet.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcLangGetCharSet.3; sourceTree = ""; }; + B3E2FA2320E568AE009EA554 /* FcCharSetSubtractCount.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetSubtractCount.3; sourceTree = ""; }; + B3E2FA2420E568AF009EA554 /* FcDirScan.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcDirScan.3; sourceTree = ""; }; + B3E2FA2520E568AF009EA554 /* FcStrStrIgnoreCase.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrStrIgnoreCase.3; sourceTree = ""; }; + B3E2FA2620E568AF009EA554 /* FcPatternAdd-Type.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "FcPatternAdd-Type.3"; sourceTree = ""; }; + B3E2FA2720E568AF009EA554 /* FcLangSetCreate.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcLangSetCreate.3; sourceTree = ""; }; + B3E2FA2820E568AF009EA554 /* FcCharSetSubtract.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetSubtract.3; sourceTree = ""; }; + B3E2FA2920E568AF009EA554 /* FcCacheCopySet.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCacheCopySet.3; sourceTree = ""; }; + B3E2FA2A20E568AF009EA554 /* FcFreeTypeCharSetAndSpacing.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFreeTypeCharSetAndSpacing.3; sourceTree = ""; }; + B3E2FA2B20E568AF009EA554 /* FcConfigReference.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigReference.3; sourceTree = ""; }; + B3E2FA2C20E568AF009EA554 /* FcConfigGetBlanks.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigGetBlanks.3; sourceTree = ""; }; + B3E2FA2D20E568AF009EA554 /* FcConfigGetConfigFiles.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigGetConfigFiles.3; sourceTree = ""; }; + B3E2FA2E20E568AF009EA554 /* FcDirCacheLoadFile.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcDirCacheLoadFile.3; sourceTree = ""; }; + B3E2FA2F20E568AF009EA554 /* FcCharSetDestroy.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetDestroy.3; sourceTree = ""; }; + B3E2FA3020E568AF009EA554 /* FcNameParse.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcNameParse.3; sourceTree = ""; }; + B3E2FA3120E568AF009EA554 /* FcCharSetIntersectCount.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetIntersectCount.3; sourceTree = ""; }; + B3E2FA3220E568AF009EA554 /* FcRangeCreateDouble.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcRangeCreateDouble.3; sourceTree = ""; }; + B3E2FA3320E568AF009EA554 /* FcCacheCreateTagFile.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCacheCreateTagFile.3; sourceTree = ""; }; + B3E2FA3420E568AF009EA554 /* FcMatrixMultiply.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcMatrixMultiply.3; sourceTree = ""; }; + B3E2FA3520E568AF009EA554 /* FcConfigGetConfigDirs.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigGetConfigDirs.3; sourceTree = ""; }; + B3E2FA3620E568AF009EA554 /* FcNameUnregisterObjectTypes.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcNameUnregisterObjectTypes.3; sourceTree = ""; }; + B3E2FA3720E568AF009EA554 /* FcConfigGetFontDirs.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigGetFontDirs.3; sourceTree = ""; }; + B3E2FA3820E568AF009EA554 /* FcCharSetEqual.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetEqual.3; sourceTree = ""; }; + B3E2FA3920E568AF009EA554 /* FcConfigSubstitute.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigSubstitute.3; sourceTree = ""; }; + B3E2FA3A20E568AF009EA554 /* FcCharSetAddChar.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetAddChar.3; sourceTree = ""; }; + B3E2FA3B20E568AF009EA554 /* FcConfigDestroy.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigDestroy.3; sourceTree = ""; }; + B3E2FA3C20E568AF009EA554 /* FcFontSetSortDestroy.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFontSetSortDestroy.3; sourceTree = ""; }; + B3E2FA3D20E568AF009EA554 /* FcFini.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFini.3; sourceTree = ""; }; + B3E2FA3E20E568AF009EA554 /* FcPatternRemove.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcPatternRemove.3; sourceTree = ""; }; + B3E2FA3F20E568AF009EA554 /* FcDirCacheValid.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcDirCacheValid.3; sourceTree = ""; }; + B3E2FA4020E568AF009EA554 /* FcConfigEnableHome.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigEnableHome.3; sourceTree = ""; }; + B3E2FA4120E568AF009EA554 /* FcFileIsDir.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFileIsDir.3; sourceTree = ""; }; + B3E2FA4220E568AF009EA554 /* FcGetLangs.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcGetLangs.3; sourceTree = ""; }; + B3E2FA4320E568AF009EA554 /* FcPatternDuplicate.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcPatternDuplicate.3; sourceTree = ""; }; + B3E2FA4420E568AF009EA554 /* FcFreeTypeQueryAll.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFreeTypeQueryAll.3; sourceTree = ""; }; + B3E2FA4520E568AF009EA554 /* FcCacheNumFont.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCacheNumFont.3; sourceTree = ""; }; + B3E2FA4620E568AF009EA554 /* FcNameRegisterConstants.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcNameRegisterConstants.3; sourceTree = ""; }; + B3E2FA4720E568AF009EA554 /* FcInitLoadConfigAndFonts.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcInitLoadConfigAndFonts.3; sourceTree = ""; }; + B3E2FA4820E568AF009EA554 /* FcPatternEqualSubset.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcPatternEqualSubset.3; sourceTree = ""; }; + B3E2FA4920E568AF009EA554 /* FcObjectSetBuild.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcObjectSetBuild.3; sourceTree = ""; }; + B3E2FA4A20E568AF009EA554 /* FcCharSetHasChar.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetHasChar.3; sourceTree = ""; }; + B3E2FA4B20E568AF009EA554 /* FcFontSetList.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFontSetList.3; sourceTree = ""; }; + B3E2FA4C20E568AF009EA554 /* FcInitLoadConfig.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcInitLoadConfig.3; sourceTree = ""; }; + B3E2FA4D20E568AF009EA554 /* FcConfigSetRescanInterval.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigSetRescanInterval.3; sourceTree = ""; }; + B3E2FA4E20E568AF009EA554 /* FcCacheSubdir.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCacheSubdir.3; sourceTree = ""; }; + B3E2FA4F20E568AF009EA554 /* FcFreeTypeCharSet.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFreeTypeCharSet.3; sourceTree = ""; }; + B3E2FA5020E568AF009EA554 /* FcLangSetUnion.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcLangSetUnion.3; sourceTree = ""; }; + B3E2FA5120E568AF009EA554 /* FcPatternGet-Type.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "FcPatternGet-Type.3"; sourceTree = ""; }; + B3E2FA5220E568AF009EA554 /* FcCharSetCount.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetCount.3; sourceTree = ""; }; + B3E2FA5320E568AF009EA554 /* FcConfigParseAndLoadFromMemory.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigParseAndLoadFromMemory.3; sourceTree = ""; }; + B3E2FA5420E568AF009EA554 /* FcToLower.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcToLower.3; sourceTree = ""; }; + B3E2FA5520E568AF009EA554 /* FcMatrixEqual.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcMatrixEqual.3; sourceTree = ""; }; + B3E2FA5620E568AF009EA554 /* FcConfigAppFontAddFile.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigAppFontAddFile.3; sourceTree = ""; }; + B3E2FA5720E568AF009EA554 /* FcFontMatch.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFontMatch.3; sourceTree = ""; }; + B3E2FA5820E568AF009EA554 /* FcPatternGet.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcPatternGet.3; sourceTree = ""; }; + B3E2FA5920E568AF009EA554 /* FcMatrixRotate.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcMatrixRotate.3; sourceTree = ""; }; + B3E2FA5A20E568AF009EA554 /* FcValueEqual.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcValueEqual.3; sourceTree = ""; }; + B3E2FA5B20E568AF009EA554 /* FcStrSetDel.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrSetDel.3; sourceTree = ""; }; + B3E2FA5C20E568AF009EA554 /* FcStrListNext.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrListNext.3; sourceTree = ""; }; + B3E2FA5D20E568AF009EA554 /* FcAtomicDeleteNew.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcAtomicDeleteNew.3; sourceTree = ""; }; + B3E2FA5E20E568AF009EA554 /* FcLangSetDel.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcLangSetDel.3; sourceTree = ""; }; + B3E2FA5F20E568AF009EA554 /* FcStrSetMember.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrSetMember.3; sourceTree = ""; }; + B3E2FA6020E568AF009EA554 /* FcPatternBuild.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcPatternBuild.3; sourceTree = ""; }; + B3E2FA6120E568AF009EA554 /* FcCharSetIntersect.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetIntersect.3; sourceTree = ""; }; + B3E2FA6220E568AF009EA554 /* FcPatternEqual.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcPatternEqual.3; sourceTree = ""; }; + B3E2FA6320E568AF009EA554 /* FcStrStr.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrStr.3; sourceTree = ""; }; + B3E2FA6420E568AF009EA554 /* FcStrSetCreate.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrSetCreate.3; sourceTree = ""; }; + B3E2FA6520E568AF009EA554 /* FcDirCacheLoad.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcDirCacheLoad.3; sourceTree = ""; }; + B3E2FA6620E568AF009EA554 /* FcStrFree.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrFree.3; sourceTree = ""; }; + B3E2FA6720E568AF009EA554 /* FcWeightFromOpenTypeDouble.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcWeightFromOpenTypeDouble.3; sourceTree = ""; }; + B3E2FA6820E568AF009EA554 /* FcMatrixScale.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcMatrixScale.3; sourceTree = ""; }; + B3E2FA6920E568AF009EA554 /* FcFontRenderPrepare.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFontRenderPrepare.3; sourceTree = ""; }; + B3E2FA6A20E568AF009EA554 /* FcAtomicReplaceOrig.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcAtomicReplaceOrig.3; sourceTree = ""; }; + B3E2FA6B20E568AF009EA554 /* FcFontSetSort.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFontSetSort.3; sourceTree = ""; }; + B3E2FA6C20E568AF009EA554 /* FcMatrixShear.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcMatrixShear.3; sourceTree = ""; }; + B3E2FA6D20E568AF009EA554 /* FcWeightToOpenTypeDouble.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcWeightToOpenTypeDouble.3; sourceTree = ""; }; + B3E2FA6E20E568AF009EA554 /* FcInitReinitialize.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcInitReinitialize.3; sourceTree = ""; }; + B3E2FA6F20E568AF009EA554 /* FcCacheNumSubdir.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCacheNumSubdir.3; sourceTree = ""; }; + B3E2FA7020E568AF009EA554 /* FcConfigGetCacheDirs.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigGetCacheDirs.3; sourceTree = ""; }; + B3E2FA7120E568AF009EA554 /* FcPatternReference.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcPatternReference.3; sourceTree = ""; }; + B3E2FA7220E568AF009EA554 /* FcStrListFirst.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrListFirst.3; sourceTree = ""; }; + B3E2FA7320E568AF009EA554 /* FcObjectSetCreate.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcObjectSetCreate.3; sourceTree = ""; }; + B3E2FA7420E568AF009EA554 /* FcConfigAppFontAddDir.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigAppFontAddDir.3; sourceTree = ""; }; + B3E2FA7520E568AF009EA554 /* FcAtomicOrigFile.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcAtomicOrigFile.3; sourceTree = ""; }; + B3E2FA7620E568AF009EA554 /* FcCharSetMerge.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetMerge.3; sourceTree = ""; }; + B3E2FA7720E568AF009EA554 /* FcConfigSubstituteWithPat.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigSubstituteWithPat.3; sourceTree = ""; }; + B3E2FA7820E568AF009EA554 /* FcCacheDir.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCacheDir.3; sourceTree = ""; }; + B3E2FA7920E568AF009EA554 /* FcAtomicLock.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcAtomicLock.3; sourceTree = ""; }; + B3E2FA7A20E568AF009EA554 /* FcStrDowncase.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrDowncase.3; sourceTree = ""; }; + B3E2FA7B20E568AF009EA554 /* FcValueDestroy.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcValueDestroy.3; sourceTree = ""; }; + B3E2FA7C20E568AF009EA554 /* FcPatternDel.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcPatternDel.3; sourceTree = ""; }; + B3E2FA7D20E568AF009EA554 /* FcNameRegisterObjectTypes.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcNameRegisterObjectTypes.3; sourceTree = ""; }; + B3E2FA7E20E568AF009EA554 /* FcConfigHome.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigHome.3; sourceTree = ""; }; + B3E2FA7F20E568AF009EA554 /* FcDirCacheUnload.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcDirCacheUnload.3; sourceTree = ""; }; + B3E2FA8020E568AF009EA554 /* FcIsUpper.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcIsUpper.3; sourceTree = ""; }; + B3E2FA8120E568AF009EA554 /* FcObjectSetDestroy.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcObjectSetDestroy.3; sourceTree = ""; }; + B3E2FA8220E568AF009EA554 /* FcCharSetDelChar.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetDelChar.3; sourceTree = ""; }; + B3E2FA8320E568AF009EA554 /* FcGetVersion.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcGetVersion.3; sourceTree = ""; }; + B3E2FA8420E568AF009EA554 /* FcLangSetHash.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcLangSetHash.3; sourceTree = ""; }; + B3E2FA8520E568AF009EA554 /* FcAtomicDestroy.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcAtomicDestroy.3; sourceTree = ""; }; + B3E2FA8620E568AF009EA554 /* FcConfigFilename.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigFilename.3; sourceTree = ""; }; + B3E2FA8720E568AF009EA554 /* FcConfigUptoDate.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigUptoDate.3; sourceTree = ""; }; + B3E2FA8820E568AF009EA554 /* FcDirCacheRescan.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcDirCacheRescan.3; sourceTree = ""; }; + B3E2FA8920E568AF009EA554 /* FcUtf16ToUcs4.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcUtf16ToUcs4.3; sourceTree = ""; }; + B3E2FA8A20E568AF009EA554 /* FcDirCacheCreateUUID.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcDirCacheCreateUUID.3; sourceTree = ""; }; + B3E2FA8B20E568AF009EA554 /* FcPatternHash.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcPatternHash.3; sourceTree = ""; }; + B3E2FA8C20E568AF009EA554 /* FcLangSetGetLangs.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcLangSetGetLangs.3; sourceTree = ""; }; + B3E2FA8D20E568AF009EA554 /* FcLangSetCopy.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcLangSetCopy.3; sourceTree = ""; }; + B3E2FA8E20E568AF009EA554 /* FcConfigGetCurrent.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigGetCurrent.3; sourceTree = ""; }; + B3E2FA8F20E568AF009EA554 /* FcLangNormalize.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcLangNormalize.3; sourceTree = ""; }; + B3E2FA9020E568AF009EA554 /* FcStrBasename.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrBasename.3; sourceTree = ""; }; + B3E2FA9120E568AF009EA554 /* FcWeightToOpenType.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcWeightToOpenType.3; sourceTree = ""; }; + B3E2FA9220E568AF009EA554 /* FcAtomicUnlock.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcAtomicUnlock.3; sourceTree = ""; }; + B3E2FA9320E568AF009EA554 /* FcPatternCreate.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcPatternCreate.3; sourceTree = ""; }; + B3E2FA9420E568AF009EA554 /* FcPatternFilter.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcPatternFilter.3; sourceTree = ""; }; + B3E2FA9520E568AF009EA554 /* FcRangeDestroy.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcRangeDestroy.3; sourceTree = ""; }; + B3E2FA9620E568AF009EA554 /* FcFontSetDestroy.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFontSetDestroy.3; sourceTree = ""; }; + B3E2FA9720E568AF009EA554 /* FcStrCopy.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrCopy.3; sourceTree = ""; }; + B3E2FA9820E568AF009EA554 /* FcStrCopyFilename.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrCopyFilename.3; sourceTree = ""; }; + B3E2FA9920E568AF009EA554 /* FcConfigGetCache.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigGetCache.3; sourceTree = ""; }; + B3E2FA9A20E568AF009EA554 /* FcFontSort.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFontSort.3; sourceTree = ""; }; + B3E2FA9B20E568AF009EA554 /* FcPatternFormat.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcPatternFormat.3; sourceTree = ""; }; + B3E2FA9C20E568AF009EA554 /* FcConfigGetRescanInterval.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigGetRescanInterval.3; sourceTree = ""; }; + B3E2FA9D20E568AF009EA554 /* FcCharSetFirstPage.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetFirstPage.3; sourceTree = ""; }; + B3E2FA9E20E568AF009EA554 /* FcLangSetCompare.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcLangSetCompare.3; sourceTree = ""; }; + B3E2FA9F20E568AF009EA554 /* FcNameConstant.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcNameConstant.3; sourceTree = ""; }; + B3E2FAA020E568AF009EA554 /* FcStrSetDestroy.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrSetDestroy.3; sourceTree = ""; }; + B3E2FAA120E568AF009EA554 /* FcLangSetHasLang.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcLangSetHasLang.3; sourceTree = ""; }; + B3E2FAA220E568AF009EA554 /* FcDirSave.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcDirSave.3; sourceTree = ""; }; + B3E2FAA320E568AF009EA554 /* FcGetDefaultLangs.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcGetDefaultLangs.3; sourceTree = ""; }; + B3E2FAA420E568AF009EA554 /* FcStrListCreate.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrListCreate.3; sourceTree = ""; }; + B3E2FAA520E568AF009EA554 /* FcUcs4ToUtf8.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcUcs4ToUtf8.3; sourceTree = ""; }; + B3E2FAA620E568AF009EA554 /* FcDirCacheClean.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcDirCacheClean.3; sourceTree = ""; }; + B3E2FAA720E568AF009EA554 /* FcNameUnparse.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcNameUnparse.3; sourceTree = ""; }; + B3E2FAA820E568AF009EA554 /* FcCharSetCreate.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetCreate.3; sourceTree = ""; }; + B3E2FAA920E568AF009EA554 /* FcConfigSetSysRoot.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigSetSysRoot.3; sourceTree = ""; }; + B3E2FAAA20E568AF009EA554 /* FcCharSetIsSubset.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetIsSubset.3; sourceTree = ""; }; + B3E2FAAB20E568AF009EA554 /* FcRangeGetDouble.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcRangeGetDouble.3; sourceTree = ""; }; + B3E2FAAC20E568AF009EA554 /* FcObjectSetAdd.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcObjectSetAdd.3; sourceTree = ""; }; + B3E2FAAD20E568AF009EA554 /* FcBlanksCreate.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcBlanksCreate.3; sourceTree = ""; }; + B3E2FAAE20E568AF009EA554 /* FcLangSetDestroy.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcLangSetDestroy.3; sourceTree = ""; }; + B3E2FAAF20E568AF009EA554 /* FcNameGetObjectType.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcNameGetObjectType.3; sourceTree = ""; }; + B3E2FAB020E568AF009EA554 /* FcNameUnregisterConstants.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcNameUnregisterConstants.3; sourceTree = ""; }; + B3E2FAB120E568AF009EA554 /* FcPatternGetWithBinding.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcPatternGetWithBinding.3; sourceTree = ""; }; + B3E2FAB220E568AF009EA554 /* FcAtomicNewFile.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcAtomicNewFile.3; sourceTree = ""; }; + B3E2FAB320E568AF009EA554 /* FcConfigParseAndLoad.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigParseAndLoad.3; sourceTree = ""; }; + B3E2FAB420E568AF009EA554 /* FcValueSave.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcValueSave.3; sourceTree = ""; }; + B3E2FAB520E568AF009EA554 /* FcFontList.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFontList.3; sourceTree = ""; }; + B3E2FAB620E568AF009EA554 /* FcConfigCreate.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigCreate.3; sourceTree = ""; }; + B3E2FAB720E568AF009EA554 /* FcRangeCreateInteger.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcRangeCreateInteger.3; sourceTree = ""; }; + B3E2FAB820E568AF009EA554 /* FcNameGetConstant.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcNameGetConstant.3; sourceTree = ""; }; + B3E2FAB920E568AF009EA554 /* FcFreeTypeCharIndex.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFreeTypeCharIndex.3; sourceTree = ""; }; + B3E2FABA20E568AF009EA554 /* FcFontSetAdd.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFontSetAdd.3; sourceTree = ""; }; + B3E2FABB20E568AF009EA554 /* FcStrCmp.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrCmp.3; sourceTree = ""; }; + B3E2FABC20E568AF009EA554 /* FcStrSetAdd.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrSetAdd.3; sourceTree = ""; }; + B3E2FABD20E568AF009EA554 /* FcFontSetPrint.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFontSetPrint.3; sourceTree = ""; }; + B3E2FABE20E568AF009EA554 /* FcConfigAppFontClear.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigAppFontClear.3; sourceTree = ""; }; + B3E2FABF20E568AF009EA554 /* FcPatternAddWeak.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcPatternAddWeak.3; sourceTree = ""; }; + B3E2FAC020E568AF009EA554 /* FcCharSetNew.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetNew.3; sourceTree = ""; }; + B3E2FAC120E568AF009EA554 /* FcStrSetAddFilename.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrSetAddFilename.3; sourceTree = ""; }; + B3E2FAC220E568B0009EA554 /* FcConfigFileInfoIterInit.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigFileInfoIterInit.3; sourceTree = ""; }; + B3E2FAC320E568B0009EA554 /* FcWeightFromOpenType.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcWeightFromOpenType.3; sourceTree = ""; }; + B3E2FAC420E568B0009EA554 /* FcUtf16Len.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcUtf16Len.3; sourceTree = ""; }; + B3E2FAC520E568B0009EA554 /* FcValuePrint.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcValuePrint.3; sourceTree = ""; }; + B3E2FAC620E568B0009EA554 /* FcConfigFileInfoIterNext.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigFileInfoIterNext.3; sourceTree = ""; }; + B3E2FAC720E568B0009EA554 /* FcConfigFileInfoIterGet.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigFileInfoIterGet.3; sourceTree = ""; }; + B3E2FAC820E568B0009EA554 /* FcLangSetSubtract.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcLangSetSubtract.3; sourceTree = ""; }; + B3E2FAC920E568B0009EA554 /* FcUtf8Len.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcUtf8Len.3; sourceTree = ""; }; + B3E2FACA20E568B0009EA554 /* FcBlanksIsMember.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcBlanksIsMember.3; sourceTree = ""; }; + B3E2FACB20E568B0009EA554 /* FcBlanksDestroy.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcBlanksDestroy.3; sourceTree = ""; }; + B3E2FACC20E568B0009EA554 /* FcUtf8ToUcs4.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcUtf8ToUcs4.3; sourceTree = ""; }; + B3E2FACD20E568B0009EA554 /* FcPatternDestroy.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcPatternDestroy.3; sourceTree = ""; }; + B3E2FACE20E568B0009EA554 /* FcLangSetAdd.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcLangSetAdd.3; sourceTree = ""; }; + B3E2FACF20E568B0009EA554 /* FcPatternPrint.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcPatternPrint.3; sourceTree = ""; }; + B3E2FAD020E568B0009EA554 /* FcConfigGetSysRoot.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigGetSysRoot.3; sourceTree = ""; }; + B3E2FAD120E568B0009EA554 /* FcFontSetCreate.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFontSetCreate.3; sourceTree = ""; }; + B3E2FAD220E568B0009EA554 /* FcMatrixCopy.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcMatrixCopy.3; sourceTree = ""; }; + B3E2FAD320E568B0009EA554 /* FcInit.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcInit.3; sourceTree = ""; }; + B3E2FAD420E568B0009EA554 /* FcInitBringUptoDate.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcInitBringUptoDate.3; sourceTree = ""; }; + B3E2FAD520E568B0009EA554 /* FcLangSetContains.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcLangSetContains.3; sourceTree = ""; }; + B3E2FAD620E568B0009EA554 /* FcDirCacheUnlink.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcDirCacheUnlink.3; sourceTree = ""; }; + B3E2FAD720E568B0009EA554 /* FcCharSetUnion.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetUnion.3; sourceTree = ""; }; + B3E2FAD820E568B0009EA554 /* FcRangeCopy.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcRangeCopy.3; sourceTree = ""; }; + B3E2FAD920E568B0009EA554 /* FcConfigBuildFonts.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigBuildFonts.3; sourceTree = ""; }; + B3E2FADA20E568B0009EA554 /* FcFreeTypeQueryFace.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFreeTypeQueryFace.3; sourceTree = ""; }; + B3E2FADB20E568B0009EA554 /* FcStrListDone.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrListDone.3; sourceTree = ""; }; + B3E2FADC20E568B0009EA554 /* FcCharSetCoverage.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetCoverage.3; sourceTree = ""; }; + B3E2FADD20E568B0009EA554 /* FcFontSetMatch.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFontSetMatch.3; sourceTree = ""; }; + B3E2FADE20E568B0009EA554 /* FcBlanksAdd.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcBlanksAdd.3; sourceTree = ""; }; + B3E2FADF20E568B0009EA554 /* FcStrDirname.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrDirname.3; sourceTree = ""; }; + B3E2FAE020E568B0009EA554 /* FcPatternAdd.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcPatternAdd.3; sourceTree = ""; }; + B3E2FAE120E568B0009EA554 /* FcStrPlus.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrPlus.3; sourceTree = ""; }; + B3E2FAE220E568B0009EA554 /* FcStrSetEqual.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcStrSetEqual.3; sourceTree = ""; }; + B3E2FAE320E568B0009EA554 /* FcFreeTypeQuery.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFreeTypeQuery.3; sourceTree = ""; }; + B3E2FAE420E568B0009EA554 /* FcFileScan.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcFileScan.3; sourceTree = ""; }; + B3E2FAE520E568B0009EA554 /* FcAtomicCreate.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcAtomicCreate.3; sourceTree = ""; }; + B3E2FAE620E568B0009EA554 /* FcConfigSetCurrent.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigSetCurrent.3; sourceTree = ""; }; + B3E2FAE720E568B0009EA554 /* FcLangSetEqual.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcLangSetEqual.3; sourceTree = ""; }; + B3E2FAE820E568B0009EA554 /* FcCharSetNextPage.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetNextPage.3; sourceTree = ""; }; + B3E2FAE920E568B0009EA554 /* FcCharSetCopy.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcCharSetCopy.3; sourceTree = ""; }; + B3E2FAEA20E568B0009EA554 /* FcConfigGetFonts.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcConfigGetFonts.3; sourceTree = ""; }; + B3E2FAEB20E568B0009EA554 /* FcMatrixInit.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcMatrixInit.3; sourceTree = ""; }; + B3E2FAEC20E568B0009EA554 /* FcDirCacheRead.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FcDirCacheRead.3; sourceTree = ""; }; + B3E2FAEE20E568B0009EA554 /* fc-validate.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = "fc-validate.1"; sourceTree = ""; }; + B3E2FAEF20E568B0009EA554 /* fc-scan.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = "fc-scan.1"; sourceTree = ""; }; + B3E2FAF020E568B0009EA554 /* fc-cat.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = "fc-cat.1"; sourceTree = ""; }; + B3E2FAF120E568B0009EA554 /* fc-list.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = "fc-list.1"; sourceTree = ""; }; + B3E2FAF220E568B0009EA554 /* fc-match.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = "fc-match.1"; sourceTree = ""; }; + B3E2FAF320E568B0009EA554 /* fc-cache.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = "fc-cache.1"; sourceTree = ""; }; + B3E2FAF420E568B0009EA554 /* fc-pattern.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = "fc-pattern.1"; sourceTree = ""; }; + B3E2FAF520E568B0009EA554 /* fc-query.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = "fc-query.1"; sourceTree = ""; }; + B3E2FAF620E568B0009EA554 /* fc-conflist.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = "fc-conflist.1"; sourceTree = ""; }; + B3E2FAF920E568B0009EA554 /* fonts.dtd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = fonts.dtd; sourceTree = ""; }; + B3E2FAFC20E568B0009EA554 /* 65-khmer.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "65-khmer.conf"; sourceTree = ""; }; + B3E2FAFD20E568B0009EA554 /* 65-nonlatin.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "65-nonlatin.conf"; sourceTree = ""; }; + B3E2FAFE20E568B0009EA554 /* 10-hinting-medium.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "10-hinting-medium.conf"; sourceTree = ""; }; + B3E2FAFF20E568B0009EA554 /* 30-metric-aliases.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "30-metric-aliases.conf"; sourceTree = ""; }; + B3E2FB0020E568B0009EA554 /* 10-sub-pixel-vbgr.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "10-sub-pixel-vbgr.conf"; sourceTree = ""; }; + B3E2FB0120E568B0009EA554 /* 10-unhinted.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "10-unhinted.conf"; sourceTree = ""; }; + B3E2FB0220E568B0009EA554 /* 11-lcdfilter-default.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "11-lcdfilter-default.conf"; sourceTree = ""; }; + B3E2FB0320E568B0009EA554 /* 80-delicious.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "80-delicious.conf"; sourceTree = ""; }; + B3E2FB0420E568B0009EA554 /* 20-unhint-small-vera.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "20-unhint-small-vera.conf"; sourceTree = ""; }; + B3E2FB0520E568B0009EA554 /* 10-hinting-full.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "10-hinting-full.conf"; sourceTree = ""; }; + B3E2FB0620E568B0009EA554 /* 65-fonts-persian.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "65-fonts-persian.conf"; sourceTree = ""; }; + B3E2FB0720E568B0009EA554 /* 10-no-sub-pixel.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "10-no-sub-pixel.conf"; sourceTree = ""; }; + B3E2FB0820E568B0009EA554 /* 10-hinting-slight.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "10-hinting-slight.conf"; sourceTree = ""; }; + B3E2FB0920E568B0009EA554 /* 51-local.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "51-local.conf"; sourceTree = ""; }; + B3E2FB0A20E568B0009EA554 /* 45-latin.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "45-latin.conf"; sourceTree = ""; }; + B3E2FB0B20E568B0009EA554 /* 10-sub-pixel-rgb.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "10-sub-pixel-rgb.conf"; sourceTree = ""; }; + B3E2FB0C20E568B0009EA554 /* 10-autohint.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "10-autohint.conf"; sourceTree = ""; }; + B3E2FB0D20E568B0009EA554 /* 49-sansserif.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "49-sansserif.conf"; sourceTree = ""; }; + B3E2FB0E20E568B0009EA554 /* 40-nonlatin.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "40-nonlatin.conf"; sourceTree = ""; }; + B3E2FB0F20E568B0009EA554 /* 70-no-bitmaps.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "70-no-bitmaps.conf"; sourceTree = ""; }; + B3E2FB1020E568B0009EA554 /* 60-latin.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "60-latin.conf"; sourceTree = ""; }; + B3E2FB1120E568B0009EA554 /* 25-unhint-nonlatin.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "25-unhint-nonlatin.conf"; sourceTree = ""; }; + B3E2FB1220E568B0009EA554 /* 60-generic.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "60-generic.conf"; sourceTree = ""; }; + B3E2FB1320E568B0009EA554 /* 45-generic.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "45-generic.conf"; sourceTree = ""; }; + B3E2FB1420E568B0009EA554 /* 11-lcdfilter-legacy.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "11-lcdfilter-legacy.conf"; sourceTree = ""; }; + B3E2FB1520E568B0009EA554 /* 10-sub-pixel-bgr.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "10-sub-pixel-bgr.conf"; sourceTree = ""; }; + B3E2FB1620E568B0009EA554 /* 70-yes-bitmaps.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "70-yes-bitmaps.conf"; sourceTree = ""; }; + B3E2FB1720E568B0009EA554 /* 69-unifont.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "69-unifont.conf"; sourceTree = ""; }; + B3E2FB1820E568B0009EA554 /* 50-user.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "50-user.conf"; sourceTree = ""; }; + B3E2FB1920E568B0009EA554 /* 10-scale-bitmap-fonts.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "10-scale-bitmap-fonts.conf"; sourceTree = ""; }; + B3E2FB1A20E568B0009EA554 /* 90-synthetic.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "90-synthetic.conf"; sourceTree = ""; }; + B3E2FB1B20E568B0009EA554 /* 10-hinting-none.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "10-hinting-none.conf"; sourceTree = ""; }; + B3E2FB1C20E568B0009EA554 /* 10-sub-pixel-vrgb.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "10-sub-pixel-vrgb.conf"; sourceTree = ""; }; + B3E2FB1D20E568B0009EA554 /* 11-lcdfilter-light.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "11-lcdfilter-light.conf"; sourceTree = ""; }; + B3E2FB2020E568B0009EA554 /* fontconfig.loc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = fontconfig.loc; sourceTree = ""; }; + B3E2FB2120E568B0009EA554 /* fontconfig.its */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = fontconfig.its; sourceTree = ""; }; + B3E2FB2420E568B0009EA554 /* fontconfig-user.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "fontconfig-user.txt"; sourceTree = ""; }; + B3E2FB2520E568B0009EA554 /* fontconfig-devel.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = "fontconfig-devel.pdf"; sourceTree = ""; }; + B3E2FB2720E568B0009EA554 /* fcpatternget.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcpatternget.html; sourceTree = ""; }; + B3E2FB2820E568B0009EA554 /* fcfini.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfini.html; sourceTree = ""; }; + B3E2FB2920E568B0009EA554 /* fcconfiggetsysroot.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfiggetsysroot.html; sourceTree = ""; }; + B3E2FB2A20E568B0009EA554 /* fcstrlistfirst.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrlistfirst.html; sourceTree = ""; }; + B3E2FB2B20E568B0009EA554 /* fcpatternreference.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcpatternreference.html; sourceTree = ""; }; + B3E2FB2C20E568B0009EA554 /* fcutf16len.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcutf16len.html; sourceTree = ""; }; + B3E2FB2D20E568B0009EA554 /* fcfreetypecharindex.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfreetypecharindex.html; sourceTree = ""; }; + B3E2FB2E20E568B0009EA554 /* fcutf16toucs4.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcutf16toucs4.html; sourceTree = ""; }; + B3E2FB2F20E568B0009EA554 /* fcconfiggetcache.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfiggetcache.html; sourceTree = ""; }; + B3E2FB3020E568B0009EA554 /* fccharsetfirstpage.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsetfirstpage.html; sourceTree = ""; }; + B3E2FB3120E568B0009EA554 /* fcobjectsetbuild.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcobjectsetbuild.html; sourceTree = ""; }; + B3E2FB3220E568B0009EA554 /* fcstrfree.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrfree.html; sourceTree = ""; }; + B3E2FB3320E568B0009EA554 /* fcconfigbuildfonts.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigbuildfonts.html; sourceTree = ""; }; + B3E2FB3420E568B0009EA554 /* fccharsetunion.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsetunion.html; sourceTree = ""; }; + B3E2FB3520E568B0009EA554 /* fcconfighome.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfighome.html; sourceTree = ""; }; + B3E2FB3620E568B0009EA554 /* fclangsetcreate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fclangsetcreate.html; sourceTree = ""; }; + B3E2FB3720E568B0009EA554 /* fclangsetgetlangs.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fclangsetgetlangs.html; sourceTree = ""; }; + B3E2FB3820E568B0009EA554 /* fcucs4toutf8.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcucs4toutf8.html; sourceTree = ""; }; + B3E2FB3920E568B0009EA554 /* fcconfigparseandloadfrommemory.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigparseandloadfrommemory.html; sourceTree = ""; }; + B3E2FB3A20E568B0009EA554 /* fcdircacheloadfile.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcdircacheloadfile.html; sourceTree = ""; }; + B3E2FB3B20E568B0009EA554 /* fccachenumfont.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccachenumfont.html; sourceTree = ""; }; + B3E2FB3C20E568B0009EA554 /* fcweightfromopentypedouble.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcweightfromopentypedouble.html; sourceTree = ""; }; + B3E2FB3D20E568B0009EA554 /* fcnamegetobjecttype.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcnamegetobjecttype.html; sourceTree = ""; }; + B3E2FB3E20E568B0009EA554 /* fcvalueequal.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcvalueequal.html; sourceTree = ""; }; + B3E2FB3F20E568B0009EA554 /* fclangsetdel.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fclangsetdel.html; sourceTree = ""; }; + B3E2FB4020E568B0009EA554 /* fcconfigenablehome.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigenablehome.html; sourceTree = ""; }; + B3E2FB4120E568B0009EA554 /* fcconfiggetconfigfiles.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfiggetconfigfiles.html; sourceTree = ""; }; + B3E2FB4220E568B0009EA554 /* fcutf8toucs4.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcutf8toucs4.html; sourceTree = ""; }; + B3E2FB4320E568B0009EA554 /* fccharsetnew.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsetnew.html; sourceTree = ""; }; + B3E2FB4420E568B0009EA554 /* fcnameregisterobjecttypes.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcnameregisterobjecttypes.html; sourceTree = ""; }; + B3E2FB4520E568B0009EA554 /* fcconfigparseandload.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigparseandload.html; sourceTree = ""; }; + B3E2FB4620E568B0009EA554 /* fcstrsetcreate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrsetcreate.html; sourceTree = ""; }; + B3E2FB4720E568B0009EA554 /* fccharsetcoverage.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsetcoverage.html; sourceTree = ""; }; + B3E2FB4820E568B0009EA554 /* fccachesubdir.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccachesubdir.html; sourceTree = ""; }; + B3E2FB4920E568B0009EA554 /* fcpatternprint.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcpatternprint.html; sourceTree = ""; }; + B3E2FB4A20E568B0009EA554 /* fcfontsetprint.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfontsetprint.html; sourceTree = ""; }; + B3E2FB4B20E568B0009EA554 /* fcconfiggetfontdirs.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfiggetfontdirs.html; sourceTree = ""; }; + B3E2FB4C20E568B0009EA554 /* fcmatrixequal.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcmatrixequal.html; sourceTree = ""; }; + B3E2FB4D20E568B0009EA554 /* fcobjectsetdestroy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcobjectsetdestroy.html; sourceTree = ""; }; + B3E2FB4E20E568B0009EA554 /* fcfilescan.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfilescan.html; sourceTree = ""; }; + B3E2FB4F20E568B0009EA554 /* fclangsetequal.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fclangsetequal.html; sourceTree = ""; }; + B3E2FB5020E568B0009EA554 /* ln12.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = ln12.html; sourceTree = ""; }; + B3E2FB5120E568B0009EA554 /* fcstrsetdestroy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrsetdestroy.html; sourceTree = ""; }; + B3E2FB5220E568B0009EA554 /* fcpatternformat.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcpatternformat.html; sourceTree = ""; }; + B3E2FB5320E568B0009EA554 /* fccharsetissubset.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsetissubset.html; sourceTree = ""; }; + B3E2FB5420E568B0009EA554 /* fcatomicdestroy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcatomicdestroy.html; sourceTree = ""; }; + B3E2FB5520E568B0009EA554 /* fcmatrixscale.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcmatrixscale.html; sourceTree = ""; }; + B3E2FB5620E568B0009EA554 /* fclangsetadd.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fclangsetadd.html; sourceTree = ""; }; + B3E2FB5720E568B0009EA554 /* fcgetlangs.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcgetlangs.html; sourceTree = ""; }; + B3E2FB5820E568B0009EA554 /* fcconfigcreate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigcreate.html; sourceTree = ""; }; + B3E2FB5920E568B0009EA554 /* fccachedir.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccachedir.html; sourceTree = ""; }; + B3E2FB5A20E568B0009EA554 /* fcnamegetconstant.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcnamegetconstant.html; sourceTree = ""; }; + B3E2FB5B20E568B0009EA554 /* fcfreetypecharsetandspacing.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfreetypecharsetandspacing.html; sourceTree = ""; }; + B3E2FB5C20E568B0009EA554 /* fcconfigappfontaddfile.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigappfontaddfile.html; sourceTree = ""; }; + B3E2FB5D20E568B0009EA554 /* fcisupper.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcisupper.html; sourceTree = ""; }; + B3E2FB5E20E568B0009EA554 /* fcinitreinitialize.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcinitreinitialize.html; sourceTree = ""; }; + B3E2FB5F20E568B0009EA554 /* fccharsetmerge.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsetmerge.html; sourceTree = ""; }; + B3E2FB6020E568B0009EA554 /* fcnameunregisterobjecttypes.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcnameunregisterobjecttypes.html; sourceTree = ""; }; + B3E2FB6120E568B0009EA554 /* fcatomiccreate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcatomiccreate.html; sourceTree = ""; }; + B3E2FB6220E568B0009EA554 /* fcweightfromopentype.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcweightfromopentype.html; sourceTree = ""; }; + B3E2FB6320E568B0009EA554 /* fcstrcmp.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrcmp.html; sourceTree = ""; }; + B3E2FB6420E568B0009EA554 /* fcconfiggetrescaninterval.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfiggetrescaninterval.html; sourceTree = ""; }; + B3E2FB6520E568B0009EA554 /* fcconfiggetfonts.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfiggetfonts.html; sourceTree = ""; }; + B3E2FB6620E568B0009EA554 /* fcpatternbuild.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcpatternbuild.html; sourceTree = ""; }; + B3E2FB6720E568B0009EA554 /* fcmatrixshear.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcmatrixshear.html; sourceTree = ""; }; + B3E2FB6820E568B0009EA554 /* fcrangecopy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcrangecopy.html; sourceTree = ""; }; + B3E2FB6920E568B0009EA554 /* fcfileisdir.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfileisdir.html; sourceTree = ""; }; + B3E2FB6A20E568B0009EA554 /* fcatomicnewfile.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcatomicnewfile.html; sourceTree = ""; }; + B3E2FB6B20E568B0009EA554 /* fcatomiclock.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcatomiclock.html; sourceTree = ""; }; + B3E2FB6C20E568B0009EA554 /* fcnameunparse.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcnameunparse.html; sourceTree = ""; }; + B3E2FB6D20E568B1009EA554 /* fcmatrixmultiply.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcmatrixmultiply.html; sourceTree = ""; }; + B3E2FB6E20E568B1009EA554 /* fcstrsetdel.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrsetdel.html; sourceTree = ""; }; + B3E2FB6F20E568B1009EA554 /* fclanggetcharset.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fclanggetcharset.html; sourceTree = ""; }; + B3E2FB7020E568B1009EA554 /* fcfontsetdestroy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfontsetdestroy.html; sourceTree = ""; }; + B3E2FB7120E568B1009EA554 /* fccharsetsubtractcount.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsetsubtractcount.html; sourceTree = ""; }; + B3E2FB7220E568B1009EA554 /* fcstrcopy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrcopy.html; sourceTree = ""; }; + B3E2FB7320E568B1009EA554 /* fccharsetintersectcount.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsetintersectcount.html; sourceTree = ""; }; + B3E2FB7420E568B1009EA554 /* x19.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = x19.html; sourceTree = ""; }; + B3E2FB7520E568B1009EA554 /* fcpatterncreate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcpatterncreate.html; sourceTree = ""; }; + B3E2FB7620E568B1009EA554 /* fcutf8len.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcutf8len.html; sourceTree = ""; }; + B3E2FB7720E568B1009EA554 /* fccharsethaschar.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsethaschar.html; sourceTree = ""; }; + B3E2FB7820E568B1009EA554 /* fcgetdefaultlangs.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcgetdefaultlangs.html; sourceTree = ""; }; + B3E2FB7920E568B1009EA554 /* fcdircacheclean.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcdircacheclean.html; sourceTree = ""; }; + B3E2FB7A20E568B1009EA554 /* fcobjectsetadd.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcobjectsetadd.html; sourceTree = ""; }; + B3E2FB7B20E568B1009EA554 /* fcconfigfileinfoiterget.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigfileinfoiterget.html; sourceTree = ""; }; + B3E2FB7C20E568B1009EA554 /* fcstrstrignorecase.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrstrignorecase.html; sourceTree = ""; }; + B3E2FB7D20E568B1009EA554 /* fclangnormalize.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fclangnormalize.html; sourceTree = ""; }; + B3E2FB7E20E568B1009EA554 /* fcconfigfileinfoiterinit.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigfileinfoiterinit.html; sourceTree = ""; }; + B3E2FB7F20E568B1009EA554 /* fcmatrixcopy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcmatrixcopy.html; sourceTree = ""; }; + B3E2FB8020E568B1009EA554 /* fcconfigsetcurrent.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigsetcurrent.html; sourceTree = ""; }; + B3E2FB8120E568B1009EA554 /* fclangsetdestroy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fclangsetdestroy.html; sourceTree = ""; }; + B3E2FB8220E568B1009EA554 /* fclangsetcopy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fclangsetcopy.html; sourceTree = ""; }; + B3E2FB8320E568B1009EA554 /* fcstrdowncase.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrdowncase.html; sourceTree = ""; }; + B3E2FB8420E568B1009EA554 /* fcpatternget-type.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "fcpatternget-type.html"; sourceTree = ""; }; + B3E2FB8520E568B1009EA554 /* fcpatternadd-type.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "fcpatternadd-type.html"; sourceTree = ""; }; + B3E2FB8620E568B1009EA554 /* fcstrsetadd.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrsetadd.html; sourceTree = ""; }; + B3E2FB8720E568B1009EA554 /* fcgetversion.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcgetversion.html; sourceTree = ""; }; + B3E2FB8820E568B1009EA554 /* fcpatternremove.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcpatternremove.html; sourceTree = ""; }; + B3E2FB8920E568B1009EA554 /* fcrangecreateinteger.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcrangecreateinteger.html; sourceTree = ""; }; + B3E2FB8A20E568B1009EA554 /* fcnameconstant.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcnameconstant.html; sourceTree = ""; }; + B3E2FB8B20E568B1009EA554 /* fclangsetcontains.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fclangsetcontains.html; sourceTree = ""; }; + B3E2FB8C20E568B1009EA554 /* fcconfigsetrescaninterval.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigsetrescaninterval.html; sourceTree = ""; }; + B3E2FB8D20E568B1009EA554 /* fcconfiggetcachedirs.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfiggetcachedirs.html; sourceTree = ""; }; + B3E2FB8E20E568B1009EA554 /* fcdirsave.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcdirsave.html; sourceTree = ""; }; + B3E2FB8F20E568B1009EA554 /* fcobjectsetcreate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcobjectsetcreate.html; sourceTree = ""; }; + B3E2FB9020E568B1009EA554 /* fcatomicunlock.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcatomicunlock.html; sourceTree = ""; }; + B3E2FB9120E568B1009EA554 /* fcnameunregisterconstants.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcnameunregisterconstants.html; sourceTree = ""; }; + B3E2FB9220E568B1009EA554 /* fccharsetcreate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsetcreate.html; sourceTree = ""; }; + B3E2FB9320E568B1009EA554 /* fccharsetcount.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsetcount.html; sourceTree = ""; }; + B3E2FB9420E568B1009EA554 /* fcrangecreatedouble.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcrangecreatedouble.html; sourceTree = ""; }; + B3E2FB9520E568B1009EA554 /* fcatomicdeletenew.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcatomicdeletenew.html; sourceTree = ""; }; + B3E2FB9620E568B1009EA554 /* fclangsethaslang.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fclangsethaslang.html; sourceTree = ""; }; + B3E2FB9720E568B1009EA554 /* fcpatternduplicate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcpatternduplicate.html; sourceTree = ""; }; + B3E2FB9820E568B1009EA554 /* fcstrplus.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrplus.html; sourceTree = ""; }; + B3E2FB9920E568B1009EA554 /* fcstrsetaddfilename.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrsetaddfilename.html; sourceTree = ""; }; + B3E2FB9A20E568B1009EA554 /* fcpatterndestroy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcpatterndestroy.html; sourceTree = ""; }; + B3E2FB9B20E568B1009EA554 /* fccharsetdelchar.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsetdelchar.html; sourceTree = ""; }; + B3E2FB9C20E568B1009EA554 /* fcatomicorigfile.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcatomicorigfile.html; sourceTree = ""; }; + B3E2FB9D20E568B1009EA554 /* fccharsetdestroy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsetdestroy.html; sourceTree = ""; }; + B3E2FB9E20E568B1009EA554 /* fcinitloadconfig.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcinitloadconfig.html; sourceTree = ""; }; + B3E2FB9F20E568B1009EA554 /* fcblanksadd.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcblanksadd.html; sourceTree = ""; }; + B3E2FBA020E568B1009EA554 /* fcstrstr.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrstr.html; sourceTree = ""; }; + B3E2FBA120E568B1009EA554 /* fcfontsetsort.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfontsetsort.html; sourceTree = ""; }; + B3E2FBA220E568B1009EA554 /* fcinit.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcinit.html; sourceTree = ""; }; + B3E2FBA320E568B1009EA554 /* fccharsetintersect.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsetintersect.html; sourceTree = ""; }; + B3E2FBA420E568B1009EA554 /* fcpatterndel.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcpatterndel.html; sourceTree = ""; }; + B3E2FBA520E568B1009EA554 /* fcstrlistcreate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrlistcreate.html; sourceTree = ""; }; + B3E2FBA620E568B1009EA554 /* fccharsetnextpage.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsetnextpage.html; sourceTree = ""; }; + B3E2FBA720E568B1009EA554 /* fcconfigreference.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigreference.html; sourceTree = ""; }; + B3E2FBA820E568B1009EA554 /* fcconfiguptodate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfiguptodate.html; sourceTree = ""; }; + B3E2FBA920E568B1009EA554 /* fcvalueprint.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcvalueprint.html; sourceTree = ""; }; + B3E2FBAA20E568B1009EA554 /* fcblanksismember.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcblanksismember.html; sourceTree = ""; }; + B3E2FBAB20E568B1009EA554 /* fcconfigsubstitute.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigsubstitute.html; sourceTree = ""; }; + B3E2FBAC20E568B1009EA554 /* fcconfigfilename.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigfilename.html; sourceTree = ""; }; + B3E2FBAD20E568B1009EA554 /* fcatomicreplaceorig.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcatomicreplaceorig.html; sourceTree = ""; }; + B3E2FBAE20E568B1009EA554 /* fcpatternhash.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcpatternhash.html; sourceTree = ""; }; + B3E2FBAF20E568B1009EA554 /* fcblanksdestroy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcblanksdestroy.html; sourceTree = ""; }; + B3E2FBB020E568B1009EA554 /* fcpatternadd.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcpatternadd.html; sourceTree = ""; }; + B3E2FBB120E568B1009EA554 /* fcconfiggetconfigdirs.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfiggetconfigdirs.html; sourceTree = ""; }; + B3E2FBB220E568B1009EA554 /* fcdircacheunload.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcdircacheunload.html; sourceTree = ""; }; + B3E2FBB320E568B1009EA554 /* fcfontsort.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfontsort.html; sourceTree = ""; }; + B3E2FBB420E568B1009EA554 /* fcstrcmpignorecase.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrcmpignorecase.html; sourceTree = ""; }; + B3E2FBB520E568B1009EA554 /* fcpatternequal.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcpatternequal.html; sourceTree = ""; }; + B3E2FBB620E568B1009EA554 /* fccharsetaddchar.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsetaddchar.html; sourceTree = ""; }; + B3E2FBB720E568B1009EA554 /* fcconfiggetcurrent.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfiggetcurrent.html; sourceTree = ""; }; + B3E2FBB820E568B1009EA554 /* fcstrcopyfilename.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrcopyfilename.html; sourceTree = ""; }; + B3E2FBB920E568B1009EA554 /* fcdircacheunlink.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcdircacheunlink.html; sourceTree = ""; }; + B3E2FBBA20E568B1009EA554 /* fcfreetypequeryface.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfreetypequeryface.html; sourceTree = ""; }; + B3E2FBBB20E568B1009EA554 /* fcmatrixinit.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcmatrixinit.html; sourceTree = ""; }; + B3E2FBBC20E568B1009EA554 /* fcstrdirname.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrdirname.html; sourceTree = ""; }; + B3E2FBBD20E568B1009EA554 /* fctolower.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fctolower.html; sourceTree = ""; }; + B3E2FBBE20E568B1009EA554 /* fccachecopyset.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccachecopyset.html; sourceTree = ""; }; + B3E2FBBF20E568B1009EA554 /* fcblankscreate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcblankscreate.html; sourceTree = ""; }; + B3E2FBC020E568B1009EA554 /* fcnameparse.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcnameparse.html; sourceTree = ""; }; + B3E2FBC120E568B1009EA554 /* fcnameregisterconstants.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcnameregisterconstants.html; sourceTree = ""; }; + B3E2FBC220E568B1009EA554 /* fcstrsetequal.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrsetequal.html; sourceTree = ""; }; + B3E2FBC320E568B1009EA554 /* x31.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = x31.html; sourceTree = ""; }; + B3E2FBC420E568B1009EA554 /* fcfontsetlist.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfontsetlist.html; sourceTree = ""; }; + B3E2FBC520E568B1009EA554 /* fccachenumsubdir.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccachenumsubdir.html; sourceTree = ""; }; + B3E2FBC620E568B1009EA554 /* fcfreetypequeryall.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfreetypequeryall.html; sourceTree = ""; }; + B3E2FBC720E568B1009EA554 /* fcpatternequalsubset.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcpatternequalsubset.html; sourceTree = ""; }; + B3E2FBC820E568B1009EA554 /* fcweighttoopentypedouble.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcweighttoopentypedouble.html; sourceTree = ""; }; + B3E2FBC920E568B1009EA554 /* fcpatternfilter.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcpatternfilter.html; sourceTree = ""; }; + B3E2FBCA20E568B1009EA554 /* fcdirscan.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcdirscan.html; sourceTree = ""; }; + B3E2FBCB20E568B1009EA554 /* fccachecreatetagfile.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccachecreatetagfile.html; sourceTree = ""; }; + B3E2FBCC20E568B1009EA554 /* fcfontrenderprepare.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfontrenderprepare.html; sourceTree = ""; }; + B3E2FBCD20E568B1009EA554 /* fccharsetcopy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsetcopy.html; sourceTree = ""; }; + B3E2FBCE20E568B1009EA554 /* fcdircachevalid.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcdircachevalid.html; sourceTree = ""; }; + B3E2FBCF20E568B1009EA554 /* fcdircachecreateuuid.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcdircachecreateuuid.html; sourceTree = ""; }; + B3E2FBD020E568B1009EA554 /* fclangsetunion.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fclangsetunion.html; sourceTree = ""; }; + B3E2FBD120E568B1009EA554 /* fcstrlistdone.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrlistdone.html; sourceTree = ""; }; + B3E2FBD220E568B1009EA554 /* t1.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = t1.html; sourceTree = ""; }; + B3E2FBD320E568B1009EA554 /* fcstrbasename.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrbasename.html; sourceTree = ""; }; + B3E2FBD420E568B1009EA554 /* fcdircacherescan.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcdircacherescan.html; sourceTree = ""; }; + B3E2FBD520E568B1009EA554 /* fcpatterngetwithbinding.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcpatterngetwithbinding.html; sourceTree = ""; }; + B3E2FBD620E568B1009EA554 /* fcdircacheread.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcdircacheread.html; sourceTree = ""; }; + B3E2FBD720E568B1009EA554 /* fcvaluedestroy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcvaluedestroy.html; sourceTree = ""; }; + B3E2FBD820E568B1009EA554 /* fcconfigfileinfoiternext.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigfileinfoiternext.html; sourceTree = ""; }; + B3E2FBD920E568B1009EA554 /* fcconfiggetblanks.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfiggetblanks.html; sourceTree = ""; }; + B3E2FBDA20E568B1009EA554 /* fcfontsetadd.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfontsetadd.html; sourceTree = ""; }; + B3E2FBDB20E568B1009EA554 /* fcfreetypecharset.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfreetypecharset.html; sourceTree = ""; }; + B3E2FBDC20E568B1009EA554 /* fcislower.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcislower.html; sourceTree = ""; }; + B3E2FBDD20E568B1009EA554 /* fcpatternaddweak.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcpatternaddweak.html; sourceTree = ""; }; + B3E2FBDE20E568B1009EA554 /* fcconfigappfontadddir.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigappfontadddir.html; sourceTree = ""; }; + B3E2FBDF20E568B1009EA554 /* fcfontsetsortdestroy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfontsetsortdestroy.html; sourceTree = ""; }; + B3E2FBE020E568B1009EA554 /* fcconfigsubstitutewithpat.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigsubstitutewithpat.html; sourceTree = ""; }; + B3E2FBE120E568B1009EA554 /* fcfontsetmatch.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfontsetmatch.html; sourceTree = ""; }; + B3E2FBE220E568B1009EA554 /* fcinitloadconfigandfonts.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcinitloadconfigandfonts.html; sourceTree = ""; }; + B3E2FBE320E568B1009EA554 /* fcmatrixrotate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcmatrixrotate.html; sourceTree = ""; }; + B3E2FBE420E568B1009EA554 /* fcdefaultsubstitute.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcdefaultsubstitute.html; sourceTree = ""; }; + B3E2FBE520E568B1009EA554 /* fcinitbringuptodate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcinitbringuptodate.html; sourceTree = ""; }; + B3E2FBE620E568B1009EA554 /* fcrangegetdouble.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcrangegetdouble.html; sourceTree = ""; }; + B3E2FBE720E568B1009EA554 /* fcfontlist.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfontlist.html; sourceTree = ""; }; + B3E2FBE820E568B1009EA554 /* x103.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = x103.html; sourceTree = ""; }; + B3E2FBE920E568B1009EA554 /* fcstrsetmember.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrsetmember.html; sourceTree = ""; }; + B3E2FBEA20E568B1009EA554 /* fclangsetsubtract.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fclangsetsubtract.html; sourceTree = ""; }; + B3E2FBEB20E568B1009EA554 /* fcdircacheload.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcdircacheload.html; sourceTree = ""; }; + B3E2FBEC20E568B1009EA554 /* fcvaluesave.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcvaluesave.html; sourceTree = ""; }; + B3E2FBED20E568B1009EA554 /* fccharsetsubtract.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsetsubtract.html; sourceTree = ""; }; + B3E2FBEE20E568B1009EA554 /* fcfreetypequery.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfreetypequery.html; sourceTree = ""; }; + B3E2FBEF20E568B1009EA554 /* fcconfigsetsysroot.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigsetsysroot.html; sourceTree = ""; }; + B3E2FBF020E568B1009EA554 /* fcfontmatch.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfontmatch.html; sourceTree = ""; }; + B3E2FBF120E568B1009EA554 /* fcstrlistnext.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcstrlistnext.html; sourceTree = ""; }; + B3E2FBF220E568B1009EA554 /* fcweighttoopentype.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcweighttoopentype.html; sourceTree = ""; }; + B3E2FBF320E568B1009EA554 /* fcfontsetcreate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcfontsetcreate.html; sourceTree = ""; }; + B3E2FBF420E568B1009EA554 /* fcconfigappfontclear.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigappfontclear.html; sourceTree = ""; }; + B3E2FBF520E568B1009EA554 /* fclangsethash.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fclangsethash.html; sourceTree = ""; }; + B3E2FBF620E568B1009EA554 /* fccharsetequal.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fccharsetequal.html; sourceTree = ""; }; + B3E2FBF720E568B1009EA554 /* fcrangedestroy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcrangedestroy.html; sourceTree = ""; }; + B3E2FBF820E568B1009EA554 /* fclangsetcompare.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fclangsetcompare.html; sourceTree = ""; }; + B3E2FBF920E568B1009EA554 /* fcconfigdestroy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = fcconfigdestroy.html; sourceTree = ""; }; + B3E2FBFA20E568B1009EA554 /* fontconfig-devel.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "fontconfig-devel.txt"; sourceTree = ""; }; + B3E2FBFB20E568B1009EA554 /* fontconfig-user.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = "fontconfig-user.pdf"; sourceTree = ""; }; + B3E2FBFC20E568B1009EA554 /* fontconfig-user.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "fontconfig-user.html"; sourceTree = ""; }; + B3E2FBFF20E568B2009EA554 /* INSTALL_RECEIPT.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = INSTALL_RECEIPT.json; sourceTree = ""; }; + B3E2FC0120E568B2009EA554 /* msgconv */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = msgconv; sourceTree = ""; }; + B3E2FC0220E568B2009EA554 /* msggrep */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = msggrep; sourceTree = ""; }; + B3E2FC0320E568B2009EA554 /* autopoint */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = autopoint; sourceTree = ""; }; + B3E2FC0420E568B2009EA554 /* msgcomm */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = msgcomm; sourceTree = ""; }; + B3E2FC0520E568B2009EA554 /* msgen */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = msgen; sourceTree = ""; }; + B3E2FC0620E568B2009EA554 /* msgmerge */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = msgmerge; sourceTree = ""; }; + B3E2FC0720E568B2009EA554 /* envsubst */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = envsubst; sourceTree = ""; }; + B3E2FC0820E568B2009EA554 /* msginit */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = msginit; sourceTree = ""; }; + B3E2FC0920E568B2009EA554 /* gettext */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = gettext; sourceTree = ""; }; + B3E2FC0A20E568B2009EA554 /* gettext.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = gettext.sh; sourceTree = ""; }; + B3E2FC0B20E568B2009EA554 /* msgcmp */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = msgcmp; sourceTree = ""; }; + B3E2FC0C20E568B2009EA554 /* msgcat */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = msgcat; sourceTree = ""; }; + B3E2FC0D20E568B2009EA554 /* recode-sr-latin */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "recode-sr-latin"; sourceTree = ""; }; + B3E2FC0E20E568B2009EA554 /* msgexec */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = msgexec; sourceTree = ""; }; + B3E2FC0F20E568B2009EA554 /* ngettext */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = ngettext; sourceTree = ""; }; + B3E2FC1020E568B2009EA554 /* msgunfmt */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = msgunfmt; sourceTree = ""; }; + B3E2FC1120E568B2009EA554 /* msgfilter */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = msgfilter; sourceTree = ""; }; + B3E2FC1220E568B2009EA554 /* msgfmt */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = msgfmt; sourceTree = ""; }; + B3E2FC1320E568B2009EA554 /* msgattrib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = msgattrib; sourceTree = ""; }; + B3E2FC1420E568B2009EA554 /* xgettext */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = xgettext; sourceTree = ""; }; + B3E2FC1520E568B2009EA554 /* gettextize */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = gettextize; sourceTree = ""; }; + B3E2FC1620E568B2009EA554 /* msguniq */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = msguniq; sourceTree = ""; }; + B3E2FC1820E568B2009EA554 /* gettext.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = gettext.rb; sourceTree = ""; }; + B3E2FC1920E568B2009EA554 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = ""; }; + B3E2FC1A20E568B2009EA554 /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUTHORS; sourceTree = ""; }; + B3E2FC1C20E568B2009EA554 /* autosprintf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = autosprintf.h; sourceTree = ""; }; + B3E2FC1D20E568B2009EA554 /* gettext-po.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gettext-po.h"; sourceTree = ""; }; + B3E2FC1E20E568B2009EA554 /* libintl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libintl.h; sourceTree = ""; }; + B3E2FC1F20E568B2009EA554 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + B3E2FC2020E568B2009EA554 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; + B3E2FC2120E568B2009EA554 /* NEWS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NEWS; sourceTree = ""; }; + B3E2FC2320E568B2009EA554 /* libgettextlib.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libgettextlib.dylib; sourceTree = ""; }; + B3E2FC2420E568B2009EA554 /* libgettextpo.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libgettextpo.0.dylib; sourceTree = ""; }; + B3E2FC2520E568B2009EA554 /* libasprintf.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libasprintf.dylib; sourceTree = ""; }; + B3E2FC2620E568B2009EA554 /* libintl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libintl.dylib; sourceTree = ""; }; + B3E2FC2720E568B2009EA554 /* libintl.8.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libintl.8.dylib; sourceTree = ""; }; + B3E2FC2820E568B2009EA554 /* libasprintf.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libasprintf.0.dylib; sourceTree = ""; }; + B3E2FC2A20E568B2009EA554 /* project-id */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "project-id"; sourceTree = ""; }; + B3E2FC2B20E568B2009EA554 /* urlget */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = urlget; sourceTree = ""; }; + B3E2FC2C20E568B2009EA554 /* hostname */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = hostname; sourceTree = ""; }; + B3E2FC2D20E568B2009EA554 /* cldr-plurals */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "cldr-plurals"; sourceTree = ""; }; + B3E2FC2E20E568B2009EA554 /* user-email */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "user-email"; sourceTree = ""; }; + B3E2FC2F20E568B2009EA554 /* libintl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libintl.a; sourceTree = ""; }; + B3E2FC3020E568B2009EA554 /* libgettextsrc-0.19.8.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libgettextsrc-0.19.8.1.dylib"; sourceTree = ""; }; + B3E2FC3120E568B2009EA554 /* libgettextpo.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libgettextpo.a; sourceTree = ""; }; + B3E2FC3220E568B2009EA554 /* libgettextsrc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libgettextsrc.dylib; sourceTree = ""; }; + B3E2FC3320E568B2009EA554 /* libasprintf.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libasprintf.a; sourceTree = ""; }; + B3E2FC3420E568B2009EA554 /* libgettextlib-0.19.8.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libgettextlib-0.19.8.1.dylib"; sourceTree = ""; }; + B3E2FC3520E568B2009EA554 /* libgettextpo.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libgettextpo.dylib; sourceTree = ""; }; + B3E2FC3920E568B2009EA554 /* gettext.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gettext.3; sourceTree = ""; }; + B3E2FC3A20E568B2009EA554 /* dcgettext.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dcgettext.3; sourceTree = ""; }; + B3E2FC3B20E568B2009EA554 /* textdomain.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = textdomain.3; sourceTree = ""; }; + B3E2FC3C20E568B2009EA554 /* ngettext.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ngettext.3; sourceTree = ""; }; + B3E2FC3D20E568B2009EA554 /* dgettext.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dgettext.3; sourceTree = ""; }; + B3E2FC3E20E568B2009EA554 /* dngettext.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dngettext.3; sourceTree = ""; }; + B3E2FC3F20E568B2009EA554 /* bind_textdomain_codeset.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = bind_textdomain_codeset.3; sourceTree = ""; }; + B3E2FC4020E568B2009EA554 /* dcngettext.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dcngettext.3; sourceTree = ""; }; + B3E2FC4120E568B2009EA554 /* bindtextdomain.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = bindtextdomain.3; sourceTree = ""; }; + B3E2FC4320E568B2009EA554 /* envsubst.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = envsubst.1; sourceTree = ""; }; + B3E2FC4420E568B2009EA554 /* msgattrib.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = msgattrib.1; sourceTree = ""; }; + B3E2FC4520E568B2009EA554 /* recode-sr-latin.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = "recode-sr-latin.1"; sourceTree = ""; }; + B3E2FC4620E568B2009EA554 /* msgcmp.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = msgcmp.1; sourceTree = ""; }; + B3E2FC4720E568B2009EA554 /* msgfmt.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = msgfmt.1; sourceTree = ""; }; + B3E2FC4820E568B2009EA554 /* xgettext.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = xgettext.1; sourceTree = ""; }; + B3E2FC4920E568B2009EA554 /* msggrep.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = msggrep.1; sourceTree = ""; }; + B3E2FC4A20E568B2009EA554 /* msgcomm.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = msgcomm.1; sourceTree = ""; }; + B3E2FC4B20E568B2009EA554 /* autopoint.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = autopoint.1; sourceTree = ""; }; + B3E2FC4C20E568B2009EA554 /* msgunfmt.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = msgunfmt.1; sourceTree = ""; }; + B3E2FC4D20E568B2009EA554 /* msgmerge.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = msgmerge.1; sourceTree = ""; }; + B3E2FC4E20E568B2009EA554 /* msgcat.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = msgcat.1; sourceTree = ""; }; + B3E2FC4F20E568B2009EA554 /* gettext.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = gettext.1; sourceTree = ""; }; + B3E2FC5020E568B2009EA554 /* msgen.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = msgen.1; sourceTree = ""; }; + B3E2FC5120E568B2009EA554 /* msgexec.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = msgexec.1; sourceTree = ""; }; + B3E2FC5220E568B2009EA554 /* msguniq.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = msguniq.1; sourceTree = ""; }; + B3E2FC5320E568B2009EA554 /* gettextize.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = gettextize.1; sourceTree = ""; }; + B3E2FC5420E568B2009EA554 /* msgfilter.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = msgfilter.1; sourceTree = ""; }; + B3E2FC5520E568B2009EA554 /* msginit.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = msginit.1; sourceTree = ""; }; + B3E2FC5620E568B2009EA554 /* ngettext.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = ngettext.1; sourceTree = ""; }; + B3E2FC5720E568B2009EA554 /* msgconv.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = msgconv.1; sourceTree = ""; }; + B3E2FC5920E568B2009EA554 /* size_max.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = size_max.m4; sourceTree = ""; }; + B3E2FC5A20E568B2009EA554 /* lock.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = lock.m4; sourceTree = ""; }; + B3E2FC5B20E568B2009EA554 /* glibc2.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = glibc2.m4; sourceTree = ""; }; + B3E2FC5C20E568B2009EA554 /* po.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = po.m4; sourceTree = ""; }; + B3E2FC5D20E568B2009EA554 /* visibility.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = visibility.m4; sourceTree = ""; }; + B3E2FC5E20E568B2009EA554 /* longlong.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = longlong.m4; sourceTree = ""; }; + B3E2FC5F20E568B2009EA554 /* glibc21.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = glibc21.m4; sourceTree = ""; }; + B3E2FC6020E568B2009EA554 /* intdiv0.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = intdiv0.m4; sourceTree = ""; }; + B3E2FC6120E568B2009EA554 /* stdint_h.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = stdint_h.m4; sourceTree = ""; }; + B3E2FC6220E568B2009EA554 /* extern-inline.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "extern-inline.m4"; sourceTree = ""; }; + B3E2FC6320E568B2009EA554 /* intmax.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = intmax.m4; sourceTree = ""; }; + B3E2FC6420E568B2009EA554 /* fcntl-o.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "fcntl-o.m4"; sourceTree = ""; }; + B3E2FC6520E568B2009EA554 /* lib-link.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "lib-link.m4"; sourceTree = ""; }; + B3E2FC6620E568B2009EA554 /* uintmax_t.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = uintmax_t.m4; sourceTree = ""; }; + B3E2FC6720E568B2009EA554 /* xsize.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = xsize.m4; sourceTree = ""; }; + B3E2FC6820E568B2009EA554 /* threadlib.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = threadlib.m4; sourceTree = ""; }; + B3E2FC6920E568B2009EA554 /* printf-posix.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "printf-posix.m4"; sourceTree = ""; }; + B3E2FC6A20E568B2009EA554 /* codeset.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = codeset.m4; sourceTree = ""; }; + B3E2FC6B20E568B2009EA554 /* gettext.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gettext.m4; sourceTree = ""; }; + B3E2FC6C20E568B2009EA554 /* intl.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = intl.m4; sourceTree = ""; }; + B3E2FC6D20E568B2009EA554 /* wint_t.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = wint_t.m4; sourceTree = ""; }; + B3E2FC6E20E568B2009EA554 /* intldir.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = intldir.m4; sourceTree = ""; }; + B3E2FC6F20E568B2009EA554 /* progtest.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = progtest.m4; sourceTree = ""; }; + B3E2FC7020E568B2009EA554 /* lcmessage.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = lcmessage.m4; sourceTree = ""; }; + B3E2FC7120E568B2009EA554 /* inttypes_h.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = inttypes_h.m4; sourceTree = ""; }; + B3E2FC7220E568B2009EA554 /* iconv.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iconv.m4; sourceTree = ""; }; + B3E2FC7320E568B2009EA554 /* nls.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = nls.m4; sourceTree = ""; }; + B3E2FC7420E568B2009EA554 /* lib-prefix.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "lib-prefix.m4"; sourceTree = ""; }; + B3E2FC7520E568B2009EA554 /* inttypes-pri.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "inttypes-pri.m4"; sourceTree = ""; }; + B3E2FC7620E568B2009EA554 /* lib-ld.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "lib-ld.m4"; sourceTree = ""; }; + B3E2FC7720E568B2009EA554 /* wchar_t.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = wchar_t.m4; sourceTree = ""; }; + B3E2FC7820E568B2009EA554 /* intlmacosx.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = intlmacosx.m4; sourceTree = ""; }; + B3E2FC7C20E568B2009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FC7D20E568B2009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FC8020E568B2009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FC8120E568B2009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FC8420E568B2009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FC8520E568B2009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FC8820E568B2009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FC8920E568B2009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FC8C20E568B2009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FC8D20E568B2009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FC9020E568B2009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FC9320E568B2009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FC9620E568B2009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FC9720E568B2009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FC9A20E568B2009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FC9B20E568B2009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FC9E20E568B2009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FC9F20E568B2009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCA220E568B2009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCA320E568B2009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCA620E568B2009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCA720E568B2009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCAA20E568B2009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCAB20E568B2009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCAE20E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCAF20E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCB220E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCB320E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCB620E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCB720E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCBA20E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCBB20E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCBE20E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCBF20E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCC220E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCC320E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCC620E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCC720E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCC820E568B3009EA554 /* locale.alias */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = locale.alias; sourceTree = ""; }; + B3E2FCCB20E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCCC20E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCCF20E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCD020E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCD320E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCD420E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCD720E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCD820E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCDB20E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCDE20E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCDF20E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCE220E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCE520E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCE820E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCE920E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCEC20E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCED20E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCF020E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCF120E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCF420E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCF520E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCF820E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCF920E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FCFC20E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FCFD20E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FD0020E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FD0120E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FD0420E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FD0720E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FD0820E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FD0B20E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FD0C20E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FD0F20E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FD1020E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FD1320E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FD1420E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FD1720E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FD1A20E568B3009EA554 /* gettext-runtime.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-runtime.mo"; sourceTree = ""; }; + B3E2FD1B20E568B3009EA554 /* gettext-tools.mo */ = {isa = PBXFileReference; lastKnownFileType = file; path = "gettext-tools.mo"; sourceTree = ""; }; + B3E2FD1F20E568B3009EA554 /* po-mode.el */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "po-mode.el"; sourceTree = ""; }; + B3E2FD2020E568B3009EA554 /* start-po.el */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "start-po.el"; sourceTree = ""; }; + B3E2FD2120E568B3009EA554 /* start-po.elc */ = {isa = PBXFileReference; lastKnownFileType = file; path = "start-po.elc"; sourceTree = ""; }; + B3E2FD2220E568B3009EA554 /* po-compat.el */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "po-compat.el"; sourceTree = ""; }; + B3E2FD2320E568B3009EA554 /* po-mode.elc */ = {isa = PBXFileReference; lastKnownFileType = file; path = "po-mode.elc"; sourceTree = ""; }; + B3E2FD2420E568B3009EA554 /* po-compat.elc */ = {isa = PBXFileReference; lastKnownFileType = file; path = "po-compat.elc"; sourceTree = ""; }; + B3E2FD2720E568B3009EA554 /* gsettings.its */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = gsettings.its; sourceTree = ""; }; + B3E2FD2820E568B3009EA554 /* appdata.its */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = appdata.its; sourceTree = ""; }; + B3E2FD2920E568B3009EA554 /* appdata.loc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = appdata.loc; sourceTree = ""; }; + B3E2FD2A20E568B3009EA554 /* glade.loc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = glade.loc; sourceTree = ""; }; + B3E2FD2B20E568B3009EA554 /* glade2.its */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = glade2.its; sourceTree = ""; }; + B3E2FD2C20E568B3009EA554 /* gsettings.loc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = gsettings.loc; sourceTree = ""; }; + B3E2FD2D20E568B3009EA554 /* glade1.its */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = glade1.its; sourceTree = ""; }; + B3E2FD2E20E568B3009EA554 /* gtkbuilder.its */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = gtkbuilder.its; sourceTree = ""; }; + B3E2FD3020E568B3009EA554 /* autosprintf.info */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = autosprintf.info; sourceTree = ""; }; + B3E2FD3120E568B3009EA554 /* gettext.info */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gettext.info; sourceTree = ""; }; + B3E2FD3320E568B3009EA554 /* msgunfmt.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = msgunfmt.tcl; sourceTree = ""; }; + B3E2FD3420E568B3009EA554 /* config.rpath */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = config.rpath; sourceTree = ""; }; + B3E2FD3620E568B3009EA554 /* tsearch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tsearch.h; sourceTree = ""; }; + B3E2FD3720E568B3009EA554 /* dcigettext.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dcigettext.c; sourceTree = ""; }; + B3E2FD3820E568B3009EA554 /* gettext.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gettext.c; sourceTree = ""; }; + B3E2FD3920E568B3009EA554 /* log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = log.c; sourceTree = ""; }; + B3E2FD3A20E568B3009EA554 /* intl-compat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "intl-compat.c"; sourceTree = ""; }; + B3E2FD3B20E568B3009EA554 /* printf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = printf.c; sourceTree = ""; }; + B3E2FD3C20E568B3009EA554 /* hash-string.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "hash-string.c"; sourceTree = ""; }; + B3E2FD3D20E568B3009EA554 /* vasnprintf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vasnprintf.h; sourceTree = ""; }; + B3E2FD3E20E568B3009EA554 /* explodename.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = explodename.c; sourceTree = ""; }; + B3E2FD3F20E568B3009EA554 /* printf-parse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "printf-parse.h"; sourceTree = ""; }; + B3E2FD4020E568B3009EA554 /* gmo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gmo.h; sourceTree = ""; }; + B3E2FD4120E568B3009EA554 /* printf-args.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "printf-args.c"; sourceTree = ""; }; + B3E2FD4220E568B3009EA554 /* plural-exp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "plural-exp.h"; sourceTree = ""; }; + B3E2FD4320E568B3009EA554 /* libgnuintl.in.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libgnuintl.in.h; sourceTree = ""; }; + B3E2FD4420E568B3009EA554 /* dcgettext.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dcgettext.c; sourceTree = ""; }; + B3E2FD4520E568B3009EA554 /* export.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = export.h; sourceTree = ""; }; + B3E2FD4620E568B3009EA554 /* gettextP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gettextP.h; sourceTree = ""; }; + B3E2FD4720E568B3009EA554 /* textdomain.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = textdomain.c; sourceTree = ""; }; + B3E2FD4820E568B3009EA554 /* xsize.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xsize.c; sourceTree = ""; }; + B3E2FD4920E568B3009EA554 /* intl-exports.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "intl-exports.c"; sourceTree = ""; }; + B3E2FD4A20E568B3009EA554 /* ngettext.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ngettext.c; sourceTree = ""; }; + B3E2FD4B20E568B3009EA554 /* lock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lock.h; sourceTree = ""; }; + B3E2FD4C20E568B3009EA554 /* ref-add.sin */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "ref-add.sin"; sourceTree = ""; }; + B3E2FD4D20E568B3009EA554 /* loadinfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = loadinfo.h; sourceTree = ""; }; + B3E2FD4E20E568B4009EA554 /* dngettext.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dngettext.c; sourceTree = ""; }; + B3E2FD4F20E568B4009EA554 /* wprintf-parse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "wprintf-parse.h"; sourceTree = ""; }; + B3E2FD5020E568B4009EA554 /* dgettext.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dgettext.c; sourceTree = ""; }; + B3E2FD5120E568B4009EA554 /* localcharset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = localcharset.h; sourceTree = ""; }; + B3E2FD5220E568B4009EA554 /* relocatable.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = relocatable.c; sourceTree = ""; }; + B3E2FD5320E568B4009EA554 /* dcngettext.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dcngettext.c; sourceTree = ""; }; + B3E2FD5420E568B4009EA554 /* os2compat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = os2compat.c; sourceTree = ""; }; + B3E2FD5520E568B4009EA554 /* vasnwprintf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vasnwprintf.h; sourceTree = ""; }; + B3E2FD5620E568B4009EA554 /* locale.alias */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = locale.alias; sourceTree = ""; }; + B3E2FD5720E568B4009EA554 /* printf-args.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "printf-args.h"; sourceTree = ""; }; + B3E2FD5820E568B4009EA554 /* plural-exp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "plural-exp.c"; sourceTree = ""; }; + B3E2FD5920E568B4009EA554 /* COPYING.LIB */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING.LIB; sourceTree = ""; }; + B3E2FD5A20E568B4009EA554 /* hash-string.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hash-string.h"; sourceTree = ""; }; + B3E2FD5B20E568B4009EA554 /* setlocale.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = setlocale.c; sourceTree = ""; }; + B3E2FD5C20E568B4009EA554 /* printf-parse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "printf-parse.c"; sourceTree = ""; }; + B3E2FD5D20E568B4009EA554 /* vasnprintf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vasnprintf.c; sourceTree = ""; }; + B3E2FD5E20E568B4009EA554 /* bindtextdom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bindtextdom.c; sourceTree = ""; }; + B3E2FD5F20E568B4009EA554 /* tsearch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tsearch.c; sourceTree = ""; }; + B3E2FD6020E568B4009EA554 /* localealias.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = localealias.c; sourceTree = ""; }; + B3E2FD6120E568B4009EA554 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = ""; }; + B3E2FD6220E568B4009EA554 /* xsize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xsize.h; sourceTree = ""; }; + B3E2FD6320E568B4009EA554 /* plural.y */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.yacc; path = plural.y; sourceTree = ""; }; + B3E2FD6420E568B4009EA554 /* libintl.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = libintl.rc; sourceTree = ""; }; + B3E2FD6520E568B4009EA554 /* finddomain.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = finddomain.c; sourceTree = ""; }; + B3E2FD6620E568B4009EA554 /* langprefs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = langprefs.c; sourceTree = ""; }; + B3E2FD6720E568B4009EA554 /* plural.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = plural.c; sourceTree = ""; }; + B3E2FD6820E568B4009EA554 /* config.charset */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = config.charset; sourceTree = ""; }; + B3E2FD6920E568B4009EA554 /* version.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = version.c; sourceTree = ""; }; + B3E2FD6A20E568B4009EA554 /* osdep.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = osdep.c; sourceTree = ""; }; + B3E2FD6B20E568B4009EA554 /* relocatable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = relocatable.h; sourceTree = ""; }; + B3E2FD6C20E568B4009EA554 /* localcharset.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = localcharset.c; sourceTree = ""; }; + B3E2FD6D20E568B4009EA554 /* ref-del.sin */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "ref-del.sin"; sourceTree = ""; }; + B3E2FD6E20E568B4009EA554 /* threadlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = threadlib.c; sourceTree = ""; }; + B3E2FD6F20E568B4009EA554 /* lock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lock.c; sourceTree = ""; }; + B3E2FD7020E568B4009EA554 /* loadmsgcat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = loadmsgcat.c; sourceTree = ""; }; + B3E2FD7120E568B4009EA554 /* l10nflist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = l10nflist.c; sourceTree = ""; }; + B3E2FD7220E568B4009EA554 /* Makefile.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Makefile.in; sourceTree = ""; }; + B3E2FD7320E568B4009EA554 /* localename.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = localename.c; sourceTree = ""; }; + B3E2FD7420E568B4009EA554 /* os2compat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = os2compat.h; sourceTree = ""; }; + B3E2FD7520E568B4009EA554 /* eval-plural.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "eval-plural.h"; sourceTree = ""; }; + B3E2FD7620E568B4009EA554 /* verify.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = verify.h; sourceTree = ""; }; + B3E2FD7820E568B4009EA554 /* team-address */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "team-address"; sourceTree = ""; }; + B3E2FD7A20E568B4009EA554 /* trigger */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = trigger; sourceTree = ""; }; + B3E2FD7B20E568B4009EA554 /* team-address */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "team-address"; sourceTree = ""; }; + B3E2FD7C20E568B4009EA554 /* teams.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = teams.html; sourceTree = ""; }; + B3E2FD7D20E568B4009EA554 /* teams.url */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = teams.url; sourceTree = ""; }; + B3E2FD7F20E568B4009EA554 /* trigger */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = trigger; sourceTree = ""; }; + B3E2FD8020E568B4009EA554 /* team-address */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "team-address"; sourceTree = ""; }; + B3E2FD8120E568B4009EA554 /* teams.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = teams.html; sourceTree = ""; }; + B3E2FD8220E568B4009EA554 /* teams.url */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = teams.url; sourceTree = ""; }; + B3E2FD8420E568B4009EA554 /* trigger */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = trigger; sourceTree = ""; }; + B3E2FD8520E568B4009EA554 /* team-address */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "team-address"; sourceTree = ""; }; + B3E2FD8620E568B4009EA554 /* teams.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = teams.html; sourceTree = ""; }; + B3E2FD8720E568B4009EA554 /* teams.url */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = teams.url; sourceTree = ""; }; + B3E2FD8820E568B4009EA554 /* index */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = index; sourceTree = ""; }; + B3E2FD8920E568B4009EA554 /* archive.dir.tar.bz2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = archive.dir.tar.bz2; sourceTree = ""; }; + B3E2FD8A20E568B4009EA554 /* ABOUT-NLS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "ABOUT-NLS"; sourceTree = ""; }; + B3E2FD8C20E568B4009EA554 /* po-emacs-xterm16.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = "po-emacs-xterm16.css"; sourceTree = ""; }; + B3E2FD8D20E568B4009EA554 /* po-emacs-xterm.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = "po-emacs-xterm.css"; sourceTree = ""; }; + B3E2FD8E20E568B4009EA554 /* po-default.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = "po-default.css"; sourceTree = ""; }; + B3E2FD8F20E568B4009EA554 /* po-vim.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = "po-vim.css"; sourceTree = ""; }; + B3E2FD9020E568B4009EA554 /* po-emacs-xterm256.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = "po-emacs-xterm256.css"; sourceTree = ""; }; + B3E2FD9120E568B4009EA554 /* po-emacs-x.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = "po-emacs-x.css"; sourceTree = ""; }; + B3E2FD9320E568B4009EA554 /* boldquot.sed */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = boldquot.sed; sourceTree = ""; }; + B3E2FD9420E568B4009EA554 /* en@boldquot.header */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "en@boldquot.header"; sourceTree = ""; }; + B3E2FD9520E568B4009EA554 /* insert-header.sin */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "insert-header.sin"; sourceTree = ""; }; + B3E2FD9620E568B4009EA554 /* quot.sed */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = quot.sed; sourceTree = ""; }; + B3E2FD9720E568B4009EA554 /* Makevars.template */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Makevars.template; sourceTree = ""; }; + B3E2FD9820E568B4009EA554 /* Makefile.in.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Makefile.in.in; sourceTree = ""; }; + B3E2FD9920E568B4009EA554 /* remove-potcdate.sin */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "remove-potcdate.sin"; sourceTree = ""; }; + B3E2FD9A20E568B4009EA554 /* Rules-quot */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Rules-quot"; sourceTree = ""; }; + B3E2FD9B20E568B4009EA554 /* en@quot.header */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "en@quot.header"; sourceTree = ""; }; + B3E2FD9C20E568B4009EA554 /* gettext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gettext.h; sourceTree = ""; }; + B3E2FD9D20E568B4009EA554 /* javaversion.class */ = {isa = PBXFileReference; lastKnownFileType = compiled.javaclass; path = javaversion.class; sourceTree = ""; }; + B3E9A9001FB4DCCA00FD8E7A /* autorevision.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = autorevision.json; sourceTree = ""; }; + B3E9A9021FB4DDE400FD8E7A /* Version.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Version.swift; sourceTree = ""; }; + B3E9A9041FB4E0B200FD8E7A /* bin */ = {isa = PBXFileReference; lastKnownFileType = folder; path = bin; sourceTree = ""; }; + B3F0ECEF1F9E6A4D0078690E /* SpeculidImageSpecificationBuilderProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpeculidImageSpecificationBuilderProtocol.swift; sourceTree = ""; }; + B3F0ECF11F9E6AAD0078690E /* SpeculidImageSpecificationBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpeculidImageSpecificationBuilder.swift; sourceTree = ""; }; + B3F8045820E5820B00030497 /* INSTALL_RECEIPT.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = INSTALL_RECEIPT.json; sourceTree = ""; }; + B3F8045A20E5820B00030497 /* pango-view */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "pango-view"; sourceTree = ""; }; + B3F8045C20E5820B00030497 /* pango.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = pango.rb; sourceTree = ""; }; + B3F8045D20E5820B00030497 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = ""; }; + B3F8045E20E5820B00030497 /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUTHORS; sourceTree = ""; }; + B3F8046220E5820B00030497 /* pango.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pango.h; sourceTree = ""; }; + B3F8046320E5820B00030497 /* pangoft2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pangoft2.h; sourceTree = ""; }; + B3F8046420E5820B00030497 /* pango-item.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-item.h"; sourceTree = ""; }; + B3F8046520E5820B00030497 /* pango-coverage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-coverage.h"; sourceTree = ""; }; + B3F8046620E5820B00030497 /* pango-version-macros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-version-macros.h"; sourceTree = ""; }; + B3F8046720E5820B00030497 /* pango-language.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-language.h"; sourceTree = ""; }; + B3F8046820E5820B00030497 /* pango-matrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-matrix.h"; sourceTree = ""; }; + B3F8046920E5820B00030497 /* pango-renderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-renderer.h"; sourceTree = ""; }; + B3F8046A20E5820B00030497 /* pango-ot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-ot.h"; sourceTree = ""; }; + B3F8046B20E5820B00030497 /* pango-enum-types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-enum-types.h"; sourceTree = ""; }; + B3F8046C20E5820B00030497 /* pango-glyph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-glyph.h"; sourceTree = ""; }; + B3F8046D20E5820B00030497 /* pango-features.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-features.h"; sourceTree = ""; }; + B3F8046E20E5820B00030497 /* pango-modules.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-modules.h"; sourceTree = ""; }; + B3F8046F20E5820B00030497 /* pango-fontset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-fontset.h"; sourceTree = ""; }; + B3F8047020E5820B00030497 /* pango-engine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-engine.h"; sourceTree = ""; }; + B3F8047120E5820B00030497 /* pango-break.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-break.h"; sourceTree = ""; }; + B3F8047220E5820B00030497 /* pango-script.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-script.h"; sourceTree = ""; }; + B3F8047320E5820B00030497 /* pangocairo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pangocairo.h; sourceTree = ""; }; + B3F8047420E5820B00030497 /* pango-glyph-item.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-glyph-item.h"; sourceTree = ""; }; + B3F8047520E5820B00030497 /* pango-bidi-type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-bidi-type.h"; sourceTree = ""; }; + B3F8047620E5820B00030497 /* pango-font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-font.h"; sourceTree = ""; }; + B3F8047720E5820B00030497 /* pangofc-fontmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pangofc-fontmap.h"; sourceTree = ""; }; + B3F8047820E5820B00030497 /* pango-context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-context.h"; sourceTree = ""; }; + B3F8047920E5820B00030497 /* pangofc-font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pangofc-font.h"; sourceTree = ""; }; + B3F8047A20E5820B00030497 /* pango-fontmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-fontmap.h"; sourceTree = ""; }; + B3F8047B20E5820B00030497 /* pangofc-decoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pangofc-decoder.h"; sourceTree = ""; }; + B3F8047C20E5820B00030497 /* pango-types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-types.h"; sourceTree = ""; }; + B3F8047D20E5820B00030497 /* pango-attributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-attributes.h"; sourceTree = ""; }; + B3F8047E20E5820B00030497 /* pango-utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-utils.h"; sourceTree = ""; }; + B3F8047F20E5820B00030497 /* pango-layout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-layout.h"; sourceTree = ""; }; + B3F8048020E5820B00030497 /* pango-tabs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-tabs.h"; sourceTree = ""; }; + B3F8048120E5820B00030497 /* pango-gravity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "pango-gravity.h"; sourceTree = ""; }; + B3F8048220E5820B00030497 /* pangocoretext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pangocoretext.h; sourceTree = ""; }; + B3F8048320E5820B00030497 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + B3F8048420E5820B00030497 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; + B3F8048520E5820B00030497 /* NEWS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NEWS; sourceTree = ""; }; + B3F8048720E5820B00030497 /* libpango-1.0.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libpango-1.0.0.dylib"; sourceTree = ""; }; + B3F8048820E5820B00030497 /* libpangoft2-1.0.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libpangoft2-1.0.0.dylib"; sourceTree = ""; }; + B3F8048A20E5820B00030497 /* pangoft2.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pangoft2.pc; sourceTree = ""; }; + B3F8048B20E5820B00030497 /* pango.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pango.pc; sourceTree = ""; }; + B3F8048C20E5820B00030497 /* pangocairo.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pangocairo.pc; sourceTree = ""; }; + B3F8048D20E5820B00030497 /* libpangocairo-1.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libpangocairo-1.0.dylib"; sourceTree = ""; }; + B3F8048E20E5820B00030497 /* libpangocairo-1.0.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libpangocairo-1.0.0.dylib"; sourceTree = ""; }; + B3F8048F20E5820B00030497 /* libpangoft2-1.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpangoft2-1.0.a"; sourceTree = ""; }; + B3F8049020E5820B00030497 /* libpangocairo-1.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpangocairo-1.0.a"; sourceTree = ""; }; + B3F8049120E5820B00030497 /* libpangoft2-1.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libpangoft2-1.0.dylib"; sourceTree = ""; }; + B3F8049220E5820B00030497 /* libpango-1.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libpango-1.0.dylib"; sourceTree = ""; }; + B3F8049420E5820B00030497 /* PangoCairo-1.0.typelib */ = {isa = PBXFileReference; lastKnownFileType = file; path = "PangoCairo-1.0.typelib"; sourceTree = ""; }; + B3F8049520E5820B00030497 /* Pango-1.0.typelib */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pango-1.0.typelib"; sourceTree = ""; }; + B3F8049620E5820B00030497 /* PangoFT2-1.0.typelib */ = {isa = PBXFileReference; lastKnownFileType = file; path = "PangoFT2-1.0.typelib"; sourceTree = ""; }; + B3F8049720E5820B00030497 /* libpango-1.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libpango-1.0.a"; sourceTree = ""; }; + B3F8049B20E5820B00030497 /* pango-view.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = "pango-view.1"; sourceTree = ""; }; + B3F8049D20E5820B00030497 /* Pango-1.0.gir */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Pango-1.0.gir"; sourceTree = ""; }; + B3F8049E20E5820B00030497 /* PangoCairo-1.0.gir */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "PangoCairo-1.0.gir"; sourceTree = ""; }; + B3F8049F20E5820B00030497 /* PangoFT2-1.0.gir */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "PangoFT2-1.0.gir"; sourceTree = ""; }; + B3F804A220E5820B00030497 /* api-index-full.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-full.html"; sourceTree = ""; }; + B3F804A320E5820B00030497 /* pango-Engines.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-Engines.html"; sourceTree = ""; }; + B3F804A420E5820B00030497 /* layout.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = layout.gif; sourceTree = ""; }; + B3F804A520E5820B00030497 /* pango-Coverage-Maps.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-Coverage-Maps.html"; sourceTree = ""; }; + B3F804A620E5820B00030497 /* up-insensitive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "up-insensitive.png"; sourceTree = ""; }; + B3F804A720E5820B00030497 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = ""; }; + B3F804A820E5820B00030497 /* up.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = up.png; sourceTree = ""; }; + B3F804A920E5820B00030497 /* PangoMarkupFormat.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = PangoMarkupFormat.html; sourceTree = ""; }; + B3F804AA20E5820B00030497 /* pango.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pango.html; sourceTree = ""; }; + B3F804AB20E5820B00030497 /* rendering.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = rendering.html; sourceTree = ""; }; + B3F804AC20E5820B00030497 /* pango-Scripts-and-Languages.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-Scripts-and-Languages.html"; sourceTree = ""; }; + B3F804AD20E5820B00030497 /* PangoEngineLang.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = PangoEngineLang.html; sourceTree = ""; }; + B3F804AE20E5820B00030497 /* pango-OpenType-Font-Handling.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-OpenType-Font-Handling.html"; sourceTree = ""; }; + B3F804AF20E5820B00030497 /* right-insensitive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "right-insensitive.png"; sourceTree = ""; }; + B3F804B020E5820B00030497 /* pango-Version-Checking.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-Version-Checking.html"; sourceTree = ""; }; + B3F804B120E5820B00030497 /* pango-Bidirectional-Text.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-Bidirectional-Text.html"; sourceTree = ""; }; + B3F804B220E5820B00030497 /* pango-Fonts.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-Fonts.html"; sourceTree = ""; }; + B3F804B320E5820B00030497 /* pango-Cairo-Rendering.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-Cairo-Rendering.html"; sourceTree = ""; }; + B3F804B420E5820B00030497 /* pango-Xft-Fonts-and-Rendering.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-Xft-Fonts-and-Rendering.html"; sourceTree = ""; }; + B3F804B520E5820B00030497 /* home.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = home.png; sourceTree = ""; }; + B3F804B620E5820B00030497 /* pango-Text-Processing.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-Text-Processing.html"; sourceTree = ""; }; + B3F804B720E5820B00030497 /* PangoFcFontMap.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = PangoFcFontMap.html; sourceTree = ""; }; + B3F804B820E5820B00030497 /* pango-FreeType-Fonts-and-Rendering.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-FreeType-Fonts-and-Rendering.html"; sourceTree = ""; }; + B3F804B920E5820B00030497 /* pango-Tab-Stops.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-Tab-Stops.html"; sourceTree = ""; }; + B3F804BA20E5820B00030497 /* left.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = left.png; sourceTree = ""; }; + B3F804BB20E5820B00030497 /* lowlevel.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = lowlevel.html; sourceTree = ""; }; + B3F804BC20E5820B00030497 /* annotation-glossary.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "annotation-glossary.html"; sourceTree = ""; }; + B3F804BD20E5820B00030497 /* pango.devhelp2 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = pango.devhelp2; sourceTree = ""; }; + B3F804BE20E5820B00030497 /* pango-CoreText-Fonts.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-CoreText-Fonts.html"; sourceTree = ""; }; + B3F804BF20E5820B00030497 /* pango-hierarchy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-hierarchy.html"; sourceTree = ""; }; + B3F804C020E5820B00030497 /* style.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = style.css; sourceTree = ""; }; + B3F804C120E5820B00030497 /* pango-Glyph-Storage.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-Glyph-Storage.html"; sourceTree = ""; }; + B3F804C220E5820B00030497 /* pango-Vertical-Text.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-Vertical-Text.html"; sourceTree = ""; }; + B3F804C320E5820B00030497 /* pango-Win32-Fonts-and-Rendering.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-Win32-Fonts-and-Rendering.html"; sourceTree = ""; }; + B3F804C420E5820B00030497 /* PangoFcFont.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = PangoFcFont.html; sourceTree = ""; }; + B3F804C520E5820B00030497 /* PangoFcDecoder.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = PangoFcDecoder.html; sourceTree = ""; }; + B3F804C620E5820B00030497 /* pango-Text-Attributes.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-Text-Attributes.html"; sourceTree = ""; }; + B3F804C720E5820B00030497 /* pango-Miscellaneous-Utilities.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-Miscellaneous-Utilities.html"; sourceTree = ""; }; + B3F804C820E5820B00030497 /* pango-Layout-Objects.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-Layout-Objects.html"; sourceTree = ""; }; + B3F804C920E5820B00030497 /* left-insensitive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "left-insensitive.png"; sourceTree = ""; }; + B3F804CA20E5820B00030497 /* rotated-text.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "rotated-text.png"; sourceTree = ""; }; + B3F804CB20E5820B00030497 /* PangoEngineShape.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = PangoEngineShape.html; sourceTree = ""; }; + B3F804CC20E5820B00030497 /* right.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = right.png; sourceTree = ""; }; + B3F804CD20E5820B00030497 /* pango-Modules.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pango-Modules.html"; sourceTree = ""; }; + B3F804CE20E5820B00030497 /* PangoRenderer.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = PangoRenderer.html; sourceTree = ""; }; + B3F8054020E584B300030497 /* INSTALL_RECEIPT.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = INSTALL_RECEIPT.json; sourceTree = ""; }; + B3F8054320E584B300030497 /* png-fix-itxt */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "png-fix-itxt"; sourceTree = ""; }; + B3F8054420E584B300030497 /* libpng16-config */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "libpng16-config"; sourceTree = ""; }; + B3F8054520E584B300030497 /* pngfix */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = pngfix; sourceTree = ""; }; + B3F8054620E584B300030497 /* libpng-config */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "libpng-config"; sourceTree = ""; }; + B3F8054820E584B300030497 /* libpng.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = libpng.rb; sourceTree = ""; }; + B3F8054920E584B300030497 /* CHANGES */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGES; sourceTree = ""; }; + B3F8054C20E584B300030497 /* png.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = png.h; sourceTree = ""; }; + B3F8054D20E584B300030497 /* pnglibconf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pnglibconf.h; sourceTree = ""; }; + B3F8054E20E584B300030497 /* pngconf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pngconf.h; sourceTree = ""; }; + B3F8054F20E584B300030497 /* png.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = png.h; sourceTree = ""; }; + B3F8055020E584B300030497 /* pnglibconf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pnglibconf.h; sourceTree = ""; }; + B3F8055120E584B300030497 /* pngconf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pngconf.h; sourceTree = ""; }; + B3F8055220E584B300030497 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + B3F8055320E584B300030497 /* TODO */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TODO; sourceTree = ""; }; + B3F8055620E584B300030497 /* libpng16.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = libpng16.pc; sourceTree = ""; }; + B3F8055720E584B300030497 /* libpng.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = libpng.pc; sourceTree = ""; }; + B3F8055820E584B300030497 /* libpng16.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libpng16.a; sourceTree = ""; }; + B3F8055920E584B300030497 /* libpng.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libpng.a; sourceTree = ""; }; + B3F8055A20E584B300030497 /* libpng16.16.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpng16.16.dylib; sourceTree = ""; }; + B3F8055B20E584B300030497 /* libpng.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpng.dylib; sourceTree = ""; }; + B3F8055C20E584B300030497 /* libpng16.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpng16.dylib; sourceTree = ""; }; + B3F8056020E584B300030497 /* png.5 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = png.5; sourceTree = ""; }; + B3F8056220E584B300030497 /* libpng.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = libpng.3; sourceTree = ""; }; + B3F8056320E584B300030497 /* libpngpf.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = libpngpf.3; sourceTree = ""; }; + B3F8058220E5851900030497 /* INSTALL_RECEIPT.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = INSTALL_RECEIPT.json; sourceTree = ""; }; + B3F8058420E5851900030497 /* pcretest */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = pcretest; sourceTree = ""; }; + B3F8058520E5851900030497 /* pcre-config */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "pcre-config"; sourceTree = ""; }; + B3F8058620E5851900030497 /* pcregrep */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = pcregrep; sourceTree = ""; }; + B3F8058820E5851900030497 /* pcre.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = pcre.rb; sourceTree = ""; }; + B3F8058920E5851900030497 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = ""; }; + B3F8058A20E5851900030497 /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUTHORS; sourceTree = ""; }; + B3F8058C20E5851900030497 /* pcrecpparg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pcrecpparg.h; sourceTree = ""; }; + B3F8058D20E5851900030497 /* pcreposix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pcreposix.h; sourceTree = ""; }; + B3F8058E20E5851900030497 /* pcre_scanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pcre_scanner.h; sourceTree = ""; }; + B3F8058F20E5851900030497 /* pcre_stringpiece.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pcre_stringpiece.h; sourceTree = ""; }; + B3F8059020E5851900030497 /* pcre.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pcre.h; sourceTree = ""; }; + B3F8059120E5851900030497 /* pcrecpp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pcrecpp.h; sourceTree = ""; }; + B3F8059220E5851900030497 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + B3F8059320E5851900030497 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; + B3F8059420E5851900030497 /* NEWS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NEWS; sourceTree = ""; }; + B3F8059620E5851900030497 /* libpcre.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpcre.1.dylib; sourceTree = ""; }; + B3F8059820E5851900030497 /* libpcreposix.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = libpcreposix.pc; sourceTree = ""; }; + B3F8059920E5851900030497 /* libpcre16.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = libpcre16.pc; sourceTree = ""; }; + B3F8059A20E5851900030497 /* libpcre32.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = libpcre32.pc; sourceTree = ""; }; + B3F8059B20E5851900030497 /* libpcrecpp.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = libpcrecpp.pc; sourceTree = ""; }; + B3F8059C20E5851900030497 /* libpcre.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = libpcre.pc; sourceTree = ""; }; + B3F8059D20E5851900030497 /* libpcreposix.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpcreposix.0.dylib; sourceTree = ""; }; + B3F8059E20E5851900030497 /* libpcre.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpcre.dylib; sourceTree = ""; }; + B3F8059F20E5851900030497 /* libpcre16.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libpcre16.a; sourceTree = ""; }; + B3F805A020E5851900030497 /* libpcrecpp.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpcrecpp.0.dylib; sourceTree = ""; }; + B3F805A120E5851900030497 /* libpcreposix.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpcreposix.dylib; sourceTree = ""; }; + B3F805A220E5851900030497 /* libpcre32.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libpcre32.a; sourceTree = ""; }; + B3F805A320E5851900030497 /* libpcre16.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpcre16.0.dylib; sourceTree = ""; }; + B3F805A420E5851900030497 /* libpcre32.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpcre32.dylib; sourceTree = ""; }; + B3F805A520E5851900030497 /* libpcre16.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpcre16.dylib; sourceTree = ""; }; + B3F805A620E5851900030497 /* libpcreposix.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libpcreposix.a; sourceTree = ""; }; + B3F805A720E5851900030497 /* libpcrecpp.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpcrecpp.dylib; sourceTree = ""; }; + B3F805A820E5851900030497 /* libpcre32.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpcre32.0.dylib; sourceTree = ""; }; + B3F805A920E5851900030497 /* libpcre.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libpcre.a; sourceTree = ""; }; + B3F805AA20E5851900030497 /* libpcrecpp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libpcrecpp.a; sourceTree = ""; }; + B3F805AB20E5851900030497 /* LICENCE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENCE; sourceTree = ""; }; + B3F805AF20E5851900030497 /* pcre_utf16_to_host_byte_order.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_utf16_to_host_byte_order.3; sourceTree = ""; }; + B3F805B020E5851900030497 /* pcre32_refcount.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_refcount.3; sourceTree = ""; }; + B3F805B120E5851900030497 /* pcre_copy_substring.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_copy_substring.3; sourceTree = ""; }; + B3F805B220E5851900030497 /* pcre32_get_stringnumber.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_get_stringnumber.3; sourceTree = ""; }; + B3F805B320E5851900030497 /* pcre_jit_exec.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_jit_exec.3; sourceTree = ""; }; + B3F805B420E5851900030497 /* pcre_get_named_substring.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_get_named_substring.3; sourceTree = ""; }; + B3F805B520E5851900030497 /* pcre16_dfa_exec.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_dfa_exec.3; sourceTree = ""; }; + B3F805B620E5851900030497 /* pcrelimits.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcrelimits.3; sourceTree = ""; }; + B3F805B720E5851900030497 /* pcre_compile.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_compile.3; sourceTree = ""; }; + B3F805B820E5851900030497 /* pcresyntax.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcresyntax.3; sourceTree = ""; }; + B3F805B920E5851900030497 /* pcreunicode.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcreunicode.3; sourceTree = ""; }; + B3F805BA20E5851900030497 /* pcre16_get_stringtable_entries.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_get_stringtable_entries.3; sourceTree = ""; }; + B3F805BB20E5851900030497 /* pcre_pattern_to_host_byte_order.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_pattern_to_host_byte_order.3; sourceTree = ""; }; + B3F805BC20E5851900030497 /* pcre_get_substring_list.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_get_substring_list.3; sourceTree = ""; }; + B3F805BD20E5851900030497 /* pcre.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre.3; sourceTree = ""; }; + B3F805BE20E5851900030497 /* pcre16_get_named_substring.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_get_named_substring.3; sourceTree = ""; }; + B3F805BF20E5851900030497 /* pcre32_exec.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_exec.3; sourceTree = ""; }; + B3F805C020E5851900030497 /* pcrecpp.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcrecpp.3; sourceTree = ""; }; + B3F805C120E5851900030497 /* pcrebuild.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcrebuild.3; sourceTree = ""; }; + B3F805C220E5851900030497 /* pcre32_copy_substring.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_copy_substring.3; sourceTree = ""; }; + B3F805C320E5851900030497 /* pcre16_compile2.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_compile2.3; sourceTree = ""; }; + B3F805C420E5851900030497 /* pcre16_version.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_version.3; sourceTree = ""; }; + B3F805C520E5851900030497 /* pcre16_exec.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_exec.3; sourceTree = ""; }; + B3F805C620E5851900030497 /* pcre32_copy_named_substring.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_copy_named_substring.3; sourceTree = ""; }; + B3F805C720E5851900030497 /* pcre32_get_named_substring.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_get_named_substring.3; sourceTree = ""; }; + B3F805C820E5851900030497 /* pcre16_fullinfo.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_fullinfo.3; sourceTree = ""; }; + B3F805C920E5851900030497 /* pcre_free_substring_list.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_free_substring_list.3; sourceTree = ""; }; + B3F805CA20E5851900030497 /* pcre16_copy_substring.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_copy_substring.3; sourceTree = ""; }; + B3F805CB20E5851900030497 /* pcrematching.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcrematching.3; sourceTree = ""; }; + B3F805CC20E5851900030497 /* pcre16_refcount.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_refcount.3; sourceTree = ""; }; + B3F805CD20E5851900030497 /* pcreperform.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcreperform.3; sourceTree = ""; }; + B3F805CE20E5851900030497 /* pcre16_jit_stack_alloc.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_jit_stack_alloc.3; sourceTree = ""; }; + B3F805CF20E5851900030497 /* pcre32_get_stringtable_entries.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_get_stringtable_entries.3; sourceTree = ""; }; + B3F805D020E5851900030497 /* pcre32_dfa_exec.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_dfa_exec.3; sourceTree = ""; }; + B3F805D120E5851900030497 /* pcre32.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32.3; sourceTree = ""; }; + B3F805D220E5851900030497 /* pcre16_free_substring_list.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_free_substring_list.3; sourceTree = ""; }; + B3F805D320E5851900030497 /* pcre32_fullinfo.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_fullinfo.3; sourceTree = ""; }; + B3F805D420E5851900030497 /* pcre_exec.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_exec.3; sourceTree = ""; }; + B3F805D520E5851900030497 /* pcre16_pattern_to_host_byte_order.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_pattern_to_host_byte_order.3; sourceTree = ""; }; + B3F805D620E5851900030497 /* pcre32_free_substring_list.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_free_substring_list.3; sourceTree = ""; }; + B3F805D720E5851900030497 /* pcre_utf32_to_host_byte_order.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_utf32_to_host_byte_order.3; sourceTree = ""; }; + B3F805D820E5851900030497 /* pcre32_compile.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_compile.3; sourceTree = ""; }; + B3F805D920E5851900030497 /* pcre32_assign_jit_stack.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_assign_jit_stack.3; sourceTree = ""; }; + B3F805DA20E5851900030497 /* pcre32_compile2.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_compile2.3; sourceTree = ""; }; + B3F805DB20E5851900030497 /* pcre32_pattern_to_host_byte_order.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_pattern_to_host_byte_order.3; sourceTree = ""; }; + B3F805DC20E5851900030497 /* pcre32_free_study.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_free_study.3; sourceTree = ""; }; + B3F805DD20E5851900030497 /* pcreprecompile.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcreprecompile.3; sourceTree = ""; }; + B3F805DE20E5851900030497 /* pcrecompat.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcrecompat.3; sourceTree = ""; }; + B3F805DF20E5851900030497 /* pcre16_utf16_to_host_byte_order.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_utf16_to_host_byte_order.3; sourceTree = ""; }; + B3F805E020E5851900030497 /* pcre16_free_study.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_free_study.3; sourceTree = ""; }; + B3F805E120E5851900030497 /* pcre16_free_substring.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_free_substring.3; sourceTree = ""; }; + B3F805E220E5851900030497 /* pcre16_compile.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_compile.3; sourceTree = ""; }; + B3F805E320E5851900030497 /* pcre16_config.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_config.3; sourceTree = ""; }; + B3F805E420E5851900030497 /* pcre_get_substring.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_get_substring.3; sourceTree = ""; }; + B3F805E520E5851900030497 /* pcre32_maketables.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_maketables.3; sourceTree = ""; }; + B3F805E620E5851900030497 /* pcrecallout.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcrecallout.3; sourceTree = ""; }; + B3F805E720E5851900030497 /* pcre_jit_stack_alloc.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_jit_stack_alloc.3; sourceTree = ""; }; + B3F805E820E5851A00030497 /* pcre16_jit_stack_free.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_jit_stack_free.3; sourceTree = ""; }; + B3F805E920E5851A00030497 /* pcre16_get_substring_list.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_get_substring_list.3; sourceTree = ""; }; + B3F805EA20E5851A00030497 /* pcre16.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16.3; sourceTree = ""; }; + B3F805EB20E5851A00030497 /* pcre_get_stringtable_entries.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_get_stringtable_entries.3; sourceTree = ""; }; + B3F805EC20E5851A00030497 /* pcre32_jit_exec.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_jit_exec.3; sourceTree = ""; }; + B3F805ED20E5851A00030497 /* pcre16_maketables.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_maketables.3; sourceTree = ""; }; + B3F805EE20E5851A00030497 /* pcre_refcount.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_refcount.3; sourceTree = ""; }; + B3F805EF20E5851A00030497 /* pcre_assign_jit_stack.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_assign_jit_stack.3; sourceTree = ""; }; + B3F805F020E5851A00030497 /* pcre16_get_stringnumber.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_get_stringnumber.3; sourceTree = ""; }; + B3F805F120E5851A00030497 /* pcre_study.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_study.3; sourceTree = ""; }; + B3F805F220E5851A00030497 /* pcrestack.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcrestack.3; sourceTree = ""; }; + B3F805F320E5851A00030497 /* pcre32_study.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_study.3; sourceTree = ""; }; + B3F805F420E5851A00030497 /* pcreposix.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcreposix.3; sourceTree = ""; }; + B3F805F520E5851A00030497 /* pcre32_jit_stack_alloc.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_jit_stack_alloc.3; sourceTree = ""; }; + B3F805F620E5851A00030497 /* pcre_version.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_version.3; sourceTree = ""; }; + B3F805F720E5851A00030497 /* pcredemo.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcredemo.3; sourceTree = ""; }; + B3F805F820E5851A00030497 /* pcre_config.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_config.3; sourceTree = ""; }; + B3F805F920E5851A00030497 /* pcre16_study.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_study.3; sourceTree = ""; }; + B3F805FA20E5851A00030497 /* pcre_get_stringnumber.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_get_stringnumber.3; sourceTree = ""; }; + B3F805FB20E5851A00030497 /* pcre32_version.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_version.3; sourceTree = ""; }; + B3F805FC20E5851A00030497 /* pcre_free_substring.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_free_substring.3; sourceTree = ""; }; + B3F805FD20E5851A00030497 /* pcre16_assign_jit_stack.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_assign_jit_stack.3; sourceTree = ""; }; + B3F805FE20E5851A00030497 /* pcre_copy_named_substring.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_copy_named_substring.3; sourceTree = ""; }; + B3F805FF20E5851A00030497 /* pcrejit.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcrejit.3; sourceTree = ""; }; + B3F8060020E5851A00030497 /* pcrepartial.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcrepartial.3; sourceTree = ""; }; + B3F8060120E5851A00030497 /* pcre32_utf32_to_host_byte_order.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_utf32_to_host_byte_order.3; sourceTree = ""; }; + B3F8060220E5851A00030497 /* pcre_maketables.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_maketables.3; sourceTree = ""; }; + B3F8060320E5851A00030497 /* pcre_compile2.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_compile2.3; sourceTree = ""; }; + B3F8060420E5851A00030497 /* pcre32_get_substring.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_get_substring.3; sourceTree = ""; }; + B3F8060520E5851A00030497 /* pcresample.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcresample.3; sourceTree = ""; }; + B3F8060620E5851A00030497 /* pcre32_jit_stack_free.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_jit_stack_free.3; sourceTree = ""; }; + B3F8060720E5851A00030497 /* pcre32_get_substring_list.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_get_substring_list.3; sourceTree = ""; }; + B3F8060820E5851A00030497 /* pcre16_copy_named_substring.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_copy_named_substring.3; sourceTree = ""; }; + B3F8060920E5851A00030497 /* pcreapi.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcreapi.3; sourceTree = ""; }; + B3F8060A20E5851A00030497 /* pcre_fullinfo.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_fullinfo.3; sourceTree = ""; }; + B3F8060B20E5851A00030497 /* pcre16_get_substring.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_get_substring.3; sourceTree = ""; }; + B3F8060C20E5851A00030497 /* pcre16_jit_exec.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre16_jit_exec.3; sourceTree = ""; }; + B3F8060D20E5851A00030497 /* pcre_dfa_exec.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_dfa_exec.3; sourceTree = ""; }; + B3F8060E20E5851A00030497 /* pcrepattern.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcrepattern.3; sourceTree = ""; }; + B3F8060F20E5851A00030497 /* pcre32_free_substring.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_free_substring.3; sourceTree = ""; }; + B3F8061020E5851A00030497 /* pcre_free_study.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_free_study.3; sourceTree = ""; }; + B3F8061120E5851A00030497 /* pcre_jit_stack_free.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre_jit_stack_free.3; sourceTree = ""; }; + B3F8061220E5851A00030497 /* pcre32_config.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre32_config.3; sourceTree = ""; }; + B3F8061420E5851A00030497 /* pcretest.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = pcretest.1; sourceTree = ""; }; + B3F8061520E5851A00030497 /* pcregrep.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = pcregrep.1; sourceTree = ""; }; + B3F8061620E5851A00030497 /* pcre-config.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = "pcre-config.1"; sourceTree = ""; }; + B3F8061920E5851A00030497 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = ""; }; + B3F8061A20E5851A00030497 /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUTHORS; sourceTree = ""; }; + B3F8061B20E5851A00030497 /* pcretest.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcretest.txt; sourceTree = ""; }; + B3F8061D20E5851A00030497 /* pcre_get_substring_list.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_get_substring_list.html; sourceTree = ""; }; + B3F8061E20E5851A00030497 /* pcre_study.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_study.html; sourceTree = ""; }; + B3F8061F20E5851A00030497 /* pcrestack.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcrestack.html; sourceTree = ""; }; + B3F8062020E5851A00030497 /* pcre_jit_stack_free.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_jit_stack_free.html; sourceTree = ""; }; + B3F8062120E5851A00030497 /* pcrepartial.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcrepartial.html; sourceTree = ""; }; + B3F8062220E5851A00030497 /* pcre_copy_substring.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_copy_substring.html; sourceTree = ""; }; + B3F8062320E5851A00030497 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = ""; }; + B3F8062420E5851A00030497 /* pcre_utf16_to_host_byte_order.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_utf16_to_host_byte_order.html; sourceTree = ""; }; + B3F8062520E5851A00030497 /* pcrematching.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcrematching.html; sourceTree = ""; }; + B3F8062620E5851A00030497 /* pcrejit.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcrejit.html; sourceTree = ""; }; + B3F8062720E5851A00030497 /* pcre_pattern_to_host_byte_order.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_pattern_to_host_byte_order.html; sourceTree = ""; }; + B3F8062820E5851A00030497 /* pcrecallout.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcrecallout.html; sourceTree = ""; }; + B3F8062920E5851A00030497 /* pcre_compile2.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_compile2.html; sourceTree = ""; }; + B3F8062A20E5851A00030497 /* pcreprecompile.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcreprecompile.html; sourceTree = ""; }; + B3F8062B20E5851A00030497 /* pcre_dfa_exec.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_dfa_exec.html; sourceTree = ""; }; + B3F8062C20E5851A00030497 /* pcre_compile.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_compile.html; sourceTree = ""; }; + B3F8062D20E5851A00030497 /* pcre_get_stringnumber.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_get_stringnumber.html; sourceTree = ""; }; + B3F8062E20E5851A00030497 /* pcre_jit_stack_alloc.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_jit_stack_alloc.html; sourceTree = ""; }; + B3F8062F20E5851A00030497 /* pcre_free_substring_list.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_free_substring_list.html; sourceTree = ""; }; + B3F8063020E5851A00030497 /* pcrelimits.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcrelimits.html; sourceTree = ""; }; + B3F8063120E5851A00030497 /* pcrecpp.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcrecpp.html; sourceTree = ""; }; + B3F8063220E5851A00030497 /* pcre-config.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "pcre-config.html"; sourceTree = ""; }; + B3F8063320E5851A00030497 /* pcre16.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre16.html; sourceTree = ""; }; + B3F8063420E5851A00030497 /* pcre_free_substring.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_free_substring.html; sourceTree = ""; }; + B3F8063520E5851A00030497 /* pcreapi.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcreapi.html; sourceTree = ""; }; + B3F8063620E5851A00030497 /* pcrepattern.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcrepattern.html; sourceTree = ""; }; + B3F8063720E5851A00030497 /* pcre_get_named_substring.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_get_named_substring.html; sourceTree = ""; }; + B3F8063820E5851A00030497 /* pcre_fullinfo.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_fullinfo.html; sourceTree = ""; }; + B3F8063920E5851A00030497 /* pcreperform.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcreperform.html; sourceTree = ""; }; + B3F8063A20E5851A00030497 /* NON-AUTOTOOLS-BUILD.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "NON-AUTOTOOLS-BUILD.txt"; sourceTree = ""; }; + B3F8063B20E5851A00030497 /* pcre_jit_exec.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_jit_exec.html; sourceTree = ""; }; + B3F8063C20E5851A00030497 /* pcretest.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcretest.html; sourceTree = ""; }; + B3F8063D20E5851A00030497 /* pcregrep.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcregrep.html; sourceTree = ""; }; + B3F8063E20E5851A00030497 /* pcre_get_substring.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_get_substring.html; sourceTree = ""; }; + B3F8063F20E5851A00030497 /* pcre_version.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_version.html; sourceTree = ""; }; + B3F8064020E5851A00030497 /* pcresample.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcresample.html; sourceTree = ""; }; + B3F8064120E5851A00030497 /* pcre_config.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_config.html; sourceTree = ""; }; + B3F8064220E5851A00030497 /* pcre_maketables.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_maketables.html; sourceTree = ""; }; + B3F8064320E5851A00030497 /* pcreunicode.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcreunicode.html; sourceTree = ""; }; + B3F8064420E5851A00030497 /* pcrecompat.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcrecompat.html; sourceTree = ""; }; + B3F8064520E5851A00030497 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; + B3F8064620E5851A00030497 /* pcre.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre.html; sourceTree = ""; }; + B3F8064720E5851A00030497 /* pcre_exec.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_exec.html; sourceTree = ""; }; + B3F8064820E5851A00030497 /* pcre_assign_jit_stack.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_assign_jit_stack.html; sourceTree = ""; }; + B3F8064920E5851A00030497 /* pcre_utf32_to_host_byte_order.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_utf32_to_host_byte_order.html; sourceTree = ""; }; + B3F8064A20E5851A00030497 /* pcre_copy_named_substring.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_copy_named_substring.html; sourceTree = ""; }; + B3F8064B20E5851A00030497 /* pcredemo.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcredemo.html; sourceTree = ""; }; + B3F8064C20E5851A00030497 /* pcreposix.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcreposix.html; sourceTree = ""; }; + B3F8064D20E5851A00030497 /* pcresyntax.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcresyntax.html; sourceTree = ""; }; + B3F8064E20E5851A00030497 /* pcre32.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre32.html; sourceTree = ""; }; + B3F8064F20E5851A00030497 /* pcre_refcount.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_refcount.html; sourceTree = ""; }; + B3F8065020E5851A00030497 /* pcrebuild.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcrebuild.html; sourceTree = ""; }; + B3F8065120E5851A00030497 /* pcre_free_study.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_free_study.html; sourceTree = ""; }; + B3F8065220E5851A00030497 /* pcre_get_stringtable_entries.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pcre_get_stringtable_entries.html; sourceTree = ""; }; + B3F8065320E5851A00030497 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + B3F8065420E5851A00030497 /* pcregrep.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcregrep.txt; sourceTree = ""; }; + B3F8065520E5851A00030497 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; + B3F8065620E5851A00030497 /* pcre.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre.txt; sourceTree = ""; }; + B3F8065720E5851A00030497 /* NEWS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NEWS; sourceTree = ""; }; + B3F8065820E5851A00030497 /* pcre-config.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "pcre-config.txt"; sourceTree = ""; }; + B3F8065920E5851A00030497 /* LICENCE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENCE; sourceTree = ""; }; + B3F8073220E5855F00030497 /* INSTALL_RECEIPT.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = INSTALL_RECEIPT.json; sourceTree = ""; }; + B3F8073520E5855F00030497 /* libffi.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = libffi.rb; sourceTree = ""; }; + B3F8073620E5855F00030497 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = ""; }; + B3F8073720E5855F00030497 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + B3F8073A20E5855F00030497 /* libffi.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = libffi.pc; sourceTree = ""; }; + B3F8073D20E5855F00030497 /* ffitarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffitarget.h; sourceTree = ""; }; + B3F8073E20E5855F00030497 /* ffi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffi.h; sourceTree = ""; }; + B3F8073F20E5855F00030497 /* libffi.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libffi.dylib; sourceTree = ""; }; + B3F8074020E5855F00030497 /* libffi.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libffi.a; sourceTree = ""; }; + B3F8074120E5855F00030497 /* libffi.6.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libffi.6.dylib; sourceTree = ""; }; + B3F8074520E5855F00030497 /* ffi_call.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ffi_call.3; sourceTree = ""; }; + B3F8074620E5855F00030497 /* ffi_prep_cif_var.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ffi_prep_cif_var.3; sourceTree = ""; }; + B3F8074720E5855F00030497 /* ffi_prep_cif.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ffi_prep_cif.3; sourceTree = ""; }; + B3F8074820E5855F00030497 /* ffi.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ffi.3; sourceTree = ""; }; + B3F8074A20E5855F00030497 /* libffi.info */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = libffi.info; sourceTree = ""; }; + B3F8075D20E5858100030497 /* INSTALL_RECEIPT.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = INSTALL_RECEIPT.json; sourceTree = ""; }; + B3F8075F20E5858100030497 /* csslint-0.6 */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "csslint-0.6"; sourceTree = ""; }; + B3F8076020E5858100030497 /* croco-0.6-config */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "croco-0.6-config"; sourceTree = ""; }; + B3F8076220E5858100030497 /* libcroco.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = libcroco.rb; sourceTree = ""; }; + B3F8076320E5858100030497 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = ""; }; + B3F8076420E5858100030497 /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUTHORS; sourceTree = ""; }; + B3F8076820E5858100030497 /* cr-parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-parser.h"; sourceTree = ""; }; + B3F8076920E5858100030497 /* cr-token.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-token.h"; sourceTree = ""; }; + B3F8076A20E5858100030497 /* cr-attr-sel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-attr-sel.h"; sourceTree = ""; }; + B3F8076B20E5858100030497 /* cr-tknzr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-tknzr.h"; sourceTree = ""; }; + B3F8076C20E5858100030497 /* cr-parsing-location.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-parsing-location.h"; sourceTree = ""; }; + B3F8076D20E5858100030497 /* cr-doc-handler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-doc-handler.h"; sourceTree = ""; }; + B3F8076E20E5858100030497 /* cr-stylesheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-stylesheet.h"; sourceTree = ""; }; + B3F8076F20E5858100030497 /* cr-enc-handler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-enc-handler.h"; sourceTree = ""; }; + B3F8077020E5858100030497 /* cr-term.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-term.h"; sourceTree = ""; }; + B3F8077120E5858100030497 /* cr-prop-list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-prop-list.h"; sourceTree = ""; }; + B3F8077220E5858100030497 /* cr-simple-sel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-simple-sel.h"; sourceTree = ""; }; + B3F8077320E5858100030497 /* cr-declaration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-declaration.h"; sourceTree = ""; }; + B3F8077420E5858100030497 /* cr-rgb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-rgb.h"; sourceTree = ""; }; + B3F8077520E5858100030497 /* cr-string.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-string.h"; sourceTree = ""; }; + B3F8077620E5858100030497 /* cr-pseudo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-pseudo.h"; sourceTree = ""; }; + B3F8077720E5858100030497 /* cr-sel-eng.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-sel-eng.h"; sourceTree = ""; }; + B3F8077820E5858100030497 /* cr-style.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-style.h"; sourceTree = ""; }; + B3F8077920E5858100030497 /* cr-om-parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-om-parser.h"; sourceTree = ""; }; + B3F8077A20E5858100030497 /* cr-statement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-statement.h"; sourceTree = ""; }; + B3F8077B20E5858100030497 /* cr-fonts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-fonts.h"; sourceTree = ""; }; + B3F8077C20E5858100030497 /* libcroco.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libcroco.h; sourceTree = ""; }; + B3F8077D20E5858100030497 /* cr-input.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-input.h"; sourceTree = ""; }; + B3F8077E20E5858100030497 /* cr-num.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-num.h"; sourceTree = ""; }; + B3F8077F20E5858100030497 /* cr-selector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-selector.h"; sourceTree = ""; }; + B3F8078020E5858100030497 /* cr-cascade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-cascade.h"; sourceTree = ""; }; + B3F8078120E5858100030497 /* cr-additional-sel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-additional-sel.h"; sourceTree = ""; }; + B3F8078220E5858100030497 /* cr-utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cr-utils.h"; sourceTree = ""; }; + B3F8078320E5858100030497 /* libcroco-config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "libcroco-config.h"; sourceTree = ""; }; + B3F8078420E5858100030497 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + B3F8078520E5858100030497 /* TODO */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TODO; sourceTree = ""; }; + B3F8078620E5858100030497 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; + B3F8078720E5858100030497 /* NEWS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NEWS; sourceTree = ""; }; + B3F8078920E5858100030497 /* libcroco-0.6.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libcroco-0.6.dylib"; sourceTree = ""; }; + B3F8078B20E5858100030497 /* libcroco-0.6.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "libcroco-0.6.pc"; sourceTree = ""; }; + B3F8078C20E5858100030497 /* libcroco-0.6.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libcroco-0.6.3.dylib"; sourceTree = ""; }; + B3F8078D20E5858100030497 /* libcroco-0.6.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libcroco-0.6.a"; sourceTree = ""; }; + B3F8079220E5858100030497 /* libcroco-cr-pseudo.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-pseudo.html"; sourceTree = ""; }; + B3F8079320E5858100030497 /* libcroco-cr-statement.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-statement.html"; sourceTree = ""; }; + B3F8079420E5858100030497 /* libcroco.devhelp2 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = libcroco.devhelp2; sourceTree = ""; }; + B3F8079520E5858100030497 /* up-insensitive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "up-insensitive.png"; sourceTree = ""; }; + B3F8079620E5858100030497 /* libcroco-cr-tknzr.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-tknzr.html"; sourceTree = ""; }; + B3F8079720E5858100030497 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = ""; }; + B3F8079820E5858100030497 /* libcroco-cr-utils.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-utils.html"; sourceTree = ""; }; + B3F8079920E5858100030497 /* libcroco-cr-enc-handler.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-enc-handler.html"; sourceTree = ""; }; + B3F8079A20E5858100030497 /* libcroco-cr-parsing-location.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-parsing-location.html"; sourceTree = ""; }; + B3F8079B20E5858100030497 /* up.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = up.png; sourceTree = ""; }; + B3F8079C20E5858100030497 /* right-insensitive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "right-insensitive.png"; sourceTree = ""; }; + B3F8079D20E5858100030497 /* libcroco-cr-prop-list.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-prop-list.html"; sourceTree = ""; }; + B3F8079E20E5858100030497 /* home.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = home.png; sourceTree = ""; }; + B3F8079F20E5858100030497 /* ch01.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = ch01.html; sourceTree = ""; }; + B3F807A020E5858100030497 /* libcroco-cr-fonts.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-fonts.html"; sourceTree = ""; }; + B3F807A120E5858100030497 /* libcroco-cr-cascade.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-cascade.html"; sourceTree = ""; }; + B3F807A220E5858100030497 /* libcroco-cr-simple-sel.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-simple-sel.html"; sourceTree = ""; }; + B3F807A320E5858100030497 /* left.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = left.png; sourceTree = ""; }; + B3F807A420E5858100030497 /* libcroco-cr-term.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-term.html"; sourceTree = ""; }; + B3F807A520E5858100030497 /* libcroco-cr-token.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-token.html"; sourceTree = ""; }; + B3F807A620E5858100030497 /* libcroco-libcroco-config.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-libcroco-config.html"; sourceTree = ""; }; + B3F807A720E5858100030497 /* libcroco-cr-parser.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-parser.html"; sourceTree = ""; }; + B3F807A820E5858100030497 /* style.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = style.css; sourceTree = ""; }; + B3F807A920E5858100030497 /* libcroco-cr-additional-sel.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-additional-sel.html"; sourceTree = ""; }; + B3F807AA20E5858100030497 /* libcroco-cr-attr-sel.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-attr-sel.html"; sourceTree = ""; }; + B3F807AB20E5858100030497 /* libcroco-cr-rgb.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-rgb.html"; sourceTree = ""; }; + B3F807AC20E5858100030497 /* libcroco-cr-style.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-style.html"; sourceTree = ""; }; + B3F807AD20E5858100030497 /* libcroco-cr-num.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-num.html"; sourceTree = ""; }; + B3F807AE20E5858100030497 /* left-insensitive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "left-insensitive.png"; sourceTree = ""; }; + B3F807AF20E5858100030497 /* libcroco-cr-stylesheet.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-stylesheet.html"; sourceTree = ""; }; + B3F807B020E5858100030497 /* libcroco-cr-declaration.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-declaration.html"; sourceTree = ""; }; + B3F807B120E5858100030497 /* libcroco-cr-input.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-input.html"; sourceTree = ""; }; + B3F807B220E5858100030497 /* libcroco-cr-doc-handler.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-doc-handler.html"; sourceTree = ""; }; + B3F807B320E5858100030497 /* libcroco-cr-sel-eng.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-sel-eng.html"; sourceTree = ""; }; + B3F807B420E5858100030497 /* libcroco-cr-om-parser.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-om-parser.html"; sourceTree = ""; }; + B3F807B520E5858100030497 /* libcroco-cr-selector.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-selector.html"; sourceTree = ""; }; + B3F807B620E5858100030497 /* right.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = right.png; sourceTree = ""; }; + B3F807B720E5858100030497 /* libcroco-cr-string.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "libcroco-cr-string.html"; sourceTree = ""; }; + B3F8080A20E585BF00030497 /* INSTALL_RECEIPT.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = INSTALL_RECEIPT.json; sourceTree = ""; }; + B3F8080C20E585BF00030497 /* fribidi */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = fribidi; sourceTree = ""; }; + B3F8080E20E585BF00030497 /* fribidi.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = fribidi.rb; sourceTree = ""; }; + B3F8080F20E585BF00030497 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = ""; }; + B3F8081020E585BF00030497 /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUTHORS; sourceTree = ""; }; + B3F8081320E585BF00030497 /* fribidi-begindecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-begindecls.h"; sourceTree = ""; }; + B3F8081420E585BF00030497 /* fribidi-config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-config.h"; sourceTree = ""; }; + B3F8081520E585BF00030497 /* fribidi-joining-types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-joining-types.h"; sourceTree = ""; }; + B3F8081620E585BF00030497 /* fribidi-char-sets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-char-sets.h"; sourceTree = ""; }; + B3F8081720E585BF00030497 /* fribidi-char-sets-list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-char-sets-list.h"; sourceTree = ""; }; + B3F8081820E585BF00030497 /* fribidi-unicode-version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-unicode-version.h"; sourceTree = ""; }; + B3F8081920E585BF00030497 /* fribidi-common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-common.h"; sourceTree = ""; }; + B3F8081A20E585BF00030497 /* fribidi-unicode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-unicode.h"; sourceTree = ""; }; + B3F8081B20E585BF00030497 /* fribidi-types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-types.h"; sourceTree = ""; }; + B3F8081C20E585BF00030497 /* fribidi-bidi-types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-bidi-types.h"; sourceTree = ""; }; + B3F8081D20E585BF00030497 /* fribidi-deprecated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-deprecated.h"; sourceTree = ""; }; + B3F8081E20E585BF00030497 /* fribidi-mirroring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-mirroring.h"; sourceTree = ""; }; + B3F8081F20E585BF00030497 /* fribidi-joining.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-joining.h"; sourceTree = ""; }; + B3F8082020E585BF00030497 /* fribidi-enddecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-enddecls.h"; sourceTree = ""; }; + B3F8082120E585BF00030497 /* fribidi-flags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-flags.h"; sourceTree = ""; }; + B3F8082220E585BF00030497 /* fribidi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fribidi.h; sourceTree = ""; }; + B3F8082320E585BF00030497 /* fribidi-bidi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-bidi.h"; sourceTree = ""; }; + B3F8082420E585BF00030497 /* fribidi-brackets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-brackets.h"; sourceTree = ""; }; + B3F8082520E585BF00030497 /* fribidi-bidi-types-list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-bidi-types-list.h"; sourceTree = ""; }; + B3F8082620E585BF00030497 /* fribidi-arabic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-arabic.h"; sourceTree = ""; }; + B3F8082720E585BF00030497 /* fribidi-shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-shape.h"; sourceTree = ""; }; + B3F8082820E585BF00030497 /* fribidi-joining-types-list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fribidi-joining-types-list.h"; sourceTree = ""; }; + B3F8082920E585BF00030497 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + B3F8082A20E585BF00030497 /* TODO */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TODO; sourceTree = ""; }; + B3F8082B20E585BF00030497 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; + B3F8082C20E585BF00030497 /* NEWS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NEWS; sourceTree = ""; }; + B3F8082F20E585BF00030497 /* fribidi.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi.pc; sourceTree = ""; }; + B3F8083020E585BF00030497 /* libfribidi.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libfribidi.dylib; sourceTree = ""; }; + B3F8083120E585BF00030497 /* libfribidi.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libfribidi.a; sourceTree = ""; }; + B3F8083220E585BF00030497 /* libfribidi.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libfribidi.0.dylib; sourceTree = ""; }; + B3F8083620E585BF00030497 /* fribidi_get_bidi_type_name.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_get_bidi_type_name.3; sourceTree = ""; }; + B3F8083720E585BF00030497 /* fribidi_get_type_internal.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_get_type_internal.3; sourceTree = ""; }; + B3F8083820E585BF00030497 /* fribidi_shape.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_shape.3; sourceTree = ""; }; + B3F8083920E585BF00030497 /* fribidi_set_reorder_nsm.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_set_reorder_nsm.3; sourceTree = ""; }; + B3F8083A20E585BF00030497 /* fribidi_get_mirror_char.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_get_mirror_char.3; sourceTree = ""; }; + B3F8083B20E585BF00030497 /* fribidi_charset_to_unicode.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_charset_to_unicode.3; sourceTree = ""; }; + B3F8083C20E585BF00030497 /* fribidi_remove_bidi_marks.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_remove_bidi_marks.3; sourceTree = ""; }; + B3F8083D20E585BF00030497 /* fribidi_parse_charset.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_parse_charset.3; sourceTree = ""; }; + B3F8083E20E585BF00030497 /* fribidi_set_mirroring.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_set_mirroring.3; sourceTree = ""; }; + B3F8083F20E585BF00030497 /* fribidi_mirroring_status.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_mirroring_status.3; sourceTree = ""; }; + B3F8084020E585BF00030497 /* fribidi_get_par_embedding_levels_ex.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_get_par_embedding_levels_ex.3; sourceTree = ""; }; + B3F8084120E585BF00030497 /* fribidi_get_bidi_type.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_get_bidi_type.3; sourceTree = ""; }; + B3F8084220E585BF00030497 /* fribidi_get_joining_types.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_get_joining_types.3; sourceTree = ""; }; + B3F8084320E585BF00030497 /* fribidi_shape_mirroring.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_shape_mirroring.3; sourceTree = ""; }; + B3F8084420E585BF00030497 /* fribidi_log2vis_get_embedding_levels.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_log2vis_get_embedding_levels.3; sourceTree = ""; }; + B3F8084520E585BF00030497 /* fribidi_get_par_direction.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_get_par_direction.3; sourceTree = ""; }; + B3F8084620E585BF00030497 /* fribidi_shape_arabic.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_shape_arabic.3; sourceTree = ""; }; + B3F8084720E585BF00030497 /* fribidi_get_bracket.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_get_bracket.3; sourceTree = ""; }; + B3F8084820E585BF00030497 /* fribidi_get_par_embedding_levels.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_get_par_embedding_levels.3; sourceTree = ""; }; + B3F8084920E585BF00030497 /* fribidi_get_joining_type.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_get_joining_type.3; sourceTree = ""; }; + B3F8084A20E585BF00030497 /* fribidi_unicode_to_charset.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_unicode_to_charset.3; sourceTree = ""; }; + B3F8084B20E585BF00030497 /* fribidi_reorder_nsm_status.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_reorder_nsm_status.3; sourceTree = ""; }; + B3F8084C20E585BF00030497 /* fribidi_join_arabic.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_join_arabic.3; sourceTree = ""; }; + B3F8084D20E585BF00030497 /* fribidi_get_bracket_types.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_get_bracket_types.3; sourceTree = ""; }; + B3F8084E20E585BF00030497 /* fribidi_log2vis.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_log2vis.3; sourceTree = ""; }; + B3F8084F20E585BF00030497 /* fribidi_get_type.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_get_type.3; sourceTree = ""; }; + B3F8085020E585BF00030497 /* fribidi_set_debug.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_set_debug.3; sourceTree = ""; }; + B3F8085120E585BF00030497 /* fribidi_get_bidi_types.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_get_bidi_types.3; sourceTree = ""; }; + B3F8085220E585BF00030497 /* fribidi_reorder_line.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_reorder_line.3; sourceTree = ""; }; + B3F8085320E585BF00030497 /* fribidi_debug_status.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_debug_status.3; sourceTree = ""; }; + B3F8085420E585BF00030497 /* fribidi_get_joining_type_name.3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fribidi_get_joining_type_name.3; sourceTree = ""; }; + B3F8092720E585E800030497 /* INSTALL_RECEIPT.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = INSTALL_RECEIPT.json; sourceTree = ""; }; + B3F8092920E585E800030497 /* hb-ot-shape-closure */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "hb-ot-shape-closure"; sourceTree = ""; }; + B3F8092A20E585E800030497 /* hb-view */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "hb-view"; sourceTree = ""; }; + B3F8092B20E585E800030497 /* hb-shape */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "hb-shape"; sourceTree = ""; }; + B3F8092C20E585E800030497 /* hb-subset */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "hb-subset"; sourceTree = ""; }; + B3F8092E20E585E800030497 /* harfbuzz.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = harfbuzz.rb; sourceTree = ""; }; + B3F8092F20E585E800030497 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = ""; }; + B3F8093020E585E800030497 /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUTHORS; sourceTree = ""; }; + B3F8093320E585E800030497 /* hb-buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-buffer.h"; sourceTree = ""; }; + B3F8093420E585E800030497 /* hb-set.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-set.h"; sourceTree = ""; }; + B3F8093520E585E800030497 /* hb-face.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-face.h"; sourceTree = ""; }; + B3F8093620E585E800030497 /* hb-gobject-structs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-gobject-structs.h"; sourceTree = ""; }; + B3F8093720E585E800030497 /* hb-common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-common.h"; sourceTree = ""; }; + B3F8093820E585E800030497 /* hb-version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-version.h"; sourceTree = ""; }; + B3F8093920E585E800030497 /* hb-font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-font.h"; sourceTree = ""; }; + B3F8093A20E585E800030497 /* hb-coretext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-coretext.h"; sourceTree = ""; }; + B3F8093B20E585E800030497 /* hb-ot-tag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-ot-tag.h"; sourceTree = ""; }; + B3F8093C20E585E800030497 /* hb-deprecated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-deprecated.h"; sourceTree = ""; }; + B3F8093D20E585E800030497 /* hb-ot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-ot.h"; sourceTree = ""; }; + B3F8093E20E585E800030497 /* hb-ot-layout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-ot-layout.h"; sourceTree = ""; }; + B3F8093F20E585E800030497 /* hb-ot-var.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-ot-var.h"; sourceTree = ""; }; + B3F8094020E585E800030497 /* hb-gobject-enums.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-gobject-enums.h"; sourceTree = ""; }; + B3F8094120E585E800030497 /* hb-shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-shape.h"; sourceTree = ""; }; + B3F8094220E585E800030497 /* hb-subset-plan.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = "hb-subset-plan.hh"; sourceTree = ""; }; + B3F8094320E585E800030497 /* hb-shape-plan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-shape-plan.h"; sourceTree = ""; }; + B3F8094420E585E800030497 /* hb-ot-font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-ot-font.h"; sourceTree = ""; }; + B3F8094520E585E800030497 /* hb-unicode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-unicode.h"; sourceTree = ""; }; + B3F8094620E585E800030497 /* hb-ot-shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-ot-shape.h"; sourceTree = ""; }; + B3F8094720E585E800030497 /* hb-blob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-blob.h"; sourceTree = ""; }; + B3F8094820E585E800030497 /* hb-subset-private.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = "hb-subset-private.hh"; sourceTree = ""; }; + B3F8094920E585E800030497 /* hb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hb.h; sourceTree = ""; }; + B3F8094A20E585E800030497 /* hb-glib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-glib.h"; sourceTree = ""; }; + B3F8094B20E585E800030497 /* hb-subset-glyf.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = "hb-subset-glyf.hh"; sourceTree = ""; }; + B3F8094C20E585E800030497 /* hb-graphite2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-graphite2.h"; sourceTree = ""; }; + B3F8094D20E585E800030497 /* hb-subset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-subset.h"; sourceTree = ""; }; + B3F8094E20E585E800030497 /* hb-gobject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-gobject.h"; sourceTree = ""; }; + B3F8094F20E585E800030497 /* hb-ot-math.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-ot-math.h"; sourceTree = ""; }; + B3F8095020E585E800030497 /* hb-icu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-icu.h"; sourceTree = ""; }; + B3F8095120E585E800030497 /* hb-ft.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "hb-ft.h"; sourceTree = ""; }; + B3F8095220E585E800030497 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + B3F8095320E585E800030497 /* TODO */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TODO; sourceTree = ""; }; + B3F8095420E585E800030497 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; + B3F8095520E585E800030497 /* NEWS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NEWS; sourceTree = ""; }; + B3F8095720E585E800030497 /* libharfbuzz-icu.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libharfbuzz-icu.a"; sourceTree = ""; }; + B3F8095820E585E800030497 /* libharfbuzz-icu.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libharfbuzz-icu.dylib"; sourceTree = ""; }; + B3F8095920E585E800030497 /* libharfbuzz-subset.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libharfbuzz-subset.0.dylib"; sourceTree = ""; }; + B3F8095B20E585E800030497 /* harfbuzz-gobject.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "harfbuzz-gobject.pc"; sourceTree = ""; }; + B3F8095C20E585E800030497 /* harfbuzz-subset.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "harfbuzz-subset.pc"; sourceTree = ""; }; + B3F8095D20E585E800030497 /* harfbuzz.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = harfbuzz.pc; sourceTree = ""; }; + B3F8095E20E585E800030497 /* harfbuzz-icu.pc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "harfbuzz-icu.pc"; sourceTree = ""; }; + B3F8095F20E585E800030497 /* libharfbuzz-gobject.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libharfbuzz-gobject.0.dylib"; sourceTree = ""; }; + B3F8096020E585E800030497 /* libharfbuzz-gobject.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libharfbuzz-gobject.a"; sourceTree = ""; }; + B3F8096320E585E800030497 /* harfbuzz-config.cmake */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "harfbuzz-config.cmake"; sourceTree = ""; }; + B3F8096420E585E800030497 /* libharfbuzz.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libharfbuzz.0.dylib; sourceTree = ""; }; + B3F8096520E585E800030497 /* libharfbuzz.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libharfbuzz.a; sourceTree = ""; }; + B3F8096620E585E800030497 /* libharfbuzz-subset.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libharfbuzz-subset.a"; sourceTree = ""; }; + B3F8096720E585E800030497 /* libharfbuzz-gobject.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libharfbuzz-gobject.dylib"; sourceTree = ""; }; + B3F8096920E585E800030497 /* HarfBuzz-0.0.typelib */ = {isa = PBXFileReference; lastKnownFileType = file; path = "HarfBuzz-0.0.typelib"; sourceTree = ""; }; + B3F8096A20E585E800030497 /* libharfbuzz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libharfbuzz.dylib; sourceTree = ""; }; + B3F8096B20E585E800030497 /* libharfbuzz-icu.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libharfbuzz-icu.0.dylib"; sourceTree = ""; }; + B3F8096C20E585E800030497 /* libharfbuzz-subset.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libharfbuzz-subset.dylib"; sourceTree = ""; }; + B3F8097120E585E800030497 /* api-index-full.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-full.html"; sourceTree = ""; }; + B3F8097220E585E800030497 /* what-is-harfbuzz.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "what-is-harfbuzz.html"; sourceTree = ""; }; + B3F8097320E585E800030497 /* harfbuzz-Shaping.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-Shaping.html"; sourceTree = ""; }; + B3F8097420E585E800030497 /* api-index-1-0-5.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-1-0-5.html"; sourceTree = ""; }; + B3F8097520E585E800030497 /* api-index-1-4-2.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-1-4-2.html"; sourceTree = ""; }; + B3F8097620E585E800030497 /* plans-and-caching.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "plans-and-caching.html"; sourceTree = ""; }; + B3F8097720E585E800030497 /* what-about-the-other-scripts.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "what-about-the-other-scripts.html"; sourceTree = ""; }; + B3F8097820E585E800030497 /* deprecated-api-index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "deprecated-api-index.html"; sourceTree = ""; }; + B3F8097920E585E800030497 /* up-insensitive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "up-insensitive.png"; sourceTree = ""; }; + B3F8097A20E585E800030497 /* clusters.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = clusters.html; sourceTree = ""; }; + B3F8097B20E585E800030497 /* api-index-0-9-28.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-0-9-28.html"; sourceTree = ""; }; + B3F8097C20E585E800030497 /* harfbuzz.devhelp2 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = harfbuzz.devhelp2; sourceTree = ""; }; + B3F8097D20E585E800030497 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = ""; }; + B3F8097E20E585E800030497 /* api-index-1-4-3.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-1-4-3.html"; sourceTree = ""; }; + B3F8097F20E585E800030497 /* harfbuzz-hb-common.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-common.html"; sourceTree = ""; }; + B3F8098020E585E800030497 /* shaping-and-shape-plans.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "shaping-and-shape-plans.html"; sourceTree = ""; }; + B3F8098120E585E800030497 /* api-index-0-9-7.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-0-9-7.html"; sourceTree = ""; }; + B3F8098220E585E800030497 /* up.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = up.png; sourceTree = ""; }; + B3F8098320E585E800030497 /* harfbuzz-hb-glib.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-glib.html"; sourceTree = ""; }; + B3F8098420E585E800030497 /* using-your-own-font-functions.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "using-your-own-font-functions.html"; sourceTree = ""; }; + B3F8098520E585E800030497 /* harfbuzz-hb-ot.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-ot.html"; sourceTree = ""; }; + B3F8098620E585E800030497 /* api-index-1-5-0.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-1-5-0.html"; sourceTree = ""; }; + B3F8098720E585E800030497 /* harfbuzz-hb-ot-layout.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-ot-layout.html"; sourceTree = ""; }; + B3F8098820E585E800030497 /* api-index-0-9-42.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-0-9-42.html"; sourceTree = ""; }; + B3F8098920E585E800030497 /* customizing-unicode-functions.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "customizing-unicode-functions.html"; sourceTree = ""; }; + B3F8098A20E585E800030497 /* fonts-and-faces.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "fonts-and-faces.html"; sourceTree = ""; }; + B3F8098B20E585E800030497 /* api-index-0-9-39.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-0-9-39.html"; sourceTree = ""; }; + B3F8098C20E585E800030497 /* level-2.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "level-2.html"; sourceTree = ""; }; + B3F8098D20E585E800030497 /* right-insensitive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "right-insensitive.png"; sourceTree = ""; }; + B3F8098E20E585E800030497 /* harfbuzz-hb-font.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-font.html"; sourceTree = ""; }; + B3F8098F20E585E800030497 /* pt02.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pt02.html; sourceTree = ""; }; + B3F8099020E585E800030497 /* harfbuzz-hb-face.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-face.html"; sourceTree = ""; }; + B3F8099120E585E800030497 /* harfbuzz-hb-graphite2.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-graphite2.html"; sourceTree = ""; }; + B3F8099220E585E800030497 /* home.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = home.png; sourceTree = ""; }; + B3F8099320E585E800030497 /* api-index-0-9-22.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-0-9-22.html"; sourceTree = ""; }; + B3F8099420E585E800030497 /* install-harfbuzz.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "install-harfbuzz.html"; sourceTree = ""; }; + B3F8099520E585E800030497 /* harfbuzz-hb-ot-math.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-ot-math.html"; sourceTree = ""; }; + B3F8099620E585E800030497 /* reordering-in-levels-0-and-1.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "reordering-in-levels-0-and-1.html"; sourceTree = ""; }; + B3F8099720E585E800030497 /* api-index-1-2-3.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-1-2-3.html"; sourceTree = ""; }; + B3F8099820E585E800030497 /* api-index-0-9-38.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-0-9-38.html"; sourceTree = ""; }; + B3F8099920E585E800030497 /* object-tree.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "object-tree.html"; sourceTree = ""; }; + B3F8099A20E585E800030497 /* left.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = left.png; sourceTree = ""; }; + B3F8099B20E585E800030497 /* the-distinction-between-levels-0-and-1.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "the-distinction-between-levels-0-and-1.html"; sourceTree = ""; }; + B3F8099C20E585E800030497 /* api-index-0-9-2.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-0-9-2.html"; sourceTree = ""; }; + B3F8099D20E585E800030497 /* harfbuzz-hb-coretext.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-coretext.html"; sourceTree = ""; }; + B3F8099E20E585E800030497 /* harfbuzz-hb-unicode.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-unicode.html"; sourceTree = ""; }; + B3F8099F20E585E800030497 /* why-is-it-called-harfbuzz.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "why-is-it-called-harfbuzz.html"; sourceTree = ""; }; + B3F809A020E585E800030497 /* harfbuzz-hb-uniscribe.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-uniscribe.html"; sourceTree = ""; }; + B3F809A120E585E800030497 /* harfbuzz-hb-icu.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-icu.html"; sourceTree = ""; }; + B3F809A220E585E800030497 /* annotation-glossary.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "annotation-glossary.html"; sourceTree = ""; }; + B3F809A320E585E800030497 /* setting-buffer-properties.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "setting-buffer-properties.html"; sourceTree = ""; }; + B3F809A420E585E800030497 /* harfbuzz-hb-blob.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-blob.html"; sourceTree = ""; }; + B3F809A520E585E800030497 /* buffers-language-script-and-direction.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "buffers-language-script-and-direction.html"; sourceTree = ""; }; + B3F809A620E585E800030497 /* harfbuzz-hb-ot-tag.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-ot-tag.html"; sourceTree = ""; }; + B3F809A720E585E800030497 /* pt01.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pt01.html; sourceTree = ""; }; + B3F809A820E585E800030497 /* harfbuzz-hb-shape-plan.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-shape-plan.html"; sourceTree = ""; }; + B3F809A920E585E800030497 /* adding-text-to-the-buffer.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "adding-text-to-the-buffer.html"; sourceTree = ""; }; + B3F809AA20E585E800030497 /* api-index-0-9-20.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-0-9-20.html"; sourceTree = ""; }; + B3F809AB20E585E800030497 /* harfbuzz-hb.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb.html"; sourceTree = ""; }; + B3F809AC20E585E800030497 /* style.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = style.css; sourceTree = ""; }; + B3F809AD20E585E800030497 /* api-index-0-9-41.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-0-9-41.html"; sourceTree = ""; }; + B3F809AE20E585E800030497 /* HarfBuzz.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = HarfBuzz.svg; sourceTree = ""; }; + B3F809AF20E585E800030497 /* harfbuzz-hb-set.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-set.html"; sourceTree = ""; }; + B3F809B020E585E800030497 /* using-harfbuzzs-native-opentype-implementation.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "using-harfbuzzs-native-opentype-implementation.html"; sourceTree = ""; }; + B3F809B120E585E800030497 /* api-index-0-9-31.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-0-9-31.html"; sourceTree = ""; }; + B3F809B220E585E800030497 /* harfbuzz-hb-ot-font.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-ot-font.html"; sourceTree = ""; }; + B3F809B320E585E800030497 /* harfbuzz-hb-gobject.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-gobject.html"; sourceTree = ""; }; + B3F809B420E585E800030497 /* HarfBuzz.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = HarfBuzz.png; sourceTree = ""; }; + B3F809B520E585E800030497 /* api-index-0-9-8.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-0-9-8.html"; sourceTree = ""; }; + B3F809B620E585E800030497 /* harfbuzz-Buffers.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-Buffers.html"; sourceTree = ""; }; + B3F809B720E585E800030497 /* building.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = building.html; sourceTree = ""; }; + B3F809B820E585E800030497 /* harfbuzz-hb-ft.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-ft.html"; sourceTree = ""; }; + B3F809B920E585E900030497 /* left-insensitive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "left-insensitive.png"; sourceTree = ""; }; + B3F809BA20E585E900030497 /* api-index-0-9-11.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-0-9-11.html"; sourceTree = ""; }; + B3F809BB20E585E900030497 /* ch08.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = ch08.html; sourceTree = ""; }; + B3F809BC20E585E900030497 /* api-index-1-1-3.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-1-1-3.html"; sourceTree = ""; }; + B3F809BD20E585E900030497 /* api-index-1-1-2.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-1-1-2.html"; sourceTree = ""; }; + B3F809BE20E585E900030497 /* harfbuzz-hb-deprecated.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-deprecated.html"; sourceTree = ""; }; + B3F809BF20E585E900030497 /* harfbuzz-hb-ot-shape.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-ot-shape.html"; sourceTree = ""; }; + B3F809C020E585E900030497 /* api-index-0-9-5.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-0-9-5.html"; sourceTree = ""; }; + B3F809C120E585E900030497 /* api-index-0-9-10.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-0-9-10.html"; sourceTree = ""; }; + B3F809C220E585E900030497 /* harfbuzz-hb-version.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "harfbuzz-hb-version.html"; sourceTree = ""; }; + B3F809C320E585E900030497 /* api-index-1-3-3.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-1-3-3.html"; sourceTree = ""; }; + B3F809C420E585E900030497 /* api-index-1-6-0.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-1-6-0.html"; sourceTree = ""; }; + B3F809C520E585E900030497 /* right.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = right.png; sourceTree = ""; }; + B3F809C620E585E900030497 /* hello-harfbuzz.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "hello-harfbuzz.html"; sourceTree = ""; }; + B3F809C720E585E900030497 /* a-clustering-example-for-levels-0-and-1.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "a-clustering-example-for-levels-0-and-1.html"; sourceTree = ""; }; + B3F809C820E585E900030497 /* api-index-0-9-30.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "api-index-0-9-30.html"; sourceTree = ""; }; + B3F809CA20E585E900030497 /* HarfBuzz-0.0.gir */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "HarfBuzz-0.0.gir"; sourceTree = ""; }; + B3FAD3EA1FA564D0004381A7 /* VersionMenuItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VersionMenuItem.swift; sourceTree = ""; }; + C743CA092B2436D579EB1965 /* Pods-Speculid-Mac-XPC.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Speculid-Mac-XPC.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Speculid-Mac-XPC/Pods-Speculid-Mac-XPC.debug.xcconfig"; sourceTree = ""; }; + C7A962F08D51F2247E1ADBEF /* Pods-SpeculidTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SpeculidTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests.release.xcconfig"; sourceTree = ""; }; + DCB0AF202D3672415910AFDE /* Pods_Speculid.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Speculid.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DD668DE3E97BC37C2DC71F41 /* Pods-Speculid.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Speculid.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Speculid/Pods-Speculid.debug.xcconfig"; sourceTree = ""; }; + E776BC2A0843F84E3CBC279B /* Pods_CairoSVGTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CairoSVGTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + EB3CD055FBA18C9FF21D971C /* Pods-CairoSVGTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CairoSVGTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CairoSVGTests/Pods-CairoSVGTests.debug.xcconfig"; sourceTree = ""; }; + F6CC72BCECBB97B332E4DC41 /* Pods-Speculid-Mac-XPC.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Speculid-Mac-XPC.release.xcconfig"; path = "Pods/Target Support Files/Pods-Speculid-Mac-XPC/Pods-Speculid-Mac-XPC.release.xcconfig"; sourceTree = ""; }; + FBD208DDED47AEA144AD3F63 /* Pods-Speculid-Mac-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Speculid-Mac-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-Speculid-Mac-App/Pods-Speculid-Mac-App.release.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + B3136E5D1F90FCCF0002B7AB /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8CFE676AD2939E9961A20D07 /* Pods_Speculid_Mac_AppUITests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B3136E7B1F90FD2E0002B7AB /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B3136E831F90FD2E0002B7AB /* Speculid.framework in Frameworks */, + 63B850290A8C8F568F554912 /* Pods_SpeculidTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B3136E8A1F90FD3D0002B7AB /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B3136E921F90FD3D0002B7AB /* CairoSVG.framework in Frameworks */, + 8673F38CC6D59040A2F46D0E /* Pods_CairoSVGTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B37C743B1F8C58F300DF505B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B37C74901F8C5B5C00DF505B /* CairoSVG.framework in Frameworks */, + B37C747A1F8C5ADA00DF505B /* Speculid.framework in Frameworks */, + 8B89F9F58D273C27DCE0A008 /* Pods_Speculid_Mac_App.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B37C74501F8C590D00DF505B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B3136DCD1F90E3F30002B7AB /* Speculid.framework in Frameworks */, + 71C6A7B0A517CC55637B2E17 /* Pods_Speculid_Mac_XPC.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B37C746F1F8C5ADA00DF505B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B37C74BC1F8C5D2A00DF505B /* CairoSVG.framework in Frameworks */, + CBE9EF18228D2DADFC9D264F /* Pods_Speculid.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B37C74851F8C5B5C00DF505B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B3825F0120F91807008F2A02 /* libgraphite2.3.0.1.dylib in Frameworks */, + B3825F0220F91807008F2A02 /* libgraphite2.dylib in Frameworks */, + B3825F0020F91807008F2A02 /* libgraphite2.3.dylib in Frameworks */, + B3F8057820E584B300030497 /* libpng16.16.dylib in Frameworks */, + B3F8057920E584B300030497 /* libpng.dylib in Frameworks */, + B3F8057A20E584B300030497 /* libpng16.dylib in Frameworks */, + B3F80B2D20E585EA00030497 /* libharfbuzz-gobject.0.dylib in Frameworks */, + B3F80B3320E585EA00030497 /* libharfbuzz-gobject.dylib in Frameworks */, + B3F80B3520E585EA00030497 /* libharfbuzz.dylib in Frameworks */, + B3F80B3620E585EA00030497 /* libharfbuzz-icu.0.dylib in Frameworks */, + B3F80B3720E585EA00030497 /* libharfbuzz-subset.dylib in Frameworks */, + B3F80B2720E585EA00030497 /* libharfbuzz-icu.dylib in Frameworks */, + B3F80B2820E585EA00030497 /* libharfbuzz-subset.0.dylib in Frameworks */, + B3F807DE20E5858200030497 /* libcroco-0.6.dylib in Frameworks */, + B3F807E020E5858200030497 /* libcroco-0.6.3.dylib in Frameworks */, + B3F8075320E5855F00030497 /* libffi.dylib in Frameworks */, + B31BD9CE20E7E0DA00A560C2 /* libicutest.61.dylib in Frameworks */, + B31BD9D320E7E0DA00A560C2 /* libicuio.dylib in Frameworks */, + B31BD9D520E7E0DA00A560C2 /* libicutest.dylib in Frameworks */, + B31BD9D620E7E0DA00A560C2 /* libicuio.61.dylib in Frameworks */, + B31BD9D820E7E0DA00A560C2 /* libicudata.dylib in Frameworks */, + B31BD9D920E7E0DA00A560C2 /* libicuio.61.1.dylib in Frameworks */, + B31BD9DB20E7E0DA00A560C2 /* libicutu.61.dylib in Frameworks */, + B31BD9DC20E7E0DA00A560C2 /* libicui18n.61.1.dylib in Frameworks */, + B31BD9DD20E7E0DA00A560C2 /* libicutu.61.1.dylib in Frameworks */, + B31BD9DE20E7E0DA00A560C2 /* libicudata.61.dylib in Frameworks */, + B31BD9DF20E7E0DA00A560C2 /* libicuuc.dylib in Frameworks */, + B31BD9E220E7E0DA00A560C2 /* libicutu.dylib in Frameworks */, + B31BD9E320E7E0DA00A560C2 /* libicui18n.dylib in Frameworks */, + B31BD9E420E7E0DA00A560C2 /* libicui18n.61.dylib in Frameworks */, + B3F80B3020E585EA00030497 /* libharfbuzz.0.dylib in Frameworks */, + B31BD9E520E7E0DA00A560C2 /* libicuuc.61.dylib in Frameworks */, + B3F808C120E585C000030497 /* libfribidi.dylib in Frameworks */, + B3F808C320E585C000030497 /* libfribidi.0.dylib in Frameworks */, + B31BD9E620E7E0DA00A560C2 /* libicudata.61.1.dylib in Frameworks */, + B31BD9E720E7E0DA00A560C2 /* libicutest.61.1.dylib in Frameworks */, + B31BD9EE20E7E0DA00A560C2 /* libicuuc.61.1.dylib in Frameworks */, + B3F8075520E5855F00030497 /* libffi.6.dylib in Frameworks */, + B3F8067120E5851A00030497 /* libpcre.dylib in Frameworks */, + B3E2050C20E568C3009EA554 /* libgdk_pixbuf-2.0.dylib in Frameworks */, + B3E2079220E568C6009EA554 /* libcairo.dylib in Frameworks */, + B3E206E520E568C5009EA554 /* libgobject-2.0.dylib in Frameworks */, + B3E2118120E568D0009EA554 /* librsvg-2.dylib in Frameworks */, + B3E2079D20E568C6009EA554 /* libcairo-script-interpreter.2.dylib in Frameworks */, + B3E20A0320E568C8009EA554 /* libintl.dylib in Frameworks */, + B3E2079020E568C6009EA554 /* libcairo.2.dylib in Frameworks */, + B3E206E920E568C5009EA554 /* libgobject-2.0.0.dylib in Frameworks */, + B3E20A0120E568C8009EA554 /* libgettextpo.0.dylib in Frameworks */, + B3F8067020E5851A00030497 /* libpcreposix.0.dylib in Frameworks */, + B3E20A1120E568C8009EA554 /* libgettextpo.dylib in Frameworks */, + B3E2117C20E568D0009EA554 /* librsvg-2.2.dylib in Frameworks */, + B3F8050220E5820B00030497 /* libpango-1.0.dylib in Frameworks */, + B3E204B820E568C3009EA554 /* libpixman-1.0.dylib in Frameworks */, + B3F8050120E5820B00030497 /* libpangoft2-1.0.dylib in Frameworks */, + B3F8067620E5851A00030497 /* libpcre16.0.dylib in Frameworks */, + B3F804F820E5820B00030497 /* libpango-1.0.0.dylib in Frameworks */, + B3E20A0020E568C8009EA554 /* libgettextlib.dylib in Frameworks */, + B3F8067720E5851A00030497 /* libpcre32.dylib in Frameworks */, + B3F8067320E5851A00030497 /* libpcrecpp.0.dylib in Frameworks */, + B3E206EB20E568C5009EA554 /* libgmodule-2.0.0.dylib in Frameworks */, + B3E2079E20E568C6009EA554 /* libcairo-gobject.dylib in Frameworks */, + B3F8067B20E5851A00030497 /* libpcre32.0.dylib in Frameworks */, + B3E2079C20E568C6009EA554 /* libcairo-trace.dylib in Frameworks */, + B3F8066A20E5851A00030497 /* libpcre.1.dylib in Frameworks */, + B3E206E720E568C5009EA554 /* libgio-2.0.dylib in Frameworks */, + B3E20A0420E568C8009EA554 /* libintl.8.dylib in Frameworks */, + 205A5AF735ED0AFE6D8E3753 /* Pods_CairoSVG.framework in Frameworks */, + B3E206E820E568C5009EA554 /* libglib-2.0.dylib in Frameworks */, + B3E206EE20E568C5009EA554 /* libgthread-2.0.0.dylib in Frameworks */, + B3E207F620E568C6009EA554 /* libfontconfig.1.dylib in Frameworks */, + B3E207F520E568C6009EA554 /* libfontconfig.dylib in Frameworks */, + B3E204B620E568C3009EA554 /* libpixman-1.dylib in Frameworks */, + B3F8050620E5820B00030497 /* libpango-1.0.a in Frameworks */, + B3F807E120E5858200030497 /* libcroco-0.6.a in Frameworks */, + B3E2050E20E568C3009EA554 /* libgdk_pixbuf-2.0.0.dylib in Frameworks */, + B3E206DB20E568C5009EA554 /* libgthread-2.0.dylib in Frameworks */, + B3F804FE20E5820B00030497 /* libpangocairo-1.0.0.dylib in Frameworks */, + B3F8067A20E5851A00030497 /* libpcrecpp.dylib in Frameworks */, + B3E20A0C20E568C8009EA554 /* libgettextsrc-0.19.8.1.dylib in Frameworks */, + B3F8067420E5851A00030497 /* libpcreposix.dylib in Frameworks */, + B3E2079A20E568C6009EA554 /* libcairo-trace.0.dylib in Frameworks */, + B3F804FD20E5820B00030497 /* libpangocairo-1.0.dylib in Frameworks */, + B3E204F220E568C3009EA554 /* libfreetype.6.dylib in Frameworks */, + B3E20A0E20E568C8009EA554 /* libgettextsrc.dylib in Frameworks */, + B3F804F920E5820B00030497 /* libpangoft2-1.0.0.dylib in Frameworks */, + B3F8067820E5851A00030497 /* libpcre16.dylib in Frameworks */, + B3E204EF20E568C3009EA554 /* libfreetype.dylib in Frameworks */, + B3E206E620E568C5009EA554 /* libglib-2.0.0.dylib in Frameworks */, + B3E206F020E568C5009EA554 /* libgio-2.0.0.dylib in Frameworks */, + B3E2079120E568C6009EA554 /* libcairo-gobject.2.dylib in Frameworks */, + B3E206D920E568C5009EA554 /* libgmodule-2.0.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + ACD4DBE14098687CAAFBB2FA /* Pods */ = { + isa = PBXGroup; + children = ( + DD668DE3E97BC37C2DC71F41 /* Pods-Speculid.debug.xcconfig */, + 87434B3EFCD8AF7732299E58 /* Pods-Speculid.release.xcconfig */, + 75FAFD8D34A5758295CE7C3E /* Pods-Speculid-Mac-App.debug.xcconfig */, + FBD208DDED47AEA144AD3F63 /* Pods-Speculid-Mac-App.release.xcconfig */, + C743CA092B2436D579EB1965 /* Pods-Speculid-Mac-XPC.debug.xcconfig */, + F6CC72BCECBB97B332E4DC41 /* Pods-Speculid-Mac-XPC.release.xcconfig */, + EB3CD055FBA18C9FF21D971C /* Pods-CairoSVGTests.debug.xcconfig */, + 33189C1A2DCDF9FDE0D52DB2 /* Pods-CairoSVGTests.release.xcconfig */, + 503182BFEED5FCC7A0FD7113 /* Pods-Speculid-Mac-AppUITests.debug.xcconfig */, + 5598DB627CD85D918F6EAC73 /* Pods-Speculid-Mac-AppUITests.release.xcconfig */, + 1A1D3098AA00507F322B5177 /* Pods-SpeculidTests.debug.xcconfig */, + C7A962F08D51F2247E1ADBEF /* Pods-SpeculidTests.release.xcconfig */, + 7DD68C68194F71BF3C7B683C /* Pods-CairoSVG.debug.xcconfig */, + 72377B2194FCD69B6D9FED05 /* Pods-CairoSVG.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + B3033B181F9AED7600787279 /* configuration */ = { + isa = PBXGroup; + children = ( + B3B049C81FA262A8002906B1 /* exportOptions.plist */, + B3033B1A1F9AEE9A00787279 /* .gitignore */, + B3033B191F9AEE9900787279 /* .travis.yml */, + B318906D1F91A06B00D0EFA0 /* .swiftlint.yml */, + ); + name = configuration; + sourceTree = ""; + }; + B3136DB51F90E23E0002B7AB /* frameworks */ = { + isa = PBXGroup; + children = ( + B37C748A1F8C5B5C00DF505B /* cairosvg */, + B3136DB81F90E27B0002B7AB /* speculid */, + ); + path = frameworks; + sourceTree = ""; + }; + B3136DB71F90E2690002B7AB /* mac */ = { + isa = PBXGroup; + children = ( + B3136DDD1F90EF460002B7AB /* Application.swift */, + B3136EA01F9107B40002B7AB /* assets */, + B37C74481F8C58F300DF505B /* Info.plist */, + B37C74491F8C58F300DF505B /* Speculid_Mac_App.entitlements */, + B35B71221F9041B900BE477E /* main.swift */, + ); + path = mac; + sourceTree = ""; + }; + B3136DB81F90E27B0002B7AB /* speculid */ = { + isa = PBXGroup; + children = ( + B3E9A9001FB4DCCA00FD8E7A /* autorevision.json */, + B3D329FE1F9A5D290042B46F /* Resources */, + B3136DE41F90F73A0002B7AB /* Controllers */, + B3136E1D1F90F73B0002B7AB /* Errors */, + B3136DF51F90F73A0002B7AB /* Extensions */, + B3136DF91F90F73A0002B7AB /* Models */, + B3136E081F90F73B0002B7AB /* Protocols */, + B3136E1C1F90F73B0002B7AB /* versions.plist */, + B3136DC01F90E27B0002B7AB /* Info.plist */, + B3136DBC1F90E27B0002B7AB /* Speculid_Mac_Framework.h */, + B36C2E8A1FA5B876003F48BD /* build.list */, + ); + path = speculid; + sourceTree = ""; + }; + B3136DE41F90F73A0002B7AB /* Controllers */ = { + isa = PBXGroup; + children = ( + B3136DF11F90F73A0002B7AB /* AnalyticsSessionManager.swift */, + B3136DEA1F90F73A0002B7AB /* AnalyticsTracker.swift */, + B3136DDB1F90EF370002B7AB /* Application.swift */, + B3D32A071F9A73740042B46F /* AsyncBlockOperation.swift */, + B3136DE81F90F73A0002B7AB /* CairoConversionSet.swift */, + B3136DF41F90F73A0002B7AB /* CairoConversionSetBuilder.swift */, + B3136DEC1F90F73A0002B7AB /* ClientIdentifier.swift */, + B3B5E9E71F96C74C004A6BEB /* CommandLineRunner.swift */, + B3136DF31F90F73A0002B7AB /* ImageConversionBuilder.swift */, + B3136DF01F90F73A0002B7AB /* ImageConversionSetBuilder.swift */, + B317B0D01FA560EE00BB5E57 /* QuitMenuItem.swift */, + B31BEAFB1F96269F00496E7A /* RegularExpressionSet.swift */, + B31BEAF81F96268000496E7A /* RegularExpressionSetBuilder.swift */, + B33F0BB81F958695004A87DD /* RemoteObjectInterfaceProvider.swift */, + B3136DCC1F90E2A20002B7AB /* Service.swift */, + B3B5E9EB1F96C7D5004A6BEB /* SpeculidApplicationModeParser.swift */, + B3136DF21F90F73A0002B7AB /* SpeculidBuilder.swift */, + B3B5E9D81F96C1BE004A6BEB /* SpeculidConfigurationBuilder.swift */, + B3F0ECF11F9E6AAD0078690E /* SpeculidImageSpecificationBuilder.swift */, + B33F0BBA1F9586A9004A87DD /* StatusItemProvider.swift */, + B3FAD3EA1FA564D0004381A7 /* VersionMenuItem.swift */, + ); + path = Controllers; + sourceTree = ""; + }; + B3136DF51F90F73A0002B7AB /* Extensions */ = { + isa = PBXGroup; + children = ( + B3136DF81F90F73A0002B7AB /* CGFloat.swift */, + B3D32A051F9A5FEE0042B46F /* FileHandle.swift */, + B31890691F918F0300D0EFA0 /* GeometryValue.Multiply.swift */, + B3136DF61F90F73A0002B7AB /* NSColor.swift */, + B3136DF71F90F73A0002B7AB /* String.swift */, + B3E9A9021FB4DDE400FD8E7A /* Version.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + B3136DF91F90F73A0002B7AB /* Models */ = { + isa = PBXGroup; + children = ( + B3136E051F90F73A0002B7AB /* AnalyticsConfiguration.swift */, + B3136DFA1F90F73A0002B7AB /* AnalyticsParameterDictionary.swift */, + B3136E021F90F73A0002B7AB /* AnalyticsParameterKey.swift */, + B3136E041F90F73A0002B7AB /* AssetSpecification.swift */, + B3033B1F1F9AEFE600787279 /* AssetSpecificationDocument.swift */, + B341888D1F9A460300C5F356 /* CommandLineArgumentProvider.swift */, + B3136DC91F90E2A20002B7AB /* ErrorCollection.swift */, + B3136DC11F90E27B0002B7AB /* FileFormat.swift */, + B3136DFB1F90F73A0002B7AB /* Geometry.swift */, + B3136E031F90F73A0002B7AB /* GeometryValue.swift */, + B3891BBD20F7CE010095E1FD /* CwlSysctl.swift */, + B3136DBB1F90E27B0002B7AB /* ImageFile.swift */, + B3136E071F90F73A0002B7AB /* ImageIdiom.swift */, + B3136DBE1F90E27B0002B7AB /* ImageSpecification.swift */, + B33A533D1F954FF800E74800 /* Result.swift */, + B3136E001F90F73A0002B7AB /* ScaledGeometry.swift */, + B3B5E9DF1F96C416004A6BEB /* SpeculidApplicationMode.swift */, + B3B5E9E11F96C44D004A6BEB /* SpeculidCommandArgumentSet.swift */, + B3B5E9DD1F96C2A2004A6BEB /* SpeculidConfiguration.swift */, + B3136E011F90F73A0002B7AB /* SpeculidDocument.swift */, + B3136DFC1F90F73A0002B7AB /* SpeculidSpecificationsFile.swift */, + ); + path = Models; + sourceTree = ""; + }; + B3136E081F90F73B0002B7AB /* Protocols */ = { + isa = PBXGroup; + children = ( + B3136E171F90F73B0002B7AB /* AnalyticsConfigurationProtocol.swift */, + B3136E121F90F73B0002B7AB /* AnalyticsEventProtocol.swift */, + B3136E131F90F73B0002B7AB /* AnalyticsSessionManagerProtocol.swift */, + B3136E181F90F73B0002B7AB /* AnalyticsTrackerProtocol.swift */, + B3136E1A1F90F73B0002B7AB /* ApplicationProtocol.swift */, + B3033B1D1F9AEFC100787279 /* AssetSpecificationDocumentProtocol.swift */, + B3136E0D1F90F73B0002B7AB /* ClientIdentifierDelegate.swift */, + B3B5E9E31F96C5F1004A6BEB /* CommandLineActivityProtocol.swift */, + B34188891F9A44A700C5F356 /* CommandLineArgumentProviderProtocol.swift */, + B3B5E9E51F96C604004A6BEB /* CommandLineRunnerProtocol.swift */, + B3136E151F90F73B0002B7AB /* GeometryProtocol.swift */, + B3136E1B1F90F73B0002B7AB /* ImageConversionBuilderProtocol.swift */, + B3136E0B1F90F73B0002B7AB /* ImageConversionSetBuilderProtocol.swift */, + B3136E0F1F90F73B0002B7AB /* ImageConversionSetProtocol.swift */, + B3136E0C1F90F73B0002B7AB /* ImageConversionTaskProtocol.swift */, + B3136E141F90F73B0002B7AB /* AssetSpecificationProtocol.swift */, + B31BEAFF1F9626BB00496E7A /* RegularExpressionSetBuilderProtocol.swift */, + B31BEAFD1F9626AC00496E7A /* RegularExpressionSetProtocol.swift */, + B33A533B1F954F8C00E74800 /* RemoteObjectInterfaceProviderProtocol.swift */, + B3136DC61F90E2A20002B7AB /* ServiceProtocol.swift */, + B3B5E9E91F96C777004A6BEB /* SpeculidApplicationModeParserProtocol.swift */, + B3136E161F90F73B0002B7AB /* SpeculidArgumentsProtocol.swift */, + B3136E191F90F73B0002B7AB /* SpeculidBuilderProtocol.swift */, + B3B5E9DB1F96C1D2004A6BEB /* SpeculidConfigurationBuilderProtocol.swift */, + B3136E111F90F73B0002B7AB /* SpeculidConfigurationProtocol.swift */, + B3136E101F90F73B0002B7AB /* SpeculidDocumentProtocol.swift */, + B3136E091F90F73B0002B7AB /* SpeculidSpecificationsFileProtocol.swift */, + B33A53391F954E4B00E74800 /* StatusItemProviderProtocol.swift */, + B3F0ECEF1F9E6A4D0078690E /* SpeculidImageSpecificationBuilderProtocol.swift */, + B3CB156F2113AA8C00A6DC5C /* VersionProvider.swift */, + ); + path = Protocols; + sourceTree = ""; + }; + B3136E1D1F90F73B0002B7AB /* Errors */ = { + isa = PBXGroup; + children = ( + B3136E201F90F73B0002B7AB /* ArrayError.swift */, + B3136E1E1F90F73B0002B7AB /* MissingRequiredInstallationError.swift */, + B3136E1F1F90F73B0002B7AB /* ProcessError.swift */, + B3136E211F90F73B0002B7AB /* UnknownConversionError.swift */, + ); + path = Errors; + sourceTree = ""; + }; + B3136E6A1F90FCD90002B7AB /* tests */ = { + isa = PBXGroup; + children = ( + B3136E991F90FD550002B7AB /* cairosvg */, + B3136E981F90FD470002B7AB /* speculid */, + B3136E6B1F90FCE60002B7AB /* ui */, + ); + path = tests; + sourceTree = ""; + }; + B3136E6B1F90FCE60002B7AB /* ui */ = { + isa = PBXGroup; + children = ( + B3136E621F90FCCF0002B7AB /* SpeculidUITests.swift */, + B3136E641F90FCCF0002B7AB /* Info.plist */, + ); + path = ui; + sourceTree = ""; + }; + B3136E981F90FD470002B7AB /* speculid */ = { + isa = PBXGroup; + children = ( + B341888F1F9A478800C5F356 /* Controllers */, + B3136E821F90FD2E0002B7AB /* Info.plist */, + ); + path = speculid; + sourceTree = ""; + }; + B3136E991F90FD550002B7AB /* cairosvg */ = { + isa = PBXGroup; + children = ( + B3136E8F1F90FD3D0002B7AB /* CairoSVGTests.swift */, + B3136E911F90FD3D0002B7AB /* Info.plist */, + ); + path = cairosvg; + sourceTree = ""; + }; + B3136EA01F9107B40002B7AB /* assets */ = { + isa = PBXGroup; + children = ( + B3033B211F9AF03F00787279 /* Contents.json */, + B3033B231F9AF05900787279 /* Contents.json */, + B3136DC31F90E2A10002B7AB /* layers.svg */, + B3136EA11F910BC90002B7AB /* svg-appicon.speculid */, + B3136EA21F910BC90002B7AB /* svg-trayicon.speculid */, + B37C74431F8C58F300DF505B /* Assets.xcassets */, + ); + path = assets; + sourceTree = ""; + }; + B31BD6EB20E7E0D500A560C2 /* icu4c */ = { + isa = PBXGroup; + children = ( + B31BD6EC20E7E0D500A560C2 /* 61.1 */, + ); + path = icu4c; + sourceTree = ""; + }; + B31BD6EC20E7E0D500A560C2 /* 61.1 */ = { + isa = PBXGroup; + children = ( + B31BD6ED20E7E0D500A560C2 /* INSTALL_RECEIPT.json */, + B31BD6EF20E7E0D500A560C2 /* bin */, + B31BD6FB20E7E0D500A560C2 /* .brew */, + B31BD6FD20E7E0D500A560C2 /* license.html */, + B31BD6FE20E7E0D500A560C2 /* include */, + B31BD7B220E7E0D600A560C2 /* sbin */, + B31BD7B920E7E0D600A560C2 /* readme.html */, + B31BD7BA20E7E0D600A560C2 /* lib */, + B31BD7E020E7E0D600A560C2 /* share */, + ); + path = 61.1; + sourceTree = ""; + }; + B31BD6EF20E7E0D500A560C2 /* bin */ = { + isa = PBXGroup; + children = ( + B31BD6F020E7E0D500A560C2 /* makeconv */, + B31BD6F120E7E0D500A560C2 /* gencnval */, + B31BD6F220E7E0D500A560C2 /* icu-config */, + B31BD6F320E7E0D500A560C2 /* gencfu */, + B31BD6F420E7E0D500A560C2 /* icuinfo */, + B31BD6F520E7E0D500A560C2 /* gendict */, + B31BD6F620E7E0D500A560C2 /* genrb */, + B31BD6F720E7E0D500A560C2 /* pkgdata */, + B31BD6F820E7E0D500A560C2 /* genbrk */, + B31BD6F920E7E0D500A560C2 /* derb */, + B31BD6FA20E7E0D500A560C2 /* uconv */, + ); + path = bin; + sourceTree = ""; + }; + B31BD6FB20E7E0D500A560C2 /* .brew */ = { + isa = PBXGroup; + children = ( + B31BD6FC20E7E0D500A560C2 /* icu4c.rb */, + ); + path = .brew; + sourceTree = ""; + }; + B31BD6FE20E7E0D500A560C2 /* include */ = { + isa = PBXGroup; + children = ( + B31BD6FF20E7E0D500A560C2 /* unicode */, + ); + path = include; + sourceTree = ""; + }; + B31BD6FF20E7E0D500A560C2 /* unicode */ = { + isa = PBXGroup; + children = ( + B31BD70020E7E0D500A560C2 /* translit.h */, + B31BD70120E7E0D500A560C2 /* ustdio.h */, + B31BD70220E7E0D500A560C2 /* utf_old.h */, + B31BD70320E7E0D500A560C2 /* ucsdet.h */, + B31BD70420E7E0D500A560C2 /* tzfmt.h */, + B31BD70520E7E0D500A560C2 /* ubrk.h */, + B31BD70620E7E0D500A560C2 /* ufieldpositer.h */, + B31BD70720E7E0D500A560C2 /* stringpiece.h */, + B31BD70820E7E0D500A560C2 /* ucat.h */, + B31BD70920E7E0D500A560C2 /* tblcoll.h */, + B31BD70A20E7E0D500A560C2 /* stringoptions.h */, + B31BD70B20E7E0D500A560C2 /* dtfmtsym.h */, + B31BD70C20E7E0D500A560C2 /* unirepl.h */, + B31BD70D20E7E0D500A560C2 /* ptypes.h */, + B31BD70E20E7E0D500A560C2 /* fmtable.h */, + B31BD70F20E7E0D500A560C2 /* dtitvfmt.h */, + B31BD71020E7E0D500A560C2 /* choicfmt.h */, + B31BD71120E7E0D500A560C2 /* usetiter.h */, + B31BD71220E7E0D500A560C2 /* errorcode.h */, + B31BD71320E7E0D500A560C2 /* tznames.h */, + B31BD71420E7E0D500A560C2 /* dtintrv.h */, + B31BD71520E7E0D500A560C2 /* ucurr.h */, + B31BD71620E7E0D500A560C2 /* icuplug.h */, + B31BD71720E7E0D500A560C2 /* uregion.h */, + B31BD71820E7E0D500A560C2 /* utext.h */, + B31BD71920E7E0D500A560C2 /* edits.h */, + B31BD71A20E7E0D500A560C2 /* parsepos.h */, + B31BD71B20E7E0D500A560C2 /* ucal.h */, + B31BD71C20E7E0D500A560C2 /* fpositer.h */, + B31BD71D20E7E0D500A560C2 /* dtitvinf.h */, + B31BD71E20E7E0D500A560C2 /* rbnf.h */, + B31BD71F20E7E0D500A560C2 /* udat.h */, + B31BD72020E7E0D500A560C2 /* urep.h */, + B31BD72120E7E0D500A560C2 /* utf32.h */, + B31BD72220E7E0D500A560C2 /* vtzone.h */, + B31BD72320E7E0D500A560C2 /* ustring.h */, + B31BD72420E7E0D500A560C2 /* ubiditransform.h */, + B31BD72520E7E0D500A560C2 /* uenum.h */, + B31BD72620E7E0D500A560C2 /* appendable.h */, + B31BD72720E7E0D500A560C2 /* usearch.h */, + B31BD72820E7E0D500A560C2 /* numsys.h */, + B31BD72920E7E0D500A560C2 /* timezone.h */, + B31BD72A20E7E0D500A560C2 /* uset.h */, + B31BD72B20E7E0D500A560C2 /* casemap.h */, + B31BD72C20E7E0D500A560C2 /* coleitr.h */, + B31BD72D20E7E0D500A560C2 /* schriter.h */, + B31BD72E20E7E0D500A560C2 /* msgfmt.h */, + B31BD72F20E7E0D500A560C2 /* fieldpos.h */, + B31BD73020E7E0D500A560C2 /* simpletz.h */, + B31BD73120E7E0D500A560C2 /* uldnames.h */, + B31BD73220E7E0D500A560C2 /* uiter.h */, + B31BD73320E7E0D500A560C2 /* umsg.h */, + B31BD73420E7E0D500A560C2 /* sortkey.h */, + B31BD73520E7E0D500A560C2 /* docmain.h */, + B31BD73620E7E0D500A560C2 /* uniset.h */, + B31BD73720E7E0D500A560C2 /* basictz.h */, + B31BD73820E7E0D500A560C2 /* udata.h */, + B31BD73920E7E0D500A560C2 /* stringtriebuilder.h */, + B31BD73A20E7E0D500A560C2 /* chariter.h */, + B31BD73B20E7E0D500A560C2 /* umisc.h */, + B31BD73C20E7E0D500A560C2 /* reldatefmt.h */, + B31BD73D20E7E0D500A560C2 /* uloc.h */, + B31BD73E20E7E0D500A560C2 /* plurrule.h */, + B31BD73F20E7E0D500A560C2 /* bytestriebuilder.h */, + B31BD74020E7E0D500A560C2 /* measunit.h */, + B31BD74120E7E0D500A560C2 /* utrace.h */, + B31BD74220E7E0D500A560C2 /* locdspnm.h */, + B31BD74320E7E0D500A560C2 /* gregocal.h */, + B31BD74420E7E0D500A560C2 /* uchriter.h */, + B31BD74520E7E0D500A560C2 /* enumset.h */, + B31BD74620E7E0D500A560C2 /* nounit.h */, + B31BD74720E7E0D500A560C2 /* utf.h */, + B31BD74820E7E0D500A560C2 /* measure.h */, + B31BD74920E7E0D500A560C2 /* tzrule.h */, + B31BD74A20E7E0D500A560C2 /* strenum.h */, + B31BD74B20E7E0D500A560C2 /* regex.h */, + B31BD74C20E7E0D500A560C2 /* gender.h */, + B31BD74D20E7E0D500A560C2 /* dcfmtsym.h */, + B31BD74E20E7E0D500A560C2 /* ucnv_err.h */, + B31BD74F20E7E0D500A560C2 /* decimfmt.h */, + B31BD75020E7E0D500A560C2 /* bytestrie.h */, + B31BD75120E7E0D500A560C2 /* udatpg.h */, + B31BD75220E7E0D500A560C2 /* listformatter.h */, + B31BD75320E7E0D500A560C2 /* uobject.h */, + B31BD75420E7E0D500A560C2 /* calendar.h */, + B31BD75520E7E0D500A560C2 /* ures.h */, + B31BD75620E7E0D500A560C2 /* normlzr.h */, + B31BD75720E7E0D500A560C2 /* usprep.h */, + B31BD75820E7E0D500A560C2 /* urename.h */, + B31BD75920E7E0D500A560C2 /* caniter.h */, + B31BD75A20E7E0D500A560C2 /* ucol.h */, + B31BD75B20E7E0D500A560C2 /* upluralrules.h */, + B31BD75C20E7E0D500A560C2 /* ucharstrie.h */, + B31BD75D20E7E0D500A560C2 /* tmunit.h */, + B31BD75E20E7E0D500A560C2 /* unistr.h */, + B31BD75F20E7E0D500A560C2 /* rbbi.h */, + B31BD76020E7E0D500A560C2 /* ulocdata.h */, + B31BD76120E7E0D500A560C2 /* idna.h */, + B31BD76220E7E0D500A560C2 /* unorm2.h */, + B31BD76320E7E0D500A560C2 /* dtptngen.h */, + B31BD76420E7E0D500A560C2 /* dbbi.h */, + B31BD76520E7E0D500A560C2 /* bytestream.h */, + B31BD76620E7E0D500A560C2 /* uversion.h */, + B31BD76720E7E0D500A560C2 /* messagepattern.h */, + B31BD76820E7E0D500A560C2 /* uidna.h */, + B31BD76920E7E0D500A560C2 /* filteredbrk.h */, + B31BD76A20E7E0D500A560C2 /* tmutamt.h */, + B31BD76B20E7E0D500A560C2 /* char16ptr.h */, + B31BD76C20E7E0D500A560C2 /* symtable.h */, + B31BD76D20E7E0D500A560C2 /* ucasemap.h */, + B31BD76E20E7E0D500A560C2 /* ucoleitr.h */, + B31BD76F20E7E0D500A560C2 /* compactdecimalformat.h */, + B31BD77020E7E0D500A560C2 /* unum.h */, + B31BD77120E7E0D500A560C2 /* udisplaycontext.h */, + B31BD77220E7E0D500A560C2 /* tztrans.h */, + B31BD77320E7E0D500A560C2 /* umachine.h */, + B31BD77420E7E0D500A560C2 /* numberformatter.h */, + B31BD77520E7E0D500A560C2 /* datefmt.h */, + B31BD77620E7E0D500A560C2 /* utmscale.h */, + B31BD77720E7E0D500A560C2 /* coll.h */, + B31BD77820E7E0D500A560C2 /* currpinf.h */, + B31BD77920E7E0D500A560C2 /* uregex.h */, + B31BD77A20E7E0D500A560C2 /* tmutfmt.h */, + B31BD77B20E7E0D500A560C2 /* plurfmt.h */, + B31BD77C20E7E0D500A560C2 /* ustringtrie.h */, + B31BD77D20E7E0D500A560C2 /* smpdtfmt.h */, + B31BD77E20E7E0D500A560C2 /* icudataver.h */, + B31BD77F20E7E0D500A560C2 /* uchar.h */, + B31BD78020E7E0D500A560C2 /* unorm.h */, + B31BD78120E7E0D500A560C2 /* ushape.h */, + B31BD78220E7E0D500A560C2 /* unifunct.h */, + B31BD78320E7E0D500A560C2 /* ugender.h */, + B31BD78420E7E0D500A560C2 /* selfmt.h */, + B31BD78520E7E0D500A560C2 /* uformattable.h */, + B31BD78620E7E0D500A560C2 /* ustream.h */, + B31BD78720E7E0D500A560C2 /* simpleformatter.h */, + B31BD78820E7E0D500A560C2 /* ucnv_cb.h */, + B31BD78920E7E0D500A560C2 /* curramt.h */, + B31BD78A20E7E0D500A560C2 /* locid.h */, + B31BD78B20E7E0D500A560C2 /* udateintervalformat.h */, + B31BD78C20E7E0D500A560C2 /* resbund.h */, + B31BD78D20E7E0D500A560C2 /* ubidi.h */, + B31BD78E20E7E0D500A560C2 /* stsearch.h */, + B31BD78F20E7E0D500A560C2 /* alphaindex.h */, + B31BD79020E7E0D500A560C2 /* uvernum.h */, + B31BD79120E7E0D600A560C2 /* unimatch.h */, + B31BD79220E7E0D600A560C2 /* rbtz.h */, + B31BD79320E7E0D600A560C2 /* ucnvsel.h */, + B31BD79420E7E0D600A560C2 /* uspoof.h */, + B31BD79520E7E0D600A560C2 /* region.h */, + B31BD79620E7E0D600A560C2 /* ureldatefmt.h */, + B31BD79720E7E0D600A560C2 /* utrans.h */, + B31BD79820E7E0D600A560C2 /* parseerr.h */, + B31BD79920E7E0D600A560C2 /* putil.h */, + B31BD79A20E7E0D600A560C2 /* format.h */, + B31BD79B20E7E0D600A560C2 /* scientificnumberformatter.h */, + B31BD79C20E7E0D600A560C2 /* normalizer2.h */, + B31BD79D20E7E0D600A560C2 /* dtrule.h */, + B31BD79E20E7E0D600A560C2 /* ucnv.h */, + B31BD79F20E7E0D600A560C2 /* ucharstriebuilder.h */, + B31BD7A020E7E0D600A560C2 /* search.h */, + B31BD7A120E7E0D600A560C2 /* unumsys.h */, + B31BD7A220E7E0D600A560C2 /* uconfig.h */, + B31BD7A320E7E0D600A560C2 /* utf16.h */, + B31BD7A420E7E0D600A560C2 /* brkiter.h */, + B31BD7A520E7E0D600A560C2 /* platform.h */, + B31BD7A620E7E0D600A560C2 /* rep.h */, + B31BD7A720E7E0D600A560C2 /* std_string.h */, + B31BD7A820E7E0D600A560C2 /* utf8.h */, + B31BD7A920E7E0D600A560C2 /* localpointer.h */, + B31BD7AA20E7E0D600A560C2 /* uclean.h */, + B31BD7AB20E7E0D600A560C2 /* uscript.h */, + B31BD7AC20E7E0D600A560C2 /* numfmt.h */, + B31BD7AD20E7E0D600A560C2 /* currunit.h */, + B31BD7AE20E7E0D600A560C2 /* utypes.h */, + B31BD7AF20E7E0D600A560C2 /* ulistformatter.h */, + B31BD7B020E7E0D600A560C2 /* measfmt.h */, + B31BD7B120E7E0D600A560C2 /* unifilt.h */, + ); + path = unicode; + sourceTree = ""; + }; + B31BD7B220E7E0D600A560C2 /* sbin */ = { + isa = PBXGroup; + children = ( + B31BD7B320E7E0D600A560C2 /* gennorm2 */, + B31BD7B420E7E0D600A560C2 /* escapesrc */, + B31BD7B520E7E0D600A560C2 /* gensprep */, + B31BD7B620E7E0D600A560C2 /* icupkg */, + B31BD7B720E7E0D600A560C2 /* gencmn */, + B31BD7B820E7E0D600A560C2 /* genccode */, + ); + path = sbin; + sourceTree = ""; + }; + B31BD7BA20E7E0D600A560C2 /* lib */ = { + isa = PBXGroup; + children = ( + B31BD7BB20E7E0D600A560C2 /* libicutest.61.dylib */, + B31BD7BC20E7E0D600A560C2 /* libicui18n.a */, + B31BD7BD20E7E0D600A560C2 /* pkgconfig */, + B31BD7C120E7E0D600A560C2 /* libicuio.dylib */, + B31BD7C220E7E0D600A560C2 /* libicutest.a */, + B31BD7C320E7E0D600A560C2 /* libicutest.dylib */, + B31BD7C420E7E0D600A560C2 /* libicuio.61.dylib */, + B31BD7C520E7E0D600A560C2 /* libicuio.a */, + B31BD7C620E7E0D600A560C2 /* libicudata.dylib */, + B31BD7C720E7E0D600A560C2 /* libicuio.61.1.dylib */, + B31BD7C820E7E0D600A560C2 /* libicudata.a */, + B31BD7C920E7E0D600A560C2 /* libicutu.61.dylib */, + B31BD7CA20E7E0D600A560C2 /* libicui18n.61.1.dylib */, + B31BD7CB20E7E0D600A560C2 /* libicutu.61.1.dylib */, + B31BD7CC20E7E0D600A560C2 /* libicudata.61.dylib */, + B31BD7CD20E7E0D600A560C2 /* libicuuc.dylib */, + B31BD7CE20E7E0D600A560C2 /* libicuuc.a */, + B31BD7CF20E7E0D600A560C2 /* libicutu.a */, + B31BD7D020E7E0D600A560C2 /* libicutu.dylib */, + B31BD7D120E7E0D600A560C2 /* libicui18n.dylib */, + B31BD7D220E7E0D600A560C2 /* libicui18n.61.dylib */, + B31BD7D320E7E0D600A560C2 /* libicuuc.61.dylib */, + B31BD7D420E7E0D600A560C2 /* libicudata.61.1.dylib */, + B31BD7D520E7E0D600A560C2 /* libicutest.61.1.dylib */, + B31BD7D620E7E0D600A560C2 /* icu */, + B31BD7DF20E7E0D600A560C2 /* libicuuc.61.1.dylib */, + ); + path = lib; + sourceTree = ""; + }; + B31BD7BD20E7E0D600A560C2 /* pkgconfig */ = { + isa = PBXGroup; + children = ( + B31BD7BE20E7E0D600A560C2 /* icu-uc.pc */, + B31BD7BF20E7E0D600A560C2 /* icu-io.pc */, + B31BD7C020E7E0D600A560C2 /* icu-i18n.pc */, + ); + path = pkgconfig; + sourceTree = ""; + }; + B31BD7D620E7E0D600A560C2 /* icu */ = { + isa = PBXGroup; + children = ( + B31BD7D720E7E0D600A560C2 /* 61.1 */, + B31BD7DA20E7E0D600A560C2 /* pkgdata.inc */, + B31BD7DB20E7E0D600A560C2 /* current */, + B31BD7DE20E7E0D600A560C2 /* Makefile.inc */, + ); + path = icu; + sourceTree = ""; + }; + B31BD7D720E7E0D600A560C2 /* 61.1 */ = { + isa = PBXGroup; + children = ( + B31BD7D820E7E0D600A560C2 /* pkgdata.inc */, + B31BD7D920E7E0D600A560C2 /* Makefile.inc */, + ); + path = 61.1; + sourceTree = ""; + }; + B31BD7DB20E7E0D600A560C2 /* current */ = { + isa = PBXGroup; + children = ( + B31BD7DC20E7E0D600A560C2 /* pkgdata.inc */, + B31BD7DD20E7E0D600A560C2 /* Makefile.inc */, + ); + path = current; + sourceTree = ""; + }; + B31BD7E020E7E0D600A560C2 /* share */ = { + isa = PBXGroup; + children = ( + B31BD7E120E7E0D600A560C2 /* man */, + B31BD7F220E7E0D600A560C2 /* icu */, + ); + path = share; + sourceTree = ""; + }; + B31BD7E120E7E0D600A560C2 /* man */ = { + isa = PBXGroup; + children = ( + B31BD7E220E7E0D600A560C2 /* man8 */, + B31BD7E720E7E0D600A560C2 /* man1 */, + ); + path = man; + sourceTree = ""; + }; + B31BD7E220E7E0D600A560C2 /* man8 */ = { + isa = PBXGroup; + children = ( + B31BD7E320E7E0D600A560C2 /* gensprep.8 */, + B31BD7E420E7E0D600A560C2 /* genccode.8 */, + B31BD7E520E7E0D600A560C2 /* icupkg.8 */, + B31BD7E620E7E0D600A560C2 /* gencmn.8 */, + ); + path = man8; + sourceTree = ""; + }; + B31BD7E720E7E0D600A560C2 /* man1 */ = { + isa = PBXGroup; + children = ( + B31BD7E820E7E0D600A560C2 /* icu-config.1 */, + B31BD7E920E7E0D600A560C2 /* pkgdata.1 */, + B31BD7EA20E7E0D600A560C2 /* gendict.1 */, + B31BD7EB20E7E0D600A560C2 /* genrb.1 */, + B31BD7EC20E7E0D600A560C2 /* genbrk.1 */, + B31BD7ED20E7E0D600A560C2 /* gencnval.1 */, + B31BD7EE20E7E0D600A560C2 /* uconv.1 */, + B31BD7EF20E7E0D600A560C2 /* makeconv.1 */, + B31BD7F020E7E0D600A560C2 /* gencfu.1 */, + B31BD7F120E7E0D600A560C2 /* derb.1 */, + ); + path = man1; + sourceTree = ""; + }; + B31BD7F220E7E0D600A560C2 /* icu */ = { + isa = PBXGroup; + children = ( + B31BD7F320E7E0D600A560C2 /* 61.1 */, + ); + path = icu; + sourceTree = ""; + }; + B31BD7F320E7E0D600A560C2 /* 61.1 */ = { + isa = PBXGroup; + children = ( + B31BD7F420E7E0D600A560C2 /* install-sh */, + B31BD7F620E7E0D600A560C2 /* config */, + B31BD7F820E7E0D600A560C2 /* mkinstalldirs */, + ); + path = 61.1; + sourceTree = ""; + }; + B31BD7F620E7E0D600A560C2 /* config */ = { + isa = PBXGroup; + children = ( + B31BD7F720E7E0D600A560C2 /* mh-darwin */, + ); + path = config; + sourceTree = ""; + }; + B3220A4621154D1A00047BF6 /* scripts */ = { + isa = PBXGroup; + children = ( + B3220A4721154D1A00047BF6 /* fix_dylibs.sh */, + B3220A4821154D1A00047BF6 /* codesign-framework.sh */, + B3220A4921154D1A00047BF6 /* decrypt-certs.sh */, + B3220A4A21154D1A00047BF6 /* shasum.sh */, + B3220A4B21154D1A00047BF6 /* build-keychain.sh */, + ); + path = scripts; + sourceTree = ""; + }; + B341888F1F9A478800C5F356 /* Controllers */ = { + isa = PBXGroup; + children = ( + B34188901F9A479900C5F356 /* SpeculidApplicationModeParserTest.swift */, + B3D32A031F9A5E8F0042B46F /* CommandLineRunnerTest.swift */, + B3C6CA8D2114C9EB000D5120 /* dummy */, + ); + path = Controllers; + sourceTree = ""; + }; + B37C74351F8C58F300DF505B = { + isa = PBXGroup; + children = ( + B3220A4621154D1A00047BF6 /* scripts */, + B3CEF3C41FB611D200F1DF87 /* README.md */, + B3E9A9041FB4E0B200FD8E7A /* bin */, + B3B049CB1FA27D96002906B1 /* certs */, + B32D69EA1F9EC5CA00C21C8C /* Speculid.entitlements */, + B3033B181F9AED7600787279 /* configuration */, + B3136E6A1F90FCD90002B7AB /* tests */, + B37C74401F8C58F300DF505B /* applications */, + B3136DB51F90E23E0002B7AB /* frameworks */, + B37C743F1F8C58F300DF505B /* Products */, + B37C74801F8C5AE200DF505B /* Frameworks */, + ACD4DBE14098687CAAFBB2FA /* Pods */, + ); + sourceTree = ""; + }; + B37C743F1F8C58F300DF505B /* Products */ = { + isa = PBXGroup; + children = ( + B37C743E1F8C58F300DF505B /* Speculid.app */, + B37C74531F8C590D00DF505B /* Speculid-Mac-XPC.xpc */, + B37C74731F8C5ADA00DF505B /* Speculid.framework */, + B37C74891F8C5B5C00DF505B /* CairoSVG.framework */, + B3136E601F90FCCF0002B7AB /* Speculid-Mac-AppUITests.xctest */, + B3136E7E1F90FD2E0002B7AB /* SpeculidTests.xctest */, + B3136E8D1F90FD3D0002B7AB /* CairoSVGTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + B37C74401F8C58F300DF505B /* applications */ = { + isa = PBXGroup; + children = ( + B37C74541F8C590D00DF505B /* xpc */, + B3136DB71F90E2690002B7AB /* mac */, + ); + path = applications; + sourceTree = ""; + }; + B37C74541F8C590D00DF505B /* xpc */ = { + isa = PBXGroup; + children = ( + B37C74681F8C598500DF505B /* ServiceDelegate.swift */, + B37C745B1F8C590D00DF505B /* Info.plist */, + B37C74631F8C592400DF505B /* main.swift */, + ); + path = xpc; + sourceTree = ""; + }; + B37C74801F8C5AE200DF505B /* Frameworks */ = { + isa = PBXGroup; + children = ( + 9F8599C40CCA72FBF9FA1098 /* Pods_CairoSVG.framework */, + DCB0AF202D3672415910AFDE /* Pods_Speculid.framework */, + 054FC9E3CE2F6BD2F948CF5D /* Pods_Speculid_Mac_App.framework */, + 5EA075855931F18A5DA87B15 /* Pods_Speculid_Mac_XPC.framework */, + E776BC2A0843F84E3CBC279B /* Pods_CairoSVGTests.framework */, + 63BDAD4963D80A5FF54A9272 /* Pods_Speculid_Mac_AppUITests.framework */, + 4D7E00CC4EE1B4A785089460 /* Pods_SpeculidTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + B37C748A1F8C5B5C00DF505B /* cairosvg */ = { + isa = PBXGroup; + children = ( + B3E2F4B820E568A5009EA554 /* dependencies */, + B37C74A11F8C5C7400DF505B /* ImageHandle.h */, + B37C749C1F8C5C7300DF505B /* ImageHandleBuilder.h */, + B37C74A01F8C5C7400DF505B /* ImageHandleBuilder.m */, + B37C74991F8C5C7300DF505B /* ImageSpecificationProtocol.h */, + B37C74981F8C5C7300DF505B /* PDFSurface.h */, + B37C749D1F8C5C7300DF505B /* PDFSurface.m */, + B37C74A31F8C5C7400DF505B /* PNGImageHandle.h */, + B37C74961F8C5C7200DF505B /* PNGImageHandle.m */, + B37C74A21F8C5C7400DF505B /* PNGSurface.h */, + B37C749F1F8C5C7300DF505B /* PNGSurface.m */, + B37C749A1F8C5C7300DF505B /* CairoInterface.h */, + B37C74971F8C5C7300DF505B /* CairoInterface.m */, + B37C749B1F8C5C7300DF505B /* SurfaceHandle.h */, + B37C74951F8C5C7200DF505B /* SVGImageHandle.h */, + B37C749E1F8C5C7300DF505B /* SVGImageHandle.m */, + B37C748B1F8C5B5C00DF505B /* CairoSVG.h */, + B37C748C1F8C5B5C00DF505B /* Info.plist */, + B34E82FA1F8FD4EF0032268F /* ImageFileFormat.h */, + B34E82FE1F8FD6860032268F /* ImageFileProtocol.h */, + B34E83021F8FD90C0032268F /* GlibError.h */, + B34E83031F8FD90C0032268F /* GlibError.m */, + B34E83061F8FDC4C0032268F /* GeometryDimension.h */, + B34E83081F8FDCB80032268F /* Dimension.h */, + B34E830A1F8FDDAC0032268F /* CairoColorProtocol.h */, + B35B71251F904CF100BE477E /* SurfaceHandleBuilder.h */, + B35B71261F904CF100BE477E /* SurfaceHandleBuilder.m */, + B35B71291F9052B200BE477E /* CairoSize.h */, + B3136DD81F90E96A0002B7AB /* cairo.h */, + B3136DDA1F90EA520002B7AB /* rsvg.h */, + ); + path = cairosvg; + sourceTree = ""; + }; + B3825EED20F91806008F2A02 /* graphite2 */ = { + isa = PBXGroup; + children = ( + B3825EEE20F91806008F2A02 /* 1.3.11 */, + ); + path = graphite2; + sourceTree = ""; + }; + B3825EEE20F91806008F2A02 /* 1.3.11 */ = { + isa = PBXGroup; + children = ( + B3825EF120F91806008F2A02 /* include */, + B3825EF720F91806008F2A02 /* lib */, + ); + path = 1.3.11; + sourceTree = ""; + }; + B3825EF120F91806008F2A02 /* include */ = { + isa = PBXGroup; + children = ( + B3825EF220F91806008F2A02 /* graphite2 */, + ); + path = include; + sourceTree = ""; + }; + B3825EF220F91806008F2A02 /* graphite2 */ = { + isa = PBXGroup; + children = ( + B3825EF320F91806008F2A02 /* Segment.h */, + B3825EF420F91806008F2A02 /* Types.h */, + B3825EF520F91806008F2A02 /* Log.h */, + B3825EF620F91806008F2A02 /* Font.h */, + ); + path = graphite2; + sourceTree = ""; + }; + B3825EF720F91806008F2A02 /* lib */ = { + isa = PBXGroup; + children = ( + B3825EF820F91806008F2A02 /* libgraphite2.3.dylib */, + B3825EF920F91806008F2A02 /* libgraphite2.3.0.1.dylib */, + B3825EFA20F91806008F2A02 /* libgraphite2.dylib */, + ); + path = lib; + sourceTree = ""; + }; + B3D329FE1F9A5D290042B46F /* Resources */ = { + isa = PBXGroup; + children = ( + B3D32A011F9A5D750042B46F /* help.txt */, + ); + path = Resources; + sourceTree = ""; + }; + B3E2045E20E568C0009EA554 /* librsvg */ = { + isa = PBXGroup; + children = ( + B3E2045F20E568C0009EA554 /* 2.42.2_2 */, + ); + path = librsvg; + sourceTree = ""; + }; + B3E2045F20E568C0009EA554 /* 2.42.2_2 */ = { + isa = PBXGroup; + children = ( + B3E2046020E568C0009EA554 /* INSTALL_RECEIPT.json */, + B3E2046120E568C0009EA554 /* bin */, + B3E2046320E568C0009EA554 /* .brew */, + B3E2046520E568C0009EA554 /* ChangeLog */, + B3E2046620E568C0009EA554 /* AUTHORS */, + B3E2046720E568C0009EA554 /* include */, + B3E2046E20E568C0009EA554 /* README.md */, + B3E2046F20E568C0009EA554 /* COPYING */, + B3E2047020E568C0009EA554 /* NEWS */, + B3E2047120E568C0009EA554 /* lib */, + B3E2047E20E568C1009EA554 /* share */, + ); + path = 2.42.2_2; + sourceTree = ""; + }; + B3E2046120E568C0009EA554 /* bin */ = { + isa = PBXGroup; + children = ( + B3E2046220E568C0009EA554 /* rsvg-convert */, + ); + path = bin; + sourceTree = ""; + }; + B3E2046320E568C0009EA554 /* .brew */ = { + isa = PBXGroup; + children = ( + B3E2046420E568C0009EA554 /* librsvg.rb */, + ); + path = .brew; + sourceTree = ""; + }; + B3E2046720E568C0009EA554 /* include */ = { + isa = PBXGroup; + children = ( + B3E2046820E568C0009EA554 /* librsvg-2.0 */, + ); + path = include; + sourceTree = ""; + }; + B3E2046820E568C0009EA554 /* librsvg-2.0 */ = { + isa = PBXGroup; + children = ( + B3E2046920E568C0009EA554 /* librsvg */, + ); + path = "librsvg-2.0"; + sourceTree = ""; + }; + B3E2046920E568C0009EA554 /* librsvg */ = { + isa = PBXGroup; + children = ( + B3E2046A20E568C0009EA554 /* librsvg-features.h */, + B3E2046B20E568C0009EA554 /* rsvg-cairo.h */, + B3E2046C20E568C0009EA554 /* librsvg-enum-types.h */, + B3E2046D20E568C0009EA554 /* rsvg.h */, + ); + path = librsvg; + sourceTree = ""; + }; + B3E2047120E568C0009EA554 /* lib */ = { + isa = PBXGroup; + children = ( + B3E2047220E568C0009EA554 /* pkgconfig */, + B3E2047420E568C0009EA554 /* librsvg-2.2.dylib */, + B3E2047520E568C0009EA554 /* gdk-pixbuf-2.0 */, + B3E2047A20E568C0009EA554 /* librsvg-2.a */, + B3E2047B20E568C0009EA554 /* girepository-1.0 */, + B3E2047D20E568C0009EA554 /* librsvg-2.dylib */, + ); + path = lib; + sourceTree = ""; + }; + B3E2047220E568C0009EA554 /* pkgconfig */ = { + isa = PBXGroup; + children = ( + B3E2047320E568C0009EA554 /* librsvg-2.0.pc */, + ); + path = pkgconfig; + sourceTree = ""; + }; + B3E2047520E568C0009EA554 /* gdk-pixbuf-2.0 */ = { + isa = PBXGroup; + children = ( + B3E2047620E568C0009EA554 /* 2.10.0 */, + ); + path = "gdk-pixbuf-2.0"; + sourceTree = ""; + }; + B3E2047620E568C0009EA554 /* 2.10.0 */ = { + isa = PBXGroup; + children = ( + B3E2047720E568C0009EA554 /* loaders */, + ); + path = 2.10.0; + sourceTree = ""; + }; + B3E2047720E568C0009EA554 /* loaders */ = { + isa = PBXGroup; + children = ( + B3E2047820E568C0009EA554 /* libpixbufloader-svg.a */, + ); + path = loaders; + sourceTree = ""; + }; + B3E2047B20E568C0009EA554 /* girepository-1.0 */ = { + isa = PBXGroup; + children = ( + B3E2047C20E568C0009EA554 /* Rsvg-2.0.typelib */, + ); + path = "girepository-1.0"; + sourceTree = ""; + }; + B3E2047E20E568C1009EA554 /* share */ = { + isa = PBXGroup; + children = ( + B3E2047F20E568C1009EA554 /* man */, + B3E2048220E568C1009EA554 /* gtk-doc */, + B3E204A220E568C1009EA554 /* thumbnailers */, + B3E204A420E568C1009EA554 /* gir-1.0 */, + B3E204A620E568C1009EA554 /* doc */, + ); + path = share; + sourceTree = ""; + }; + B3E2047F20E568C1009EA554 /* man */ = { + isa = PBXGroup; + children = ( + B3E2048020E568C1009EA554 /* man1 */, + ); + path = man; + sourceTree = ""; + }; + B3E2048020E568C1009EA554 /* man1 */ = { + isa = PBXGroup; + children = ( + B3E2048120E568C1009EA554 /* rsvg-convert.1 */, + ); + path = man1; + sourceTree = ""; + }; + B3E2048220E568C1009EA554 /* gtk-doc */ = { + isa = PBXGroup; + children = ( + B3E2048320E568C1009EA554 /* html */, + ); + path = "gtk-doc"; + sourceTree = ""; + }; + B3E2048320E568C1009EA554 /* html */ = { + isa = PBXGroup; + children = ( + B3E2048420E568C1009EA554 /* rsvg-2.0 */, + ); + path = html; + sourceTree = ""; + }; + B3E2048420E568C1009EA554 /* rsvg-2.0 */ = { + isa = PBXGroup; + children = ( + B3E2048520E568C1009EA554 /* api-index-full.html */, + B3E2048620E568C1009EA554 /* rsvg-Using-RSVG-with-cairo.html */, + B3E2048720E568C1009EA554 /* rsvg-Using-RSVG-with-GIO.html */, + B3E2048820E568C1009EA554 /* up-insensitive.png */, + B3E2048920E568C1009EA554 /* api-index-2-32.html */, + B3E2048A20E568C1009EA554 /* index.html */, + B3E2048B20E568C1009EA554 /* rsvg.html */, + B3E2048C20E568C1009EA554 /* up.png */, + B3E2048D20E568C1009EA554 /* right-insensitive.png */, + B3E2048E20E568C1009EA554 /* home.png */, + B3E2048F20E568C1009EA554 /* rsvg-RsvgHandle.html */, + B3E2049020E568C1009EA554 /* api-index-2-14.html */, + B3E2049120E568C1009EA554 /* ch01.html */, + B3E2049220E568C1009EA554 /* object-tree.html */, + B3E2049320E568C1009EA554 /* api-index-2-22.html */, + B3E2049420E568C1009EA554 /* api-index-2-8.html */, + B3E2049520E568C1009EA554 /* left.png */, + B3E2049620E568C1009EA554 /* api-index-deprecated.html */, + B3E2049720E568C1009EA554 /* rsvg-Version-check-and-feature-tests.html */, + B3E2049820E568C1009EA554 /* api-index-2-4.html */, + B3E2049920E568C1009EA554 /* annotation-glossary.html */, + B3E2049A20E568C1009EA554 /* style.css */, + B3E2049B20E568C1009EA554 /* api-index-2-9.html */, + B3E2049C20E568C1009EA554 /* api-index-2-36.html */, + B3E2049D20E568C1009EA554 /* licence.html */, + B3E2049E20E568C1009EA554 /* left-insensitive.png */, + B3E2049F20E568C1009EA554 /* rsvg-2.0.devhelp2 */, + B3E204A020E568C1009EA554 /* rsvg-Using-RSVG-with-GdkPixbuf.html */, + B3E204A120E568C1009EA554 /* right.png */, + ); + path = "rsvg-2.0"; + sourceTree = ""; + }; + B3E204A220E568C1009EA554 /* thumbnailers */ = { + isa = PBXGroup; + children = ( + B3E204A320E568C1009EA554 /* librsvg.thumbnailer */, + ); + path = thumbnailers; + sourceTree = ""; + }; + B3E204A420E568C1009EA554 /* gir-1.0 */ = { + isa = PBXGroup; + children = ( + B3E204A520E568C1009EA554 /* Rsvg-2.0.gir */, + ); + path = "gir-1.0"; + sourceTree = ""; + }; + B3E204A620E568C1009EA554 /* doc */ = { + isa = PBXGroup; + children = ( + B3E204A720E568C1009EA554 /* librsvg */, + ); + path = doc; + sourceTree = ""; + }; + B3E204A720E568C1009EA554 /* librsvg */ = { + isa = PBXGroup; + children = ( + B3E204A820E568C1009EA554 /* code_of_conduct.md */, + B3E204A920E568C1009EA554 /* COMPILING.md */, + B3E204AA20E568C1009EA554 /* README.md */, + B3E204AB20E568C1009EA554 /* CONTRIBUTING.md */, + ); + path = librsvg; + sourceTree = ""; + }; + B3E2F4B820E568A5009EA554 /* dependencies */ = { + isa = PBXGroup; + children = ( + B3825EED20F91806008F2A02 /* graphite2 */, + B31BD6EB20E7E0D500A560C2 /* icu4c */, + B3F8092520E585E800030497 /* harfbuzz */, + B3F8080820E585BF00030497 /* fribidi */, + B3F8075B20E5858100030497 /* libcroco */, + B3F8073020E5855F00030497 /* libffi */, + B3F8058020E5851900030497 /* pcre */, + B3F8053E20E584B300030497 /* libpng */, + B3F8045620E5820B00030497 /* pango */, + B3E2F4B920E568A5009EA554 /* pixman */, + B3E2F4CD20E568A5009EA554 /* freetype */, + B3E2F51720E568A6009EA554 /* gdk-pixbuf */, + B3E2F6C920E568A9009EA554 /* glib */, + B3E2F96120E568AD009EA554 /* cairo */, + B3E2F9E420E568AE009EA554 /* fontconfig */, + B3E2FBFD20E568B1009EA554 /* gettext */, + B3E2045E20E568C0009EA554 /* librsvg */, + ); + path = dependencies; + sourceTree = ""; + }; + B3E2F4B920E568A5009EA554 /* pixman */ = { + isa = PBXGroup; + children = ( + B3E2F4BA20E568A5009EA554 /* 0.34.0_1 */, + ); + path = pixman; + sourceTree = ""; + }; + B3E2F4BA20E568A5009EA554 /* 0.34.0_1 */ = { + isa = PBXGroup; + children = ( + B3E2F4C020E568A5009EA554 /* include */, + B3E2F4C720E568A5009EA554 /* lib */, + ); + path = 0.34.0_1; + sourceTree = ""; + }; + B3E2F4C020E568A5009EA554 /* include */ = { + isa = PBXGroup; + children = ( + B3E2F4C120E568A5009EA554 /* pixman-1 */, + ); + path = include; + sourceTree = ""; + }; + B3E2F4C120E568A5009EA554 /* pixman-1 */ = { + isa = PBXGroup; + children = ( + B3E2F4C220E568A5009EA554 /* pixman.h */, + B3E2F4C320E568A5009EA554 /* pixman-version.h */, + ); + path = "pixman-1"; + sourceTree = ""; + }; + B3E2F4C720E568A5009EA554 /* lib */ = { + isa = PBXGroup; + children = ( + B3E2F4C820E568A5009EA554 /* pkgconfig */, + B3E2F4CA20E568A5009EA554 /* libpixman-1.dylib */, + B3E2F4CB20E568A5009EA554 /* libpixman-1.a */, + B3E2F4CC20E568A5009EA554 /* libpixman-1.0.dylib */, + ); + path = lib; + sourceTree = ""; + }; + B3E2F4C820E568A5009EA554 /* pkgconfig */ = { + isa = PBXGroup; + children = ( + B3E2F4C920E568A5009EA554 /* pixman-1.pc */, + ); + path = pkgconfig; + sourceTree = ""; + }; + B3E2F4CD20E568A5009EA554 /* freetype */ = { + isa = PBXGroup; + children = ( + B3E2F4CE20E568A5009EA554 /* 2.9.1 */, + ); + path = freetype; + sourceTree = ""; + }; + B3E2F4CE20E568A5009EA554 /* 2.9.1 */ = { + isa = PBXGroup; + children = ( + B3E2F4CF20E568A5009EA554 /* INSTALL_RECEIPT.json */, + B3E2F4D020E568A5009EA554 /* bin */, + B3E2F4D220E568A5009EA554 /* .brew */, + B3E2F4D420E568A5009EA554 /* ChangeLog */, + B3E2F4D520E568A5009EA554 /* include */, + B3E2F50A20E568A6009EA554 /* README */, + B3E2F50B20E568A6009EA554 /* lib */, + B3E2F51120E568A6009EA554 /* share */, + ); + path = 2.9.1; + sourceTree = ""; + }; + B3E2F4D020E568A5009EA554 /* bin */ = { + isa = PBXGroup; + children = ( + B3E2F4D120E568A5009EA554 /* freetype-config */, + ); + path = bin; + sourceTree = ""; + }; + B3E2F4D220E568A5009EA554 /* .brew */ = { + isa = PBXGroup; + children = ( + B3E2F4D320E568A5009EA554 /* freetype.rb */, + ); + path = .brew; + sourceTree = ""; + }; + B3E2F4D520E568A5009EA554 /* include */ = { + isa = PBXGroup; + children = ( + B3E2F4D620E568A5009EA554 /* freetype2 */, + ); + path = include; + sourceTree = ""; + }; + B3E2F4D620E568A5009EA554 /* freetype2 */ = { + isa = PBXGroup; + children = ( + B3E2F4D720E568A5009EA554 /* freetype */, + B3E2F50920E568A6009EA554 /* ft2build.h */, + ); + path = freetype2; + sourceTree = ""; + }; + B3E2F4D720E568A5009EA554 /* freetype */ = { + isa = PBXGroup; + children = ( + B3E2F4D820E568A5009EA554 /* ftsnames.h */, + B3E2F4D920E568A5009EA554 /* ftwinfnt.h */, + B3E2F4DA20E568A5009EA554 /* ftsizes.h */, + B3E2F4DB20E568A5009EA554 /* fttypes.h */, + B3E2F4DC20E568A5009EA554 /* ftparams.h */, + B3E2F4DD20E568A5009EA554 /* ftmm.h */, + B3E2F4DE20E568A5009EA554 /* config */, + B3E2F4E420E568A5009EA554 /* ftmodapi.h */, + B3E2F4E520E568A5009EA554 /* ftbzip2.h */, + B3E2F4E620E568A5009EA554 /* fttrigon.h */, + B3E2F4E720E568A5009EA554 /* ftbbox.h */, + B3E2F4E820E568A5009EA554 /* ftgzip.h */, + B3E2F4E920E568A5009EA554 /* ftdriver.h */, + B3E2F4EA20E568A6009EA554 /* ftoutln.h */, + B3E2F4EB20E568A6009EA554 /* ftadvanc.h */, + B3E2F4EC20E568A6009EA554 /* ftsynth.h */, + B3E2F4ED20E568A6009EA554 /* fterrors.h */, + B3E2F4EE20E568A6009EA554 /* ftgasp.h */, + B3E2F4EF20E568A6009EA554 /* ftstroke.h */, + B3E2F4F020E568A6009EA554 /* ftcache.h */, + B3E2F4F120E568A6009EA554 /* ftotval.h */, + B3E2F4F220E568A6009EA554 /* freetype.h */, + B3E2F4F320E568A6009EA554 /* ftincrem.h */, + B3E2F4F420E568A6009EA554 /* ftfntfmt.h */, + B3E2F4F520E568A6009EA554 /* fterrdef.h */, + B3E2F4F620E568A6009EA554 /* ttnameid.h */, + B3E2F4F720E568A6009EA554 /* ftpfr.h */, + B3E2F4F820E568A6009EA554 /* ftgxval.h */, + B3E2F4F920E568A6009EA554 /* ftchapters.h */, + B3E2F4FA20E568A6009EA554 /* tttags.h */, + B3E2F4FB20E568A6009EA554 /* ftlzw.h */, + B3E2F4FC20E568A6009EA554 /* ftsystem.h */, + B3E2F4FD20E568A6009EA554 /* t1tables.h */, + B3E2F4FE20E568A6009EA554 /* ftimage.h */, + B3E2F4FF20E568A6009EA554 /* tttables.h */, + B3E2F50020E568A6009EA554 /* ftcid.h */, + B3E2F50120E568A6009EA554 /* ftglyph.h */, + B3E2F50220E568A6009EA554 /* ftmoderr.h */, + B3E2F50320E568A6009EA554 /* ftbitmap.h */, + B3E2F50420E568A6009EA554 /* ftlist.h */, + B3E2F50520E568A6009EA554 /* ftmac.h */, + B3E2F50620E568A6009EA554 /* ftlcdfil.h */, + B3E2F50720E568A6009EA554 /* ftbdf.h */, + B3E2F50820E568A6009EA554 /* ftrender.h */, + ); + path = freetype; + sourceTree = ""; + }; + B3E2F4DE20E568A5009EA554 /* config */ = { + isa = PBXGroup; + children = ( + B3E2F4DF20E568A5009EA554 /* ftstdlib.h */, + B3E2F4E020E568A5009EA554 /* ftheader.h */, + B3E2F4E120E568A5009EA554 /* ftconfig.h */, + B3E2F4E220E568A5009EA554 /* ftoption.h */, + B3E2F4E320E568A5009EA554 /* ftmodule.h */, + ); + path = config; + sourceTree = ""; + }; + B3E2F50B20E568A6009EA554 /* lib */ = { + isa = PBXGroup; + children = ( + B3E2F50C20E568A6009EA554 /* libfreetype.dylib */, + B3E2F50D20E568A6009EA554 /* pkgconfig */, + B3E2F50F20E568A6009EA554 /* libfreetype.a */, + B3E2F51020E568A6009EA554 /* libfreetype.6.dylib */, + ); + path = lib; + sourceTree = ""; + }; + B3E2F50D20E568A6009EA554 /* pkgconfig */ = { + isa = PBXGroup; + children = ( + B3E2F50E20E568A6009EA554 /* freetype2.pc */, + ); + path = pkgconfig; + sourceTree = ""; + }; + B3E2F51120E568A6009EA554 /* share */ = { + isa = PBXGroup; + children = ( + B3E2F51220E568A6009EA554 /* man */, + B3E2F51520E568A6009EA554 /* aclocal */, + ); + path = share; + sourceTree = ""; + }; + B3E2F51220E568A6009EA554 /* man */ = { + isa = PBXGroup; + children = ( + B3E2F51320E568A6009EA554 /* man1 */, + ); + path = man; + sourceTree = ""; + }; + B3E2F51320E568A6009EA554 /* man1 */ = { + isa = PBXGroup; + children = ( + B3E2F51420E568A6009EA554 /* freetype-config.1 */, + ); + path = man1; + sourceTree = ""; + }; + B3E2F51520E568A6009EA554 /* aclocal */ = { + isa = PBXGroup; + children = ( + B3E2F51620E568A6009EA554 /* freetype2.m4 */, + ); + path = aclocal; + sourceTree = ""; + }; + B3E2F51720E568A6009EA554 /* gdk-pixbuf */ = { + isa = PBXGroup; + children = ( + B3E2F51820E568A6009EA554 /* 2.36.12 */, + ); + path = "gdk-pixbuf"; + sourceTree = ""; + }; + B3E2F51820E568A6009EA554 /* 2.36.12 */ = { + isa = PBXGroup; + children = ( + B3E2F51920E568A6009EA554 /* INSTALL_RECEIPT.json */, + B3E2F51A20E568A6009EA554 /* bin */, + B3E2F51F20E568A6009EA554 /* .brew */, + B3E2F52120E568A6009EA554 /* AUTHORS */, + B3E2F52220E568A6009EA554 /* include */, + B3E2F53220E568A6009EA554 /* README */, + B3E2F53320E568A6009EA554 /* COPYING */, + B3E2F53420E568A6009EA554 /* NEWS */, + B3E2F53520E568A6009EA554 /* lib */, + B3E2F55A20E568A6009EA554 /* share */, + ); + path = 2.36.12; + sourceTree = ""; + }; + B3E2F51A20E568A6009EA554 /* bin */ = { + isa = PBXGroup; + children = ( + B3E2F51B20E568A6009EA554 /* gdk-pixbuf-pixdata */, + B3E2F51C20E568A6009EA554 /* gdk-pixbuf-query-loaders */, + B3E2F51D20E568A6009EA554 /* gdk-pixbuf-csource */, + B3E2F51E20E568A6009EA554 /* gdk-pixbuf-thumbnailer */, + ); + path = bin; + sourceTree = ""; + }; + B3E2F51F20E568A6009EA554 /* .brew */ = { + isa = PBXGroup; + children = ( + B3E2F52020E568A6009EA554 /* gdk-pixbuf.rb */, + ); + path = .brew; + sourceTree = ""; + }; + B3E2F52220E568A6009EA554 /* include */ = { + isa = PBXGroup; + children = ( + B3E2F52320E568A6009EA554 /* gdk-pixbuf-2.0 */, + ); + path = include; + sourceTree = ""; + }; + B3E2F52320E568A6009EA554 /* gdk-pixbuf-2.0 */ = { + isa = PBXGroup; + children = ( + B3E2F52420E568A6009EA554 /* gdk-pixbuf */, + ); + path = "gdk-pixbuf-2.0"; + sourceTree = ""; + }; + B3E2F52420E568A6009EA554 /* gdk-pixbuf */ = { + isa = PBXGroup; + children = ( + B3E2F52520E568A6009EA554 /* gdk-pixbuf-animation.h */, + B3E2F52620E568A6009EA554 /* gdk-pixbuf-marshal.h */, + B3E2F52720E568A6009EA554 /* gdk-pixbuf-io.h */, + B3E2F52820E568A6009EA554 /* gdk-pixbuf.h */, + B3E2F52920E568A6009EA554 /* gdk-pixbuf-macros.h */, + B3E2F52A20E568A6009EA554 /* gdk-pixbuf-loader.h */, + B3E2F52B20E568A6009EA554 /* gdk-pixbuf-autocleanups.h */, + B3E2F52C20E568A6009EA554 /* gdk-pixbuf-enum-types.h */, + B3E2F52D20E568A6009EA554 /* gdk-pixdata.h */, + B3E2F52E20E568A6009EA554 /* gdk-pixbuf-transform.h */, + B3E2F52F20E568A6009EA554 /* gdk-pixbuf-core.h */, + B3E2F53020E568A6009EA554 /* gdk-pixbuf-features.h */, + B3E2F53120E568A6009EA554 /* gdk-pixbuf-simple-anim.h */, + ); + path = "gdk-pixbuf"; + sourceTree = ""; + }; + B3E2F53520E568A6009EA554 /* lib */ = { + isa = PBXGroup; + children = ( + B3E2F53620E568A6009EA554 /* libgdk_pixbuf-2.0.dylib */, + B3E2F53720E568A6009EA554 /* pkgconfig */, + B3E2F53920E568A6009EA554 /* libgdk_pixbuf-2.0.0.dylib */, + B3E2F53A20E568A6009EA554 /* gdk-pixbuf-2.0 */, + B3E2F55720E568A6009EA554 /* girepository-1.0 */, + B3E2F55920E568A6009EA554 /* libgdk_pixbuf-2.0.a */, + ); + path = lib; + sourceTree = ""; + }; + B3E2F53720E568A6009EA554 /* pkgconfig */ = { + isa = PBXGroup; + children = ( + B3E2F53820E568A6009EA554 /* gdk-pixbuf-2.0.pc */, + ); + path = pkgconfig; + sourceTree = ""; + }; + B3E2F53A20E568A6009EA554 /* gdk-pixbuf-2.0 */ = { + isa = PBXGroup; + children = ( + B3E2F53B20E568A6009EA554 /* 2.10.0 */, + ); + path = "gdk-pixbuf-2.0"; + sourceTree = ""; + }; + B3E2F53B20E568A6009EA554 /* 2.10.0 */ = { + isa = PBXGroup; + children = ( + B3E2F53C20E568A6009EA554 /* loaders */, + ); + path = 2.10.0; + sourceTree = ""; + }; + B3E2F53C20E568A6009EA554 /* loaders */ = { + isa = PBXGroup; + children = ( + B3E2F53D20E568A6009EA554 /* libpixbufloader-tiff.a */, + B3E2F53E20E568A6009EA554 /* libpixbufloader-bmp.a */, + B3E2F53F20E568A6009EA554 /* libpixbufloader-ani.a */, + B3E2F54020E568A6009EA554 /* libpixbufloader-qtif.a */, + B3E2F54220E568A6009EA554 /* libpixbufloader-gif.a */, + B3E2F54420E568A6009EA554 /* libpixbufloader-tga.a */, + B3E2F54620E568A6009EA554 /* libpixbufloader-png.a */, + B3E2F54720E568A6009EA554 /* libpixbufloader-pnm.a */, + B3E2F54820E568A6009EA554 /* libpixbufloader-xpm.a */, + B3E2F55020E568A6009EA554 /* libpixbufloader-xbm.a */, + B3E2F55220E568A6009EA554 /* libpixbufloader-icns.a */, + B3E2F55320E568A6009EA554 /* libpixbufloader-jpeg.a */, + B3E2F55620E568A6009EA554 /* libpixbufloader-ico.a */, + ); + path = loaders; + sourceTree = ""; + }; + B3E2F55720E568A6009EA554 /* girepository-1.0 */ = { + isa = PBXGroup; + children = ( + B3E2F55820E568A6009EA554 /* GdkPixbuf-2.0.typelib */, + ); + path = "girepository-1.0"; + sourceTree = ""; + }; + B3E2F55A20E568A6009EA554 /* share */ = { + isa = PBXGroup; + children = ( + B3E2F55B20E568A6009EA554 /* man */, + B3E2F55F20E568A6009EA554 /* locale */, + B3E2F69E20E568A9009EA554 /* gtk-doc */, + B3E2F6C520E568A9009EA554 /* thumbnailers */, + B3E2F6C720E568A9009EA554 /* gir-1.0 */, + ); + path = share; + sourceTree = ""; + }; + B3E2F55B20E568A6009EA554 /* man */ = { + isa = PBXGroup; + children = ( + B3E2F55C20E568A6009EA554 /* man1 */, + ); + path = man; + sourceTree = ""; + }; + B3E2F55C20E568A6009EA554 /* man1 */ = { + isa = PBXGroup; + children = ( + B3E2F55D20E568A6009EA554 /* gdk-pixbuf-query-loaders.1 */, + B3E2F55E20E568A6009EA554 /* gdk-pixbuf-csource.1 */, + ); + path = man1; + sourceTree = ""; + }; + B3E2F55F20E568A6009EA554 /* locale */ = { + isa = PBXGroup; + children = ( + B3E2F56020E568A6009EA554 /* sl */, + B3E2F56320E568A6009EA554 /* sk */, + B3E2F56620E568A6009EA554 /* mai */, + B3E2F56920E568A6009EA554 /* ug */, + B3E2F56C20E568A6009EA554 /* uz */, + B3E2F56F20E568A6009EA554 /* pl */, + B3E2F57220E568A6009EA554 /* vi */, + B3E2F57520E568A6009EA554 /* sq */, + B3E2F57820E568A6009EA554 /* ang */, + B3E2F57B20E568A6009EA554 /* sv */, + B3E2F57E20E568A6009EA554 /* zh_HK */, + B3E2F58120E568A6009EA554 /* ga */, + B3E2F58420E568A6009EA554 /* he */, + B3E2F58720E568A6009EA554 /* ms */, + B3E2F58A20E568A6009EA554 /* km */, + B3E2F58D20E568A6009EA554 /* uz@cyrillic */, + B3E2F59020E568A6009EA554 /* hy */, + B3E2F59320E568A6009EA554 /* nn */, + B3E2F59620E568A6009EA554 /* be */, + B3E2F59920E568A6009EA554 /* da */, + B3E2F59C20E568A7009EA554 /* mr */, + B3E2F59F20E568A7009EA554 /* kk */, + B3E2F5A220E568A7009EA554 /* gu */, + B3E2F5A520E568A7009EA554 /* dz */, + B3E2F5A820E568A7009EA554 /* mn */, + B3E2F5AB20E568A7009EA554 /* mi */, + B3E2F5AE20E568A7009EA554 /* pt_BR */, + B3E2F5B120E568A7009EA554 /* ja */, + B3E2F5B420E568A7009EA554 /* el */, + B3E2F5B720E568A7009EA554 /* lv */, + B3E2F5BA20E568A7009EA554 /* oc */, + B3E2F5BD20E568A7009EA554 /* bn_IN */, + B3E2F5C020E568A7009EA554 /* it */, + B3E2F5C320E568A7009EA554 /* ca */, + B3E2F5C620E568A7009EA554 /* zh_TW */, + B3E2F5C920E568A7009EA554 /* is */, + B3E2F5CC20E568A7009EA554 /* cs */, + B3E2F5CF20E568A7009EA554 /* ia */, + B3E2F5D220E568A7009EA554 /* io */, + B3E2F5D520E568A7009EA554 /* nso */, + B3E2F5D820E568A7009EA554 /* en_CA */, + B3E2F5DB20E568A7009EA554 /* te */, + B3E2F5DE20E568A7009EA554 /* fur */, + B3E2F5E120E568A7009EA554 /* en@shaw */, + B3E2F5E420E568A7009EA554 /* ru */, + B3E2F5E720E568A7009EA554 /* tk */, + B3E2F5EA20E568A7009EA554 /* sr@ije */, + B3E2F5ED20E568A7009EA554 /* xh */, + B3E2F5F020E568A7009EA554 /* ro */, + B3E2F5F320E568A7009EA554 /* zh_CN */, + B3E2F5F620E568A7009EA554 /* yi */, + B3E2F5F920E568A7009EA554 /* pt */, + B3E2F5FC20E568A7009EA554 /* ps */, + B3E2F5FF20E568A7009EA554 /* uk */, + B3E2F60220E568A7009EA554 /* sr */, + B3E2F60520E568A7009EA554 /* be@latin */, + B3E2F60820E568A7009EA554 /* sr@latin */, + B3E2F60B20E568A7009EA554 /* pa */, + B3E2F60E20E568A7009EA554 /* en_GB */, + B3E2F61120E568A7009EA554 /* si */, + B3E2F61420E568A7009EA554 /* ml */, + B3E2F61720E568A8009EA554 /* ku */, + B3E2F61A20E568A8009EA554 /* mk */, + B3E2F61D20E568A8009EA554 /* kn */, + B3E2F62020E568A8009EA554 /* bs */, + B3E2F62320E568A8009EA554 /* my */, + B3E2F62620E568A8009EA554 /* ar */, + B3E2F62920E568A8009EA554 /* gl */, + B3E2F62C20E568A8009EA554 /* hr */, + B3E2F62F20E568A8009EA554 /* hu */, + B3E2F63220E568A8009EA554 /* nl */, + B3E2F63520E568A8009EA554 /* bg */, + B3E2F63820E568A8009EA554 /* bn */, + B3E2F63B20E568A8009EA554 /* ne */, + B3E2F63E20E568A8009EA554 /* ast */, + B3E2F64120E568A8009EA554 /* af */, + B3E2F64420E568A8009EA554 /* nb */, + B3E2F64720E568A8009EA554 /* hi */, + B3E2F64A20E568A8009EA554 /* ka */, + B3E2F64D20E568A8009EA554 /* de */, + B3E2F65020E568A8009EA554 /* as */, + B3E2F65320E568A8009EA554 /* az */, + B3E2F65620E568A8009EA554 /* csb */, + B3E2F65920E568A8009EA554 /* br */, + B3E2F65C20E568A8009EA554 /* ko */, + B3E2F65F20E568A8009EA554 /* ca@valencia */, + B3E2F66220E568A8009EA554 /* fi */, + B3E2F66520E568A8009EA554 /* crh */, + B3E2F66820E568A8009EA554 /* eo */, + B3E2F66B20E568A8009EA554 /* id */, + B3E2F66E20E568A8009EA554 /* fr */, + B3E2F67120E568A8009EA554 /* es */, + B3E2F67420E568A8009EA554 /* et */, + B3E2F67720E568A8009EA554 /* li */, + B3E2F67A20E568A8009EA554 /* fa */, + B3E2F67D20E568A8009EA554 /* lt */, + B3E2F68020E568A8009EA554 /* or */, + B3E2F68320E568A9009EA554 /* cy */, + B3E2F68620E568A9009EA554 /* nds */, + B3E2F68920E568A9009EA554 /* eu */, + B3E2F68C20E568A9009EA554 /* tt */, + B3E2F68F20E568A9009EA554 /* ta */, + B3E2F69220E568A9009EA554 /* th */, + B3E2F69520E568A9009EA554 /* tr */, + B3E2F69820E568A9009EA554 /* wa */, + B3E2F69B20E568A9009EA554 /* tg */, + ); + path = locale; + sourceTree = ""; + }; + B3E2F56020E568A6009EA554 /* sl */ = { + isa = PBXGroup; + children = ( + B3E2F56120E568A6009EA554 /* LC_MESSAGES */, + ); + path = sl; + sourceTree = ""; + }; + B3E2F56120E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F56220E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F56320E568A6009EA554 /* sk */ = { + isa = PBXGroup; + children = ( + B3E2F56420E568A6009EA554 /* LC_MESSAGES */, + ); + path = sk; + sourceTree = ""; + }; + B3E2F56420E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F56520E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F56620E568A6009EA554 /* mai */ = { + isa = PBXGroup; + children = ( + B3E2F56720E568A6009EA554 /* LC_MESSAGES */, + ); + path = mai; + sourceTree = ""; + }; + B3E2F56720E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F56820E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F56920E568A6009EA554 /* ug */ = { + isa = PBXGroup; + children = ( + B3E2F56A20E568A6009EA554 /* LC_MESSAGES */, + ); + path = ug; + sourceTree = ""; + }; + B3E2F56A20E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F56B20E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F56C20E568A6009EA554 /* uz */ = { + isa = PBXGroup; + children = ( + B3E2F56D20E568A6009EA554 /* LC_MESSAGES */, + ); + path = uz; + sourceTree = ""; + }; + B3E2F56D20E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F56E20E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F56F20E568A6009EA554 /* pl */ = { + isa = PBXGroup; + children = ( + B3E2F57020E568A6009EA554 /* LC_MESSAGES */, + ); + path = pl; + sourceTree = ""; + }; + B3E2F57020E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F57120E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F57220E568A6009EA554 /* vi */ = { + isa = PBXGroup; + children = ( + B3E2F57320E568A6009EA554 /* LC_MESSAGES */, + ); + path = vi; + sourceTree = ""; + }; + B3E2F57320E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F57420E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F57520E568A6009EA554 /* sq */ = { + isa = PBXGroup; + children = ( + B3E2F57620E568A6009EA554 /* LC_MESSAGES */, + ); + path = sq; + sourceTree = ""; + }; + B3E2F57620E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F57720E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F57820E568A6009EA554 /* ang */ = { + isa = PBXGroup; + children = ( + B3E2F57920E568A6009EA554 /* LC_MESSAGES */, + ); + path = ang; + sourceTree = ""; + }; + B3E2F57920E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F57A20E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F57B20E568A6009EA554 /* sv */ = { + isa = PBXGroup; + children = ( + B3E2F57C20E568A6009EA554 /* LC_MESSAGES */, + ); + path = sv; + sourceTree = ""; + }; + B3E2F57C20E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F57D20E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F57E20E568A6009EA554 /* zh_HK */ = { + isa = PBXGroup; + children = ( + B3E2F57F20E568A6009EA554 /* LC_MESSAGES */, + ); + path = zh_HK; + sourceTree = ""; + }; + B3E2F57F20E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F58020E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F58120E568A6009EA554 /* ga */ = { + isa = PBXGroup; + children = ( + B3E2F58220E568A6009EA554 /* LC_MESSAGES */, + ); + path = ga; + sourceTree = ""; + }; + B3E2F58220E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F58320E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F58420E568A6009EA554 /* he */ = { + isa = PBXGroup; + children = ( + B3E2F58520E568A6009EA554 /* LC_MESSAGES */, + ); + path = he; + sourceTree = ""; + }; + B3E2F58520E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F58620E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F58720E568A6009EA554 /* ms */ = { + isa = PBXGroup; + children = ( + B3E2F58820E568A6009EA554 /* LC_MESSAGES */, + ); + path = ms; + sourceTree = ""; + }; + B3E2F58820E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F58920E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F58A20E568A6009EA554 /* km */ = { + isa = PBXGroup; + children = ( + B3E2F58B20E568A6009EA554 /* LC_MESSAGES */, + ); + path = km; + sourceTree = ""; + }; + B3E2F58B20E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F58C20E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F58D20E568A6009EA554 /* uz@cyrillic */ = { + isa = PBXGroup; + children = ( + B3E2F58E20E568A6009EA554 /* LC_MESSAGES */, + ); + path = "uz@cyrillic"; + sourceTree = ""; + }; + B3E2F58E20E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F58F20E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F59020E568A6009EA554 /* hy */ = { + isa = PBXGroup; + children = ( + B3E2F59120E568A6009EA554 /* LC_MESSAGES */, + ); + path = hy; + sourceTree = ""; + }; + B3E2F59120E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F59220E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F59320E568A6009EA554 /* nn */ = { + isa = PBXGroup; + children = ( + B3E2F59420E568A6009EA554 /* LC_MESSAGES */, + ); + path = nn; + sourceTree = ""; + }; + B3E2F59420E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F59520E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F59620E568A6009EA554 /* be */ = { + isa = PBXGroup; + children = ( + B3E2F59720E568A6009EA554 /* LC_MESSAGES */, + ); + path = be; + sourceTree = ""; + }; + B3E2F59720E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F59820E568A6009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F59920E568A6009EA554 /* da */ = { + isa = PBXGroup; + children = ( + B3E2F59A20E568A6009EA554 /* LC_MESSAGES */, + ); + path = da; + sourceTree = ""; + }; + B3E2F59A20E568A6009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F59B20E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F59C20E568A7009EA554 /* mr */ = { + isa = PBXGroup; + children = ( + B3E2F59D20E568A7009EA554 /* LC_MESSAGES */, + ); + path = mr; + sourceTree = ""; + }; + B3E2F59D20E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F59E20E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F59F20E568A7009EA554 /* kk */ = { + isa = PBXGroup; + children = ( + B3E2F5A020E568A7009EA554 /* LC_MESSAGES */, + ); + path = kk; + sourceTree = ""; + }; + B3E2F5A020E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5A120E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5A220E568A7009EA554 /* gu */ = { + isa = PBXGroup; + children = ( + B3E2F5A320E568A7009EA554 /* LC_MESSAGES */, + ); + path = gu; + sourceTree = ""; + }; + B3E2F5A320E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5A420E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5A520E568A7009EA554 /* dz */ = { + isa = PBXGroup; + children = ( + B3E2F5A620E568A7009EA554 /* LC_MESSAGES */, + ); + path = dz; + sourceTree = ""; + }; + B3E2F5A620E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5A720E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5A820E568A7009EA554 /* mn */ = { + isa = PBXGroup; + children = ( + B3E2F5A920E568A7009EA554 /* LC_MESSAGES */, + ); + path = mn; + sourceTree = ""; + }; + B3E2F5A920E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5AA20E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5AB20E568A7009EA554 /* mi */ = { + isa = PBXGroup; + children = ( + B3E2F5AC20E568A7009EA554 /* LC_MESSAGES */, + ); + path = mi; + sourceTree = ""; + }; + B3E2F5AC20E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5AD20E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5AE20E568A7009EA554 /* pt_BR */ = { + isa = PBXGroup; + children = ( + B3E2F5AF20E568A7009EA554 /* LC_MESSAGES */, + ); + path = pt_BR; + sourceTree = ""; + }; + B3E2F5AF20E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5B020E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5B120E568A7009EA554 /* ja */ = { + isa = PBXGroup; + children = ( + B3E2F5B220E568A7009EA554 /* LC_MESSAGES */, + ); + path = ja; + sourceTree = ""; + }; + B3E2F5B220E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5B320E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5B420E568A7009EA554 /* el */ = { + isa = PBXGroup; + children = ( + B3E2F5B520E568A7009EA554 /* LC_MESSAGES */, + ); + path = el; + sourceTree = ""; + }; + B3E2F5B520E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5B620E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5B720E568A7009EA554 /* lv */ = { + isa = PBXGroup; + children = ( + B3E2F5B820E568A7009EA554 /* LC_MESSAGES */, + ); + path = lv; + sourceTree = ""; + }; + B3E2F5B820E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5B920E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5BA20E568A7009EA554 /* oc */ = { + isa = PBXGroup; + children = ( + B3E2F5BB20E568A7009EA554 /* LC_MESSAGES */, + ); + path = oc; + sourceTree = ""; + }; + B3E2F5BB20E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5BC20E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5BD20E568A7009EA554 /* bn_IN */ = { + isa = PBXGroup; + children = ( + B3E2F5BE20E568A7009EA554 /* LC_MESSAGES */, + ); + path = bn_IN; + sourceTree = ""; + }; + B3E2F5BE20E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5BF20E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5C020E568A7009EA554 /* it */ = { + isa = PBXGroup; + children = ( + B3E2F5C120E568A7009EA554 /* LC_MESSAGES */, + ); + path = it; + sourceTree = ""; + }; + B3E2F5C120E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5C220E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5C320E568A7009EA554 /* ca */ = { + isa = PBXGroup; + children = ( + B3E2F5C420E568A7009EA554 /* LC_MESSAGES */, + ); + path = ca; + sourceTree = ""; + }; + B3E2F5C420E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5C520E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5C620E568A7009EA554 /* zh_TW */ = { + isa = PBXGroup; + children = ( + B3E2F5C720E568A7009EA554 /* LC_MESSAGES */, + ); + path = zh_TW; + sourceTree = ""; + }; + B3E2F5C720E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5C820E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5C920E568A7009EA554 /* is */ = { + isa = PBXGroup; + children = ( + B3E2F5CA20E568A7009EA554 /* LC_MESSAGES */, + ); + path = is; + sourceTree = ""; + }; + B3E2F5CA20E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5CB20E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5CC20E568A7009EA554 /* cs */ = { + isa = PBXGroup; + children = ( + B3E2F5CD20E568A7009EA554 /* LC_MESSAGES */, + ); + path = cs; + sourceTree = ""; + }; + B3E2F5CD20E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5CE20E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5CF20E568A7009EA554 /* ia */ = { + isa = PBXGroup; + children = ( + B3E2F5D020E568A7009EA554 /* LC_MESSAGES */, + ); + path = ia; + sourceTree = ""; + }; + B3E2F5D020E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5D120E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5D220E568A7009EA554 /* io */ = { + isa = PBXGroup; + children = ( + B3E2F5D320E568A7009EA554 /* LC_MESSAGES */, + ); + path = io; + sourceTree = ""; + }; + B3E2F5D320E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5D420E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5D520E568A7009EA554 /* nso */ = { + isa = PBXGroup; + children = ( + B3E2F5D620E568A7009EA554 /* LC_MESSAGES */, + ); + path = nso; + sourceTree = ""; + }; + B3E2F5D620E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5D720E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5D820E568A7009EA554 /* en_CA */ = { + isa = PBXGroup; + children = ( + B3E2F5D920E568A7009EA554 /* LC_MESSAGES */, + ); + path = en_CA; + sourceTree = ""; + }; + B3E2F5D920E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5DA20E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5DB20E568A7009EA554 /* te */ = { + isa = PBXGroup; + children = ( + B3E2F5DC20E568A7009EA554 /* LC_MESSAGES */, + ); + path = te; + sourceTree = ""; + }; + B3E2F5DC20E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5DD20E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5DE20E568A7009EA554 /* fur */ = { + isa = PBXGroup; + children = ( + B3E2F5DF20E568A7009EA554 /* LC_MESSAGES */, + ); + path = fur; + sourceTree = ""; + }; + B3E2F5DF20E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5E020E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5E120E568A7009EA554 /* en@shaw */ = { + isa = PBXGroup; + children = ( + B3E2F5E220E568A7009EA554 /* LC_MESSAGES */, + ); + path = "en@shaw"; + sourceTree = ""; + }; + B3E2F5E220E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5E320E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5E420E568A7009EA554 /* ru */ = { + isa = PBXGroup; + children = ( + B3E2F5E520E568A7009EA554 /* LC_MESSAGES */, + ); + path = ru; + sourceTree = ""; + }; + B3E2F5E520E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5E620E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5E720E568A7009EA554 /* tk */ = { + isa = PBXGroup; + children = ( + B3E2F5E820E568A7009EA554 /* LC_MESSAGES */, + ); + path = tk; + sourceTree = ""; + }; + B3E2F5E820E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5E920E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5EA20E568A7009EA554 /* sr@ije */ = { + isa = PBXGroup; + children = ( + B3E2F5EB20E568A7009EA554 /* LC_MESSAGES */, + ); + path = "sr@ije"; + sourceTree = ""; + }; + B3E2F5EB20E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5EC20E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5ED20E568A7009EA554 /* xh */ = { + isa = PBXGroup; + children = ( + B3E2F5EE20E568A7009EA554 /* LC_MESSAGES */, + ); + path = xh; + sourceTree = ""; + }; + B3E2F5EE20E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5EF20E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5F020E568A7009EA554 /* ro */ = { + isa = PBXGroup; + children = ( + B3E2F5F120E568A7009EA554 /* LC_MESSAGES */, + ); + path = ro; + sourceTree = ""; + }; + B3E2F5F120E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5F220E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5F320E568A7009EA554 /* zh_CN */ = { + isa = PBXGroup; + children = ( + B3E2F5F420E568A7009EA554 /* LC_MESSAGES */, + ); + path = zh_CN; + sourceTree = ""; + }; + B3E2F5F420E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5F520E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5F620E568A7009EA554 /* yi */ = { + isa = PBXGroup; + children = ( + B3E2F5F720E568A7009EA554 /* LC_MESSAGES */, + ); + path = yi; + sourceTree = ""; + }; + B3E2F5F720E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5F820E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5F920E568A7009EA554 /* pt */ = { + isa = PBXGroup; + children = ( + B3E2F5FA20E568A7009EA554 /* LC_MESSAGES */, + ); + path = pt; + sourceTree = ""; + }; + B3E2F5FA20E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5FB20E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5FC20E568A7009EA554 /* ps */ = { + isa = PBXGroup; + children = ( + B3E2F5FD20E568A7009EA554 /* LC_MESSAGES */, + ); + path = ps; + sourceTree = ""; + }; + B3E2F5FD20E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F5FE20E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F5FF20E568A7009EA554 /* uk */ = { + isa = PBXGroup; + children = ( + B3E2F60020E568A7009EA554 /* LC_MESSAGES */, + ); + path = uk; + sourceTree = ""; + }; + B3E2F60020E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F60120E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F60220E568A7009EA554 /* sr */ = { + isa = PBXGroup; + children = ( + B3E2F60320E568A7009EA554 /* LC_MESSAGES */, + ); + path = sr; + sourceTree = ""; + }; + B3E2F60320E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F60420E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F60520E568A7009EA554 /* be@latin */ = { + isa = PBXGroup; + children = ( + B3E2F60620E568A7009EA554 /* LC_MESSAGES */, + ); + path = "be@latin"; + sourceTree = ""; + }; + B3E2F60620E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F60720E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F60820E568A7009EA554 /* sr@latin */ = { + isa = PBXGroup; + children = ( + B3E2F60920E568A7009EA554 /* LC_MESSAGES */, + ); + path = "sr@latin"; + sourceTree = ""; + }; + B3E2F60920E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F60A20E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F60B20E568A7009EA554 /* pa */ = { + isa = PBXGroup; + children = ( + B3E2F60C20E568A7009EA554 /* LC_MESSAGES */, + ); + path = pa; + sourceTree = ""; + }; + B3E2F60C20E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F60D20E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F60E20E568A7009EA554 /* en_GB */ = { + isa = PBXGroup; + children = ( + B3E2F60F20E568A7009EA554 /* LC_MESSAGES */, + ); + path = en_GB; + sourceTree = ""; + }; + B3E2F60F20E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F61020E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F61120E568A7009EA554 /* si */ = { + isa = PBXGroup; + children = ( + B3E2F61220E568A7009EA554 /* LC_MESSAGES */, + ); + path = si; + sourceTree = ""; + }; + B3E2F61220E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F61320E568A7009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F61420E568A7009EA554 /* ml */ = { + isa = PBXGroup; + children = ( + B3E2F61520E568A7009EA554 /* LC_MESSAGES */, + ); + path = ml; + sourceTree = ""; + }; + B3E2F61520E568A7009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F61620E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F61720E568A8009EA554 /* ku */ = { + isa = PBXGroup; + children = ( + B3E2F61820E568A8009EA554 /* LC_MESSAGES */, + ); + path = ku; + sourceTree = ""; + }; + B3E2F61820E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F61920E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F61A20E568A8009EA554 /* mk */ = { + isa = PBXGroup; + children = ( + B3E2F61B20E568A8009EA554 /* LC_MESSAGES */, + ); + path = mk; + sourceTree = ""; + }; + B3E2F61B20E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F61C20E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F61D20E568A8009EA554 /* kn */ = { + isa = PBXGroup; + children = ( + B3E2F61E20E568A8009EA554 /* LC_MESSAGES */, + ); + path = kn; + sourceTree = ""; + }; + B3E2F61E20E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F61F20E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F62020E568A8009EA554 /* bs */ = { + isa = PBXGroup; + children = ( + B3E2F62120E568A8009EA554 /* LC_MESSAGES */, + ); + path = bs; + sourceTree = ""; + }; + B3E2F62120E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F62220E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F62320E568A8009EA554 /* my */ = { + isa = PBXGroup; + children = ( + B3E2F62420E568A8009EA554 /* LC_MESSAGES */, + ); + path = my; + sourceTree = ""; + }; + B3E2F62420E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F62520E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F62620E568A8009EA554 /* ar */ = { + isa = PBXGroup; + children = ( + B3E2F62720E568A8009EA554 /* LC_MESSAGES */, + ); + path = ar; + sourceTree = ""; + }; + B3E2F62720E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F62820E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F62920E568A8009EA554 /* gl */ = { + isa = PBXGroup; + children = ( + B3E2F62A20E568A8009EA554 /* LC_MESSAGES */, + ); + path = gl; + sourceTree = ""; + }; + B3E2F62A20E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F62B20E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F62C20E568A8009EA554 /* hr */ = { + isa = PBXGroup; + children = ( + B3E2F62D20E568A8009EA554 /* LC_MESSAGES */, + ); + path = hr; + sourceTree = ""; + }; + B3E2F62D20E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F62E20E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F62F20E568A8009EA554 /* hu */ = { + isa = PBXGroup; + children = ( + B3E2F63020E568A8009EA554 /* LC_MESSAGES */, + ); + path = hu; + sourceTree = ""; + }; + B3E2F63020E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F63120E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F63220E568A8009EA554 /* nl */ = { + isa = PBXGroup; + children = ( + B3E2F63320E568A8009EA554 /* LC_MESSAGES */, + ); + path = nl; + sourceTree = ""; + }; + B3E2F63320E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F63420E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F63520E568A8009EA554 /* bg */ = { + isa = PBXGroup; + children = ( + B3E2F63620E568A8009EA554 /* LC_MESSAGES */, + ); + path = bg; + sourceTree = ""; + }; + B3E2F63620E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F63720E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F63820E568A8009EA554 /* bn */ = { + isa = PBXGroup; + children = ( + B3E2F63920E568A8009EA554 /* LC_MESSAGES */, + ); + path = bn; + sourceTree = ""; + }; + B3E2F63920E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F63A20E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F63B20E568A8009EA554 /* ne */ = { + isa = PBXGroup; + children = ( + B3E2F63C20E568A8009EA554 /* LC_MESSAGES */, + ); + path = ne; + sourceTree = ""; + }; + B3E2F63C20E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F63D20E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F63E20E568A8009EA554 /* ast */ = { + isa = PBXGroup; + children = ( + B3E2F63F20E568A8009EA554 /* LC_MESSAGES */, + ); + path = ast; + sourceTree = ""; + }; + B3E2F63F20E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F64020E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F64120E568A8009EA554 /* af */ = { + isa = PBXGroup; + children = ( + B3E2F64220E568A8009EA554 /* LC_MESSAGES */, + ); + path = af; + sourceTree = ""; + }; + B3E2F64220E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F64320E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F64420E568A8009EA554 /* nb */ = { + isa = PBXGroup; + children = ( + B3E2F64520E568A8009EA554 /* LC_MESSAGES */, + ); + path = nb; + sourceTree = ""; + }; + B3E2F64520E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F64620E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F64720E568A8009EA554 /* hi */ = { + isa = PBXGroup; + children = ( + B3E2F64820E568A8009EA554 /* LC_MESSAGES */, + ); + path = hi; + sourceTree = ""; + }; + B3E2F64820E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F64920E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F64A20E568A8009EA554 /* ka */ = { + isa = PBXGroup; + children = ( + B3E2F64B20E568A8009EA554 /* LC_MESSAGES */, + ); + path = ka; + sourceTree = ""; + }; + B3E2F64B20E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F64C20E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F64D20E568A8009EA554 /* de */ = { + isa = PBXGroup; + children = ( + B3E2F64E20E568A8009EA554 /* LC_MESSAGES */, + ); + path = de; + sourceTree = ""; + }; + B3E2F64E20E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F64F20E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F65020E568A8009EA554 /* as */ = { + isa = PBXGroup; + children = ( + B3E2F65120E568A8009EA554 /* LC_MESSAGES */, + ); + path = as; + sourceTree = ""; + }; + B3E2F65120E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F65220E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F65320E568A8009EA554 /* az */ = { + isa = PBXGroup; + children = ( + B3E2F65420E568A8009EA554 /* LC_MESSAGES */, + ); + path = az; + sourceTree = ""; + }; + B3E2F65420E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F65520E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F65620E568A8009EA554 /* csb */ = { + isa = PBXGroup; + children = ( + B3E2F65720E568A8009EA554 /* LC_MESSAGES */, + ); + path = csb; + sourceTree = ""; + }; + B3E2F65720E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F65820E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F65920E568A8009EA554 /* br */ = { + isa = PBXGroup; + children = ( + B3E2F65A20E568A8009EA554 /* LC_MESSAGES */, + ); + path = br; + sourceTree = ""; + }; + B3E2F65A20E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F65B20E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F65C20E568A8009EA554 /* ko */ = { + isa = PBXGroup; + children = ( + B3E2F65D20E568A8009EA554 /* LC_MESSAGES */, + ); + path = ko; + sourceTree = ""; + }; + B3E2F65D20E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F65E20E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F65F20E568A8009EA554 /* ca@valencia */ = { + isa = PBXGroup; + children = ( + B3E2F66020E568A8009EA554 /* LC_MESSAGES */, + ); + path = "ca@valencia"; + sourceTree = ""; + }; + B3E2F66020E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F66120E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F66220E568A8009EA554 /* fi */ = { + isa = PBXGroup; + children = ( + B3E2F66320E568A8009EA554 /* LC_MESSAGES */, + ); + path = fi; + sourceTree = ""; + }; + B3E2F66320E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F66420E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F66520E568A8009EA554 /* crh */ = { + isa = PBXGroup; + children = ( + B3E2F66620E568A8009EA554 /* LC_MESSAGES */, + ); + path = crh; + sourceTree = ""; + }; + B3E2F66620E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F66720E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F66820E568A8009EA554 /* eo */ = { + isa = PBXGroup; + children = ( + B3E2F66920E568A8009EA554 /* LC_MESSAGES */, + ); + path = eo; + sourceTree = ""; + }; + B3E2F66920E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F66A20E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F66B20E568A8009EA554 /* id */ = { + isa = PBXGroup; + children = ( + B3E2F66C20E568A8009EA554 /* LC_MESSAGES */, + ); + path = id; + sourceTree = ""; + }; + B3E2F66C20E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F66D20E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F66E20E568A8009EA554 /* fr */ = { + isa = PBXGroup; + children = ( + B3E2F66F20E568A8009EA554 /* LC_MESSAGES */, + ); + path = fr; + sourceTree = ""; + }; + B3E2F66F20E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F67020E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F67120E568A8009EA554 /* es */ = { + isa = PBXGroup; + children = ( + B3E2F67220E568A8009EA554 /* LC_MESSAGES */, + ); + path = es; + sourceTree = ""; + }; + B3E2F67220E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F67320E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F67420E568A8009EA554 /* et */ = { + isa = PBXGroup; + children = ( + B3E2F67520E568A8009EA554 /* LC_MESSAGES */, + ); + path = et; + sourceTree = ""; + }; + B3E2F67520E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F67620E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F67720E568A8009EA554 /* li */ = { + isa = PBXGroup; + children = ( + B3E2F67820E568A8009EA554 /* LC_MESSAGES */, + ); + path = li; + sourceTree = ""; + }; + B3E2F67820E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F67920E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F67A20E568A8009EA554 /* fa */ = { + isa = PBXGroup; + children = ( + B3E2F67B20E568A8009EA554 /* LC_MESSAGES */, + ); + path = fa; + sourceTree = ""; + }; + B3E2F67B20E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F67C20E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F67D20E568A8009EA554 /* lt */ = { + isa = PBXGroup; + children = ( + B3E2F67E20E568A8009EA554 /* LC_MESSAGES */, + ); + path = lt; + sourceTree = ""; + }; + B3E2F67E20E568A8009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F67F20E568A8009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F68020E568A8009EA554 /* or */ = { + isa = PBXGroup; + children = ( + B3E2F68120E568A9009EA554 /* LC_MESSAGES */, + ); + path = or; + sourceTree = ""; + }; + B3E2F68120E568A9009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F68220E568A9009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F68320E568A9009EA554 /* cy */ = { + isa = PBXGroup; + children = ( + B3E2F68420E568A9009EA554 /* LC_MESSAGES */, + ); + path = cy; + sourceTree = ""; + }; + B3E2F68420E568A9009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F68520E568A9009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F68620E568A9009EA554 /* nds */ = { + isa = PBXGroup; + children = ( + B3E2F68720E568A9009EA554 /* LC_MESSAGES */, + ); + path = nds; + sourceTree = ""; + }; + B3E2F68720E568A9009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F68820E568A9009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F68920E568A9009EA554 /* eu */ = { + isa = PBXGroup; + children = ( + B3E2F68A20E568A9009EA554 /* LC_MESSAGES */, + ); + path = eu; + sourceTree = ""; + }; + B3E2F68A20E568A9009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F68B20E568A9009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F68C20E568A9009EA554 /* tt */ = { + isa = PBXGroup; + children = ( + B3E2F68D20E568A9009EA554 /* LC_MESSAGES */, + ); + path = tt; + sourceTree = ""; + }; + B3E2F68D20E568A9009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F68E20E568A9009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F68F20E568A9009EA554 /* ta */ = { + isa = PBXGroup; + children = ( + B3E2F69020E568A9009EA554 /* LC_MESSAGES */, + ); + path = ta; + sourceTree = ""; + }; + B3E2F69020E568A9009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F69120E568A9009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F69220E568A9009EA554 /* th */ = { + isa = PBXGroup; + children = ( + B3E2F69320E568A9009EA554 /* LC_MESSAGES */, + ); + path = th; + sourceTree = ""; + }; + B3E2F69320E568A9009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F69420E568A9009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F69520E568A9009EA554 /* tr */ = { + isa = PBXGroup; + children = ( + B3E2F69620E568A9009EA554 /* LC_MESSAGES */, + ); + path = tr; + sourceTree = ""; + }; + B3E2F69620E568A9009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F69720E568A9009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F69820E568A9009EA554 /* wa */ = { + isa = PBXGroup; + children = ( + B3E2F69920E568A9009EA554 /* LC_MESSAGES */, + ); + path = wa; + sourceTree = ""; + }; + B3E2F69920E568A9009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F69A20E568A9009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F69B20E568A9009EA554 /* tg */ = { + isa = PBXGroup; + children = ( + B3E2F69C20E568A9009EA554 /* LC_MESSAGES */, + ); + path = tg; + sourceTree = ""; + }; + B3E2F69C20E568A9009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F69D20E568A9009EA554 /* gdk-pixbuf.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F69E20E568A9009EA554 /* gtk-doc */ = { + isa = PBXGroup; + children = ( + B3E2F69F20E568A9009EA554 /* html */, + ); + path = "gtk-doc"; + sourceTree = ""; + }; + B3E2F69F20E568A9009EA554 /* html */ = { + isa = PBXGroup; + children = ( + B3E2F6A020E568A9009EA554 /* gdk-pixbuf */, + ); + path = html; + sourceTree = ""; + }; + B3E2F6A020E568A9009EA554 /* gdk-pixbuf */ = { + isa = PBXGroup; + children = ( + B3E2F6A120E568A9009EA554 /* api-index-full.html */, + B3E2F6A220E568A9009EA554 /* rn02.html */, + B3E2F6A320E568A9009EA554 /* gdk-pixbuf-The-GdkPixbuf-Structure.html */, + B3E2F6A420E568A9009EA554 /* gdk-pixbuf-Xlib-Rendering.html */, + B3E2F6A520E568A9009EA554 /* gdk-pixbuf-Module-Interface.html */, + B3E2F6A620E568A9009EA554 /* gdk-pixbuf-File-saving.html */, + B3E2F6A720E568A9009EA554 /* gdk-pixbuf-X-Drawables-to-Pixbufs.html */, + B3E2F6A820E568A9009EA554 /* up-insensitive.png */, + B3E2F6A920E568A9009EA554 /* gdk-pixbuf-XlibRGB.html */, + B3E2F6AA20E568A9009EA554 /* index.html */, + B3E2F6AB20E568A9009EA554 /* gdk-pixbuf-gdk-pixbuf-rendering.html */, + B3E2F6AC20E568A9009EA554 /* gdk-pixbuf-csource.html */, + B3E2F6AD20E568A9009EA554 /* up.png */, + B3E2F6AE20E568A9009EA554 /* license.html */, + B3E2F6AF20E568A9009EA554 /* gdk-pixbuf-Versioning.html */, + B3E2F6B020E568A9009EA554 /* right-insensitive.png */, + B3E2F6B120E568A9009EA554 /* composite.png */, + B3E2F6B220E568A9009EA554 /* gdk-pixbuf-gdk-pixbuf-from-drawables.html */, + B3E2F6B320E568A9009EA554 /* home.png */, + B3E2F6B420E568A9009EA554 /* gdk-pixbuf.devhelp2 */, + B3E2F6B520E568A9009EA554 /* gdk-pixbuf-gdk-pixbuf-Xlib-initialization.html */, + B3E2F6B620E568A9009EA554 /* left.png */, + B3E2F6B720E568A9009EA554 /* gdk-pixbuf-Inline-data.html */, + B3E2F6B820E568A9009EA554 /* annotation-glossary.html */, + B3E2F6B920E568A9009EA554 /* gdk-pixbuf-Utilities.html */, + B3E2F6BA20E568A9009EA554 /* gdk-pixbuf-Animations.html */, + B3E2F6BB20E568A9009EA554 /* gdk-pixbuf-query-loaders.html */, + B3E2F6BC20E568A9009EA554 /* style.css */, + B3E2F6BD20E568A9009EA554 /* gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html */, + B3E2F6BE20E568A9009EA554 /* gdk-pixbuf-File-Loading.html */, + B3E2F6BF20E568A9009EA554 /* gdk-pixbuf-Scaling.html */, + B3E2F6C020E568A9009EA554 /* left-insensitive.png */, + B3E2F6C120E568A9009EA554 /* GdkPixbufLoader.html */, + B3E2F6C220E568A9009EA554 /* gdk-pixbuf-Image-Data-in-Memory.html */, + B3E2F6C320E568A9009EA554 /* right.png */, + B3E2F6C420E568A9009EA554 /* rn01.html */, + ); + path = "gdk-pixbuf"; + sourceTree = ""; + }; + B3E2F6C520E568A9009EA554 /* thumbnailers */ = { + isa = PBXGroup; + children = ( + B3E2F6C620E568A9009EA554 /* gdk-pixbuf-thumbnailer.thumbnailer */, + ); + path = thumbnailers; + sourceTree = ""; + }; + B3E2F6C720E568A9009EA554 /* gir-1.0 */ = { + isa = PBXGroup; + children = ( + B3E2F6C820E568A9009EA554 /* GdkPixbuf-2.0.gir */, + ); + path = "gir-1.0"; + sourceTree = ""; + }; + B3E2F6C920E568A9009EA554 /* glib */ = { + isa = PBXGroup; + children = ( + B3E2F6CA20E568A9009EA554 /* 2.56.1 */, + ); + path = glib; + sourceTree = ""; + }; + B3E2F6CA20E568A9009EA554 /* 2.56.1 */ = { + isa = PBXGroup; + children = ( + B3E2F6CB20E568A9009EA554 /* INSTALL_RECEIPT.json */, + B3E2F6CC20E568A9009EA554 /* bin */, + B3E2F6DC20E568A9009EA554 /* .brew */, + B3E2F6DE20E568A9009EA554 /* ChangeLog */, + B3E2F6DF20E568A9009EA554 /* AUTHORS */, + B3E2F6E020E568A9009EA554 /* include */, + B3E2F7EE20E568AB009EA554 /* README */, + B3E2F7EF20E568AB009EA554 /* COPYING */, + B3E2F7F020E568AB009EA554 /* NEWS */, + B3E2F7F120E568AB009EA554 /* lib */, + B3E2F80D20E568AB009EA554 /* share */, + ); + path = 2.56.1; + sourceTree = ""; + }; + B3E2F6CC20E568A9009EA554 /* bin */ = { + isa = PBXGroup; + children = ( + B3E2F6CD20E568A9009EA554 /* gtester */, + B3E2F6CE20E568A9009EA554 /* gdbus-codegen */, + B3E2F6CF20E568A9009EA554 /* gsettings */, + B3E2F6D020E568A9009EA554 /* glib-compile-schemas */, + B3E2F6D120E568A9009EA554 /* gobject-query */, + B3E2F6D220E568A9009EA554 /* gio-querymodules */, + B3E2F6D320E568A9009EA554 /* gapplication */, + B3E2F6D420E568A9009EA554 /* glib-compile-resources */, + B3E2F6D520E568A9009EA554 /* gresource */, + B3E2F6D620E568A9009EA554 /* gtester-report */, + B3E2F6D720E568A9009EA554 /* glib-gettextize */, + B3E2F6D820E568A9009EA554 /* gdbus */, + B3E2F6D920E568A9009EA554 /* glib-genmarshal */, + B3E2F6DA20E568A9009EA554 /* glib-mkenums */, + B3E2F6DB20E568A9009EA554 /* gio */, + ); + path = bin; + sourceTree = ""; + }; + B3E2F6DC20E568A9009EA554 /* .brew */ = { + isa = PBXGroup; + children = ( + B3E2F6DD20E568A9009EA554 /* glib.rb */, + ); + path = .brew; + sourceTree = ""; + }; + B3E2F6E020E568A9009EA554 /* include */ = { + isa = PBXGroup; + children = ( + B3E2F6E120E568A9009EA554 /* gio-unix-2.0 */, + B3E2F6ED20E568A9009EA554 /* glib-2.0 */, + ); + path = include; + sourceTree = ""; + }; + B3E2F6E120E568A9009EA554 /* gio-unix-2.0 */ = { + isa = PBXGroup; + children = ( + B3E2F6E220E568A9009EA554 /* gio */, + ); + path = "gio-unix-2.0"; + sourceTree = ""; + }; + B3E2F6E220E568A9009EA554 /* gio */ = { + isa = PBXGroup; + children = ( + B3E2F6E320E568A9009EA554 /* gunixfdlist.h */, + B3E2F6E420E568A9009EA554 /* gunixsocketaddress.h */, + B3E2F6E520E568A9009EA554 /* gdesktopappinfo.h */, + B3E2F6E620E568A9009EA554 /* gunixconnection.h */, + B3E2F6E720E568A9009EA554 /* gunixoutputstream.h */, + B3E2F6E820E568A9009EA554 /* gunixcredentialsmessage.h */, + B3E2F6E920E568A9009EA554 /* gunixinputstream.h */, + B3E2F6EA20E568A9009EA554 /* gunixmounts.h */, + B3E2F6EB20E568A9009EA554 /* gunixfdmessage.h */, + B3E2F6EC20E568A9009EA554 /* gfiledescriptorbased.h */, + ); + path = gio; + sourceTree = ""; + }; + B3E2F6ED20E568A9009EA554 /* glib-2.0 */ = { + isa = PBXGroup; + children = ( + B3E2F6EE20E568A9009EA554 /* glib-object.h */, + B3E2F6EF20E568A9009EA554 /* gobject */, + B3E2F70420E568AA009EA554 /* glib-unix.h */, + B3E2F70520E568AA009EA554 /* glib.h */, + B3E2F70620E568AA009EA554 /* glib */, + B3E2F75820E568AA009EA554 /* gmodule.h */, + B3E2F75920E568AA009EA554 /* gio */, + ); + path = "glib-2.0"; + sourceTree = ""; + }; + B3E2F6EF20E568A9009EA554 /* gobject */ = { + isa = PBXGroup; + children = ( + B3E2F6F020E568A9009EA554 /* gparam.h */, + B3E2F6F120E568A9009EA554 /* gparamspecs.h */, + B3E2F6F220E568A9009EA554 /* gsignal.h */, + B3E2F6F320E568A9009EA554 /* genums.h */, + B3E2F6F420E568A9009EA554 /* gclosure.h */, + B3E2F6F520E568A9009EA554 /* gvaluearray.h */, + B3E2F6F620E568A9009EA554 /* gbinding.h */, + B3E2F6F720E568A9009EA554 /* gtypeplugin.h */, + B3E2F6F920E568A9009EA554 /* gsourceclosure.h */, + B3E2F6FA20E568A9009EA554 /* glib-types.h */, + B3E2F6FB20E568A9009EA554 /* gtype.h */, + B3E2F6FC20E568A9009EA554 /* gvaluetypes.h */, + B3E2F6FD20E568A9009EA554 /* gboxed.h */, + B3E2F6FE20E568A9009EA554 /* gtypemodule.h */, + B3E2F6FF20E568A9009EA554 /* gvalue.h */, + B3E2F70020E568AA009EA554 /* gvaluecollector.h */, + B3E2F70120E568AA009EA554 /* gobject-autocleanups.h */, + B3E2F70220E568AA009EA554 /* gobject.h */, + B3E2F70320E568AA009EA554 /* gmarshal.h */, + ); + path = gobject; + sourceTree = ""; + }; + B3E2F70620E568AA009EA554 /* glib */ = { + isa = PBXGroup; + children = ( + B3E2F70720E568AA009EA554 /* gmarkup.h */, + B3E2F70820E568AA009EA554 /* ghmac.h */, + B3E2F70920E568AA009EA554 /* gtimer.h */, + B3E2F70A20E568AA009EA554 /* gvariant.h */, + B3E2F70B20E568AA009EA554 /* glist.h */, + B3E2F70C20E568AA009EA554 /* gtrashstack.h */, + B3E2F70D20E568AA009EA554 /* gbookmarkfile.h */, + B3E2F70E20E568AA009EA554 /* gprimes.h */, + B3E2F70F20E568AA009EA554 /* grand.h */, + B3E2F71020E568AA009EA554 /* gurifuncs.h */, + B3E2F71120E568AA009EA554 /* gchecksum.h */, + B3E2F71220E568AA009EA554 /* gtestutils.h */, + B3E2F71320E568AA009EA554 /* gslist.h */, + B3E2F71420E568AA009EA554 /* gthreadpool.h */, + B3E2F71520E568AA009EA554 /* garray.h */, + B3E2F71620E568AA009EA554 /* gbytes.h */, + B3E2F71720E568AA009EA554 /* gconvert.h */, + B3E2F71820E568AA009EA554 /* gdir.h */, + B3E2F71920E568AA009EA554 /* gkeyfile.h */, + B3E2F71A20E568AA009EA554 /* gstrfuncs.h */, + B3E2F71B20E568AA009EA554 /* gmappedfile.h */, + B3E2F71C20E568AA009EA554 /* gstdio.h */, + B3E2F71D20E568AA009EA554 /* gpoll.h */, + B3E2F71E20E568AA009EA554 /* gunicode.h */, + B3E2F71F20E568AA009EA554 /* gdataset.h */, + B3E2F72020E568AA009EA554 /* gqueue.h */, + B3E2F72120E568AA009EA554 /* gsequence.h */, + B3E2F72220E568AA009EA554 /* gvarianttype.h */, + B3E2F72320E568AA009EA554 /* ghash.h */, + B3E2F72420E568AA009EA554 /* gqsort.h */, + B3E2F72520E568AA009EA554 /* gscanner.h */, + B3E2F72620E568AA009EA554 /* ggettext.h */, + B3E2F72720E568AA009EA554 /* gbase64.h */, + B3E2F72820E568AA009EA554 /* gasyncqueue.h */, + B3E2F72920E568AA009EA554 /* gmem.h */, + B3E2F72A20E568AA009EA554 /* genviron.h */, + B3E2F72B20E568AA009EA554 /* gshell.h */, + B3E2F72C20E568AA009EA554 /* gbacktrace.h */, + B3E2F72D20E568AA009EA554 /* gerror.h */, + B3E2F72E20E568AA009EA554 /* gmain.h */, + B3E2F72F20E568AA009EA554 /* gfileutils.h */, + B3E2F73020E568AA009EA554 /* gutils.h */, + B3E2F73120E568AA009EA554 /* gpattern.h */, + B3E2F73220E568AA009EA554 /* ghostutils.h */, + B3E2F73320E568AA009EA554 /* gtypes.h */, + B3E2F73420E568AA009EA554 /* gstringchunk.h */, + B3E2F73520E568AA009EA554 /* guuid.h */, + B3E2F73620E568AA009EA554 /* gcharset.h */, + B3E2F73720E568AA009EA554 /* gquark.h */, + B3E2F73820E568AA009EA554 /* gi18n-lib.h */, + B3E2F73920E568AA009EA554 /* gatomic.h */, + B3E2F73A20E568AA009EA554 /* gdatetime.h */, + B3E2F73B20E568AA009EA554 /* gstring.h */, + B3E2F73C20E568AA009EA554 /* goption.h */, + B3E2F73D20E568AA009EA554 /* gdate.h */, + B3E2F73E20E568AA009EA554 /* gversion.h */, + B3E2F73F20E568AA009EA554 /* gslice.h */, + B3E2F74020E568AA009EA554 /* ghook.h */, + B3E2F74120E568AA009EA554 /* glib-autocleanups.h */, + B3E2F74220E568AA009EA554 /* galloca.h */, + B3E2F74320E568AA009EA554 /* gprintf.h */, + B3E2F74420E568AA009EA554 /* gthread.h */, + B3E2F74520E568AA009EA554 /* gversionmacros.h */, + B3E2F74620E568AA009EA554 /* gtimezone.h */, + B3E2F74720E568AA009EA554 /* gmacros.h */, + B3E2F74820E568AA009EA554 /* giochannel.h */, + B3E2F74920E568AA009EA554 /* gwin32.h */, + B3E2F74A20E568AA009EA554 /* gi18n.h */, + B3E2F74B20E568AA009EA554 /* gbitlock.h */, + B3E2F74C20E568AA009EA554 /* gnode.h */, + B3E2F74D20E568AA009EA554 /* gmessages.h */, + B3E2F74E20E568AA009EA554 /* gregex.h */, + B3E2F74F20E568AA009EA554 /* gspawn.h */, + B3E2F75020E568AA009EA554 /* gtree.h */, + B3E2F75120E568AA009EA554 /* deprecated */, + ); + path = glib; + sourceTree = ""; + }; + B3E2F75120E568AA009EA554 /* deprecated */ = { + isa = PBXGroup; + children = ( + B3E2F75220E568AA009EA554 /* gcompletion.h */, + B3E2F75320E568AA009EA554 /* gallocator.h */, + B3E2F75420E568AA009EA554 /* grel.h */, + B3E2F75520E568AA009EA554 /* gmain.h */, + B3E2F75620E568AA009EA554 /* gcache.h */, + B3E2F75720E568AA009EA554 /* gthread.h */, + ); + path = deprecated; + sourceTree = ""; + }; + B3E2F75920E568AA009EA554 /* gio */ = { + isa = PBXGroup; + children = ( + B3E2F75A20E568AA009EA554 /* gdbusobject.h */, + B3E2F75B20E568AA009EA554 /* gsimpleproxyresolver.h */, + B3E2F75C20E568AA009EA554 /* gconverterinputstream.h */, + B3E2F75D20E568AA009EA554 /* gsubprocesslauncher.h */, + B3E2F75E20E568AA009EA554 /* gsimpleactiongroup.h */, + B3E2F75F20E568AA009EA554 /* gdbusaddress.h */, + B3E2F76020E568AA009EA554 /* gtlsinteraction.h */, + B3E2F76120E568AA009EA554 /* gthreadedsocketservice.h */, + B3E2F76220E568AA009EA554 /* gsocketservice.h */, + B3E2F76320E568AA009EA554 /* gnetworkaddress.h */, + B3E2F76420E568AA009EA554 /* gasyncresult.h */, + B3E2F76520E568AA009EA554 /* gproxy.h */, + B3E2F76620E568AA009EA554 /* gio.h */, + B3E2F76720E568AA009EA554 /* gmemoryoutputstream.h */, + B3E2F76820E568AA009EA554 /* gvolumemonitor.h */, + B3E2F76920E568AA009EA554 /* gdatagrambased.h */, + B3E2F76A20E568AA009EA554 /* gcontenttype.h */, + B3E2F76B20E568AA009EA554 /* gsocketcontrolmessage.h */, + B3E2F76C20E568AA009EA554 /* gdbusnameowning.h */, + B3E2F76D20E568AA009EA554 /* gfilemonitor.h */, + B3E2F76E20E568AA009EA554 /* gpollableoutputstream.h */, + B3E2F76F20E568AA009EA554 /* gseekable.h */, + B3E2F77020E568AA009EA554 /* gdbusobjectproxy.h */, + B3E2F77120E568AA009EA554 /* gpropertyaction.h */, + B3E2F77220E568AA009EA554 /* gsimpleiostream.h */, + B3E2F77320E568AA009EA554 /* gasyncinitable.h */, + B3E2F77420E568AA009EA554 /* gremoteactiongroup.h */, + B3E2F77520E568AA009EA554 /* gdbusmessage.h */, + B3E2F77620E568AA009EA554 /* gmenu.h */, + B3E2F77720E568AA009EA554 /* gdbusinterface.h */, + B3E2F77820E568AA009EA554 /* gaction.h */, + B3E2F77920E568AA009EA554 /* gio-autocleanups.h */, + B3E2F77A20E568AA009EA554 /* gproxyaddress.h */, + B3E2F77B20E568AA009EA554 /* gdbusproxy.h */, + B3E2F77C20E568AA009EA554 /* giomodule.h */, + B3E2F77D20E568AA009EA554 /* gdbusmethodinvocation.h */, + B3E2F77E20E568AA009EA554 /* gactionmap.h */, + B3E2F77F20E568AA009EA554 /* gbufferedinputstream.h */, + B3E2F78020E568AA009EA554 /* gdbusnamewatching.h */, + B3E2F78120E568AA009EA554 /* gzlibcompressor.h */, + B3E2F78220E568AA009EA554 /* gloadableicon.h */, + B3E2F78320E568AA009EA554 /* gpermission.h */, + B3E2F78420E568AA009EA554 /* gioenums.h */, + B3E2F78520E568AA009EA554 /* gsocketaddressenumerator.h */, + B3E2F78620E568AA009EA554 /* gmount.h */, + B3E2F78720E568AA009EA554 /* gdbusserver.h */, + B3E2F78820E568AA009EA554 /* gresource.h */, + B3E2F78920E568AA009EA554 /* gdbusconnection.h */, + B3E2F78A20E568AA009EA554 /* gtlsconnection.h */, + B3E2F78B20E568AA009EA554 /* gsettingsbackend.h */, + B3E2F78C20E568AA009EA554 /* gdbusintrospection.h */, + B3E2F78D20E568AA009EA554 /* gfileicon.h */, + B3E2F78E20E568AA009EA554 /* gsocketaddress.h */, + B3E2F78F20E568AA009EA554 /* gnetworkservice.h */, + B3E2F79020E568AA009EA554 /* gdbusmenumodel.h */, + B3E2F79120E568AA009EA554 /* gmenumodel.h */, + B3E2F79220E568AA009EA554 /* gdtlsconnection.h */, + B3E2F79320E568AA009EA554 /* gresolver.h */, + B3E2F79420E568AA009EA554 /* gproxyaddressenumerator.h */, + B3E2F79520E568AA009EA554 /* ginputstream.h */, + B3E2F79620E568AA009EA554 /* gproxyresolver.h */, + B3E2F79720E568AA009EA554 /* gemblem.h */, + B3E2F79820E568AA009EA554 /* gcredentials.h */, + B3E2F79920E568AA009EA554 /* gbytesicon.h */, + B3E2F79A20E568AA009EA554 /* gdbusobjectmanagerclient.h */, + B3E2F79B20E568AA009EA554 /* gdbusobjectmanagerserver.h */, + B3E2F79C20E568AA009EA554 /* gtask.h */, + B3E2F79D20E568AA009EA554 /* gvolume.h */, + B3E2F79E20E568AA009EA554 /* gsocketclient.h */, + B3E2F79F20E568AA009EA554 /* gappinfo.h */, + B3E2F7A020E568AA009EA554 /* gtcpconnection.h */, + B3E2F7A120E568AA009EA554 /* gpollableutils.h */, + B3E2F7A220E568AA009EA554 /* gdataoutputstream.h */, + B3E2F7A320E568AA009EA554 /* gfilenamecompleter.h */, + B3E2F7A420E568AA009EA554 /* gfilteroutputstream.h */, + B3E2F7A520E568AA009EA554 /* gfileattribute.h */, + B3E2F7A620E568AA009EA554 /* gmenuexporter.h */, + B3E2F7A720E568AA009EA554 /* gthemedicon.h */, + B3E2F7A820E568AA009EA554 /* gapplication.h */, + B3E2F7A920E568AA009EA554 /* gtlsserverconnection.h */, + B3E2F7AA20E568AA009EA554 /* gfileoutputstream.h */, + B3E2F7AB20E568AA009EA554 /* gdbusobjectmanager.h */, + B3E2F7AC20E568AA009EA554 /* gactiongroupexporter.h */, + B3E2F7AD20E568AA009EA554 /* gdtlsclientconnection.h */, + B3E2F7AE20E568AA009EA554 /* gmemoryinputstream.h */, + B3E2F7AF20E568AA009EA554 /* gioenumtypes.h */, + B3E2F7B020E568AB009EA554 /* gbufferedoutputstream.h */, + B3E2F7B120E568AB009EA554 /* gliststore.h */, + B3E2F7B220E568AB009EA554 /* gsocket.h */, + B3E2F7B320E568AB009EA554 /* gmountoperation.h */, + B3E2F7B420E568AB009EA554 /* gsocketconnectable.h */, + B3E2F7B520E568AB009EA554 /* ginetaddress.h */, + B3E2F7B620E568AB009EA554 /* gtcpwrapperconnection.h */, + B3E2F7B720E568AB009EA554 /* gfileiostream.h */, + B3E2F7B820E568AB009EA554 /* gdbusauthobserver.h */, + B3E2F7B920E568AB009EA554 /* gnotification.h */, + B3E2F7BA20E568AB009EA554 /* goutputstream.h */, + B3E2F7BB20E568AB009EA554 /* ginetsocketaddress.h */, + B3E2F7BC20E568AB009EA554 /* gcharsetconverter.h */, + B3E2F7BD20E568AB009EA554 /* gdatainputstream.h */, + B3E2F7BE20E568AB009EA554 /* gtlsdatabase.h */, + B3E2F7BF20E568AB009EA554 /* gfileenumerator.h */, + B3E2F7C020E568AB009EA554 /* ginitable.h */, + B3E2F7C120E568AB009EA554 /* gnativevolumemonitor.h */, + B3E2F7C220E568AB009EA554 /* gsrvtarget.h */, + B3E2F7C320E568AB009EA554 /* gtlscertificate.h */, + B3E2F7C420E568AB009EA554 /* gfile.h */, + B3E2F7C520E568AB009EA554 /* gtlsbackend.h */, + B3E2F7C620E568AB009EA554 /* gpollableinputstream.h */, + B3E2F7C720E568AB009EA554 /* gfilterinputstream.h */, + B3E2F7C820E568AB009EA554 /* gzlibdecompressor.h */, + B3E2F7C920E568AB009EA554 /* gdbusutils.h */, + B3E2F7CA20E568AB009EA554 /* gtestdbus.h */, + B3E2F7CB20E568AB009EA554 /* gdbusobjectskeleton.h */, + B3E2F7CC20E568AB009EA554 /* gvfs.h */, + B3E2F7CD20E568AB009EA554 /* gioerror.h */, + B3E2F7CE20E568AB009EA554 /* gtlsclientconnection.h */, + B3E2F7CF20E568AB009EA554 /* gnetworking.h */, + B3E2F7D020E568AB009EA554 /* gtlsfiledatabase.h */, + B3E2F7D120E568AB009EA554 /* gdbuserror.h */, + B3E2F7D220E568AB009EA554 /* gicon.h */, + B3E2F7D320E568AB009EA554 /* gdbusinterfaceskeleton.h */, + B3E2F7D420E568AB009EA554 /* gapplicationcommandline.h */, + B3E2F7D520E568AB009EA554 /* gconverter.h */, + B3E2F7D620E568AB009EA554 /* gdtlsserverconnection.h */, + B3E2F7D720E568AB009EA554 /* gnetworkmonitor.h */, + B3E2F7D820E568AB009EA554 /* gtlspassword.h */, + B3E2F7D920E568AB009EA554 /* glistmodel.h */, + B3E2F7DA20E568AB009EA554 /* gioscheduler.h */, + B3E2F7DB20E568AB009EA554 /* gsettings.h */, + B3E2F7DC20E568AB009EA554 /* gfileinputstream.h */, + B3E2F7DD20E568AB009EA554 /* giotypes.h */, + B3E2F7DE20E568AB009EA554 /* gsimplepermission.h */, + B3E2F7DF20E568AB009EA554 /* gconverteroutputstream.h */, + B3E2F7E020E568AB009EA554 /* gsimpleaction.h */, + B3E2F7E120E568AB009EA554 /* gsocketlistener.h */, + B3E2F7E220E568AB009EA554 /* gcancellable.h */, + B3E2F7E320E568AB009EA554 /* gsubprocess.h */, + B3E2F7E420E568AB009EA554 /* gemblemedicon.h */, + B3E2F7E520E568AB009EA554 /* gsettingsschema.h */, + B3E2F7E620E568AB009EA554 /* gfileinfo.h */, + B3E2F7E720E568AB009EA554 /* gsimpleasyncresult.h */, + B3E2F7E820E568AB009EA554 /* gdbusactiongroup.h */, + B3E2F7E920E568AB009EA554 /* gdrive.h */, + B3E2F7EA20E568AB009EA554 /* gactiongroup.h */, + B3E2F7EB20E568AB009EA554 /* ginetaddressmask.h */, + B3E2F7EC20E568AB009EA554 /* gsocketconnection.h */, + B3E2F7ED20E568AB009EA554 /* giostream.h */, + ); + path = gio; + sourceTree = ""; + }; + B3E2F7F120E568AB009EA554 /* lib */ = { + isa = PBXGroup; + children = ( + B3E2F7F220E568AB009EA554 /* libgmodule-2.0.dylib */, + B3E2F7F320E568AB009EA554 /* libgmodule-2.0.a */, + B3E2F7F420E568AB009EA554 /* libgthread-2.0.dylib */, + B3E2F7F520E568AB009EA554 /* libgobject-2.0.a */, + B3E2F7F620E568AB009EA554 /* pkgconfig */, + B3E2F7FF20E568AB009EA554 /* libgobject-2.0.dylib */, + B3E2F80020E568AB009EA554 /* libglib-2.0.0.dylib */, + B3E2F80120E568AB009EA554 /* libgio-2.0.dylib */, + B3E2F80220E568AB009EA554 /* libglib-2.0.dylib */, + B3E2F80320E568AB009EA554 /* libgobject-2.0.0.dylib */, + B3E2F80420E568AB009EA554 /* libglib-2.0.a */, + B3E2F80520E568AB009EA554 /* libgmodule-2.0.0.dylib */, + B3E2F80620E568AB009EA554 /* libgio-2.0.a */, + B3E2F80720E568AB009EA554 /* libgthread-2.0.a */, + B3E2F80820E568AB009EA554 /* libgthread-2.0.0.dylib */, + B3E2F80920E568AB009EA554 /* glib-2.0 */, + B3E2F80C20E568AB009EA554 /* libgio-2.0.0.dylib */, + ); + path = lib; + sourceTree = ""; + }; + B3E2F7F620E568AB009EA554 /* pkgconfig */ = { + isa = PBXGroup; + children = ( + B3E2F7F720E568AB009EA554 /* gio-2.0.pc */, + B3E2F7F820E568AB009EA554 /* gio-unix-2.0.pc */, + B3E2F7F920E568AB009EA554 /* gobject-2.0.pc */, + B3E2F7FA20E568AB009EA554 /* glib-2.0.pc */, + B3E2F7FB20E568AB009EA554 /* gmodule-export-2.0.pc */, + B3E2F7FC20E568AB009EA554 /* gthread-2.0.pc */, + B3E2F7FD20E568AB009EA554 /* gmodule-no-export-2.0.pc */, + B3E2F7FE20E568AB009EA554 /* gmodule-2.0.pc */, + ); + path = pkgconfig; + sourceTree = ""; + }; + B3E2F80920E568AB009EA554 /* glib-2.0 */ = { + isa = PBXGroup; + children = ( + B3E2F80A20E568AB009EA554 /* include */, + ); + path = "glib-2.0"; + sourceTree = ""; + }; + B3E2F80A20E568AB009EA554 /* include */ = { + isa = PBXGroup; + children = ( + B3E2F80B20E568AB009EA554 /* glibconfig.h */, + ); + path = include; + sourceTree = ""; + }; + B3E2F80D20E568AB009EA554 /* share */ = { + isa = PBXGroup; + children = ( + B3E2F80E20E568AB009EA554 /* aclocal */, + B3E2F81220E568AB009EA554 /* gdb */, + B3E2F81C20E568AB009EA554 /* locale */, + B3E2F94320E568AD009EA554 /* gettext */, + B3E2F94720E568AD009EA554 /* glib-2.0 */, + B3E2F95B20E568AD009EA554 /* bash-completion */, + ); + path = share; + sourceTree = ""; + }; + B3E2F80E20E568AB009EA554 /* aclocal */ = { + isa = PBXGroup; + children = ( + B3E2F80F20E568AB009EA554 /* gsettings.m4 */, + B3E2F81020E568AB009EA554 /* glib-2.0.m4 */, + B3E2F81120E568AB009EA554 /* glib-gettext.m4 */, + ); + path = aclocal; + sourceTree = ""; + }; + B3E2F81220E568AB009EA554 /* gdb */ = { + isa = PBXGroup; + children = ( + B3E2F81320E568AB009EA554 /* auto-load */, + ); + path = gdb; + sourceTree = ""; + }; + B3E2F81320E568AB009EA554 /* auto-load */ = { + isa = PBXGroup; + children = ( + B3E2F81420E568AB009EA554 /* usr */, + ); + path = "auto-load"; + sourceTree = ""; + }; + B3E2F81420E568AB009EA554 /* usr */ = { + isa = PBXGroup; + children = ( + B3E2F81520E568AB009EA554 /* local */, + ); + path = usr; + sourceTree = ""; + }; + B3E2F81520E568AB009EA554 /* local */ = { + isa = PBXGroup; + children = ( + B3E2F81620E568AB009EA554 /* Cellar */, + ); + path = local; + sourceTree = ""; + }; + B3E2F81620E568AB009EA554 /* Cellar */ = { + isa = PBXGroup; + children = ( + B3E2F81720E568AB009EA554 /* glib */, + ); + path = Cellar; + sourceTree = ""; + }; + B3E2F81720E568AB009EA554 /* glib */ = { + isa = PBXGroup; + children = ( + B3E2F81820E568AB009EA554 /* 2.56.1 */, + ); + path = glib; + sourceTree = ""; + }; + B3E2F81820E568AB009EA554 /* 2.56.1 */ = { + isa = PBXGroup; + children = ( + B3E2F81920E568AB009EA554 /* lib */, + ); + path = 2.56.1; + sourceTree = ""; + }; + B3E2F81920E568AB009EA554 /* lib */ = { + isa = PBXGroup; + children = ( + ); + path = lib; + sourceTree = ""; + }; + B3E2F81C20E568AB009EA554 /* locale */ = { + isa = PBXGroup; + children = ( + B3E2F81D20E568AB009EA554 /* sl */, + B3E2F82020E568AB009EA554 /* sk */, + B3E2F82320E568AB009EA554 /* mai */, + B3E2F82620E568AB009EA554 /* ug */, + B3E2F82920E568AB009EA554 /* pl */, + B3E2F82C20E568AB009EA554 /* vi */, + B3E2F82F20E568AB009EA554 /* sq */, + B3E2F83220E568AB009EA554 /* sv */, + B3E2F83520E568AB009EA554 /* zh_HK */, + B3E2F83820E568AB009EA554 /* ga */, + B3E2F83B20E568AB009EA554 /* he */, + B3E2F83E20E568AB009EA554 /* ms */, + B3E2F84120E568AB009EA554 /* hy */, + B3E2F84420E568AB009EA554 /* am */, + B3E2F84720E568AC009EA554 /* nn */, + B3E2F84A20E568AC009EA554 /* be */, + B3E2F84D20E568AC009EA554 /* da */, + B3E2F85020E568AC009EA554 /* mr */, + B3E2F85320E568AC009EA554 /* kk */, + B3E2F85620E568AC009EA554 /* gu */, + B3E2F85920E568AC009EA554 /* dz */, + B3E2F85C20E568AC009EA554 /* mg */, + B3E2F85F20E568AC009EA554 /* mn */, + B3E2F86220E568AC009EA554 /* pt_BR */, + B3E2F86520E568AC009EA554 /* ja */, + B3E2F86820E568AC009EA554 /* el */, + B3E2F86B20E568AC009EA554 /* lv */, + B3E2F86E20E568AC009EA554 /* oc */, + B3E2F87120E568AC009EA554 /* bn_IN */, + B3E2F87420E568AC009EA554 /* it */, + B3E2F87720E568AC009EA554 /* ca */, + B3E2F87A20E568AC009EA554 /* zh_TW */, + B3E2F87D20E568AC009EA554 /* is */, + B3E2F88020E568AC009EA554 /* cs */, + B3E2F88320E568AC009EA554 /* en_CA */, + B3E2F88620E568AC009EA554 /* te */, + B3E2F88920E568AC009EA554 /* fur */, + B3E2F88C20E568AC009EA554 /* en@shaw */, + B3E2F88F20E568AC009EA554 /* ru */, + B3E2F89220E568AC009EA554 /* tl */, + B3E2F89520E568AC009EA554 /* sr@ije */, + B3E2F89820E568AC009EA554 /* xh */, + B3E2F89B20E568AC009EA554 /* ro */, + B3E2F89E20E568AC009EA554 /* zh_CN */, + B3E2F8A120E568AC009EA554 /* yi */, + B3E2F8A420E568AC009EA554 /* pt */, + B3E2F8A720E568AC009EA554 /* ps */, + B3E2F8AA20E568AC009EA554 /* uk */, + B3E2F8AD20E568AC009EA554 /* sr */, + B3E2F8B020E568AC009EA554 /* be@latin */, + B3E2F8B320E568AC009EA554 /* sr@latin */, + B3E2F8B620E568AC009EA554 /* pa */, + B3E2F8B920E568AC009EA554 /* en_GB */, + B3E2F8BC20E568AC009EA554 /* si */, + B3E2F8BF20E568AC009EA554 /* ml */, + B3E2F8C220E568AC009EA554 /* ku */, + B3E2F8C520E568AC009EA554 /* mk */, + B3E2F8C820E568AC009EA554 /* an */, + B3E2F8CB20E568AC009EA554 /* kn */, + B3E2F8CE20E568AC009EA554 /* bs */, + B3E2F8D120E568AC009EA554 /* ar */, + B3E2F8D420E568AC009EA554 /* gl */, + B3E2F8D720E568AC009EA554 /* hr */, + B3E2F8DA20E568AC009EA554 /* hu */, + B3E2F8DD20E568AC009EA554 /* nl */, + B3E2F8E020E568AC009EA554 /* bg */, + B3E2F8E320E568AC009EA554 /* bn */, + B3E2F8E620E568AC009EA554 /* ne */, + B3E2F8E920E568AC009EA554 /* ast */, + B3E2F8EC20E568AD009EA554 /* af */, + B3E2F8EF20E568AD009EA554 /* nb */, + B3E2F8F220E568AD009EA554 /* hi */, + B3E2F8F520E568AD009EA554 /* ka */, + B3E2F8F820E568AD009EA554 /* de */, + B3E2F8FB20E568AD009EA554 /* as */, + B3E2F8FE20E568AD009EA554 /* az */, + B3E2F90120E568AD009EA554 /* gd */, + B3E2F90420E568AD009EA554 /* ko */, + B3E2F90720E568AD009EA554 /* ca@valencia */, + B3E2F90A20E568AD009EA554 /* fi */, + B3E2F90D20E568AD009EA554 /* eo */, + B3E2F91020E568AD009EA554 /* id */, + B3E2F91320E568AD009EA554 /* fr */, + B3E2F91620E568AD009EA554 /* es */, + B3E2F91920E568AD009EA554 /* et */, + B3E2F91C20E568AD009EA554 /* fa */, + B3E2F91F20E568AD009EA554 /* lt */, + B3E2F92220E568AD009EA554 /* or */, + B3E2F92520E568AD009EA554 /* cy */, + B3E2F92820E568AD009EA554 /* nds */, + B3E2F92B20E568AD009EA554 /* eu */, + B3E2F92E20E568AD009EA554 /* tt */, + B3E2F93120E568AD009EA554 /* ta */, + B3E2F93420E568AD009EA554 /* th */, + B3E2F93720E568AD009EA554 /* tr */, + B3E2F93A20E568AD009EA554 /* wa */, + B3E2F93D20E568AD009EA554 /* rw */, + B3E2F94020E568AD009EA554 /* tg */, + ); + path = locale; + sourceTree = ""; + }; + B3E2F81D20E568AB009EA554 /* sl */ = { + isa = PBXGroup; + children = ( + B3E2F81E20E568AB009EA554 /* LC_MESSAGES */, + ); + path = sl; + sourceTree = ""; + }; + B3E2F81E20E568AB009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F81F20E568AB009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F82020E568AB009EA554 /* sk */ = { + isa = PBXGroup; + children = ( + B3E2F82120E568AB009EA554 /* LC_MESSAGES */, + ); + path = sk; + sourceTree = ""; + }; + B3E2F82120E568AB009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F82220E568AB009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F82320E568AB009EA554 /* mai */ = { + isa = PBXGroup; + children = ( + B3E2F82420E568AB009EA554 /* LC_MESSAGES */, + ); + path = mai; + sourceTree = ""; + }; + B3E2F82420E568AB009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F82520E568AB009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F82620E568AB009EA554 /* ug */ = { + isa = PBXGroup; + children = ( + B3E2F82720E568AB009EA554 /* LC_MESSAGES */, + ); + path = ug; + sourceTree = ""; + }; + B3E2F82720E568AB009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F82820E568AB009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F82920E568AB009EA554 /* pl */ = { + isa = PBXGroup; + children = ( + B3E2F82A20E568AB009EA554 /* LC_MESSAGES */, + ); + path = pl; + sourceTree = ""; + }; + B3E2F82A20E568AB009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F82B20E568AB009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F82C20E568AB009EA554 /* vi */ = { + isa = PBXGroup; + children = ( + B3E2F82D20E568AB009EA554 /* LC_MESSAGES */, + ); + path = vi; + sourceTree = ""; + }; + B3E2F82D20E568AB009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F82E20E568AB009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F82F20E568AB009EA554 /* sq */ = { + isa = PBXGroup; + children = ( + B3E2F83020E568AB009EA554 /* LC_MESSAGES */, + ); + path = sq; + sourceTree = ""; + }; + B3E2F83020E568AB009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F83120E568AB009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F83220E568AB009EA554 /* sv */ = { + isa = PBXGroup; + children = ( + B3E2F83320E568AB009EA554 /* LC_MESSAGES */, + ); + path = sv; + sourceTree = ""; + }; + B3E2F83320E568AB009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F83420E568AB009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F83520E568AB009EA554 /* zh_HK */ = { + isa = PBXGroup; + children = ( + B3E2F83620E568AB009EA554 /* LC_MESSAGES */, + ); + path = zh_HK; + sourceTree = ""; + }; + B3E2F83620E568AB009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F83720E568AB009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F83820E568AB009EA554 /* ga */ = { + isa = PBXGroup; + children = ( + B3E2F83920E568AB009EA554 /* LC_MESSAGES */, + ); + path = ga; + sourceTree = ""; + }; + B3E2F83920E568AB009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F83A20E568AB009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F83B20E568AB009EA554 /* he */ = { + isa = PBXGroup; + children = ( + B3E2F83C20E568AB009EA554 /* LC_MESSAGES */, + ); + path = he; + sourceTree = ""; + }; + B3E2F83C20E568AB009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F83D20E568AB009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F83E20E568AB009EA554 /* ms */ = { + isa = PBXGroup; + children = ( + B3E2F83F20E568AB009EA554 /* LC_MESSAGES */, + ); + path = ms; + sourceTree = ""; + }; + B3E2F83F20E568AB009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F84020E568AB009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F84120E568AB009EA554 /* hy */ = { + isa = PBXGroup; + children = ( + B3E2F84220E568AB009EA554 /* LC_MESSAGES */, + ); + path = hy; + sourceTree = ""; + }; + B3E2F84220E568AB009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F84320E568AB009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F84420E568AB009EA554 /* am */ = { + isa = PBXGroup; + children = ( + B3E2F84520E568AB009EA554 /* LC_MESSAGES */, + ); + path = am; + sourceTree = ""; + }; + B3E2F84520E568AB009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F84620E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F84720E568AC009EA554 /* nn */ = { + isa = PBXGroup; + children = ( + B3E2F84820E568AC009EA554 /* LC_MESSAGES */, + ); + path = nn; + sourceTree = ""; + }; + B3E2F84820E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F84920E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F84A20E568AC009EA554 /* be */ = { + isa = PBXGroup; + children = ( + B3E2F84B20E568AC009EA554 /* LC_MESSAGES */, + ); + path = be; + sourceTree = ""; + }; + B3E2F84B20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F84C20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F84D20E568AC009EA554 /* da */ = { + isa = PBXGroup; + children = ( + B3E2F84E20E568AC009EA554 /* LC_MESSAGES */, + ); + path = da; + sourceTree = ""; + }; + B3E2F84E20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F84F20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F85020E568AC009EA554 /* mr */ = { + isa = PBXGroup; + children = ( + B3E2F85120E568AC009EA554 /* LC_MESSAGES */, + ); + path = mr; + sourceTree = ""; + }; + B3E2F85120E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F85220E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F85320E568AC009EA554 /* kk */ = { + isa = PBXGroup; + children = ( + B3E2F85420E568AC009EA554 /* LC_MESSAGES */, + ); + path = kk; + sourceTree = ""; + }; + B3E2F85420E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F85520E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F85620E568AC009EA554 /* gu */ = { + isa = PBXGroup; + children = ( + B3E2F85720E568AC009EA554 /* LC_MESSAGES */, + ); + path = gu; + sourceTree = ""; + }; + B3E2F85720E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F85820E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F85920E568AC009EA554 /* dz */ = { + isa = PBXGroup; + children = ( + B3E2F85A20E568AC009EA554 /* LC_MESSAGES */, + ); + path = dz; + sourceTree = ""; + }; + B3E2F85A20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F85B20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F85C20E568AC009EA554 /* mg */ = { + isa = PBXGroup; + children = ( + B3E2F85D20E568AC009EA554 /* LC_MESSAGES */, + ); + path = mg; + sourceTree = ""; + }; + B3E2F85D20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F85E20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F85F20E568AC009EA554 /* mn */ = { + isa = PBXGroup; + children = ( + B3E2F86020E568AC009EA554 /* LC_MESSAGES */, + ); + path = mn; + sourceTree = ""; + }; + B3E2F86020E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F86120E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F86220E568AC009EA554 /* pt_BR */ = { + isa = PBXGroup; + children = ( + B3E2F86320E568AC009EA554 /* LC_MESSAGES */, + ); + path = pt_BR; + sourceTree = ""; + }; + B3E2F86320E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F86420E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F86520E568AC009EA554 /* ja */ = { + isa = PBXGroup; + children = ( + B3E2F86620E568AC009EA554 /* LC_MESSAGES */, + ); + path = ja; + sourceTree = ""; + }; + B3E2F86620E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F86720E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F86820E568AC009EA554 /* el */ = { + isa = PBXGroup; + children = ( + B3E2F86920E568AC009EA554 /* LC_MESSAGES */, + ); + path = el; + sourceTree = ""; + }; + B3E2F86920E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F86A20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F86B20E568AC009EA554 /* lv */ = { + isa = PBXGroup; + children = ( + B3E2F86C20E568AC009EA554 /* LC_MESSAGES */, + ); + path = lv; + sourceTree = ""; + }; + B3E2F86C20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F86D20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F86E20E568AC009EA554 /* oc */ = { + isa = PBXGroup; + children = ( + B3E2F86F20E568AC009EA554 /* LC_MESSAGES */, + ); + path = oc; + sourceTree = ""; + }; + B3E2F86F20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F87020E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F87120E568AC009EA554 /* bn_IN */ = { + isa = PBXGroup; + children = ( + B3E2F87220E568AC009EA554 /* LC_MESSAGES */, + ); + path = bn_IN; + sourceTree = ""; + }; + B3E2F87220E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F87320E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F87420E568AC009EA554 /* it */ = { + isa = PBXGroup; + children = ( + B3E2F87520E568AC009EA554 /* LC_MESSAGES */, + ); + path = it; + sourceTree = ""; + }; + B3E2F87520E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F87620E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F87720E568AC009EA554 /* ca */ = { + isa = PBXGroup; + children = ( + B3E2F87820E568AC009EA554 /* LC_MESSAGES */, + ); + path = ca; + sourceTree = ""; + }; + B3E2F87820E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F87920E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F87A20E568AC009EA554 /* zh_TW */ = { + isa = PBXGroup; + children = ( + B3E2F87B20E568AC009EA554 /* LC_MESSAGES */, + ); + path = zh_TW; + sourceTree = ""; + }; + B3E2F87B20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F87C20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F87D20E568AC009EA554 /* is */ = { + isa = PBXGroup; + children = ( + B3E2F87E20E568AC009EA554 /* LC_MESSAGES */, + ); + path = is; + sourceTree = ""; + }; + B3E2F87E20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F87F20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F88020E568AC009EA554 /* cs */ = { + isa = PBXGroup; + children = ( + B3E2F88120E568AC009EA554 /* LC_MESSAGES */, + ); + path = cs; + sourceTree = ""; + }; + B3E2F88120E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F88220E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F88320E568AC009EA554 /* en_CA */ = { + isa = PBXGroup; + children = ( + B3E2F88420E568AC009EA554 /* LC_MESSAGES */, + ); + path = en_CA; + sourceTree = ""; + }; + B3E2F88420E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F88520E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F88620E568AC009EA554 /* te */ = { + isa = PBXGroup; + children = ( + B3E2F88720E568AC009EA554 /* LC_MESSAGES */, + ); + path = te; + sourceTree = ""; + }; + B3E2F88720E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F88820E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F88920E568AC009EA554 /* fur */ = { + isa = PBXGroup; + children = ( + B3E2F88A20E568AC009EA554 /* LC_MESSAGES */, + ); + path = fur; + sourceTree = ""; + }; + B3E2F88A20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F88B20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F88C20E568AC009EA554 /* en@shaw */ = { + isa = PBXGroup; + children = ( + B3E2F88D20E568AC009EA554 /* LC_MESSAGES */, + ); + path = "en@shaw"; + sourceTree = ""; + }; + B3E2F88D20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F88E20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F88F20E568AC009EA554 /* ru */ = { + isa = PBXGroup; + children = ( + B3E2F89020E568AC009EA554 /* LC_MESSAGES */, + ); + path = ru; + sourceTree = ""; + }; + B3E2F89020E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F89120E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F89220E568AC009EA554 /* tl */ = { + isa = PBXGroup; + children = ( + B3E2F89320E568AC009EA554 /* LC_MESSAGES */, + ); + path = tl; + sourceTree = ""; + }; + B3E2F89320E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F89420E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F89520E568AC009EA554 /* sr@ije */ = { + isa = PBXGroup; + children = ( + B3E2F89620E568AC009EA554 /* LC_MESSAGES */, + ); + path = "sr@ije"; + sourceTree = ""; + }; + B3E2F89620E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F89720E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F89820E568AC009EA554 /* xh */ = { + isa = PBXGroup; + children = ( + B3E2F89920E568AC009EA554 /* LC_MESSAGES */, + ); + path = xh; + sourceTree = ""; + }; + B3E2F89920E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F89A20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F89B20E568AC009EA554 /* ro */ = { + isa = PBXGroup; + children = ( + B3E2F89C20E568AC009EA554 /* LC_MESSAGES */, + ); + path = ro; + sourceTree = ""; + }; + B3E2F89C20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F89D20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F89E20E568AC009EA554 /* zh_CN */ = { + isa = PBXGroup; + children = ( + B3E2F89F20E568AC009EA554 /* LC_MESSAGES */, + ); + path = zh_CN; + sourceTree = ""; + }; + B3E2F89F20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8A020E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8A120E568AC009EA554 /* yi */ = { + isa = PBXGroup; + children = ( + B3E2F8A220E568AC009EA554 /* LC_MESSAGES */, + ); + path = yi; + sourceTree = ""; + }; + B3E2F8A220E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8A320E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8A420E568AC009EA554 /* pt */ = { + isa = PBXGroup; + children = ( + B3E2F8A520E568AC009EA554 /* LC_MESSAGES */, + ); + path = pt; + sourceTree = ""; + }; + B3E2F8A520E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8A620E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8A720E568AC009EA554 /* ps */ = { + isa = PBXGroup; + children = ( + B3E2F8A820E568AC009EA554 /* LC_MESSAGES */, + ); + path = ps; + sourceTree = ""; + }; + B3E2F8A820E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8A920E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8AA20E568AC009EA554 /* uk */ = { + isa = PBXGroup; + children = ( + B3E2F8AB20E568AC009EA554 /* LC_MESSAGES */, + ); + path = uk; + sourceTree = ""; + }; + B3E2F8AB20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8AC20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8AD20E568AC009EA554 /* sr */ = { + isa = PBXGroup; + children = ( + B3E2F8AE20E568AC009EA554 /* LC_MESSAGES */, + ); + path = sr; + sourceTree = ""; + }; + B3E2F8AE20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8AF20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8B020E568AC009EA554 /* be@latin */ = { + isa = PBXGroup; + children = ( + B3E2F8B120E568AC009EA554 /* LC_MESSAGES */, + ); + path = "be@latin"; + sourceTree = ""; + }; + B3E2F8B120E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8B220E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8B320E568AC009EA554 /* sr@latin */ = { + isa = PBXGroup; + children = ( + B3E2F8B420E568AC009EA554 /* LC_MESSAGES */, + ); + path = "sr@latin"; + sourceTree = ""; + }; + B3E2F8B420E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8B520E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8B620E568AC009EA554 /* pa */ = { + isa = PBXGroup; + children = ( + B3E2F8B720E568AC009EA554 /* LC_MESSAGES */, + ); + path = pa; + sourceTree = ""; + }; + B3E2F8B720E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8B820E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8B920E568AC009EA554 /* en_GB */ = { + isa = PBXGroup; + children = ( + B3E2F8BA20E568AC009EA554 /* LC_MESSAGES */, + ); + path = en_GB; + sourceTree = ""; + }; + B3E2F8BA20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8BB20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8BC20E568AC009EA554 /* si */ = { + isa = PBXGroup; + children = ( + B3E2F8BD20E568AC009EA554 /* LC_MESSAGES */, + ); + path = si; + sourceTree = ""; + }; + B3E2F8BD20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8BE20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8BF20E568AC009EA554 /* ml */ = { + isa = PBXGroup; + children = ( + B3E2F8C020E568AC009EA554 /* LC_MESSAGES */, + ); + path = ml; + sourceTree = ""; + }; + B3E2F8C020E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8C120E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8C220E568AC009EA554 /* ku */ = { + isa = PBXGroup; + children = ( + B3E2F8C320E568AC009EA554 /* LC_MESSAGES */, + ); + path = ku; + sourceTree = ""; + }; + B3E2F8C320E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8C420E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8C520E568AC009EA554 /* mk */ = { + isa = PBXGroup; + children = ( + B3E2F8C620E568AC009EA554 /* LC_MESSAGES */, + ); + path = mk; + sourceTree = ""; + }; + B3E2F8C620E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8C720E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8C820E568AC009EA554 /* an */ = { + isa = PBXGroup; + children = ( + B3E2F8C920E568AC009EA554 /* LC_MESSAGES */, + ); + path = an; + sourceTree = ""; + }; + B3E2F8C920E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8CA20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8CB20E568AC009EA554 /* kn */ = { + isa = PBXGroup; + children = ( + B3E2F8CC20E568AC009EA554 /* LC_MESSAGES */, + ); + path = kn; + sourceTree = ""; + }; + B3E2F8CC20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8CD20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8CE20E568AC009EA554 /* bs */ = { + isa = PBXGroup; + children = ( + B3E2F8CF20E568AC009EA554 /* LC_MESSAGES */, + ); + path = bs; + sourceTree = ""; + }; + B3E2F8CF20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8D020E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8D120E568AC009EA554 /* ar */ = { + isa = PBXGroup; + children = ( + B3E2F8D220E568AC009EA554 /* LC_MESSAGES */, + ); + path = ar; + sourceTree = ""; + }; + B3E2F8D220E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8D320E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8D420E568AC009EA554 /* gl */ = { + isa = PBXGroup; + children = ( + B3E2F8D520E568AC009EA554 /* LC_MESSAGES */, + ); + path = gl; + sourceTree = ""; + }; + B3E2F8D520E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8D620E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8D720E568AC009EA554 /* hr */ = { + isa = PBXGroup; + children = ( + B3E2F8D820E568AC009EA554 /* LC_MESSAGES */, + ); + path = hr; + sourceTree = ""; + }; + B3E2F8D820E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8D920E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8DA20E568AC009EA554 /* hu */ = { + isa = PBXGroup; + children = ( + B3E2F8DB20E568AC009EA554 /* LC_MESSAGES */, + ); + path = hu; + sourceTree = ""; + }; + B3E2F8DB20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8DC20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8DD20E568AC009EA554 /* nl */ = { + isa = PBXGroup; + children = ( + B3E2F8DE20E568AC009EA554 /* LC_MESSAGES */, + ); + path = nl; + sourceTree = ""; + }; + B3E2F8DE20E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8DF20E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8E020E568AC009EA554 /* bg */ = { + isa = PBXGroup; + children = ( + B3E2F8E120E568AC009EA554 /* LC_MESSAGES */, + ); + path = bg; + sourceTree = ""; + }; + B3E2F8E120E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8E220E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8E320E568AC009EA554 /* bn */ = { + isa = PBXGroup; + children = ( + B3E2F8E420E568AC009EA554 /* LC_MESSAGES */, + ); + path = bn; + sourceTree = ""; + }; + B3E2F8E420E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8E520E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8E620E568AC009EA554 /* ne */ = { + isa = PBXGroup; + children = ( + B3E2F8E720E568AC009EA554 /* LC_MESSAGES */, + ); + path = ne; + sourceTree = ""; + }; + B3E2F8E720E568AC009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8E820E568AC009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8E920E568AC009EA554 /* ast */ = { + isa = PBXGroup; + children = ( + B3E2F8EA20E568AD009EA554 /* LC_MESSAGES */, + ); + path = ast; + sourceTree = ""; + }; + B3E2F8EA20E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8EB20E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8EC20E568AD009EA554 /* af */ = { + isa = PBXGroup; + children = ( + B3E2F8ED20E568AD009EA554 /* LC_MESSAGES */, + ); + path = af; + sourceTree = ""; + }; + B3E2F8ED20E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8EE20E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8EF20E568AD009EA554 /* nb */ = { + isa = PBXGroup; + children = ( + B3E2F8F020E568AD009EA554 /* LC_MESSAGES */, + ); + path = nb; + sourceTree = ""; + }; + B3E2F8F020E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8F120E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8F220E568AD009EA554 /* hi */ = { + isa = PBXGroup; + children = ( + B3E2F8F320E568AD009EA554 /* LC_MESSAGES */, + ); + path = hi; + sourceTree = ""; + }; + B3E2F8F320E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8F420E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8F520E568AD009EA554 /* ka */ = { + isa = PBXGroup; + children = ( + B3E2F8F620E568AD009EA554 /* LC_MESSAGES */, + ); + path = ka; + sourceTree = ""; + }; + B3E2F8F620E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8F720E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8F820E568AD009EA554 /* de */ = { + isa = PBXGroup; + children = ( + B3E2F8F920E568AD009EA554 /* LC_MESSAGES */, + ); + path = de; + sourceTree = ""; + }; + B3E2F8F920E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8FA20E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8FB20E568AD009EA554 /* as */ = { + isa = PBXGroup; + children = ( + B3E2F8FC20E568AD009EA554 /* LC_MESSAGES */, + ); + path = as; + sourceTree = ""; + }; + B3E2F8FC20E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F8FD20E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F8FE20E568AD009EA554 /* az */ = { + isa = PBXGroup; + children = ( + B3E2F8FF20E568AD009EA554 /* LC_MESSAGES */, + ); + path = az; + sourceTree = ""; + }; + B3E2F8FF20E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F90020E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F90120E568AD009EA554 /* gd */ = { + isa = PBXGroup; + children = ( + B3E2F90220E568AD009EA554 /* LC_MESSAGES */, + ); + path = gd; + sourceTree = ""; + }; + B3E2F90220E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F90320E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F90420E568AD009EA554 /* ko */ = { + isa = PBXGroup; + children = ( + B3E2F90520E568AD009EA554 /* LC_MESSAGES */, + ); + path = ko; + sourceTree = ""; + }; + B3E2F90520E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F90620E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F90720E568AD009EA554 /* ca@valencia */ = { + isa = PBXGroup; + children = ( + B3E2F90820E568AD009EA554 /* LC_MESSAGES */, + ); + path = "ca@valencia"; + sourceTree = ""; + }; + B3E2F90820E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F90920E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F90A20E568AD009EA554 /* fi */ = { + isa = PBXGroup; + children = ( + B3E2F90B20E568AD009EA554 /* LC_MESSAGES */, + ); + path = fi; + sourceTree = ""; + }; + B3E2F90B20E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F90C20E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F90D20E568AD009EA554 /* eo */ = { + isa = PBXGroup; + children = ( + B3E2F90E20E568AD009EA554 /* LC_MESSAGES */, + ); + path = eo; + sourceTree = ""; + }; + B3E2F90E20E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F90F20E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F91020E568AD009EA554 /* id */ = { + isa = PBXGroup; + children = ( + B3E2F91120E568AD009EA554 /* LC_MESSAGES */, + ); + path = id; + sourceTree = ""; + }; + B3E2F91120E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F91220E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F91320E568AD009EA554 /* fr */ = { + isa = PBXGroup; + children = ( + B3E2F91420E568AD009EA554 /* LC_MESSAGES */, + ); + path = fr; + sourceTree = ""; + }; + B3E2F91420E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F91520E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F91620E568AD009EA554 /* es */ = { + isa = PBXGroup; + children = ( + B3E2F91720E568AD009EA554 /* LC_MESSAGES */, + ); + path = es; + sourceTree = ""; + }; + B3E2F91720E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F91820E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F91920E568AD009EA554 /* et */ = { + isa = PBXGroup; + children = ( + B3E2F91A20E568AD009EA554 /* LC_MESSAGES */, + ); + path = et; + sourceTree = ""; + }; + B3E2F91A20E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F91B20E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F91C20E568AD009EA554 /* fa */ = { + isa = PBXGroup; + children = ( + B3E2F91D20E568AD009EA554 /* LC_MESSAGES */, + ); + path = fa; + sourceTree = ""; + }; + B3E2F91D20E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F91E20E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F91F20E568AD009EA554 /* lt */ = { + isa = PBXGroup; + children = ( + B3E2F92020E568AD009EA554 /* LC_MESSAGES */, + ); + path = lt; + sourceTree = ""; + }; + B3E2F92020E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F92120E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F92220E568AD009EA554 /* or */ = { + isa = PBXGroup; + children = ( + B3E2F92320E568AD009EA554 /* LC_MESSAGES */, + ); + path = or; + sourceTree = ""; + }; + B3E2F92320E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F92420E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F92520E568AD009EA554 /* cy */ = { + isa = PBXGroup; + children = ( + B3E2F92620E568AD009EA554 /* LC_MESSAGES */, + ); + path = cy; + sourceTree = ""; + }; + B3E2F92620E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F92720E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F92820E568AD009EA554 /* nds */ = { + isa = PBXGroup; + children = ( + B3E2F92920E568AD009EA554 /* LC_MESSAGES */, + ); + path = nds; + sourceTree = ""; + }; + B3E2F92920E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F92A20E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F92B20E568AD009EA554 /* eu */ = { + isa = PBXGroup; + children = ( + B3E2F92C20E568AD009EA554 /* LC_MESSAGES */, + ); + path = eu; + sourceTree = ""; + }; + B3E2F92C20E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F92D20E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F92E20E568AD009EA554 /* tt */ = { + isa = PBXGroup; + children = ( + B3E2F92F20E568AD009EA554 /* LC_MESSAGES */, + ); + path = tt; + sourceTree = ""; + }; + B3E2F92F20E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F93020E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F93120E568AD009EA554 /* ta */ = { + isa = PBXGroup; + children = ( + B3E2F93220E568AD009EA554 /* LC_MESSAGES */, + ); + path = ta; + sourceTree = ""; + }; + B3E2F93220E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F93320E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F93420E568AD009EA554 /* th */ = { + isa = PBXGroup; + children = ( + B3E2F93520E568AD009EA554 /* LC_MESSAGES */, + ); + path = th; + sourceTree = ""; + }; + B3E2F93520E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F93620E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F93720E568AD009EA554 /* tr */ = { + isa = PBXGroup; + children = ( + B3E2F93820E568AD009EA554 /* LC_MESSAGES */, + ); + path = tr; + sourceTree = ""; + }; + B3E2F93820E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F93920E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F93A20E568AD009EA554 /* wa */ = { + isa = PBXGroup; + children = ( + B3E2F93B20E568AD009EA554 /* LC_MESSAGES */, + ); + path = wa; + sourceTree = ""; + }; + B3E2F93B20E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F93C20E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F93D20E568AD009EA554 /* rw */ = { + isa = PBXGroup; + children = ( + B3E2F93E20E568AD009EA554 /* LC_MESSAGES */, + ); + path = rw; + sourceTree = ""; + }; + B3E2F93E20E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F93F20E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F94020E568AD009EA554 /* tg */ = { + isa = PBXGroup; + children = ( + B3E2F94120E568AD009EA554 /* LC_MESSAGES */, + ); + path = tg; + sourceTree = ""; + }; + B3E2F94120E568AD009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2F94220E568AD009EA554 /* glib20.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2F94320E568AD009EA554 /* gettext */ = { + isa = PBXGroup; + children = ( + B3E2F94420E568AD009EA554 /* its */, + ); + path = gettext; + sourceTree = ""; + }; + B3E2F94420E568AD009EA554 /* its */ = { + isa = PBXGroup; + children = ( + B3E2F94520E568AD009EA554 /* gschema.its */, + B3E2F94620E568AD009EA554 /* gschema.loc */, + ); + path = its; + sourceTree = ""; + }; + B3E2F94720E568AD009EA554 /* glib-2.0 */ = { + isa = PBXGroup; + children = ( + B3E2F94820E568AD009EA554 /* gdb */, + B3E2F94B20E568AD009EA554 /* codegen */, + B3E2F95420E568AD009EA554 /* schemas */, + B3E2F95620E568AD009EA554 /* gettext */, + B3E2F95920E568AD009EA554 /* valgrind */, + ); + path = "glib-2.0"; + sourceTree = ""; + }; + B3E2F94820E568AD009EA554 /* gdb */ = { + isa = PBXGroup; + children = ( + B3E2F94920E568AD009EA554 /* gobject_gdb.py */, + B3E2F94A20E568AD009EA554 /* glib_gdb.py */, + ); + path = gdb; + sourceTree = ""; + }; + B3E2F94B20E568AD009EA554 /* codegen */ = { + isa = PBXGroup; + children = ( + B3E2F94C20E568AD009EA554 /* config.py */, + B3E2F94D20E568AD009EA554 /* codegen_docbook.py */, + B3E2F94E20E568AD009EA554 /* __init__.py */, + B3E2F94F20E568AD009EA554 /* parser.py */, + B3E2F95020E568AD009EA554 /* utils.py */, + B3E2F95120E568AD009EA554 /* codegen_main.py */, + B3E2F95220E568AD009EA554 /* dbustypes.py */, + B3E2F95320E568AD009EA554 /* codegen.py */, + ); + path = codegen; + sourceTree = ""; + }; + B3E2F95420E568AD009EA554 /* schemas */ = { + isa = PBXGroup; + children = ( + B3E2F95520E568AD009EA554 /* gschema.dtd */, + ); + path = schemas; + sourceTree = ""; + }; + B3E2F95620E568AD009EA554 /* gettext */ = { + isa = PBXGroup; + children = ( + B3E2F95720E568AD009EA554 /* po */, + ); + path = gettext; + sourceTree = ""; + }; + B3E2F95720E568AD009EA554 /* po */ = { + isa = PBXGroup; + children = ( + B3E2F95820E568AD009EA554 /* Makefile.in.in */, + ); + path = po; + sourceTree = ""; + }; + B3E2F95920E568AD009EA554 /* valgrind */ = { + isa = PBXGroup; + children = ( + B3E2F95A20E568AD009EA554 /* glib.supp */, + ); + path = valgrind; + sourceTree = ""; + }; + B3E2F95B20E568AD009EA554 /* bash-completion */ = { + isa = PBXGroup; + children = ( + B3E2F95C20E568AD009EA554 /* completions */, + ); + path = "bash-completion"; + sourceTree = ""; + }; + B3E2F95C20E568AD009EA554 /* completions */ = { + isa = PBXGroup; + children = ( + B3E2F95D20E568AD009EA554 /* gsettings */, + B3E2F95E20E568AD009EA554 /* gapplication */, + B3E2F95F20E568AD009EA554 /* gresource */, + B3E2F96020E568AD009EA554 /* gdbus */, + ); + path = completions; + sourceTree = ""; + }; + B3E2F96120E568AD009EA554 /* cairo */ = { + isa = PBXGroup; + children = ( + B3E2F96220E568AD009EA554 /* 1.14.12 */, + ); + path = cairo; + sourceTree = ""; + }; + B3E2F96220E568AD009EA554 /* 1.14.12 */ = { + isa = PBXGroup; + children = ( + B3E2F96320E568AD009EA554 /* INSTALL_RECEIPT.json */, + B3E2F96420E568AD009EA554 /* bin */, + B3E2F96720E568AD009EA554 /* .brew */, + B3E2F96920E568AD009EA554 /* ChangeLog */, + B3E2F96A20E568AD009EA554 /* AUTHORS */, + B3E2F96B20E568AD009EA554 /* include */, + B3E2F97B20E568AE009EA554 /* README */, + B3E2F97C20E568AE009EA554 /* COPYING */, + B3E2F97D20E568AE009EA554 /* NEWS */, + B3E2F97E20E568AE009EA554 /* lib */, + B3E2F9A020E568AE009EA554 /* share */, + ); + path = 1.14.12; + sourceTree = ""; + }; + B3E2F96420E568AD009EA554 /* bin */ = { + isa = PBXGroup; + children = ( + B3E2F96520E568AD009EA554 /* cairo-trace */, + B3E2F96620E568AD009EA554 /* cairo-sphinx */, + ); + path = bin; + sourceTree = ""; + }; + B3E2F96720E568AD009EA554 /* .brew */ = { + isa = PBXGroup; + children = ( + B3E2F96820E568AD009EA554 /* cairo.rb */, + ); + path = .brew; + sourceTree = ""; + }; + B3E2F96B20E568AD009EA554 /* include */ = { + isa = PBXGroup; + children = ( + B3E2F96C20E568AD009EA554 /* cairo */, + ); + path = include; + sourceTree = ""; + }; + B3E2F96C20E568AD009EA554 /* cairo */ = { + isa = PBXGroup; + children = ( + B3E2F96D20E568AD009EA554 /* cairo-version.h */, + B3E2F96E20E568AD009EA554 /* cairo-script-interpreter.h */, + B3E2F96F20E568AD009EA554 /* cairo-svg.h */, + B3E2F97020E568AD009EA554 /* cairo-quartz-image.h */, + B3E2F97120E568AD009EA554 /* cairo.h */, + B3E2F97220E568AD009EA554 /* cairo-script.h */, + B3E2F97320E568AD009EA554 /* cairo-quartz.h */, + B3E2F97420E568AD009EA554 /* cairo-deprecated.h */, + B3E2F97520E568AD009EA554 /* cairo-pdf.h */, + B3E2F97620E568AD009EA554 /* cairo-features.h */, + B3E2F97720E568AD009EA554 /* cairo-gobject.h */, + B3E2F97820E568AE009EA554 /* cairo-tee.h */, + B3E2F97920E568AE009EA554 /* cairo-ft.h */, + B3E2F97A20E568AE009EA554 /* cairo-ps.h */, + ); + path = cairo; + sourceTree = ""; + }; + B3E2F97E20E568AE009EA554 /* lib */ = { + isa = PBXGroup; + children = ( + B3E2F97F20E568AE009EA554 /* libcairo.a */, + B3E2F98020E568AE009EA554 /* pkgconfig */, + B3E2F98E20E568AE009EA554 /* libcairo.2.dylib */, + B3E2F98F20E568AE009EA554 /* libcairo-gobject.2.dylib */, + B3E2F99020E568AE009EA554 /* libcairo.dylib */, + B3E2F99120E568AE009EA554 /* libcairo-script-interpreter.dylib */, + B3E2F99220E568AE009EA554 /* cairo */, + B3E2F99C20E568AE009EA554 /* libcairo-script-interpreter.2.dylib */, + B3E2F99D20E568AE009EA554 /* libcairo-gobject.dylib */, + B3E2F99E20E568AE009EA554 /* libcairo-gobject.a */, + B3E2F99F20E568AE009EA554 /* libcairo-script-interpreter.a */, + ); + path = lib; + sourceTree = ""; + }; + B3E2F98020E568AE009EA554 /* pkgconfig */ = { + isa = PBXGroup; + children = ( + B3E2F98120E568AE009EA554 /* cairo-ft.pc */, + B3E2F98220E568AE009EA554 /* cairo-quartz-image.pc */, + B3E2F98320E568AE009EA554 /* cairo-tee.pc */, + B3E2F98420E568AE009EA554 /* cairo-gobject.pc */, + B3E2F98520E568AE009EA554 /* cairo-pdf.pc */, + B3E2F98620E568AE009EA554 /* cairo-fc.pc */, + B3E2F98720E568AE009EA554 /* cairo.pc */, + B3E2F98820E568AE009EA554 /* cairo-png.pc */, + B3E2F98920E568AE009EA554 /* cairo-svg.pc */, + B3E2F98A20E568AE009EA554 /* cairo-quartz.pc */, + B3E2F98B20E568AE009EA554 /* cairo-quartz-font.pc */, + B3E2F98C20E568AE009EA554 /* cairo-ps.pc */, + B3E2F98D20E568AE009EA554 /* cairo-script.pc */, + ); + path = pkgconfig; + sourceTree = ""; + }; + B3E2F99220E568AE009EA554 /* cairo */ = { + isa = PBXGroup; + children = ( + B3E2F99320E568AE009EA554 /* cairo-fdr.a */, + B3E2F99420E568AE009EA554 /* cairo-sphinx.a */, + B3E2F99720E568AE009EA554 /* libcairo-trace.a */, + B3E2F99920E568AE009EA554 /* libcairo-trace.0.dylib */, + B3E2F99B20E568AE009EA554 /* libcairo-trace.dylib */, + ); + path = cairo; + sourceTree = ""; + }; + B3E2F9A020E568AE009EA554 /* share */ = { + isa = PBXGroup; + children = ( + B3E2F9A120E568AE009EA554 /* gtk-doc */, + ); + path = share; + sourceTree = ""; + }; + B3E2F9A120E568AE009EA554 /* gtk-doc */ = { + isa = PBXGroup; + children = ( + B3E2F9A220E568AE009EA554 /* html */, + ); + path = "gtk-doc"; + sourceTree = ""; + }; + B3E2F9A220E568AE009EA554 /* html */ = { + isa = PBXGroup; + children = ( + B3E2F9A320E568AE009EA554 /* cairo */, + ); + path = html; + sourceTree = ""; + }; + B3E2F9A320E568AE009EA554 /* cairo */ = { + isa = PBXGroup; + children = ( + B3E2F9A420E568AE009EA554 /* cairo-surfaces.html */, + B3E2F9A520E568AE009EA554 /* cairo-Win32-Fonts.html */, + B3E2F9A620E568AE009EA554 /* cairo-cairo-font-face-t.html */, + B3E2F9A720E568AE009EA554 /* up-insensitive.png */, + B3E2F9A820E568AE009EA554 /* cairo-PNG-Support.html */, + B3E2F9A920E568AE009EA554 /* index.html */, + B3E2F9AA20E568AE009EA554 /* index-1.10.html */, + B3E2F9AB20E568AE009EA554 /* bindings-patterns.html */, + B3E2F9AC20E568AE009EA554 /* cairo-User-Fonts.html */, + B3E2F9AD20E568AE009EA554 /* bindings-return-values.html */, + B3E2F9AE20E568AE009EA554 /* cairo-cairo-surface-t.html */, + B3E2F9AF20E568AE009EA554 /* cairo-Quartz-Surfaces.html */, + B3E2F9B020E568AE009EA554 /* cairo-text.html */, + B3E2F9B120E568AE009EA554 /* up.png */, + B3E2F9B220E568AE009EA554 /* cairo-PDF-Surfaces.html */, + B3E2F9B320E568AE009EA554 /* cairo-Regions.html */, + B3E2F9B420E568AE009EA554 /* cairo-Types.html */, + B3E2F9B520E568AE009EA554 /* bindings-streams.html */, + B3E2F9B620E568AE009EA554 /* cairo-cairo-pattern-t.html */, + B3E2F9B720E568AE009EA554 /* index-all.html */, + B3E2F9B820E568AE009EA554 /* right-insensitive.png */, + B3E2F9B920E568AE009EA554 /* index-1.6.html */, + B3E2F9BA20E568AE009EA554 /* home.png */, + B3E2F9BB20E568AE009EA554 /* cairo-XLib-Surfaces.html */, + B3E2F9BC20E568AE009EA554 /* cairo-support.html */, + B3E2F9BD20E568AE009EA554 /* language-bindings.html */, + B3E2F9BE20E568AE009EA554 /* cairo-Error-handling.html */, + B3E2F9BF20E568AE009EA554 /* cairo-XCB-Surfaces.html */, + B3E2F9C020E568AE009EA554 /* cairo-Script-Surfaces.html */, + B3E2F9C120E568AE009EA554 /* cairo-Paths.html */, + B3E2F9C220E568AE009EA554 /* cairo-XLib-XRender-Backend.html */, + B3E2F9C320E568AE009EA554 /* left.png */, + B3E2F9C420E568AE009EA554 /* cairo-Transformations.html */, + B3E2F9C520E568AE009EA554 /* cairo-Win32-Surfaces.html */, + B3E2F9C620E568AE009EA554 /* cairo-cairo-font-options-t.html */, + B3E2F9C720E568AE009EA554 /* cairo-FreeType-Fonts.html */, + B3E2F9C820E568AE009EA554 /* bindings-errors.html */, + B3E2F9C920E568AE009EA554 /* cairo-Raster-Sources.html */, + B3E2F9CA20E568AE009EA554 /* cairo-drawing.html */, + B3E2F9CB20E568AE009EA554 /* cairo-cairo-device-t.html */, + B3E2F9CC20E568AE009EA554 /* cairo.devhelp2 */, + B3E2F9CD20E568AE009EA554 /* index-1.4.html */, + B3E2F9CE20E568AE009EA554 /* style.css */, + B3E2F9CF20E568AE009EA554 /* index-1.14.html */, + B3E2F9D020E568AE009EA554 /* bindings-fonts.html */, + B3E2F9D120E568AE009EA554 /* index-1.8.html */, + B3E2F9D220E568AE009EA554 /* cairo-Image-Surfaces.html */, + B3E2F9D320E568AE009EA554 /* bindings-overloading.html */, + B3E2F9D420E568AE009EA554 /* cairo-cairo-scaled-font-t.html */, + B3E2F9D520E568AE009EA554 /* cairo-Quartz-(CGFont)-Fonts.html */, + B3E2F9D620E568AE009EA554 /* left-insensitive.png */, + B3E2F9D720E568AE009EA554 /* bindings-path.html */, + B3E2F9D820E568AE009EA554 /* cairo-SVG-Surfaces.html */, + B3E2F9D920E568AE009EA554 /* cairo-fonts.html */, + B3E2F9DA20E568AE009EA554 /* index-1.12.html */, + B3E2F9DB20E568AE009EA554 /* cairo-cairo-t.html */, + B3E2F9DC20E568AE009EA554 /* bindings-surfaces.html */, + B3E2F9DD20E568AE009EA554 /* cairo-Recording-Surfaces.html */, + B3E2F9DE20E568AE009EA554 /* cairo-Version-Information.html */, + B3E2F9DF20E568AE009EA554 /* right.png */, + B3E2F9E020E568AE009EA554 /* cairo-PostScript-Surfaces.html */, + B3E2F9E120E568AE009EA554 /* bindings-memory.html */, + B3E2F9E220E568AE009EA554 /* index-1.2.html */, + B3E2F9E320E568AE009EA554 /* cairo-cairo-matrix-t.html */, + ); + path = cairo; + sourceTree = ""; + }; + B3E2F9E420E568AE009EA554 /* fontconfig */ = { + isa = PBXGroup; + children = ( + B3E2F9E520E568AE009EA554 /* 2.13.0 */, + ); + path = fontconfig; + sourceTree = ""; + }; + B3E2F9E520E568AE009EA554 /* 2.13.0 */ = { + isa = PBXGroup; + children = ( + B3E2F9E620E568AE009EA554 /* INSTALL_RECEIPT.json */, + B3E2F9E720E568AE009EA554 /* bin */, + B3E2F9F120E568AE009EA554 /* .brew */, + B3E2F9F320E568AE009EA554 /* ChangeLog */, + B3E2F9F420E568AE009EA554 /* AUTHORS */, + B3E2F9F520E568AE009EA554 /* include */, + B3E2F9FA20E568AE009EA554 /* README */, + B3E2F9FB20E568AE009EA554 /* COPYING */, + B3E2F9FC20E568AE009EA554 /* NEWS */, + B3E2F9FD20E568AE009EA554 /* lib */, + B3E2FA0320E568AE009EA554 /* .bottle */, + B3E2FA1A20E568AE009EA554 /* share */, + ); + path = 2.13.0; + sourceTree = ""; + }; + B3E2F9E720E568AE009EA554 /* bin */ = { + isa = PBXGroup; + children = ( + B3E2F9E820E568AE009EA554 /* fc-list */, + B3E2F9E920E568AE009EA554 /* fc-pattern */, + B3E2F9EA20E568AE009EA554 /* fc-validate */, + B3E2F9EB20E568AE009EA554 /* fc-query */, + B3E2F9EC20E568AE009EA554 /* fc-cache */, + B3E2F9ED20E568AE009EA554 /* fc-cat */, + B3E2F9EE20E568AE009EA554 /* fc-match */, + B3E2F9EF20E568AE009EA554 /* fc-conflist */, + B3E2F9F020E568AE009EA554 /* fc-scan */, + ); + path = bin; + sourceTree = ""; + }; + B3E2F9F120E568AE009EA554 /* .brew */ = { + isa = PBXGroup; + children = ( + B3E2F9F220E568AE009EA554 /* fontconfig.rb */, + ); + path = .brew; + sourceTree = ""; + }; + B3E2F9F520E568AE009EA554 /* include */ = { + isa = PBXGroup; + children = ( + B3E2F9F620E568AE009EA554 /* fontconfig */, + ); + path = include; + sourceTree = ""; + }; + B3E2F9F620E568AE009EA554 /* fontconfig */ = { + isa = PBXGroup; + children = ( + B3E2F9F720E568AE009EA554 /* fontconfig.h */, + B3E2F9F820E568AE009EA554 /* fcprivate.h */, + B3E2F9F920E568AE009EA554 /* fcfreetype.h */, + ); + path = fontconfig; + sourceTree = ""; + }; + B3E2F9FD20E568AE009EA554 /* lib */ = { + isa = PBXGroup; + children = ( + B3E2F9FE20E568AE009EA554 /* pkgconfig */, + B3E2FA0020E568AE009EA554 /* libfontconfig.dylib */, + B3E2FA0120E568AE009EA554 /* libfontconfig.1.dylib */, + B3E2FA0220E568AE009EA554 /* libfontconfig.a */, + ); + path = lib; + sourceTree = ""; + }; + B3E2F9FE20E568AE009EA554 /* pkgconfig */ = { + isa = PBXGroup; + children = ( + B3E2F9FF20E568AE009EA554 /* fontconfig.pc */, + ); + path = pkgconfig; + sourceTree = ""; + }; + B3E2FA0320E568AE009EA554 /* .bottle */ = { + isa = PBXGroup; + children = ( + B3E2FA0420E568AE009EA554 /* etc */, + ); + path = .bottle; + sourceTree = ""; + }; + B3E2FA0420E568AE009EA554 /* etc */ = { + isa = PBXGroup; + children = ( + B3E2FA0520E568AE009EA554 /* fonts */, + ); + path = etc; + sourceTree = ""; + }; + B3E2FA0520E568AE009EA554 /* fonts */ = { + isa = PBXGroup; + children = ( + B3E2FA0620E568AE009EA554 /* fonts.conf */, + B3E2FA0720E568AE009EA554 /* conf.d */, + ); + path = fonts; + sourceTree = ""; + }; + B3E2FA0720E568AE009EA554 /* conf.d */ = { + isa = PBXGroup; + children = ( + B3E2FA0820E568AE009EA554 /* 65-nonlatin.conf */, + B3E2FA0920E568AE009EA554 /* 30-metric-aliases.conf */, + B3E2FA0A20E568AE009EA554 /* 80-delicious.conf */, + B3E2FA0B20E568AE009EA554 /* 20-unhint-small-vera.conf */, + B3E2FA0C20E568AE009EA554 /* 65-fonts-persian.conf */, + B3E2FA0D20E568AE009EA554 /* 10-hinting-slight.conf */, + B3E2FA0E20E568AE009EA554 /* 51-local.conf */, + B3E2FA0F20E568AE009EA554 /* 45-latin.conf */, + B3E2FA1020E568AE009EA554 /* README */, + B3E2FA1120E568AE009EA554 /* 49-sansserif.conf */, + B3E2FA1220E568AE009EA554 /* 40-nonlatin.conf */, + B3E2FA1320E568AE009EA554 /* 60-latin.conf */, + B3E2FA1420E568AE009EA554 /* 60-generic.conf */, + B3E2FA1520E568AE009EA554 /* 45-generic.conf */, + B3E2FA1620E568AE009EA554 /* 69-unifont.conf */, + B3E2FA1720E568AE009EA554 /* 50-user.conf */, + B3E2FA1820E568AE009EA554 /* 10-scale-bitmap-fonts.conf */, + B3E2FA1920E568AE009EA554 /* 90-synthetic.conf */, + ); + path = conf.d; + sourceTree = ""; + }; + B3E2FA1A20E568AE009EA554 /* share */ = { + isa = PBXGroup; + children = ( + B3E2FA1B20E568AE009EA554 /* man */, + B3E2FAF720E568B0009EA554 /* xml */, + B3E2FAFA20E568B0009EA554 /* fontconfig */, + B3E2FB1E20E568B0009EA554 /* gettext */, + B3E2FB2220E568B0009EA554 /* doc */, + ); + path = share; + sourceTree = ""; + }; + B3E2FA1B20E568AE009EA554 /* man */ = { + isa = PBXGroup; + children = ( + B3E2FA1C20E568AE009EA554 /* man5 */, + B3E2FA1E20E568AE009EA554 /* man3 */, + B3E2FAED20E568B0009EA554 /* man1 */, + ); + path = man; + sourceTree = ""; + }; + B3E2FA1C20E568AE009EA554 /* man5 */ = { + isa = PBXGroup; + children = ( + B3E2FA1D20E568AE009EA554 /* fonts-conf.5 */, + ); + path = man5; + sourceTree = ""; + }; + B3E2FA1E20E568AE009EA554 /* man3 */ = { + isa = PBXGroup; + children = ( + B3E2FA1F20E568AE009EA554 /* FcDefaultSubstitute.3 */, + B3E2FA2020E568AE009EA554 /* FcIsLower.3 */, + B3E2FA2120E568AE009EA554 /* FcStrCmpIgnoreCase.3 */, + B3E2FA2220E568AE009EA554 /* FcLangGetCharSet.3 */, + B3E2FA2320E568AE009EA554 /* FcCharSetSubtractCount.3 */, + B3E2FA2420E568AF009EA554 /* FcDirScan.3 */, + B3E2FA2520E568AF009EA554 /* FcStrStrIgnoreCase.3 */, + B3E2FA2620E568AF009EA554 /* FcPatternAdd-Type.3 */, + B3E2FA2720E568AF009EA554 /* FcLangSetCreate.3 */, + B3E2FA2820E568AF009EA554 /* FcCharSetSubtract.3 */, + B3E2FA2920E568AF009EA554 /* FcCacheCopySet.3 */, + B3E2FA2A20E568AF009EA554 /* FcFreeTypeCharSetAndSpacing.3 */, + B3E2FA2B20E568AF009EA554 /* FcConfigReference.3 */, + B3E2FA2C20E568AF009EA554 /* FcConfigGetBlanks.3 */, + B3E2FA2D20E568AF009EA554 /* FcConfigGetConfigFiles.3 */, + B3E2FA2E20E568AF009EA554 /* FcDirCacheLoadFile.3 */, + B3E2FA2F20E568AF009EA554 /* FcCharSetDestroy.3 */, + B3E2FA3020E568AF009EA554 /* FcNameParse.3 */, + B3E2FA3120E568AF009EA554 /* FcCharSetIntersectCount.3 */, + B3E2FA3220E568AF009EA554 /* FcRangeCreateDouble.3 */, + B3E2FA3320E568AF009EA554 /* FcCacheCreateTagFile.3 */, + B3E2FA3420E568AF009EA554 /* FcMatrixMultiply.3 */, + B3E2FA3520E568AF009EA554 /* FcConfigGetConfigDirs.3 */, + B3E2FA3620E568AF009EA554 /* FcNameUnregisterObjectTypes.3 */, + B3E2FA3720E568AF009EA554 /* FcConfigGetFontDirs.3 */, + B3E2FA3820E568AF009EA554 /* FcCharSetEqual.3 */, + B3E2FA3920E568AF009EA554 /* FcConfigSubstitute.3 */, + B3E2FA3A20E568AF009EA554 /* FcCharSetAddChar.3 */, + B3E2FA3B20E568AF009EA554 /* FcConfigDestroy.3 */, + B3E2FA3C20E568AF009EA554 /* FcFontSetSortDestroy.3 */, + B3E2FA3D20E568AF009EA554 /* FcFini.3 */, + B3E2FA3E20E568AF009EA554 /* FcPatternRemove.3 */, + B3E2FA3F20E568AF009EA554 /* FcDirCacheValid.3 */, + B3E2FA4020E568AF009EA554 /* FcConfigEnableHome.3 */, + B3E2FA4120E568AF009EA554 /* FcFileIsDir.3 */, + B3E2FA4220E568AF009EA554 /* FcGetLangs.3 */, + B3E2FA4320E568AF009EA554 /* FcPatternDuplicate.3 */, + B3E2FA4420E568AF009EA554 /* FcFreeTypeQueryAll.3 */, + B3E2FA4520E568AF009EA554 /* FcCacheNumFont.3 */, + B3E2FA4620E568AF009EA554 /* FcNameRegisterConstants.3 */, + B3E2FA4720E568AF009EA554 /* FcInitLoadConfigAndFonts.3 */, + B3E2FA4820E568AF009EA554 /* FcPatternEqualSubset.3 */, + B3E2FA4920E568AF009EA554 /* FcObjectSetBuild.3 */, + B3E2FA4A20E568AF009EA554 /* FcCharSetHasChar.3 */, + B3E2FA4B20E568AF009EA554 /* FcFontSetList.3 */, + B3E2FA4C20E568AF009EA554 /* FcInitLoadConfig.3 */, + B3E2FA4D20E568AF009EA554 /* FcConfigSetRescanInterval.3 */, + B3E2FA4E20E568AF009EA554 /* FcCacheSubdir.3 */, + B3E2FA4F20E568AF009EA554 /* FcFreeTypeCharSet.3 */, + B3E2FA5020E568AF009EA554 /* FcLangSetUnion.3 */, + B3E2FA5120E568AF009EA554 /* FcPatternGet-Type.3 */, + B3E2FA5220E568AF009EA554 /* FcCharSetCount.3 */, + B3E2FA5320E568AF009EA554 /* FcConfigParseAndLoadFromMemory.3 */, + B3E2FA5420E568AF009EA554 /* FcToLower.3 */, + B3E2FA5520E568AF009EA554 /* FcMatrixEqual.3 */, + B3E2FA5620E568AF009EA554 /* FcConfigAppFontAddFile.3 */, + B3E2FA5720E568AF009EA554 /* FcFontMatch.3 */, + B3E2FA5820E568AF009EA554 /* FcPatternGet.3 */, + B3E2FA5920E568AF009EA554 /* FcMatrixRotate.3 */, + B3E2FA5A20E568AF009EA554 /* FcValueEqual.3 */, + B3E2FA5B20E568AF009EA554 /* FcStrSetDel.3 */, + B3E2FA5C20E568AF009EA554 /* FcStrListNext.3 */, + B3E2FA5D20E568AF009EA554 /* FcAtomicDeleteNew.3 */, + B3E2FA5E20E568AF009EA554 /* FcLangSetDel.3 */, + B3E2FA5F20E568AF009EA554 /* FcStrSetMember.3 */, + B3E2FA6020E568AF009EA554 /* FcPatternBuild.3 */, + B3E2FA6120E568AF009EA554 /* FcCharSetIntersect.3 */, + B3E2FA6220E568AF009EA554 /* FcPatternEqual.3 */, + B3E2FA6320E568AF009EA554 /* FcStrStr.3 */, + B3E2FA6420E568AF009EA554 /* FcStrSetCreate.3 */, + B3E2FA6520E568AF009EA554 /* FcDirCacheLoad.3 */, + B3E2FA6620E568AF009EA554 /* FcStrFree.3 */, + B3E2FA6720E568AF009EA554 /* FcWeightFromOpenTypeDouble.3 */, + B3E2FA6820E568AF009EA554 /* FcMatrixScale.3 */, + B3E2FA6920E568AF009EA554 /* FcFontRenderPrepare.3 */, + B3E2FA6A20E568AF009EA554 /* FcAtomicReplaceOrig.3 */, + B3E2FA6B20E568AF009EA554 /* FcFontSetSort.3 */, + B3E2FA6C20E568AF009EA554 /* FcMatrixShear.3 */, + B3E2FA6D20E568AF009EA554 /* FcWeightToOpenTypeDouble.3 */, + B3E2FA6E20E568AF009EA554 /* FcInitReinitialize.3 */, + B3E2FA6F20E568AF009EA554 /* FcCacheNumSubdir.3 */, + B3E2FA7020E568AF009EA554 /* FcConfigGetCacheDirs.3 */, + B3E2FA7120E568AF009EA554 /* FcPatternReference.3 */, + B3E2FA7220E568AF009EA554 /* FcStrListFirst.3 */, + B3E2FA7320E568AF009EA554 /* FcObjectSetCreate.3 */, + B3E2FA7420E568AF009EA554 /* FcConfigAppFontAddDir.3 */, + B3E2FA7520E568AF009EA554 /* FcAtomicOrigFile.3 */, + B3E2FA7620E568AF009EA554 /* FcCharSetMerge.3 */, + B3E2FA7720E568AF009EA554 /* FcConfigSubstituteWithPat.3 */, + B3E2FA7820E568AF009EA554 /* FcCacheDir.3 */, + B3E2FA7920E568AF009EA554 /* FcAtomicLock.3 */, + B3E2FA7A20E568AF009EA554 /* FcStrDowncase.3 */, + B3E2FA7B20E568AF009EA554 /* FcValueDestroy.3 */, + B3E2FA7C20E568AF009EA554 /* FcPatternDel.3 */, + B3E2FA7D20E568AF009EA554 /* FcNameRegisterObjectTypes.3 */, + B3E2FA7E20E568AF009EA554 /* FcConfigHome.3 */, + B3E2FA7F20E568AF009EA554 /* FcDirCacheUnload.3 */, + B3E2FA8020E568AF009EA554 /* FcIsUpper.3 */, + B3E2FA8120E568AF009EA554 /* FcObjectSetDestroy.3 */, + B3E2FA8220E568AF009EA554 /* FcCharSetDelChar.3 */, + B3E2FA8320E568AF009EA554 /* FcGetVersion.3 */, + B3E2FA8420E568AF009EA554 /* FcLangSetHash.3 */, + B3E2FA8520E568AF009EA554 /* FcAtomicDestroy.3 */, + B3E2FA8620E568AF009EA554 /* FcConfigFilename.3 */, + B3E2FA8720E568AF009EA554 /* FcConfigUptoDate.3 */, + B3E2FA8820E568AF009EA554 /* FcDirCacheRescan.3 */, + B3E2FA8920E568AF009EA554 /* FcUtf16ToUcs4.3 */, + B3E2FA8A20E568AF009EA554 /* FcDirCacheCreateUUID.3 */, + B3E2FA8B20E568AF009EA554 /* FcPatternHash.3 */, + B3E2FA8C20E568AF009EA554 /* FcLangSetGetLangs.3 */, + B3E2FA8D20E568AF009EA554 /* FcLangSetCopy.3 */, + B3E2FA8E20E568AF009EA554 /* FcConfigGetCurrent.3 */, + B3E2FA8F20E568AF009EA554 /* FcLangNormalize.3 */, + B3E2FA9020E568AF009EA554 /* FcStrBasename.3 */, + B3E2FA9120E568AF009EA554 /* FcWeightToOpenType.3 */, + B3E2FA9220E568AF009EA554 /* FcAtomicUnlock.3 */, + B3E2FA9320E568AF009EA554 /* FcPatternCreate.3 */, + B3E2FA9420E568AF009EA554 /* FcPatternFilter.3 */, + B3E2FA9520E568AF009EA554 /* FcRangeDestroy.3 */, + B3E2FA9620E568AF009EA554 /* FcFontSetDestroy.3 */, + B3E2FA9720E568AF009EA554 /* FcStrCopy.3 */, + B3E2FA9820E568AF009EA554 /* FcStrCopyFilename.3 */, + B3E2FA9920E568AF009EA554 /* FcConfigGetCache.3 */, + B3E2FA9A20E568AF009EA554 /* FcFontSort.3 */, + B3E2FA9B20E568AF009EA554 /* FcPatternFormat.3 */, + B3E2FA9C20E568AF009EA554 /* FcConfigGetRescanInterval.3 */, + B3E2FA9D20E568AF009EA554 /* FcCharSetFirstPage.3 */, + B3E2FA9E20E568AF009EA554 /* FcLangSetCompare.3 */, + B3E2FA9F20E568AF009EA554 /* FcNameConstant.3 */, + B3E2FAA020E568AF009EA554 /* FcStrSetDestroy.3 */, + B3E2FAA120E568AF009EA554 /* FcLangSetHasLang.3 */, + B3E2FAA220E568AF009EA554 /* FcDirSave.3 */, + B3E2FAA320E568AF009EA554 /* FcGetDefaultLangs.3 */, + B3E2FAA420E568AF009EA554 /* FcStrListCreate.3 */, + B3E2FAA520E568AF009EA554 /* FcUcs4ToUtf8.3 */, + B3E2FAA620E568AF009EA554 /* FcDirCacheClean.3 */, + B3E2FAA720E568AF009EA554 /* FcNameUnparse.3 */, + B3E2FAA820E568AF009EA554 /* FcCharSetCreate.3 */, + B3E2FAA920E568AF009EA554 /* FcConfigSetSysRoot.3 */, + B3E2FAAA20E568AF009EA554 /* FcCharSetIsSubset.3 */, + B3E2FAAB20E568AF009EA554 /* FcRangeGetDouble.3 */, + B3E2FAAC20E568AF009EA554 /* FcObjectSetAdd.3 */, + B3E2FAAD20E568AF009EA554 /* FcBlanksCreate.3 */, + B3E2FAAE20E568AF009EA554 /* FcLangSetDestroy.3 */, + B3E2FAAF20E568AF009EA554 /* FcNameGetObjectType.3 */, + B3E2FAB020E568AF009EA554 /* FcNameUnregisterConstants.3 */, + B3E2FAB120E568AF009EA554 /* FcPatternGetWithBinding.3 */, + B3E2FAB220E568AF009EA554 /* FcAtomicNewFile.3 */, + B3E2FAB320E568AF009EA554 /* FcConfigParseAndLoad.3 */, + B3E2FAB420E568AF009EA554 /* FcValueSave.3 */, + B3E2FAB520E568AF009EA554 /* FcFontList.3 */, + B3E2FAB620E568AF009EA554 /* FcConfigCreate.3 */, + B3E2FAB720E568AF009EA554 /* FcRangeCreateInteger.3 */, + B3E2FAB820E568AF009EA554 /* FcNameGetConstant.3 */, + B3E2FAB920E568AF009EA554 /* FcFreeTypeCharIndex.3 */, + B3E2FABA20E568AF009EA554 /* FcFontSetAdd.3 */, + B3E2FABB20E568AF009EA554 /* FcStrCmp.3 */, + B3E2FABC20E568AF009EA554 /* FcStrSetAdd.3 */, + B3E2FABD20E568AF009EA554 /* FcFontSetPrint.3 */, + B3E2FABE20E568AF009EA554 /* FcConfigAppFontClear.3 */, + B3E2FABF20E568AF009EA554 /* FcPatternAddWeak.3 */, + B3E2FAC020E568AF009EA554 /* FcCharSetNew.3 */, + B3E2FAC120E568AF009EA554 /* FcStrSetAddFilename.3 */, + B3E2FAC220E568B0009EA554 /* FcConfigFileInfoIterInit.3 */, + B3E2FAC320E568B0009EA554 /* FcWeightFromOpenType.3 */, + B3E2FAC420E568B0009EA554 /* FcUtf16Len.3 */, + B3E2FAC520E568B0009EA554 /* FcValuePrint.3 */, + B3E2FAC620E568B0009EA554 /* FcConfigFileInfoIterNext.3 */, + B3E2FAC720E568B0009EA554 /* FcConfigFileInfoIterGet.3 */, + B3E2FAC820E568B0009EA554 /* FcLangSetSubtract.3 */, + B3E2FAC920E568B0009EA554 /* FcUtf8Len.3 */, + B3E2FACA20E568B0009EA554 /* FcBlanksIsMember.3 */, + B3E2FACB20E568B0009EA554 /* FcBlanksDestroy.3 */, + B3E2FACC20E568B0009EA554 /* FcUtf8ToUcs4.3 */, + B3E2FACD20E568B0009EA554 /* FcPatternDestroy.3 */, + B3E2FACE20E568B0009EA554 /* FcLangSetAdd.3 */, + B3E2FACF20E568B0009EA554 /* FcPatternPrint.3 */, + B3E2FAD020E568B0009EA554 /* FcConfigGetSysRoot.3 */, + B3E2FAD120E568B0009EA554 /* FcFontSetCreate.3 */, + B3E2FAD220E568B0009EA554 /* FcMatrixCopy.3 */, + B3E2FAD320E568B0009EA554 /* FcInit.3 */, + B3E2FAD420E568B0009EA554 /* FcInitBringUptoDate.3 */, + B3E2FAD520E568B0009EA554 /* FcLangSetContains.3 */, + B3E2FAD620E568B0009EA554 /* FcDirCacheUnlink.3 */, + B3E2FAD720E568B0009EA554 /* FcCharSetUnion.3 */, + B3E2FAD820E568B0009EA554 /* FcRangeCopy.3 */, + B3E2FAD920E568B0009EA554 /* FcConfigBuildFonts.3 */, + B3E2FADA20E568B0009EA554 /* FcFreeTypeQueryFace.3 */, + B3E2FADB20E568B0009EA554 /* FcStrListDone.3 */, + B3E2FADC20E568B0009EA554 /* FcCharSetCoverage.3 */, + B3E2FADD20E568B0009EA554 /* FcFontSetMatch.3 */, + B3E2FADE20E568B0009EA554 /* FcBlanksAdd.3 */, + B3E2FADF20E568B0009EA554 /* FcStrDirname.3 */, + B3E2FAE020E568B0009EA554 /* FcPatternAdd.3 */, + B3E2FAE120E568B0009EA554 /* FcStrPlus.3 */, + B3E2FAE220E568B0009EA554 /* FcStrSetEqual.3 */, + B3E2FAE320E568B0009EA554 /* FcFreeTypeQuery.3 */, + B3E2FAE420E568B0009EA554 /* FcFileScan.3 */, + B3E2FAE520E568B0009EA554 /* FcAtomicCreate.3 */, + B3E2FAE620E568B0009EA554 /* FcConfigSetCurrent.3 */, + B3E2FAE720E568B0009EA554 /* FcLangSetEqual.3 */, + B3E2FAE820E568B0009EA554 /* FcCharSetNextPage.3 */, + B3E2FAE920E568B0009EA554 /* FcCharSetCopy.3 */, + B3E2FAEA20E568B0009EA554 /* FcConfigGetFonts.3 */, + B3E2FAEB20E568B0009EA554 /* FcMatrixInit.3 */, + B3E2FAEC20E568B0009EA554 /* FcDirCacheRead.3 */, + ); + path = man3; + sourceTree = ""; + }; + B3E2FAED20E568B0009EA554 /* man1 */ = { + isa = PBXGroup; + children = ( + B3E2FAEE20E568B0009EA554 /* fc-validate.1 */, + B3E2FAEF20E568B0009EA554 /* fc-scan.1 */, + B3E2FAF020E568B0009EA554 /* fc-cat.1 */, + B3E2FAF120E568B0009EA554 /* fc-list.1 */, + B3E2FAF220E568B0009EA554 /* fc-match.1 */, + B3E2FAF320E568B0009EA554 /* fc-cache.1 */, + B3E2FAF420E568B0009EA554 /* fc-pattern.1 */, + B3E2FAF520E568B0009EA554 /* fc-query.1 */, + B3E2FAF620E568B0009EA554 /* fc-conflist.1 */, + ); + path = man1; + sourceTree = ""; + }; + B3E2FAF720E568B0009EA554 /* xml */ = { + isa = PBXGroup; + children = ( + B3E2FAF820E568B0009EA554 /* fontconfig */, + ); + path = xml; + sourceTree = ""; + }; + B3E2FAF820E568B0009EA554 /* fontconfig */ = { + isa = PBXGroup; + children = ( + B3E2FAF920E568B0009EA554 /* fonts.dtd */, + ); + path = fontconfig; + sourceTree = ""; + }; + B3E2FAFA20E568B0009EA554 /* fontconfig */ = { + isa = PBXGroup; + children = ( + B3E2FAFB20E568B0009EA554 /* conf.avail */, + ); + path = fontconfig; + sourceTree = ""; + }; + B3E2FAFB20E568B0009EA554 /* conf.avail */ = { + isa = PBXGroup; + children = ( + B3E2FAFC20E568B0009EA554 /* 65-khmer.conf */, + B3E2FAFD20E568B0009EA554 /* 65-nonlatin.conf */, + B3E2FAFE20E568B0009EA554 /* 10-hinting-medium.conf */, + B3E2FAFF20E568B0009EA554 /* 30-metric-aliases.conf */, + B3E2FB0020E568B0009EA554 /* 10-sub-pixel-vbgr.conf */, + B3E2FB0120E568B0009EA554 /* 10-unhinted.conf */, + B3E2FB0220E568B0009EA554 /* 11-lcdfilter-default.conf */, + B3E2FB0320E568B0009EA554 /* 80-delicious.conf */, + B3E2FB0420E568B0009EA554 /* 20-unhint-small-vera.conf */, + B3E2FB0520E568B0009EA554 /* 10-hinting-full.conf */, + B3E2FB0620E568B0009EA554 /* 65-fonts-persian.conf */, + B3E2FB0720E568B0009EA554 /* 10-no-sub-pixel.conf */, + B3E2FB0820E568B0009EA554 /* 10-hinting-slight.conf */, + B3E2FB0920E568B0009EA554 /* 51-local.conf */, + B3E2FB0A20E568B0009EA554 /* 45-latin.conf */, + B3E2FB0B20E568B0009EA554 /* 10-sub-pixel-rgb.conf */, + B3E2FB0C20E568B0009EA554 /* 10-autohint.conf */, + B3E2FB0D20E568B0009EA554 /* 49-sansserif.conf */, + B3E2FB0E20E568B0009EA554 /* 40-nonlatin.conf */, + B3E2FB0F20E568B0009EA554 /* 70-no-bitmaps.conf */, + B3E2FB1020E568B0009EA554 /* 60-latin.conf */, + B3E2FB1120E568B0009EA554 /* 25-unhint-nonlatin.conf */, + B3E2FB1220E568B0009EA554 /* 60-generic.conf */, + B3E2FB1320E568B0009EA554 /* 45-generic.conf */, + B3E2FB1420E568B0009EA554 /* 11-lcdfilter-legacy.conf */, + B3E2FB1520E568B0009EA554 /* 10-sub-pixel-bgr.conf */, + B3E2FB1620E568B0009EA554 /* 70-yes-bitmaps.conf */, + B3E2FB1720E568B0009EA554 /* 69-unifont.conf */, + B3E2FB1820E568B0009EA554 /* 50-user.conf */, + B3E2FB1920E568B0009EA554 /* 10-scale-bitmap-fonts.conf */, + B3E2FB1A20E568B0009EA554 /* 90-synthetic.conf */, + B3E2FB1B20E568B0009EA554 /* 10-hinting-none.conf */, + B3E2FB1C20E568B0009EA554 /* 10-sub-pixel-vrgb.conf */, + B3E2FB1D20E568B0009EA554 /* 11-lcdfilter-light.conf */, + ); + path = conf.avail; + sourceTree = ""; + }; + B3E2FB1E20E568B0009EA554 /* gettext */ = { + isa = PBXGroup; + children = ( + B3E2FB1F20E568B0009EA554 /* its */, + ); + path = gettext; + sourceTree = ""; + }; + B3E2FB1F20E568B0009EA554 /* its */ = { + isa = PBXGroup; + children = ( + B3E2FB2020E568B0009EA554 /* fontconfig.loc */, + B3E2FB2120E568B0009EA554 /* fontconfig.its */, + ); + path = its; + sourceTree = ""; + }; + B3E2FB2220E568B0009EA554 /* doc */ = { + isa = PBXGroup; + children = ( + B3E2FB2320E568B0009EA554 /* fontconfig */, + ); + path = doc; + sourceTree = ""; + }; + B3E2FB2320E568B0009EA554 /* fontconfig */ = { + isa = PBXGroup; + children = ( + B3E2FB2420E568B0009EA554 /* fontconfig-user.txt */, + B3E2FB2520E568B0009EA554 /* fontconfig-devel.pdf */, + B3E2FB2620E568B0009EA554 /* fontconfig-devel */, + B3E2FBFA20E568B1009EA554 /* fontconfig-devel.txt */, + B3E2FBFB20E568B1009EA554 /* fontconfig-user.pdf */, + B3E2FBFC20E568B1009EA554 /* fontconfig-user.html */, + ); + path = fontconfig; + sourceTree = ""; + }; + B3E2FB2620E568B0009EA554 /* fontconfig-devel */ = { + isa = PBXGroup; + children = ( + B3E2FB2720E568B0009EA554 /* fcpatternget.html */, + B3E2FB2820E568B0009EA554 /* fcfini.html */, + B3E2FB2920E568B0009EA554 /* fcconfiggetsysroot.html */, + B3E2FB2A20E568B0009EA554 /* fcstrlistfirst.html */, + B3E2FB2B20E568B0009EA554 /* fcpatternreference.html */, + B3E2FB2C20E568B0009EA554 /* fcutf16len.html */, + B3E2FB2D20E568B0009EA554 /* fcfreetypecharindex.html */, + B3E2FB2E20E568B0009EA554 /* fcutf16toucs4.html */, + B3E2FB2F20E568B0009EA554 /* fcconfiggetcache.html */, + B3E2FB3020E568B0009EA554 /* fccharsetfirstpage.html */, + B3E2FB3120E568B0009EA554 /* fcobjectsetbuild.html */, + B3E2FB3220E568B0009EA554 /* fcstrfree.html */, + B3E2FB3320E568B0009EA554 /* fcconfigbuildfonts.html */, + B3E2FB3420E568B0009EA554 /* fccharsetunion.html */, + B3E2FB3520E568B0009EA554 /* fcconfighome.html */, + B3E2FB3620E568B0009EA554 /* fclangsetcreate.html */, + B3E2FB3720E568B0009EA554 /* fclangsetgetlangs.html */, + B3E2FB3820E568B0009EA554 /* fcucs4toutf8.html */, + B3E2FB3920E568B0009EA554 /* fcconfigparseandloadfrommemory.html */, + B3E2FB3A20E568B0009EA554 /* fcdircacheloadfile.html */, + B3E2FB3B20E568B0009EA554 /* fccachenumfont.html */, + B3E2FB3C20E568B0009EA554 /* fcweightfromopentypedouble.html */, + B3E2FB3D20E568B0009EA554 /* fcnamegetobjecttype.html */, + B3E2FB3E20E568B0009EA554 /* fcvalueequal.html */, + B3E2FB3F20E568B0009EA554 /* fclangsetdel.html */, + B3E2FB4020E568B0009EA554 /* fcconfigenablehome.html */, + B3E2FB4120E568B0009EA554 /* fcconfiggetconfigfiles.html */, + B3E2FB4220E568B0009EA554 /* fcutf8toucs4.html */, + B3E2FB4320E568B0009EA554 /* fccharsetnew.html */, + B3E2FB4420E568B0009EA554 /* fcnameregisterobjecttypes.html */, + B3E2FB4520E568B0009EA554 /* fcconfigparseandload.html */, + B3E2FB4620E568B0009EA554 /* fcstrsetcreate.html */, + B3E2FB4720E568B0009EA554 /* fccharsetcoverage.html */, + B3E2FB4820E568B0009EA554 /* fccachesubdir.html */, + B3E2FB4920E568B0009EA554 /* fcpatternprint.html */, + B3E2FB4A20E568B0009EA554 /* fcfontsetprint.html */, + B3E2FB4B20E568B0009EA554 /* fcconfiggetfontdirs.html */, + B3E2FB4C20E568B0009EA554 /* fcmatrixequal.html */, + B3E2FB4D20E568B0009EA554 /* fcobjectsetdestroy.html */, + B3E2FB4E20E568B0009EA554 /* fcfilescan.html */, + B3E2FB4F20E568B0009EA554 /* fclangsetequal.html */, + B3E2FB5020E568B0009EA554 /* ln12.html */, + B3E2FB5120E568B0009EA554 /* fcstrsetdestroy.html */, + B3E2FB5220E568B0009EA554 /* fcpatternformat.html */, + B3E2FB5320E568B0009EA554 /* fccharsetissubset.html */, + B3E2FB5420E568B0009EA554 /* fcatomicdestroy.html */, + B3E2FB5520E568B0009EA554 /* fcmatrixscale.html */, + B3E2FB5620E568B0009EA554 /* fclangsetadd.html */, + B3E2FB5720E568B0009EA554 /* fcgetlangs.html */, + B3E2FB5820E568B0009EA554 /* fcconfigcreate.html */, + B3E2FB5920E568B0009EA554 /* fccachedir.html */, + B3E2FB5A20E568B0009EA554 /* fcnamegetconstant.html */, + B3E2FB5B20E568B0009EA554 /* fcfreetypecharsetandspacing.html */, + B3E2FB5C20E568B0009EA554 /* fcconfigappfontaddfile.html */, + B3E2FB5D20E568B0009EA554 /* fcisupper.html */, + B3E2FB5E20E568B0009EA554 /* fcinitreinitialize.html */, + B3E2FB5F20E568B0009EA554 /* fccharsetmerge.html */, + B3E2FB6020E568B0009EA554 /* fcnameunregisterobjecttypes.html */, + B3E2FB6120E568B0009EA554 /* fcatomiccreate.html */, + B3E2FB6220E568B0009EA554 /* fcweightfromopentype.html */, + B3E2FB6320E568B0009EA554 /* fcstrcmp.html */, + B3E2FB6420E568B0009EA554 /* fcconfiggetrescaninterval.html */, + B3E2FB6520E568B0009EA554 /* fcconfiggetfonts.html */, + B3E2FB6620E568B0009EA554 /* fcpatternbuild.html */, + B3E2FB6720E568B0009EA554 /* fcmatrixshear.html */, + B3E2FB6820E568B0009EA554 /* fcrangecopy.html */, + B3E2FB6920E568B0009EA554 /* fcfileisdir.html */, + B3E2FB6A20E568B0009EA554 /* fcatomicnewfile.html */, + B3E2FB6B20E568B0009EA554 /* fcatomiclock.html */, + B3E2FB6C20E568B0009EA554 /* fcnameunparse.html */, + B3E2FB6D20E568B1009EA554 /* fcmatrixmultiply.html */, + B3E2FB6E20E568B1009EA554 /* fcstrsetdel.html */, + B3E2FB6F20E568B1009EA554 /* fclanggetcharset.html */, + B3E2FB7020E568B1009EA554 /* fcfontsetdestroy.html */, + B3E2FB7120E568B1009EA554 /* fccharsetsubtractcount.html */, + B3E2FB7220E568B1009EA554 /* fcstrcopy.html */, + B3E2FB7320E568B1009EA554 /* fccharsetintersectcount.html */, + B3E2FB7420E568B1009EA554 /* x19.html */, + B3E2FB7520E568B1009EA554 /* fcpatterncreate.html */, + B3E2FB7620E568B1009EA554 /* fcutf8len.html */, + B3E2FB7720E568B1009EA554 /* fccharsethaschar.html */, + B3E2FB7820E568B1009EA554 /* fcgetdefaultlangs.html */, + B3E2FB7920E568B1009EA554 /* fcdircacheclean.html */, + B3E2FB7A20E568B1009EA554 /* fcobjectsetadd.html */, + B3E2FB7B20E568B1009EA554 /* fcconfigfileinfoiterget.html */, + B3E2FB7C20E568B1009EA554 /* fcstrstrignorecase.html */, + B3E2FB7D20E568B1009EA554 /* fclangnormalize.html */, + B3E2FB7E20E568B1009EA554 /* fcconfigfileinfoiterinit.html */, + B3E2FB7F20E568B1009EA554 /* fcmatrixcopy.html */, + B3E2FB8020E568B1009EA554 /* fcconfigsetcurrent.html */, + B3E2FB8120E568B1009EA554 /* fclangsetdestroy.html */, + B3E2FB8220E568B1009EA554 /* fclangsetcopy.html */, + B3E2FB8320E568B1009EA554 /* fcstrdowncase.html */, + B3E2FB8420E568B1009EA554 /* fcpatternget-type.html */, + B3E2FB8520E568B1009EA554 /* fcpatternadd-type.html */, + B3E2FB8620E568B1009EA554 /* fcstrsetadd.html */, + B3E2FB8720E568B1009EA554 /* fcgetversion.html */, + B3E2FB8820E568B1009EA554 /* fcpatternremove.html */, + B3E2FB8920E568B1009EA554 /* fcrangecreateinteger.html */, + B3E2FB8A20E568B1009EA554 /* fcnameconstant.html */, + B3E2FB8B20E568B1009EA554 /* fclangsetcontains.html */, + B3E2FB8C20E568B1009EA554 /* fcconfigsetrescaninterval.html */, + B3E2FB8D20E568B1009EA554 /* fcconfiggetcachedirs.html */, + B3E2FB8E20E568B1009EA554 /* fcdirsave.html */, + B3E2FB8F20E568B1009EA554 /* fcobjectsetcreate.html */, + B3E2FB9020E568B1009EA554 /* fcatomicunlock.html */, + B3E2FB9120E568B1009EA554 /* fcnameunregisterconstants.html */, + B3E2FB9220E568B1009EA554 /* fccharsetcreate.html */, + B3E2FB9320E568B1009EA554 /* fccharsetcount.html */, + B3E2FB9420E568B1009EA554 /* fcrangecreatedouble.html */, + B3E2FB9520E568B1009EA554 /* fcatomicdeletenew.html */, + B3E2FB9620E568B1009EA554 /* fclangsethaslang.html */, + B3E2FB9720E568B1009EA554 /* fcpatternduplicate.html */, + B3E2FB9820E568B1009EA554 /* fcstrplus.html */, + B3E2FB9920E568B1009EA554 /* fcstrsetaddfilename.html */, + B3E2FB9A20E568B1009EA554 /* fcpatterndestroy.html */, + B3E2FB9B20E568B1009EA554 /* fccharsetdelchar.html */, + B3E2FB9C20E568B1009EA554 /* fcatomicorigfile.html */, + B3E2FB9D20E568B1009EA554 /* fccharsetdestroy.html */, + B3E2FB9E20E568B1009EA554 /* fcinitloadconfig.html */, + B3E2FB9F20E568B1009EA554 /* fcblanksadd.html */, + B3E2FBA020E568B1009EA554 /* fcstrstr.html */, + B3E2FBA120E568B1009EA554 /* fcfontsetsort.html */, + B3E2FBA220E568B1009EA554 /* fcinit.html */, + B3E2FBA320E568B1009EA554 /* fccharsetintersect.html */, + B3E2FBA420E568B1009EA554 /* fcpatterndel.html */, + B3E2FBA520E568B1009EA554 /* fcstrlistcreate.html */, + B3E2FBA620E568B1009EA554 /* fccharsetnextpage.html */, + B3E2FBA720E568B1009EA554 /* fcconfigreference.html */, + B3E2FBA820E568B1009EA554 /* fcconfiguptodate.html */, + B3E2FBA920E568B1009EA554 /* fcvalueprint.html */, + B3E2FBAA20E568B1009EA554 /* fcblanksismember.html */, + B3E2FBAB20E568B1009EA554 /* fcconfigsubstitute.html */, + B3E2FBAC20E568B1009EA554 /* fcconfigfilename.html */, + B3E2FBAD20E568B1009EA554 /* fcatomicreplaceorig.html */, + B3E2FBAE20E568B1009EA554 /* fcpatternhash.html */, + B3E2FBAF20E568B1009EA554 /* fcblanksdestroy.html */, + B3E2FBB020E568B1009EA554 /* fcpatternadd.html */, + B3E2FBB120E568B1009EA554 /* fcconfiggetconfigdirs.html */, + B3E2FBB220E568B1009EA554 /* fcdircacheunload.html */, + B3E2FBB320E568B1009EA554 /* fcfontsort.html */, + B3E2FBB420E568B1009EA554 /* fcstrcmpignorecase.html */, + B3E2FBB520E568B1009EA554 /* fcpatternequal.html */, + B3E2FBB620E568B1009EA554 /* fccharsetaddchar.html */, + B3E2FBB720E568B1009EA554 /* fcconfiggetcurrent.html */, + B3E2FBB820E568B1009EA554 /* fcstrcopyfilename.html */, + B3E2FBB920E568B1009EA554 /* fcdircacheunlink.html */, + B3E2FBBA20E568B1009EA554 /* fcfreetypequeryface.html */, + B3E2FBBB20E568B1009EA554 /* fcmatrixinit.html */, + B3E2FBBC20E568B1009EA554 /* fcstrdirname.html */, + B3E2FBBD20E568B1009EA554 /* fctolower.html */, + B3E2FBBE20E568B1009EA554 /* fccachecopyset.html */, + B3E2FBBF20E568B1009EA554 /* fcblankscreate.html */, + B3E2FBC020E568B1009EA554 /* fcnameparse.html */, + B3E2FBC120E568B1009EA554 /* fcnameregisterconstants.html */, + B3E2FBC220E568B1009EA554 /* fcstrsetequal.html */, + B3E2FBC320E568B1009EA554 /* x31.html */, + B3E2FBC420E568B1009EA554 /* fcfontsetlist.html */, + B3E2FBC520E568B1009EA554 /* fccachenumsubdir.html */, + B3E2FBC620E568B1009EA554 /* fcfreetypequeryall.html */, + B3E2FBC720E568B1009EA554 /* fcpatternequalsubset.html */, + B3E2FBC820E568B1009EA554 /* fcweighttoopentypedouble.html */, + B3E2FBC920E568B1009EA554 /* fcpatternfilter.html */, + B3E2FBCA20E568B1009EA554 /* fcdirscan.html */, + B3E2FBCB20E568B1009EA554 /* fccachecreatetagfile.html */, + B3E2FBCC20E568B1009EA554 /* fcfontrenderprepare.html */, + B3E2FBCD20E568B1009EA554 /* fccharsetcopy.html */, + B3E2FBCE20E568B1009EA554 /* fcdircachevalid.html */, + B3E2FBCF20E568B1009EA554 /* fcdircachecreateuuid.html */, + B3E2FBD020E568B1009EA554 /* fclangsetunion.html */, + B3E2FBD120E568B1009EA554 /* fcstrlistdone.html */, + B3E2FBD220E568B1009EA554 /* t1.html */, + B3E2FBD320E568B1009EA554 /* fcstrbasename.html */, + B3E2FBD420E568B1009EA554 /* fcdircacherescan.html */, + B3E2FBD520E568B1009EA554 /* fcpatterngetwithbinding.html */, + B3E2FBD620E568B1009EA554 /* fcdircacheread.html */, + B3E2FBD720E568B1009EA554 /* fcvaluedestroy.html */, + B3E2FBD820E568B1009EA554 /* fcconfigfileinfoiternext.html */, + B3E2FBD920E568B1009EA554 /* fcconfiggetblanks.html */, + B3E2FBDA20E568B1009EA554 /* fcfontsetadd.html */, + B3E2FBDB20E568B1009EA554 /* fcfreetypecharset.html */, + B3E2FBDC20E568B1009EA554 /* fcislower.html */, + B3E2FBDD20E568B1009EA554 /* fcpatternaddweak.html */, + B3E2FBDE20E568B1009EA554 /* fcconfigappfontadddir.html */, + B3E2FBDF20E568B1009EA554 /* fcfontsetsortdestroy.html */, + B3E2FBE020E568B1009EA554 /* fcconfigsubstitutewithpat.html */, + B3E2FBE120E568B1009EA554 /* fcfontsetmatch.html */, + B3E2FBE220E568B1009EA554 /* fcinitloadconfigandfonts.html */, + B3E2FBE320E568B1009EA554 /* fcmatrixrotate.html */, + B3E2FBE420E568B1009EA554 /* fcdefaultsubstitute.html */, + B3E2FBE520E568B1009EA554 /* fcinitbringuptodate.html */, + B3E2FBE620E568B1009EA554 /* fcrangegetdouble.html */, + B3E2FBE720E568B1009EA554 /* fcfontlist.html */, + B3E2FBE820E568B1009EA554 /* x103.html */, + B3E2FBE920E568B1009EA554 /* fcstrsetmember.html */, + B3E2FBEA20E568B1009EA554 /* fclangsetsubtract.html */, + B3E2FBEB20E568B1009EA554 /* fcdircacheload.html */, + B3E2FBEC20E568B1009EA554 /* fcvaluesave.html */, + B3E2FBED20E568B1009EA554 /* fccharsetsubtract.html */, + B3E2FBEE20E568B1009EA554 /* fcfreetypequery.html */, + B3E2FBEF20E568B1009EA554 /* fcconfigsetsysroot.html */, + B3E2FBF020E568B1009EA554 /* fcfontmatch.html */, + B3E2FBF120E568B1009EA554 /* fcstrlistnext.html */, + B3E2FBF220E568B1009EA554 /* fcweighttoopentype.html */, + B3E2FBF320E568B1009EA554 /* fcfontsetcreate.html */, + B3E2FBF420E568B1009EA554 /* fcconfigappfontclear.html */, + B3E2FBF520E568B1009EA554 /* fclangsethash.html */, + B3E2FBF620E568B1009EA554 /* fccharsetequal.html */, + B3E2FBF720E568B1009EA554 /* fcrangedestroy.html */, + B3E2FBF820E568B1009EA554 /* fclangsetcompare.html */, + B3E2FBF920E568B1009EA554 /* fcconfigdestroy.html */, + ); + path = "fontconfig-devel"; + sourceTree = ""; + }; + B3E2FBFD20E568B1009EA554 /* gettext */ = { + isa = PBXGroup; + children = ( + B3E2FBFE20E568B2009EA554 /* 0.19.8.1 */, + ); + path = gettext; + sourceTree = ""; + }; + B3E2FBFE20E568B2009EA554 /* 0.19.8.1 */ = { + isa = PBXGroup; + children = ( + B3E2FBFF20E568B2009EA554 /* INSTALL_RECEIPT.json */, + B3E2FC0020E568B2009EA554 /* bin */, + B3E2FC1720E568B2009EA554 /* .brew */, + B3E2FC1920E568B2009EA554 /* ChangeLog */, + B3E2FC1A20E568B2009EA554 /* AUTHORS */, + B3E2FC1B20E568B2009EA554 /* include */, + B3E2FC1F20E568B2009EA554 /* README */, + B3E2FC2020E568B2009EA554 /* COPYING */, + B3E2FC2120E568B2009EA554 /* NEWS */, + B3E2FC2220E568B2009EA554 /* lib */, + B3E2FC3620E568B2009EA554 /* share */, + ); + path = 0.19.8.1; + sourceTree = ""; + }; + B3E2FC0020E568B2009EA554 /* bin */ = { + isa = PBXGroup; + children = ( + B3E2FC0120E568B2009EA554 /* msgconv */, + B3E2FC0220E568B2009EA554 /* msggrep */, + B3E2FC0320E568B2009EA554 /* autopoint */, + B3E2FC0420E568B2009EA554 /* msgcomm */, + B3E2FC0520E568B2009EA554 /* msgen */, + B3E2FC0620E568B2009EA554 /* msgmerge */, + B3E2FC0720E568B2009EA554 /* envsubst */, + B3E2FC0820E568B2009EA554 /* msginit */, + B3E2FC0920E568B2009EA554 /* gettext */, + B3E2FC0A20E568B2009EA554 /* gettext.sh */, + B3E2FC0B20E568B2009EA554 /* msgcmp */, + B3E2FC0C20E568B2009EA554 /* msgcat */, + B3E2FC0D20E568B2009EA554 /* recode-sr-latin */, + B3E2FC0E20E568B2009EA554 /* msgexec */, + B3E2FC0F20E568B2009EA554 /* ngettext */, + B3E2FC1020E568B2009EA554 /* msgunfmt */, + B3E2FC1120E568B2009EA554 /* msgfilter */, + B3E2FC1220E568B2009EA554 /* msgfmt */, + B3E2FC1320E568B2009EA554 /* msgattrib */, + B3E2FC1420E568B2009EA554 /* xgettext */, + B3E2FC1520E568B2009EA554 /* gettextize */, + B3E2FC1620E568B2009EA554 /* msguniq */, + ); + path = bin; + sourceTree = ""; + }; + B3E2FC1720E568B2009EA554 /* .brew */ = { + isa = PBXGroup; + children = ( + B3E2FC1820E568B2009EA554 /* gettext.rb */, + ); + path = .brew; + sourceTree = ""; + }; + B3E2FC1B20E568B2009EA554 /* include */ = { + isa = PBXGroup; + children = ( + B3E2FC1C20E568B2009EA554 /* autosprintf.h */, + B3E2FC1D20E568B2009EA554 /* gettext-po.h */, + B3E2FC1E20E568B2009EA554 /* libintl.h */, + ); + path = include; + sourceTree = ""; + }; + B3E2FC2220E568B2009EA554 /* lib */ = { + isa = PBXGroup; + children = ( + B3E2FC2320E568B2009EA554 /* libgettextlib.dylib */, + B3E2FC2420E568B2009EA554 /* libgettextpo.0.dylib */, + B3E2FC2520E568B2009EA554 /* libasprintf.dylib */, + B3E2FC2620E568B2009EA554 /* libintl.dylib */, + B3E2FC2720E568B2009EA554 /* libintl.8.dylib */, + B3E2FC2820E568B2009EA554 /* libasprintf.0.dylib */, + B3E2FC2920E568B2009EA554 /* gettext */, + B3E2FC2F20E568B2009EA554 /* libintl.a */, + B3E2FC3020E568B2009EA554 /* libgettextsrc-0.19.8.1.dylib */, + B3E2FC3120E568B2009EA554 /* libgettextpo.a */, + B3E2FC3220E568B2009EA554 /* libgettextsrc.dylib */, + B3E2FC3320E568B2009EA554 /* libasprintf.a */, + B3E2FC3420E568B2009EA554 /* libgettextlib-0.19.8.1.dylib */, + B3E2FC3520E568B2009EA554 /* libgettextpo.dylib */, + ); + path = lib; + sourceTree = ""; + }; + B3E2FC2920E568B2009EA554 /* gettext */ = { + isa = PBXGroup; + children = ( + B3E2FC2A20E568B2009EA554 /* project-id */, + B3E2FC2B20E568B2009EA554 /* urlget */, + B3E2FC2C20E568B2009EA554 /* hostname */, + B3E2FC2D20E568B2009EA554 /* cldr-plurals */, + B3E2FC2E20E568B2009EA554 /* user-email */, + ); + path = gettext; + sourceTree = ""; + }; + B3E2FC3620E568B2009EA554 /* share */ = { + isa = PBXGroup; + children = ( + B3E2FC3720E568B2009EA554 /* man */, + B3E2FC5820E568B2009EA554 /* aclocal */, + B3E2FC7920E568B2009EA554 /* locale */, + B3E2FD1C20E568B3009EA554 /* emacs */, + B3E2FD2520E568B3009EA554 /* gettext-0.19.8 */, + B3E2FD2F20E568B3009EA554 /* info */, + B3E2FD3220E568B3009EA554 /* gettext */, + ); + path = share; + sourceTree = ""; + }; + B3E2FC3720E568B2009EA554 /* man */ = { + isa = PBXGroup; + children = ( + B3E2FC3820E568B2009EA554 /* man3 */, + B3E2FC4220E568B2009EA554 /* man1 */, + ); + path = man; + sourceTree = ""; + }; + B3E2FC3820E568B2009EA554 /* man3 */ = { + isa = PBXGroup; + children = ( + B3E2FC3920E568B2009EA554 /* gettext.3 */, + B3E2FC3A20E568B2009EA554 /* dcgettext.3 */, + B3E2FC3B20E568B2009EA554 /* textdomain.3 */, + B3E2FC3C20E568B2009EA554 /* ngettext.3 */, + B3E2FC3D20E568B2009EA554 /* dgettext.3 */, + B3E2FC3E20E568B2009EA554 /* dngettext.3 */, + B3E2FC3F20E568B2009EA554 /* bind_textdomain_codeset.3 */, + B3E2FC4020E568B2009EA554 /* dcngettext.3 */, + B3E2FC4120E568B2009EA554 /* bindtextdomain.3 */, + ); + path = man3; + sourceTree = ""; + }; + B3E2FC4220E568B2009EA554 /* man1 */ = { + isa = PBXGroup; + children = ( + B3E2FC4320E568B2009EA554 /* envsubst.1 */, + B3E2FC4420E568B2009EA554 /* msgattrib.1 */, + B3E2FC4520E568B2009EA554 /* recode-sr-latin.1 */, + B3E2FC4620E568B2009EA554 /* msgcmp.1 */, + B3E2FC4720E568B2009EA554 /* msgfmt.1 */, + B3E2FC4820E568B2009EA554 /* xgettext.1 */, + B3E2FC4920E568B2009EA554 /* msggrep.1 */, + B3E2FC4A20E568B2009EA554 /* msgcomm.1 */, + B3E2FC4B20E568B2009EA554 /* autopoint.1 */, + B3E2FC4C20E568B2009EA554 /* msgunfmt.1 */, + B3E2FC4D20E568B2009EA554 /* msgmerge.1 */, + B3E2FC4E20E568B2009EA554 /* msgcat.1 */, + B3E2FC4F20E568B2009EA554 /* gettext.1 */, + B3E2FC5020E568B2009EA554 /* msgen.1 */, + B3E2FC5120E568B2009EA554 /* msgexec.1 */, + B3E2FC5220E568B2009EA554 /* msguniq.1 */, + B3E2FC5320E568B2009EA554 /* gettextize.1 */, + B3E2FC5420E568B2009EA554 /* msgfilter.1 */, + B3E2FC5520E568B2009EA554 /* msginit.1 */, + B3E2FC5620E568B2009EA554 /* ngettext.1 */, + B3E2FC5720E568B2009EA554 /* msgconv.1 */, + ); + path = man1; + sourceTree = ""; + }; + B3E2FC5820E568B2009EA554 /* aclocal */ = { + isa = PBXGroup; + children = ( + B3E2FC5920E568B2009EA554 /* size_max.m4 */, + B3E2FC5A20E568B2009EA554 /* lock.m4 */, + B3E2FC5B20E568B2009EA554 /* glibc2.m4 */, + B3E2FC5C20E568B2009EA554 /* po.m4 */, + B3E2FC5D20E568B2009EA554 /* visibility.m4 */, + B3E2FC5E20E568B2009EA554 /* longlong.m4 */, + B3E2FC5F20E568B2009EA554 /* glibc21.m4 */, + B3E2FC6020E568B2009EA554 /* intdiv0.m4 */, + B3E2FC6120E568B2009EA554 /* stdint_h.m4 */, + B3E2FC6220E568B2009EA554 /* extern-inline.m4 */, + B3E2FC6320E568B2009EA554 /* intmax.m4 */, + B3E2FC6420E568B2009EA554 /* fcntl-o.m4 */, + B3E2FC6520E568B2009EA554 /* lib-link.m4 */, + B3E2FC6620E568B2009EA554 /* uintmax_t.m4 */, + B3E2FC6720E568B2009EA554 /* xsize.m4 */, + B3E2FC6820E568B2009EA554 /* threadlib.m4 */, + B3E2FC6920E568B2009EA554 /* printf-posix.m4 */, + B3E2FC6A20E568B2009EA554 /* codeset.m4 */, + B3E2FC6B20E568B2009EA554 /* gettext.m4 */, + B3E2FC6C20E568B2009EA554 /* intl.m4 */, + B3E2FC6D20E568B2009EA554 /* wint_t.m4 */, + B3E2FC6E20E568B2009EA554 /* intldir.m4 */, + B3E2FC6F20E568B2009EA554 /* progtest.m4 */, + B3E2FC7020E568B2009EA554 /* lcmessage.m4 */, + B3E2FC7120E568B2009EA554 /* inttypes_h.m4 */, + B3E2FC7220E568B2009EA554 /* iconv.m4 */, + B3E2FC7320E568B2009EA554 /* nls.m4 */, + B3E2FC7420E568B2009EA554 /* lib-prefix.m4 */, + B3E2FC7520E568B2009EA554 /* inttypes-pri.m4 */, + B3E2FC7620E568B2009EA554 /* lib-ld.m4 */, + B3E2FC7720E568B2009EA554 /* wchar_t.m4 */, + B3E2FC7820E568B2009EA554 /* intlmacosx.m4 */, + ); + path = aclocal; + sourceTree = ""; + }; + B3E2FC7920E568B2009EA554 /* locale */ = { + isa = PBXGroup; + children = ( + B3E2FC7A20E568B2009EA554 /* sl */, + B3E2FC7E20E568B2009EA554 /* sk */, + B3E2FC8220E568B2009EA554 /* pl */, + B3E2FC8620E568B2009EA554 /* vi */, + B3E2FC8A20E568B2009EA554 /* sv */, + B3E2FC8E20E568B2009EA554 /* zh_HK */, + B3E2FC9120E568B2009EA554 /* ga */, + B3E2FC9420E568B2009EA554 /* nn */, + B3E2FC9820E568B2009EA554 /* be */, + B3E2FC9C20E568B2009EA554 /* da */, + B3E2FCA020E568B2009EA554 /* pt_BR */, + B3E2FCA420E568B2009EA554 /* ja */, + B3E2FCA820E568B2009EA554 /* el */, + B3E2FCAC20E568B2009EA554 /* it */, + B3E2FCB020E568B3009EA554 /* ca */, + B3E2FCB420E568B3009EA554 /* zh_TW */, + B3E2FCB820E568B3009EA554 /* cs */, + B3E2FCBC20E568B3009EA554 /* ru */, + B3E2FCC020E568B3009EA554 /* ro */, + B3E2FCC420E568B3009EA554 /* zh_CN */, + B3E2FCC820E568B3009EA554 /* locale.alias */, + B3E2FCC920E568B3009EA554 /* pt */, + B3E2FCCD20E568B3009EA554 /* uk */, + B3E2FCD120E568B3009EA554 /* sr */, + B3E2FCD520E568B3009EA554 /* en@boldquot */, + B3E2FCD920E568B3009EA554 /* pa */, + B3E2FCDC20E568B3009EA554 /* gl */, + B3E2FCE020E568B3009EA554 /* hr */, + B3E2FCE320E568B3009EA554 /* hu */, + B3E2FCE620E568B3009EA554 /* nl */, + B3E2FCEA20E568B3009EA554 /* bg */, + B3E2FCEE20E568B3009EA554 /* en@quot */, + B3E2FCF220E568B3009EA554 /* nb */, + B3E2FCF620E568B3009EA554 /* de */, + B3E2FCFA20E568B3009EA554 /* ko */, + B3E2FCFE20E568B3009EA554 /* fi */, + B3E2FD0220E568B3009EA554 /* eo */, + B3E2FD0520E568B3009EA554 /* id */, + B3E2FD0920E568B3009EA554 /* fr */, + B3E2FD0D20E568B3009EA554 /* es */, + B3E2FD1120E568B3009EA554 /* et */, + B3E2FD1520E568B3009EA554 /* eu */, + B3E2FD1820E568B3009EA554 /* tr */, + ); + path = locale; + sourceTree = ""; + }; + B3E2FC7A20E568B2009EA554 /* sl */ = { + isa = PBXGroup; + children = ( + B3E2FC7B20E568B2009EA554 /* LC_MESSAGES */, + ); + path = sl; + sourceTree = ""; + }; + B3E2FC7B20E568B2009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FC7C20E568B2009EA554 /* gettext-runtime.mo */, + B3E2FC7D20E568B2009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FC7E20E568B2009EA554 /* sk */ = { + isa = PBXGroup; + children = ( + B3E2FC7F20E568B2009EA554 /* LC_MESSAGES */, + ); + path = sk; + sourceTree = ""; + }; + B3E2FC7F20E568B2009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FC8020E568B2009EA554 /* gettext-runtime.mo */, + B3E2FC8120E568B2009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FC8220E568B2009EA554 /* pl */ = { + isa = PBXGroup; + children = ( + B3E2FC8320E568B2009EA554 /* LC_MESSAGES */, + ); + path = pl; + sourceTree = ""; + }; + B3E2FC8320E568B2009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FC8420E568B2009EA554 /* gettext-runtime.mo */, + B3E2FC8520E568B2009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FC8620E568B2009EA554 /* vi */ = { + isa = PBXGroup; + children = ( + B3E2FC8720E568B2009EA554 /* LC_MESSAGES */, + ); + path = vi; + sourceTree = ""; + }; + B3E2FC8720E568B2009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FC8820E568B2009EA554 /* gettext-runtime.mo */, + B3E2FC8920E568B2009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FC8A20E568B2009EA554 /* sv */ = { + isa = PBXGroup; + children = ( + B3E2FC8B20E568B2009EA554 /* LC_MESSAGES */, + ); + path = sv; + sourceTree = ""; + }; + B3E2FC8B20E568B2009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FC8C20E568B2009EA554 /* gettext-runtime.mo */, + B3E2FC8D20E568B2009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FC8E20E568B2009EA554 /* zh_HK */ = { + isa = PBXGroup; + children = ( + B3E2FC8F20E568B2009EA554 /* LC_MESSAGES */, + ); + path = zh_HK; + sourceTree = ""; + }; + B3E2FC8F20E568B2009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FC9020E568B2009EA554 /* gettext-runtime.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FC9120E568B2009EA554 /* ga */ = { + isa = PBXGroup; + children = ( + B3E2FC9220E568B2009EA554 /* LC_MESSAGES */, + ); + path = ga; + sourceTree = ""; + }; + B3E2FC9220E568B2009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FC9320E568B2009EA554 /* gettext-runtime.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FC9420E568B2009EA554 /* nn */ = { + isa = PBXGroup; + children = ( + B3E2FC9520E568B2009EA554 /* LC_MESSAGES */, + ); + path = nn; + sourceTree = ""; + }; + B3E2FC9520E568B2009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FC9620E568B2009EA554 /* gettext-runtime.mo */, + B3E2FC9720E568B2009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FC9820E568B2009EA554 /* be */ = { + isa = PBXGroup; + children = ( + B3E2FC9920E568B2009EA554 /* LC_MESSAGES */, + ); + path = be; + sourceTree = ""; + }; + B3E2FC9920E568B2009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FC9A20E568B2009EA554 /* gettext-runtime.mo */, + B3E2FC9B20E568B2009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FC9C20E568B2009EA554 /* da */ = { + isa = PBXGroup; + children = ( + B3E2FC9D20E568B2009EA554 /* LC_MESSAGES */, + ); + path = da; + sourceTree = ""; + }; + B3E2FC9D20E568B2009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FC9E20E568B2009EA554 /* gettext-runtime.mo */, + B3E2FC9F20E568B2009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCA020E568B2009EA554 /* pt_BR */ = { + isa = PBXGroup; + children = ( + B3E2FCA120E568B2009EA554 /* LC_MESSAGES */, + ); + path = pt_BR; + sourceTree = ""; + }; + B3E2FCA120E568B2009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCA220E568B2009EA554 /* gettext-runtime.mo */, + B3E2FCA320E568B2009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCA420E568B2009EA554 /* ja */ = { + isa = PBXGroup; + children = ( + B3E2FCA520E568B2009EA554 /* LC_MESSAGES */, + ); + path = ja; + sourceTree = ""; + }; + B3E2FCA520E568B2009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCA620E568B2009EA554 /* gettext-runtime.mo */, + B3E2FCA720E568B2009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCA820E568B2009EA554 /* el */ = { + isa = PBXGroup; + children = ( + B3E2FCA920E568B2009EA554 /* LC_MESSAGES */, + ); + path = el; + sourceTree = ""; + }; + B3E2FCA920E568B2009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCAA20E568B2009EA554 /* gettext-runtime.mo */, + B3E2FCAB20E568B2009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCAC20E568B2009EA554 /* it */ = { + isa = PBXGroup; + children = ( + B3E2FCAD20E568B3009EA554 /* LC_MESSAGES */, + ); + path = it; + sourceTree = ""; + }; + B3E2FCAD20E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCAE20E568B3009EA554 /* gettext-runtime.mo */, + B3E2FCAF20E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCB020E568B3009EA554 /* ca */ = { + isa = PBXGroup; + children = ( + B3E2FCB120E568B3009EA554 /* LC_MESSAGES */, + ); + path = ca; + sourceTree = ""; + }; + B3E2FCB120E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCB220E568B3009EA554 /* gettext-runtime.mo */, + B3E2FCB320E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCB420E568B3009EA554 /* zh_TW */ = { + isa = PBXGroup; + children = ( + B3E2FCB520E568B3009EA554 /* LC_MESSAGES */, + ); + path = zh_TW; + sourceTree = ""; + }; + B3E2FCB520E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCB620E568B3009EA554 /* gettext-runtime.mo */, + B3E2FCB720E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCB820E568B3009EA554 /* cs */ = { + isa = PBXGroup; + children = ( + B3E2FCB920E568B3009EA554 /* LC_MESSAGES */, + ); + path = cs; + sourceTree = ""; + }; + B3E2FCB920E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCBA20E568B3009EA554 /* gettext-runtime.mo */, + B3E2FCBB20E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCBC20E568B3009EA554 /* ru */ = { + isa = PBXGroup; + children = ( + B3E2FCBD20E568B3009EA554 /* LC_MESSAGES */, + ); + path = ru; + sourceTree = ""; + }; + B3E2FCBD20E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCBE20E568B3009EA554 /* gettext-runtime.mo */, + B3E2FCBF20E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCC020E568B3009EA554 /* ro */ = { + isa = PBXGroup; + children = ( + B3E2FCC120E568B3009EA554 /* LC_MESSAGES */, + ); + path = ro; + sourceTree = ""; + }; + B3E2FCC120E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCC220E568B3009EA554 /* gettext-runtime.mo */, + B3E2FCC320E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCC420E568B3009EA554 /* zh_CN */ = { + isa = PBXGroup; + children = ( + B3E2FCC520E568B3009EA554 /* LC_MESSAGES */, + ); + path = zh_CN; + sourceTree = ""; + }; + B3E2FCC520E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCC620E568B3009EA554 /* gettext-runtime.mo */, + B3E2FCC720E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCC920E568B3009EA554 /* pt */ = { + isa = PBXGroup; + children = ( + B3E2FCCA20E568B3009EA554 /* LC_MESSAGES */, + ); + path = pt; + sourceTree = ""; + }; + B3E2FCCA20E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCCB20E568B3009EA554 /* gettext-runtime.mo */, + B3E2FCCC20E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCCD20E568B3009EA554 /* uk */ = { + isa = PBXGroup; + children = ( + B3E2FCCE20E568B3009EA554 /* LC_MESSAGES */, + ); + path = uk; + sourceTree = ""; + }; + B3E2FCCE20E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCCF20E568B3009EA554 /* gettext-runtime.mo */, + B3E2FCD020E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCD120E568B3009EA554 /* sr */ = { + isa = PBXGroup; + children = ( + B3E2FCD220E568B3009EA554 /* LC_MESSAGES */, + ); + path = sr; + sourceTree = ""; + }; + B3E2FCD220E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCD320E568B3009EA554 /* gettext-runtime.mo */, + B3E2FCD420E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCD520E568B3009EA554 /* en@boldquot */ = { + isa = PBXGroup; + children = ( + B3E2FCD620E568B3009EA554 /* LC_MESSAGES */, + ); + path = "en@boldquot"; + sourceTree = ""; + }; + B3E2FCD620E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCD720E568B3009EA554 /* gettext-runtime.mo */, + B3E2FCD820E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCD920E568B3009EA554 /* pa */ = { + isa = PBXGroup; + children = ( + B3E2FCDA20E568B3009EA554 /* LC_MESSAGES */, + ); + path = pa; + sourceTree = ""; + }; + B3E2FCDA20E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCDB20E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCDC20E568B3009EA554 /* gl */ = { + isa = PBXGroup; + children = ( + B3E2FCDD20E568B3009EA554 /* LC_MESSAGES */, + ); + path = gl; + sourceTree = ""; + }; + B3E2FCDD20E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCDE20E568B3009EA554 /* gettext-runtime.mo */, + B3E2FCDF20E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCE020E568B3009EA554 /* hr */ = { + isa = PBXGroup; + children = ( + B3E2FCE120E568B3009EA554 /* LC_MESSAGES */, + ); + path = hr; + sourceTree = ""; + }; + B3E2FCE120E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCE220E568B3009EA554 /* gettext-runtime.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCE320E568B3009EA554 /* hu */ = { + isa = PBXGroup; + children = ( + B3E2FCE420E568B3009EA554 /* LC_MESSAGES */, + ); + path = hu; + sourceTree = ""; + }; + B3E2FCE420E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCE520E568B3009EA554 /* gettext-runtime.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCE620E568B3009EA554 /* nl */ = { + isa = PBXGroup; + children = ( + B3E2FCE720E568B3009EA554 /* LC_MESSAGES */, + ); + path = nl; + sourceTree = ""; + }; + B3E2FCE720E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCE820E568B3009EA554 /* gettext-runtime.mo */, + B3E2FCE920E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCEA20E568B3009EA554 /* bg */ = { + isa = PBXGroup; + children = ( + B3E2FCEB20E568B3009EA554 /* LC_MESSAGES */, + ); + path = bg; + sourceTree = ""; + }; + B3E2FCEB20E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCEC20E568B3009EA554 /* gettext-runtime.mo */, + B3E2FCED20E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCEE20E568B3009EA554 /* en@quot */ = { + isa = PBXGroup; + children = ( + B3E2FCEF20E568B3009EA554 /* LC_MESSAGES */, + ); + path = "en@quot"; + sourceTree = ""; + }; + B3E2FCEF20E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCF020E568B3009EA554 /* gettext-runtime.mo */, + B3E2FCF120E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCF220E568B3009EA554 /* nb */ = { + isa = PBXGroup; + children = ( + B3E2FCF320E568B3009EA554 /* LC_MESSAGES */, + ); + path = nb; + sourceTree = ""; + }; + B3E2FCF320E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCF420E568B3009EA554 /* gettext-runtime.mo */, + B3E2FCF520E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCF620E568B3009EA554 /* de */ = { + isa = PBXGroup; + children = ( + B3E2FCF720E568B3009EA554 /* LC_MESSAGES */, + ); + path = de; + sourceTree = ""; + }; + B3E2FCF720E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCF820E568B3009EA554 /* gettext-runtime.mo */, + B3E2FCF920E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCFA20E568B3009EA554 /* ko */ = { + isa = PBXGroup; + children = ( + B3E2FCFB20E568B3009EA554 /* LC_MESSAGES */, + ); + path = ko; + sourceTree = ""; + }; + B3E2FCFB20E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FCFC20E568B3009EA554 /* gettext-runtime.mo */, + B3E2FCFD20E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FCFE20E568B3009EA554 /* fi */ = { + isa = PBXGroup; + children = ( + B3E2FCFF20E568B3009EA554 /* LC_MESSAGES */, + ); + path = fi; + sourceTree = ""; + }; + B3E2FCFF20E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FD0020E568B3009EA554 /* gettext-runtime.mo */, + B3E2FD0120E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FD0220E568B3009EA554 /* eo */ = { + isa = PBXGroup; + children = ( + B3E2FD0320E568B3009EA554 /* LC_MESSAGES */, + ); + path = eo; + sourceTree = ""; + }; + B3E2FD0320E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FD0420E568B3009EA554 /* gettext-runtime.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FD0520E568B3009EA554 /* id */ = { + isa = PBXGroup; + children = ( + B3E2FD0620E568B3009EA554 /* LC_MESSAGES */, + ); + path = id; + sourceTree = ""; + }; + B3E2FD0620E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FD0720E568B3009EA554 /* gettext-runtime.mo */, + B3E2FD0820E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FD0920E568B3009EA554 /* fr */ = { + isa = PBXGroup; + children = ( + B3E2FD0A20E568B3009EA554 /* LC_MESSAGES */, + ); + path = fr; + sourceTree = ""; + }; + B3E2FD0A20E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FD0B20E568B3009EA554 /* gettext-runtime.mo */, + B3E2FD0C20E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FD0D20E568B3009EA554 /* es */ = { + isa = PBXGroup; + children = ( + B3E2FD0E20E568B3009EA554 /* LC_MESSAGES */, + ); + path = es; + sourceTree = ""; + }; + B3E2FD0E20E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FD0F20E568B3009EA554 /* gettext-runtime.mo */, + B3E2FD1020E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FD1120E568B3009EA554 /* et */ = { + isa = PBXGroup; + children = ( + B3E2FD1220E568B3009EA554 /* LC_MESSAGES */, + ); + path = et; + sourceTree = ""; + }; + B3E2FD1220E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FD1320E568B3009EA554 /* gettext-runtime.mo */, + B3E2FD1420E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FD1520E568B3009EA554 /* eu */ = { + isa = PBXGroup; + children = ( + B3E2FD1620E568B3009EA554 /* LC_MESSAGES */, + ); + path = eu; + sourceTree = ""; + }; + B3E2FD1620E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FD1720E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FD1820E568B3009EA554 /* tr */ = { + isa = PBXGroup; + children = ( + B3E2FD1920E568B3009EA554 /* LC_MESSAGES */, + ); + path = tr; + sourceTree = ""; + }; + B3E2FD1920E568B3009EA554 /* LC_MESSAGES */ = { + isa = PBXGroup; + children = ( + B3E2FD1A20E568B3009EA554 /* gettext-runtime.mo */, + B3E2FD1B20E568B3009EA554 /* gettext-tools.mo */, + ); + path = LC_MESSAGES; + sourceTree = ""; + }; + B3E2FD1C20E568B3009EA554 /* emacs */ = { + isa = PBXGroup; + children = ( + B3E2FD1D20E568B3009EA554 /* site-lisp */, + ); + path = emacs; + sourceTree = ""; + }; + B3E2FD1D20E568B3009EA554 /* site-lisp */ = { + isa = PBXGroup; + children = ( + B3E2FD1E20E568B3009EA554 /* gettext */, + ); + path = "site-lisp"; + sourceTree = ""; + }; + B3E2FD1E20E568B3009EA554 /* gettext */ = { + isa = PBXGroup; + children = ( + B3E2FD1F20E568B3009EA554 /* po-mode.el */, + B3E2FD2020E568B3009EA554 /* start-po.el */, + B3E2FD2120E568B3009EA554 /* start-po.elc */, + B3E2FD2220E568B3009EA554 /* po-compat.el */, + B3E2FD2320E568B3009EA554 /* po-mode.elc */, + B3E2FD2420E568B3009EA554 /* po-compat.elc */, + ); + path = gettext; + sourceTree = ""; + }; + B3E2FD2520E568B3009EA554 /* gettext-0.19.8 */ = { + isa = PBXGroup; + children = ( + B3E2FD2620E568B3009EA554 /* its */, + ); + path = "gettext-0.19.8"; + sourceTree = ""; + }; + B3E2FD2620E568B3009EA554 /* its */ = { + isa = PBXGroup; + children = ( + B3E2FD2720E568B3009EA554 /* gsettings.its */, + B3E2FD2820E568B3009EA554 /* appdata.its */, + B3E2FD2920E568B3009EA554 /* appdata.loc */, + B3E2FD2A20E568B3009EA554 /* glade.loc */, + B3E2FD2B20E568B3009EA554 /* glade2.its */, + B3E2FD2C20E568B3009EA554 /* gsettings.loc */, + B3E2FD2D20E568B3009EA554 /* glade1.its */, + B3E2FD2E20E568B3009EA554 /* gtkbuilder.its */, + ); + path = its; + sourceTree = ""; + }; + B3E2FD2F20E568B3009EA554 /* info */ = { + isa = PBXGroup; + children = ( + B3E2FD3020E568B3009EA554 /* autosprintf.info */, + B3E2FD3120E568B3009EA554 /* gettext.info */, + ); + path = info; + sourceTree = ""; + }; + B3E2FD3220E568B3009EA554 /* gettext */ = { + isa = PBXGroup; + children = ( + B3E2FD3320E568B3009EA554 /* msgunfmt.tcl */, + B3E2FD3420E568B3009EA554 /* config.rpath */, + B3E2FD3520E568B3009EA554 /* intl */, + B3E2FD7720E568B4009EA554 /* projects */, + B3E2FD8920E568B4009EA554 /* archive.dir.tar.bz2 */, + B3E2FD8A20E568B4009EA554 /* ABOUT-NLS */, + B3E2FD8B20E568B4009EA554 /* styles */, + B3E2FD9220E568B4009EA554 /* po */, + B3E2FD9C20E568B4009EA554 /* gettext.h */, + B3E2FD9D20E568B4009EA554 /* javaversion.class */, + ); + path = gettext; + sourceTree = ""; + }; + B3E2FD3520E568B3009EA554 /* intl */ = { + isa = PBXGroup; + children = ( + B3E2FD3620E568B3009EA554 /* tsearch.h */, + B3E2FD3720E568B3009EA554 /* dcigettext.c */, + B3E2FD3820E568B3009EA554 /* gettext.c */, + B3E2FD3920E568B3009EA554 /* log.c */, + B3E2FD3A20E568B3009EA554 /* intl-compat.c */, + B3E2FD3B20E568B3009EA554 /* printf.c */, + B3E2FD3C20E568B3009EA554 /* hash-string.c */, + B3E2FD3D20E568B3009EA554 /* vasnprintf.h */, + B3E2FD3E20E568B3009EA554 /* explodename.c */, + B3E2FD3F20E568B3009EA554 /* printf-parse.h */, + B3E2FD4020E568B3009EA554 /* gmo.h */, + B3E2FD4120E568B3009EA554 /* printf-args.c */, + B3E2FD4220E568B3009EA554 /* plural-exp.h */, + B3E2FD4320E568B3009EA554 /* libgnuintl.in.h */, + B3E2FD4420E568B3009EA554 /* dcgettext.c */, + B3E2FD4520E568B3009EA554 /* export.h */, + B3E2FD4620E568B3009EA554 /* gettextP.h */, + B3E2FD4720E568B3009EA554 /* textdomain.c */, + B3E2FD4820E568B3009EA554 /* xsize.c */, + B3E2FD4920E568B3009EA554 /* intl-exports.c */, + B3E2FD4A20E568B3009EA554 /* ngettext.c */, + B3E2FD4B20E568B3009EA554 /* lock.h */, + B3E2FD4C20E568B3009EA554 /* ref-add.sin */, + B3E2FD4D20E568B3009EA554 /* loadinfo.h */, + B3E2FD4E20E568B4009EA554 /* dngettext.c */, + B3E2FD4F20E568B4009EA554 /* wprintf-parse.h */, + B3E2FD5020E568B4009EA554 /* dgettext.c */, + B3E2FD5120E568B4009EA554 /* localcharset.h */, + B3E2FD5220E568B4009EA554 /* relocatable.c */, + B3E2FD5320E568B4009EA554 /* dcngettext.c */, + B3E2FD5420E568B4009EA554 /* os2compat.c */, + B3E2FD5520E568B4009EA554 /* vasnwprintf.h */, + B3E2FD5620E568B4009EA554 /* locale.alias */, + B3E2FD5720E568B4009EA554 /* printf-args.h */, + B3E2FD5820E568B4009EA554 /* plural-exp.c */, + B3E2FD5920E568B4009EA554 /* COPYING.LIB */, + B3E2FD5A20E568B4009EA554 /* hash-string.h */, + B3E2FD5B20E568B4009EA554 /* setlocale.c */, + B3E2FD5C20E568B4009EA554 /* printf-parse.c */, + B3E2FD5D20E568B4009EA554 /* vasnprintf.c */, + B3E2FD5E20E568B4009EA554 /* bindtextdom.c */, + B3E2FD5F20E568B4009EA554 /* tsearch.c */, + B3E2FD6020E568B4009EA554 /* localealias.c */, + B3E2FD6120E568B4009EA554 /* VERSION */, + B3E2FD6220E568B4009EA554 /* xsize.h */, + B3E2FD6320E568B4009EA554 /* plural.y */, + B3E2FD6420E568B4009EA554 /* libintl.rc */, + B3E2FD6520E568B4009EA554 /* finddomain.c */, + B3E2FD6620E568B4009EA554 /* langprefs.c */, + B3E2FD6720E568B4009EA554 /* plural.c */, + B3E2FD6820E568B4009EA554 /* config.charset */, + B3E2FD6920E568B4009EA554 /* version.c */, + B3E2FD6A20E568B4009EA554 /* osdep.c */, + B3E2FD6B20E568B4009EA554 /* relocatable.h */, + B3E2FD6C20E568B4009EA554 /* localcharset.c */, + B3E2FD6D20E568B4009EA554 /* ref-del.sin */, + B3E2FD6E20E568B4009EA554 /* threadlib.c */, + B3E2FD6F20E568B4009EA554 /* lock.c */, + B3E2FD7020E568B4009EA554 /* loadmsgcat.c */, + B3E2FD7120E568B4009EA554 /* l10nflist.c */, + B3E2FD7220E568B4009EA554 /* Makefile.in */, + B3E2FD7320E568B4009EA554 /* localename.c */, + B3E2FD7420E568B4009EA554 /* os2compat.h */, + B3E2FD7520E568B4009EA554 /* eval-plural.h */, + B3E2FD7620E568B4009EA554 /* verify.h */, + ); + path = intl; + sourceTree = ""; + }; + B3E2FD7720E568B4009EA554 /* projects */ = { + isa = PBXGroup; + children = ( + B3E2FD7820E568B4009EA554 /* team-address */, + B3E2FD7920E568B4009EA554 /* GNOME */, + B3E2FD7E20E568B4009EA554 /* TP */, + B3E2FD8320E568B4009EA554 /* KDE */, + B3E2FD8820E568B4009EA554 /* index */, + ); + path = projects; + sourceTree = ""; + }; + B3E2FD7920E568B4009EA554 /* GNOME */ = { + isa = PBXGroup; + children = ( + B3E2FD7A20E568B4009EA554 /* trigger */, + B3E2FD7B20E568B4009EA554 /* team-address */, + B3E2FD7C20E568B4009EA554 /* teams.html */, + B3E2FD7D20E568B4009EA554 /* teams.url */, + ); + path = GNOME; + sourceTree = ""; + }; + B3E2FD7E20E568B4009EA554 /* TP */ = { + isa = PBXGroup; + children = ( + B3E2FD7F20E568B4009EA554 /* trigger */, + B3E2FD8020E568B4009EA554 /* team-address */, + B3E2FD8120E568B4009EA554 /* teams.html */, + B3E2FD8220E568B4009EA554 /* teams.url */, + ); + path = TP; + sourceTree = ""; + }; + B3E2FD8320E568B4009EA554 /* KDE */ = { + isa = PBXGroup; + children = ( + B3E2FD8420E568B4009EA554 /* trigger */, + B3E2FD8520E568B4009EA554 /* team-address */, + B3E2FD8620E568B4009EA554 /* teams.html */, + B3E2FD8720E568B4009EA554 /* teams.url */, + ); + path = KDE; + sourceTree = ""; + }; + B3E2FD8B20E568B4009EA554 /* styles */ = { + isa = PBXGroup; + children = ( + B3E2FD8C20E568B4009EA554 /* po-emacs-xterm16.css */, + B3E2FD8D20E568B4009EA554 /* po-emacs-xterm.css */, + B3E2FD8E20E568B4009EA554 /* po-default.css */, + B3E2FD8F20E568B4009EA554 /* po-vim.css */, + B3E2FD9020E568B4009EA554 /* po-emacs-xterm256.css */, + B3E2FD9120E568B4009EA554 /* po-emacs-x.css */, + ); + path = styles; + sourceTree = ""; + }; + B3E2FD9220E568B4009EA554 /* po */ = { + isa = PBXGroup; + children = ( + B3E2FD9320E568B4009EA554 /* boldquot.sed */, + B3E2FD9420E568B4009EA554 /* en@boldquot.header */, + B3E2FD9520E568B4009EA554 /* insert-header.sin */, + B3E2FD9620E568B4009EA554 /* quot.sed */, + B3E2FD9720E568B4009EA554 /* Makevars.template */, + B3E2FD9820E568B4009EA554 /* Makefile.in.in */, + B3E2FD9920E568B4009EA554 /* remove-potcdate.sin */, + B3E2FD9A20E568B4009EA554 /* Rules-quot */, + B3E2FD9B20E568B4009EA554 /* en@quot.header */, + ); + path = po; + sourceTree = ""; + }; + B3F8045620E5820B00030497 /* pango */ = { + isa = PBXGroup; + children = ( + B3F8045720E5820B00030497 /* 1.42.1 */, + ); + path = pango; + sourceTree = ""; + }; + B3F8045720E5820B00030497 /* 1.42.1 */ = { + isa = PBXGroup; + children = ( + B3F8045820E5820B00030497 /* INSTALL_RECEIPT.json */, + B3F8045920E5820B00030497 /* bin */, + B3F8045B20E5820B00030497 /* .brew */, + B3F8045D20E5820B00030497 /* ChangeLog */, + B3F8045E20E5820B00030497 /* AUTHORS */, + B3F8045F20E5820B00030497 /* include */, + B3F8048320E5820B00030497 /* README */, + B3F8048420E5820B00030497 /* COPYING */, + B3F8048520E5820B00030497 /* NEWS */, + B3F8048620E5820B00030497 /* lib */, + B3F8049820E5820B00030497 /* share */, + ); + path = 1.42.1; + sourceTree = ""; + }; + B3F8045920E5820B00030497 /* bin */ = { + isa = PBXGroup; + children = ( + B3F8045A20E5820B00030497 /* pango-view */, + ); + path = bin; + sourceTree = ""; + }; + B3F8045B20E5820B00030497 /* .brew */ = { + isa = PBXGroup; + children = ( + B3F8045C20E5820B00030497 /* pango.rb */, + ); + path = .brew; + sourceTree = ""; + }; + B3F8045F20E5820B00030497 /* include */ = { + isa = PBXGroup; + children = ( + B3F8046020E5820B00030497 /* pango-1.0 */, + ); + path = include; + sourceTree = ""; + }; + B3F8046020E5820B00030497 /* pango-1.0 */ = { + isa = PBXGroup; + children = ( + B3F8046120E5820B00030497 /* pango */, + ); + path = "pango-1.0"; + sourceTree = ""; + }; + B3F8046120E5820B00030497 /* pango */ = { + isa = PBXGroup; + children = ( + B3F8046220E5820B00030497 /* pango.h */, + B3F8046320E5820B00030497 /* pangoft2.h */, + B3F8046420E5820B00030497 /* pango-item.h */, + B3F8046520E5820B00030497 /* pango-coverage.h */, + B3F8046620E5820B00030497 /* pango-version-macros.h */, + B3F8046720E5820B00030497 /* pango-language.h */, + B3F8046820E5820B00030497 /* pango-matrix.h */, + B3F8046920E5820B00030497 /* pango-renderer.h */, + B3F8046A20E5820B00030497 /* pango-ot.h */, + B3F8046B20E5820B00030497 /* pango-enum-types.h */, + B3F8046C20E5820B00030497 /* pango-glyph.h */, + B3F8046D20E5820B00030497 /* pango-features.h */, + B3F8046E20E5820B00030497 /* pango-modules.h */, + B3F8046F20E5820B00030497 /* pango-fontset.h */, + B3F8047020E5820B00030497 /* pango-engine.h */, + B3F8047120E5820B00030497 /* pango-break.h */, + B3F8047220E5820B00030497 /* pango-script.h */, + B3F8047320E5820B00030497 /* pangocairo.h */, + B3F8047420E5820B00030497 /* pango-glyph-item.h */, + B3F8047520E5820B00030497 /* pango-bidi-type.h */, + B3F8047620E5820B00030497 /* pango-font.h */, + B3F8047720E5820B00030497 /* pangofc-fontmap.h */, + B3F8047820E5820B00030497 /* pango-context.h */, + B3F8047920E5820B00030497 /* pangofc-font.h */, + B3F8047A20E5820B00030497 /* pango-fontmap.h */, + B3F8047B20E5820B00030497 /* pangofc-decoder.h */, + B3F8047C20E5820B00030497 /* pango-types.h */, + B3F8047D20E5820B00030497 /* pango-attributes.h */, + B3F8047E20E5820B00030497 /* pango-utils.h */, + B3F8047F20E5820B00030497 /* pango-layout.h */, + B3F8048020E5820B00030497 /* pango-tabs.h */, + B3F8048120E5820B00030497 /* pango-gravity.h */, + B3F8048220E5820B00030497 /* pangocoretext.h */, + ); + path = pango; + sourceTree = ""; + }; + B3F8048620E5820B00030497 /* lib */ = { + isa = PBXGroup; + children = ( + B3F8048720E5820B00030497 /* libpango-1.0.0.dylib */, + B3F8048820E5820B00030497 /* libpangoft2-1.0.0.dylib */, + B3F8048920E5820B00030497 /* pkgconfig */, + B3F8048D20E5820B00030497 /* libpangocairo-1.0.dylib */, + B3F8048E20E5820B00030497 /* libpangocairo-1.0.0.dylib */, + B3F8048F20E5820B00030497 /* libpangoft2-1.0.a */, + B3F8049020E5820B00030497 /* libpangocairo-1.0.a */, + B3F8049120E5820B00030497 /* libpangoft2-1.0.dylib */, + B3F8049220E5820B00030497 /* libpango-1.0.dylib */, + B3F8049320E5820B00030497 /* girepository-1.0 */, + B3F8049720E5820B00030497 /* libpango-1.0.a */, + ); + path = lib; + sourceTree = ""; + }; + B3F8048920E5820B00030497 /* pkgconfig */ = { + isa = PBXGroup; + children = ( + B3F8048A20E5820B00030497 /* pangoft2.pc */, + B3F8048B20E5820B00030497 /* pango.pc */, + B3F8048C20E5820B00030497 /* pangocairo.pc */, + ); + path = pkgconfig; + sourceTree = ""; + }; + B3F8049320E5820B00030497 /* girepository-1.0 */ = { + isa = PBXGroup; + children = ( + B3F8049420E5820B00030497 /* PangoCairo-1.0.typelib */, + B3F8049520E5820B00030497 /* Pango-1.0.typelib */, + B3F8049620E5820B00030497 /* PangoFT2-1.0.typelib */, + ); + path = "girepository-1.0"; + sourceTree = ""; + }; + B3F8049820E5820B00030497 /* share */ = { + isa = PBXGroup; + children = ( + B3F8049920E5820B00030497 /* man */, + B3F8049C20E5820B00030497 /* gir-1.0 */, + B3F804A020E5820B00030497 /* doc */, + ); + path = share; + sourceTree = ""; + }; + B3F8049920E5820B00030497 /* man */ = { + isa = PBXGroup; + children = ( + B3F8049A20E5820B00030497 /* man1 */, + ); + path = man; + sourceTree = ""; + }; + B3F8049A20E5820B00030497 /* man1 */ = { + isa = PBXGroup; + children = ( + B3F8049B20E5820B00030497 /* pango-view.1 */, + ); + path = man1; + sourceTree = ""; + }; + B3F8049C20E5820B00030497 /* gir-1.0 */ = { + isa = PBXGroup; + children = ( + B3F8049D20E5820B00030497 /* Pango-1.0.gir */, + B3F8049E20E5820B00030497 /* PangoCairo-1.0.gir */, + B3F8049F20E5820B00030497 /* PangoFT2-1.0.gir */, + ); + path = "gir-1.0"; + sourceTree = ""; + }; + B3F804A020E5820B00030497 /* doc */ = { + isa = PBXGroup; + children = ( + B3F804A120E5820B00030497 /* pango */, + ); + path = doc; + sourceTree = ""; + }; + B3F804A120E5820B00030497 /* pango */ = { + isa = PBXGroup; + children = ( + B3F804A220E5820B00030497 /* api-index-full.html */, + B3F804A320E5820B00030497 /* pango-Engines.html */, + B3F804A420E5820B00030497 /* layout.gif */, + B3F804A520E5820B00030497 /* pango-Coverage-Maps.html */, + B3F804A620E5820B00030497 /* up-insensitive.png */, + B3F804A720E5820B00030497 /* index.html */, + B3F804A820E5820B00030497 /* up.png */, + B3F804A920E5820B00030497 /* PangoMarkupFormat.html */, + B3F804AA20E5820B00030497 /* pango.html */, + B3F804AB20E5820B00030497 /* rendering.html */, + B3F804AC20E5820B00030497 /* pango-Scripts-and-Languages.html */, + B3F804AD20E5820B00030497 /* PangoEngineLang.html */, + B3F804AE20E5820B00030497 /* pango-OpenType-Font-Handling.html */, + B3F804AF20E5820B00030497 /* right-insensitive.png */, + B3F804B020E5820B00030497 /* pango-Version-Checking.html */, + B3F804B120E5820B00030497 /* pango-Bidirectional-Text.html */, + B3F804B220E5820B00030497 /* pango-Fonts.html */, + B3F804B320E5820B00030497 /* pango-Cairo-Rendering.html */, + B3F804B420E5820B00030497 /* pango-Xft-Fonts-and-Rendering.html */, + B3F804B520E5820B00030497 /* home.png */, + B3F804B620E5820B00030497 /* pango-Text-Processing.html */, + B3F804B720E5820B00030497 /* PangoFcFontMap.html */, + B3F804B820E5820B00030497 /* pango-FreeType-Fonts-and-Rendering.html */, + B3F804B920E5820B00030497 /* pango-Tab-Stops.html */, + B3F804BA20E5820B00030497 /* left.png */, + B3F804BB20E5820B00030497 /* lowlevel.html */, + B3F804BC20E5820B00030497 /* annotation-glossary.html */, + B3F804BD20E5820B00030497 /* pango.devhelp2 */, + B3F804BE20E5820B00030497 /* pango-CoreText-Fonts.html */, + B3F804BF20E5820B00030497 /* pango-hierarchy.html */, + B3F804C020E5820B00030497 /* style.css */, + B3F804C120E5820B00030497 /* pango-Glyph-Storage.html */, + B3F804C220E5820B00030497 /* pango-Vertical-Text.html */, + B3F804C320E5820B00030497 /* pango-Win32-Fonts-and-Rendering.html */, + B3F804C420E5820B00030497 /* PangoFcFont.html */, + B3F804C520E5820B00030497 /* PangoFcDecoder.html */, + B3F804C620E5820B00030497 /* pango-Text-Attributes.html */, + B3F804C720E5820B00030497 /* pango-Miscellaneous-Utilities.html */, + B3F804C820E5820B00030497 /* pango-Layout-Objects.html */, + B3F804C920E5820B00030497 /* left-insensitive.png */, + B3F804CA20E5820B00030497 /* rotated-text.png */, + B3F804CB20E5820B00030497 /* PangoEngineShape.html */, + B3F804CC20E5820B00030497 /* right.png */, + B3F804CD20E5820B00030497 /* pango-Modules.html */, + B3F804CE20E5820B00030497 /* PangoRenderer.html */, + ); + path = pango; + sourceTree = ""; + }; + B3F8053E20E584B300030497 /* libpng */ = { + isa = PBXGroup; + children = ( + B3F8053F20E584B300030497 /* 1.6.34 */, + ); + path = libpng; + sourceTree = ""; + }; + B3F8053F20E584B300030497 /* 1.6.34 */ = { + isa = PBXGroup; + children = ( + B3F8054020E584B300030497 /* INSTALL_RECEIPT.json */, + B3F8054220E584B300030497 /* bin */, + B3F8054720E584B300030497 /* .brew */, + B3F8054920E584B300030497 /* CHANGES */, + B3F8054A20E584B300030497 /* include */, + B3F8055220E584B300030497 /* README */, + B3F8055320E584B300030497 /* TODO */, + B3F8055420E584B300030497 /* lib */, + B3F8055D20E584B300030497 /* share */, + ); + path = 1.6.34; + sourceTree = ""; + }; + B3F8054220E584B300030497 /* bin */ = { + isa = PBXGroup; + children = ( + B3F8054320E584B300030497 /* png-fix-itxt */, + B3F8054420E584B300030497 /* libpng16-config */, + B3F8054520E584B300030497 /* pngfix */, + B3F8054620E584B300030497 /* libpng-config */, + ); + path = bin; + sourceTree = ""; + }; + B3F8054720E584B300030497 /* .brew */ = { + isa = PBXGroup; + children = ( + B3F8054820E584B300030497 /* libpng.rb */, + ); + path = .brew; + sourceTree = ""; + }; + B3F8054A20E584B300030497 /* include */ = { + isa = PBXGroup; + children = ( + B3F8054B20E584B300030497 /* libpng16 */, + B3F8054F20E584B300030497 /* png.h */, + B3F8055020E584B300030497 /* pnglibconf.h */, + B3F8055120E584B300030497 /* pngconf.h */, + ); + path = include; + sourceTree = ""; + }; + B3F8054B20E584B300030497 /* libpng16 */ = { + isa = PBXGroup; + children = ( + B3F8054C20E584B300030497 /* png.h */, + B3F8054D20E584B300030497 /* pnglibconf.h */, + B3F8054E20E584B300030497 /* pngconf.h */, + ); + path = libpng16; + sourceTree = ""; + }; + B3F8055420E584B300030497 /* lib */ = { + isa = PBXGroup; + children = ( + B3F8055520E584B300030497 /* pkgconfig */, + B3F8055820E584B300030497 /* libpng16.a */, + B3F8055920E584B300030497 /* libpng.a */, + B3F8055A20E584B300030497 /* libpng16.16.dylib */, + B3F8055B20E584B300030497 /* libpng.dylib */, + B3F8055C20E584B300030497 /* libpng16.dylib */, + ); + path = lib; + sourceTree = ""; + }; + B3F8055520E584B300030497 /* pkgconfig */ = { + isa = PBXGroup; + children = ( + B3F8055620E584B300030497 /* libpng16.pc */, + B3F8055720E584B300030497 /* libpng.pc */, + ); + path = pkgconfig; + sourceTree = ""; + }; + B3F8055D20E584B300030497 /* share */ = { + isa = PBXGroup; + children = ( + B3F8055E20E584B300030497 /* man */, + ); + path = share; + sourceTree = ""; + }; + B3F8055E20E584B300030497 /* man */ = { + isa = PBXGroup; + children = ( + B3F8055F20E584B300030497 /* man5 */, + B3F8056120E584B300030497 /* man3 */, + ); + path = man; + sourceTree = ""; + }; + B3F8055F20E584B300030497 /* man5 */ = { + isa = PBXGroup; + children = ( + B3F8056020E584B300030497 /* png.5 */, + ); + path = man5; + sourceTree = ""; + }; + B3F8056120E584B300030497 /* man3 */ = { + isa = PBXGroup; + children = ( + B3F8056220E584B300030497 /* libpng.3 */, + B3F8056320E584B300030497 /* libpngpf.3 */, + ); + path = man3; + sourceTree = ""; + }; + B3F8058020E5851900030497 /* pcre */ = { + isa = PBXGroup; + children = ( + B3F8058120E5851900030497 /* 8.42 */, + ); + path = pcre; + sourceTree = ""; + }; + B3F8058120E5851900030497 /* 8.42 */ = { + isa = PBXGroup; + children = ( + B3F8058220E5851900030497 /* INSTALL_RECEIPT.json */, + B3F8058320E5851900030497 /* bin */, + B3F8058720E5851900030497 /* .brew */, + B3F8058920E5851900030497 /* ChangeLog */, + B3F8058A20E5851900030497 /* AUTHORS */, + B3F8058B20E5851900030497 /* include */, + B3F8059220E5851900030497 /* README */, + B3F8059320E5851900030497 /* COPYING */, + B3F8059420E5851900030497 /* NEWS */, + B3F8059520E5851900030497 /* lib */, + B3F805AB20E5851900030497 /* LICENCE */, + B3F805AC20E5851900030497 /* share */, + ); + path = 8.42; + sourceTree = ""; + }; + B3F8058320E5851900030497 /* bin */ = { + isa = PBXGroup; + children = ( + B3F8058420E5851900030497 /* pcretest */, + B3F8058520E5851900030497 /* pcre-config */, + B3F8058620E5851900030497 /* pcregrep */, + ); + path = bin; + sourceTree = ""; + }; + B3F8058720E5851900030497 /* .brew */ = { + isa = PBXGroup; + children = ( + B3F8058820E5851900030497 /* pcre.rb */, + ); + path = .brew; + sourceTree = ""; + }; + B3F8058B20E5851900030497 /* include */ = { + isa = PBXGroup; + children = ( + B3F8058C20E5851900030497 /* pcrecpparg.h */, + B3F8058D20E5851900030497 /* pcreposix.h */, + B3F8058E20E5851900030497 /* pcre_scanner.h */, + B3F8058F20E5851900030497 /* pcre_stringpiece.h */, + B3F8059020E5851900030497 /* pcre.h */, + B3F8059120E5851900030497 /* pcrecpp.h */, + ); + path = include; + sourceTree = ""; + }; + B3F8059520E5851900030497 /* lib */ = { + isa = PBXGroup; + children = ( + B3F8059720E5851900030497 /* pkgconfig */, + B3F8059F20E5851900030497 /* libpcre16.a */, + B3F8059620E5851900030497 /* libpcre.1.dylib */, + B3F8059D20E5851900030497 /* libpcreposix.0.dylib */, + B3F8059E20E5851900030497 /* libpcre.dylib */, + B3F805A020E5851900030497 /* libpcrecpp.0.dylib */, + B3F805A120E5851900030497 /* libpcreposix.dylib */, + B3F805A320E5851900030497 /* libpcre16.0.dylib */, + B3F805A420E5851900030497 /* libpcre32.dylib */, + B3F805A520E5851900030497 /* libpcre16.dylib */, + B3F805A720E5851900030497 /* libpcrecpp.dylib */, + B3F805A820E5851900030497 /* libpcre32.0.dylib */, + B3F805A220E5851900030497 /* libpcre32.a */, + B3F805A620E5851900030497 /* libpcreposix.a */, + B3F805A920E5851900030497 /* libpcre.a */, + B3F805AA20E5851900030497 /* libpcrecpp.a */, + ); + path = lib; + sourceTree = ""; + }; + B3F8059720E5851900030497 /* pkgconfig */ = { + isa = PBXGroup; + children = ( + B3F8059820E5851900030497 /* libpcreposix.pc */, + B3F8059920E5851900030497 /* libpcre16.pc */, + B3F8059A20E5851900030497 /* libpcre32.pc */, + B3F8059B20E5851900030497 /* libpcrecpp.pc */, + B3F8059C20E5851900030497 /* libpcre.pc */, + ); + path = pkgconfig; + sourceTree = ""; + }; + B3F805AC20E5851900030497 /* share */ = { + isa = PBXGroup; + children = ( + B3F805AD20E5851900030497 /* man */, + B3F8061720E5851A00030497 /* doc */, + ); + path = share; + sourceTree = ""; + }; + B3F805AD20E5851900030497 /* man */ = { + isa = PBXGroup; + children = ( + B3F805AE20E5851900030497 /* man3 */, + B3F8061320E5851A00030497 /* man1 */, + ); + path = man; + sourceTree = ""; + }; + B3F805AE20E5851900030497 /* man3 */ = { + isa = PBXGroup; + children = ( + B3F805AF20E5851900030497 /* pcre_utf16_to_host_byte_order.3 */, + B3F805B020E5851900030497 /* pcre32_refcount.3 */, + B3F805B120E5851900030497 /* pcre_copy_substring.3 */, + B3F805B220E5851900030497 /* pcre32_get_stringnumber.3 */, + B3F805B320E5851900030497 /* pcre_jit_exec.3 */, + B3F805B420E5851900030497 /* pcre_get_named_substring.3 */, + B3F805B520E5851900030497 /* pcre16_dfa_exec.3 */, + B3F805B620E5851900030497 /* pcrelimits.3 */, + B3F805B720E5851900030497 /* pcre_compile.3 */, + B3F805B820E5851900030497 /* pcresyntax.3 */, + B3F805B920E5851900030497 /* pcreunicode.3 */, + B3F805BA20E5851900030497 /* pcre16_get_stringtable_entries.3 */, + B3F805BB20E5851900030497 /* pcre_pattern_to_host_byte_order.3 */, + B3F805BC20E5851900030497 /* pcre_get_substring_list.3 */, + B3F805BD20E5851900030497 /* pcre.3 */, + B3F805BE20E5851900030497 /* pcre16_get_named_substring.3 */, + B3F805BF20E5851900030497 /* pcre32_exec.3 */, + B3F805C020E5851900030497 /* pcrecpp.3 */, + B3F805C120E5851900030497 /* pcrebuild.3 */, + B3F805C220E5851900030497 /* pcre32_copy_substring.3 */, + B3F805C320E5851900030497 /* pcre16_compile2.3 */, + B3F805C420E5851900030497 /* pcre16_version.3 */, + B3F805C520E5851900030497 /* pcre16_exec.3 */, + B3F805C620E5851900030497 /* pcre32_copy_named_substring.3 */, + B3F805C720E5851900030497 /* pcre32_get_named_substring.3 */, + B3F805C820E5851900030497 /* pcre16_fullinfo.3 */, + B3F805C920E5851900030497 /* pcre_free_substring_list.3 */, + B3F805CA20E5851900030497 /* pcre16_copy_substring.3 */, + B3F805CB20E5851900030497 /* pcrematching.3 */, + B3F805CC20E5851900030497 /* pcre16_refcount.3 */, + B3F805CD20E5851900030497 /* pcreperform.3 */, + B3F805CE20E5851900030497 /* pcre16_jit_stack_alloc.3 */, + B3F805CF20E5851900030497 /* pcre32_get_stringtable_entries.3 */, + B3F805D020E5851900030497 /* pcre32_dfa_exec.3 */, + B3F805D120E5851900030497 /* pcre32.3 */, + B3F805D220E5851900030497 /* pcre16_free_substring_list.3 */, + B3F805D320E5851900030497 /* pcre32_fullinfo.3 */, + B3F805D420E5851900030497 /* pcre_exec.3 */, + B3F805D520E5851900030497 /* pcre16_pattern_to_host_byte_order.3 */, + B3F805D620E5851900030497 /* pcre32_free_substring_list.3 */, + B3F805D720E5851900030497 /* pcre_utf32_to_host_byte_order.3 */, + B3F805D820E5851900030497 /* pcre32_compile.3 */, + B3F805D920E5851900030497 /* pcre32_assign_jit_stack.3 */, + B3F805DA20E5851900030497 /* pcre32_compile2.3 */, + B3F805DB20E5851900030497 /* pcre32_pattern_to_host_byte_order.3 */, + B3F805DC20E5851900030497 /* pcre32_free_study.3 */, + B3F805DD20E5851900030497 /* pcreprecompile.3 */, + B3F805DE20E5851900030497 /* pcrecompat.3 */, + B3F805DF20E5851900030497 /* pcre16_utf16_to_host_byte_order.3 */, + B3F805E020E5851900030497 /* pcre16_free_study.3 */, + B3F805E120E5851900030497 /* pcre16_free_substring.3 */, + B3F805E220E5851900030497 /* pcre16_compile.3 */, + B3F805E320E5851900030497 /* pcre16_config.3 */, + B3F805E420E5851900030497 /* pcre_get_substring.3 */, + B3F805E520E5851900030497 /* pcre32_maketables.3 */, + B3F805E620E5851900030497 /* pcrecallout.3 */, + B3F805E720E5851900030497 /* pcre_jit_stack_alloc.3 */, + B3F805E820E5851A00030497 /* pcre16_jit_stack_free.3 */, + B3F805E920E5851A00030497 /* pcre16_get_substring_list.3 */, + B3F805EA20E5851A00030497 /* pcre16.3 */, + B3F805EB20E5851A00030497 /* pcre_get_stringtable_entries.3 */, + B3F805EC20E5851A00030497 /* pcre32_jit_exec.3 */, + B3F805ED20E5851A00030497 /* pcre16_maketables.3 */, + B3F805EE20E5851A00030497 /* pcre_refcount.3 */, + B3F805EF20E5851A00030497 /* pcre_assign_jit_stack.3 */, + B3F805F020E5851A00030497 /* pcre16_get_stringnumber.3 */, + B3F805F120E5851A00030497 /* pcre_study.3 */, + B3F805F220E5851A00030497 /* pcrestack.3 */, + B3F805F320E5851A00030497 /* pcre32_study.3 */, + B3F805F420E5851A00030497 /* pcreposix.3 */, + B3F805F520E5851A00030497 /* pcre32_jit_stack_alloc.3 */, + B3F805F620E5851A00030497 /* pcre_version.3 */, + B3F805F720E5851A00030497 /* pcredemo.3 */, + B3F805F820E5851A00030497 /* pcre_config.3 */, + B3F805F920E5851A00030497 /* pcre16_study.3 */, + B3F805FA20E5851A00030497 /* pcre_get_stringnumber.3 */, + B3F805FB20E5851A00030497 /* pcre32_version.3 */, + B3F805FC20E5851A00030497 /* pcre_free_substring.3 */, + B3F805FD20E5851A00030497 /* pcre16_assign_jit_stack.3 */, + B3F805FE20E5851A00030497 /* pcre_copy_named_substring.3 */, + B3F805FF20E5851A00030497 /* pcrejit.3 */, + B3F8060020E5851A00030497 /* pcrepartial.3 */, + B3F8060120E5851A00030497 /* pcre32_utf32_to_host_byte_order.3 */, + B3F8060220E5851A00030497 /* pcre_maketables.3 */, + B3F8060320E5851A00030497 /* pcre_compile2.3 */, + B3F8060420E5851A00030497 /* pcre32_get_substring.3 */, + B3F8060520E5851A00030497 /* pcresample.3 */, + B3F8060620E5851A00030497 /* pcre32_jit_stack_free.3 */, + B3F8060720E5851A00030497 /* pcre32_get_substring_list.3 */, + B3F8060820E5851A00030497 /* pcre16_copy_named_substring.3 */, + B3F8060920E5851A00030497 /* pcreapi.3 */, + B3F8060A20E5851A00030497 /* pcre_fullinfo.3 */, + B3F8060B20E5851A00030497 /* pcre16_get_substring.3 */, + B3F8060C20E5851A00030497 /* pcre16_jit_exec.3 */, + B3F8060D20E5851A00030497 /* pcre_dfa_exec.3 */, + B3F8060E20E5851A00030497 /* pcrepattern.3 */, + B3F8060F20E5851A00030497 /* pcre32_free_substring.3 */, + B3F8061020E5851A00030497 /* pcre_free_study.3 */, + B3F8061120E5851A00030497 /* pcre_jit_stack_free.3 */, + B3F8061220E5851A00030497 /* pcre32_config.3 */, + ); + path = man3; + sourceTree = ""; + }; + B3F8061320E5851A00030497 /* man1 */ = { + isa = PBXGroup; + children = ( + B3F8061420E5851A00030497 /* pcretest.1 */, + B3F8061520E5851A00030497 /* pcregrep.1 */, + B3F8061620E5851A00030497 /* pcre-config.1 */, + ); + path = man1; + sourceTree = ""; + }; + B3F8061720E5851A00030497 /* doc */ = { + isa = PBXGroup; + children = ( + B3F8061820E5851A00030497 /* pcre */, + ); + path = doc; + sourceTree = ""; + }; + B3F8061820E5851A00030497 /* pcre */ = { + isa = PBXGroup; + children = ( + B3F8061920E5851A00030497 /* ChangeLog */, + B3F8061A20E5851A00030497 /* AUTHORS */, + B3F8061B20E5851A00030497 /* pcretest.txt */, + B3F8061C20E5851A00030497 /* html */, + B3F8065320E5851A00030497 /* README */, + B3F8065420E5851A00030497 /* pcregrep.txt */, + B3F8065520E5851A00030497 /* COPYING */, + B3F8065620E5851A00030497 /* pcre.txt */, + B3F8065720E5851A00030497 /* NEWS */, + B3F8065820E5851A00030497 /* pcre-config.txt */, + B3F8065920E5851A00030497 /* LICENCE */, + ); + path = pcre; + sourceTree = ""; + }; + B3F8061C20E5851A00030497 /* html */ = { + isa = PBXGroup; + children = ( + B3F8061D20E5851A00030497 /* pcre_get_substring_list.html */, + B3F8061E20E5851A00030497 /* pcre_study.html */, + B3F8061F20E5851A00030497 /* pcrestack.html */, + B3F8062020E5851A00030497 /* pcre_jit_stack_free.html */, + B3F8062120E5851A00030497 /* pcrepartial.html */, + B3F8062220E5851A00030497 /* pcre_copy_substring.html */, + B3F8062320E5851A00030497 /* index.html */, + B3F8062420E5851A00030497 /* pcre_utf16_to_host_byte_order.html */, + B3F8062520E5851A00030497 /* pcrematching.html */, + B3F8062620E5851A00030497 /* pcrejit.html */, + B3F8062720E5851A00030497 /* pcre_pattern_to_host_byte_order.html */, + B3F8062820E5851A00030497 /* pcrecallout.html */, + B3F8062920E5851A00030497 /* pcre_compile2.html */, + B3F8062A20E5851A00030497 /* pcreprecompile.html */, + B3F8062B20E5851A00030497 /* pcre_dfa_exec.html */, + B3F8062C20E5851A00030497 /* pcre_compile.html */, + B3F8062D20E5851A00030497 /* pcre_get_stringnumber.html */, + B3F8062E20E5851A00030497 /* pcre_jit_stack_alloc.html */, + B3F8062F20E5851A00030497 /* pcre_free_substring_list.html */, + B3F8063020E5851A00030497 /* pcrelimits.html */, + B3F8063120E5851A00030497 /* pcrecpp.html */, + B3F8063220E5851A00030497 /* pcre-config.html */, + B3F8063320E5851A00030497 /* pcre16.html */, + B3F8063420E5851A00030497 /* pcre_free_substring.html */, + B3F8063520E5851A00030497 /* pcreapi.html */, + B3F8063620E5851A00030497 /* pcrepattern.html */, + B3F8063720E5851A00030497 /* pcre_get_named_substring.html */, + B3F8063820E5851A00030497 /* pcre_fullinfo.html */, + B3F8063920E5851A00030497 /* pcreperform.html */, + B3F8063A20E5851A00030497 /* NON-AUTOTOOLS-BUILD.txt */, + B3F8063B20E5851A00030497 /* pcre_jit_exec.html */, + B3F8063C20E5851A00030497 /* pcretest.html */, + B3F8063D20E5851A00030497 /* pcregrep.html */, + B3F8063E20E5851A00030497 /* pcre_get_substring.html */, + B3F8063F20E5851A00030497 /* pcre_version.html */, + B3F8064020E5851A00030497 /* pcresample.html */, + B3F8064120E5851A00030497 /* pcre_config.html */, + B3F8064220E5851A00030497 /* pcre_maketables.html */, + B3F8064320E5851A00030497 /* pcreunicode.html */, + B3F8064420E5851A00030497 /* pcrecompat.html */, + B3F8064520E5851A00030497 /* README.txt */, + B3F8064620E5851A00030497 /* pcre.html */, + B3F8064720E5851A00030497 /* pcre_exec.html */, + B3F8064820E5851A00030497 /* pcre_assign_jit_stack.html */, + B3F8064920E5851A00030497 /* pcre_utf32_to_host_byte_order.html */, + B3F8064A20E5851A00030497 /* pcre_copy_named_substring.html */, + B3F8064B20E5851A00030497 /* pcredemo.html */, + B3F8064C20E5851A00030497 /* pcreposix.html */, + B3F8064D20E5851A00030497 /* pcresyntax.html */, + B3F8064E20E5851A00030497 /* pcre32.html */, + B3F8064F20E5851A00030497 /* pcre_refcount.html */, + B3F8065020E5851A00030497 /* pcrebuild.html */, + B3F8065120E5851A00030497 /* pcre_free_study.html */, + B3F8065220E5851A00030497 /* pcre_get_stringtable_entries.html */, + ); + path = html; + sourceTree = ""; + }; + B3F8073020E5855F00030497 /* libffi */ = { + isa = PBXGroup; + children = ( + B3F8073120E5855F00030497 /* 3.2.1 */, + ); + path = libffi; + sourceTree = ""; + }; + B3F8073120E5855F00030497 /* 3.2.1 */ = { + isa = PBXGroup; + children = ( + B3F8073220E5855F00030497 /* INSTALL_RECEIPT.json */, + B3F8073420E5855F00030497 /* .brew */, + B3F8073620E5855F00030497 /* ChangeLog */, + B3F8073720E5855F00030497 /* README */, + B3F8073820E5855F00030497 /* lib */, + B3F8074220E5855F00030497 /* share */, + ); + path = 3.2.1; + sourceTree = ""; + }; + B3F8073420E5855F00030497 /* .brew */ = { + isa = PBXGroup; + children = ( + B3F8073520E5855F00030497 /* libffi.rb */, + ); + path = .brew; + sourceTree = ""; + }; + B3F8073820E5855F00030497 /* lib */ = { + isa = PBXGroup; + children = ( + B3F8073920E5855F00030497 /* pkgconfig */, + B3F8073B20E5855F00030497 /* libffi-3.2.1 */, + B3F8073F20E5855F00030497 /* libffi.dylib */, + B3F8074020E5855F00030497 /* libffi.a */, + B3F8074120E5855F00030497 /* libffi.6.dylib */, + ); + path = lib; + sourceTree = ""; + }; + B3F8073920E5855F00030497 /* pkgconfig */ = { + isa = PBXGroup; + children = ( + B3F8073A20E5855F00030497 /* libffi.pc */, + ); + path = pkgconfig; + sourceTree = ""; + }; + B3F8073B20E5855F00030497 /* libffi-3.2.1 */ = { + isa = PBXGroup; + children = ( + B3F8073C20E5855F00030497 /* include */, + ); + path = "libffi-3.2.1"; + sourceTree = ""; + }; + B3F8073C20E5855F00030497 /* include */ = { + isa = PBXGroup; + children = ( + B3F8073D20E5855F00030497 /* ffitarget.h */, + B3F8073E20E5855F00030497 /* ffi.h */, + ); + path = include; + sourceTree = ""; + }; + B3F8074220E5855F00030497 /* share */ = { + isa = PBXGroup; + children = ( + B3F8074320E5855F00030497 /* man */, + B3F8074920E5855F00030497 /* info */, + ); + path = share; + sourceTree = ""; + }; + B3F8074320E5855F00030497 /* man */ = { + isa = PBXGroup; + children = ( + B3F8074420E5855F00030497 /* man3 */, + ); + path = man; + sourceTree = ""; + }; + B3F8074420E5855F00030497 /* man3 */ = { + isa = PBXGroup; + children = ( + B3F8074520E5855F00030497 /* ffi_call.3 */, + B3F8074620E5855F00030497 /* ffi_prep_cif_var.3 */, + B3F8074720E5855F00030497 /* ffi_prep_cif.3 */, + B3F8074820E5855F00030497 /* ffi.3 */, + ); + path = man3; + sourceTree = ""; + }; + B3F8074920E5855F00030497 /* info */ = { + isa = PBXGroup; + children = ( + B3F8074A20E5855F00030497 /* libffi.info */, + ); + path = info; + sourceTree = ""; + }; + B3F8075B20E5858100030497 /* libcroco */ = { + isa = PBXGroup; + children = ( + B3F8075C20E5858100030497 /* 0.6.12 */, + ); + path = libcroco; + sourceTree = ""; + }; + B3F8075C20E5858100030497 /* 0.6.12 */ = { + isa = PBXGroup; + children = ( + B3F8075D20E5858100030497 /* INSTALL_RECEIPT.json */, + B3F8075E20E5858100030497 /* bin */, + B3F8076120E5858100030497 /* .brew */, + B3F8076320E5858100030497 /* ChangeLog */, + B3F8076420E5858100030497 /* AUTHORS */, + B3F8076520E5858100030497 /* include */, + B3F8078420E5858100030497 /* README */, + B3F8078520E5858100030497 /* TODO */, + B3F8078620E5858100030497 /* COPYING */, + B3F8078720E5858100030497 /* NEWS */, + B3F8078820E5858100030497 /* lib */, + B3F8078E20E5858100030497 /* share */, + ); + path = 0.6.12; + sourceTree = ""; + }; + B3F8075E20E5858100030497 /* bin */ = { + isa = PBXGroup; + children = ( + B3F8075F20E5858100030497 /* csslint-0.6 */, + B3F8076020E5858100030497 /* croco-0.6-config */, + ); + path = bin; + sourceTree = ""; + }; + B3F8076120E5858100030497 /* .brew */ = { + isa = PBXGroup; + children = ( + B3F8076220E5858100030497 /* libcroco.rb */, + ); + path = .brew; + sourceTree = ""; + }; + B3F8076520E5858100030497 /* include */ = { + isa = PBXGroup; + children = ( + B3F8076620E5858100030497 /* libcroco-0.6 */, + ); + path = include; + sourceTree = ""; + }; + B3F8076620E5858100030497 /* libcroco-0.6 */ = { + isa = PBXGroup; + children = ( + B3F8076720E5858100030497 /* libcroco */, + ); + path = "libcroco-0.6"; + sourceTree = ""; + }; + B3F8076720E5858100030497 /* libcroco */ = { + isa = PBXGroup; + children = ( + B3F8076820E5858100030497 /* cr-parser.h */, + B3F8076920E5858100030497 /* cr-token.h */, + B3F8076A20E5858100030497 /* cr-attr-sel.h */, + B3F8076B20E5858100030497 /* cr-tknzr.h */, + B3F8076C20E5858100030497 /* cr-parsing-location.h */, + B3F8076D20E5858100030497 /* cr-doc-handler.h */, + B3F8076E20E5858100030497 /* cr-stylesheet.h */, + B3F8076F20E5858100030497 /* cr-enc-handler.h */, + B3F8077020E5858100030497 /* cr-term.h */, + B3F8077120E5858100030497 /* cr-prop-list.h */, + B3F8077220E5858100030497 /* cr-simple-sel.h */, + B3F8077320E5858100030497 /* cr-declaration.h */, + B3F8077420E5858100030497 /* cr-rgb.h */, + B3F8077520E5858100030497 /* cr-string.h */, + B3F8077620E5858100030497 /* cr-pseudo.h */, + B3F8077720E5858100030497 /* cr-sel-eng.h */, + B3F8077820E5858100030497 /* cr-style.h */, + B3F8077920E5858100030497 /* cr-om-parser.h */, + B3F8077A20E5858100030497 /* cr-statement.h */, + B3F8077B20E5858100030497 /* cr-fonts.h */, + B3F8077C20E5858100030497 /* libcroco.h */, + B3F8077D20E5858100030497 /* cr-input.h */, + B3F8077E20E5858100030497 /* cr-num.h */, + B3F8077F20E5858100030497 /* cr-selector.h */, + B3F8078020E5858100030497 /* cr-cascade.h */, + B3F8078120E5858100030497 /* cr-additional-sel.h */, + B3F8078220E5858100030497 /* cr-utils.h */, + B3F8078320E5858100030497 /* libcroco-config.h */, + ); + path = libcroco; + sourceTree = ""; + }; + B3F8078820E5858100030497 /* lib */ = { + isa = PBXGroup; + children = ( + B3F8078920E5858100030497 /* libcroco-0.6.dylib */, + B3F8078A20E5858100030497 /* pkgconfig */, + B3F8078C20E5858100030497 /* libcroco-0.6.3.dylib */, + B3F8078D20E5858100030497 /* libcroco-0.6.a */, + ); + path = lib; + sourceTree = ""; + }; + B3F8078A20E5858100030497 /* pkgconfig */ = { + isa = PBXGroup; + children = ( + B3F8078B20E5858100030497 /* libcroco-0.6.pc */, + ); + path = pkgconfig; + sourceTree = ""; + }; + B3F8078E20E5858100030497 /* share */ = { + isa = PBXGroup; + children = ( + B3F8078F20E5858100030497 /* gtk-doc */, + ); + path = share; + sourceTree = ""; + }; + B3F8078F20E5858100030497 /* gtk-doc */ = { + isa = PBXGroup; + children = ( + B3F8079020E5858100030497 /* html */, + ); + path = "gtk-doc"; + sourceTree = ""; + }; + B3F8079020E5858100030497 /* html */ = { + isa = PBXGroup; + children = ( + B3F8079120E5858100030497 /* libcroco */, + ); + path = html; + sourceTree = ""; + }; + B3F8079120E5858100030497 /* libcroco */ = { + isa = PBXGroup; + children = ( + B3F8079220E5858100030497 /* libcroco-cr-pseudo.html */, + B3F8079320E5858100030497 /* libcroco-cr-statement.html */, + B3F8079420E5858100030497 /* libcroco.devhelp2 */, + B3F8079520E5858100030497 /* up-insensitive.png */, + B3F8079620E5858100030497 /* libcroco-cr-tknzr.html */, + B3F8079720E5858100030497 /* index.html */, + B3F8079820E5858100030497 /* libcroco-cr-utils.html */, + B3F8079920E5858100030497 /* libcroco-cr-enc-handler.html */, + B3F8079A20E5858100030497 /* libcroco-cr-parsing-location.html */, + B3F8079B20E5858100030497 /* up.png */, + B3F8079C20E5858100030497 /* right-insensitive.png */, + B3F8079D20E5858100030497 /* libcroco-cr-prop-list.html */, + B3F8079E20E5858100030497 /* home.png */, + B3F8079F20E5858100030497 /* ch01.html */, + B3F807A020E5858100030497 /* libcroco-cr-fonts.html */, + B3F807A120E5858100030497 /* libcroco-cr-cascade.html */, + B3F807A220E5858100030497 /* libcroco-cr-simple-sel.html */, + B3F807A320E5858100030497 /* left.png */, + B3F807A420E5858100030497 /* libcroco-cr-term.html */, + B3F807A520E5858100030497 /* libcroco-cr-token.html */, + B3F807A620E5858100030497 /* libcroco-libcroco-config.html */, + B3F807A720E5858100030497 /* libcroco-cr-parser.html */, + B3F807A820E5858100030497 /* style.css */, + B3F807A920E5858100030497 /* libcroco-cr-additional-sel.html */, + B3F807AA20E5858100030497 /* libcroco-cr-attr-sel.html */, + B3F807AB20E5858100030497 /* libcroco-cr-rgb.html */, + B3F807AC20E5858100030497 /* libcroco-cr-style.html */, + B3F807AD20E5858100030497 /* libcroco-cr-num.html */, + B3F807AE20E5858100030497 /* left-insensitive.png */, + B3F807AF20E5858100030497 /* libcroco-cr-stylesheet.html */, + B3F807B020E5858100030497 /* libcroco-cr-declaration.html */, + B3F807B120E5858100030497 /* libcroco-cr-input.html */, + B3F807B220E5858100030497 /* libcroco-cr-doc-handler.html */, + B3F807B320E5858100030497 /* libcroco-cr-sel-eng.html */, + B3F807B420E5858100030497 /* libcroco-cr-om-parser.html */, + B3F807B520E5858100030497 /* libcroco-cr-selector.html */, + B3F807B620E5858100030497 /* right.png */, + B3F807B720E5858100030497 /* libcroco-cr-string.html */, + ); + path = libcroco; + sourceTree = ""; + }; + B3F8080820E585BF00030497 /* fribidi */ = { + isa = PBXGroup; + children = ( + B3F8080920E585BF00030497 /* 1.0.3 */, + ); + path = fribidi; + sourceTree = ""; + }; + B3F8080920E585BF00030497 /* 1.0.3 */ = { + isa = PBXGroup; + children = ( + B3F8080A20E585BF00030497 /* INSTALL_RECEIPT.json */, + B3F8080B20E585BF00030497 /* bin */, + B3F8080D20E585BF00030497 /* .brew */, + B3F8080F20E585BF00030497 /* ChangeLog */, + B3F8081020E585BF00030497 /* AUTHORS */, + B3F8081120E585BF00030497 /* include */, + B3F8082920E585BF00030497 /* README */, + B3F8082A20E585BF00030497 /* TODO */, + B3F8082B20E585BF00030497 /* COPYING */, + B3F8082C20E585BF00030497 /* NEWS */, + B3F8082D20E585BF00030497 /* lib */, + B3F8083320E585BF00030497 /* share */, + ); + path = 1.0.3; + sourceTree = ""; + }; + B3F8080B20E585BF00030497 /* bin */ = { + isa = PBXGroup; + children = ( + B3F8080C20E585BF00030497 /* fribidi */, + ); + path = bin; + sourceTree = ""; + }; + B3F8080D20E585BF00030497 /* .brew */ = { + isa = PBXGroup; + children = ( + B3F8080E20E585BF00030497 /* fribidi.rb */, + ); + path = .brew; + sourceTree = ""; + }; + B3F8081120E585BF00030497 /* include */ = { + isa = PBXGroup; + children = ( + B3F8081220E585BF00030497 /* fribidi */, + ); + path = include; + sourceTree = ""; + }; + B3F8081220E585BF00030497 /* fribidi */ = { + isa = PBXGroup; + children = ( + B3F8081320E585BF00030497 /* fribidi-begindecls.h */, + B3F8081420E585BF00030497 /* fribidi-config.h */, + B3F8081520E585BF00030497 /* fribidi-joining-types.h */, + B3F8081620E585BF00030497 /* fribidi-char-sets.h */, + B3F8081720E585BF00030497 /* fribidi-char-sets-list.h */, + B3F8081820E585BF00030497 /* fribidi-unicode-version.h */, + B3F8081920E585BF00030497 /* fribidi-common.h */, + B3F8081A20E585BF00030497 /* fribidi-unicode.h */, + B3F8081B20E585BF00030497 /* fribidi-types.h */, + B3F8081C20E585BF00030497 /* fribidi-bidi-types.h */, + B3F8081D20E585BF00030497 /* fribidi-deprecated.h */, + B3F8081E20E585BF00030497 /* fribidi-mirroring.h */, + B3F8081F20E585BF00030497 /* fribidi-joining.h */, + B3F8082020E585BF00030497 /* fribidi-enddecls.h */, + B3F8082120E585BF00030497 /* fribidi-flags.h */, + B3F8082220E585BF00030497 /* fribidi.h */, + B3F8082320E585BF00030497 /* fribidi-bidi.h */, + B3F8082420E585BF00030497 /* fribidi-brackets.h */, + B3F8082520E585BF00030497 /* fribidi-bidi-types-list.h */, + B3F8082620E585BF00030497 /* fribidi-arabic.h */, + B3F8082720E585BF00030497 /* fribidi-shape.h */, + B3F8082820E585BF00030497 /* fribidi-joining-types-list.h */, + ); + path = fribidi; + sourceTree = ""; + }; + B3F8082D20E585BF00030497 /* lib */ = { + isa = PBXGroup; + children = ( + B3F8082E20E585BF00030497 /* pkgconfig */, + B3F8083020E585BF00030497 /* libfribidi.dylib */, + B3F8083120E585BF00030497 /* libfribidi.a */, + B3F8083220E585BF00030497 /* libfribidi.0.dylib */, + ); + path = lib; + sourceTree = ""; + }; + B3F8082E20E585BF00030497 /* pkgconfig */ = { + isa = PBXGroup; + children = ( + B3F8082F20E585BF00030497 /* fribidi.pc */, + ); + path = pkgconfig; + sourceTree = ""; + }; + B3F8083320E585BF00030497 /* share */ = { + isa = PBXGroup; + children = ( + B3F8083420E585BF00030497 /* man */, + ); + path = share; + sourceTree = ""; + }; + B3F8083420E585BF00030497 /* man */ = { + isa = PBXGroup; + children = ( + B3F8083520E585BF00030497 /* man3 */, + ); + path = man; + sourceTree = ""; + }; + B3F8083520E585BF00030497 /* man3 */ = { + isa = PBXGroup; + children = ( + B3F8083620E585BF00030497 /* fribidi_get_bidi_type_name.3 */, + B3F8083720E585BF00030497 /* fribidi_get_type_internal.3 */, + B3F8083820E585BF00030497 /* fribidi_shape.3 */, + B3F8083920E585BF00030497 /* fribidi_set_reorder_nsm.3 */, + B3F8083A20E585BF00030497 /* fribidi_get_mirror_char.3 */, + B3F8083B20E585BF00030497 /* fribidi_charset_to_unicode.3 */, + B3F8083C20E585BF00030497 /* fribidi_remove_bidi_marks.3 */, + B3F8083D20E585BF00030497 /* fribidi_parse_charset.3 */, + B3F8083E20E585BF00030497 /* fribidi_set_mirroring.3 */, + B3F8083F20E585BF00030497 /* fribidi_mirroring_status.3 */, + B3F8084020E585BF00030497 /* fribidi_get_par_embedding_levels_ex.3 */, + B3F8084120E585BF00030497 /* fribidi_get_bidi_type.3 */, + B3F8084220E585BF00030497 /* fribidi_get_joining_types.3 */, + B3F8084320E585BF00030497 /* fribidi_shape_mirroring.3 */, + B3F8084420E585BF00030497 /* fribidi_log2vis_get_embedding_levels.3 */, + B3F8084520E585BF00030497 /* fribidi_get_par_direction.3 */, + B3F8084620E585BF00030497 /* fribidi_shape_arabic.3 */, + B3F8084720E585BF00030497 /* fribidi_get_bracket.3 */, + B3F8084820E585BF00030497 /* fribidi_get_par_embedding_levels.3 */, + B3F8084920E585BF00030497 /* fribidi_get_joining_type.3 */, + B3F8084A20E585BF00030497 /* fribidi_unicode_to_charset.3 */, + B3F8084B20E585BF00030497 /* fribidi_reorder_nsm_status.3 */, + B3F8084C20E585BF00030497 /* fribidi_join_arabic.3 */, + B3F8084D20E585BF00030497 /* fribidi_get_bracket_types.3 */, + B3F8084E20E585BF00030497 /* fribidi_log2vis.3 */, + B3F8084F20E585BF00030497 /* fribidi_get_type.3 */, + B3F8085020E585BF00030497 /* fribidi_set_debug.3 */, + B3F8085120E585BF00030497 /* fribidi_get_bidi_types.3 */, + B3F8085220E585BF00030497 /* fribidi_reorder_line.3 */, + B3F8085320E585BF00030497 /* fribidi_debug_status.3 */, + B3F8085420E585BF00030497 /* fribidi_get_joining_type_name.3 */, + ); + path = man3; + sourceTree = ""; + }; + B3F8092520E585E800030497 /* harfbuzz */ = { + isa = PBXGroup; + children = ( + B3F8092620E585E800030497 /* 1.7.6_2 */, + ); + path = harfbuzz; + sourceTree = ""; + }; + B3F8092620E585E800030497 /* 1.7.6_2 */ = { + isa = PBXGroup; + children = ( + B3F8092720E585E800030497 /* INSTALL_RECEIPT.json */, + B3F8092820E585E800030497 /* bin */, + B3F8092D20E585E800030497 /* .brew */, + B3F8092F20E585E800030497 /* ChangeLog */, + B3F8093020E585E800030497 /* AUTHORS */, + B3F8093120E585E800030497 /* include */, + B3F8095220E585E800030497 /* README */, + B3F8095320E585E800030497 /* TODO */, + B3F8095420E585E800030497 /* COPYING */, + B3F8095520E585E800030497 /* NEWS */, + B3F8095620E585E800030497 /* lib */, + B3F8096D20E585E800030497 /* share */, + ); + path = 1.7.6_2; + sourceTree = ""; + }; + B3F8092820E585E800030497 /* bin */ = { + isa = PBXGroup; + children = ( + B3F8092920E585E800030497 /* hb-ot-shape-closure */, + B3F8092A20E585E800030497 /* hb-view */, + B3F8092B20E585E800030497 /* hb-shape */, + B3F8092C20E585E800030497 /* hb-subset */, + ); + path = bin; + sourceTree = ""; + }; + B3F8092D20E585E800030497 /* .brew */ = { + isa = PBXGroup; + children = ( + B3F8092E20E585E800030497 /* harfbuzz.rb */, + ); + path = .brew; + sourceTree = ""; + }; + B3F8093120E585E800030497 /* include */ = { + isa = PBXGroup; + children = ( + B3F8093220E585E800030497 /* harfbuzz */, + ); + path = include; + sourceTree = ""; + }; + B3F8093220E585E800030497 /* harfbuzz */ = { + isa = PBXGroup; + children = ( + B3F8093320E585E800030497 /* hb-buffer.h */, + B3F8093420E585E800030497 /* hb-set.h */, + B3F8093520E585E800030497 /* hb-face.h */, + B3F8093620E585E800030497 /* hb-gobject-structs.h */, + B3F8093720E585E800030497 /* hb-common.h */, + B3F8093820E585E800030497 /* hb-version.h */, + B3F8093920E585E800030497 /* hb-font.h */, + B3F8093A20E585E800030497 /* hb-coretext.h */, + B3F8093B20E585E800030497 /* hb-ot-tag.h */, + B3F8093C20E585E800030497 /* hb-deprecated.h */, + B3F8093D20E585E800030497 /* hb-ot.h */, + B3F8093E20E585E800030497 /* hb-ot-layout.h */, + B3F8093F20E585E800030497 /* hb-ot-var.h */, + B3F8094020E585E800030497 /* hb-gobject-enums.h */, + B3F8094120E585E800030497 /* hb-shape.h */, + B3F8094220E585E800030497 /* hb-subset-plan.hh */, + B3F8094320E585E800030497 /* hb-shape-plan.h */, + B3F8094420E585E800030497 /* hb-ot-font.h */, + B3F8094520E585E800030497 /* hb-unicode.h */, + B3F8094620E585E800030497 /* hb-ot-shape.h */, + B3F8094720E585E800030497 /* hb-blob.h */, + B3F8094820E585E800030497 /* hb-subset-private.hh */, + B3F8094920E585E800030497 /* hb.h */, + B3F8094A20E585E800030497 /* hb-glib.h */, + B3F8094B20E585E800030497 /* hb-subset-glyf.hh */, + B3F8094C20E585E800030497 /* hb-graphite2.h */, + B3F8094D20E585E800030497 /* hb-subset.h */, + B3F8094E20E585E800030497 /* hb-gobject.h */, + B3F8094F20E585E800030497 /* hb-ot-math.h */, + B3F8095020E585E800030497 /* hb-icu.h */, + B3F8095120E585E800030497 /* hb-ft.h */, + ); + path = harfbuzz; + sourceTree = ""; + }; + B3F8095620E585E800030497 /* lib */ = { + isa = PBXGroup; + children = ( + B3F8095720E585E800030497 /* libharfbuzz-icu.a */, + B3F8095820E585E800030497 /* libharfbuzz-icu.dylib */, + B3F8095920E585E800030497 /* libharfbuzz-subset.0.dylib */, + B3F8095A20E585E800030497 /* pkgconfig */, + B3F8095F20E585E800030497 /* libharfbuzz-gobject.0.dylib */, + B3F8096020E585E800030497 /* libharfbuzz-gobject.a */, + B3F8096120E585E800030497 /* cmake */, + B3F8096420E585E800030497 /* libharfbuzz.0.dylib */, + B3F8096520E585E800030497 /* libharfbuzz.a */, + B3F8096620E585E800030497 /* libharfbuzz-subset.a */, + B3F8096720E585E800030497 /* libharfbuzz-gobject.dylib */, + B3F8096820E585E800030497 /* girepository-1.0 */, + B3F8096A20E585E800030497 /* libharfbuzz.dylib */, + B3F8096B20E585E800030497 /* libharfbuzz-icu.0.dylib */, + B3F8096C20E585E800030497 /* libharfbuzz-subset.dylib */, + ); + path = lib; + sourceTree = ""; + }; + B3F8095A20E585E800030497 /* pkgconfig */ = { + isa = PBXGroup; + children = ( + B3F8095B20E585E800030497 /* harfbuzz-gobject.pc */, + B3F8095C20E585E800030497 /* harfbuzz-subset.pc */, + B3F8095D20E585E800030497 /* harfbuzz.pc */, + B3F8095E20E585E800030497 /* harfbuzz-icu.pc */, + ); + path = pkgconfig; + sourceTree = ""; + }; + B3F8096120E585E800030497 /* cmake */ = { + isa = PBXGroup; + children = ( + B3F8096220E585E800030497 /* harfbuzz */, + ); + path = cmake; + sourceTree = ""; + }; + B3F8096220E585E800030497 /* harfbuzz */ = { + isa = PBXGroup; + children = ( + B3F8096320E585E800030497 /* harfbuzz-config.cmake */, + ); + path = harfbuzz; + sourceTree = ""; + }; + B3F8096820E585E800030497 /* girepository-1.0 */ = { + isa = PBXGroup; + children = ( + B3F8096920E585E800030497 /* HarfBuzz-0.0.typelib */, + ); + path = "girepository-1.0"; + sourceTree = ""; + }; + B3F8096D20E585E800030497 /* share */ = { + isa = PBXGroup; + children = ( + B3F8096E20E585E800030497 /* gtk-doc */, + B3F809C920E585E900030497 /* gir-1.0 */, + ); + path = share; + sourceTree = ""; + }; + B3F8096E20E585E800030497 /* gtk-doc */ = { + isa = PBXGroup; + children = ( + B3F8096F20E585E800030497 /* html */, + ); + path = "gtk-doc"; + sourceTree = ""; + }; + B3F8096F20E585E800030497 /* html */ = { + isa = PBXGroup; + children = ( + B3F8097020E585E800030497 /* harfbuzz */, + ); + path = html; + sourceTree = ""; + }; + B3F8097020E585E800030497 /* harfbuzz */ = { + isa = PBXGroup; + children = ( + B3F8097120E585E800030497 /* api-index-full.html */, + B3F8097220E585E800030497 /* what-is-harfbuzz.html */, + B3F8097320E585E800030497 /* harfbuzz-Shaping.html */, + B3F8097420E585E800030497 /* api-index-1-0-5.html */, + B3F8097520E585E800030497 /* api-index-1-4-2.html */, + B3F8097620E585E800030497 /* plans-and-caching.html */, + B3F8097720E585E800030497 /* what-about-the-other-scripts.html */, + B3F8097820E585E800030497 /* deprecated-api-index.html */, + B3F8097920E585E800030497 /* up-insensitive.png */, + B3F8097A20E585E800030497 /* clusters.html */, + B3F8097B20E585E800030497 /* api-index-0-9-28.html */, + B3F8097C20E585E800030497 /* harfbuzz.devhelp2 */, + B3F8097D20E585E800030497 /* index.html */, + B3F8097E20E585E800030497 /* api-index-1-4-3.html */, + B3F8097F20E585E800030497 /* harfbuzz-hb-common.html */, + B3F8098020E585E800030497 /* shaping-and-shape-plans.html */, + B3F8098120E585E800030497 /* api-index-0-9-7.html */, + B3F8098220E585E800030497 /* up.png */, + B3F8098320E585E800030497 /* harfbuzz-hb-glib.html */, + B3F8098420E585E800030497 /* using-your-own-font-functions.html */, + B3F8098520E585E800030497 /* harfbuzz-hb-ot.html */, + B3F8098620E585E800030497 /* api-index-1-5-0.html */, + B3F8098720E585E800030497 /* harfbuzz-hb-ot-layout.html */, + B3F8098820E585E800030497 /* api-index-0-9-42.html */, + B3F8098920E585E800030497 /* customizing-unicode-functions.html */, + B3F8098A20E585E800030497 /* fonts-and-faces.html */, + B3F8098B20E585E800030497 /* api-index-0-9-39.html */, + B3F8098C20E585E800030497 /* level-2.html */, + B3F8098D20E585E800030497 /* right-insensitive.png */, + B3F8098E20E585E800030497 /* harfbuzz-hb-font.html */, + B3F8098F20E585E800030497 /* pt02.html */, + B3F8099020E585E800030497 /* harfbuzz-hb-face.html */, + B3F8099120E585E800030497 /* harfbuzz-hb-graphite2.html */, + B3F8099220E585E800030497 /* home.png */, + B3F8099320E585E800030497 /* api-index-0-9-22.html */, + B3F8099420E585E800030497 /* install-harfbuzz.html */, + B3F8099520E585E800030497 /* harfbuzz-hb-ot-math.html */, + B3F8099620E585E800030497 /* reordering-in-levels-0-and-1.html */, + B3F8099720E585E800030497 /* api-index-1-2-3.html */, + B3F8099820E585E800030497 /* api-index-0-9-38.html */, + B3F8099920E585E800030497 /* object-tree.html */, + B3F8099A20E585E800030497 /* left.png */, + B3F8099B20E585E800030497 /* the-distinction-between-levels-0-and-1.html */, + B3F8099C20E585E800030497 /* api-index-0-9-2.html */, + B3F8099D20E585E800030497 /* harfbuzz-hb-coretext.html */, + B3F8099E20E585E800030497 /* harfbuzz-hb-unicode.html */, + B3F8099F20E585E800030497 /* why-is-it-called-harfbuzz.html */, + B3F809A020E585E800030497 /* harfbuzz-hb-uniscribe.html */, + B3F809A120E585E800030497 /* harfbuzz-hb-icu.html */, + B3F809A220E585E800030497 /* annotation-glossary.html */, + B3F809A320E585E800030497 /* setting-buffer-properties.html */, + B3F809A420E585E800030497 /* harfbuzz-hb-blob.html */, + B3F809A520E585E800030497 /* buffers-language-script-and-direction.html */, + B3F809A620E585E800030497 /* harfbuzz-hb-ot-tag.html */, + B3F809A720E585E800030497 /* pt01.html */, + B3F809A820E585E800030497 /* harfbuzz-hb-shape-plan.html */, + B3F809A920E585E800030497 /* adding-text-to-the-buffer.html */, + B3F809AA20E585E800030497 /* api-index-0-9-20.html */, + B3F809AB20E585E800030497 /* harfbuzz-hb.html */, + B3F809AC20E585E800030497 /* style.css */, + B3F809AD20E585E800030497 /* api-index-0-9-41.html */, + B3F809AE20E585E800030497 /* HarfBuzz.svg */, + B3F809AF20E585E800030497 /* harfbuzz-hb-set.html */, + B3F809B020E585E800030497 /* using-harfbuzzs-native-opentype-implementation.html */, + B3F809B120E585E800030497 /* api-index-0-9-31.html */, + B3F809B220E585E800030497 /* harfbuzz-hb-ot-font.html */, + B3F809B320E585E800030497 /* harfbuzz-hb-gobject.html */, + B3F809B420E585E800030497 /* HarfBuzz.png */, + B3F809B520E585E800030497 /* api-index-0-9-8.html */, + B3F809B620E585E800030497 /* harfbuzz-Buffers.html */, + B3F809B720E585E800030497 /* building.html */, + B3F809B820E585E800030497 /* harfbuzz-hb-ft.html */, + B3F809B920E585E900030497 /* left-insensitive.png */, + B3F809BA20E585E900030497 /* api-index-0-9-11.html */, + B3F809BB20E585E900030497 /* ch08.html */, + B3F809BC20E585E900030497 /* api-index-1-1-3.html */, + B3F809BD20E585E900030497 /* api-index-1-1-2.html */, + B3F809BE20E585E900030497 /* harfbuzz-hb-deprecated.html */, + B3F809BF20E585E900030497 /* harfbuzz-hb-ot-shape.html */, + B3F809C020E585E900030497 /* api-index-0-9-5.html */, + B3F809C120E585E900030497 /* api-index-0-9-10.html */, + B3F809C220E585E900030497 /* harfbuzz-hb-version.html */, + B3F809C320E585E900030497 /* api-index-1-3-3.html */, + B3F809C420E585E900030497 /* api-index-1-6-0.html */, + B3F809C520E585E900030497 /* right.png */, + B3F809C620E585E900030497 /* hello-harfbuzz.html */, + B3F809C720E585E900030497 /* a-clustering-example-for-levels-0-and-1.html */, + B3F809C820E585E900030497 /* api-index-0-9-30.html */, + ); + path = harfbuzz; + sourceTree = ""; + }; + B3F809C920E585E900030497 /* gir-1.0 */ = { + isa = PBXGroup; + children = ( + B3F809CA20E585E900030497 /* HarfBuzz-0.0.gir */, + ); + path = "gir-1.0"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + B37C74701F8C5ADA00DF505B /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + B3136DD61F90E45F0002B7AB /* Speculid_Mac_Framework.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B37C74861F8C5B5C00DF505B /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + B3E2069A20E568C5009EA554 /* gsocket.h in Headers */, + B3E2069D20E568C5009EA554 /* ginetaddress.h in Headers */, + B3E2066820E568C4009EA554 /* gdbusnamewatching.h in Headers */, + B31BD96720E7E0D900A560C2 /* listformatter.h in Headers */, + B31BD93E20E7E0D900A560C2 /* timezone.h in Headers */, + B3E2069720E568C5009EA554 /* gioenumtypes.h in Headers */, + B3E2061320E568C4009EA554 /* gmem.h in Headers */, + B3E2065920E568C4009EA554 /* gpropertyaction.h in Headers */, + B3E204FD20E568C3009EA554 /* gdk-pixbuf-marshal.h in Headers */, + B3F804EC20E5820B00030497 /* pango-fontmap.h in Headers */, + B3E205E120E568C4009EA554 /* gbinding.h in Headers */, + B3E204C720E568C3009EA554 /* ftmodule.h in Headers */, + B31BD97D20E7E0D900A560C2 /* uidna.h in Headers */, + B31BD96620E7E0D900A560C2 /* udatpg.h in Headers */, + B31BD91820E7E0D800A560C2 /* ucsdet.h in Headers */, + B31BD98220E7E0D900A560C2 /* ucasemap.h in Headers */, + B3E204CA20E568C3009EA554 /* fttrigon.h in Headers */, + B3F8056F20E584B300030497 /* png.h in Headers */, + B3E2066C20E568C4009EA554 /* gioenums.h in Headers */, + B31BD9B020E7E0D900A560C2 /* scientificnumberformatter.h in Headers */, + B31BD95220E7E0D900A560C2 /* uloc.h in Headers */, + B3E2077C20E568C5009EA554 /* cairo-tee.h in Headers */, + B37C74A91F8C5C7400DF505B /* CairoInterface.h in Headers */, + B3F80B0520E585E900030497 /* hb-face.h in Headers */, + B3F807D120E5858200030497 /* cr-fonts.h in Headers */, + B3F807D620E5858200030497 /* cr-cascade.h in Headers */, + B37C74A71F8C5C7400DF505B /* PDFSurface.h in Headers */, + B3E206A520E568C5009EA554 /* gdatainputstream.h in Headers */, + B3E2064D20E568C4009EA554 /* gproxy.h in Headers */, + B3E2068620E568C5009EA554 /* gsocketclient.h in Headers */, + B3F808AA20E585C000030497 /* fribidi-char-sets-list.h in Headers */, + B3E205EE20E568C4009EA554 /* gmarshal.h in Headers */, + B31BD92620E7E0D800A560C2 /* usetiter.h in Headers */, + B3E2065F20E568C4009EA554 /* gdbusinterface.h in Headers */, + B3E2066320E568C4009EA554 /* gdbusproxy.h in Headers */, + B3E206A620E568C5009EA554 /* gtlsdatabase.h in Headers */, + B34E83041F8FD90C0032268F /* GlibError.h in Headers */, + B3E2064020E568C4009EA554 /* gthread.h in Headers */, + B3E207EE20E568C6009EA554 /* fontconfig.h in Headers */, + B31BD99F20E7E0D900A560C2 /* locid.h in Headers */, + B31BD9AD20E7E0D900A560C2 /* parseerr.h in Headers */, + B3F804EA20E5820B00030497 /* pango-context.h in Headers */, + B31BD93620E7E0D900A560C2 /* utf32.h in Headers */, + B3E2063420E568C4009EA554 /* gi18n.h in Headers */, + B31BD92920E7E0D800A560C2 /* dtintrv.h in Headers */, + B3E2062D20E568C4009EA554 /* gprintf.h in Headers */, + B3E206B020E568C5009EA554 /* gzlibdecompressor.h in Headers */, + B3E206AA20E568C5009EA554 /* gsrvtarget.h in Headers */, + B3E206B720E568C5009EA554 /* gnetworking.h in Headers */, + B3E2064620E568C4009EA554 /* gsimpleactiongroup.h in Headers */, + B3E2060620E568C4009EA554 /* gstdio.h in Headers */, + B3E2117520E568D0009EA554 /* rsvg-cairo.h in Headers */, + B31BD91A20E7E0D800A560C2 /* ubrk.h in Headers */, + B3E206B120E568C5009EA554 /* gdbusutils.h in Headers */, + B31BD9C520E7E0D900A560C2 /* measfmt.h in Headers */, + B31BD97920E7E0D900A560C2 /* dbbi.h in Headers */, + B3F808A620E585C000030497 /* fribidi-begindecls.h in Headers */, + B3E206AF20E568C5009EA554 /* gfilterinputstream.h in Headers */, + B3E2069620E568C5009EA554 /* gmemoryinputstream.h in Headers */, + B3E2066620E568C4009EA554 /* gactionmap.h in Headers */, + B3E204EA20E568C3009EA554 /* ftlcdfil.h in Headers */, + B3E205D620E568C4009EA554 /* gunixinputstream.h in Headers */, + B3F80B2020E585EA00030497 /* hb-icu.h in Headers */, + B31BD98320E7E0D900A560C2 /* ucoleitr.h in Headers */, + B3E205E620E568C4009EA554 /* gtype.h in Headers */, + B31BD92120E7E0D800A560C2 /* unirepl.h in Headers */, + B31BD99320E7E0D900A560C2 /* icudataver.h in Headers */, + B3E209FC20E568C8009EA554 /* libintl.h in Headers */, + B3F804D720E5820B00030497 /* pango-coverage.h in Headers */, + B34E82FF1F8FD6860032268F /* ImageFileProtocol.h in Headers */, + B31BD9BC20E7E0D900A560C2 /* std_string.h in Headers */, + B31BD98520E7E0D900A560C2 /* unum.h in Headers */, + B3F80B1920E585E900030497 /* hb.h in Headers */, + B3F807D820E5858200030497 /* cr-utils.h in Headers */, + B31BD95020E7E0D900A560C2 /* umisc.h in Headers */, + B3E206D320E568C5009EA554 /* ginetaddressmask.h in Headers */, + B3E2069520E568C5009EA554 /* gdtlsclientconnection.h in Headers */, + B3E2062B20E568C4009EA554 /* glib-autocleanups.h in Headers */, + B3E206D020E568C5009EA554 /* gdbusactiongroup.h in Headers */, + B3E2063F20E568C4009EA554 /* gcache.h in Headers */, + B3E206C620E568C5009EA554 /* gsimplepermission.h in Headers */, + B3F80B1320E585E900030497 /* hb-shape-plan.h in Headers */, + B31BD9C420E7E0D900A560C2 /* ulistformatter.h in Headers */, + B3F808AF20E585C000030497 /* fribidi-bidi-types.h in Headers */, + B3E205DD20E568C4009EA554 /* gsignal.h in Headers */, + B31BD96E20E7E0D900A560C2 /* caniter.h in Headers */, + B31BD96220E7E0D900A560C2 /* dcfmtsym.h in Headers */, + B3F808BB20E585C000030497 /* fribidi-joining-types-list.h in Headers */, + B3E206B920E568C5009EA554 /* gdbuserror.h in Headers */, + B31BD92220E7E0D800A560C2 /* ptypes.h in Headers */, + B3F807CD20E5858200030497 /* cr-sel-eng.h in Headers */, + B3F807C220E5858200030497 /* cr-parsing-location.h in Headers */, + B31BD98020E7E0D900A560C2 /* char16ptr.h in Headers */, + B3F80B1820E585E900030497 /* hb-subset-private.hh in Headers */, + B3E209FB20E568C8009EA554 /* gettext-po.h in Headers */, + B3E2077E20E568C5009EA554 /* cairo-ps.h in Headers */, + B3E2069F20E568C5009EA554 /* gfileiostream.h in Headers */, + B31BD97820E7E0D900A560C2 /* dtptngen.h in Headers */, + B34E83091F8FDCB80032268F /* Dimension.h in Headers */, + B3E204C420E568C3009EA554 /* ftheader.h in Headers */, + B31BD93120E7E0D900A560C2 /* fpositer.h in Headers */, + B3E2077220E568C5009EA554 /* cairo-script-interpreter.h in Headers */, + B31BD9BD20E7E0D900A560C2 /* utf8.h in Headers */, + B31BD99620E7E0D900A560C2 /* ushape.h in Headers */, + B3E2063020E568C4009EA554 /* gtimezone.h in Headers */, + B3E2050320E568C3009EA554 /* gdk-pixbuf-enum-types.h in Headers */, + B3F808A720E585C000030497 /* fribidi-config.h in Headers */, + B3E2065720E568C4009EA554 /* gseekable.h in Headers */, + B3E2066F20E568C5009EA554 /* gdbusserver.h in Headers */, + B3E205D520E568C4009EA554 /* gunixcredentialsmessage.h in Headers */, + B3E2050120E568C3009EA554 /* gdk-pixbuf-loader.h in Headers */, + B3F808A920E585C000030497 /* fribidi-char-sets.h in Headers */, + B3E206B820E568C5009EA554 /* gtlsfiledatabase.h in Headers */, + B3E204E820E568C3009EA554 /* ftlist.h in Headers */, + B31BD92720E7E0D800A560C2 /* errorcode.h in Headers */, + B3E2062820E568C4009EA554 /* gversion.h in Headers */, + B3E2117720E568D0009EA554 /* rsvg.h in Headers */, + B31BD98A20E7E0D900A560C2 /* datefmt.h in Headers */, + B3F804F120E5820B00030497 /* pango-layout.h in Headers */, + B3F807D920E5858200030497 /* libcroco-config.h in Headers */, + B3E205D920E568C4009EA554 /* gfiledescriptorbased.h in Headers */, + B3F808B520E585C000030497 /* fribidi.h in Headers */, + B3E207EF20E568C6009EA554 /* fcprivate.h in Headers */, + B31BD96420E7E0D900A560C2 /* decimfmt.h in Headers */, + B31BD95120E7E0D900A560C2 /* reldatefmt.h in Headers */, + B3E2060420E568C4009EA554 /* gstrfuncs.h in Headers */, + B31BD9C220E7E0D900A560C2 /* currunit.h in Headers */, + B31BD95A20E7E0D900A560C2 /* enumset.h in Headers */, + B3E204E620E568C3009EA554 /* ftmoderr.h in Headers */, + B31BD93020E7E0D900A560C2 /* ucal.h in Headers */, + B31BD97620E7E0D900A560C2 /* idna.h in Headers */, + B31BD98120E7E0D900A560C2 /* symtable.h in Headers */, + B3F804D620E5820B00030497 /* pango-item.h in Headers */, + B3E2060F20E568C4009EA554 /* gscanner.h in Headers */, + B31BD94F20E7E0D900A560C2 /* chariter.h in Headers */, + B31BD92420E7E0D800A560C2 /* dtitvfmt.h in Headers */, + B3E204DA20E568C3009EA554 /* ttnameid.h in Headers */, + B3E206B320E568C5009EA554 /* gdbusobjectskeleton.h in Headers */, + B3E2063320E568C4009EA554 /* gwin32.h in Headers */, + B3E2067A20E568C5009EA554 /* gdtlsconnection.h in Headers */, + B3F804E720E5820B00030497 /* pango-bidi-type.h in Headers */, + B3E206B420E568C5009EA554 /* gvfs.h in Headers */, + B31BD98D20E7E0D900A560C2 /* currpinf.h in Headers */, + B3E206C020E568C5009EA554 /* gtlspassword.h in Headers */, + B31BD98420E7E0D900A560C2 /* compactdecimalformat.h in Headers */, + B3E206B620E568C5009EA554 /* gtlsclientconnection.h in Headers */, + B3E2068720E568C5009EA554 /* gappinfo.h in Headers */, + B3E2061D20E568C4009EA554 /* gtypes.h in Headers */, + B3E2060D20E568C4009EA554 /* ghash.h in Headers */, + B31BD99820E7E0D900A560C2 /* ugender.h in Headers */, + B3F804F420E5820B00030497 /* pangocoretext.h in Headers */, + B3E2061020E568C4009EA554 /* ggettext.h in Headers */, + B3E205DE20E568C4009EA554 /* genums.h in Headers */, + B31BD94920E7E0D900A560C2 /* sortkey.h in Headers */, + B31BD98F20E7E0D900A560C2 /* tmutfmt.h in Headers */, + B31BD99C20E7E0D900A560C2 /* simpleformatter.h in Headers */, + B3E205DF20E568C4009EA554 /* gclosure.h in Headers */, + B3136DD91F90E96A0002B7AB /* cairo.h in Headers */, + B3E2064120E568C4009EA554 /* gmodule.h in Headers */, + B3F807D320E5858200030497 /* cr-input.h in Headers */, + B3E205EA20E568C4009EA554 /* gvalue.h in Headers */, + B31BD9AA20E7E0D900A560C2 /* region.h in Headers */, + B3E2064E20E568C4009EA554 /* gio.h in Headers */, + B31BD9A920E7E0D900A560C2 /* uspoof.h in Headers */, + B3E2062120E568C4009EA554 /* gquark.h in Headers */, + B37C74B21F8C5C7400DF505B /* PNGImageHandle.h in Headers */, + B3F807C820E5858200030497 /* cr-simple-sel.h in Headers */, + B3E2065A20E568C4009EA554 /* gsimpleiostream.h in Headers */, + B3E2067320E568C5009EA554 /* gsettingsbackend.h in Headers */, + B3E206AC20E568C5009EA554 /* gfile.h in Headers */, + B3E2063120E568C4009EA554 /* gmacros.h in Headers */, + B3E2060920E568C4009EA554 /* gdataset.h in Headers */, + B3F808B320E585C000030497 /* fribidi-enddecls.h in Headers */, + B3E2069B20E568C5009EA554 /* gmountoperation.h in Headers */, + B3E2065120E568C4009EA554 /* gdatagrambased.h in Headers */, + B31BD99E20E7E0D900A560C2 /* curramt.h in Headers */, + B3E204B020E568C3009EA554 /* pixman.h in Headers */, + B3E206C720E568C5009EA554 /* gconverteroutputstream.h in Headers */, + B3E2064420E568C4009EA554 /* gconverterinputstream.h in Headers */, + B31BD9A220E7E0D900A560C2 /* ubidi.h in Headers */, + B31BD97B20E7E0D900A560C2 /* uversion.h in Headers */, + B31BD91D20E7E0D800A560C2 /* ucat.h in Headers */, + B3F80B0B20E585E900030497 /* hb-ot-tag.h in Headers */, + B3E2068920E568C5009EA554 /* gpollableutils.h in Headers */, + B31BD95820E7E0D900A560C2 /* gregocal.h in Headers */, + B31BD91B20E7E0D800A560C2 /* ufieldpositer.h in Headers */, + B3F80B0920E585E900030497 /* hb-font.h in Headers */, + B3F808AD20E585C000030497 /* fribidi-unicode.h in Headers */, + B3E2065220E568C4009EA554 /* gcontenttype.h in Headers */, + B3E2069920E568C5009EA554 /* gliststore.h in Headers */, + B3E2060E20E568C4009EA554 /* gqsort.h in Headers */, + B3E205E920E568C4009EA554 /* gtypemodule.h in Headers */, + B3E205E220E568C4009EA554 /* gtypeplugin.h in Headers */, + B31BD96020E7E0D900A560C2 /* regex.h in Headers */, + B3F808AB20E585C000030497 /* fribidi-unicode-version.h in Headers */, + B3E204EB20E568C3009EA554 /* ftbdf.h in Headers */, + B3F807C120E5858200030497 /* cr-tknzr.h in Headers */, + B3E206AB20E568C5009EA554 /* gtlscertificate.h in Headers */, + B3E204C920E568C3009EA554 /* ftbzip2.h in Headers */, + B3F807C920E5858200030497 /* cr-declaration.h in Headers */, + B3E205E020E568C4009EA554 /* gvaluearray.h in Headers */, + B31BD99120E7E0D900A560C2 /* ustringtrie.h in Headers */, + B37C74B01F8C5C7400DF505B /* ImageHandle.h in Headers */, + B3E204FF20E568C3009EA554 /* gdk-pixbuf.h in Headers */, + B3E2077520E568C5009EA554 /* cairo.h in Headers */, + B3E204C220E568C3009EA554 /* ftmm.h in Headers */, + B3E2061F20E568C4009EA554 /* guuid.h in Headers */, + B3E2061620E568C4009EA554 /* gbacktrace.h in Headers */, + B3F808B120E585C000030497 /* fribidi-mirroring.h in Headers */, + B3E2066D20E568C5009EA554 /* gsocketaddressenumerator.h in Headers */, + B31BD92E20E7E0D900A560C2 /* edits.h in Headers */, + B3E2060120E568C4009EA554 /* gconvert.h in Headers */, + B31BD9AC20E7E0D900A560C2 /* utrans.h in Headers */, + B3E206C920E568C5009EA554 /* gsocketlistener.h in Headers */, + B3F804F220E5820B00030497 /* pango-tabs.h in Headers */, + B3F804E420E5820B00030497 /* pango-script.h in Headers */, + B3E2061520E568C4009EA554 /* gshell.h in Headers */, + B3E204CD20E568C3009EA554 /* ftdriver.h in Headers */, + B31BD91620E7E0D800A560C2 /* ustdio.h in Headers */, + B31BD93D20E7E0D900A560C2 /* numsys.h in Headers */, + B3E2065020E568C4009EA554 /* gvolumemonitor.h in Headers */, + B31BD99B20E7E0D900A560C2 /* ustream.h in Headers */, + B37C748D1F8C5B5C00DF505B /* CairoSVG.h in Headers */, + B34E83071F8FDCA30032268F /* GeometryDimension.h in Headers */, + B3F804DA20E5820B00030497 /* pango-matrix.h in Headers */, + B31BD9B520E7E0D900A560C2 /* search.h in Headers */, + B3E2067520E568C5009EA554 /* gfileicon.h in Headers */, + B3E2063B20E568C4009EA554 /* gcompletion.h in Headers */, + B3E2077320E568C5009EA554 /* cairo-svg.h in Headers */, + B3F807D420E5858200030497 /* cr-num.h in Headers */, + B3E2069220E568C5009EA554 /* gfileoutputstream.h in Headers */, + B3F80B0820E585E900030497 /* hb-version.h in Headers */, + B31BD96320E7E0D900A560C2 /* ucnv_err.h in Headers */, + B3E205DB20E568C4009EA554 /* gparam.h in Headers */, + B31BD97E20E7E0D900A560C2 /* filteredbrk.h in Headers */, + B3E204D520E568C3009EA554 /* ftotval.h in Headers */, + B3F804E520E5820B00030497 /* pangocairo.h in Headers */, + B3E206D420E568C5009EA554 /* gsocketconnection.h in Headers */, + B3E206A720E568C5009EA554 /* gfileenumerator.h in Headers */, + B31BD94820E7E0D900A560C2 /* umsg.h in Headers */, + B3F80B1D20E585E900030497 /* hb-subset.h in Headers */, + B31BD97320E7E0D900A560C2 /* unistr.h in Headers */, + B3F80B1620E585E900030497 /* hb-ot-shape.h in Headers */, + B3E2065820E568C4009EA554 /* gdbusobjectproxy.h in Headers */, + B3E2066B20E568C4009EA554 /* gpermission.h in Headers */, + B3E2067220E568C5009EA554 /* gtlsconnection.h in Headers */, + B3F808B720E585C000030497 /* fribidi-brackets.h in Headers */, + B31BD95320E7E0D900A560C2 /* plurrule.h in Headers */, + B3E204D820E568C3009EA554 /* ftfntfmt.h in Headers */, + B31BD98B20E7E0D900A560C2 /* utmscale.h in Headers */, + B3E2063A20E568C4009EA554 /* gtree.h in Headers */, + B3F8057020E584B300030497 /* pnglibconf.h in Headers */, + B3E204E220E568C3009EA554 /* ftimage.h in Headers */, + B31BD93920E7E0D900A560C2 /* ubiditransform.h in Headers */, + B3E2061920E568C4009EA554 /* gfileutils.h in Headers */, + B3E204C020E568C3009EA554 /* fttypes.h in Headers */, + B31BD93B20E7E0D900A560C2 /* appendable.h in Headers */, + B31BD98720E7E0D900A560C2 /* tztrans.h in Headers */, + B3F804E820E5820B00030497 /* pango-font.h in Headers */, + B31BD93F20E7E0D900A560C2 /* uset.h in Headers */, + B34E830B1F8FDDAC0032268F /* CairoColorProtocol.h in Headers */, + B35B712A1F9052B200BE477E /* CairoSize.h in Headers */, + B3F8066320E5851A00030497 /* pcre_scanner.h in Headers */, + B3E2064C20E568C4009EA554 /* gasyncresult.h in Headers */, + B31BD94720E7E0D900A560C2 /* uiter.h in Headers */, + B3E205D020E568C4009EA554 /* gunixfdlist.h in Headers */, + B3E204E020E568C3009EA554 /* ftsystem.h in Headers */, + B31BD9C120E7E0D900A560C2 /* numfmt.h in Headers */, + B3E205E820E568C4009EA554 /* gboxed.h in Headers */, + B31BD99420E7E0D900A560C2 /* uchar.h in Headers */, + B3F807CE20E5858200030497 /* cr-style.h in Headers */, + B31BD9AE20E7E0D900A560C2 /* putil.h in Headers */, + B3E2061B20E568C4009EA554 /* gpattern.h in Headers */, + B3E2066A20E568C4009EA554 /* gloadableicon.h in Headers */, + B3E204CE20E568C3009EA554 /* ftoutln.h in Headers */, + B3E205D220E568C4009EA554 /* gdesktopappinfo.h in Headers */, + B31BD94C20E7E0D900A560C2 /* basictz.h in Headers */, + B31BD92F20E7E0D900A560C2 /* parsepos.h in Headers */, + B3E2060A20E568C4009EA554 /* gqueue.h in Headers */, + B3E20B1020E568C9009EA554 /* gettext.h in Headers */, + B31BD96120E7E0D900A560C2 /* gender.h in Headers */, + B3E2060220E568C4009EA554 /* gdir.h in Headers */, + B3E2068420E568C5009EA554 /* gtask.h in Headers */, + B3F80B0720E585E900030497 /* hb-common.h in Headers */, + B31BD92320E7E0D800A560C2 /* fmtable.h in Headers */, + B34E82FB1F8FD4EF0032268F /* ImageFileFormat.h in Headers */, + B31BD91C20E7E0D800A560C2 /* stringpiece.h in Headers */, + B3E2068C20E568C5009EA554 /* gfilteroutputstream.h in Headers */, + B3E205FD20E568C4009EA554 /* gslist.h in Headers */, + B3E2061E20E568C4009EA554 /* gstringchunk.h in Headers */, + B31BD9AB20E7E0D900A560C2 /* ureldatefmt.h in Headers */, + B31BD93820E7E0D900A560C2 /* ustring.h in Headers */, + B3E204E120E568C3009EA554 /* t1tables.h in Headers */, + B31BD9C020E7E0D900A560C2 /* uscript.h in Headers */, + B3E206BB20E568C5009EA554 /* gdbusinterfaceskeleton.h in Headers */, + B31BD95D20E7E0D900A560C2 /* measure.h in Headers */, + B3E205FB20E568C4009EA554 /* gchecksum.h in Headers */, + B3F8056D20E584B300030497 /* pnglibconf.h in Headers */, + B3E205D820E568C4009EA554 /* gunixfdmessage.h in Headers */, + B3E2065620E568C4009EA554 /* gpollableoutputstream.h in Headers */, + B3E204C320E568C3009EA554 /* ftstdlib.h in Headers */, + B3825EFC20F91807008F2A02 /* Segment.h in Headers */, + B3E205E420E568C4009EA554 /* gsourceclosure.h in Headers */, + B3E204D120E568C3009EA554 /* fterrors.h in Headers */, + B3F8056E20E584B300030497 /* pngconf.h in Headers */, + B3E205FE20E568C4009EA554 /* gthreadpool.h in Headers */, + B3825EFD20F91807008F2A02 /* Types.h in Headers */, + B31BD98620E7E0D900A560C2 /* udisplaycontext.h in Headers */, + B31BD96B20E7E0D900A560C2 /* normlzr.h in Headers */, + B31BD9A520E7E0D900A560C2 /* uvernum.h in Headers */, + B3E2065520E568C4009EA554 /* gfilemonitor.h in Headers */, + B3F804E220E5820B00030497 /* pango-engine.h in Headers */, + B31BD9B620E7E0D900A560C2 /* unumsys.h in Headers */, + B3E206BC20E568C5009EA554 /* gapplicationcommandline.h in Headers */, + B3E2050520E568C3009EA554 /* gdk-pixbuf-transform.h in Headers */, + B31BD99220E7E0D900A560C2 /* smpdtfmt.h in Headers */, + B3E206CC20E568C5009EA554 /* gemblemedicon.h in Headers */, + B3E2061120E568C4009EA554 /* gbase64.h in Headers */, + B3F8066620E5851A00030497 /* pcrecpp.h in Headers */, + B3E2066220E568C4009EA554 /* gproxyaddress.h in Headers */, + B3F804E020E5820B00030497 /* pango-modules.h in Headers */, + B3E2067820E568C5009EA554 /* gdbusmenumodel.h in Headers */, + B3E204CF20E568C3009EA554 /* ftadvanc.h in Headers */, + B3E2050020E568C3009EA554 /* gdk-pixbuf-macros.h in Headers */, + B3E2068D20E568C5009EA554 /* gfileattribute.h in Headers */, + B31BD96520E7E0D900A560C2 /* bytestrie.h in Headers */, + B3E205D120E568C4009EA554 /* gunixsocketaddress.h in Headers */, + B31BD9BE20E7E0D900A560C2 /* localpointer.h in Headers */, + B3F808B920E585C000030497 /* fribidi-arabic.h in Headers */, + B3E2068520E568C5009EA554 /* gvolume.h in Headers */, + B3E2062920E568C4009EA554 /* gslice.h in Headers */, + B3F80B0420E585E900030497 /* hb-set.h in Headers */, + B31BD94220E7E0D900A560C2 /* schriter.h in Headers */, + B31BD97520E7E0D900A560C2 /* ulocdata.h in Headers */, + B3E2117620E568D0009EA554 /* librsvg-enum-types.h in Headers */, + B3F80B0C20E585E900030497 /* hb-deprecated.h in Headers */, + B3E2077A20E568C5009EA554 /* cairo-features.h in Headers */, + B3E2063620E568C4009EA554 /* gnode.h in Headers */, + B3E2063220E568C4009EA554 /* giochannel.h in Headers */, + B31BD94520E7E0D900A560C2 /* simpletz.h in Headers */, + B3E206A320E568C5009EA554 /* ginetsocketaddress.h in Headers */, + B3E2063E20E568C4009EA554 /* gmain.h in Headers */, + B3E2067720E568C5009EA554 /* gnetworkservice.h in Headers */, + B3F80B1F20E585E900030497 /* hb-ot-math.h in Headers */, + B31BD97A20E7E0D900A560C2 /* bytestream.h in Headers */, + B3E2064520E568C4009EA554 /* gsubprocesslauncher.h in Headers */, + B3E206CF20E568C5009EA554 /* gsimpleasyncresult.h in Headers */, + B31BD94320E7E0D900A560C2 /* msgfmt.h in Headers */, + B31BD95F20E7E0D900A560C2 /* strenum.h in Headers */, + B3E204B120E568C3009EA554 /* pixman-version.h in Headers */, + B3E205EC20E568C4009EA554 /* gobject-autocleanups.h in Headers */, + B3E204ED20E568C3009EA554 /* ft2build.h in Headers */, + B3E2062220E568C4009EA554 /* gi18n-lib.h in Headers */, + B3E2062A20E568C4009EA554 /* ghook.h in Headers */, + B3E2066720E568C4009EA554 /* gbufferedinputstream.h in Headers */, + B3E2065E20E568C4009EA554 /* gmenu.h in Headers */, + B3E204D320E568C3009EA554 /* ftstroke.h in Headers */, + B3E2065B20E568C4009EA554 /* gasyncinitable.h in Headers */, + B3E2069C20E568C5009EA554 /* gsocketconnectable.h in Headers */, + B31BD9BA20E7E0D900A560C2 /* platform.h in Headers */, + B3F804E920E5820B00030497 /* pangofc-fontmap.h in Headers */, + B3F807C320E5858200030497 /* cr-doc-handler.h in Headers */, + B3E2068E20E568C5009EA554 /* gmenuexporter.h in Headers */, + B37C74A81F8C5C7400DF505B /* ImageSpecificationProtocol.h in Headers */, + B3E206D220E568C5009EA554 /* gactiongroup.h in Headers */, + B37C74AA1F8C5C7400DF505B /* SurfaceHandle.h in Headers */, + B3E2066E20E568C5009EA554 /* gmount.h in Headers */, + B3E2063920E568C4009EA554 /* gspawn.h in Headers */, + B3F807C020E5858200030497 /* cr-attr-sel.h in Headers */, + B3F80B0E20E585E900030497 /* hb-ot-layout.h in Headers */, + B31BD99D20E7E0D900A560C2 /* ucnv_cb.h in Headers */, + B3E204C620E568C3009EA554 /* ftoption.h in Headers */, + B3F804D420E5820B00030497 /* pango.h in Headers */, + B3F804E620E5820B00030497 /* pango-glyph-item.h in Headers */, + B3F804DE20E5820B00030497 /* pango-glyph.h in Headers */, + B3E204D920E568C3009EA554 /* fterrdef.h in Headers */, + B3E2064320E568C4009EA554 /* gsimpleproxyresolver.h in Headers */, + B3F80B1A20E585E900030497 /* hb-glib.h in Headers */, + B3E2067420E568C5009EA554 /* gdbusintrospection.h in Headers */, + B3E2068F20E568C5009EA554 /* gthemedicon.h in Headers */, + B31BD96920E7E0D900A560C2 /* calendar.h in Headers */, + B31BD9A820E7E0D900A560C2 /* ucnvsel.h in Headers */, + B31BD99A20E7E0D900A560C2 /* uformattable.h in Headers */, + B3E2065320E568C4009EA554 /* gsocketcontrolmessage.h in Headers */, + B3E204BD20E568C3009EA554 /* ftsnames.h in Headers */, + B31BD94620E7E0D900A560C2 /* uldnames.h in Headers */, + B3E2065C20E568C4009EA554 /* gremoteactiongroup.h in Headers */, + B3F804D520E5820B00030497 /* pangoft2.h in Headers */, + B31BD94B20E7E0D900A560C2 /* uniset.h in Headers */, + B31BD91F20E7E0D800A560C2 /* stringoptions.h in Headers */, + B31BD96F20E7E0D900A560C2 /* ucol.h in Headers */, + B3E205F120E568C4009EA554 /* gmarkup.h in Headers */, + B3E205FC20E568C4009EA554 /* gtestutils.h in Headers */, + B31BD93520E7E0D900A560C2 /* urep.h in Headers */, + B3F808B220E585C000030497 /* fribidi-joining.h in Headers */, + B31BD9B220E7E0D900A560C2 /* dtrule.h in Headers */, + B3F804DB20E5820B00030497 /* pango-renderer.h in Headers */, + B3E206CE20E568C5009EA554 /* gfileinfo.h in Headers */, + B3E2063820E568C4009EA554 /* gregex.h in Headers */, + B3E2068320E568C5009EA554 /* gdbusobjectmanagerserver.h in Headers */, + B3E205DC20E568C4009EA554 /* gparamspecs.h in Headers */, + B31BD95B20E7E0D900A560C2 /* nounit.h in Headers */, + B31BD96C20E7E0D900A560C2 /* usprep.h in Headers */, + B3E2061220E568C4009EA554 /* gasyncqueue.h in Headers */, + B3E206B220E568C5009EA554 /* gtestdbus.h in Headers */, + B31BD92820E7E0D800A560C2 /* tznames.h in Headers */, + B3E206A820E568C5009EA554 /* ginitable.h in Headers */, + B3F80B1C20E585E900030497 /* hb-graphite2.h in Headers */, + B31BD9A320E7E0D900A560C2 /* stsearch.h in Headers */, + B31BD93C20E7E0D900A560C2 /* usearch.h in Headers */, + B3E205F520E568C4009EA554 /* glist.h in Headers */, + B3E2061820E568C4009EA554 /* gmain.h in Headers */, + B3F804DD20E5820B00030497 /* pango-enum-types.h in Headers */, + B3E204C520E568C3009EA554 /* ftconfig.h in Headers */, + B3F8066520E5851A00030497 /* pcre.h in Headers */, + B3E204E420E568C3009EA554 /* ftcid.h in Headers */, + B3E206C420E568C5009EA554 /* gfileinputstream.h in Headers */, + B31BD97720E7E0D900A560C2 /* unorm2.h in Headers */, + B3F80B0320E585E900030497 /* hb-buffer.h in Headers */, + B3F8057120E584B300030497 /* pngconf.h in Headers */, + B3E2067F20E568C5009EA554 /* gemblem.h in Headers */, + B3E204CB20E568C3009EA554 /* ftbbox.h in Headers */, + B3E204FC20E568C3009EA554 /* gdk-pixbuf-animation.h in Headers */, + B3F804EF20E5820B00030497 /* pango-attributes.h in Headers */, + B3E204D220E568C3009EA554 /* ftgasp.h in Headers */, + B3E2063C20E568C4009EA554 /* gallocator.h in Headers */, + B3E2067920E568C5009EA554 /* gmenumodel.h in Headers */, + B3F808AC20E585C000030497 /* fribidi-common.h in Headers */, + B3E2050620E568C3009EA554 /* gdk-pixbuf-core.h in Headers */, + B31BD97020E7E0D900A560C2 /* upluralrules.h in Headers */, + B3F804EE20E5820B00030497 /* pango-types.h in Headers */, + B3E205F420E568C4009EA554 /* gvariant.h in Headers */, + B3F804ED20E5820B00030497 /* pangofc-decoder.h in Headers */, + B31BD92D20E7E0D900A560C2 /* utext.h in Headers */, + B3E206D520E568C5009EA554 /* giostream.h in Headers */, + B3F80B0F20E585E900030497 /* hb-ot-var.h in Headers */, + B3E2117420E568D0009EA554 /* librsvg-features.h in Headers */, + B3E206CB20E568C5009EA554 /* gsubprocess.h in Headers */, + B3E204FE20E568C3009EA554 /* gdk-pixbuf-io.h in Headers */, + B3E2061A20E568C4009EA554 /* gutils.h in Headers */, + B3E205ED20E568C4009EA554 /* gobject.h in Headers */, + B3E204D620E568C3009EA554 /* freetype.h in Headers */, + B3E206EF20E568C5009EA554 /* glibconfig.h in Headers */, + B31BD98C20E7E0D900A560C2 /* coll.h in Headers */, + B31BD98E20E7E0D900A560C2 /* uregex.h in Headers */, + B3E2062F20E568C4009EA554 /* gversionmacros.h in Headers */, + B31BD9B720E7E0D900A560C2 /* uconfig.h in Headers */, + B3E2068A20E568C5009EA554 /* gdataoutputstream.h in Headers */, + B3E205F220E568C4009EA554 /* ghmac.h in Headers */, + B31BD99920E7E0D900A560C2 /* selfmt.h in Headers */, + B3E205FA20E568C4009EA554 /* gurifuncs.h in Headers */, + B3E2062C20E568C4009EA554 /* galloca.h in Headers */, + B3E2068020E568C5009EA554 /* gcredentials.h in Headers */, + B3E2064820E568C4009EA554 /* gtlsinteraction.h in Headers */, + B3E206C820E568C5009EA554 /* gsimpleaction.h in Headers */, + B3E2062320E568C4009EA554 /* gatomic.h in Headers */, + B3E205F020E568C4009EA554 /* glib.h in Headers */, + B3E2067E20E568C5009EA554 /* gproxyresolver.h in Headers */, + B3F80B1020E585E900030497 /* hb-gobject-enums.h in Headers */, + B31BD9A120E7E0D900A560C2 /* resbund.h in Headers */, + B31BD9A420E7E0D900A560C2 /* alphaindex.h in Headers */, + B3E2063520E568C4009EA554 /* gbitlock.h in Headers */, + B3E2063D20E568C4009EA554 /* grel.h in Headers */, + B3E2050220E568C3009EA554 /* gdk-pixbuf-autocleanups.h in Headers */, + B3F804D920E5820B00030497 /* pango-language.h in Headers */, + B31BD9BF20E7E0D900A560C2 /* uclean.h in Headers */, + B3F804D820E5820B00030497 /* pango-version-macros.h in Headers */, + B3E206BD20E568C5009EA554 /* gconverter.h in Headers */, + B3E204DC20E568C3009EA554 /* ftgxval.h in Headers */, + B3E2066520E568C4009EA554 /* gdbusmethodinvocation.h in Headers */, + B3E2050420E568C3009EA554 /* gdk-pixdata.h in Headers */, + B3E206BE20E568C5009EA554 /* gdtlsserverconnection.h in Headers */, + B3F80B0620E585E900030497 /* hb-gobject-structs.h in Headers */, + B3E204E320E568C3009EA554 /* tttables.h in Headers */, + B3E205E720E568C4009EA554 /* gvaluetypes.h in Headers */, + B31BD95920E7E0D900A560C2 /* uchriter.h in Headers */, + B3E205F720E568C4009EA554 /* gbookmarkfile.h in Headers */, + B3F80B1720E585E900030497 /* hb-blob.h in Headers */, + B3E204E520E568C3009EA554 /* ftglyph.h in Headers */, + B3E2077D20E568C5009EA554 /* cairo-ft.h in Headers */, + B31BD9C620E7E0D900A560C2 /* unifilt.h in Headers */, + B31BD96D20E7E0D900A560C2 /* urename.h in Headers */, + B3E2069320E568C5009EA554 /* gdbusobjectmanager.h in Headers */, + B3F807C420E5858200030497 /* cr-stylesheet.h in Headers */, + B31BD9A020E7E0D900A560C2 /* udateintervalformat.h in Headers */, + B3F807C720E5858200030497 /* cr-prop-list.h in Headers */, + B3E2077920E568C5009EA554 /* cairo-pdf.h in Headers */, + B3E205F620E568C4009EA554 /* gtrashstack.h in Headers */, + B3F804DF20E5820B00030497 /* pango-features.h in Headers */, + B3E2061720E568C4009EA554 /* gerror.h in Headers */, + B31BD94A20E7E0D900A560C2 /* docmain.h in Headers */, + B3F808A820E585C000030497 /* fribidi-joining-types.h in Headers */, + B3E206A220E568C5009EA554 /* goutputstream.h in Headers */, + B3E2060020E568C4009EA554 /* gbytes.h in Headers */, + B3E204DD20E568C3009EA554 /* ftchapters.h in Headers */, + B3E2067120E568C5009EA554 /* gdbusconnection.h in Headers */, + B3E2062620E568C4009EA554 /* goption.h in Headers */, + B3F807D520E5858200030497 /* cr-selector.h in Headers */, + B31BD96820E7E0D900A560C2 /* uobject.h in Headers */, + B31BD91720E7E0D800A560C2 /* utf_old.h in Headers */, + B3E206AE20E568C5009EA554 /* gpollableinputstream.h in Headers */, + B3F807D720E5858200030497 /* cr-additional-sel.h in Headers */, + B3F8066220E5851A00030497 /* pcreposix.h in Headers */, + B31BD94D20E7E0D900A560C2 /* udata.h in Headers */, + B3F80B1120E585E900030497 /* hb-shape.h in Headers */, + B3E2077720E568C5009EA554 /* cairo-quartz.h in Headers */, + B35B71271F904CF100BE477E /* SurfaceHandleBuilder.h in Headers */, + B3F808AE20E585C000030497 /* fribidi-types.h in Headers */, + B3E2066920E568C4009EA554 /* gzlibcompressor.h in Headers */, + B3E2050820E568C3009EA554 /* gdk-pixbuf-simple-anim.h in Headers */, + B37C74B11F8C5C7400DF505B /* PNGSurface.h in Headers */, + B3E2062020E568C4009EA554 /* gcharset.h in Headers */, + B3E206A920E568C5009EA554 /* gnativevolumemonitor.h in Headers */, + B3E2067D20E568C5009EA554 /* ginputstream.h in Headers */, + B31BD9B320E7E0D900A560C2 /* ucnv.h in Headers */, + B3E204BE20E568C3009EA554 /* ftwinfnt.h in Headers */, + B3F808B420E585C000030497 /* fribidi-flags.h in Headers */, + B3E2050720E568C3009EA554 /* gdk-pixbuf-features.h in Headers */, + B31BD96A20E7E0D900A560C2 /* ures.h in Headers */, + B3E209FA20E568C8009EA554 /* autosprintf.h in Headers */, + B31BD93A20E7E0D900A560C2 /* uenum.h in Headers */, + B31BD9A720E7E0D900A560C2 /* rbtz.h in Headers */, + B3E206A120E568C5009EA554 /* gnotification.h in Headers */, + B3E2069E20E568C5009EA554 /* gtcpwrapperconnection.h in Headers */, + B3F8066120E5851A00030497 /* pcrecpparg.h in Headers */, + B3F808B820E585C000030497 /* fribidi-bidi-types-list.h in Headers */, + B31BD92C20E7E0D900A560C2 /* uregion.h in Headers */, + B3E206A420E568C5009EA554 /* gcharsetconverter.h in Headers */, + B3E204DF20E568C3009EA554 /* ftlzw.h in Headers */, + B31BD94420E7E0D900A560C2 /* fieldpos.h in Headers */, + B31BD93420E7E0D900A560C2 /* udat.h in Headers */, + B3F804F320E5820B00030497 /* pango-gravity.h in Headers */, + B31BD98920E7E0D900A560C2 /* numberformatter.h in Headers */, + B37C74A41F8C5C7400DF505B /* SVGImageHandle.h in Headers */, + B31BD99520E7E0D900A560C2 /* unorm.h in Headers */, + B3E2064A20E568C4009EA554 /* gsocketservice.h in Headers */, + B3E2060B20E568C4009EA554 /* gsequence.h in Headers */, + B3E204D720E568C3009EA554 /* ftincrem.h in Headers */, + B3E206D120E568C5009EA554 /* gdrive.h in Headers */, + B3E205F820E568C4009EA554 /* gprimes.h in Headers */, + B3E204EC20E568C3009EA554 /* ftrender.h in Headers */, + B3F807CF20E5858200030497 /* cr-om-parser.h in Headers */, + B3E2064720E568C4009EA554 /* gdbusaddress.h in Headers */, + B3F807CB20E5858200030497 /* cr-string.h in Headers */, + B3F804F020E5820B00030497 /* pango-utils.h in Headers */, + B31BD95520E7E0D900A560C2 /* measunit.h in Headers */, + B31BD92020E7E0D800A560C2 /* dtfmtsym.h in Headers */, + B3E205EF20E568C4009EA554 /* glib-unix.h in Headers */, + B3E205FF20E568C4009EA554 /* garray.h in Headers */, + B3E205F920E568C4009EA554 /* grand.h in Headers */, + B3F80B1E20E585E900030497 /* hb-gobject.h in Headers */, + B3E206C520E568C5009EA554 /* giotypes.h in Headers */, + B3E206BA20E568C5009EA554 /* gicon.h in Headers */, + B31BD95C20E7E0D900A560C2 /* utf.h in Headers */, + B3E2066420E568C4009EA554 /* giomodule.h in Headers */, + B3E2064920E568C4009EA554 /* gthreadedsocketservice.h in Headers */, + B3E2063720E568C4009EA554 /* gmessages.h in Headers */, + B3F807CC20E5858200030497 /* cr-pseudo.h in Headers */, + B3F807C620E5858200030497 /* cr-term.h in Headers */, + B3E2077B20E568C5009EA554 /* cairo-gobject.h in Headers */, + B3F80B1B20E585E900030497 /* hb-subset-glyf.hh in Headers */, + B37C74AB1F8C5C7400DF505B /* ImageHandleBuilder.h in Headers */, + B31BD9C320E7E0D900A560C2 /* utypes.h in Headers */, + B31BD99720E7E0D900A560C2 /* unifunct.h in Headers */, + B3F807CA20E5858200030497 /* cr-rgb.h in Headers */, + B3F808B620E585C000030497 /* fribidi-bidi.h in Headers */, + B3E204E720E568C3009EA554 /* ftbitmap.h in Headers */, + B31BD93220E7E0D900A560C2 /* dtitvinf.h in Headers */, + B3F80B0D20E585E900030497 /* hb-ot.h in Headers */, + B3F8075120E5855F00030497 /* ffitarget.h in Headers */, + B3E2077120E568C5009EA554 /* cairo-version.h in Headers */, + B3E205E520E568C4009EA554 /* glib-types.h in Headers */, + B31BD9AF20E7E0D900A560C2 /* format.h in Headers */, + B3E2069120E568C5009EA554 /* gtlsserverconnection.h in Headers */, + B3E206BF20E568C5009EA554 /* gnetworkmonitor.h in Headers */, + B3E2069820E568C5009EA554 /* gbufferedoutputstream.h in Headers */, + B3E2060C20E568C4009EA554 /* gvarianttype.h in Headers */, + B31BD95E20E7E0D900A560C2 /* tzrule.h in Headers */, + B3E204C120E568C3009EA554 /* ftparams.h in Headers */, + B3E206AD20E568C5009EA554 /* gtlsbackend.h in Headers */, + B3E206CD20E568C5009EA554 /* gsettingsschema.h in Headers */, + B3E2077620E568C5009EA554 /* cairo-script.h in Headers */, + B3F808B020E585C000030497 /* fribidi-deprecated.h in Headers */, + B3F807D020E5858200030497 /* cr-statement.h in Headers */, + B3825EFE20F91807008F2A02 /* Log.h in Headers */, + B3F807D220E5858200030497 /* libcroco.h in Headers */, + B31BD9B820E7E0D900A560C2 /* utf16.h in Headers */, + B3F80B0A20E585E900030497 /* hb-coretext.h in Headers */, + B3E204DE20E568C3009EA554 /* tttags.h in Headers */, + B3E207F020E568C6009EA554 /* fcfreetype.h in Headers */, + B31BD93320E7E0D900A560C2 /* rbnf.h in Headers */, + B3E2069020E568C5009EA554 /* gapplication.h in Headers */, + B3F807C520E5858200030497 /* cr-enc-handler.h in Headers */, + B3E2061420E568C4009EA554 /* genviron.h in Headers */, + B3E205D720E568C4009EA554 /* gunixmounts.h in Headers */, + B3825EFF20F91807008F2A02 /* Font.h in Headers */, + B31BD9B420E7E0D900A560C2 /* ucharstriebuilder.h in Headers */, + B31BD92B20E7E0D900A560C2 /* icuplug.h in Headers */, + B3E2077820E568C5009EA554 /* cairo-deprecated.h in Headers */, + B3E206B520E568C5009EA554 /* gioerror.h in Headers */, + B3E2066120E568C4009EA554 /* gio-autocleanups.h in Headers */, + B3E2060720E568C4009EA554 /* gpoll.h in Headers */, + B3F8075220E5855F00030497 /* ffi.h in Headers */, + B3E2062420E568C4009EA554 /* gdatetime.h in Headers */, + B3E2068820E568C5009EA554 /* gtcpconnection.h in Headers */, + B3F804E320E5820B00030497 /* pango-break.h in Headers */, + B3F804DC20E5820B00030497 /* pango-ot.h in Headers */, + B3E204D020E568C3009EA554 /* ftsynth.h in Headers */, + B3F80B1220E585E900030497 /* hb-subset-plan.hh in Headers */, + B3F804EB20E5820B00030497 /* pangofc-font.h in Headers */, + B3E2069420E568C5009EA554 /* gactiongroupexporter.h in Headers */, + B3E2064B20E568C4009EA554 /* gnetworkaddress.h in Headers */, + B31BD91520E7E0D800A560C2 /* translit.h in Headers */, + B31BD95420E7E0D900A560C2 /* bytestriebuilder.h in Headers */, + B3E204E920E568C3009EA554 /* ftmac.h in Headers */, + B3E2065420E568C4009EA554 /* gdbusnameowning.h in Headers */, + B31BD9B120E7E0D900A560C2 /* normalizer2.h in Headers */, + B3E205D420E568C4009EA554 /* gunixoutputstream.h in Headers */, + B3E204D420E568C3009EA554 /* ftcache.h in Headers */, + B31BD97C20E7E0D900A560C2 /* messagepattern.h in Headers */, + B31BD94120E7E0D900A560C2 /* coleitr.h in Headers */, + B31BD97F20E7E0D900A560C2 /* tmutamt.h in Headers */, + B3E205D320E568C4009EA554 /* gunixconnection.h in Headers */, + B31BD97120E7E0D900A560C2 /* ucharstrie.h in Headers */, + B3E2067C20E568C5009EA554 /* gproxyaddressenumerator.h in Headers */, + B31BD97220E7E0D900A560C2 /* tmunit.h in Headers */, + B31BD97420E7E0D900A560C2 /* rbbi.h in Headers */, + B31BD94020E7E0D900A560C2 /* casemap.h in Headers */, + B31BD9BB20E7E0D900A560C2 /* rep.h in Headers */, + B31BD95720E7E0D900A560C2 /* locdspnm.h in Headers */, + B31BD91E20E7E0D800A560C2 /* tblcoll.h in Headers */, + B31BD92A20E7E0D900A560C2 /* ucurr.h in Headers */, + B3E2077420E568C5009EA554 /* cairo-quartz-image.h in Headers */, + B31BD91920E7E0D800A560C2 /* tzfmt.h in Headers */, + B3E206CA20E568C5009EA554 /* gcancellable.h in Headers */, + B3E2060320E568C4009EA554 /* gkeyfile.h in Headers */, + B3F80B2120E585EA00030497 /* hb-ft.h in Headers */, + B3E204C820E568C3009EA554 /* ftmodapi.h in Headers */, + B3F808BA20E585C000030497 /* fribidi-shape.h in Headers */, + B3E2060520E568C4009EA554 /* gmappedfile.h in Headers */, + B3E2064220E568C4009EA554 /* gdbusobject.h in Headers */, + B3E205F320E568C4009EA554 /* gtimer.h in Headers */, + B31BD94E20E7E0D900A560C2 /* stringtriebuilder.h in Headers */, + B31BD92520E7E0D800A560C2 /* choicfmt.h in Headers */, + B3E204BF20E568C3009EA554 /* ftsizes.h in Headers */, + B3F807BF20E5858200030497 /* cr-token.h in Headers */, + B3E2062E20E568C4009EA554 /* gthread.h in Headers */, + B3F804E120E5820B00030497 /* pango-fontset.h in Headers */, + B3E205EB20E568C4009EA554 /* gvaluecollector.h in Headers */, + B3E206C220E568C5009EA554 /* gioscheduler.h in Headers */, + B3E2066020E568C4009EA554 /* gaction.h in Headers */, + B3E2064F20E568C4009EA554 /* gmemoryoutputstream.h in Headers */, + B3E2067620E568C5009EA554 /* gsocketaddress.h in Headers */, + B3E2068B20E568C5009EA554 /* gfilenamecompleter.h in Headers */, + B3E206C320E568C5009EA554 /* gsettings.h in Headers */, + B3E2068120E568C5009EA554 /* gbytesicon.h in Headers */, + B3E2067B20E568C5009EA554 /* gresolver.h in Headers */, + B31BD93720E7E0D900A560C2 /* vtzone.h in Headers */, + B3F8066420E5851A00030497 /* pcre_stringpiece.h in Headers */, + B31BD99020E7E0D900A560C2 /* plurfmt.h in Headers */, + B3E205DA20E568C4009EA554 /* glib-object.h in Headers */, + B3E2061C20E568C4009EA554 /* ghostutils.h in Headers */, + B3E2060820E568C4009EA554 /* gunicode.h in Headers */, + B31BD95620E7E0D900A560C2 /* utrace.h in Headers */, + B31BD98820E7E0D900A560C2 /* umachine.h in Headers */, + B3F80B1420E585E900030497 /* hb-ot-font.h in Headers */, + B3E2062520E568C4009EA554 /* gstring.h in Headers */, + B3E2067020E568C5009EA554 /* gresource.h in Headers */, + B3F8056C20E584B300030497 /* png.h in Headers */, + B3F807BE20E5858200030497 /* cr-parser.h in Headers */, + B3F80B1520E585E900030497 /* hb-unicode.h in Headers */, + B3E206A020E568C5009EA554 /* gdbusauthobserver.h in Headers */, + B31BD9A620E7E0D900A560C2 /* unimatch.h in Headers */, + B3E206C120E568C5009EA554 /* glistmodel.h in Headers */, + B3E2068220E568C5009EA554 /* gdbusobjectmanagerclient.h in Headers */, + B3E204CC20E568C3009EA554 /* ftgzip.h in Headers */, + B31BD9B920E7E0D900A560C2 /* brkiter.h in Headers */, + B3E2062720E568C4009EA554 /* gdate.h in Headers */, + B3E2065D20E568C4009EA554 /* gdbusmessage.h in Headers */, + B3E204DB20E568C3009EA554 /* ftpfr.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + B3136E5F1F90FCCF0002B7AB /* Speculid-Mac-AppUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = B3136E691F90FCCF0002B7AB /* Build configuration list for PBXNativeTarget "Speculid-Mac-AppUITests" */; + buildPhases = ( + 2A5BE6D591A31D93BD99307F /* [CP] Check Pods Manifest.lock */, + B3136E5C1F90FCCF0002B7AB /* Sources */, + B3136E5D1F90FCCF0002B7AB /* Frameworks */, + B3136E5E1F90FCCF0002B7AB /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + B3136E661F90FCCF0002B7AB /* PBXTargetDependency */, + ); + name = "Speculid-Mac-AppUITests"; + productName = "Speculid-Mac-AppUITests"; + productReference = B3136E601F90FCCF0002B7AB /* Speculid-Mac-AppUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; + B3136E7D1F90FD2E0002B7AB /* SpeculidTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = B3136E861F90FD2E0002B7AB /* Build configuration list for PBXNativeTarget "SpeculidTests" */; + buildPhases = ( + 864BFA93E2D46B0EBF468EF2 /* [CP] Check Pods Manifest.lock */, + B3D329FA1F9A55B40042B46F /* ShellScript */, + B3136E7A1F90FD2E0002B7AB /* Sources */, + B3136E7B1F90FD2E0002B7AB /* Frameworks */, + B3136E7C1F90FD2E0002B7AB /* Resources */, + C467F507FA1A90CD666AC710 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + B3136E851F90FD2E0002B7AB /* PBXTargetDependency */, + ); + name = SpeculidTests; + productName = SpeculidTests; + productReference = B3136E7E1F90FD2E0002B7AB /* SpeculidTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + B3136E8C1F90FD3D0002B7AB /* CairoSVGTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = B3136E951F90FD3D0002B7AB /* Build configuration list for PBXNativeTarget "CairoSVGTests" */; + buildPhases = ( + 86BA5F8D102809B05C3B7F84 /* [CP] Check Pods Manifest.lock */, + B3136E891F90FD3D0002B7AB /* Sources */, + B3136E8A1F90FD3D0002B7AB /* Frameworks */, + B3136E8B1F90FD3D0002B7AB /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + B3136E941F90FD3D0002B7AB /* PBXTargetDependency */, + ); + name = CairoSVGTests; + productName = CairoSVGTests; + productReference = B3136E8D1F90FD3D0002B7AB /* CairoSVGTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + B37C743D1F8C58F300DF505B /* Speculid-Mac-App */ = { + isa = PBXNativeTarget; + buildConfigurationList = B37C744C1F8C58F300DF505B /* Build configuration list for PBXNativeTarget "Speculid-Mac-App" */; + buildPhases = ( + 6B0E6A3126F4611E46C09D7C /* [CP] Check Pods Manifest.lock */, + B3D329F91F9A55A20042B46F /* swiftformat */, + B37C743A1F8C58F300DF505B /* Sources */, + B37C743B1F8C58F300DF505B /* Frameworks */, + B37C743C1F8C58F300DF505B /* Resources */, + B37C74621F8C590D00DF505B /* Embed XPC Services */, + B37C747F1F8C5ADA00DF505B /* Embed Frameworks */, + F11FED44F4FDA27EB1AD0F15 /* [CP] Embed Pods Frameworks */, + B32D69ED1F9ED4A600C21C8C /* Codesign Dynamic Libraries */, + ); + buildRules = ( + ); + dependencies = ( + B37C745D1F8C590D00DF505B /* PBXTargetDependency */, + B37C74791F8C5ADA00DF505B /* PBXTargetDependency */, + B37C748F1F8C5B5C00DF505B /* PBXTargetDependency */, + ); + name = "Speculid-Mac-App"; + productName = "Speculid-Mac-App"; + productReference = B37C743E1F8C58F300DF505B /* Speculid.app */; + productType = "com.apple.product-type.application"; + }; + B37C74521F8C590D00DF505B /* Speculid-Mac-XPC */ = { + isa = PBXNativeTarget; + buildConfigurationList = B37C745F1F8C590D00DF505B /* Build configuration list for PBXNativeTarget "Speculid-Mac-XPC" */; + buildPhases = ( + BD6A812C7EF5D496661AC259 /* [CP] Check Pods Manifest.lock */, + B37C744F1F8C590D00DF505B /* Sources */, + B37C74501F8C590D00DF505B /* Frameworks */, + B37C74511F8C590D00DF505B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Speculid-Mac-XPC"; + productName = "Speculid-Mac-XPC"; + productReference = B37C74531F8C590D00DF505B /* Speculid-Mac-XPC.xpc */; + productType = "com.apple.product-type.xpc-service"; + }; + B37C74721F8C5ADA00DF505B /* Speculid */ = { + isa = PBXNativeTarget; + buildConfigurationList = B37C747C1F8C5ADA00DF505B /* Build configuration list for PBXNativeTarget "Speculid" */; + buildPhases = ( + 11C29AAE26481241CA772FFC /* [CP] Check Pods Manifest.lock */, + B3136E9C1F9100CB0002B7AB /* Autorevision */, + B318906B1F919FA300D0EFA0 /* swiftformat */, + B318906C1F91A02000D0EFA0 /* swiftlint */, + B37C746E1F8C5ADA00DF505B /* Sources */, + B37C746F1F8C5ADA00DF505B /* Frameworks */, + B37C74701F8C5ADA00DF505B /* Headers */, + B37C74711F8C5ADA00DF505B /* Resources */, + B33A533F1F95568F00E74800 /* CopyFiles */, + B3B5E9D61F96AB1B004A6BEB /* warnings */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Speculid; + productName = "Speculid-Mac-Framework"; + productReference = B37C74731F8C5ADA00DF505B /* Speculid.framework */; + productType = "com.apple.product-type.framework"; + }; + B37C74881F8C5B5C00DF505B /* CairoSVG */ = { + isa = PBXNativeTarget; + buildConfigurationList = B37C74921F8C5B5C00DF505B /* Build configuration list for PBXNativeTarget "CairoSVG" */; + buildPhases = ( + 4F4C36B7508D73A1292508F5 /* [CP] Check Pods Manifest.lock */, + B37C74841F8C5B5C00DF505B /* Sources */, + B37C74851F8C5B5C00DF505B /* Frameworks */, + B3E211A620E57290009EA554 /* CopyFiles */, + B37C74861F8C5B5C00DF505B /* Headers */, + B37C74871F8C5B5C00DF505B /* Resources */, + B3E211A820E573B9009EA554 /* Installing Libaries */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CairoSVG; + productName = "CairoSVG-Mac-Framework"; + productReference = B37C74891F8C5B5C00DF505B /* CairoSVG.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + B37C74361F8C58F300DF505B /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0900; + LastUpgradeCheck = 1000; + ORGANIZATIONNAME = "Bright Digit, LLC"; + TargetAttributes = { + B3136E5F1F90FCCF0002B7AB = { + CreatedOnToolsVersion = 9.0; + ProvisioningStyle = Automatic; + TestTargetID = B37C743D1F8C58F300DF505B; + }; + B3136E7D1F90FD2E0002B7AB = { + CreatedOnToolsVersion = 9.0; + ProvisioningStyle = Automatic; + }; + B3136E8C1F90FD3D0002B7AB = { + CreatedOnToolsVersion = 9.0; + ProvisioningStyle = Automatic; + }; + B37C743D1F8C58F300DF505B = { + CreatedOnToolsVersion = 9.0; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 0; + }; + }; + }; + B37C74521F8C590D00DF505B = { + CreatedOnToolsVersion = 9.0; + LastSwiftMigration = 0900; + ProvisioningStyle = Automatic; + }; + B37C74721F8C5ADA00DF505B = { + CreatedOnToolsVersion = 9.0; + LastSwiftMigration = 0900; + ProvisioningStyle = Automatic; + }; + B37C74881F8C5B5C00DF505B = { + CreatedOnToolsVersion = 9.0; + LastSwiftMigration = 0900; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = B37C74391F8C58F300DF505B /* Build configuration list for PBXProject "Speculid" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = B37C74351F8C58F300DF505B; + productRefGroup = B37C743F1F8C58F300DF505B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + B37C743D1F8C58F300DF505B /* Speculid-Mac-App */, + B37C74521F8C590D00DF505B /* Speculid-Mac-XPC */, + B37C74721F8C5ADA00DF505B /* Speculid */, + B37C74881F8C5B5C00DF505B /* CairoSVG */, + B3136E5F1F90FCCF0002B7AB /* Speculid-Mac-AppUITests */, + B3136E7D1F90FD2E0002B7AB /* SpeculidTests */, + B3136E8C1F90FD3D0002B7AB /* CairoSVGTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + B3136E5E1F90FCCF0002B7AB /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B3136E7C1F90FD2E0002B7AB /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B3C6CA8E2114C9EB000D5120 /* dummy in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B3136E8B1F90FD3D0002B7AB /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B37C743C1F8C58F300DF505B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B3136EB01F9124730002B7AB /* svg-trayicon.speculid in Resources */, + B3136DD71F90E4AC0002B7AB /* layers.svg in Resources */, + B37C74441F8C58F300DF505B /* Assets.xcassets in Resources */, + B3136EA31F910BC90002B7AB /* svg-appicon.speculid in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B37C74511F8C590D00DF505B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B37C74711F8C5ADA00DF505B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B3136E561F90F73B0002B7AB /* versions.plist in Resources */, + B3E9A9011FB4DCCA00FD8E7A /* autorevision.json in Resources */, + B3D32A021F9A5D760042B46F /* help.txt in Resources */, + B36C2E8B1FA5B876003F48BD /* build.list in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B37C74871F8C5B5C00DF505B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 11C29AAE26481241CA772FFC /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Speculid-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 2A5BE6D591A31D93BD99307F /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Speculid-Mac-AppUITests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 4F4C36B7508D73A1292508F5 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-CairoSVG-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 6B0E6A3126F4611E46C09D7C /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Speculid-Mac-App-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 864BFA93E2D46B0EBF468EF2 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SpeculidTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 86BA5F8D102809B05C3B7F84 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-CairoSVGTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + B3136E9C1F9100CB0002B7AB /* Autorevision */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = Autorevision; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "touch \"${SRCROOT}/.version\"\nstart=1\nversion_file=`< \"${SRCROOT}/.version\"`\nversion=${version_file:-${start}}\nexport VCS_EXTRA=${version}\nmkdir -p tmp\necho \"Set Extra Version Number to ${VCS_EXTRA}\"\n\"${SRCROOT}/bin/autorevision.sh\" -t json >${SRCROOT}/frameworks/speculid/autorevision.json\necho `expr ${VCS_EXTRA} + 1` >\"${SRCROOT}/.version\""; + }; + B318906B1F919FA300D0EFA0 /* swiftformat */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = swiftformat; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat\" \"${SRCROOT}/frameworks\" --disable trailingCommas --indent 2 --allman false --removelines enabled --header strip --insertlines disabled --empty void --ranges spaced --trimwhitespace always --linebreaks lf --commas always --comments indent --ifdef indent --hexliterals uppercase --semicolons inline"; + }; + B318906C1F91A02000D0EFA0 /* swiftlint */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = swiftlint; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/SwiftLint/swiftlint\""; + }; + B32D69ED1F9ED4A600C21C8C /* Codesign Dynamic Libraries */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Codesign Dynamic Libraries"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$SRCROOT/scripts/codesign-framework.sh\"\n"; + }; + B3B5E9D61F96AB1B004A6BEB /* warnings */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = warnings; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "TAGS=\"TODO:|FIXME:\"\nERRORTAG=\"ERROR:\"\nfind \"${SRCROOT}\" \\( -name \"*.h\" -or -name \"*.m\" -or -name \"*.swift\" -type f\\) -print0 | xargs -0 egrep --with-filename --line-number --only-matching \"($TAGS).*\\$|($ERRORTAG).*\\$\" | perl -p -e \"s/($TAGS)/ warning: \\$1/\" | perl -p -e \"s/($ERRORTAG)/ error: \\$1/\""; + }; + B3D329F91F9A55A20042B46F /* swiftformat */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = swiftformat; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat\" \"${SRCROOT}/applications\" --disable trailingCommas --indent 2 --allman false --removelines enabled --header strip --insertlines disabled --empty void --ranges spaced --trimwhitespace always --linebreaks lf --commas always --comments indent --ifdef indent --hexliterals uppercase --semicolons inline\n"; + }; + B3D329FA1F9A55B40042B46F /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat\" \"${SRCROOT}/tests\" --disable trailingCommas --indent 2 --allman false --removelines enabled --header strip --insertlines disabled --empty void --ranges spaced --trimwhitespace always --linebreaks lf --commas always --comments indent --ifdef indent --hexliterals uppercase --semicolons inline"; + }; + B3E211A820E573B9009EA554 /* Installing Libaries */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Installing Libaries"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/scripts/fix_dylibs.sh\" \"${TARGET_BUILD_DIR}/${EXECUTABLE_PATH}\"\n"; + }; + BD6A812C7EF5D496661AC259 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Speculid-Mac-XPC-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + C467F507FA1A90CD666AC710 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/SwiftVer/SwiftVer.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftVer.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + F11FED44F4FDA27EB1AD0F15 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-Speculid-Mac-App/Pods-Speculid-Mac-App-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/SwiftVer/SwiftVer.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftVer.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Speculid-Mac-App/Pods-Speculid-Mac-App-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + B3136E5C1F90FCCF0002B7AB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B3136E631F90FCCF0002B7AB /* SpeculidUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B3136E7A1F90FD2E0002B7AB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B34188911F9A479900C5F356 /* SpeculidApplicationModeParserTest.swift in Sources */, + B3D32A041F9A5E8F0042B46F /* CommandLineRunnerTest.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B3136E891F90FD3D0002B7AB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B3136E901F90FD3D0002B7AB /* CairoSVGTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B37C743A1F8C58F300DF505B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B3136DDE1F90EF470002B7AB /* Application.swift in Sources */, + B35B71231F9041B900BE477E /* main.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B37C744F1F8C590D00DF505B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B37C74641F8C592400DF505B /* main.swift in Sources */, + B37C746B1F8C598500DF505B /* ServiceDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B37C746E1F8C5ADA00DF505B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B3B5E9E41F96C5F1004A6BEB /* CommandLineActivityProtocol.swift in Sources */, + B3891BBE20F7CE010095E1FD /* CwlSysctl.swift in Sources */, + B3136E3D1F90F73B0002B7AB /* AnalyticsParameterKey.swift in Sources */, + B3F0ECF21F9E6AAD0078690E /* SpeculidImageSpecificationBuilder.swift in Sources */, + B3136E4D1F90F73B0002B7AB /* AnalyticsSessionManagerProtocol.swift in Sources */, + B33F0BBB1F9586A9004A87DD /* StatusItemProvider.swift in Sources */, + B3136E351F90F73B0002B7AB /* AnalyticsParameterDictionary.swift in Sources */, + B3136E431F90F73B0002B7AB /* SpeculidSpecificationsFileProtocol.swift in Sources */, + B3B5E9E61F96C604004A6BEB /* CommandLineRunnerProtocol.swift in Sources */, + B3136E3E1F90F73B0002B7AB /* GeometryValue.swift in Sources */, + B3136DDF1F90EFB10002B7AB /* Application.swift in Sources */, + B3136E331F90F73B0002B7AB /* String.swift in Sources */, + B3136E521F90F73B0002B7AB /* AnalyticsTrackerProtocol.swift in Sources */, + B3136E461F90F73B0002B7AB /* ImageConversionTaskProtocol.swift in Sources */, + B3136E3C1F90F73B0002B7AB /* SpeculidDocument.swift in Sources */, + B3B5E9E21F96C44D004A6BEB /* SpeculidCommandArgumentSet.swift in Sources */, + B33F0BB91F958695004A87DD /* RemoteObjectInterfaceProvider.swift in Sources */, + B33F0BB61F958640004A87DD /* StatusItemProviderProtocol.swift in Sources */, + B3136E4E1F90F73B0002B7AB /* AssetSpecificationProtocol.swift in Sources */, + B3136DCF1F90E45F0002B7AB /* FileFormat.swift in Sources */, + B317B0D11FA560EE00BB5E57 /* QuitMenuItem.swift in Sources */, + B3136E421F90F73B0002B7AB /* ImageIdiom.swift in Sources */, + B3D32A081F9A73740042B46F /* AsyncBlockOperation.swift in Sources */, + B3136E371F90F73B0002B7AB /* SpeculidSpecificationsFile.swift in Sources */, + B3B5E9EC1F96C7D5004A6BEB /* SpeculidApplicationModeParser.swift in Sources */, + B341888E1F9A460300C5F356 /* CommandLineArgumentProvider.swift in Sources */, + B31BEAFA1F96268700496E7A /* RegularExpressionSetBuilder.swift in Sources */, + B3136E311F90F73B0002B7AB /* CairoConversionSetBuilder.swift in Sources */, + B3136E251F90F73B0002B7AB /* CairoConversionSet.swift in Sources */, + B3136E451F90F73B0002B7AB /* ImageConversionSetBuilderProtocol.swift in Sources */, + B3136E5B1F90FB710002B7AB /* ImageSpecification.swift in Sources */, + B3136E401F90F73B0002B7AB /* AnalyticsConfiguration.swift in Sources */, + B3136E301F90F73B0002B7AB /* ImageConversionBuilder.swift in Sources */, + B3136E2D1F90F73B0002B7AB /* ImageConversionSetBuilder.swift in Sources */, + B31BEAFC1F96269F00496E7A /* RegularExpressionSet.swift in Sources */, + B3136E511F90F73B0002B7AB /* AnalyticsConfigurationProtocol.swift in Sources */, + B3136DD41F90E45F0002B7AB /* Service.swift in Sources */, + B3136E291F90F73B0002B7AB /* ClientIdentifier.swift in Sources */, + B3136E501F90F73B0002B7AB /* SpeculidArgumentsProtocol.swift in Sources */, + B3F0ECF01F9E6A4D0078690E /* SpeculidImageSpecificationBuilderProtocol.swift in Sources */, + B3136DD11F90E45F0002B7AB /* ImageFile.swift in Sources */, + B33F0BB71F958640004A87DD /* RemoteObjectInterfaceProviderProtocol.swift in Sources */, + B3FAD3EB1FA564D0004381A7 /* VersionMenuItem.swift in Sources */, + B3D32A061F9A5FEE0042B46F /* FileHandle.swift in Sources */, + B3136DD51F90E45F0002B7AB /* ServiceProtocol.swift in Sources */, + B3136E4C1F90F73B0002B7AB /* AnalyticsEventProtocol.swift in Sources */, + B31BEB001F9626BB00496E7A /* RegularExpressionSetBuilderProtocol.swift in Sources */, + B3E9A9031FB4DDE400FD8E7A /* Version.swift in Sources */, + B3136E531F90F73B0002B7AB /* SpeculidBuilderProtocol.swift in Sources */, + B3136E4B1F90F73B0002B7AB /* SpeculidConfigurationProtocol.swift in Sources */, + B3136E4A1F90F73B0002B7AB /* SpeculidDocumentProtocol.swift in Sources */, + B3033B201F9AEFE600787279 /* AssetSpecificationDocument.swift in Sources */, + B3136E4F1F90F73B0002B7AB /* GeometryProtocol.swift in Sources */, + B3B5E9E81F96C74C004A6BEB /* CommandLineRunner.swift in Sources */, + B3136E2F1F90F73B0002B7AB /* SpeculidBuilder.swift in Sources */, + B3136E341F90F73B0002B7AB /* CGFloat.swift in Sources */, + B3B5E9E01F96C416004A6BEB /* SpeculidApplicationMode.swift in Sources */, + B3033B1E1F9AEFC100787279 /* AssetSpecificationDocumentProtocol.swift in Sources */, + B3136E5A1F90F73B0002B7AB /* UnknownConversionError.swift in Sources */, + B3136E551F90F73B0002B7AB /* ImageConversionBuilderProtocol.swift in Sources */, + B3B5E9DE1F96C2A2004A6BEB /* SpeculidConfiguration.swift in Sources */, + B3136E361F90F73B0002B7AB /* Geometry.swift in Sources */, + B3136E3F1F90F73B0002B7AB /* AssetSpecification.swift in Sources */, + B3136E321F90F73B0002B7AB /* NSColor.swift in Sources */, + B3136E491F90F73B0002B7AB /* ImageConversionSetProtocol.swift in Sources */, + B3136E581F90F73B0002B7AB /* ProcessError.swift in Sources */, + B3136E541F90F73B0002B7AB /* ApplicationProtocol.swift in Sources */, + B3CB15702113AA8C00A6DC5C /* VersionProvider.swift in Sources */, + B3B5E9DA1F96C1C1004A6BEB /* SpeculidConfigurationBuilder.swift in Sources */, + B341888A1F9A44A700C5F356 /* CommandLineArgumentProviderProtocol.swift in Sources */, + B33A533E1F954FF800E74800 /* Result.swift in Sources */, + B3136E591F90F73B0002B7AB /* ArrayError.swift in Sources */, + B3136E2E1F90F73B0002B7AB /* AnalyticsSessionManager.swift in Sources */, + B318906A1F918F0300D0EFA0 /* GeometryValue.Multiply.swift in Sources */, + B3136E571F90F73B0002B7AB /* MissingRequiredInstallationError.swift in Sources */, + B31BEAFE1F9626AC00496E7A /* RegularExpressionSetProtocol.swift in Sources */, + B3136E3B1F90F73B0002B7AB /* ScaledGeometry.swift in Sources */, + B3B5E9EA1F96C777004A6BEB /* SpeculidApplicationModeParserProtocol.swift in Sources */, + B3136E471F90F73B0002B7AB /* ClientIdentifierDelegate.swift in Sources */, + B3136DCE1F90E45F0002B7AB /* ErrorCollection.swift in Sources */, + B3136E271F90F73B0002B7AB /* AnalyticsTracker.swift in Sources */, + B3B5E9DC1F96C1D2004A6BEB /* SpeculidConfigurationBuilderProtocol.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B37C74841F8C5B5C00DF505B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B34E83051F8FD90C0032268F /* GlibError.m in Sources */, + B37C74A51F8C5C7400DF505B /* PNGImageHandle.m in Sources */, + B37C74AF1F8C5C7400DF505B /* ImageHandleBuilder.m in Sources */, + B37C74AC1F8C5C7400DF505B /* PDFSurface.m in Sources */, + B37C74AD1F8C5C7400DF505B /* SVGImageHandle.m in Sources */, + B35B71281F904CF100BE477E /* SurfaceHandleBuilder.m in Sources */, + B37C74AE1F8C5C7400DF505B /* PNGSurface.m in Sources */, + B37C74A61F8C5C7400DF505B /* CairoInterface.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + B3136E661F90FCCF0002B7AB /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B37C743D1F8C58F300DF505B /* Speculid-Mac-App */; + targetProxy = B3136E651F90FCCF0002B7AB /* PBXContainerItemProxy */; + }; + B3136E851F90FD2E0002B7AB /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B37C74721F8C5ADA00DF505B /* Speculid */; + targetProxy = B3136E841F90FD2E0002B7AB /* PBXContainerItemProxy */; + }; + B3136E941F90FD3D0002B7AB /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B37C74881F8C5B5C00DF505B /* CairoSVG */; + targetProxy = B3136E931F90FD3D0002B7AB /* PBXContainerItemProxy */; + }; + B37C745D1F8C590D00DF505B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B37C74521F8C590D00DF505B /* Speculid-Mac-XPC */; + targetProxy = B37C745C1F8C590D00DF505B /* PBXContainerItemProxy */; + }; + B37C74791F8C5ADA00DF505B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B37C74721F8C5ADA00DF505B /* Speculid */; + targetProxy = B37C74781F8C5ADA00DF505B /* PBXContainerItemProxy */; + }; + B37C748F1F8C5B5C00DF505B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B37C74881F8C5B5C00DF505B /* CairoSVG */; + targetProxy = B37C748E1F8C5B5C00DF505B /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + B3136E671F90FCCF0002B7AB /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 503182BFEED5FCC7A0FD7113 /* Pods-Speculid-Mac-AppUITests.debug.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = MLT7M394S7; + INFOPLIST_FILE = tests/ui/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.13; + PRODUCT_BUNDLE_IDENTIFIER = "com.brightdigit.Speculid-Mac-AppUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 4.0; + TEST_TARGET_NAME = "Speculid-Mac-App"; + }; + name = Debug; + }; + B3136E681F90FCCF0002B7AB /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5598DB627CD85D918F6EAC73 /* Pods-Speculid-Mac-AppUITests.release.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = MLT7M394S7; + INFOPLIST_FILE = tests/ui/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.13; + PRODUCT_BUNDLE_IDENTIFIER = "com.brightdigit.Speculid-Mac-AppUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 4.0; + TEST_TARGET_NAME = "Speculid-Mac-App"; + }; + name = Release; + }; + B3136E871F90FD2E0002B7AB /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 1A1D3098AA00507F322B5177 /* Pods-SpeculidTests.debug.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = MLT7M394S7; + INFOPLIST_FILE = tests/speculid/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.13; + PRODUCT_BUNDLE_IDENTIFIER = com.brightdigit.SpeculidTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 4.0; + }; + name = Debug; + }; + B3136E881F90FD2E0002B7AB /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = C7A962F08D51F2247E1ADBEF /* Pods-SpeculidTests.release.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = MLT7M394S7; + INFOPLIST_FILE = tests/speculid/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.13; + PRODUCT_BUNDLE_IDENTIFIER = com.brightdigit.SpeculidTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 4.0; + }; + name = Release; + }; + B3136E961F90FD3D0002B7AB /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = EB3CD055FBA18C9FF21D971C /* Pods-CairoSVGTests.debug.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = MLT7M394S7; + INFOPLIST_FILE = CairoSVGTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.13; + PRODUCT_BUNDLE_IDENTIFIER = com.brightdigit.CairoSVGTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 4.0; + }; + name = Debug; + }; + B3136E971F90FD3D0002B7AB /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33189C1A2DCDF9FDE0D52DB2 /* Pods-CairoSVGTests.release.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = MLT7M394S7; + INFOPLIST_FILE = CairoSVGTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.13; + PRODUCT_BUNDLE_IDENTIFIER = com.brightdigit.CairoSVGTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 4.0; + }; + name = Release; + }; + B37C744A1F8C58F300DF505B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "Mac Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = "$(DEFAULT_BUNDLE_VERSION)"; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFAULT_BUNDLE_VERSION = 2; + DEFAULT_SEMVER_VERSION = 2.0.0; + DYLIB_COMPATIBILITY_VERSION = "$(DEFAULT_BUNDLE_VERSION)"; + DYLIB_CURRENT_VERSION = "$(DEFAULT_BUNDLE_VERSION)"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.12; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + B37C744B1F8C58F300DF505B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "Mac Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = "$(DEFAULT_BUNDLE_VERSION)"; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFAULT_BUNDLE_VERSION = 2; + DEFAULT_SEMVER_VERSION = 2.0.0; + DYLIB_COMPATIBILITY_VERSION = "$(DEFAULT_BUNDLE_VERSION)"; + DYLIB_CURRENT_VERSION = "$(DEFAULT_BUNDLE_VERSION)"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.12; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + }; + name = Release; + }; + B37C744D1F8C58F300DF505B /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 75FAFD8D34A5758295CE7C3E /* Pods-Speculid-Mac-App.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = Speculid.entitlements; + CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = MLT7M394S7; + INFOPLIST_FILE = "$(SRCROOT)/applications/mac/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.brightdigit.Speculid-Mac-App"; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = Speculid; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 4.0; + }; + name = Debug; + }; + B37C744E1F8C58F300DF505B /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = FBD208DDED47AEA144AD3F63 /* Pods-Speculid-Mac-App.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = Speculid.entitlements; + CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = MLT7M394S7; + INFOPLIST_FILE = "$(SRCROOT)/applications/mac/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.brightdigit.Speculid-Mac-App"; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = Speculid; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 4.0; + }; + name = Release; + }; + B37C74601F8C590D00DF505B /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = C743CA092B2436D579EB1965 /* Pods-Speculid-Mac-XPC.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = MLT7M394S7; + INFOPLIST_FILE = "$(SRCROOT)/applications/xpc/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks @executable_path/../../../../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.brightdigit.Speculid-Mac-XPC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; + }; + name = Debug; + }; + B37C74611F8C590D00DF505B /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F6CC72BCECBB97B332E4DC41 /* Pods-Speculid-Mac-XPC.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = MLT7M394S7; + INFOPLIST_FILE = "$(SRCROOT)/applications/xpc/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks @executable_path/../../../../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.brightdigit.Speculid-Mac-XPC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_VERSION = 4.0; + }; + name = Release; + }; + B37C747D1F8C5ADA00DF505B /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DD668DE3E97BC37C2DC71F41 /* Pods-Speculid.debug.xcconfig */; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = MLT7M394S7; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + INFOPLIST_FILE = "$(SRCROOT)/frameworks/speculid/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.brightdigit.Speculid-Mac-Framework"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + B37C747E1F8C5ADA00DF505B /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 87434B3EFCD8AF7732299E58 /* Pods-Speculid.release.xcconfig */; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = MLT7M394S7; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + INFOPLIST_FILE = "$(SRCROOT)/frameworks/speculid/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.brightdigit.Speculid-Mac-Framework"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 4.0; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + B37C74931F8C5B5C00DF505B /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7DD68C68194F71BF3C7B683C /* Pods-CairoSVG.debug.xcconfig */; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Speculid.entitlements; + CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = MLT7M394S7; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + HEADER_SEARCH_PATHS = "frameworks/cairosvg/dependencies/**"; + INFOPLIST_FILE = "$(SRCROOT)/frameworks/cairosvg/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/pixman/0.34.0_1/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/freetype/2.9.1/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/lib/gdk-pixbuf-2.0/2.10.0/loaders", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/glib/2.56.1/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/cairo/1.14.12/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/cairo", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/fontconfig/2.13.0/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/lib/gdk-pixbuf-2.0/2.10.0/loaders", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/pango/1.42.1/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/libpng/1.6.34/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/pcre/8.42/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/libffi/3.2.1/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/libcroco/0.6.12/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/fribidi/1.0.3/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/fribidi/1.0.2/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/icu4c/61.1/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/icu4c/60.2/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/graphite2/1.3.11/lib", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.brightdigit.CairoSVG-Mac-Framework"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + B37C74941F8C5B5C00DF505B /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 72377B2194FCD69B6D9FED05 /* Pods-CairoSVG.release.xcconfig */; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Speculid.entitlements; + CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = MLT7M394S7; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + HEADER_SEARCH_PATHS = "frameworks/cairosvg/dependencies/**"; + INFOPLIST_FILE = "$(SRCROOT)/frameworks/cairosvg/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/pixman/0.34.0_1/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/freetype/2.9.1/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/lib/gdk-pixbuf-2.0/2.10.0/loaders", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/glib/2.56.1/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/cairo/1.14.12/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/cairo", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/fontconfig/2.13.0/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/lib/gdk-pixbuf-2.0/2.10.0/loaders", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/pango/1.42.1/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/libpng/1.6.34/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/pcre/8.42/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/libffi/3.2.1/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/libcroco/0.6.12/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/fribidi/1.0.3/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/fribidi/1.0.2/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/icu4c/61.1/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/icu4c/60.2/lib", + "$(PROJECT_DIR)/frameworks/cairosvg/dependencies/graphite2/1.3.11/lib", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.brightdigit.CairoSVG-Mac-Framework"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_VERSION = 4.0; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B3136E691F90FCCF0002B7AB /* Build configuration list for PBXNativeTarget "Speculid-Mac-AppUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B3136E671F90FCCF0002B7AB /* Debug */, + B3136E681F90FCCF0002B7AB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B3136E861F90FD2E0002B7AB /* Build configuration list for PBXNativeTarget "SpeculidTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B3136E871F90FD2E0002B7AB /* Debug */, + B3136E881F90FD2E0002B7AB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B3136E951F90FD3D0002B7AB /* Build configuration list for PBXNativeTarget "CairoSVGTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B3136E961F90FD3D0002B7AB /* Debug */, + B3136E971F90FD3D0002B7AB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B37C74391F8C58F300DF505B /* Build configuration list for PBXProject "Speculid" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B37C744A1F8C58F300DF505B /* Debug */, + B37C744B1F8C58F300DF505B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B37C744C1F8C58F300DF505B /* Build configuration list for PBXNativeTarget "Speculid-Mac-App" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B37C744D1F8C58F300DF505B /* Debug */, + B37C744E1F8C58F300DF505B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B37C745F1F8C590D00DF505B /* Build configuration list for PBXNativeTarget "Speculid-Mac-XPC" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B37C74601F8C590D00DF505B /* Debug */, + B37C74611F8C590D00DF505B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B37C747C1F8C5ADA00DF505B /* Build configuration list for PBXNativeTarget "Speculid" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B37C747D1F8C5ADA00DF505B /* Debug */, + B37C747E1F8C5ADA00DF505B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B37C74921F8C5B5C00DF505B /* Build configuration list for PBXNativeTarget "CairoSVG" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B37C74931F8C5B5C00DF505B /* Debug */, + B37C74941F8C5B5C00DF505B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = B37C74361F8C58F300DF505B /* Project object */; +} diff --git a/Speculid.xcodeproj/xcshareddata/xcschemes/CairoSVG-Flags.xcscheme b/Speculid.xcodeproj/xcshareddata/xcschemes/CairoSVG-Flags.xcscheme new file mode 100644 index 00000000..88077094 --- /dev/null +++ b/Speculid.xcodeproj/xcshareddata/xcschemes/CairoSVG-Flags.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Speculid.xcodeproj/xcshareddata/xcschemes/CairoSVG.xcscheme b/Speculid.xcodeproj/xcshareddata/xcschemes/CairoSVG.xcscheme new file mode 100644 index 00000000..60ca3ff8 --- /dev/null +++ b/Speculid.xcodeproj/xcshareddata/xcschemes/CairoSVG.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Speculid.xcodeproj/xcshareddata/xcschemes/Speculid-Mac-App.xcscheme b/Speculid.xcodeproj/xcshareddata/xcschemes/Speculid-Mac-App.xcscheme new file mode 100644 index 00000000..2618c204 --- /dev/null +++ b/Speculid.xcodeproj/xcshareddata/xcschemes/Speculid-Mac-App.xcscheme @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Speculid.xcodeproj/xcshareddata/xcschemes/Speculid-Mac-XPC.xcscheme b/Speculid.xcodeproj/xcshareddata/xcschemes/Speculid-Mac-XPC.xcscheme new file mode 100644 index 00000000..99ec58c8 --- /dev/null +++ b/Speculid.xcodeproj/xcshareddata/xcschemes/Speculid-Mac-XPC.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/speculid.xcodeproj/xcshareddata/xcschemes/Speculid.xcscheme b/Speculid.xcodeproj/xcshareddata/xcschemes/Speculid.xcscheme similarity index 88% rename from speculid.xcodeproj/xcshareddata/xcschemes/Speculid.xcscheme rename to Speculid.xcodeproj/xcshareddata/xcschemes/Speculid.xcscheme index dc3f20df..55a14fb9 100644 --- a/speculid.xcodeproj/xcshareddata/xcschemes/Speculid.xcscheme +++ b/Speculid.xcodeproj/xcshareddata/xcschemes/Speculid.xcscheme @@ -1,6 +1,6 @@ @@ -26,14 +26,14 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES" - codeCoverageEnabled = "YES"> + codeCoverageEnabled = "YES" + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -43,7 +43,7 @@ @@ -65,7 +65,7 @@ @@ -83,7 +83,7 @@ diff --git a/Speculid.xcworkspace/contents.xcworkspacedata b/Speculid.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..4a8748c7 --- /dev/null +++ b/Speculid.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/Speculid.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Speculid.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/Speculid.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Speculid.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Speculid.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..0c67376e --- /dev/null +++ b/Speculid.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,5 @@ + + + + + diff --git a/application/Assets.xcassets/AppIcon.appiconset/layers.16x16@1x~mac.png b/application/Assets.xcassets/AppIcon.appiconset/layers.16x16@1x~mac.png deleted file mode 100644 index e87c967a..00000000 Binary files a/application/Assets.xcassets/AppIcon.appiconset/layers.16x16@1x~mac.png and /dev/null differ diff --git a/application/Assets.xcassets/AppIcon.appiconset/layers.32x32@2x~mac.png b/application/Assets.xcassets/AppIcon.appiconset/layers.32x32@2x~mac.png deleted file mode 100644 index 2685ca93..00000000 Binary files a/application/Assets.xcassets/AppIcon.appiconset/layers.32x32@2x~mac.png and /dev/null differ diff --git a/application/Info.plist b/application/Info.plist deleted file mode 100644 index df6f5dfe..00000000 --- a/application/Info.plist +++ /dev/null @@ -1,30 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - $(DEFAULT_VERSION_SEMVER) - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - LSApplicationCategoryType - public.app-category.developer-tools - LSMinimumSystemVersion - $(MACOSX_DEPLOYMENT_TARGET) - NSPrincipalClass - NSApplication - - diff --git a/application/graphics.sh b/application/graphics.sh deleted file mode 100755 index b5ce0871..00000000 --- a/application/graphics.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash - -PACKS=./graphics/packs/active/ -ASSET_ROOT=./Media.xcassets/Icons/Packs -if [ ! -d "$ASSET_ROOT" ]; then - rm -rf $ASSET_ROOT - mkdir -p $ASSET_ROOT - echo '{"info":{"version":1,"author":"xcode"}}' > $ASSET_ROOT/Contents.json - for pack in "$PACKS"* - do - packname=$(basename "$pack") - mkdir -p $ASSET_ROOT/$packname - echo '{"info":{"version":1,"author":"xcode"}}' > $ASSET_ROOT/$packname/Contents.json - for file in $pack/*.svg - do - imagename=$(basename "$file" ".svg") - mkdir -p $ASSET_ROOT/$packname/$imagename-$packname.imageset - echo '{"images":[{"idiom":"universal","filename":"icon.pdf"}],"info":{"version":1,"author":"xcode"}}' > $ASSET_ROOT/$packname/$imagename-$packname.imageset/Contents.json - inkscape --without-gui --export-area-drawing --export-pdf $ASSET_ROOT/$packname/$imagename-$packname.imageset/icon.pdf $file 2> /dev/null > /dev/null & - done - done - wait -fi - -for x in 20 29 40 58 60 76 87 80 120 152 167 180 ; do inkscape --export-id=Release --export-id-only --without-gui --export-png Media.xcassets/AppIcon-Production-Release.appiconset/appicon_${x}.png -w ${x} -b white graphics/logo.svg 2> /dev/null > /dev/null & done -wait -for x in 40 58 80 120 ; do cp -v Media.xcassets/AppIcon-Production-Release.appiconset/appicon_${x}.png Media.xcassets/AppIcon-Production-Release.appiconset/appicon_${x}-1.png >/dev/null 2> /dev/null > /dev/null & done -wait -for x in 40 ; do cp -v Media.xcassets/AppIcon-Production-Release.appiconset/appicon_${x}.png Media.xcassets/AppIcon-Production-Release.appiconset/appicon_${x}-2.png >/dev/null 2> /dev/null > /dev/null & done -wait - -for x in 20 29 40 58 60 76 87 80 120 152 167 180 ; do inkscape --export-id=alpha --export-id-only --without-gui --export-png Media.xcassets/AppIcon-Alpha-Release.appiconset/appicon_${x}.png -w ${x} -b white graphics/logo.svg 2> /dev/null > /dev/null & done -wait -for x in 40 58 80 120 ; do cp -v Media.xcassets/AppIcon-Alpha-Release.appiconset/appicon_${x}.png Media.xcassets/AppIcon-Alpha-Release.appiconset/appicon_${x}-1.png 2> /dev/null > /dev/null & done -wait -for x in 40 ; do cp -v Media.xcassets/AppIcon-Alpha-Release.appiconset/appicon_${x}.png Media.xcassets/AppIcon-Alpha-Release.appiconset/appicon_${x}-2.png 2> /dev/null > /dev/null & done -wait - - -for x in 20 29 40 58 60 76 87 80 120 152 167 180 ; do inkscape --export-id=beta --export-id-only --without-gui --export-png Media.xcassets/AppIcon-Beta-Release.appiconset/appicon_${x}.png -w ${x} -b white graphics/logo.svg 2> /dev/null > /dev/null & done -wait -for x in 40 58 80 120 ; do cp -v Media.xcassets/AppIcon-Beta-Release.appiconset/appicon_${x}.png Media.xcassets/AppIcon-Beta-Release.appiconset/appicon_${x}-1.png 2> /dev/null > /dev/null & done -wait -for x in 40 ; do cp -v Media.xcassets/AppIcon-Beta-Release.appiconset/appicon_${x}.png Media.xcassets/AppIcon-Beta-Release.appiconset/appicon_${x}-2.png 2> /dev/null > /dev/null & done -wait - -MEDIA_ROOT=./Media.xcassets/ -for appiconset in "$MEDIA_ROOT"*-Release.appiconset -do - BASENAME=$(basename "$appiconset" .appiconset) - STAGENAME=${BASENAME%-Release} - DEBUGNAME="$MEDIA_ROOT$STAGENAME-Debug.appiconset" - for SOURCE in $appiconset/*.png - do - BASENAME=$(basename "$SOURCE") - DESTINATION=$DEBUGNAME/$BASENAME - convert $SOURCE -posterize 5 -edge 1 -negate -monochrome $DESTINATION & - done - wait -done - -inkscape --without-gui --export-area-drawing --export-pdf Media.xcassets/Title.imageset/title.pdf graphics/title.svg 2> /dev/null > /dev/null -inkscape --without-gui --export-area-drawing --export-id=_x35_d85d3c3-4443-4929-9938-b4c08b4e3c05 --export-pdf Media.xcassets/Logo.imageset/logo.pdf graphics/logo.svg 2> /dev/null > /dev/null -mkdir -p .tmp && sed -e "s/#FFFFFF/#000000/" graphics/logo.svg>.tmp/logo.svg && inkscape --without-gui --export-area-drawing --export-id=_x35_d85d3c3-4443-4929-9938-b4c08b4e3c05 --export-pdf Media.xcassets/Logo-Black.imageset/logo.pdf .tmp/logo.svg 2> /dev/null > /dev/null - - -for x in 640 1280 1920 ; do convert graphics/pexels-photo.jpg -resize ${x} Media.xcassets/Backgrounds/Wrist-Watch.imageset/Write-Watch_${x}.jpg 2> /dev/null > /dev/null & done -wait - -for x in 640 1280 1920 ; do convert graphics/permissions/calendar.jpg -resize ${x} Media.xcassets/Backgrounds/Permissions/Calendar.imageset/Calendar_${x}.jpg 2> /dev/null > /dev/null & done -wait - -for x in 640 1280 1920 ; do convert graphics/permissions/locations.jpg -resize ${x} Media.xcassets/Backgrounds/Permissions/Locations.imageset/Locations_${x}.jpg 2> /dev/null > /dev/null & done -wait - -for x in 640 1280 1920 ; do convert graphics/permissions/notifications.jpg -resize ${x} Media.xcassets/Backgrounds/Permissions/Notifications.imageset/Notifications_${x}.jpg 2> /dev/null > /dev/null & done -wait - -inkscape --without-gui --export-area-drawing --export-pdf Media.xcassets/Icons/Permissions/Notifications\ Icon.imageset/Notifications.pdf graphics/permissions/icons/notifications.svg 2> /dev/null > /dev/null -inkscape --without-gui --export-area-drawing --export-pdf Media.xcassets/Icons/Permissions/Calendar\ Icon.imageset/Calendar.pdf graphics/permissions/icons/calendar.svg 2> /dev/null > /dev/null -inkscape --without-gui --export-area-drawing --export-pdf Media.xcassets/Icons/Permissions/Locations\ Icon.imageset/Locations.pdf graphics/permissions/icons/locations.svg 2> /dev/null > /dev/null - diff --git a/application/jpg-imageset.spcld b/application/jpg-imageset.spcld deleted file mode 100644 index 787899b8..00000000 --- a/application/jpg-imageset.spcld +++ /dev/null @@ -1,5 +0,0 @@ -{ -"set" : "Assets.xcassets/Raster Image.imageset", -"source" : "layers.png", -"geometry" : "128" -} diff --git a/application/layers.png b/application/layers.png deleted file mode 100644 index 9bd1d8be..00000000 Binary files a/application/layers.png and /dev/null differ diff --git a/application/main.swift b/application/main.swift deleted file mode 100644 index 1f98020c..00000000 --- a/application/main.swift +++ /dev/null @@ -1,244 +0,0 @@ -// -// main.swift -// speculid -// -// Created by Leo Dion on 9/27/16. -// -// - -import Foundation -import Speculid -import SwiftVer - -protocol ResourceSource { - func url(forResource name: String?, withExtension ext: String?) -> URL? -} - -extension String : ResourceSource { - func url(forResource name: String?, withExtension ext: String?) -> URL? { - if let bundle = Bundle(path: self){ - if let url = bundle.url(forResource: name, withExtension: ext) { - return url - } else { - return bundle.executablePath?.url(forResource: name, withExtension: ext) - } - } else if let destinationPath = try? FileManager.default.destinationOfSymbolicLink(atPath: self) { - return URL(fileURLWithPath: self).deletingLastPathComponent().appendingPathComponent(destinationPath).path.url(forResource: name, withExtension: ext) - } else if FileManager.default.isExecutableFile(atPath: self) { - var url = URL(fileURLWithPath: self).deletingLastPathComponent() - while url.path != "/" { - if let bundle = Bundle(url: url), let resourceUrl = bundle.url(forResource: name, withExtension: ext) { - return resourceUrl - } - url.deleteLastPathComponent() - } - } - return nil - } -} - - -let formatter: NumberFormatter = { - let formatter = NumberFormatter() - formatter.minimumFractionDigits = 9 - formatter.minimumIntegerDigits = 1 - return formatter -}() - -extension SemVer : Hashable { - public var hashValue: Int { - return self.description.hashValue - } -} - -public func ==(left: SemVer, right: SemVer) -> Bool { - return left.major == right.major && left.minor == right.minor && left.patch == right.patch -} - -enum Stage : CustomStringConvertible { - static let all : Set = [.alpha, .beta, .production] - case alpha, beta, production - - var description: String { - switch self { - case .alpha: - return "alpha" - case .beta: - return "beta" - case .production: - return "production" - } - } - - init?(string: String) { - for stage in Stage.all { - if string.compare(stage.description, options: String.CompareOptions.caseInsensitive, range: nil, locale: nil) == ComparisonResult.orderedSame { - self = stage - return - } - } - return nil - } - - public static let dictionary: StageBuildDictionaryProtocol! = { - guard let url = Bundle.main.url(forResource: "versions", withExtension: "plist") else { - return StageBuildDictionary(dictionary: StageBuildDictionaryBase()) - } - - let data = try! Data(contentsOf: url) - let plistObj = try! PropertyListSerialization.propertyList(from: data, options: PropertyListSerialization.ReadOptions(), format: nil) - let plist = plistObj as! [String : [String : Int]] - let dictionary = plist.reduce(StageBuildDictionaryBase(), { (previous, pair) -> StageBuildDictionaryBase in - var mutable = previous - mutable[SemVer(versionString: pair.key)!] = pair.value.reduce( - [Stage : UInt8](), - {(previous, pair) -> [Stage : UInt8] in - - var mutable = previous - mutable[Stage(string: pair.key)!] = UInt8(pair.value) - return mutable - }) - return mutable - }) - - return StageBuildDictionary(dictionary: dictionary) - }() -} - -struct StageBuildDictionary : StageBuildDictionaryProtocol { - - let dictionary : StageBuildDictionaryBase - - func stage(withBuildForVersion version: Version) -> StageBuild? { - let result = self.dictionary[version.semver]?.filter{ - $0.value <= version.build - }.max(by: {$0.value < $1.value}) - if let result = result { - return (stage: result.key, minimum: result.value) - } else { - return nil - } - } - - public init (dictionary: StageBuildDictionaryBase) { - self.dictionary = dictionary - } -} - -typealias StageBuildDictionaryBase = [SemVer : [Stage : UInt8]] -typealias StageBuild = (stage: Stage, minimum: UInt8) - -protocol StageBuildDictionaryProtocol { - func stage (withBuildForVersion version: Version) -> StageBuild? -} - -func -(a: UInt8?, b: UInt8?) -> UInt8? { - guard let a = a, let b = b else { - return nil - } - return a - b -} - - - -extension Version : CustomStringConvertible { - public var extra:Double { - if let extraString = self.versionControl?.EXTRA { - return Double(extraString) ?? 0 - } else { - return 0 - } - } - - var shortDescription:String { - let stage:Stage - let build:UInt8? - if let stagebuild = Stage.dictionary.stage(withBuildForVersion: self) { - stage = stagebuild.stage - build = stagebuild.minimum - } else { - stage = .production - build = nil - } - switch stage { - case .production: - return self.semver.description - default: - return "\(self.semver)-\(stage)\(self.build - ((build - 1) ?? 0))" - } - - } - - var fullDescription:String { - let suffix = (Double(self.build) + (Double(self.versionControl?.TICK ?? 0) + self.extra/1000.0)/10000.0)/100.0 - let suffixString = formatter.string(for: suffix)!.components(separatedBy: ".")[1] - return "\(self.semver)\(suffixString)" - } - - public var description:String { - return self.fullDescription - } - -} - -public enum CommandLineParameter : String { - case Help = "help", Version = "version" -} - -extension Array: SpeculidArgumentsProtocol { - -} - -Speculid.begin(withArguments: CommandLine.arguments,{ - (speculid) in - - let helpText = try! String(contentsOf: Bundle.main.bundlePath.url(forResource: "help", withExtension: "txt")!) - - let output = FileHandle.standardOutput - - let regex = try! NSRegularExpression(pattern: "\\-\\-(\\w+)", options: []) - let speculidURL: URL? - - if let path = CommandLine.arguments.last , CommandLine.arguments.count > 1 { - speculidURL = URL(fileURLWithPath: path) - } else { - let openPanel = NSOpenPanel() - openPanel.allowsMultipleSelection = false - openPanel.canChooseDirectories = false - openPanel.canChooseFiles = true - openPanel.allowedFileTypes = ["spcld","speculid"] - openPanel.runModal() - openPanel.title = "Select File" - speculidURL = openPanel.url - openPanel.close() - } - - if let speculidURL = speculidURL { - if let document = speculid.document(url: speculidURL) { - if let error = speculid.builder.build(document: document) { - print(error) - exit(1) - } - } else if let parameter = CommandLine.arguments.dropFirst().first { - let range = NSRange(0.. - - - - 1.0.1 - - beta - 4 - production - 5 - - - diff --git a/applications/mac/Application.swift b/applications/mac/Application.swift new file mode 100644 index 00000000..0caffc9f --- /dev/null +++ b/applications/mac/Application.swift @@ -0,0 +1,5 @@ +import Cocoa +import Speculid + +open class Application: Speculid.Application { +} diff --git a/applications/mac/Info.plist b/applications/mac/Info.plist new file mode 100644 index 00000000..9ba4179f --- /dev/null +++ b/applications/mac/Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(DEFAULT_SEMVER_VERSION) + CFBundleVersion + $(DEFAULT_BUNDLE_VERSION) + LSApplicationCategoryType + public.app-category.developer-tools + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + LSUIElement + + NSHumanReadableCopyright + Copyright © 2017 Bright Digit, LLC. All rights reserved. + NSPrincipalClass + $(TARGET_NAME:c99extidentifier).Application + + diff --git a/applications/mac/Speculid_Mac_App.entitlements b/applications/mac/Speculid_Mac_App.entitlements new file mode 100644 index 00000000..0c67376e --- /dev/null +++ b/applications/mac/Speculid_Mac_App.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/application/Assets.xcassets/AppIcon.appiconset/Contents.json b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from application/Assets.xcassets/AppIcon.appiconset/Contents.json rename to applications/mac/assets/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/application/Assets.xcassets/AppIcon.appiconset/layers.128x128@1x~mac.png b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.128x128@1x~mac.png similarity index 94% rename from application/Assets.xcassets/AppIcon.appiconset/layers.128x128@1x~mac.png rename to applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.128x128@1x~mac.png index 669e0422..dd1bb8cc 100644 Binary files a/application/Assets.xcassets/AppIcon.appiconset/layers.128x128@1x~mac.png and b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.128x128@1x~mac.png differ diff --git a/application/Assets.xcassets/AppIcon.appiconset/layers.128x128@2x~mac.png b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.128x128@2x~mac.png similarity index 94% rename from application/Assets.xcassets/AppIcon.appiconset/layers.128x128@2x~mac.png rename to applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.128x128@2x~mac.png index 00c540d2..3443d514 100644 Binary files a/application/Assets.xcassets/AppIcon.appiconset/layers.128x128@2x~mac.png and b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.128x128@2x~mac.png differ diff --git a/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.16x16@1x~mac.png b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.16x16@1x~mac.png new file mode 100644 index 00000000..0c25feb0 Binary files /dev/null and b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.16x16@1x~mac.png differ diff --git a/application/Assets.xcassets/AppIcon.appiconset/layers.16x16@2x~mac.png b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.16x16@2x~mac.png similarity index 78% rename from application/Assets.xcassets/AppIcon.appiconset/layers.16x16@2x~mac.png rename to applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.16x16@2x~mac.png index 85d64225..e244bba8 100644 Binary files a/application/Assets.xcassets/AppIcon.appiconset/layers.16x16@2x~mac.png and b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.16x16@2x~mac.png differ diff --git a/application/Assets.xcassets/AppIcon.appiconset/layers.256x256@1x~mac.png b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.256x256@1x~mac.png similarity index 94% rename from application/Assets.xcassets/AppIcon.appiconset/layers.256x256@1x~mac.png rename to applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.256x256@1x~mac.png index 00c540d2..3443d514 100644 Binary files a/application/Assets.xcassets/AppIcon.appiconset/layers.256x256@1x~mac.png and b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.256x256@1x~mac.png differ diff --git a/application/Assets.xcassets/AppIcon.appiconset/layers.256x256@2x~mac.png b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.256x256@2x~mac.png similarity index 98% rename from application/Assets.xcassets/AppIcon.appiconset/layers.256x256@2x~mac.png rename to applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.256x256@2x~mac.png index 239520bb..a20a0e77 100644 Binary files a/application/Assets.xcassets/AppIcon.appiconset/layers.256x256@2x~mac.png and b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.256x256@2x~mac.png differ diff --git a/application/Assets.xcassets/AppIcon.appiconset/layers.32x32@1x~mac.png b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.32x32@1x~mac.png similarity index 78% rename from application/Assets.xcassets/AppIcon.appiconset/layers.32x32@1x~mac.png rename to applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.32x32@1x~mac.png index 85d64225..e244bba8 100644 Binary files a/application/Assets.xcassets/AppIcon.appiconset/layers.32x32@1x~mac.png and b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.32x32@1x~mac.png differ diff --git a/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.32x32@2x~mac.png b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.32x32@2x~mac.png new file mode 100644 index 00000000..b5c51fc8 Binary files /dev/null and b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.32x32@2x~mac.png differ diff --git a/application/Assets.xcassets/AppIcon.appiconset/layers.512x512@1x~mac.png b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.512x512@1x~mac.png similarity index 98% rename from application/Assets.xcassets/AppIcon.appiconset/layers.512x512@1x~mac.png rename to applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.512x512@1x~mac.png index 239520bb..a20a0e77 100644 Binary files a/application/Assets.xcassets/AppIcon.appiconset/layers.512x512@1x~mac.png and b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.512x512@1x~mac.png differ diff --git a/application/Assets.xcassets/AppIcon.appiconset/layers.512x512@2x~mac.png b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.512x512@2x~mac.png similarity index 99% rename from application/Assets.xcassets/AppIcon.appiconset/layers.512x512@2x~mac.png rename to applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.512x512@2x~mac.png index 6a26c05a..8bd8c219 100644 Binary files a/application/Assets.xcassets/AppIcon.appiconset/layers.512x512@2x~mac.png and b/applications/mac/assets/Assets.xcassets/AppIcon.appiconset/layers.512x512@2x~mac.png differ diff --git a/application/Assets.xcassets/Contents.json b/applications/mac/assets/Assets.xcassets/Contents.json similarity index 100% rename from application/Assets.xcassets/Contents.json rename to applications/mac/assets/Assets.xcassets/Contents.json diff --git a/applications/mac/assets/Assets.xcassets/TrayIcon.imageset/Contents.json b/applications/mac/assets/Assets.xcassets/TrayIcon.imageset/Contents.json new file mode 100644 index 00000000..c2d3adb8 --- /dev/null +++ b/applications/mac/assets/Assets.xcassets/TrayIcon.imageset/Contents.json @@ -0,0 +1,30 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "layers.pdf" + }, + { + "idiom" : "universal", + "filename" : "layers.1x~universal.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "layers.2x~universal.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "layers.3x~universal.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + }, + "properties" : { + "preserves-vector-representation" : true + } +} \ No newline at end of file diff --git a/applications/mac/assets/Assets.xcassets/TrayIcon.imageset/layers.1x~universal.png b/applications/mac/assets/Assets.xcassets/TrayIcon.imageset/layers.1x~universal.png new file mode 100644 index 00000000..0c25feb0 Binary files /dev/null and b/applications/mac/assets/Assets.xcassets/TrayIcon.imageset/layers.1x~universal.png differ diff --git a/applications/mac/assets/Assets.xcassets/TrayIcon.imageset/layers.2x~universal.png b/applications/mac/assets/Assets.xcassets/TrayIcon.imageset/layers.2x~universal.png new file mode 100644 index 00000000..e244bba8 Binary files /dev/null and b/applications/mac/assets/Assets.xcassets/TrayIcon.imageset/layers.2x~universal.png differ diff --git a/applications/mac/assets/Assets.xcassets/TrayIcon.imageset/layers.3x~universal.png b/applications/mac/assets/Assets.xcassets/TrayIcon.imageset/layers.3x~universal.png new file mode 100644 index 00000000..666eebf0 Binary files /dev/null and b/applications/mac/assets/Assets.xcassets/TrayIcon.imageset/layers.3x~universal.png differ diff --git a/applications/mac/assets/Assets.xcassets/TrayIcon.imageset/layers.pdf b/applications/mac/assets/Assets.xcassets/TrayIcon.imageset/layers.pdf new file mode 100644 index 00000000..d25af7fa Binary files /dev/null and b/applications/mac/assets/Assets.xcassets/TrayIcon.imageset/layers.pdf differ diff --git a/application/layers.svg b/applications/mac/assets/layers.svg similarity index 100% rename from application/layers.svg rename to applications/mac/assets/layers.svg diff --git a/application/svg-appicon.spcld b/applications/mac/assets/svg-appicon.speculid similarity index 100% rename from application/svg-appicon.spcld rename to applications/mac/assets/svg-appicon.speculid diff --git a/applications/mac/assets/svg-trayicon.speculid b/applications/mac/assets/svg-trayicon.speculid new file mode 100644 index 00000000..e756c8cf --- /dev/null +++ b/applications/mac/assets/svg-trayicon.speculid @@ -0,0 +1,5 @@ +{ +"set" : "Assets.xcassets/TrayIcon.imageset", +"source" : "layers.svg", +"geometry" : "16" +} diff --git a/applications/mac/main.swift b/applications/mac/main.swift new file mode 100644 index 00000000..77a36be5 --- /dev/null +++ b/applications/mac/main.swift @@ -0,0 +1,10 @@ +import Cocoa +import Foundation + +#if DEBUG + NSSetUncaughtExceptionHandler { exception in + debugPrint(exception) + } +#endif + +_ = NSApplicationMain(CommandLine.argc, CommandLine.unsafeArgv) diff --git a/applications/xpc/Info.plist b/applications/xpc/Info.plist new file mode 100644 index 00000000..b080a3f7 --- /dev/null +++ b/applications/xpc/Info.plist @@ -0,0 +1,31 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Speculid-Mac-XPC + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + XPC! + CFBundleShortVersionString + $(DEFAULT_SEMVER_VERSION) + CFBundleVersion + $(DEFAULT_BUNDLE_VERSION) + NSHumanReadableCopyright + Copyright © 2017 Bright Digit, LLC. All rights reserved. + XPCService + + ServiceType + Application + + + diff --git a/applications/xpc/ServiceDelegate.swift b/applications/xpc/ServiceDelegate.swift new file mode 100644 index 00000000..c1d323c5 --- /dev/null +++ b/applications/xpc/ServiceDelegate.swift @@ -0,0 +1,17 @@ +import Cocoa +import CoreFoundation +import Speculid + +@objc open class ServiceDelegate: NSObject, NSXPCListenerDelegate { + public func listener(_: NSXPCListener, shouldAcceptNewConnection newConnection: NSXPCConnection) -> Bool { + let exportedInterface = NSXPCInterface(with: ServiceProtocol.self) + let currentClasses: NSSet = exportedInterface.classes(for: #selector(ServiceProtocol.exportImageAtURL(_:toSpecifications:_:)), argumentIndex: 1, ofReply: false) as NSSet + let classes = currentClasses.addingObjects(from: [ImageSpecification.self, ImageFile.self, NSURL.self, NSColor.self]) + exportedInterface.setClasses(classes, for: #selector(ServiceProtocol.exportImageAtURL(_:toSpecifications:_:)), argumentIndex: 1, ofReply: false) + newConnection.exportedInterface = exportedInterface + let exportedObject = Service() + newConnection.exportedObject = exportedObject + newConnection.resume() + return true + } +} diff --git a/applications/xpc/main.swift b/applications/xpc/main.swift new file mode 100644 index 00000000..4a14b9ee --- /dev/null +++ b/applications/xpc/main.swift @@ -0,0 +1,6 @@ +import Foundation + +let delegate = ServiceDelegate() +let listener = NSXPCListener.service() +listener.delegate = delegate +listener.resume() diff --git a/autorevision.sh b/bin/autorevision.sh similarity index 100% rename from autorevision.sh rename to bin/autorevision.sh diff --git a/bin/package.sh b/bin/package.sh new file mode 100755 index 00000000..4a12a387 --- /dev/null +++ b/bin/package.sh @@ -0,0 +1,177 @@ +#!/bin/bash + +TEMP_AUTOREVISION_SH=`mktemp` + +#BASE_URL=$1 +#SAVE_APPCAST=$2 +#BUILD_DIR=$3 +#PUBLIC_SUBDIR=$4 +#BUILD_PUBLIC="$3/${PUBLIC_SUBDIR}" + +#ARCHIVE_PATH="${BUILD_DIR}/Speculid.xcarchive" +ZIP_PATH="${BUILD_DIR}/Speculid.zip" +APP_PATH=$1 +#DSASIGNITURE_PATH="${BUILD_DIR}/dsaSigniture" + +AUTOREVISION_JSON="frameworks/speculid/autorevision.json" +VERSIONS_PLIST="frameworks/speculid/versions.plist" + +#ITEM_TEMPLATE_PATH="appcasts/item_template.xml" +#APPCASTS_PUBLIC="appcasts/public" + +./bin/autorevision.sh -t sh >${TEMP_AUTOREVISION_SH} && source ${TEMP_AUTOREVISION_SH} +VCS_EXTRA=`perl -nle 'print $& if m{"VCS_EXTRA": "\K\d+}' ${AUTOREVISION_JSON}` + +BUILD_NUMBER=`/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" ${APP_PATH}/Contents/Info.plist` +VERSION_NUMBER=`/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" ${APP_PATH}/Contents/Info.plist` +MINIMUM_PRODUCTION_BUILD=`/usr/libexec/PlistBuddy -c "Print :${VERSION_NUMBER}:production" ${VERSIONS_PLIST} 2>/dev/null` +MINIMUM_BETA_BUILD=`/usr/libexec/PlistBuddy -c "Print :${VERSION_NUMBER}:beta" ${VERSIONS_PLIST} 2>/dev/null` +MINIMUM_ALPHA_BUILD=`/usr/libexec/PlistBuddy -c "Print :${VERSION_NUMBER}:alpha" ${VERSIONS_PLIST} 2>/dev/null` +PUBDATE=`date -R` +#DSASIGNITURE=$(cat ${DSASIGNITURE_PATH}) +# +#TEMP_APPCAST_XML=`mktemp` +#TEMP_APPCAST_DIR=`mktemp -d` +# +#echo $BUILD_NUMBER + + +if [[ $MINIMUM_ALPHA_BUILD =~ ^-?[0-9]+$ ]]; then + if [ $MINIMUM_ALPHA_BUILD -le $BUILD_NUMBER ]; then + MINIMUM_BUILD=$MINIMUM_ALPHA_BUILD + fi +fi + +if [[ $MINIMUM_BETA_BUILD =~ ^-?[0-9]+$ ]]; then + if [ $MINIMUM_BETA_BUILD -le $BUILD_NUMBER ]; then + BETA=1 + MINIMUM_BUILD=$MINIMUM_BETA_BUILD + else + BETA=0 + fi +fi + +if [[ $MINIMUM_PRODUCTION_BUILD =~ ^-?[0-9]+$ ]]; then + if [ $MINIMUM_PRODUCTION_BUILD -le $BUILD_NUMBER ]; then + PRODUCTION=1 + MINIMUM_BUILD=$MINIMUM_PRODUCTION_BUILD + else + PRODUCTION=0 + fi +fi + +#LONG_VERSION_NUMBER_SUFFIX=${BUILD_NUMBER_ZEROFILL} +# +if [[ $PRODUCTION -eq 1 ]]; then + STAGE=10 +elif [[ $BETA -eq 1 ]]; then + STAGE=5 +else + STAGE=2 +fi + +#echo $MINIMUM_BUILD +# +if [[ $MINIMUM_BUILD ]]; then + VERSION_SUFFIX=$(expr $BUILD_NUMBER - $MINIMUM_BUILD + 1) +else + VERSION_SUFFIX=$BUILD_NUMBER +fi + +if [ $STAGE -eq 10 ]; then + SHORT_VERSION_NUMBER=${VERSION_NUMBER} +else + if [ $STAGE -eq 5 ]; then + STAGE_TEXT=beta + elif [ $STAGE -eq 2 ]; then + STAGE_TEXT=alpha + else + STAGE_TEXT=build + fi + SHORT_VERSION_NUMBER=${VERSION_NUMBER}-${STAGE_TEXT}${VERSION_SUFFIX} +fi + + + +BUILD_NUMBER_ZEROFILL=$(printf %02d $VERSION_SUFFIX) +VCS_TICK_ZEROFILL=$(printf %04d $VCS_TICK) +VCS_EXTRA_ZEROFILL=$(printf %03d $VCS_EXTRA) +LONG_VERSION_NUMBER_SUFFIX=${VERSION_NUMBER}.${BUILD_NUMBER_ZEROFILL}${VCS_TICK_ZEROFILL}${VCS_EXTRA_ZEROFILL} +echo ${LONG_VERSION_NUMBER_SUFFIX} + + + +#FILENAME=releases/Speculid.${SHORT_VERSION_NUMBER}.zip +# +#APPCAST_XML_FILENAME=${SHORT_VERSION_NUMBER}.xml +# +##LONG_VERSION_NUMBER=${VERSION_NUMBER}.${LONG_VERSION_NUMBER_SUFFIX} +#FILE_LENGTH=`( +# du --apparent-size --block-size=1 "${ZIP_PATH}" 2>/dev/null || +# gdu --apparent-size --block-size=1 "${ZIP_PATH}" 2>/dev/null || +# find "${ZIP_PATH}" -printf "%s" 2>/dev/null || +# gfind "${ZIP_PATH}" -printf "%s" 2>/dev/null || +# stat --printf="%s" "${ZIP_PATH}" 2>/dev/null || +# stat -f%z "${ZIP_PATH}" 2>/dev/null || +# wc -c <"${ZIP_PATH}" 2>/dev/null +#) | awk '{print $1}'` +# +#ITEM_TEMPLATE_STR=$(cat ${ITEM_TEMPLATE_PATH}) +#eval "echo \"${ITEM_TEMPLATE_STR}\"" >${TEMP_APPCAST_XML} +# +#mkdir ${TEMP_APPCAST_DIR}/production +#mkdir ${TEMP_APPCAST_DIR}/beta +#mkdir ${TEMP_APPCAST_DIR}/alpha +# +#mkdir -p ${APPCASTS_PUBLIC}/production +#mkdir -p ${APPCASTS_PUBLIC}/beta +#mkdir -p ${APPCASTS_PUBLIC}/alpha +#mkdir -p ${BUILD_PUBLIC}/releases +# +#if [ "$SAVE_APPCAST" = true ]; then +# if [ $STAGE -eq 10 ]; then +# cp ${TEMP_APPCAST_XML} ${APPCASTS_PUBLIC}/production/${APPCAST_XML_FILENAME} +# elif [ $STAGE -ge 5 ]; then +# cp ${TEMP_APPCAST_XML} ${APPCASTS_PUBLIC}/beta/${APPCAST_XML_FILENAME} +# elif [ $STAGE -ge 2 ]; then +# cp ${TEMP_APPCAST_XML} ${APPCASTS_PUBLIC}/alpha/${APPCAST_XML_FILENAME} +# fi +#else +# if [ $STAGE -eq 10 ]; then +# cp ${TEMP_APPCAST_XML} ${TEMP_APPCAST_DIR}/production/${APPCAST_XML_FILENAME} +# fi +# +# if [ $STAGE -ge 5 ]; then +# cp ${TEMP_APPCAST_XML} ${TEMP_APPCAST_DIR}/beta/${APPCAST_XML_FILENAME} +# fi +# +# if [ $STAGE -ge 2 ]; then +# cp ${TEMP_APPCAST_XML} ${TEMP_APPCAST_DIR}/alpha/${APPCAST_XML_FILENAME} +# fi +#fi +# +#cp ${APPCASTS_PUBLIC}/production/*.xml ${TEMP_APPCAST_DIR}/production 2>/dev/null || : +#cp ${APPCASTS_PUBLIC}/production/*.xml ${TEMP_APPCAST_DIR}/beta 2>/dev/null || : +#cp ${APPCASTS_PUBLIC}/production/*.xml ${TEMP_APPCAST_DIR}/alpha 2>/dev/null || : +#cp ${APPCASTS_PUBLIC}/beta/${VERSION_NUMBER}*.xml ${TEMP_APPCAST_DIR}/beta 2>/dev/null || : +#cp ${APPCASTS_PUBLIC}/beta/${VERSION_NUMBER}*.xml ${TEMP_APPCAST_DIR}/alpha 2>/dev/null || : +#cp ${APPCASTS_PUBLIC}/alpha/${VERSION_NUMBER}*.xml ${TEMP_APPCAST_DIR}/alpha 2>/dev/null || : +# +#production_items=$(cat ${TEMP_APPCAST_DIR}/production/*.xml 2>/dev/null) +#beta_items=$(cat ${TEMP_APPCAST_DIR}/beta/*.xml 2>/dev/null) +#alpha_items=$(cat ${TEMP_APPCAST_DIR}/alpha/*.xml 2>/dev/null) +# +#template_str=$(cat "appcasts/appcast_template.xml") +#items=${production_items} +#eval "echo \"${template_str}\"" >"${BUILD_PUBLIC}/releases.xml" +# +#items=${beta_items} +#eval "echo \"${template_str}\"" >"${BUILD_PUBLIC}/beta.${VERSION_NUMBER}.xml" +# +#items=${alpha_items} +#eval "echo \"${template_str}\"" >"${BUILD_PUBLIC}/alpha.${VERSION_NUMBER}.xml" +# +#cp ${ZIP_PATH} ${BUILD_PUBLIC}/${FILENAME} +# +#rm -rf ${TEMP_APPCAST_DIR} + diff --git a/brew-install b/brew-install deleted file mode 100755 index 370bcd0e..00000000 --- a/brew-install +++ /dev/null @@ -1,26 +0,0 @@ - -#!/bin/bash - -# Wrapper around 'brew install' emitting a message every minute if the command is still running. -# This is used on Travis to ensure the install isn't killed when there is no output over a long period (10 minutes). -# Usage: brew-install package, where package is the name of the package for brew to install. - -seconds=0 -minutes=0 -brew install $1 & -while true; do - ps -p$! 2>& 1>/dev/null - if [ $? = 0 ]; then - if [ $seconds = 60 ]; then - let seconds=0 - let minutes=minutes+1 - echo "brew install $1 still running ($minutes min)" - fi - sleep 1 - let seconds=seconds+1 - else - break - fi -done -wait $! -exit $? \ No newline at end of file diff --git a/certs/AppleWWDRCA.cer b/certs/AppleWWDRCA.cer new file mode 100644 index 00000000..d2bb1da6 Binary files /dev/null and b/certs/AppleWWDRCA.cer differ diff --git a/certs/developer_id.cer.enc b/certs/developer_id.cer.enc new file mode 100644 index 00000000..c30ba0cb --- /dev/null +++ b/certs/developer_id.cer.enc @@ -0,0 +1,30 @@ +U2FsdGVkX19LTyM0LZW/G8SS6UwhejYWsTMOLbrpmRsZksVuHkQz60JxqOh9W1Z/ +nJ25qfbm15iE4cTfdlqdSqBHKo0E0KvcQHjpydmaPD7XyDCq1xIHw0Vo0qxmJS72 +X+YfbvTgJ0FZaqSRoqr/JIX3XqVSp/YS6FN2CJnxBhr3ZRuR5ae688CyEgNJsWYd +miEWIYn8666Z+pPVBfxVFeSYcZ2LN53pEfLXgzLVXaFuINe+66N1cmwlFy7oWoZC +ks/s82qa+Mbu0S8yBRAtqBJQnOgynPcuOlCRV18/ZLyRbLruc32xyogG5K8Hjs94 +2FFuG0numJOe/j3OZXNmJqmJ8cFivqRLVgMYXv4mspS//vdS3kzw52awycqbvLKg +W4tJoQlzbb9/8nSsDRlxsQeMH9l50OSTU0PEWenbqzRu7XqCEPgXavIcyTZCMGuQ +9y8tVI+v5DKesNdMmKMFCCsJx/vnXQHCmCb1jAS8jULGamGCd4j360ErlIjxaabf +ffhMSK/UfGCW8Ac6hr6ualNAb8fCzSRbN1d9603YvwVzXszX1wC+6kfyemF+Bh8d +GyKpwBK/MyGPooaU7wmThMcH8I9i4ZPM12vE4323i3gpmPfy0NLxpudiJSt5V8P+ +fl2XuML4Ai4YM+AYMYurvB3hqAoXNE1V1w9JKXpO1TvSArsq4BE9I9bYjLoh2CZP +HxXJxVliVAWI0ORM0AvsgwGi+Q/pZKMrJ+KNlpWRMSK3q31Me+EyTuZZ8CfTm025 +Pr+SK3tP5JZkj1Mm/ROQyI/9mguq0cnZ+rZsgfGmwwyk7gMc7WdDHFgSXd1v2qSN +yL0bbYrW+QnBa5WnBqkLdA7V7CVgklj+ngoLdY28C7xMon8kM1rnZ2z4POafcGcO +9nZeuplliwiACO7RKFTq/vg64WuLQU+0hRZBcQ/v3Bn/+b3gg39l9VzdNXyv1OYB +VBBYhcIu25XudVCzT1jC/snk+2GI0S1HlTzCHavW4ka4wjEz40XuUxUCVMNb7Gd2 +cfJdEp6Mw21kqJwmkQTd1ecL/OgIN5XPUMrNerOCGPimRW4yfyWEX9BJntdAgHGc +IKAfmpFvFRcjN+BnLGXKljNpvfTiceb8sAoMSb/9/T3ep4E0Yc5IniD0tou0pIk8 +Lw1Fi5wxmRgXCzXgi8DhyX2Q1AGYbwSlgaPaQ+3meGdTIKHWMKe6voOQxOyVLeID +ObCrwzAN8D97TmRYKqvUHcvz0eqN5vM6UNugX+AUx34fGLdadb/RXiNGNe8U3Tir +NSKvtJsr+VwpnF4breht02OrC5kG1i0YPVyblpktQT1jiib1sgHaDfrQ9zFBt8yg +eBPJOwS1KBKRlpSuoEX0U877k6GmuCchMJUHdFWjdzQb3lA8eHIqSLXFBD1Z3LlV +vogkRxl7CjrQ+TCdHX5CA8l6XpHtKDWKNyF2pLsgyoXOfSJF7syFAURMBFwl5zGs +N9SFIutkubt5tnK9z3oqQZfyLqVNr5DG6Z4AHIfXzxFiiWt14BPQJ9M6r8m9HAcH +pi8MPNYV0PLMjv72aHc4db2HnKTF36w8+hNmUQiwPzjxOnv2Ku8XcuFT0DYKk0qo +moUR9prXRRi1/rCbpnTGaoBDyLuX+4aRzjLUB3mWR9dwatbH3VbYvn03fH1Viozh +zARuCvrBlkByswlHoy4rzmfRl7ISK5ZUmc6mRiB8Ox2YCGxdA1m8VMuC/OTpHxeu +RtcuSJWsdamERD61jSLH5eS9KpEjiDinEfXgk6/oO+U/o8hSMA9QrUhjtKsHPWiH +wGjnErjEcSfnAvV6nI94b/MG5RR5gl27BKVHzR0XfYMRsM7RBAoOsijz5qKgipiT +rR15lUFNjXLwS4yePsa6/x+TmkqNCgUKiExn9i7bpiE= diff --git a/certs/developer_id.p12.enc b/certs/developer_id.p12.enc new file mode 100644 index 00000000..e4417ce4 --- /dev/null +++ b/certs/developer_id.p12.enc @@ -0,0 +1,67 @@ +U2FsdGVkX189hIhZihb7h4g1Xd1uVXyNXC1KwlqrZR9kWtDLBk3MmLFXgYqnkdlV +CiKl8CkpUhr+loH4Nk9D11jphaHVWAE6QbeQfrUw1fs2FGDq3DyzLGRhhtbxveFi +oAaryPx50BDPX7/H466d+muWa0hl0Iz8u9CUkCJro4L+N12jel1tLAna/6X4iZOJ +IWeXPSKVoVMOjY49aDIJ7DIjajlDhFrBX7h59OOx1mUV44zF3I8I6dFvEV6Qbz5x +WQCnumDva6yk5MbafW67Q4TrG6O2bi8ar1CcdXvSxVcraRCG6ZH0/Q4InNZJVdWP +wRlGtSdvrNnZDYfzTuBCc3EItbTYU3Fr6OtTNSN13tAxt8UVSgYBddh7SN2KkSyK +VJrGy5ozf6teS/6okir0ZSpYP8RzzAHUCySvCekb1Xvw7eBHNEDmvYzRxRYN+L6p +RqxayOygE70vjAImZiI3P2UWO1YTIU2Cropv2Pxp1998ATjdfTN+BNHoy/ue+2zq ++Nh4WWwMDwcpaictP7gM9XKG59TBDeXH53W8uNk4g8nBY0o0m19TCSjsvSTcr2vh +JZbiOMPVjaTzUQtnpaj7HPqkaFtegdsCzRPBHw1Qy3ik+n5PXcwhfnT44ozS9sin +CV+Rsm8hpvUangp3hDG56KmjEZDePif5rsQWG2aQhofKD6lTFjycdgRIWW6F86t3 +goe8yiPGderxaqdvqD5sZM33g4/3xdUpjsAkvv4LlZaTI82BTXaa59NvqFl7rq4E +egoFI8VzbEAZjpiRSyzU7CE69AZ++6CM42zSgQXSgzSpOnyp+ChpaMbvENpz/Fo5 +ODki7WQLt/du/gFzARMhtoUWrdbfWC4FSX/LDkc9el145cDHq7+bfdLNy8fsmLXT +z8TkDYpLM6CJev1h42vWXCc8rB1BSigJdfqymXCJvKT2sLQxghZ1nYbFfEZQsW/M +mPY5Vcm5MA4gKA4OFk04FpEgND0eQek/MydTesUATiQeaN0hdMcD6+790cwsioiM +i/jR0L1h7YvjY50hhUJ81vhyLTxaskKUCTW2bIfW5VcNvGEesSUfmEwn83GsRelR +qI6oetKq8c5W2T992j9VQknFU9DNS2uWhM34wPeKBaPrJ84L4LtZ+fvwqHryNIr7 +hBp1TMHtw5mRLA5RTtCvsQNQz7BGtOQJbUeSXn+zXgYcYbt3QOcokykOo2T8MmZH +xcH2XNNB0bQVX2Mm6KrbKnlM4e7t4LVNAan76TLpenUp3IeAXBQKgytbZT+qzOzL +2Ct1ePGZnBVtghXpoi9PrAsH0iGU5/OUuQ/hE7nd+4OqI/Tgmq1S3efA3wh7Ac6X +uP9FSSk+g9G4F35FskuRwnBnp0mXSoMkFWj/Vu6kXsVKDMqxMjFvLbUncdFlk+91 +SxbN3RfCDbE+ynXcZ/WZKvsQLZwdzrZKlUodDX0GUS2PMKt85bFx0Ab1cGzsbieB +cjRx2tZeQvIzO5DmL2kuRQ6e7Lz0LPoG1W2uhKzAEOKPPlyszx+5Xfhp1aNNZUsP +KhDTKHqjHZ+7C6zxAfN2tngF6BBMi5HYOqoYdnjK16mIzszja08nPcEg+KTZDeo6 +coFTfmQceY9G5X3WIzNBTaMSKNBZc88jfx/PN39qsDUa2pDDDwlK9SqCY+mPNkwJ +rWPf77baOXQR2PAsceDJKBmmk01D2PIAgLy2WAT4rhBvKDoMWrAZdzMmpen7jcxC +e1P4ER3lRCwA8mCpF8otUXUqNpTap/SWoNl9F2M5ToTUQw56/YSp2n13SUbOyRrO +tcrZiH/hczW9OeYpSyO8RaCOFme7XzBAZYGfgaWuves7eqjjv9WAPbVC+q/TsJR8 +ijQEPT+9D6RB/Dd4SfjyVosVA1RWxf0T7FmXCtoMzUWolz+BQV4dkk0Rh4kqWvbF +y/aP75ibHRb+/OPcrzUkIL5c4V9TTNUTKTLR379/44S+oPxQrK8iRj2A/oHuJAwy +e0uOlD8E7B1lxmxSOuucKRpquMt/63MDiMALsdEuiYkFCllRNRzSJbb+AsbUiMdg +j2S++m6rTLNMNvI9fz5gT2nYjkPFH+U9ofl1hdWdsZOAZ4JOUZNSrlwFJNB/ornW +kVG8/rs3IVCXOAWdk7lI+JQ8zPzam95BxNZhRb3cw0C3tZ1nWnB9uEjP+OR+qABD +/xDKFEzhgk0yA7LWjpHdKWz30/LvtOnIaRXP/IKnajHvoL/R/933n6MBV/lx0Yh/ +V9vKlgyhhRMQFw+iBXa7qijr804TDFWEB/hPyG7t2KoxEbXUfqZxduie6lVY88Ww +NbPoWYJiBhCYrf/GNub+EvunR6Ud/u4KP/qRg1KLZo8eJ0K8KzUkqH+WSwzbBQgo +mDpt2a9tME+hU9ullzzMph2aOsmxWSVIKhij1MP0RXBKbPWk+Sm8cyVYm1OP1NEr +M8eP1AL6xHyKSyRvGYkzKertxzF7p++yWu8PVXqjuPYlY1HnJOYKlh4/U/vChNKM +8gA9iTCzLtPRVj2cAgMBB9VIeLv1a1ZpBxycw0avjMCpGFLogNwxqw8+E72jheB0 +bY2ksr3P4UIARxMyMRjl46b9Exj6xr48VNihj3kIoO5NuzAXNSAKziLDskUo4UAP +EfsqhNJHD6HPTYiyVWPjwZH4kd+iJWWXHD61tqq0hoIPj06slnA8z8pN9J1PxCa8 +5B+Ciq5Bd8fiUhEbWDtrp4m0qQa/wsU60ujFUs/fuICk3zDpFYsSXiApvG2uX4aC +6hf4Ct7Ozl8a1hDeZvidboZl76uXgM2yWUOr+lZmrnOdn1tXeM6i8gDKpPbc4+cg +nhwGwmiXd1PkmiBzSFrNiAEwPjzzhlIRRCWnjXCugfAPiLgn9WKSYbk5HhXYeGM0 +35BQtmIq2gxv566aQqpsK5560u58UWWnwyNU7yr7rwqSby+P4t72MGYzMgVKnMQI +P2a8hG39vfInwD4zEVC5xywZpuTT5wNDJKh1VpGfRJogOhE2p84FefkTDkroIO/v +uLD7PBzqEDtgDSUqInUwrtr8E7XstNzLs5Rg7ogm0GNw5+MObGIZYcjt91K5zcYW +lvJbIJXTPiLiZbYfQFwG1W9NnpcYyq5FNMaNxNonJzyUSzbsyU3fBuUBL2GzrtC8 +hK05Ghnm8+Ws1CU5wiX1cClC1HnAYEt0YXuOPBEF0GdVBv/4+nlh3exjCTPanry6 +z0o1LSo6QhXxpjauKegQOL7Va4cAB8lK6AgMF4ENYYdnejg2khsA+ryjiY0AuW/V +WY2+jm2UL5fODbkKhRowRCXz5kk9Hg4N1hpmTAef3blenRG/oqJ0uT77FFpxB9Ro +ScvuUktv3wpjRCX+f2JLEshWa9CY2jHTDPlb+MRMGDMjJm+BcvN9aPBx9oh5i+p+ +wyU4vf8z1ied4S3aGtFF8DUa/2rx9SxK8s4778VTI2u7+JM0PhaZWTfPcS1++NDd +1C2axUYueBrPzeUoGTTybhxg72n2IFKOAB6EHaLgcZhwKt/inlZEiekO8uHoxWhx +1eq2qSiQEosCml2gcYHtBQ8iJhFfCO6J9ee1V01Nx0YD0s1H1PCGMI4sFj5c9PHS +J0OrKQLj/0sQeLXpNYMXVufJBoOf8NyUgiOg1vUvvi+sIcCPiamHouxLd/TFSBuB +QRrA2oGY2XxlfxBNP9SVB2bOzfw91hnXBNwElTYqiTPwd5dV+l9BHLO7vEY2jNp1 +/jOqgUxD8G/dY4KE2K1vWn1QtWGDZsainuty9ID5gTuMjlxy34omJvl+ceBTJaqh +auVxMDwLUV/Nnf8PibQX1DZoY49yGrqTDQ3evT3H9ACPhSr478f9pszH+gbm1efE +JlYVWjA0BqmfpyrQqsj7Tv3zsaah/ZhJ6hPP1MKbdmwcb+XKgy+93ZWkzCqRUYFF +POGqZh2/ovOvamCbKOR63O4Nk0Cc9wqIRJ58MnPM2Ot3pKhMguf/lUVjNB7zLbqX +JvszukHlui9Od9v0vpBDNgA1ZgfGFKEEAKGoAtAIckebxiSudmkUbA9d8d9qG5Tj ++V0hgO10nDthPzLIXMpcqVixbo8q6Wx/7nWs9fi1PGPJIJwJegvailcE1Jhph55K +JwQKOplGAWVJeyvgLgvVXyK8riSTSFCryLC1JoXiKv+88I0h2gZO6LYHCBK5+yhi +LjjUB8YvH4um5DocpRsQje4tv9zYlW6HXntnsFkaG4rnbfn/YnblyDR503fi9/8P +0WTYveVESd41hClNSRIK9g== diff --git a/certs/mac_developer.cer.enc b/certs/mac_developer.cer.enc new file mode 100644 index 00000000..f4749819 --- /dev/null +++ b/certs/mac_developer.cer.enc @@ -0,0 +1,30 @@ +U2FsdGVkX1/M3q2EUi7lD0B5AVlftT1m4jSb875xYWB1v1HN0ZCX1/r5IwjXIrBA +ySAR2x7DOmw37My3VDoM/a5eQtp42ReLUm6T8zvqiDPXq+Tx4pB3PdiScJlMZHo8 +naXjzkGuF13w6lWmoyrxp9m0NPamWYJmBy0jIkbrRjmxnyiOMhcUTtrsQvagcS2+ +rNEk1Ml+a6OKqA8wyGJAy1m+ywzpa6A443+EAAprDUgba9hDrdkUSmh3hzbP33UP +aDj2z4bdfQFQ5AyXn3g//T2daRgC7lZYxQyRLvnSjDXigqGJ24b8m6jxMJjMRB5Y +8Hkj819PGnvp1zi94a9J87rInJs6ZEK8/dWtJKmBceV7bnx2afOBcj5xezgiaDH2 +nvVpWTY06nYIe4oYsScbCUai6RFFGucC+naWGX4CCpNdeAfNTkLFj2n76CLcgm/C +GDdvdimoPyowXneMN55QCfwqo9ja4lOK3xvA9K+Opa9y1HAXya8tvBs5GkRw1KDE +qJ3RC9vAtGk+y2IxxgxjbCj5Zz3ze1IqGPY7XAr8pD1afNRo27vPLYUNowd4NUHW +Kj2PHCeaEwbUf8Mo05aJwSBcu1TbvfYQ+kI2TLcpG9IYJn9jI6la9Y0YFFkMnyk3 +4M9CZlzmAzZNf4MWI9KvQFTlYs7H+iagyL8qClqsF0qEEPb78OeUx0Wsnhm58JrR +eryP2FryUfdFA2upDW4zbbshqEWTBZM8yxKnzkJdhCMrAQLCy7/3I0fPXg7a4JHn +aCZQhbuNo7nwm3aK1p2TU4fwipQe2IDIO8BDZU1LLTm2xny+3QNaipImEdo0Axr3 +bZuxW99sLDFhvSR+6ioZFAP0/N4rCxOkjMeXipxuvIbYJhNMjqDiwteKBN+CMeiI +2V8O6KjFBKGXlHFDRmGOiWqZbz/VspPi49TzQIRAU+D/NAG/rxAGR9Xy+neiJbJu +yjpV9OFgvTNoFoSgqpdDlE7gP/LD4vkqCHmeXdM8E4g48ByVfwKpnwhzdMwo39vx +Ilf39AVjkuEEP970It+50Vt1EigWcpPqfYZmZ8yIND0l4A/qgrjSGvghtYIo7wZs +zYjkMlGILPlGANJ3NH1xfgTMan/hyLpyrUtnZsF5nweff5go0oXmlZXmqlsYM02G +qlxAkiqoWVxsQUGTUdOx4dadCbfkxGnbpgfOEygy0caoCotbEfVjYyzANkl69J6R +XlDmTVMKass5Mkd5RNzLpVTI7tTZRbXRTOGDc+qb/79+BAjachDsAAIvXZ0zBxRA +anvEyNwFd2MRSDvPNDNXAlsEedoXRD3daBRkj04fg70niCUKC5OievVAaseiRMCU +IyWyWuaxGqDc4Imnq2+jOC8kByENDO84T4ECy0tdovWMoOUwYW8uMdfLo+xngMRZ +dEgYfW4BcXnyiP1aw4+u9N1Qyccl7PkyB/d+L/vmKxX3CIeTCF4XUYrgoJQfAPHS +tZ8lnnxHmrhDN0wVIm98jx6AivATELzzfpnRE1vOwphTGs54BLdo+ECuxt0P3ICJ +pq3TTahefcDtO5xkB99vAuwj+YDjTpd8l0jm9vGAYTckAs5XWNQ12mgO+YM82cOr +HEos5oTD7LVITEfq/MeC/aHuOrexHJYea3Fn4HDbPoUOn7P5rMbnLeCiy4eM3T7D +r703nYX/hSI1kfh45KkaOR0IyvKw45Rjprjrj3dDjNvIOIchXCcnlzvzDJc+Y++/ +J9ptbnd3y3R1whp/Gg9OxipGfW7Xr/cL+TP3BWCZLzjWbm0UMuSJhb4xDngvTORK +Y5wTyg5vzqZmSOy3ZMjmyHk938EjTBojWuF3i7Fn/gxqWjFMJ2Tt2woRA30abiAk +ECz+TObNZ7K1atRkKnfd4q23+9yXsUPkxwh19TlwtC+89qubadGMdeOX/ubYYvCn diff --git a/certs/mac_developer.p12.enc b/certs/mac_developer.p12.enc new file mode 100644 index 00000000..24d7ccc7 --- /dev/null +++ b/certs/mac_developer.p12.enc @@ -0,0 +1,68 @@ +U2FsdGVkX19XyRWuzmOYyRsa7sz7j5trRjzhqYHkxCkzgIEsji5vscFoJBmIrHjF +g299uu4ZxNYjClXX/4Ix4mZueLeZ7drzhbCZkkIZ1YF3xIyEsYzh/WV4nTTWsXM1 +rgpSqMH/fCKdrwuadGD9XxttWbBXx+2y/7o+sjLCBO9FtYKx9riccwWxkTt8yV1A +eNE4tPV7R9uxz8HODHtXck+itw9YP1O0zuEvGt6mzGAZhAY9BmhEMSisDjVIaGVl +TFDH1J2LL/TIPjkJZh+RccxSXniZwYn238oDbB8hhwDIOobNCgV0T/jWAZo4y+gT ++V5wIMWZaQICv4hATOaquEyt0Oplz6ld4eh2kQZFbVGbDovtJXqfCHhDYPz/7Hgx +kPj+Tu0Xdteb8GRameyEW8B3tWm7Aym44i2461jf2Y+C489lpOwf1TxQtvtd9xti +QaEp9vbeMhQYtp8PAHd0CArIdO/eVB89KkT/qqJGzawST0CB3uvgRWt2ezeYUzMk +6Fic1wsxdYhqn2pXx8hdw2df16FVAiT+7zEZeVkT/BXe73HvauJ1H2Q7DHVrlh7X +LBczWRDMljCkyRn+GCOOV6Jf6xIck5d7I1ZcJvHYUFaf0M4iqHGgaBZe3WP85y4q +j8etrIer0ayT+f0JSqdI/+ltJMpmi88xKRhNpCgh/wndwUWHUBziSDobscGrWnjo +8n7sJpmfg/6Zfzz2ahVvY047rTP7scucN5TfJXnl07xtYG/j1szMULnD8uLg71ga +0y+O0tJj5AAha2Ep4HyshYPUx0qrlcftlfFNAdx87t8Ow55cI5eO0DQ5vlRvYxpf +Urz9bVNdSHY3+oWyvdrN6OaTb5nPcb+EPjzJmIsQVrUefCJnZ41McNCVQR5vNwYB +UtykURyUooHO6NUo/LMsNwLl9n61Ym3YCkCBuTBxtZLszwt0JyYgsO5GthBDxmqO +k+8uvAOKHsEWoXP/L7rVJONAF9g/iF4F6J5dL2JvMZkCMPizaBJA07ku66IhWT4n +MwPWM6hFiy2qKYmpz+QUB67BT3b4Pp5+oM7Q9PXs/Cr/tX0B3zWVQoXyfignSDLT +F60pcS7SrsRM8mhMlZIAp5XtPmep0a7+kpXYKQpBL63wFyRpZM+R5TU5Mj6uiN3G +aTEX2LZ+oligick5hnB6q1pqST5G+OYAHoTv3KybhmcqDwMe/VJ0ie0cWeFtrBmH +dyZTelRBppijOvfAn/aoIl2fzqwjWiCk9yPsKAuScz4YA5xhE+o4nCztv3fqpnxa +tIwNv1iQ065i4tZDX/F8NOgn23AJT3SBK7oAqorqRqB/SdjUzNA57X+uVxT8wZBb +MABzN1K80LtsOL2KQfYOlplCwyeEkcO+btLVFxQ3cIYfkBrUTGAzLnNMq/SQPfdY +lw+LlHmFjXGr57km0MBZDM9560N422BFg2z3wcbJKEKpDbOzuQG0ReODLb35BIDG +nWs2Fp9TpwfIcp6CB4PUgPqfb6KLZvX0RMIrVJCoO+nzICHKiYM4ql7Bz5Vr1Vsh +84/thuWFvWMqB3ucWerH5fOcMxn9oRvo8zy5TxOHHF+E82CUTTWpBvELAeqgEhdD +NbbMJw4PdOVc6Mj0e8/HrPivp0va8tncGJ0iQZpzB+4TqR/RY5f8DVPXyvdL8oi3 +rWGN64nBoL0YB8ak7cJaygkB8sAmglgcVVD9aZpynxpTX6MyAh/yb6JZQa2pbjnl +32s3CELp28GHs9ZlcKvGOs1GwN4WtAx5GOnSSOfkLDsgzg5MWrKnTUOWwYy3FkNe +xOsPRUhHZLExrjbhK65hUzcaMMn6/i8p9ScNzguZRF0o6iSIlh+iH0b9V6btBZX2 +IJMvVTzuF4QsmrSub83LUTFugxnvH6ONKNxFeD5yDJAcTuX2aYsGuHc6vMSNWgaH +RldEgBD0+zQK3VBvxKPjpa4aq7w789UzOvQPCgf13DqveYgPqndOgO2BXxHZ62zP +uwoT5KPI0kP40HFXWcQk+3KAyCy+q+1dLzplfRG/XgCcuydseVQ4yyS/ew6gDhaB +gDWZv/LU2lGE3KfWP/9dV+DZc4QrFYk1LUTwHH6qc2c3G6rgorrq9647/IMqOpOA +xxhnxpn3NxjKbToOTdMDU5V8iC+dkrglBZhH2PF4hYNgIUfkco5nZb6/DEXLpT6I +/BDg+dmvyiFpRRGV6vRYQ41Rtu2/R3MNPeSmm42mABAZPFQOr7/C8mW0krQIvDuZ +l5zrhpfV/jswdRAtJRcQCuiBPjmP7pUfg5xmsfbQflN51Vv59sUPFokxLtZMao3w +uhJBdDKxwaWPUPvDoVA8s6K6lAb5AvCTPDGSPvj7pm38JLVlRa/aXQUN7WYUt0Ro +I1tBcN//hG9c82sUA2DEdvgI8QltUSd6NAL8G2HMuB6PMePnjIhAD1SkFFHSWQxM +H9b/5HkANU2bvsD+C5lHRkPKTSlTBC1wy1g52syaGqw6cdoWe4+G9MNCSZE7mrj0 +8ilqL6JwBCOkn/KI8S4e23J87qr337D4rRVyTbShHnIrP7Cl05dhlN7iQO/hx3tr +2PZjVh+m3E/I2OMTsLBt2Eb/MVQLGOAh28mX1vdO/oo0l0Mc5o8vhLZJhfAG9IlL ++ClfeQuIZJgHXFlg0p6rGKfJmHDxCEXgTtMwd929lpiVrxilSPVFVdhOh3R0csUm +qfF3/3+/u61Fp5RJAZfwyBMOQb3crUfMIiBjDukUpdY4hG7PTq2xXHVQqTFmhgnI ++gvg0gRvEeRxxtpcv32cshQVKhAhfQF1x40Byj+i1i/fMq0Etfw70b28hZfRYQ0e +E0GMyy1gtbL08cS5C73UjZLx7IUESAw6wj3/Xk2s1KeDWRCUmlXPe1hWiUhJ7z1Y +QpKYQwzfXkbvrn3Gif59tmJIjsifJlxGPDPxsReb+azbDBu2/IeDWZmQuctzk4pz +Igv+nKTMghtsh6wvl7DqdZLq3zcIh3lsoypw2L9dw7GwS0G65H3bYFMBdLPvuZbs +mXRxrWBGvMRW32G/RIM3qZ9lExPH9eGAvODsGwtjF7YKp5a5lhhpGVaFFwWx41pV +ApwYY0TsuBVQHsR+kKCT5KeyvRaIv5CFTf8jcull1pSdsNzPtfcOUaNMo1Rf5y6i +NYyAGHjhTFWPBsGH3+tqVpRVD1QNZXwmTvnv64bQVHIjXCnmwFHPWCIxyvIg2anz +g/9tkT3TEEIzH/2mzqf8v0IEq19IEo1WWOGgp+D0lgMwrtweHqgVTFWCgT+g8/x1 +K8ZexcvQ/2ydI1cP8UuMt4e6MOfm7HEyFlCXASRz8ba4r0NUFcYsQhrYmi4JiKX4 +tu6YynHDOR42L4LkGasZ1gGTJzgF0dbbvMiyoTsQxuTIN05zHYXaLY/474ZCf1F0 +QZNMmgA/CDr51AAaOY8LbwQriU6NMrpBMNGl6YhvRAS0l55jBCbYrnNMUuDZaxvm +wpIq6H1BENUiGxXybClCUy0DvbwonqF/tW0+xnEJ2tuTOrQ0Y9ieUngIDaxRcZTH +0DYMHZUeY5wmKoevMNtoJiD4KD2b1b43F+0DIp7NKWGsJXlhaMjJoV+01FpImWLf +63RtH5IcQX8W/aMDYkTCj/2BxCBRl08tcPfFDFs8jaXVzt6PX66fxeU63Nrk8ARr +u1XZ4NuGbpkOHC7FgqByX1JpnIRiX4rArTnpyPzCkWEMRXrfW1429Oq6/7ftvPVl +t99KClaHf42h7b/5PBD65WWdKGwjJZq1QkXr+D7FFr+45RGuMECnOoXYoAJ0Pqvd +oa5GdtPOl6TkHOgMik5mZYNmNdHBuzO1+wvTvUOC3QAK0RZTlmEJjW+2Nuv6iHJt +67tMDR4XYItguYcC24suLPGhjxFqFqEqZfrHGI9x38U6LJhS7aaNGPSgBnP0O63/ +UtU+u8Sv+u5XCgocZMo84z07DSNGyVotcs0zvuznUBL/OjKl3/Ty4Hr74sAFBGoE +QV8dQGEG+16yHibIq4C/1KYfs8VzTsaDP7hY+N0y5kiTmZPpzeBz76l2/xOwK7fr +UqvKiHF/EbJ6aYxK3TDpkwQVhKScsvZQOaFXQ7eDDO+y5ZgIOQTTJr5XJoI3FzLQ +YybiQy/Vf2czuUogKythjdXzuWjrfaSL1FmoFqlFPbqjfPtvnlOgpR4Zx8Go9nd0 +T8MFj19wiToX6jBJgVhGYZ7Zhi3LAauZaWxkDpV1RMJiUG6jqVZaDdPXGMUkCdGq +0MDNzUkPnymjQqduwUqDQib2gZaXwRwQwxhhiWI02CpRkSdQcMBxtMYkXZ2mm+n/ +mVQsdM2IY/C36KV6NbDX7g== diff --git a/certs/mac_development.cer.enc b/certs/mac_development.cer.enc new file mode 100644 index 00000000..a11022c7 Binary files /dev/null and b/certs/mac_development.cer.enc differ diff --git a/certs/mac_development.p12.enc b/certs/mac_development.p12.enc new file mode 100644 index 00000000..c4218bff Binary files /dev/null and b/certs/mac_development.p12.enc differ diff --git a/examples/Assets/AppIcon.speculid b/examples/Assets/AppIcon.speculid new file mode 100644 index 00000000..f74fe7b1 --- /dev/null +++ b/examples/Assets/AppIcon.speculid @@ -0,0 +1,6 @@ +{ +"set" : "Assets.xcassets/AppIcon.appiconset", +"source" : "geometry.svg", +"background" : "#FFFFFF", +"remove-alpha" : true +} diff --git a/examples/Assets/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/Assets/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..37cade9b --- /dev/null +++ b/examples/Assets/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,210 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + }, + { + "idiom" : "car", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "car", + "size" : "60x60", + "scale" : "3x" + }, + { + "size" : "24x24", + "idiom" : "watch", + "scale" : "2x", + "role" : "notificationCenter", + "subtype" : "38mm" + }, + { + "size" : "27.5x27.5", + "idiom" : "watch", + "scale" : "2x", + "role" : "notificationCenter", + "subtype" : "42mm" + }, + { + "size" : "29x29", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "watch", + "scale" : "2x", + "role" : "appLauncher", + "subtype" : "38mm" + }, + { + "size" : "86x86", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "38mm" + }, + { + "size" : "98x98", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "42mm" + }, + { + "idiom" : "watch-marketing", + "size" : "1024x1024", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/Assets/Assets.xcassets/iOS AppIcon.appiconset/Contents.json b/examples/Assets/Assets.xcassets/iOS AppIcon.appiconset/Contents.json index 3930bde9..4198e9e4 100644 --- a/examples/Assets/Assets.xcassets/iOS AppIcon.appiconset/Contents.json +++ b/examples/Assets/Assets.xcassets/iOS AppIcon.appiconset/Contents.json @@ -102,6 +102,11 @@ "filename" : "layers.83.5x83.5@2x~ipad.png", "scale" : "2x" }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + }, { "size" : "24x24", "idiom" : "watch", @@ -155,6 +160,11 @@ "scale" : "2x", "role" : "quickLook", "subtype" : "42mm" + }, + { + "idiom" : "watch-marketing", + "size" : "1024x1024", + "scale" : "1x" } ], "info" : { diff --git a/examples/examples.xcodeproj/project.pbxproj b/examples/examples.xcodeproj/project.pbxproj index afae83da..bc594ddd 100644 --- a/examples/examples.xcodeproj/project.pbxproj +++ b/examples/examples.xcodeproj/project.pbxproj @@ -170,6 +170,7 @@ /* Begin PBXFileReference section */ B30005CA1DB54EB1000A8166 /* Image Set.speculid */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Image Set.speculid"; sourceTree = ""; }; + B311EA4420F9448500636999 /* AppIcon.speculid */ = {isa = PBXFileReference; lastKnownFileType = text; path = AppIcon.speculid; sourceTree = ""; }; B38DDF3A1DA2E5AE005AA837 /* iOS AppIcon.speculid */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "iOS AppIcon.speculid"; sourceTree = ""; }; B38F735B1DA2B357008469FE /* speculid-example-macos.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "speculid-example-macos.app"; sourceTree = BUILT_PRODUCTS_DIR; }; B38F735E1DA2B357008469FE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -298,6 +299,7 @@ B38DDF3A1DA2E5AE005AA837 /* iOS AppIcon.speculid */, B38F73D71DA2C1F1008469FE /* geometry.svg */, B38F73D51DA2C1AB008469FE /* macOS AppIcon.speculid */, + B311EA4420F9448500636999 /* AppIcon.speculid */, B38F73D01DA2B600008469FE /* Assets.xcassets */, B30005CA1DB54EB1000A8166 /* Image Set.speculid */, ); @@ -385,7 +387,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 0810; + LastUpgradeCheck = 0900; TargetAttributes = { B38DDF171DA2DF0D005AA837 = { CreatedOnToolsVersion = 8.0; @@ -509,7 +511,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "xcodebuild -workspace \"${SRCROOT}/../speculid.xcworkspace\" -scheme \"Speculid Application\" -derivedDataPath \"${PROJECT_TEMP_DIR}/speculid\" build -configuration Release SYMROOT=build CODE_SIGNING_REQUIRED=NO OBJROOT=\"${PROJECT_TEMP_DIR}/speculid\" SYMROOT=\"${PROJECT_TEMP_DIR}/speculid\""; + shellScript = "xcodebuild -workspace \"${SRCROOT}/../speculid.xcworkspace\" -scheme \"Speculid Application\" -derivedDataPath \"${PROJECT_TEMP_DIR}/speculid\" build -configuration Release SYMROOT=build CODE_SIGNING_REQUIRED=NO OBJROOT=\"${PROJECT_TEMP_DIR}/speculid\" SYMROOT=\"${PROJECT_TEMP_DIR}/speculid\"\n"; }; B38DDF241DA2E344005AA837 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -522,7 +524,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "find \"${SRCROOT}\" -name \"*.spcld\" -print0 |\nwhile IFS= read -r -d $'\\0' line; do\n\"${PROJECT_TEMP_DIR}/speculid/Release/Speculid.app/Contents/MacOS/Speculid\" \"$line\" &\ndone\nwait"; + shellScript = "find \"${SRCROOT}\" -name \"*.spcld\" -print0 |\nwhile IFS= read -r -d $'\\0' line; do\n\"${PROJECT_TEMP_DIR}/speculid/Release/Speculid.app/Contents/MacOS/Speculid\" \"$line\" &\ndone\nwait\n"; }; B3AF65D51DA4055900BD008B /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -716,12 +718,18 @@ B38F73551DA2AF53008469FE /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -743,12 +751,18 @@ B38F73561DA2AF53008469FE /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; diff --git a/examples/examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/examples/examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/examples/examples.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/examples.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/examples/examples.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/examples/examples.xcodeproj/xcshareddata/xcschemes/examples.xcscheme b/examples/examples.xcodeproj/xcshareddata/xcschemes/examples.xcscheme index 3b64af0c..62b34838 100644 --- a/examples/examples.xcodeproj/xcshareddata/xcschemes/examples.xcscheme +++ b/examples/examples.xcodeproj/xcshareddata/xcschemes/examples.xcscheme @@ -1,6 +1,6 @@ @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/examples/examples.xcodeproj/xcshareddata/xcschemes/shasum diff.xcscheme b/examples/examples.xcodeproj/xcshareddata/xcschemes/shasum diff.xcscheme index e3773521..6d777a85 100644 --- a/examples/examples.xcodeproj/xcshareddata/xcschemes/shasum diff.xcscheme +++ b/examples/examples.xcodeproj/xcshareddata/xcschemes/shasum diff.xcscheme @@ -1,6 +1,6 @@ @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/examples/examples.xcodeproj/xcshareddata/xcschemes/shasum.xcscheme b/examples/examples.xcodeproj/xcshareddata/xcschemes/shasum.xcscheme index 66820624..25af23df 100644 --- a/examples/examples.xcodeproj/xcshareddata/xcschemes/shasum.xcscheme +++ b/examples/examples.xcodeproj/xcshareddata/xcschemes/shasum.xcscheme @@ -1,6 +1,6 @@ @@ -36,6 +37,7 @@ buildConfiguration = "Release" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/examples/ios/AppDelegate.swift b/examples/ios/AppDelegate.swift index 1071936d..398821ba 100644 --- a/examples/ios/AppDelegate.swift +++ b/examples/ios/AppDelegate.swift @@ -1,11 +1,3 @@ -// -// AppDelegate.swift -// speculid-example-ios -// -// Created by Leo Dion on 10/3/16. -// -// - import UIKit @UIApplicationMain @@ -13,34 +5,30 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } - func applicationWillResignActive(_ application: UIApplication) { + func applicationWillResignActive(_: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } - func applicationDidEnterBackground(_ application: UIApplication) { + func applicationDidEnterBackground(_: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - func applicationWillEnterForeground(_ application: UIApplication) { + func applicationWillEnterForeground(_: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } - func applicationDidBecomeActive(_ application: UIApplication) { + func applicationDidBecomeActive(_: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } - func applicationWillTerminate(_ application: UIApplication) { + func applicationWillTerminate(_: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } - - } - diff --git a/examples/ios/ViewController.swift b/examples/ios/ViewController.swift index 97dae617..40f0777c 100644 --- a/examples/ios/ViewController.swift +++ b/examples/ios/ViewController.swift @@ -1,11 +1,3 @@ -// -// ViewController.swift -// speculid-example-ios -// -// Created by Leo Dion on 10/3/16. -// -// - import UIKit class ViewController: UIViewController { @@ -19,7 +11,4 @@ class ViewController: UIViewController { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } - - } - diff --git a/examples/macos/AppDelegate.swift b/examples/macos/AppDelegate.swift index e911dc6b..1964a959 100644 --- a/examples/macos/AppDelegate.swift +++ b/examples/macos/AppDelegate.swift @@ -1,11 +1,3 @@ -// -// AppDelegate.swift -// speculid-example-macos -// -// Created by Leo Dion on 10/3/16. -// -// - import Cocoa @NSApplicationMain @@ -13,15 +5,11 @@ class AppDelegate: NSObject, NSApplicationDelegate { @IBOutlet weak var window: NSWindow! - - func applicationDidFinishLaunching(_ aNotification: Notification) { + func applicationDidFinishLaunching(_: Notification) { // Insert code here to initialize your application } - func applicationWillTerminate(_ aNotification: Notification) { + func applicationWillTerminate(_: Notification) { // Insert code here to tear down your application } - - } - diff --git a/examples/shasum b/examples/shasum index 29600c68..600d85cf 100644 --- a/examples/shasum +++ b/examples/shasum @@ -1 +1 @@ -d23bc97f1f823cee4e1d5d19ffa170bc9aff48f98c5bb554251bc74e9dde24a385d0171af9ab673bb2bf49dcf4f9c0fbdd164b3e8b877ec61896828fd28db5dd - +af7e3476b6e5731f62e064b63a81ab726b7107b303b886060fa406379cac9fb409e83fb738a46591416663bc8fe64d8ba92a1ed1d8d13424dfabc25a5a580860 - diff --git a/examples/watchos/extension/ExtensionDelegate.swift b/examples/watchos/extension/ExtensionDelegate.swift index 92a4f1a7..b92e688d 100644 --- a/examples/watchos/extension/ExtensionDelegate.swift +++ b/examples/watchos/extension/ExtensionDelegate.swift @@ -1,51 +1,42 @@ -// -// ExtensionDelegate.swift -// speculid-example-watchos Extension -// -// Created by Leo Dion on 10/3/16. -// -// - import WatchKit class ExtensionDelegate: NSObject, WKExtensionDelegate { - func applicationDidFinishLaunching() { - // Perform any final initialization of your application. - } + func applicationDidFinishLaunching() { + // Perform any final initialization of your application. + } - func applicationDidBecomeActive() { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - } + func applicationDidBecomeActive() { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } - func applicationWillResignActive() { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, etc. - } + func applicationWillResignActive() { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, etc. + } @available(watchOSApplicationExtension 3.0, *) func handle(_ backgroundTasks: Set) { - // Sent when the system needs to launch the application in the background to process tasks. Tasks arrive in a set, so loop through and process each one. - for task in backgroundTasks { - // Use a switch statement to check the task type - switch task { - case let backgroundTask as WKApplicationRefreshBackgroundTask: - // Be sure to complete the background task once you’re done. - backgroundTask.setTaskCompleted() - case let snapshotTask as WKSnapshotRefreshBackgroundTask: - // Snapshot tasks have a unique completion call, make sure to set your expiration date - snapshotTask.setTaskCompleted(restoredDefaultState: true, estimatedSnapshotExpiration: Date.distantFuture, userInfo: nil) - case let connectivityTask as WKWatchConnectivityRefreshBackgroundTask: - // Be sure to complete the connectivity task once you’re done. - connectivityTask.setTaskCompleted() - case let urlSessionTask as WKURLSessionRefreshBackgroundTask: - // Be sure to complete the URL session task once you’re done. - urlSessionTask.setTaskCompleted() - default: - // make sure to complete unhandled task types - task.setTaskCompleted() - } - } + // Sent when the system needs to launch the application in the background to process tasks. Tasks arrive in a set, so loop through and process each one. + for task in backgroundTasks { + // Use a switch statement to check the task type + switch task { + case let backgroundTask as WKApplicationRefreshBackgroundTask: + // Be sure to complete the background task once you’re done. + backgroundTask.setTaskCompleted() + case let snapshotTask as WKSnapshotRefreshBackgroundTask: + // Snapshot tasks have a unique completion call, make sure to set your expiration date + snapshotTask.setTaskCompleted(restoredDefaultState: true, estimatedSnapshotExpiration: Date.distantFuture, userInfo: nil) + case let connectivityTask as WKWatchConnectivityRefreshBackgroundTask: + // Be sure to complete the connectivity task once you’re done. + connectivityTask.setTaskCompleted() + case let urlSessionTask as WKURLSessionRefreshBackgroundTask: + // Be sure to complete the URL session task once you’re done. + urlSessionTask.setTaskCompleted() + default: + // make sure to complete unhandled task types + task.setTaskCompleted() + } } - + } } diff --git a/examples/watchos/extension/InterfaceController.swift b/examples/watchos/extension/InterfaceController.swift index ed2afd81..ca313bd3 100644 --- a/examples/watchos/extension/InterfaceController.swift +++ b/examples/watchos/extension/InterfaceController.swift @@ -1,31 +1,21 @@ -// -// InterfaceController.swift -// speculid-example-watchos Extension -// -// Created by Leo Dion on 10/3/16. -// -// - import WatchKit import Foundation - class InterfaceController: WKInterfaceController { - override func awake(withContext context: Any?) { - super.awake(withContext: context) - - // Configure interface objects here. - } - - override func willActivate() { - // This method is called when watch view controller is about to be visible to user - super.willActivate() - } - - override func didDeactivate() { - // This method is called when watch view controller is no longer visible - super.didDeactivate() - } + override func awake(withContext context: Any?) { + super.awake(withContext: context) + + // Configure interface objects here. + } + + override func willActivate() { + // This method is called when watch view controller is about to be visible to user + super.willActivate() + } + override func didDeactivate() { + // This method is called when watch view controller is no longer visible + super.didDeactivate() + } } diff --git a/exportOptions.plist b/exportOptions.plist new file mode 100644 index 00000000..53a13738 --- /dev/null +++ b/exportOptions.plist @@ -0,0 +1,10 @@ + + + + + teamID + MLT7M394S7 + method + developer-id + + diff --git a/framework/Builders/PDFConversionBuilder.swift b/framework/Builders/PDFConversionBuilder.swift deleted file mode 100644 index 65ee6f7a..00000000 --- a/framework/Builders/PDFConversionBuilder.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// PDFConversionBuilder.swift -// speculid -// -// Created by Leo Dion on 9/26/16. -// -// - -import Foundation - -public struct PDFConversionBuilder : ImageConversionBuilderProtocol { - public func conversion(forImage imageSpecification: ImageSpecificationProtocol, withSpecifications specifications: SpeculidSpecificationsProtocol, andConfiguration configuration: SpeculidConfigurationProtocol) -> ConversionResult? { - - if imageSpecification.scale != nil { - return nil - } - - guard let inkscapeURL = configuration.inkscapeURL else { - return .Error(MissingRequiredInstallationError(name: "inkscape")) - } - - let process = Process() - - process.launchPath = inkscapeURL.path - process.arguments = ["--without-gui","--export-area-drawing","--export-pdf", - specifications.contentsDirectoryURL.appendingPathComponent(specifications.destination(forImage: imageSpecification)).path,specifications.sourceImageURL.absoluteURL.path] - - return .Task(ProcessImageConversionTask(process: process)) - } -} diff --git a/framework/Builders/RasterConversionBuilder.swift b/framework/Builders/RasterConversionBuilder.swift deleted file mode 100644 index 11675d28..00000000 --- a/framework/Builders/RasterConversionBuilder.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// RasterConversionBuilder.swift -// speculid -// -// Created by Leo Dion on 9/26/16. -// -// - -import Foundation - -public struct RasterConversionBuilder :ImageConversionBuilderProtocol { - public func conversion(forImage imageSpecification: ImageSpecificationProtocol, withSpecifications specifications: SpeculidSpecificationsProtocol, andConfiguration configuration: SpeculidConfigurationProtocol) -> ConversionResult? { - guard let scale = imageSpecification.scale else { - return nil - } - - guard specifications.sourceImageURL.pathExtension.compare("svg", options: .caseInsensitive, range: nil, locale: nil) != .orderedSame else { - return nil - } - - guard let geometry = specifications.geometry else { - return nil - } - - guard let convertURL = configuration.convertURL else { - return .Error(MissingRequiredInstallationError(name: "imagemagick")) - } - - let process = Process() - let resizeValue = geometry.text(scaledBy: Int(scale)) - process.launchPath = convertURL.path - process.arguments = [specifications.sourceImageURL.path,"-resize",resizeValue,specifications.contentsDirectoryURL.appendingPathComponent(specifications.destination(forImage: imageSpecification)).path] - return .Task(ProcessImageConversionTask(process: process)) - } - - -} diff --git a/framework/Builders/SVGImageConversionBuilder.swift b/framework/Builders/SVGImageConversionBuilder.swift deleted file mode 100644 index e8a2a8cc..00000000 --- a/framework/Builders/SVGImageConversionBuilder.swift +++ /dev/null @@ -1,86 +0,0 @@ -// -// SVGImageConversionBuilder.swift -// speculid -// -// Created by Leo Dion on 9/26/16. -// -// - -import Foundation - -public struct SVGImageConversionBuilder : ImageConversionBuilderProtocol { - public func conversion(forImage imageSpecification: ImageSpecificationProtocol, withSpecifications specifications: SpeculidSpecificationsProtocol, andConfiguration configuration: SpeculidConfigurationProtocol) -> ConversionResult? { - - let removeAlphaProcess: Process? - - guard let scale = imageSpecification.scale else { - return nil - } - - guard specifications.sourceImageURL.pathExtension.compare("svg", options: .caseInsensitive, range: nil, locale: nil) == .orderedSame else { - return nil - } - - guard let inkscapeURL = configuration.inkscapeURL else { - return .Error(MissingRequiredInstallationError(name: "inkscape")) - } - - let temporaryUrl = URL(fileURLWithPath: NSTemporaryDirectory(), isDirectory: true).appendingPathComponent(UUID().uuidString) - - let inkScapeDestinationPath = specifications.removeAlpha ? temporaryUrl.path : specifications.contentsDirectoryURL.appendingPathComponent(specifications.destination(forImage: imageSpecification)).path - - if specifications.removeAlpha { - if let convertURL = configuration.convertURL { - let process = Process() - process.launchPath = convertURL.path - process.arguments = [inkScapeDestinationPath,"-alpha","remove","-define","png:include-chunk=none",specifications.contentsDirectoryURL.appendingPathComponent(specifications.destination(forImage: imageSpecification)).path] - removeAlphaProcess = process - } else { - return .Error(MissingRequiredInstallationError(name: "imagemagick")) - } - } else { - removeAlphaProcess = nil - } - - var arguments : [String] = ["--without-gui","--export-png", inkScapeDestinationPath] - - - if let background = specifications.background { - arguments.append(contentsOf: ["-b", background.hexString(false), "-y", "\(background.alphaComponent)"]) - } - - if let size = imageSpecification.size { - let dimension = size.height > size.width ? "-h" : "-w" - let length = Int(round(max(size.width, size.height) * scale)) - arguments.append(contentsOf: [dimension,"\(length)", specifications.sourceImageURL.absoluteURL.path]) - } else if let geometryValue = specifications.geometry?.value { - let dimension: String - let length: CGFloat - switch geometryValue { - case .Width(let value): - dimension = "-w" - length = CGFloat(value) * scale - case .Height(let value): - dimension = "-h" - length = CGFloat(value) * scale - } - arguments.append(contentsOf: [dimension,"\(Int(length))", specifications.sourceImageURL.absoluteURL.path]) - } else { - // convert to - arguments.append(contentsOf: ["-d", "\(90*scale)" ,specifications.sourceImageURL.absoluteURL.path]) - } - - // - - - let process = Process() - process.launchPath = inkscapeURL.path - process.arguments = arguments - - if let removeAlphaProcess = removeAlphaProcess { - return .Task(ProcessImageConversionTask(process: SerialProcess(processes: [process, removeAlphaProcess]) )) - } else { - return .Task(ProcessImageConversionTask(process: process)) - } - } -} diff --git a/framework/Controllers/AnalyticsSessionManager.swift b/framework/Controllers/AnalyticsSessionManager.swift deleted file mode 100644 index 5d945f33..00000000 --- a/framework/Controllers/AnalyticsSessionManager.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// AnalyticsSessionManager.swift -// speculid -// -// Created by Leo Dion on 10/17/16. -// -// - -public struct AnalyticsSessionManager: AnalyticsSessionManagerProtocol { - #if DEBUG && false - public static let defaultBaseUrl = URL(string: "https://www.google-analytics.com/debug/collect")! - #else - public static let defaultBaseUrl = URL(string: "https://www.google-analytics.com/collect")! - #endif - - public let baseUrl : URL - public let timeoutInterval: TimeInterval = 5 - public let session: URLSession - - public static func createSession (withDelegate delegate: URLSessionDelegate? = nil, inQueue queue: OperationQueue? = nil, withUserAgent userAgent: String? = nil) -> URLSession { - let configuration = URLSessionConfiguration.ephemeral - //configuration.httpAdditionalHeaders = - configuration.httpMaximumConnectionsPerHost = 1 - if let userAgent = userAgent { - configuration.httpAdditionalHeaders = ["User-Agent" : userAgent] - } - return URLSession(configuration: configuration, delegate: delegate, delegateQueue: queue) - } - - public init (baseUrl : URL? = nil) { - self.baseUrl = baseUrl ?? AnalyticsSessionManager.defaultBaseUrl - self.session = AnalyticsSessionManager.createSession(withDelegate: nil, inQueue: nil, withUserAgent: nil) - - - } - - public func send(_ parameters: AnalyticsParameterDictionary) { - let semaphore = DispatchSemaphore(value: 0) - var request = URLRequest(url: self.baseUrl, cachePolicy: .useProtocolCachePolicy, timeoutInterval: self.timeoutInterval) - let parameterString = parameters.map { "\($0.key.rawValue)=\(String(describing: $0.value).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!)"}.joined(separator: "&") - - request.httpBody = parameterString.data(using: .utf8) - request.httpMethod = "POST" - - let dataTask = self.session.dataTask(with: request, completionHandler: { (data, result, error) in - semaphore.signal() - }) - - dataTask.resume() - semaphore.wait() - } -} diff --git a/framework/Controllers/AnalyticsTracker.swift b/framework/Controllers/AnalyticsTracker.swift deleted file mode 100644 index bd868744..00000000 --- a/framework/Controllers/AnalyticsTracker.swift +++ /dev/null @@ -1,79 +0,0 @@ -// -// AnalyticsTracker.swift -// speculid -// -// Created by Leo Dion on 10/17/16. -// -// - -import Foundation - -public enum AnalyticsHitType : String, CustomStringConvertible { - case timing = "timing", event = "event", exception = "exception" - - public var description: String { - return self.rawValue - } -} - -public struct AnalyticsEvent : AnalyticsEventProtocol { - public let category: String - public let action: String - public let label: String? - public let value: Int? - - public init (category: String, action: String, label: String? = nil, value: Int? = nil) { - self.category = category - self.action = action - self.label = label - self.value = value - } -} - -public struct AnalyticsTracker : AnalyticsTrackerProtocol { - public func track(error: Error, isFatal: Bool) { - var parameters = configuration.parameters - - parameters[.hitType] = AnalyticsHitType.exception - parameters[.exceptionDescription] = error.localizedDescription - parameters[.exceptionFatal] = isFatal ? 1 : 0 - - sessionManager.send(parameters) - } - - public func track(event: AnalyticsEventProtocol) { - var parameters = configuration.parameters - - parameters[.hitType] = AnalyticsHitType.event - parameters[.eventCategory] = event.category - parameters[.eventAction] = event.action - - if let label = event.label { - parameters[.eventLabel] = label - } - - if let value = event.value { - parameters[.eventValue] = value - } - - sessionManager.send(parameters) - } - - let configuration : AnalyticsConfigurationProtocol - let sessionManager : AnalyticsSessionManagerProtocol - - public func track(time: TimeInterval, withCategory category: String, withVariable variable: String, withLabel label: String?) { - var parameters = configuration.parameters - - parameters[.hitType] = AnalyticsHitType.timing - parameters[.userTimingCategory] = category - parameters[.userTimingVariable] = variable - parameters[.timing] = Int(round(time * 1000.0)) - - if let label = label { - parameters[.userTimingLabel] = label - } - - sessionManager.send(parameters) - } -} diff --git a/framework/Controllers/ClientIdentifier.swift b/framework/Controllers/ClientIdentifier.swift deleted file mode 100644 index 26538072..00000000 --- a/framework/Controllers/ClientIdentifier.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// ClientIdentifier.swift -// speculid -// -// Created by Leo Dion on 10/18/16. -// -// - -public struct ClientIdentifier: ClientIdentifierDelegate { - public static let shared = ClientIdentifier() - public let clientIdentifier: String - - public static func calculateIdentifier () -> String { - guard let _clientIdentifier = UserDefaults.standard.string(forKey: "clientIdentifier") else { - let uuid = UUID() - UserDefaults.standard.set(uuid.uuidString, forKey: "clientIdentifier") - return uuid.uuidString - } - - return _clientIdentifier - } - - public init () { - self.clientIdentifier = ClientIdentifier.calculateIdentifier() - } -} diff --git a/framework/Controllers/ConfiguredApplicationPathDataSource.swift b/framework/Controllers/ConfiguredApplicationPathDataSource.swift deleted file mode 100644 index 9908d5f9..00000000 --- a/framework/Controllers/ConfiguredApplicationPathDataSource.swift +++ /dev/null @@ -1,69 +0,0 @@ -// -// ConfiguredApplicationPathDataSource.swift -// speculid -// -// Created by Leo Dion on 10/17/16. -// -// - -import Foundation - -public struct ConfiguredApplicationPathDataSource : ApplicationPathDataSource { - public func applicationPaths(_ closure: @escaping (ApplicationPathDictionary) -> Void) { - closure(ConfiguredApplicationPathDataSource.urls(in: self.searchPaths, for: self.fileName)) - } - - - public let searchPaths:[String] - public let fileName: String - - public static let defaultSearchPaths = [FileManager.default.currentDirectoryPath, NSHomeDirectory()] - public static let defaultConfigurationName = "speculid.json" - public static let keyName = "paths" - - public init (searchPaths : [String]? = nil, fileName: String? = nil) { - self.searchPaths = searchPaths ?? ConfiguredApplicationPathDataSource.defaultSearchPaths - self.fileName = fileName ?? ConfiguredApplicationPathDataSource.defaultConfigurationName - } - - public static func urls (in searchPaths: [String], for fileName: String) -> [ApplicationPath: URL] { - - - var checked = [String]() - var result = [ApplicationPath: URL]() - - var paths = self.defaultSearchPaths - paths.append(contentsOf: searchPaths) - paths.sort() - - while let path = paths.popLast() { - var url = URL(fileURLWithPath: path) - while (url.path != NSOpenStepRootDirectory() && !paths.contains(url.path) && !checked.contains(url.path)) { - let configUrl = url.appendingPathComponent(fileName) - - guard let configJSONData = try? Data(contentsOf: configUrl) else { - break - } - - guard let configJSON = (try? JSONSerialization.jsonObject(with: configJSONData, options: [])) as? [String : Any] else { - break - } - - guard let pathsDictionary = configJSON[self.keyName] as? [String:String] else { - break - } - - for pair in pathsDictionary { - if let appPathEnum = ApplicationPath(rawValue: pair.key) , result[appPathEnum] == nil { - result[appPathEnum] = FileManager.default.url(ifExistsAtPath: pair.value) - } - } - - checked.append(url.path) - url.deleteLastPathComponent() - } - } - return result - } - -} diff --git a/framework/Controllers/DefaultApplicationPathDataSource.swift b/framework/Controllers/DefaultApplicationPathDataSource.swift deleted file mode 100644 index b61baa1c..00000000 --- a/framework/Controllers/DefaultApplicationPathDataSource.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// DefaultApplicationPathDataSource.swift -// speculid -// -// Created by Leo Dion on 10/17/16. -// -// - -import Foundation - -public struct DefaultApplicationPathDataSource : ApplicationPathDataSource { - public func applicationPaths(_ closure: @escaping (ApplicationPathDictionary) -> Void) { - var applicationPaths = ApplicationPathDictionary() - for pair in DefaultApplicationPathDataSource.defaultPaths { - if let url = FileManager.default.url(ifExistsAtPath: pair.value) { - applicationPaths[pair.key] = url - } - } - closure(applicationPaths) - } - - public static let defaultPaths : [ApplicationPath : String] = [.inkscape : "/usr/local/bin/inkscape", .convert : "/usr/local/bin/convert"] - -} diff --git a/framework/Controllers/ImageConversionBuilder.swift b/framework/Controllers/ImageConversionBuilder.swift deleted file mode 100644 index ec11263c..00000000 --- a/framework/Controllers/ImageConversionBuilder.swift +++ /dev/null @@ -1,29 +0,0 @@ -// -// ImageConversionBuilder.swift -// speculid -// -// Created by Leo Dion on 9/25/16. -// -// - -import Foundation - -public struct ImageConversionBuilder : ImageConversionBuilderProtocol { - public static let defaultBuilders : [ImageConversionBuilderProtocol] = [PDFConversionBuilder(), SVGImageConversionBuilder(), RasterConversionBuilder()] - public static let sharedInstance:ImageConversionBuilderProtocol = ImageConversionBuilder() - - public let builders : [ImageConversionBuilderProtocol] - - public func conversion(forImage imageSpecification: ImageSpecificationProtocol, withSpecifications specifications: SpeculidSpecificationsProtocol, andConfiguration configuration: SpeculidConfigurationProtocol) -> ConversionResult? { - for builders in builders { - if let conversion = builders.conversion(forImage: imageSpecification, withSpecifications: specifications, andConfiguration: configuration) { - return conversion - } - } - return nil - } - - public init (builders: [ImageConversionBuilderProtocol]? = nil) { - self.builders = builders ?? ImageConversionBuilder.defaultBuilders - } -} diff --git a/framework/Controllers/ProcessImageConversionTask.swift b/framework/Controllers/ProcessImageConversionTask.swift deleted file mode 100644 index fcd9005f..00000000 --- a/framework/Controllers/ProcessImageConversionTask.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// ProcessImageConversionTask.swift -// speculid -// -// Created by Leo Dion on 9/25/16. -// -// - -import Foundation - -public struct ProcessImageConversionTask : ImageConversionTaskProtocol { - public func start(callback: @escaping (Error?) -> Void) { - process.launch(callback) - } - - public let process: ProcessProtocol -} diff --git a/framework/Controllers/SearchApplicationPathDataSource.swift b/framework/Controllers/SearchApplicationPathDataSource.swift deleted file mode 100644 index 53fcf02c..00000000 --- a/framework/Controllers/SearchApplicationPathDataSource.swift +++ /dev/null @@ -1,156 +0,0 @@ -// -// SearchApplicationPathDataSource.swift -// speculid -// -// Created by Leo Dion on 10/19/16. -// -// - -import Foundation - -extension CFRunLoopTimer { - /** - Creates and schedules a one-time `NSTimer` instance. - - - Parameters: - - delay: The delay before execution. - - handler: A closure to execute after `delay`. - - - Returns: The newly-created `NSTimer` instance. - */ - class func schedule(delay: TimeInterval, handler: @escaping (CFRunLoopTimer?) -> Void) -> CFRunLoopTimer? { - let fireDate = delay + CFAbsoluteTimeGetCurrent() - - let timer = CFRunLoopTimerCreateWithHandler(kCFAllocatorDefault, fireDate, 0, 0, 0, handler) - - CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer, CFRunLoopMode.commonModes) - return timer - } - - /** - Creates and schedules a repeating `NSTimer` instance. - - - Parameters: - - repeatInterval: The interval (in seconds) between each execution of - `handler`. Note that individual calls may be delayed; subsequent calls - to `handler` will be based on the time the timer was created. - - handler: A closure to execute at each `repeatInterval`. - - - Returns: The newly-created `NSTimer` instance. - */ - class func schedule(repeatInterval interval: TimeInterval, handler: @escaping (CFRunLoopTimer?) -> Void) -> CFRunLoopTimer? { - let fireDate = interval + CFAbsoluteTimeGetCurrent() - let timer = CFRunLoopTimerCreateWithHandler(kCFAllocatorDefault, fireDate, interval, 0, 0, handler) - CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer, CFRunLoopMode.commonModes) - return timer - } -} - -public struct SearchApplicationPathDataSource : ApplicationPathDataSource { - - public struct CError : Error { - public let errno : Int32 - } - - typealias WhichParameter = (command: String, output: URL) - - func isTerminal(_ app: NSRunningApplication) -> Bool { - guard let name = app.localizedName else { - return false - } - - return name.lowercased() == "terminal" - } - - func temporaryURL () throws -> URL { - - let template = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent("file.XXXXXX") as NSURL - - // Fill buffer with a C string representing the local file system path. - var buffer = [Int8](repeating: 0, count: Int(PATH_MAX)) - template.getFileSystemRepresentation(&buffer, maxLength: buffer.count) - - // Create unique file name (and open file): - let fd = mkstemp(&buffer) - if fd != -1 { - - // Create URL from file system string: - return URL(fileURLWithFileSystemRepresentation: buffer, isDirectory: false, relativeTo: nil) - - - } else { - //print("Error: " + String(cString: strerror(errno))) - throw CError(errno: errno) - } - } - - func which (_ commands : [String], closure: @escaping (([String : URL]) -> Void)) { - let terminalLaunched = NSWorkspace.shared().runningApplications.index(where: isTerminal) == nil - - - guard let resourceURL = Speculid.bundle.url(forResource: "terminal", withExtension: "scpt") else { - - closure([String : URL]()) - return - } - - let whichParameters : [WhichParameter] = commands.flatMap{ - guard let url = try? temporaryURL() else { - return nil - } - - return WhichParameter(command: $0, output: url) - } - - guard whichParameters.count > 0 else { - closure([String : URL]()) - return - } - - var arguments = ["echo -n -e \"\\033]0;Speculid - Dependency Search\\007\""] - arguments.append(contentsOf: whichParameters.map{ "which \($0.command) > \"\($0.output.path)\"" }) - arguments.append("exit") - - var locations = [String : URL]() - - Process.launchedProcess(launchPath: "/usr/bin/osascript", arguments: [resourceURL.path, arguments.joined(separator: "; ")]) - - CFRunLoopTimer.schedule(repeatInterval: 1.0) { (timer) in - for pair in whichParameters { - if locations[pair.command] == nil { - if let string = (try? String(contentsOf: pair.output))?.trimmingCharacters( - in: NSCharacterSet.whitespacesAndNewlines - ) { - if FileManager.default.fileExists(atPath: string) { - print(string) - locations[pair.command] = URL(fileURLWithPath: string) - } - } - } - } - - if locations.count >= whichParameters.count { - Process.launchedProcess(launchPath: "/usr/bin/osascript", arguments: ["-e", "tell application \"Terminal\" to close (every window whose name contains \"Speculid\")", "&"]) - if terminalLaunched { - Process.launchedProcess(launchPath: "/usr/bin/killall", arguments: ["Terminal"]) - } - CFRunLoopTimerInvalidate(timer) - closure(locations) - } - } - - - } - - public func applicationPaths(_ closure: @escaping (ApplicationPathDictionary) -> Void) { - which(["inkscape", "convert"]) { (lookup) in - let result = lookup.reduce(ApplicationPathDictionary(), { (dictionary, pair) -> ApplicationPathDictionary in - var result = dictionary - result[ApplicationPath(rawValue: pair.key)!] = pair.value - return result - }) - closure(result) - } - } - -} diff --git a/framework/Controllers/Speculid.swift b/framework/Controllers/Speculid.swift deleted file mode 100644 index 2d13c994..00000000 --- a/framework/Controllers/Speculid.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// Speculid.swift -// speculid -// -// Created by Leo Dion on 9/29/16. -// -// - -import Foundation -import SwiftVer - -var exceptionHandler : ((NSException) -> Void)? - -func exceptionHandlerMethod(exception : NSException) { - if let handler = exceptionHandler { - handler(exception) - } -} - -public struct Speculid { - private class _VersionHandler { - - } - - public static let bundle = Bundle(for: _VersionHandler.self) - public static let vcs = VersionControlInfo(TYPE: VCS_TYPE, BASENAME: VCS_BASENAME, UUID: VCS_UUID, NUM: VCS_NUM, DATE: VCS_DATE, BRANCH: VCS_BRANCH, TAG: VCS_TAG, TICK: VCS_TICK, EXTRA: VCS_EXTRA, FULL_HASH: VCS_FULL_HASH, SHORT_HASH: VCS_SHORT_HASH, WC_MODIFIED: VCS_WC_MODIFIED) - public static let version = Version(bundle: bundle, versionControl: vcs)! - - - public static func begin (withArguments arguments: SpeculidArgumentsProtocol, _ callback: @escaping (SpeculidApplicationProtocol) -> Void) { - let operatingSystem = ProcessInfo.processInfo.operatingSystemVersionString - - let analyticsConfiguration = AnalyticsConfiguration(trackingIdentifier: "UA-33667276-6", applicationName: "speculid", applicationVersion : String(describing: self.version), customParameters : [.operatingSystemVersion : operatingSystem]) - let tracker = AnalyticsTracker(configuration: analyticsConfiguration, sessionManager: AnalyticsSessionManager()) - NSSetUncaughtExceptionHandler(exceptionHandlerMethod) - - exceptionHandler = tracker.track - - let configLoader = SpeculidConfigurationLoader(dataSources: [ConfiguredApplicationPathDataSource(), DefaultApplicationPathDataSource()]) - - tracker.track(event: AnalyticsEvent(category: "main", action: "launch", label: "application")) - - configLoader.load { (configuration) in - let application = SpeculidApplication(configuration: configuration, tracker: tracker) - callback(application) - } - } -} diff --git a/framework/Controllers/SpeculidApplication.swift b/framework/Controllers/SpeculidApplication.swift deleted file mode 100644 index 9fdc2c28..00000000 --- a/framework/Controllers/SpeculidApplication.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// SpeculidApplication.swift -// speculid -// -// Created by Leo Dion on 10/13/16. -// -// - -import Foundation -import SwiftVer - -public struct SpeculidApplication : SpeculidApplicationProtocol { - let configuration : SpeculidConfigurationProtocol - let tracker : AnalyticsTrackerProtocol? - - public func document (url: URL) -> SpeculidDocumentProtocol? { - return SpeculidDocument(url: url, configuration: configuration) - } - - public var builder : SpeculidBuilderProtocol { - return SpeculidBuilder(tracker: self.tracker, configuration: self.configuration) - } - - public var version : Version { - return Speculid.version - } - -} diff --git a/framework/Controllers/SpeculidBuilder.swift b/framework/Controllers/SpeculidBuilder.swift deleted file mode 100644 index 0eba6342..00000000 --- a/framework/Controllers/SpeculidBuilder.swift +++ /dev/null @@ -1,82 +0,0 @@ -// -// SpeculidBuilder.swift -// speculid -// -// Created by Leo Dion on 9/25/16. -// -// - -import Foundation - -public typealias ImageConversionPair = (image: ImageSpecificationProtocol,conversion: ConversionResult?) -public typealias ImageConversionDictionary = [String:ImageConversionPair] - -extension SpeculidSpecificationsProtocol { - public func destination(forImage image: ImageSpecificationProtocol) -> String { - if let filename = image.filename { - return filename - } else if let scale = image.scale { - if let size = image.size { - return self.sourceImageURL.deletingPathExtension().appendingPathExtension("\(size.width.cleanValue)x\(size.height.cleanValue)@\(scale.cleanValue)x~\(image.idiom.rawValue).png").lastPathComponent - } else { - return self.sourceImageURL.deletingPathExtension().appendingPathExtension("\(scale.cleanValue)x~\(image.idiom.rawValue).png").lastPathComponent - } - } else { - return self.sourceImageURL.deletingPathExtension().appendingPathExtension("pdf").lastPathComponent - } - } -} - -public struct SpeculidBuilder : SpeculidBuilderProtocol { - - public let tracker : AnalyticsTrackerProtocol? - public let configuration: SpeculidConfigurationProtocol - - public func build (document: SpeculidDocumentProtocol, callback: @escaping ((Error?) -> Void)) { - let start = Date() - var errors = [Error]() - - let taskDictionary = document.images.reduce(ImageConversionDictionary()) { (dictionary, image) -> ImageConversionDictionary in - let conversion = ImageConversionBuilder.sharedInstance.conversion(forImage: image, withSpecifications: document.specifications, andConfiguration: self.configuration) - var dictionary = dictionary - let destinationFileName = document.specifications.destination(forImage: image) - dictionary[destinationFileName] = ImageConversionPair(image: image, conversion: conversion) - return dictionary - } - - let group = DispatchGroup() - - for entry in taskDictionary { - if let conversion = entry.value.conversion, case .Task(let task) = conversion { - group.enter() - task.start{error in - if let error = error { - errors.append(error) - } - group.leave() - } - } - } - - group.notify(queue: .global()) { - let difference = -start.timeIntervalSinceNow - self.tracker?.track(time: difference, withCategory: "operations", withVariable: "building", withLabel: nil) - callback(ArrayError.error(for: errors)) - } - - } -} - - -public extension SpeculidBuilderProtocol { - func build(document : SpeculidDocumentProtocol) -> Error? { - var result: Error? - let semaphone = DispatchSemaphore(value: 0) - self.build(document: document) { (error) in - result = error - semaphone.signal() - } - semaphone.wait() - return result - } -} diff --git a/framework/Controllers/SpeculidConfigurationLoader.swift b/framework/Controllers/SpeculidConfigurationLoader.swift deleted file mode 100644 index 929c59d8..00000000 --- a/framework/Controllers/SpeculidConfigurationLoader.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// SpeculidConfigurationLoader.swift -// speculid -// -// Created by Leo Dion on 10/17/16. -// -// - -import Foundation - -public struct SpeculidConfigurationLoader : SpeculidConfigurationLoaderProtocol { - - let dataSources : [ApplicationPathDataSource] - - public init (dataSources : [ApplicationPathDataSource]) { - self.dataSources = dataSources - } - - public func load(_ closure: @escaping (SpeculidConfigurationProtocol) -> Void) { - DispatchQueue.main.async { - - var valuesSet = false - let queue = DispatchQueue(label: Speculid.bundle.bundleIdentifier!+".configuration.queue") - var applicationPaths = ApplicationPathDictionary() - - for dataSource in self.dataSources { - queue.sync(execute: { - if valuesSet { - return - } - dataSource.applicationPaths({ (paths) in - for (type, url) in paths { - if applicationPaths[type] == nil { - applicationPaths[type] = url - } - } - var allSet = true - for type in ApplicationPath.values { - if applicationPaths[type] == nil { - allSet = false - break - } - } - valuesSet = allSet - }) - }) - } - - closure(SpeculidConfiguration(applicationPaths: applicationPaths)) - } - } -} diff --git a/framework/Errors/ArrayError.swift b/framework/Errors/ArrayError.swift deleted file mode 100644 index 641694ba..00000000 --- a/framework/Errors/ArrayError.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// ArrayError.swift -// speculid -// -// Created by Leo Dion on 9/27/16. -// -// - -import Foundation - -public struct ArrayError : Error { - public let errors : [Error] - - public static func error (for errors: [Error]) -> Error? { - if errors.count > 1 { - return ArrayError(errors: errors) - } else { - return errors.first - } - } -} diff --git a/framework/Errors/MissingRequiredInstallationError.swift b/framework/Errors/MissingRequiredInstallationError.swift deleted file mode 100644 index 3fea849a..00000000 --- a/framework/Errors/MissingRequiredInstallationError.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// MissingRequiredInstallationError.swift -// speculid -// -// Created by Leo Dion on 9/27/16. -// -// - -import Foundation - -public struct MissingRequiredInstallationError : Error { - public let name : String -} diff --git a/framework/Errors/ProcessError.swift b/framework/Errors/ProcessError.swift deleted file mode 100644 index 3d3ea393..00000000 --- a/framework/Errors/ProcessError.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ProcessError.swift -// speculid -// -// Created by Leo Dion on 9/26/16. -// -// - -import Foundation - -public struct ProcessError : Error, CustomStringConvertible { - public let process : Process - public let message : String - - public var localizedDescription: String { - return message - } - - public var description: String { - return message - } -} diff --git a/framework/Extensions/CGFloat.swift b/framework/Extensions/CGFloat.swift deleted file mode 100644 index f108a561..00000000 --- a/framework/Extensions/CGFloat.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// CGFloat.swift -// speculid -// -// Created by Leo Dion on 9/26/16. -// -// - -import Foundation - -extension CGFloat { - var cleanValue: String { - return self.truncatingRemainder(dividingBy: 1) == 0 ? String(format: "%.0f", self) : String(describing: self) - } -} diff --git a/framework/Extensions/NSColor.swift b/framework/Extensions/NSColor.swift deleted file mode 100644 index ee222ab3..00000000 --- a/framework/Extensions/NSColor.swift +++ /dev/null @@ -1,167 +0,0 @@ -// -// NSColor.swift -// speculid -// -// -// Created by R0CKSTAR on 6/13/14. -// Copyright (c) 2014 P.D.Q. All rights reserved. -// Modified by Leo Dion on 12/21/16. -// - -/** - MissingHashMarkAsPrefix: "Invalid RGB string, missing '#' as prefix" - UnableToScanHexValue: "Scan hex error" - MismatchedHexStringLength: "Invalid RGB string, number of characters after '#' should be either 3, 4, 6 or 8" - */ -public enum UIColorInputError : Error { - case missingHashMarkAsPrefix, - unableToScanHexValue, - mismatchedHexStringLength -} - -extension NSColor { - /** - The shorthand three-digit hexadecimal representation of color. - #RGB defines to the color #RRGGBB. - - - parameter hex3: Three-digit hexadecimal value. - - parameter alpha: 0.0 - 1.0. The default is 1.0. - */ - public convenience init(hex3: UInt16, alpha: CGFloat = 1) { - let divisor = CGFloat(15) - let red = CGFloat((hex3 & 0xF00) >> 8) / divisor - let green = CGFloat((hex3 & 0x0F0) >> 4) / divisor - let blue = CGFloat( hex3 & 0x00F ) / divisor - self.init(red: red, green: green, blue: blue, alpha: alpha) - } - - /** - The shorthand four-digit hexadecimal representation of color with alpha. - #RGBA defines to the color #RRGGBBAA. - - - parameter hex4: Four-digit hexadecimal value. - */ - public convenience init(hex4: UInt16) { - let divisor = CGFloat(15) - let red = CGFloat((hex4 & 0xF000) >> 12) / divisor - let green = CGFloat((hex4 & 0x0F00) >> 8) / divisor - let blue = CGFloat((hex4 & 0x00F0) >> 4) / divisor - let alpha = CGFloat( hex4 & 0x000F ) / divisor - self.init(red: red, green: green, blue: blue, alpha: alpha) - } - - /** - The six-digit hexadecimal representation of color of the form #RRGGBB. - - - parameter hex6: Six-digit hexadecimal value. - */ - public convenience init(hex6: UInt32, alpha: CGFloat = 1) { - let divisor = CGFloat(255) - let red = CGFloat((hex6 & 0xFF0000) >> 16) / divisor - let green = CGFloat((hex6 & 0x00FF00) >> 8) / divisor - let blue = CGFloat( hex6 & 0x0000FF ) / divisor - self.init(red: red, green: green, blue: blue, alpha: alpha) - } - - /** - The six-digit hexadecimal representation of color with alpha of the form #RRGGBBAA. - - - parameter hex8: Eight-digit hexadecimal value. - */ - public convenience init(hex8: UInt32) { - let divisor = CGFloat(255) - let red = CGFloat((hex8 & 0xFF000000) >> 24) / divisor - let green = CGFloat((hex8 & 0x00FF0000) >> 16) / divisor - let blue = CGFloat((hex8 & 0x0000FF00) >> 8) / divisor - let alpha = CGFloat( hex8 & 0x000000FF ) / divisor - self.init(red: red, green: green, blue: blue, alpha: alpha) - } - - /** - The rgba string representation of color with alpha of the form #RRGGBBAA/#RRGGBB, throws error. - - - parameter rgba: String value. - */ - public convenience init(rgba_throws rgba: String) throws { - guard rgba.hasPrefix("#") else { - throw UIColorInputError.missingHashMarkAsPrefix - } - - let hexString: String = rgba.substring(from: rgba.characters.index(rgba.startIndex, offsetBy: 1)) - var hexValue: UInt32 = 0 - - guard Scanner(string: hexString).scanHexInt32(&hexValue) else { - throw UIColorInputError.unableToScanHexValue - } - - switch (hexString.characters.count) { - case 3: - self.init(hex3: UInt16(hexValue)) - case 4: - self.init(hex4: UInt16(hexValue)) - case 6: - self.init(hex6: hexValue) - case 8: - self.init(hex8: hexValue) - default: - throw UIColorInputError.mismatchedHexStringLength - } - } - - /** - The rgba string representation of color with alpha of the form #RRGGBBAA/#RRGGBB, fails to default color. - - - parameter rgba: String value. - */ - public convenience init?(_ rgba: String, defaultColor: NSColor = NSColor.clear) { - guard let color = try? NSColor(rgba_throws: rgba) else { - self.init(cgColor: defaultColor.cgColor) - return - } - self.init(cgColor: color.cgColor) - } - - /** - Hex string of a UIColor instance. - - - parameter includeAlpha: Whether the alpha should be included. - */ - public func hexString(_ includeAlpha: Bool = true) -> String { - var r: CGFloat = 0 - var g: CGFloat = 0 - var b: CGFloat = 0 - var a: CGFloat = 0 - self.getRed(&r, green: &g, blue: &b, alpha: &a) - - if (includeAlpha) { - return String(format: "#%02X%02X%02X%02X", Int(r * 255), Int(g * 255), Int(b * 255), Int(a * 255)) - } else { - return String(format: "#%02X%02X%02X", Int(r * 255), Int(g * 255), Int(b * 255)) - } - } -} - -extension String { - /** - Convert argb string to rgba string. - */ - public func argb2rgba() -> String? { - guard self.hasPrefix("#") else { - return nil - } - - let hexString: String = self.substring(from: self.characters.index(self.startIndex, offsetBy: 1)) - switch (hexString.characters.count) { - case 4: - return "#" - + hexString.substring(from: self.characters.index(self.startIndex, offsetBy: 1)) - + hexString.substring(to: self.characters.index(self.startIndex, offsetBy: 1)) - case 8: - return "#" - + hexString.substring(from: self.characters.index(self.startIndex, offsetBy: 2)) - + hexString.substring(to: self.characters.index(self.startIndex, offsetBy: 2)) - default: - return nil - } - } -} diff --git a/framework/Extensions/String.swift b/framework/Extensions/String.swift deleted file mode 100644 index 1443e055..00000000 --- a/framework/Extensions/String.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// String.swift -// speculid -// -// Created by Leo Dion on 9/26/16. -// -// - -import Foundation - -extension String { - public func nsRange(from range: Range) -> NSRange { - let utf16view = self.utf16 - let from = range.lowerBound.samePosition(in: utf16view) - let to = range.upperBound.samePosition(in: utf16view) - return NSMakeRange(utf16view.distance(from: utf16view.startIndex, to: from), - utf16view.distance(from: from, to: to)) - } - - public func range(from nsRange: NSRange) -> Range? { - guard - let from16 = utf16.index(utf16.startIndex, offsetBy: nsRange.location, limitedBy: utf16.endIndex), - let to16 = utf16.index(from16, offsetBy: nsRange.length, limitedBy: utf16.endIndex), - let from = String.Index(from16, within: self), - let to = String.Index(to16, within: self) - else { return nil } - return from ..< to - } - - public func replaceRegex(regex: NSRegularExpression, replace: ((String, NSTextCheckingResult) -> String)) -> String { - let range = NSRange(0.. [String]? { - let range = NSRange(0.. String in - self.substring(with: self.range(from: result.rangeAt(index))!) - }) - } -} diff --git a/framework/Info.plist b/framework/Info.plist deleted file mode 100644 index 10e19d54..00000000 --- a/framework/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - $(DEFAULT_VERSION_SEMVER) - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/framework/Models/AnalyticsConfiguration.swift b/framework/Models/AnalyticsConfiguration.swift deleted file mode 100644 index f1651fb2..00000000 --- a/framework/Models/AnalyticsConfiguration.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// AnalyticsConfiguration.swift -// speculid -// -// Created by Leo Dion on 10/17/16. -// -// - -public struct AnalyticsConfiguration: AnalyticsConfigurationProtocol { - public let version = 1 - public let trackingIdentifier: String - public let clientIdentifier: String - public let applicationName : String - public let applicationVersion : String - public let userLanguage : String? - public let customParameters: AnalyticsParameterDictionary - - public init (trackingIdentifier: String, applicationName : String, applicationVersion : String, customParameters: AnalyticsParameterDictionary? = nil, clientIdentifierDelegate: ClientIdentifierDelegate? = nil, userLanguage: String? = nil) { - self.trackingIdentifier = trackingIdentifier - self.applicationVersion = applicationVersion - self.applicationName = applicationName - self.userLanguage = userLanguage ?? Locale.preferredLanguages.first - self.clientIdentifier = clientIdentifierDelegate?.clientIdentifier ?? ClientIdentifier.shared.clientIdentifier - self.customParameters = customParameters ?? AnalyticsParameterDictionary() - } -} diff --git a/framework/Models/AnalyticsParameterDictionary.swift b/framework/Models/AnalyticsParameterDictionary.swift deleted file mode 100644 index 33cb0864..00000000 --- a/framework/Models/AnalyticsParameterDictionary.swift +++ /dev/null @@ -1,9 +0,0 @@ -// -// AnalyticsParameterDictionary.swift -// speculid -// -// Created by Leo Dion on 10/18/16. -// -// - -public typealias AnalyticsParameterDictionary = [AnalyticsParameterKey : Any] diff --git a/framework/Models/AnalyticsParameterKey.swift b/framework/Models/AnalyticsParameterKey.swift deleted file mode 100644 index a95a4e0f..00000000 --- a/framework/Models/AnalyticsParameterKey.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// AnalyticsParameterKey.swift -// speculid -// -// Created by Leo Dion on 10/18/16. -// -// - -public enum AnalyticsParameterKey : String { - case hitType = "t", version = "v", trackingId = "tid", - userTimingCategory = "utc", userTimingLabel = "utl", timing = "utt", clientId = "cid", - userTimingVariable = "utv", - applicationName = "an", applicationVersion = "av", eventAction = "ea", - eventCategory = "ec", eventLabel = "el", eventValue = "ev", - userLanguage = "ul", operatingSystemVersion = "cd1", - exceptionDescription = "exd", exceptionFatal = "exf" -} diff --git a/framework/Models/ApplicationPath.swift b/framework/Models/ApplicationPath.swift deleted file mode 100644 index 55d9768d..00000000 --- a/framework/Models/ApplicationPath.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// ApplicationPath.swift -// speculid -// -// Created by Leo Dion on 10/18/16. -// -// - -public enum ApplicationPath : String { - case inkscape = "inkscape", - convert = "convert" - - public static let values : [ApplicationPath] = [.inkscape, .convert] -} diff --git a/framework/Models/ApplicationPathDictionary.swift b/framework/Models/ApplicationPathDictionary.swift deleted file mode 100644 index 0904f5a6..00000000 --- a/framework/Models/ApplicationPathDictionary.swift +++ /dev/null @@ -1,9 +0,0 @@ -// -// ApplicationPathDictionary.swift -// speculid -// -// Created by Leo Dion on 10/18/16. -// -// - -public typealias ApplicationPathDictionary = [ApplicationPath : URL] diff --git a/framework/Models/ConversionResult.swift b/framework/Models/ConversionResult.swift deleted file mode 100644 index 413e70bf..00000000 --- a/framework/Models/ConversionResult.swift +++ /dev/null @@ -1,11 +0,0 @@ -// -// ConversionResult.swift -// speculid -// -// Created by Leo Dion on 10/18/16. -// -// - -public enum ConversionResult { - case Task(ImageConversionTaskProtocol), Error(Error) -} diff --git a/framework/Models/Geometry.swift b/framework/Models/Geometry.swift deleted file mode 100644 index f4ee33a3..00000000 --- a/framework/Models/Geometry.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// Geometry.swift -// speculid -// -// Created by Leo Dion on 9/28/16. -// -// - -extension GeometryValue : CustomStringConvertible { - func scaledBy(_ scale: Int) -> GeometryValue { - switch self { - case .Width(let value) : return .Width(value * scale) - case .Height(let value): return .Height(value * scale) - } - } - - public var description : String { - switch self { - case .Width(let value): return "\(value)" - case .Height(let value): return "x\(value)" - } - } -} - -public struct Geometry : GeometryProtocol { - public let value: GeometryValue? - public func text(scaledBy scale: Int) -> String { - return value!.scaledBy(scale).description - } - - public struct Regex { - public static let Geometry = try! NSRegularExpression(pattern: "x?(\\d+)", options: [.caseInsensitive]) - public static let Integer = try! NSRegularExpression(pattern: "\\d+", options: []) - - } - - public init?(string: String) { - let range = NSRange(0.. Int in - return Int(string.substring(with: string.range(from: result.range)!))! - }.first! - if string.lowercased().characters.first == "x" { - value = .Height(intValue) - } else { - value = .Width(intValue) - } - self.value = value - } - - public var description: String { - return self.value!.description - } -} diff --git a/framework/Models/GeometryValue.swift b/framework/Models/GeometryValue.swift deleted file mode 100644 index 309e2b79..00000000 --- a/framework/Models/GeometryValue.swift +++ /dev/null @@ -1,11 +0,0 @@ -// -// GeometryValue.swift -// speculid -// -// Created by Leo Dion on 10/18/16. -// -// - -public enum GeometryValue { - case Width(Int), Height(Int) -} diff --git a/framework/Models/ImageIdiom.swift b/framework/Models/ImageIdiom.swift deleted file mode 100644 index d06374f5..00000000 --- a/framework/Models/ImageIdiom.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// ImageIdiom.swift -// speculid -// -// Created by Leo Dion on 9/26/16. -// -// - -import Foundation - -public enum ImageIdiom : String { - case universal = "universal", - iphone = "iphone", - ipad = "ipad", - mac = "mac", - tv = "tv", - watch = "watch" -} diff --git a/framework/Models/ImageSpecification.swift b/framework/Models/ImageSpecification.swift deleted file mode 100644 index ba93a4c6..00000000 --- a/framework/Models/ImageSpecification.swift +++ /dev/null @@ -1,16 +0,0 @@ -// -// ImageSpecification.swift -// speculid -// -// Created by Leo Dion on 9/24/16. -// -// - -import Foundation - -public struct ImageSpecification : ImageSpecificationProtocol{ - public let idiom : ImageIdiom - public let scale : CGFloat? - public let size : CGSize? - public let filename : String? -} diff --git a/framework/Models/ScaledGeometry.swift b/framework/Models/ScaledGeometry.swift deleted file mode 100644 index ef9e2c2e..00000000 --- a/framework/Models/ScaledGeometry.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// ScaledGeometry.swift -// speculid -// -// Created by Leo Dion on 9/28/16. -// -// - -public struct ScaledGeometry : GeometryProtocol { - public func text(scaledBy scale: Int) -> String { - return self.base.scaling(by: scale * self.scale).description - } - - public let base: GeometryProtocol - public let scale: Int - - public init (_ base: GeometryProtocol, byScale scale: Int) { - self.base = base - self.scale = scale - } - - public var description: String { - return self.base.text(scaledBy: self.scale) - } -} diff --git a/framework/Models/SpeculidConfiguration.swift b/framework/Models/SpeculidConfiguration.swift deleted file mode 100644 index e480b91f..00000000 --- a/framework/Models/SpeculidConfiguration.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// File.swift -// speculid -// -// Created by Leo Dion on 9/25/16. -// -// - -import Foundation - -extension FileManager { - func url (ifExistsAtPath path: String) -> URL? { - return FileManager.default.fileExists(atPath: path) ? URL(fileURLWithPath: path) : nil - } -} - -public struct SpeculidConfiguration : SpeculidConfigurationProtocol { - public let applicationPaths : ApplicationPathDictionary - - public init (applicationPaths : ApplicationPathDictionary? = nil) { - self.applicationPaths = applicationPaths ?? ApplicationPathDictionary() - } -} diff --git a/framework/Models/SpeculidDocument.swift b/framework/Models/SpeculidDocument.swift deleted file mode 100644 index 4a2d438a..00000000 --- a/framework/Models/SpeculidDocument.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// SpeculidDocument.swift -// speculid -// -// Created by Leo Dion on 9/24/16. -// -// - -let scaleRegex = try! NSRegularExpression(pattern: "(\\d+)x", options: []) -let sizeRegex = try! NSRegularExpression(pattern: "(\\d+\\.?\\d*)x(\\d+\\.?\\d*)", options: []) -let numberRegex = try! NSRegularExpression(pattern: "\\d", options: []) - -public struct SpeculidDocument : SpeculidDocumentProtocol { - public let _specifications : SpeculidSpecifications - public let _images : [ImageSpecification] - - public var specifications: SpeculidSpecificationsProtocol { - return self._specifications - } - - public var images: [ImageSpecificationProtocol] { - return self._images - } - - public init?(url: URL, configuration: SpeculidConfigurationProtocol? = nil) { - - guard let specifications = SpeculidSpecifications(url: url) else { - return nil - } - - guard let contentsJSONData = try? Data(contentsOf: specifications.contentsDirectoryURL.appendingPathComponent("Contents.json")) else { - return nil - } - - guard let contentsJSON = try? JSONSerialization.jsonObject(with: contentsJSONData, options: []) as? [String : Any] else { - return nil - } - - guard let images = contentsJSON?["images"] as? [[String : String]] else { - return nil - } - - self._images = images.flatMap { (dictionary) -> ImageSpecification? in - let scale: CGFloat? - let size: CGSize? - - if let scaleString = dictionary["scale"]?.firstMatchGroups(regex: scaleRegex)?[1], let value = Double(scaleString) { - scale = CGFloat(value) - } else { - scale = nil - } - - guard let idiomString = dictionary["idiom"], let idiom = ImageIdiom(rawValue: idiomString) else { - return nil - } - - if let dimensionStrings = dictionary["size"]?.firstMatchGroups(regex: sizeRegex), let width = Double(dimensionStrings[1]), let height = Double(dimensionStrings[2]) { - size = CGSize(width: width, height: height) - } else { - size = nil - } - - let filename = dictionary["filename"] - - return ImageSpecification(idiom: idiom, scale: scale, size: size, filename: filename) - } - - - - self._specifications = specifications - } -} diff --git a/framework/Models/SpeculidSpecifications.swift b/framework/Models/SpeculidSpecifications.swift deleted file mode 100644 index 1e08dc98..00000000 --- a/framework/Models/SpeculidSpecifications.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// SpeculidSpecifications.swift -// speculid -// -// Created by Leo Dion on 9/25/16. -// -// - -public struct SpeculidSpecifications : SpeculidSpecificationsProtocol { - public let contentsDirectoryURL : URL - public let sourceImageURL : URL - public let geometry: Geometry? - public let background: NSColor? - public let removeAlpha: Bool - - public init (contentsDirectoryURL : URL, - sourceImageURL : URL, - geometry: Geometry? = nil, - background: NSColor? = nil, - removeAlpha: Bool = false) { - self.contentsDirectoryURL = contentsDirectoryURL - self.geometry = geometry - self.sourceImageURL = sourceImageURL - self.background = background - self.removeAlpha = removeAlpha - } - - public init?(url: URL) { - let geometry : Geometry? - let background : NSColor? - - guard let data = try? Data(contentsOf: url) else { - return nil - } - - guard let json = try? JSONSerialization.jsonObject(with: data, options: []) else { - return nil - } - - guard let dictionary = json as? [String : Any] else { - return nil - } - - guard let setRelativePath = dictionary["set"] as? String, let sourceRelativePath = dictionary["source"] as? String else { - return nil - } - - if let backgroundString = dictionary["background"] as? String { - background = NSColor(backgroundString) - } else { - background = nil - } - - if let geometryString = dictionary["geometry"] as? String { - geometry = Geometry(string: geometryString) - } else { - geometry = nil - } - - let contentsJSONURL = url.deletingLastPathComponent().appendingPathComponent(setRelativePath, isDirectory: true).appendingPathComponent("Contents.json") - - let sourceImageURL = url.deletingLastPathComponent().appendingPathComponent(sourceRelativePath) - - self.contentsDirectoryURL = contentsJSONURL.deletingLastPathComponent() - self.sourceImageURL = sourceImageURL - self.geometry = geometry - self.background = background - self.removeAlpha = dictionary["remove-alpha"] as? Bool ?? false - } - -} diff --git a/framework/Protocols/AnalyticsConfigurationProtocol.swift b/framework/Protocols/AnalyticsConfigurationProtocol.swift deleted file mode 100644 index f1b72bf7..00000000 --- a/framework/Protocols/AnalyticsConfigurationProtocol.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// AnalyticsConfigurationProtocol.swift -// speculid -// -// Created by Leo Dion on 10/17/16. -// -// - -import Foundation - -public protocol AnalyticsConfigurationProtocol { - var applicationVersion : String { get } - var applicationName : String { get } - var trackingIdentifier : String { get } - var clientIdentifier : String { get } - var version : Int { get } - var userLanguage : String? { get } - var customParameters : AnalyticsParameterDictionary { get } -} - -public extension AnalyticsConfigurationProtocol { - public var parameters : AnalyticsParameterDictionary { - var dictionary = self.customParameters - - let mainParameters: AnalyticsParameterDictionary = [.trackingId : self.trackingIdentifier, .clientId: self.clientIdentifier, .version : self.version, .applicationName: self.applicationName, .applicationVersion : self.applicationVersion] - mainParameters.forEach { - dictionary[$0.0] = $0.1 - } - - if let userLanguage = self.userLanguage { - dictionary[.userLanguage] = userLanguage - } - - return dictionary - } -} diff --git a/framework/Protocols/AnalyticsEventProtocol.swift b/framework/Protocols/AnalyticsEventProtocol.swift deleted file mode 100644 index 9bbd778c..00000000 --- a/framework/Protocols/AnalyticsEventProtocol.swift +++ /dev/null @@ -1,16 +0,0 @@ -// -// AnalyticsEventProtocol.swift -// speculid -// -// Created by Leo Dion on 10/18/16. -// -// - -import Foundation - -public protocol AnalyticsEventProtocol { - var category : String { get } - var action : String { get } - var label : String? { get } - var value : Int? { get } -} diff --git a/framework/Protocols/AnalyticsSessionManagerProtocol.swift b/framework/Protocols/AnalyticsSessionManagerProtocol.swift deleted file mode 100644 index cbac6154..00000000 --- a/framework/Protocols/AnalyticsSessionManagerProtocol.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// AnalyticsSessionManagerProtocol.swift -// speculid -// -// Created by Leo Dion on 10/17/16. -// -// - -import Foundation - -public protocol AnalyticsSessionManagerProtocol { - func send (_ parameters : AnalyticsParameterDictionary) -} diff --git a/framework/Protocols/AnalyticsTrackerProtocol.swift b/framework/Protocols/AnalyticsTrackerProtocol.swift deleted file mode 100644 index 2a81cbb1..00000000 --- a/framework/Protocols/AnalyticsTrackerProtocol.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// AnalyticsProtocol.swift -// speculid -// -// Created by Leo Dion on 10/17/16. -// -// - -import Foundation - -public protocol AnalyticsTrackerProtocol { - func track(time: TimeInterval, withCategory category: String, withVariable variable: String, withLabel label: String?) - - func track(event: AnalyticsEventProtocol) - - func track(error: Error, isFatal: Bool) -} - -public extension AnalyticsTrackerProtocol { - func track(exception: NSException) { - self.track(error: exception, isFatal: true) - } -} - -extension NSException : Error { - -} diff --git a/framework/Protocols/ApplicationPathDataSource.swift b/framework/Protocols/ApplicationPathDataSource.swift deleted file mode 100644 index c7752d34..00000000 --- a/framework/Protocols/ApplicationPathDataSource.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// ApplicationPathDataSource.swift -// speculid -// -// Created by Leo Dion on 10/17/16. -// -// - -import Foundation - -public protocol ApplicationPathDataSource { - func applicationPaths (_ closure: @escaping (ApplicationPathDictionary) -> Void) -} diff --git a/framework/Protocols/ClientIdentifierDelegate.swift b/framework/Protocols/ClientIdentifierDelegate.swift deleted file mode 100644 index b9c4e895..00000000 --- a/framework/Protocols/ClientIdentifierDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// ClientIdentifierDelegate.swift -// speculid -// -// Created by Leo Dion on 10/18/16. -// -// - -import Foundation - -public protocol ClientIdentifierDelegate { - var clientIdentifier: String { get } -} diff --git a/framework/Protocols/GeometryProtocol.swift b/framework/Protocols/GeometryProtocol.swift deleted file mode 100644 index e3ff713d..00000000 --- a/framework/Protocols/GeometryProtocol.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// GeometryProtocol.swift -// speculid -// -// Created by Leo Dion on 9/28/16. -// -// - -import Foundation - -public protocol GeometryProtocol : CustomStringConvertible { - func text (scaledBy scale: Int) -> String -} - -extension GeometryProtocol { - public func scaling (by scale: Int) -> GeometryProtocol { - return ScaledGeometry(self, byScale: scale) - } -} diff --git a/framework/Protocols/ImageConversionBuilderProtocol.swift b/framework/Protocols/ImageConversionBuilderProtocol.swift deleted file mode 100644 index 8074e1f5..00000000 --- a/framework/Protocols/ImageConversionBuilderProtocol.swift +++ /dev/null @@ -1,11 +0,0 @@ -// -// ImageConversionBuilderProtocol.swift -// speculid -// -// Created by Leo Dion on 9/25/16. -// -// - -public protocol ImageConversionBuilderProtocol { - func conversion(forImage imageSpecification: ImageSpecificationProtocol, withSpecifications specifications: SpeculidSpecificationsProtocol, andConfiguration configuration: SpeculidConfigurationProtocol) -> ConversionResult? -} diff --git a/framework/Protocols/ImageConversionTaskProtocol.swift b/framework/Protocols/ImageConversionTaskProtocol.swift deleted file mode 100644 index 54c55075..00000000 --- a/framework/Protocols/ImageConversionTaskProtocol.swift +++ /dev/null @@ -1,11 +0,0 @@ -// -// ImageConversionTaskProtocol.swift -// speculid -// -// Created by Leo Dion on 9/25/16. -// -// - -public protocol ImageConversionTaskProtocol { - func start (callback : @escaping (Error?) -> Void) -} diff --git a/framework/Protocols/ImageSpecificationProtocol.swift b/framework/Protocols/ImageSpecificationProtocol.swift deleted file mode 100644 index 3f2821fc..00000000 --- a/framework/Protocols/ImageSpecificationProtocol.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// ImageSpecificationProtocol.swift -// speculid -// -// Created by Leo Dion on 9/26/16. -// -// - -public protocol ImageSpecificationProtocol { - var idiom : ImageIdiom { get } - var scale : CGFloat? { get } - var size : CGSize? { get } - var filename : String? { get } -} diff --git a/framework/Protocols/ProcessProtocol.swift b/framework/Protocols/ProcessProtocol.swift deleted file mode 100644 index c4049619..00000000 --- a/framework/Protocols/ProcessProtocol.swift +++ /dev/null @@ -1,69 +0,0 @@ -// -// ProcessProtocol.swift -// speculid -// -// Created by Leo Dion on 10/4/16. -// -// - -import Foundation - -public protocol ProcessProtocol { - func launch (_ callback: @escaping (Error?) -> Void) -} - -public class SerialProcessCollection { - public let processes : [ProcessProtocol] - public var index = -1 - public let callback: (Error?) -> Void - - public init (processes: [ProcessProtocol], callback: @escaping (Error?) -> Void) { - self.processes = processes - self.callback = callback - } - - public func start () { - next(error: nil) - } - - public func next (error: Error?) { - self.index = self.index + 1 - if let error = error { - self.callback(error) - } else if self.index < self.processes.count { - self.processes[self.index].launch(self.next) - } else { - self.callback(nil) - } - } -} - -public struct SerialProcess : ProcessProtocol { - public let processes : [ProcessProtocol] - - public func launch(_ callback: @escaping (Error?) -> Void) { - let collection = SerialProcessCollection(processes: self.processes, callback: callback) - collection.start() - } -} - -extension Process : ProcessProtocol { - public func launch (_ callback: @escaping (Error?) -> Void) { - let pipe = Pipe() - self.standardError = pipe - let fileHandle = pipe.fileHandleForReading - self.terminationHandler = { - (process) in - let error : Error? - if case .uncaughtSignal = process.terminationReason { - let data = fileHandle.readDataToEndOfFile() - let text = String(data: data, encoding: .utf8)! - error = ProcessError(process: process, message: text) - } else { - error = nil - } - callback(error) - } - self.launch() - } -} diff --git a/framework/Protocols/SpeculidApplicationProtocol.swift b/framework/Protocols/SpeculidApplicationProtocol.swift deleted file mode 100644 index 951ac8c4..00000000 --- a/framework/Protocols/SpeculidApplicationProtocol.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// SpeculidApplicationProtocol.swift -// speculid -// -// Created by Leo Dion on 10/13/16. -// -// - -import SwiftVer - -public protocol SpeculidApplicationProtocol { - func document (url: URL) -> SpeculidDocumentProtocol? - var builder : SpeculidBuilderProtocol { get } - var version : Version { get } -} diff --git a/framework/Protocols/SpeculidArgumentsProtocol.swift b/framework/Protocols/SpeculidArgumentsProtocol.swift deleted file mode 100644 index 8cd9ce49..00000000 --- a/framework/Protocols/SpeculidArgumentsProtocol.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// SpeculidArgumentsProtocol.swift -// speculid -// -// Created by Leo Dion on 10/13/16. -// -// - -import Foundation - -public protocol SpeculidArgumentsProtocol { - -} diff --git a/framework/Protocols/SpeculidBuilderProtocol.swift b/framework/Protocols/SpeculidBuilderProtocol.swift deleted file mode 100644 index 5548d7f5..00000000 --- a/framework/Protocols/SpeculidBuilderProtocol.swift +++ /dev/null @@ -1,11 +0,0 @@ -// -// SpeculidBuilderProtocol.swift -// speculid -// -// Created by Leo Dion on 9/25/16. -// -// - -public protocol SpeculidBuilderProtocol { - func build (document: SpeculidDocumentProtocol, callback: @escaping ((Error?) -> Void)) -} diff --git a/framework/Protocols/SpeculidConfigurationLoaderProtocol.swift b/framework/Protocols/SpeculidConfigurationLoaderProtocol.swift deleted file mode 100644 index f9c73455..00000000 --- a/framework/Protocols/SpeculidConfigurationLoaderProtocol.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// SpeculidConfigurationLoaderProtocol.swift -// speculid -// -// Created by Leo Dion on 10/17/16. -// -// - -import Foundation - -public protocol SpeculidConfigurationLoaderProtocol { - func load (_ closure: @escaping (SpeculidConfigurationProtocol) -> Void) -} diff --git a/framework/Protocols/SpeculidConfigurationProtocol.swift b/framework/Protocols/SpeculidConfigurationProtocol.swift deleted file mode 100644 index 4b6e7a7f..00000000 --- a/framework/Protocols/SpeculidConfigurationProtocol.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// SpeculidConfigurationProtocol.swift -// speculid -// -// Created by Leo Dion on 9/25/16. -// -// - -public protocol SpeculidConfigurationProtocol { - var applicationPaths : ApplicationPathDictionary { get } -} - -public extension SpeculidConfigurationProtocol { - var inkscapeURL : URL? { - return self.applicationPaths[.inkscape] - } - - var convertURL : URL? { - return self.applicationPaths[.convert] - } -} diff --git a/framework/Protocols/SpeculidDocumentProtocol.swift b/framework/Protocols/SpeculidDocumentProtocol.swift deleted file mode 100644 index 6831fe4f..00000000 --- a/framework/Protocols/SpeculidDocumentProtocol.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// SpeculidDocumentProtocol.swift -// speculid -// -// Created by Leo Dion on 9/26/16. -// -// - -public protocol SpeculidDocumentProtocol { - var specifications : SpeculidSpecificationsProtocol { get } - var images : [ImageSpecificationProtocol] { get } - -} diff --git a/framework/Protocols/SpeculidSpecificationsProtocol.swift b/framework/Protocols/SpeculidSpecificationsProtocol.swift deleted file mode 100644 index c4035c2a..00000000 --- a/framework/Protocols/SpeculidSpecificationsProtocol.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// SpeculidSpecificationsProtocol.swift -// speculid -// -// Created by Leo Dion on 9/26/16. -// -// - -public protocol SpeculidSpecificationsProtocol { - var contentsDirectoryURL : URL { get } - var sourceImageURL : URL { get } - var geometry : Geometry? { get } - var background : NSColor? { get } - var removeAlpha : Bool { get } -} diff --git a/framework/Resources/terminal.scpt b/framework/Resources/terminal.scpt deleted file mode 100644 index e7171cce..00000000 --- a/framework/Resources/terminal.scpt +++ /dev/null @@ -1,27 +0,0 @@ -on run argv -if length of argv is equal to 0 -set command to "" -else -set command to item 1 of argv -end if - -if length of argv is greater than 1 -set profile to item 2 of argv -runWithProfile(command, profile) -else -runSimple(command) -end if -end run - -on runSimple(command) -tell application "Terminal" -activate -set newTab to do script(command) -end tell -return newTab -end runSimple - -on runWithProfile(command, profile) -set newTab to runSimple(command) -tell application "Terminal" to set current settings of newTab to (first settings set whose name is profile) -end runWithProfile diff --git a/framework/Speculid.h b/framework/Speculid.h deleted file mode 100644 index 9c006c61..00000000 --- a/framework/Speculid.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// Speculid.h -// Speculid -// -// Created by Leo Dion on 9/22/16. -// -// - -#import - -//! Project version number for Speculid. -FOUNDATION_EXPORT double SpeculidVersionNumber; - -//! Project version string for Speculid. -FOUNDATION_EXPORT const unsigned char SpeculidVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - - diff --git a/framework/VCS.swift b/framework/VCS.swift deleted file mode 100644 index 37221dd0..00000000 --- a/framework/VCS.swift +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated by autorevision - do not hand-hack! */ - -let VCS_TYPE = "git" -let VCS_BASENAME = "speculid" -let VCS_UUID: String? = "b6fd659a7d2088d5420f962a307b1f7f7e5d0604" -let VCS_NUM: Int = 468 -let VCS_DATE = "2016-12-30T19:31:12Z" -let VCS_BRANCH: String = "master" -let VCS_TAG: String? = "1.0.1" -let VCS_TICK: Int? = 18 -let VCS_EXTRA: String? = "57" - -let VCS_ACTION_STAMP: String? = "2016-12-30T19:31:12Z!noreply@github.com" -let VCS_FULL_HASH: String = "3f0a0097d2f25136ff8c5b2ab0d52f26449ffa86" -let VCS_SHORT_HASH: String = "3f0a009" - -let VCS_WC_MODIFIED: Bool = true - -/* end */ diff --git a/frameworks/cairosvg/CairoColorProtocol.h b/frameworks/cairosvg/CairoColorProtocol.h new file mode 100644 index 00000000..54712aba --- /dev/null +++ b/frameworks/cairosvg/CairoColorProtocol.h @@ -0,0 +1,17 @@ +// +// CairoColorProtocol.h +// CairoSVG +// +// Created by Leo Dion on 10/12/17. +// Copyright © 2017 Bright Digit, LLC. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@protocol CairoColorProtocol +@property (readonly) double red; +@property (readonly) double green; +@property (readonly) double blue; +@end +NS_ASSUME_NONNULL_END diff --git a/frameworks/cairosvg/CairoInterface.h b/frameworks/cairosvg/CairoInterface.h new file mode 100644 index 00000000..8e6fca78 --- /dev/null +++ b/frameworks/cairosvg/CairoInterface.h @@ -0,0 +1,18 @@ +// +// RSVG.h +// obj-librsvg +// +// Created by Leo Dion on 9/21/17. +// Copyright © 2017 Leo Dion. All rights reserved. +// + +#import +#import "ImageHandle.h" +#import "GeometryDimension.h" +#import "ImageSpecificationProtocol.h" + +NS_ASSUME_NONNULL_BEGIN +@interface CairoInterface : NSObject ++ (BOOL)exportImage:(id _Nonnull) sourceHandle withSpecification: (id _Nonnull) specification error: (NSError **) error; +@end +NS_ASSUME_NONNULL_END diff --git a/frameworks/cairosvg/CairoInterface.m b/frameworks/cairosvg/CairoInterface.m new file mode 100644 index 00000000..58bb357d --- /dev/null +++ b/frameworks/cairosvg/CairoInterface.m @@ -0,0 +1,77 @@ +// +// RSVG.m +// obj-librsvg +// +// Created by Leo Dion on 9/21/17. +// Copyright © 2017 Leo Dion. All rights reserved. +// + +#import "rsvg.h" +#import "cairo.h" +#import "CairoInterface.h" +#import "ImageHandle.h" +#import "ImageHandleBuilder.h" +#import "GeometryDimension.h" +#import "ImageFileFormat.h" +#import "SurfaceHandle.h" +#import "SurfaceHandleBuilder.h" +#import "CairoSize.h" + +@implementation CairoInterface + ++ (double) mapSize: (CGSize) size toDimension: (GeometryDimension) dimensions { + switch (dimensions.dimension) { + case kWidth: + return dimensions.value/size.width; + case kHeight: + return dimensions.value/size.height; + case kScale: + return dimensions.value; + case kUnspecified: + return 1.0; + } +} + ++ (BOOL)exportImage:(id)sourceHandle withSpecification:(id)specification error:(NSError * _Nullable __autoreleasing *)error { + + NSError * surfaceError; + + double scale = [self mapSize: sourceHandle.size toDimension: specification.geometry]; + + CairoSize size; + size.width = (int)(sourceHandle.size.width * scale); + size.height = (int)(sourceHandle.size.height * scale); + id surface = [[SurfaceHandleBuilder shared] surfaceHandleForFile:specification.file withSize:size andAlphaChannel:!(specification.removeAlphaChannel) error:&surfaceError]; + + if (surfaceError) { + *error = surfaceError; + return NO; + } + + cairo_t* cr = [surface cairo]; + + if (specification.backgroundColor != nil) { + cairo_set_source_rgb (cr, specification.backgroundColor.red, specification.backgroundColor.green, specification.backgroundColor.blue); + cairo_paint(cr); + } + + cairo_scale(cr, scale, scale); + + BOOL result = [sourceHandle paintTo:cr]; + + if (!result) { + *error = [[NSError alloc] initWithDomain:@"CairoErrorDomain" code:200 userInfo:nil]; + return NO; + } + + NSError * finishError; + [surface finishWithError: &finishError]; + + if (finishError) { + *error = finishError; + return NO; + } + + return YES; +} +@end diff --git a/frameworks/cairosvg/CairoSVG.h b/frameworks/cairosvg/CairoSVG.h new file mode 100644 index 00000000..621f47c3 --- /dev/null +++ b/frameworks/cairosvg/CairoSVG.h @@ -0,0 +1,22 @@ +// +// CairoSVG_Mac_Framework.h +// CairoSVG-Mac-Framework +// +// Created by Leo Dion on 10/9/17. +// Copyright © 2017 Bright Digit, LLC. All rights reserved. +// + +#import + +//! Project version number for CairoSVG_Mac_Framework. +FOUNDATION_EXPORT double CairoSVGVersionNumber; + +//! Project version string for CairoSVG_Mac_Framework. +FOUNDATION_EXPORT const unsigned char CairoSVGVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + +#import "ImageHandleBuilder.h" +#import "ImageHandle.h" +#import "CairoInterface.h" diff --git a/frameworks/cairosvg/CairoSVGBridge.h b/frameworks/cairosvg/CairoSVGBridge.h new file mode 100644 index 00000000..3f397594 --- /dev/null +++ b/frameworks/cairosvg/CairoSVGBridge.h @@ -0,0 +1,18 @@ +// +// CairoSVGBridge.h +// CairoSVGBridge +// +// Created by Leo Dion on 10/4/17. +// + +#import + +//! Project version number for CairoSVGBridge. +FOUNDATION_EXPORT double CairoSVGBridgeVersionNumber; + +//! Project version string for CairoSVGBridge. +FOUNDATION_EXPORT const unsigned char CairoSVGBridgeVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import +#import "ImageHandle.h" +#import "ImageHandleBuilder.h" diff --git a/frameworks/cairosvg/CairoSize.h b/frameworks/cairosvg/CairoSize.h new file mode 100644 index 00000000..0e6f2099 --- /dev/null +++ b/frameworks/cairosvg/CairoSize.h @@ -0,0 +1,17 @@ +// +// CairoSize.h +// CairoSVG +// +// Created by Leo Dion on 10/12/17. +// Copyright © 2017 Bright Digit, LLC. All rights reserved. +// + +#ifndef CairoSize_h +#define CairoSize_h + +typedef struct CairoSize { + int width; + int height; +} CairoSize; + +#endif /* CairoSize_h */ diff --git a/frameworks/cairosvg/Dimension.h b/frameworks/cairosvg/Dimension.h new file mode 100644 index 00000000..ec85cd8d --- /dev/null +++ b/frameworks/cairosvg/Dimension.h @@ -0,0 +1,19 @@ +// +// Dimension.h +// CairoSVG +// +// Created by Leo Dion on 10/12/17. +// Copyright © 2017 Bright Digit, LLC. All rights reserved. +// + +#ifndef Dimension_h +#define Dimension_h + +typedef NS_ENUM(NSUInteger, Dimension) { + kWidth, + kHeight, + kScale, + kUnspecified +}; + +#endif /* Dimension_h */ diff --git a/frameworks/cairosvg/GeometryDimension.h b/frameworks/cairosvg/GeometryDimension.h new file mode 100644 index 00000000..9ef13654 --- /dev/null +++ b/frameworks/cairosvg/GeometryDimension.h @@ -0,0 +1,19 @@ +// +// GeometryDimension.h +// Speculid-Mac-App +// +// Created by Leo Dion on 10/12/17. +// Copyright © 2017 Bright Digit, LLC. All rights reserved. +// + +#ifndef GeometryDimension_h +#define GeometryDimension_h + +#import "Dimension.h" + +typedef struct GeometryDimension { + CGFloat value; + Dimension dimension; +} GeometryDimension; + +#endif /* GeometryDimension_h */ diff --git a/frameworks/cairosvg/GlibError.h b/frameworks/cairosvg/GlibError.h new file mode 100644 index 00000000..d2df763e --- /dev/null +++ b/frameworks/cairosvg/GlibError.h @@ -0,0 +1,17 @@ +// +// GlibError.h +// CairoSVG +// +// Created by Leo Dion on 10/12/17. +// Copyright © 2017 Bright Digit, LLC. All rights reserved. +// + +#import +#import "rsvg.h" + +NS_ASSUME_NONNULL_BEGIN +@interface GlibError : NSError +@property (readonly) GError * _Nonnull gerror; +- (id) initWithGError: (GError * _Nonnull) gerror; +@end +NS_ASSUME_NONNULL_END diff --git a/frameworks/cairosvg/GlibError.m b/frameworks/cairosvg/GlibError.m new file mode 100644 index 00000000..9878fd1f --- /dev/null +++ b/frameworks/cairosvg/GlibError.m @@ -0,0 +1,27 @@ +// +// GlibError.m +// CairoSVG +// +// Created by Leo Dion on 10/12/17. +// Copyright © 2017 Bright Digit, LLC. All rights reserved. +// + +#import "GlibError.h" + +@implementation GlibError + +GError * _gerror; + +- (GError*) gerror { + return _gerror; +} + +- (id) initWithGError:(GError *)gerror { + self = [super initWithDomain:@"CairoErrorDomain" code:100 userInfo:nil]; + if (self) { + _gerror = gerror; + } + return self; +} + +@end diff --git a/frameworks/cairosvg/ImageFileFormat.h b/frameworks/cairosvg/ImageFileFormat.h new file mode 100644 index 00000000..adebbc99 --- /dev/null +++ b/frameworks/cairosvg/ImageFileFormat.h @@ -0,0 +1,18 @@ +// +// ImageFormat.h +// CairoSVG +// +// Created by Leo Dion on 10/12/17. +// Copyright © 2017 Bright Digit, LLC. All rights reserved. +// + +#ifndef ImageFormat_h +#define ImageFormat_h + +typedef NS_ENUM(NSUInteger, ImageFileFormat) { + kPng, + kSvg, + kPdf +}; + +#endif /* ImageFormat_h */ diff --git a/frameworks/cairosvg/ImageFileProtocol.h b/frameworks/cairosvg/ImageFileProtocol.h new file mode 100644 index 00000000..74284281 --- /dev/null +++ b/frameworks/cairosvg/ImageFileProtocol.h @@ -0,0 +1,17 @@ +// +// ImageFileProtocol.h +// CairoSVG +// +// Created by Leo Dion on 10/12/17. +// Copyright © 2017 Bright Digit, LLC. All rights reserved. +// + +#import +#import "ImageFileFormat.h" + +NS_ASSUME_NONNULL_BEGIN +@protocol ImageFileProtocol +@property (readonly) NSURL * _Nonnull url; +@property (readonly) ImageFileFormat format; +@end +NS_ASSUME_NONNULL_END diff --git a/frameworks/cairosvg/ImageHandle.h b/frameworks/cairosvg/ImageHandle.h new file mode 100644 index 00000000..f5a4596b --- /dev/null +++ b/frameworks/cairosvg/ImageHandle.h @@ -0,0 +1,17 @@ +// +// ImageHandle.h +// SpecCarioInterop +// +// Created by Leo Dion on 9/30/17. +// + +#import + +typedef struct _cairo cairo_t; + +NS_ASSUME_NONNULL_BEGIN +@protocol ImageHandle +-(CGSize) size; +-(BOOL) paintTo:(cairo_t*) renderer; +@end +NS_ASSUME_NONNULL_END diff --git a/frameworks/cairosvg/ImageHandleBuilder.h b/frameworks/cairosvg/ImageHandleBuilder.h new file mode 100644 index 00000000..1b6e9c77 --- /dev/null +++ b/frameworks/cairosvg/ImageHandleBuilder.h @@ -0,0 +1,17 @@ +// +// ImageHandleBuilder.h +// SpecCarioInterop +// +// Created by Leo Dion on 9/30/17. +// + +#import +#import "ImageFileProtocol.h" +#import "ImageHandle.h" + +NS_ASSUME_NONNULL_BEGIN +@interface ImageHandleBuilder : NSObject +@property (class, nonatomic, assign, readonly) ImageHandleBuilder* _Nonnull shared; +- (id _Nullable) imageHandleFromFile: (id _Nonnull) file error:(NSError**) error; +@end +NS_ASSUME_NONNULL_END diff --git a/frameworks/cairosvg/ImageHandleBuilder.m b/frameworks/cairosvg/ImageHandleBuilder.m new file mode 100644 index 00000000..e6f5199e --- /dev/null +++ b/frameworks/cairosvg/ImageHandleBuilder.m @@ -0,0 +1,46 @@ +// +// ImageHandleBuilder.m +// SpecCarioInterop +// +// Created by Leo Dion on 9/30/17. +// + +#import "ImageHandleBuilder.h" +#import "rsvg.h" +#import "SVGImageHandle.h" +#import "PNGImageHandle.h" +#import "GlibError.h" + + +@implementation ImageHandleBuilder + +static ImageHandleBuilder * _shared = nil; + ++ (ImageHandleBuilder*) shared { + if (_shared == nil) { + _shared = [[ImageHandleBuilder alloc] init]; + } + + return _shared; +} + +- (id)imageHandleFromFile:(id)file error:(NSError * _Nullable __autoreleasing *)error { + NSLog(@"url: %@", file.url); + cairo_surface_t * sourceSurface; + GError * gerror = nil; + RsvgHandle * rsvgHandle; + switch (file.format) + { + case kSvg: + rsvgHandle = rsvg_handle_new_from_file(file.url.path.UTF8String , &gerror); + *error = [[GlibError alloc] initWithGError: gerror]; + return [[SVGImageHandle alloc] initWithRsvgHandle: rsvgHandle]; + case kPng: + sourceSurface = cairo_image_surface_create_from_png(file.url.path.UTF8String); + return [[PNGImageHandle alloc] initWithSurface: sourceSurface]; + case kPdf: + *error = [[NSError alloc] init]; + return nil; + } +} +@end diff --git a/frameworks/cairosvg/ImageSpecificationProtocol.h b/frameworks/cairosvg/ImageSpecificationProtocol.h new file mode 100644 index 00000000..54d4c492 --- /dev/null +++ b/frameworks/cairosvg/ImageSpecificationProtocol.h @@ -0,0 +1,20 @@ +// +// ImageSpecification.h +// SpeculidCairo +// +// Created by Leo Dion on 9/30/17. +// + +#import +#import "GeometryDimension.h" +#import "CairoColorProtocol.h" +#import "ImageFileProtocol.h" + +NS_ASSUME_NONNULL_BEGIN +@protocol ImageSpecificationProtocol +@property (readonly) id _Nonnull file; +@property (readonly) GeometryDimension geometry; +@property (readonly) BOOL removeAlphaChannel; +@property (readonly) id _Nullable backgroundColor; +@end +NS_ASSUME_NONNULL_END diff --git a/frameworks/cairosvg/Info.plist b/frameworks/cairosvg/Info.plist new file mode 100644 index 00000000..21f6822c --- /dev/null +++ b/frameworks/cairosvg/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + $(DEFAULT_SEMVER_VERSION) + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSHumanReadableCopyright + Copyright © 2017 Bright Digit, LLC. All rights reserved. + NSPrincipalClass + + + diff --git a/frameworks/cairosvg/PDFSurface.h b/frameworks/cairosvg/PDFSurface.h new file mode 100644 index 00000000..1fe89fbf --- /dev/null +++ b/frameworks/cairosvg/PDFSurface.h @@ -0,0 +1,16 @@ +// +// PDFSurface.h +// SpeculidCairo +// +// Created by Leo Dion on 9/30/17. +// + +#import +#import "SurfaceHandle.h" + +NS_ASSUME_NONNULL_BEGIN +@interface PDFSurface : NSObject +@property (readonly, nonatomic) cairo_surface_t* surface; +- (id) initWithSurface: (cairo_surface_t*) surface; +@end +NS_ASSUME_NONNULL_END diff --git a/frameworks/cairosvg/PDFSurface.m b/frameworks/cairosvg/PDFSurface.m new file mode 100644 index 00000000..4bf3b90e --- /dev/null +++ b/frameworks/cairosvg/PDFSurface.m @@ -0,0 +1,35 @@ +// +// PDFSurface.m +// SpeculidCairo +// +// Created by Leo Dion on 9/30/17. +// + +#import "cairo.h" +#import "PDFSurface.h" + +@implementation PDFSurface +- (id) initWithSurface:(cairo_surface_t *)surface { + self = [super init]; + if (self) { + _surface = surface; + } + return self; +} + +- (cairo_t *)cairo { + return cairo_create(self.surface); +} + +- (BOOL)finishWithError:(NSError *__autoreleasing *)error { + return YES; +} + +- (void)dealloc +{ + cairo_surface_finish(_surface); + cairo_surface_destroy(_surface); + _surface = nil; +} + +@end diff --git a/frameworks/cairosvg/PNGImageHandle.h b/frameworks/cairosvg/PNGImageHandle.h new file mode 100644 index 00000000..7129d634 --- /dev/null +++ b/frameworks/cairosvg/PNGImageHandle.h @@ -0,0 +1,17 @@ +// +// PNGImageHandle.h +// SpeculidCairo +// +// Created by Leo Dion on 9/30/17. +// + +#import +#import "ImageHandle.h" +#import "cairo.h" + +NS_ASSUME_NONNULL_BEGIN +@interface PNGImageHandle : NSObject +@property cairo_surface_t * cairoHandle; +- (id) initWithSurface:(cairo_surface_t *) cairoHandle; +@end +NS_ASSUME_NONNULL_END diff --git a/frameworks/cairosvg/PNGImageHandle.m b/frameworks/cairosvg/PNGImageHandle.m new file mode 100644 index 00000000..2198716e --- /dev/null +++ b/frameworks/cairosvg/PNGImageHandle.m @@ -0,0 +1,25 @@ +// +// PNGImageHandle.m +// SpeculidCairo +// +// Created by Leo Dion on 9/30/17. +// + +#import "PNGImageHandle.h" + +@implementation PNGImageHandle +-(CGSize)size { + return CGSizeMake(cairo_image_surface_get_width([self cairoHandle]), cairo_image_surface_get_height([self cairoHandle])); +} + +-(BOOL)paintTo:(cairo_t *)renderer { + cairo_set_source_surface(renderer, [self cairoHandle], 0, 0); + cairo_paint(renderer); + return true; +} + +- (id) initWithSurface:(cairo_surface_t *) cairoHandle { + self.cairoHandle = cairoHandle; + return [super init]; +} +@end diff --git a/frameworks/cairosvg/PNGSurface.h b/frameworks/cairosvg/PNGSurface.h new file mode 100644 index 00000000..7c03ff1f --- /dev/null +++ b/frameworks/cairosvg/PNGSurface.h @@ -0,0 +1,19 @@ +// +// PNGSurface.h +// SpeculidCairo +// +// Created by Leo Dion on 9/30/17. +// + +#import +#import "cairo.h" +#import "SurfaceHandle.h" + +NS_ASSUME_NONNULL_BEGIN +@interface PNGSurface : NSObject +@property (readonly, nonatomic) NSURL* url; +@property (readonly, nonatomic) cairo_format_t format; +@property (readonly, nonatomic) cairo_surface_t* surface; +- (id) initWithSurface: (cairo_surface_t*) surface format: (cairo_format_t) format andDestinationURL: (NSURL*) url; +@end +NS_ASSUME_NONNULL_END diff --git a/frameworks/cairosvg/PNGSurface.m b/frameworks/cairosvg/PNGSurface.m new file mode 100644 index 00000000..d2bb2ea4 --- /dev/null +++ b/frameworks/cairosvg/PNGSurface.m @@ -0,0 +1,44 @@ +// +// PNGSurface.m +// SpeculidCairo +// +// Created by Leo Dion on 9/30/17. +// + +#import "PNGSurface.h" + +@implementation PNGSurface + +- (id) initWithSurface:(cairo_surface_t *)surface format:(cairo_format_t)format andDestinationURL:(nonnull NSURL *)url { + self = [super init]; + if (self) { + _format = format; + _surface = surface; + _url = url; + } + return self; +} + +- (cairo_t *)cairo { + return cairo_create(self.surface); +} + +- (NSError *)errorFromStatus: (cairo_status_t) status { + return nil; +} + +- (BOOL)finishWithError:(NSError *__autoreleasing *)error { + + cairo_status_t status = cairo_surface_write_to_png(self.surface, self.url.path.UTF8String); + *error = [self errorFromStatus: status]; + return error == nil; +} + +- (void)dealloc +{ + cairo_surface_finish(_surface); + cairo_surface_destroy(_surface); + _surface = nil; +} + +@end diff --git a/frameworks/cairosvg/SVGImageHandle.h b/frameworks/cairosvg/SVGImageHandle.h new file mode 100644 index 00000000..ab7d3648 --- /dev/null +++ b/frameworks/cairosvg/SVGImageHandle.h @@ -0,0 +1,17 @@ +// +// SVGImageHandle.h +// SpeculidCairo +// +// Created by Leo Dion on 9/30/17. +// + +#import +#import "rsvg.h" +#import "ImageHandle.h" + +NS_ASSUME_NONNULL_BEGIN +@interface SVGImageHandle : NSObject +@property RsvgHandle * rsvgHandle; +- (id) initWithRsvgHandle:(RsvgHandle *) rsvgHandle; +@end +NS_ASSUME_NONNULL_END diff --git a/frameworks/cairosvg/SVGImageHandle.m b/frameworks/cairosvg/SVGImageHandle.m new file mode 100644 index 00000000..dfd5934a --- /dev/null +++ b/frameworks/cairosvg/SVGImageHandle.m @@ -0,0 +1,25 @@ +// +// SVGImageHandle.m +// SpeculidCairo +// +// Created by Leo Dion on 9/30/17. +// + +#import "SVGImageHandle.h" + +@implementation SVGImageHandle +-(CGSize)size { + RsvgDimensionData rsvgDimensions; + rsvg_handle_get_dimensions([self rsvgHandle], &rsvgDimensions); + return CGSizeMake(rsvgDimensions.width, rsvgDimensions.height); +} + +-(BOOL)paintTo:(cairo_t *)renderer { + return rsvg_handle_render_cairo([self rsvgHandle], renderer); +} + +- (id) initWithRsvgHandle:(RsvgHandle *) rsvgHandle { + self.rsvgHandle = rsvgHandle; + return [super init]; +} +@end diff --git a/frameworks/cairosvg/SpeculidCairo.h b/frameworks/cairosvg/SpeculidCairo.h new file mode 100644 index 00000000..87e9f012 --- /dev/null +++ b/frameworks/cairosvg/SpeculidCairo.h @@ -0,0 +1,18 @@ +// +// SpeculidCairo.h +// SpeculidCairo +// +// Created by Leo Dion on 9/30/17. +// + +#import + +//! Project version number for SpeculidCairo. +FOUNDATION_EXPORT double SpeculidCairoVersionNumber; + +//! Project version string for SpeculidCairo. +FOUNDATION_EXPORT const unsigned char SpeculidCairoVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/frameworks/cairosvg/SurfaceHandle.h b/frameworks/cairosvg/SurfaceHandle.h new file mode 100644 index 00000000..e7c70cf6 --- /dev/null +++ b/frameworks/cairosvg/SurfaceHandle.h @@ -0,0 +1,16 @@ +// +// SurfaceHandle.h +// SpeculidCairo +// +// Created by Leo Dion on 9/30/17. +// + +#import +#import "cairo.h" + +NS_ASSUME_NONNULL_BEGIN +@protocol SurfaceHandle +- (cairo_t *) cairo; +- (BOOL) finishWithError: (NSError **) error; +@end +NS_ASSUME_NONNULL_END diff --git a/frameworks/cairosvg/SurfaceHandleBuilder.h b/frameworks/cairosvg/SurfaceHandleBuilder.h new file mode 100644 index 00000000..15dd2335 --- /dev/null +++ b/frameworks/cairosvg/SurfaceHandleBuilder.h @@ -0,0 +1,19 @@ +// +// SurfaceHandleBuilder.h +// CairoSVG +// +// Created by Leo Dion on 10/12/17. +// Copyright © 2017 Bright Digit, LLC. All rights reserved. +// + +#import +#import "SurfaceHandle.h" +#import "ImageFileProtocol.h" +#import "CairoSize.h" + +NS_ASSUME_NONNULL_BEGIN +@interface SurfaceHandleBuilder : NSObject +@property (class, nonatomic, assign, readonly) SurfaceHandleBuilder* _Nonnull shared; +- (id _Nullable) surfaceHandleForFile: (id _Nonnull) file withSize: (CairoSize) size andAlphaChannel: (BOOL) containsAlphaChannel error:(NSError**) error; +@end +NS_ASSUME_NONNULL_END diff --git a/frameworks/cairosvg/SurfaceHandleBuilder.m b/frameworks/cairosvg/SurfaceHandleBuilder.m new file mode 100644 index 00000000..78d3bee1 --- /dev/null +++ b/frameworks/cairosvg/SurfaceHandleBuilder.m @@ -0,0 +1,44 @@ +// +// SurfaceHandleBuilder.m +// CairoSVG +// +// Created by Leo Dion on 10/12/17. +// Copyright © 2017 Bright Digit, LLC. All rights reserved. +// + +#import "cairo.h" +#import "SurfaceHandleBuilder.h" +#import "PNGSurface.h" +#import "PDFSurface.h" + +@implementation SurfaceHandleBuilder +static SurfaceHandleBuilder * _shared = nil; + ++ (SurfaceHandleBuilder*) shared { + if (_shared == nil) { + _shared = [[SurfaceHandleBuilder alloc] init]; + } + + return _shared; +} + +- (id) surfaceHandleForFile:(id)file withSize:(CairoSize)size andAlphaChannel:(BOOL)containsAlphaChannel error:(NSError * _Nullable __autoreleasing * _Nullable)error { + + cairo_format_t format; + cairo_surface_t* destinationSurface; + switch (file.format) { + case kPng: + format = containsAlphaChannel ? CAIRO_FORMAT_ARGB32 : CAIRO_FORMAT_RGB24; + destinationSurface = cairo_image_surface_create(format, size.width, size.height); + return [[PNGSurface alloc] initWithSurface:destinationSurface format:format andDestinationURL:file.url]; + case kPdf: + destinationSurface = cairo_pdf_surface_create(file.url.path.UTF8String, size.width, size.height); + return [[PDFSurface alloc] initWithSurface: destinationSurface]; + break; + default: + *error = [[NSError alloc] initWithDomain:@"CairoErrorDomain" code:200 userInfo:nil]; + return nil; + } + +} +@end diff --git a/frameworks/cairosvg/cairo.h b/frameworks/cairosvg/cairo.h new file mode 100644 index 00000000..3f0d36bc --- /dev/null +++ b/frameworks/cairosvg/cairo.h @@ -0,0 +1,21 @@ +// +// cairo.h +// CairoSVG +// +// Created by Leo Dion on 10/13/17. +// Copyright © 2017 Bright Digit, LLC. All rights reserved. +// + +#ifndef cairo_h +#define cairo_h + + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdocumentation" + +#import + +// turn the warnings back on +#pragma clang diagnostic pop + +#endif /* cairo_h */ diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-deprecated.h b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-deprecated.h new file mode 100755 index 00000000..7a56aadb --- /dev/null +++ b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-deprecated.h @@ -0,0 +1,123 @@ +/* cairo - a vector graphics library with display and print output + * + * Copyright © 2006 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is Red Hat, Inc. + * + * Contributor(s): + * Carl D. Worth + */ + +#ifndef CAIRO_DEPRECATED_H +#define CAIRO_DEPRECATED_H + +#define CAIRO_FONT_TYPE_ATSUI CAIRO_FONT_TYPE_QUARTZ + +/* Obsolete functions. These definitions exist to coerce the compiler + * into providing a little bit of guidance with its error + * messages. The idea is to help users port their old code without + * having to dig through lots of documentation. + * + * The first set of REPLACED_BY functions is for functions whose names + * have just been changed. So fixing these up is mechanical, (and + * automated by means of the cairo/util/cairo-api-update script. + * + * The second set of DEPRECATED_BY functions is for functions where + * the replacement is used in a different way, (ie. different + * arguments, multiple functions instead of one, etc). Fixing these up + * will require a bit more work on the user's part, (and hopefully we + * can get cairo-api-update to find these and print some guiding + * information). + */ +#define cairo_current_font_extents cairo_current_font_extents_REPLACED_BY_cairo_font_extents +#define cairo_get_font_extents cairo_get_font_extents_REPLACED_BY_cairo_font_extents +#define cairo_current_operator cairo_current_operator_REPLACED_BY_cairo_get_operator +#define cairo_current_tolerance cairo_current_tolerance_REPLACED_BY_cairo_get_tolerance +#define cairo_current_point cairo_current_point_REPLACED_BY_cairo_get_current_point +#define cairo_current_fill_rule cairo_current_fill_rule_REPLACED_BY_cairo_get_fill_rule +#define cairo_current_line_width cairo_current_line_width_REPLACED_BY_cairo_get_line_width +#define cairo_current_line_cap cairo_current_line_cap_REPLACED_BY_cairo_get_line_cap +#define cairo_current_line_join cairo_current_line_join_REPLACED_BY_cairo_get_line_join +#define cairo_current_miter_limit cairo_current_miter_limit_REPLACED_BY_cairo_get_miter_limit +#define cairo_current_matrix cairo_current_matrix_REPLACED_BY_cairo_get_matrix +#define cairo_current_target_surface cairo_current_target_surface_REPLACED_BY_cairo_get_target +#define cairo_get_status cairo_get_status_REPLACED_BY_cairo_status +#define cairo_concat_matrix cairo_concat_matrix_REPLACED_BY_cairo_transform +#define cairo_scale_font cairo_scale_font_REPLACED_BY_cairo_set_font_size +#define cairo_select_font cairo_select_font_REPLACED_BY_cairo_select_font_face +#define cairo_transform_font cairo_transform_font_REPLACED_BY_cairo_set_font_matrix +#define cairo_transform_point cairo_transform_point_REPLACED_BY_cairo_user_to_device +#define cairo_transform_distance cairo_transform_distance_REPLACED_BY_cairo_user_to_device_distance +#define cairo_inverse_transform_point cairo_inverse_transform_point_REPLACED_BY_cairo_device_to_user +#define cairo_inverse_transform_distance cairo_inverse_transform_distance_REPLACED_BY_cairo_device_to_user_distance +#define cairo_init_clip cairo_init_clip_REPLACED_BY_cairo_reset_clip +#define cairo_surface_create_for_image cairo_surface_create_for_image_REPLACED_BY_cairo_image_surface_create_for_data +#define cairo_default_matrix cairo_default_matrix_REPLACED_BY_cairo_identity_matrix +#define cairo_matrix_set_affine cairo_matrix_set_affine_REPLACED_BY_cairo_matrix_init +#define cairo_matrix_set_identity cairo_matrix_set_identity_REPLACED_BY_cairo_matrix_init_identity +#define cairo_pattern_add_color_stop cairo_pattern_add_color_stop_REPLACED_BY_cairo_pattern_add_color_stop_rgba +#define cairo_set_rgb_color cairo_set_rgb_color_REPLACED_BY_cairo_set_source_rgb +#define cairo_set_pattern cairo_set_pattern_REPLACED_BY_cairo_set_source +#define cairo_xlib_surface_create_for_pixmap_with_visual cairo_xlib_surface_create_for_pixmap_with_visual_REPLACED_BY_cairo_xlib_surface_create +#define cairo_xlib_surface_create_for_window_with_visual cairo_xlib_surface_create_for_window_with_visual_REPLACED_BY_cairo_xlib_surface_create +#define cairo_xcb_surface_create_for_pixmap_with_visual cairo_xcb_surface_create_for_pixmap_with_visual_REPLACED_BY_cairo_xcb_surface_create +#define cairo_xcb_surface_create_for_window_with_visual cairo_xcb_surface_create_for_window_with_visual_REPLACED_BY_cairo_xcb_surface_create +#define cairo_ps_surface_set_dpi cairo_ps_surface_set_dpi_REPLACED_BY_cairo_surface_set_fallback_resolution +#define cairo_pdf_surface_set_dpi cairo_pdf_surface_set_dpi_REPLACED_BY_cairo_surface_set_fallback_resolution +#define cairo_svg_surface_set_dpi cairo_svg_surface_set_dpi_REPLACED_BY_cairo_surface_set_fallback_resolution +#define cairo_atsui_font_face_create_for_atsu_font_id cairo_atsui_font_face_create_for_atsu_font_id_REPLACED_BY_cairo_quartz_font_face_create_for_atsu_font_id + +#define cairo_current_path cairo_current_path_DEPRECATED_BY_cairo_copy_path +#define cairo_current_path_flat cairo_current_path_flat_DEPRECATED_BY_cairo_copy_path_flat +#define cairo_get_path cairo_get_path_DEPRECATED_BY_cairo_copy_path +#define cairo_get_path_flat cairo_get_path_flat_DEPRECATED_BY_cairo_get_path_flat +#define cairo_set_alpha cairo_set_alpha_DEPRECATED_BY_cairo_set_source_rgba_OR_cairo_paint_with_alpha +#define cairo_show_surface cairo_show_surface_DEPRECATED_BY_cairo_set_source_surface_AND_cairo_paint +#define cairo_copy cairo_copy_DEPRECATED_BY_cairo_create_AND_MANY_INDIVIDUAL_FUNCTIONS +#define cairo_surface_set_repeat cairo_surface_set_repeat_DEPRECATED_BY_cairo_pattern_set_extend +#define cairo_surface_set_matrix cairo_surface_set_matrix_DEPRECATED_BY_cairo_pattern_set_matrix +#define cairo_surface_get_matrix cairo_surface_get_matrix_DEPRECATED_BY_cairo_pattern_get_matrix +#define cairo_surface_set_filter cairo_surface_set_filter_DEPRECATED_BY_cairo_pattern_set_filter +#define cairo_surface_get_filter cairo_surface_get_filter_DEPRECATED_BY_cairo_pattern_get_filter +#define cairo_matrix_create cairo_matrix_create_DEPRECATED_BY_cairo_matrix_t +#define cairo_matrix_destroy cairo_matrix_destroy_DEPRECATED_BY_cairo_matrix_t +#define cairo_matrix_copy cairo_matrix_copy_DEPRECATED_BY_cairo_matrix_t +#define cairo_matrix_get_affine cairo_matrix_get_affine_DEPRECATED_BY_cairo_matrix_t +#define cairo_set_target_surface cairo_set_target_surface_DEPRECATED_BY_cairo_create +#define cairo_set_target_image cairo_set_target_image_DEPRECATED_BY_cairo_image_surface_create_for_data +#define cairo_set_target_pdf cairo_set_target_pdf_DEPRECATED_BY_cairo_pdf_surface_create +#define cairo_set_target_png cairo_set_target_png_DEPRECATED_BY_cairo_surface_write_to_png +#define cairo_set_target_ps cairo_set_target_ps_DEPRECATED_BY_cairo_ps_surface_create +#define cairo_set_target_quartz cairo_set_target_quartz_DEPRECATED_BY_cairo_quartz_surface_create +#define cairo_set_target_win32 cairo_set_target_win32_DEPRECATED_BY_cairo_win32_surface_create +#define cairo_set_target_xcb cairo_set_target_xcb_DEPRECATED_BY_cairo_xcb_surface_create +#define cairo_set_target_drawable cairo_set_target_drawable_DEPRECATED_BY_cairo_xlib_surface_create +#define cairo_get_status_string cairo_get_status_string_DEPRECATED_BY_cairo_status_AND_cairo_status_to_string +#define cairo_status_string cairo_status_string_DEPRECATED_BY_cairo_status_AND_cairo_status_to_string + +#endif /* CAIRO_DEPRECATED_H */ diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-features.h b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-features.h new file mode 100755 index 00000000..21aa5ed9 --- /dev/null +++ b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-features.h @@ -0,0 +1,46 @@ +/* Generated by configure. Do not edit. */ +#ifndef CAIRO_FEATURES_H +#define CAIRO_FEATURES_H + +#define CAIRO_HAS_FC_FONT 1 +#define CAIRO_HAS_FT_FONT 1 +#define CAIRO_HAS_GOBJECT_FUNCTIONS 1 +#define CAIRO_HAS_IMAGE_SURFACE 1 +#define CAIRO_HAS_MIME_SURFACE 1 +#define CAIRO_HAS_OBSERVER_SURFACE 1 +#define CAIRO_HAS_PDF_SURFACE 1 +#define CAIRO_HAS_PNG_FUNCTIONS 1 +#define CAIRO_HAS_PS_SURFACE 1 +#define CAIRO_HAS_QUARTZ_FONT 1 +#define CAIRO_HAS_QUARTZ_IMAGE_SURFACE 1 +#define CAIRO_HAS_QUARTZ_SURFACE 1 +#define CAIRO_HAS_RECORDING_SURFACE 1 +#define CAIRO_HAS_SCRIPT_SURFACE 1 +#define CAIRO_HAS_SVG_SURFACE 1 +#define CAIRO_HAS_TEE_SURFACE 1 +#define CAIRO_HAS_USER_FONT 1 + +/*#undef CAIRO_HAS_BEOS_SURFACE */ +/*#undef CAIRO_HAS_COGL_SURFACE */ +/*#undef CAIRO_HAS_DIRECTFB_SURFACE */ +/*#undef CAIRO_HAS_DRM_SURFACE */ +/*#undef CAIRO_HAS_EGL_FUNCTIONS */ +/*#undef CAIRO_HAS_GALLIUM_SURFACE */ +/*#undef CAIRO_HAS_GLESV2_SURFACE */ +/*#undef CAIRO_HAS_GLX_FUNCTIONS */ +/*#undef CAIRO_HAS_GL_SURFACE */ +/*#undef CAIRO_HAS_OS2_SURFACE */ +/*#undef CAIRO_HAS_QT_SURFACE */ +/*#undef CAIRO_HAS_SKIA_SURFACE */ +/*#undef CAIRO_HAS_VG_SURFACE */ +/*#undef CAIRO_HAS_WGL_FUNCTIONS */ +/*#undef CAIRO_HAS_WIN32_FONT */ +/*#undef CAIRO_HAS_WIN32_SURFACE */ +/*#undef CAIRO_HAS_XCB_SHM_FUNCTIONS */ +/*#undef CAIRO_HAS_XCB_SURFACE */ +/*#undef CAIRO_HAS_XLIB_SURFACE */ +/*#undef CAIRO_HAS_XLIB_XCB_FUNCTIONS */ +/*#undef CAIRO_HAS_XLIB_XRENDER_SURFACE */ +/*#undef CAIRO_HAS_XML_SURFACE */ + +#endif diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-ft.h b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-ft.h new file mode 100755 index 00000000..29c43c96 --- /dev/null +++ b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-ft.h @@ -0,0 +1,118 @@ +/* cairo - a vector graphics library with display and print output + * + * Copyright © 2005 Red Hat, Inc + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is Red Hat, Inc. + * + * Contributor(s): + * Graydon Hoare + * Owen Taylor + */ + +#ifndef CAIRO_FT_H +#define CAIRO_FT_H + +#include "cairo.h" + +#if CAIRO_HAS_FT_FONT + +/* Fontconfig/Freetype platform-specific font interface */ + +#include +#include FT_FREETYPE_H + +#if CAIRO_HAS_FC_FONT +#include +#endif + +CAIRO_BEGIN_DECLS + +cairo_public cairo_font_face_t * +cairo_ft_font_face_create_for_ft_face (FT_Face face, + int load_flags); + +/** + * cairo_ft_synthesize_t: + * @CAIRO_FT_SYNTHESIZE_BOLD: Embolden the glyphs (redraw with a pixel offset) + * @CAIRO_FT_SYNTHESIZE_OBLIQUE: Slant the glyph outline by 12 degrees to the + * right. + * + * A set of synthesis options to control how FreeType renders the glyphs + * for a particular font face. + * + * Individual synthesis features of a #cairo_ft_font_face_t can be set + * using cairo_ft_font_face_set_synthesize(), or disabled using + * cairo_ft_font_face_unset_synthesize(). The currently enabled set of + * synthesis options can be queried with cairo_ft_font_face_get_synthesize(). + * + * Note: that when synthesizing glyphs, the font metrics returned will only + * be estimates. + * + * Since: 1.12 + **/ +typedef enum { + CAIRO_FT_SYNTHESIZE_BOLD = 1 << 0, + CAIRO_FT_SYNTHESIZE_OBLIQUE = 1 << 1 +} cairo_ft_synthesize_t; + +cairo_public void +cairo_ft_font_face_set_synthesize (cairo_font_face_t *font_face, + unsigned int synth_flags); + +cairo_public void +cairo_ft_font_face_unset_synthesize (cairo_font_face_t *font_face, + unsigned int synth_flags); + +cairo_public unsigned int +cairo_ft_font_face_get_synthesize (cairo_font_face_t *font_face); + + +cairo_public FT_Face +cairo_ft_scaled_font_lock_face (cairo_scaled_font_t *scaled_font); + +cairo_public void +cairo_ft_scaled_font_unlock_face (cairo_scaled_font_t *scaled_font); + +#if CAIRO_HAS_FC_FONT + +cairo_public cairo_font_face_t * +cairo_ft_font_face_create_for_pattern (FcPattern *pattern); + +cairo_public void +cairo_ft_font_options_substitute (const cairo_font_options_t *options, + FcPattern *pattern); + +#endif + +CAIRO_END_DECLS + +#else /* CAIRO_HAS_FT_FONT */ +# error Cairo was not compiled with support for the freetype font backend +#endif /* CAIRO_HAS_FT_FONT */ + +#endif /* CAIRO_FT_H */ diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-gobject.h b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-gobject.h new file mode 100755 index 00000000..459074e8 --- /dev/null +++ b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-gobject.h @@ -0,0 +1,192 @@ +/* cairo - a vector graphics library with display and print output + * + * Copyright © 2010 Red Hat Inc. + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is University of Southern + * California. + * + * Contributor(s): + * Benjamin Otte + */ + +#ifndef CAIRO_GOBJECT_H +#define CAIRO_GOBJECT_H + +#include + +#if CAIRO_HAS_GOBJECT_FUNCTIONS + +#include + +CAIRO_BEGIN_DECLS + +/* structs */ + +#define CAIRO_GOBJECT_TYPE_CONTEXT cairo_gobject_context_get_type () +cairo_public GType +cairo_gobject_context_get_type (void); + +#define CAIRO_GOBJECT_TYPE_DEVICE cairo_gobject_device_get_type () +cairo_public GType +cairo_gobject_device_get_type (void); + +#define CAIRO_GOBJECT_TYPE_MATRIX cairo_gobject_matrix_get_type () +cairo_public GType +cairo_gobject_matrix_get_type (void); + +#define CAIRO_GOBJECT_TYPE_PATTERN cairo_gobject_pattern_get_type () +cairo_public GType +cairo_gobject_pattern_get_type (void); + +#define CAIRO_GOBJECT_TYPE_SURFACE cairo_gobject_surface_get_type () +cairo_public GType +cairo_gobject_surface_get_type (void); + +#define CAIRO_GOBJECT_TYPE_RECTANGLE cairo_gobject_rectangle_get_type () +cairo_public GType +cairo_gobject_rectangle_get_type (void); + +#define CAIRO_GOBJECT_TYPE_SCALED_FONT cairo_gobject_scaled_font_get_type () +cairo_public GType +cairo_gobject_scaled_font_get_type (void); + +#define CAIRO_GOBJECT_TYPE_FONT_FACE cairo_gobject_font_face_get_type () +cairo_public GType +cairo_gobject_font_face_get_type (void); + +#define CAIRO_GOBJECT_TYPE_FONT_OPTIONS cairo_gobject_font_options_get_type () +cairo_public GType +cairo_gobject_font_options_get_type (void); + +#define CAIRO_GOBJECT_TYPE_RECTANGLE_INT cairo_gobject_rectangle_int_get_type () +cairo_public GType +cairo_gobject_rectangle_int_get_type (void); + +#define CAIRO_GOBJECT_TYPE_REGION cairo_gobject_region_get_type () +cairo_public GType +cairo_gobject_region_get_type (void); + +/* enums */ + +#define CAIRO_GOBJECT_TYPE_STATUS cairo_gobject_status_get_type () +cairo_public GType +cairo_gobject_status_get_type (void); + +#define CAIRO_GOBJECT_TYPE_CONTENT cairo_gobject_content_get_type () +cairo_public GType +cairo_gobject_content_get_type (void); + +#define CAIRO_GOBJECT_TYPE_OPERATOR cairo_gobject_operator_get_type () +cairo_public GType +cairo_gobject_operator_get_type (void); + +#define CAIRO_GOBJECT_TYPE_ANTIALIAS cairo_gobject_antialias_get_type () +cairo_public GType +cairo_gobject_antialias_get_type (void); + +#define CAIRO_GOBJECT_TYPE_FILL_RULE cairo_gobject_fill_rule_get_type () +cairo_public GType +cairo_gobject_fill_rule_get_type (void); + +#define CAIRO_GOBJECT_TYPE_LINE_CAP cairo_gobject_line_cap_get_type () +cairo_public GType +cairo_gobject_line_cap_get_type (void); + +#define CAIRO_GOBJECT_TYPE_LINE_JOIN cairo_gobject_line_join_get_type () +cairo_public GType +cairo_gobject_line_join_get_type (void); + +#define CAIRO_GOBJECT_TYPE_TEXT_CLUSTER_FLAGS cairo_gobject_text_cluster_flags_get_type () +cairo_public GType +cairo_gobject_text_cluster_flags_get_type (void); + +#define CAIRO_GOBJECT_TYPE_FONT_SLANT cairo_gobject_font_slant_get_type () +cairo_public GType +cairo_gobject_font_slant_get_type (void); + +#define CAIRO_GOBJECT_TYPE_FONT_WEIGHT cairo_gobject_font_weight_get_type () +cairo_public GType +cairo_gobject_font_weight_get_type (void); + +#define CAIRO_GOBJECT_TYPE_SUBPIXEL_ORDER cairo_gobject_subpixel_order_get_type () +cairo_public GType +cairo_gobject_subpixel_order_get_type (void); + +#define CAIRO_GOBJECT_TYPE_HINT_STYLE cairo_gobject_hint_style_get_type () +cairo_public GType +cairo_gobject_hint_style_get_type (void); + +/* historical accident */ +#define CAIRO_GOBJECT_TYPE_HNT_METRICS cairo_gobject_hint_metrics_get_type () +#define CAIRO_GOBJECT_TYPE_HINT_METRICS cairo_gobject_hint_metrics_get_type () +cairo_public GType +cairo_gobject_hint_metrics_get_type (void); + +#define CAIRO_GOBJECT_TYPE_FONT_TYPE cairo_gobject_font_type_get_type () +cairo_public GType +cairo_gobject_font_type_get_type (void); + +#define CAIRO_GOBJECT_TYPE_PATH_DATA_TYPE cairo_gobject_path_data_type_get_type () +cairo_public GType +cairo_gobject_path_data_type_get_type (void); + +#define CAIRO_GOBJECT_TYPE_DEVICE_TYPE cairo_gobject_device_type_get_type () +cairo_public GType +cairo_gobject_device_type_get_type (void); + +#define CAIRO_GOBJECT_TYPE_SURFACE_TYPE cairo_gobject_surface_type_get_type () +cairo_public GType +cairo_gobject_surface_type_get_type (void); + +#define CAIRO_GOBJECT_TYPE_FORMAT cairo_gobject_format_get_type () +cairo_public GType +cairo_gobject_format_get_type (void); + +#define CAIRO_GOBJECT_TYPE_PATTERN_TYPE cairo_gobject_pattern_type_get_type () +cairo_public GType +cairo_gobject_pattern_type_get_type (void); + +#define CAIRO_GOBJECT_TYPE_EXTEND cairo_gobject_extend_get_type () +cairo_public GType +cairo_gobject_extend_get_type (void); + +#define CAIRO_GOBJECT_TYPE_FILTER cairo_gobject_filter_get_type () +cairo_public GType +cairo_gobject_filter_get_type (void); + +#define CAIRO_GOBJECT_TYPE_REGION_OVERLAP cairo_gobject_region_overlap_get_type () +cairo_public GType +cairo_gobject_region_overlap_get_type (void); + +CAIRO_END_DECLS + +#else /* CAIRO_HAS_GOBJECT_FUNCTIONS */ +# error Cairo was not compiled with support for GObject +#endif /* CAIRO_HAS_GOBJECT_FUNCTIONS */ + +#endif /* CAIRO_GOBJECT_H */ diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-pdf.h b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-pdf.h new file mode 100755 index 00000000..1bc8524f --- /dev/null +++ b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-pdf.h @@ -0,0 +1,94 @@ +/* cairo - a vector graphics library with display and print output + * + * Copyright © 2002 University of Southern California + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is University of Southern + * California. + * + * Contributor(s): + * Carl D. Worth + */ + +#ifndef CAIRO_PDF_H +#define CAIRO_PDF_H + +#include "cairo.h" + +#if CAIRO_HAS_PDF_SURFACE + +CAIRO_BEGIN_DECLS + +/** + * cairo_pdf_version_t: + * @CAIRO_PDF_VERSION_1_4: The version 1.4 of the PDF specification. (Since 1.10) + * @CAIRO_PDF_VERSION_1_5: The version 1.5 of the PDF specification. (Since 1.10) + * + * #cairo_pdf_version_t is used to describe the version number of the PDF + * specification that a generated PDF file will conform to. + * + * Since: 1.10 + **/ +typedef enum _cairo_pdf_version { + CAIRO_PDF_VERSION_1_4, + CAIRO_PDF_VERSION_1_5 +} cairo_pdf_version_t; + +cairo_public cairo_surface_t * +cairo_pdf_surface_create (const char *filename, + double width_in_points, + double height_in_points); + +cairo_public cairo_surface_t * +cairo_pdf_surface_create_for_stream (cairo_write_func_t write_func, + void *closure, + double width_in_points, + double height_in_points); + +cairo_public void +cairo_pdf_surface_restrict_to_version (cairo_surface_t *surface, + cairo_pdf_version_t version); + +cairo_public void +cairo_pdf_get_versions (cairo_pdf_version_t const **versions, + int *num_versions); + +cairo_public const char * +cairo_pdf_version_to_string (cairo_pdf_version_t version); + +cairo_public void +cairo_pdf_surface_set_size (cairo_surface_t *surface, + double width_in_points, + double height_in_points); + +CAIRO_END_DECLS + +#else /* CAIRO_HAS_PDF_SURFACE */ +# error Cairo was not compiled with support for the pdf backend +#endif /* CAIRO_HAS_PDF_SURFACE */ + +#endif /* CAIRO_PDF_H */ diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-ps.h b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-ps.h new file mode 100755 index 00000000..33d0e0d9 --- /dev/null +++ b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-ps.h @@ -0,0 +1,116 @@ +/* cairo - a vector graphics library with display and print output + * + * Copyright © 2002 University of Southern California + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is University of Southern + * California. + * + * Contributor(s): + * Carl D. Worth + */ + +#ifndef CAIRO_PS_H +#define CAIRO_PS_H + +#include "cairo.h" + +#if CAIRO_HAS_PS_SURFACE + +#include + +CAIRO_BEGIN_DECLS + +/* PS-surface functions */ + +/** + * cairo_ps_level_t: + * @CAIRO_PS_LEVEL_2: The language level 2 of the PostScript specification. (Since 1.6) + * @CAIRO_PS_LEVEL_3: The language level 3 of the PostScript specification. (Since 1.6) + * + * #cairo_ps_level_t is used to describe the language level of the + * PostScript Language Reference that a generated PostScript file will + * conform to. + * + * Since: 1.6 + **/ +typedef enum _cairo_ps_level { + CAIRO_PS_LEVEL_2, + CAIRO_PS_LEVEL_3 +} cairo_ps_level_t; + +cairo_public cairo_surface_t * +cairo_ps_surface_create (const char *filename, + double width_in_points, + double height_in_points); + +cairo_public cairo_surface_t * +cairo_ps_surface_create_for_stream (cairo_write_func_t write_func, + void *closure, + double width_in_points, + double height_in_points); + +cairo_public void +cairo_ps_surface_restrict_to_level (cairo_surface_t *surface, + cairo_ps_level_t level); + +cairo_public void +cairo_ps_get_levels (cairo_ps_level_t const **levels, + int *num_levels); + +cairo_public const char * +cairo_ps_level_to_string (cairo_ps_level_t level); + +cairo_public void +cairo_ps_surface_set_eps (cairo_surface_t *surface, + cairo_bool_t eps); + +cairo_public cairo_bool_t +cairo_ps_surface_get_eps (cairo_surface_t *surface); + +cairo_public void +cairo_ps_surface_set_size (cairo_surface_t *surface, + double width_in_points, + double height_in_points); + +cairo_public void +cairo_ps_surface_dsc_comment (cairo_surface_t *surface, + const char *comment); + +cairo_public void +cairo_ps_surface_dsc_begin_setup (cairo_surface_t *surface); + +cairo_public void +cairo_ps_surface_dsc_begin_page_setup (cairo_surface_t *surface); + +CAIRO_END_DECLS + +#else /* CAIRO_HAS_PS_SURFACE */ +# error Cairo was not compiled with support for the ps backend +#endif /* CAIRO_HAS_PS_SURFACE */ + +#endif /* CAIRO_PS_H */ diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-quartz-image.h b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-quartz-image.h new file mode 100755 index 00000000..dae234da --- /dev/null +++ b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-quartz-image.h @@ -0,0 +1,59 @@ +/* cairo - a vector graphics library with display and print output + * + * Copyright © 2008 Mozilla Corporation + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is Mozilla Foundation. + * + * Contributor(s): + * Vladimir Vukicevic + */ + +#ifndef CAIRO_QUARTZ_IMAGE_H +#define CAIRO_QUARTZ_IMAGE_H + +#include "cairo.h" + +#if CAIRO_HAS_QUARTZ_IMAGE_SURFACE + +#include + +CAIRO_BEGIN_DECLS + +cairo_public cairo_surface_t * +cairo_quartz_image_surface_create (cairo_surface_t *image_surface); + +cairo_public cairo_surface_t * +cairo_quartz_image_surface_get_image (cairo_surface_t *surface); + +CAIRO_END_DECLS + +#else /* CAIRO_HAS_QUARTZ_IMAGE_SURFACE */ +# error Cairo was not compiled with support for the quartz-image backend +#endif /* CAIRO_HAS_QUARTZ_IMAGE_SURFACE */ + +#endif /* CAIRO_QUARTZ_IMAGE_H */ diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-quartz.h b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-quartz.h new file mode 100755 index 00000000..9be5f9ae --- /dev/null +++ b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-quartz.h @@ -0,0 +1,82 @@ +/* cairo - a vector graphics library with display and print output + * + * Copyright © 2006, 2007 Mozilla Corporation + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is Mozilla Foundation. + * + * Contributor(s): + * Vladimir Vukicevic + */ + +#ifndef CAIRO_QUARTZ_H +#define CAIRO_QUARTZ_H + +#include "cairo.h" + +#if CAIRO_HAS_QUARTZ_SURFACE + +#include + +CAIRO_BEGIN_DECLS + +cairo_public cairo_surface_t * +cairo_quartz_surface_create (cairo_format_t format, + unsigned int width, + unsigned int height); + +cairo_public cairo_surface_t * +cairo_quartz_surface_create_for_cg_context (CGContextRef cgContext, + unsigned int width, + unsigned int height); + +cairo_public CGContextRef +cairo_quartz_surface_get_cg_context (cairo_surface_t *surface); + +#if CAIRO_HAS_QUARTZ_FONT + +/* + * Quartz font support + */ + +cairo_public cairo_font_face_t * +cairo_quartz_font_face_create_for_cgfont (CGFontRef font); + +cairo_public cairo_font_face_t * +cairo_quartz_font_face_create_for_atsu_font_id (ATSUFontID font_id); + +#endif /* CAIRO_HAS_QUARTZ_FONT */ + +CAIRO_END_DECLS + +#else + +# error Cairo was not compiled with support for the quartz backend + +#endif /* CAIRO_HAS_QUARTZ_SURFACE */ + +#endif /* CAIRO_QUARTZ_H */ diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-script-interpreter.h b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-script-interpreter.h new file mode 100755 index 00000000..27fb9866 --- /dev/null +++ b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-script-interpreter.h @@ -0,0 +1,124 @@ +/* cairo - a vector graphics library with display and print output + * + * Copyright © 2008 Chris Wilson + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is Chris Wilson + * + * Contributor(s): + * Chris Wilson + */ + +#ifndef CAIRO_SCRIPT_INTERPRETER_H +#define CAIRO_SCRIPT_INTERPRETER_H + +#include +#include + +CAIRO_BEGIN_DECLS + +typedef struct _cairo_script_interpreter cairo_script_interpreter_t; + +/* XXX expose csi_dictionary_t and pass to hooks */ +typedef void +(*csi_destroy_func_t) (void *closure, + void *ptr); + +typedef cairo_surface_t * +(*csi_surface_create_func_t) (void *closure, + cairo_content_t content, + double width, + double height, + long uid); +typedef cairo_t * +(*csi_context_create_func_t) (void *closure, + cairo_surface_t *surface); +typedef void +(*csi_show_page_func_t) (void *closure, + cairo_t *cr); + +typedef void +(*csi_copy_page_func_t) (void *closure, + cairo_t *cr); + +typedef cairo_surface_t * +(*csi_create_source_image_t) (void *closure, + cairo_format_t format, + int width, int height, + long uid); + +typedef struct _cairo_script_interpreter_hooks { + void *closure; + csi_surface_create_func_t surface_create; + csi_destroy_func_t surface_destroy; + csi_context_create_func_t context_create; + csi_destroy_func_t context_destroy; + csi_show_page_func_t show_page; + csi_copy_page_func_t copy_page; + csi_create_source_image_t create_source_image; +} cairo_script_interpreter_hooks_t; + +cairo_public cairo_script_interpreter_t * +cairo_script_interpreter_create (void); + +cairo_public void +cairo_script_interpreter_install_hooks (cairo_script_interpreter_t *ctx, + const cairo_script_interpreter_hooks_t *hooks); + +cairo_public cairo_status_t +cairo_script_interpreter_run (cairo_script_interpreter_t *ctx, + const char *filename); + +cairo_public cairo_status_t +cairo_script_interpreter_feed_stream (cairo_script_interpreter_t *ctx, + FILE *stream); + +cairo_public cairo_status_t +cairo_script_interpreter_feed_string (cairo_script_interpreter_t *ctx, + const char *line, + int len); + +cairo_public unsigned int +cairo_script_interpreter_get_line_number (cairo_script_interpreter_t *ctx); + +cairo_public cairo_script_interpreter_t * +cairo_script_interpreter_reference (cairo_script_interpreter_t *ctx); + +cairo_public cairo_status_t +cairo_script_interpreter_finish (cairo_script_interpreter_t *ctx); + +cairo_public cairo_status_t +cairo_script_interpreter_destroy (cairo_script_interpreter_t *ctx); + +cairo_public cairo_status_t +cairo_script_interpreter_translate_stream (FILE *stream, + cairo_write_func_t write_func, + void *closure); + +CAIRO_END_DECLS + +#endif /*CAIRO_SCRIPT_INTERPRETER_H*/ diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-script.h b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-script.h new file mode 100755 index 00000000..b5a8cf32 --- /dev/null +++ b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-script.h @@ -0,0 +1,98 @@ +/* cairo - a vector graphics library with display and print output + * + * Copyright © 2008 Chris Wilson + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is Chris Wilson + * + * Contributor(s): + * Chris Wilson + */ + +#ifndef CAIRO_SCRIPT_H +#define CAIRO_SCRIPT_H + +#include "cairo.h" + +#if CAIRO_HAS_SCRIPT_SURFACE + +CAIRO_BEGIN_DECLS + +/** + * cairo_script_mode_t: + * @CAIRO_SCRIPT_MODE_ASCII: the output will be in readable text (default). (Since 1.12) + * @CAIRO_SCRIPT_MODE_BINARY: the output will use byte codes. (Since 1.12) + * + * A set of script output variants. + * + * Since: 1.12 + **/ +typedef enum { + CAIRO_SCRIPT_MODE_ASCII, + CAIRO_SCRIPT_MODE_BINARY +} cairo_script_mode_t; + +cairo_public cairo_device_t * +cairo_script_create (const char *filename); + +cairo_public cairo_device_t * +cairo_script_create_for_stream (cairo_write_func_t write_func, + void *closure); + +cairo_public void +cairo_script_write_comment (cairo_device_t *script, + const char *comment, + int len); + +cairo_public void +cairo_script_set_mode (cairo_device_t *script, + cairo_script_mode_t mode); + +cairo_public cairo_script_mode_t +cairo_script_get_mode (cairo_device_t *script); + +cairo_public cairo_surface_t * +cairo_script_surface_create (cairo_device_t *script, + cairo_content_t content, + double width, + double height); + +cairo_public cairo_surface_t * +cairo_script_surface_create_for_target (cairo_device_t *script, + cairo_surface_t *target); + +cairo_public cairo_status_t +cairo_script_from_recording_surface (cairo_device_t *script, + cairo_surface_t *recording_surface); + +CAIRO_END_DECLS + +#else /*CAIRO_HAS_SCRIPT_SURFACE*/ +# error Cairo was not compiled with support for the CairoScript backend +#endif /*CAIRO_HAS_SCRIPT_SURFACE*/ + +#endif /*CAIRO_SCRIPT_H*/ diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-svg.h b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-svg.h new file mode 100755 index 00000000..592c645f --- /dev/null +++ b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-svg.h @@ -0,0 +1,84 @@ +/* cairo - a vector graphics library with display and print output + * + * cairo-svg.h + * + * Copyright © 2005 Emmanuel Pacaud + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + */ + +#ifndef CAIRO_SVG_H +#define CAIRO_SVG_H + +#include "cairo.h" + +#if CAIRO_HAS_SVG_SURFACE + +CAIRO_BEGIN_DECLS + +/** + * cairo_svg_version_t: + * @CAIRO_SVG_VERSION_1_1: The version 1.1 of the SVG specification. (Since 1.2) + * @CAIRO_SVG_VERSION_1_2: The version 1.2 of the SVG specification. (Since 1.2) + * + * #cairo_svg_version_t is used to describe the version number of the SVG + * specification that a generated SVG file will conform to. + * + * Since: 1.2 + **/ +typedef enum _cairo_svg_version { + CAIRO_SVG_VERSION_1_1, + CAIRO_SVG_VERSION_1_2 +} cairo_svg_version_t; + +cairo_public cairo_surface_t * +cairo_svg_surface_create (const char *filename, + double width_in_points, + double height_in_points); + +cairo_public cairo_surface_t * +cairo_svg_surface_create_for_stream (cairo_write_func_t write_func, + void *closure, + double width_in_points, + double height_in_points); + +cairo_public void +cairo_svg_surface_restrict_to_version (cairo_surface_t *surface, + cairo_svg_version_t version); + +cairo_public void +cairo_svg_get_versions (cairo_svg_version_t const **versions, + int *num_versions); + +cairo_public const char * +cairo_svg_version_to_string (cairo_svg_version_t version); + +CAIRO_END_DECLS + +#else /* CAIRO_HAS_SVG_SURFACE */ +# error Cairo was not compiled with support for the svg backend +#endif /* CAIRO_HAS_SVG_SURFACE */ + +#endif /* CAIRO_SVG_H */ diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-tee.h b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-tee.h new file mode 100755 index 00000000..9125a3a4 --- /dev/null +++ b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-tee.h @@ -0,0 +1,66 @@ +/* cairo - a vector graphics library with display and print output + * + * Copyright © 2009 Chris Wilson + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is Chris Wilson + * + * Contributor(s): + * Chris Wilson + */ + +#ifndef CAIRO_TEE_H +#define CAIRO_TEE_H + +#include "cairo.h" + +#if CAIRO_HAS_TEE_SURFACE + +CAIRO_BEGIN_DECLS + +cairo_public cairo_surface_t * +cairo_tee_surface_create (cairo_surface_t *master); + +cairo_public void +cairo_tee_surface_add (cairo_surface_t *surface, + cairo_surface_t *target); + +cairo_public void +cairo_tee_surface_remove (cairo_surface_t *surface, + cairo_surface_t *target); + +cairo_public cairo_surface_t * +cairo_tee_surface_index (cairo_surface_t *surface, + unsigned int index); + +CAIRO_END_DECLS + +#else /*CAIRO_HAS_TEE_SURFACE*/ +# error Cairo was not compiled with support for the TEE backend +#endif /*CAIRO_HAS_TEE_SURFACE*/ + +#endif /*CAIRO_TEE_H*/ diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-version.h b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-version.h new file mode 100755 index 00000000..1f17dd6c --- /dev/null +++ b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo-version.h @@ -0,0 +1,8 @@ +#ifndef CAIRO_VERSION_H +#define CAIRO_VERSION_H + +#define CAIRO_VERSION_MAJOR 1 +#define CAIRO_VERSION_MINOR 14 +#define CAIRO_VERSION_MICRO 12 + +#endif diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo.h b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo.h new file mode 100755 index 00000000..3104d47e --- /dev/null +++ b/frameworks/cairosvg/dependencies/cairo/1.14.12/include/cairo/cairo.h @@ -0,0 +1,3153 @@ +/* cairo - a vector graphics library with display and print output + * + * Copyright © 2002 University of Southern California + * Copyright © 2005 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is University of Southern + * California. + * + * Contributor(s): + * Carl D. Worth + */ + +#ifndef CAIRO_H +#define CAIRO_H + +#include "cairo-version.h" +#include "cairo-features.h" +#include "cairo-deprecated.h" + +#ifdef __cplusplus +# define CAIRO_BEGIN_DECLS extern "C" { +# define CAIRO_END_DECLS } +#else +# define CAIRO_BEGIN_DECLS +# define CAIRO_END_DECLS +#endif + +#ifndef cairo_public +# if defined (_MSC_VER) && ! defined (CAIRO_WIN32_STATIC_BUILD) +# define cairo_public __declspec(dllimport) +# else +# define cairo_public +# endif +#endif + +CAIRO_BEGIN_DECLS + +#define CAIRO_VERSION_ENCODE(major, minor, micro) ( \ + ((major) * 10000) \ + + ((minor) * 100) \ + + ((micro) * 1)) + +#define CAIRO_VERSION CAIRO_VERSION_ENCODE( \ + CAIRO_VERSION_MAJOR, \ + CAIRO_VERSION_MINOR, \ + CAIRO_VERSION_MICRO) + + +#define CAIRO_VERSION_STRINGIZE_(major, minor, micro) \ + #major"."#minor"."#micro +#define CAIRO_VERSION_STRINGIZE(major, minor, micro) \ + CAIRO_VERSION_STRINGIZE_(major, minor, micro) + +#define CAIRO_VERSION_STRING CAIRO_VERSION_STRINGIZE( \ + CAIRO_VERSION_MAJOR, \ + CAIRO_VERSION_MINOR, \ + CAIRO_VERSION_MICRO) + + +cairo_public int +cairo_version (void); + +cairo_public const char* +cairo_version_string (void); + +/** + * cairo_bool_t: + * + * #cairo_bool_t is used for boolean values. Returns of type + * #cairo_bool_t will always be either 0 or 1, but testing against + * these values explicitly is not encouraged; just use the + * value as a boolean condition. + * + * + * if (cairo_in_stroke (cr, x, y)) { + * /* do something */ + * } + * + * + * Since: 1.0 + **/ +typedef int cairo_bool_t; + +/** + * cairo_t: + * + * A #cairo_t contains the current state of the rendering device, + * including coordinates of yet to be drawn shapes. + * + * Cairo contexts, as #cairo_t objects are named, are central to + * cairo and all drawing with cairo is always done to a #cairo_t + * object. + * + * Memory management of #cairo_t is done with + * cairo_reference() and cairo_destroy(). + * + * Since: 1.0 + **/ +typedef struct _cairo cairo_t; + +/** + * cairo_surface_t: + * + * A #cairo_surface_t represents an image, either as the destination + * of a drawing operation or as source when drawing onto another + * surface. To draw to a #cairo_surface_t, create a cairo context + * with the surface as the target, using cairo_create(). + * + * There are different subtypes of #cairo_surface_t for + * different drawing backends; for example, cairo_image_surface_create() + * creates a bitmap image in memory. + * The type of a surface can be queried with cairo_surface_get_type(). + * + * The initial contents of a surface after creation depend upon the manner + * of its creation. If cairo creates the surface and backing storage for + * the user, it will be initially cleared; for example, + * cairo_image_surface_create() and cairo_surface_create_similar(). + * Alternatively, if the user passes in a reference to some backing storage + * and asks cairo to wrap that in a #cairo_surface_t, then the contents are + * not modified; for example, cairo_image_surface_create_for_data() and + * cairo_xlib_surface_create(). + * + * Memory management of #cairo_surface_t is done with + * cairo_surface_reference() and cairo_surface_destroy(). + * + * Since: 1.0 + **/ +typedef struct _cairo_surface cairo_surface_t; + +/** + * cairo_device_t: + * + * A #cairo_device_t represents the driver interface for drawing + * operations to a #cairo_surface_t. There are different subtypes of + * #cairo_device_t for different drawing backends; for example, + * cairo_egl_device_create() creates a device that wraps an EGL display and + * context. + * + * The type of a device can be queried with cairo_device_get_type(). + * + * Memory management of #cairo_device_t is done with + * cairo_device_reference() and cairo_device_destroy(). + * + * Since: 1.10 + **/ +typedef struct _cairo_device cairo_device_t; + +/** + * cairo_matrix_t: + * @xx: xx component of the affine transformation + * @yx: yx component of the affine transformation + * @xy: xy component of the affine transformation + * @yy: yy component of the affine transformation + * @x0: X translation component of the affine transformation + * @y0: Y translation component of the affine transformation + * + * A #cairo_matrix_t holds an affine transformation, such as a scale, + * rotation, shear, or a combination of those. The transformation of + * a point (x, y) is given by: + * + * x_new = xx * x + xy * y + x0; + * y_new = yx * x + yy * y + y0; + * + * + * Since: 1.0 + **/ +typedef struct _cairo_matrix { + double xx; double yx; + double xy; double yy; + double x0; double y0; +} cairo_matrix_t; + +/** + * cairo_pattern_t: + * + * A #cairo_pattern_t represents a source when drawing onto a + * surface. There are different subtypes of #cairo_pattern_t, + * for different types of sources; for example, + * cairo_pattern_create_rgb() creates a pattern for a solid + * opaque color. + * + * Other than various + * cairo_pattern_create_type() + * functions, some of the pattern types can be implicitly created using various + * cairo_set_source_type() functions; + * for example cairo_set_source_rgb(). + * + * The type of a pattern can be queried with cairo_pattern_get_type(). + * + * Memory management of #cairo_pattern_t is done with + * cairo_pattern_reference() and cairo_pattern_destroy(). + * + * Since: 1.0 + **/ +typedef struct _cairo_pattern cairo_pattern_t; + +/** + * cairo_destroy_func_t: + * @data: The data element being destroyed. + * + * #cairo_destroy_func_t the type of function which is called when a + * data element is destroyed. It is passed the pointer to the data + * element and should free any memory and resources allocated for it. + * + * Since: 1.0 + **/ +typedef void (*cairo_destroy_func_t) (void *data); + +/** + * cairo_user_data_key_t: + * @unused: not used; ignore. + * + * #cairo_user_data_key_t is used for attaching user data to cairo + * data structures. The actual contents of the struct is never used, + * and there is no need to initialize the object; only the unique + * address of a #cairo_data_key_t object is used. Typically, you + * would just use the address of a static #cairo_data_key_t object. + * + * Since: 1.0 + **/ +typedef struct _cairo_user_data_key { + int unused; +} cairo_user_data_key_t; + +/** + * cairo_status_t: + * @CAIRO_STATUS_SUCCESS: no error has occurred (Since 1.0) + * @CAIRO_STATUS_NO_MEMORY: out of memory (Since 1.0) + * @CAIRO_STATUS_INVALID_RESTORE: cairo_restore() called without matching cairo_save() (Since 1.0) + * @CAIRO_STATUS_INVALID_POP_GROUP: no saved group to pop, i.e. cairo_pop_group() without matching cairo_push_group() (Since 1.0) + * @CAIRO_STATUS_NO_CURRENT_POINT: no current point defined (Since 1.0) + * @CAIRO_STATUS_INVALID_MATRIX: invalid matrix (not invertible) (Since 1.0) + * @CAIRO_STATUS_INVALID_STATUS: invalid value for an input #cairo_status_t (Since 1.0) + * @CAIRO_STATUS_NULL_POINTER: %NULL pointer (Since 1.0) + * @CAIRO_STATUS_INVALID_STRING: input string not valid UTF-8 (Since 1.0) + * @CAIRO_STATUS_INVALID_PATH_DATA: input path data not valid (Since 1.0) + * @CAIRO_STATUS_READ_ERROR: error while reading from input stream (Since 1.0) + * @CAIRO_STATUS_WRITE_ERROR: error while writing to output stream (Since 1.0) + * @CAIRO_STATUS_SURFACE_FINISHED: target surface has been finished (Since 1.0) + * @CAIRO_STATUS_SURFACE_TYPE_MISMATCH: the surface type is not appropriate for the operation (Since 1.0) + * @CAIRO_STATUS_PATTERN_TYPE_MISMATCH: the pattern type is not appropriate for the operation (Since 1.0) + * @CAIRO_STATUS_INVALID_CONTENT: invalid value for an input #cairo_content_t (Since 1.0) + * @CAIRO_STATUS_INVALID_FORMAT: invalid value for an input #cairo_format_t (Since 1.0) + * @CAIRO_STATUS_INVALID_VISUAL: invalid value for an input Visual* (Since 1.0) + * @CAIRO_STATUS_FILE_NOT_FOUND: file not found (Since 1.0) + * @CAIRO_STATUS_INVALID_DASH: invalid value for a dash setting (Since 1.0) + * @CAIRO_STATUS_INVALID_DSC_COMMENT: invalid value for a DSC comment (Since 1.2) + * @CAIRO_STATUS_INVALID_INDEX: invalid index passed to getter (Since 1.4) + * @CAIRO_STATUS_CLIP_NOT_REPRESENTABLE: clip region not representable in desired format (Since 1.4) + * @CAIRO_STATUS_TEMP_FILE_ERROR: error creating or writing to a temporary file (Since 1.6) + * @CAIRO_STATUS_INVALID_STRIDE: invalid value for stride (Since 1.6) + * @CAIRO_STATUS_FONT_TYPE_MISMATCH: the font type is not appropriate for the operation (Since 1.8) + * @CAIRO_STATUS_USER_FONT_IMMUTABLE: the user-font is immutable (Since 1.8) + * @CAIRO_STATUS_USER_FONT_ERROR: error occurred in a user-font callback function (Since 1.8) + * @CAIRO_STATUS_NEGATIVE_COUNT: negative number used where it is not allowed (Since 1.8) + * @CAIRO_STATUS_INVALID_CLUSTERS: input clusters do not represent the accompanying text and glyph array (Since 1.8) + * @CAIRO_STATUS_INVALID_SLANT: invalid value for an input #cairo_font_slant_t (Since 1.8) + * @CAIRO_STATUS_INVALID_WEIGHT: invalid value for an input #cairo_font_weight_t (Since 1.8) + * @CAIRO_STATUS_INVALID_SIZE: invalid value (typically too big) for the size of the input (surface, pattern, etc.) (Since 1.10) + * @CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED: user-font method not implemented (Since 1.10) + * @CAIRO_STATUS_DEVICE_TYPE_MISMATCH: the device type is not appropriate for the operation (Since 1.10) + * @CAIRO_STATUS_DEVICE_ERROR: an operation to the device caused an unspecified error (Since 1.10) + * @CAIRO_STATUS_INVALID_MESH_CONSTRUCTION: a mesh pattern + * construction operation was used outside of a + * cairo_mesh_pattern_begin_patch()/cairo_mesh_pattern_end_patch() + * pair (Since 1.12) + * @CAIRO_STATUS_DEVICE_FINISHED: target device has been finished (Since 1.12) + * @CAIRO_STATUS_JBIG2_GLOBAL_MISSING: %CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID has been used on at least one image + * but no image provided %CAIRO_MIME_TYPE_JBIG2_GLOBAL (Since 1.14) + * @CAIRO_STATUS_LAST_STATUS: this is a special value indicating the number of + * status values defined in this enumeration. When using this value, note + * that the version of cairo at run-time may have additional status values + * defined than the value of this symbol at compile-time. (Since 1.10) + * + * #cairo_status_t is used to indicate errors that can occur when + * using Cairo. In some cases it is returned directly by functions. + * but when using #cairo_t, the last error, if any, is stored in + * the context and can be retrieved with cairo_status(). + * + * New entries may be added in future versions. Use cairo_status_to_string() + * to get a human-readable representation of an error message. + * + * Since: 1.0 + **/ +typedef enum _cairo_status { + CAIRO_STATUS_SUCCESS = 0, + + CAIRO_STATUS_NO_MEMORY, + CAIRO_STATUS_INVALID_RESTORE, + CAIRO_STATUS_INVALID_POP_GROUP, + CAIRO_STATUS_NO_CURRENT_POINT, + CAIRO_STATUS_INVALID_MATRIX, + CAIRO_STATUS_INVALID_STATUS, + CAIRO_STATUS_NULL_POINTER, + CAIRO_STATUS_INVALID_STRING, + CAIRO_STATUS_INVALID_PATH_DATA, + CAIRO_STATUS_READ_ERROR, + CAIRO_STATUS_WRITE_ERROR, + CAIRO_STATUS_SURFACE_FINISHED, + CAIRO_STATUS_SURFACE_TYPE_MISMATCH, + CAIRO_STATUS_PATTERN_TYPE_MISMATCH, + CAIRO_STATUS_INVALID_CONTENT, + CAIRO_STATUS_INVALID_FORMAT, + CAIRO_STATUS_INVALID_VISUAL, + CAIRO_STATUS_FILE_NOT_FOUND, + CAIRO_STATUS_INVALID_DASH, + CAIRO_STATUS_INVALID_DSC_COMMENT, + CAIRO_STATUS_INVALID_INDEX, + CAIRO_STATUS_CLIP_NOT_REPRESENTABLE, + CAIRO_STATUS_TEMP_FILE_ERROR, + CAIRO_STATUS_INVALID_STRIDE, + CAIRO_STATUS_FONT_TYPE_MISMATCH, + CAIRO_STATUS_USER_FONT_IMMUTABLE, + CAIRO_STATUS_USER_FONT_ERROR, + CAIRO_STATUS_NEGATIVE_COUNT, + CAIRO_STATUS_INVALID_CLUSTERS, + CAIRO_STATUS_INVALID_SLANT, + CAIRO_STATUS_INVALID_WEIGHT, + CAIRO_STATUS_INVALID_SIZE, + CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED, + CAIRO_STATUS_DEVICE_TYPE_MISMATCH, + CAIRO_STATUS_DEVICE_ERROR, + CAIRO_STATUS_INVALID_MESH_CONSTRUCTION, + CAIRO_STATUS_DEVICE_FINISHED, + CAIRO_STATUS_JBIG2_GLOBAL_MISSING, + + CAIRO_STATUS_LAST_STATUS +} cairo_status_t; + +/** + * cairo_content_t: + * @CAIRO_CONTENT_COLOR: The surface will hold color content only. (Since 1.0) + * @CAIRO_CONTENT_ALPHA: The surface will hold alpha content only. (Since 1.0) + * @CAIRO_CONTENT_COLOR_ALPHA: The surface will hold color and alpha content. (Since 1.0) + * + * #cairo_content_t is used to describe the content that a surface will + * contain, whether color information, alpha information (translucence + * vs. opacity), or both. + * + * Note: The large values here are designed to keep #cairo_content_t + * values distinct from #cairo_format_t values so that the + * implementation can detect the error if users confuse the two types. + * + * Since: 1.0 + **/ +typedef enum _cairo_content { + CAIRO_CONTENT_COLOR = 0x1000, + CAIRO_CONTENT_ALPHA = 0x2000, + CAIRO_CONTENT_COLOR_ALPHA = 0x3000 +} cairo_content_t; + +/** + * cairo_format_t: + * @CAIRO_FORMAT_INVALID: no such format exists or is supported. + * @CAIRO_FORMAT_ARGB32: each pixel is a 32-bit quantity, with + * alpha in the upper 8 bits, then red, then green, then blue. + * The 32-bit quantities are stored native-endian. Pre-multiplied + * alpha is used. (That is, 50% transparent red is 0x80800000, + * not 0x80ff0000.) (Since 1.0) + * @CAIRO_FORMAT_RGB24: each pixel is a 32-bit quantity, with + * the upper 8 bits unused. Red, Green, and Blue are stored + * in the remaining 24 bits in that order. (Since 1.0) + * @CAIRO_FORMAT_A8: each pixel is a 8-bit quantity holding + * an alpha value. (Since 1.0) + * @CAIRO_FORMAT_A1: each pixel is a 1-bit quantity holding + * an alpha value. Pixels are packed together into 32-bit + * quantities. The ordering of the bits matches the + * endianess of the platform. On a big-endian machine, the + * first pixel is in the uppermost bit, on a little-endian + * machine the first pixel is in the least-significant bit. (Since 1.0) + * @CAIRO_FORMAT_RGB16_565: each pixel is a 16-bit quantity + * with red in the upper 5 bits, then green in the middle + * 6 bits, and blue in the lower 5 bits. (Since 1.2) + * @CAIRO_FORMAT_RGB30: like RGB24 but with 10bpc. (Since 1.12) + * + * #cairo_format_t is used to identify the memory format of + * image data. + * + * New entries may be added in future versions. + * + * Since: 1.0 + **/ +typedef enum _cairo_format { + CAIRO_FORMAT_INVALID = -1, + CAIRO_FORMAT_ARGB32 = 0, + CAIRO_FORMAT_RGB24 = 1, + CAIRO_FORMAT_A8 = 2, + CAIRO_FORMAT_A1 = 3, + CAIRO_FORMAT_RGB16_565 = 4, + CAIRO_FORMAT_RGB30 = 5 +} cairo_format_t; + + +/** + * cairo_write_func_t: + * @closure: the output closure + * @data: the buffer containing the data to write + * @length: the amount of data to write + * + * #cairo_write_func_t is the type of function which is called when a + * backend needs to write data to an output stream. It is passed the + * closure which was specified by the user at the time the write + * function was registered, the data to write and the length of the + * data in bytes. The write function should return + * %CAIRO_STATUS_SUCCESS if all the data was successfully written, + * %CAIRO_STATUS_WRITE_ERROR otherwise. + * + * Returns: the status code of the write operation + * + * Since: 1.0 + **/ +typedef cairo_status_t (*cairo_write_func_t) (void *closure, + const unsigned char *data, + unsigned int length); + +/** + * cairo_read_func_t: + * @closure: the input closure + * @data: the buffer into which to read the data + * @length: the amount of data to read + * + * #cairo_read_func_t is the type of function which is called when a + * backend needs to read data from an input stream. It is passed the + * closure which was specified by the user at the time the read + * function was registered, the buffer to read the data into and the + * length of the data in bytes. The read function should return + * %CAIRO_STATUS_SUCCESS if all the data was successfully read, + * %CAIRO_STATUS_READ_ERROR otherwise. + * + * Returns: the status code of the read operation + * + * Since: 1.0 + **/ +typedef cairo_status_t (*cairo_read_func_t) (void *closure, + unsigned char *data, + unsigned int length); + +/** + * cairo_rectangle_int_t: + * @x: X coordinate of the left side of the rectangle + * @y: Y coordinate of the the top side of the rectangle + * @width: width of the rectangle + * @height: height of the rectangle + * + * A data structure for holding a rectangle with integer coordinates. + * + * Since: 1.10 + **/ + +typedef struct _cairo_rectangle_int { + int x, y; + int width, height; +} cairo_rectangle_int_t; + + +/* Functions for manipulating state objects */ +cairo_public cairo_t * +cairo_create (cairo_surface_t *target); + +cairo_public cairo_t * +cairo_reference (cairo_t *cr); + +cairo_public void +cairo_destroy (cairo_t *cr); + +cairo_public unsigned int +cairo_get_reference_count (cairo_t *cr); + +cairo_public void * +cairo_get_user_data (cairo_t *cr, + const cairo_user_data_key_t *key); + +cairo_public cairo_status_t +cairo_set_user_data (cairo_t *cr, + const cairo_user_data_key_t *key, + void *user_data, + cairo_destroy_func_t destroy); + +cairo_public void +cairo_save (cairo_t *cr); + +cairo_public void +cairo_restore (cairo_t *cr); + +cairo_public void +cairo_push_group (cairo_t *cr); + +cairo_public void +cairo_push_group_with_content (cairo_t *cr, cairo_content_t content); + +cairo_public cairo_pattern_t * +cairo_pop_group (cairo_t *cr); + +cairo_public void +cairo_pop_group_to_source (cairo_t *cr); + +/* Modify state */ + +/** + * cairo_operator_t: + * @CAIRO_OPERATOR_CLEAR: clear destination layer (bounded) (Since 1.0) + * @CAIRO_OPERATOR_SOURCE: replace destination layer (bounded) (Since 1.0) + * @CAIRO_OPERATOR_OVER: draw source layer on top of destination layer + * (bounded) (Since 1.0) + * @CAIRO_OPERATOR_IN: draw source where there was destination content + * (unbounded) (Since 1.0) + * @CAIRO_OPERATOR_OUT: draw source where there was no destination + * content (unbounded) (Since 1.0) + * @CAIRO_OPERATOR_ATOP: draw source on top of destination content and + * only there (Since 1.0) + * @CAIRO_OPERATOR_DEST: ignore the source (Since 1.0) + * @CAIRO_OPERATOR_DEST_OVER: draw destination on top of source (Since 1.0) + * @CAIRO_OPERATOR_DEST_IN: leave destination only where there was + * source content (unbounded) (Since 1.0) + * @CAIRO_OPERATOR_DEST_OUT: leave destination only where there was no + * source content (Since 1.0) + * @CAIRO_OPERATOR_DEST_ATOP: leave destination on top of source content + * and only there (unbounded) (Since 1.0) + * @CAIRO_OPERATOR_XOR: source and destination are shown where there is only + * one of them (Since 1.0) + * @CAIRO_OPERATOR_ADD: source and destination layers are accumulated (Since 1.0) + * @CAIRO_OPERATOR_SATURATE: like over, but assuming source and dest are + * disjoint geometries (Since 1.0) + * @CAIRO_OPERATOR_MULTIPLY: source and destination layers are multiplied. + * This causes the result to be at least as dark as the darker inputs. (Since 1.10) + * @CAIRO_OPERATOR_SCREEN: source and destination are complemented and + * multiplied. This causes the result to be at least as light as the lighter + * inputs. (Since 1.10) + * @CAIRO_OPERATOR_OVERLAY: multiplies or screens, depending on the + * lightness of the destination color. (Since 1.10) + * @CAIRO_OPERATOR_DARKEN: replaces the destination with the source if it + * is darker, otherwise keeps the source. (Since 1.10) + * @CAIRO_OPERATOR_LIGHTEN: replaces the destination with the source if it + * is lighter, otherwise keeps the source. (Since 1.10) + * @CAIRO_OPERATOR_COLOR_DODGE: brightens the destination color to reflect + * the source color. (Since 1.10) + * @CAIRO_OPERATOR_COLOR_BURN: darkens the destination color to reflect + * the source color. (Since 1.10) + * @CAIRO_OPERATOR_HARD_LIGHT: Multiplies or screens, dependent on source + * color. (Since 1.10) + * @CAIRO_OPERATOR_SOFT_LIGHT: Darkens or lightens, dependent on source + * color. (Since 1.10) + * @CAIRO_OPERATOR_DIFFERENCE: Takes the difference of the source and + * destination color. (Since 1.10) + * @CAIRO_OPERATOR_EXCLUSION: Produces an effect similar to difference, but + * with lower contrast. (Since 1.10) + * @CAIRO_OPERATOR_HSL_HUE: Creates a color with the hue of the source + * and the saturation and luminosity of the target. (Since 1.10) + * @CAIRO_OPERATOR_HSL_SATURATION: Creates a color with the saturation + * of the source and the hue and luminosity of the target. Painting with + * this mode onto a gray area produces no change. (Since 1.10) + * @CAIRO_OPERATOR_HSL_COLOR: Creates a color with the hue and saturation + * of the source and the luminosity of the target. This preserves the gray + * levels of the target and is useful for coloring monochrome images or + * tinting color images. (Since 1.10) + * @CAIRO_OPERATOR_HSL_LUMINOSITY: Creates a color with the luminosity of + * the source and the hue and saturation of the target. This produces an + * inverse effect to @CAIRO_OPERATOR_HSL_COLOR. (Since 1.10) + * + * #cairo_operator_t is used to set the compositing operator for all cairo + * drawing operations. + * + * The default operator is %CAIRO_OPERATOR_OVER. + * + * The operators marked as unbounded modify their + * destination even outside of the mask layer (that is, their effect is not + * bound by the mask layer). However, their effect can still be limited by + * way of clipping. + * + * To keep things simple, the operator descriptions here + * document the behavior for when both source and destination are either fully + * transparent or fully opaque. The actual implementation works for + * translucent layers too. + * For a more detailed explanation of the effects of each operator, including + * the mathematical definitions, see + * http://cairographics.org/operators/. + * + * Since: 1.0 + **/ +typedef enum _cairo_operator { + CAIRO_OPERATOR_CLEAR, + + CAIRO_OPERATOR_SOURCE, + CAIRO_OPERATOR_OVER, + CAIRO_OPERATOR_IN, + CAIRO_OPERATOR_OUT, + CAIRO_OPERATOR_ATOP, + + CAIRO_OPERATOR_DEST, + CAIRO_OPERATOR_DEST_OVER, + CAIRO_OPERATOR_DEST_IN, + CAIRO_OPERATOR_DEST_OUT, + CAIRO_OPERATOR_DEST_ATOP, + + CAIRO_OPERATOR_XOR, + CAIRO_OPERATOR_ADD, + CAIRO_OPERATOR_SATURATE, + + CAIRO_OPERATOR_MULTIPLY, + CAIRO_OPERATOR_SCREEN, + CAIRO_OPERATOR_OVERLAY, + CAIRO_OPERATOR_DARKEN, + CAIRO_OPERATOR_LIGHTEN, + CAIRO_OPERATOR_COLOR_DODGE, + CAIRO_OPERATOR_COLOR_BURN, + CAIRO_OPERATOR_HARD_LIGHT, + CAIRO_OPERATOR_SOFT_LIGHT, + CAIRO_OPERATOR_DIFFERENCE, + CAIRO_OPERATOR_EXCLUSION, + CAIRO_OPERATOR_HSL_HUE, + CAIRO_OPERATOR_HSL_SATURATION, + CAIRO_OPERATOR_HSL_COLOR, + CAIRO_OPERATOR_HSL_LUMINOSITY +} cairo_operator_t; + +cairo_public void +cairo_set_operator (cairo_t *cr, cairo_operator_t op); + +cairo_public void +cairo_set_source (cairo_t *cr, cairo_pattern_t *source); + +cairo_public void +cairo_set_source_rgb (cairo_t *cr, double red, double green, double blue); + +cairo_public void +cairo_set_source_rgba (cairo_t *cr, + double red, double green, double blue, + double alpha); + +cairo_public void +cairo_set_source_surface (cairo_t *cr, + cairo_surface_t *surface, + double x, + double y); + +cairo_public void +cairo_set_tolerance (cairo_t *cr, double tolerance); + +/** + * cairo_antialias_t: + * @CAIRO_ANTIALIAS_DEFAULT: Use the default antialiasing for + * the subsystem and target device, since 1.0 + * @CAIRO_ANTIALIAS_NONE: Use a bilevel alpha mask, since 1.0 + * @CAIRO_ANTIALIAS_GRAY: Perform single-color antialiasing (using + * shades of gray for black text on a white background, for example), since 1.0 + * @CAIRO_ANTIALIAS_SUBPIXEL: Perform antialiasing by taking + * advantage of the order of subpixel elements on devices + * such as LCD panels, since 1.0 + * @CAIRO_ANTIALIAS_FAST: Hint that the backend should perform some + * antialiasing but prefer speed over quality, since 1.12 + * @CAIRO_ANTIALIAS_GOOD: The backend should balance quality against + * performance, since 1.12 + * @CAIRO_ANTIALIAS_BEST: Hint that the backend should render at the highest + * quality, sacrificing speed if necessary, since 1.12 + * + * Specifies the type of antialiasing to do when rendering text or shapes. + * + * As it is not necessarily clear from the above what advantages a particular + * antialias method provides, since 1.12, there is also a set of hints: + * @CAIRO_ANTIALIAS_FAST: Allow the backend to degrade raster quality for speed + * @CAIRO_ANTIALIAS_GOOD: A balance between speed and quality + * @CAIRO_ANTIALIAS_BEST: A high-fidelity, but potentially slow, raster mode + * + * These make no guarantee on how the backend will perform its rasterisation + * (if it even rasterises!), nor that they have any differing effect other + * than to enable some form of antialiasing. In the case of glyph rendering, + * @CAIRO_ANTIALIAS_FAST and @CAIRO_ANTIALIAS_GOOD will be mapped to + * @CAIRO_ANTIALIAS_GRAY, with @CAIRO_ANTALIAS_BEST being equivalent to + * @CAIRO_ANTIALIAS_SUBPIXEL. + * + * The interpretation of @CAIRO_ANTIALIAS_DEFAULT is left entirely up to + * the backend, typically this will be similar to @CAIRO_ANTIALIAS_GOOD. + * + * Since: 1.0 + **/ +typedef enum _cairo_antialias { + CAIRO_ANTIALIAS_DEFAULT, + + /* method */ + CAIRO_ANTIALIAS_NONE, + CAIRO_ANTIALIAS_GRAY, + CAIRO_ANTIALIAS_SUBPIXEL, + + /* hints */ + CAIRO_ANTIALIAS_FAST, + CAIRO_ANTIALIAS_GOOD, + CAIRO_ANTIALIAS_BEST +} cairo_antialias_t; + +cairo_public void +cairo_set_antialias (cairo_t *cr, cairo_antialias_t antialias); + +/** + * cairo_fill_rule_t: + * @CAIRO_FILL_RULE_WINDING: If the path crosses the ray from + * left-to-right, counts +1. If the path crosses the ray + * from right to left, counts -1. (Left and right are determined + * from the perspective of looking along the ray from the starting + * point.) If the total count is non-zero, the point will be filled. (Since 1.0) + * @CAIRO_FILL_RULE_EVEN_ODD: Counts the total number of + * intersections, without regard to the orientation of the contour. If + * the total number of intersections is odd, the point will be + * filled. (Since 1.0) + * + * #cairo_fill_rule_t is used to select how paths are filled. For both + * fill rules, whether or not a point is included in the fill is + * determined by taking a ray from that point to infinity and looking + * at intersections with the path. The ray can be in any direction, + * as long as it doesn't pass through the end point of a segment + * or have a tricky intersection such as intersecting tangent to the path. + * (Note that filling is not actually implemented in this way. This + * is just a description of the rule that is applied.) + * + * The default fill rule is %CAIRO_FILL_RULE_WINDING. + * + * New entries may be added in future versions. + * + * Since: 1.0 + **/ +typedef enum _cairo_fill_rule { + CAIRO_FILL_RULE_WINDING, + CAIRO_FILL_RULE_EVEN_ODD +} cairo_fill_rule_t; + +cairo_public void +cairo_set_fill_rule (cairo_t *cr, cairo_fill_rule_t fill_rule); + +cairo_public void +cairo_set_line_width (cairo_t *cr, double width); + +/** + * cairo_line_cap_t: + * @CAIRO_LINE_CAP_BUTT: start(stop) the line exactly at the start(end) point (Since 1.0) + * @CAIRO_LINE_CAP_ROUND: use a round ending, the center of the circle is the end point (Since 1.0) + * @CAIRO_LINE_CAP_SQUARE: use squared ending, the center of the square is the end point (Since 1.0) + * + * Specifies how to render the endpoints of the path when stroking. + * + * The default line cap style is %CAIRO_LINE_CAP_BUTT. + * + * Since: 1.0 + **/ +typedef enum _cairo_line_cap { + CAIRO_LINE_CAP_BUTT, + CAIRO_LINE_CAP_ROUND, + CAIRO_LINE_CAP_SQUARE +} cairo_line_cap_t; + +cairo_public void +cairo_set_line_cap (cairo_t *cr, cairo_line_cap_t line_cap); + +/** + * cairo_line_join_t: + * @CAIRO_LINE_JOIN_MITER: use a sharp (angled) corner, see + * cairo_set_miter_limit() (Since 1.0) + * @CAIRO_LINE_JOIN_ROUND: use a rounded join, the center of the circle is the + * joint point (Since 1.0) + * @CAIRO_LINE_JOIN_BEVEL: use a cut-off join, the join is cut off at half + * the line width from the joint point (Since 1.0) + * + * Specifies how to render the junction of two lines when stroking. + * + * The default line join style is %CAIRO_LINE_JOIN_MITER. + * + * Since: 1.0 + **/ +typedef enum _cairo_line_join { + CAIRO_LINE_JOIN_MITER, + CAIRO_LINE_JOIN_ROUND, + CAIRO_LINE_JOIN_BEVEL +} cairo_line_join_t; + +cairo_public void +cairo_set_line_join (cairo_t *cr, cairo_line_join_t line_join); + +cairo_public void +cairo_set_dash (cairo_t *cr, + const double *dashes, + int num_dashes, + double offset); + +cairo_public void +cairo_set_miter_limit (cairo_t *cr, double limit); + +cairo_public void +cairo_translate (cairo_t *cr, double tx, double ty); + +cairo_public void +cairo_scale (cairo_t *cr, double sx, double sy); + +cairo_public void +cairo_rotate (cairo_t *cr, double angle); + +cairo_public void +cairo_transform (cairo_t *cr, + const cairo_matrix_t *matrix); + +cairo_public void +cairo_set_matrix (cairo_t *cr, + const cairo_matrix_t *matrix); + +cairo_public void +cairo_identity_matrix (cairo_t *cr); + +cairo_public void +cairo_user_to_device (cairo_t *cr, double *x, double *y); + +cairo_public void +cairo_user_to_device_distance (cairo_t *cr, double *dx, double *dy); + +cairo_public void +cairo_device_to_user (cairo_t *cr, double *x, double *y); + +cairo_public void +cairo_device_to_user_distance (cairo_t *cr, double *dx, double *dy); + +/* Path creation functions */ +cairo_public void +cairo_new_path (cairo_t *cr); + +cairo_public void +cairo_move_to (cairo_t *cr, double x, double y); + +cairo_public void +cairo_new_sub_path (cairo_t *cr); + +cairo_public void +cairo_line_to (cairo_t *cr, double x, double y); + +cairo_public void +cairo_curve_to (cairo_t *cr, + double x1, double y1, + double x2, double y2, + double x3, double y3); + +cairo_public void +cairo_arc (cairo_t *cr, + double xc, double yc, + double radius, + double angle1, double angle2); + +cairo_public void +cairo_arc_negative (cairo_t *cr, + double xc, double yc, + double radius, + double angle1, double angle2); + +/* XXX: NYI +cairo_public void +cairo_arc_to (cairo_t *cr, + double x1, double y1, + double x2, double y2, + double radius); +*/ + +cairo_public void +cairo_rel_move_to (cairo_t *cr, double dx, double dy); + +cairo_public void +cairo_rel_line_to (cairo_t *cr, double dx, double dy); + +cairo_public void +cairo_rel_curve_to (cairo_t *cr, + double dx1, double dy1, + double dx2, double dy2, + double dx3, double dy3); + +cairo_public void +cairo_rectangle (cairo_t *cr, + double x, double y, + double width, double height); + +/* XXX: NYI +cairo_public void +cairo_stroke_to_path (cairo_t *cr); +*/ + +cairo_public void +cairo_close_path (cairo_t *cr); + +cairo_public void +cairo_path_extents (cairo_t *cr, + double *x1, double *y1, + double *x2, double *y2); + +/* Painting functions */ +cairo_public void +cairo_paint (cairo_t *cr); + +cairo_public void +cairo_paint_with_alpha (cairo_t *cr, + double alpha); + +cairo_public void +cairo_mask (cairo_t *cr, + cairo_pattern_t *pattern); + +cairo_public void +cairo_mask_surface (cairo_t *cr, + cairo_surface_t *surface, + double surface_x, + double surface_y); + +cairo_public void +cairo_stroke (cairo_t *cr); + +cairo_public void +cairo_stroke_preserve (cairo_t *cr); + +cairo_public void +cairo_fill (cairo_t *cr); + +cairo_public void +cairo_fill_preserve (cairo_t *cr); + +cairo_public void +cairo_copy_page (cairo_t *cr); + +cairo_public void +cairo_show_page (cairo_t *cr); + +/* Insideness testing */ +cairo_public cairo_bool_t +cairo_in_stroke (cairo_t *cr, double x, double y); + +cairo_public cairo_bool_t +cairo_in_fill (cairo_t *cr, double x, double y); + +cairo_public cairo_bool_t +cairo_in_clip (cairo_t *cr, double x, double y); + +/* Rectangular extents */ +cairo_public void +cairo_stroke_extents (cairo_t *cr, + double *x1, double *y1, + double *x2, double *y2); + +cairo_public void +cairo_fill_extents (cairo_t *cr, + double *x1, double *y1, + double *x2, double *y2); + +/* Clipping */ +cairo_public void +cairo_reset_clip (cairo_t *cr); + +cairo_public void +cairo_clip (cairo_t *cr); + +cairo_public void +cairo_clip_preserve (cairo_t *cr); + +cairo_public void +cairo_clip_extents (cairo_t *cr, + double *x1, double *y1, + double *x2, double *y2); + +/** + * cairo_rectangle_t: + * @x: X coordinate of the left side of the rectangle + * @y: Y coordinate of the the top side of the rectangle + * @width: width of the rectangle + * @height: height of the rectangle + * + * A data structure for holding a rectangle. + * + * Since: 1.4 + **/ +typedef struct _cairo_rectangle { + double x, y, width, height; +} cairo_rectangle_t; + +/** + * cairo_rectangle_list_t: + * @status: Error status of the rectangle list + * @rectangles: Array containing the rectangles + * @num_rectangles: Number of rectangles in this list + * + * A data structure for holding a dynamically allocated + * array of rectangles. + * + * Since: 1.4 + **/ +typedef struct _cairo_rectangle_list { + cairo_status_t status; + cairo_rectangle_t *rectangles; + int num_rectangles; +} cairo_rectangle_list_t; + +cairo_public cairo_rectangle_list_t * +cairo_copy_clip_rectangle_list (cairo_t *cr); + +cairo_public void +cairo_rectangle_list_destroy (cairo_rectangle_list_t *rectangle_list); + +/* Font/Text functions */ + +/** + * cairo_scaled_font_t: + * + * A #cairo_scaled_font_t is a font scaled to a particular size and device + * resolution. A #cairo_scaled_font_t is most useful for low-level font + * usage where a library or application wants to cache a reference + * to a scaled font to speed up the computation of metrics. + * + * There are various types of scaled fonts, depending on the + * font backend they use. The type of a + * scaled font can be queried using cairo_scaled_font_get_type(). + * + * Memory management of #cairo_scaled_font_t is done with + * cairo_scaled_font_reference() and cairo_scaled_font_destroy(). + * + * Since: 1.0 + **/ +typedef struct _cairo_scaled_font cairo_scaled_font_t; + +/** + * cairo_font_face_t: + * + * A #cairo_font_face_t specifies all aspects of a font other + * than the size or font matrix (a font matrix is used to distort + * a font by sheering it or scaling it unequally in the two + * directions) . A font face can be set on a #cairo_t by using + * cairo_set_font_face(); the size and font matrix are set with + * cairo_set_font_size() and cairo_set_font_matrix(). + * + * There are various types of font faces, depending on the + * font backend they use. The type of a + * font face can be queried using cairo_font_face_get_type(). + * + * Memory management of #cairo_font_face_t is done with + * cairo_font_face_reference() and cairo_font_face_destroy(). + * + * Since: 1.0 + **/ +typedef struct _cairo_font_face cairo_font_face_t; + +/** + * cairo_glyph_t: + * @index: glyph index in the font. The exact interpretation of the + * glyph index depends on the font technology being used. + * @x: the offset in the X direction between the origin used for + * drawing or measuring the string and the origin of this glyph. + * @y: the offset in the Y direction between the origin used for + * drawing or measuring the string and the origin of this glyph. + * + * The #cairo_glyph_t structure holds information about a single glyph + * when drawing or measuring text. A font is (in simple terms) a + * collection of shapes used to draw text. A glyph is one of these + * shapes. There can be multiple glyphs for a single character + * (alternates to be used in different contexts, for example), or a + * glyph can be a ligature of multiple + * characters. Cairo doesn't expose any way of converting input text + * into glyphs, so in order to use the Cairo interfaces that take + * arrays of glyphs, you must directly access the appropriate + * underlying font system. + * + * Note that the offsets given by @x and @y are not cumulative. When + * drawing or measuring text, each glyph is individually positioned + * with respect to the overall origin + * + * Since: 1.0 + **/ +typedef struct { + unsigned long index; + double x; + double y; +} cairo_glyph_t; + +cairo_public cairo_glyph_t * +cairo_glyph_allocate (int num_glyphs); + +cairo_public void +cairo_glyph_free (cairo_glyph_t *glyphs); + +/** + * cairo_text_cluster_t: + * @num_bytes: the number of bytes of UTF-8 text covered by cluster + * @num_glyphs: the number of glyphs covered by cluster + * + * The #cairo_text_cluster_t structure holds information about a single + * text cluster. A text cluster is a minimal + * mapping of some glyphs corresponding to some UTF-8 text. + * + * For a cluster to be valid, both @num_bytes and @num_glyphs should + * be non-negative, and at least one should be non-zero. + * Note that clusters with zero glyphs are not as well supported as + * normal clusters. For example, PDF rendering applications typically + * ignore those clusters when PDF text is being selected. + * + * See cairo_show_text_glyphs() for how clusters are used in advanced + * text operations. + * + * Since: 1.8 + **/ +typedef struct { + int num_bytes; + int num_glyphs; +} cairo_text_cluster_t; + +cairo_public cairo_text_cluster_t * +cairo_text_cluster_allocate (int num_clusters); + +cairo_public void +cairo_text_cluster_free (cairo_text_cluster_t *clusters); + +/** + * cairo_text_cluster_flags_t: + * @CAIRO_TEXT_CLUSTER_FLAG_BACKWARD: The clusters in the cluster array + * map to glyphs in the glyph array from end to start. (Since 1.8) + * + * Specifies properties of a text cluster mapping. + * + * Since: 1.8 + **/ +typedef enum _cairo_text_cluster_flags { + CAIRO_TEXT_CLUSTER_FLAG_BACKWARD = 0x00000001 +} cairo_text_cluster_flags_t; + +/** + * cairo_text_extents_t: + * @x_bearing: the horizontal distance from the origin to the + * leftmost part of the glyphs as drawn. Positive if the + * glyphs lie entirely to the right of the origin. + * @y_bearing: the vertical distance from the origin to the + * topmost part of the glyphs as drawn. Positive only if the + * glyphs lie completely below the origin; will usually be + * negative. + * @width: width of the glyphs as drawn + * @height: height of the glyphs as drawn + * @x_advance:distance to advance in the X direction + * after drawing these glyphs + * @y_advance: distance to advance in the Y direction + * after drawing these glyphs. Will typically be zero except + * for vertical text layout as found in East-Asian languages. + * + * The #cairo_text_extents_t structure stores the extents of a single + * glyph or a string of glyphs in user-space coordinates. Because text + * extents are in user-space coordinates, they are mostly, but not + * entirely, independent of the current transformation matrix. If you call + * cairo_scale(cr, 2.0, 2.0), text will + * be drawn twice as big, but the reported text extents will not be + * doubled. They will change slightly due to hinting (so you can't + * assume that metrics are independent of the transformation matrix), + * but otherwise will remain unchanged. + * + * Since: 1.0 + **/ +typedef struct { + double x_bearing; + double y_bearing; + double width; + double height; + double x_advance; + double y_advance; +} cairo_text_extents_t; + +/** + * cairo_font_extents_t: + * @ascent: the distance that the font extends above the baseline. + * Note that this is not always exactly equal to the maximum + * of the extents of all the glyphs in the font, but rather + * is picked to express the font designer's intent as to + * how the font should align with elements above it. + * @descent: the distance that the font extends below the baseline. + * This value is positive for typical fonts that include + * portions below the baseline. Note that this is not always + * exactly equal to the maximum of the extents of all the + * glyphs in the font, but rather is picked to express the + * font designer's intent as to how the font should + * align with elements below it. + * @height: the recommended vertical distance between baselines when + * setting consecutive lines of text with the font. This + * is greater than @ascent+@descent by a + * quantity known as the line spacing + * or external leading. When space + * is at a premium, most fonts can be set with only + * a distance of @ascent+@descent between lines. + * @max_x_advance: the maximum distance in the X direction that + * the origin is advanced for any glyph in the font. + * @max_y_advance: the maximum distance in the Y direction that + * the origin is advanced for any glyph in the font. + * This will be zero for normal fonts used for horizontal + * writing. (The scripts of East Asia are sometimes written + * vertically.) + * + * The #cairo_font_extents_t structure stores metric information for + * a font. Values are given in the current user-space coordinate + * system. + * + * Because font metrics are in user-space coordinates, they are + * mostly, but not entirely, independent of the current transformation + * matrix. If you call cairo_scale(cr, 2.0, 2.0), + * text will be drawn twice as big, but the reported text extents will + * not be doubled. They will change slightly due to hinting (so you + * can't assume that metrics are independent of the transformation + * matrix), but otherwise will remain unchanged. + * + * Since: 1.0 + **/ +typedef struct { + double ascent; + double descent; + double height; + double max_x_advance; + double max_y_advance; +} cairo_font_extents_t; + +/** + * cairo_font_slant_t: + * @CAIRO_FONT_SLANT_NORMAL: Upright font style, since 1.0 + * @CAIRO_FONT_SLANT_ITALIC: Italic font style, since 1.0 + * @CAIRO_FONT_SLANT_OBLIQUE: Oblique font style, since 1.0 + * + * Specifies variants of a font face based on their slant. + * + * Since: 1.0 + **/ +typedef enum _cairo_font_slant { + CAIRO_FONT_SLANT_NORMAL, + CAIRO_FONT_SLANT_ITALIC, + CAIRO_FONT_SLANT_OBLIQUE +} cairo_font_slant_t; + +/** + * cairo_font_weight_t: + * @CAIRO_FONT_WEIGHT_NORMAL: Normal font weight, since 1.0 + * @CAIRO_FONT_WEIGHT_BOLD: Bold font weight, since 1.0 + * + * Specifies variants of a font face based on their weight. + * + * Since: 1.0 + **/ +typedef enum _cairo_font_weight { + CAIRO_FONT_WEIGHT_NORMAL, + CAIRO_FONT_WEIGHT_BOLD +} cairo_font_weight_t; + +/** + * cairo_subpixel_order_t: + * @CAIRO_SUBPIXEL_ORDER_DEFAULT: Use the default subpixel order for + * for the target device, since 1.0 + * @CAIRO_SUBPIXEL_ORDER_RGB: Subpixel elements are arranged horizontally + * with red at the left, since 1.0 + * @CAIRO_SUBPIXEL_ORDER_BGR: Subpixel elements are arranged horizontally + * with blue at the left, since 1.0 + * @CAIRO_SUBPIXEL_ORDER_VRGB: Subpixel elements are arranged vertically + * with red at the top, since 1.0 + * @CAIRO_SUBPIXEL_ORDER_VBGR: Subpixel elements are arranged vertically + * with blue at the top, since 1.0 + * + * The subpixel order specifies the order of color elements within + * each pixel on the display device when rendering with an + * antialiasing mode of %CAIRO_ANTIALIAS_SUBPIXEL. + * + * Since: 1.0 + **/ +typedef enum _cairo_subpixel_order { + CAIRO_SUBPIXEL_ORDER_DEFAULT, + CAIRO_SUBPIXEL_ORDER_RGB, + CAIRO_SUBPIXEL_ORDER_BGR, + CAIRO_SUBPIXEL_ORDER_VRGB, + CAIRO_SUBPIXEL_ORDER_VBGR +} cairo_subpixel_order_t; + +/** + * cairo_hint_style_t: + * @CAIRO_HINT_STYLE_DEFAULT: Use the default hint style for + * font backend and target device, since 1.0 + * @CAIRO_HINT_STYLE_NONE: Do not hint outlines, since 1.0 + * @CAIRO_HINT_STYLE_SLIGHT: Hint outlines slightly to improve + * contrast while retaining good fidelity to the original + * shapes, since 1.0 + * @CAIRO_HINT_STYLE_MEDIUM: Hint outlines with medium strength + * giving a compromise between fidelity to the original shapes + * and contrast, since 1.0 + * @CAIRO_HINT_STYLE_FULL: Hint outlines to maximize contrast, since 1.0 + * + * Specifies the type of hinting to do on font outlines. Hinting + * is the process of fitting outlines to the pixel grid in order + * to improve the appearance of the result. Since hinting outlines + * involves distorting them, it also reduces the faithfulness + * to the original outline shapes. Not all of the outline hinting + * styles are supported by all font backends. + * + * New entries may be added in future versions. + * + * Since: 1.0 + **/ +typedef enum _cairo_hint_style { + CAIRO_HINT_STYLE_DEFAULT, + CAIRO_HINT_STYLE_NONE, + CAIRO_HINT_STYLE_SLIGHT, + CAIRO_HINT_STYLE_MEDIUM, + CAIRO_HINT_STYLE_FULL +} cairo_hint_style_t; + +/** + * cairo_hint_metrics_t: + * @CAIRO_HINT_METRICS_DEFAULT: Hint metrics in the default + * manner for the font backend and target device, since 1.0 + * @CAIRO_HINT_METRICS_OFF: Do not hint font metrics, since 1.0 + * @CAIRO_HINT_METRICS_ON: Hint font metrics, since 1.0 + * + * Specifies whether to hint font metrics; hinting font metrics + * means quantizing them so that they are integer values in + * device space. Doing this improves the consistency of + * letter and line spacing, however it also means that text + * will be laid out differently at different zoom factors. + * + * Since: 1.0 + **/ +typedef enum _cairo_hint_metrics { + CAIRO_HINT_METRICS_DEFAULT, + CAIRO_HINT_METRICS_OFF, + CAIRO_HINT_METRICS_ON +} cairo_hint_metrics_t; + +/** + * cairo_font_options_t: + * + * An opaque structure holding all options that are used when + * rendering fonts. + * + * Individual features of a #cairo_font_options_t can be set or + * accessed using functions named + * cairo_font_options_set_feature_name() and + * cairo_font_options_get_feature_name(), like + * cairo_font_options_set_antialias() and + * cairo_font_options_get_antialias(). + * + * New features may be added to a #cairo_font_options_t in the + * future. For this reason, cairo_font_options_copy(), + * cairo_font_options_equal(), cairo_font_options_merge(), and + * cairo_font_options_hash() should be used to copy, check + * for equality, merge, or compute a hash value of + * #cairo_font_options_t objects. + * + * Since: 1.0 + **/ +typedef struct _cairo_font_options cairo_font_options_t; + +cairo_public cairo_font_options_t * +cairo_font_options_create (void); + +cairo_public cairo_font_options_t * +cairo_font_options_copy (const cairo_font_options_t *original); + +cairo_public void +cairo_font_options_destroy (cairo_font_options_t *options); + +cairo_public cairo_status_t +cairo_font_options_status (cairo_font_options_t *options); + +cairo_public void +cairo_font_options_merge (cairo_font_options_t *options, + const cairo_font_options_t *other); +cairo_public cairo_bool_t +cairo_font_options_equal (const cairo_font_options_t *options, + const cairo_font_options_t *other); + +cairo_public unsigned long +cairo_font_options_hash (const cairo_font_options_t *options); + +cairo_public void +cairo_font_options_set_antialias (cairo_font_options_t *options, + cairo_antialias_t antialias); +cairo_public cairo_antialias_t +cairo_font_options_get_antialias (const cairo_font_options_t *options); + +cairo_public void +cairo_font_options_set_subpixel_order (cairo_font_options_t *options, + cairo_subpixel_order_t subpixel_order); +cairo_public cairo_subpixel_order_t +cairo_font_options_get_subpixel_order (const cairo_font_options_t *options); + +cairo_public void +cairo_font_options_set_hint_style (cairo_font_options_t *options, + cairo_hint_style_t hint_style); +cairo_public cairo_hint_style_t +cairo_font_options_get_hint_style (const cairo_font_options_t *options); + +cairo_public void +cairo_font_options_set_hint_metrics (cairo_font_options_t *options, + cairo_hint_metrics_t hint_metrics); +cairo_public cairo_hint_metrics_t +cairo_font_options_get_hint_metrics (const cairo_font_options_t *options); + +/* This interface is for dealing with text as text, not caring about the + font object inside the the cairo_t. */ + +cairo_public void +cairo_select_font_face (cairo_t *cr, + const char *family, + cairo_font_slant_t slant, + cairo_font_weight_t weight); + +cairo_public void +cairo_set_font_size (cairo_t *cr, double size); + +cairo_public void +cairo_set_font_matrix (cairo_t *cr, + const cairo_matrix_t *matrix); + +cairo_public void +cairo_get_font_matrix (cairo_t *cr, + cairo_matrix_t *matrix); + +cairo_public void +cairo_set_font_options (cairo_t *cr, + const cairo_font_options_t *options); + +cairo_public void +cairo_get_font_options (cairo_t *cr, + cairo_font_options_t *options); + +cairo_public void +cairo_set_font_face (cairo_t *cr, cairo_font_face_t *font_face); + +cairo_public cairo_font_face_t * +cairo_get_font_face (cairo_t *cr); + +cairo_public void +cairo_set_scaled_font (cairo_t *cr, + const cairo_scaled_font_t *scaled_font); + +cairo_public cairo_scaled_font_t * +cairo_get_scaled_font (cairo_t *cr); + +cairo_public void +cairo_show_text (cairo_t *cr, const char *utf8); + +cairo_public void +cairo_show_glyphs (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs); + +cairo_public void +cairo_show_text_glyphs (cairo_t *cr, + const char *utf8, + int utf8_len, + const cairo_glyph_t *glyphs, + int num_glyphs, + const cairo_text_cluster_t *clusters, + int num_clusters, + cairo_text_cluster_flags_t cluster_flags); + +cairo_public void +cairo_text_path (cairo_t *cr, const char *utf8); + +cairo_public void +cairo_glyph_path (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs); + +cairo_public void +cairo_text_extents (cairo_t *cr, + const char *utf8, + cairo_text_extents_t *extents); + +cairo_public void +cairo_glyph_extents (cairo_t *cr, + const cairo_glyph_t *glyphs, + int num_glyphs, + cairo_text_extents_t *extents); + +cairo_public void +cairo_font_extents (cairo_t *cr, + cairo_font_extents_t *extents); + +/* Generic identifier for a font style */ + +cairo_public cairo_font_face_t * +cairo_font_face_reference (cairo_font_face_t *font_face); + +cairo_public void +cairo_font_face_destroy (cairo_font_face_t *font_face); + +cairo_public unsigned int +cairo_font_face_get_reference_count (cairo_font_face_t *font_face); + +cairo_public cairo_status_t +cairo_font_face_status (cairo_font_face_t *font_face); + + +/** + * cairo_font_type_t: + * @CAIRO_FONT_TYPE_TOY: The font was created using cairo's toy font api (Since: 1.2) + * @CAIRO_FONT_TYPE_FT: The font is of type FreeType (Since: 1.2) + * @CAIRO_FONT_TYPE_WIN32: The font is of type Win32 (Since: 1.2) + * @CAIRO_FONT_TYPE_QUARTZ: The font is of type Quartz (Since: 1.6, in 1.2 and + * 1.4 it was named CAIRO_FONT_TYPE_ATSUI) + * @CAIRO_FONT_TYPE_USER: The font was create using cairo's user font api (Since: 1.8) + * + * #cairo_font_type_t is used to describe the type of a given font + * face or scaled font. The font types are also known as "font + * backends" within cairo. + * + * The type of a font face is determined by the function used to + * create it, which will generally be of the form + * cairo_type_font_face_create(). + * The font face type can be queried with cairo_font_face_get_type() + * + * The various #cairo_font_face_t functions can be used with a font face + * of any type. + * + * The type of a scaled font is determined by the type of the font + * face passed to cairo_scaled_font_create(). The scaled font type can + * be queried with cairo_scaled_font_get_type() + * + * The various #cairo_scaled_font_t functions can be used with scaled + * fonts of any type, but some font backends also provide + * type-specific functions that must only be called with a scaled font + * of the appropriate type. These functions have names that begin with + * cairo_type_scaled_font() + * such as cairo_ft_scaled_font_lock_face(). + * + * The behavior of calling a type-specific function with a scaled font + * of the wrong type is undefined. + * + * New entries may be added in future versions. + * + * Since: 1.2 + **/ +typedef enum _cairo_font_type { + CAIRO_FONT_TYPE_TOY, + CAIRO_FONT_TYPE_FT, + CAIRO_FONT_TYPE_WIN32, + CAIRO_FONT_TYPE_QUARTZ, + CAIRO_FONT_TYPE_USER +} cairo_font_type_t; + +cairo_public cairo_font_type_t +cairo_font_face_get_type (cairo_font_face_t *font_face); + +cairo_public void * +cairo_font_face_get_user_data (cairo_font_face_t *font_face, + const cairo_user_data_key_t *key); + +cairo_public cairo_status_t +cairo_font_face_set_user_data (cairo_font_face_t *font_face, + const cairo_user_data_key_t *key, + void *user_data, + cairo_destroy_func_t destroy); + +/* Portable interface to general font features. */ + +cairo_public cairo_scaled_font_t * +cairo_scaled_font_create (cairo_font_face_t *font_face, + const cairo_matrix_t *font_matrix, + const cairo_matrix_t *ctm, + const cairo_font_options_t *options); + +cairo_public cairo_scaled_font_t * +cairo_scaled_font_reference (cairo_scaled_font_t *scaled_font); + +cairo_public void +cairo_scaled_font_destroy (cairo_scaled_font_t *scaled_font); + +cairo_public unsigned int +cairo_scaled_font_get_reference_count (cairo_scaled_font_t *scaled_font); + +cairo_public cairo_status_t +cairo_scaled_font_status (cairo_scaled_font_t *scaled_font); + +cairo_public cairo_font_type_t +cairo_scaled_font_get_type (cairo_scaled_font_t *scaled_font); + +cairo_public void * +cairo_scaled_font_get_user_data (cairo_scaled_font_t *scaled_font, + const cairo_user_data_key_t *key); + +cairo_public cairo_status_t +cairo_scaled_font_set_user_data (cairo_scaled_font_t *scaled_font, + const cairo_user_data_key_t *key, + void *user_data, + cairo_destroy_func_t destroy); + +cairo_public void +cairo_scaled_font_extents (cairo_scaled_font_t *scaled_font, + cairo_font_extents_t *extents); + +cairo_public void +cairo_scaled_font_text_extents (cairo_scaled_font_t *scaled_font, + const char *utf8, + cairo_text_extents_t *extents); + +cairo_public void +cairo_scaled_font_glyph_extents (cairo_scaled_font_t *scaled_font, + const cairo_glyph_t *glyphs, + int num_glyphs, + cairo_text_extents_t *extents); + +cairo_public cairo_status_t +cairo_scaled_font_text_to_glyphs (cairo_scaled_font_t *scaled_font, + double x, + double y, + const char *utf8, + int utf8_len, + cairo_glyph_t **glyphs, + int *num_glyphs, + cairo_text_cluster_t **clusters, + int *num_clusters, + cairo_text_cluster_flags_t *cluster_flags); + +cairo_public cairo_font_face_t * +cairo_scaled_font_get_font_face (cairo_scaled_font_t *scaled_font); + +cairo_public void +cairo_scaled_font_get_font_matrix (cairo_scaled_font_t *scaled_font, + cairo_matrix_t *font_matrix); + +cairo_public void +cairo_scaled_font_get_ctm (cairo_scaled_font_t *scaled_font, + cairo_matrix_t *ctm); + +cairo_public void +cairo_scaled_font_get_scale_matrix (cairo_scaled_font_t *scaled_font, + cairo_matrix_t *scale_matrix); + +cairo_public void +cairo_scaled_font_get_font_options (cairo_scaled_font_t *scaled_font, + cairo_font_options_t *options); + + +/* Toy fonts */ + +cairo_public cairo_font_face_t * +cairo_toy_font_face_create (const char *family, + cairo_font_slant_t slant, + cairo_font_weight_t weight); + +cairo_public const char * +cairo_toy_font_face_get_family (cairo_font_face_t *font_face); + +cairo_public cairo_font_slant_t +cairo_toy_font_face_get_slant (cairo_font_face_t *font_face); + +cairo_public cairo_font_weight_t +cairo_toy_font_face_get_weight (cairo_font_face_t *font_face); + + +/* User fonts */ + +cairo_public cairo_font_face_t * +cairo_user_font_face_create (void); + +/* User-font method signatures */ + +/** + * cairo_user_scaled_font_init_func_t: + * @scaled_font: the scaled-font being created + * @cr: a cairo context, in font space + * @extents: font extents to fill in, in font space + * + * #cairo_user_scaled_font_init_func_t is the type of function which is + * called when a scaled-font needs to be created for a user font-face. + * + * The cairo context @cr is not used by the caller, but is prepared in font + * space, similar to what the cairo contexts passed to the render_glyph + * method will look like. The callback can use this context for extents + * computation for example. After the callback is called, @cr is checked + * for any error status. + * + * The @extents argument is where the user font sets the font extents for + * @scaled_font. It is in font space, which means that for most cases its + * ascent and descent members should add to 1.0. @extents is preset to + * hold a value of 1.0 for ascent, height, and max_x_advance, and 0.0 for + * descent and max_y_advance members. + * + * The callback is optional. If not set, default font extents as described + * in the previous paragraph will be used. + * + * Note that @scaled_font is not fully initialized at this + * point and trying to use it for text operations in the callback will result + * in deadlock. + * + * Returns: %CAIRO_STATUS_SUCCESS upon success, or an error status on error. + * + * Since: 1.8 + **/ +typedef cairo_status_t (*cairo_user_scaled_font_init_func_t) (cairo_scaled_font_t *scaled_font, + cairo_t *cr, + cairo_font_extents_t *extents); + +/** + * cairo_user_scaled_font_render_glyph_func_t: + * @scaled_font: user scaled-font + * @glyph: glyph code to render + * @cr: cairo context to draw to, in font space + * @extents: glyph extents to fill in, in font space + * + * #cairo_user_scaled_font_render_glyph_func_t is the type of function which + * is called when a user scaled-font needs to render a glyph. + * + * The callback is mandatory, and expected to draw the glyph with code @glyph to + * the cairo context @cr. @cr is prepared such that the glyph drawing is done in + * font space. That is, the matrix set on @cr is the scale matrix of @scaled_font, + * The @extents argument is where the user font sets the font extents for + * @scaled_font. However, if user prefers to draw in user space, they can + * achieve that by changing the matrix on @cr. All cairo rendering operations + * to @cr are permitted, however, the result is undefined if any source other + * than the default source on @cr is used. That means, glyph bitmaps should + * be rendered using cairo_mask() instead of cairo_paint(). + * + * Other non-default settings on @cr include a font size of 1.0 (given that + * it is set up to be in font space), and font options corresponding to + * @scaled_font. + * + * The @extents argument is preset to have x_bearing, + * width, and y_advance of zero, + * y_bearing set to -font_extents.ascent, + * height to font_extents.ascent+font_extents.descent, + * and x_advance to font_extents.max_x_advance. + * The only field user needs to set in majority of cases is + * x_advance. + * If the width field is zero upon the callback returning + * (which is its preset value), the glyph extents are automatically computed + * based on the drawings done to @cr. This is in most cases exactly what the + * desired behavior is. However, if for any reason the callback sets the + * extents, it must be ink extents, and include the extents of all drawing + * done to @cr in the callback. + * + * Returns: %CAIRO_STATUS_SUCCESS upon success, or + * %CAIRO_STATUS_USER_FONT_ERROR or any other error status on error. + * + * Since: 1.8 + **/ +typedef cairo_status_t (*cairo_user_scaled_font_render_glyph_func_t) (cairo_scaled_font_t *scaled_font, + unsigned long glyph, + cairo_t *cr, + cairo_text_extents_t *extents); + +/** + * cairo_user_scaled_font_text_to_glyphs_func_t: + * @scaled_font: the scaled-font being created + * @utf8: a string of text encoded in UTF-8 + * @utf8_len: length of @utf8 in bytes + * @glyphs: pointer to array of glyphs to fill, in font space + * @num_glyphs: pointer to number of glyphs + * @clusters: pointer to array of cluster mapping information to fill, or %NULL + * @num_clusters: pointer to number of clusters + * @cluster_flags: pointer to location to store cluster flags corresponding to the + * output @clusters + * + * #cairo_user_scaled_font_text_to_glyphs_func_t is the type of function which + * is called to convert input text to an array of glyphs. This is used by the + * cairo_show_text() operation. + * + * Using this callback the user-font has full control on glyphs and their + * positions. That means, it allows for features like ligatures and kerning, + * as well as complex shaping required for scripts like + * Arabic and Indic. + * + * The @num_glyphs argument is preset to the number of glyph entries available + * in the @glyphs buffer. If the @glyphs buffer is %NULL, the value of + * @num_glyphs will be zero. If the provided glyph array is too short for + * the conversion (or for convenience), a new glyph array may be allocated + * using cairo_glyph_allocate() and placed in @glyphs. Upon return, + * @num_glyphs should contain the number of generated glyphs. If the value + * @glyphs points at has changed after the call, the caller will free the + * allocated glyph array using cairo_glyph_free(). The caller will also free + * the original value of @glyphs, so the callback shouldn't do so. + * The callback should populate the glyph indices and positions (in font space) + * assuming that the text is to be shown at the origin. + * + * If @clusters is not %NULL, @num_clusters and @cluster_flags are also + * non-%NULL, and cluster mapping should be computed. The semantics of how + * cluster array allocation works is similar to the glyph array. That is, + * if @clusters initially points to a non-%NULL value, that array may be used + * as a cluster buffer, and @num_clusters points to the number of cluster + * entries available there. If the provided cluster array is too short for + * the conversion (or for convenience), a new cluster array may be allocated + * using cairo_text_cluster_allocate() and placed in @clusters. In this case, + * the original value of @clusters will still be freed by the caller. Upon + * return, @num_clusters should contain the number of generated clusters. + * If the value @clusters points at has changed after the call, the caller + * will free the allocated cluster array using cairo_text_cluster_free(). + * + * The callback is optional. If @num_glyphs is negative upon + * the callback returning or if the return value + * is %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED, the unicode_to_glyph callback + * is tried. See #cairo_user_scaled_font_unicode_to_glyph_func_t. + * + * Note: While cairo does not impose any limitation on glyph indices, + * some applications may assume that a glyph index fits in a 16-bit + * unsigned integer. As such, it is advised that user-fonts keep their + * glyphs in the 0 to 65535 range. Furthermore, some applications may + * assume that glyph 0 is a special glyph-not-found glyph. User-fonts + * are advised to use glyph 0 for such purposes and do not use that + * glyph value for other purposes. + * + * Returns: %CAIRO_STATUS_SUCCESS upon success, + * %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED if fallback options should be tried, + * or %CAIRO_STATUS_USER_FONT_ERROR or any other error status on error. + * + * Since: 1.8 + **/ +typedef cairo_status_t (*cairo_user_scaled_font_text_to_glyphs_func_t) (cairo_scaled_font_t *scaled_font, + const char *utf8, + int utf8_len, + cairo_glyph_t **glyphs, + int *num_glyphs, + cairo_text_cluster_t **clusters, + int *num_clusters, + cairo_text_cluster_flags_t *cluster_flags); + +/** + * cairo_user_scaled_font_unicode_to_glyph_func_t: + * @scaled_font: the scaled-font being created + * @unicode: input unicode character code-point + * @glyph_index: output glyph index + * + * #cairo_user_scaled_font_unicode_to_glyph_func_t is the type of function which + * is called to convert an input Unicode character to a single glyph. + * This is used by the cairo_show_text() operation. + * + * This callback is used to provide the same functionality as the + * text_to_glyphs callback does (see #cairo_user_scaled_font_text_to_glyphs_func_t) + * but has much less control on the output, + * in exchange for increased ease of use. The inherent assumption to using + * this callback is that each character maps to one glyph, and that the + * mapping is context independent. It also assumes that glyphs are positioned + * according to their advance width. These mean no ligatures, kerning, or + * complex scripts can be implemented using this callback. + * + * The callback is optional, and only used if text_to_glyphs callback is not + * set or fails to return glyphs. If this callback is not set or if it returns + * %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED, an identity mapping from Unicode + * code-points to glyph indices is assumed. + * + * Note: While cairo does not impose any limitation on glyph indices, + * some applications may assume that a glyph index fits in a 16-bit + * unsigned integer. As such, it is advised that user-fonts keep their + * glyphs in the 0 to 65535 range. Furthermore, some applications may + * assume that glyph 0 is a special glyph-not-found glyph. User-fonts + * are advised to use glyph 0 for such purposes and do not use that + * glyph value for other purposes. + * + * Returns: %CAIRO_STATUS_SUCCESS upon success, + * %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED if fallback options should be tried, + * or %CAIRO_STATUS_USER_FONT_ERROR or any other error status on error. + * + * Since: 1.8 + **/ +typedef cairo_status_t (*cairo_user_scaled_font_unicode_to_glyph_func_t) (cairo_scaled_font_t *scaled_font, + unsigned long unicode, + unsigned long *glyph_index); + +/* User-font method setters */ + +cairo_public void +cairo_user_font_face_set_init_func (cairo_font_face_t *font_face, + cairo_user_scaled_font_init_func_t init_func); + +cairo_public void +cairo_user_font_face_set_render_glyph_func (cairo_font_face_t *font_face, + cairo_user_scaled_font_render_glyph_func_t render_glyph_func); + +cairo_public void +cairo_user_font_face_set_text_to_glyphs_func (cairo_font_face_t *font_face, + cairo_user_scaled_font_text_to_glyphs_func_t text_to_glyphs_func); + +cairo_public void +cairo_user_font_face_set_unicode_to_glyph_func (cairo_font_face_t *font_face, + cairo_user_scaled_font_unicode_to_glyph_func_t unicode_to_glyph_func); + +/* User-font method getters */ + +cairo_public cairo_user_scaled_font_init_func_t +cairo_user_font_face_get_init_func (cairo_font_face_t *font_face); + +cairo_public cairo_user_scaled_font_render_glyph_func_t +cairo_user_font_face_get_render_glyph_func (cairo_font_face_t *font_face); + +cairo_public cairo_user_scaled_font_text_to_glyphs_func_t +cairo_user_font_face_get_text_to_glyphs_func (cairo_font_face_t *font_face); + +cairo_public cairo_user_scaled_font_unicode_to_glyph_func_t +cairo_user_font_face_get_unicode_to_glyph_func (cairo_font_face_t *font_face); + + +/* Query functions */ + +cairo_public cairo_operator_t +cairo_get_operator (cairo_t *cr); + +cairo_public cairo_pattern_t * +cairo_get_source (cairo_t *cr); + +cairo_public double +cairo_get_tolerance (cairo_t *cr); + +cairo_public cairo_antialias_t +cairo_get_antialias (cairo_t *cr); + +cairo_public cairo_bool_t +cairo_has_current_point (cairo_t *cr); + +cairo_public void +cairo_get_current_point (cairo_t *cr, double *x, double *y); + +cairo_public cairo_fill_rule_t +cairo_get_fill_rule (cairo_t *cr); + +cairo_public double +cairo_get_line_width (cairo_t *cr); + +cairo_public cairo_line_cap_t +cairo_get_line_cap (cairo_t *cr); + +cairo_public cairo_line_join_t +cairo_get_line_join (cairo_t *cr); + +cairo_public double +cairo_get_miter_limit (cairo_t *cr); + +cairo_public int +cairo_get_dash_count (cairo_t *cr); + +cairo_public void +cairo_get_dash (cairo_t *cr, double *dashes, double *offset); + +cairo_public void +cairo_get_matrix (cairo_t *cr, cairo_matrix_t *matrix); + +cairo_public cairo_surface_t * +cairo_get_target (cairo_t *cr); + +cairo_public cairo_surface_t * +cairo_get_group_target (cairo_t *cr); + +/** + * cairo_path_data_type_t: + * @CAIRO_PATH_MOVE_TO: A move-to operation, since 1.0 + * @CAIRO_PATH_LINE_TO: A line-to operation, since 1.0 + * @CAIRO_PATH_CURVE_TO: A curve-to operation, since 1.0 + * @CAIRO_PATH_CLOSE_PATH: A close-path operation, since 1.0 + * + * #cairo_path_data_t is used to describe the type of one portion + * of a path when represented as a #cairo_path_t. + * See #cairo_path_data_t for details. + * + * Since: 1.0 + **/ +typedef enum _cairo_path_data_type { + CAIRO_PATH_MOVE_TO, + CAIRO_PATH_LINE_TO, + CAIRO_PATH_CURVE_TO, + CAIRO_PATH_CLOSE_PATH +} cairo_path_data_type_t; + +/** + * cairo_path_data_t: + * + * #cairo_path_data_t is used to represent the path data inside a + * #cairo_path_t. + * + * The data structure is designed to try to balance the demands of + * efficiency and ease-of-use. A path is represented as an array of + * #cairo_path_data_t, which is a union of headers and points. + * + * Each portion of the path is represented by one or more elements in + * the array, (one header followed by 0 or more points). The length + * value of the header is the number of array elements for the current + * portion including the header, (ie. length == 1 + # of points), and + * where the number of points for each element type is as follows: + * + * + * %CAIRO_PATH_MOVE_TO: 1 point + * %CAIRO_PATH_LINE_TO: 1 point + * %CAIRO_PATH_CURVE_TO: 3 points + * %CAIRO_PATH_CLOSE_PATH: 0 points + * + * + * The semantics and ordering of the coordinate values are consistent + * with cairo_move_to(), cairo_line_to(), cairo_curve_to(), and + * cairo_close_path(). + * + * Here is sample code for iterating through a #cairo_path_t: + * + * + * int i; + * cairo_path_t *path; + * cairo_path_data_t *data; + *   + * path = cairo_copy_path (cr); + *   + * for (i=0; i < path->num_data; i += path->data[i].header.length) { + * data = &path->data[i]; + * switch (data->header.type) { + * case CAIRO_PATH_MOVE_TO: + * do_move_to_things (data[1].point.x, data[1].point.y); + * break; + * case CAIRO_PATH_LINE_TO: + * do_line_to_things (data[1].point.x, data[1].point.y); + * break; + * case CAIRO_PATH_CURVE_TO: + * do_curve_to_things (data[1].point.x, data[1].point.y, + * data[2].point.x, data[2].point.y, + * data[3].point.x, data[3].point.y); + * break; + * case CAIRO_PATH_CLOSE_PATH: + * do_close_path_things (); + * break; + * } + * } + * cairo_path_destroy (path); + * + * + * As of cairo 1.4, cairo does not mind if there are more elements in + * a portion of the path than needed. Such elements can be used by + * users of the cairo API to hold extra values in the path data + * structure. For this reason, it is recommended that applications + * always use data->header.length to + * iterate over the path data, instead of hardcoding the number of + * elements for each element type. + * + * Since: 1.0 + **/ +typedef union _cairo_path_data_t cairo_path_data_t; +union _cairo_path_data_t { + struct { + cairo_path_data_type_t type; + int length; + } header; + struct { + double x, y; + } point; +}; + +/** + * cairo_path_t: + * @status: the current error status + * @data: the elements in the path + * @num_data: the number of elements in the data array + * + * A data structure for holding a path. This data structure serves as + * the return value for cairo_copy_path() and + * cairo_copy_path_flat() as well the input value for + * cairo_append_path(). + * + * See #cairo_path_data_t for hints on how to iterate over the + * actual data within the path. + * + * The num_data member gives the number of elements in the data + * array. This number is larger than the number of independent path + * portions (defined in #cairo_path_data_type_t), since the data + * includes both headers and coordinates for each portion. + * + * Since: 1.0 + **/ +typedef struct cairo_path { + cairo_status_t status; + cairo_path_data_t *data; + int num_data; +} cairo_path_t; + +cairo_public cairo_path_t * +cairo_copy_path (cairo_t *cr); + +cairo_public cairo_path_t * +cairo_copy_path_flat (cairo_t *cr); + +cairo_public void +cairo_append_path (cairo_t *cr, + const cairo_path_t *path); + +cairo_public void +cairo_path_destroy (cairo_path_t *path); + +/* Error status queries */ + +cairo_public cairo_status_t +cairo_status (cairo_t *cr); + +cairo_public const char * +cairo_status_to_string (cairo_status_t status); + +/* Backend device manipulation */ + +cairo_public cairo_device_t * +cairo_device_reference (cairo_device_t *device); + +/** + * cairo_device_type_t: + * @CAIRO_DEVICE_TYPE_DRM: The device is of type Direct Render Manager, since 1.10 + * @CAIRO_DEVICE_TYPE_GL: The device is of type OpenGL, since 1.10 + * @CAIRO_DEVICE_TYPE_SCRIPT: The device is of type script, since 1.10 + * @CAIRO_DEVICE_TYPE_XCB: The device is of type xcb, since 1.10 + * @CAIRO_DEVICE_TYPE_XLIB: The device is of type xlib, since 1.10 + * @CAIRO_DEVICE_TYPE_XML: The device is of type XML, since 1.10 + * @CAIRO_DEVICE_TYPE_COGL: The device is of type cogl, since 1.12 + * @CAIRO_DEVICE_TYPE_WIN32: The device is of type win32, since 1.12 + * @CAIRO_DEVICE_TYPE_INVALID: The device is invalid, since 1.10 + * + * #cairo_device_type_t is used to describe the type of a given + * device. The devices types are also known as "backends" within cairo. + * + * The device type can be queried with cairo_device_get_type() + * + * The various #cairo_device_t functions can be used with devices of + * any type, but some backends also provide type-specific functions + * that must only be called with a device of the appropriate + * type. These functions have names that begin with + * cairo_type_device such as + * cairo_xcb_device_debug_cap_xrender_version(). + * + * The behavior of calling a type-specific function with a device of + * the wrong type is undefined. + * + * New entries may be added in future versions. + * + * Since: 1.10 + **/ +typedef enum _cairo_device_type { + CAIRO_DEVICE_TYPE_DRM, + CAIRO_DEVICE_TYPE_GL, + CAIRO_DEVICE_TYPE_SCRIPT, + CAIRO_DEVICE_TYPE_XCB, + CAIRO_DEVICE_TYPE_XLIB, + CAIRO_DEVICE_TYPE_XML, + CAIRO_DEVICE_TYPE_COGL, + CAIRO_DEVICE_TYPE_WIN32, + + CAIRO_DEVICE_TYPE_INVALID = -1 +} cairo_device_type_t; + +cairo_public cairo_device_type_t +cairo_device_get_type (cairo_device_t *device); + +cairo_public cairo_status_t +cairo_device_status (cairo_device_t *device); + +cairo_public cairo_status_t +cairo_device_acquire (cairo_device_t *device); + +cairo_public void +cairo_device_release (cairo_device_t *device); + +cairo_public void +cairo_device_flush (cairo_device_t *device); + +cairo_public void +cairo_device_finish (cairo_device_t *device); + +cairo_public void +cairo_device_destroy (cairo_device_t *device); + +cairo_public unsigned int +cairo_device_get_reference_count (cairo_device_t *device); + +cairo_public void * +cairo_device_get_user_data (cairo_device_t *device, + const cairo_user_data_key_t *key); + +cairo_public cairo_status_t +cairo_device_set_user_data (cairo_device_t *device, + const cairo_user_data_key_t *key, + void *user_data, + cairo_destroy_func_t destroy); + + +/* Surface manipulation */ + +cairo_public cairo_surface_t * +cairo_surface_create_similar (cairo_surface_t *other, + cairo_content_t content, + int width, + int height); + +cairo_public cairo_surface_t * +cairo_surface_create_similar_image (cairo_surface_t *other, + cairo_format_t format, + int width, + int height); + +cairo_public cairo_surface_t * +cairo_surface_map_to_image (cairo_surface_t *surface, + const cairo_rectangle_int_t *extents); + +cairo_public void +cairo_surface_unmap_image (cairo_surface_t *surface, + cairo_surface_t *image); + +cairo_public cairo_surface_t * +cairo_surface_create_for_rectangle (cairo_surface_t *target, + double x, + double y, + double width, + double height); + +/** + * cairo_surface_observer_mode_t: + * @CAIRO_SURFACE_OBSERVER_NORMAL: no recording is done + * @CAIRO_SURFACE_OBSERVER_RECORD_OPERATIONS: operations are recorded + * + * Whether operations should be recorded. + * + * Since: 1.12 + **/ +typedef enum { + CAIRO_SURFACE_OBSERVER_NORMAL = 0, + CAIRO_SURFACE_OBSERVER_RECORD_OPERATIONS = 0x1 +} cairo_surface_observer_mode_t; + +cairo_public cairo_surface_t * +cairo_surface_create_observer (cairo_surface_t *target, + cairo_surface_observer_mode_t mode); + +typedef void (*cairo_surface_observer_callback_t) (cairo_surface_t *observer, + cairo_surface_t *target, + void *data); + +cairo_public cairo_status_t +cairo_surface_observer_add_paint_callback (cairo_surface_t *abstract_surface, + cairo_surface_observer_callback_t func, + void *data); + +cairo_public cairo_status_t +cairo_surface_observer_add_mask_callback (cairo_surface_t *abstract_surface, + cairo_surface_observer_callback_t func, + void *data); + +cairo_public cairo_status_t +cairo_surface_observer_add_fill_callback (cairo_surface_t *abstract_surface, + cairo_surface_observer_callback_t func, + void *data); + +cairo_public cairo_status_t +cairo_surface_observer_add_stroke_callback (cairo_surface_t *abstract_surface, + cairo_surface_observer_callback_t func, + void *data); + +cairo_public cairo_status_t +cairo_surface_observer_add_glyphs_callback (cairo_surface_t *abstract_surface, + cairo_surface_observer_callback_t func, + void *data); + +cairo_public cairo_status_t +cairo_surface_observer_add_flush_callback (cairo_surface_t *abstract_surface, + cairo_surface_observer_callback_t func, + void *data); + +cairo_public cairo_status_t +cairo_surface_observer_add_finish_callback (cairo_surface_t *abstract_surface, + cairo_surface_observer_callback_t func, + void *data); + +cairo_public cairo_status_t +cairo_surface_observer_print (cairo_surface_t *surface, + cairo_write_func_t write_func, + void *closure); +cairo_public double +cairo_surface_observer_elapsed (cairo_surface_t *surface); + +cairo_public cairo_status_t +cairo_device_observer_print (cairo_device_t *device, + cairo_write_func_t write_func, + void *closure); + +cairo_public double +cairo_device_observer_elapsed (cairo_device_t *device); + +cairo_public double +cairo_device_observer_paint_elapsed (cairo_device_t *device); + +cairo_public double +cairo_device_observer_mask_elapsed (cairo_device_t *device); + +cairo_public double +cairo_device_observer_fill_elapsed (cairo_device_t *device); + +cairo_public double +cairo_device_observer_stroke_elapsed (cairo_device_t *device); + +cairo_public double +cairo_device_observer_glyphs_elapsed (cairo_device_t *device); + +cairo_public cairo_surface_t * +cairo_surface_reference (cairo_surface_t *surface); + +cairo_public void +cairo_surface_finish (cairo_surface_t *surface); + +cairo_public void +cairo_surface_destroy (cairo_surface_t *surface); + +cairo_public cairo_device_t * +cairo_surface_get_device (cairo_surface_t *surface); + +cairo_public unsigned int +cairo_surface_get_reference_count (cairo_surface_t *surface); + +cairo_public cairo_status_t +cairo_surface_status (cairo_surface_t *surface); + +/** + * cairo_surface_type_t: + * @CAIRO_SURFACE_TYPE_IMAGE: The surface is of type image, since 1.2 + * @CAIRO_SURFACE_TYPE_PDF: The surface is of type pdf, since 1.2 + * @CAIRO_SURFACE_TYPE_PS: The surface is of type ps, since 1.2 + * @CAIRO_SURFACE_TYPE_XLIB: The surface is of type xlib, since 1.2 + * @CAIRO_SURFACE_TYPE_XCB: The surface is of type xcb, since 1.2 + * @CAIRO_SURFACE_TYPE_GLITZ: The surface is of type glitz, since 1.2 + * @CAIRO_SURFACE_TYPE_QUARTZ: The surface is of type quartz, since 1.2 + * @CAIRO_SURFACE_TYPE_WIN32: The surface is of type win32, since 1.2 + * @CAIRO_SURFACE_TYPE_BEOS: The surface is of type beos, since 1.2 + * @CAIRO_SURFACE_TYPE_DIRECTFB: The surface is of type directfb, since 1.2 + * @CAIRO_SURFACE_TYPE_SVG: The surface is of type svg, since 1.2 + * @CAIRO_SURFACE_TYPE_OS2: The surface is of type os2, since 1.4 + * @CAIRO_SURFACE_TYPE_WIN32_PRINTING: The surface is a win32 printing surface, since 1.6 + * @CAIRO_SURFACE_TYPE_QUARTZ_IMAGE: The surface is of type quartz_image, since 1.6 + * @CAIRO_SURFACE_TYPE_SCRIPT: The surface is of type script, since 1.10 + * @CAIRO_SURFACE_TYPE_QT: The surface is of type Qt, since 1.10 + * @CAIRO_SURFACE_TYPE_RECORDING: The surface is of type recording, since 1.10 + * @CAIRO_SURFACE_TYPE_VG: The surface is a OpenVG surface, since 1.10 + * @CAIRO_SURFACE_TYPE_GL: The surface is of type OpenGL, since 1.10 + * @CAIRO_SURFACE_TYPE_DRM: The surface is of type Direct Render Manager, since 1.10 + * @CAIRO_SURFACE_TYPE_TEE: The surface is of type 'tee' (a multiplexing surface), since 1.10 + * @CAIRO_SURFACE_TYPE_XML: The surface is of type XML (for debugging), since 1.10 + * @CAIRO_SURFACE_TYPE_SKIA: The surface is of type Skia, since 1.10 + * @CAIRO_SURFACE_TYPE_SUBSURFACE: The surface is a subsurface created with + * cairo_surface_create_for_rectangle(), since 1.10 + * @CAIRO_SURFACE_TYPE_COGL: This surface is of type Cogl, since 1.12 + * + * #cairo_surface_type_t is used to describe the type of a given + * surface. The surface types are also known as "backends" or "surface + * backends" within cairo. + * + * The type of a surface is determined by the function used to create + * it, which will generally be of the form + * cairo_type_surface_create(), + * (though see cairo_surface_create_similar() as well). + * + * The surface type can be queried with cairo_surface_get_type() + * + * The various #cairo_surface_t functions can be used with surfaces of + * any type, but some backends also provide type-specific functions + * that must only be called with a surface of the appropriate + * type. These functions have names that begin with + * cairo_type_surface such as cairo_image_surface_get_width(). + * + * The behavior of calling a type-specific function with a surface of + * the wrong type is undefined. + * + * New entries may be added in future versions. + * + * Since: 1.2 + **/ +typedef enum _cairo_surface_type { + CAIRO_SURFACE_TYPE_IMAGE, + CAIRO_SURFACE_TYPE_PDF, + CAIRO_SURFACE_TYPE_PS, + CAIRO_SURFACE_TYPE_XLIB, + CAIRO_SURFACE_TYPE_XCB, + CAIRO_SURFACE_TYPE_GLITZ, + CAIRO_SURFACE_TYPE_QUARTZ, + CAIRO_SURFACE_TYPE_WIN32, + CAIRO_SURFACE_TYPE_BEOS, + CAIRO_SURFACE_TYPE_DIRECTFB, + CAIRO_SURFACE_TYPE_SVG, + CAIRO_SURFACE_TYPE_OS2, + CAIRO_SURFACE_TYPE_WIN32_PRINTING, + CAIRO_SURFACE_TYPE_QUARTZ_IMAGE, + CAIRO_SURFACE_TYPE_SCRIPT, + CAIRO_SURFACE_TYPE_QT, + CAIRO_SURFACE_TYPE_RECORDING, + CAIRO_SURFACE_TYPE_VG, + CAIRO_SURFACE_TYPE_GL, + CAIRO_SURFACE_TYPE_DRM, + CAIRO_SURFACE_TYPE_TEE, + CAIRO_SURFACE_TYPE_XML, + CAIRO_SURFACE_TYPE_SKIA, + CAIRO_SURFACE_TYPE_SUBSURFACE, + CAIRO_SURFACE_TYPE_COGL +} cairo_surface_type_t; + +cairo_public cairo_surface_type_t +cairo_surface_get_type (cairo_surface_t *surface); + +cairo_public cairo_content_t +cairo_surface_get_content (cairo_surface_t *surface); + +#if CAIRO_HAS_PNG_FUNCTIONS + +cairo_public cairo_status_t +cairo_surface_write_to_png (cairo_surface_t *surface, + const char *filename); + +cairo_public cairo_status_t +cairo_surface_write_to_png_stream (cairo_surface_t *surface, + cairo_write_func_t write_func, + void *closure); + +#endif + +cairo_public void * +cairo_surface_get_user_data (cairo_surface_t *surface, + const cairo_user_data_key_t *key); + +cairo_public cairo_status_t +cairo_surface_set_user_data (cairo_surface_t *surface, + const cairo_user_data_key_t *key, + void *user_data, + cairo_destroy_func_t destroy); + +#define CAIRO_MIME_TYPE_JPEG "image/jpeg" +#define CAIRO_MIME_TYPE_PNG "image/png" +#define CAIRO_MIME_TYPE_JP2 "image/jp2" +#define CAIRO_MIME_TYPE_URI "text/x-uri" +#define CAIRO_MIME_TYPE_UNIQUE_ID "application/x-cairo.uuid" +#define CAIRO_MIME_TYPE_JBIG2 "application/x-cairo.jbig2" +#define CAIRO_MIME_TYPE_JBIG2_GLOBAL "application/x-cairo.jbig2-global" +#define CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID "application/x-cairo.jbig2-global-id" + +cairo_public void +cairo_surface_get_mime_data (cairo_surface_t *surface, + const char *mime_type, + const unsigned char **data, + unsigned long *length); + +cairo_public cairo_status_t +cairo_surface_set_mime_data (cairo_surface_t *surface, + const char *mime_type, + const unsigned char *data, + unsigned long length, + cairo_destroy_func_t destroy, + void *closure); + +cairo_public cairo_bool_t +cairo_surface_supports_mime_type (cairo_surface_t *surface, + const char *mime_type); + +cairo_public void +cairo_surface_get_font_options (cairo_surface_t *surface, + cairo_font_options_t *options); + +cairo_public void +cairo_surface_flush (cairo_surface_t *surface); + +cairo_public void +cairo_surface_mark_dirty (cairo_surface_t *surface); + +cairo_public void +cairo_surface_mark_dirty_rectangle (cairo_surface_t *surface, + int x, + int y, + int width, + int height); + +cairo_public void +cairo_surface_set_device_scale (cairo_surface_t *surface, + double x_scale, + double y_scale); + +cairo_public void +cairo_surface_get_device_scale (cairo_surface_t *surface, + double *x_scale, + double *y_scale); + +cairo_public void +cairo_surface_set_device_offset (cairo_surface_t *surface, + double x_offset, + double y_offset); + +cairo_public void +cairo_surface_get_device_offset (cairo_surface_t *surface, + double *x_offset, + double *y_offset); + +cairo_public void +cairo_surface_set_fallback_resolution (cairo_surface_t *surface, + double x_pixels_per_inch, + double y_pixels_per_inch); + +cairo_public void +cairo_surface_get_fallback_resolution (cairo_surface_t *surface, + double *x_pixels_per_inch, + double *y_pixels_per_inch); + +cairo_public void +cairo_surface_copy_page (cairo_surface_t *surface); + +cairo_public void +cairo_surface_show_page (cairo_surface_t *surface); + +cairo_public cairo_bool_t +cairo_surface_has_show_text_glyphs (cairo_surface_t *surface); + +/* Image-surface functions */ + +cairo_public cairo_surface_t * +cairo_image_surface_create (cairo_format_t format, + int width, + int height); + +cairo_public int +cairo_format_stride_for_width (cairo_format_t format, + int width); + +cairo_public cairo_surface_t * +cairo_image_surface_create_for_data (unsigned char *data, + cairo_format_t format, + int width, + int height, + int stride); + +cairo_public unsigned char * +cairo_image_surface_get_data (cairo_surface_t *surface); + +cairo_public cairo_format_t +cairo_image_surface_get_format (cairo_surface_t *surface); + +cairo_public int +cairo_image_surface_get_width (cairo_surface_t *surface); + +cairo_public int +cairo_image_surface_get_height (cairo_surface_t *surface); + +cairo_public int +cairo_image_surface_get_stride (cairo_surface_t *surface); + +#if CAIRO_HAS_PNG_FUNCTIONS + +cairo_public cairo_surface_t * +cairo_image_surface_create_from_png (const char *filename); + +cairo_public cairo_surface_t * +cairo_image_surface_create_from_png_stream (cairo_read_func_t read_func, + void *closure); + +#endif + +/* Recording-surface functions */ + +cairo_public cairo_surface_t * +cairo_recording_surface_create (cairo_content_t content, + const cairo_rectangle_t *extents); + +cairo_public void +cairo_recording_surface_ink_extents (cairo_surface_t *surface, + double *x0, + double *y0, + double *width, + double *height); + +cairo_public cairo_bool_t +cairo_recording_surface_get_extents (cairo_surface_t *surface, + cairo_rectangle_t *extents); + +/* raster-source pattern (callback) functions */ + +/** + * cairo_raster_source_acquire_func_t: + * @pattern: the pattern being rendered from + * @callback_data: the user data supplied during creation + * @target: the rendering target surface + * @extents: rectangular region of interest in pixels in sample space + * + * #cairo_raster_source_acquire_func_t is the type of function which is + * called when a pattern is being rendered from. It should create a surface + * that provides the pixel data for the region of interest as defined by + * extents, though the surface itself does not have to be limited to that + * area. For convenience the surface should probably be of image type, + * created with cairo_surface_create_similar_image() for the target (which + * enables the number of copies to be reduced during transfer to the + * device). Another option, might be to return a similar surface to the + * target for explicit handling by the application of a set of cached sources + * on the device. The region of sample data provided should be defined using + * cairo_surface_set_device_offset() to specify the top-left corner of the + * sample data (along with width and height of the surface). + * + * Returns: a #cairo_surface_t + * + * Since: 1.12 + **/ +typedef cairo_surface_t * +(*cairo_raster_source_acquire_func_t) (cairo_pattern_t *pattern, + void *callback_data, + cairo_surface_t *target, + const cairo_rectangle_int_t *extents); + +/** + * cairo_raster_source_release_func_t: + * @pattern: the pattern being rendered from + * @callback_data: the user data supplied during creation + * @surface: the surface created during acquire + * + * #cairo_raster_source_release_func_t is the type of function which is + * called when the pixel data is no longer being access by the pattern + * for the rendering operation. Typically this function will simply + * destroy the surface created during acquire. + * + * Since: 1.12 + **/ +typedef void +(*cairo_raster_source_release_func_t) (cairo_pattern_t *pattern, + void *callback_data, + cairo_surface_t *surface); + +/** + * cairo_raster_source_snapshot_func_t: + * @pattern: the pattern being rendered from + * @callback_data: the user data supplied during creation + * + * #cairo_raster_source_snapshot_func_t is the type of function which is + * called when the pixel data needs to be preserved for later use + * during printing. This pattern will be accessed again later, and it + * is expected to provide the pixel data that was current at the time + * of snapshotting. + * + * Return value: CAIRO_STATUS_SUCCESS on success, or one of the + * #cairo_status_t error codes for failure. + * + * Since: 1.12 + **/ +typedef cairo_status_t +(*cairo_raster_source_snapshot_func_t) (cairo_pattern_t *pattern, + void *callback_data); + +/** + * cairo_raster_source_copy_func_t: + * @pattern: the #cairo_pattern_t that was copied to + * @callback_data: the user data supplied during creation + * @other: the #cairo_pattern_t being used as the source for the copy + * + * #cairo_raster_source_copy_func_t is the type of function which is + * called when the pattern gets copied as a normal part of rendering. + * + * Return value: CAIRO_STATUS_SUCCESS on success, or one of the + * #cairo_status_t error codes for failure. + * + * Since: 1.12 + **/ +typedef cairo_status_t +(*cairo_raster_source_copy_func_t) (cairo_pattern_t *pattern, + void *callback_data, + const cairo_pattern_t *other); + +/** + * cairo_raster_source_finish_func_t: + * @pattern: the pattern being rendered from + * @callback_data: the user data supplied during creation + * + * #cairo_raster_source_finish_func_t is the type of function which is + * called when the pattern (or a copy thereof) is no longer required. + * + * Since: 1.12 + **/ +typedef void +(*cairo_raster_source_finish_func_t) (cairo_pattern_t *pattern, + void *callback_data); + +cairo_public cairo_pattern_t * +cairo_pattern_create_raster_source (void *user_data, + cairo_content_t content, + int width, int height); + +cairo_public void +cairo_raster_source_pattern_set_callback_data (cairo_pattern_t *pattern, + void *data); + +cairo_public void * +cairo_raster_source_pattern_get_callback_data (cairo_pattern_t *pattern); + +cairo_public void +cairo_raster_source_pattern_set_acquire (cairo_pattern_t *pattern, + cairo_raster_source_acquire_func_t acquire, + cairo_raster_source_release_func_t release); + +cairo_public void +cairo_raster_source_pattern_get_acquire (cairo_pattern_t *pattern, + cairo_raster_source_acquire_func_t *acquire, + cairo_raster_source_release_func_t *release); +cairo_public void +cairo_raster_source_pattern_set_snapshot (cairo_pattern_t *pattern, + cairo_raster_source_snapshot_func_t snapshot); + +cairo_public cairo_raster_source_snapshot_func_t +cairo_raster_source_pattern_get_snapshot (cairo_pattern_t *pattern); + +cairo_public void +cairo_raster_source_pattern_set_copy (cairo_pattern_t *pattern, + cairo_raster_source_copy_func_t copy); + +cairo_public cairo_raster_source_copy_func_t +cairo_raster_source_pattern_get_copy (cairo_pattern_t *pattern); + +cairo_public void +cairo_raster_source_pattern_set_finish (cairo_pattern_t *pattern, + cairo_raster_source_finish_func_t finish); + +cairo_public cairo_raster_source_finish_func_t +cairo_raster_source_pattern_get_finish (cairo_pattern_t *pattern); + +/* Pattern creation functions */ + +cairo_public cairo_pattern_t * +cairo_pattern_create_rgb (double red, double green, double blue); + +cairo_public cairo_pattern_t * +cairo_pattern_create_rgba (double red, double green, double blue, + double alpha); + +cairo_public cairo_pattern_t * +cairo_pattern_create_for_surface (cairo_surface_t *surface); + +cairo_public cairo_pattern_t * +cairo_pattern_create_linear (double x0, double y0, + double x1, double y1); + +cairo_public cairo_pattern_t * +cairo_pattern_create_radial (double cx0, double cy0, double radius0, + double cx1, double cy1, double radius1); + +cairo_public cairo_pattern_t * +cairo_pattern_create_mesh (void); + +cairo_public cairo_pattern_t * +cairo_pattern_reference (cairo_pattern_t *pattern); + +cairo_public void +cairo_pattern_destroy (cairo_pattern_t *pattern); + +cairo_public unsigned int +cairo_pattern_get_reference_count (cairo_pattern_t *pattern); + +cairo_public cairo_status_t +cairo_pattern_status (cairo_pattern_t *pattern); + +cairo_public void * +cairo_pattern_get_user_data (cairo_pattern_t *pattern, + const cairo_user_data_key_t *key); + +cairo_public cairo_status_t +cairo_pattern_set_user_data (cairo_pattern_t *pattern, + const cairo_user_data_key_t *key, + void *user_data, + cairo_destroy_func_t destroy); + +/** + * cairo_pattern_type_t: + * @CAIRO_PATTERN_TYPE_SOLID: The pattern is a solid (uniform) + * color. It may be opaque or translucent, since 1.2. + * @CAIRO_PATTERN_TYPE_SURFACE: The pattern is a based on a surface (an image), since 1.2. + * @CAIRO_PATTERN_TYPE_LINEAR: The pattern is a linear gradient, since 1.2. + * @CAIRO_PATTERN_TYPE_RADIAL: The pattern is a radial gradient, since 1.2. + * @CAIRO_PATTERN_TYPE_MESH: The pattern is a mesh, since 1.12. + * @CAIRO_PATTERN_TYPE_RASTER_SOURCE: The pattern is a user pattern providing raster data, since 1.12. + * + * #cairo_pattern_type_t is used to describe the type of a given pattern. + * + * The type of a pattern is determined by the function used to create + * it. The cairo_pattern_create_rgb() and cairo_pattern_create_rgba() + * functions create SOLID patterns. The remaining + * cairo_pattern_create functions map to pattern types in obvious + * ways. + * + * The pattern type can be queried with cairo_pattern_get_type() + * + * Most #cairo_pattern_t functions can be called with a pattern of any + * type, (though trying to change the extend or filter for a solid + * pattern will have no effect). A notable exception is + * cairo_pattern_add_color_stop_rgb() and + * cairo_pattern_add_color_stop_rgba() which must only be called with + * gradient patterns (either LINEAR or RADIAL). Otherwise the pattern + * will be shutdown and put into an error state. + * + * New entries may be added in future versions. + * + * Since: 1.2 + **/ +typedef enum _cairo_pattern_type { + CAIRO_PATTERN_TYPE_SOLID, + CAIRO_PATTERN_TYPE_SURFACE, + CAIRO_PATTERN_TYPE_LINEAR, + CAIRO_PATTERN_TYPE_RADIAL, + CAIRO_PATTERN_TYPE_MESH, + CAIRO_PATTERN_TYPE_RASTER_SOURCE +} cairo_pattern_type_t; + +cairo_public cairo_pattern_type_t +cairo_pattern_get_type (cairo_pattern_t *pattern); + +cairo_public void +cairo_pattern_add_color_stop_rgb (cairo_pattern_t *pattern, + double offset, + double red, double green, double blue); + +cairo_public void +cairo_pattern_add_color_stop_rgba (cairo_pattern_t *pattern, + double offset, + double red, double green, double blue, + double alpha); + +cairo_public void +cairo_mesh_pattern_begin_patch (cairo_pattern_t *pattern); + +cairo_public void +cairo_mesh_pattern_end_patch (cairo_pattern_t *pattern); + +cairo_public void +cairo_mesh_pattern_curve_to (cairo_pattern_t *pattern, + double x1, double y1, + double x2, double y2, + double x3, double y3); + +cairo_public void +cairo_mesh_pattern_line_to (cairo_pattern_t *pattern, + double x, double y); + +cairo_public void +cairo_mesh_pattern_move_to (cairo_pattern_t *pattern, + double x, double y); + +cairo_public void +cairo_mesh_pattern_set_control_point (cairo_pattern_t *pattern, + unsigned int point_num, + double x, double y); + +cairo_public void +cairo_mesh_pattern_set_corner_color_rgb (cairo_pattern_t *pattern, + unsigned int corner_num, + double red, double green, double blue); + +cairo_public void +cairo_mesh_pattern_set_corner_color_rgba (cairo_pattern_t *pattern, + unsigned int corner_num, + double red, double green, double blue, + double alpha); + +cairo_public void +cairo_pattern_set_matrix (cairo_pattern_t *pattern, + const cairo_matrix_t *matrix); + +cairo_public void +cairo_pattern_get_matrix (cairo_pattern_t *pattern, + cairo_matrix_t *matrix); + +/** + * cairo_extend_t: + * @CAIRO_EXTEND_NONE: pixels outside of the source pattern + * are fully transparent (Since 1.0) + * @CAIRO_EXTEND_REPEAT: the pattern is tiled by repeating (Since 1.0) + * @CAIRO_EXTEND_REFLECT: the pattern is tiled by reflecting + * at the edges (Since 1.0; but only implemented for surface patterns since 1.6) + * @CAIRO_EXTEND_PAD: pixels outside of the pattern copy + * the closest pixel from the source (Since 1.2; but only + * implemented for surface patterns since 1.6) + * + * #cairo_extend_t is used to describe how pattern color/alpha will be + * determined for areas "outside" the pattern's natural area, (for + * example, outside the surface bounds or outside the gradient + * geometry). + * + * Mesh patterns are not affected by the extend mode. + * + * The default extend mode is %CAIRO_EXTEND_NONE for surface patterns + * and %CAIRO_EXTEND_PAD for gradient patterns. + * + * New entries may be added in future versions. + * + * Since: 1.0 + **/ +typedef enum _cairo_extend { + CAIRO_EXTEND_NONE, + CAIRO_EXTEND_REPEAT, + CAIRO_EXTEND_REFLECT, + CAIRO_EXTEND_PAD +} cairo_extend_t; + +cairo_public void +cairo_pattern_set_extend (cairo_pattern_t *pattern, cairo_extend_t extend); + +cairo_public cairo_extend_t +cairo_pattern_get_extend (cairo_pattern_t *pattern); + +/** + * cairo_filter_t: + * @CAIRO_FILTER_FAST: A high-performance filter, with quality similar + * to %CAIRO_FILTER_NEAREST (Since 1.0) + * @CAIRO_FILTER_GOOD: A reasonable-performance filter, with quality + * similar to %CAIRO_FILTER_BILINEAR (Since 1.0) + * @CAIRO_FILTER_BEST: The highest-quality available, performance may + * not be suitable for interactive use. (Since 1.0) + * @CAIRO_FILTER_NEAREST: Nearest-neighbor filtering (Since 1.0) + * @CAIRO_FILTER_BILINEAR: Linear interpolation in two dimensions (Since 1.0) + * @CAIRO_FILTER_GAUSSIAN: This filter value is currently + * unimplemented, and should not be used in current code. (Since 1.0) + * + * #cairo_filter_t is used to indicate what filtering should be + * applied when reading pixel values from patterns. See + * cairo_pattern_set_filter() for indicating the desired filter to be + * used with a particular pattern. + * + * Since: 1.0 + **/ +typedef enum _cairo_filter { + CAIRO_FILTER_FAST, + CAIRO_FILTER_GOOD, + CAIRO_FILTER_BEST, + CAIRO_FILTER_NEAREST, + CAIRO_FILTER_BILINEAR, + CAIRO_FILTER_GAUSSIAN +} cairo_filter_t; + +cairo_public void +cairo_pattern_set_filter (cairo_pattern_t *pattern, cairo_filter_t filter); + +cairo_public cairo_filter_t +cairo_pattern_get_filter (cairo_pattern_t *pattern); + +cairo_public cairo_status_t +cairo_pattern_get_rgba (cairo_pattern_t *pattern, + double *red, double *green, + double *blue, double *alpha); + +cairo_public cairo_status_t +cairo_pattern_get_surface (cairo_pattern_t *pattern, + cairo_surface_t **surface); + + +cairo_public cairo_status_t +cairo_pattern_get_color_stop_rgba (cairo_pattern_t *pattern, + int index, double *offset, + double *red, double *green, + double *blue, double *alpha); + +cairo_public cairo_status_t +cairo_pattern_get_color_stop_count (cairo_pattern_t *pattern, + int *count); + +cairo_public cairo_status_t +cairo_pattern_get_linear_points (cairo_pattern_t *pattern, + double *x0, double *y0, + double *x1, double *y1); + +cairo_public cairo_status_t +cairo_pattern_get_radial_circles (cairo_pattern_t *pattern, + double *x0, double *y0, double *r0, + double *x1, double *y1, double *r1); + +cairo_public cairo_status_t +cairo_mesh_pattern_get_patch_count (cairo_pattern_t *pattern, + unsigned int *count); + +cairo_public cairo_path_t * +cairo_mesh_pattern_get_path (cairo_pattern_t *pattern, + unsigned int patch_num); + +cairo_public cairo_status_t +cairo_mesh_pattern_get_corner_color_rgba (cairo_pattern_t *pattern, + unsigned int patch_num, + unsigned int corner_num, + double *red, double *green, + double *blue, double *alpha); + +cairo_public cairo_status_t +cairo_mesh_pattern_get_control_point (cairo_pattern_t *pattern, + unsigned int patch_num, + unsigned int point_num, + double *x, double *y); + +/* Matrix functions */ + +cairo_public void +cairo_matrix_init (cairo_matrix_t *matrix, + double xx, double yx, + double xy, double yy, + double x0, double y0); + +cairo_public void +cairo_matrix_init_identity (cairo_matrix_t *matrix); + +cairo_public void +cairo_matrix_init_translate (cairo_matrix_t *matrix, + double tx, double ty); + +cairo_public void +cairo_matrix_init_scale (cairo_matrix_t *matrix, + double sx, double sy); + +cairo_public void +cairo_matrix_init_rotate (cairo_matrix_t *matrix, + double radians); + +cairo_public void +cairo_matrix_translate (cairo_matrix_t *matrix, double tx, double ty); + +cairo_public void +cairo_matrix_scale (cairo_matrix_t *matrix, double sx, double sy); + +cairo_public void +cairo_matrix_rotate (cairo_matrix_t *matrix, double radians); + +cairo_public cairo_status_t +cairo_matrix_invert (cairo_matrix_t *matrix); + +cairo_public void +cairo_matrix_multiply (cairo_matrix_t *result, + const cairo_matrix_t *a, + const cairo_matrix_t *b); + +cairo_public void +cairo_matrix_transform_distance (const cairo_matrix_t *matrix, + double *dx, double *dy); + +cairo_public void +cairo_matrix_transform_point (const cairo_matrix_t *matrix, + double *x, double *y); + +/* Region functions */ + +/** + * cairo_region_t: + * + * A #cairo_region_t represents a set of integer-aligned rectangles. + * + * It allows set-theoretical operations like cairo_region_union() and + * cairo_region_intersect() to be performed on them. + * + * Memory management of #cairo_region_t is done with + * cairo_region_reference() and cairo_region_destroy(). + * + * Since: 1.10 + **/ +typedef struct _cairo_region cairo_region_t; + +/** + * cairo_region_overlap_t: + * @CAIRO_REGION_OVERLAP_IN: The contents are entirely inside the region. (Since 1.10) + * @CAIRO_REGION_OVERLAP_OUT: The contents are entirely outside the region. (Since 1.10) + * @CAIRO_REGION_OVERLAP_PART: The contents are partially inside and + * partially outside the region. (Since 1.10) + * + * Used as the return value for cairo_region_contains_rectangle(). + * + * Since: 1.10 + **/ +typedef enum _cairo_region_overlap { + CAIRO_REGION_OVERLAP_IN, /* completely inside region */ + CAIRO_REGION_OVERLAP_OUT, /* completely outside region */ + CAIRO_REGION_OVERLAP_PART /* partly inside region */ +} cairo_region_overlap_t; + +cairo_public cairo_region_t * +cairo_region_create (void); + +cairo_public cairo_region_t * +cairo_region_create_rectangle (const cairo_rectangle_int_t *rectangle); + +cairo_public cairo_region_t * +cairo_region_create_rectangles (const cairo_rectangle_int_t *rects, + int count); + +cairo_public cairo_region_t * +cairo_region_copy (const cairo_region_t *original); + +cairo_public cairo_region_t * +cairo_region_reference (cairo_region_t *region); + +cairo_public void +cairo_region_destroy (cairo_region_t *region); + +cairo_public cairo_bool_t +cairo_region_equal (const cairo_region_t *a, const cairo_region_t *b); + +cairo_public cairo_status_t +cairo_region_status (const cairo_region_t *region); + +cairo_public void +cairo_region_get_extents (const cairo_region_t *region, + cairo_rectangle_int_t *extents); + +cairo_public int +cairo_region_num_rectangles (const cairo_region_t *region); + +cairo_public void +cairo_region_get_rectangle (const cairo_region_t *region, + int nth, + cairo_rectangle_int_t *rectangle); + +cairo_public cairo_bool_t +cairo_region_is_empty (const cairo_region_t *region); + +cairo_public cairo_region_overlap_t +cairo_region_contains_rectangle (const cairo_region_t *region, + const cairo_rectangle_int_t *rectangle); + +cairo_public cairo_bool_t +cairo_region_contains_point (const cairo_region_t *region, int x, int y); + +cairo_public void +cairo_region_translate (cairo_region_t *region, int dx, int dy); + +cairo_public cairo_status_t +cairo_region_subtract (cairo_region_t *dst, const cairo_region_t *other); + +cairo_public cairo_status_t +cairo_region_subtract_rectangle (cairo_region_t *dst, + const cairo_rectangle_int_t *rectangle); + +cairo_public cairo_status_t +cairo_region_intersect (cairo_region_t *dst, const cairo_region_t *other); + +cairo_public cairo_status_t +cairo_region_intersect_rectangle (cairo_region_t *dst, + const cairo_rectangle_int_t *rectangle); + +cairo_public cairo_status_t +cairo_region_union (cairo_region_t *dst, const cairo_region_t *other); + +cairo_public cairo_status_t +cairo_region_union_rectangle (cairo_region_t *dst, + const cairo_rectangle_int_t *rectangle); + +cairo_public cairo_status_t +cairo_region_xor (cairo_region_t *dst, const cairo_region_t *other); + +cairo_public cairo_status_t +cairo_region_xor_rectangle (cairo_region_t *dst, + const cairo_rectangle_int_t *rectangle); + +/* Functions to be used while debugging (not intended for use in production code) */ +cairo_public void +cairo_debug_reset_static_data (void); + + +CAIRO_END_DECLS + +#endif /* CAIRO_H */ diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/cairo/libcairo-trace.0.dylib b/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/cairo/libcairo-trace.0.dylib new file mode 100755 index 00000000..537ce6bb Binary files /dev/null and b/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/cairo/libcairo-trace.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/cairo/libcairo-trace.dylib b/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/cairo/libcairo-trace.dylib new file mode 120000 index 00000000..11f37fb0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/cairo/libcairo-trace.dylib @@ -0,0 +1 @@ +libcairo-trace.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/libcairo-gobject.2.dylib b/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/libcairo-gobject.2.dylib new file mode 100755 index 00000000..22526af7 Binary files /dev/null and b/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/libcairo-gobject.2.dylib differ diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/libcairo-gobject.dylib b/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/libcairo-gobject.dylib new file mode 120000 index 00000000..103b3ec6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/libcairo-gobject.dylib @@ -0,0 +1 @@ +libcairo-gobject.2.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/libcairo-script-interpreter.2.dylib b/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/libcairo-script-interpreter.2.dylib new file mode 100755 index 00000000..e6f8463b Binary files /dev/null and b/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/libcairo-script-interpreter.2.dylib differ diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/libcairo-script-interpreter.dylib b/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/libcairo-script-interpreter.dylib new file mode 120000 index 00000000..fcd57392 --- /dev/null +++ b/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/libcairo-script-interpreter.dylib @@ -0,0 +1 @@ +libcairo-script-interpreter.2.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/libcairo.2.dylib b/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/libcairo.2.dylib new file mode 100755 index 00000000..de3710e9 Binary files /dev/null and b/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/libcairo.2.dylib differ diff --git a/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/libcairo.dylib b/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/libcairo.dylib new file mode 120000 index 00000000..a150a32b --- /dev/null +++ b/frameworks/cairosvg/dependencies/cairo/1.14.12/lib/libcairo.dylib @@ -0,0 +1 @@ +libcairo.2.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/fontconfig/2.13.0/include/fontconfig/fcfreetype.h b/frameworks/cairosvg/dependencies/fontconfig/2.13.0/include/fontconfig/fcfreetype.h new file mode 100755 index 00000000..20b11286 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fontconfig/2.13.0/include/fontconfig/fcfreetype.h @@ -0,0 +1,59 @@ +/* + * fontconfig/fontconfig/fcfreetype.h + * + * Copyright © 2001 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of the author(s) not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. The authors make no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _FCFREETYPE_H_ +#define _FCFREETYPE_H_ +#include +#include FT_FREETYPE_H + +#ifndef FcPublic +#define FcPublic +#endif + +_FCFUNCPROTOBEGIN + +FcPublic FT_UInt +FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4); + +FcPublic FcCharSet * +FcFreeTypeCharSetAndSpacing (FT_Face face, FcBlanks *blanks, int *spacing); + +FcPublic FcCharSet * +FcFreeTypeCharSet (FT_Face face, FcBlanks *blanks); + +FcPublic FcResult +FcPatternGetFTFace (const FcPattern *p, const char *object, int n, FT_Face *f); + +FcPublic FcBool +FcPatternAddFTFace (FcPattern *p, const char *object, const FT_Face f); + +FcPublic FcPattern * +FcFreeTypeQueryFace (const FT_Face face, + const FcChar8 *file, + unsigned int id, + FcBlanks *blanks); + +_FCFUNCPROTOEND + +#endif diff --git a/frameworks/cairosvg/dependencies/fontconfig/2.13.0/include/fontconfig/fcprivate.h b/frameworks/cairosvg/dependencies/fontconfig/2.13.0/include/fontconfig/fcprivate.h new file mode 100755 index 00000000..23021b2f --- /dev/null +++ b/frameworks/cairosvg/dependencies/fontconfig/2.13.0/include/fontconfig/fcprivate.h @@ -0,0 +1,134 @@ +/* + * fontconfig/fontconfig/fcprivate.h + * + * Copyright © 2001 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of the author(s) not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. The authors make no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _FCPRIVATE_H_ +#define _FCPRIVATE_H_ + +/* + * I tried this with functions that took va_list* arguments + * but portability concerns made me change these functions + * into macros (sigh). + */ + +#define FcPatternVapBuild(result, orig, va) \ +{ \ + FcPattern *__p__ = (orig); \ + const char *__o__; \ + FcValue __v__; \ + \ + if (!__p__) \ + { \ + __p__ = FcPatternCreate (); \ + if (!__p__) \ + goto _FcPatternVapBuild_bail0; \ + } \ + for (;;) \ + { \ + __o__ = va_arg (va, const char *); \ + if (!__o__) \ + break; \ + __v__.type = va_arg (va, int); \ + switch (__v__.type) { \ + case FcTypeUnknown: \ + case FcTypeVoid: \ + goto _FcPatternVapBuild_bail1; \ + case FcTypeInteger: \ + __v__.u.i = va_arg (va, int); \ + break; \ + case FcTypeDouble: \ + __v__.u.d = va_arg (va, double); \ + break; \ + case FcTypeString: \ + __v__.u.s = va_arg (va, const FcChar8 *); \ + break; \ + case FcTypeBool: \ + __v__.u.b = va_arg (va, FcBool); \ + break; \ + case FcTypeMatrix: \ + __v__.u.m = va_arg (va, const FcMatrix *); \ + break; \ + case FcTypeCharSet: \ + __v__.u.c = va_arg (va, const FcCharSet *); \ + break; \ + case FcTypeFTFace: \ + __v__.u.f = va_arg (va, FT_Face); \ + break; \ + case FcTypeLangSet: \ + __v__.u.l = va_arg (va, const FcLangSet *); \ + break; \ + case FcTypeRange: \ + __v__.u.r = va_arg (va, const FcRange *); \ + break; \ + } \ + if (!FcPatternAdd (__p__, __o__, __v__, FcTrue)) \ + goto _FcPatternVapBuild_bail1; \ + } \ + result = __p__; \ + goto _FcPatternVapBuild_return; \ + \ +_FcPatternVapBuild_bail1: \ + if (!orig) \ + FcPatternDestroy (__p__); \ +_FcPatternVapBuild_bail0: \ + result = (void*)0; \ + \ +_FcPatternVapBuild_return: \ + ; \ +} + + +#define FcObjectSetVapBuild(__ret__, __first__, __va__) \ +{ \ + FcObjectSet *__os__; \ + const char *__ob__; \ + \ + __ret__ = 0; \ + __os__ = FcObjectSetCreate (); \ + if (!__os__) \ + goto _FcObjectSetVapBuild_bail0; \ + __ob__ = __first__; \ + while (__ob__) \ + { \ + if (!FcObjectSetAdd (__os__, __ob__)) \ + goto _FcObjectSetVapBuild_bail1; \ + __ob__ = va_arg (__va__, const char *); \ + } \ + __ret__ = __os__; \ + \ +_FcObjectSetVapBuild_bail1: \ + if (!__ret__ && __os__) \ + FcObjectSetDestroy (__os__); \ +_FcObjectSetVapBuild_bail0: \ + ; \ +} + +#ifndef FC_ATTRIBUTE_VISIBILITY_HIDDEN +#define FC_ATTRIBUTE_VISIBILITY_HIDDEN __attribute((visibility("hidden"))) +#endif + +#ifndef FC_ATTRIBUTE_VISIBILITY_EXPORT +#define FC_ATTRIBUTE_VISIBILITY_EXPORT __attribute((visibility("default"))) +#endif + +#endif /* _FCPRIVATE_H_ */ diff --git a/frameworks/cairosvg/dependencies/fontconfig/2.13.0/include/fontconfig/fontconfig.h b/frameworks/cairosvg/dependencies/fontconfig/2.13.0/include/fontconfig/fontconfig.h new file mode 100755 index 00000000..a89b22f2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fontconfig/2.13.0/include/fontconfig/fontconfig.h @@ -0,0 +1,1107 @@ +/* + * fontconfig/fontconfig/fontconfig.h + * + * Copyright © 2001 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of the author(s) not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. The authors make no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _FONTCONFIG_H_ +#define _FONTCONFIG_H_ + +#include +#include +#include +#include + +#if defined(__GNUC__) && (__GNUC__ >= 4) +#define FC_ATTRIBUTE_SENTINEL(x) __attribute__((__sentinel__(0))) +#else +#define FC_ATTRIBUTE_SENTINEL(x) +#endif + +#ifndef FcPublic +#define FcPublic +#endif + +typedef unsigned char FcChar8; +typedef unsigned short FcChar16; +typedef unsigned int FcChar32; +typedef int FcBool; + +/* + * Current Fontconfig version number. This same number + * must appear in the fontconfig configure.in file. Yes, + * it'a a pain to synchronize version numbers like this. + */ + +#define FC_MAJOR 2 +#define FC_MINOR 13 +#define FC_REVISION 0 + +#define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION)) + +/* + * Current font cache file format version + * This is appended to the cache files so that multiple + * versions of the library will peacefully coexist + * + * Change this value whenever the disk format for the cache file + * changes in any non-compatible way. Try to avoid such changes as + * it means multiple copies of the font information. + */ + +#define FC_CACHE_VERSION_NUMBER 7 +#define _FC_STRINGIFY_(s) #s +#define _FC_STRINGIFY(s) _FC_STRINGIFY_(s) +#define FC_CACHE_VERSION _FC_STRINGIFY(FC_CACHE_VERSION_NUMBER) + +#define FcFalse 0 +#define FcTrue 1 +#define FcDontCare 2 + +#define FC_FAMILY "family" /* String */ +#define FC_STYLE "style" /* String */ +#define FC_SLANT "slant" /* Int */ +#define FC_WEIGHT "weight" /* Int */ +#define FC_SIZE "size" /* Range (double) */ +#define FC_ASPECT "aspect" /* Double */ +#define FC_PIXEL_SIZE "pixelsize" /* Double */ +#define FC_SPACING "spacing" /* Int */ +#define FC_FOUNDRY "foundry" /* String */ +#define FC_ANTIALIAS "antialias" /* Bool (depends) */ +#define FC_HINTING "hinting" /* Bool (true) */ +#define FC_HINT_STYLE "hintstyle" /* Int */ +#define FC_VERTICAL_LAYOUT "verticallayout" /* Bool (false) */ +#define FC_AUTOHINT "autohint" /* Bool (false) */ +/* FC_GLOBAL_ADVANCE is deprecated. this is simply ignored on freetype 2.4.5 or later */ +#define FC_GLOBAL_ADVANCE "globaladvance" /* Bool (true) */ +#define FC_WIDTH "width" /* Int */ +#define FC_FILE "file" /* String */ +#define FC_INDEX "index" /* Int */ +#define FC_FT_FACE "ftface" /* FT_Face */ +#define FC_RASTERIZER "rasterizer" /* String (deprecated) */ +#define FC_OUTLINE "outline" /* Bool */ +#define FC_SCALABLE "scalable" /* Bool */ +#define FC_COLOR "color" /* Bool */ +#define FC_VARIABLE "variable" /* Bool */ +#define FC_SCALE "scale" /* double (deprecated) */ +#define FC_SYMBOL "symbol" /* Bool */ +#define FC_DPI "dpi" /* double */ +#define FC_RGBA "rgba" /* Int */ +#define FC_MINSPACE "minspace" /* Bool use minimum line spacing */ +#define FC_SOURCE "source" /* String (deprecated) */ +#define FC_CHARSET "charset" /* CharSet */ +#define FC_LANG "lang" /* String RFC 3066 langs */ +#define FC_FONTVERSION "fontversion" /* Int from 'head' table */ +#define FC_FULLNAME "fullname" /* String */ +#define FC_FAMILYLANG "familylang" /* String RFC 3066 langs */ +#define FC_STYLELANG "stylelang" /* String RFC 3066 langs */ +#define FC_FULLNAMELANG "fullnamelang" /* String RFC 3066 langs */ +#define FC_CAPABILITY "capability" /* String */ +#define FC_FONTFORMAT "fontformat" /* String */ +#define FC_EMBOLDEN "embolden" /* Bool - true if emboldening needed*/ +#define FC_EMBEDDED_BITMAP "embeddedbitmap" /* Bool - true to enable embedded bitmaps */ +#define FC_DECORATIVE "decorative" /* Bool - true if style is a decorative variant */ +#define FC_LCD_FILTER "lcdfilter" /* Int */ +#define FC_FONT_FEATURES "fontfeatures" /* String */ +#define FC_FONT_VARIATIONS "fontvariations" /* String */ +#define FC_NAMELANG "namelang" /* String RFC 3866 langs */ +#define FC_PRGNAME "prgname" /* String */ +#define FC_HASH "hash" /* String (deprecated) */ +#define FC_POSTSCRIPT_NAME "postscriptname" /* String */ + +#define FC_CACHE_SUFFIX ".cache-" FC_CACHE_VERSION +#define FC_DIR_CACHE_FILE "fonts.cache-" FC_CACHE_VERSION +#define FC_USER_CACHE_FILE ".fonts.cache-" FC_CACHE_VERSION + +/* Adjust outline rasterizer */ +#define FC_CHARWIDTH "charwidth" /* Int */ +#define FC_CHAR_WIDTH FC_CHARWIDTH +#define FC_CHAR_HEIGHT "charheight"/* Int */ +#define FC_MATRIX "matrix" /* FcMatrix */ + +#define FC_WEIGHT_THIN 0 +#define FC_WEIGHT_EXTRALIGHT 40 +#define FC_WEIGHT_ULTRALIGHT FC_WEIGHT_EXTRALIGHT +#define FC_WEIGHT_LIGHT 50 +#define FC_WEIGHT_DEMILIGHT 55 +#define FC_WEIGHT_SEMILIGHT FC_WEIGHT_DEMILIGHT +#define FC_WEIGHT_BOOK 75 +#define FC_WEIGHT_REGULAR 80 +#define FC_WEIGHT_NORMAL FC_WEIGHT_REGULAR +#define FC_WEIGHT_MEDIUM 100 +#define FC_WEIGHT_DEMIBOLD 180 +#define FC_WEIGHT_SEMIBOLD FC_WEIGHT_DEMIBOLD +#define FC_WEIGHT_BOLD 200 +#define FC_WEIGHT_EXTRABOLD 205 +#define FC_WEIGHT_ULTRABOLD FC_WEIGHT_EXTRABOLD +#define FC_WEIGHT_BLACK 210 +#define FC_WEIGHT_HEAVY FC_WEIGHT_BLACK +#define FC_WEIGHT_EXTRABLACK 215 +#define FC_WEIGHT_ULTRABLACK FC_WEIGHT_EXTRABLACK + +#define FC_SLANT_ROMAN 0 +#define FC_SLANT_ITALIC 100 +#define FC_SLANT_OBLIQUE 110 + +#define FC_WIDTH_ULTRACONDENSED 50 +#define FC_WIDTH_EXTRACONDENSED 63 +#define FC_WIDTH_CONDENSED 75 +#define FC_WIDTH_SEMICONDENSED 87 +#define FC_WIDTH_NORMAL 100 +#define FC_WIDTH_SEMIEXPANDED 113 +#define FC_WIDTH_EXPANDED 125 +#define FC_WIDTH_EXTRAEXPANDED 150 +#define FC_WIDTH_ULTRAEXPANDED 200 + +#define FC_PROPORTIONAL 0 +#define FC_DUAL 90 +#define FC_MONO 100 +#define FC_CHARCELL 110 + +/* sub-pixel order */ +#define FC_RGBA_UNKNOWN 0 +#define FC_RGBA_RGB 1 +#define FC_RGBA_BGR 2 +#define FC_RGBA_VRGB 3 +#define FC_RGBA_VBGR 4 +#define FC_RGBA_NONE 5 + +/* hinting style */ +#define FC_HINT_NONE 0 +#define FC_HINT_SLIGHT 1 +#define FC_HINT_MEDIUM 2 +#define FC_HINT_FULL 3 + +/* LCD filter */ +#define FC_LCD_NONE 0 +#define FC_LCD_DEFAULT 1 +#define FC_LCD_LIGHT 2 +#define FC_LCD_LEGACY 3 + +typedef enum _FcType { + FcTypeUnknown = -1, + FcTypeVoid, + FcTypeInteger, + FcTypeDouble, + FcTypeString, + FcTypeBool, + FcTypeMatrix, + FcTypeCharSet, + FcTypeFTFace, + FcTypeLangSet, + FcTypeRange +} FcType; + +typedef struct _FcMatrix { + double xx, xy, yx, yy; +} FcMatrix; + +#define FcMatrixInit(m) ((m)->xx = (m)->yy = 1, \ + (m)->xy = (m)->yx = 0) + +/* + * A data structure to represent the available glyphs in a font. + * This is represented as a sparse boolean btree. + */ + +typedef struct _FcCharSet FcCharSet; + +typedef struct _FcObjectType { + char *object; + FcType type; +} FcObjectType; + +typedef struct _FcConstant { + const FcChar8 *name; + const char *object; + int value; +} FcConstant; + +typedef enum _FcResult { + FcResultMatch, FcResultNoMatch, FcResultTypeMismatch, FcResultNoId, + FcResultOutOfMemory +} FcResult; + +typedef enum _FcValueBinding { + FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame, + /* to make sure sizeof (FcValueBinding) == 4 even with -fshort-enums */ + FcValueBindingEnd = INT_MAX +} FcValueBinding; + +typedef struct _FcPattern FcPattern; + +typedef struct _FcLangSet FcLangSet; + +typedef struct _FcRange FcRange; + +typedef struct _FcValue { + FcType type; + union { + const FcChar8 *s; + int i; + FcBool b; + double d; + const FcMatrix *m; + const FcCharSet *c; + void *f; + const FcLangSet *l; + const FcRange *r; + } u; +} FcValue; + +typedef struct _FcFontSet { + int nfont; + int sfont; + FcPattern **fonts; +} FcFontSet; + +typedef struct _FcObjectSet { + int nobject; + int sobject; + const char **objects; +} FcObjectSet; + +typedef enum _FcMatchKind { + FcMatchPattern, FcMatchFont, FcMatchScan, + FcMatchKindEnd, + FcMatchKindBegin = FcMatchPattern +} FcMatchKind; + +typedef enum _FcLangResult { + FcLangEqual = 0, + FcLangDifferentCountry = 1, + FcLangDifferentTerritory = 1, + FcLangDifferentLang = 2 +} FcLangResult; + +typedef enum _FcSetName { + FcSetSystem = 0, + FcSetApplication = 1 +} FcSetName; + +typedef struct _FcConfigFileInfoIter { + void *dummy1; + void *dummy2; + void *dummy3; +} FcConfigFileInfoIter; + +typedef struct _FcAtomic FcAtomic; + +#if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */ +#define _FCFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */ +#define _FCFUNCPROTOEND } +#else +#define _FCFUNCPROTOBEGIN +#define _FCFUNCPROTOEND +#endif + +typedef enum { FcEndianBig, FcEndianLittle } FcEndian; + +typedef struct _FcConfig FcConfig; + +typedef struct _FcGlobalCache FcFileCache; + +typedef struct _FcBlanks FcBlanks; + +typedef struct _FcStrList FcStrList; + +typedef struct _FcStrSet FcStrSet; + +typedef struct _FcCache FcCache; + +_FCFUNCPROTOBEGIN + +/* fcblanks.c */ +FcPublic FcBlanks * +FcBlanksCreate (void); + +FcPublic void +FcBlanksDestroy (FcBlanks *b); + +FcPublic FcBool +FcBlanksAdd (FcBlanks *b, FcChar32 ucs4); + +FcPublic FcBool +FcBlanksIsMember (FcBlanks *b, FcChar32 ucs4); + +/* fccache.c */ + +FcPublic const FcChar8 * +FcCacheDir(const FcCache *c); + +FcPublic FcFontSet * +FcCacheCopySet(const FcCache *c); + +FcPublic const FcChar8 * +FcCacheSubdir (const FcCache *c, int i); + +FcPublic int +FcCacheNumSubdir (const FcCache *c); + +FcPublic int +FcCacheNumFont (const FcCache *c); + +FcPublic FcBool +FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config); + +FcPublic FcBool +FcDirCacheValid (const FcChar8 *cache_file); + +FcPublic FcBool +FcDirCacheClean (const FcChar8 *cache_dir, FcBool verbose); + +FcPublic void +FcCacheCreateTagFile (const FcConfig *config); + +FcPublic FcBool +FcDirCacheCreateUUID (FcChar8 *dir, + FcBool force, + FcConfig *config); + +/* fccfg.c */ +FcPublic FcChar8 * +FcConfigHome (void); + +FcPublic FcBool +FcConfigEnableHome (FcBool enable); + +FcPublic FcChar8 * +FcConfigFilename (const FcChar8 *url); + +FcPublic FcConfig * +FcConfigCreate (void); + +FcPublic FcConfig * +FcConfigReference (FcConfig *config); + +FcPublic void +FcConfigDestroy (FcConfig *config); + +FcPublic FcBool +FcConfigSetCurrent (FcConfig *config); + +FcPublic FcConfig * +FcConfigGetCurrent (void); + +FcPublic FcBool +FcConfigUptoDate (FcConfig *config); + +FcPublic FcBool +FcConfigBuildFonts (FcConfig *config); + +FcPublic FcStrList * +FcConfigGetFontDirs (FcConfig *config); + +FcPublic FcStrList * +FcConfigGetConfigDirs (FcConfig *config); + +FcPublic FcStrList * +FcConfigGetConfigFiles (FcConfig *config); + +FcPublic FcChar8 * +FcConfigGetCache (FcConfig *config); + +FcPublic FcBlanks * +FcConfigGetBlanks (FcConfig *config); + +FcPublic FcStrList * +FcConfigGetCacheDirs (const FcConfig *config); + +FcPublic int +FcConfigGetRescanInterval (FcConfig *config); + +FcPublic FcBool +FcConfigSetRescanInterval (FcConfig *config, int rescanInterval); + +FcPublic FcFontSet * +FcConfigGetFonts (FcConfig *config, + FcSetName set); + +FcPublic FcBool +FcConfigAppFontAddFile (FcConfig *config, + const FcChar8 *file); + +FcPublic FcBool +FcConfigAppFontAddDir (FcConfig *config, + const FcChar8 *dir); + +FcPublic void +FcConfigAppFontClear (FcConfig *config); + +FcPublic FcBool +FcConfigSubstituteWithPat (FcConfig *config, + FcPattern *p, + FcPattern *p_pat, + FcMatchKind kind); + +FcPublic FcBool +FcConfigSubstitute (FcConfig *config, + FcPattern *p, + FcMatchKind kind); + +FcPublic const FcChar8 * +FcConfigGetSysRoot (const FcConfig *config); + +FcPublic void +FcConfigSetSysRoot (FcConfig *config, + const FcChar8 *sysroot); + +FcPublic void +FcConfigFileInfoIterInit (FcConfig *config, + FcConfigFileInfoIter *iter); + +FcPublic FcBool +FcConfigFileInfoIterNext (FcConfig *config, + FcConfigFileInfoIter *iter); + +FcPublic FcBool +FcConfigFileInfoIterGet (FcConfig *config, + FcConfigFileInfoIter *iter, + FcChar8 **name, + FcChar8 **description, + FcBool *enabled); + +/* fccharset.c */ +FcPublic FcCharSet* +FcCharSetCreate (void); + +/* deprecated alias for FcCharSetCreate */ +FcPublic FcCharSet * +FcCharSetNew (void); + +FcPublic void +FcCharSetDestroy (FcCharSet *fcs); + +FcPublic FcBool +FcCharSetAddChar (FcCharSet *fcs, FcChar32 ucs4); + +FcPublic FcBool +FcCharSetDelChar (FcCharSet *fcs, FcChar32 ucs4); + +FcPublic FcCharSet* +FcCharSetCopy (FcCharSet *src); + +FcPublic FcBool +FcCharSetEqual (const FcCharSet *a, const FcCharSet *b); + +FcPublic FcCharSet* +FcCharSetIntersect (const FcCharSet *a, const FcCharSet *b); + +FcPublic FcCharSet* +FcCharSetUnion (const FcCharSet *a, const FcCharSet *b); + +FcPublic FcCharSet* +FcCharSetSubtract (const FcCharSet *a, const FcCharSet *b); + +FcPublic FcBool +FcCharSetMerge (FcCharSet *a, const FcCharSet *b, FcBool *changed); + +FcPublic FcBool +FcCharSetHasChar (const FcCharSet *fcs, FcChar32 ucs4); + +FcPublic FcChar32 +FcCharSetCount (const FcCharSet *a); + +FcPublic FcChar32 +FcCharSetIntersectCount (const FcCharSet *a, const FcCharSet *b); + +FcPublic FcChar32 +FcCharSetSubtractCount (const FcCharSet *a, const FcCharSet *b); + +FcPublic FcBool +FcCharSetIsSubset (const FcCharSet *a, const FcCharSet *b); + +#define FC_CHARSET_MAP_SIZE (256/32) +#define FC_CHARSET_DONE ((FcChar32) -1) + +FcPublic FcChar32 +FcCharSetFirstPage (const FcCharSet *a, + FcChar32 map[FC_CHARSET_MAP_SIZE], + FcChar32 *next); + +FcPublic FcChar32 +FcCharSetNextPage (const FcCharSet *a, + FcChar32 map[FC_CHARSET_MAP_SIZE], + FcChar32 *next); + +/* + * old coverage API, rather hard to use correctly + */ + +FcPublic FcChar32 +FcCharSetCoverage (const FcCharSet *a, FcChar32 page, FcChar32 *result); + +/* fcdbg.c */ +FcPublic void +FcValuePrint (const FcValue v); + +FcPublic void +FcPatternPrint (const FcPattern *p); + +FcPublic void +FcFontSetPrint (const FcFontSet *s); + +/* fcdefault.c */ +FcPublic FcStrSet * +FcGetDefaultLangs (void); + +FcPublic void +FcDefaultSubstitute (FcPattern *pattern); + +/* fcdir.c */ +FcPublic FcBool +FcFileIsDir (const FcChar8 *file); + +FcPublic FcBool +FcFileScan (FcFontSet *set, + FcStrSet *dirs, + FcFileCache *cache, + FcBlanks *blanks, + const FcChar8 *file, + FcBool force); + +FcPublic FcBool +FcDirScan (FcFontSet *set, + FcStrSet *dirs, + FcFileCache *cache, + FcBlanks *blanks, + const FcChar8 *dir, + FcBool force); + +FcPublic FcBool +FcDirSave (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir); + +FcPublic FcCache * +FcDirCacheLoad (const FcChar8 *dir, FcConfig *config, FcChar8 **cache_file); + +FcPublic FcCache * +FcDirCacheRescan (const FcChar8 *dir, FcConfig *config); + +FcPublic FcCache * +FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config); + +FcPublic FcCache * +FcDirCacheLoadFile (const FcChar8 *cache_file, struct stat *file_stat); + +FcPublic void +FcDirCacheUnload (FcCache *cache); + +/* fcfreetype.c */ +FcPublic FcPattern * +FcFreeTypeQuery (const FcChar8 *file, unsigned int id, FcBlanks *blanks, int *count); + +FcPublic unsigned int +FcFreeTypeQueryAll(const FcChar8 *file, unsigned int id, FcBlanks *blanks, int *count, FcFontSet *set); + +/* fcfs.c */ + +FcPublic FcFontSet * +FcFontSetCreate (void); + +FcPublic void +FcFontSetDestroy (FcFontSet *s); + +FcPublic FcBool +FcFontSetAdd (FcFontSet *s, FcPattern *font); + +/* fcinit.c */ +FcPublic FcConfig * +FcInitLoadConfig (void); + +FcPublic FcConfig * +FcInitLoadConfigAndFonts (void); + +FcPublic FcBool +FcInit (void); + +FcPublic void +FcFini (void); + +FcPublic int +FcGetVersion (void); + +FcPublic FcBool +FcInitReinitialize (void); + +FcPublic FcBool +FcInitBringUptoDate (void); + +/* fclang.c */ +FcPublic FcStrSet * +FcGetLangs (void); + +FcPublic FcChar8 * +FcLangNormalize (const FcChar8 *lang); + +FcPublic const FcCharSet * +FcLangGetCharSet (const FcChar8 *lang); + +FcPublic FcLangSet* +FcLangSetCreate (void); + +FcPublic void +FcLangSetDestroy (FcLangSet *ls); + +FcPublic FcLangSet* +FcLangSetCopy (const FcLangSet *ls); + +FcPublic FcBool +FcLangSetAdd (FcLangSet *ls, const FcChar8 *lang); + +FcPublic FcBool +FcLangSetDel (FcLangSet *ls, const FcChar8 *lang); + +FcPublic FcLangResult +FcLangSetHasLang (const FcLangSet *ls, const FcChar8 *lang); + +FcPublic FcLangResult +FcLangSetCompare (const FcLangSet *lsa, const FcLangSet *lsb); + +FcPublic FcBool +FcLangSetContains (const FcLangSet *lsa, const FcLangSet *lsb); + +FcPublic FcBool +FcLangSetEqual (const FcLangSet *lsa, const FcLangSet *lsb); + +FcPublic FcChar32 +FcLangSetHash (const FcLangSet *ls); + +FcPublic FcStrSet * +FcLangSetGetLangs (const FcLangSet *ls); + +FcPublic FcLangSet * +FcLangSetUnion (const FcLangSet *a, const FcLangSet *b); + +FcPublic FcLangSet * +FcLangSetSubtract (const FcLangSet *a, const FcLangSet *b); + +/* fclist.c */ +FcPublic FcObjectSet * +FcObjectSetCreate (void); + +FcPublic FcBool +FcObjectSetAdd (FcObjectSet *os, const char *object); + +FcPublic void +FcObjectSetDestroy (FcObjectSet *os); + +FcPublic FcObjectSet * +FcObjectSetVaBuild (const char *first, va_list va); + +FcPublic FcObjectSet * +FcObjectSetBuild (const char *first, ...) FC_ATTRIBUTE_SENTINEL(0); + +FcPublic FcFontSet * +FcFontSetList (FcConfig *config, + FcFontSet **sets, + int nsets, + FcPattern *p, + FcObjectSet *os); + +FcPublic FcFontSet * +FcFontList (FcConfig *config, + FcPattern *p, + FcObjectSet *os); + +/* fcatomic.c */ + +FcPublic FcAtomic * +FcAtomicCreate (const FcChar8 *file); + +FcPublic FcBool +FcAtomicLock (FcAtomic *atomic); + +FcPublic FcChar8 * +FcAtomicNewFile (FcAtomic *atomic); + +FcPublic FcChar8 * +FcAtomicOrigFile (FcAtomic *atomic); + +FcPublic FcBool +FcAtomicReplaceOrig (FcAtomic *atomic); + +FcPublic void +FcAtomicDeleteNew (FcAtomic *atomic); + +FcPublic void +FcAtomicUnlock (FcAtomic *atomic); + +FcPublic void +FcAtomicDestroy (FcAtomic *atomic); + +/* fcmatch.c */ +FcPublic FcPattern * +FcFontSetMatch (FcConfig *config, + FcFontSet **sets, + int nsets, + FcPattern *p, + FcResult *result); + +FcPublic FcPattern * +FcFontMatch (FcConfig *config, + FcPattern *p, + FcResult *result); + +FcPublic FcPattern * +FcFontRenderPrepare (FcConfig *config, + FcPattern *pat, + FcPattern *font); + +FcPublic FcFontSet * +FcFontSetSort (FcConfig *config, + FcFontSet **sets, + int nsets, + FcPattern *p, + FcBool trim, + FcCharSet **csp, + FcResult *result); + +FcPublic FcFontSet * +FcFontSort (FcConfig *config, + FcPattern *p, + FcBool trim, + FcCharSet **csp, + FcResult *result); + +FcPublic void +FcFontSetSortDestroy (FcFontSet *fs); + +/* fcmatrix.c */ +FcPublic FcMatrix * +FcMatrixCopy (const FcMatrix *mat); + +FcPublic FcBool +FcMatrixEqual (const FcMatrix *mat1, const FcMatrix *mat2); + +FcPublic void +FcMatrixMultiply (FcMatrix *result, const FcMatrix *a, const FcMatrix *b); + +FcPublic void +FcMatrixRotate (FcMatrix *m, double c, double s); + +FcPublic void +FcMatrixScale (FcMatrix *m, double sx, double sy); + +FcPublic void +FcMatrixShear (FcMatrix *m, double sh, double sv); + +/* fcname.c */ + +/* Deprecated. Does nothing. Returns FcFalse. */ +FcPublic FcBool +FcNameRegisterObjectTypes (const FcObjectType *types, int ntype); + +/* Deprecated. Does nothing. Returns FcFalse. */ +FcPublic FcBool +FcNameUnregisterObjectTypes (const FcObjectType *types, int ntype); + +FcPublic const FcObjectType * +FcNameGetObjectType (const char *object); + +/* Deprecated. Does nothing. Returns FcFalse. */ +FcPublic FcBool +FcNameRegisterConstants (const FcConstant *consts, int nconsts); + +/* Deprecated. Does nothing. Returns FcFalse. */ +FcPublic FcBool +FcNameUnregisterConstants (const FcConstant *consts, int nconsts); + +FcPublic const FcConstant * +FcNameGetConstant (const FcChar8 *string); + +FcPublic FcBool +FcNameConstant (const FcChar8 *string, int *result); + +FcPublic FcPattern * +FcNameParse (const FcChar8 *name); + +FcPublic FcChar8 * +FcNameUnparse (FcPattern *pat); + +/* fcpat.c */ +FcPublic FcPattern * +FcPatternCreate (void); + +FcPublic FcPattern * +FcPatternDuplicate (const FcPattern *p); + +FcPublic void +FcPatternReference (FcPattern *p); + +FcPublic FcPattern * +FcPatternFilter (FcPattern *p, const FcObjectSet *os); + +FcPublic void +FcValueDestroy (FcValue v); + +FcPublic FcBool +FcValueEqual (FcValue va, FcValue vb); + +FcPublic FcValue +FcValueSave (FcValue v); + +FcPublic void +FcPatternDestroy (FcPattern *p); + +FcPublic FcBool +FcPatternEqual (const FcPattern *pa, const FcPattern *pb); + +FcPublic FcBool +FcPatternEqualSubset (const FcPattern *pa, const FcPattern *pb, const FcObjectSet *os); + +FcPublic FcChar32 +FcPatternHash (const FcPattern *p); + +FcPublic FcBool +FcPatternAdd (FcPattern *p, const char *object, FcValue value, FcBool append); + +FcPublic FcBool +FcPatternAddWeak (FcPattern *p, const char *object, FcValue value, FcBool append); + +FcPublic FcResult +FcPatternGet (const FcPattern *p, const char *object, int id, FcValue *v); + +FcPublic FcResult +FcPatternGetWithBinding (const FcPattern *p, const char *object, int id, FcValue *v, FcValueBinding *b); + +FcPublic FcBool +FcPatternDel (FcPattern *p, const char *object); + +FcPublic FcBool +FcPatternRemove (FcPattern *p, const char *object, int id); + +FcPublic FcBool +FcPatternAddInteger (FcPattern *p, const char *object, int i); + +FcPublic FcBool +FcPatternAddDouble (FcPattern *p, const char *object, double d); + +FcPublic FcBool +FcPatternAddString (FcPattern *p, const char *object, const FcChar8 *s); + +FcPublic FcBool +FcPatternAddMatrix (FcPattern *p, const char *object, const FcMatrix *s); + +FcPublic FcBool +FcPatternAddCharSet (FcPattern *p, const char *object, const FcCharSet *c); + +FcPublic FcBool +FcPatternAddBool (FcPattern *p, const char *object, FcBool b); + +FcPublic FcBool +FcPatternAddLangSet (FcPattern *p, const char *object, const FcLangSet *ls); + +FcPublic FcBool +FcPatternAddRange (FcPattern *p, const char *object, const FcRange *r); + +FcPublic FcResult +FcPatternGetInteger (const FcPattern *p, const char *object, int n, int *i); + +FcPublic FcResult +FcPatternGetDouble (const FcPattern *p, const char *object, int n, double *d); + +FcPublic FcResult +FcPatternGetString (const FcPattern *p, const char *object, int n, FcChar8 ** s); + +FcPublic FcResult +FcPatternGetMatrix (const FcPattern *p, const char *object, int n, FcMatrix **s); + +FcPublic FcResult +FcPatternGetCharSet (const FcPattern *p, const char *object, int n, FcCharSet **c); + +FcPublic FcResult +FcPatternGetBool (const FcPattern *p, const char *object, int n, FcBool *b); + +FcPublic FcResult +FcPatternGetLangSet (const FcPattern *p, const char *object, int n, FcLangSet **ls); + +FcPublic FcResult +FcPatternGetRange (const FcPattern *p, const char *object, int id, FcRange **r); + +FcPublic FcPattern * +FcPatternVaBuild (FcPattern *p, va_list va); + +FcPublic FcPattern * +FcPatternBuild (FcPattern *p, ...) FC_ATTRIBUTE_SENTINEL(0); + +FcPublic FcChar8 * +FcPatternFormat (FcPattern *pat, const FcChar8 *format); + +/* fcrange.c */ +FcPublic FcRange * +FcRangeCreateDouble (double begin, double end); + +FcPublic FcRange * +FcRangeCreateInteger (FcChar32 begin, FcChar32 end); + +FcPublic void +FcRangeDestroy (FcRange *range); + +FcPublic FcRange * +FcRangeCopy (const FcRange *r); + +FcPublic FcBool +FcRangeGetDouble(const FcRange *range, double *begin, double *end); + +/* fcweight.c */ + +FcPublic int +FcWeightFromOpenType (int ot_weight); + +FcPublic double +FcWeightFromOpenTypeDouble (double ot_weight); + +FcPublic int +FcWeightToOpenType (int fc_weight); + +FcPublic double +FcWeightToOpenTypeDouble (double fc_weight); + +/* fcstr.c */ + +FcPublic FcChar8 * +FcStrCopy (const FcChar8 *s); + +FcPublic FcChar8 * +FcStrCopyFilename (const FcChar8 *s); + +FcPublic FcChar8 * +FcStrPlus (const FcChar8 *s1, const FcChar8 *s2); + +FcPublic void +FcStrFree (FcChar8 *s); + +/* These are ASCII only, suitable only for pattern element names */ +#define FcIsUpper(c) ((0101 <= (c) && (c) <= 0132)) +#define FcIsLower(c) ((0141 <= (c) && (c) <= 0172)) +#define FcToLower(c) (FcIsUpper(c) ? (c) - 0101 + 0141 : (c)) + +FcPublic FcChar8 * +FcStrDowncase (const FcChar8 *s); + +FcPublic int +FcStrCmpIgnoreCase (const FcChar8 *s1, const FcChar8 *s2); + +FcPublic int +FcStrCmp (const FcChar8 *s1, const FcChar8 *s2); + +FcPublic const FcChar8 * +FcStrStrIgnoreCase (const FcChar8 *s1, const FcChar8 *s2); + +FcPublic const FcChar8 * +FcStrStr (const FcChar8 *s1, const FcChar8 *s2); + +FcPublic int +FcUtf8ToUcs4 (const FcChar8 *src_orig, + FcChar32 *dst, + int len); + +FcPublic FcBool +FcUtf8Len (const FcChar8 *string, + int len, + int *nchar, + int *wchar); + +#define FC_UTF8_MAX_LEN 6 + +FcPublic int +FcUcs4ToUtf8 (FcChar32 ucs4, + FcChar8 dest[FC_UTF8_MAX_LEN]); + +FcPublic int +FcUtf16ToUcs4 (const FcChar8 *src_orig, + FcEndian endian, + FcChar32 *dst, + int len); /* in bytes */ + +FcPublic FcBool +FcUtf16Len (const FcChar8 *string, + FcEndian endian, + int len, /* in bytes */ + int *nchar, + int *wchar); + +FcPublic FcChar8 * +FcStrDirname (const FcChar8 *file); + +FcPublic FcChar8 * +FcStrBasename (const FcChar8 *file); + +FcPublic FcStrSet * +FcStrSetCreate (void); + +FcPublic FcBool +FcStrSetMember (FcStrSet *set, const FcChar8 *s); + +FcPublic FcBool +FcStrSetEqual (FcStrSet *sa, FcStrSet *sb); + +FcPublic FcBool +FcStrSetAdd (FcStrSet *set, const FcChar8 *s); + +FcPublic FcBool +FcStrSetAddFilename (FcStrSet *set, const FcChar8 *s); + +FcPublic FcBool +FcStrSetDel (FcStrSet *set, const FcChar8 *s); + +FcPublic void +FcStrSetDestroy (FcStrSet *set); + +FcPublic FcStrList * +FcStrListCreate (FcStrSet *set); + +FcPublic void +FcStrListFirst (FcStrList *list); + +FcPublic FcChar8 * +FcStrListNext (FcStrList *list); + +FcPublic void +FcStrListDone (FcStrList *list); + +/* fcxml.c */ +FcPublic FcBool +FcConfigParseAndLoad (FcConfig *config, const FcChar8 *file, FcBool complain); + +FcPublic FcBool +FcConfigParseAndLoadFromMemory (FcConfig *config, + const FcChar8 *buffer, + FcBool complain); + +_FCFUNCPROTOEND + +#undef FC_ATTRIBUTE_SENTINEL + + +#ifndef _FCINT_H_ + +/* + * Deprecated functions are placed here to help users fix their code without + * digging through documentation + */ + +#define FcConfigGetRescanInverval FcConfigGetRescanInverval_REPLACE_BY_FcConfigGetRescanInterval +#define FcConfigSetRescanInverval FcConfigSetRescanInverval_REPLACE_BY_FcConfigSetRescanInterval + +#endif + +#endif /* _FONTCONFIG_H_ */ diff --git a/frameworks/cairosvg/dependencies/fontconfig/2.13.0/lib/libfontconfig.1.dylib b/frameworks/cairosvg/dependencies/fontconfig/2.13.0/lib/libfontconfig.1.dylib new file mode 100755 index 00000000..e8231560 Binary files /dev/null and b/frameworks/cairosvg/dependencies/fontconfig/2.13.0/lib/libfontconfig.1.dylib differ diff --git a/frameworks/cairosvg/dependencies/fontconfig/2.13.0/lib/libfontconfig.dylib b/frameworks/cairosvg/dependencies/fontconfig/2.13.0/lib/libfontconfig.dylib new file mode 120000 index 00000000..ad2bb778 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fontconfig/2.13.0/lib/libfontconfig.dylib @@ -0,0 +1 @@ +libfontconfig.1.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/config/ftconfig.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/config/ftconfig.h new file mode 100755 index 00000000..fd0f0bad --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/config/ftconfig.h @@ -0,0 +1,603 @@ +/* ftconfig.h. Generated from ftconfig.in by configure. */ +/***************************************************************************/ +/* */ +/* ftconfig.in */ +/* */ +/* UNIX-specific configuration file (specification only). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This header file contains a number of macro definitions that are used */ + /* by the rest of the engine. Most of the macros here are automatically */ + /* determined at compile time, and you should not need to change it to */ + /* port FreeType, except to compile the library with a non-ANSI */ + /* compiler. */ + /* */ + /* Note however that if some specific modifications are needed, we */ + /* advise you to place a modified copy in your build directory. */ + /* */ + /* The build directory is usually `builds/', and contains */ + /* system-specific files that are always included first when building */ + /* the library. */ + /* */ + /*************************************************************************/ + + +#ifndef FTCONFIG_H_ +#define FTCONFIG_H_ + +#include +#include FT_CONFIG_OPTIONS_H +#include FT_CONFIG_STANDARD_LIBRARY_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* PLATFORM-SPECIFIC CONFIGURATION MACROS */ + /* */ + /* These macros can be toggled to suit a specific system. The current */ + /* ones are defaults used to compile FreeType in an ANSI C environment */ + /* (16bit compilers are also supported). Copy this file to your own */ + /* `builds/' directory, and edit it to port the engine. */ + /* */ + /*************************************************************************/ + + +#define HAVE_UNISTD_H 1 +#define HAVE_FCNTL_H 1 +#define HAVE_STDINT_H 1 + + + /* There are systems (like the Texas Instruments 'C54x) where a `char' */ + /* has 16 bits. ANSI C says that sizeof(char) is always 1. Since an */ + /* `int' has 16 bits also for this system, sizeof(int) gives 1 which */ + /* is probably unexpected. */ + /* */ + /* `CHAR_BIT' (defined in limits.h) gives the number of bits in a */ + /* `char' type. */ + +#ifndef FT_CHAR_BIT +#define FT_CHAR_BIT CHAR_BIT +#endif + + +/* #undef FT_USE_AUTOCONF_SIZEOF_TYPES */ +#ifdef FT_USE_AUTOCONF_SIZEOF_TYPES + +#define SIZEOF_INT 4 +#define SIZEOF_LONG 8 +#define FT_SIZEOF_INT SIZEOF_INT +#define FT_SIZEOF_LONG SIZEOF_LONG + +#else /* !FT_USE_AUTOCONF_SIZEOF_TYPES */ + + /* Following cpp computation of the bit length of int and long */ + /* is copied from default include/freetype/config/ftconfig.h. */ + /* If any improvement is required for this file, it should be */ + /* applied to the original header file for the builders that */ + /* do not use configure script. */ + + /* The size of an `int' type. */ +#if FT_UINT_MAX == 0xFFFFUL +#define FT_SIZEOF_INT (16 / FT_CHAR_BIT) +#elif FT_UINT_MAX == 0xFFFFFFFFUL +#define FT_SIZEOF_INT (32 / FT_CHAR_BIT) +#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL +#define FT_SIZEOF_INT (64 / FT_CHAR_BIT) +#else +#error "Unsupported size of `int' type!" +#endif + + /* The size of a `long' type. A five-byte `long' (as used e.g. on the */ + /* DM642) is recognized but avoided. */ +#if FT_ULONG_MAX == 0xFFFFFFFFUL +#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT) +#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL +#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT) +#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL +#define FT_SIZEOF_LONG (64 / FT_CHAR_BIT) +#else +#error "Unsupported size of `long' type!" +#endif + +#endif /* !FT_USE_AUTOCONF_SIZEOF_TYPES */ + + + /* FT_UNUSED is a macro used to indicate that a given parameter is not */ + /* used -- this is only used to get rid of unpleasant compiler warnings */ +#ifndef FT_UNUSED +#define FT_UNUSED( arg ) ( (arg) = (arg) ) +#endif + + + /*************************************************************************/ + /* */ + /* AUTOMATIC CONFIGURATION MACROS */ + /* */ + /* These macros are computed from the ones defined above. Don't touch */ + /* their definition, unless you know precisely what you are doing. No */ + /* porter should need to mess with them. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Mac support */ + /* */ + /* This is the only necessary change, so it is defined here instead */ + /* providing a new configuration file. */ + /* */ +#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) ) + /* no Carbon frameworks for 64bit 10.4.x */ + /* AvailabilityMacros.h is available since Mac OS X 10.2, */ + /* so guess the system version by maximum errno before inclusion */ +#include +#ifdef ECANCELED /* defined since 10.2 */ +#include "AvailabilityMacros.h" +#endif +#if defined( __LP64__ ) && \ + ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) +#undef FT_MACINTOSH +#endif + +#elif defined( __SC__ ) || defined( __MRC__ ) + /* Classic MacOS compilers */ +#include "ConditionalMacros.h" +#if TARGET_OS_MAC +#define FT_MACINTOSH 1 +#endif + +#endif + + + /* Fix compiler warning with sgi compiler */ +#if defined( __sgi ) && !defined( __GNUC__ ) +#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 ) +#pragma set woff 3505 +#endif +#endif + + + /*************************************************************************/ + /* */ + /*
*/ + /* basic_types */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* */ + /* FT_Int16 */ + /* */ + /* */ + /* A typedef for a 16bit signed integer type. */ + /* */ + typedef signed short FT_Int16; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt16 */ + /* */ + /* */ + /* A typedef for a 16bit unsigned integer type. */ + /* */ + typedef unsigned short FT_UInt16; + + /* */ + + + /* this #if 0 ... #endif clause is for documentation purposes */ +#if 0 + + /*************************************************************************/ + /* */ + /* */ + /* FT_Int32 */ + /* */ + /* */ + /* A typedef for a 32bit signed integer type. The size depends on */ + /* the configuration. */ + /* */ + typedef signed XXX FT_Int32; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt32 */ + /* */ + /* A typedef for a 32bit unsigned integer type. The size depends on */ + /* the configuration. */ + /* */ + typedef unsigned XXX FT_UInt32; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_Int64 */ + /* */ + /* A typedef for a 64bit signed integer type. The size depends on */ + /* the configuration. Only defined if there is real 64bit support; */ + /* otherwise, it gets emulated with a structure (if necessary). */ + /* */ + typedef signed XXX FT_Int64; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt64 */ + /* */ + /* A typedef for a 64bit unsigned integer type. The size depends on */ + /* the configuration. Only defined if there is real 64bit support; */ + /* otherwise, it gets emulated with a structure (if necessary). */ + /* */ + typedef unsigned XXX FT_UInt64; + + /* */ + +#endif + +#if FT_SIZEOF_INT == 4 + + typedef signed int FT_Int32; + typedef unsigned int FT_UInt32; + +#elif FT_SIZEOF_LONG == 4 + + typedef signed long FT_Int32; + typedef unsigned long FT_UInt32; + +#else +#error "no 32bit type found -- please check your configuration files" +#endif + + + /* look up an integer type that is at least 32 bits */ +#if FT_SIZEOF_INT >= 4 + + typedef int FT_Fast; + typedef unsigned int FT_UFast; + +#elif FT_SIZEOF_LONG >= 4 + + typedef long FT_Fast; + typedef unsigned long FT_UFast; + +#endif + + + /* determine whether we have a 64-bit int type */ + /* (mostly for environments without `autoconf') */ +#if FT_SIZEOF_LONG == 8 + + /* FT_LONG64 must be defined if a 64-bit type is available */ +#define FT_LONG64 +#define FT_INT64 long +#define FT_UINT64 unsigned long + + /* we handle the LLP64 scheme separately for GCC and clang, */ + /* suppressing the `long long' warning */ +#elif ( FT_SIZEOF_LONG == 4 ) && \ + defined( HAVE_LONG_LONG_INT ) && \ + defined( __GNUC__ ) +#pragma GCC diagnostic ignored "-Wlong-long" +#define FT_LONG64 +#define FT_INT64 long long int +#define FT_UINT64 unsigned long long int + + /*************************************************************************/ + /* */ + /* A 64-bit data type may create compilation problems if you compile */ + /* in strict ANSI mode. To avoid them, we disable other 64-bit data */ + /* types if __STDC__ is defined. You can however ignore this rule */ + /* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ + /* */ +#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 ) + +#if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L + +#define FT_LONG64 +#define FT_INT64 long long int +#define FT_UINT64 unsigned long long int + +#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ + + /* this compiler provides the __int64 type */ +#define FT_LONG64 +#define FT_INT64 __int64 +#define FT_UINT64 unsigned __int64 + +#elif defined( __BORLANDC__ ) /* Borland C++ */ + + /* XXXX: We should probably check the value of __BORLANDC__ in order */ + /* to test the compiler version. */ + + /* this compiler provides the __int64 type */ +#define FT_LONG64 +#define FT_INT64 __int64 +#define FT_UINT64 unsigned __int64 + +#elif defined( __WATCOMC__ ) /* Watcom C++ */ + + /* Watcom doesn't provide 64-bit data types */ + +#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */ + +#define FT_LONG64 +#define FT_INT64 long long int +#define FT_UINT64 unsigned long long int + +#elif defined( __GNUC__ ) + + /* GCC provides the `long long' type */ +#define FT_LONG64 +#define FT_INT64 long long int +#define FT_UINT64 unsigned long long int + +#endif /* __STDC_VERSION__ >= 199901L */ + +#endif /* FT_SIZEOF_LONG == 8 */ + +#ifdef FT_LONG64 + typedef FT_INT64 FT_Int64; + typedef FT_UINT64 FT_UInt64; +#endif + + +#ifdef _WIN64 + /* only 64bit Windows uses the LLP64 data model, i.e., */ + /* 32bit integers, 64bit pointers */ +#define FT_UINT_TO_POINTER( x ) (void*)(unsigned __int64)(x) +#else +#define FT_UINT_TO_POINTER( x ) (void*)(unsigned long)(x) +#endif + + + /*************************************************************************/ + /* */ + /* miscellaneous */ + /* */ + /*************************************************************************/ + + +#define FT_BEGIN_STMNT do { +#define FT_END_STMNT } while ( 0 ) +#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT + + + /* typeof condition taken from gnulib's `intprops.h' header file */ +#if ( ( defined( __GNUC__ ) && __GNUC__ >= 2 ) || \ + ( defined( __IBMC__ ) && __IBMC__ >= 1210 && \ + defined( __IBM__TYPEOF__ ) ) || \ + ( defined( __SUNPRO_C ) && __SUNPRO_C >= 0x5110 && !__STDC__ ) ) +#define FT_TYPEOF( type ) ( __typeof__ ( type ) ) +#else +#define FT_TYPEOF( type ) /* empty */ +#endif + + + /* Use FT_LOCAL and FT_LOCAL_DEF to declare and define, respectively, */ + /* a function that gets used only within the scope of a module. */ + /* Normally, both the header and source code files for such a */ + /* function are within a single module directory. */ + /* */ + /* Intra-module arrays should be tagged with FT_LOCAL_ARRAY and */ + /* FT_LOCAL_ARRAY_DEF. */ + /* */ +#ifdef FT_MAKE_OPTION_SINGLE_OBJECT + +#define FT_LOCAL( x ) static x +#define FT_LOCAL_DEF( x ) static x + +#else + +#ifdef __cplusplus +#define FT_LOCAL( x ) extern "C" x +#define FT_LOCAL_DEF( x ) extern "C" x +#else +#define FT_LOCAL( x ) extern x +#define FT_LOCAL_DEF( x ) x +#endif + +#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */ + +#define FT_LOCAL_ARRAY( x ) extern const x +#define FT_LOCAL_ARRAY_DEF( x ) const x + + + /* Use FT_BASE and FT_BASE_DEF to declare and define, respectively, */ + /* functions that are used in more than a single module. In the */ + /* current setup this implies that the declaration is in a header */ + /* file in the `include/freetype/internal' directory, and the */ + /* function body is in a file in `src/base'. */ + /* */ +#ifndef FT_BASE + +#ifdef __cplusplus +#define FT_BASE( x ) extern "C" x +#else +#define FT_BASE( x ) extern x +#endif + +#endif /* !FT_BASE */ + + +#ifndef FT_BASE_DEF + +#ifdef __cplusplus +#define FT_BASE_DEF( x ) x +#else +#define FT_BASE_DEF( x ) x +#endif + +#endif /* !FT_BASE_DEF */ + + + /* When compiling FreeType as a DLL or DSO with hidden visibility */ + /* some systems/compilers need a special attribute in front OR after */ + /* the return type of function declarations. */ + /* */ + /* Two macros are used within the FreeType source code to define */ + /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ + /* */ + /* FT_EXPORT( return_type ) */ + /* */ + /* is used in a function declaration, as in */ + /* */ + /* FT_EXPORT( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ); */ + /* */ + /* */ + /* FT_EXPORT_DEF( return_type ) */ + /* */ + /* is used in a function definition, as in */ + /* */ + /* FT_EXPORT_DEF( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ) */ + /* { */ + /* ... some code ... */ + /* return FT_Err_Ok; */ + /* } */ + /* */ + /* You can provide your own implementation of FT_EXPORT and */ + /* FT_EXPORT_DEF here if you want. */ + /* */ + /* To export a variable, use FT_EXPORT_VAR. */ + /* */ +#ifndef FT_EXPORT + +#ifdef FT2_BUILD_LIBRARY + +#if defined( _WIN32 ) && ( defined( _DLL ) || defined( DLL_EXPORT ) ) +#define FT_EXPORT( x ) __declspec( dllexport ) x +#elif defined( __GNUC__ ) && __GNUC__ >= 4 +#define FT_EXPORT( x ) __attribute__(( visibility( "default" ) )) x +#elif defined( __cplusplus ) +#define FT_EXPORT( x ) extern "C" x +#else +#define FT_EXPORT( x ) extern x +#endif + +#else + +#if defined( FT2_DLLIMPORT ) +#define FT_EXPORT( x ) __declspec( dllimport ) x +#elif defined( __cplusplus ) +#define FT_EXPORT( x ) extern "C" x +#else +#define FT_EXPORT( x ) extern x +#endif + +#endif + +#endif /* !FT_EXPORT */ + + +#ifndef FT_EXPORT_DEF + +#ifdef __cplusplus +#define FT_EXPORT_DEF( x ) extern "C" x +#else +#define FT_EXPORT_DEF( x ) extern x +#endif + +#endif /* !FT_EXPORT_DEF */ + + +#ifndef FT_EXPORT_VAR + +#ifdef __cplusplus +#define FT_EXPORT_VAR( x ) extern "C" x +#else +#define FT_EXPORT_VAR( x ) extern x +#endif + +#endif /* !FT_EXPORT_VAR */ + + /* The following macros are needed to compile the library with a */ + /* C++ compiler and with 16bit compilers. */ + /* */ + + /* This is special. Within C++, you must specify `extern "C"' for */ + /* functions which are used via function pointers, and you also */ + /* must do that for structures which contain function pointers to */ + /* assure C linkage -- it's not possible to have (local) anonymous */ + /* functions which are accessed by (global) function pointers. */ + /* */ + /* */ + /* FT_CALLBACK_DEF is used to _define_ a callback function, */ + /* located in the same source code file as the structure that uses */ + /* it. */ + /* */ + /* FT_BASE_CALLBACK and FT_BASE_CALLBACK_DEF are used to declare */ + /* and define a callback function, respectively, in a similar way */ + /* as FT_BASE and FT_BASE_DEF work. */ + /* */ + /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */ + /* contains pointers to callback functions. */ + /* */ + /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */ + /* that contains pointers to callback functions. */ + /* */ + /* */ + /* Some 16bit compilers have to redefine these macros to insert */ + /* the infamous `_cdecl' or `__fastcall' declarations. */ + /* */ +#ifndef FT_CALLBACK_DEF +#ifdef __cplusplus +#define FT_CALLBACK_DEF( x ) extern "C" x +#else +#define FT_CALLBACK_DEF( x ) static x +#endif +#endif /* FT_CALLBACK_DEF */ + +#ifndef FT_BASE_CALLBACK +#ifdef __cplusplus +#define FT_BASE_CALLBACK( x ) extern "C" x +#define FT_BASE_CALLBACK_DEF( x ) extern "C" x +#else +#define FT_BASE_CALLBACK( x ) extern x +#define FT_BASE_CALLBACK_DEF( x ) x +#endif +#endif /* FT_BASE_CALLBACK */ + +#ifndef FT_CALLBACK_TABLE +#ifdef __cplusplus +#define FT_CALLBACK_TABLE extern "C" +#define FT_CALLBACK_TABLE_DEF extern "C" +#else +#define FT_CALLBACK_TABLE extern +#define FT_CALLBACK_TABLE_DEF /* nothing */ +#endif +#endif /* FT_CALLBACK_TABLE */ + + +FT_END_HEADER + + +#endif /* FTCONFIG_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/config/ftheader.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/config/ftheader.h new file mode 100755 index 00000000..702f77cc --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/config/ftheader.h @@ -0,0 +1,804 @@ +/***************************************************************************/ +/* */ +/* ftheader.h */ +/* */ +/* Build macros of the FreeType 2 library. */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +#ifndef FTHEADER_H_ +#define FTHEADER_H_ + + + /*@***********************************************************************/ + /* */ + /* */ + /* FT_BEGIN_HEADER */ + /* */ + /* */ + /* This macro is used in association with @FT_END_HEADER in header */ + /* files to ensure that the declarations within are properly */ + /* encapsulated in an `extern "C" { .. }' block when included from a */ + /* C++ compiler. */ + /* */ +#ifdef __cplusplus +#define FT_BEGIN_HEADER extern "C" { +#else +#define FT_BEGIN_HEADER /* nothing */ +#endif + + + /*@***********************************************************************/ + /* */ + /* */ + /* FT_END_HEADER */ + /* */ + /* */ + /* This macro is used in association with @FT_BEGIN_HEADER in header */ + /* files to ensure that the declarations within are properly */ + /* encapsulated in an `extern "C" { .. }' block when included from a */ + /* C++ compiler. */ + /* */ +#ifdef __cplusplus +#define FT_END_HEADER } +#else +#define FT_END_HEADER /* nothing */ +#endif + + + /*************************************************************************/ + /* */ + /* Aliases for the FreeType 2 public and configuration files. */ + /* */ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /*
*/ + /* header_file_macros */ + /* */ + /* */ + /* Header File Macros */ + /* */ + /* <Abstract> */ + /* Macro definitions used to #include specific header files. */ + /* */ + /* <Description> */ + /* The following macros are defined to the name of specific */ + /* FreeType~2 header files. They can be used directly in #include */ + /* statements as in: */ + /* */ + /* { */ + /* #include FT_FREETYPE_H */ + /* #include FT_MULTIPLE_MASTERS_H */ + /* #include FT_GLYPH_H */ + /* } */ + /* */ + /* There are several reasons why we are now using macros to name */ + /* public header files. The first one is that such macros are not */ + /* limited to the infamous 8.3~naming rule required by DOS (and */ + /* `FT_MULTIPLE_MASTERS_H' is a lot more meaningful than `ftmm.h'). */ + /* */ + /* The second reason is that it allows for more flexibility in the */ + /* way FreeType~2 is installed on a given system. */ + /* */ + /*************************************************************************/ + + + /* configuration files */ + + /************************************************************************* + * + * @macro: + * FT_CONFIG_CONFIG_H + * + * @description: + * A macro used in #include statements to name the file containing + * FreeType~2 configuration data. + * + */ +#ifndef FT_CONFIG_CONFIG_H +#define FT_CONFIG_CONFIG_H <freetype/config/ftconfig.h> +#endif + + + /************************************************************************* + * + * @macro: + * FT_CONFIG_STANDARD_LIBRARY_H + * + * @description: + * A macro used in #include statements to name the file containing + * FreeType~2 interface to the standard C library functions. + * + */ +#ifndef FT_CONFIG_STANDARD_LIBRARY_H +#define FT_CONFIG_STANDARD_LIBRARY_H <freetype/config/ftstdlib.h> +#endif + + + /************************************************************************* + * + * @macro: + * FT_CONFIG_OPTIONS_H + * + * @description: + * A macro used in #include statements to name the file containing + * FreeType~2 project-specific configuration options. + * + */ +#ifndef FT_CONFIG_OPTIONS_H +#define FT_CONFIG_OPTIONS_H <freetype/config/ftoption.h> +#endif + + + /************************************************************************* + * + * @macro: + * FT_CONFIG_MODULES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list of FreeType~2 modules that are statically linked to new library + * instances in @FT_Init_FreeType. + * + */ +#ifndef FT_CONFIG_MODULES_H +#define FT_CONFIG_MODULES_H <freetype/config/ftmodule.h> +#endif + + /* */ + + /* public headers */ + + /************************************************************************* + * + * @macro: + * FT_FREETYPE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * base FreeType~2 API. + * + */ +#define FT_FREETYPE_H <freetype/freetype.h> + + + /************************************************************************* + * + * @macro: + * FT_ERRORS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list of FreeType~2 error codes (and messages). + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_ERRORS_H <freetype/fterrors.h> + + + /************************************************************************* + * + * @macro: + * FT_MODULE_ERRORS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list of FreeType~2 module error offsets (and messages). + * + */ +#define FT_MODULE_ERRORS_H <freetype/ftmoderr.h> + + + /************************************************************************* + * + * @macro: + * FT_SYSTEM_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 interface to low-level operations (i.e., memory management + * and stream i/o). + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_SYSTEM_H <freetype/ftsystem.h> + + + /************************************************************************* + * + * @macro: + * FT_IMAGE_H + * + * @description: + * A macro used in #include statements to name the file containing type + * definitions related to glyph images (i.e., bitmaps, outlines, + * scan-converter parameters). + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_IMAGE_H <freetype/ftimage.h> + + + /************************************************************************* + * + * @macro: + * FT_TYPES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * basic data types defined by FreeType~2. + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_TYPES_H <freetype/fttypes.h> + + + /************************************************************************* + * + * @macro: + * FT_LIST_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list management API of FreeType~2. + * + * (Most applications will never need to include this file.) + * + */ +#define FT_LIST_H <freetype/ftlist.h> + + + /************************************************************************* + * + * @macro: + * FT_OUTLINE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * scalable outline management API of FreeType~2. + * + */ +#define FT_OUTLINE_H <freetype/ftoutln.h> + + + /************************************************************************* + * + * @macro: + * FT_SIZES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API which manages multiple @FT_Size objects per face. + * + */ +#define FT_SIZES_H <freetype/ftsizes.h> + + + /************************************************************************* + * + * @macro: + * FT_MODULE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * module management API of FreeType~2. + * + */ +#define FT_MODULE_H <freetype/ftmodapi.h> + + + /************************************************************************* + * + * @macro: + * FT_RENDER_H + * + * @description: + * A macro used in #include statements to name the file containing the + * renderer module management API of FreeType~2. + * + */ +#define FT_RENDER_H <freetype/ftrender.h> + + + /************************************************************************* + * + * @macro: + * FT_DRIVER_H + * + * @description: + * A macro used in #include statements to name the file containing + * structures and macros related to the driver modules. + * + */ +#define FT_DRIVER_H <freetype/ftdriver.h> + + + /************************************************************************* + * + * @macro: + * FT_AUTOHINTER_H + * + * @description: + * A macro used in #include statements to name the file containing + * structures and macros related to the auto-hinting module. + * + * Deprecated since version 2.9; use @FT_DRIVER_H instead. + * + */ +#define FT_AUTOHINTER_H FT_DRIVER_H + + + /************************************************************************* + * + * @macro: + * FT_CFF_DRIVER_H + * + * @description: + * A macro used in #include statements to name the file containing + * structures and macros related to the CFF driver module. + * + * Deprecated since version 2.9; use @FT_DRIVER_H instead. + * + */ +#define FT_CFF_DRIVER_H FT_DRIVER_H + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_DRIVER_H + * + * @description: + * A macro used in #include statements to name the file containing + * structures and macros related to the TrueType driver module. + * + * Deprecated since version 2.9; use @FT_DRIVER_H instead. + * + */ +#define FT_TRUETYPE_DRIVER_H FT_DRIVER_H + + + /************************************************************************* + * + * @macro: + * FT_PCF_DRIVER_H + * + * @description: + * A macro used in #include statements to name the file containing + * structures and macros related to the PCF driver module. + * + * Deprecated since version 2.9; use @FT_DRIVER_H instead. + * + */ +#define FT_PCF_DRIVER_H FT_DRIVER_H + + + /************************************************************************* + * + * @macro: + * FT_TYPE1_TABLES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * types and API specific to the Type~1 format. + * + */ +#define FT_TYPE1_TABLES_H <freetype/t1tables.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_IDS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * enumeration values which identify name strings, languages, encodings, + * etc. This file really contains a _large_ set of constant macro + * definitions, taken from the TrueType and OpenType specifications. + * + */ +#define FT_TRUETYPE_IDS_H <freetype/ttnameid.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_TABLES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * types and API specific to the TrueType (as well as OpenType) format. + * + */ +#define FT_TRUETYPE_TABLES_H <freetype/tttables.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_TAGS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of TrueType four-byte `tags' which identify blocks in + * SFNT-based font formats (i.e., TrueType and OpenType). + * + */ +#define FT_TRUETYPE_TAGS_H <freetype/tttags.h> + + + /************************************************************************* + * + * @macro: + * FT_BDF_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which accesses BDF-specific strings from a + * face. + * + */ +#define FT_BDF_H <freetype/ftbdf.h> + + + /************************************************************************* + * + * @macro: + * FT_CID_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which access CID font information from a + * face. + * + */ +#define FT_CID_H <freetype/ftcid.h> + + + /************************************************************************* + * + * @macro: + * FT_GZIP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports gzip-compressed files. + * + */ +#define FT_GZIP_H <freetype/ftgzip.h> + + + /************************************************************************* + * + * @macro: + * FT_LZW_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports LZW-compressed files. + * + */ +#define FT_LZW_H <freetype/ftlzw.h> + + + /************************************************************************* + * + * @macro: + * FT_BZIP2_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports bzip2-compressed files. + * + */ +#define FT_BZIP2_H <freetype/ftbzip2.h> + + + /************************************************************************* + * + * @macro: + * FT_WINFONTS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports Windows FNT files. + * + */ +#define FT_WINFONTS_H <freetype/ftwinfnt.h> + + + /************************************************************************* + * + * @macro: + * FT_GLYPH_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional glyph management component. + * + */ +#define FT_GLYPH_H <freetype/ftglyph.h> + + + /************************************************************************* + * + * @macro: + * FT_BITMAP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional bitmap conversion component. + * + */ +#define FT_BITMAP_H <freetype/ftbitmap.h> + + + /************************************************************************* + * + * @macro: + * FT_BBOX_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional exact bounding box computation routines. + * + */ +#define FT_BBOX_H <freetype/ftbbox.h> + + + /************************************************************************* + * + * @macro: + * FT_CACHE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional FreeType~2 cache sub-system. + * + */ +#define FT_CACHE_H <freetype/ftcache.h> + + + /************************************************************************* + * + * @macro: + * FT_MAC_H + * + * @description: + * A macro used in #include statements to name the file containing the + * Macintosh-specific FreeType~2 API. The latter is used to access + * fonts embedded in resource forks. + * + * This header file must be explicitly included by client applications + * compiled on the Mac (note that the base API still works though). + * + */ +#define FT_MAC_H <freetype/ftmac.h> + + + /************************************************************************* + * + * @macro: + * FT_MULTIPLE_MASTERS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional multiple-masters management API of FreeType~2. + * + */ +#define FT_MULTIPLE_MASTERS_H <freetype/ftmm.h> + + + /************************************************************************* + * + * @macro: + * FT_SFNT_NAMES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional FreeType~2 API which accesses embedded `name' strings in + * SFNT-based font formats (i.e., TrueType and OpenType). + * + */ +#define FT_SFNT_NAMES_H <freetype/ftsnames.h> + + + /************************************************************************* + * + * @macro: + * FT_OPENTYPE_VALIDATE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional FreeType~2 API which validates OpenType tables (BASE, GDEF, + * GPOS, GSUB, JSTF). + * + */ +#define FT_OPENTYPE_VALIDATE_H <freetype/ftotval.h> + + + /************************************************************************* + * + * @macro: + * FT_GX_VALIDATE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional FreeType~2 API which validates TrueTypeGX/AAT tables (feat, + * mort, morx, bsln, just, kern, opbd, trak, prop). + * + */ +#define FT_GX_VALIDATE_H <freetype/ftgxval.h> + + + /************************************************************************* + * + * @macro: + * FT_PFR_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which accesses PFR-specific data. + * + */ +#define FT_PFR_H <freetype/ftpfr.h> + + + /************************************************************************* + * + * @macro: + * FT_STROKER_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which provides functions to stroke outline paths. + */ +#define FT_STROKER_H <freetype/ftstroke.h> + + + /************************************************************************* + * + * @macro: + * FT_SYNTHESIS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs artificial obliquing and emboldening. + */ +#define FT_SYNTHESIS_H <freetype/ftsynth.h> + + + /************************************************************************* + * + * @macro: + * FT_FONT_FORMATS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which provides functions specific to font formats. + */ +#define FT_FONT_FORMATS_H <freetype/ftfntfmt.h> + + /* deprecated */ +#define FT_XFREE86_H FT_FONT_FORMATS_H + + + /************************************************************************* + * + * @macro: + * FT_TRIGONOMETRY_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs trigonometric computations (e.g., + * cosines and arc tangents). + */ +#define FT_TRIGONOMETRY_H <freetype/fttrigon.h> + + + /************************************************************************* + * + * @macro: + * FT_LCD_FILTER_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs color filtering for subpixel rendering. + */ +#define FT_LCD_FILTER_H <freetype/ftlcdfil.h> + + + /************************************************************************* + * + * @macro: + * FT_INCREMENTAL_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs incremental glyph loading. + */ +#define FT_INCREMENTAL_H <freetype/ftincrem.h> + + + /************************************************************************* + * + * @macro: + * FT_GASP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which returns entries from the TrueType GASP table. + */ +#define FT_GASP_H <freetype/ftgasp.h> + + + /************************************************************************* + * + * @macro: + * FT_ADVANCES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which returns individual and ranged glyph advances. + */ +#define FT_ADVANCES_H <freetype/ftadvanc.h> + + + /* */ + + /* These header files don't need to be included by the user. */ +#define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h> +#define FT_PARAMETER_TAGS_H <freetype/ftparams.h> + + /* Deprecated macros. */ +#define FT_UNPATENTED_HINTING_H <freetype/ftparams.h> +#define FT_TRUETYPE_UNPATENTED_H <freetype/ftparams.h> + + /* FT_CACHE_H is the only header file needed for the cache subsystem. */ +#define FT_CACHE_IMAGE_H FT_CACHE_H +#define FT_CACHE_SMALL_BITMAPS_H FT_CACHE_H +#define FT_CACHE_CHARMAP_H FT_CACHE_H + + /* The internals of the cache sub-system are no longer exposed. We */ + /* default to FT_CACHE_H at the moment just in case, but we know of */ + /* no rogue client that uses them. */ + /* */ +#define FT_CACHE_MANAGER_H FT_CACHE_H +#define FT_CACHE_INTERNAL_MRU_H FT_CACHE_H +#define FT_CACHE_INTERNAL_MANAGER_H FT_CACHE_H +#define FT_CACHE_INTERNAL_CACHE_H FT_CACHE_H +#define FT_CACHE_INTERNAL_GLYPH_H FT_CACHE_H +#define FT_CACHE_INTERNAL_IMAGE_H FT_CACHE_H +#define FT_CACHE_INTERNAL_SBITS_H FT_CACHE_H + + + /* + * Include internal headers definitions from <internal/...> + * only when building the library. + */ +#ifdef FT2_BUILD_LIBRARY +#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h> +#include FT_INTERNAL_INTERNAL_H +#endif /* FT2_BUILD_LIBRARY */ + + +#endif /* FTHEADER_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/config/ftmodule.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/config/ftmodule.h new file mode 100755 index 00000000..b7299779 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/config/ftmodule.h @@ -0,0 +1,20 @@ +/* This is a generated file. */ +FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) +FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) +FT_USE_MODULE( FT_Module_Class, autofit_module_class ) +FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) +FT_USE_MODULE( FT_Module_Class, psaux_module_class ) +FT_USE_MODULE( FT_Module_Class, psnames_module_class ) +/* EOF */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/config/ftoption.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/config/ftoption.h new file mode 100755 index 00000000..20bbfaa5 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/config/ftoption.h @@ -0,0 +1,977 @@ +/***************************************************************************/ +/* */ +/* ftoption.h */ +/* */ +/* User-selectable configuration macros (specification only). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTOPTION_H_ +#define FTOPTION_H_ + + +#include <ft2build.h> + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* USER-SELECTABLE CONFIGURATION MACROS */ + /* */ + /* This file contains the default configuration macro definitions for */ + /* a standard build of the FreeType library. There are three ways to */ + /* use this file to build project-specific versions of the library: */ + /* */ + /* - You can modify this file by hand, but this is not recommended in */ + /* cases where you would like to build several versions of the */ + /* library from a single source directory. */ + /* */ + /* - You can put a copy of this file in your build directory, more */ + /* precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD' */ + /* is the name of a directory that is included _before_ the FreeType */ + /* include path during compilation. */ + /* */ + /* The default FreeType Makefiles and Jamfiles use the build */ + /* directory `builds/<system>' by default, but you can easily change */ + /* that for your own projects. */ + /* */ + /* - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it */ + /* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */ + /* locate this file during the build. For example, */ + /* */ + /* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */ + /* #include <freetype/config/ftheader.h> */ + /* */ + /* will use `$BUILD/myftoptions.h' instead of this file for macro */ + /* definitions. */ + /* */ + /* Note also that you can similarly pre-define the macro */ + /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */ + /* that are statically linked to the library at compile time. By */ + /* default, this file is <freetype/config/ftmodule.h>. */ + /* */ + /* We highly recommend using the third method whenever possible. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*#***********************************************************************/ + /* */ + /* If you enable this configuration option, FreeType recognizes an */ + /* environment variable called `FREETYPE_PROPERTIES', which can be used */ + /* to control the various font drivers and modules. The controllable */ + /* properties are listed in the section @properties. */ + /* */ + /* You have to undefine this configuration option on platforms that lack */ + /* the concept of environment variables (and thus don't have the */ + /* `getenv' function), for example Windows CE. */ + /* */ + /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */ + /* multiple lines for better readability). */ + /* */ + /* { */ + /* <optional whitespace> */ + /* <module-name1> ':' */ + /* <property-name1> '=' <property-value1> */ + /* <whitespace> */ + /* <module-name2> ':' */ + /* <property-name2> '=' <property-value2> */ + /* ... */ + /* } */ + /* */ + /* Example: */ + /* */ + /* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ */ + /* cff:no-stem-darkening=1 \ */ + /* autofitter:warping=1 */ + /* */ +#define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES + + + /*************************************************************************/ + /* */ + /* Uncomment the line below if you want to activate LCD rendering */ + /* technology similar to ClearType in this build of the library. This */ + /* technology triples the resolution in the direction color subpixels. */ + /* To mitigate color fringes inherent to this technology, you also need */ + /* to explicitly set up LCD filtering. */ + /* */ + /* Note that this feature is covered by several Microsoft patents */ + /* and should not be activated in any default build of the library. */ + /* When this macro is not defined, FreeType offers alternative LCD */ + /* rendering technology that produces excellent output without LCD */ + /* filtering. */ + /* */ +/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ + + + /*************************************************************************/ + /* */ + /* Many compilers provide a non-ANSI 64-bit data type that can be used */ + /* by FreeType to speed up some computations. However, this will create */ + /* some problems when compiling the library in strict ANSI mode. */ + /* */ + /* For this reason, the use of 64-bit integers is normally disabled when */ + /* the __STDC__ macro is defined. You can however disable this by */ + /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here. */ + /* */ + /* For most compilers, this will only create compilation warnings when */ + /* building the library. */ + /* */ + /* ObNote: The compiler-specific 64-bit integers are detected in the */ + /* file `ftconfig.h' either statically or through the */ + /* `configure' script on supported platforms. */ + /* */ +#undef FT_CONFIG_OPTION_FORCE_INT64 + + + /*************************************************************************/ + /* */ + /* If this macro is defined, do not try to use an assembler version of */ + /* performance-critical functions (e.g. FT_MulFix). You should only do */ + /* that to verify that the assembler function works properly, or to */ + /* execute benchmark tests of the various implementations. */ +/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */ + + + /*************************************************************************/ + /* */ + /* If this macro is defined, try to use an inlined assembler version of */ + /* the `FT_MulFix' function, which is a `hotspot' when loading and */ + /* hinting glyphs, and which should be executed as fast as possible. */ + /* */ + /* Note that if your compiler or CPU is not supported, this will default */ + /* to the standard and portable implementation found in `ftcalc.c'. */ + /* */ +#define FT_CONFIG_OPTION_INLINE_MULFIX + + + /*************************************************************************/ + /* */ + /* LZW-compressed file support. */ + /* */ + /* FreeType now handles font files that have been compressed with the */ + /* `compress' program. This is mostly used to parse many of the PCF */ + /* files that come with various X11 distributions. The implementation */ + /* uses NetBSD's `zopen' to partially uncompress the file on the fly */ + /* (see src/lzw/ftgzip.c). */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ +#define FT_CONFIG_OPTION_USE_LZW + + + /*************************************************************************/ + /* */ + /* Gzip-compressed file support. */ + /* */ + /* FreeType now handles font files that have been compressed with the */ + /* `gzip' program. This is mostly used to parse many of the PCF files */ + /* that come with XFree86. The implementation uses `zlib' to */ + /* partially uncompress the file on the fly (see src/gzip/ftgzip.c). */ + /* */ + /* Define this macro if you want to enable this `feature'. See also */ + /* the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below. */ + /* */ +#define FT_CONFIG_OPTION_USE_ZLIB + + + /*************************************************************************/ + /* */ + /* ZLib library selection */ + /* */ + /* This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. */ + /* It allows FreeType's `ftgzip' component to link to the system's */ + /* installation of the ZLib library. This is useful on systems like */ + /* Unix or VMS where it generally is already available. */ + /* */ + /* If you let it undefined, the component will use its own copy */ + /* of the zlib sources instead. These have been modified to be */ + /* included directly within the component and *not* export external */ + /* function names. This allows you to link any program with FreeType */ + /* _and_ ZLib without linking conflicts. */ + /* */ + /* Do not #undef this macro here since the build system might define */ + /* it for certain configurations only. */ + /* */ + /* If you use a build system like cmake or the `configure' script, */ + /* options set by those programs have precendence, overwriting the */ + /* value here with the configured one. */ + /* */ +#define FT_CONFIG_OPTION_SYSTEM_ZLIB + + + /*************************************************************************/ + /* */ + /* Bzip2-compressed file support. */ + /* */ + /* FreeType now handles font files that have been compressed with the */ + /* `bzip2' program. This is mostly used to parse many of the PCF */ + /* files that come with XFree86. The implementation uses `libbz2' to */ + /* partially uncompress the file on the fly (see src/bzip2/ftbzip2.c). */ + /* Contrary to gzip, bzip2 currently is not included and need to use */ + /* the system available bzip2 implementation. */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ + /* If you use a build system like cmake or the `configure' script, */ + /* options set by those programs have precendence, overwriting the */ + /* value here with the configured one. */ + /* */ +#define FT_CONFIG_OPTION_USE_BZIP2 + + + /*************************************************************************/ + /* */ + /* Define to disable the use of file stream functions and types, FILE, */ + /* fopen() etc. Enables the use of smaller system libraries on embedded */ + /* systems that have multiple system libraries, some with or without */ + /* file stream support, in the cases where file stream support is not */ + /* necessary such as memory loading of font files. */ + /* */ +/* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */ + + + /*************************************************************************/ + /* */ + /* PNG bitmap support. */ + /* */ + /* FreeType now handles loading color bitmap glyphs in the PNG format. */ + /* This requires help from the external libpng library. Uncompressed */ + /* color bitmaps do not need any external libraries and will be */ + /* supported regardless of this configuration. */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ + /* If you use a build system like cmake or the `configure' script, */ + /* options set by those programs have precendence, overwriting the */ + /* value here with the configured one. */ + /* */ +#define FT_CONFIG_OPTION_USE_PNG + + + /*************************************************************************/ + /* */ + /* HarfBuzz support. */ + /* */ + /* FreeType uses the HarfBuzz library to improve auto-hinting of */ + /* OpenType fonts. If available, many glyphs not directly addressable */ + /* by a font's character map will be hinted also. */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ + /* If you use a build system like cmake or the `configure' script, */ + /* options set by those programs have precendence, overwriting the */ + /* value here with the configured one. */ + /* */ +/* #undef FT_CONFIG_OPTION_USE_HARFBUZZ */ + + + /*************************************************************************/ + /* */ + /* Glyph Postscript Names handling */ + /* */ + /* By default, FreeType 2 is compiled with the `psnames' module. This */ + /* module is in charge of converting a glyph name string into a */ + /* Unicode value, or return a Macintosh standard glyph name for the */ + /* use with the TrueType `post' table. */ + /* */ + /* Undefine this macro if you do not want `psnames' compiled in your */ + /* build of FreeType. This has the following effects: */ + /* */ + /* - The TrueType driver will provide its own set of glyph names, */ + /* if you build it to support postscript names in the TrueType */ + /* `post' table, but will not synthesize a missing Unicode charmap. */ + /* */ + /* - The Type 1 driver will not be able to synthesize a Unicode */ + /* charmap out of the glyphs found in the fonts. */ + /* */ + /* You would normally undefine this configuration macro when building */ + /* a version of FreeType that doesn't contain a Type 1 or CFF driver. */ + /* */ +#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES + + + /*************************************************************************/ + /* */ + /* Postscript Names to Unicode Values support */ + /* */ + /* By default, FreeType 2 is built with the `PSNames' module compiled */ + /* in. Among other things, the module is used to convert a glyph name */ + /* into a Unicode value. This is especially useful in order to */ + /* synthesize on the fly a Unicode charmap from the CFF/Type 1 driver */ + /* through a big table named the `Adobe Glyph List' (AGL). */ + /* */ + /* Undefine this macro if you do not want the Adobe Glyph List */ + /* compiled in your `PSNames' module. The Type 1 driver will not be */ + /* able to synthesize a Unicode charmap out of the glyphs found in the */ + /* fonts. */ + /* */ +#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST + + + /*************************************************************************/ + /* */ + /* Support for Mac fonts */ + /* */ + /* Define this macro if you want support for outline fonts in Mac */ + /* format (mac dfont, mac resource, macbinary containing a mac */ + /* resource) on non-Mac platforms. */ + /* */ + /* Note that the `FOND' resource isn't checked. */ + /* */ +#define FT_CONFIG_OPTION_MAC_FONTS + + + /*************************************************************************/ + /* */ + /* Guessing methods to access embedded resource forks */ + /* */ + /* Enable extra Mac fonts support on non-Mac platforms (e.g. */ + /* GNU/Linux). */ + /* */ + /* Resource forks which include fonts data are stored sometimes in */ + /* locations which users or developers don't expected. In some cases, */ + /* resource forks start with some offset from the head of a file. In */ + /* other cases, the actual resource fork is stored in file different */ + /* from what the user specifies. If this option is activated, */ + /* FreeType tries to guess whether such offsets or different file */ + /* names must be used. */ + /* */ + /* Note that normal, direct access of resource forks is controlled via */ + /* the FT_CONFIG_OPTION_MAC_FONTS option. */ + /* */ +#ifdef FT_CONFIG_OPTION_MAC_FONTS +#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK +#endif + + + /*************************************************************************/ + /* */ + /* Allow the use of FT_Incremental_Interface to load typefaces that */ + /* contain no glyph data, but supply it via a callback function. */ + /* This is required by clients supporting document formats which */ + /* supply font data incrementally as the document is parsed, such */ + /* as the Ghostscript interpreter for the PostScript language. */ + /* */ +#define FT_CONFIG_OPTION_INCREMENTAL + + + /*************************************************************************/ + /* */ + /* The size in bytes of the render pool used by the scan-line converter */ + /* to do all of its work. */ + /* */ +#define FT_RENDER_POOL_SIZE 16384L + + + /*************************************************************************/ + /* */ + /* FT_MAX_MODULES */ + /* */ + /* The maximum number of modules that can be registered in a single */ + /* FreeType library object. 32 is the default. */ + /* */ +#define FT_MAX_MODULES 32 + + + /*************************************************************************/ + /* */ + /* Debug level */ + /* */ + /* FreeType can be compiled in debug or trace mode. In debug mode, */ + /* errors are reported through the `ftdebug' component. In trace */ + /* mode, additional messages are sent to the standard output during */ + /* execution. */ + /* */ + /* Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode. */ + /* Define FT_DEBUG_LEVEL_TRACE to build it in trace mode. */ + /* */ + /* Don't define any of these macros to compile in `release' mode! */ + /* */ + /* Do not #undef these macros here since the build system might define */ + /* them for certain configurations only. */ + /* */ +/* #define FT_DEBUG_LEVEL_ERROR */ +/* #define FT_DEBUG_LEVEL_TRACE */ + + + /*************************************************************************/ + /* */ + /* Autofitter debugging */ + /* */ + /* If FT_DEBUG_AUTOFIT is defined, FreeType provides some means to */ + /* control the autofitter behaviour for debugging purposes with global */ + /* boolean variables (consequently, you should *never* enable this */ + /* while compiling in `release' mode): */ + /* */ + /* _af_debug_disable_horz_hints */ + /* _af_debug_disable_vert_hints */ + /* _af_debug_disable_blue_hints */ + /* */ + /* Additionally, the following functions provide dumps of various */ + /* internal autofit structures to stdout (using `printf'): */ + /* */ + /* af_glyph_hints_dump_points */ + /* af_glyph_hints_dump_segments */ + /* af_glyph_hints_dump_edges */ + /* af_glyph_hints_get_num_segments */ + /* af_glyph_hints_get_segment_offset */ + /* */ + /* As an argument, they use another global variable: */ + /* */ + /* _af_debug_hints */ + /* */ + /* Please have a look at the `ftgrid' demo program to see how those */ + /* variables and macros should be used. */ + /* */ + /* Do not #undef these macros here since the build system might define */ + /* them for certain configurations only. */ + /* */ +/* #define FT_DEBUG_AUTOFIT */ + + + /*************************************************************************/ + /* */ + /* Memory Debugging */ + /* */ + /* FreeType now comes with an integrated memory debugger that is */ + /* capable of detecting simple errors like memory leaks or double */ + /* deletes. To compile it within your build of the library, you */ + /* should define FT_DEBUG_MEMORY here. */ + /* */ + /* Note that the memory debugger is only activated at runtime when */ + /* when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */ + /* */ + /* Do not #undef this macro here since the build system might define */ + /* it for certain configurations only. */ + /* */ +/* #define FT_DEBUG_MEMORY */ + + + /*************************************************************************/ + /* */ + /* Module errors */ + /* */ + /* If this macro is set (which is _not_ the default), the higher byte */ + /* of an error code gives the module in which the error has occurred, */ + /* while the lower byte is the real error code. */ + /* */ + /* Setting this macro makes sense for debugging purposes only, since */ + /* it would break source compatibility of certain programs that use */ + /* FreeType 2. */ + /* */ + /* More details can be found in the files ftmoderr.h and fterrors.h. */ + /* */ +#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS + + + /*************************************************************************/ + /* */ + /* Position Independent Code */ + /* */ + /* If this macro is set (which is _not_ the default), FreeType2 will */ + /* avoid creating constants that require address fixups. Instead the */ + /* constants will be moved into a struct and additional intialization */ + /* code will be used. */ + /* */ + /* Setting this macro is needed for systems that prohibit address */ + /* fixups, such as BREW. [Note that standard compilers like gcc or */ + /* clang handle PIC generation automatically; you don't have to set */ + /* FT_CONFIG_OPTION_PIC, which is only necessary for very special */ + /* compilers.] */ + /* */ + /* Note that FT_CONFIG_OPTION_PIC support is not available for all */ + /* modules (see `modules.cfg' for a complete list). For building with */ + /* FT_CONFIG_OPTION_PIC support, do the following. */ + /* */ + /* 0. Clone the repository. */ + /* 1. Define FT_CONFIG_OPTION_PIC. */ + /* 2. Remove all subdirectories in `src' that don't have */ + /* FT_CONFIG_OPTION_PIC support. */ + /* 3. Comment out the corresponding modules in `modules.cfg'. */ + /* 4. Compile. */ + /* */ +/* #define FT_CONFIG_OPTION_PIC */ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** S F N T D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support */ + /* embedded bitmaps in all formats using the SFNT module (namely */ + /* TrueType & OpenType). */ + /* */ +#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to */ + /* load and enumerate the glyph Postscript names in a TrueType or */ + /* OpenType file. */ + /* */ + /* Note that when you do not compile the `PSNames' module by undefining */ + /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will */ + /* contain additional code used to read the PS Names table from a font. */ + /* */ + /* (By default, the module uses `PSNames' to extract glyph names.) */ + /* */ +#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to */ + /* access the internal name table in a SFNT-based format like TrueType */ + /* or OpenType. The name table contains various strings used to */ + /* describe the font, like family name, copyright, version, etc. It */ + /* does not contain any glyph name though. */ + /* */ + /* Accessing SFNT names is done through the functions declared in */ + /* `ftsnames.h'. */ + /* */ +#define TT_CONFIG_OPTION_SFNT_NAMES + + + /*************************************************************************/ + /* */ + /* TrueType CMap support */ + /* */ + /* Here you can fine-tune which TrueType CMap table format shall be */ + /* supported. */ +#define TT_CONFIG_CMAP_FORMAT_0 +#define TT_CONFIG_CMAP_FORMAT_2 +#define TT_CONFIG_CMAP_FORMAT_4 +#define TT_CONFIG_CMAP_FORMAT_6 +#define TT_CONFIG_CMAP_FORMAT_8 +#define TT_CONFIG_CMAP_FORMAT_10 +#define TT_CONFIG_CMAP_FORMAT_12 +#define TT_CONFIG_CMAP_FORMAT_13 +#define TT_CONFIG_CMAP_FORMAT_14 + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */ + /* a bytecode interpreter in the TrueType driver. */ + /* */ + /* By undefining this, you will only compile the code necessary to load */ + /* TrueType glyphs without hinting. */ + /* */ + /* Do not #undef this macro here, since the build system might */ + /* define it for certain configurations only. */ + /* */ +#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile */ + /* subpixel hinting support into the TrueType driver. This modifies the */ + /* TrueType hinting mechanism when anything but FT_RENDER_MODE_MONO is */ + /* requested. */ + /* */ + /* In particular, it modifies the bytecode interpreter to interpret (or */ + /* not) instructions in a certain way so that all TrueType fonts look */ + /* like they do in a Windows ClearType (DirectWrite) environment. See */ + /* [1] for a technical overview on what this means. See `ttinterp.h' */ + /* for more details on the LEAN option. */ + /* */ + /* There are three possible values. */ + /* */ + /* Value 1: */ + /* This value is associated with the `Infinality' moniker, */ + /* contributed by an individual nicknamed Infinality with the goal of */ + /* making TrueType fonts render better than on Windows. A high */ + /* amount of configurability and flexibility, down to rules for */ + /* single glyphs in fonts, but also very slow. Its experimental and */ + /* slow nature and the original developer losing interest meant that */ + /* this option was never enabled in default builds. */ + /* */ + /* The corresponding interpreter version is v38. */ + /* */ + /* Value 2: */ + /* The new default mode for the TrueType driver. The Infinality code */ + /* base was stripped to the bare minimum and all configurability */ + /* removed in the name of speed and simplicity. The configurability */ + /* was mainly aimed at legacy fonts like Arial, Times New Roman, or */ + /* Courier. Legacy fonts are fonts that modify vertical stems to */ + /* achieve clean black-and-white bitmaps. The new mode focuses on */ + /* applying a minimal set of rules to all fonts indiscriminately so */ + /* that modern and web fonts render well while legacy fonts render */ + /* okay. */ + /* */ + /* The corresponding interpreter version is v40. */ + /* */ + /* Value 3: */ + /* Compile both, making both v38 and v40 available (the latter is the */ + /* default). */ + /* */ + /* By undefining these, you get rendering behavior like on Windows */ + /* without ClearType, i.e., Windows XP without ClearType enabled and */ + /* Win9x (interpreter version v35). Or not, depending on how much */ + /* hinting blood and testing tears the font designer put into a given */ + /* font. If you define one or both subpixel hinting options, you can */ + /* switch between between v35 and the ones you define (using */ + /* `FT_Property_Set'). */ + /* */ + /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ + /* defined. */ + /* */ + /* [1] https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */ + /* */ +/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */ +#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 +/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) */ + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */ + /* TrueType glyph loader to use Apple's definition of how to handle */ + /* component offsets in composite glyphs. */ + /* */ + /* Apple and MS disagree on the default behavior of component offsets */ + /* in composites. Apple says that they should be scaled by the scaling */ + /* factors in the transformation matrix (roughly, it's more complex) */ + /* while MS says they should not. OpenType defines two bits in the */ + /* composite flags array which can be used to disambiguate, but old */ + /* fonts will not have them. */ + /* */ + /* https://www.microsoft.com/typography/otspec/glyf.htm */ + /* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html */ + /* */ +#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include */ + /* support for Apple's distortable font technology (fvar, gvar, cvar, */ + /* and avar tables). This has many similarities to Type 1 Multiple */ + /* Masters support. */ + /* */ +#define TT_CONFIG_OPTION_GX_VAR_SUPPORT + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_BDF if you want to include support for */ + /* an embedded `BDF ' table within SFNT-based bitmap formats. */ + /* */ +#define TT_CONFIG_OPTION_BDF + + + /*************************************************************************/ + /* */ + /* Option TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES controls the maximum */ + /* number of bytecode instructions executed for a single run of the */ + /* bytecode interpreter, needed to prevent infinite loops. You don't */ + /* want to change this except for very special situations (e.g., making */ + /* a library fuzzer spend less time to handle broken fonts). */ + /* */ + /* It is not expected that this value is ever modified by a configuring */ + /* script; instead, it gets surrounded with #ifndef ... #endif so that */ + /* the value can be set as a preprocessor option on the compiler's */ + /* command line. */ + /* */ +#ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES +#define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES 1000000L +#endif + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* T1_MAX_DICT_DEPTH is the maximum depth of nest dictionaries and */ + /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */ + /* required. */ + /* */ +#define T1_MAX_DICT_DEPTH 5 + + + /*************************************************************************/ + /* */ + /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */ + /* calls during glyph loading. */ + /* */ +#define T1_MAX_SUBRS_CALLS 16 + + + /*************************************************************************/ + /* */ + /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */ + /* minimum of 16 is required. */ + /* */ + /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */ + /* */ +#define T1_MAX_CHARSTRINGS_OPERANDS 256 + + + /*************************************************************************/ + /* */ + /* Define this configuration macro if you want to prevent the */ + /* compilation of `t1afm', which is in charge of reading Type 1 AFM */ + /* files into an existing face. Note that if set, the T1 driver will be */ + /* unable to produce kerning distances. */ + /* */ +#undef T1_CONFIG_OPTION_NO_AFM + + + /*************************************************************************/ + /* */ + /* Define this configuration macro if you want to prevent the */ + /* compilation of the Multiple Masters font support in the Type 1 */ + /* driver. */ + /* */ +#undef T1_CONFIG_OPTION_NO_MM_SUPPORT + + + /*************************************************************************/ + /* */ + /* T1_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe Type 1 */ + /* engine gets compiled into FreeType. If defined, it is possible to */ + /* switch between the two engines using the `hinting-engine' property of */ + /* the type1 driver module. */ + /* */ +/* #define T1_CONFIG_OPTION_OLD_ENGINE */ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** C F F D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Using CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} it is */ + /* possible to set up the default values of the four control points that */ + /* define the stem darkening behaviour of the (new) CFF engine. For */ + /* more details please read the documentation of the */ + /* `darkening-parameters' property (file `ftdriver.h'), which allows the */ + /* control at run-time. */ + /* */ + /* Do *not* undefine these macros! */ + /* */ +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 1000 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 275 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 1667 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 275 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 2333 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 0 + + + /*************************************************************************/ + /* */ + /* CFF_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe CFF */ + /* engine gets compiled into FreeType. If defined, it is possible to */ + /* switch between the two engines using the `hinting-engine' property of */ + /* the cff driver module. */ + /* */ +/* #define CFF_CONFIG_OPTION_OLD_ENGINE */ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** P C F D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* There are many PCF fonts just called `Fixed' which look completely */ + /* different, and which have nothing to do with each other. When */ + /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */ + /* random, the style changes often if one changes the size and one */ + /* cannot select some fonts at all. This option makes the PCF module */ + /* prepend the foundry name (plus a space) to the family name. */ + /* */ + /* We also check whether we have `wide' characters; all put together, we */ + /* get family names like `Sony Fixed' or `Misc Fixed Wide'. */ + /* */ + /* If this option is activated, it can be controlled with the */ + /* `no-long-family-names' property of the pcf driver module. */ + /* */ +/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Compile autofit module with CJK (Chinese, Japanese, Korean) script */ + /* support. */ + /* */ +#define AF_CONFIG_OPTION_CJK + + /*************************************************************************/ + /* */ + /* Compile autofit module with fallback Indic script support, covering */ + /* some scripts that the `latin' submodule of the autofit module doesn't */ + /* (yet) handle. */ + /* */ +#define AF_CONFIG_OPTION_INDIC + + /*************************************************************************/ + /* */ + /* Compile autofit module with warp hinting. The idea of the warping */ + /* code is to slightly scale and shift a glyph within a single dimension */ + /* so that as much of its segments are aligned (more or less) on the */ + /* grid. To find out the optimal scaling and shifting value, various */ + /* parameter combinations are tried and scored. */ + /* */ + /* This experimental option is active only if the rendering mode is */ + /* FT_RENDER_MODE_LIGHT; you can switch warping on and off with the */ + /* `warping' property of the auto-hinter (see file `ftdriver.h' for more */ + /* information; by default it is switched off). */ + /* */ +#define AF_CONFIG_OPTION_USE_WARPER + + /*************************************************************************/ + /* */ + /* Use TrueType-like size metrics for `light' auto-hinting. */ + /* */ + /* It is strongly recommended to avoid this option, which exists only to */ + /* help some legacy applications retain its appearance and behaviour */ + /* with respect to auto-hinted TrueType fonts. */ + /* */ + /* The very reason this option exists at all are GNU/Linux distributions */ + /* like Fedora that did not un-patch the following change (which was */ + /* present in FreeType between versions 2.4.6 and 2.7.1, inclusive). */ + /* */ + /* 2011-07-16 Steven Chu <steven.f.chu@gmail.com> */ + /* */ + /* [truetype] Fix metrics on size request for scalable fonts. */ + /* */ + /* This problematic commit is now reverted (more or less). */ + /* */ +/* #define AF_CONFIG_OPTION_TT_SIZE_METRICS */ + + /* */ + + + /* + * This macro is obsolete. Support has been removed in FreeType + * version 2.5. + */ +/* #define FT_CONFIG_OPTION_OLD_INTERNALS */ + + + /* + * This macro is defined if native TrueType hinting is requested by the + * definitions above. + */ +#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER +#define TT_USE_BYTECODE_INTERPRETER + +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1 +#define TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY +#endif + +#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 2 +#define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL +#endif +#endif +#endif + + + /* + * Check CFF darkening parameters. The checks are the same as in function + * `cff_property_set' in file `cffdrivr.c'. + */ +#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0 || \ + \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0 || \ + \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 > \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 > \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 > \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 || \ + \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500 +#error "Invalid CFF darkening parameters!" +#endif + +FT_END_HEADER + + +#endif /* FTOPTION_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/config/ftstdlib.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/config/ftstdlib.h new file mode 100755 index 00000000..42f9a06e --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/config/ftstdlib.h @@ -0,0 +1,175 @@ +/***************************************************************************/ +/* */ +/* ftstdlib.h */ +/* */ +/* ANSI-specific library and header configuration file (specification */ +/* only). */ +/* */ +/* Copyright 2002-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file is used to group all #includes to the ANSI C library that */ + /* FreeType normally requires. It also defines macros to rename the */ + /* standard functions within the FreeType source code. */ + /* */ + /* Load a file which defines FTSTDLIB_H_ before this one to override it. */ + /* */ + /*************************************************************************/ + + +#ifndef FTSTDLIB_H_ +#define FTSTDLIB_H_ + + +#include <stddef.h> + +#define ft_ptrdiff_t ptrdiff_t + + + /**********************************************************************/ + /* */ + /* integer limits */ + /* */ + /* UINT_MAX and ULONG_MAX are used to automatically compute the size */ + /* of `int' and `long' in bytes at compile-time. So far, this works */ + /* for all platforms the library has been tested on. */ + /* */ + /* Note that on the extremely rare platforms that do not provide */ + /* integer types that are _exactly_ 16 and 32 bits wide (e.g. some */ + /* old Crays where `int' is 36 bits), we do not make any guarantee */ + /* about the correct behaviour of FT2 with all fonts. */ + /* */ + /* In these case, `ftconfig.h' will refuse to compile anyway with a */ + /* message like `couldn't find 32-bit type' or something similar. */ + /* */ + /**********************************************************************/ + + +#include <limits.h> + +#define FT_CHAR_BIT CHAR_BIT +#define FT_USHORT_MAX USHRT_MAX +#define FT_INT_MAX INT_MAX +#define FT_INT_MIN INT_MIN +#define FT_UINT_MAX UINT_MAX +#define FT_LONG_MIN LONG_MIN +#define FT_LONG_MAX LONG_MAX +#define FT_ULONG_MAX ULONG_MAX + + + /**********************************************************************/ + /* */ + /* character and string processing */ + /* */ + /**********************************************************************/ + + +#include <string.h> + +#define ft_memchr memchr +#define ft_memcmp memcmp +#define ft_memcpy memcpy +#define ft_memmove memmove +#define ft_memset memset +#define ft_strcat strcat +#define ft_strcmp strcmp +#define ft_strcpy strcpy +#define ft_strlen strlen +#define ft_strncmp strncmp +#define ft_strncpy strncpy +#define ft_strrchr strrchr +#define ft_strstr strstr + + + /**********************************************************************/ + /* */ + /* file handling */ + /* */ + /**********************************************************************/ + + +#include <stdio.h> + +#define FT_FILE FILE +#define ft_fclose fclose +#define ft_fopen fopen +#define ft_fread fread +#define ft_fseek fseek +#define ft_ftell ftell +#define ft_sprintf sprintf + + + /**********************************************************************/ + /* */ + /* sorting */ + /* */ + /**********************************************************************/ + + +#include <stdlib.h> + +#define ft_qsort qsort + + + /**********************************************************************/ + /* */ + /* memory allocation */ + /* */ + /**********************************************************************/ + + +#define ft_scalloc calloc +#define ft_sfree free +#define ft_smalloc malloc +#define ft_srealloc realloc + + + /**********************************************************************/ + /* */ + /* miscellaneous */ + /* */ + /**********************************************************************/ + + +#define ft_strtol strtol +#define ft_getenv getenv + + + /**********************************************************************/ + /* */ + /* execution control */ + /* */ + /**********************************************************************/ + + +#include <setjmp.h> + +#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */ + /* jmp_buf is defined as a macro */ + /* on certain platforms */ + +#define ft_longjmp longjmp +#define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */ + + + /* the following is only used for debugging purposes, i.e., if */ + /* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */ + +#include <stdarg.h> + + +#endif /* FTSTDLIB_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/freetype.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/freetype.h new file mode 100755 index 00000000..96644046 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/freetype.h @@ -0,0 +1,4657 @@ +/***************************************************************************/ +/* */ +/* freetype.h */ +/* */ +/* FreeType high-level API and common types (specification only). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FREETYPE_H_ +#define FREETYPE_H_ + + +#ifndef FT_FREETYPE_H +#error "`ft2build.h' hasn't been included yet!" +#error "Please always use macros to include FreeType header files." +#error "Example:" +#error " #include <ft2build.h>" +#error " #include FT_FREETYPE_H" +#endif + + +#include <ft2build.h> +#include FT_CONFIG_CONFIG_H +#include FT_TYPES_H +#include FT_ERRORS_H + + +FT_BEGIN_HEADER + + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* header_inclusion */ + /* */ + /* <Title> */ + /* FreeType's header inclusion scheme */ + /* */ + /* <Abstract> */ + /* How client applications should include FreeType header files. */ + /* */ + /* <Description> */ + /* To be as flexible as possible (and for historical reasons), */ + /* FreeType uses a very special inclusion scheme to load header */ + /* files, for example */ + /* */ + /* { */ + /* #include <ft2build.h> */ + /* */ + /* #include FT_FREETYPE_H */ + /* #include FT_OUTLINE_H */ + /* } */ + /* */ + /* A compiler and its preprocessor only needs an include path to find */ + /* the file `ft2build.h'; the exact locations and names of the other */ + /* FreeType header files are hidden by preprocessor macro names, */ + /* loaded by `ft2build.h'. The API documentation always gives the */ + /* header macro name needed for a particular function. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* user_allocation */ + /* */ + /* <Title> */ + /* User allocation */ + /* */ + /* <Abstract> */ + /* How client applications should allocate FreeType data structures. */ + /* */ + /* <Description> */ + /* FreeType assumes that structures allocated by the user and passed */ + /* as arguments are zeroed out except for the actual data. In other */ + /* words, it is recommended to use `calloc' (or variants of it) */ + /* instead of `malloc' for allocation. */ + /* */ + /*************************************************************************/ + + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* B A S I C T Y P E S */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* base_interface */ + /* */ + /* <Title> */ + /* Base Interface */ + /* */ + /* <Abstract> */ + /* The FreeType~2 base font interface. */ + /* */ + /* <Description> */ + /* This section describes the most important public high-level API */ + /* functions of FreeType~2. */ + /* */ + /* <Order> */ + /* FT_Library */ + /* FT_Face */ + /* FT_Size */ + /* FT_GlyphSlot */ + /* FT_CharMap */ + /* FT_Encoding */ + /* FT_ENC_TAG */ + /* */ + /* FT_FaceRec */ + /* */ + /* FT_FACE_FLAG_SCALABLE */ + /* FT_FACE_FLAG_FIXED_SIZES */ + /* FT_FACE_FLAG_FIXED_WIDTH */ + /* FT_FACE_FLAG_HORIZONTAL */ + /* FT_FACE_FLAG_VERTICAL */ + /* FT_FACE_FLAG_COLOR */ + /* FT_FACE_FLAG_SFNT */ + /* FT_FACE_FLAG_CID_KEYED */ + /* FT_FACE_FLAG_TRICKY */ + /* FT_FACE_FLAG_KERNING */ + /* FT_FACE_FLAG_MULTIPLE_MASTERS */ + /* FT_FACE_FLAG_VARIATION */ + /* FT_FACE_FLAG_GLYPH_NAMES */ + /* FT_FACE_FLAG_EXTERNAL_STREAM */ + /* FT_FACE_FLAG_HINTER */ + /* */ + /* FT_HAS_HORIZONTAL */ + /* FT_HAS_VERTICAL */ + /* FT_HAS_KERNING */ + /* FT_HAS_FIXED_SIZES */ + /* FT_HAS_GLYPH_NAMES */ + /* FT_HAS_COLOR */ + /* FT_HAS_MULTIPLE_MASTERS */ + /* */ + /* FT_IS_SFNT */ + /* FT_IS_SCALABLE */ + /* FT_IS_FIXED_WIDTH */ + /* FT_IS_CID_KEYED */ + /* FT_IS_TRICKY */ + /* FT_IS_NAMED_INSTANCE */ + /* FT_IS_VARIATION */ + /* */ + /* FT_STYLE_FLAG_BOLD */ + /* FT_STYLE_FLAG_ITALIC */ + /* */ + /* FT_SizeRec */ + /* FT_Size_Metrics */ + /* */ + /* FT_GlyphSlotRec */ + /* FT_Glyph_Metrics */ + /* FT_SubGlyph */ + /* */ + /* FT_Bitmap_Size */ + /* */ + /* FT_Init_FreeType */ + /* FT_Done_FreeType */ + /* */ + /* FT_New_Face */ + /* FT_Done_Face */ + /* FT_Reference_Face */ + /* FT_New_Memory_Face */ + /* FT_Face_Properties */ + /* FT_Open_Face */ + /* FT_Open_Args */ + /* FT_Parameter */ + /* FT_Attach_File */ + /* FT_Attach_Stream */ + /* */ + /* FT_Set_Char_Size */ + /* FT_Set_Pixel_Sizes */ + /* FT_Request_Size */ + /* FT_Select_Size */ + /* FT_Size_Request_Type */ + /* FT_Size_RequestRec */ + /* FT_Size_Request */ + /* FT_Set_Transform */ + /* FT_Load_Glyph */ + /* FT_Get_Char_Index */ + /* FT_Get_First_Char */ + /* FT_Get_Next_Char */ + /* FT_Get_Name_Index */ + /* FT_Load_Char */ + /* */ + /* FT_OPEN_MEMORY */ + /* FT_OPEN_STREAM */ + /* FT_OPEN_PATHNAME */ + /* FT_OPEN_DRIVER */ + /* FT_OPEN_PARAMS */ + /* */ + /* FT_LOAD_DEFAULT */ + /* FT_LOAD_RENDER */ + /* FT_LOAD_MONOCHROME */ + /* FT_LOAD_LINEAR_DESIGN */ + /* FT_LOAD_NO_SCALE */ + /* FT_LOAD_NO_HINTING */ + /* FT_LOAD_NO_BITMAP */ + /* FT_LOAD_NO_AUTOHINT */ + /* FT_LOAD_COLOR */ + /* */ + /* FT_LOAD_VERTICAL_LAYOUT */ + /* FT_LOAD_IGNORE_TRANSFORM */ + /* FT_LOAD_FORCE_AUTOHINT */ + /* FT_LOAD_NO_RECURSE */ + /* FT_LOAD_PEDANTIC */ + /* */ + /* FT_LOAD_TARGET_NORMAL */ + /* FT_LOAD_TARGET_LIGHT */ + /* FT_LOAD_TARGET_MONO */ + /* FT_LOAD_TARGET_LCD */ + /* FT_LOAD_TARGET_LCD_V */ + /* */ + /* FT_LOAD_TARGET_MODE */ + /* */ + /* FT_Render_Glyph */ + /* FT_Render_Mode */ + /* FT_Get_Kerning */ + /* FT_Kerning_Mode */ + /* FT_Get_Track_Kerning */ + /* FT_Get_Glyph_Name */ + /* FT_Get_Postscript_Name */ + /* */ + /* FT_CharMapRec */ + /* FT_Select_Charmap */ + /* FT_Set_Charmap */ + /* FT_Get_Charmap_Index */ + /* */ + /* FT_Get_FSType_Flags */ + /* FT_Get_SubGlyph_Info */ + /* */ + /* FT_Face_Internal */ + /* FT_Size_Internal */ + /* FT_Slot_Internal */ + /* */ + /* FT_FACE_FLAG_XXX */ + /* FT_STYLE_FLAG_XXX */ + /* FT_OPEN_XXX */ + /* FT_LOAD_XXX */ + /* FT_LOAD_TARGET_XXX */ + /* FT_SUBGLYPH_FLAG_XXX */ + /* FT_FSTYPE_XXX */ + /* */ + /* FT_HAS_FAST_GLYPHS */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Glyph_Metrics */ + /* */ + /* <Description> */ + /* A structure to model the metrics of a single glyph. The values */ + /* are expressed in 26.6 fractional pixel format; if the flag */ + /* @FT_LOAD_NO_SCALE has been used while loading the glyph, values */ + /* are expressed in font units instead. */ + /* */ + /* <Fields> */ + /* width :: */ + /* The glyph's width. */ + /* */ + /* height :: */ + /* The glyph's height. */ + /* */ + /* horiBearingX :: */ + /* Left side bearing for horizontal layout. */ + /* */ + /* horiBearingY :: */ + /* Top side bearing for horizontal layout. */ + /* */ + /* horiAdvance :: */ + /* Advance width for horizontal layout. */ + /* */ + /* vertBearingX :: */ + /* Left side bearing for vertical layout. */ + /* */ + /* vertBearingY :: */ + /* Top side bearing for vertical layout. Larger positive values */ + /* mean further below the vertical glyph origin. */ + /* */ + /* vertAdvance :: */ + /* Advance height for vertical layout. Positive values mean the */ + /* glyph has a positive advance downward. */ + /* */ + /* <Note> */ + /* If not disabled with @FT_LOAD_NO_HINTING, the values represent */ + /* dimensions of the hinted glyph (in case hinting is applicable). */ + /* */ + /* Stroking a glyph with an outside border does not increase */ + /* `horiAdvance' or `vertAdvance'; you have to manually adjust these */ + /* values to account for the added width and height. */ + /* */ + /* FreeType doesn't use the `VORG' table data for CFF fonts because */ + /* it doesn't have an interface to quickly retrieve the glyph height. */ + /* The y~coordinate of the vertical origin can be simply computed as */ + /* `vertBearingY + height' after loading a glyph. */ + /* */ + typedef struct FT_Glyph_Metrics_ + { + FT_Pos width; + FT_Pos height; + + FT_Pos horiBearingX; + FT_Pos horiBearingY; + FT_Pos horiAdvance; + + FT_Pos vertBearingX; + FT_Pos vertBearingY; + FT_Pos vertAdvance; + + } FT_Glyph_Metrics; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Bitmap_Size */ + /* */ + /* <Description> */ + /* This structure models the metrics of a bitmap strike (i.e., a set */ + /* of glyphs for a given point size and resolution) in a bitmap font. */ + /* It is used for the `available_sizes' field of @FT_Face. */ + /* */ + /* <Fields> */ + /* height :: The vertical distance, in pixels, between two */ + /* consecutive baselines. It is always positive. */ + /* */ + /* width :: The average width, in pixels, of all glyphs in the */ + /* strike. */ + /* */ + /* size :: The nominal size of the strike in 26.6 fractional */ + /* points. This field is not very useful. */ + /* */ + /* x_ppem :: The horizontal ppem (nominal width) in 26.6 fractional */ + /* pixels. */ + /* */ + /* y_ppem :: The vertical ppem (nominal height) in 26.6 fractional */ + /* pixels. */ + /* */ + /* <Note> */ + /* Windows FNT: */ + /* The nominal size given in a FNT font is not reliable. If the */ + /* driver finds it incorrect, it sets `size' to some calculated */ + /* values, and `x_ppem' and `y_ppem' to the pixel width and height */ + /* given in the font, respectively. */ + /* */ + /* TrueType embedded bitmaps: */ + /* `size', `width', and `height' values are not contained in the */ + /* bitmap strike itself. They are computed from the global font */ + /* parameters. */ + /* */ + typedef struct FT_Bitmap_Size_ + { + FT_Short height; + FT_Short width; + + FT_Pos size; + + FT_Pos x_ppem; + FT_Pos y_ppem; + + } FT_Bitmap_Size; + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* O B J E C T C L A S S E S */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Library */ + /* */ + /* <Description> */ + /* A handle to a FreeType library instance. Each `library' is */ + /* completely independent from the others; it is the `root' of a set */ + /* of objects like fonts, faces, sizes, etc. */ + /* */ + /* It also embeds a memory manager (see @FT_Memory), as well as a */ + /* scan-line converter object (see @FT_Raster). */ + /* */ + /* In multi-threaded applications it is easiest to use one */ + /* `FT_Library' object per thread. In case this is too cumbersome, */ + /* a single `FT_Library' object across threads is possible also */ + /* (since FreeType version 2.5.6), as long as a mutex lock is used */ + /* around @FT_New_Face and @FT_Done_Face. */ + /* */ + /* <Note> */ + /* Library objects are normally created by @FT_Init_FreeType, and */ + /* destroyed with @FT_Done_FreeType. If you need reference-counting */ + /* (cf. @FT_Reference_Library), use @FT_New_Library and */ + /* @FT_Done_Library. */ + /* */ + typedef struct FT_LibraryRec_ *FT_Library; + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* module_management */ + /* */ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Module */ + /* */ + /* <Description> */ + /* A handle to a given FreeType module object. A module can be a */ + /* font driver, a renderer, or anything else that provides services */ + /* to the former. */ + /* */ + typedef struct FT_ModuleRec_* FT_Module; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Driver */ + /* */ + /* <Description> */ + /* A handle to a given FreeType font driver object. A font driver */ + /* is a module capable of creating faces from font files. */ + /* */ + typedef struct FT_DriverRec_* FT_Driver; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Renderer */ + /* */ + /* <Description> */ + /* A handle to a given FreeType renderer. A renderer is a module in */ + /* charge of converting a glyph's outline image to a bitmap. It */ + /* supports a single glyph image format, and one or more target */ + /* surface depths. */ + /* */ + typedef struct FT_RendererRec_* FT_Renderer; + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* base_interface */ + /* */ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Face */ + /* */ + /* <Description> */ + /* A handle to a typographic face object. A face object models a */ + /* given typeface, in a given style. */ + /* */ + /* <Note> */ + /* A face object also owns a single @FT_GlyphSlot object, as well */ + /* as one or more @FT_Size objects. */ + /* */ + /* Use @FT_New_Face or @FT_Open_Face to create a new face object from */ + /* a given filepath or a custom input stream. */ + /* */ + /* Use @FT_Done_Face to destroy it (along with its slot and sizes). */ + /* */ + /* An `FT_Face' object can only be safely used from one thread at a */ + /* time. Similarly, creation and destruction of `FT_Face' with the */ + /* same @FT_Library object can only be done from one thread at a */ + /* time. On the other hand, functions like @FT_Load_Glyph and its */ + /* siblings are thread-safe and do not need the lock to be held as */ + /* long as the same `FT_Face' object is not used from multiple */ + /* threads at the same time. */ + /* */ + /* <Also> */ + /* See @FT_FaceRec for the publicly accessible fields of a given face */ + /* object. */ + /* */ + typedef struct FT_FaceRec_* FT_Face; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Size */ + /* */ + /* <Description> */ + /* A handle to an object that models a face scaled to a given */ + /* character size. */ + /* */ + /* <Note> */ + /* An @FT_Face has one _active_ @FT_Size object that is used by */ + /* functions like @FT_Load_Glyph to determine the scaling */ + /* transformation that in turn is used to load and hint glyphs and */ + /* metrics. */ + /* */ + /* You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, */ + /* @FT_Request_Size or even @FT_Select_Size to change the content */ + /* (i.e., the scaling values) of the active @FT_Size. */ + /* */ + /* You can use @FT_New_Size to create additional size objects for a */ + /* given @FT_Face, but they won't be used by other functions until */ + /* you activate it through @FT_Activate_Size. Only one size can be */ + /* activated at any given time per face. */ + /* */ + /* <Also> */ + /* See @FT_SizeRec for the publicly accessible fields of a given size */ + /* object. */ + /* */ + typedef struct FT_SizeRec_* FT_Size; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_GlyphSlot */ + /* */ + /* <Description> */ + /* A handle to a given `glyph slot'. A slot is a container that can */ + /* hold any of the glyphs contained in its parent face. */ + /* */ + /* In other words, each time you call @FT_Load_Glyph or */ + /* @FT_Load_Char, the slot's content is erased by the new glyph data, */ + /* i.e., the glyph's metrics, its image (bitmap or outline), and */ + /* other control information. */ + /* */ + /* <Also> */ + /* See @FT_GlyphSlotRec for the publicly accessible glyph fields. */ + /* */ + typedef struct FT_GlyphSlotRec_* FT_GlyphSlot; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_CharMap */ + /* */ + /* <Description> */ + /* A handle to a character map (usually abbreviated to `charmap'). A */ + /* charmap is used to translate character codes in a given encoding */ + /* into glyph indexes for its parent's face. Some font formats may */ + /* provide several charmaps per font. */ + /* */ + /* Each face object owns zero or more charmaps, but only one of them */ + /* can be `active', providing the data used by @FT_Get_Char_Index or */ + /* @FT_Load_Char. */ + /* */ + /* The list of available charmaps in a face is available through the */ + /* `face->num_charmaps' and `face->charmaps' fields of @FT_FaceRec. */ + /* */ + /* The currently active charmap is available as `face->charmap'. */ + /* You should call @FT_Set_Charmap to change it. */ + /* */ + /* <Note> */ + /* When a new face is created (either through @FT_New_Face or */ + /* @FT_Open_Face), the library looks for a Unicode charmap within */ + /* the list and automatically activates it. If there is no Unicode */ + /* charmap, FreeType doesn't set an `active' charmap. */ + /* */ + /* <Also> */ + /* See @FT_CharMapRec for the publicly accessible fields of a given */ + /* character map. */ + /* */ + typedef struct FT_CharMapRec_* FT_CharMap; + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_ENC_TAG */ + /* */ + /* <Description> */ + /* This macro converts four-letter tags into an unsigned long. It is */ + /* used to define `encoding' identifiers (see @FT_Encoding). */ + /* */ + /* <Note> */ + /* Since many 16-bit compilers don't like 32-bit enumerations, you */ + /* should redefine this macro in case of problems to something like */ + /* this: */ + /* */ + /* { */ + /* #define FT_ENC_TAG( value, a, b, c, d ) value */ + /* } */ + /* */ + /* to get a simple enumeration without assigning special numbers. */ + /* */ + +#ifndef FT_ENC_TAG +#define FT_ENC_TAG( value, a, b, c, d ) \ + value = ( ( (FT_UInt32)(a) << 24 ) | \ + ( (FT_UInt32)(b) << 16 ) | \ + ( (FT_UInt32)(c) << 8 ) | \ + (FT_UInt32)(d) ) + +#endif /* FT_ENC_TAG */ + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Encoding */ + /* */ + /* <Description> */ + /* An enumeration to specify character sets supported by charmaps. */ + /* Used in the @FT_Select_Charmap API function. */ + /* */ + /* <Note> */ + /* Despite the name, this enumeration lists specific character */ + /* repertories (i.e., charsets), and not text encoding methods (e.g., */ + /* UTF-8, UTF-16, etc.). */ + /* */ + /* Other encodings might be defined in the future. */ + /* */ + /* <Values> */ + /* FT_ENCODING_NONE :: */ + /* The encoding value~0 is reserved. */ + /* */ + /* FT_ENCODING_UNICODE :: */ + /* The Unicode character set. This value covers all versions of */ + /* the Unicode repertoire, including ASCII and Latin-1. Most fonts */ + /* include a Unicode charmap, but not all of them. */ + /* */ + /* For example, if you want to access Unicode value U+1F028 (and */ + /* the font contains it), use value 0x1F028 as the input value for */ + /* @FT_Get_Char_Index. */ + /* */ + /* FT_ENCODING_MS_SYMBOL :: */ + /* Microsoft Symbol encoding, used to encode mathematical symbols */ + /* and wingdings. For more information, see */ + /* `https://www.microsoft.com/typography/otspec/recom.htm', */ + /* `http://www.kostis.net/charsets/symbol.htm', and */ + /* `http://www.kostis.net/charsets/wingding.htm'. */ + /* */ + /* This encoding uses character codes from the PUA (Private Unicode */ + /* Area) in the range U+F020-U+F0FF. */ + /* */ + /* FT_ENCODING_SJIS :: */ + /* Shift JIS encoding for Japanese. More info at */ + /* `https://en.wikipedia.org/wiki/Shift_JIS'. See note on */ + /* multi-byte encodings below. */ + /* */ + /* FT_ENCODING_PRC :: */ + /* Corresponds to encoding systems mainly for Simplified Chinese as */ + /* used in People's Republic of China (PRC). The encoding layout */ + /* is based on GB~2312 and its supersets GBK and GB~18030. */ + /* */ + /* FT_ENCODING_BIG5 :: */ + /* Corresponds to an encoding system for Traditional Chinese as */ + /* used in Taiwan and Hong Kong. */ + /* */ + /* FT_ENCODING_WANSUNG :: */ + /* Corresponds to the Korean encoding system known as Extended */ + /* Wansung (MS Windows code page 949). */ + /* For more information see */ + /* `https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt'. */ + /* */ + /* FT_ENCODING_JOHAB :: */ + /* The Korean standard character set (KS~C 5601-1992), which */ + /* corresponds to MS Windows code page 1361. This character set */ + /* includes all possible Hangul character combinations. */ + /* */ + /* FT_ENCODING_ADOBE_LATIN_1 :: */ + /* Corresponds to a Latin-1 encoding as defined in a Type~1 */ + /* PostScript font. It is limited to 256 character codes. */ + /* */ + /* FT_ENCODING_ADOBE_STANDARD :: */ + /* Adobe Standard encoding, as found in Type~1, CFF, and */ + /* OpenType/CFF fonts. It is limited to 256 character codes. */ + /* */ + /* FT_ENCODING_ADOBE_EXPERT :: */ + /* Adobe Expert encoding, as found in Type~1, CFF, and OpenType/CFF */ + /* fonts. It is limited to 256 character codes. */ + /* */ + /* FT_ENCODING_ADOBE_CUSTOM :: */ + /* Corresponds to a custom encoding, as found in Type~1, CFF, and */ + /* OpenType/CFF fonts. It is limited to 256 character codes. */ + /* */ + /* FT_ENCODING_APPLE_ROMAN :: */ + /* Apple roman encoding. Many TrueType and OpenType fonts contain */ + /* a charmap for this 8-bit encoding, since older versions of Mac */ + /* OS are able to use it. */ + /* */ + /* FT_ENCODING_OLD_LATIN_2 :: */ + /* This value is deprecated and was neither used nor reported by */ + /* FreeType. Don't use or test for it. */ + /* */ + /* FT_ENCODING_MS_SJIS :: */ + /* Same as FT_ENCODING_SJIS. Deprecated. */ + /* */ + /* FT_ENCODING_MS_GB2312 :: */ + /* Same as FT_ENCODING_PRC. Deprecated. */ + /* */ + /* FT_ENCODING_MS_BIG5 :: */ + /* Same as FT_ENCODING_BIG5. Deprecated. */ + /* */ + /* FT_ENCODING_MS_WANSUNG :: */ + /* Same as FT_ENCODING_WANSUNG. Deprecated. */ + /* */ + /* FT_ENCODING_MS_JOHAB :: */ + /* Same as FT_ENCODING_JOHAB. Deprecated. */ + /* */ + /* <Note> */ + /* By default, FreeType enables a Unicode charmap and tags it with */ + /* FT_ENCODING_UNICODE when it is either provided or can be generated */ + /* from PostScript glyph name dictionaries in the font file. */ + /* All other encodings are considered legacy and tagged only if */ + /* explicitly defined in the font file. Otherwise, FT_ENCODING_NONE */ + /* is used. */ + /* */ + /* FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap */ + /* is neither Unicode nor ISO-8859-1 (otherwise it is set to */ + /* FT_ENCODING_UNICODE). Use @FT_Get_BDF_Charset_ID to find out */ + /* which encoding is really present. If, for example, the */ + /* `cs_registry' field is `KOI8' and the `cs_encoding' field is `R', */ + /* the font is encoded in KOI8-R. */ + /* */ + /* FT_ENCODING_NONE is always set (with a single exception) by the */ + /* winfonts driver. Use @FT_Get_WinFNT_Header and examine the */ + /* `charset' field of the @FT_WinFNT_HeaderRec structure to find out */ + /* which encoding is really present. For example, */ + /* @FT_WinFNT_ID_CP1251 (204) means Windows code page 1251 (for */ + /* Russian). */ + /* */ + /* FT_ENCODING_NONE is set if `platform_id' is @TT_PLATFORM_MACINTOSH */ + /* and `encoding_id' is not `TT_MAC_ID_ROMAN' (otherwise it is set to */ + /* FT_ENCODING_APPLE_ROMAN). */ + /* */ + /* If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function */ + /* @FT_Get_CMap_Language_ID to query the Mac language ID that may */ + /* be needed to be able to distinguish Apple encoding variants. See */ + /* */ + /* https://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt */ + /* */ + /* to get an idea how to do that. Basically, if the language ID */ + /* is~0, don't use it, otherwise subtract 1 from the language ID. */ + /* Then examine `encoding_id'. If, for example, `encoding_id' is */ + /* `TT_MAC_ID_ROMAN' and the language ID (minus~1) is */ + /* `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman. */ + /* `TT_MAC_ID_ARABIC' with `TT_MAC_LANGID_FARSI' means the Farsi */ + /* variant the Arabic encoding. */ + /* */ + typedef enum FT_Encoding_ + { + FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ), + + FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ), + FT_ENC_TAG( FT_ENCODING_UNICODE, 'u', 'n', 'i', 'c' ), + + FT_ENC_TAG( FT_ENCODING_SJIS, 's', 'j', 'i', 's' ), + FT_ENC_TAG( FT_ENCODING_PRC, 'g', 'b', ' ', ' ' ), + FT_ENC_TAG( FT_ENCODING_BIG5, 'b', 'i', 'g', '5' ), + FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ), + FT_ENC_TAG( FT_ENCODING_JOHAB, 'j', 'o', 'h', 'a' ), + + /* for backward compatibility */ + FT_ENCODING_GB2312 = FT_ENCODING_PRC, + FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS, + FT_ENCODING_MS_GB2312 = FT_ENCODING_PRC, + FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5, + FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG, + FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB, + + FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ), + FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT, 'A', 'D', 'B', 'E' ), + FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM, 'A', 'D', 'B', 'C' ), + FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1, 'l', 'a', 't', '1' ), + + FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ), + + FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' ) + + } FT_Encoding; + + + /* these constants are deprecated; use the corresponding `FT_Encoding' */ + /* values instead */ +#define ft_encoding_none FT_ENCODING_NONE +#define ft_encoding_unicode FT_ENCODING_UNICODE +#define ft_encoding_symbol FT_ENCODING_MS_SYMBOL +#define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1 +#define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2 +#define ft_encoding_sjis FT_ENCODING_SJIS +#define ft_encoding_gb2312 FT_ENCODING_PRC +#define ft_encoding_big5 FT_ENCODING_BIG5 +#define ft_encoding_wansung FT_ENCODING_WANSUNG +#define ft_encoding_johab FT_ENCODING_JOHAB + +#define ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD +#define ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT +#define ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM +#define ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_CharMapRec */ + /* */ + /* <Description> */ + /* The base charmap structure. */ + /* */ + /* <Fields> */ + /* face :: A handle to the parent face object. */ + /* */ + /* encoding :: An @FT_Encoding tag identifying the charmap. Use */ + /* this with @FT_Select_Charmap. */ + /* */ + /* platform_id :: An ID number describing the platform for the */ + /* following encoding ID. This comes directly from */ + /* the TrueType specification and gets emulated for */ + /* other formats. */ + /* */ + /* encoding_id :: A platform specific encoding number. This also */ + /* comes from the TrueType specification and gets */ + /* emulated similarly. */ + /* */ + typedef struct FT_CharMapRec_ + { + FT_Face face; + FT_Encoding encoding; + FT_UShort platform_id; + FT_UShort encoding_id; + + } FT_CharMapRec; + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* B A S E O B J E C T C L A S S E S */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Face_Internal */ + /* */ + /* <Description> */ + /* An opaque handle to an `FT_Face_InternalRec' structure that models */ + /* the private data of a given @FT_Face object. */ + /* */ + /* This structure might change between releases of FreeType~2 and is */ + /* not generally available to client applications. */ + /* */ + typedef struct FT_Face_InternalRec_* FT_Face_Internal; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_FaceRec */ + /* */ + /* <Description> */ + /* FreeType root face class structure. A face object models a */ + /* typeface in a font file. */ + /* */ + /* <Fields> */ + /* num_faces :: The number of faces in the font file. Some */ + /* font formats can have multiple faces in */ + /* a single font file. */ + /* */ + /* face_index :: This field holds two different values. */ + /* Bits 0-15 are the index of the face in the */ + /* font file (starting with value~0). They */ + /* are set to~0 if there is only one face in */ + /* the font file. */ + /* */ + /* [Since 2.6.1] Bits 16-30 are relevant to GX */ + /* and OpenType variation fonts only, holding */ + /* the named instance index for the current */ + /* face index (starting with value~1; value~0 */ + /* indicates font access without a named */ + /* instance). For non-variation fonts, bits */ + /* 16-30 are ignored. If we have the third */ + /* named instance of face~4, say, `face_index' */ + /* is set to 0x00030004. */ + /* */ + /* Bit 31 is always zero (this is, */ + /* `face_index' is always a positive value). */ + /* */ + /* [Since 2.9] Changing the design coordinates */ + /* with @FT_Set_Var_Design_Coordinates or */ + /* @FT_Set_Var_Blend_Coordinates does not */ + /* influence the named instance index value */ + /* (only @FT_Set_Named_Instance does that). */ + /* */ + /* face_flags :: A set of bit flags that give important */ + /* information about the face; see */ + /* @FT_FACE_FLAG_XXX for the details. */ + /* */ + /* style_flags :: The lower 16~bits contain a set of bit */ + /* flags indicating the style of the face; see */ + /* @FT_STYLE_FLAG_XXX for the details. */ + /* */ + /* [Since 2.6.1] Bits 16-30 hold the number */ + /* of named instances available for the */ + /* current face if we have a GX or OpenType */ + /* variation (sub)font. Bit 31 is always zero */ + /* (this is, `style_flags' is always a */ + /* positive value). Note that a variation */ + /* font has always at least one named */ + /* instance, namely the default instance. */ + /* */ + /* num_glyphs :: The number of glyphs in the face. If the */ + /* face is scalable and has sbits (see */ + /* `num_fixed_sizes'), it is set to the number */ + /* of outline glyphs. */ + /* */ + /* For CID-keyed fonts (not in an SFNT */ + /* wrapper) this value gives the highest CID */ + /* used in the font. */ + /* */ + /* family_name :: The face's family name. This is an ASCII */ + /* string, usually in English, that describes */ + /* the typeface's family (like `Times New */ + /* Roman', `Bodoni', `Garamond', etc). This */ + /* is a least common denominator used to list */ + /* fonts. Some formats (TrueType & OpenType) */ + /* provide localized and Unicode versions of */ + /* this string. Applications should use the */ + /* format specific interface to access them. */ + /* Can be NULL (e.g., in fonts embedded in a */ + /* PDF file). */ + /* */ + /* In case the font doesn't provide a specific */ + /* family name entry, FreeType tries to */ + /* synthesize one, deriving it from other name */ + /* entries. */ + /* */ + /* style_name :: The face's style name. This is an ASCII */ + /* string, usually in English, that describes */ + /* the typeface's style (like `Italic', */ + /* `Bold', `Condensed', etc). Not all font */ + /* formats provide a style name, so this field */ + /* is optional, and can be set to NULL. As */ + /* for `family_name', some formats provide */ + /* localized and Unicode versions of this */ + /* string. Applications should use the format */ + /* specific interface to access them. */ + /* */ + /* num_fixed_sizes :: The number of bitmap strikes in the face. */ + /* Even if the face is scalable, there might */ + /* still be bitmap strikes, which are called */ + /* `sbits' in that case. */ + /* */ + /* available_sizes :: An array of @FT_Bitmap_Size for all bitmap */ + /* strikes in the face. It is set to NULL if */ + /* there is no bitmap strike. */ + /* */ + /* Note that FreeType tries to sanitize the */ + /* strike data since they are sometimes sloppy */ + /* or incorrect, but this can easily fail. */ + /* */ + /* num_charmaps :: The number of charmaps in the face. */ + /* */ + /* charmaps :: An array of the charmaps of the face. */ + /* */ + /* generic :: A field reserved for client uses. See the */ + /* @FT_Generic type description. */ + /* */ + /* bbox :: The font bounding box. Coordinates are */ + /* expressed in font units (see */ + /* `units_per_EM'). The box is large enough */ + /* to contain any glyph from the font. Thus, */ + /* `bbox.yMax' can be seen as the `maximum */ + /* ascender', and `bbox.yMin' as the `minimum */ + /* descender'. Only relevant for scalable */ + /* formats. */ + /* */ + /* Note that the bounding box might be off by */ + /* (at least) one pixel for hinted fonts. See */ + /* @FT_Size_Metrics for further discussion. */ + /* */ + /* units_per_EM :: The number of font units per EM square for */ + /* this face. This is typically 2048 for */ + /* TrueType fonts, and 1000 for Type~1 fonts. */ + /* Only relevant for scalable formats. */ + /* */ + /* ascender :: The typographic ascender of the face, */ + /* expressed in font units. For font formats */ + /* not having this information, it is set to */ + /* `bbox.yMax'. Only relevant for scalable */ + /* formats. */ + /* */ + /* descender :: The typographic descender of the face, */ + /* expressed in font units. For font formats */ + /* not having this information, it is set to */ + /* `bbox.yMin'. Note that this field is */ + /* negative for values below the baseline. */ + /* Only relevant for scalable formats. */ + /* */ + /* height :: This value is the vertical distance */ + /* between two consecutive baselines, */ + /* expressed in font units. It is always */ + /* positive. Only relevant for scalable */ + /* formats. */ + /* */ + /* If you want the global glyph height, use */ + /* `ascender - descender'. */ + /* */ + /* max_advance_width :: The maximum advance width, in font units, */ + /* for all glyphs in this face. This can be */ + /* used to make word wrapping computations */ + /* faster. Only relevant for scalable */ + /* formats. */ + /* */ + /* max_advance_height :: The maximum advance height, in font units, */ + /* for all glyphs in this face. This is only */ + /* relevant for vertical layouts, and is set */ + /* to `height' for fonts that do not provide */ + /* vertical metrics. Only relevant for */ + /* scalable formats. */ + /* */ + /* underline_position :: The position, in font units, of the */ + /* underline line for this face. It is the */ + /* center of the underlining stem. Only */ + /* relevant for scalable formats. */ + /* */ + /* underline_thickness :: The thickness, in font units, of the */ + /* underline for this face. Only relevant for */ + /* scalable formats. */ + /* */ + /* glyph :: The face's associated glyph slot(s). */ + /* */ + /* size :: The current active size for this face. */ + /* */ + /* charmap :: The current active charmap for this face. */ + /* */ + /* <Note> */ + /* Fields may be changed after a call to @FT_Attach_File or */ + /* @FT_Attach_Stream. */ + /* */ + /* For an OpenType variation font, the values of the following fields */ + /* can change after a call to @FT_Set_Var_Design_Coordinates (and */ + /* friends) if the font contains an `MVAR' table: `ascender', */ + /* `descender', `height', `underline_position', and */ + /* `underline_thickness'. */ + /* */ + /* Especially for TrueType fonts see also the documentation for */ + /* @FT_Size_Metrics. */ + /* */ + typedef struct FT_FaceRec_ + { + FT_Long num_faces; + FT_Long face_index; + + FT_Long face_flags; + FT_Long style_flags; + + FT_Long num_glyphs; + + FT_String* family_name; + FT_String* style_name; + + FT_Int num_fixed_sizes; + FT_Bitmap_Size* available_sizes; + + FT_Int num_charmaps; + FT_CharMap* charmaps; + + FT_Generic generic; + + /*# The following member variables (down to `underline_thickness') */ + /*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size */ + /*# for bitmap fonts. */ + FT_BBox bbox; + + FT_UShort units_per_EM; + FT_Short ascender; + FT_Short descender; + FT_Short height; + + FT_Short max_advance_width; + FT_Short max_advance_height; + + FT_Short underline_position; + FT_Short underline_thickness; + + FT_GlyphSlot glyph; + FT_Size size; + FT_CharMap charmap; + + /*@private begin */ + + FT_Driver driver; + FT_Memory memory; + FT_Stream stream; + + FT_ListRec sizes_list; + + FT_Generic autohint; /* face-specific auto-hinter data */ + void* extensions; /* unused */ + + FT_Face_Internal internal; + + /*@private end */ + + } FT_FaceRec; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_FACE_FLAG_XXX */ + /* */ + /* <Description> */ + /* A list of bit flags used in the `face_flags' field of the */ + /* @FT_FaceRec structure. They inform client applications of */ + /* properties of the corresponding face. */ + /* */ + /* <Values> */ + /* FT_FACE_FLAG_SCALABLE :: */ + /* The face contains outline glyphs. Note that a face can contain */ + /* bitmap strikes also, i.e., a face can have both this flag and */ + /* @FT_FACE_FLAG_FIXED_SIZES set. */ + /* */ + /* FT_FACE_FLAG_FIXED_SIZES :: */ + /* The face contains bitmap strikes. See also the */ + /* `num_fixed_sizes' and `available_sizes' fields of @FT_FaceRec. */ + /* */ + /* FT_FACE_FLAG_FIXED_WIDTH :: */ + /* The face contains fixed-width characters (like Courier, Lucida, */ + /* MonoType, etc.). */ + /* */ + /* FT_FACE_FLAG_SFNT :: */ + /* The face uses the SFNT storage scheme. For now, this means */ + /* TrueType and OpenType. */ + /* */ + /* FT_FACE_FLAG_HORIZONTAL :: */ + /* The face contains horizontal glyph metrics. This should be set */ + /* for all common formats. */ + /* */ + /* FT_FACE_FLAG_VERTICAL :: */ + /* The face contains vertical glyph metrics. This is only */ + /* available in some formats, not all of them. */ + /* */ + /* FT_FACE_FLAG_KERNING :: */ + /* The face contains kerning information. If set, the kerning */ + /* distance can be retrieved using the function @FT_Get_Kerning. */ + /* Otherwise the function always return the vector (0,0). Note */ + /* that FreeType doesn't handle kerning data from the SFNT `GPOS' */ + /* table (as present in many OpenType fonts). */ + /* */ + /* FT_FACE_FLAG_FAST_GLYPHS :: */ + /* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT. */ + /* */ + /* FT_FACE_FLAG_MULTIPLE_MASTERS :: */ + /* The face contains multiple masters and is capable of */ + /* interpolating between them. Supported formats are Adobe MM, */ + /* TrueType GX, and OpenType variation fonts. */ + /* */ + /* See section @multiple_masters for API details. */ + /* */ + /* FT_FACE_FLAG_GLYPH_NAMES :: */ + /* The face contains glyph names, which can be retrieved using */ + /* @FT_Get_Glyph_Name. Note that some TrueType fonts contain */ + /* broken glyph name tables. Use the function */ + /* @FT_Has_PS_Glyph_Names when needed. */ + /* */ + /* FT_FACE_FLAG_EXTERNAL_STREAM :: */ + /* Used internally by FreeType to indicate that a face's stream was */ + /* provided by the client application and should not be destroyed */ + /* when @FT_Done_Face is called. Don't read or test this flag. */ + /* */ + /* FT_FACE_FLAG_HINTER :: */ + /* The font driver has a hinting machine of its own. For example, */ + /* with TrueType fonts, it makes sense to use data from the SFNT */ + /* `gasp' table only if the native TrueType hinting engine (with */ + /* the bytecode interpreter) is available and active. */ + /* */ + /* FT_FACE_FLAG_CID_KEYED :: */ + /* The face is CID-keyed. In that case, the face is not accessed */ + /* by glyph indices but by CID values. For subsetted CID-keyed */ + /* fonts this has the consequence that not all index values are a */ + /* valid argument to @FT_Load_Glyph. Only the CID values for which */ + /* corresponding glyphs in the subsetted font exist make */ + /* `FT_Load_Glyph' return successfully; in all other cases you get */ + /* an `FT_Err_Invalid_Argument' error. */ + /* */ + /* Note that CID-keyed fonts that are in an SFNT wrapper (this is, */ + /* all OpenType/CFF fonts) don't have this flag set since the */ + /* glyphs are accessed in the normal way (using contiguous */ + /* indices); the `CID-ness' isn't visible to the application. */ + /* */ + /* FT_FACE_FLAG_TRICKY :: */ + /* The face is `tricky', this is, it always needs the font format's */ + /* native hinting engine to get a reasonable result. A typical */ + /* example is the old Chinese font `mingli.ttf' (but not */ + /* `mingliu.ttc') that uses TrueType bytecode instructions to move */ + /* and scale all of its subglyphs. */ + /* */ + /* It is not possible to auto-hint such fonts using */ + /* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */ + /* @FT_LOAD_NO_HINTING. You have to set both @FT_LOAD_NO_HINTING */ + /* and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */ + /* probably never want this except for demonstration purposes. */ + /* */ + /* Currently, there are about a dozen TrueType fonts in the list of */ + /* tricky fonts; they are hard-coded in file `ttobjs.c'. */ + /* */ + /* FT_FACE_FLAG_COLOR :: */ + /* [Since 2.5.1] The face has color glyph tables. To access color */ + /* glyphs use @FT_LOAD_COLOR. */ + /* */ + /* FT_FACE_FLAG_VARIATION :: */ + /* [Since 2.9] Set if the current face (or named instance) has been */ + /* altered with @FT_Set_MM_Design_Coordinates, */ + /* @FT_Set_Var_Design_Coordinates, or */ + /* @FT_Set_Var_Blend_Coordinates. This flag is unset by a call to */ + /* @FT_Set_Named_Instance. */ + /* */ +#define FT_FACE_FLAG_SCALABLE ( 1L << 0 ) +#define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 ) +#define FT_FACE_FLAG_FIXED_WIDTH ( 1L << 2 ) +#define FT_FACE_FLAG_SFNT ( 1L << 3 ) +#define FT_FACE_FLAG_HORIZONTAL ( 1L << 4 ) +#define FT_FACE_FLAG_VERTICAL ( 1L << 5 ) +#define FT_FACE_FLAG_KERNING ( 1L << 6 ) +#define FT_FACE_FLAG_FAST_GLYPHS ( 1L << 7 ) +#define FT_FACE_FLAG_MULTIPLE_MASTERS ( 1L << 8 ) +#define FT_FACE_FLAG_GLYPH_NAMES ( 1L << 9 ) +#define FT_FACE_FLAG_EXTERNAL_STREAM ( 1L << 10 ) +#define FT_FACE_FLAG_HINTER ( 1L << 11 ) +#define FT_FACE_FLAG_CID_KEYED ( 1L << 12 ) +#define FT_FACE_FLAG_TRICKY ( 1L << 13 ) +#define FT_FACE_FLAG_COLOR ( 1L << 14 ) +#define FT_FACE_FLAG_VARIATION ( 1L << 15 ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_HORIZONTAL( face ) + * + * @description: + * A macro that returns true whenever a face object contains + * horizontal metrics (this is true for all font formats though). + * + * @also: + * @FT_HAS_VERTICAL can be used to check for vertical metrics. + * + */ +#define FT_HAS_HORIZONTAL( face ) \ + ( (face)->face_flags & FT_FACE_FLAG_HORIZONTAL ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_VERTICAL( face ) + * + * @description: + * A macro that returns true whenever a face object contains real + * vertical metrics (and not only synthesized ones). + * + */ +#define FT_HAS_VERTICAL( face ) \ + ( (face)->face_flags & FT_FACE_FLAG_VERTICAL ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_KERNING( face ) + * + * @description: + * A macro that returns true whenever a face object contains kerning + * data that can be accessed with @FT_Get_Kerning. + * + */ +#define FT_HAS_KERNING( face ) \ + ( (face)->face_flags & FT_FACE_FLAG_KERNING ) + + + /************************************************************************* + * + * @macro: + * FT_IS_SCALABLE( face ) + * + * @description: + * A macro that returns true whenever a face object contains a scalable + * font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF, + * and PFR font formats). + * + */ +#define FT_IS_SCALABLE( face ) \ + ( (face)->face_flags & FT_FACE_FLAG_SCALABLE ) + + + /************************************************************************* + * + * @macro: + * FT_IS_SFNT( face ) + * + * @description: + * A macro that returns true whenever a face object contains a font + * whose format is based on the SFNT storage scheme. This usually + * means: TrueType fonts, OpenType fonts, as well as SFNT-based embedded + * bitmap fonts. + * + * If this macro is true, all functions defined in @FT_SFNT_NAMES_H and + * @FT_TRUETYPE_TABLES_H are available. + * + */ +#define FT_IS_SFNT( face ) \ + ( (face)->face_flags & FT_FACE_FLAG_SFNT ) + + + /************************************************************************* + * + * @macro: + * FT_IS_FIXED_WIDTH( face ) + * + * @description: + * A macro that returns true whenever a face object contains a font face + * that contains fixed-width (or `monospace', `fixed-pitch', etc.) + * glyphs. + * + */ +#define FT_IS_FIXED_WIDTH( face ) \ + ( (face)->face_flags & FT_FACE_FLAG_FIXED_WIDTH ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_FIXED_SIZES( face ) + * + * @description: + * A macro that returns true whenever a face object contains some + * embedded bitmaps. See the `available_sizes' field of the + * @FT_FaceRec structure. + * + */ +#define FT_HAS_FIXED_SIZES( face ) \ + ( (face)->face_flags & FT_FACE_FLAG_FIXED_SIZES ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_FAST_GLYPHS( face ) + * + * @description: + * Deprecated. + * + */ +#define FT_HAS_FAST_GLYPHS( face ) 0 + + + /************************************************************************* + * + * @macro: + * FT_HAS_GLYPH_NAMES( face ) + * + * @description: + * A macro that returns true whenever a face object contains some glyph + * names that can be accessed through @FT_Get_Glyph_Name. + * + */ +#define FT_HAS_GLYPH_NAMES( face ) \ + ( (face)->face_flags & FT_FACE_FLAG_GLYPH_NAMES ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_MULTIPLE_MASTERS( face ) + * + * @description: + * A macro that returns true whenever a face object contains some + * multiple masters. The functions provided by @FT_MULTIPLE_MASTERS_H + * are then available to choose the exact design you want. + * + */ +#define FT_HAS_MULTIPLE_MASTERS( face ) \ + ( (face)->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS ) + + + /************************************************************************* + * + * @macro: + * FT_IS_NAMED_INSTANCE( face ) + * + * @description: + * A macro that returns true whenever a face object is a named instance + * of a GX or OpenType variation font. + * + * [Since 2.9] Changing the design coordinates with + * @FT_Set_Var_Design_Coordinates or @FT_Set_Var_Blend_Coordinates does + * not influence the return value of this macro (only + * @FT_Set_Named_Instance does that). + * + * @since: + * 2.7 + * + */ +#define FT_IS_NAMED_INSTANCE( face ) \ + ( (face)->face_index & 0x7FFF0000L ) + + + /************************************************************************* + * + * @macro: + * FT_IS_VARIATION( face ) + * + * @description: + * A macro that returns true whenever a face object has been altered + * by @FT_Set_MM_Design_Coordinates, @FT_Set_Var_Design_Coordinates, or + * @FT_Set_Var_Blend_Coordinates. + * + * @since: + * 2.9 + * + */ +#define FT_IS_VARIATION( face ) \ + ( (face)->face_flags & FT_FACE_FLAG_VARIATION ) + + + /************************************************************************* + * + * @macro: + * FT_IS_CID_KEYED( face ) + * + * @description: + * A macro that returns true whenever a face object contains a CID-keyed + * font. See the discussion of @FT_FACE_FLAG_CID_KEYED for more + * details. + * + * If this macro is true, all functions defined in @FT_CID_H are + * available. + * + */ +#define FT_IS_CID_KEYED( face ) \ + ( (face)->face_flags & FT_FACE_FLAG_CID_KEYED ) + + + /************************************************************************* + * + * @macro: + * FT_IS_TRICKY( face ) + * + * @description: + * A macro that returns true whenever a face represents a `tricky' font. + * See the discussion of @FT_FACE_FLAG_TRICKY for more details. + * + */ +#define FT_IS_TRICKY( face ) \ + ( (face)->face_flags & FT_FACE_FLAG_TRICKY ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_COLOR( face ) + * + * @description: + * A macro that returns true whenever a face object contains + * tables for color glyphs. + * + * @since: + * 2.5.1 + * + */ +#define FT_HAS_COLOR( face ) \ + ( (face)->face_flags & FT_FACE_FLAG_COLOR ) + + + /*************************************************************************/ + /* */ + /* <Const> */ + /* FT_STYLE_FLAG_XXX */ + /* */ + /* <Description> */ + /* A list of bit flags to indicate the style of a given face. These */ + /* are used in the `style_flags' field of @FT_FaceRec. */ + /* */ + /* <Values> */ + /* FT_STYLE_FLAG_ITALIC :: */ + /* The face style is italic or oblique. */ + /* */ + /* FT_STYLE_FLAG_BOLD :: */ + /* The face is bold. */ + /* */ + /* <Note> */ + /* The style information as provided by FreeType is very basic. More */ + /* details are beyond the scope and should be done on a higher level */ + /* (for example, by analyzing various fields of the `OS/2' table in */ + /* SFNT based fonts). */ + /* */ +#define FT_STYLE_FLAG_ITALIC ( 1 << 0 ) +#define FT_STYLE_FLAG_BOLD ( 1 << 1 ) + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Size_Internal */ + /* */ + /* <Description> */ + /* An opaque handle to an `FT_Size_InternalRec' structure, used to */ + /* model private data of a given @FT_Size object. */ + /* */ + typedef struct FT_Size_InternalRec_* FT_Size_Internal; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Size_Metrics */ + /* */ + /* <Description> */ + /* The size metrics structure gives the metrics of a size object. */ + /* */ + /* <Fields> */ + /* x_ppem :: The width of the scaled EM square in pixels, hence */ + /* the term `ppem' (pixels per EM). It is also */ + /* referred to as `nominal width'. */ + /* */ + /* y_ppem :: The height of the scaled EM square in pixels, */ + /* hence the term `ppem' (pixels per EM). It is also */ + /* referred to as `nominal height'. */ + /* */ + /* x_scale :: A 16.16 fractional scaling value to convert */ + /* horizontal metrics from font units to 26.6 */ + /* fractional pixels. Only relevant for scalable */ + /* font formats. */ + /* */ + /* y_scale :: A 16.16 fractional scaling value to convert */ + /* vertical metrics from font units to 26.6 */ + /* fractional pixels. Only relevant for scalable */ + /* font formats. */ + /* */ + /* ascender :: The ascender in 26.6 fractional pixels, rounded up */ + /* to an integer value. See @FT_FaceRec for the */ + /* details. */ + /* */ + /* descender :: The descender in 26.6 fractional pixels, rounded */ + /* down to an integer value. See @FT_FaceRec for the */ + /* details. */ + /* */ + /* height :: The height in 26.6 fractional pixels, rounded to */ + /* an integer value. See @FT_FaceRec for the */ + /* details. */ + /* */ + /* max_advance :: The maximum advance width in 26.6 fractional */ + /* pixels, rounded to an integer value. See */ + /* @FT_FaceRec for the details. */ + /* */ + /* <Note> */ + /* The scaling values, if relevant, are determined first during a */ + /* size changing operation. The remaining fields are then set by the */ + /* driver. For scalable formats, they are usually set to scaled */ + /* values of the corresponding fields in @FT_FaceRec. Some values */ + /* like ascender or descender are rounded for historical reasons; */ + /* more precise values (for outline fonts) can be derived by scaling */ + /* the corresponding @FT_FaceRec values manually, with code similar */ + /* to the following. */ + /* */ + /* { */ + /* scaled_ascender = FT_MulFix( face->ascender, */ + /* size_metrics->y_scale ); */ + /* } */ + /* */ + /* Note that due to glyph hinting and the selected rendering mode */ + /* these values are usually not exact; consequently, they must be */ + /* treated as unreliable with an error margin of at least one pixel! */ + /* */ + /* Indeed, the only way to get the exact metrics is to render _all_ */ + /* glyphs. As this would be a definite performance hit, it is up to */ + /* client applications to perform such computations. */ + /* */ + /* The `FT_Size_Metrics' structure is valid for bitmap fonts also. */ + /* */ + /* */ + /* *TrueType* *fonts* *with* *native* *bytecode* *hinting* */ + /* */ + /* All applications that handle TrueType fonts with native hinting */ + /* must be aware that TTFs expect different rounding of vertical font */ + /* dimensions. The application has to cater for this, especially if */ + /* it wants to rely on a TTF's vertical data (for example, to */ + /* properly align box characters vertically). */ + /* */ + /* Only the application knows _in_ _advance_ that it is going to use */ + /* native hinting for TTFs! FreeType, on the other hand, selects the */ + /* hinting mode not at the time of creating an @FT_Size object but */ + /* much later, namely while calling @FT_Load_Glyph. */ + /* */ + /* Here is some pseudo code that illustrates a possible solution. */ + /* */ + /* { */ + /* font_format = FT_Get_Font_Format( face ); */ + /* */ + /* if ( !strcmp( font_format, "TrueType" ) && */ + /* do_native_bytecode_hinting ) */ + /* { */ + /* ascender = ROUND( FT_MulFix( face->ascender, */ + /* size_metrics->y_scale ) ); */ + /* descender = ROUND( FT_MulFix( face->descender, */ + /* size_metrics->y_scale ) ); */ + /* } */ + /* else */ + /* { */ + /* ascender = size_metrics->ascender; */ + /* descender = size_metrics->descender; */ + /* } */ + /* */ + /* height = size_metrics->height; */ + /* max_advance = size_metrics->max_advance; */ + /* } */ + /* */ + typedef struct FT_Size_Metrics_ + { + FT_UShort x_ppem; /* horizontal pixels per EM */ + FT_UShort y_ppem; /* vertical pixels per EM */ + + FT_Fixed x_scale; /* scaling values used to convert font */ + FT_Fixed y_scale; /* units to 26.6 fractional pixels */ + + FT_Pos ascender; /* ascender in 26.6 frac. pixels */ + FT_Pos descender; /* descender in 26.6 frac. pixels */ + FT_Pos height; /* text height in 26.6 frac. pixels */ + FT_Pos max_advance; /* max horizontal advance, in 26.6 pixels */ + + } FT_Size_Metrics; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_SizeRec */ + /* */ + /* <Description> */ + /* FreeType root size class structure. A size object models a face */ + /* object at a given size. */ + /* */ + /* <Fields> */ + /* face :: Handle to the parent face object. */ + /* */ + /* generic :: A typeless pointer, unused by the FreeType library or */ + /* any of its drivers. It can be used by client */ + /* applications to link their own data to each size */ + /* object. */ + /* */ + /* metrics :: Metrics for this size object. This field is read-only. */ + /* */ + typedef struct FT_SizeRec_ + { + FT_Face face; /* parent face object */ + FT_Generic generic; /* generic pointer for client uses */ + FT_Size_Metrics metrics; /* size metrics */ + FT_Size_Internal internal; + + } FT_SizeRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_SubGlyph */ + /* */ + /* <Description> */ + /* The subglyph structure is an internal object used to describe */ + /* subglyphs (for example, in the case of composites). */ + /* */ + /* <Note> */ + /* The subglyph implementation is not part of the high-level API, */ + /* hence the forward structure declaration. */ + /* */ + /* You can however retrieve subglyph information with */ + /* @FT_Get_SubGlyph_Info. */ + /* */ + typedef struct FT_SubGlyphRec_* FT_SubGlyph; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Slot_Internal */ + /* */ + /* <Description> */ + /* An opaque handle to an `FT_Slot_InternalRec' structure, used to */ + /* model private data of a given @FT_GlyphSlot object. */ + /* */ + typedef struct FT_Slot_InternalRec_* FT_Slot_Internal; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_GlyphSlotRec */ + /* */ + /* <Description> */ + /* FreeType root glyph slot class structure. A glyph slot is a */ + /* container where individual glyphs can be loaded, be they in */ + /* outline or bitmap format. */ + /* */ + /* <Fields> */ + /* library :: A handle to the FreeType library instance */ + /* this slot belongs to. */ + /* */ + /* face :: A handle to the parent face object. */ + /* */ + /* next :: In some cases (like some font tools), several */ + /* glyph slots per face object can be a good */ + /* thing. As this is rare, the glyph slots are */ + /* listed through a direct, single-linked list */ + /* using its `next' field. */ + /* */ + /* generic :: A typeless pointer unused by the FreeType */ + /* library or any of its drivers. It can be */ + /* used by client applications to link their own */ + /* data to each glyph slot object. */ + /* */ + /* metrics :: The metrics of the last loaded glyph in the */ + /* slot. The returned values depend on the last */ + /* load flags (see the @FT_Load_Glyph API */ + /* function) and can be expressed either in 26.6 */ + /* fractional pixels or font units. */ + /* */ + /* Note that even when the glyph image is */ + /* transformed, the metrics are not. */ + /* */ + /* linearHoriAdvance :: The advance width of the unhinted glyph. */ + /* Its value is expressed in 16.16 fractional */ + /* pixels, unless @FT_LOAD_LINEAR_DESIGN is set */ + /* when loading the glyph. This field can be */ + /* important to perform correct WYSIWYG layout. */ + /* Only relevant for outline glyphs. */ + /* */ + /* linearVertAdvance :: The advance height of the unhinted glyph. */ + /* Its value is expressed in 16.16 fractional */ + /* pixels, unless @FT_LOAD_LINEAR_DESIGN is set */ + /* when loading the glyph. This field can be */ + /* important to perform correct WYSIWYG layout. */ + /* Only relevant for outline glyphs. */ + /* */ + /* advance :: This shorthand is, depending on */ + /* @FT_LOAD_IGNORE_TRANSFORM, the transformed */ + /* (hinted) advance width for the glyph, in 26.6 */ + /* fractional pixel format. As specified with */ + /* @FT_LOAD_VERTICAL_LAYOUT, it uses either the */ + /* `horiAdvance' or the `vertAdvance' value of */ + /* `metrics' field. */ + /* */ + /* format :: This field indicates the format of the image */ + /* contained in the glyph slot. Typically */ + /* @FT_GLYPH_FORMAT_BITMAP, */ + /* @FT_GLYPH_FORMAT_OUTLINE, or */ + /* @FT_GLYPH_FORMAT_COMPOSITE, but other values */ + /* are possible. */ + /* */ + /* bitmap :: This field is used as a bitmap descriptor. */ + /* Note that the address and content of the */ + /* bitmap buffer can change between calls of */ + /* @FT_Load_Glyph and a few other functions. */ + /* */ + /* bitmap_left :: The bitmap's left bearing expressed in */ + /* integer pixels. */ + /* */ + /* bitmap_top :: The bitmap's top bearing expressed in integer */ + /* pixels. This is the distance from the */ + /* baseline to the top-most glyph scanline, */ + /* upwards y~coordinates being *positive*. */ + /* */ + /* outline :: The outline descriptor for the current glyph */ + /* image if its format is */ + /* @FT_GLYPH_FORMAT_OUTLINE. Once a glyph is */ + /* loaded, `outline' can be transformed, */ + /* distorted, emboldened, etc. However, it must */ + /* not be freed. */ + /* */ + /* num_subglyphs :: The number of subglyphs in a composite glyph. */ + /* This field is only valid for the composite */ + /* glyph format that should normally only be */ + /* loaded with the @FT_LOAD_NO_RECURSE flag. */ + /* */ + /* subglyphs :: An array of subglyph descriptors for */ + /* composite glyphs. There are `num_subglyphs' */ + /* elements in there. Currently internal to */ + /* FreeType. */ + /* */ + /* control_data :: Certain font drivers can also return the */ + /* control data for a given glyph image (e.g. */ + /* TrueType bytecode, Type~1 charstrings, etc.). */ + /* This field is a pointer to such data; it is */ + /* currently internal to FreeType. */ + /* */ + /* control_len :: This is the length in bytes of the control */ + /* data. Currently internal to FreeType. */ + /* */ + /* other :: Reserved. */ + /* */ + /* lsb_delta :: The difference between hinted and unhinted */ + /* left side bearing while auto-hinting is */ + /* active. Zero otherwise. */ + /* */ + /* rsb_delta :: The difference between hinted and unhinted */ + /* right side bearing while auto-hinting is */ + /* active. Zero otherwise. */ + /* */ + /* <Note> */ + /* If @FT_Load_Glyph is called with default flags (see */ + /* @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in */ + /* its native format (e.g., an outline glyph for TrueType and Type~1 */ + /* formats). [Since 2.9] The prospective bitmap metrics are */ + /* calculated according to @FT_LOAD_TARGET_XXX and other flags even */ + /* for the outline glyph, even if @FT_LOAD_RENDER is not set. */ + /* */ + /* This image can later be converted into a bitmap by calling */ + /* @FT_Render_Glyph. This function searches the current renderer for */ + /* the native image's format, then invokes it. */ + /* */ + /* The renderer is in charge of transforming the native image through */ + /* the slot's face transformation fields, then converting it into a */ + /* bitmap that is returned in `slot->bitmap'. */ + /* */ + /* Note that `slot->bitmap_left' and `slot->bitmap_top' are also used */ + /* to specify the position of the bitmap relative to the current pen */ + /* position (e.g., coordinates (0,0) on the baseline). Of course, */ + /* `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP. */ + /* */ + /* Here is a small pseudo code fragment that shows how to use */ + /* `lsb_delta' and `rsb_delta' to do fractional positioning of */ + /* glyphs: */ + /* */ + /* { */ + /* FT_GlyphSlot slot = face->glyph; */ + /* FT_Pos origin_x = 0; */ + /* */ + /* */ + /* for all glyphs do */ + /* <load glyph with `FT_Load_Glyph'> */ + /* */ + /* FT_Outline_Translate( slot->outline, origin_x & 63, 0 ); */ + /* */ + /* <save glyph image, or render glyph, or ...> */ + /* */ + /* <compute kern between current and next glyph */ + /* and add it to `origin_x'> */ + /* */ + /* origin_x += slot->advance.x; */ + /* origin_x += slot->rsb_delta - slot->lsb_delta; */ + /* endfor */ + /* } */ + /* */ + /* Here is another small pseudo code fragment that shows how to use */ + /* `lsb_delta' and `rsb_delta' to improve integer positioning of */ + /* glyphs: */ + /* */ + /* { */ + /* FT_GlyphSlot slot = face->glyph; */ + /* FT_Pos origin_x = 0; */ + /* FT_Pos prev_rsb_delta = 0; */ + /* */ + /* */ + /* for all glyphs do */ + /* <compute kern between current and previous glyph */ + /* and add it to `origin_x'> */ + /* */ + /* <load glyph with `FT_Load_Glyph'> */ + /* */ + /* if ( prev_rsb_delta - slot->lsb_delta > 32 ) */ + /* origin_x -= 64; */ + /* else if ( prev_rsb_delta - slot->lsb_delta < -31 ) */ + /* origin_x += 64; */ + /* */ + /* prev_rsb_delta = slot->rsb_delta; */ + /* */ + /* <save glyph image, or render glyph, or ...> */ + /* */ + /* origin_x += slot->advance.x; */ + /* endfor */ + /* } */ + /* */ + /* If you use strong auto-hinting, you *must* apply these delta */ + /* values! Otherwise you will experience far too large inter-glyph */ + /* spacing at small rendering sizes in most cases. Note that it */ + /* doesn't harm to use the above code for other hinting modes also, */ + /* since the delta values are zero then. */ + /* */ + typedef struct FT_GlyphSlotRec_ + { + FT_Library library; + FT_Face face; + FT_GlyphSlot next; + FT_UInt reserved; /* retained for binary compatibility */ + FT_Generic generic; + + FT_Glyph_Metrics metrics; + FT_Fixed linearHoriAdvance; + FT_Fixed linearVertAdvance; + FT_Vector advance; + + FT_Glyph_Format format; + + FT_Bitmap bitmap; + FT_Int bitmap_left; + FT_Int bitmap_top; + + FT_Outline outline; + + FT_UInt num_subglyphs; + FT_SubGlyph subglyphs; + + void* control_data; + long control_len; + + FT_Pos lsb_delta; + FT_Pos rsb_delta; + + void* other; + + FT_Slot_Internal internal; + + } FT_GlyphSlotRec; + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* F U N C T I O N S */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Init_FreeType */ + /* */ + /* <Description> */ + /* Initialize a new FreeType library object. The set of modules */ + /* that are registered by this function is determined at build time. */ + /* */ + /* <Output> */ + /* alibrary :: A handle to a new library object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* In case you want to provide your own memory allocating routines, */ + /* use @FT_New_Library instead, followed by a call to */ + /* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module) */ + /* and @FT_Set_Default_Properties. */ + /* */ + /* See the documentation of @FT_Library and @FT_Face for */ + /* multi-threading issues. */ + /* */ + /* If you need reference-counting (cf. @FT_Reference_Library), use */ + /* @FT_New_Library and @FT_Done_Library. */ + /* */ + /* If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is */ + /* set, this function reads the `FREETYPE_PROPERTIES' environment */ + /* variable to control driver properties. See section @properties */ + /* for more. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Init_FreeType( FT_Library *alibrary ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_FreeType */ + /* */ + /* <Description> */ + /* Destroy a given FreeType library object and all of its children, */ + /* including resources, drivers, faces, sizes, etc. */ + /* */ + /* <Input> */ + /* library :: A handle to the target library object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Done_FreeType( FT_Library library ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_OPEN_XXX */ + /* */ + /* <Description> */ + /* A list of bit field constants used within the `flags' field of the */ + /* @FT_Open_Args structure. */ + /* */ + /* <Values> */ + /* FT_OPEN_MEMORY :: This is a memory-based stream. */ + /* */ + /* FT_OPEN_STREAM :: Copy the stream from the `stream' field. */ + /* */ + /* FT_OPEN_PATHNAME :: Create a new input stream from a C~path */ + /* name. */ + /* */ + /* FT_OPEN_DRIVER :: Use the `driver' field. */ + /* */ + /* FT_OPEN_PARAMS :: Use the `num_params' and `params' fields. */ + /* */ + /* <Note> */ + /* The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME' */ + /* flags are mutually exclusive. */ + /* */ +#define FT_OPEN_MEMORY 0x1 +#define FT_OPEN_STREAM 0x2 +#define FT_OPEN_PATHNAME 0x4 +#define FT_OPEN_DRIVER 0x8 +#define FT_OPEN_PARAMS 0x10 + + + /* these constants are deprecated; use the corresponding `FT_OPEN_XXX' */ + /* values instead */ +#define ft_open_memory FT_OPEN_MEMORY +#define ft_open_stream FT_OPEN_STREAM +#define ft_open_pathname FT_OPEN_PATHNAME +#define ft_open_driver FT_OPEN_DRIVER +#define ft_open_params FT_OPEN_PARAMS + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Parameter */ + /* */ + /* <Description> */ + /* A simple structure to pass more or less generic parameters to */ + /* @FT_Open_Face and @FT_Face_Properties. */ + /* */ + /* <Fields> */ + /* tag :: A four-byte identification tag. */ + /* */ + /* data :: A pointer to the parameter data. */ + /* */ + /* <Note> */ + /* The ID and function of parameters are driver-specific. See */ + /* section @parameter_tags for more information. */ + /* */ + typedef struct FT_Parameter_ + { + FT_ULong tag; + FT_Pointer data; + + } FT_Parameter; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Open_Args */ + /* */ + /* <Description> */ + /* A structure to indicate how to open a new font file or stream. A */ + /* pointer to such a structure can be used as a parameter for the */ + /* functions @FT_Open_Face and @FT_Attach_Stream. */ + /* */ + /* <Fields> */ + /* flags :: A set of bit flags indicating how to use the */ + /* structure. */ + /* */ + /* memory_base :: The first byte of the file in memory. */ + /* */ + /* memory_size :: The size in bytes of the file in memory. */ + /* */ + /* pathname :: A pointer to an 8-bit file pathname. */ + /* */ + /* stream :: A handle to a source stream object. */ + /* */ + /* driver :: This field is exclusively used by @FT_Open_Face; */ + /* it simply specifies the font driver to use for */ + /* opening the face. If set to NULL, FreeType tries */ + /* to load the face with each one of the drivers in */ + /* its list. */ + /* */ + /* num_params :: The number of extra parameters. */ + /* */ + /* params :: Extra parameters passed to the font driver when */ + /* opening a new face. */ + /* */ + /* <Note> */ + /* The stream type is determined by the contents of `flags' that */ + /* are tested in the following order by @FT_Open_Face: */ + /* */ + /* If the @FT_OPEN_MEMORY bit is set, assume that this is a */ + /* memory file of `memory_size' bytes, located at `memory_address'. */ + /* The data are not copied, and the client is responsible for */ + /* releasing and destroying them _after_ the corresponding call to */ + /* @FT_Done_Face. */ + /* */ + /* Otherwise, if the @FT_OPEN_STREAM bit is set, assume that a */ + /* custom input stream `stream' is used. */ + /* */ + /* Otherwise, if the @FT_OPEN_PATHNAME bit is set, assume that this */ + /* is a normal file and use `pathname' to open it. */ + /* */ + /* If the @FT_OPEN_DRIVER bit is set, @FT_Open_Face only tries to */ + /* open the file with the driver whose handler is in `driver'. */ + /* */ + /* If the @FT_OPEN_PARAMS bit is set, the parameters given by */ + /* `num_params' and `params' is used. They are ignored otherwise. */ + /* */ + /* Ideally, both the `pathname' and `params' fields should be tagged */ + /* as `const'; this is missing for API backward compatibility. In */ + /* other words, applications should treat them as read-only. */ + /* */ + typedef struct FT_Open_Args_ + { + FT_UInt flags; + const FT_Byte* memory_base; + FT_Long memory_size; + FT_String* pathname; + FT_Stream stream; + FT_Module driver; + FT_Int num_params; + FT_Parameter* params; + + } FT_Open_Args; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Face */ + /* */ + /* <Description> */ + /* Call @FT_Open_Face to open a font by its pathname. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* pathname :: A path to the font file. */ + /* */ + /* face_index :: See @FT_Open_Face for a detailed description of this */ + /* parameter. */ + /* */ + /* <Output> */ + /* aface :: A handle to a new face object. If `face_index' is */ + /* greater than or equal to zero, it must be non-NULL. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* Use @FT_Done_Face to destroy the created @FT_Face object (along */ + /* with its slot and sizes). */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Face( FT_Library library, + const char* filepathname, + FT_Long face_index, + FT_Face *aface ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Memory_Face */ + /* */ + /* <Description> */ + /* Call @FT_Open_Face to open a font that has been loaded into */ + /* memory. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* file_base :: A pointer to the beginning of the font data. */ + /* */ + /* file_size :: The size of the memory chunk used by the font data. */ + /* */ + /* face_index :: See @FT_Open_Face for a detailed description of this */ + /* parameter. */ + /* */ + /* <Output> */ + /* aface :: A handle to a new face object. If `face_index' is */ + /* greater than or equal to zero, it must be non-NULL. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* You must not deallocate the memory before calling @FT_Done_Face. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Memory_Face( FT_Library library, + const FT_Byte* file_base, + FT_Long file_size, + FT_Long face_index, + FT_Face *aface ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Open_Face */ + /* */ + /* <Description> */ + /* Create a face object from a given resource described by */ + /* @FT_Open_Args. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* args :: A pointer to an `FT_Open_Args' structure that must */ + /* be filled by the caller. */ + /* */ + /* face_index :: This field holds two different values. Bits 0-15 */ + /* are the index of the face in the font file (starting */ + /* with value~0). Set it to~0 if there is only one */ + /* face in the font file. */ + /* */ + /* [Since 2.6.1] Bits 16-30 are relevant to GX and */ + /* OpenType variation fonts only, specifying the named */ + /* instance index for the current face index (starting */ + /* with value~1; value~0 makes FreeType ignore named */ + /* instances). For non-variation fonts, bits 16-30 are */ + /* ignored. Assuming that you want to access the third */ + /* named instance in face~4, `face_index' should be set */ + /* to 0x00030004. If you want to access face~4 without */ + /* variation handling, simply set `face_index' to */ + /* value~4. */ + /* */ + /* `FT_Open_Face' and its siblings can be used to */ + /* quickly check whether the font format of a given */ + /* font resource is supported by FreeType. In general, */ + /* if the `face_index' argument is negative, the */ + /* function's return value is~0 if the font format is */ + /* recognized, or non-zero otherwise. The function */ + /* allocates a more or less empty face handle in */ + /* `*aface' (if `aface' isn't NULL); the only two */ + /* useful fields in this special case are */ + /* `face->num_faces' and `face->style_flags'. For any */ + /* negative value of `face_index', `face->num_faces' */ + /* gives the number of faces within the font file. For */ + /* the negative value `-(N+1)' (with `N' a non-negative */ + /* 16-bit value), bits 16-30 in `face->style_flags' */ + /* give the number of named instances in face `N' if we */ + /* have a variation font (or zero otherwise). After */ + /* examination, the returned @FT_Face structure should */ + /* be deallocated with a call to @FT_Done_Face. */ + /* */ + /* <Output> */ + /* aface :: A handle to a new face object. If `face_index' is */ + /* greater than or equal to zero, it must be non-NULL. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* Unlike FreeType 1.x, this function automatically creates a glyph */ + /* slot for the face object that can be accessed directly through */ + /* `face->glyph'. */ + /* */ + /* Each new face object created with this function also owns a */ + /* default @FT_Size object, accessible as `face->size'. */ + /* */ + /* One @FT_Library instance can have multiple face objects, this is, */ + /* @FT_Open_Face and its siblings can be called multiple times using */ + /* the same `library' argument. */ + /* */ + /* See the discussion of reference counters in the description of */ + /* @FT_Reference_Face. */ + /* */ + /* To loop over all faces, use code similar to the following snippet */ + /* (omitting the error handling). */ + /* */ + /* { */ + /* ... */ + /* FT_Face face; */ + /* FT_Long i, num_faces; */ + /* */ + /* */ + /* error = FT_Open_Face( library, args, -1, &face ); */ + /* if ( error ) { ... } */ + /* */ + /* num_faces = face->num_faces; */ + /* FT_Done_Face( face ); */ + /* */ + /* for ( i = 0; i < num_faces; i++ ) */ + /* { */ + /* ... */ + /* error = FT_Open_Face( library, args, i, &face ); */ + /* ... */ + /* FT_Done_Face( face ); */ + /* ... */ + /* } */ + /* } */ + /* */ + /* To loop over all valid values for `face_index', use something */ + /* similar to the following snippet, again without error handling. */ + /* The code accesses all faces immediately (thus only a single call */ + /* of `FT_Open_Face' within the do-loop), with and without named */ + /* instances. */ + /* */ + /* { */ + /* ... */ + /* FT_Face face; */ + /* */ + /* FT_Long num_faces = 0; */ + /* FT_Long num_instances = 0; */ + /* */ + /* FT_Long face_idx = 0; */ + /* FT_Long instance_idx = 0; */ + /* */ + /* */ + /* do */ + /* { */ + /* FT_Long id = ( instance_idx << 16 ) + face_idx; */ + /* */ + /* */ + /* error = FT_Open_Face( library, args, id, &face ); */ + /* if ( error ) { ... } */ + /* */ + /* num_faces = face->num_faces; */ + /* num_instances = face->style_flags >> 16; */ + /* */ + /* ... */ + /* */ + /* FT_Done_Face( face ); */ + /* */ + /* if ( instance_idx < num_instances ) */ + /* instance_idx++; */ + /* else */ + /* { */ + /* face_idx++; */ + /* instance_idx = 0; */ + /* } */ + /* */ + /* } while ( face_idx < num_faces ) */ + /* } */ + /* */ + FT_EXPORT( FT_Error ) + FT_Open_Face( FT_Library library, + const FT_Open_Args* args, + FT_Long face_index, + FT_Face *aface ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Attach_File */ + /* */ + /* <Description> */ + /* Call @FT_Attach_Stream to attach a file. */ + /* */ + /* <InOut> */ + /* face :: The target face object. */ + /* */ + /* <Input> */ + /* filepathname :: The pathname. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Attach_File( FT_Face face, + const char* filepathname ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Attach_Stream */ + /* */ + /* <Description> */ + /* `Attach' data to a face object. Normally, this is used to read */ + /* additional information for the face object. For example, you can */ + /* attach an AFM file that comes with a Type~1 font to get the */ + /* kerning values and other metrics. */ + /* */ + /* <InOut> */ + /* face :: The target face object. */ + /* */ + /* <Input> */ + /* parameters :: A pointer to @FT_Open_Args that must be filled by */ + /* the caller. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The meaning of the `attach' (i.e., what really happens when the */ + /* new file is read) is not fixed by FreeType itself. It really */ + /* depends on the font format (and thus the font driver). */ + /* */ + /* Client applications are expected to know what they are doing */ + /* when invoking this function. Most drivers simply do not implement */ + /* file or stream attachments. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Attach_Stream( FT_Face face, + FT_Open_Args* parameters ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Reference_Face */ + /* */ + /* <Description> */ + /* A counter gets initialized to~1 at the time an @FT_Face structure */ + /* is created. This function increments the counter. @FT_Done_Face */ + /* then only destroys a face if the counter is~1, otherwise it simply */ + /* decrements the counter. */ + /* */ + /* This function helps in managing life-cycles of structures that */ + /* reference @FT_Face objects. */ + /* */ + /* <Input> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Since> */ + /* 2.4.2 */ + /* */ + FT_EXPORT( FT_Error ) + FT_Reference_Face( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_Face */ + /* */ + /* <Description> */ + /* Discard a given face object, as well as all of its child slots and */ + /* sizes. */ + /* */ + /* <Input> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* See the discussion of reference counters in the description of */ + /* @FT_Reference_Face. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Done_Face( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Select_Size */ + /* */ + /* <Description> */ + /* Select a bitmap strike. To be more precise, this function sets */ + /* the scaling factors of the active @FT_Size object in a face so */ + /* that bitmaps from this particular strike are taken by */ + /* @FT_Load_Glyph and friends. */ + /* */ + /* <InOut> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Input> */ + /* strike_index :: The index of the bitmap strike in the */ + /* `available_sizes' field of @FT_FaceRec structure. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* For bitmaps embedded in outline fonts it is common that only a */ + /* subset of the available glyphs at a given ppem value is available. */ + /* FreeType silently uses outlines if there is no bitmap for a given */ + /* glyph index. */ + /* */ + /* For GX and OpenType variation fonts, a bitmap strike makes sense */ + /* only if the default instance is active (this is, no glyph */ + /* variation takes place); otherwise, FreeType simply ignores bitmap */ + /* strikes. The same is true for all named instances that are */ + /* different from the default instance. */ + /* */ + /* Don't use this function if you are using the FreeType cache API. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Select_Size( FT_Face face, + FT_Int strike_index ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Size_Request_Type */ + /* */ + /* <Description> */ + /* An enumeration type that lists the supported size request types, */ + /* i.e., what input size (in font units) maps to the requested output */ + /* size (in pixels, as computed from the arguments of */ + /* @FT_Size_Request). */ + /* */ + /* <Values> */ + /* FT_SIZE_REQUEST_TYPE_NOMINAL :: */ + /* The nominal size. The `units_per_EM' field of @FT_FaceRec is */ + /* used to determine both scaling values. */ + /* */ + /* This is the standard scaling found in most applications. In */ + /* particular, use this size request type for TrueType fonts if */ + /* they provide optical scaling or something similar. Note, */ + /* however, that `units_per_EM' is a rather abstract value which */ + /* bears no relation to the actual size of the glyphs in a font. */ + /* */ + /* FT_SIZE_REQUEST_TYPE_REAL_DIM :: */ + /* The real dimension. The sum of the `ascender' and (minus of) */ + /* the `descender' fields of @FT_FaceRec is used to determine both */ + /* scaling values. */ + /* */ + /* FT_SIZE_REQUEST_TYPE_BBOX :: */ + /* The font bounding box. The width and height of the `bbox' field */ + /* of @FT_FaceRec are used to determine the horizontal and vertical */ + /* scaling value, respectively. */ + /* */ + /* FT_SIZE_REQUEST_TYPE_CELL :: */ + /* The `max_advance_width' field of @FT_FaceRec is used to */ + /* determine the horizontal scaling value; the vertical scaling */ + /* value is determined the same way as */ + /* @FT_SIZE_REQUEST_TYPE_REAL_DIM does. Finally, both scaling */ + /* values are set to the smaller one. This type is useful if you */ + /* want to specify the font size for, say, a window of a given */ + /* dimension and 80x24 cells. */ + /* */ + /* FT_SIZE_REQUEST_TYPE_SCALES :: */ + /* Specify the scaling values directly. */ + /* */ + /* <Note> */ + /* The above descriptions only apply to scalable formats. For bitmap */ + /* formats, the behaviour is up to the driver. */ + /* */ + /* See the note section of @FT_Size_Metrics if you wonder how size */ + /* requesting relates to scaling values. */ + /* */ + typedef enum FT_Size_Request_Type_ + { + FT_SIZE_REQUEST_TYPE_NOMINAL, + FT_SIZE_REQUEST_TYPE_REAL_DIM, + FT_SIZE_REQUEST_TYPE_BBOX, + FT_SIZE_REQUEST_TYPE_CELL, + FT_SIZE_REQUEST_TYPE_SCALES, + + FT_SIZE_REQUEST_TYPE_MAX + + } FT_Size_Request_Type; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Size_RequestRec */ + /* */ + /* <Description> */ + /* A structure to model a size request. */ + /* */ + /* <Fields> */ + /* type :: See @FT_Size_Request_Type. */ + /* */ + /* width :: The desired width, given as a 26.6 fractional */ + /* point value (with 72pt = 1in). */ + /* */ + /* height :: The desired height, given as a 26.6 fractional */ + /* point value (with 72pt = 1in). */ + /* */ + /* horiResolution :: The horizontal resolution (dpi, i.e., pixels per */ + /* inch). If set to zero, `width' is treated as a */ + /* 26.6 fractional *pixel* value, which gets */ + /* internally rounded to an integer. */ + /* */ + /* vertResolution :: The vertical resolution (dpi, i.e., pixels per */ + /* inch). If set to zero, `height' is treated as a */ + /* 26.6 fractional *pixel* value, which gets */ + /* internally rounded to an integer. */ + /* */ + /* <Note> */ + /* If `width' is zero, the horizontal scaling value is set equal */ + /* to the vertical scaling value, and vice versa. */ + /* */ + /* If `type' is FT_SIZE_REQUEST_TYPE_SCALES, `width' and `height' are */ + /* interpreted directly as 16.16 fractional scaling values, without */ + /* any further modification, and both `horiResolution' and */ + /* `vertResolution' are ignored. */ + /* */ + typedef struct FT_Size_RequestRec_ + { + FT_Size_Request_Type type; + FT_Long width; + FT_Long height; + FT_UInt horiResolution; + FT_UInt vertResolution; + + } FT_Size_RequestRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Size_Request */ + /* */ + /* <Description> */ + /* A handle to a size request structure. */ + /* */ + typedef struct FT_Size_RequestRec_ *FT_Size_Request; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Request_Size */ + /* */ + /* <Description> */ + /* Resize the scale of the active @FT_Size object in a face. */ + /* */ + /* <InOut> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Input> */ + /* req :: A pointer to a @FT_Size_RequestRec. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* Although drivers may select the bitmap strike matching the */ + /* request, you should not rely on this if you intend to select a */ + /* particular bitmap strike. Use @FT_Select_Size instead in that */ + /* case. */ + /* */ + /* The relation between the requested size and the resulting glyph */ + /* size is dependent entirely on how the size is defined in the */ + /* source face. The font designer chooses the final size of each */ + /* glyph relative to this size. For more information refer to */ + /* `https://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html'. */ + /* */ + /* Contrary to @FT_Set_Char_Size, this function doesn't have special */ + /* code to normalize zero-valued widths, heights, or resolutions */ + /* (which lead to errors in most cases). */ + /* */ + /* Don't use this function if you are using the FreeType cache API. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Request_Size( FT_Face face, + FT_Size_Request req ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Char_Size */ + /* */ + /* <Description> */ + /* Call @FT_Request_Size to request the nominal size (in points). */ + /* */ + /* <InOut> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Input> */ + /* char_width :: The nominal width, in 26.6 fractional points. */ + /* */ + /* char_height :: The nominal height, in 26.6 fractional points. */ + /* */ + /* horz_resolution :: The horizontal resolution in dpi. */ + /* */ + /* vert_resolution :: The vertical resolution in dpi. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* While this function allows fractional points as input values, the */ + /* resulting ppem value for the given resolution is always rounded to */ + /* the nearest integer. */ + /* */ + /* If either the character width or height is zero, it is set equal */ + /* to the other value. */ + /* */ + /* If either the horizontal or vertical resolution is zero, it is set */ + /* equal to the other value. */ + /* */ + /* A character width or height smaller than 1pt is set to 1pt; if */ + /* both resolution values are zero, they are set to 72dpi. */ + /* */ + /* Don't use this function if you are using the FreeType cache API. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Char_Size( FT_Face face, + FT_F26Dot6 char_width, + FT_F26Dot6 char_height, + FT_UInt horz_resolution, + FT_UInt vert_resolution ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Pixel_Sizes */ + /* */ + /* <Description> */ + /* Call @FT_Request_Size to request the nominal size (in pixels). */ + /* */ + /* <InOut> */ + /* face :: A handle to the target face object. */ + /* */ + /* <Input> */ + /* pixel_width :: The nominal width, in pixels. */ + /* */ + /* pixel_height :: The nominal height, in pixels. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* You should not rely on the resulting glyphs matching or being */ + /* constrained to this pixel size. Refer to @FT_Request_Size to */ + /* understand how requested sizes relate to actual sizes. */ + /* */ + /* Don't use this function if you are using the FreeType cache API. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Pixel_Sizes( FT_Face face, + FT_UInt pixel_width, + FT_UInt pixel_height ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Load_Glyph */ + /* */ + /* <Description> */ + /* Load a glyph into the glyph slot of a face object. */ + /* */ + /* <InOut> */ + /* face :: A handle to the target face object where the glyph */ + /* is loaded. */ + /* */ + /* <Input> */ + /* glyph_index :: The index of the glyph in the font file. For */ + /* CID-keyed fonts (either in PS or in CFF format) */ + /* this argument specifies the CID value. */ + /* */ + /* load_flags :: A flag indicating what to load for this glyph. The */ + /* @FT_LOAD_XXX constants can be used to control the */ + /* glyph loading process (e.g., whether the outline */ + /* should be scaled, whether to load bitmaps or not, */ + /* whether to hint the outline, etc). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The loaded glyph may be transformed. See @FT_Set_Transform for */ + /* the details. */ + /* */ + /* For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument' is */ + /* returned for invalid CID values (this is, for CID values that */ + /* don't have a corresponding glyph in the font). See the discussion */ + /* of the @FT_FACE_FLAG_CID_KEYED flag for more details. */ + /* */ + /* If you receive `FT_Err_Glyph_Too_Big', try getting the glyph */ + /* outline at EM size, then scale it manually and fill it as a */ + /* graphics operation. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Load_Glyph( FT_Face face, + FT_UInt glyph_index, + FT_Int32 load_flags ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Load_Char */ + /* */ + /* <Description> */ + /* Load a glyph into the glyph slot of a face object, accessed by its */ + /* character code. */ + /* */ + /* <InOut> */ + /* face :: A handle to a target face object where the glyph */ + /* is loaded. */ + /* */ + /* <Input> */ + /* char_code :: The glyph's character code, according to the */ + /* current charmap used in the face. */ + /* */ + /* load_flags :: A flag indicating what to load for this glyph. The */ + /* @FT_LOAD_XXX constants can be used to control the */ + /* glyph loading process (e.g., whether the outline */ + /* should be scaled, whether to load bitmaps or not, */ + /* whether to hint the outline, etc). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph. */ + /* */ + /* Many fonts contain glyphs that can't be loaded by this function */ + /* since its glyph indices are not listed in any of the font's */ + /* charmaps. */ + /* */ + /* If no active cmap is set up (i.e., `face->charmap' is zero), the */ + /* call to @FT_Get_Char_Index is omitted, and the function behaves */ + /* identically to @FT_Load_Glyph. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Load_Char( FT_Face face, + FT_ULong char_code, + FT_Int32 load_flags ); + + + /************************************************************************* + * + * @enum: + * FT_LOAD_XXX + * + * @description: + * A list of bit field constants for @FT_Load_Glyph to indicate what + * kind of operations to perform during glyph loading. + * + * @values: + * FT_LOAD_DEFAULT :: + * Corresponding to~0, this value is used as the default glyph load + * operation. In this case, the following happens: + * + * 1. FreeType looks for a bitmap for the glyph corresponding to the + * face's current size. If one is found, the function returns. + * The bitmap data can be accessed from the glyph slot (see note + * below). + * + * 2. If no embedded bitmap is searched for or found, FreeType looks + * for a scalable outline. If one is found, it is loaded from + * the font file, scaled to device pixels, then `hinted' to the + * pixel grid in order to optimize it. The outline data can be + * accessed from the glyph slot (see note below). + * + * Note that by default the glyph loader doesn't render outlines into + * bitmaps. The following flags are used to modify this default + * behaviour to more specific and useful cases. + * + * FT_LOAD_NO_SCALE :: + * Don't scale the loaded outline glyph but keep it in font units. + * + * This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and + * unsets @FT_LOAD_RENDER. + * + * If the font is `tricky' (see @FT_FACE_FLAG_TRICKY for more), using + * FT_LOAD_NO_SCALE usually yields meaningless outlines because the + * subglyphs must be scaled and positioned with hinting instructions. + * This can be solved by loading the font without FT_LOAD_NO_SCALE and + * setting the character size to `font->units_per_EM'. + * + * FT_LOAD_NO_HINTING :: + * Disable hinting. This generally generates `blurrier' bitmap glyphs + * when the glyph are rendered in any of the anti-aliased modes. See + * also the note below. + * + * This flag is implied by @FT_LOAD_NO_SCALE. + * + * FT_LOAD_RENDER :: + * Call @FT_Render_Glyph after the glyph is loaded. By default, the + * glyph is rendered in @FT_RENDER_MODE_NORMAL mode. This can be + * overridden by @FT_LOAD_TARGET_XXX or @FT_LOAD_MONOCHROME. + * + * This flag is unset by @FT_LOAD_NO_SCALE. + * + * FT_LOAD_NO_BITMAP :: + * Ignore bitmap strikes when loading. Bitmap-only fonts ignore this + * flag. + * + * @FT_LOAD_NO_SCALE always sets this flag. + * + * FT_LOAD_VERTICAL_LAYOUT :: + * Load the glyph for vertical text layout. In particular, the + * `advance' value in the @FT_GlyphSlotRec structure is set to the + * `vertAdvance' value of the `metrics' field. + * + * In case @FT_HAS_VERTICAL doesn't return true, you shouldn't use + * this flag currently. Reason is that in this case vertical metrics + * get synthesized, and those values are not always consistent across + * various font formats. + * + * FT_LOAD_FORCE_AUTOHINT :: + * Prefer the auto-hinter over the font's native hinter. See also + * the note below. + * + * FT_LOAD_PEDANTIC :: + * Make the font driver perform pedantic verifications during glyph + * loading. This is mostly used to detect broken glyphs in fonts. + * By default, FreeType tries to handle broken fonts also. + * + * In particular, errors from the TrueType bytecode engine are not + * passed to the application if this flag is not set; this might + * result in partially hinted or distorted glyphs in case a glyph's + * bytecode is buggy. + * + * FT_LOAD_NO_RECURSE :: + * Don't load composite glyphs recursively. Instead, the font + * driver should set the `num_subglyph' and `subglyphs' values of + * the glyph slot accordingly, and set `glyph->format' to + * @FT_GLYPH_FORMAT_COMPOSITE. The description of subglyphs can + * then be accessed with @FT_Get_SubGlyph_Info. + * + * This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM. + * + * FT_LOAD_IGNORE_TRANSFORM :: + * Ignore the transform matrix set by @FT_Set_Transform. + * + * FT_LOAD_MONOCHROME :: + * This flag is used with @FT_LOAD_RENDER to indicate that you want to + * render an outline glyph to a 1-bit monochrome bitmap glyph, with + * 8~pixels packed into each byte of the bitmap data. + * + * Note that this has no effect on the hinting algorithm used. You + * should rather use @FT_LOAD_TARGET_MONO so that the + * monochrome-optimized hinting algorithm is used. + * + * FT_LOAD_LINEAR_DESIGN :: + * Keep `linearHoriAdvance' and `linearVertAdvance' fields of + * @FT_GlyphSlotRec in font units. See @FT_GlyphSlotRec for + * details. + * + * FT_LOAD_NO_AUTOHINT :: + * Disable the auto-hinter. See also the note below. + * + * FT_LOAD_COLOR :: + * [Since 2.5] Load embedded color bitmap images. The resulting color + * bitmaps, if available, will have the @FT_PIXEL_MODE_BGRA format. + * If the flag is not set and color bitmaps are found, they are + * converted to 256-level gray bitmaps transparently, using the + * @FT_PIXEL_MODE_GRAY format. + * + * FT_LOAD_COMPUTE_METRICS :: + * [Since 2.6.1] Compute glyph metrics from the glyph data, without + * the use of bundled metrics tables (for example, the `hdmx' table in + * TrueType fonts). This flag is mainly used by font validating or + * font editing applications, which need to ignore, verify, or edit + * those tables. + * + * Currently, this flag is only implemented for TrueType fonts. + * + * FT_LOAD_BITMAP_METRICS_ONLY :: + * [Since 2.7.1] Request loading of the metrics and bitmap image + * information of a (possibly embedded) bitmap glyph without + * allocating or copying the bitmap image data itself. No effect if + * the target glyph is not a bitmap image. + * + * This flag unsets @FT_LOAD_RENDER. + * + * FT_LOAD_CROP_BITMAP :: + * Ignored. Deprecated. + * + * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH :: + * Ignored. Deprecated. + * + * @note: + * By default, hinting is enabled and the font's native hinter (see + * @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter. You can + * disable hinting by setting @FT_LOAD_NO_HINTING or change the + * precedence by setting @FT_LOAD_FORCE_AUTOHINT. You can also set + * @FT_LOAD_NO_AUTOHINT in case you don't want the auto-hinter to be + * used at all. + * + * See the description of @FT_FACE_FLAG_TRICKY for a special exception + * (affecting only a handful of Asian fonts). + * + * Besides deciding which hinter to use, you can also decide which + * hinting algorithm to use. See @FT_LOAD_TARGET_XXX for details. + * + * Note that the auto-hinter needs a valid Unicode cmap (either a native + * one or synthesized by FreeType) for producing correct results. If a + * font provides an incorrect mapping (for example, assigning the + * character code U+005A, LATIN CAPITAL LETTER Z, to a glyph depicting a + * mathematical integral sign), the auto-hinter might produce useless + * results. + * + */ +#define FT_LOAD_DEFAULT 0x0 +#define FT_LOAD_NO_SCALE ( 1L << 0 ) +#define FT_LOAD_NO_HINTING ( 1L << 1 ) +#define FT_LOAD_RENDER ( 1L << 2 ) +#define FT_LOAD_NO_BITMAP ( 1L << 3 ) +#define FT_LOAD_VERTICAL_LAYOUT ( 1L << 4 ) +#define FT_LOAD_FORCE_AUTOHINT ( 1L << 5 ) +#define FT_LOAD_CROP_BITMAP ( 1L << 6 ) +#define FT_LOAD_PEDANTIC ( 1L << 7 ) +#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ( 1L << 9 ) +#define FT_LOAD_NO_RECURSE ( 1L << 10 ) +#define FT_LOAD_IGNORE_TRANSFORM ( 1L << 11 ) +#define FT_LOAD_MONOCHROME ( 1L << 12 ) +#define FT_LOAD_LINEAR_DESIGN ( 1L << 13 ) +#define FT_LOAD_NO_AUTOHINT ( 1L << 15 ) + /* Bits 16-19 are used by `FT_LOAD_TARGET_' */ +#define FT_LOAD_COLOR ( 1L << 20 ) +#define FT_LOAD_COMPUTE_METRICS ( 1L << 21 ) +#define FT_LOAD_BITMAP_METRICS_ONLY ( 1L << 22 ) + + /* */ + + /* used internally only by certain font drivers */ +#define FT_LOAD_ADVANCE_ONLY ( 1L << 8 ) +#define FT_LOAD_SBITS_ONLY ( 1L << 14 ) + + + /************************************************************************** + * + * @enum: + * FT_LOAD_TARGET_XXX + * + * @description: + * A list of values to select a specific hinting algorithm for the + * hinter. You should OR one of these values to your `load_flags' + * when calling @FT_Load_Glyph. + * + * Note that a font's native hinters may ignore the hinting algorithm + * you have specified (e.g., the TrueType bytecode interpreter). You + * can set @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is + * used. + * + * @values: + * FT_LOAD_TARGET_NORMAL :: + * The default hinting algorithm, optimized for standard gray-level + * rendering. For monochrome output, use @FT_LOAD_TARGET_MONO + * instead. + * + * FT_LOAD_TARGET_LIGHT :: + * A lighter hinting algorithm for gray-level modes. Many generated + * glyphs are fuzzier but better resemble their original shape. This + * is achieved by snapping glyphs to the pixel grid only vertically + * (Y-axis), as is done by FreeType's new CFF engine or Microsoft's + * ClearType font renderer. This preserves inter-glyph spacing in + * horizontal text. The snapping is done either by the native font + * driver, if the driver itself and the font support it, or by the + * auto-hinter. + * + * Advance widths are rounded to integer values; however, using the + * `lsb_delta' and `rsb_delta' fields of @FT_GlyphSlotRec, it is + * possible to get fractional advance widths for subpixel positioning + * (which is recommended to use). + * + * If configuration option AF_CONFIG_OPTION_TT_SIZE_METRICS is active, + * TrueType-like metrics are used to make this mode behave similarly + * as in unpatched FreeType versions between 2.4.6 and 2.7.1 + * (inclusive). + * + * FT_LOAD_TARGET_MONO :: + * Strong hinting algorithm that should only be used for monochrome + * output. The result is probably unpleasant if the glyph is rendered + * in non-monochrome modes. + * + * FT_LOAD_TARGET_LCD :: + * A variant of @FT_LOAD_TARGET_LIGHT optimized for horizontally + * decimated LCD displays. + * + * FT_LOAD_TARGET_LCD_V :: + * A variant of @FT_LOAD_TARGET_NORMAL optimized for vertically + * decimated LCD displays. + * + * @note: + * You should use only _one_ of the FT_LOAD_TARGET_XXX values in your + * `load_flags'. They can't be ORed. + * + * If @FT_LOAD_RENDER is also set, the glyph is rendered in the + * corresponding mode (i.e., the mode that matches the used algorithm + * best). An exception is FT_LOAD_TARGET_MONO since it implies + * @FT_LOAD_MONOCHROME. + * + * You can use a hinting algorithm that doesn't correspond to the same + * rendering mode. As an example, it is possible to use the `light' + * hinting algorithm and have the results rendered in horizontal LCD + * pixel mode, with code like + * + * { + * FT_Load_Glyph( face, glyph_index, + * load_flags | FT_LOAD_TARGET_LIGHT ); + * + * FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD ); + * } + * + * In general, you should stick with one rendering mode. For example, + * switching between @FT_LOAD_TARGET_NORMAL and @FT_LOAD_TARGET_MONO + * enforces a lot of recomputation for TrueType fonts, which is slow. + * Another reason is caching: Selecting a different mode usually causes + * changes in both the outlines and the rasterized bitmaps; it is thus + * necessary to empty the cache after a mode switch to avoid false hits. + * + */ +#define FT_LOAD_TARGET_( x ) ( (FT_Int32)( (x) & 15 ) << 16 ) + +#define FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL ) +#define FT_LOAD_TARGET_LIGHT FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT ) +#define FT_LOAD_TARGET_MONO FT_LOAD_TARGET_( FT_RENDER_MODE_MONO ) +#define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_( FT_RENDER_MODE_LCD ) +#define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V ) + + + /************************************************************************** + * + * @macro: + * FT_LOAD_TARGET_MODE + * + * @description: + * Return the @FT_Render_Mode corresponding to a given + * @FT_LOAD_TARGET_XXX value. + * + */ +#define FT_LOAD_TARGET_MODE( x ) ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) ) + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Transform */ + /* */ + /* <Description> */ + /* Set the transformation that is applied to glyph images when they */ + /* are loaded into a glyph slot through @FT_Load_Glyph. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Input> */ + /* matrix :: A pointer to the transformation's 2x2 matrix. Use NULL */ + /* for the identity matrix. */ + /* delta :: A pointer to the translation vector. Use NULL for the */ + /* null vector. */ + /* */ + /* <Note> */ + /* The transformation is only applied to scalable image formats after */ + /* the glyph has been loaded. It means that hinting is unaltered by */ + /* the transformation and is performed on the character size given in */ + /* the last call to @FT_Set_Char_Size or @FT_Set_Pixel_Sizes. */ + /* */ + /* Note that this also transforms the `face.glyph.advance' field, but */ + /* *not* the values in `face.glyph.metrics'. */ + /* */ + FT_EXPORT( void ) + FT_Set_Transform( FT_Face face, + FT_Matrix* matrix, + FT_Vector* delta ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Render_Mode */ + /* */ + /* <Description> */ + /* Render modes supported by FreeType~2. Each mode corresponds to a */ + /* specific type of scanline conversion performed on the outline. */ + /* */ + /* For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode' */ + /* field in the @FT_GlyphSlotRec structure gives the format of the */ + /* returned bitmap. */ + /* */ + /* All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity, */ + /* indicating pixel coverage. Use linear alpha blending and gamma */ + /* correction to correctly render non-monochrome glyph bitmaps onto a */ + /* surface; see @FT_Render_Glyph. */ + /* */ + /* <Values> */ + /* FT_RENDER_MODE_NORMAL :: */ + /* Default render mode; it corresponds to 8-bit anti-aliased */ + /* bitmaps. */ + /* */ + /* FT_RENDER_MODE_LIGHT :: */ + /* This is equivalent to @FT_RENDER_MODE_NORMAL. It is only */ + /* defined as a separate value because render modes are also used */ + /* indirectly to define hinting algorithm selectors. See */ + /* @FT_LOAD_TARGET_XXX for details. */ + /* */ + /* FT_RENDER_MODE_MONO :: */ + /* This mode corresponds to 1-bit bitmaps (with 2~levels of */ + /* opacity). */ + /* */ + /* FT_RENDER_MODE_LCD :: */ + /* This mode corresponds to horizontal RGB and BGR subpixel */ + /* displays like LCD screens. It produces 8-bit bitmaps that are */ + /* 3~times the width of the original glyph outline in pixels, and */ + /* which use the @FT_PIXEL_MODE_LCD mode. */ + /* */ + /* FT_RENDER_MODE_LCD_V :: */ + /* This mode corresponds to vertical RGB and BGR subpixel displays */ + /* (like PDA screens, rotated LCD displays, etc.). It produces */ + /* 8-bit bitmaps that are 3~times the height of the original */ + /* glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode. */ + /* */ + /* <Note> */ + /* Should you define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your */ + /* `ftoption.h', which enables patented ClearType-style rendering, */ + /* the LCD-optimized glyph bitmaps should be filtered to reduce color */ + /* fringes inherent to this technology. You can either set up LCD */ + /* filtering with @FT_Library_SetLcdFilter or @FT_Face_Properties, */ + /* or do the filtering yourself. The default FreeType LCD rendering */ + /* technology does not require filtering. */ + /* */ + /* The selected render mode only affects vector glyphs of a font. */ + /* Embedded bitmaps often have a different pixel mode like */ + /* @FT_PIXEL_MODE_MONO. You can use @FT_Bitmap_Convert to transform */ + /* them into 8-bit pixmaps. */ + /* */ + typedef enum FT_Render_Mode_ + { + FT_RENDER_MODE_NORMAL = 0, + FT_RENDER_MODE_LIGHT, + FT_RENDER_MODE_MONO, + FT_RENDER_MODE_LCD, + FT_RENDER_MODE_LCD_V, + + FT_RENDER_MODE_MAX + + } FT_Render_Mode; + + + /* these constants are deprecated; use the corresponding */ + /* `FT_Render_Mode' values instead */ +#define ft_render_mode_normal FT_RENDER_MODE_NORMAL +#define ft_render_mode_mono FT_RENDER_MODE_MONO + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Render_Glyph */ + /* */ + /* <Description> */ + /* Convert a given glyph image to a bitmap. It does so by inspecting */ + /* the glyph image format, finding the relevant renderer, and */ + /* invoking it. */ + /* */ + /* <InOut> */ + /* slot :: A handle to the glyph slot containing the image to */ + /* convert. */ + /* */ + /* <Input> */ + /* render_mode :: The render mode used to render the glyph image into */ + /* a bitmap. See @FT_Render_Mode for a list of */ + /* possible values. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* To get meaningful results, font scaling values must be set with */ + /* functions like @FT_Set_Char_Size before calling `FT_Render_Glyph'. */ + /* */ + /* When FreeType outputs a bitmap of a glyph, it really outputs an */ + /* alpha coverage map. If a pixel is completely covered by a */ + /* filled-in outline, the bitmap contains 0xFF at that pixel, meaning */ + /* that 0xFF/0xFF fraction of that pixel is covered, meaning the */ + /* pixel is 100% black (or 0% bright). If a pixel is only 50% */ + /* covered (value 0x80), the pixel is made 50% black (50% bright or a */ + /* middle shade of grey). 0% covered means 0% black (100% bright or */ + /* white). */ + /* */ + /* On high-DPI screens like on smartphones and tablets, the pixels */ + /* are so small that their chance of being completely covered and */ + /* therefore completely black are fairly good. On the low-DPI */ + /* screens, however, the situation is different. The pixels are too */ + /* large for most of the details of a glyph and shades of gray are */ + /* the norm rather than the exception. */ + /* */ + /* This is relevant because all our screens have a second problem: */ + /* they are not linear. 1~+~1 is not~2. Twice the value does not */ + /* result in twice the brightness. When a pixel is only 50% covered, */ + /* the coverage map says 50% black, and this translates to a pixel */ + /* value of 128 when you use 8~bits per channel (0-255). However, */ + /* this does not translate to 50% brightness for that pixel on our */ + /* sRGB and gamma~2.2 screens. Due to their non-linearity, they */ + /* dwell longer in the darks and only a pixel value of about 186 */ + /* results in 50% brightness -- 128 ends up too dark on both bright */ + /* and dark backgrounds. The net result is that dark text looks */ + /* burnt-out, pixely and blotchy on bright background, bright text */ + /* too frail on dark backgrounds, and colored text on colored */ + /* background (for example, red on green) seems to have dark halos or */ + /* `dirt' around it. The situation is especially ugly for diagonal */ + /* stems like in `w' glyph shapes where the quality of FreeType's */ + /* anti-aliasing depends on the correct display of grays. On */ + /* high-DPI screens where smaller, fully black pixels reign supreme, */ + /* this doesn't matter, but on our low-DPI screens with all the gray */ + /* shades, it does. 0% and 100% brightness are the same things in */ + /* linear and non-linear space, just all the shades in-between */ + /* aren't. */ + /* */ + /* The blending function for placing text over a background is */ + /* */ + /* { */ + /* dst = alpha * src + (1 - alpha) * dst , */ + /* } */ + /* */ + /* which is known as the OVER operator. */ + /* */ + /* To correctly composite an antialiased pixel of a glyph onto a */ + /* surface, */ + /* */ + /* 1. take the foreground and background colors (e.g., in sRGB space) */ + /* and apply gamma to get them in a linear space, */ + /* */ + /* 2. use OVER to blend the two linear colors using the glyph pixel */ + /* as the alpha value (remember, the glyph bitmap is an alpha */ + /* coverage bitmap), and */ + /* */ + /* 3. apply inverse gamma to the blended pixel and write it back to */ + /* the image. */ + /* */ + /* Internal testing at Adobe found that a target inverse gamma of~1.8 */ + /* for step~3 gives good results across a wide range of displays with */ + /* an sRGB gamma curve or a similar one. */ + /* */ + /* This process can cost performance. There is an approximation that */ + /* does not need to know about the background color; see */ + /* https://bel.fi/alankila/lcd/ and */ + /* https://bel.fi/alankila/lcd/alpcor.html for details. */ + /* */ + /* *ATTENTION*: Linear blending is even more important when dealing */ + /* with subpixel-rendered glyphs to prevent color-fringing! A */ + /* subpixel-rendered glyph must first be filtered with a filter that */ + /* gives equal weight to the three color primaries and does not */ + /* exceed a sum of 0x100, see section @lcd_filtering. Then the */ + /* only difference to gray linear blending is that subpixel-rendered */ + /* linear blending is done 3~times per pixel: red foreground subpixel */ + /* to red background subpixel and so on for green and blue. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Render_Glyph( FT_GlyphSlot slot, + FT_Render_Mode render_mode ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Kerning_Mode */ + /* */ + /* <Description> */ + /* An enumeration to specify the format of kerning values returned by */ + /* @FT_Get_Kerning. */ + /* */ + /* <Values> */ + /* FT_KERNING_DEFAULT :: Return grid-fitted kerning distances in */ + /* 26.6 fractional pixels. */ + /* */ + /* FT_KERNING_UNFITTED :: Return un-grid-fitted kerning distances in */ + /* 26.6 fractional pixels. */ + /* */ + /* FT_KERNING_UNSCALED :: Return the kerning vector in original font */ + /* units. */ + /* */ + /* <Note> */ + /* FT_KERNING_DEFAULT returns full pixel values; it also makes */ + /* FreeType heuristically scale down kerning distances at small ppem */ + /* values so that they don't become too big. */ + /* */ + /* Both FT_KERNING_DEFAULT and FT_KERNING_UNFITTED use the current */ + /* horizontal scaling factor (as set e.g. with @FT_Set_Char_Size) to */ + /* convert font units to pixels. */ + /* */ + typedef enum FT_Kerning_Mode_ + { + FT_KERNING_DEFAULT = 0, + FT_KERNING_UNFITTED, + FT_KERNING_UNSCALED + + } FT_Kerning_Mode; + + + /* these constants are deprecated; use the corresponding */ + /* `FT_Kerning_Mode' values instead */ +#define ft_kerning_default FT_KERNING_DEFAULT +#define ft_kerning_unfitted FT_KERNING_UNFITTED +#define ft_kerning_unscaled FT_KERNING_UNSCALED + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Kerning */ + /* */ + /* <Description> */ + /* Return the kerning vector between two glyphs of the same face. */ + /* */ + /* <Input> */ + /* face :: A handle to a source face object. */ + /* */ + /* left_glyph :: The index of the left glyph in the kern pair. */ + /* */ + /* right_glyph :: The index of the right glyph in the kern pair. */ + /* */ + /* kern_mode :: See @FT_Kerning_Mode for more information. */ + /* Determines the scale and dimension of the returned */ + /* kerning vector. */ + /* */ + /* <Output> */ + /* akerning :: The kerning vector. This is either in font units, */ + /* fractional pixels (26.6 format), or pixels for */ + /* scalable formats, and in pixels for fixed-sizes */ + /* formats. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* Only horizontal layouts (left-to-right & right-to-left) are */ + /* supported by this method. Other layouts, or more sophisticated */ + /* kernings, are out of the scope of this API function -- they can be */ + /* implemented through format-specific interfaces. */ + /* */ + /* Kerning for OpenType fonts implemented in a `GPOS' table is not */ + /* supported; use @FT_HAS_KERNING to find out whether a font has data */ + /* that can be extracted with `FT_Get_Kerning'. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Kerning( FT_Face face, + FT_UInt left_glyph, + FT_UInt right_glyph, + FT_UInt kern_mode, + FT_Vector *akerning ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Track_Kerning */ + /* */ + /* <Description> */ + /* Return the track kerning for a given face object at a given size. */ + /* */ + /* <Input> */ + /* face :: A handle to a source face object. */ + /* */ + /* point_size :: The point size in 16.16 fractional points. */ + /* */ + /* degree :: The degree of tightness. Increasingly negative */ + /* values represent tighter track kerning, while */ + /* increasingly positive values represent looser track */ + /* kerning. Value zero means no track kerning. */ + /* */ + /* <Output> */ + /* akerning :: The kerning in 16.16 fractional points, to be */ + /* uniformly applied between all glyphs. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* Currently, only the Type~1 font driver supports track kerning, */ + /* using data from AFM files (if attached with @FT_Attach_File or */ + /* @FT_Attach_Stream). */ + /* */ + /* Only very few AFM files come with track kerning data; please refer */ + /* to Adobe's AFM specification for more details. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Track_Kerning( FT_Face face, + FT_Fixed point_size, + FT_Int degree, + FT_Fixed* akerning ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Glyph_Name */ + /* */ + /* <Description> */ + /* Retrieve the ASCII name of a given glyph in a face. This only */ + /* works for those faces where @FT_HAS_GLYPH_NAMES(face) returns~1. */ + /* */ + /* <Input> */ + /* face :: A handle to a source face object. */ + /* */ + /* glyph_index :: The glyph index. */ + /* */ + /* buffer_max :: The maximum number of bytes available in the */ + /* buffer. */ + /* */ + /* <Output> */ + /* buffer :: A pointer to a target buffer where the name is */ + /* copied to. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* An error is returned if the face doesn't provide glyph names or if */ + /* the glyph index is invalid. In all cases of failure, the first */ + /* byte of `buffer' is set to~0 to indicate an empty name. */ + /* */ + /* The glyph name is truncated to fit within the buffer if it is too */ + /* long. The returned string is always zero-terminated. */ + /* */ + /* Be aware that FreeType reorders glyph indices internally so that */ + /* glyph index~0 always corresponds to the `missing glyph' (called */ + /* `.notdef'). */ + /* */ + /* This function always returns an error if the config macro */ + /* `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is not defined in `ftoption.h'. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Glyph_Name( FT_Face face, + FT_UInt glyph_index, + FT_Pointer buffer, + FT_UInt buffer_max ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Postscript_Name */ + /* */ + /* <Description> */ + /* Retrieve the ASCII PostScript name of a given face, if available. */ + /* This only works with PostScript, TrueType, and OpenType fonts. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Return> */ + /* A pointer to the face's PostScript name. NULL if unavailable. */ + /* */ + /* <Note> */ + /* The returned pointer is owned by the face and is destroyed with */ + /* it. */ + /* */ + /* For variation fonts, this string changes if you select a different */ + /* instance, and you have to call `FT_Get_PostScript_Name' again to */ + /* retrieve it. FreeType follows Adobe TechNote #5902, `Generating */ + /* PostScript Names for Fonts Using OpenType Font Variations'. */ + /* */ + /* https://download.macromedia.com/pub/developer/opentype/tech-notes/5902.AdobePSNameGeneration.html */ + /* */ + /* [Since 2.9] Special PostScript names for named instances are only */ + /* returned if the named instance is set with @FT_Set_Named_Instance */ + /* (and the font has corresponding entries in its `fvar' table). If */ + /* @FT_IS_VARIATION returns true, the algorithmically derived */ + /* PostScript name is provided, not looking up special entries for */ + /* named instances. */ + /* */ + FT_EXPORT( const char* ) + FT_Get_Postscript_Name( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Select_Charmap */ + /* */ + /* <Description> */ + /* Select a given charmap by its encoding tag (as listed in */ + /* `freetype.h'). */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Input> */ + /* encoding :: A handle to the selected encoding. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function returns an error if no charmap in the face */ + /* corresponds to the encoding queried here. */ + /* */ + /* Because many fonts contain more than a single cmap for Unicode */ + /* encoding, this function has some special code to select the one */ + /* that covers Unicode best (`best' in the sense that a UCS-4 cmap is */ + /* preferred to a UCS-2 cmap). It is thus preferable to */ + /* @FT_Set_Charmap in this case. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Select_Charmap( FT_Face face, + FT_Encoding encoding ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Charmap */ + /* */ + /* <Description> */ + /* Select a given charmap for character code to glyph index mapping. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Input> */ + /* charmap :: A handle to the selected charmap. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function returns an error if the charmap is not part of */ + /* the face (i.e., if it is not listed in the `face->charmaps' */ + /* table). */ + /* */ + /* It also fails if an OpenType type~14 charmap is selected (which */ + /* doesn't map character codes to glyph indices at all). */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Charmap( FT_Face face, + FT_CharMap charmap ); + + + /************************************************************************* + * + * @function: + * FT_Get_Charmap_Index + * + * @description: + * Retrieve index of a given charmap. + * + * @input: + * charmap :: + * A handle to a charmap. + * + * @return: + * The index into the array of character maps within the face to which + * `charmap' belongs. If an error occurs, -1 is returned. + * + */ + FT_EXPORT( FT_Int ) + FT_Get_Charmap_Index( FT_CharMap charmap ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Char_Index */ + /* */ + /* <Description> */ + /* Return the glyph index of a given character code. This function */ + /* uses the currently selected charmap to do the mapping. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* charcode :: The character code. */ + /* */ + /* <Return> */ + /* The glyph index. 0~means `undefined character code'. */ + /* */ + /* <Note> */ + /* If you use FreeType to manipulate the contents of font files */ + /* directly, be aware that the glyph index returned by this function */ + /* doesn't always correspond to the internal indices used within the */ + /* file. This is done to ensure that value~0 always corresponds to */ + /* the `missing glyph'. If the first glyph is not named `.notdef', */ + /* then for Type~1 and Type~42 fonts, `.notdef' will be moved into */ + /* the glyph ID~0 position, and whatever was there will be moved to */ + /* the position `.notdef' had. For Type~1 fonts, if there is no */ + /* `.notdef' glyph at all, then one will be created at index~0 and */ + /* whatever was there will be moved to the last index -- Type~42 */ + /* fonts are considered invalid under this condition. */ + /* */ + FT_EXPORT( FT_UInt ) + FT_Get_Char_Index( FT_Face face, + FT_ULong charcode ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_First_Char */ + /* */ + /* <Description> */ + /* Return the first character code in the current charmap of a given */ + /* face, together with its corresponding glyph index. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Output> */ + /* agindex :: Glyph index of first character code. 0~if charmap is */ + /* empty. */ + /* */ + /* <Return> */ + /* The charmap's first character code. */ + /* */ + /* <Note> */ + /* You should use this function together with @FT_Get_Next_Char to */ + /* parse all character codes available in a given charmap. The code */ + /* should look like this: */ + /* */ + /* { */ + /* FT_ULong charcode; */ + /* FT_UInt gindex; */ + /* */ + /* */ + /* charcode = FT_Get_First_Char( face, &gindex ); */ + /* while ( gindex != 0 ) */ + /* { */ + /* ... do something with (charcode,gindex) pair ... */ + /* */ + /* charcode = FT_Get_Next_Char( face, charcode, &gindex ); */ + /* } */ + /* } */ + /* */ + /* Be aware that character codes can have values up to 0xFFFFFFFF; */ + /* this might happen for non-Unicode or malformed cmaps. However, */ + /* even with regular Unicode encoding, so-called `last resort fonts' */ + /* (using SFNT cmap format 13, see function @FT_Get_CMap_Format) */ + /* normally have entries for all Unicode characters up to 0x1FFFFF, */ + /* which can cause *a lot* of iterations. */ + /* */ + /* Note that `*agindex' is set to~0 if the charmap is empty. The */ + /* result itself can be~0 in two cases: if the charmap is empty or */ + /* if the value~0 is the first valid character code. */ + /* */ + FT_EXPORT( FT_ULong ) + FT_Get_First_Char( FT_Face face, + FT_UInt *agindex ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Next_Char */ + /* */ + /* <Description> */ + /* Return the next character code in the current charmap of a given */ + /* face following the value `char_code', as well as the corresponding */ + /* glyph index. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* char_code :: The starting character code. */ + /* */ + /* <Output> */ + /* agindex :: Glyph index of next character code. 0~if charmap */ + /* is empty. */ + /* */ + /* <Return> */ + /* The charmap's next character code. */ + /* */ + /* <Note> */ + /* You should use this function with @FT_Get_First_Char to walk */ + /* over all character codes available in a given charmap. See the */ + /* note for that function for a simple code example. */ + /* */ + /* Note that `*agindex' is set to~0 when there are no more codes in */ + /* the charmap. */ + /* */ + FT_EXPORT( FT_ULong ) + FT_Get_Next_Char( FT_Face face, + FT_ULong char_code, + FT_UInt *agindex ); + + + /************************************************************************* + * + * @function: + * FT_Face_Properties + * + * @description: + * Set or override certain (library or module-wide) properties on a + * face-by-face basis. Useful for finer-grained control and avoiding + * locks on shared structures (threads can modify their own faces as + * they see fit). + * + * Contrary to @FT_Property_Set, this function uses @FT_Parameter so + * that you can pass multiple properties to the target face in one call. + * Note that only a subset of the available properties can be + * controlled. + * + * * @FT_PARAM_TAG_STEM_DARKENING (stem darkening, corresponding to the + * property `no-stem-darkening' provided by the `autofit', `cff', + * `type1', and `t1cid' modules; see @no-stem-darkening). + * + * * @FT_PARAM_TAG_LCD_FILTER_WEIGHTS (LCD filter weights, corresponding + * to function @FT_Library_SetLcdFilterWeights). + * + * * @FT_PARAM_TAG_RANDOM_SEED (seed value for the CFF, Type~1, and CID + * `random' operator, corresponding to the `random-seed' property + * provided by the `cff', `type1', and `t1cid' modules; see + * @random-seed). + * + * Pass NULL as `data' in @FT_Parameter for a given tag to reset the + * option and use the library or module default again. + * + * @input: + * face :: + * A handle to the source face object. + * + * num_properties :: + * The number of properties that follow. + * + * properties :: + * A handle to an @FT_Parameter array with `num_properties' elements. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * Here an example that sets three properties. You must define + * FT_CONFIG_OPTION_SUBPIXEL_RENDERING to make the LCD filter examples + * work. + * + * { + * FT_Parameter property1; + * FT_Bool darken_stems = 1; + * + * FT_Parameter property2; + * FT_LcdFiveTapFilter custom_weight = + * { 0x11, 0x44, 0x56, 0x44, 0x11 }; + * + * FT_Parameter property3; + * FT_Int32 random_seed = 314159265; + * + * FT_Parameter properties[3] = { property1, + * property2, + * property3 }; + * + * + * property1.tag = FT_PARAM_TAG_STEM_DARKENING; + * property1.data = &darken_stems; + * + * property2.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS; + * property2.data = custom_weight; + * + * property3.tag = FT_PARAM_TAG_RANDOM_SEED; + * property3.data = &random_seed; + * + * FT_Face_Properties( face, 3, properties ); + * } + * + * The next example resets a single property to its default value. + * + * { + * FT_Parameter property; + * + * + * property.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS; + * property.data = NULL; + * + * FT_Face_Properties( face, 1, &property ); + * } + * + * @since: + * 2.8 + * + */ + FT_EXPORT( FT_Error ) + FT_Face_Properties( FT_Face face, + FT_UInt num_properties, + FT_Parameter* properties ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Name_Index */ + /* */ + /* <Description> */ + /* Return the glyph index of a given glyph name. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* glyph_name :: The glyph name. */ + /* */ + /* <Return> */ + /* The glyph index. 0~means `undefined character code'. */ + /* */ + FT_EXPORT( FT_UInt ) + FT_Get_Name_Index( FT_Face face, + FT_String* glyph_name ); + + + /************************************************************************* + * + * @macro: + * FT_SUBGLYPH_FLAG_XXX + * + * @description: + * A list of constants describing subglyphs. Please refer to the + * `glyf' table description in the OpenType specification for the + * meaning of the various flags (which get synthesized for + * non-OpenType subglyphs). + * + * @values: + * FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS :: + * FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES :: + * FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID :: + * FT_SUBGLYPH_FLAG_SCALE :: + * FT_SUBGLYPH_FLAG_XY_SCALE :: + * FT_SUBGLYPH_FLAG_2X2 :: + * FT_SUBGLYPH_FLAG_USE_MY_METRICS :: + * + */ +#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS 1 +#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES 2 +#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID 4 +#define FT_SUBGLYPH_FLAG_SCALE 8 +#define FT_SUBGLYPH_FLAG_XY_SCALE 0x40 +#define FT_SUBGLYPH_FLAG_2X2 0x80 +#define FT_SUBGLYPH_FLAG_USE_MY_METRICS 0x200 + + + /************************************************************************* + * + * @func: + * FT_Get_SubGlyph_Info + * + * @description: + * Retrieve a description of a given subglyph. Only use it if + * `glyph->format' is @FT_GLYPH_FORMAT_COMPOSITE; an error is + * returned otherwise. + * + * @input: + * glyph :: + * The source glyph slot. + * + * sub_index :: + * The index of the subglyph. Must be less than + * `glyph->num_subglyphs'. + * + * @output: + * p_index :: + * The glyph index of the subglyph. + * + * p_flags :: + * The subglyph flags, see @FT_SUBGLYPH_FLAG_XXX. + * + * p_arg1 :: + * The subglyph's first argument (if any). + * + * p_arg2 :: + * The subglyph's second argument (if any). + * + * p_transform :: + * The subglyph transformation (if any). + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The values of `*p_arg1', `*p_arg2', and `*p_transform' must be + * interpreted depending on the flags returned in `*p_flags'. See the + * OpenType specification for details. + * + */ + FT_EXPORT( FT_Error ) + FT_Get_SubGlyph_Info( FT_GlyphSlot glyph, + FT_UInt sub_index, + FT_Int *p_index, + FT_UInt *p_flags, + FT_Int *p_arg1, + FT_Int *p_arg2, + FT_Matrix *p_transform ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_FSTYPE_XXX */ + /* */ + /* <Description> */ + /* A list of bit flags used in the `fsType' field of the OS/2 table */ + /* in a TrueType or OpenType font and the `FSType' entry in a */ + /* PostScript font. These bit flags are returned by */ + /* @FT_Get_FSType_Flags; they inform client applications of embedding */ + /* and subsetting restrictions associated with a font. */ + /* */ + /* See */ + /* https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf */ + /* for more details. */ + /* */ + /* <Values> */ + /* FT_FSTYPE_INSTALLABLE_EMBEDDING :: */ + /* Fonts with no fsType bit set may be embedded and permanently */ + /* installed on the remote system by an application. */ + /* */ + /* FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING :: */ + /* Fonts that have only this bit set must not be modified, embedded */ + /* or exchanged in any manner without first obtaining permission of */ + /* the font software copyright owner. */ + /* */ + /* FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING :: */ + /* The font may be embedded and temporarily loaded on the remote */ + /* system. Documents containing Preview & Print fonts must be */ + /* opened `read-only'; no edits can be applied to the document. */ + /* */ + /* FT_FSTYPE_EDITABLE_EMBEDDING :: */ + /* The font may be embedded but must only be installed temporarily */ + /* on other systems. In contrast to Preview & Print fonts, */ + /* documents containing editable fonts may be opened for reading, */ + /* editing is permitted, and changes may be saved. */ + /* */ + /* FT_FSTYPE_NO_SUBSETTING :: */ + /* The font may not be subsetted prior to embedding. */ + /* */ + /* FT_FSTYPE_BITMAP_EMBEDDING_ONLY :: */ + /* Only bitmaps contained in the font may be embedded; no outline */ + /* data may be embedded. If there are no bitmaps available in the */ + /* font, then the font is unembeddable. */ + /* */ + /* <Note> */ + /* The flags are ORed together, thus more than a single value can be */ + /* returned. */ + /* */ + /* While the `fsType' flags can indicate that a font may be embedded, */ + /* a license with the font vendor may be separately required to use */ + /* the font in this way. */ + /* */ +#define FT_FSTYPE_INSTALLABLE_EMBEDDING 0x0000 +#define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING 0x0002 +#define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING 0x0004 +#define FT_FSTYPE_EDITABLE_EMBEDDING 0x0008 +#define FT_FSTYPE_NO_SUBSETTING 0x0100 +#define FT_FSTYPE_BITMAP_EMBEDDING_ONLY 0x0200 + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_FSType_Flags */ + /* */ + /* <Description> */ + /* Return the `fsType' flags for a font. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Return> */ + /* The `fsType' flags, see @FT_FSTYPE_XXX. */ + /* */ + /* <Note> */ + /* Use this function rather than directly reading the `fs_type' field */ + /* in the @PS_FontInfoRec structure, which is only guaranteed to */ + /* return the correct results for Type~1 fonts. */ + /* */ + /* <Since> */ + /* 2.3.8 */ + /* */ + FT_EXPORT( FT_UShort ) + FT_Get_FSType_Flags( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* glyph_variants */ + /* */ + /* <Title> */ + /* Unicode Variation Sequences */ + /* */ + /* <Abstract> */ + /* The FreeType~2 interface to Unicode Variation Sequences (UVS), */ + /* using the SFNT cmap format~14. */ + /* */ + /* <Description> */ + /* Many characters, especially for CJK scripts, have variant forms. */ + /* They are a sort of grey area somewhere between being totally */ + /* irrelevant and semantically distinct; for this reason, the Unicode */ + /* consortium decided to introduce Variation Sequences (VS), */ + /* consisting of a Unicode base character and a variation selector */ + /* instead of further extending the already huge number of */ + /* characters. */ + /* */ + /* Unicode maintains two different sets, namely `Standardized */ + /* Variation Sequences' and registered `Ideographic Variation */ + /* Sequences' (IVS), collected in the `Ideographic Variation */ + /* Database' (IVD). */ + /* */ + /* https://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt */ + /* https://unicode.org/reports/tr37/ */ + /* https://unicode.org/ivd/ */ + /* */ + /* To date (January 2017), the character with the most ideographic */ + /* variations is U+9089, having 32 such IVS. */ + /* */ + /* Three Mongolian Variation Selectors have the values U+180B-U+180D; */ + /* 256 generic Variation Selectors are encoded in the ranges */ + /* U+FE00-U+FE0F and U+E0100-U+E01EF. IVS currently use Variation */ + /* Selectors from the range U+E0100-U+E01EF only. */ + /* */ + /* A VS consists of the base character value followed by a single */ + /* Variation Selector. For example, to get the first variation of */ + /* U+9089, you have to write the character sequence `U+9089 U+E0100'. */ + /* */ + /* Adobe and MS decided to support both standardized and ideographic */ + /* VS with a new cmap subtable (format~14). It is an odd subtable */ + /* because it is not a mapping of input code points to glyphs, but */ + /* contains lists of all variations supported by the font. */ + /* */ + /* A variation may be either `default' or `non-default' for a given */ + /* font. A default variation is the one you will get for that code */ + /* point if you look it up in the standard Unicode cmap. A */ + /* non-default variation is a different glyph. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetCharVariantIndex */ + /* */ + /* <Description> */ + /* Return the glyph index of a given character code as modified by */ + /* the variation selector. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* charcode :: */ + /* The character code point in Unicode. */ + /* */ + /* variantSelector :: */ + /* The Unicode code point of the variation selector. */ + /* */ + /* <Return> */ + /* The glyph index. 0~means either `undefined character code', or */ + /* `undefined selector code', or `no variation selector cmap */ + /* subtable', or `current CharMap is not Unicode'. */ + /* */ + /* <Note> */ + /* If you use FreeType to manipulate the contents of font files */ + /* directly, be aware that the glyph index returned by this function */ + /* doesn't always correspond to the internal indices used within */ + /* the file. This is done to ensure that value~0 always corresponds */ + /* to the `missing glyph'. */ + /* */ + /* This function is only meaningful if */ + /* a) the font has a variation selector cmap sub table, */ + /* and */ + /* b) the current charmap has a Unicode encoding. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_UInt ) + FT_Face_GetCharVariantIndex( FT_Face face, + FT_ULong charcode, + FT_ULong variantSelector ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetCharVariantIsDefault */ + /* */ + /* <Description> */ + /* Check whether this variation of this Unicode character is the one */ + /* to be found in the `cmap'. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* charcode :: */ + /* The character codepoint in Unicode. */ + /* */ + /* variantSelector :: */ + /* The Unicode codepoint of the variation selector. */ + /* */ + /* <Return> */ + /* 1~if found in the standard (Unicode) cmap, 0~if found in the */ + /* variation selector cmap, or -1 if it is not a variation. */ + /* */ + /* <Note> */ + /* This function is only meaningful if the font has a variation */ + /* selector cmap subtable. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_Int ) + FT_Face_GetCharVariantIsDefault( FT_Face face, + FT_ULong charcode, + FT_ULong variantSelector ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetVariantSelectors */ + /* */ + /* <Description> */ + /* Return a zero-terminated list of Unicode variation selectors found */ + /* in the font. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* <Return> */ + /* A pointer to an array of selector code points, or NULL if there is */ + /* no valid variation selector cmap subtable. */ + /* */ + /* <Note> */ + /* The last item in the array is~0; the array is owned by the */ + /* @FT_Face object but can be overwritten or released on the next */ + /* call to a FreeType function. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_UInt32* ) + FT_Face_GetVariantSelectors( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetVariantsOfChar */ + /* */ + /* <Description> */ + /* Return a zero-terminated list of Unicode variation selectors found */ + /* for the specified character code. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* charcode :: */ + /* The character codepoint in Unicode. */ + /* */ + /* <Return> */ + /* A pointer to an array of variation selector code points that are */ + /* active for the given character, or NULL if the corresponding list */ + /* is empty. */ + /* */ + /* <Note> */ + /* The last item in the array is~0; the array is owned by the */ + /* @FT_Face object but can be overwritten or released on the next */ + /* call to a FreeType function. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_UInt32* ) + FT_Face_GetVariantsOfChar( FT_Face face, + FT_ULong charcode ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetCharsOfVariant */ + /* */ + /* <Description> */ + /* Return a zero-terminated list of Unicode character codes found for */ + /* the specified variation selector. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* variantSelector :: */ + /* The variation selector code point in Unicode. */ + /* */ + /* <Return> */ + /* A list of all the code points that are specified by this selector */ + /* (both default and non-default codes are returned) or NULL if there */ + /* is no valid cmap or the variation selector is invalid. */ + /* */ + /* <Note> */ + /* The last item in the array is~0; the array is owned by the */ + /* @FT_Face object but can be overwritten or released on the next */ + /* call to a FreeType function. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_UInt32* ) + FT_Face_GetCharsOfVariant( FT_Face face, + FT_ULong variantSelector ); + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* computations */ + /* */ + /* <Title> */ + /* Computations */ + /* */ + /* <Abstract> */ + /* Crunching fixed numbers and vectors. */ + /* */ + /* <Description> */ + /* This section contains various functions used to perform */ + /* computations on 16.16 fixed-float numbers or 2d vectors. */ + /* */ + /* <Order> */ + /* FT_MulDiv */ + /* FT_MulFix */ + /* FT_DivFix */ + /* FT_RoundFix */ + /* FT_CeilFix */ + /* FT_FloorFix */ + /* FT_Vector_Transform */ + /* FT_Matrix_Multiply */ + /* FT_Matrix_Invert */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_MulDiv */ + /* */ + /* <Description> */ + /* Compute `(a*b)/c' with maximum accuracy, using a 64-bit */ + /* intermediate integer whenever necessary. */ + /* */ + /* This function isn't necessarily as fast as some processor specific */ + /* operations, but is at least completely portable. */ + /* */ + /* <Input> */ + /* a :: The first multiplier. */ + /* */ + /* b :: The second multiplier. */ + /* */ + /* c :: The divisor. */ + /* */ + /* <Return> */ + /* The result of `(a*b)/c'. This function never traps when trying to */ + /* divide by zero; it simply returns `MaxInt' or `MinInt' depending */ + /* on the signs of `a' and `b'. */ + /* */ + FT_EXPORT( FT_Long ) + FT_MulDiv( FT_Long a, + FT_Long b, + FT_Long c ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_MulFix */ + /* */ + /* <Description> */ + /* Compute `(a*b)/0x10000' with maximum accuracy. Its main use is to */ + /* multiply a given value by a 16.16 fixed-point factor. */ + /* */ + /* <Input> */ + /* a :: The first multiplier. */ + /* */ + /* b :: The second multiplier. Use a 16.16 factor here whenever */ + /* possible (see note below). */ + /* */ + /* <Return> */ + /* The result of `(a*b)/0x10000'. */ + /* */ + /* <Note> */ + /* This function has been optimized for the case where the absolute */ + /* value of `a' is less than 2048, and `b' is a 16.16 scaling factor. */ + /* As this happens mainly when scaling from notional units to */ + /* fractional pixels in FreeType, it resulted in noticeable speed */ + /* improvements between versions 2.x and 1.x. */ + /* */ + /* As a conclusion, always try to place a 16.16 factor as the */ + /* _second_ argument of this function; this can make a great */ + /* difference. */ + /* */ + FT_EXPORT( FT_Long ) + FT_MulFix( FT_Long a, + FT_Long b ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_DivFix */ + /* */ + /* <Description> */ + /* Compute `(a*0x10000)/b' with maximum accuracy. Its main use is to */ + /* divide a given value by a 16.16 fixed-point factor. */ + /* */ + /* <Input> */ + /* a :: The numerator. */ + /* */ + /* b :: The denominator. Use a 16.16 factor here. */ + /* */ + /* <Return> */ + /* The result of `(a*0x10000)/b'. */ + /* */ + FT_EXPORT( FT_Long ) + FT_DivFix( FT_Long a, + FT_Long b ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_RoundFix */ + /* */ + /* <Description> */ + /* Round a 16.16 fixed number. */ + /* */ + /* <Input> */ + /* a :: The number to be rounded. */ + /* */ + /* <Return> */ + /* `a' rounded to the nearest 16.16 fixed integer, halfway cases away */ + /* from zero. */ + /* */ + /* <Note> */ + /* The function uses wrap-around arithmetic. */ + /* */ + FT_EXPORT( FT_Fixed ) + FT_RoundFix( FT_Fixed a ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_CeilFix */ + /* */ + /* <Description> */ + /* Compute the smallest following integer of a 16.16 fixed number. */ + /* */ + /* <Input> */ + /* a :: The number for which the ceiling function is to be computed. */ + /* */ + /* <Return> */ + /* `a' rounded towards plus infinity. */ + /* */ + /* <Note> */ + /* The function uses wrap-around arithmetic. */ + /* */ + FT_EXPORT( FT_Fixed ) + FT_CeilFix( FT_Fixed a ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_FloorFix */ + /* */ + /* <Description> */ + /* Compute the largest previous integer of a 16.16 fixed number. */ + /* */ + /* <Input> */ + /* a :: The number for which the floor function is to be computed. */ + /* */ + /* <Return> */ + /* `a' rounded towards minus infinity. */ + /* */ + FT_EXPORT( FT_Fixed ) + FT_FloorFix( FT_Fixed a ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Vector_Transform */ + /* */ + /* <Description> */ + /* Transform a single vector through a 2x2 matrix. */ + /* */ + /* <InOut> */ + /* vector :: The target vector to transform. */ + /* */ + /* <Input> */ + /* matrix :: A pointer to the source 2x2 matrix. */ + /* */ + /* <Note> */ + /* The result is undefined if either `vector' or `matrix' is invalid. */ + /* */ + FT_EXPORT( void ) + FT_Vector_Transform( FT_Vector* vec, + const FT_Matrix* matrix ); + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* version */ + /* */ + /* <Title> */ + /* FreeType Version */ + /* */ + /* <Abstract> */ + /* Functions and macros related to FreeType versions. */ + /* */ + /* <Description> */ + /* Note that those functions and macros are of limited use because */ + /* even a new release of FreeType with only documentation changes */ + /* increases the version number. */ + /* */ + /* <Order> */ + /* FT_Library_Version */ + /* */ + /* FREETYPE_MAJOR */ + /* FREETYPE_MINOR */ + /* FREETYPE_PATCH */ + /* */ + /* FT_Face_CheckTrueTypePatents */ + /* FT_Face_SetUnpatentedHinting */ + /* */ + /* FREETYPE_XXX */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @enum: + * FREETYPE_XXX + * + * @description: + * These three macros identify the FreeType source code version. + * Use @FT_Library_Version to access them at runtime. + * + * @values: + * FREETYPE_MAJOR :: The major version number. + * FREETYPE_MINOR :: The minor version number. + * FREETYPE_PATCH :: The patch level. + * + * @note: + * The version number of FreeType if built as a dynamic link library + * with the `libtool' package is _not_ controlled by these three + * macros. + * + */ +#define FREETYPE_MAJOR 2 +#define FREETYPE_MINOR 9 +#define FREETYPE_PATCH 1 + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Library_Version */ + /* */ + /* <Description> */ + /* Return the version of the FreeType library being used. This is */ + /* useful when dynamically linking to the library, since one cannot */ + /* use the macros @FREETYPE_MAJOR, @FREETYPE_MINOR, and */ + /* @FREETYPE_PATCH. */ + /* */ + /* <Input> */ + /* library :: A source library handle. */ + /* */ + /* <Output> */ + /* amajor :: The major version number. */ + /* */ + /* aminor :: The minor version number. */ + /* */ + /* apatch :: The patch version number. */ + /* */ + /* <Note> */ + /* The reason why this function takes a `library' argument is because */ + /* certain programs implement library initialization in a custom way */ + /* that doesn't use @FT_Init_FreeType. */ + /* */ + /* In such cases, the library version might not be available before */ + /* the library object has been created. */ + /* */ + FT_EXPORT( void ) + FT_Library_Version( FT_Library library, + FT_Int *amajor, + FT_Int *aminor, + FT_Int *apatch ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_CheckTrueTypePatents */ + /* */ + /* <Description> */ + /* Deprecated, does nothing. */ + /* */ + /* <Input> */ + /* face :: A face handle. */ + /* */ + /* <Return> */ + /* Always returns false. */ + /* */ + /* <Note> */ + /* Since May 2010, TrueType hinting is no longer patented. */ + /* */ + /* <Since> */ + /* 2.3.5 */ + /* */ + FT_EXPORT( FT_Bool ) + FT_Face_CheckTrueTypePatents( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_SetUnpatentedHinting */ + /* */ + /* <Description> */ + /* Deprecated, does nothing. */ + /* */ + /* <Input> */ + /* face :: A face handle. */ + /* */ + /* value :: New boolean setting. */ + /* */ + /* <Return> */ + /* Always returns false. */ + /* */ + /* <Note> */ + /* Since May 2010, TrueType hinting is no longer patented. */ + /* */ + /* <Since> */ + /* 2.3.5 */ + /* */ + FT_EXPORT( FT_Bool ) + FT_Face_SetUnpatentedHinting( FT_Face face, + FT_Bool value ); + + /* */ + + +FT_END_HEADER + +#endif /* FREETYPE_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftadvanc.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftadvanc.h new file mode 100755 index 00000000..f78e8b1a --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftadvanc.h @@ -0,0 +1,187 @@ +/***************************************************************************/ +/* */ +/* ftadvanc.h */ +/* */ +/* Quick computation of advance widths (specification only). */ +/* */ +/* Copyright 2008-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTADVANC_H_ +#define FTADVANC_H_ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /************************************************************************** + * + * @section: + * quick_advance + * + * @title: + * Quick retrieval of advance values + * + * @abstract: + * Retrieve horizontal and vertical advance values without processing + * glyph outlines, if possible. + * + * @description: + * This section contains functions to quickly extract advance values + * without handling glyph outlines, if possible. + * + * @order: + * FT_Get_Advance + * FT_Get_Advances + * + */ + + + /*************************************************************************/ + /* */ + /* <Const> */ + /* FT_ADVANCE_FLAG_FAST_ONLY */ + /* */ + /* <Description> */ + /* A bit-flag to be OR-ed with the `flags' parameter of the */ + /* @FT_Get_Advance and @FT_Get_Advances functions. */ + /* */ + /* If set, it indicates that you want these functions to fail if the */ + /* corresponding hinting mode or font driver doesn't allow for very */ + /* quick advance computation. */ + /* */ + /* Typically, glyphs that are either unscaled, unhinted, bitmapped, */ + /* or light-hinted can have their advance width computed very */ + /* quickly. */ + /* */ + /* Normal and bytecode hinted modes that require loading, scaling, */ + /* and hinting of the glyph outline, are extremely slow by */ + /* comparison. */ + /* */ +#define FT_ADVANCE_FLAG_FAST_ONLY 0x20000000L + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Advance */ + /* */ + /* <Description> */ + /* Retrieve the advance value of a given glyph outline in an */ + /* @FT_Face. */ + /* */ + /* <Input> */ + /* face :: The source @FT_Face handle. */ + /* */ + /* gindex :: The glyph index. */ + /* */ + /* load_flags :: A set of bit flags similar to those used when */ + /* calling @FT_Load_Glyph, used to determine what kind */ + /* of advances you need. */ + /* <Output> */ + /* padvance :: The advance value. If scaling is performed (based on */ + /* the value of `load_flags'), the advance value is in */ + /* 16.16 format. Otherwise, it is in font units. */ + /* */ + /* If @FT_LOAD_VERTICAL_LAYOUT is set, this is the */ + /* vertical advance corresponding to a vertical layout. */ + /* Otherwise, it is the horizontal advance in a */ + /* horizontal layout. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and */ + /* if the corresponding font backend doesn't have a quick way to */ + /* retrieve the advances. */ + /* */ + /* A scaled advance is returned in 16.16 format but isn't transformed */ + /* by the affine transformation specified by @FT_Set_Transform. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Advance( FT_Face face, + FT_UInt gindex, + FT_Int32 load_flags, + FT_Fixed *padvance ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Advances */ + /* */ + /* <Description> */ + /* Retrieve the advance values of several glyph outlines in an */ + /* @FT_Face. */ + /* */ + /* <Input> */ + /* face :: The source @FT_Face handle. */ + /* */ + /* start :: The first glyph index. */ + /* */ + /* count :: The number of advance values you want to retrieve. */ + /* */ + /* load_flags :: A set of bit flags similar to those used when */ + /* calling @FT_Load_Glyph. */ + /* */ + /* <Output> */ + /* padvance :: The advance values. This array, to be provided by the */ + /* caller, must contain at least `count' elements. */ + /* */ + /* If scaling is performed (based on the value of */ + /* `load_flags'), the advance values are in 16.16 format. */ + /* Otherwise, they are in font units. */ + /* */ + /* If @FT_LOAD_VERTICAL_LAYOUT is set, these are the */ + /* vertical advances corresponding to a vertical layout. */ + /* Otherwise, they are the horizontal advances in a */ + /* horizontal layout. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and */ + /* if the corresponding font backend doesn't have a quick way to */ + /* retrieve the advances. */ + /* */ + /* Scaled advances are returned in 16.16 format but aren't */ + /* transformed by the affine transformation specified by */ + /* @FT_Set_Transform. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Advances( FT_Face face, + FT_UInt start, + FT_UInt count, + FT_Int32 load_flags, + FT_Fixed *padvances ); + + /* */ + + +FT_END_HEADER + +#endif /* FTADVANC_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftbbox.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftbbox.h new file mode 100755 index 00000000..f9eb70b1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftbbox.h @@ -0,0 +1,101 @@ +/***************************************************************************/ +/* */ +/* ftbbox.h */ +/* */ +/* FreeType exact bbox computation (specification). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This component has a _single_ role: to compute exact outline bounding */ + /* boxes. */ + /* */ + /* It is separated from the rest of the engine for various technical */ + /* reasons. It may well be integrated in `ftoutln' later. */ + /* */ + /*************************************************************************/ + + +#ifndef FTBBOX_H_ +#define FTBBOX_H_ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* outline_processing */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Get_BBox */ + /* */ + /* <Description> */ + /* Compute the exact bounding box of an outline. This is slower */ + /* than computing the control box. However, it uses an advanced */ + /* algorithm that returns _very_ quickly when the two boxes */ + /* coincide. Otherwise, the outline Bezier arcs are traversed to */ + /* extract their extrema. */ + /* */ + /* <Input> */ + /* outline :: A pointer to the source outline. */ + /* */ + /* <Output> */ + /* abbox :: The outline's exact bounding box. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* If the font is tricky and the glyph has been loaded with */ + /* @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get */ + /* reasonable values for the BBox it is necessary to load the glyph */ + /* at a large ppem value (so that the hinting instructions can */ + /* properly shift and scale the subglyphs), then extracting the BBox, */ + /* which can be eventually converted back to font units. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Get_BBox( FT_Outline* outline, + FT_BBox *abbox ); + + /* */ + + +FT_END_HEADER + +#endif /* FTBBOX_H_ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftbdf.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftbdf.h new file mode 100755 index 00000000..1b6dea65 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftbdf.h @@ -0,0 +1,210 @@ +/***************************************************************************/ +/* */ +/* ftbdf.h */ +/* */ +/* FreeType API for accessing BDF-specific strings (specification). */ +/* */ +/* Copyright 2002-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTBDF_H_ +#define FTBDF_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* bdf_fonts */ + /* */ + /* <Title> */ + /* BDF and PCF Files */ + /* */ + /* <Abstract> */ + /* BDF and PCF specific API. */ + /* */ + /* <Description> */ + /* This section contains the declaration of functions specific to BDF */ + /* and PCF fonts. */ + /* */ + /*************************************************************************/ + + + /********************************************************************** + * + * @enum: + * BDF_PropertyType + * + * @description: + * A list of BDF property types. + * + * @values: + * BDF_PROPERTY_TYPE_NONE :: + * Value~0 is used to indicate a missing property. + * + * BDF_PROPERTY_TYPE_ATOM :: + * Property is a string atom. + * + * BDF_PROPERTY_TYPE_INTEGER :: + * Property is a 32-bit signed integer. + * + * BDF_PROPERTY_TYPE_CARDINAL :: + * Property is a 32-bit unsigned integer. + */ + typedef enum BDF_PropertyType_ + { + BDF_PROPERTY_TYPE_NONE = 0, + BDF_PROPERTY_TYPE_ATOM = 1, + BDF_PROPERTY_TYPE_INTEGER = 2, + BDF_PROPERTY_TYPE_CARDINAL = 3 + + } BDF_PropertyType; + + + /********************************************************************** + * + * @type: + * BDF_Property + * + * @description: + * A handle to a @BDF_PropertyRec structure to model a given + * BDF/PCF property. + */ + typedef struct BDF_PropertyRec_* BDF_Property; + + + /********************************************************************** + * + * @struct: + * BDF_PropertyRec + * + * @description: + * This structure models a given BDF/PCF property. + * + * @fields: + * type :: + * The property type. + * + * u.atom :: + * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM. May be + * NULL, indicating an empty string. + * + * u.integer :: + * A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER. + * + * u.cardinal :: + * An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL. + */ + typedef struct BDF_PropertyRec_ + { + BDF_PropertyType type; + union { + const char* atom; + FT_Int32 integer; + FT_UInt32 cardinal; + + } u; + + } BDF_PropertyRec; + + + /********************************************************************** + * + * @function: + * FT_Get_BDF_Charset_ID + * + * @description: + * Retrieve a BDF font character set identity, according to + * the BDF specification. + * + * @input: + * face :: + * A handle to the input face. + * + * @output: + * acharset_encoding :: + * Charset encoding, as a C~string, owned by the face. + * + * acharset_registry :: + * Charset registry, as a C~string, owned by the face. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with BDF faces, returning an error otherwise. + */ + FT_EXPORT( FT_Error ) + FT_Get_BDF_Charset_ID( FT_Face face, + const char* *acharset_encoding, + const char* *acharset_registry ); + + + /********************************************************************** + * + * @function: + * FT_Get_BDF_Property + * + * @description: + * Retrieve a BDF property from a BDF or PCF font file. + * + * @input: + * face :: A handle to the input face. + * + * name :: The property name. + * + * @output: + * aproperty :: The property. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function works with BDF _and_ PCF fonts. It returns an error + * otherwise. It also returns an error if the property is not in the + * font. + * + * A `property' is a either key-value pair within the STARTPROPERTIES + * ... ENDPROPERTIES block of a BDF font or a key-value pair from the + * `info->props' array within a `FontRec' structure of a PCF font. + * + * Integer properties are always stored as `signed' within PCF fonts; + * consequently, @BDF_PROPERTY_TYPE_CARDINAL is a possible return value + * for BDF fonts only. + * + * In case of error, `aproperty->type' is always set to + * @BDF_PROPERTY_TYPE_NONE. + */ + FT_EXPORT( FT_Error ) + FT_Get_BDF_Property( FT_Face face, + const char* prop_name, + BDF_PropertyRec *aproperty ); + + /* */ + +FT_END_HEADER + +#endif /* FTBDF_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftbitmap.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftbitmap.h new file mode 100755 index 00000000..a43187ca --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftbitmap.h @@ -0,0 +1,240 @@ +/***************************************************************************/ +/* */ +/* ftbitmap.h */ +/* */ +/* FreeType utility functions for bitmaps (specification). */ +/* */ +/* Copyright 2004-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTBITMAP_H_ +#define FTBITMAP_H_ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* bitmap_handling */ + /* */ + /* <Title> */ + /* Bitmap Handling */ + /* */ + /* <Abstract> */ + /* Handling FT_Bitmap objects. */ + /* */ + /* <Description> */ + /* This section contains functions for handling @FT_Bitmap objects. */ + /* Note that none of the functions changes the bitmap's `flow' (as */ + /* indicated by the sign of the `pitch' field in `FT_Bitmap'). */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_Init */ + /* */ + /* <Description> */ + /* Initialize a pointer to an @FT_Bitmap structure. */ + /* */ + /* <InOut> */ + /* abitmap :: A pointer to the bitmap structure. */ + /* */ + /* <Note> */ + /* A deprecated name for the same function is `FT_Bitmap_New'. */ + /* */ + FT_EXPORT( void ) + FT_Bitmap_Init( FT_Bitmap *abitmap ); + + + /* deprecated */ + FT_EXPORT( void ) + FT_Bitmap_New( FT_Bitmap *abitmap ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_Copy */ + /* */ + /* <Description> */ + /* Copy a bitmap into another one. */ + /* */ + /* <Input> */ + /* library :: A handle to a library object. */ + /* */ + /* source :: A handle to the source bitmap. */ + /* */ + /* <Output> */ + /* target :: A handle to the target bitmap. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Bitmap_Copy( FT_Library library, + const FT_Bitmap *source, + FT_Bitmap *target ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_Embolden */ + /* */ + /* <Description> */ + /* Embolden a bitmap. The new bitmap will be about `xStrength' */ + /* pixels wider and `yStrength' pixels higher. The left and bottom */ + /* borders are kept unchanged. */ + /* */ + /* <Input> */ + /* library :: A handle to a library object. */ + /* */ + /* xStrength :: How strong the glyph is emboldened horizontally. */ + /* Expressed in 26.6 pixel format. */ + /* */ + /* yStrength :: How strong the glyph is emboldened vertically. */ + /* Expressed in 26.6 pixel format. */ + /* */ + /* <InOut> */ + /* bitmap :: A handle to the target bitmap. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The current implementation restricts `xStrength' to be less than */ + /* or equal to~8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO. */ + /* */ + /* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */ + /* you should call @FT_GlyphSlot_Own_Bitmap on the slot first. */ + /* */ + /* Bitmaps in @FT_PIXEL_MODE_GRAY2 and @FT_PIXEL_MODE_GRAY@ format */ + /* are converted to @FT_PIXEL_MODE_GRAY format (i.e., 8bpp). */ + /* */ + FT_EXPORT( FT_Error ) + FT_Bitmap_Embolden( FT_Library library, + FT_Bitmap* bitmap, + FT_Pos xStrength, + FT_Pos yStrength ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_Convert */ + /* */ + /* <Description> */ + /* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp */ + /* to a bitmap object with depth 8bpp, making the number of used */ + /* bytes line (a.k.a. the `pitch') a multiple of `alignment'. */ + /* */ + /* <Input> */ + /* library :: A handle to a library object. */ + /* */ + /* source :: The source bitmap. */ + /* */ + /* alignment :: The pitch of the bitmap is a multiple of this */ + /* parameter. Common values are 1, 2, or 4. */ + /* */ + /* <Output> */ + /* target :: The target bitmap. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* It is possible to call @FT_Bitmap_Convert multiple times without */ + /* calling @FT_Bitmap_Done (the memory is simply reallocated). */ + /* */ + /* Use @FT_Bitmap_Done to finally remove the bitmap object. */ + /* */ + /* The `library' argument is taken to have access to FreeType's */ + /* memory handling functions. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Bitmap_Convert( FT_Library library, + const FT_Bitmap *source, + FT_Bitmap *target, + FT_Int alignment ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_GlyphSlot_Own_Bitmap */ + /* */ + /* <Description> */ + /* Make sure that a glyph slot owns `slot->bitmap'. */ + /* */ + /* <Input> */ + /* slot :: The glyph slot. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function is to be used in combination with */ + /* @FT_Bitmap_Embolden. */ + /* */ + FT_EXPORT( FT_Error ) + FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot slot ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_Done */ + /* */ + /* <Description> */ + /* Destroy a bitmap object initialized with @FT_Bitmap_Init. */ + /* */ + /* <Input> */ + /* library :: A handle to a library object. */ + /* */ + /* bitmap :: The bitmap object to be freed. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The `library' argument is taken to have access to FreeType's */ + /* memory handling functions. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Bitmap_Done( FT_Library library, + FT_Bitmap *bitmap ); + + + /* */ + + +FT_END_HEADER + +#endif /* FTBITMAP_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftbzip2.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftbzip2.h new file mode 100755 index 00000000..6edfa031 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftbzip2.h @@ -0,0 +1,102 @@ +/***************************************************************************/ +/* */ +/* ftbzip2.h */ +/* */ +/* Bzip2-compressed stream support. */ +/* */ +/* Copyright 2010-2018 by */ +/* Joel Klinghed. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTBZIP2_H_ +#define FTBZIP2_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* <Section> */ + /* bzip2 */ + /* */ + /* <Title> */ + /* BZIP2 Streams */ + /* */ + /* <Abstract> */ + /* Using bzip2-compressed font files. */ + /* */ + /* <Description> */ + /* This section contains the declaration of Bzip2-specific functions. */ + /* */ + /*************************************************************************/ + + + /************************************************************************ + * + * @function: + * FT_Stream_OpenBzip2 + * + * @description: + * Open a new stream to parse bzip2-compressed font files. This is + * mainly used to support the compressed `*.pcf.bz2' fonts that come + * with XFree86. + * + * @input: + * stream :: + * The target embedding stream. + * + * source :: + * The source stream. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source stream must be opened _before_ calling this function. + * + * Calling the internal function `FT_Stream_Close' on the new stream will + * *not* call `FT_Stream_Close' on the source stream. None of the stream + * objects will be released to the heap. + * + * The stream implementation is very basic and resets the decompression + * process each time seeking backwards is needed within the stream. + * + * In certain builds of the library, bzip2 compression recognition is + * automatically handled when calling @FT_New_Face or @FT_Open_Face. + * This means that if no font driver is capable of handling the raw + * compressed file, the library will try to open a bzip2 compressed stream + * from it and re-open the face with it. + * + * This function may return `FT_Err_Unimplemented_Feature' if your build + * of FreeType was not compiled with bzip2 support. + */ + FT_EXPORT( FT_Error ) + FT_Stream_OpenBzip2( FT_Stream stream, + FT_Stream source ); + + /* */ + + +FT_END_HEADER + +#endif /* FTBZIP2_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftcache.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftcache.h new file mode 100755 index 00000000..52d5f00e --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftcache.h @@ -0,0 +1,1042 @@ +/***************************************************************************/ +/* */ +/* ftcache.h */ +/* */ +/* FreeType Cache subsystem (specification). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTCACHE_H_ +#define FTCACHE_H_ + + +#include <ft2build.h> +#include FT_GLYPH_H + + +FT_BEGIN_HEADER + + + /************************************************************************* + * + * <Section> + * cache_subsystem + * + * <Title> + * Cache Sub-System + * + * <Abstract> + * How to cache face, size, and glyph data with FreeType~2. + * + * <Description> + * This section describes the FreeType~2 cache sub-system, which is used + * to limit the number of concurrently opened @FT_Face and @FT_Size + * objects, as well as caching information like character maps and glyph + * images while limiting their maximum memory usage. + * + * Note that all types and functions begin with the `FTC_' prefix. + * + * The cache is highly portable and thus doesn't know anything about the + * fonts installed on your system, or how to access them. This implies + * the following scheme: + * + * First, available or installed font faces are uniquely identified by + * @FTC_FaceID values, provided to the cache by the client. Note that + * the cache only stores and compares these values, and doesn't try to + * interpret them in any way. + * + * Second, the cache calls, only when needed, a client-provided function + * to convert an @FTC_FaceID into a new @FT_Face object. The latter is + * then completely managed by the cache, including its termination + * through @FT_Done_Face. To monitor termination of face objects, the + * finalizer callback in the `generic' field of the @FT_Face object can + * be used, which might also be used to store the @FTC_FaceID of the + * face. + * + * Clients are free to map face IDs to anything else. The most simple + * usage is to associate them to a (pathname,face_index) pair that is + * used to call @FT_New_Face. However, more complex schemes are also + * possible. + * + * Note that for the cache to work correctly, the face ID values must be + * *persistent*, which means that the contents they point to should not + * change at runtime, or that their value should not become invalid. + * + * If this is unavoidable (e.g., when a font is uninstalled at runtime), + * you should call @FTC_Manager_RemoveFaceID as soon as possible, to let + * the cache get rid of any references to the old @FTC_FaceID it may + * keep internally. Failure to do so will lead to incorrect behaviour + * or even crashes. + * + * To use the cache, start with calling @FTC_Manager_New to create a new + * @FTC_Manager object, which models a single cache instance. You can + * then look up @FT_Face and @FT_Size objects with + * @FTC_Manager_LookupFace and @FTC_Manager_LookupSize, respectively. + * + * If you want to use the charmap caching, call @FTC_CMapCache_New, then + * later use @FTC_CMapCache_Lookup to perform the equivalent of + * @FT_Get_Char_Index, only much faster. + * + * If you want to use the @FT_Glyph caching, call @FTC_ImageCache, then + * later use @FTC_ImageCache_Lookup to retrieve the corresponding + * @FT_Glyph objects from the cache. + * + * If you need lots of small bitmaps, it is much more memory efficient + * to call @FTC_SBitCache_New followed by @FTC_SBitCache_Lookup. This + * returns @FTC_SBitRec structures, which are used to store small + * bitmaps directly. (A small bitmap is one whose metrics and + * dimensions all fit into 8-bit integers). + * + * We hope to also provide a kerning cache in the near future. + * + * + * <Order> + * FTC_Manager + * FTC_FaceID + * FTC_Face_Requester + * + * FTC_Manager_New + * FTC_Manager_Reset + * FTC_Manager_Done + * FTC_Manager_LookupFace + * FTC_Manager_LookupSize + * FTC_Manager_RemoveFaceID + * + * FTC_Node + * FTC_Node_Unref + * + * FTC_ImageCache + * FTC_ImageCache_New + * FTC_ImageCache_Lookup + * + * FTC_SBit + * FTC_SBitCache + * FTC_SBitCache_New + * FTC_SBitCache_Lookup + * + * FTC_CMapCache + * FTC_CMapCache_New + * FTC_CMapCache_Lookup + * + *************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** BASIC TYPE DEFINITIONS *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /************************************************************************* + * + * @type: FTC_FaceID + * + * @description: + * An opaque pointer type that is used to identity face objects. The + * contents of such objects is application-dependent. + * + * These pointers are typically used to point to a user-defined + * structure containing a font file path, and face index. + * + * @note: + * Never use NULL as a valid @FTC_FaceID. + * + * Face IDs are passed by the client to the cache manager that calls, + * when needed, the @FTC_Face_Requester to translate them into new + * @FT_Face objects. + * + * If the content of a given face ID changes at runtime, or if the value + * becomes invalid (e.g., when uninstalling a font), you should + * immediately call @FTC_Manager_RemoveFaceID before any other cache + * function. + * + * Failure to do so will result in incorrect behaviour or even + * memory leaks and crashes. + */ + typedef FT_Pointer FTC_FaceID; + + + /************************************************************************ + * + * @functype: + * FTC_Face_Requester + * + * @description: + * A callback function provided by client applications. It is used by + * the cache manager to translate a given @FTC_FaceID into a new valid + * @FT_Face object, on demand. + * + * <Input> + * face_id :: + * The face ID to resolve. + * + * library :: + * A handle to a FreeType library object. + * + * req_data :: + * Application-provided request data (see note below). + * + * <Output> + * aface :: + * A new @FT_Face handle. + * + * <Return> + * FreeType error code. 0~means success. + * + * <Note> + * The third parameter `req_data' is the same as the one passed by the + * client when @FTC_Manager_New is called. + * + * The face requester should not perform funny things on the returned + * face object, like creating a new @FT_Size for it, or setting a + * transformation through @FT_Set_Transform! + */ + typedef FT_Error + (*FTC_Face_Requester)( FTC_FaceID face_id, + FT_Library library, + FT_Pointer req_data, + FT_Face* aface ); + + /* */ + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** CACHE MANAGER OBJECT *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_Manager */ + /* */ + /* <Description> */ + /* This object corresponds to one instance of the cache-subsystem. */ + /* It is used to cache one or more @FT_Face objects, along with */ + /* corresponding @FT_Size objects. */ + /* */ + /* The manager intentionally limits the total number of opened */ + /* @FT_Face and @FT_Size objects to control memory usage. See the */ + /* `max_faces' and `max_sizes' parameters of @FTC_Manager_New. */ + /* */ + /* The manager is also used to cache `nodes' of various types while */ + /* limiting their total memory usage. */ + /* */ + /* All limitations are enforced by keeping lists of managed objects */ + /* in most-recently-used order, and flushing old nodes to make room */ + /* for new ones. */ + /* */ + typedef struct FTC_ManagerRec_* FTC_Manager; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_Node */ + /* */ + /* <Description> */ + /* An opaque handle to a cache node object. Each cache node is */ + /* reference-counted. A node with a count of~0 might be flushed */ + /* out of a full cache whenever a lookup request is performed. */ + /* */ + /* If you look up nodes, you have the ability to `acquire' them, */ + /* i.e., to increment their reference count. This will prevent the */ + /* node from being flushed out of the cache until you explicitly */ + /* `release' it (see @FTC_Node_Unref). */ + /* */ + /* See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup. */ + /* */ + typedef struct FTC_NodeRec_* FTC_Node; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_New */ + /* */ + /* <Description> */ + /* Create a new cache manager. */ + /* */ + /* <Input> */ + /* library :: The parent FreeType library handle to use. */ + /* */ + /* max_faces :: Maximum number of opened @FT_Face objects managed by */ + /* this cache instance. Use~0 for defaults. */ + /* */ + /* max_sizes :: Maximum number of opened @FT_Size objects managed by */ + /* this cache instance. Use~0 for defaults. */ + /* */ + /* max_bytes :: Maximum number of bytes to use for cached data nodes. */ + /* Use~0 for defaults. Note that this value does not */ + /* account for managed @FT_Face and @FT_Size objects. */ + /* */ + /* requester :: An application-provided callback used to translate */ + /* face IDs into real @FT_Face objects. */ + /* */ + /* req_data :: A generic pointer that is passed to the requester */ + /* each time it is called (see @FTC_Face_Requester). */ + /* */ + /* <Output> */ + /* amanager :: A handle to a new manager object. 0~in case of */ + /* failure. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_Manager_New( FT_Library library, + FT_UInt max_faces, + FT_UInt max_sizes, + FT_ULong max_bytes, + FTC_Face_Requester requester, + FT_Pointer req_data, + FTC_Manager *amanager ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_Reset */ + /* */ + /* <Description> */ + /* Empty a given cache manager. This simply gets rid of all the */ + /* currently cached @FT_Face and @FT_Size objects within the manager. */ + /* */ + /* <InOut> */ + /* manager :: A handle to the manager. */ + /* */ + FT_EXPORT( void ) + FTC_Manager_Reset( FTC_Manager manager ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_Done */ + /* */ + /* <Description> */ + /* Destroy a given manager after emptying it. */ + /* */ + /* <Input> */ + /* manager :: A handle to the target cache manager object. */ + /* */ + FT_EXPORT( void ) + FTC_Manager_Done( FTC_Manager manager ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_LookupFace */ + /* */ + /* <Description> */ + /* Retrieve the @FT_Face object that corresponds to a given face ID */ + /* through a cache manager. */ + /* */ + /* <Input> */ + /* manager :: A handle to the cache manager. */ + /* */ + /* face_id :: The ID of the face object. */ + /* */ + /* <Output> */ + /* aface :: A handle to the face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The returned @FT_Face object is always owned by the manager. You */ + /* should never try to discard it yourself. */ + /* */ + /* The @FT_Face object doesn't necessarily have a current size object */ + /* (i.e., face->size can be~0). If you need a specific `font size', */ + /* use @FTC_Manager_LookupSize instead. */ + /* */ + /* Never change the face's transformation matrix (i.e., never call */ + /* the @FT_Set_Transform function) on a returned face! If you need */ + /* to transform glyphs, do it yourself after glyph loading. */ + /* */ + /* When you perform a lookup, out-of-memory errors are detected */ + /* _within_ the lookup and force incremental flushes of the cache */ + /* until enough memory is released for the lookup to succeed. */ + /* */ + /* If a lookup fails with `FT_Err_Out_Of_Memory' the cache has */ + /* already been completely flushed, and still no memory was available */ + /* for the operation. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_Manager_LookupFace( FTC_Manager manager, + FTC_FaceID face_id, + FT_Face *aface ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FTC_ScalerRec */ + /* */ + /* <Description> */ + /* A structure used to describe a given character size in either */ + /* pixels or points to the cache manager. See */ + /* @FTC_Manager_LookupSize. */ + /* */ + /* <Fields> */ + /* face_id :: The source face ID. */ + /* */ + /* width :: The character width. */ + /* */ + /* height :: The character height. */ + /* */ + /* pixel :: A Boolean. If 1, the `width' and `height' fields are */ + /* interpreted as integer pixel character sizes. */ + /* Otherwise, they are expressed as 1/64th of points. */ + /* */ + /* x_res :: Only used when `pixel' is value~0 to indicate the */ + /* horizontal resolution in dpi. */ + /* */ + /* y_res :: Only used when `pixel' is value~0 to indicate the */ + /* vertical resolution in dpi. */ + /* */ + /* <Note> */ + /* This type is mainly used to retrieve @FT_Size objects through the */ + /* cache manager. */ + /* */ + typedef struct FTC_ScalerRec_ + { + FTC_FaceID face_id; + FT_UInt width; + FT_UInt height; + FT_Int pixel; + FT_UInt x_res; + FT_UInt y_res; + + } FTC_ScalerRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FTC_Scaler */ + /* */ + /* <Description> */ + /* A handle to an @FTC_ScalerRec structure. */ + /* */ + typedef struct FTC_ScalerRec_* FTC_Scaler; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_LookupSize */ + /* */ + /* <Description> */ + /* Retrieve the @FT_Size object that corresponds to a given */ + /* @FTC_ScalerRec pointer through a cache manager. */ + /* */ + /* <Input> */ + /* manager :: A handle to the cache manager. */ + /* */ + /* scaler :: A scaler handle. */ + /* */ + /* <Output> */ + /* asize :: A handle to the size object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The returned @FT_Size object is always owned by the manager. You */ + /* should never try to discard it by yourself. */ + /* */ + /* You can access the parent @FT_Face object simply as `size->face' */ + /* if you need it. Note that this object is also owned by the */ + /* manager. */ + /* */ + /* <Note> */ + /* When you perform a lookup, out-of-memory errors are detected */ + /* _within_ the lookup and force incremental flushes of the cache */ + /* until enough memory is released for the lookup to succeed. */ + /* */ + /* If a lookup fails with `FT_Err_Out_Of_Memory' the cache has */ + /* already been completely flushed, and still no memory is available */ + /* for the operation. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_Manager_LookupSize( FTC_Manager manager, + FTC_Scaler scaler, + FT_Size *asize ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Node_Unref */ + /* */ + /* <Description> */ + /* Decrement a cache node's internal reference count. When the count */ + /* reaches 0, it is not destroyed but becomes eligible for subsequent */ + /* cache flushes. */ + /* */ + /* <Input> */ + /* node :: The cache node handle. */ + /* */ + /* manager :: The cache manager handle. */ + /* */ + FT_EXPORT( void ) + FTC_Node_Unref( FTC_Node node, + FTC_Manager manager ); + + + /************************************************************************* + * + * @function: + * FTC_Manager_RemoveFaceID + * + * @description: + * A special function used to indicate to the cache manager that + * a given @FTC_FaceID is no longer valid, either because its + * content changed, or because it was deallocated or uninstalled. + * + * @input: + * manager :: + * The cache manager handle. + * + * face_id :: + * The @FTC_FaceID to be removed. + * + * @note: + * This function flushes all nodes from the cache corresponding to this + * `face_id', with the exception of nodes with a non-null reference + * count. + * + * Such nodes are however modified internally so as to never appear + * in later lookups with the same `face_id' value, and to be immediately + * destroyed when released by all their users. + * + */ + FT_EXPORT( void ) + FTC_Manager_RemoveFaceID( FTC_Manager manager, + FTC_FaceID face_id ); + + + /************************************************************************* + * + * @type: + * FTC_CMapCache + * + * @description: + * An opaque handle used to model a charmap cache. This cache is to + * hold character codes -> glyph indices mappings. + * + */ + typedef struct FTC_CMapCacheRec_* FTC_CMapCache; + + + /************************************************************************* + * + * @function: + * FTC_CMapCache_New + * + * @description: + * Create a new charmap cache. + * + * @input: + * manager :: + * A handle to the cache manager. + * + * @output: + * acache :: + * A new cache handle. NULL in case of error. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * Like all other caches, this one will be destroyed with the cache + * manager. + * + */ + FT_EXPORT( FT_Error ) + FTC_CMapCache_New( FTC_Manager manager, + FTC_CMapCache *acache ); + + + /************************************************************************ + * + * @function: + * FTC_CMapCache_Lookup + * + * @description: + * Translate a character code into a glyph index, using the charmap + * cache. + * + * @input: + * cache :: + * A charmap cache handle. + * + * face_id :: + * The source face ID. + * + * cmap_index :: + * The index of the charmap in the source face. Any negative value + * means to use the cache @FT_Face's default charmap. + * + * char_code :: + * The character code (in the corresponding charmap). + * + * @return: + * Glyph index. 0~means `no glyph'. + * + */ + FT_EXPORT( FT_UInt ) + FTC_CMapCache_Lookup( FTC_CMapCache cache, + FTC_FaceID face_id, + FT_Int cmap_index, + FT_UInt32 char_code ); + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** IMAGE CACHE OBJECT *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /************************************************************************* + * + * @struct: + * FTC_ImageTypeRec + * + * @description: + * A structure used to model the type of images in a glyph cache. + * + * @fields: + * face_id :: + * The face ID. + * + * width :: + * The width in pixels. + * + * height :: + * The height in pixels. + * + * flags :: + * The load flags, as in @FT_Load_Glyph. + * + */ + typedef struct FTC_ImageTypeRec_ + { + FTC_FaceID face_id; + FT_UInt width; + FT_UInt height; + FT_Int32 flags; + + } FTC_ImageTypeRec; + + + /************************************************************************* + * + * @type: + * FTC_ImageType + * + * @description: + * A handle to an @FTC_ImageTypeRec structure. + * + */ + typedef struct FTC_ImageTypeRec_* FTC_ImageType; + + + /* */ + + +#define FTC_IMAGE_TYPE_COMPARE( d1, d2 ) \ + ( (d1)->face_id == (d2)->face_id && \ + (d1)->width == (d2)->width && \ + (d1)->flags == (d2)->flags ) + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_ImageCache */ + /* */ + /* <Description> */ + /* A handle to a glyph image cache object. They are designed to */ + /* hold many distinct glyph images while not exceeding a certain */ + /* memory threshold. */ + /* */ + typedef struct FTC_ImageCacheRec_* FTC_ImageCache; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_ImageCache_New */ + /* */ + /* <Description> */ + /* Create a new glyph image cache. */ + /* */ + /* <Input> */ + /* manager :: The parent manager for the image cache. */ + /* */ + /* <Output> */ + /* acache :: A handle to the new glyph image cache object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_ImageCache_New( FTC_Manager manager, + FTC_ImageCache *acache ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_ImageCache_Lookup */ + /* */ + /* <Description> */ + /* Retrieve a given glyph image from a glyph image cache. */ + /* */ + /* <Input> */ + /* cache :: A handle to the source glyph image cache. */ + /* */ + /* type :: A pointer to a glyph image type descriptor. */ + /* */ + /* gindex :: The glyph index to retrieve. */ + /* */ + /* <Output> */ + /* aglyph :: The corresponding @FT_Glyph object. 0~in case of */ + /* failure. */ + /* */ + /* anode :: Used to return the address of the corresponding cache */ + /* node after incrementing its reference count (see note */ + /* below). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The returned glyph is owned and managed by the glyph image cache. */ + /* Never try to transform or discard it manually! You can however */ + /* create a copy with @FT_Glyph_Copy and modify the new one. */ + /* */ + /* If `anode' is _not_ NULL, it receives the address of the cache */ + /* node containing the glyph image, after increasing its reference */ + /* count. This ensures that the node (as well as the @FT_Glyph) will */ + /* always be kept in the cache until you call @FTC_Node_Unref to */ + /* `release' it. */ + /* */ + /* If `anode' is NULL, the cache node is left unchanged, which means */ + /* that the @FT_Glyph could be flushed out of the cache on the next */ + /* call to one of the caching sub-system APIs. Don't assume that it */ + /* is persistent! */ + /* */ + FT_EXPORT( FT_Error ) + FTC_ImageCache_Lookup( FTC_ImageCache cache, + FTC_ImageType type, + FT_UInt gindex, + FT_Glyph *aglyph, + FTC_Node *anode ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_ImageCache_LookupScaler */ + /* */ + /* <Description> */ + /* A variant of @FTC_ImageCache_Lookup that uses an @FTC_ScalerRec */ + /* to specify the face ID and its size. */ + /* */ + /* <Input> */ + /* cache :: A handle to the source glyph image cache. */ + /* */ + /* scaler :: A pointer to a scaler descriptor. */ + /* */ + /* load_flags :: The corresponding load flags. */ + /* */ + /* gindex :: The glyph index to retrieve. */ + /* */ + /* <Output> */ + /* aglyph :: The corresponding @FT_Glyph object. 0~in case of */ + /* failure. */ + /* */ + /* anode :: Used to return the address of the corresponding */ + /* cache node after incrementing its reference count */ + /* (see note below). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The returned glyph is owned and managed by the glyph image cache. */ + /* Never try to transform or discard it manually! You can however */ + /* create a copy with @FT_Glyph_Copy and modify the new one. */ + /* */ + /* If `anode' is _not_ NULL, it receives the address of the cache */ + /* node containing the glyph image, after increasing its reference */ + /* count. This ensures that the node (as well as the @FT_Glyph) will */ + /* always be kept in the cache until you call @FTC_Node_Unref to */ + /* `release' it. */ + /* */ + /* If `anode' is NULL, the cache node is left unchanged, which means */ + /* that the @FT_Glyph could be flushed out of the cache on the next */ + /* call to one of the caching sub-system APIs. Don't assume that it */ + /* is persistent! */ + /* */ + /* Calls to @FT_Set_Char_Size and friends have no effect on cached */ + /* glyphs; you should always use the FreeType cache API instead. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_ImageCache_LookupScaler( FTC_ImageCache cache, + FTC_Scaler scaler, + FT_ULong load_flags, + FT_UInt gindex, + FT_Glyph *aglyph, + FTC_Node *anode ); + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_SBit */ + /* */ + /* <Description> */ + /* A handle to a small bitmap descriptor. See the @FTC_SBitRec */ + /* structure for details. */ + /* */ + typedef struct FTC_SBitRec_* FTC_SBit; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FTC_SBitRec */ + /* */ + /* <Description> */ + /* A very compact structure used to describe a small glyph bitmap. */ + /* */ + /* <Fields> */ + /* width :: The bitmap width in pixels. */ + /* */ + /* height :: The bitmap height in pixels. */ + /* */ + /* left :: The horizontal distance from the pen position to the */ + /* left bitmap border (a.k.a. `left side bearing', or */ + /* `lsb'). */ + /* */ + /* top :: The vertical distance from the pen position (on the */ + /* baseline) to the upper bitmap border (a.k.a. `top */ + /* side bearing'). The distance is positive for upwards */ + /* y~coordinates. */ + /* */ + /* format :: The format of the glyph bitmap (monochrome or gray). */ + /* */ + /* max_grays :: Maximum gray level value (in the range 1 to~255). */ + /* */ + /* pitch :: The number of bytes per bitmap line. May be positive */ + /* or negative. */ + /* */ + /* xadvance :: The horizontal advance width in pixels. */ + /* */ + /* yadvance :: The vertical advance height in pixels. */ + /* */ + /* buffer :: A pointer to the bitmap pixels. */ + /* */ + typedef struct FTC_SBitRec_ + { + FT_Byte width; + FT_Byte height; + FT_Char left; + FT_Char top; + + FT_Byte format; + FT_Byte max_grays; + FT_Short pitch; + FT_Char xadvance; + FT_Char yadvance; + + FT_Byte* buffer; + + } FTC_SBitRec; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_SBitCache */ + /* */ + /* <Description> */ + /* A handle to a small bitmap cache. These are special cache objects */ + /* used to store small glyph bitmaps (and anti-aliased pixmaps) in a */ + /* much more efficient way than the traditional glyph image cache */ + /* implemented by @FTC_ImageCache. */ + /* */ + typedef struct FTC_SBitCacheRec_* FTC_SBitCache; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_SBitCache_New */ + /* */ + /* <Description> */ + /* Create a new cache to store small glyph bitmaps. */ + /* */ + /* <Input> */ + /* manager :: A handle to the source cache manager. */ + /* */ + /* <Output> */ + /* acache :: A handle to the new sbit cache. NULL in case of error. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_SBitCache_New( FTC_Manager manager, + FTC_SBitCache *acache ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_SBitCache_Lookup */ + /* */ + /* <Description> */ + /* Look up a given small glyph bitmap in a given sbit cache and */ + /* `lock' it to prevent its flushing from the cache until needed. */ + /* */ + /* <Input> */ + /* cache :: A handle to the source sbit cache. */ + /* */ + /* type :: A pointer to the glyph image type descriptor. */ + /* */ + /* gindex :: The glyph index. */ + /* */ + /* <Output> */ + /* sbit :: A handle to a small bitmap descriptor. */ + /* */ + /* anode :: Used to return the address of the corresponding cache */ + /* node after incrementing its reference count (see note */ + /* below). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The small bitmap descriptor and its bit buffer are owned by the */ + /* cache and should never be freed by the application. They might */ + /* as well disappear from memory on the next cache lookup, so don't */ + /* treat them as persistent data. */ + /* */ + /* The descriptor's `buffer' field is set to~0 to indicate a missing */ + /* glyph bitmap. */ + /* */ + /* If `anode' is _not_ NULL, it receives the address of the cache */ + /* node containing the bitmap, after increasing its reference count. */ + /* This ensures that the node (as well as the image) will always be */ + /* kept in the cache until you call @FTC_Node_Unref to `release' it. */ + /* */ + /* If `anode' is NULL, the cache node is left unchanged, which means */ + /* that the bitmap could be flushed out of the cache on the next */ + /* call to one of the caching sub-system APIs. Don't assume that it */ + /* is persistent! */ + /* */ + FT_EXPORT( FT_Error ) + FTC_SBitCache_Lookup( FTC_SBitCache cache, + FTC_ImageType type, + FT_UInt gindex, + FTC_SBit *sbit, + FTC_Node *anode ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_SBitCache_LookupScaler */ + /* */ + /* <Description> */ + /* A variant of @FTC_SBitCache_Lookup that uses an @FTC_ScalerRec */ + /* to specify the face ID and its size. */ + /* */ + /* <Input> */ + /* cache :: A handle to the source sbit cache. */ + /* */ + /* scaler :: A pointer to the scaler descriptor. */ + /* */ + /* load_flags :: The corresponding load flags. */ + /* */ + /* gindex :: The glyph index. */ + /* */ + /* <Output> */ + /* sbit :: A handle to a small bitmap descriptor. */ + /* */ + /* anode :: Used to return the address of the corresponding */ + /* cache node after incrementing its reference count */ + /* (see note below). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The small bitmap descriptor and its bit buffer are owned by the */ + /* cache and should never be freed by the application. They might */ + /* as well disappear from memory on the next cache lookup, so don't */ + /* treat them as persistent data. */ + /* */ + /* The descriptor's `buffer' field is set to~0 to indicate a missing */ + /* glyph bitmap. */ + /* */ + /* If `anode' is _not_ NULL, it receives the address of the cache */ + /* node containing the bitmap, after increasing its reference count. */ + /* This ensures that the node (as well as the image) will always be */ + /* kept in the cache until you call @FTC_Node_Unref to `release' it. */ + /* */ + /* If `anode' is NULL, the cache node is left unchanged, which means */ + /* that the bitmap could be flushed out of the cache on the next */ + /* call to one of the caching sub-system APIs. Don't assume that it */ + /* is persistent! */ + /* */ + FT_EXPORT( FT_Error ) + FTC_SBitCache_LookupScaler( FTC_SBitCache cache, + FTC_Scaler scaler, + FT_ULong load_flags, + FT_UInt gindex, + FTC_SBit *sbit, + FTC_Node *anode ); + + /* */ + + +FT_END_HEADER + +#endif /* FTCACHE_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftchapters.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftchapters.h new file mode 100755 index 00000000..51257bb7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftchapters.h @@ -0,0 +1,139 @@ +/***************************************************************************/ +/* */ +/* This file defines the structure of the FreeType reference. */ +/* It is used by the python script that generates the HTML files. */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* general_remarks */ +/* */ +/* <Title> */ +/* General Remarks */ +/* */ +/* <Sections> */ +/* header_inclusion */ +/* user_allocation */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* core_api */ +/* */ +/* <Title> */ +/* Core API */ +/* */ +/* <Sections> */ +/* version */ +/* basic_types */ +/* base_interface */ +/* glyph_variants */ +/* glyph_management */ +/* mac_specific */ +/* sizes_management */ +/* header_file_macros */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* format_specific */ +/* */ +/* <Title> */ +/* Format-Specific API */ +/* */ +/* <Sections> */ +/* multiple_masters */ +/* truetype_tables */ +/* type1_tables */ +/* sfnt_names */ +/* bdf_fonts */ +/* cid_fonts */ +/* pfr_fonts */ +/* winfnt_fonts */ +/* font_formats */ +/* gasp_table */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* module_specific */ +/* */ +/* <Title> */ +/* Controlling FreeType Modules */ +/* */ +/* <Sections> */ +/* auto_hinter */ +/* cff_driver */ +/* t1_cid_driver */ +/* tt_driver */ +/* pcf_driver */ +/* properties */ +/* parameter_tags */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* cache_subsystem */ +/* */ +/* <Title> */ +/* Cache Sub-System */ +/* */ +/* <Sections> */ +/* cache_subsystem */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* support_api */ +/* */ +/* <Title> */ +/* Support API */ +/* */ +/* <Sections> */ +/* computations */ +/* list_processing */ +/* outline_processing */ +/* quick_advance */ +/* bitmap_handling */ +/* raster */ +/* glyph_stroker */ +/* system_interface */ +/* module_management */ +/* gzip */ +/* lzw */ +/* bzip2 */ +/* lcd_filtering */ +/* */ +/***************************************************************************/ + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* error_codes */ +/* */ +/* <Title> */ +/* Error Codes */ +/* */ +/* <Sections> */ +/* error_enumerations */ +/* error_code_values */ +/* */ +/***************************************************************************/ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftcid.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftcid.h new file mode 100755 index 00000000..5e9100a6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftcid.h @@ -0,0 +1,168 @@ +/***************************************************************************/ +/* */ +/* ftcid.h */ +/* */ +/* FreeType API for accessing CID font information (specification). */ +/* */ +/* Copyright 2007-2018 by */ +/* Dereg Clegg and Michael Toftdal. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTCID_H_ +#define FTCID_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* cid_fonts */ + /* */ + /* <Title> */ + /* CID Fonts */ + /* */ + /* <Abstract> */ + /* CID-keyed font specific API. */ + /* */ + /* <Description> */ + /* This section contains the declaration of CID-keyed font specific */ + /* functions. */ + /* */ + /*************************************************************************/ + + + /********************************************************************** + * + * @function: + * FT_Get_CID_Registry_Ordering_Supplement + * + * @description: + * Retrieve the Registry/Ordering/Supplement triple (also known as the + * "R/O/S") from a CID-keyed font. + * + * @input: + * face :: + * A handle to the input face. + * + * @output: + * registry :: + * The registry, as a C~string, owned by the face. + * + * ordering :: + * The ordering, as a C~string, owned by the face. + * + * supplement :: + * The supplement. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with CID faces, returning an error + * otherwise. + * + * @since: + * 2.3.6 + */ + FT_EXPORT( FT_Error ) + FT_Get_CID_Registry_Ordering_Supplement( FT_Face face, + const char* *registry, + const char* *ordering, + FT_Int *supplement ); + + + /********************************************************************** + * + * @function: + * FT_Get_CID_Is_Internally_CID_Keyed + * + * @description: + * Retrieve the type of the input face, CID keyed or not. In + * contrast to the @FT_IS_CID_KEYED macro this function returns + * successfully also for CID-keyed fonts in an SFNT wrapper. + * + * @input: + * face :: + * A handle to the input face. + * + * @output: + * is_cid :: + * The type of the face as an @FT_Bool. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with CID faces and OpenType fonts, + * returning an error otherwise. + * + * @since: + * 2.3.9 + */ + FT_EXPORT( FT_Error ) + FT_Get_CID_Is_Internally_CID_Keyed( FT_Face face, + FT_Bool *is_cid ); + + + /********************************************************************** + * + * @function: + * FT_Get_CID_From_Glyph_Index + * + * @description: + * Retrieve the CID of the input glyph index. + * + * @input: + * face :: + * A handle to the input face. + * + * glyph_index :: + * The input glyph index. + * + * @output: + * cid :: + * The CID as an @FT_UInt. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with CID faces and OpenType fonts, + * returning an error otherwise. + * + * @since: + * 2.3.9 + */ + FT_EXPORT( FT_Error ) + FT_Get_CID_From_Glyph_Index( FT_Face face, + FT_UInt glyph_index, + FT_UInt *cid ); + + /* */ + + +FT_END_HEADER + +#endif /* FTCID_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftdriver.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftdriver.h new file mode 100755 index 00000000..e90475b2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftdriver.h @@ -0,0 +1,1225 @@ +/***************************************************************************/ +/* */ +/* ftdriver.h */ +/* */ +/* FreeType API for controlling driver modules (specification only). */ +/* */ +/* Copyright 2017-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTDRIVER_H_ +#define FTDRIVER_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H +#include FT_PARAMETER_TAGS_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /************************************************************************** + * + * @section: + * auto_hinter + * + * @title: + * The auto-hinter + * + * @abstract: + * Controlling the auto-hinting module. + * + * @description: + * While FreeType's auto-hinter doesn't expose API functions by itself, + * it is possible to control its behaviour with @FT_Property_Set and + * @FT_Property_Get. The following lists the available properties + * together with the necessary macros and structures. + * + * Note that the auto-hinter's module name is `autofitter' for + * historical reasons. + * + * Available properties are @increase-x-height, @no-stem-darkening + * (experimental), @darkening-parameters (experimental), @warping + * (experimental), @glyph-to-script-map (experimental), @fallback-script + * (experimental), and @default-script (experimental), as documented in + * the @properties section. + * + */ + + + /************************************************************************** + * + * @section: + * cff_driver + * + * @title: + * The CFF driver + * + * @abstract: + * Controlling the CFF driver module. + * + * @description: + * While FreeType's CFF driver doesn't expose API functions by itself, + * it is possible to control its behaviour with @FT_Property_Set and + * @FT_Property_Get. + * + * The CFF driver's module name is `cff'. + * + * Available properties are @hinting-engine, @no-stem-darkening, + * @darkening-parameters, and @random-seed, as documented in the + * @properties section. + * + * + * *Hinting* *and* *antialiasing* *principles* *of* *the* *new* *engine* + * + * The rasterizer is positioning horizontal features (e.g., ascender + * height & x-height, or crossbars) on the pixel grid and minimizing the + * amount of antialiasing applied to them, while placing vertical + * features (vertical stems) on the pixel grid without hinting, thus + * representing the stem position and weight accurately. Sometimes the + * vertical stems may be only partially black. In this context, + * `antialiasing' means that stems are not positioned exactly on pixel + * borders, causing a fuzzy appearance. + * + * There are two principles behind this approach. + * + * 1) No hinting in the horizontal direction: Unlike `superhinted' + * TrueType, which changes glyph widths to accommodate regular + * inter-glyph spacing, Adobe's approach is `faithful to the design' in + * representing both the glyph width and the inter-glyph spacing + * designed for the font. This makes the screen display as close as it + * can be to the result one would get with infinite resolution, while + * preserving what is considered the key characteristics of each glyph. + * Note that the distances between unhinted and grid-fitted positions at + * small sizes are comparable to kerning values and thus would be + * noticeable (and distracting) while reading if hinting were applied. + * + * One of the reasons to not hint horizontally is antialiasing for LCD + * screens: The pixel geometry of modern displays supplies three + * vertical subpixels as the eye moves horizontally across each visible + * pixel. On devices where we can be certain this characteristic is + * present a rasterizer can take advantage of the subpixels to add + * increments of weight. In Western writing systems this turns out to + * be the more critical direction anyway; the weights and spacing of + * vertical stems (see above) are central to Armenian, Cyrillic, Greek, + * and Latin type designs. Even when the rasterizer uses greyscale + * antialiasing instead of color (a necessary compromise when one + * doesn't know the screen characteristics), the unhinted vertical + * features preserve the design's weight and spacing much better than + * aliased type would. + * + * 2) Alignment in the vertical direction: Weights and spacing along the + * y~axis are less critical; what is much more important is the visual + * alignment of related features (like cap-height and x-height). The + * sense of alignment for these is enhanced by the sharpness of grid-fit + * edges, while the cruder vertical resolution (full pixels instead of + * 1/3 pixels) is less of a problem. + * + * On the technical side, horizontal alignment zones for ascender, + * x-height, and other important height values (traditionally called + * `blue zones') as defined in the font are positioned independently, + * each being rounded to the nearest pixel edge, taking care of + * overshoot suppression at small sizes, stem darkening, and scaling. + * + * Hstems (this is, hint values defined in the font to help align + * horizontal features) that fall within a blue zone are said to be + * `captured' and are aligned to that zone. Uncaptured stems are moved + * in one of four ways, top edge up or down, bottom edge up or down. + * Unless there are conflicting hstems, the smallest movement is taken + * to minimize distortion. + * + */ + + + /************************************************************************** + * + * @section: + * pcf_driver + * + * @title: + * The PCF driver + * + * @abstract: + * Controlling the PCF driver module. + * + * @description: + * While FreeType's PCF driver doesn't expose API functions by itself, + * it is possible to control its behaviour with @FT_Property_Set and + * @FT_Property_Get. Right now, there is a single property + * @no-long-family-names available if FreeType is compiled with + * PCF_CONFIG_OPTION_LONG_FAMILY_NAMES. + * + * The PCF driver's module name is `pcf'. + * + */ + + + /************************************************************************** + * + * @section: + * t1_cid_driver + * + * @title: + * The Type 1 and CID drivers + * + * @abstract: + * Controlling the Type~1 and CID driver modules. + * + * @description: + * It is possible to control the behaviour of FreeType's Type~1 and + * Type~1 CID drivers with @FT_Property_Set and @FT_Property_Get. + * + * Behind the scenes, both drivers use the Adobe CFF engine for hinting; + * however, the used properties must be specified separately. + * + * The Type~1 driver's module name is `type1'; the CID driver's module + * name is `t1cid'. + * + * Available properties are @hinting-engine, @no-stem-darkening, + * @darkening-parameters, and @random-seed, as documented in the + * @properties section. + * + * Please see the @cff_driver section for more details on the new + * hinting engine. + * + */ + + + /************************************************************************** + * + * @section: + * tt_driver + * + * @title: + * The TrueType driver + * + * @abstract: + * Controlling the TrueType driver module. + * + * @description: + * While FreeType's TrueType driver doesn't expose API functions by + * itself, it is possible to control its behaviour with @FT_Property_Set + * and @FT_Property_Get. The following lists the available properties + * together with the necessary macros and structures. + * + * The TrueType driver's module name is `truetype'. + * + * A single property @interpreter-version is available, as documented in + * the @properties section. + * + * We start with a list of definitions, kindly provided by Greg + * Hitchcock. + * + * _Bi-Level_ _Rendering_ + * + * Monochromatic rendering, exclusively used in the early days of + * TrueType by both Apple and Microsoft. Microsoft's GDI interface + * supported hinting of the right-side bearing point, such that the + * advance width could be non-linear. Most often this was done to + * achieve some level of glyph symmetry. To enable reasonable + * performance (e.g., not having to run hinting on all glyphs just to + * get the widths) there was a bit in the head table indicating if the + * side bearing was hinted, and additional tables, `hdmx' and `LTSH', to + * cache hinting widths across multiple sizes and device aspect ratios. + * + * _Font_ _Smoothing_ + * + * Microsoft's GDI implementation of anti-aliasing. Not traditional + * anti-aliasing as the outlines were hinted before the sampling. The + * widths matched the bi-level rendering. + * + * _ClearType_ _Rendering_ + * + * Technique that uses physical subpixels to improve rendering on LCD + * (and other) displays. Because of the higher resolution, many methods + * of improving symmetry in glyphs through hinting the right-side + * bearing were no longer necessary. This lead to what GDI calls + * `natural widths' ClearType, see + * http://www.beatstamm.com/typography/RTRCh4.htm#Sec21. Since hinting + * has extra resolution, most non-linearity went away, but it is still + * possible for hints to change the advance widths in this mode. + * + * _ClearType_ _Compatible_ _Widths_ + * + * One of the earliest challenges with ClearType was allowing the + * implementation in GDI to be selected without requiring all UI and + * documents to reflow. To address this, a compatible method of + * rendering ClearType was added where the font hints are executed once + * to determine the width in bi-level rendering, and then re-run in + * ClearType, with the difference in widths being absorbed in the font + * hints for ClearType (mostly in the white space of hints); see + * http://www.beatstamm.com/typography/RTRCh4.htm#Sec20. Somewhat by + * definition, compatible width ClearType allows for non-linear widths, + * but only when the bi-level version has non-linear widths. + * + * _ClearType_ _Subpixel_ _Positioning_ + * + * One of the nice benefits of ClearType is the ability to more crisply + * display fractional widths; unfortunately, the GDI model of integer + * bitmaps did not support this. However, the WPF and Direct Write + * frameworks do support fractional widths. DWrite calls this `natural + * mode', not to be confused with GDI's `natural widths'. Subpixel + * positioning, in the current implementation of Direct Write, + * unfortunately does not support hinted advance widths, see + * http://www.beatstamm.com/typography/RTRCh4.htm#Sec22. Note that the + * TrueType interpreter fully allows the advance width to be adjusted in + * this mode, just the DWrite client will ignore those changes. + * + * _ClearType_ _Backward_ _Compatibility_ + * + * This is a set of exceptions made in the TrueType interpreter to + * minimize hinting techniques that were problematic with the extra + * resolution of ClearType; see + * http://www.beatstamm.com/typography/RTRCh4.htm#Sec1 and + * https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx. + * This technique is not to be confused with ClearType compatible + * widths. ClearType backward compatibility has no direct impact on + * changing advance widths, but there might be an indirect impact on + * disabling some deltas. This could be worked around in backward + * compatibility mode. + * + * _Native_ _ClearType_ _Mode_ + * + * (Not to be confused with `natural widths'.) This mode removes all + * the exceptions in the TrueType interpreter when running with + * ClearType. Any issues on widths would still apply, though. + * + */ + + + /************************************************************************** + * + * @section: + * properties + * + * @title: + * Driver properties + * + * @abstract: + * Controlling driver modules. + * + * @description: + * Driver modules can be controlled by setting and unsetting properties, + * using the functions @FT_Property_Set and @FT_Property_Get. This + * section documents the available properties, together with auxiliary + * macros and structures. + * + */ + + + /************************************************************************** + * + * @enum: + * FT_HINTING_XXX + * + * @description: + * A list of constants used for the @hinting-engine property to + * select the hinting engine for CFF, Type~1, and CID fonts. + * + * @values: + * FT_HINTING_FREETYPE :: + * Use the old FreeType hinting engine. + * + * FT_HINTING_ADOBE :: + * Use the hinting engine contributed by Adobe. + * + * @since: + * 2.9 + * + */ +#define FT_HINTING_FREETYPE 0 +#define FT_HINTING_ADOBE 1 + + /* these constants (introduced in 2.4.12) are deprecated */ +#define FT_CFF_HINTING_FREETYPE FT_HINTING_FREETYPE +#define FT_CFF_HINTING_ADOBE FT_HINTING_ADOBE + + + /************************************************************************** + * + * @property: + * hinting-engine + * + * @description: + * Thanks to Adobe, which contributed a new hinting (and parsing) + * engine, an application can select between `freetype' and `adobe' if + * compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration + * macro isn't defined, `hinting-engine' does nothing. + * + * The same holds for the Type~1 and CID modules if compiled with + * T1_CONFIG_OPTION_OLD_ENGINE. + * + * For the `cff' module, the default engine is `freetype' if + * CFF_CONFIG_OPTION_OLD_ENGINE is defined, and `adobe' otherwise. + * + * For both the `type1' and `t1cid' modules, the default engine is + * `freetype' if T1_CONFIG_OPTION_OLD_ENGINE is defined, and `adobe' + * otherwise. + * + * The following example code demonstrates how to select Adobe's hinting + * engine for the `cff' module (omitting the error handling). + * + * { + * FT_Library library; + * FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "cff", + * "hinting-engine", &hinting_engine ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + * This property can be set via the `FREETYPE_PROPERTIES' environment + * variable (using values `adobe' or `freetype'). + * + * @since: + * 2.4.12 (for `cff' module) + * + * 2.9 (for `type1' and `t1cid' modules) + * + */ + + + /************************************************************************** + * + * @property: + * no-stem-darkening + * + * @description: + * All glyphs that pass through the auto-hinter will be emboldened + * unless this property is set to TRUE. The same is true for the CFF, + * Type~1, and CID font modules if the `Adobe' engine is selected (which + * is the default). + * + * Stem darkening emboldens glyphs at smaller sizes to make them more + * readable on common low-DPI screens when using linear alpha blending + * and gamma correction, see @FT_Render_Glyph. When not using linear + * alpha blending and gamma correction, glyphs will appear heavy and + * fuzzy! + * + * Gamma correction essentially lightens fonts since shades of grey are + * shifted to higher pixel values (=~higher brightness) to match the + * original intention to the reality of our screens. The side-effect is + * that glyphs `thin out'. Mac OS~X and Adobe's proprietary font + * rendering library implement a counter-measure: stem darkening at + * smaller sizes where shades of gray dominate. By emboldening a glyph + * slightly in relation to its pixel size, individual pixels get higher + * coverage of filled-in outlines and are therefore `blacker'. This + * counteracts the `thinning out' of glyphs, making text remain readable + * at smaller sizes. + * + * By default, the Adobe engines for CFF, Type~1, and CID fonts darken + * stems at smaller sizes, regardless of hinting, to enhance contrast. + * Setting this property, stem darkening gets switched off. + * + * For the auto-hinter, stem-darkening is experimental currently and + * thus switched off by default (this is, `no-stem-darkening' is set to + * TRUE by default). Total consistency with the CFF driver is not + * achieved right now because the emboldening method differs and glyphs + * must be scaled down on the Y-axis to keep outline points inside their + * precomputed blue zones. The smaller the size (especially 9ppem and + * down), the higher the loss of emboldening versus the CFF driver. + * + * Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is + * set. + * + * { + * FT_Library library; + * FT_Bool no_stem_darkening = TRUE; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "cff", + * "no-stem-darkening", &no_stem_darkening ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + * This property can be set via the `FREETYPE_PROPERTIES' environment + * variable (using values 1 and 0 for `on' and `off', respectively). + * It can also be set per face using @FT_Face_Properties with + * @FT_PARAM_TAG_STEM_DARKENING. + * + * @since: + * 2.4.12 (for `cff' module) + * + * 2.6.2 (for `autofitter' module) + * + * 2.9 (for `type1' and `t1cid' modules) + * + */ + + + /************************************************************************** + * + * @property: + * darkening-parameters + * + * @description: + * By default, the Adobe hinting engine, as used by the CFF, Type~1, and + * CID font drivers, darkens stems as follows (if the + * `no-stem-darkening' property isn't set): + * + * { + * stem width <= 0.5px: darkening amount = 0.4px + * stem width = 1px: darkening amount = 0.275px + * stem width = 1.667px: darkening amount = 0.275px + * stem width >= 2.333px: darkening amount = 0px + * } + * + * and piecewise linear in-between. At configuration time, these four + * control points can be set with the macro + * `CFF_CONFIG_OPTION_DARKENING_PARAMETERS'; the CFF, Type~1, and CID + * drivers share these values. At runtime, the control points can be + * changed using the `darkening-parameters' property, as the following + * example demonstrates for the Type~1 driver. + * + * { + * FT_Library library; + * FT_Int darken_params[8] = { 500, 300, // x1, y1 + * 1000, 200, // x2, y2 + * 1500, 100, // x3, y3 + * 2000, 0 }; // x4, y4 + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "type1", + * "darkening-parameters", darken_params ); + * } + * + * The x~values give the stem width, and the y~values the darkening + * amount. The unit is 1000th of pixels. All coordinate values must be + * positive; the x~values must be monotonically increasing; the + * y~values must be monotonically decreasing and smaller than or + * equal to 500 (corresponding to half a pixel); the slope of each + * linear piece must be shallower than -1 (e.g., -.4). + * + * The auto-hinter provides this property, too, as an experimental + * feature. See @no-stem-darkening for more. + * + * @note: + * This property can be used with @FT_Property_Get also. + * + * This property can be set via the `FREETYPE_PROPERTIES' environment + * variable, using eight comma-separated integers without spaces. Here + * the above example, using `\' to break the line for readability. + * + * { + * FREETYPE_PROPERTIES=\ + * type1:darkening-parameters=500,300,1000,200,1500,100,2000,0 + * } + * + * @since: + * 2.5.1 (for `cff' module) + * + * 2.6.2 (for `autofitter' module) + * + * 2.9 (for `type1' and `t1cid' modules) + * + */ + + + /************************************************************************** + * + * @property: + * random-seed + * + * @description: + * By default, the seed value for the CFF `random' operator and the + * similar `0 28 callothersubr pop' command for the Type~1 and CID + * drivers is set to a random value. However, mainly for debugging + * purposes, it is often necessary to use a known value as a seed so + * that the pseudo-random number sequences generated by `random' are + * repeatable. + * + * The `random-seed' property does that. Its argument is a signed 32bit + * integer; if the value is zero or negative, the seed given by the + * `intitialRandomSeed' private DICT operator in a CFF file gets used + * (or a default value if there is no such operator). If the value is + * positive, use it instead of `initialRandomSeed', which is + * consequently ignored. + * + * @note: + * This property can be set via the `FREETYPE_PROPERTIES' environment + * variable. It can also be set per face using @FT_Face_Properties with + * @FT_PARAM_TAG_RANDOM_SEED. + * + * @since: + * 2.8 (for `cff' module) + * + * 2.9 (for `type1' and `t1cid' modules) + * + */ + + + /************************************************************************** + * + * @property: + * no-long-family-names + * + * @description: + * If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling + * FreeType, the PCF driver constructs long family names. + * + * There are many PCF fonts just called `Fixed' which look completely + * different, and which have nothing to do with each other. When + * selecting `Fixed' in KDE or Gnome one gets results that appear rather + * random, the style changes often if one changes the size and one + * cannot select some fonts at all. The improve this situation, the PCF + * module prepends the foundry name (plus a space) to the family name. + * It also checks whether there are `wide' characters; all put together, + * family names like `Sony Fixed' or `Misc Fixed Wide' are constructed. + * + * If `no-long-family-names' is set, this feature gets switched off. + * + * { + * FT_Library library; + * FT_Bool no_long_family_names = TRUE; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "pcf", + * "no-long-family-names", + * &no_long_family_names ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + * This property can be set via the `FREETYPE_PROPERTIES' environment + * variable (using values 1 and 0 for `on' and `off', respectively). + * + * @since: + * 2.8 + */ + + + /************************************************************************** + * + * @enum: + * TT_INTERPRETER_VERSION_XXX + * + * @description: + * A list of constants used for the @interpreter-version property to + * select the hinting engine for Truetype fonts. + * + * The numeric value in the constant names represents the version + * number as returned by the `GETINFO' bytecode instruction. + * + * @values: + * TT_INTERPRETER_VERSION_35 :: + * Version~35 corresponds to MS rasterizer v.1.7 as used e.g. in + * Windows~98; only grayscale and B/W rasterizing is supported. + * + * TT_INTERPRETER_VERSION_38 :: + * Version~38 corresponds to MS rasterizer v.1.9; it is roughly + * equivalent to the hinting provided by DirectWrite ClearType (as can + * be found, for example, in the Internet Explorer~9 running on + * Windows~7). It is used in FreeType to select the `Infinality' + * subpixel hinting code. The code may be removed in a future + * version. + * + * TT_INTERPRETER_VERSION_40 :: + * Version~40 corresponds to MS rasterizer v.2.1; it is roughly + * equivalent to the hinting provided by DirectWrite ClearType (as can + * be found, for example, in Microsoft's Edge Browser on Windows~10). + * It is used in FreeType to select the `minimal' subpixel hinting + * code, a stripped-down and higher performance version of the + * `Infinality' code. + * + * @note: + * This property controls the behaviour of the bytecode interpreter + * and thus how outlines get hinted. It does *not* control how glyph + * get rasterized! In particular, it does not control subpixel color + * filtering. + * + * If FreeType has not been compiled with the configuration option + * TT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 or~40 causes + * an `FT_Err_Unimplemented_Feature' error. + * + * Depending on the graphics framework, Microsoft uses different + * bytecode and rendering engines. As a consequence, the version + * numbers returned by a call to the `GETINFO' bytecode instruction are + * more convoluted than desired. + * + * Here are two tables that try to shed some light on the possible + * values for the MS rasterizer engine, together with the additional + * features introduced by it. + * + * { + * GETINFO framework version feature + * ------------------------------------------------------------------- + * 3 GDI (Win 3.1), v1.0 16-bit, first version + * TrueImage + * 33 GDI (Win NT 3.1), v1.5 32-bit + * HP Laserjet + * 34 GDI (Win 95) v1.6 font smoothing, + * new SCANTYPE opcode + * 35 GDI (Win 98/2000) v1.7 (UN)SCALED_COMPONENT_OFFSET + * bits in composite glyphs + * 36 MGDI (Win CE 2) v1.6+ classic ClearType + * 37 GDI (XP and later), v1.8 ClearType + * GDI+ old (before Vista) + * 38 GDI+ old (Vista, Win 7), v1.9 subpixel ClearType, + * WPF Y-direction ClearType, + * additional error checking + * 39 DWrite (before Win 8) v2.0 subpixel ClearType flags + * in GETINFO opcode, + * bug fixes + * 40 GDI+ (after Win 7), v2.1 Y-direction ClearType flag + * DWrite (Win 8) in GETINFO opcode, + * Gray ClearType + * } + * + * The `version' field gives a rough orientation only, since some + * applications provided certain features much earlier (as an example, + * Microsoft Reader used subpixel and Y-direction ClearType already in + * Windows 2000). Similarly, updates to a given framework might include + * improved hinting support. + * + * { + * version sampling rendering comment + * x y x y + * -------------------------------------------------------------- + * v1.0 normal normal B/W B/W bi-level + * v1.6 high high gray gray grayscale + * v1.8 high normal color-filter B/W (GDI) ClearType + * v1.9 high high color-filter gray Color ClearType + * v2.1 high normal gray B/W Gray ClearType + * v2.1 high high gray gray Gray ClearType + * } + * + * Color and Gray ClearType are the two available variants of + * `Y-direction ClearType', meaning grayscale rasterization along the + * Y-direction; the name used in the TrueType specification for this + * feature is `symmetric smoothing'. `Classic ClearType' is the + * original algorithm used before introducing a modified version in + * Win~XP. Another name for v1.6's grayscale rendering is `font + * smoothing', and `Color ClearType' is sometimes also called `DWrite + * ClearType'. To differentiate between today's Color ClearType and the + * earlier ClearType variant with B/W rendering along the vertical axis, + * the latter is sometimes called `GDI ClearType'. + * + * `Normal' and `high' sampling describe the (virtual) resolution to + * access the rasterized outline after the hinting process. `Normal' + * means 1 sample per grid line (i.e., B/W). In the current Microsoft + * implementation, `high' means an extra virtual resolution of 16x16 (or + * 16x1) grid lines per pixel for bytecode instructions like `MIRP'. + * After hinting, these 16 grid lines are mapped to 6x5 (or 6x1) grid + * lines for color filtering if Color ClearType is activated. + * + * Note that `Gray ClearType' is essentially the same as v1.6's + * grayscale rendering. However, the GETINFO instruction handles it + * differently: v1.6 returns bit~12 (hinting for grayscale), while v2.1 + * returns bits~13 (hinting for ClearType), 18 (symmetrical smoothing), + * and~19 (Gray ClearType). Also, this mode respects bits 2 and~3 for + * the version~1 gasp table exclusively (like Color ClearType), while + * v1.6 only respects the values of version~0 (bits 0 and~1). + * + * Keep in mind that the features of the above interpreter versions + * might not map exactly to FreeType features or behavior because it is + * a fundamentally different library with different internals. + * + */ +#define TT_INTERPRETER_VERSION_35 35 +#define TT_INTERPRETER_VERSION_38 38 +#define TT_INTERPRETER_VERSION_40 40 + + + /************************************************************************** + * + * @property: + * interpreter-version + * + * @description: + * Currently, three versions are available, two representing the + * bytecode interpreter with subpixel hinting support (old `Infinality' + * code and new stripped-down and higher performance `minimal' code) and + * one without, respectively. The default is subpixel support if + * TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel support + * otherwise (since it isn't available then). + * + * If subpixel hinting is on, many TrueType bytecode instructions behave + * differently compared to B/W or grayscale rendering (except if `native + * ClearType' is selected by the font). Microsoft's main idea is to + * render at a much increased horizontal resolution, then sampling down + * the created output to subpixel precision. However, many older fonts + * are not suited to this and must be specially taken care of by + * applying (hardcoded) tweaks in Microsoft's interpreter. + * + * Details on subpixel hinting and some of the necessary tweaks can be + * found in Greg Hitchcock's whitepaper at + * `https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx'. + * Note that FreeType currently doesn't really `subpixel hint' (6x1, 6x2, + * or 6x5 supersampling) like discussed in the paper. Depending on the + * chosen interpreter, it simply ignores instructions on vertical stems + * to arrive at very similar results. + * + * The following example code demonstrates how to deactivate subpixel + * hinting (omitting the error handling). + * + * { + * FT_Library library; + * FT_Face face; + * FT_UInt interpreter_version = TT_INTERPRETER_VERSION_35; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "truetype", + * "interpreter-version", + * &interpreter_version ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + * This property can be set via the `FREETYPE_PROPERTIES' environment + * variable (using values `35', `38', or `40'). + * + * @since: + * 2.5 + */ + + + /************************************************************************** + * + * @property: + * glyph-to-script-map + * + * @description: + * *Experimental* *only* + * + * The auto-hinter provides various script modules to hint glyphs. + * Examples of supported scripts are Latin or CJK. Before a glyph is + * auto-hinted, the Unicode character map of the font gets examined, and + * the script is then determined based on Unicode character ranges, see + * below. + * + * OpenType fonts, however, often provide much more glyphs than + * character codes (small caps, superscripts, ligatures, swashes, etc.), + * to be controlled by so-called `features'. Handling OpenType features + * can be quite complicated and thus needs a separate library on top of + * FreeType. + * + * The mapping between glyph indices and scripts (in the auto-hinter + * sense, see the @FT_AUTOHINTER_SCRIPT_XXX values) is stored as an + * array with `num_glyphs' elements, as found in the font's @FT_Face + * structure. The `glyph-to-script-map' property returns a pointer to + * this array, which can be modified as needed. Note that the + * modification should happen before the first glyph gets processed by + * the auto-hinter so that the global analysis of the font shapes + * actually uses the modified mapping. + * + * The following example code demonstrates how to access it (omitting + * the error handling). + * + * { + * FT_Library library; + * FT_Face face; + * FT_Prop_GlyphToScriptMap prop; + * + * + * FT_Init_FreeType( &library ); + * FT_New_Face( library, "foo.ttf", 0, &face ); + * + * prop.face = face; + * + * FT_Property_Get( library, "autofitter", + * "glyph-to-script-map", &prop ); + * + * // adjust `prop.map' as needed right here + * + * FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT ); + * } + * + * @since: + * 2.4.11 + * + */ + + + /************************************************************************** + * + * @enum: + * FT_AUTOHINTER_SCRIPT_XXX + * + * @description: + * *Experimental* *only* + * + * A list of constants used for the @glyph-to-script-map property to + * specify the script submodule the auto-hinter should use for hinting a + * particular glyph. + * + * @values: + * FT_AUTOHINTER_SCRIPT_NONE :: + * Don't auto-hint this glyph. + * + * FT_AUTOHINTER_SCRIPT_LATIN :: + * Apply the latin auto-hinter. For the auto-hinter, `latin' is a + * very broad term, including Cyrillic and Greek also since characters + * from those scripts share the same design constraints. + * + * By default, characters from the following Unicode ranges are + * assigned to this submodule. + * + * { + * U+0020 - U+007F // Basic Latin (no control characters) + * U+00A0 - U+00FF // Latin-1 Supplement (no control characters) + * U+0100 - U+017F // Latin Extended-A + * U+0180 - U+024F // Latin Extended-B + * U+0250 - U+02AF // IPA Extensions + * U+02B0 - U+02FF // Spacing Modifier Letters + * U+0300 - U+036F // Combining Diacritical Marks + * U+0370 - U+03FF // Greek and Coptic + * U+0400 - U+04FF // Cyrillic + * U+0500 - U+052F // Cyrillic Supplement + * U+1D00 - U+1D7F // Phonetic Extensions + * U+1D80 - U+1DBF // Phonetic Extensions Supplement + * U+1DC0 - U+1DFF // Combining Diacritical Marks Supplement + * U+1E00 - U+1EFF // Latin Extended Additional + * U+1F00 - U+1FFF // Greek Extended + * U+2000 - U+206F // General Punctuation + * U+2070 - U+209F // Superscripts and Subscripts + * U+20A0 - U+20CF // Currency Symbols + * U+2150 - U+218F // Number Forms + * U+2460 - U+24FF // Enclosed Alphanumerics + * U+2C60 - U+2C7F // Latin Extended-C + * U+2DE0 - U+2DFF // Cyrillic Extended-A + * U+2E00 - U+2E7F // Supplemental Punctuation + * U+A640 - U+A69F // Cyrillic Extended-B + * U+A720 - U+A7FF // Latin Extended-D + * U+FB00 - U+FB06 // Alphab. Present. Forms (Latin Ligatures) + * U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols + * U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement + * } + * + * FT_AUTOHINTER_SCRIPT_CJK :: + * Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old + * Vietnamese, and some other scripts. + * + * By default, characters from the following Unicode ranges are + * assigned to this submodule. + * + * { + * U+1100 - U+11FF // Hangul Jamo + * U+2E80 - U+2EFF // CJK Radicals Supplement + * U+2F00 - U+2FDF // Kangxi Radicals + * U+2FF0 - U+2FFF // Ideographic Description Characters + * U+3000 - U+303F // CJK Symbols and Punctuation + * U+3040 - U+309F // Hiragana + * U+30A0 - U+30FF // Katakana + * U+3100 - U+312F // Bopomofo + * U+3130 - U+318F // Hangul Compatibility Jamo + * U+3190 - U+319F // Kanbun + * U+31A0 - U+31BF // Bopomofo Extended + * U+31C0 - U+31EF // CJK Strokes + * U+31F0 - U+31FF // Katakana Phonetic Extensions + * U+3200 - U+32FF // Enclosed CJK Letters and Months + * U+3300 - U+33FF // CJK Compatibility + * U+3400 - U+4DBF // CJK Unified Ideographs Extension A + * U+4DC0 - U+4DFF // Yijing Hexagram Symbols + * U+4E00 - U+9FFF // CJK Unified Ideographs + * U+A960 - U+A97F // Hangul Jamo Extended-A + * U+AC00 - U+D7AF // Hangul Syllables + * U+D7B0 - U+D7FF // Hangul Jamo Extended-B + * U+F900 - U+FAFF // CJK Compatibility Ideographs + * U+FE10 - U+FE1F // Vertical forms + * U+FE30 - U+FE4F // CJK Compatibility Forms + * U+FF00 - U+FFEF // Halfwidth and Fullwidth Forms + * U+1B000 - U+1B0FF // Kana Supplement + * U+1D300 - U+1D35F // Tai Xuan Hing Symbols + * U+1F200 - U+1F2FF // Enclosed Ideographic Supplement + * U+20000 - U+2A6DF // CJK Unified Ideographs Extension B + * U+2A700 - U+2B73F // CJK Unified Ideographs Extension C + * U+2B740 - U+2B81F // CJK Unified Ideographs Extension D + * U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement + * } + * + * FT_AUTOHINTER_SCRIPT_INDIC :: + * Apply the indic auto-hinter, covering all major scripts from the + * Indian sub-continent and some other related scripts like Thai, Lao, + * or Tibetan. + * + * By default, characters from the following Unicode ranges are + * assigned to this submodule. + * + * { + * U+0900 - U+0DFF // Indic Range + * U+0F00 - U+0FFF // Tibetan + * U+1900 - U+194F // Limbu + * U+1B80 - U+1BBF // Sundanese + * U+A800 - U+A82F // Syloti Nagri + * U+ABC0 - U+ABFF // Meetei Mayek + * U+11800 - U+118DF // Sharada + * } + * + * Note that currently Indic support is rudimentary only, missing blue + * zone support. + * + * @since: + * 2.4.11 + * + */ +#define FT_AUTOHINTER_SCRIPT_NONE 0 +#define FT_AUTOHINTER_SCRIPT_LATIN 1 +#define FT_AUTOHINTER_SCRIPT_CJK 2 +#define FT_AUTOHINTER_SCRIPT_INDIC 3 + + + /************************************************************************** + * + * @struct: + * FT_Prop_GlyphToScriptMap + * + * @description: + * *Experimental* *only* + * + * The data exchange structure for the @glyph-to-script-map property. + * + * @since: + * 2.4.11 + * + */ + typedef struct FT_Prop_GlyphToScriptMap_ + { + FT_Face face; + FT_UShort* map; + + } FT_Prop_GlyphToScriptMap; + + + /************************************************************************** + * + * @property: + * fallback-script + * + * @description: + * *Experimental* *only* + * + * If no auto-hinter script module can be assigned to a glyph, a + * fallback script gets assigned to it (see also the + * @glyph-to-script-map property). By default, this is + * @FT_AUTOHINTER_SCRIPT_CJK. Using the `fallback-script' property, + * this fallback value can be changed. + * + * { + * FT_Library library; + * FT_UInt fallback_script = FT_AUTOHINTER_SCRIPT_NONE; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "autofitter", + * "fallback-script", &fallback_script ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + * It's important to use the right timing for changing this value: The + * creation of the glyph-to-script map that eventually uses the + * fallback script value gets triggered either by setting or reading a + * face-specific property like @glyph-to-script-map, or by auto-hinting + * any glyph from that face. In particular, if you have already created + * an @FT_Face structure but not loaded any glyph (using the + * auto-hinter), a change of the fallback script will affect this face. + * + * @since: + * 2.4.11 + * + */ + + + /************************************************************************** + * + * @property: + * default-script + * + * @description: + * *Experimental* *only* + * + * If FreeType gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make + * the HarfBuzz library access OpenType features for getting better + * glyph coverages, this property sets the (auto-fitter) script to be + * used for the default (OpenType) script data of a font's GSUB table. + * Features for the default script are intended for all scripts not + * explicitly handled in GSUB; an example is a `dlig' feature, + * containing the combination of the characters `T', `E', and `L' to + * form a `TEL' ligature. + * + * By default, this is @FT_AUTOHINTER_SCRIPT_LATIN. Using the + * `default-script' property, this default value can be changed. + * + * { + * FT_Library library; + * FT_UInt default_script = FT_AUTOHINTER_SCRIPT_NONE; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "autofitter", + * "default-script", &default_script ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + * It's important to use the right timing for changing this value: The + * creation of the glyph-to-script map that eventually uses the + * default script value gets triggered either by setting or reading a + * face-specific property like @glyph-to-script-map, or by auto-hinting + * any glyph from that face. In particular, if you have already created + * an @FT_Face structure but not loaded any glyph (using the + * auto-hinter), a change of the default script will affect this face. + * + * @since: + * 2.5.3 + * + */ + + + /************************************************************************** + * + * @property: + * increase-x-height + * + * @description: + * For ppem values in the range 6~<= ppem <= `increase-x-height', round + * up the font's x~height much more often than normally. If the value + * is set to~0, which is the default, this feature is switched off. Use + * this property to improve the legibility of small font sizes if + * necessary. + * + * { + * FT_Library library; + * FT_Face face; + * FT_Prop_IncreaseXHeight prop; + * + * + * FT_Init_FreeType( &library ); + * FT_New_Face( library, "foo.ttf", 0, &face ); + * FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 ); + * + * prop.face = face; + * prop.limit = 14; + * + * FT_Property_Set( library, "autofitter", + * "increase-x-height", &prop ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + * Set this value right after calling @FT_Set_Char_Size, but before + * loading any glyph (using the auto-hinter). + * + * @since: + * 2.4.11 + * + */ + + + /************************************************************************** + * + * @struct: + * FT_Prop_IncreaseXHeight + * + * @description: + * The data exchange structure for the @increase-x-height property. + * + */ + typedef struct FT_Prop_IncreaseXHeight_ + { + FT_Face face; + FT_UInt limit; + + } FT_Prop_IncreaseXHeight; + + + /************************************************************************** + * + * @property: + * warping + * + * @description: + * *Experimental* *only* + * + * If FreeType gets compiled with option AF_CONFIG_OPTION_USE_WARPER to + * activate the warp hinting code in the auto-hinter, this property + * switches warping on and off. + * + * Warping only works in `normal' auto-hinting mode replacing it. + * The idea of the code is to slightly scale and shift a glyph along + * the non-hinted dimension (which is usually the horizontal axis) so + * that as much of its segments are aligned (more or less) to the grid. + * To find out a glyph's optimal scaling and shifting value, various + * parameter combinations are tried and scored. + * + * By default, warping is off. The example below shows how to switch on + * warping (omitting the error handling). + * + * { + * FT_Library library; + * FT_Bool warping = 1; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "autofitter", + * "warping", &warping ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + * This property can be set via the `FREETYPE_PROPERTIES' environment + * variable (using values 1 and 0 for `on' and `off', respectively). + * + * The warping code can also change advance widths. Have a look at the + * `lsb_delta' and `rsb_delta' fields in the @FT_GlyphSlotRec structure + * for details on improving inter-glyph distances while rendering. + * + * Since warping is a global property of the auto-hinter it is best to + * change its value before rendering any face. Otherwise, you should + * reload all faces that get auto-hinted in `normal' hinting mode. + * + * @since: + * 2.6 + * + */ + + + /* */ + + +FT_END_HEADER + + +#endif /* FTDRIVER_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/fterrdef.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/fterrdef.h new file mode 100755 index 00000000..8ffd346c --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/fterrdef.h @@ -0,0 +1,280 @@ +/***************************************************************************/ +/* */ +/* fterrdef.h */ +/* */ +/* FreeType error codes (specification). */ +/* */ +/* Copyright 2002-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* error_code_values */ + /* */ + /* <Title> */ + /* Error Code Values */ + /* */ + /* <Abstract> */ + /* All possible error codes returned by FreeType functions. */ + /* */ + /* <Description> */ + /* The list below is taken verbatim from the file `fterrdef.h' */ + /* (loaded automatically by including `FT_FREETYPE_H'). The first */ + /* argument of the `FT_ERROR_DEF_' macro is the error label; by */ + /* default, the prefix `FT_Err_' gets added so that you get error */ + /* names like `FT_Err_Cannot_Open_Resource'. The second argument is */ + /* the error code, and the last argument an error string, which is not */ + /* used by FreeType. */ + /* */ + /* Within your application you should *only* use error names and */ + /* *never* its numeric values! The latter might (and actually do) */ + /* change in forthcoming FreeType versions. */ + /* */ + /* Macro `FT_NOERRORDEF_' defines `FT_Err_Ok', which is always zero. */ + /* See the `Error Enumerations' subsection how to automatically */ + /* generate a list of error strings. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Err_XXX */ + /* */ + /*************************************************************************/ + + /* generic errors */ + + FT_NOERRORDEF_( Ok, 0x00, + "no error" ) + + FT_ERRORDEF_( Cannot_Open_Resource, 0x01, + "cannot open resource" ) + FT_ERRORDEF_( Unknown_File_Format, 0x02, + "unknown file format" ) + FT_ERRORDEF_( Invalid_File_Format, 0x03, + "broken file" ) + FT_ERRORDEF_( Invalid_Version, 0x04, + "invalid FreeType version" ) + FT_ERRORDEF_( Lower_Module_Version, 0x05, + "module version is too low" ) + FT_ERRORDEF_( Invalid_Argument, 0x06, + "invalid argument" ) + FT_ERRORDEF_( Unimplemented_Feature, 0x07, + "unimplemented feature" ) + FT_ERRORDEF_( Invalid_Table, 0x08, + "broken table" ) + FT_ERRORDEF_( Invalid_Offset, 0x09, + "broken offset within table" ) + FT_ERRORDEF_( Array_Too_Large, 0x0A, + "array allocation size too large" ) + FT_ERRORDEF_( Missing_Module, 0x0B, + "missing module" ) + FT_ERRORDEF_( Missing_Property, 0x0C, + "missing property" ) + + /* glyph/character errors */ + + FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, + "invalid glyph index" ) + FT_ERRORDEF_( Invalid_Character_Code, 0x11, + "invalid character code" ) + FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, + "unsupported glyph image format" ) + FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, + "cannot render this glyph format" ) + FT_ERRORDEF_( Invalid_Outline, 0x14, + "invalid outline" ) + FT_ERRORDEF_( Invalid_Composite, 0x15, + "invalid composite glyph" ) + FT_ERRORDEF_( Too_Many_Hints, 0x16, + "too many hints" ) + FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, + "invalid pixel size" ) + + /* handle errors */ + + FT_ERRORDEF_( Invalid_Handle, 0x20, + "invalid object handle" ) + FT_ERRORDEF_( Invalid_Library_Handle, 0x21, + "invalid library handle" ) + FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, + "invalid module handle" ) + FT_ERRORDEF_( Invalid_Face_Handle, 0x23, + "invalid face handle" ) + FT_ERRORDEF_( Invalid_Size_Handle, 0x24, + "invalid size handle" ) + FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, + "invalid glyph slot handle" ) + FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, + "invalid charmap handle" ) + FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, + "invalid cache manager handle" ) + FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, + "invalid stream handle" ) + + /* driver errors */ + + FT_ERRORDEF_( Too_Many_Drivers, 0x30, + "too many modules" ) + FT_ERRORDEF_( Too_Many_Extensions, 0x31, + "too many extensions" ) + + /* memory errors */ + + FT_ERRORDEF_( Out_Of_Memory, 0x40, + "out of memory" ) + FT_ERRORDEF_( Unlisted_Object, 0x41, + "unlisted object" ) + + /* stream errors */ + + FT_ERRORDEF_( Cannot_Open_Stream, 0x51, + "cannot open stream" ) + FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, + "invalid stream seek" ) + FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, + "invalid stream skip" ) + FT_ERRORDEF_( Invalid_Stream_Read, 0x54, + "invalid stream read" ) + FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, + "invalid stream operation" ) + FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, + "invalid frame operation" ) + FT_ERRORDEF_( Nested_Frame_Access, 0x57, + "nested frame access" ) + FT_ERRORDEF_( Invalid_Frame_Read, 0x58, + "invalid frame read" ) + + /* raster errors */ + + FT_ERRORDEF_( Raster_Uninitialized, 0x60, + "raster uninitialized" ) + FT_ERRORDEF_( Raster_Corrupted, 0x61, + "raster corrupted" ) + FT_ERRORDEF_( Raster_Overflow, 0x62, + "raster overflow" ) + FT_ERRORDEF_( Raster_Negative_Height, 0x63, + "negative height while rastering" ) + + /* cache errors */ + + FT_ERRORDEF_( Too_Many_Caches, 0x70, + "too many registered caches" ) + + /* TrueType and SFNT errors */ + + FT_ERRORDEF_( Invalid_Opcode, 0x80, + "invalid opcode" ) + FT_ERRORDEF_( Too_Few_Arguments, 0x81, + "too few arguments" ) + FT_ERRORDEF_( Stack_Overflow, 0x82, + "stack overflow" ) + FT_ERRORDEF_( Code_Overflow, 0x83, + "code overflow" ) + FT_ERRORDEF_( Bad_Argument, 0x84, + "bad argument" ) + FT_ERRORDEF_( Divide_By_Zero, 0x85, + "division by zero" ) + FT_ERRORDEF_( Invalid_Reference, 0x86, + "invalid reference" ) + FT_ERRORDEF_( Debug_OpCode, 0x87, + "found debug opcode" ) + FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, + "found ENDF opcode in execution stream" ) + FT_ERRORDEF_( Nested_DEFS, 0x89, + "nested DEFS" ) + FT_ERRORDEF_( Invalid_CodeRange, 0x8A, + "invalid code range" ) + FT_ERRORDEF_( Execution_Too_Long, 0x8B, + "execution context too long" ) + FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, + "too many function definitions" ) + FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, + "too many instruction definitions" ) + FT_ERRORDEF_( Table_Missing, 0x8E, + "SFNT font table missing" ) + FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, + "horizontal header (hhea) table missing" ) + FT_ERRORDEF_( Locations_Missing, 0x90, + "locations (loca) table missing" ) + FT_ERRORDEF_( Name_Table_Missing, 0x91, + "name table missing" ) + FT_ERRORDEF_( CMap_Table_Missing, 0x92, + "character map (cmap) table missing" ) + FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, + "horizontal metrics (hmtx) table missing" ) + FT_ERRORDEF_( Post_Table_Missing, 0x94, + "PostScript (post) table missing" ) + FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, + "invalid horizontal metrics" ) + FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, + "invalid character map (cmap) format" ) + FT_ERRORDEF_( Invalid_PPem, 0x97, + "invalid ppem value" ) + FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, + "invalid vertical metrics" ) + FT_ERRORDEF_( Could_Not_Find_Context, 0x99, + "could not find context" ) + FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, + "invalid PostScript (post) table format" ) + FT_ERRORDEF_( Invalid_Post_Table, 0x9B, + "invalid PostScript (post) table" ) + FT_ERRORDEF_( DEF_In_Glyf_Bytecode, 0x9C, + "found FDEF or IDEF opcode in glyf bytecode" ) + FT_ERRORDEF_( Missing_Bitmap, 0x9D, + "missing bitmap in strike" ) + + /* CFF, CID, and Type 1 errors */ + + FT_ERRORDEF_( Syntax_Error, 0xA0, + "opcode syntax error" ) + FT_ERRORDEF_( Stack_Underflow, 0xA1, + "argument stack underflow" ) + FT_ERRORDEF_( Ignore, 0xA2, + "ignore" ) + FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, + "no Unicode glyph name found" ) + FT_ERRORDEF_( Glyph_Too_Big, 0xA4, + "glyph too big for hinting" ) + + /* BDF errors */ + + FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, + "`STARTFONT' field missing" ) + FT_ERRORDEF_( Missing_Font_Field, 0xB1, + "`FONT' field missing" ) + FT_ERRORDEF_( Missing_Size_Field, 0xB2, + "`SIZE' field missing" ) + FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, + "`FONTBOUNDINGBOX' field missing" ) + FT_ERRORDEF_( Missing_Chars_Field, 0xB4, + "`CHARS' field missing" ) + FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, + "`STARTCHAR' field missing" ) + FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, + "`ENCODING' field missing" ) + FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, + "`BBX' field missing" ) + FT_ERRORDEF_( Bbx_Too_Big, 0xB8, + "`BBX' too big" ) + FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, + "Font header corrupted or missing fields" ) + FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, + "Font glyphs corrupted or missing fields" ) + + /* */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/fterrors.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/fterrors.h new file mode 100755 index 00000000..f6ee5c24 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/fterrors.h @@ -0,0 +1,226 @@ +/***************************************************************************/ +/* */ +/* fterrors.h */ +/* */ +/* FreeType error code handling (specification). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* error_enumerations */ + /* */ + /* <Title> */ + /* Error Enumerations */ + /* */ + /* <Abstract> */ + /* How to handle errors and error strings. */ + /* */ + /* <Description> */ + /* The header file `fterrors.h' (which is automatically included by */ + /* `freetype.h' defines the handling of FreeType's enumeration */ + /* constants. It can also be used to generate error message strings */ + /* with a small macro trick explained below. */ + /* */ + /* *Error* *Formats* */ + /* */ + /* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be */ + /* defined in `ftoption.h' in order to make the higher byte indicate */ + /* the module where the error has happened (this is not compatible */ + /* with standard builds of FreeType~2, however). See the file */ + /* `ftmoderr.h' for more details. */ + /* */ + /* *Error* *Message* *Strings* */ + /* */ + /* Error definitions are set up with special macros that allow client */ + /* applications to build a table of error message strings. The */ + /* strings are not included in a normal build of FreeType~2 to save */ + /* space (most client applications do not use them). */ + /* */ + /* To do so, you have to define the following macros before including */ + /* this file. */ + /* */ + /* { */ + /* FT_ERROR_START_LIST */ + /* } */ + /* */ + /* This macro is called before anything else to define the start of */ + /* the error list. It is followed by several FT_ERROR_DEF calls. */ + /* */ + /* { */ + /* FT_ERROR_DEF( e, v, s ) */ + /* } */ + /* */ + /* This macro is called to define one single error. `e' is the error */ + /* code identifier (e.g., `Invalid_Argument'), `v' is the error's */ + /* numerical value, and `s' is the corresponding error string. */ + /* */ + /* { */ + /* FT_ERROR_END_LIST */ + /* } */ + /* */ + /* This macro ends the list. */ + /* */ + /* Additionally, you have to undefine `FTERRORS_H_' before #including */ + /* this file. */ + /* */ + /* Here is a simple example. */ + /* */ + /* { */ + /* #undef FTERRORS_H_ */ + /* #define FT_ERRORDEF( e, v, s ) { e, s }, */ + /* #define FT_ERROR_START_LIST { */ + /* #define FT_ERROR_END_LIST { 0, NULL } }; */ + /* */ + /* const struct */ + /* { */ + /* int err_code; */ + /* const char* err_msg; */ + /* } ft_errors[] = */ + /* */ + /* #include FT_ERRORS_H */ + /* } */ + /* */ + /* Note that `FT_Err_Ok' is _not_ defined with `FT_ERRORDEF' but with */ + /* `FT_NOERRORDEF'; it is always zero. */ + /* */ + /*************************************************************************/ + + /* */ + + /* In previous FreeType versions we used `__FTERRORS_H__'. However, */ + /* using two successive underscores in a non-system symbol name */ + /* violates the C (and C++) standard, so it was changed to the */ + /* current form. In spite of this, we have to make */ + /* */ + /* #undefine __FTERRORS_H__ */ + /* */ + /* work for backward compatibility. */ + /* */ +#if !( defined( FTERRORS_H_ ) && defined ( __FTERRORS_H__ ) ) +#define FTERRORS_H_ +#define __FTERRORS_H__ + + + /* include module base error codes */ +#include FT_MODULE_ERRORS_H + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** SETUP MACROS *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + +#undef FT_NEED_EXTERN_C + + + /* FT_ERR_PREFIX is used as a prefix for error identifiers. */ + /* By default, we use `FT_Err_'. */ + /* */ +#ifndef FT_ERR_PREFIX +#define FT_ERR_PREFIX FT_Err_ +#endif + + + /* FT_ERR_BASE is used as the base for module-specific errors. */ + /* */ +#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS + +#ifndef FT_ERR_BASE +#define FT_ERR_BASE FT_Mod_Err_Base +#endif + +#else + +#undef FT_ERR_BASE +#define FT_ERR_BASE 0 + +#endif /* FT_CONFIG_OPTION_USE_MODULE_ERRORS */ + + + /* If FT_ERRORDEF is not defined, we need to define a simple */ + /* enumeration type. */ + /* */ +#ifndef FT_ERRORDEF + +#define FT_ERRORDEF( e, v, s ) e = v, +#define FT_ERROR_START_LIST enum { +#define FT_ERROR_END_LIST FT_ERR_CAT( FT_ERR_PREFIX, Max ) }; + +#ifdef __cplusplus +#define FT_NEED_EXTERN_C + extern "C" { +#endif + +#endif /* !FT_ERRORDEF */ + + + /* this macro is used to define an error */ +#define FT_ERRORDEF_( e, v, s ) \ + FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s ) + + /* this is only used for <module>_Err_Ok, which must be 0! */ +#define FT_NOERRORDEF_( e, v, s ) \ + FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s ) + + +#ifdef FT_ERROR_START_LIST + FT_ERROR_START_LIST +#endif + + + /* now include the error codes */ +#include FT_ERROR_DEFINITIONS_H + + +#ifdef FT_ERROR_END_LIST + FT_ERROR_END_LIST +#endif + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** SIMPLE CLEANUP *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + +#ifdef FT_NEED_EXTERN_C + } +#endif + +#undef FT_ERROR_START_LIST +#undef FT_ERROR_END_LIST + +#undef FT_ERRORDEF +#undef FT_ERRORDEF_ +#undef FT_NOERRORDEF_ + +#undef FT_NEED_EXTERN_C +#undef FT_ERR_BASE + + /* FT_ERR_PREFIX is needed internally */ +#ifndef FT2_BUILD_LIBRARY +#undef FT_ERR_PREFIX +#endif + +#endif /* !(FTERRORS_H_ && __FTERRORS_H__) */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftfntfmt.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftfntfmt.h new file mode 100755 index 00000000..cc86efac --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftfntfmt.h @@ -0,0 +1,95 @@ +/***************************************************************************/ +/* */ +/* ftfntfmt.h */ +/* */ +/* Support functions for font formats. */ +/* */ +/* Copyright 2002-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTFNTFMT_H_ +#define FTFNTFMT_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* font_formats */ + /* */ + /* <Title> */ + /* Font Formats */ + /* */ + /* <Abstract> */ + /* Getting the font format. */ + /* */ + /* <Description> */ + /* The single function in this section can be used to get the font */ + /* format. Note that this information is not needed normally; */ + /* however, there are special cases (like in PDF devices) where it is */ + /* important to differentiate, in spite of FreeType's uniform API. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Font_Format */ + /* */ + /* <Description> */ + /* Return a string describing the format of a given face. Possible */ + /* values are `TrueType', `Type~1', `BDF', `PCF', `Type~42', */ + /* `CID~Type~1', `CFF', `PFR', and `Windows~FNT'. */ + /* */ + /* The return value is suitable to be used as an X11 FONT_PROPERTY. */ + /* */ + /* <Input> */ + /* face :: */ + /* Input face handle. */ + /* */ + /* <Return> */ + /* Font format string. NULL in case of error. */ + /* */ + /* <Note> */ + /* A deprecated name for the same function is */ + /* `FT_Get_X11_Font_Format'. */ + /* */ + FT_EXPORT( const char* ) + FT_Get_Font_Format( FT_Face face ); + + + /* deprecated */ + FT_EXPORT( const char* ) + FT_Get_X11_Font_Format( FT_Face face ); + + + /* */ + + +FT_END_HEADER + +#endif /* FTFNTFMT_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftgasp.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftgasp.h new file mode 100755 index 00000000..fc1248ff --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftgasp.h @@ -0,0 +1,142 @@ +/***************************************************************************/ +/* */ +/* ftgasp.h */ +/* */ +/* Access of TrueType's `gasp' table (specification). */ +/* */ +/* Copyright 2007-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTGASP_H_ +#define FTGASP_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************** + * + * @section: + * gasp_table + * + * @title: + * Gasp Table + * + * @abstract: + * Retrieving TrueType `gasp' table entries. + * + * @description: + * The function @FT_Get_Gasp can be used to query a TrueType or OpenType + * font for specific entries in its `gasp' table, if any. This is + * mainly useful when implementing native TrueType hinting with the + * bytecode interpreter to duplicate the Windows text rendering results. + */ + + /************************************************************************* + * + * @enum: + * FT_GASP_XXX + * + * @description: + * A list of values and/or bit-flags returned by the @FT_Get_Gasp + * function. + * + * @values: + * FT_GASP_NO_TABLE :: + * This special value means that there is no GASP table in this face. + * It is up to the client to decide what to do. + * + * FT_GASP_DO_GRIDFIT :: + * Grid-fitting and hinting should be performed at the specified ppem. + * This *really* means TrueType bytecode interpretation. If this bit + * is not set, no hinting gets applied. + * + * FT_GASP_DO_GRAY :: + * Anti-aliased rendering should be performed at the specified ppem. + * If not set, do monochrome rendering. + * + * FT_GASP_SYMMETRIC_SMOOTHING :: + * If set, smoothing along multiple axes must be used with ClearType. + * + * FT_GASP_SYMMETRIC_GRIDFIT :: + * Grid-fitting must be used with ClearType's symmetric smoothing. + * + * @note: + * The bit-flags `FT_GASP_DO_GRIDFIT' and `FT_GASP_DO_GRAY' are to be + * used for standard font rasterization only. Independently of that, + * `FT_GASP_SYMMETRIC_SMOOTHING' and `FT_GASP_SYMMETRIC_GRIDFIT' are to + * be used if ClearType is enabled (and `FT_GASP_DO_GRIDFIT' and + * `FT_GASP_DO_GRAY' are consequently ignored). + * + * `ClearType' is Microsoft's implementation of LCD rendering, partly + * protected by patents. + * + * @since: + * 2.3.0 + */ +#define FT_GASP_NO_TABLE -1 +#define FT_GASP_DO_GRIDFIT 0x01 +#define FT_GASP_DO_GRAY 0x02 +#define FT_GASP_SYMMETRIC_GRIDFIT 0x04 +#define FT_GASP_SYMMETRIC_SMOOTHING 0x08 + + + /************************************************************************* + * + * @func: + * FT_Get_Gasp + * + * @description: + * For a TrueType or OpenType font file, return the rasterizer behaviour + * flags from the font's `gasp' table corresponding to a given + * character pixel size. + * + * @input: + * face :: The source face handle. + * + * ppem :: The vertical character pixel size. + * + * @return: + * Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no + * `gasp' table in the face. + * + * @note: + * If you want to use the MM functionality of OpenType variation fonts + * (i.e., using @FT_Set_Var_Design_Coordinates and friends), call this + * function *after* setting an instance since the return values can + * change. + * + * @since: + * 2.3.0 + */ + FT_EXPORT( FT_Int ) + FT_Get_Gasp( FT_Face face, + FT_UInt ppem ); + + /* */ + + +FT_END_HEADER + +#endif /* FTGASP_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftglyph.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftglyph.h new file mode 100755 index 00000000..5f3fc009 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftglyph.h @@ -0,0 +1,614 @@ +/***************************************************************************/ +/* */ +/* ftglyph.h */ +/* */ +/* FreeType convenience functions to handle glyphs (specification). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file contains the definition of several convenience functions */ + /* that can be used by client applications to easily retrieve glyph */ + /* bitmaps and outlines from a given face. */ + /* */ + /* These functions should be optional if you are writing a font server */ + /* or text layout engine on top of FreeType. However, they are pretty */ + /* handy for many other simple uses of the library. */ + /* */ + /*************************************************************************/ + + +#ifndef FTGLYPH_H_ +#define FTGLYPH_H_ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* glyph_management */ + /* */ + /* <Title> */ + /* Glyph Management */ + /* */ + /* <Abstract> */ + /* Generic interface to manage individual glyph data. */ + /* */ + /* <Description> */ + /* This section contains definitions used to manage glyph data */ + /* through generic FT_Glyph objects. Each of them can contain a */ + /* bitmap, a vector outline, or even images in other formats. */ + /* */ + /*************************************************************************/ + + + /* forward declaration to a private type */ + typedef struct FT_Glyph_Class_ FT_Glyph_Class; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Glyph */ + /* */ + /* <Description> */ + /* Handle to an object used to model generic glyph images. It is a */ + /* pointer to the @FT_GlyphRec structure and can contain a glyph */ + /* bitmap or pointer. */ + /* */ + /* <Note> */ + /* Glyph objects are not owned by the library. You must thus release */ + /* them manually (through @FT_Done_Glyph) _before_ calling */ + /* @FT_Done_FreeType. */ + /* */ + typedef struct FT_GlyphRec_* FT_Glyph; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_GlyphRec */ + /* */ + /* <Description> */ + /* The root glyph structure contains a given glyph image plus its */ + /* advance width in 16.16 fixed-point format. */ + /* */ + /* <Fields> */ + /* library :: A handle to the FreeType library object. */ + /* */ + /* clazz :: A pointer to the glyph's class. Private. */ + /* */ + /* format :: The format of the glyph's image. */ + /* */ + /* advance :: A 16.16 vector that gives the glyph's advance width. */ + /* */ + typedef struct FT_GlyphRec_ + { + FT_Library library; + const FT_Glyph_Class* clazz; + FT_Glyph_Format format; + FT_Vector advance; + + } FT_GlyphRec; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_BitmapGlyph */ + /* */ + /* <Description> */ + /* A handle to an object used to model a bitmap glyph image. This is */ + /* a sub-class of @FT_Glyph, and a pointer to @FT_BitmapGlyphRec. */ + /* */ + typedef struct FT_BitmapGlyphRec_* FT_BitmapGlyph; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_BitmapGlyphRec */ + /* */ + /* <Description> */ + /* A structure used for bitmap glyph images. This really is a */ + /* `sub-class' of @FT_GlyphRec. */ + /* */ + /* <Fields> */ + /* root :: The root @FT_Glyph fields. */ + /* */ + /* left :: The left-side bearing, i.e., the horizontal distance */ + /* from the current pen position to the left border of the */ + /* glyph bitmap. */ + /* */ + /* top :: The top-side bearing, i.e., the vertical distance from */ + /* the current pen position to the top border of the glyph */ + /* bitmap. This distance is positive for upwards~y! */ + /* */ + /* bitmap :: A descriptor for the bitmap. */ + /* */ + /* <Note> */ + /* You can typecast an @FT_Glyph to @FT_BitmapGlyph if you have */ + /* `glyph->format == FT_GLYPH_FORMAT_BITMAP'. This lets you access */ + /* the bitmap's contents easily. */ + /* */ + /* The corresponding pixel buffer is always owned by @FT_BitmapGlyph */ + /* and is thus created and destroyed with it. */ + /* */ + typedef struct FT_BitmapGlyphRec_ + { + FT_GlyphRec root; + FT_Int left; + FT_Int top; + FT_Bitmap bitmap; + + } FT_BitmapGlyphRec; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_OutlineGlyph */ + /* */ + /* <Description> */ + /* A handle to an object used to model an outline glyph image. This */ + /* is a sub-class of @FT_Glyph, and a pointer to @FT_OutlineGlyphRec. */ + /* */ + typedef struct FT_OutlineGlyphRec_* FT_OutlineGlyph; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_OutlineGlyphRec */ + /* */ + /* <Description> */ + /* A structure used for outline (vectorial) glyph images. This */ + /* really is a `sub-class' of @FT_GlyphRec. */ + /* */ + /* <Fields> */ + /* root :: The root @FT_Glyph fields. */ + /* */ + /* outline :: A descriptor for the outline. */ + /* */ + /* <Note> */ + /* You can typecast an @FT_Glyph to @FT_OutlineGlyph if you have */ + /* `glyph->format == FT_GLYPH_FORMAT_OUTLINE'. This lets you access */ + /* the outline's content easily. */ + /* */ + /* As the outline is extracted from a glyph slot, its coordinates are */ + /* expressed normally in 26.6 pixels, unless the flag */ + /* @FT_LOAD_NO_SCALE was used in @FT_Load_Glyph() or @FT_Load_Char(). */ + /* */ + /* The outline's tables are always owned by the object and are */ + /* destroyed with it. */ + /* */ + typedef struct FT_OutlineGlyphRec_ + { + FT_GlyphRec root; + FT_Outline outline; + + } FT_OutlineGlyphRec; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Glyph */ + /* */ + /* <Description> */ + /* A function used to extract a glyph image from a slot. Note that */ + /* the created @FT_Glyph object must be released with @FT_Done_Glyph. */ + /* */ + /* <Input> */ + /* slot :: A handle to the source glyph slot. */ + /* */ + /* <Output> */ + /* aglyph :: A handle to the glyph object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* Because `*aglyph->advance.x' and '*aglyph->advance.y' are 16.16 */ + /* fixed-point numbers, `slot->advance.x' and `slot->advance.y' */ + /* (which are in 26.6 fixed-point format) must be in the range */ + /* ]-32768;32768[. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Glyph( FT_GlyphSlot slot, + FT_Glyph *aglyph ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Glyph_Copy */ + /* */ + /* <Description> */ + /* A function used to copy a glyph image. Note that the created */ + /* @FT_Glyph object must be released with @FT_Done_Glyph. */ + /* */ + /* <Input> */ + /* source :: A handle to the source glyph object. */ + /* */ + /* <Output> */ + /* target :: A handle to the target glyph object. 0~in case of */ + /* error. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Glyph_Copy( FT_Glyph source, + FT_Glyph *target ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Glyph_Transform */ + /* */ + /* <Description> */ + /* Transform a glyph image if its format is scalable. */ + /* */ + /* <InOut> */ + /* glyph :: A handle to the target glyph object. */ + /* */ + /* <Input> */ + /* matrix :: A pointer to a 2x2 matrix to apply. */ + /* */ + /* delta :: A pointer to a 2d vector to apply. Coordinates are */ + /* expressed in 1/64th of a pixel. */ + /* */ + /* <Return> */ + /* FreeType error code (if not 0, the glyph format is not scalable). */ + /* */ + /* <Note> */ + /* The 2x2 transformation matrix is also applied to the glyph's */ + /* advance vector. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Glyph_Transform( FT_Glyph glyph, + FT_Matrix* matrix, + FT_Vector* delta ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Glyph_BBox_Mode */ + /* */ + /* <Description> */ + /* The mode how the values of @FT_Glyph_Get_CBox are returned. */ + /* */ + /* <Values> */ + /* FT_GLYPH_BBOX_UNSCALED :: */ + /* Return unscaled font units. */ + /* */ + /* FT_GLYPH_BBOX_SUBPIXELS :: */ + /* Return unfitted 26.6 coordinates. */ + /* */ + /* FT_GLYPH_BBOX_GRIDFIT :: */ + /* Return grid-fitted 26.6 coordinates. */ + /* */ + /* FT_GLYPH_BBOX_TRUNCATE :: */ + /* Return coordinates in integer pixels. */ + /* */ + /* FT_GLYPH_BBOX_PIXELS :: */ + /* Return grid-fitted pixel coordinates. */ + /* */ + typedef enum FT_Glyph_BBox_Mode_ + { + FT_GLYPH_BBOX_UNSCALED = 0, + FT_GLYPH_BBOX_SUBPIXELS = 0, + FT_GLYPH_BBOX_GRIDFIT = 1, + FT_GLYPH_BBOX_TRUNCATE = 2, + FT_GLYPH_BBOX_PIXELS = 3 + + } FT_Glyph_BBox_Mode; + + + /* these constants are deprecated; use the corresponding */ + /* `FT_Glyph_BBox_Mode' values instead */ +#define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED +#define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS +#define ft_glyph_bbox_gridfit FT_GLYPH_BBOX_GRIDFIT +#define ft_glyph_bbox_truncate FT_GLYPH_BBOX_TRUNCATE +#define ft_glyph_bbox_pixels FT_GLYPH_BBOX_PIXELS + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Glyph_Get_CBox */ + /* */ + /* <Description> */ + /* Return a glyph's `control box'. The control box encloses all the */ + /* outline's points, including Bezier control points. Though it */ + /* coincides with the exact bounding box for most glyphs, it can be */ + /* slightly larger in some situations (like when rotating an outline */ + /* that contains Bezier outside arcs). */ + /* */ + /* Computing the control box is very fast, while getting the bounding */ + /* box can take much more time as it needs to walk over all segments */ + /* and arcs in the outline. To get the latter, you can use the */ + /* `ftbbox' component, which is dedicated to this single task. */ + /* */ + /* <Input> */ + /* glyph :: A handle to the source glyph object. */ + /* */ + /* mode :: The mode that indicates how to interpret the returned */ + /* bounding box values. */ + /* */ + /* <Output> */ + /* acbox :: The glyph coordinate bounding box. Coordinates are */ + /* expressed in 1/64th of pixels if it is grid-fitted. */ + /* */ + /* <Note> */ + /* Coordinates are relative to the glyph origin, using the y~upwards */ + /* convention. */ + /* */ + /* If the glyph has been loaded with @FT_LOAD_NO_SCALE, `bbox_mode' */ + /* must be set to @FT_GLYPH_BBOX_UNSCALED to get unscaled font */ + /* units in 26.6 pixel format. The value @FT_GLYPH_BBOX_SUBPIXELS */ + /* is another name for this constant. */ + /* */ + /* If the font is tricky and the glyph has been loaded with */ + /* @FT_LOAD_NO_SCALE, the resulting CBox is meaningless. To get */ + /* reasonable values for the CBox it is necessary to load the glyph */ + /* at a large ppem value (so that the hinting instructions can */ + /* properly shift and scale the subglyphs), then extracting the CBox, */ + /* which can be eventually converted back to font units. */ + /* */ + /* Note that the maximum coordinates are exclusive, which means that */ + /* one can compute the width and height of the glyph image (be it in */ + /* integer or 26.6 pixels) as: */ + /* */ + /* { */ + /* width = bbox.xMax - bbox.xMin; */ + /* height = bbox.yMax - bbox.yMin; */ + /* } */ + /* */ + /* Note also that for 26.6 coordinates, if `bbox_mode' is set to */ + /* @FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted, */ + /* which corresponds to: */ + /* */ + /* { */ + /* bbox.xMin = FLOOR(bbox.xMin); */ + /* bbox.yMin = FLOOR(bbox.yMin); */ + /* bbox.xMax = CEILING(bbox.xMax); */ + /* bbox.yMax = CEILING(bbox.yMax); */ + /* } */ + /* */ + /* To get the bbox in pixel coordinates, set `bbox_mode' to */ + /* @FT_GLYPH_BBOX_TRUNCATE. */ + /* */ + /* To get the bbox in grid-fitted pixel coordinates, set `bbox_mode' */ + /* to @FT_GLYPH_BBOX_PIXELS. */ + /* */ + FT_EXPORT( void ) + FT_Glyph_Get_CBox( FT_Glyph glyph, + FT_UInt bbox_mode, + FT_BBox *acbox ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Glyph_To_Bitmap */ + /* */ + /* <Description> */ + /* Convert a given glyph object to a bitmap glyph object. */ + /* */ + /* <InOut> */ + /* the_glyph :: A pointer to a handle to the target glyph. */ + /* */ + /* <Input> */ + /* render_mode :: An enumeration that describes how the data is */ + /* rendered. */ + /* */ + /* origin :: A pointer to a vector used to translate the glyph */ + /* image before rendering. Can be~0 (if no */ + /* translation). The origin is expressed in */ + /* 26.6 pixels. */ + /* */ + /* destroy :: A boolean that indicates that the original glyph */ + /* image should be destroyed by this function. It is */ + /* never destroyed in case of error. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function does nothing if the glyph format isn't scalable. */ + /* */ + /* The glyph image is translated with the `origin' vector before */ + /* rendering. */ + /* */ + /* The first parameter is a pointer to an @FT_Glyph handle, that will */ + /* be _replaced_ by this function (with newly allocated data). */ + /* Typically, you would use (omitting error handling): */ + /* */ + /* */ + /* { */ + /* FT_Glyph glyph; */ + /* FT_BitmapGlyph glyph_bitmap; */ + /* */ + /* */ + /* // load glyph */ + /* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAULT ); */ + /* */ + /* // extract glyph image */ + /* error = FT_Get_Glyph( face->glyph, &glyph ); */ + /* */ + /* // convert to a bitmap (default render mode + destroying old) */ + /* if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) */ + /* { */ + /* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL, */ + /* 0, 1 ); */ + /* if ( error ) // `glyph' unchanged */ + /* ... */ + /* } */ + /* */ + /* // access bitmap content by typecasting */ + /* glyph_bitmap = (FT_BitmapGlyph)glyph; */ + /* */ + /* // do funny stuff with it, like blitting/drawing */ + /* ... */ + /* */ + /* // discard glyph image (bitmap or not) */ + /* FT_Done_Glyph( glyph ); */ + /* } */ + /* */ + /* */ + /* Here another example, again without error handling: */ + /* */ + /* */ + /* { */ + /* FT_Glyph glyphs[MAX_GLYPHS] */ + /* */ + /* */ + /* ... */ + /* */ + /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ + /* error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) || */ + /* FT_Get_Glyph ( face->glyph, &glyph[idx] ); */ + /* */ + /* ... */ + /* */ + /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ + /* { */ + /* FT_Glyph bitmap = glyphs[idx]; */ + /* */ + /* */ + /* ... */ + /* */ + /* // after this call, `bitmap' no longer points into */ + /* // the `glyphs' array (and the old value isn't destroyed) */ + /* FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 ); */ + /* */ + /* ... */ + /* */ + /* FT_Done_Glyph( bitmap ); */ + /* } */ + /* */ + /* ... */ + /* */ + /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ + /* FT_Done_Glyph( glyphs[idx] ); */ + /* } */ + /* */ + FT_EXPORT( FT_Error ) + FT_Glyph_To_Bitmap( FT_Glyph* the_glyph, + FT_Render_Mode render_mode, + FT_Vector* origin, + FT_Bool destroy ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_Glyph */ + /* */ + /* <Description> */ + /* Destroy a given glyph. */ + /* */ + /* <Input> */ + /* glyph :: A handle to the target glyph object. */ + /* */ + FT_EXPORT( void ) + FT_Done_Glyph( FT_Glyph glyph ); + + /* */ + + + /* other helpful functions */ + + /*************************************************************************/ + /* */ + /* <Section> */ + /* computations */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Matrix_Multiply */ + /* */ + /* <Description> */ + /* Perform the matrix operation `b = a*b'. */ + /* */ + /* <Input> */ + /* a :: A pointer to matrix `a'. */ + /* */ + /* <InOut> */ + /* b :: A pointer to matrix `b'. */ + /* */ + /* <Note> */ + /* The result is undefined if either `a' or `b' is zero. */ + /* */ + /* Since the function uses wrap-around arithmetic, results become */ + /* meaningless if the arguments are very large. */ + /* */ + FT_EXPORT( void ) + FT_Matrix_Multiply( const FT_Matrix* a, + FT_Matrix* b ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Matrix_Invert */ + /* */ + /* <Description> */ + /* Invert a 2x2 matrix. Return an error if it can't be inverted. */ + /* */ + /* <InOut> */ + /* matrix :: A pointer to the target matrix. Remains untouched in */ + /* case of error. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Matrix_Invert( FT_Matrix* matrix ); + + /* */ + + +FT_END_HEADER + +#endif /* FTGLYPH_H_ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftgxval.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftgxval.h new file mode 100755 index 00000000..8382d599 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftgxval.h @@ -0,0 +1,357 @@ +/***************************************************************************/ +/* */ +/* ftgxval.h */ +/* */ +/* FreeType API for validating TrueTypeGX/AAT tables (specification). */ +/* */ +/* Copyright 2004-2018 by */ +/* Masatake YAMATO, Redhat K.K, */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +/***************************************************************************/ +/* */ +/* gxvalid is derived from both gxlayout module and otvalid module. */ +/* Development of gxlayout is supported by the Information-technology */ +/* Promotion Agency(IPA), Japan. */ +/* */ +/***************************************************************************/ + + +#ifndef FTGXVAL_H_ +#define FTGXVAL_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* gx_validation */ + /* */ + /* <Title> */ + /* TrueTypeGX/AAT Validation */ + /* */ + /* <Abstract> */ + /* An API to validate TrueTypeGX/AAT tables. */ + /* */ + /* <Description> */ + /* This section contains the declaration of functions to validate */ + /* some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, */ + /* trak, prop, lcar). */ + /* */ + /* <Order> */ + /* FT_TrueTypeGX_Validate */ + /* FT_TrueTypeGX_Free */ + /* */ + /* FT_ClassicKern_Validate */ + /* FT_ClassicKern_Free */ + /* */ + /* FT_VALIDATE_GX_LENGTH */ + /* FT_VALIDATE_GXXXX */ + /* FT_VALIDATE_CKERNXXX */ + /* */ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* */ + /* Warning: Use FT_VALIDATE_XXX to validate a table. */ + /* Following definitions are for gxvalid developers. */ + /* */ + /* */ + /*************************************************************************/ + +#define FT_VALIDATE_feat_INDEX 0 +#define FT_VALIDATE_mort_INDEX 1 +#define FT_VALIDATE_morx_INDEX 2 +#define FT_VALIDATE_bsln_INDEX 3 +#define FT_VALIDATE_just_INDEX 4 +#define FT_VALIDATE_kern_INDEX 5 +#define FT_VALIDATE_opbd_INDEX 6 +#define FT_VALIDATE_trak_INDEX 7 +#define FT_VALIDATE_prop_INDEX 8 +#define FT_VALIDATE_lcar_INDEX 9 +#define FT_VALIDATE_GX_LAST_INDEX FT_VALIDATE_lcar_INDEX + + + /************************************************************************* + * + * @macro: + * FT_VALIDATE_GX_LENGTH + * + * @description: + * The number of tables checked in this module. Use it as a parameter + * for the `table-length' argument of function @FT_TrueTypeGX_Validate. + */ +#define FT_VALIDATE_GX_LENGTH ( FT_VALIDATE_GX_LAST_INDEX + 1 ) + + /* */ + + /* Up to 0x1000 is used by otvalid. + Ox2xxx is reserved for feature OT extension. */ +#define FT_VALIDATE_GX_START 0x4000 +#define FT_VALIDATE_GX_BITFIELD( tag ) \ + ( FT_VALIDATE_GX_START << FT_VALIDATE_##tag##_INDEX ) + + + /********************************************************************** + * + * @enum: + * FT_VALIDATE_GXXXX + * + * @description: + * A list of bit-field constants used with @FT_TrueTypeGX_Validate to + * indicate which TrueTypeGX/AAT Type tables should be validated. + * + * @values: + * FT_VALIDATE_feat :: + * Validate `feat' table. + * + * FT_VALIDATE_mort :: + * Validate `mort' table. + * + * FT_VALIDATE_morx :: + * Validate `morx' table. + * + * FT_VALIDATE_bsln :: + * Validate `bsln' table. + * + * FT_VALIDATE_just :: + * Validate `just' table. + * + * FT_VALIDATE_kern :: + * Validate `kern' table. + * + * FT_VALIDATE_opbd :: + * Validate `opbd' table. + * + * FT_VALIDATE_trak :: + * Validate `trak' table. + * + * FT_VALIDATE_prop :: + * Validate `prop' table. + * + * FT_VALIDATE_lcar :: + * Validate `lcar' table. + * + * FT_VALIDATE_GX :: + * Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern, + * opbd, trak, prop and lcar). + * + */ + +#define FT_VALIDATE_feat FT_VALIDATE_GX_BITFIELD( feat ) +#define FT_VALIDATE_mort FT_VALIDATE_GX_BITFIELD( mort ) +#define FT_VALIDATE_morx FT_VALIDATE_GX_BITFIELD( morx ) +#define FT_VALIDATE_bsln FT_VALIDATE_GX_BITFIELD( bsln ) +#define FT_VALIDATE_just FT_VALIDATE_GX_BITFIELD( just ) +#define FT_VALIDATE_kern FT_VALIDATE_GX_BITFIELD( kern ) +#define FT_VALIDATE_opbd FT_VALIDATE_GX_BITFIELD( opbd ) +#define FT_VALIDATE_trak FT_VALIDATE_GX_BITFIELD( trak ) +#define FT_VALIDATE_prop FT_VALIDATE_GX_BITFIELD( prop ) +#define FT_VALIDATE_lcar FT_VALIDATE_GX_BITFIELD( lcar ) + +#define FT_VALIDATE_GX ( FT_VALIDATE_feat | \ + FT_VALIDATE_mort | \ + FT_VALIDATE_morx | \ + FT_VALIDATE_bsln | \ + FT_VALIDATE_just | \ + FT_VALIDATE_kern | \ + FT_VALIDATE_opbd | \ + FT_VALIDATE_trak | \ + FT_VALIDATE_prop | \ + FT_VALIDATE_lcar ) + + + /********************************************************************** + * + * @function: + * FT_TrueTypeGX_Validate + * + * @description: + * Validate various TrueTypeGX tables to assure that all offsets and + * indices are valid. The idea is that a higher-level library that + * actually does the text layout can access those tables without + * error checking (which can be quite time consuming). + * + * @input: + * face :: + * A handle to the input face. + * + * validation_flags :: + * A bit field that specifies the tables to be validated. See + * @FT_VALIDATE_GXXXX for possible values. + * + * table_length :: + * The size of the `tables' array. Normally, @FT_VALIDATE_GX_LENGTH + * should be passed. + * + * @output: + * tables :: + * The array where all validated sfnt tables are stored. + * The array itself must be allocated by a client. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with TrueTypeGX fonts, returning an error + * otherwise. + * + * After use, the application should deallocate the buffers pointed to by + * each `tables' element, by calling @FT_TrueTypeGX_Free. A NULL value + * indicates that the table either doesn't exist in the font, the + * application hasn't asked for validation, or the validator doesn't have + * the ability to validate the sfnt table. + */ + FT_EXPORT( FT_Error ) + FT_TrueTypeGX_Validate( FT_Face face, + FT_UInt validation_flags, + FT_Bytes tables[FT_VALIDATE_GX_LENGTH], + FT_UInt table_length ); + + + /********************************************************************** + * + * @function: + * FT_TrueTypeGX_Free + * + * @description: + * Free the buffer allocated by TrueTypeGX validator. + * + * @input: + * face :: + * A handle to the input face. + * + * table :: + * The pointer to the buffer allocated by + * @FT_TrueTypeGX_Validate. + * + * @note: + * This function must be used to free the buffer allocated by + * @FT_TrueTypeGX_Validate only. + */ + FT_EXPORT( void ) + FT_TrueTypeGX_Free( FT_Face face, + FT_Bytes table ); + + + /********************************************************************** + * + * @enum: + * FT_VALIDATE_CKERNXXX + * + * @description: + * A list of bit-field constants used with @FT_ClassicKern_Validate + * to indicate the classic kern dialect or dialects. If the selected + * type doesn't fit, @FT_ClassicKern_Validate regards the table as + * invalid. + * + * @values: + * FT_VALIDATE_MS :: + * Handle the `kern' table as a classic Microsoft kern table. + * + * FT_VALIDATE_APPLE :: + * Handle the `kern' table as a classic Apple kern table. + * + * FT_VALIDATE_CKERN :: + * Handle the `kern' as either classic Apple or Microsoft kern table. + */ +#define FT_VALIDATE_MS ( FT_VALIDATE_GX_START << 0 ) +#define FT_VALIDATE_APPLE ( FT_VALIDATE_GX_START << 1 ) + +#define FT_VALIDATE_CKERN ( FT_VALIDATE_MS | FT_VALIDATE_APPLE ) + + + /********************************************************************** + * + * @function: + * FT_ClassicKern_Validate + * + * @description: + * Validate classic (16-bit format) kern table to assure that the offsets + * and indices are valid. The idea is that a higher-level library that + * actually does the text layout can access those tables without error + * checking (which can be quite time consuming). + * + * The `kern' table validator in @FT_TrueTypeGX_Validate deals with both + * the new 32-bit format and the classic 16-bit format, while + * FT_ClassicKern_Validate only supports the classic 16-bit format. + * + * @input: + * face :: + * A handle to the input face. + * + * validation_flags :: + * A bit field that specifies the dialect to be validated. See + * @FT_VALIDATE_CKERNXXX for possible values. + * + * @output: + * ckern_table :: + * A pointer to the kern table. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * After use, the application should deallocate the buffers pointed to by + * `ckern_table', by calling @FT_ClassicKern_Free. A NULL value + * indicates that the table doesn't exist in the font. + */ + FT_EXPORT( FT_Error ) + FT_ClassicKern_Validate( FT_Face face, + FT_UInt validation_flags, + FT_Bytes *ckern_table ); + + + /********************************************************************** + * + * @function: + * FT_ClassicKern_Free + * + * @description: + * Free the buffer allocated by classic Kern validator. + * + * @input: + * face :: + * A handle to the input face. + * + * table :: + * The pointer to the buffer that is allocated by + * @FT_ClassicKern_Validate. + * + * @note: + * This function must be used to free the buffer allocated by + * @FT_ClassicKern_Validate only. + */ + FT_EXPORT( void ) + FT_ClassicKern_Free( FT_Face face, + FT_Bytes table ); + + /* */ + + +FT_END_HEADER + +#endif /* FTGXVAL_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftgzip.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftgzip.h new file mode 100755 index 00000000..db033da0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftgzip.h @@ -0,0 +1,151 @@ +/***************************************************************************/ +/* */ +/* ftgzip.h */ +/* */ +/* Gzip-compressed stream support. */ +/* */ +/* Copyright 2002-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTGZIP_H_ +#define FTGZIP_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* <Section> */ + /* gzip */ + /* */ + /* <Title> */ + /* GZIP Streams */ + /* */ + /* <Abstract> */ + /* Using gzip-compressed font files. */ + /* */ + /* <Description> */ + /* This section contains the declaration of Gzip-specific functions. */ + /* */ + /*************************************************************************/ + + + /************************************************************************ + * + * @function: + * FT_Stream_OpenGzip + * + * @description: + * Open a new stream to parse gzip-compressed font files. This is + * mainly used to support the compressed `*.pcf.gz' fonts that come + * with XFree86. + * + * @input: + * stream :: + * The target embedding stream. + * + * source :: + * The source stream. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source stream must be opened _before_ calling this function. + * + * Calling the internal function `FT_Stream_Close' on the new stream will + * *not* call `FT_Stream_Close' on the source stream. None of the stream + * objects will be released to the heap. + * + * The stream implementation is very basic and resets the decompression + * process each time seeking backwards is needed within the stream. + * + * In certain builds of the library, gzip compression recognition is + * automatically handled when calling @FT_New_Face or @FT_Open_Face. + * This means that if no font driver is capable of handling the raw + * compressed file, the library will try to open a gzipped stream from + * it and re-open the face with it. + * + * This function may return `FT_Err_Unimplemented_Feature' if your build + * of FreeType was not compiled with zlib support. + */ + FT_EXPORT( FT_Error ) + FT_Stream_OpenGzip( FT_Stream stream, + FT_Stream source ); + + + /************************************************************************ + * + * @function: + * FT_Gzip_Uncompress + * + * @description: + * Decompress a zipped input buffer into an output buffer. This function + * is modeled after zlib's `uncompress' function. + * + * @input: + * memory :: + * A FreeType memory handle. + * + * input :: + * The input buffer. + * + * input_len :: + * The length of the input buffer. + * + * @output: + * output:: + * The output buffer. + * + * @inout: + * output_len :: + * Before calling the function, this is the total size of the output + * buffer, which must be large enough to hold the entire uncompressed + * data (so the size of the uncompressed data must be known in + * advance). After calling the function, `output_len' is the size of + * the used data in `output'. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function may return `FT_Err_Unimplemented_Feature' if your build + * of FreeType was not compiled with zlib support. + * + * @since: + * 2.5.1 + */ + FT_EXPORT( FT_Error ) + FT_Gzip_Uncompress( FT_Memory memory, + FT_Byte* output, + FT_ULong* output_len, + const FT_Byte* input, + FT_ULong input_len ); + + /* */ + + +FT_END_HEADER + +#endif /* FTGZIP_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftimage.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftimage.h new file mode 100755 index 00000000..79ede195 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftimage.h @@ -0,0 +1,1205 @@ +/***************************************************************************/ +/* */ +/* ftimage.h */ +/* */ +/* FreeType glyph image formats and default raster interface */ +/* (specification). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + /*************************************************************************/ + /* */ + /* Note: A `raster' is simply a scan-line converter, used to render */ + /* FT_Outlines into FT_Bitmaps. */ + /* */ + /*************************************************************************/ + + +#ifndef FTIMAGE_H_ +#define FTIMAGE_H_ + + + /* STANDALONE_ is from ftgrays.c */ +#ifndef STANDALONE_ +#include <ft2build.h> +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* basic_types */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Pos */ + /* */ + /* <Description> */ + /* The type FT_Pos is used to store vectorial coordinates. Depending */ + /* on the context, these can represent distances in integer font */ + /* units, or 16.16, or 26.6 fixed-point pixel coordinates. */ + /* */ + typedef signed long FT_Pos; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Vector */ + /* */ + /* <Description> */ + /* A simple structure used to store a 2D vector; coordinates are of */ + /* the FT_Pos type. */ + /* */ + /* <Fields> */ + /* x :: The horizontal coordinate. */ + /* y :: The vertical coordinate. */ + /* */ + typedef struct FT_Vector_ + { + FT_Pos x; + FT_Pos y; + + } FT_Vector; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_BBox */ + /* */ + /* <Description> */ + /* A structure used to hold an outline's bounding box, i.e., the */ + /* coordinates of its extrema in the horizontal and vertical */ + /* directions. */ + /* */ + /* <Fields> */ + /* xMin :: The horizontal minimum (left-most). */ + /* */ + /* yMin :: The vertical minimum (bottom-most). */ + /* */ + /* xMax :: The horizontal maximum (right-most). */ + /* */ + /* yMax :: The vertical maximum (top-most). */ + /* */ + /* <Note> */ + /* The bounding box is specified with the coordinates of the lower */ + /* left and the upper right corner. In PostScript, those values are */ + /* often called (llx,lly) and (urx,ury), respectively. */ + /* */ + /* If `yMin' is negative, this value gives the glyph's descender. */ + /* Otherwise, the glyph doesn't descend below the baseline. */ + /* Similarly, if `ymax' is positive, this value gives the glyph's */ + /* ascender. */ + /* */ + /* `xMin' gives the horizontal distance from the glyph's origin to */ + /* the left edge of the glyph's bounding box. If `xMin' is negative, */ + /* the glyph extends to the left of the origin. */ + /* */ + typedef struct FT_BBox_ + { + FT_Pos xMin, yMin; + FT_Pos xMax, yMax; + + } FT_BBox; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Pixel_Mode */ + /* */ + /* <Description> */ + /* An enumeration type used to describe the format of pixels in a */ + /* given bitmap. Note that additional formats may be added in the */ + /* future. */ + /* */ + /* <Values> */ + /* FT_PIXEL_MODE_NONE :: */ + /* Value~0 is reserved. */ + /* */ + /* FT_PIXEL_MODE_MONO :: */ + /* A monochrome bitmap, using 1~bit per pixel. Note that pixels */ + /* are stored in most-significant order (MSB), which means that */ + /* the left-most pixel in a byte has value 128. */ + /* */ + /* FT_PIXEL_MODE_GRAY :: */ + /* An 8-bit bitmap, generally used to represent anti-aliased glyph */ + /* images. Each pixel is stored in one byte. Note that the number */ + /* of `gray' levels is stored in the `num_grays' field of the */ + /* @FT_Bitmap structure (it generally is 256). */ + /* */ + /* FT_PIXEL_MODE_GRAY2 :: */ + /* A 2-bit per pixel bitmap, used to represent embedded */ + /* anti-aliased bitmaps in font files according to the OpenType */ + /* specification. We haven't found a single font using this */ + /* format, however. */ + /* */ + /* FT_PIXEL_MODE_GRAY4 :: */ + /* A 4-bit per pixel bitmap, representing embedded anti-aliased */ + /* bitmaps in font files according to the OpenType specification. */ + /* We haven't found a single font using this format, however. */ + /* */ + /* FT_PIXEL_MODE_LCD :: */ + /* An 8-bit bitmap, representing RGB or BGR decimated glyph images */ + /* used for display on LCD displays; the bitmap is three times */ + /* wider than the original glyph image. See also */ + /* @FT_RENDER_MODE_LCD. */ + /* */ + /* FT_PIXEL_MODE_LCD_V :: */ + /* An 8-bit bitmap, representing RGB or BGR decimated glyph images */ + /* used for display on rotated LCD displays; the bitmap is three */ + /* times taller than the original glyph image. See also */ + /* @FT_RENDER_MODE_LCD_V. */ + /* */ + /* FT_PIXEL_MODE_BGRA :: */ + /* [Since 2.5] An image with four 8-bit channels per pixel, */ + /* representing a color image (such as emoticons) with alpha */ + /* channel. For each pixel, the format is BGRA, which means, the */ + /* blue channel comes first in memory. The color channels are */ + /* pre-multiplied and in the sRGB colorspace. For example, full */ + /* red at half-translucent opacity will be represented as */ + /* `00,00,80,80', not `00,00,FF,80'. See also @FT_LOAD_COLOR. */ + /* */ + typedef enum FT_Pixel_Mode_ + { + FT_PIXEL_MODE_NONE = 0, + FT_PIXEL_MODE_MONO, + FT_PIXEL_MODE_GRAY, + FT_PIXEL_MODE_GRAY2, + FT_PIXEL_MODE_GRAY4, + FT_PIXEL_MODE_LCD, + FT_PIXEL_MODE_LCD_V, + FT_PIXEL_MODE_BGRA, + + FT_PIXEL_MODE_MAX /* do not remove */ + + } FT_Pixel_Mode; + + + /* these constants are deprecated; use the corresponding `FT_Pixel_Mode' */ + /* values instead. */ +#define ft_pixel_mode_none FT_PIXEL_MODE_NONE +#define ft_pixel_mode_mono FT_PIXEL_MODE_MONO +#define ft_pixel_mode_grays FT_PIXEL_MODE_GRAY +#define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2 +#define ft_pixel_mode_pal4 FT_PIXEL_MODE_GRAY4 + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Bitmap */ + /* */ + /* <Description> */ + /* A structure used to describe a bitmap or pixmap to the raster. */ + /* Note that we now manage pixmaps of various depths through the */ + /* `pixel_mode' field. */ + /* */ + /* <Fields> */ + /* rows :: The number of bitmap rows. */ + /* */ + /* width :: The number of pixels in bitmap row. */ + /* */ + /* pitch :: The pitch's absolute value is the number of bytes */ + /* taken by one bitmap row, including padding. */ + /* However, the pitch is positive when the bitmap has */ + /* a `down' flow, and negative when it has an `up' */ + /* flow. In all cases, the pitch is an offset to add */ + /* to a bitmap pointer in order to go down one row. */ + /* */ + /* Note that `padding' means the alignment of a */ + /* bitmap to a byte border, and FreeType functions */ + /* normally align to the smallest possible integer */ + /* value. */ + /* */ + /* For the B/W rasterizer, `pitch' is always an even */ + /* number. */ + /* */ + /* To change the pitch of a bitmap (say, to make it a */ + /* multiple of 4), use @FT_Bitmap_Convert. */ + /* Alternatively, you might use callback functions to */ + /* directly render to the application's surface; see */ + /* the file `example2.cpp' in the tutorial for a */ + /* demonstration. */ + /* */ + /* buffer :: A typeless pointer to the bitmap buffer. This */ + /* value should be aligned on 32-bit boundaries in */ + /* most cases. */ + /* */ + /* num_grays :: This field is only used with */ + /* @FT_PIXEL_MODE_GRAY; it gives the number of gray */ + /* levels used in the bitmap. */ + /* */ + /* pixel_mode :: The pixel mode, i.e., how pixel bits are stored. */ + /* See @FT_Pixel_Mode for possible values. */ + /* */ + /* palette_mode :: This field is intended for paletted pixel modes; */ + /* it indicates how the palette is stored. Not */ + /* used currently. */ + /* */ + /* palette :: A typeless pointer to the bitmap palette; this */ + /* field is intended for paletted pixel modes. Not */ + /* used currently. */ + /* */ + typedef struct FT_Bitmap_ + { + unsigned int rows; + unsigned int width; + int pitch; + unsigned char* buffer; + unsigned short num_grays; + unsigned char pixel_mode; + unsigned char palette_mode; + void* palette; + + } FT_Bitmap; + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* outline_processing */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Outline */ + /* */ + /* <Description> */ + /* This structure is used to describe an outline to the scan-line */ + /* converter. */ + /* */ + /* <Fields> */ + /* n_contours :: The number of contours in the outline. */ + /* */ + /* n_points :: The number of points in the outline. */ + /* */ + /* points :: A pointer to an array of `n_points' @FT_Vector */ + /* elements, giving the outline's point coordinates. */ + /* */ + /* tags :: A pointer to an array of `n_points' chars, giving */ + /* each outline point's type. */ + /* */ + /* If bit~0 is unset, the point is `off' the curve, */ + /* i.e., a Bezier control point, while it is `on' if */ + /* set. */ + /* */ + /* Bit~1 is meaningful for `off' points only. If set, */ + /* it indicates a third-order Bezier arc control point; */ + /* and a second-order control point if unset. */ + /* */ + /* If bit~2 is set, bits 5-7 contain the drop-out mode */ + /* (as defined in the OpenType specification; the value */ + /* is the same as the argument to the SCANMODE */ + /* instruction). */ + /* */ + /* Bits 3 and~4 are reserved for internal purposes. */ + /* */ + /* contours :: An array of `n_contours' shorts, giving the end */ + /* point of each contour within the outline. For */ + /* example, the first contour is defined by the points */ + /* `0' to `contours[0]', the second one is defined by */ + /* the points `contours[0]+1' to `contours[1]', etc. */ + /* */ + /* flags :: A set of bit flags used to characterize the outline */ + /* and give hints to the scan-converter and hinter on */ + /* how to convert/grid-fit it. See @FT_OUTLINE_XXX. */ + /* */ + /* <Note> */ + /* The B/W rasterizer only checks bit~2 in the `tags' array for the */ + /* first point of each contour. The drop-out mode as given with */ + /* @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and */ + /* @FT_OUTLINE_INCLUDE_STUBS in `flags' is then overridden. */ + /* */ + typedef struct FT_Outline_ + { + short n_contours; /* number of contours in glyph */ + short n_points; /* number of points in the glyph */ + + FT_Vector* points; /* the outline's points */ + char* tags; /* the points flags */ + short* contours; /* the contour end points */ + + int flags; /* outline masks */ + + } FT_Outline; + + /* */ + + /* Following limits must be consistent with */ + /* FT_Outline.{n_contours,n_points} */ +#define FT_OUTLINE_CONTOURS_MAX SHRT_MAX +#define FT_OUTLINE_POINTS_MAX SHRT_MAX + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_OUTLINE_XXX */ + /* */ + /* <Description> */ + /* A list of bit-field constants use for the flags in an outline's */ + /* `flags' field. */ + /* */ + /* <Values> */ + /* FT_OUTLINE_NONE :: */ + /* Value~0 is reserved. */ + /* */ + /* FT_OUTLINE_OWNER :: */ + /* If set, this flag indicates that the outline's field arrays */ + /* (i.e., `points', `flags', and `contours') are `owned' by the */ + /* outline object, and should thus be freed when it is destroyed. */ + /* */ + /* FT_OUTLINE_EVEN_ODD_FILL :: */ + /* By default, outlines are filled using the non-zero winding rule. */ + /* If set to 1, the outline will be filled using the even-odd fill */ + /* rule (only works with the smooth rasterizer). */ + /* */ + /* FT_OUTLINE_REVERSE_FILL :: */ + /* By default, outside contours of an outline are oriented in */ + /* clock-wise direction, as defined in the TrueType specification. */ + /* This flag is set if the outline uses the opposite direction */ + /* (typically for Type~1 fonts). This flag is ignored by the scan */ + /* converter. */ + /* */ + /* FT_OUTLINE_IGNORE_DROPOUTS :: */ + /* By default, the scan converter will try to detect drop-outs in */ + /* an outline and correct the glyph bitmap to ensure consistent */ + /* shape continuity. If set, this flag hints the scan-line */ + /* converter to ignore such cases. See below for more information. */ + /* */ + /* FT_OUTLINE_SMART_DROPOUTS :: */ + /* Select smart dropout control. If unset, use simple dropout */ + /* control. Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See */ + /* below for more information. */ + /* */ + /* FT_OUTLINE_INCLUDE_STUBS :: */ + /* If set, turn pixels on for `stubs', otherwise exclude them. */ + /* Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See below for */ + /* more information. */ + /* */ + /* FT_OUTLINE_HIGH_PRECISION :: */ + /* This flag indicates that the scan-line converter should try to */ + /* convert this outline to bitmaps with the highest possible */ + /* quality. It is typically set for small character sizes. Note */ + /* that this is only a hint that might be completely ignored by a */ + /* given scan-converter. */ + /* */ + /* FT_OUTLINE_SINGLE_PASS :: */ + /* This flag is set to force a given scan-converter to only use a */ + /* single pass over the outline to render a bitmap glyph image. */ + /* Normally, it is set for very large character sizes. It is only */ + /* a hint that might be completely ignored by a given */ + /* scan-converter. */ + /* */ + /* <Note> */ + /* The flags @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, */ + /* and @FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth */ + /* rasterizer. */ + /* */ + /* There exists a second mechanism to pass the drop-out mode to the */ + /* B/W rasterizer; see the `tags' field in @FT_Outline. */ + /* */ + /* Please refer to the description of the `SCANTYPE' instruction in */ + /* the OpenType specification (in file `ttinst1.doc') how simple */ + /* drop-outs, smart drop-outs, and stubs are defined. */ + /* */ +#define FT_OUTLINE_NONE 0x0 +#define FT_OUTLINE_OWNER 0x1 +#define FT_OUTLINE_EVEN_ODD_FILL 0x2 +#define FT_OUTLINE_REVERSE_FILL 0x4 +#define FT_OUTLINE_IGNORE_DROPOUTS 0x8 +#define FT_OUTLINE_SMART_DROPOUTS 0x10 +#define FT_OUTLINE_INCLUDE_STUBS 0x20 + +#define FT_OUTLINE_HIGH_PRECISION 0x100 +#define FT_OUTLINE_SINGLE_PASS 0x200 + + + /* these constants are deprecated; use the corresponding */ + /* `FT_OUTLINE_XXX' values instead */ +#define ft_outline_none FT_OUTLINE_NONE +#define ft_outline_owner FT_OUTLINE_OWNER +#define ft_outline_even_odd_fill FT_OUTLINE_EVEN_ODD_FILL +#define ft_outline_reverse_fill FT_OUTLINE_REVERSE_FILL +#define ft_outline_ignore_dropouts FT_OUTLINE_IGNORE_DROPOUTS +#define ft_outline_high_precision FT_OUTLINE_HIGH_PRECISION +#define ft_outline_single_pass FT_OUTLINE_SINGLE_PASS + + /* */ + +#define FT_CURVE_TAG( flag ) ( flag & 3 ) + +#define FT_CURVE_TAG_ON 1 +#define FT_CURVE_TAG_CONIC 0 +#define FT_CURVE_TAG_CUBIC 2 + +#define FT_CURVE_TAG_HAS_SCANMODE 4 + +#define FT_CURVE_TAG_TOUCH_X 8 /* reserved for the TrueType hinter */ +#define FT_CURVE_TAG_TOUCH_Y 16 /* reserved for the TrueType hinter */ + +#define FT_CURVE_TAG_TOUCH_BOTH ( FT_CURVE_TAG_TOUCH_X | \ + FT_CURVE_TAG_TOUCH_Y ) + +#define FT_Curve_Tag_On FT_CURVE_TAG_ON +#define FT_Curve_Tag_Conic FT_CURVE_TAG_CONIC +#define FT_Curve_Tag_Cubic FT_CURVE_TAG_CUBIC +#define FT_Curve_Tag_Touch_X FT_CURVE_TAG_TOUCH_X +#define FT_Curve_Tag_Touch_Y FT_CURVE_TAG_TOUCH_Y + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Outline_MoveToFunc */ + /* */ + /* <Description> */ + /* A function pointer type used to describe the signature of a `move */ + /* to' function during outline walking/decomposition. */ + /* */ + /* A `move to' is emitted to start a new contour in an outline. */ + /* */ + /* <Input> */ + /* to :: A pointer to the target point of the `move to'. */ + /* */ + /* user :: A typeless pointer, which is passed from the caller of the */ + /* decomposition function. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + typedef int + (*FT_Outline_MoveToFunc)( const FT_Vector* to, + void* user ); + +#define FT_Outline_MoveTo_Func FT_Outline_MoveToFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Outline_LineToFunc */ + /* */ + /* <Description> */ + /* A function pointer type used to describe the signature of a `line */ + /* to' function during outline walking/decomposition. */ + /* */ + /* A `line to' is emitted to indicate a segment in the outline. */ + /* */ + /* <Input> */ + /* to :: A pointer to the target point of the `line to'. */ + /* */ + /* user :: A typeless pointer, which is passed from the caller of the */ + /* decomposition function. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + typedef int + (*FT_Outline_LineToFunc)( const FT_Vector* to, + void* user ); + +#define FT_Outline_LineTo_Func FT_Outline_LineToFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Outline_ConicToFunc */ + /* */ + /* <Description> */ + /* A function pointer type used to describe the signature of a `conic */ + /* to' function during outline walking or decomposition. */ + /* */ + /* A `conic to' is emitted to indicate a second-order Bezier arc in */ + /* the outline. */ + /* */ + /* <Input> */ + /* control :: An intermediate control point between the last position */ + /* and the new target in `to'. */ + /* */ + /* to :: A pointer to the target end point of the conic arc. */ + /* */ + /* user :: A typeless pointer, which is passed from the caller of */ + /* the decomposition function. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + typedef int + (*FT_Outline_ConicToFunc)( const FT_Vector* control, + const FT_Vector* to, + void* user ); + +#define FT_Outline_ConicTo_Func FT_Outline_ConicToFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Outline_CubicToFunc */ + /* */ + /* <Description> */ + /* A function pointer type used to describe the signature of a `cubic */ + /* to' function during outline walking or decomposition. */ + /* */ + /* A `cubic to' is emitted to indicate a third-order Bezier arc. */ + /* */ + /* <Input> */ + /* control1 :: A pointer to the first Bezier control point. */ + /* */ + /* control2 :: A pointer to the second Bezier control point. */ + /* */ + /* to :: A pointer to the target end point. */ + /* */ + /* user :: A typeless pointer, which is passed from the caller of */ + /* the decomposition function. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + typedef int + (*FT_Outline_CubicToFunc)( const FT_Vector* control1, + const FT_Vector* control2, + const FT_Vector* to, + void* user ); + +#define FT_Outline_CubicTo_Func FT_Outline_CubicToFunc + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Outline_Funcs */ + /* */ + /* <Description> */ + /* A structure to hold various function pointers used during outline */ + /* decomposition in order to emit segments, conic, and cubic Beziers. */ + /* */ + /* <Fields> */ + /* move_to :: The `move to' emitter. */ + /* */ + /* line_to :: The segment emitter. */ + /* */ + /* conic_to :: The second-order Bezier arc emitter. */ + /* */ + /* cubic_to :: The third-order Bezier arc emitter. */ + /* */ + /* shift :: The shift that is applied to coordinates before they */ + /* are sent to the emitter. */ + /* */ + /* delta :: The delta that is applied to coordinates before they */ + /* are sent to the emitter, but after the shift. */ + /* */ + /* <Note> */ + /* The point coordinates sent to the emitters are the transformed */ + /* version of the original coordinates (this is important for high */ + /* accuracy during scan-conversion). The transformation is simple: */ + /* */ + /* { */ + /* x' = (x << shift) - delta */ + /* y' = (y << shift) - delta */ + /* } */ + /* */ + /* Set the values of `shift' and `delta' to~0 to get the original */ + /* point coordinates. */ + /* */ + typedef struct FT_Outline_Funcs_ + { + FT_Outline_MoveToFunc move_to; + FT_Outline_LineToFunc line_to; + FT_Outline_ConicToFunc conic_to; + FT_Outline_CubicToFunc cubic_to; + + int shift; + FT_Pos delta; + + } FT_Outline_Funcs; + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* basic_types */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_IMAGE_TAG */ + /* */ + /* <Description> */ + /* This macro converts four-letter tags to an unsigned long type. */ + /* */ + /* <Note> */ + /* Since many 16-bit compilers don't like 32-bit enumerations, you */ + /* should redefine this macro in case of problems to something like */ + /* this: */ + /* */ + /* { */ + /* #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value */ + /* } */ + /* */ + /* to get a simple enumeration without assigning special numbers. */ + /* */ +#ifndef FT_IMAGE_TAG +#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) \ + value = ( ( (unsigned long)_x1 << 24 ) | \ + ( (unsigned long)_x2 << 16 ) | \ + ( (unsigned long)_x3 << 8 ) | \ + (unsigned long)_x4 ) +#endif /* FT_IMAGE_TAG */ + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Glyph_Format */ + /* */ + /* <Description> */ + /* An enumeration type used to describe the format of a given glyph */ + /* image. Note that this version of FreeType only supports two image */ + /* formats, even though future font drivers will be able to register */ + /* their own format. */ + /* */ + /* <Values> */ + /* FT_GLYPH_FORMAT_NONE :: */ + /* The value~0 is reserved. */ + /* */ + /* FT_GLYPH_FORMAT_COMPOSITE :: */ + /* The glyph image is a composite of several other images. This */ + /* format is _only_ used with @FT_LOAD_NO_RECURSE, and is used to */ + /* report compound glyphs (like accented characters). */ + /* */ + /* FT_GLYPH_FORMAT_BITMAP :: */ + /* The glyph image is a bitmap, and can be described as an */ + /* @FT_Bitmap. You generally need to access the `bitmap' field of */ + /* the @FT_GlyphSlotRec structure to read it. */ + /* */ + /* FT_GLYPH_FORMAT_OUTLINE :: */ + /* The glyph image is a vectorial outline made of line segments */ + /* and Bezier arcs; it can be described as an @FT_Outline; you */ + /* generally want to access the `outline' field of the */ + /* @FT_GlyphSlotRec structure to read it. */ + /* */ + /* FT_GLYPH_FORMAT_PLOTTER :: */ + /* The glyph image is a vectorial path with no inside and outside */ + /* contours. Some Type~1 fonts, like those in the Hershey family, */ + /* contain glyphs in this format. These are described as */ + /* @FT_Outline, but FreeType isn't currently capable of rendering */ + /* them correctly. */ + /* */ + typedef enum FT_Glyph_Format_ + { + FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ), + + FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ), + FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP, 'b', 'i', 't', 's' ), + FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE, 'o', 'u', 't', 'l' ), + FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER, 'p', 'l', 'o', 't' ) + + } FT_Glyph_Format; + + + /* these constants are deprecated; use the corresponding */ + /* `FT_Glyph_Format' values instead. */ +#define ft_glyph_format_none FT_GLYPH_FORMAT_NONE +#define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE +#define ft_glyph_format_bitmap FT_GLYPH_FORMAT_BITMAP +#define ft_glyph_format_outline FT_GLYPH_FORMAT_OUTLINE +#define ft_glyph_format_plotter FT_GLYPH_FORMAT_PLOTTER + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** R A S T E R D E F I N I T I O N S *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* A raster is a scan converter, in charge of rendering an outline into */ + /* a bitmap. This section contains the public API for rasters. */ + /* */ + /* Note that in FreeType 2, all rasters are now encapsulated within */ + /* specific modules called `renderers'. See `ftrender.h' for more */ + /* details on renderers. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* raster */ + /* */ + /* <Title> */ + /* Scanline Converter */ + /* */ + /* <Abstract> */ + /* How vectorial outlines are converted into bitmaps and pixmaps. */ + /* */ + /* <Description> */ + /* This section contains technical definitions. */ + /* */ + /* <Order> */ + /* FT_Raster */ + /* FT_Span */ + /* FT_SpanFunc */ + /* */ + /* FT_Raster_Params */ + /* FT_RASTER_FLAG_XXX */ + /* */ + /* FT_Raster_NewFunc */ + /* FT_Raster_DoneFunc */ + /* FT_Raster_ResetFunc */ + /* FT_Raster_SetModeFunc */ + /* FT_Raster_RenderFunc */ + /* FT_Raster_Funcs */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Raster */ + /* */ + /* <Description> */ + /* An opaque handle (pointer) to a raster object. Each object can be */ + /* used independently to convert an outline into a bitmap or pixmap. */ + /* */ + typedef struct FT_RasterRec_* FT_Raster; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Span */ + /* */ + /* <Description> */ + /* A structure used to model a single span of gray pixels when */ + /* rendering an anti-aliased bitmap. */ + /* */ + /* <Fields> */ + /* x :: The span's horizontal start position. */ + /* */ + /* len :: The span's length in pixels. */ + /* */ + /* coverage :: The span color/coverage, ranging from 0 (background) */ + /* to 255 (foreground). */ + /* */ + /* <Note> */ + /* This structure is used by the span drawing callback type named */ + /* @FT_SpanFunc that takes the y~coordinate of the span as a */ + /* parameter. */ + /* */ + /* The coverage value is always between 0 and 255. If you want less */ + /* gray values, the callback function has to reduce them. */ + /* */ + typedef struct FT_Span_ + { + short x; + unsigned short len; + unsigned char coverage; + + } FT_Span; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_SpanFunc */ + /* */ + /* <Description> */ + /* A function used as a call-back by the anti-aliased renderer in */ + /* order to let client applications draw themselves the gray pixel */ + /* spans on each scan line. */ + /* */ + /* <Input> */ + /* y :: The scanline's y~coordinate. */ + /* */ + /* count :: The number of spans to draw on this scanline. */ + /* */ + /* spans :: A table of `count' spans to draw on the scanline. */ + /* */ + /* user :: User-supplied data that is passed to the callback. */ + /* */ + /* <Note> */ + /* This callback allows client applications to directly render the */ + /* gray spans of the anti-aliased bitmap to any kind of surfaces. */ + /* */ + /* This can be used to write anti-aliased outlines directly to a */ + /* given background bitmap, and even perform translucency. */ + /* */ + typedef void + (*FT_SpanFunc)( int y, + int count, + const FT_Span* spans, + void* user ); + +#define FT_Raster_Span_Func FT_SpanFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_BitTest_Func */ + /* */ + /* <Description> */ + /* Deprecated, unimplemented. */ + /* */ + typedef int + (*FT_Raster_BitTest_Func)( int y, + int x, + void* user ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_BitSet_Func */ + /* */ + /* <Description> */ + /* Deprecated, unimplemented. */ + /* */ + typedef void + (*FT_Raster_BitSet_Func)( int y, + int x, + void* user ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_RASTER_FLAG_XXX */ + /* */ + /* <Description> */ + /* A list of bit flag constants as used in the `flags' field of a */ + /* @FT_Raster_Params structure. */ + /* */ + /* <Values> */ + /* FT_RASTER_FLAG_DEFAULT :: This value is 0. */ + /* */ + /* FT_RASTER_FLAG_AA :: This flag is set to indicate that an */ + /* anti-aliased glyph image should be */ + /* generated. Otherwise, it will be */ + /* monochrome (1-bit). */ + /* */ + /* FT_RASTER_FLAG_DIRECT :: This flag is set to indicate direct */ + /* rendering. In this mode, client */ + /* applications must provide their own span */ + /* callback. This lets them directly */ + /* draw or compose over an existing bitmap. */ + /* If this bit is not set, the target */ + /* pixmap's buffer _must_ be zeroed before */ + /* rendering. */ + /* */ + /* Direct rendering is only possible with */ + /* anti-aliased glyphs. */ + /* */ + /* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */ + /* rendering mode. If set, the output will */ + /* be clipped to a box specified in the */ + /* `clip_box' field of the */ + /* @FT_Raster_Params structure. */ + /* */ + /* Note that by default, the glyph bitmap */ + /* is clipped to the target pixmap, except */ + /* in direct rendering mode where all spans */ + /* are generated if no clipping box is set. */ + /* */ +#define FT_RASTER_FLAG_DEFAULT 0x0 +#define FT_RASTER_FLAG_AA 0x1 +#define FT_RASTER_FLAG_DIRECT 0x2 +#define FT_RASTER_FLAG_CLIP 0x4 + + /* these constants are deprecated; use the corresponding */ + /* `FT_RASTER_FLAG_XXX' values instead */ +#define ft_raster_flag_default FT_RASTER_FLAG_DEFAULT +#define ft_raster_flag_aa FT_RASTER_FLAG_AA +#define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT +#define ft_raster_flag_clip FT_RASTER_FLAG_CLIP + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Raster_Params */ + /* */ + /* <Description> */ + /* A structure to hold the arguments used by a raster's render */ + /* function. */ + /* */ + /* <Fields> */ + /* target :: The target bitmap. */ + /* */ + /* source :: A pointer to the source glyph image (e.g., an */ + /* @FT_Outline). */ + /* */ + /* flags :: The rendering flags. */ + /* */ + /* gray_spans :: The gray span drawing callback. */ + /* */ + /* black_spans :: Unused. */ + /* */ + /* bit_test :: Unused. */ + /* */ + /* bit_set :: Unused. */ + /* */ + /* user :: User-supplied data that is passed to each drawing */ + /* callback. */ + /* */ + /* clip_box :: An optional clipping box. It is only used in */ + /* direct rendering mode. Note that coordinates here */ + /* should be expressed in _integer_ pixels (and not in */ + /* 26.6 fixed-point units). */ + /* */ + /* <Note> */ + /* An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA */ + /* bit flag is set in the `flags' field, otherwise a monochrome */ + /* bitmap is generated. */ + /* */ + /* If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the */ + /* raster will call the `gray_spans' callback to draw gray pixel */ + /* spans. This allows direct composition over a pre-existing bitmap */ + /* through user-provided callbacks to perform the span drawing and */ + /* composition. Not supported by the monochrome rasterizer. */ + /* */ + typedef struct FT_Raster_Params_ + { + const FT_Bitmap* target; + const void* source; + int flags; + FT_SpanFunc gray_spans; + FT_SpanFunc black_spans; /* unused */ + FT_Raster_BitTest_Func bit_test; /* unused */ + FT_Raster_BitSet_Func bit_set; /* unused */ + void* user; + FT_BBox clip_box; + + } FT_Raster_Params; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_NewFunc */ + /* */ + /* <Description> */ + /* A function used to create a new raster object. */ + /* */ + /* <Input> */ + /* memory :: A handle to the memory allocator. */ + /* */ + /* <Output> */ + /* raster :: A handle to the new raster object. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + /* <Note> */ + /* The `memory' parameter is a typeless pointer in order to avoid */ + /* un-wanted dependencies on the rest of the FreeType code. In */ + /* practice, it is an @FT_Memory object, i.e., a handle to the */ + /* standard FreeType memory allocator. However, this field can be */ + /* completely ignored by a given raster implementation. */ + /* */ + typedef int + (*FT_Raster_NewFunc)( void* memory, + FT_Raster* raster ); + +#define FT_Raster_New_Func FT_Raster_NewFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_DoneFunc */ + /* */ + /* <Description> */ + /* A function used to destroy a given raster object. */ + /* */ + /* <Input> */ + /* raster :: A handle to the raster object. */ + /* */ + typedef void + (*FT_Raster_DoneFunc)( FT_Raster raster ); + +#define FT_Raster_Done_Func FT_Raster_DoneFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_ResetFunc */ + /* */ + /* <Description> */ + /* FreeType used to provide an area of memory called the `render */ + /* pool' available to all registered rasterizers. This was not */ + /* thread safe, however, and now FreeType never allocates this pool. */ + /* */ + /* This function is called after a new raster object is created. */ + /* */ + /* <Input> */ + /* raster :: A handle to the new raster object. */ + /* */ + /* pool_base :: Previously, the address in memory of the render pool. */ + /* Set this to NULL. */ + /* */ + /* pool_size :: Previously, the size in bytes of the render pool. */ + /* Set this to 0. */ + /* */ + /* <Note> */ + /* Rasterizers should rely on dynamic or stack allocation if they */ + /* want to (a handle to the memory allocator is passed to the */ + /* rasterizer constructor). */ + /* */ + typedef void + (*FT_Raster_ResetFunc)( FT_Raster raster, + unsigned char* pool_base, + unsigned long pool_size ); + +#define FT_Raster_Reset_Func FT_Raster_ResetFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_SetModeFunc */ + /* */ + /* <Description> */ + /* This function is a generic facility to change modes or attributes */ + /* in a given raster. This can be used for debugging purposes, or */ + /* simply to allow implementation-specific `features' in a given */ + /* raster module. */ + /* */ + /* <Input> */ + /* raster :: A handle to the new raster object. */ + /* */ + /* mode :: A 4-byte tag used to name the mode or property. */ + /* */ + /* args :: A pointer to the new mode/property to use. */ + /* */ + typedef int + (*FT_Raster_SetModeFunc)( FT_Raster raster, + unsigned long mode, + void* args ); + +#define FT_Raster_Set_Mode_Func FT_Raster_SetModeFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_RenderFunc */ + /* */ + /* <Description> */ + /* Invoke a given raster to scan-convert a given glyph image into a */ + /* target bitmap. */ + /* */ + /* <Input> */ + /* raster :: A handle to the raster object. */ + /* */ + /* params :: A pointer to an @FT_Raster_Params structure used to */ + /* store the rendering parameters. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + /* <Note> */ + /* The exact format of the source image depends on the raster's glyph */ + /* format defined in its @FT_Raster_Funcs structure. It can be an */ + /* @FT_Outline or anything else in order to support a large array of */ + /* glyph formats. */ + /* */ + /* Note also that the render function can fail and return a */ + /* `FT_Err_Unimplemented_Feature' error code if the raster used does */ + /* not support direct composition. */ + /* */ + /* XXX: For now, the standard raster doesn't support direct */ + /* composition but this should change for the final release (see */ + /* the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c' */ + /* for examples of distinct implementations that support direct */ + /* composition). */ + /* */ + typedef int + (*FT_Raster_RenderFunc)( FT_Raster raster, + const FT_Raster_Params* params ); + +#define FT_Raster_Render_Func FT_Raster_RenderFunc + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Raster_Funcs */ + /* */ + /* <Description> */ + /* A structure used to describe a given raster class to the library. */ + /* */ + /* <Fields> */ + /* glyph_format :: The supported glyph format for this raster. */ + /* */ + /* raster_new :: The raster constructor. */ + /* */ + /* raster_reset :: Used to reset the render pool within the raster. */ + /* */ + /* raster_render :: A function to render a glyph into a given bitmap. */ + /* */ + /* raster_done :: The raster destructor. */ + /* */ + typedef struct FT_Raster_Funcs_ + { + FT_Glyph_Format glyph_format; + + FT_Raster_NewFunc raster_new; + FT_Raster_ResetFunc raster_reset; + FT_Raster_SetModeFunc raster_set_mode; + FT_Raster_RenderFunc raster_render; + FT_Raster_DoneFunc raster_done; + + } FT_Raster_Funcs; + + /* */ + + +FT_END_HEADER + +#endif /* FTIMAGE_H_ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftincrem.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftincrem.h new file mode 100755 index 00000000..44619f94 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftincrem.h @@ -0,0 +1,343 @@ +/***************************************************************************/ +/* */ +/* ftincrem.h */ +/* */ +/* FreeType incremental loading (specification). */ +/* */ +/* Copyright 2002-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTINCREM_H_ +#define FTINCREM_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H +#include FT_PARAMETER_TAGS_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************** + * + * @section: + * incremental + * + * @title: + * Incremental Loading + * + * @abstract: + * Custom Glyph Loading. + * + * @description: + * This section contains various functions used to perform so-called + * `incremental' glyph loading. This is a mode where all glyphs loaded + * from a given @FT_Face are provided by the client application. + * + * Apart from that, all other tables are loaded normally from the font + * file. This mode is useful when FreeType is used within another + * engine, e.g., a PostScript Imaging Processor. + * + * To enable this mode, you must use @FT_Open_Face, passing an + * @FT_Parameter with the @FT_PARAM_TAG_INCREMENTAL tag and an + * @FT_Incremental_Interface value. See the comments for + * @FT_Incremental_InterfaceRec for an example. + * + */ + + + /*************************************************************************** + * + * @type: + * FT_Incremental + * + * @description: + * An opaque type describing a user-provided object used to implement + * `incremental' glyph loading within FreeType. This is used to support + * embedded fonts in certain environments (e.g., PostScript interpreters), + * where the glyph data isn't in the font file, or must be overridden by + * different values. + * + * @note: + * It is up to client applications to create and implement @FT_Incremental + * objects, as long as they provide implementations for the methods + * @FT_Incremental_GetGlyphDataFunc, @FT_Incremental_FreeGlyphDataFunc + * and @FT_Incremental_GetGlyphMetricsFunc. + * + * See the description of @FT_Incremental_InterfaceRec to understand how + * to use incremental objects with FreeType. + * + */ + typedef struct FT_IncrementalRec_* FT_Incremental; + + + /*************************************************************************** + * + * @struct: + * FT_Incremental_MetricsRec + * + * @description: + * A small structure used to contain the basic glyph metrics returned + * by the @FT_Incremental_GetGlyphMetricsFunc method. + * + * @fields: + * bearing_x :: + * Left bearing, in font units. + * + * bearing_y :: + * Top bearing, in font units. + * + * advance :: + * Horizontal component of glyph advance, in font units. + * + * advance_v :: + * Vertical component of glyph advance, in font units. + * + * @note: + * These correspond to horizontal or vertical metrics depending on the + * value of the `vertical' argument to the function + * @FT_Incremental_GetGlyphMetricsFunc. + * + */ + typedef struct FT_Incremental_MetricsRec_ + { + FT_Long bearing_x; + FT_Long bearing_y; + FT_Long advance; + FT_Long advance_v; /* since 2.3.12 */ + + } FT_Incremental_MetricsRec; + + + /*************************************************************************** + * + * @struct: + * FT_Incremental_Metrics + * + * @description: + * A handle to an @FT_Incremental_MetricsRec structure. + * + */ + typedef struct FT_Incremental_MetricsRec_* FT_Incremental_Metrics; + + + /*************************************************************************** + * + * @type: + * FT_Incremental_GetGlyphDataFunc + * + * @description: + * A function called by FreeType to access a given glyph's data bytes + * during @FT_Load_Glyph or @FT_Load_Char if incremental loading is + * enabled. + * + * Note that the format of the glyph's data bytes depends on the font + * file format. For TrueType, it must correspond to the raw bytes within + * the `glyf' table. For PostScript formats, it must correspond to the + * *unencrypted* charstring bytes, without any `lenIV' header. It is + * undefined for any other format. + * + * @input: + * incremental :: + * Handle to an opaque @FT_Incremental handle provided by the client + * application. + * + * glyph_index :: + * Index of relevant glyph. + * + * @output: + * adata :: + * A structure describing the returned glyph data bytes (which will be + * accessed as a read-only byte block). + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If this function returns successfully the method + * @FT_Incremental_FreeGlyphDataFunc will be called later to release + * the data bytes. + * + * Nested calls to @FT_Incremental_GetGlyphDataFunc can happen for + * compound glyphs. + * + */ + typedef FT_Error + (*FT_Incremental_GetGlyphDataFunc)( FT_Incremental incremental, + FT_UInt glyph_index, + FT_Data* adata ); + + + /*************************************************************************** + * + * @type: + * FT_Incremental_FreeGlyphDataFunc + * + * @description: + * A function used to release the glyph data bytes returned by a + * successful call to @FT_Incremental_GetGlyphDataFunc. + * + * @input: + * incremental :: + * A handle to an opaque @FT_Incremental handle provided by the client + * application. + * + * data :: + * A structure describing the glyph data bytes (which will be accessed + * as a read-only byte block). + * + */ + typedef void + (*FT_Incremental_FreeGlyphDataFunc)( FT_Incremental incremental, + FT_Data* data ); + + + /*************************************************************************** + * + * @type: + * FT_Incremental_GetGlyphMetricsFunc + * + * @description: + * A function used to retrieve the basic metrics of a given glyph index + * before accessing its data. This is necessary because, in certain + * formats like TrueType, the metrics are stored in a different place from + * the glyph images proper. + * + * @input: + * incremental :: + * A handle to an opaque @FT_Incremental handle provided by the client + * application. + * + * glyph_index :: + * Index of relevant glyph. + * + * vertical :: + * If true, return vertical metrics. + * + * ametrics :: + * This parameter is used for both input and output. + * The original glyph metrics, if any, in font units. If metrics are + * not available all the values must be set to zero. + * + * @output: + * ametrics :: + * The replacement glyph metrics in font units. + * + */ + typedef FT_Error + (*FT_Incremental_GetGlyphMetricsFunc) + ( FT_Incremental incremental, + FT_UInt glyph_index, + FT_Bool vertical, + FT_Incremental_MetricsRec *ametrics ); + + + /************************************************************************** + * + * @struct: + * FT_Incremental_FuncsRec + * + * @description: + * A table of functions for accessing fonts that load data + * incrementally. Used in @FT_Incremental_InterfaceRec. + * + * @fields: + * get_glyph_data :: + * The function to get glyph data. Must not be null. + * + * free_glyph_data :: + * The function to release glyph data. Must not be null. + * + * get_glyph_metrics :: + * The function to get glyph metrics. May be null if the font does + * not provide overriding glyph metrics. + * + */ + typedef struct FT_Incremental_FuncsRec_ + { + FT_Incremental_GetGlyphDataFunc get_glyph_data; + FT_Incremental_FreeGlyphDataFunc free_glyph_data; + FT_Incremental_GetGlyphMetricsFunc get_glyph_metrics; + + } FT_Incremental_FuncsRec; + + + /*************************************************************************** + * + * @struct: + * FT_Incremental_InterfaceRec + * + * @description: + * A structure to be used with @FT_Open_Face to indicate that the user + * wants to support incremental glyph loading. You should use it with + * @FT_PARAM_TAG_INCREMENTAL as in the following example: + * + * { + * FT_Incremental_InterfaceRec inc_int; + * FT_Parameter parameter; + * FT_Open_Args open_args; + * + * + * // set up incremental descriptor + * inc_int.funcs = my_funcs; + * inc_int.object = my_object; + * + * // set up optional parameter + * parameter.tag = FT_PARAM_TAG_INCREMENTAL; + * parameter.data = &inc_int; + * + * // set up FT_Open_Args structure + * open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; + * open_args.pathname = my_font_pathname; + * open_args.num_params = 1; + * open_args.params = ¶meter; // we use one optional argument + * + * // open the font + * error = FT_Open_Face( library, &open_args, index, &face ); + * ... + * } + * + */ + typedef struct FT_Incremental_InterfaceRec_ + { + const FT_Incremental_FuncsRec* funcs; + FT_Incremental object; + + } FT_Incremental_InterfaceRec; + + + /*************************************************************************** + * + * @type: + * FT_Incremental_Interface + * + * @description: + * A pointer to an @FT_Incremental_InterfaceRec structure. + * + */ + typedef FT_Incremental_InterfaceRec* FT_Incremental_Interface; + + + /* */ + + +FT_END_HEADER + +#endif /* FTINCREM_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftlcdfil.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftlcdfil.h new file mode 100755 index 00000000..2a27196c --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftlcdfil.h @@ -0,0 +1,309 @@ +/***************************************************************************/ +/* */ +/* ftlcdfil.h */ +/* */ +/* FreeType API for color filtering of subpixel bitmap glyphs */ +/* (specification). */ +/* */ +/* Copyright 2006-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTLCDFIL_H_ +#define FTLCDFIL_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H +#include FT_PARAMETER_TAGS_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************** + * + * @section: + * lcd_filtering + * + * @title: + * LCD Filtering + * + * @abstract: + * Reduce color fringes of subpixel-rendered bitmaps. + * + * @description: + * Should you #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your + * `ftoption.h', which enables patented ClearType-style rendering, + * the LCD-optimized glyph bitmaps should be filtered to reduce color + * fringes inherent to this technology. The default FreeType LCD + * rendering uses different technology, and API described below, + * although available, does nothing. + * + * ClearType-style LCD rendering exploits the color-striped structure of + * LCD pixels, increasing the available resolution in the direction of + * the stripe (usually horizontal RGB) by a factor of~3. Since these + * subpixels are color pixels, using them unfiltered creates severe + * color fringes. Use the @FT_Library_SetLcdFilter API to specify a + * low-pass filter, which is then applied to subpixel-rendered bitmaps + * generated through @FT_Render_Glyph. The filter sacrifices some of + * the higher resolution to reduce color fringes, making the glyph image + * slightly blurrier. Positional improvements will remain. + * + * A filter should have two properties: + * + * 1) It should be normalized, meaning the sum of the 5~components + * should be 256 (0x100). It is possible to go above or under this + * target sum, however: going under means tossing out contrast, going + * over means invoking clamping and thereby non-linearities that + * increase contrast somewhat at the expense of greater distortion + * and color-fringing. Contrast is better enhanced through stem + * darkening. + * + * 2) It should be color-balanced, meaning a filter `{~a, b, c, b, a~}' + * where a~+ b~=~c. It distributes the computed coverage for one + * subpixel to all subpixels equally, sacrificing some won resolution + * but drastically reducing color-fringing. Positioning improvements + * remain! Note that color-fringing can only really be minimized + * when using a color-balanced filter and alpha-blending the glyph + * onto a surface in linear space; see @FT_Render_Glyph. + * + * Regarding the form, a filter can be a `boxy' filter or a `beveled' + * filter. Boxy filters are sharper but are less forgiving of non-ideal + * gamma curves of a screen (viewing angles!), beveled filters are + * fuzzier but more tolerant. + * + * Examples: + * + * - [0x10 0x40 0x70 0x40 0x10] is beveled and neither balanced nor + * normalized. + * + * - [0x1A 0x33 0x4D 0x33 0x1A] is beveled and balanced but not + * normalized. + * + * - [0x19 0x33 0x66 0x4c 0x19] is beveled and normalized but not + * balanced. + * + * - [0x00 0x4c 0x66 0x4c 0x00] is boxily beveled and normalized but not + * balanced. + * + * - [0x00 0x55 0x56 0x55 0x00] is boxy, normalized, and almost + * balanced. + * + * - [0x08 0x4D 0x56 0x4D 0x08] is beveled, normalized and, almost + * balanced. + * + * The filter affects glyph bitmaps rendered through @FT_Render_Glyph, + * @FT_Load_Glyph, and @FT_Load_Char. It does _not_ affect the output + * of @FT_Outline_Render and @FT_Outline_Get_Bitmap. + * + * If this feature is activated, the dimensions of LCD glyph bitmaps are + * either wider or taller than the dimensions of the corresponding + * outline with regard to the pixel grid. For example, for + * @FT_RENDER_MODE_LCD, the filter adds 3~subpixels to the left, and + * 3~subpixels to the right. The bitmap offset values are adjusted + * accordingly, so clients shouldn't need to modify their layout and + * glyph positioning code when enabling the filter. + * + * It is important to understand that linear alpha blending and gamma + * correction is critical for correctly rendering glyphs onto surfaces + * without artifacts and even more critical when subpixel rendering is + * involved. + * + * Each of the 3~alpha values (subpixels) is independently used to blend + * one color channel. That is, red alpha blends the red channel of the + * text color with the red channel of the background pixel. The + * distribution of density values by the color-balanced filter assumes + * alpha blending is done in linear space; only then color artifacts + * cancel out. + */ + + + /**************************************************************************** + * + * @enum: + * FT_LcdFilter + * + * @description: + * A list of values to identify various types of LCD filters. + * + * @values: + * FT_LCD_FILTER_NONE :: + * Do not perform filtering. When used with subpixel rendering, this + * results in sometimes severe color fringes. + * + * FT_LCD_FILTER_DEFAULT :: + * The default filter reduces color fringes considerably, at the cost + * of a slight blurriness in the output. + * + * It is a beveled, normalized, and color-balanced five-tap filter + * that is more forgiving to screens with non-ideal gamma curves and + * viewing angles. Note that while color-fringing is reduced, it can + * only be minimized by using linear alpha blending and gamma + * correction to render glyphs onto surfaces. The default filter + * weights are [0x08 0x4D 0x56 0x4D 0x08]. + * + * FT_LCD_FILTER_LIGHT :: + * The light filter is a variant that is sharper at the cost of + * slightly more color fringes than the default one. + * + * It is a boxy, normalized, and color-balanced three-tap filter that + * is less forgiving to screens with non-ideal gamma curves and + * viewing angles. This filter works best when the rendering system + * uses linear alpha blending and gamma correction to render glyphs + * onto surfaces. The light filter weights are + * [0x00 0x55 0x56 0x55 0x00]. + * + * FT_LCD_FILTER_LEGACY :: + * This filter corresponds to the original libXft color filter. It + * provides high contrast output but can exhibit really bad color + * fringes if glyphs are not extremely well hinted to the pixel grid. + * In other words, it only works well if the TrueType bytecode + * interpreter is enabled *and* high-quality hinted fonts are used. + * + * This filter is only provided for comparison purposes, and might be + * disabled or stay unsupported in the future. + * + * FT_LCD_FILTER_LEGACY1 :: + * For historical reasons, the FontConfig library returns a different + * enumeration value for legacy LCD filtering. To make code work that + * (incorrectly) forwards FontConfig's enumeration value to + * @FT_Library_SetLcdFilter without proper mapping, it is thus easiest + * to have another enumeration value, which is completely equal to + * `FT_LCD_FILTER_LEGACY'. + * + * @since: + * 2.3.0 (`FT_LCD_FILTER_LEGACY1' since 2.6.2) + */ + typedef enum FT_LcdFilter_ + { + FT_LCD_FILTER_NONE = 0, + FT_LCD_FILTER_DEFAULT = 1, + FT_LCD_FILTER_LIGHT = 2, + FT_LCD_FILTER_LEGACY1 = 3, + FT_LCD_FILTER_LEGACY = 16, + + FT_LCD_FILTER_MAX /* do not remove */ + + } FT_LcdFilter; + + + /************************************************************************** + * + * @func: + * FT_Library_SetLcdFilter + * + * @description: + * This function is used to apply color filtering to LCD decimated + * bitmaps, like the ones used when calling @FT_Render_Glyph with + * @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V. + * + * @input: + * library :: + * A handle to the target library instance. + * + * filter :: + * The filter type. + * + * You can use @FT_LCD_FILTER_NONE here to disable this feature, or + * @FT_LCD_FILTER_DEFAULT to use a default filter that should work + * well on most LCD screens. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This feature is always disabled by default. Clients must make an + * explicit call to this function with a `filter' value other than + * @FT_LCD_FILTER_NONE in order to enable it. + * + * Due to *PATENTS* covering subpixel rendering, this function doesn't + * do anything except returning `FT_Err_Unimplemented_Feature' if the + * configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not + * defined in your build of the library, which should correspond to all + * default builds of FreeType. + * + * @since: + * 2.3.0 + */ + FT_EXPORT( FT_Error ) + FT_Library_SetLcdFilter( FT_Library library, + FT_LcdFilter filter ); + + + /************************************************************************** + * + * @func: + * FT_Library_SetLcdFilterWeights + * + * @description: + * This function can be used to enable LCD filter with custom weights, + * instead of using presets in @FT_Library_SetLcdFilter. + * + * @input: + * library :: + * A handle to the target library instance. + * + * weights :: + * A pointer to an array; the function copies the first five bytes and + * uses them to specify the filter weights. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * Due to *PATENTS* covering subpixel rendering, this function doesn't + * do anything except returning `FT_Err_Unimplemented_Feature' if the + * configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not + * defined in your build of the library, which should correspond to all + * default builds of FreeType. + * + * LCD filter weights can also be set per face using @FT_Face_Properties + * with @FT_PARAM_TAG_LCD_FILTER_WEIGHTS. + * + * @since: + * 2.4.0 + */ + FT_EXPORT( FT_Error ) + FT_Library_SetLcdFilterWeights( FT_Library library, + unsigned char *weights ); + + + /* + * @type: + * FT_LcdFiveTapFilter + * + * @description: + * A typedef for passing the five LCD filter weights to + * @FT_Face_Properties within an @FT_Parameter structure. + * + * @since: + * 2.8 + * + */ +#define FT_LCD_FILTER_FIVE_TAPS 5 + + typedef FT_Byte FT_LcdFiveTapFilter[FT_LCD_FILTER_FIVE_TAPS]; + + + /* */ + + +FT_END_HEADER + +#endif /* FTLCDFIL_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftlist.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftlist.h new file mode 100755 index 00000000..117473b9 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftlist.h @@ -0,0 +1,276 @@ +/***************************************************************************/ +/* */ +/* ftlist.h */ +/* */ +/* Generic list support for FreeType (specification). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file implements functions relative to list processing. Its */ + /* data structures are defined in `freetype.h'. */ + /* */ + /*************************************************************************/ + + +#ifndef FTLIST_H_ +#define FTLIST_H_ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* list_processing */ + /* */ + /* <Title> */ + /* List Processing */ + /* */ + /* <Abstract> */ + /* Simple management of lists. */ + /* */ + /* <Description> */ + /* This section contains various definitions related to list */ + /* processing using doubly-linked nodes. */ + /* */ + /* <Order> */ + /* FT_List */ + /* FT_ListNode */ + /* FT_ListRec */ + /* FT_ListNodeRec */ + /* */ + /* FT_List_Add */ + /* FT_List_Insert */ + /* FT_List_Find */ + /* FT_List_Remove */ + /* FT_List_Up */ + /* FT_List_Iterate */ + /* FT_List_Iterator */ + /* FT_List_Finalize */ + /* FT_List_Destructor */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Find */ + /* */ + /* <Description> */ + /* Find the list node for a given listed object. */ + /* */ + /* <Input> */ + /* list :: A pointer to the parent list. */ + /* data :: The address of the listed object. */ + /* */ + /* <Return> */ + /* List node. NULL if it wasn't found. */ + /* */ + FT_EXPORT( FT_ListNode ) + FT_List_Find( FT_List list, + void* data ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Add */ + /* */ + /* <Description> */ + /* Append an element to the end of a list. */ + /* */ + /* <InOut> */ + /* list :: A pointer to the parent list. */ + /* node :: The node to append. */ + /* */ + FT_EXPORT( void ) + FT_List_Add( FT_List list, + FT_ListNode node ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Insert */ + /* */ + /* <Description> */ + /* Insert an element at the head of a list. */ + /* */ + /* <InOut> */ + /* list :: A pointer to parent list. */ + /* node :: The node to insert. */ + /* */ + FT_EXPORT( void ) + FT_List_Insert( FT_List list, + FT_ListNode node ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Remove */ + /* */ + /* <Description> */ + /* Remove a node from a list. This function doesn't check whether */ + /* the node is in the list! */ + /* */ + /* <Input> */ + /* node :: The node to remove. */ + /* */ + /* <InOut> */ + /* list :: A pointer to the parent list. */ + /* */ + FT_EXPORT( void ) + FT_List_Remove( FT_List list, + FT_ListNode node ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Up */ + /* */ + /* <Description> */ + /* Move a node to the head/top of a list. Used to maintain LRU */ + /* lists. */ + /* */ + /* <InOut> */ + /* list :: A pointer to the parent list. */ + /* node :: The node to move. */ + /* */ + FT_EXPORT( void ) + FT_List_Up( FT_List list, + FT_ListNode node ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_List_Iterator */ + /* */ + /* <Description> */ + /* An FT_List iterator function that is called during a list parse */ + /* by @FT_List_Iterate. */ + /* */ + /* <Input> */ + /* node :: The current iteration list node. */ + /* */ + /* user :: A typeless pointer passed to @FT_List_Iterate. */ + /* Can be used to point to the iteration's state. */ + /* */ + typedef FT_Error + (*FT_List_Iterator)( FT_ListNode node, + void* user ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Iterate */ + /* */ + /* <Description> */ + /* Parse a list and calls a given iterator function on each element. */ + /* Note that parsing is stopped as soon as one of the iterator calls */ + /* returns a non-zero value. */ + /* */ + /* <Input> */ + /* list :: A handle to the list. */ + /* iterator :: An iterator function, called on each node of the list. */ + /* user :: A user-supplied field that is passed as the second */ + /* argument to the iterator. */ + /* */ + /* <Return> */ + /* The result (a FreeType error code) of the last iterator call. */ + /* */ + FT_EXPORT( FT_Error ) + FT_List_Iterate( FT_List list, + FT_List_Iterator iterator, + void* user ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_List_Destructor */ + /* */ + /* <Description> */ + /* An @FT_List iterator function that is called during a list */ + /* finalization by @FT_List_Finalize to destroy all elements in a */ + /* given list. */ + /* */ + /* <Input> */ + /* system :: The current system object. */ + /* */ + /* data :: The current object to destroy. */ + /* */ + /* user :: A typeless pointer passed to @FT_List_Iterate. It can */ + /* be used to point to the iteration's state. */ + /* */ + typedef void + (*FT_List_Destructor)( FT_Memory memory, + void* data, + void* user ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Finalize */ + /* */ + /* <Description> */ + /* Destroy all elements in the list as well as the list itself. */ + /* */ + /* <Input> */ + /* list :: A handle to the list. */ + /* */ + /* destroy :: A list destructor that will be applied to each element */ + /* of the list. Set this to NULL if not needed. */ + /* */ + /* memory :: The current memory object that handles deallocation. */ + /* */ + /* user :: A user-supplied field that is passed as the last */ + /* argument to the destructor. */ + /* */ + /* <Note> */ + /* This function expects that all nodes added by @FT_List_Add or */ + /* @FT_List_Insert have been dynamically allocated. */ + /* */ + FT_EXPORT( void ) + FT_List_Finalize( FT_List list, + FT_List_Destructor destroy, + FT_Memory memory, + void* user ); + + /* */ + + +FT_END_HEADER + +#endif /* FTLIST_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftlzw.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftlzw.h new file mode 100755 index 00000000..1615912d --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftlzw.h @@ -0,0 +1,99 @@ +/***************************************************************************/ +/* */ +/* ftlzw.h */ +/* */ +/* LZW-compressed stream support. */ +/* */ +/* Copyright 2004-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTLZW_H_ +#define FTLZW_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* <Section> */ + /* lzw */ + /* */ + /* <Title> */ + /* LZW Streams */ + /* */ + /* <Abstract> */ + /* Using LZW-compressed font files. */ + /* */ + /* <Description> */ + /* This section contains the declaration of LZW-specific functions. */ + /* */ + /*************************************************************************/ + + /************************************************************************ + * + * @function: + * FT_Stream_OpenLZW + * + * @description: + * Open a new stream to parse LZW-compressed font files. This is + * mainly used to support the compressed `*.pcf.Z' fonts that come + * with XFree86. + * + * @input: + * stream :: The target embedding stream. + * + * source :: The source stream. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source stream must be opened _before_ calling this function. + * + * Calling the internal function `FT_Stream_Close' on the new stream will + * *not* call `FT_Stream_Close' on the source stream. None of the stream + * objects will be released to the heap. + * + * The stream implementation is very basic and resets the decompression + * process each time seeking backwards is needed within the stream + * + * In certain builds of the library, LZW compression recognition is + * automatically handled when calling @FT_New_Face or @FT_Open_Face. + * This means that if no font driver is capable of handling the raw + * compressed file, the library will try to open a LZW stream from it + * and re-open the face with it. + * + * This function may return `FT_Err_Unimplemented_Feature' if your build + * of FreeType was not compiled with LZW support. + */ + FT_EXPORT( FT_Error ) + FT_Stream_OpenLZW( FT_Stream stream, + FT_Stream source ); + + /* */ + + +FT_END_HEADER + +#endif /* FTLZW_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftmac.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftmac.h new file mode 100755 index 00000000..c1e497ca --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftmac.h @@ -0,0 +1,275 @@ +/***************************************************************************/ +/* */ +/* ftmac.h */ +/* */ +/* Additional Mac-specific API. */ +/* */ +/* Copyright 1996-2018 by */ +/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* NOTE: Include this file after FT_FREETYPE_H and after any */ +/* Mac-specific headers (because this header uses Mac types such as */ +/* Handle, FSSpec, FSRef, etc.) */ +/* */ +/***************************************************************************/ + + +#ifndef FTMAC_H_ +#define FTMAC_H_ + + +#include <ft2build.h> + + +FT_BEGIN_HEADER + + + /* gcc-3.1 and later can warn about functions tagged as deprecated */ +#ifndef FT_DEPRECATED_ATTRIBUTE +#if defined( __GNUC__ ) && \ + ( ( __GNUC__ >= 4 ) || \ + ( ( __GNUC__ == 3 ) && ( __GNUC_MINOR__ >= 1 ) ) ) +#define FT_DEPRECATED_ATTRIBUTE __attribute__(( deprecated )) +#else +#define FT_DEPRECATED_ATTRIBUTE +#endif +#endif + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* mac_specific */ + /* */ + /* <Title> */ + /* Mac Specific Interface */ + /* */ + /* <Abstract> */ + /* Only available on the Macintosh. */ + /* */ + /* <Description> */ + /* The following definitions are only available if FreeType is */ + /* compiled on a Macintosh. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Face_From_FOND */ + /* */ + /* <Description> */ + /* Create a new face object from a FOND resource. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* fond :: A FOND resource. */ + /* */ + /* face_index :: Only supported for the -1 `sanity check' special */ + /* case. */ + /* */ + /* <Output> */ + /* aface :: A handle to a new face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Notes> */ + /* This function can be used to create @FT_Face objects from fonts */ + /* that are installed in the system as follows. */ + /* */ + /* { */ + /* fond = GetResource( 'FOND', fontName ); */ + /* error = FT_New_Face_From_FOND( library, fond, 0, &face ); */ + /* } */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Face_From_FOND( FT_Library library, + Handle fond, + FT_Long face_index, + FT_Face *aface ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_GetFile_From_Mac_Name */ + /* */ + /* <Description> */ + /* Return an FSSpec for the disk file containing the named font. */ + /* */ + /* <Input> */ + /* fontName :: Mac OS name of the font (e.g., Times New Roman */ + /* Bold). */ + /* */ + /* <Output> */ + /* pathSpec :: FSSpec to the file. For passing to */ + /* @FT_New_Face_From_FSSpec. */ + /* */ + /* face_index :: Index of the face. For passing to */ + /* @FT_New_Face_From_FSSpec. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_GetFile_From_Mac_Name( const char* fontName, + FSSpec* pathSpec, + FT_Long* face_index ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_GetFile_From_Mac_ATS_Name */ + /* */ + /* <Description> */ + /* Return an FSSpec for the disk file containing the named font. */ + /* */ + /* <Input> */ + /* fontName :: Mac OS name of the font in ATS framework. */ + /* */ + /* <Output> */ + /* pathSpec :: FSSpec to the file. For passing to */ + /* @FT_New_Face_From_FSSpec. */ + /* */ + /* face_index :: Index of the face. For passing to */ + /* @FT_New_Face_From_FSSpec. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_GetFile_From_Mac_ATS_Name( const char* fontName, + FSSpec* pathSpec, + FT_Long* face_index ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_GetFilePath_From_Mac_ATS_Name */ + /* */ + /* <Description> */ + /* Return a pathname of the disk file and face index for given font */ + /* name that is handled by ATS framework. */ + /* */ + /* <Input> */ + /* fontName :: Mac OS name of the font in ATS framework. */ + /* */ + /* <Output> */ + /* path :: Buffer to store pathname of the file. For passing */ + /* to @FT_New_Face. The client must allocate this */ + /* buffer before calling this function. */ + /* */ + /* maxPathSize :: Lengths of the buffer `path' that client allocated. */ + /* */ + /* face_index :: Index of the face. For passing to @FT_New_Face. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_GetFilePath_From_Mac_ATS_Name( const char* fontName, + UInt8* path, + UInt32 maxPathSize, + FT_Long* face_index ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Face_From_FSSpec */ + /* */ + /* <Description> */ + /* Create a new face object from a given resource and typeface index */ + /* using an FSSpec to the font file. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* spec :: FSSpec to the font file. */ + /* */ + /* face_index :: The index of the face within the resource. The */ + /* first face has index~0. */ + /* <Output> */ + /* aface :: A handle to a new face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* @FT_New_Face_From_FSSpec is identical to @FT_New_Face except */ + /* it accepts an FSSpec instead of a path. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Face_From_FSSpec( FT_Library library, + const FSSpec *spec, + FT_Long face_index, + FT_Face *aface ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Face_From_FSRef */ + /* */ + /* <Description> */ + /* Create a new face object from a given resource and typeface index */ + /* using an FSRef to the font file. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* spec :: FSRef to the font file. */ + /* */ + /* face_index :: The index of the face within the resource. The */ + /* first face has index~0. */ + /* <Output> */ + /* aface :: A handle to a new face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* @FT_New_Face_From_FSRef is identical to @FT_New_Face except */ + /* it accepts an FSRef instead of a path. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Face_From_FSRef( FT_Library library, + const FSRef *ref, + FT_Long face_index, + FT_Face *aface ) + FT_DEPRECATED_ATTRIBUTE; + + /* */ + + +FT_END_HEADER + + +#endif /* FTMAC_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftmm.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftmm.h new file mode 100755 index 00000000..9948102c --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftmm.h @@ -0,0 +1,638 @@ +/***************************************************************************/ +/* */ +/* ftmm.h */ +/* */ +/* FreeType Multiple Master font interface (specification). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTMM_H_ +#define FTMM_H_ + + +#include <ft2build.h> +#include FT_TYPE1_TABLES_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* multiple_masters */ + /* */ + /* <Title> */ + /* Multiple Masters */ + /* */ + /* <Abstract> */ + /* How to manage Multiple Masters fonts. */ + /* */ + /* <Description> */ + /* The following types and functions are used to manage Multiple */ + /* Master fonts, i.e., the selection of specific design instances by */ + /* setting design axis coordinates. */ + /* */ + /* Besides Adobe MM fonts, the interface supports Apple's TrueType GX */ + /* and OpenType variation fonts. Some of the routines only work with */ + /* Adobe MM fonts, others will work with all three types. They are */ + /* similar enough that a consistent interface makes sense. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_MM_Axis */ + /* */ + /* <Description> */ + /* A structure to model a given axis in design space for Multiple */ + /* Masters fonts. */ + /* */ + /* This structure can't be used for TrueType GX or OpenType variation */ + /* fonts. */ + /* */ + /* <Fields> */ + /* name :: The axis's name. */ + /* */ + /* minimum :: The axis's minimum design coordinate. */ + /* */ + /* maximum :: The axis's maximum design coordinate. */ + /* */ + typedef struct FT_MM_Axis_ + { + FT_String* name; + FT_Long minimum; + FT_Long maximum; + + } FT_MM_Axis; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Multi_Master */ + /* */ + /* <Description> */ + /* A structure to model the axes and space of a Multiple Masters */ + /* font. */ + /* */ + /* This structure can't be used for TrueType GX or OpenType variation */ + /* fonts. */ + /* */ + /* <Fields> */ + /* num_axis :: Number of axes. Cannot exceed~4. */ + /* */ + /* num_designs :: Number of designs; should be normally 2^num_axis */ + /* even though the Type~1 specification strangely */ + /* allows for intermediate designs to be present. */ + /* This number cannot exceed~16. */ + /* */ + /* axis :: A table of axis descriptors. */ + /* */ + typedef struct FT_Multi_Master_ + { + FT_UInt num_axis; + FT_UInt num_designs; + FT_MM_Axis axis[T1_MAX_MM_AXIS]; + + } FT_Multi_Master; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Var_Axis */ + /* */ + /* <Description> */ + /* A structure to model a given axis in design space for Multiple */ + /* Masters, TrueType GX, and OpenType variation fonts. */ + /* */ + /* <Fields> */ + /* name :: The axis's name. */ + /* Not always meaningful for TrueType GX or OpenType */ + /* variation fonts. */ + /* */ + /* minimum :: The axis's minimum design coordinate. */ + /* */ + /* def :: The axis's default design coordinate. */ + /* FreeType computes meaningful default values for Adobe */ + /* MM fonts. */ + /* */ + /* maximum :: The axis's maximum design coordinate. */ + /* */ + /* tag :: The axis's tag (the equivalent to `name' for TrueType */ + /* GX and OpenType variation fonts). FreeType provides */ + /* default values for Adobe MM fonts if possible. */ + /* */ + /* strid :: The axis name entry in the font's `name' table. This */ + /* is another (and often better) version of the `name' */ + /* field for TrueType GX or OpenType variation fonts. Not */ + /* meaningful for Adobe MM fonts. */ + /* */ + /* <Note> */ + /* The fields `minimum', `def', and `maximum' are 16.16 fractional */ + /* values for TrueType GX and OpenType variation fonts. For Adobe MM */ + /* fonts, the values are integers. */ + /* */ + typedef struct FT_Var_Axis_ + { + FT_String* name; + + FT_Fixed minimum; + FT_Fixed def; + FT_Fixed maximum; + + FT_ULong tag; + FT_UInt strid; + + } FT_Var_Axis; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Var_Named_Style */ + /* */ + /* <Description> */ + /* A structure to model a named instance in a TrueType GX or OpenType */ + /* variation font. */ + /* */ + /* This structure can't be used for Adobe MM fonts. */ + /* */ + /* <Fields> */ + /* coords :: The design coordinates for this instance. */ + /* This is an array with one entry for each axis. */ + /* */ + /* strid :: The entry in `name' table identifying this instance. */ + /* */ + /* psid :: The entry in `name' table identifying a PostScript name */ + /* for this instance. Value 0xFFFF indicates a missing */ + /* entry. */ + /* */ + typedef struct FT_Var_Named_Style_ + { + FT_Fixed* coords; + FT_UInt strid; + FT_UInt psid; /* since 2.7.1 */ + + } FT_Var_Named_Style; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_MM_Var */ + /* */ + /* <Description> */ + /* A structure to model the axes and space of an Adobe MM, TrueType */ + /* GX, or OpenType variation font. */ + /* */ + /* Some fields are specific to one format and not to the others. */ + /* */ + /* <Fields> */ + /* num_axis :: The number of axes. The maximum value is~4 for */ + /* Adobe MM fonts; no limit in TrueType GX or */ + /* OpenType variation fonts. */ + /* */ + /* num_designs :: The number of designs; should be normally */ + /* 2^num_axis for Adobe MM fonts. Not meaningful */ + /* for TrueType GX or OpenType variation fonts */ + /* (where every glyph could have a different */ + /* number of designs). */ + /* */ + /* num_namedstyles :: The number of named styles; a `named style' is */ + /* a tuple of design coordinates that has a string */ + /* ID (in the `name' table) associated with it. */ + /* The font can tell the user that, for example, */ + /* [Weight=1.5,Width=1.1] is `Bold'. Another name */ + /* for `named style' is `named instance'. */ + /* */ + /* For Adobe Multiple Masters fonts, this value is */ + /* always zero because the format does not support */ + /* named styles. */ + /* */ + /* axis :: An axis descriptor table. */ + /* TrueType GX and OpenType variation fonts */ + /* contain slightly more data than Adobe MM fonts. */ + /* Memory management of this pointer is done */ + /* internally by FreeType. */ + /* */ + /* namedstyle :: A named style (instance) table. */ + /* Only meaningful for TrueType GX and OpenType */ + /* variation fonts. Memory management of this */ + /* pointer is done internally by FreeType. */ + /* */ + typedef struct FT_MM_Var_ + { + FT_UInt num_axis; + FT_UInt num_designs; + FT_UInt num_namedstyles; + FT_Var_Axis* axis; + FT_Var_Named_Style* namedstyle; + + } FT_MM_Var; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Multi_Master */ + /* */ + /* <Description> */ + /* Retrieve a variation descriptor of a given Adobe MM font. */ + /* */ + /* This function can't be used with TrueType GX or OpenType variation */ + /* fonts. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* <Output> */ + /* amaster :: The Multiple Masters descriptor. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Multi_Master( FT_Face face, + FT_Multi_Master *amaster ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_MM_Var */ + /* */ + /* <Description> */ + /* Retrieve a variation descriptor for a given font. */ + /* */ + /* This function works with all supported variation formats. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* <Output> */ + /* amaster :: The variation descriptor. */ + /* Allocates a data structure, which the user must */ + /* deallocate with a call to @FT_Done_MM_Var after use. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_MM_Var( FT_Face face, + FT_MM_Var* *amaster ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_MM_Var */ + /* */ + /* <Description> */ + /* Free the memory allocated by @FT_Get_MM_Var. */ + /* */ + /* <Input> */ + /* library :: A handle of the face's parent library object that was */ + /* used in the call to @FT_Get_MM_Var to create `amaster'. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Done_MM_Var( FT_Library library, + FT_MM_Var *amaster ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_MM_Design_Coordinates */ + /* */ + /* <Description> */ + /* For Adobe MM fonts, choose an interpolated font design through */ + /* design coordinates. */ + /* */ + /* This function can't be used with TrueType GX or OpenType variation */ + /* fonts. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face. */ + /* */ + /* <Input> */ + /* num_coords :: The number of available design coordinates. If it */ + /* is larger than the number of axes, ignore the excess */ + /* values. If it is smaller than the number of axes, */ + /* use default values for the remaining axes. */ + /* */ + /* coords :: An array of design coordinates. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* [Since 2.8.1] To reset all axes to the default values, call the */ + /* function with `num_coords' set to zero and `coords' set to NULL. */ + /* */ + /* [Since 2.9] If `num_coords' is larger than zero, this function */ + /* sets the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags' */ + /* field (i.e., @FT_IS_VARIATION will return true). If `num_coords' */ + /* is zero, this bit flag gets unset. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_MM_Design_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Long* coords ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Var_Design_Coordinates */ + /* */ + /* <Description> */ + /* Choose an interpolated font design through design coordinates. */ + /* */ + /* This function works with all supported variation formats. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face. */ + /* */ + /* <Input> */ + /* num_coords :: The number of available design coordinates. If it */ + /* is larger than the number of axes, ignore the excess */ + /* values. If it is smaller than the number of axes, */ + /* use default values for the remaining axes. */ + /* */ + /* coords :: An array of design coordinates. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* [Since 2.8.1] To reset all axes to the default values, call the */ + /* function with `num_coords' set to zero and `coords' set to NULL. */ + /* [Since 2.9] `Default values' means the currently selected named */ + /* instance (or the base font if no named instance is selected). */ + /* */ + /* [Since 2.9] If `num_coords' is larger than zero, this function */ + /* sets the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags' */ + /* field (i.e., @FT_IS_VARIATION will return true). If `num_coords' */ + /* is zero, this bit flag gets unset. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Var_Design_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Var_Design_Coordinates */ + /* */ + /* <Description> */ + /* Get the design coordinates of the currently selected interpolated */ + /* font. */ + /* */ + /* This function works with all supported variation formats. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* num_coords :: The number of design coordinates to retrieve. If it */ + /* is larger than the number of axes, set the excess */ + /* values to~0. */ + /* */ + /* <Output> */ + /* coords :: The design coordinates array. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Since> */ + /* 2.7.1 */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Var_Design_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_MM_Blend_Coordinates */ + /* */ + /* <Description> */ + /* Choose an interpolated font design through normalized blend */ + /* coordinates. */ + /* */ + /* This function works with all supported variation formats. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face. */ + /* */ + /* <Input> */ + /* num_coords :: The number of available design coordinates. If it */ + /* is larger than the number of axes, ignore the excess */ + /* values. If it is smaller than the number of axes, */ + /* use default values for the remaining axes. */ + /* */ + /* coords :: The design coordinates array (each element must be */ + /* between 0 and 1.0 for Adobe MM fonts, and between */ + /* -1.0 and 1.0 for TrueType GX and OpenType variation */ + /* fonts). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* [Since 2.8.1] To reset all axes to the default values, call the */ + /* function with `num_coords' set to zero and `coords' set to NULL. */ + /* [Since 2.9] `Default values' means the currently selected named */ + /* instance (or the base font if no named instance is selected). */ + /* */ + /* [Since 2.9] If `num_coords' is larger than zero, this function */ + /* sets the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags' */ + /* field (i.e., @FT_IS_VARIATION will return true). If `num_coords' */ + /* is zero, this bit flag gets unset. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_MM_Blend_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_MM_Blend_Coordinates */ + /* */ + /* <Description> */ + /* Get the normalized blend coordinates of the currently selected */ + /* interpolated font. */ + /* */ + /* This function works with all supported variation formats. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* num_coords :: The number of normalized blend coordinates to */ + /* retrieve. If it is larger than the number of axes, */ + /* set the excess values to~0.5 for Adobe MM fonts, and */ + /* to~0 for TrueType GX and OpenType variation fonts. */ + /* */ + /* <Output> */ + /* coords :: The normalized blend coordinates array. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Since> */ + /* 2.7.1 */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_MM_Blend_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Var_Blend_Coordinates */ + /* */ + /* <Description> */ + /* This is another name of @FT_Set_MM_Blend_Coordinates. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Var_Blend_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Var_Blend_Coordinates */ + /* */ + /* <Description> */ + /* This is another name of @FT_Get_MM_Blend_Coordinates. */ + /* */ + /* <Since> */ + /* 2.7.1 */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Var_Blend_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_VAR_AXIS_FLAG_XXX */ + /* */ + /* <Description> */ + /* A list of bit flags used in the return value of */ + /* @FT_Get_Var_Axis_Flags. */ + /* */ + /* <Values> */ + /* FT_VAR_AXIS_FLAG_HIDDEN :: */ + /* The variation axis should not be exposed to user interfaces. */ + /* */ + /* <Since> */ + /* 2.8.1 */ + /* */ +#define FT_VAR_AXIS_FLAG_HIDDEN 1 + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Var_Axis_Flags */ + /* */ + /* <Description> */ + /* Get the `flags' field of an OpenType Variation Axis Record. */ + /* */ + /* Not meaningful for Adobe MM fonts (`*flags' is always zero). */ + /* */ + /* <Input> */ + /* master :: The variation descriptor. */ + /* */ + /* axis_index :: The index of the requested variation axis. */ + /* */ + /* <Output> */ + /* flags :: The `flags' field. See @FT_VAR_AXIS_FLAG_XXX for */ + /* possible values. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Since> */ + /* 2.8.1 */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Var_Axis_Flags( FT_MM_Var* master, + FT_UInt axis_index, + FT_UInt* flags ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Named_Instance */ + /* */ + /* <Description> */ + /* Set or change the current named instance. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* instance_index :: The index of the requested instance, starting */ + /* with value 1. If set to value 0, FreeType */ + /* switches to font access without a named */ + /* instance. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The function uses the value of `instance_index' to set bits 16-30 */ + /* of the face's `face_index' field. It also resets any variation */ + /* applied to the font, and the @FT_FACE_FLAG_VARIATION bit of the */ + /* face's `face_flags' field gets reset to zero (i.e., */ + /* @FT_IS_VARIATION will return false). */ + /* */ + /* For Adobe MM fonts (which don't have named instances) this */ + /* function simply resets the current face to the default instance. */ + /* */ + /* <Since> */ + /* 2.9 */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Named_Instance( FT_Face face, + FT_UInt instance_index ); + + /* */ + + +FT_END_HEADER + +#endif /* FTMM_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftmodapi.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftmodapi.h new file mode 100755 index 00000000..a6eb876e --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftmodapi.h @@ -0,0 +1,711 @@ +/***************************************************************************/ +/* */ +/* ftmodapi.h */ +/* */ +/* FreeType modules public interface (specification). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTMODAPI_H_ +#define FTMODAPI_H_ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* module_management */ + /* */ + /* <Title> */ + /* Module Management */ + /* */ + /* <Abstract> */ + /* How to add, upgrade, remove, and control modules from FreeType. */ + /* */ + /* <Description> */ + /* The definitions below are used to manage modules within FreeType. */ + /* Modules can be added, upgraded, and removed at runtime. */ + /* Additionally, some module properties can be controlled also. */ + /* */ + /* Here is a list of possible values of the `module_name' field in */ + /* the @FT_Module_Class structure. */ + /* */ + /* { */ + /* autofitter */ + /* bdf */ + /* cff */ + /* gxvalid */ + /* otvalid */ + /* pcf */ + /* pfr */ + /* psaux */ + /* pshinter */ + /* psnames */ + /* raster1 */ + /* sfnt */ + /* smooth, smooth-lcd, smooth-lcdv */ + /* truetype */ + /* type1 */ + /* type42 */ + /* t1cid */ + /* winfonts */ + /* } */ + /* */ + /* Note that the FreeType Cache sub-system is not a FreeType module. */ + /* */ + /* <Order> */ + /* FT_Module */ + /* FT_Module_Constructor */ + /* FT_Module_Destructor */ + /* FT_Module_Requester */ + /* FT_Module_Class */ + /* */ + /* FT_Add_Module */ + /* FT_Get_Module */ + /* FT_Remove_Module */ + /* FT_Add_Default_Modules */ + /* */ + /* FT_Property_Set */ + /* FT_Property_Get */ + /* FT_Set_Default_Properties */ + /* */ + /* FT_New_Library */ + /* FT_Done_Library */ + /* FT_Reference_Library */ + /* */ + /* FT_Renderer */ + /* FT_Renderer_Class */ + /* */ + /* FT_Get_Renderer */ + /* FT_Set_Renderer */ + /* */ + /* FT_Set_Debug_Hook */ + /* */ + /*************************************************************************/ + + + /* module bit flags */ +#define FT_MODULE_FONT_DRIVER 1 /* this module is a font driver */ +#define FT_MODULE_RENDERER 2 /* this module is a renderer */ +#define FT_MODULE_HINTER 4 /* this module is a glyph hinter */ +#define FT_MODULE_STYLER 8 /* this module is a styler */ + +#define FT_MODULE_DRIVER_SCALABLE 0x100 /* the driver supports */ + /* scalable fonts */ +#define FT_MODULE_DRIVER_NO_OUTLINES 0x200 /* the driver does not */ + /* support vector outlines */ +#define FT_MODULE_DRIVER_HAS_HINTER 0x400 /* the driver provides its */ + /* own hinter */ +#define FT_MODULE_DRIVER_HINTS_LIGHTLY 0x800 /* the driver's hinter */ + /* produces LIGHT hints */ + + + /* deprecated values */ +#define ft_module_font_driver FT_MODULE_FONT_DRIVER +#define ft_module_renderer FT_MODULE_RENDERER +#define ft_module_hinter FT_MODULE_HINTER +#define ft_module_styler FT_MODULE_STYLER + +#define ft_module_driver_scalable FT_MODULE_DRIVER_SCALABLE +#define ft_module_driver_no_outlines FT_MODULE_DRIVER_NO_OUTLINES +#define ft_module_driver_has_hinter FT_MODULE_DRIVER_HAS_HINTER +#define ft_module_driver_hints_lightly FT_MODULE_DRIVER_HINTS_LIGHTLY + + + typedef FT_Pointer FT_Module_Interface; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Module_Constructor */ + /* */ + /* <Description> */ + /* A function used to initialize (not create) a new module object. */ + /* */ + /* <Input> */ + /* module :: The module to initialize. */ + /* */ + typedef FT_Error + (*FT_Module_Constructor)( FT_Module module ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Module_Destructor */ + /* */ + /* <Description> */ + /* A function used to finalize (not destroy) a given module object. */ + /* */ + /* <Input> */ + /* module :: The module to finalize. */ + /* */ + typedef void + (*FT_Module_Destructor)( FT_Module module ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Module_Requester */ + /* */ + /* <Description> */ + /* A function used to query a given module for a specific interface. */ + /* */ + /* <Input> */ + /* module :: The module to be searched. */ + /* */ + /* name :: The name of the interface in the module. */ + /* */ + typedef FT_Module_Interface + (*FT_Module_Requester)( FT_Module module, + const char* name ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Module_Class */ + /* */ + /* <Description> */ + /* The module class descriptor. */ + /* */ + /* <Fields> */ + /* module_flags :: Bit flags describing the module. */ + /* */ + /* module_size :: The size of one module object/instance in */ + /* bytes. */ + /* */ + /* module_name :: The name of the module. */ + /* */ + /* module_version :: The version, as a 16.16 fixed number */ + /* (major.minor). */ + /* */ + /* module_requires :: The version of FreeType this module requires, */ + /* as a 16.16 fixed number (major.minor). Starts */ + /* at version 2.0, i.e., 0x20000. */ + /* */ + /* module_init :: The initializing function. */ + /* */ + /* module_done :: The finalizing function. */ + /* */ + /* get_interface :: The interface requesting function. */ + /* */ + typedef struct FT_Module_Class_ + { + FT_ULong module_flags; + FT_Long module_size; + const FT_String* module_name; + FT_Fixed module_version; + FT_Fixed module_requires; + + const void* module_interface; + + FT_Module_Constructor module_init; + FT_Module_Destructor module_done; + FT_Module_Requester get_interface; + + } FT_Module_Class; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Add_Module */ + /* */ + /* <Description> */ + /* Add a new module to a given library instance. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library object. */ + /* */ + /* <Input> */ + /* clazz :: A pointer to class descriptor for the module. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* An error will be returned if a module already exists by that name, */ + /* or if the module requires a version of FreeType that is too great. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Add_Module( FT_Library library, + const FT_Module_Class* clazz ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Module */ + /* */ + /* <Description> */ + /* Find a module by its name. */ + /* */ + /* <Input> */ + /* library :: A handle to the library object. */ + /* */ + /* module_name :: The module's name (as an ASCII string). */ + /* */ + /* <Return> */ + /* A module handle. 0~if none was found. */ + /* */ + /* <Note> */ + /* FreeType's internal modules aren't documented very well, and you */ + /* should look up the source code for details. */ + /* */ + FT_EXPORT( FT_Module ) + FT_Get_Module( FT_Library library, + const char* module_name ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Remove_Module */ + /* */ + /* <Description> */ + /* Remove a given module from a library instance. */ + /* */ + /* <InOut> */ + /* library :: A handle to a library object. */ + /* */ + /* <Input> */ + /* module :: A handle to a module object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The module object is destroyed by the function in case of success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Remove_Module( FT_Library library, + FT_Module module ); + + + /********************************************************************** + * + * @function: + * FT_Property_Set + * + * @description: + * Set a property for a given module. + * + * @input: + * library :: + * A handle to the library the module is part of. + * + * module_name :: + * The module name. + * + * property_name :: + * The property name. Properties are described in section + * @properties. + * + * Note that only a few modules have properties. + * + * value :: + * A generic pointer to a variable or structure that gives the new + * value of the property. The exact definition of `value' is + * dependent on the property; see section @properties. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If `module_name' isn't a valid module name, or `property_name' + * doesn't specify a valid property, or if `value' doesn't represent a + * valid value for the given property, an error is returned. + * + * The following example sets property `bar' (a simple integer) in + * module `foo' to value~1. + * + * { + * FT_UInt bar; + * + * + * bar = 1; + * FT_Property_Set( library, "foo", "bar", &bar ); + * } + * + * Note that the FreeType Cache sub-system doesn't recognize module + * property changes. To avoid glyph lookup confusion within the cache + * you should call @FTC_Manager_Reset to completely flush the cache if + * a module property gets changed after @FTC_Manager_New has been + * called. + * + * It is not possible to set properties of the FreeType Cache + * sub-system itself with FT_Property_Set; use @FTC_Property_Set + * instead. + * + * @since: + * 2.4.11 + * + */ + FT_EXPORT( FT_Error ) + FT_Property_Set( FT_Library library, + const FT_String* module_name, + const FT_String* property_name, + const void* value ); + + + /********************************************************************** + * + * @function: + * FT_Property_Get + * + * @description: + * Get a module's property value. + * + * @input: + * library :: + * A handle to the library the module is part of. + * + * module_name :: + * The module name. + * + * property_name :: + * The property name. Properties are described in section + * @properties. + * + * @inout: + * value :: + * A generic pointer to a variable or structure that gives the + * value of the property. The exact definition of `value' is + * dependent on the property; see section @properties. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If `module_name' isn't a valid module name, or `property_name' + * doesn't specify a valid property, or if `value' doesn't represent a + * valid value for the given property, an error is returned. + * + * The following example gets property `baz' (a range) in module `foo'. + * + * { + * typedef range_ + * { + * FT_Int32 min; + * FT_Int32 max; + * + * } range; + * + * range baz; + * + * + * FT_Property_Get( library, "foo", "baz", &baz ); + * } + * + * It is not possible to retrieve properties of the FreeType Cache + * sub-system with FT_Property_Get; use @FTC_Property_Get instead. + * + * @since: + * 2.4.11 + * + */ + FT_EXPORT( FT_Error ) + FT_Property_Get( FT_Library library, + const FT_String* module_name, + const FT_String* property_name, + void* value ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Default_Properties */ + /* */ + /* <Description> */ + /* If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is */ + /* set, this function reads the `FREETYPE_PROPERTIES' environment */ + /* variable to control driver properties. See section @properties */ + /* for more. */ + /* */ + /* If the compilation option is not set, this function does nothing. */ + /* */ + /* `FREETYPE_PROPERTIES' has the following syntax form (broken here */ + /* into multiple lines for better readability). */ + /* */ + /* { */ + /* <optional whitespace> */ + /* <module-name1> ':' */ + /* <property-name1> '=' <property-value1> */ + /* <whitespace> */ + /* <module-name2> ':' */ + /* <property-name2> '=' <property-value2> */ + /* ... */ + /* } */ + /* */ + /* Example: */ + /* */ + /* { */ + /* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ */ + /* cff:no-stem-darkening=1 \ */ + /* autofitter:warping=1 */ + /* } */ + /* */ + /* <InOut> */ + /* library :: A handle to a new library object. */ + /* */ + /* <Since> */ + /* 2.8 */ + /* */ + FT_EXPORT( void ) + FT_Set_Default_Properties( FT_Library library ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Reference_Library */ + /* */ + /* <Description> */ + /* A counter gets initialized to~1 at the time an @FT_Library */ + /* structure is created. This function increments the counter. */ + /* @FT_Done_Library then only destroys a library if the counter is~1, */ + /* otherwise it simply decrements the counter. */ + /* */ + /* This function helps in managing life-cycles of structures that */ + /* reference @FT_Library objects. */ + /* */ + /* <Input> */ + /* library :: A handle to a target library object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Since> */ + /* 2.4.2 */ + /* */ + FT_EXPORT( FT_Error ) + FT_Reference_Library( FT_Library library ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Library */ + /* */ + /* <Description> */ + /* This function is used to create a new FreeType library instance */ + /* from a given memory object. It is thus possible to use libraries */ + /* with distinct memory allocators within the same program. Note, */ + /* however, that the used @FT_Memory structure is expected to remain */ + /* valid for the life of the @FT_Library object. */ + /* */ + /* Normally, you would call this function (followed by a call to */ + /* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module, */ + /* and a call to @FT_Set_Default_Properties) instead of */ + /* @FT_Init_FreeType to initialize the FreeType library. */ + /* */ + /* Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a */ + /* library instance. */ + /* */ + /* <Input> */ + /* memory :: A handle to the original memory object. */ + /* */ + /* <Output> */ + /* alibrary :: A pointer to handle of a new library object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* See the discussion of reference counters in the description of */ + /* @FT_Reference_Library. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Library( FT_Memory memory, + FT_Library *alibrary ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_Library */ + /* */ + /* <Description> */ + /* Discard a given library object. This closes all drivers and */ + /* discards all resource objects. */ + /* */ + /* <Input> */ + /* library :: A handle to the target library. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* See the discussion of reference counters in the description of */ + /* @FT_Reference_Library. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Done_Library( FT_Library library ); + + /* */ + + typedef void + (*FT_DebugHook_Func)( void* arg ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Debug_Hook */ + /* */ + /* <Description> */ + /* Set a debug hook function for debugging the interpreter of a font */ + /* format. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library object. */ + /* */ + /* <Input> */ + /* hook_index :: The index of the debug hook. You should use the */ + /* values defined in `ftobjs.h', e.g., */ + /* `FT_DEBUG_HOOK_TRUETYPE'. */ + /* */ + /* debug_hook :: The function used to debug the interpreter. */ + /* */ + /* <Note> */ + /* Currently, four debug hook slots are available, but only two (for */ + /* the TrueType and the Type~1 interpreter) are defined. */ + /* */ + /* Since the internal headers of FreeType are no longer installed, */ + /* the symbol `FT_DEBUG_HOOK_TRUETYPE' isn't available publicly. */ + /* This is a bug and will be fixed in a forthcoming release. */ + /* */ + FT_EXPORT( void ) + FT_Set_Debug_Hook( FT_Library library, + FT_UInt hook_index, + FT_DebugHook_Func debug_hook ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Add_Default_Modules */ + /* */ + /* <Description> */ + /* Add the set of default drivers to a given library object. */ + /* This is only useful when you create a library object with */ + /* @FT_New_Library (usually to plug a custom memory manager). */ + /* */ + /* <InOut> */ + /* library :: A handle to a new library object. */ + /* */ + FT_EXPORT( void ) + FT_Add_Default_Modules( FT_Library library ); + + + + /************************************************************************** + * + * @section: + * truetype_engine + * + * @title: + * The TrueType Engine + * + * @abstract: + * TrueType bytecode support. + * + * @description: + * This section contains a function used to query the level of TrueType + * bytecode support compiled in this version of the library. + * + */ + + + /************************************************************************** + * + * @enum: + * FT_TrueTypeEngineType + * + * @description: + * A list of values describing which kind of TrueType bytecode + * engine is implemented in a given FT_Library instance. It is used + * by the @FT_Get_TrueType_Engine_Type function. + * + * @values: + * FT_TRUETYPE_ENGINE_TYPE_NONE :: + * The library doesn't implement any kind of bytecode interpreter. + * + * FT_TRUETYPE_ENGINE_TYPE_UNPATENTED :: + * Deprecated and removed. + * + * FT_TRUETYPE_ENGINE_TYPE_PATENTED :: + * The library implements a bytecode interpreter that covers + * the full instruction set of the TrueType virtual machine (this + * was governed by patents until May 2010, hence the name). + * + * @since: + * 2.2 + * + */ + typedef enum FT_TrueTypeEngineType_ + { + FT_TRUETYPE_ENGINE_TYPE_NONE = 0, + FT_TRUETYPE_ENGINE_TYPE_UNPATENTED, + FT_TRUETYPE_ENGINE_TYPE_PATENTED + + } FT_TrueTypeEngineType; + + + /************************************************************************** + * + * @func: + * FT_Get_TrueType_Engine_Type + * + * @description: + * Return an @FT_TrueTypeEngineType value to indicate which level of + * the TrueType virtual machine a given library instance supports. + * + * @input: + * library :: + * A library instance. + * + * @return: + * A value indicating which level is supported. + * + * @since: + * 2.2 + * + */ + FT_EXPORT( FT_TrueTypeEngineType ) + FT_Get_TrueType_Engine_Type( FT_Library library ); + + /* */ + + +FT_END_HEADER + +#endif /* FTMODAPI_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftmoderr.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftmoderr.h new file mode 100755 index 00000000..e0fc1312 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftmoderr.h @@ -0,0 +1,194 @@ +/***************************************************************************/ +/* */ +/* ftmoderr.h */ +/* */ +/* FreeType module error offsets (specification). */ +/* */ +/* Copyright 2001-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file is used to define the FreeType module error codes. */ + /* */ + /* If the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in `ftoption.h' is */ + /* set, the lower byte of an error value identifies the error code as */ + /* usual. In addition, the higher byte identifies the module. For */ + /* example, the error `FT_Err_Invalid_File_Format' has value 0x0003, the */ + /* error `TT_Err_Invalid_File_Format' has value 0x1303, the error */ + /* `T1_Err_Invalid_File_Format' has value 0x1403, etc. */ + /* */ + /* Note that `FT_Err_Ok', `TT_Err_Ok', etc. are always equal to zero, */ + /* including the high byte. */ + /* */ + /* If FT_CONFIG_OPTION_USE_MODULE_ERRORS isn't set, the higher byte of */ + /* an error value is set to zero. */ + /* */ + /* To hide the various `XXX_Err_' prefixes in the source code, FreeType */ + /* provides some macros in `fttypes.h'. */ + /* */ + /* FT_ERR( err ) */ + /* Add current error module prefix (as defined with the */ + /* `FT_ERR_PREFIX' macro) to `err'. For example, in the BDF module */ + /* the line */ + /* */ + /* error = FT_ERR( Invalid_Outline ); */ + /* */ + /* expands to */ + /* */ + /* error = BDF_Err_Invalid_Outline; */ + /* */ + /* For simplicity, you can always use `FT_Err_Ok' directly instead */ + /* of `FT_ERR( Ok )'. */ + /* */ + /* FT_ERR_EQ( errcode, err ) */ + /* FT_ERR_NEQ( errcode, err ) */ + /* Compare error code `errcode' with the error `err' for equality */ + /* and inequality, respectively. Example: */ + /* */ + /* if ( FT_ERR_EQ( error, Invalid_Outline ) ) */ + /* ... */ + /* */ + /* Using this macro you don't have to think about error prefixes. */ + /* Of course, if module errors are not active, the above example is */ + /* the same as */ + /* */ + /* if ( error == FT_Err_Invalid_Outline ) */ + /* ... */ + /* */ + /* FT_ERROR_BASE( errcode ) */ + /* FT_ERROR_MODULE( errcode ) */ + /* Get base error and module error code, respectively. */ + /* */ + /* */ + /* It can also be used to create a module error message table easily */ + /* with something like */ + /* */ + /* { */ + /* #undef FTMODERR_H_ */ + /* #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s }, */ + /* #define FT_MODERR_START_LIST { */ + /* #define FT_MODERR_END_LIST { 0, 0 } }; */ + /* */ + /* const struct */ + /* { */ + /* int mod_err_offset; */ + /* const char* mod_err_msg */ + /* } ft_mod_errors[] = */ + /* */ + /* #include FT_MODULE_ERRORS_H */ + /* } */ + /* */ + /*************************************************************************/ + + +#ifndef FTMODERR_H_ +#define FTMODERR_H_ + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** SETUP MACROS *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + +#undef FT_NEED_EXTERN_C + +#ifndef FT_MODERRDEF + +#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS +#define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = v, +#else +#define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = 0, +#endif + +#define FT_MODERR_START_LIST enum { +#define FT_MODERR_END_LIST FT_Mod_Err_Max }; + +#ifdef __cplusplus +#define FT_NEED_EXTERN_C + extern "C" { +#endif + +#endif /* !FT_MODERRDEF */ + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** LIST MODULE ERROR BASES *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + +#ifdef FT_MODERR_START_LIST + FT_MODERR_START_LIST +#endif + + + FT_MODERRDEF( Base, 0x000, "base module" ) + FT_MODERRDEF( Autofit, 0x100, "autofitter module" ) + FT_MODERRDEF( BDF, 0x200, "BDF module" ) + FT_MODERRDEF( Bzip2, 0x300, "Bzip2 module" ) + FT_MODERRDEF( Cache, 0x400, "cache module" ) + FT_MODERRDEF( CFF, 0x500, "CFF module" ) + FT_MODERRDEF( CID, 0x600, "CID module" ) + FT_MODERRDEF( Gzip, 0x700, "Gzip module" ) + FT_MODERRDEF( LZW, 0x800, "LZW module" ) + FT_MODERRDEF( OTvalid, 0x900, "OpenType validation module" ) + FT_MODERRDEF( PCF, 0xA00, "PCF module" ) + FT_MODERRDEF( PFR, 0xB00, "PFR module" ) + FT_MODERRDEF( PSaux, 0xC00, "PS auxiliary module" ) + FT_MODERRDEF( PShinter, 0xD00, "PS hinter module" ) + FT_MODERRDEF( PSnames, 0xE00, "PS names module" ) + FT_MODERRDEF( Raster, 0xF00, "raster module" ) + FT_MODERRDEF( SFNT, 0x1000, "SFNT module" ) + FT_MODERRDEF( Smooth, 0x1100, "smooth raster module" ) + FT_MODERRDEF( TrueType, 0x1200, "TrueType module" ) + FT_MODERRDEF( Type1, 0x1300, "Type 1 module" ) + FT_MODERRDEF( Type42, 0x1400, "Type 42 module" ) + FT_MODERRDEF( Winfonts, 0x1500, "Windows FON/FNT module" ) + FT_MODERRDEF( GXvalid, 0x1600, "GX validation module" ) + + +#ifdef FT_MODERR_END_LIST + FT_MODERR_END_LIST +#endif + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** CLEANUP *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + +#ifdef FT_NEED_EXTERN_C + } +#endif + +#undef FT_MODERR_START_LIST +#undef FT_MODERR_END_LIST +#undef FT_MODERRDEF +#undef FT_NEED_EXTERN_C + + +#endif /* FTMODERR_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftotval.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftotval.h new file mode 100755 index 00000000..26731c2b --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftotval.h @@ -0,0 +1,204 @@ +/***************************************************************************/ +/* */ +/* ftotval.h */ +/* */ +/* FreeType API for validating OpenType tables (specification). */ +/* */ +/* Copyright 2004-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* */ +/* Warning: This module might be moved to a different library in the */ +/* future to avoid a tight dependency between FreeType and the */ +/* OpenType specification. */ +/* */ +/* */ +/***************************************************************************/ + + +#ifndef FTOTVAL_H_ +#define FTOTVAL_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* ot_validation */ + /* */ + /* <Title> */ + /* OpenType Validation */ + /* */ + /* <Abstract> */ + /* An API to validate OpenType tables. */ + /* */ + /* <Description> */ + /* This section contains the declaration of functions to validate */ + /* some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). */ + /* */ + /* <Order> */ + /* FT_OpenType_Validate */ + /* FT_OpenType_Free */ + /* */ + /* FT_VALIDATE_OTXXX */ + /* */ + /*************************************************************************/ + + + /********************************************************************** + * + * @enum: + * FT_VALIDATE_OTXXX + * + * @description: + * A list of bit-field constants used with @FT_OpenType_Validate to + * indicate which OpenType tables should be validated. + * + * @values: + * FT_VALIDATE_BASE :: + * Validate BASE table. + * + * FT_VALIDATE_GDEF :: + * Validate GDEF table. + * + * FT_VALIDATE_GPOS :: + * Validate GPOS table. + * + * FT_VALIDATE_GSUB :: + * Validate GSUB table. + * + * FT_VALIDATE_JSTF :: + * Validate JSTF table. + * + * FT_VALIDATE_MATH :: + * Validate MATH table. + * + * FT_VALIDATE_OT :: + * Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). + * + */ +#define FT_VALIDATE_BASE 0x0100 +#define FT_VALIDATE_GDEF 0x0200 +#define FT_VALIDATE_GPOS 0x0400 +#define FT_VALIDATE_GSUB 0x0800 +#define FT_VALIDATE_JSTF 0x1000 +#define FT_VALIDATE_MATH 0x2000 + +#define FT_VALIDATE_OT ( FT_VALIDATE_BASE | \ + FT_VALIDATE_GDEF | \ + FT_VALIDATE_GPOS | \ + FT_VALIDATE_GSUB | \ + FT_VALIDATE_JSTF | \ + FT_VALIDATE_MATH ) + + /********************************************************************** + * + * @function: + * FT_OpenType_Validate + * + * @description: + * Validate various OpenType tables to assure that all offsets and + * indices are valid. The idea is that a higher-level library that + * actually does the text layout can access those tables without + * error checking (which can be quite time consuming). + * + * @input: + * face :: + * A handle to the input face. + * + * validation_flags :: + * A bit field that specifies the tables to be validated. See + * @FT_VALIDATE_OTXXX for possible values. + * + * @output: + * BASE_table :: + * A pointer to the BASE table. + * + * GDEF_table :: + * A pointer to the GDEF table. + * + * GPOS_table :: + * A pointer to the GPOS table. + * + * GSUB_table :: + * A pointer to the GSUB table. + * + * JSTF_table :: + * A pointer to the JSTF table. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with OpenType fonts, returning an error + * otherwise. + * + * After use, the application should deallocate the five tables with + * @FT_OpenType_Free. A NULL value indicates that the table either + * doesn't exist in the font, or the application hasn't asked for + * validation. + */ + FT_EXPORT( FT_Error ) + FT_OpenType_Validate( FT_Face face, + FT_UInt validation_flags, + FT_Bytes *BASE_table, + FT_Bytes *GDEF_table, + FT_Bytes *GPOS_table, + FT_Bytes *GSUB_table, + FT_Bytes *JSTF_table ); + + /********************************************************************** + * + * @function: + * FT_OpenType_Free + * + * @description: + * Free the buffer allocated by OpenType validator. + * + * @input: + * face :: + * A handle to the input face. + * + * table :: + * The pointer to the buffer that is allocated by + * @FT_OpenType_Validate. + * + * @note: + * This function must be used to free the buffer allocated by + * @FT_OpenType_Validate only. + */ + FT_EXPORT( void ) + FT_OpenType_Free( FT_Face face, + FT_Bytes table ); + + /* */ + + +FT_END_HEADER + +#endif /* FTOTVAL_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftoutln.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftoutln.h new file mode 100755 index 00000000..89389a49 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftoutln.h @@ -0,0 +1,582 @@ +/***************************************************************************/ +/* */ +/* ftoutln.h */ +/* */ +/* Support for the FT_Outline type used to store glyph shapes of */ +/* most scalable font formats (specification). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTOUTLN_H_ +#define FTOUTLN_H_ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* outline_processing */ + /* */ + /* <Title> */ + /* Outline Processing */ + /* */ + /* <Abstract> */ + /* Functions to create, transform, and render vectorial glyph images. */ + /* */ + /* <Description> */ + /* This section contains routines used to create and destroy scalable */ + /* glyph images known as `outlines'. These can also be measured, */ + /* transformed, and converted into bitmaps and pixmaps. */ + /* */ + /* <Order> */ + /* FT_Outline */ + /* FT_Outline_New */ + /* FT_Outline_Done */ + /* FT_Outline_Copy */ + /* FT_Outline_Translate */ + /* FT_Outline_Transform */ + /* FT_Outline_Embolden */ + /* FT_Outline_EmboldenXY */ + /* FT_Outline_Reverse */ + /* FT_Outline_Check */ + /* */ + /* FT_Outline_Get_CBox */ + /* FT_Outline_Get_BBox */ + /* */ + /* FT_Outline_Get_Bitmap */ + /* FT_Outline_Render */ + /* FT_Outline_Decompose */ + /* FT_Outline_Funcs */ + /* FT_Outline_MoveToFunc */ + /* FT_Outline_LineToFunc */ + /* FT_Outline_ConicToFunc */ + /* FT_Outline_CubicToFunc */ + /* */ + /* FT_Orientation */ + /* FT_Outline_Get_Orientation */ + /* */ + /* FT_OUTLINE_XXX */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Decompose */ + /* */ + /* <Description> */ + /* Walk over an outline's structure to decompose it into individual */ + /* segments and Bezier arcs. This function also emits `move to' */ + /* operations to indicate the start of new contours in the outline. */ + /* */ + /* <Input> */ + /* outline :: A pointer to the source target. */ + /* */ + /* func_interface :: A table of `emitters', i.e., function pointers */ + /* called during decomposition to indicate path */ + /* operations. */ + /* */ + /* <InOut> */ + /* user :: A typeless pointer that is passed to each */ + /* emitter during the decomposition. It can be */ + /* used to store the state during the */ + /* decomposition. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* A contour that contains a single point only is represented by a */ + /* `move to' operation followed by `line to' to the same point. In */ + /* most cases, it is best to filter this out before using the */ + /* outline for stroking purposes (otherwise it would result in a */ + /* visible dot when round caps are used). */ + /* */ + /* Similarly, the function returns success for an empty outline also */ + /* (doing nothing, this is, not calling any emitter); if necessary, */ + /* you should filter this out, too. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Decompose( FT_Outline* outline, + const FT_Outline_Funcs* func_interface, + void* user ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_New */ + /* */ + /* <Description> */ + /* Create a new outline of a given size. */ + /* */ + /* <Input> */ + /* library :: A handle to the library object from where the */ + /* outline is allocated. Note however that the new */ + /* outline will *not* necessarily be *freed*, when */ + /* destroying the library, by @FT_Done_FreeType. */ + /* */ + /* numPoints :: The maximum number of points within the outline. */ + /* Must be smaller than or equal to 0xFFFF (65535). */ + /* */ + /* numContours :: The maximum number of contours within the outline. */ + /* This value must be in the range 0 to `numPoints'. */ + /* */ + /* <Output> */ + /* anoutline :: A handle to the new outline. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The reason why this function takes a `library' parameter is simply */ + /* to use the library's memory allocator. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_New( FT_Library library, + FT_UInt numPoints, + FT_Int numContours, + FT_Outline *anoutline ); + + + FT_EXPORT( FT_Error ) + FT_Outline_New_Internal( FT_Memory memory, + FT_UInt numPoints, + FT_Int numContours, + FT_Outline *anoutline ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Done */ + /* */ + /* <Description> */ + /* Destroy an outline created with @FT_Outline_New. */ + /* */ + /* <Input> */ + /* library :: A handle of the library object used to allocate the */ + /* outline. */ + /* */ + /* outline :: A pointer to the outline object to be discarded. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* If the outline's `owner' field is not set, only the outline */ + /* descriptor will be released. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Done( FT_Library library, + FT_Outline* outline ); + + + FT_EXPORT( FT_Error ) + FT_Outline_Done_Internal( FT_Memory memory, + FT_Outline* outline ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Check */ + /* */ + /* <Description> */ + /* Check the contents of an outline descriptor. */ + /* */ + /* <Input> */ + /* outline :: A handle to a source outline. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* An empty outline, or an outline with a single point only is also */ + /* valid. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Check( FT_Outline* outline ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Get_CBox */ + /* */ + /* <Description> */ + /* Return an outline's `control box'. The control box encloses all */ + /* the outline's points, including Bezier control points. Though it */ + /* coincides with the exact bounding box for most glyphs, it can be */ + /* slightly larger in some situations (like when rotating an outline */ + /* that contains Bezier outside arcs). */ + /* */ + /* Computing the control box is very fast, while getting the bounding */ + /* box can take much more time as it needs to walk over all segments */ + /* and arcs in the outline. To get the latter, you can use the */ + /* `ftbbox' component, which is dedicated to this single task. */ + /* */ + /* <Input> */ + /* outline :: A pointer to the source outline descriptor. */ + /* */ + /* <Output> */ + /* acbox :: The outline's control box. */ + /* */ + /* <Note> */ + /* See @FT_Glyph_Get_CBox for a discussion of tricky fonts. */ + /* */ + FT_EXPORT( void ) + FT_Outline_Get_CBox( const FT_Outline* outline, + FT_BBox *acbox ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Translate */ + /* */ + /* <Description> */ + /* Apply a simple translation to the points of an outline. */ + /* */ + /* <InOut> */ + /* outline :: A pointer to the target outline descriptor. */ + /* */ + /* <Input> */ + /* xOffset :: The horizontal offset. */ + /* */ + /* yOffset :: The vertical offset. */ + /* */ + FT_EXPORT( void ) + FT_Outline_Translate( const FT_Outline* outline, + FT_Pos xOffset, + FT_Pos yOffset ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Copy */ + /* */ + /* <Description> */ + /* Copy an outline into another one. Both objects must have the */ + /* same sizes (number of points & number of contours) when this */ + /* function is called. */ + /* */ + /* <Input> */ + /* source :: A handle to the source outline. */ + /* */ + /* <Output> */ + /* target :: A handle to the target outline. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Copy( const FT_Outline* source, + FT_Outline *target ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Transform */ + /* */ + /* <Description> */ + /* Apply a simple 2x2 matrix to all of an outline's points. Useful */ + /* for applying rotations, slanting, flipping, etc. */ + /* */ + /* <InOut> */ + /* outline :: A pointer to the target outline descriptor. */ + /* */ + /* <Input> */ + /* matrix :: A pointer to the transformation matrix. */ + /* */ + /* <Note> */ + /* You can use @FT_Outline_Translate if you need to translate the */ + /* outline's points. */ + /* */ + FT_EXPORT( void ) + FT_Outline_Transform( const FT_Outline* outline, + const FT_Matrix* matrix ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Embolden */ + /* */ + /* <Description> */ + /* Embolden an outline. The new outline will be at most 4~times */ + /* `strength' pixels wider and higher. You may think of the left and */ + /* bottom borders as unchanged. */ + /* */ + /* Negative `strength' values to reduce the outline thickness are */ + /* possible also. */ + /* */ + /* <InOut> */ + /* outline :: A handle to the target outline. */ + /* */ + /* <Input> */ + /* strength :: How strong the glyph is emboldened. Expressed in */ + /* 26.6 pixel format. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The used algorithm to increase or decrease the thickness of the */ + /* glyph doesn't change the number of points; this means that certain */ + /* situations like acute angles or intersections are sometimes */ + /* handled incorrectly. */ + /* */ + /* If you need `better' metrics values you should call */ + /* @FT_Outline_Get_CBox or @FT_Outline_Get_BBox. */ + /* */ + /* Example call: */ + /* */ + /* { */ + /* FT_Load_Glyph( face, index, FT_LOAD_DEFAULT ); */ + /* if ( face->glyph->format == FT_GLYPH_FORMAT_OUTLINE ) */ + /* FT_Outline_Embolden( &face->glyph->outline, strength ); */ + /* } */ + /* */ + /* To get meaningful results, font scaling values must be set with */ + /* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Embolden( FT_Outline* outline, + FT_Pos strength ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_EmboldenXY */ + /* */ + /* <Description> */ + /* Embolden an outline. The new outline will be `xstrength' pixels */ + /* wider and `ystrength' pixels higher. Otherwise, it is similar to */ + /* @FT_Outline_Embolden, which uses the same strength in both */ + /* directions. */ + /* */ + /* <Since> */ + /* 2.4.10 */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_EmboldenXY( FT_Outline* outline, + FT_Pos xstrength, + FT_Pos ystrength ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Reverse */ + /* */ + /* <Description> */ + /* Reverse the drawing direction of an outline. This is used to */ + /* ensure consistent fill conventions for mirrored glyphs. */ + /* */ + /* <InOut> */ + /* outline :: A pointer to the target outline descriptor. */ + /* */ + /* <Note> */ + /* This function toggles the bit flag @FT_OUTLINE_REVERSE_FILL in */ + /* the outline's `flags' field. */ + /* */ + /* It shouldn't be used by a normal client application, unless it */ + /* knows what it is doing. */ + /* */ + FT_EXPORT( void ) + FT_Outline_Reverse( FT_Outline* outline ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Get_Bitmap */ + /* */ + /* <Description> */ + /* Render an outline within a bitmap. The outline's image is simply */ + /* OR-ed to the target bitmap. */ + /* */ + /* <Input> */ + /* library :: A handle to a FreeType library object. */ + /* */ + /* outline :: A pointer to the source outline descriptor. */ + /* */ + /* <InOut> */ + /* abitmap :: A pointer to the target bitmap descriptor. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function does NOT CREATE the bitmap, it only renders an */ + /* outline image within the one you pass to it! Consequently, the */ + /* various fields in `abitmap' should be set accordingly. */ + /* */ + /* It will use the raster corresponding to the default glyph format. */ + /* */ + /* The value of the `num_grays' field in `abitmap' is ignored. If */ + /* you select the gray-level rasterizer, and you want less than 256 */ + /* gray levels, you have to use @FT_Outline_Render directly. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Get_Bitmap( FT_Library library, + FT_Outline* outline, + const FT_Bitmap *abitmap ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Render */ + /* */ + /* <Description> */ + /* Render an outline within a bitmap using the current scan-convert. */ + /* This function uses an @FT_Raster_Params structure as an argument, */ + /* allowing advanced features like direct composition, translucency, */ + /* etc. */ + /* */ + /* <Input> */ + /* library :: A handle to a FreeType library object. */ + /* */ + /* outline :: A pointer to the source outline descriptor. */ + /* */ + /* <InOut> */ + /* params :: A pointer to an @FT_Raster_Params structure used to */ + /* describe the rendering operation. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* You should know what you are doing and how @FT_Raster_Params works */ + /* to use this function. */ + /* */ + /* The field `params.source' will be set to `outline' before the scan */ + /* converter is called, which means that the value you give to it is */ + /* actually ignored. */ + /* */ + /* The gray-level rasterizer always uses 256 gray levels. If you */ + /* want less gray levels, you have to provide your own span callback. */ + /* See the @FT_RASTER_FLAG_DIRECT value of the `flags' field in the */ + /* @FT_Raster_Params structure for more details. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Render( FT_Library library, + FT_Outline* outline, + FT_Raster_Params* params ); + + + /************************************************************************** + * + * @enum: + * FT_Orientation + * + * @description: + * A list of values used to describe an outline's contour orientation. + * + * The TrueType and PostScript specifications use different conventions + * to determine whether outline contours should be filled or unfilled. + * + * @values: + * FT_ORIENTATION_TRUETYPE :: + * According to the TrueType specification, clockwise contours must + * be filled, and counter-clockwise ones must be unfilled. + * + * FT_ORIENTATION_POSTSCRIPT :: + * According to the PostScript specification, counter-clockwise contours + * must be filled, and clockwise ones must be unfilled. + * + * FT_ORIENTATION_FILL_RIGHT :: + * This is identical to @FT_ORIENTATION_TRUETYPE, but is used to + * remember that in TrueType, everything that is to the right of + * the drawing direction of a contour must be filled. + * + * FT_ORIENTATION_FILL_LEFT :: + * This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to + * remember that in PostScript, everything that is to the left of + * the drawing direction of a contour must be filled. + * + * FT_ORIENTATION_NONE :: + * The orientation cannot be determined. That is, different parts of + * the glyph have different orientation. + * + */ + typedef enum FT_Orientation_ + { + FT_ORIENTATION_TRUETYPE = 0, + FT_ORIENTATION_POSTSCRIPT = 1, + FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE, + FT_ORIENTATION_FILL_LEFT = FT_ORIENTATION_POSTSCRIPT, + FT_ORIENTATION_NONE + + } FT_Orientation; + + + /************************************************************************** + * + * @function: + * FT_Outline_Get_Orientation + * + * @description: + * This function analyzes a glyph outline and tries to compute its + * fill orientation (see @FT_Orientation). This is done by integrating + * the total area covered by the outline. The positive integral + * corresponds to the clockwise orientation and @FT_ORIENTATION_POSTSCRIPT + * is returned. The negative integral corresponds to the counter-clockwise + * orientation and @FT_ORIENTATION_TRUETYPE is returned. + * + * Note that this will return @FT_ORIENTATION_TRUETYPE for empty + * outlines. + * + * @input: + * outline :: + * A handle to the source outline. + * + * @return: + * The orientation. + * + */ + FT_EXPORT( FT_Orientation ) + FT_Outline_Get_Orientation( FT_Outline* outline ); + + /* */ + + +FT_END_HEADER + +#endif /* FTOUTLN_H_ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftparams.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftparams.h new file mode 100755 index 00000000..5a9006c5 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftparams.h @@ -0,0 +1,205 @@ +/***************************************************************************/ +/* */ +/* ftparams.h */ +/* */ +/* FreeType API for possible FT_Parameter tags (specification only). */ +/* */ +/* Copyright 2017-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTPARAMS_H_ +#define FTPARAMS_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /************************************************************************** + * + * @section: + * parameter_tags + * + * @title: + * Parameter Tags + * + * @abstract: + * Macros for driver property and font loading parameter tags. + * + * @description: + * This section contains macros for the @FT_Parameter structure that are + * used with various functions to activate some special functionality or + * different behaviour of various components of FreeType. + * + */ + + + /*************************************************************************** + * + * @constant: + * FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY + * + * @description: + * A tag for @FT_Parameter to make @FT_Open_Face ignore typographic + * family names in the `name' table (introduced in OpenType version + * 1.4). Use this for backward compatibility with legacy systems that + * have a four-faces-per-family restriction. + * + * @since: + * 2.8 + * + */ +#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY \ + FT_MAKE_TAG( 'i', 'g', 'p', 'f' ) + + + /* this constant is deprecated */ +#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \ + FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY + + + /*************************************************************************** + * + * @constant: + * FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY + * + * @description: + * A tag for @FT_Parameter to make @FT_Open_Face ignore typographic + * subfamily names in the `name' table (introduced in OpenType version + * 1.4). Use this for backward compatibility with legacy systems that + * have a four-faces-per-family restriction. + * + * @since: + * 2.8 + * + */ +#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY \ + FT_MAKE_TAG( 'i', 'g', 'p', 's' ) + + + /* this constant is deprecated */ +#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \ + FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY + + + /*************************************************************************** + * + * @constant: + * FT_PARAM_TAG_INCREMENTAL + * + * @description: + * An @FT_Parameter tag to be used with @FT_Open_Face to indicate + * incremental glyph loading. + * + */ +#define FT_PARAM_TAG_INCREMENTAL \ + FT_MAKE_TAG( 'i', 'n', 'c', 'r' ) + + + /************************************************************************** + * + * @constant: + * FT_PARAM_TAG_LCD_FILTER_WEIGHTS + * + * @description: + * An @FT_Parameter tag to be used with @FT_Face_Properties. The + * corresponding argument specifies the five LCD filter weights for a + * given face (if using @FT_LOAD_TARGET_LCD, for example), overriding + * the global default values or the values set up with + * @FT_Library_SetLcdFilterWeights. + * + * @since: + * 2.8 + * + */ +#define FT_PARAM_TAG_LCD_FILTER_WEIGHTS \ + FT_MAKE_TAG( 'l', 'c', 'd', 'f' ) + + + /************************************************************************** + * + * @constant: + * FT_PARAM_TAG_RANDOM_SEED + * + * @description: + * An @FT_Parameter tag to be used with @FT_Face_Properties. The + * corresponding 32bit signed integer argument overrides the font + * driver's random seed value with a face-specific one; see + * @random-seed. + * + * @since: + * 2.8 + * + */ +#define FT_PARAM_TAG_RANDOM_SEED \ + FT_MAKE_TAG( 's', 'e', 'e', 'd' ) + + + /************************************************************************** + * + * @constant: + * FT_PARAM_TAG_STEM_DARKENING + * + * @description: + * An @FT_Parameter tag to be used with @FT_Face_Properties. The + * corresponding Boolean argument specifies whether to apply stem + * darkening, overriding the global default values or the values set up + * with @FT_Property_Set (see @no-stem-darkening). + * + * This is a passive setting that only takes effect if the font driver + * or autohinter honors it, which the CFF, Type~1, and CID drivers + * always do, but the autohinter only in `light' hinting mode (as of + * version 2.9). + * + * @since: + * 2.8 + * + */ +#define FT_PARAM_TAG_STEM_DARKENING \ + FT_MAKE_TAG( 'd', 'a', 'r', 'k' ) + + + /*************************************************************************** + * + * @constant: + * FT_PARAM_TAG_UNPATENTED_HINTING + * + * @description: + * Deprecated, no effect. + * + * Previously: A constant used as the tag of an @FT_Parameter structure to + * indicate that unpatented methods only should be used by the TrueType + * bytecode interpreter for a typeface opened by @FT_Open_Face. + * + */ +#define FT_PARAM_TAG_UNPATENTED_HINTING \ + FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) + + + /* */ + + +FT_END_HEADER + + +#endif /* FTPARAMS_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftpfr.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftpfr.h new file mode 100755 index 00000000..a69cc482 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftpfr.h @@ -0,0 +1,172 @@ +/***************************************************************************/ +/* */ +/* ftpfr.h */ +/* */ +/* FreeType API for accessing PFR-specific data (specification only). */ +/* */ +/* Copyright 2002-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTPFR_H_ +#define FTPFR_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* pfr_fonts */ + /* */ + /* <Title> */ + /* PFR Fonts */ + /* */ + /* <Abstract> */ + /* PFR/TrueDoc specific API. */ + /* */ + /* <Description> */ + /* This section contains the declaration of PFR-specific functions. */ + /* */ + /*************************************************************************/ + + + /********************************************************************** + * + * @function: + * FT_Get_PFR_Metrics + * + * @description: + * Return the outline and metrics resolutions of a given PFR face. + * + * @input: + * face :: Handle to the input face. It can be a non-PFR face. + * + * @output: + * aoutline_resolution :: + * Outline resolution. This is equivalent to `face->units_per_EM' + * for non-PFR fonts. Optional (parameter can be NULL). + * + * ametrics_resolution :: + * Metrics resolution. This is equivalent to `outline_resolution' + * for non-PFR fonts. Optional (parameter can be NULL). + * + * ametrics_x_scale :: + * A 16.16 fixed-point number used to scale distance expressed + * in metrics units to device subpixels. This is equivalent to + * `face->size->x_scale', but for metrics only. Optional (parameter + * can be NULL). + * + * ametrics_y_scale :: + * Same as `ametrics_x_scale' but for the vertical direction. + * optional (parameter can be NULL). + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If the input face is not a PFR, this function will return an error. + * However, in all cases, it will return valid values. + */ + FT_EXPORT( FT_Error ) + FT_Get_PFR_Metrics( FT_Face face, + FT_UInt *aoutline_resolution, + FT_UInt *ametrics_resolution, + FT_Fixed *ametrics_x_scale, + FT_Fixed *ametrics_y_scale ); + + + /********************************************************************** + * + * @function: + * FT_Get_PFR_Kerning + * + * @description: + * Return the kerning pair corresponding to two glyphs in a PFR face. + * The distance is expressed in metrics units, unlike the result of + * @FT_Get_Kerning. + * + * @input: + * face :: A handle to the input face. + * + * left :: Index of the left glyph. + * + * right :: Index of the right glyph. + * + * @output: + * avector :: A kerning vector. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function always return distances in original PFR metrics + * units. This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED + * mode, which always returns distances converted to outline units. + * + * You can use the value of the `x_scale' and `y_scale' parameters + * returned by @FT_Get_PFR_Metrics to scale these to device subpixels. + */ + FT_EXPORT( FT_Error ) + FT_Get_PFR_Kerning( FT_Face face, + FT_UInt left, + FT_UInt right, + FT_Vector *avector ); + + + /********************************************************************** + * + * @function: + * FT_Get_PFR_Advance + * + * @description: + * Return a given glyph advance, expressed in original metrics units, + * from a PFR font. + * + * @input: + * face :: A handle to the input face. + * + * gindex :: The glyph index. + * + * @output: + * aadvance :: The glyph advance in metrics units. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics + * to convert the advance to device subpixels (i.e., 1/64th of pixels). + */ + FT_EXPORT( FT_Error ) + FT_Get_PFR_Advance( FT_Face face, + FT_UInt gindex, + FT_Pos *aadvance ); + + /* */ + + +FT_END_HEADER + +#endif /* FTPFR_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftrender.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftrender.h new file mode 100755 index 00000000..fa8ad22b --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftrender.h @@ -0,0 +1,233 @@ +/***************************************************************************/ +/* */ +/* ftrender.h */ +/* */ +/* FreeType renderer modules public interface (specification). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTRENDER_H_ +#define FTRENDER_H_ + + +#include <ft2build.h> +#include FT_MODULE_H +#include FT_GLYPH_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* module_management */ + /* */ + /*************************************************************************/ + + + /* create a new glyph object */ + typedef FT_Error + (*FT_Glyph_InitFunc)( FT_Glyph glyph, + FT_GlyphSlot slot ); + + /* destroys a given glyph object */ + typedef void + (*FT_Glyph_DoneFunc)( FT_Glyph glyph ); + + typedef void + (*FT_Glyph_TransformFunc)( FT_Glyph glyph, + const FT_Matrix* matrix, + const FT_Vector* delta ); + + typedef void + (*FT_Glyph_GetBBoxFunc)( FT_Glyph glyph, + FT_BBox* abbox ); + + typedef FT_Error + (*FT_Glyph_CopyFunc)( FT_Glyph source, + FT_Glyph target ); + + typedef FT_Error + (*FT_Glyph_PrepareFunc)( FT_Glyph glyph, + FT_GlyphSlot slot ); + +/* deprecated */ +#define FT_Glyph_Init_Func FT_Glyph_InitFunc +#define FT_Glyph_Done_Func FT_Glyph_DoneFunc +#define FT_Glyph_Transform_Func FT_Glyph_TransformFunc +#define FT_Glyph_BBox_Func FT_Glyph_GetBBoxFunc +#define FT_Glyph_Copy_Func FT_Glyph_CopyFunc +#define FT_Glyph_Prepare_Func FT_Glyph_PrepareFunc + + + struct FT_Glyph_Class_ + { + FT_Long glyph_size; + FT_Glyph_Format glyph_format; + + FT_Glyph_InitFunc glyph_init; + FT_Glyph_DoneFunc glyph_done; + FT_Glyph_CopyFunc glyph_copy; + FT_Glyph_TransformFunc glyph_transform; + FT_Glyph_GetBBoxFunc glyph_bbox; + FT_Glyph_PrepareFunc glyph_prepare; + }; + + + typedef FT_Error + (*FT_Renderer_RenderFunc)( FT_Renderer renderer, + FT_GlyphSlot slot, + FT_Render_Mode mode, + const FT_Vector* origin ); + + typedef FT_Error + (*FT_Renderer_TransformFunc)( FT_Renderer renderer, + FT_GlyphSlot slot, + const FT_Matrix* matrix, + const FT_Vector* delta ); + + + typedef void + (*FT_Renderer_GetCBoxFunc)( FT_Renderer renderer, + FT_GlyphSlot slot, + FT_BBox* cbox ); + + + typedef FT_Error + (*FT_Renderer_SetModeFunc)( FT_Renderer renderer, + FT_ULong mode_tag, + FT_Pointer mode_ptr ); + +/* deprecated identifiers */ +#define FTRenderer_render FT_Renderer_RenderFunc +#define FTRenderer_transform FT_Renderer_TransformFunc +#define FTRenderer_getCBox FT_Renderer_GetCBoxFunc +#define FTRenderer_setMode FT_Renderer_SetModeFunc + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Renderer_Class */ + /* */ + /* <Description> */ + /* The renderer module class descriptor. */ + /* */ + /* <Fields> */ + /* root :: The root @FT_Module_Class fields. */ + /* */ + /* glyph_format :: The glyph image format this renderer handles. */ + /* */ + /* render_glyph :: A method used to render the image that is in a */ + /* given glyph slot into a bitmap. */ + /* */ + /* transform_glyph :: A method used to transform the image that is in */ + /* a given glyph slot. */ + /* */ + /* get_glyph_cbox :: A method used to access the glyph's cbox. */ + /* */ + /* set_mode :: A method used to pass additional parameters. */ + /* */ + /* raster_class :: For @FT_GLYPH_FORMAT_OUTLINE renderers only. */ + /* This is a pointer to its raster's class. */ + /* */ + typedef struct FT_Renderer_Class_ + { + FT_Module_Class root; + + FT_Glyph_Format glyph_format; + + FT_Renderer_RenderFunc render_glyph; + FT_Renderer_TransformFunc transform_glyph; + FT_Renderer_GetCBoxFunc get_glyph_cbox; + FT_Renderer_SetModeFunc set_mode; + + FT_Raster_Funcs* raster_class; + + } FT_Renderer_Class; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Renderer */ + /* */ + /* <Description> */ + /* Retrieve the current renderer for a given glyph format. */ + /* */ + /* <Input> */ + /* library :: A handle to the library object. */ + /* */ + /* format :: The glyph format. */ + /* */ + /* <Return> */ + /* A renderer handle. 0~if none found. */ + /* */ + /* <Note> */ + /* An error will be returned if a module already exists by that name, */ + /* or if the module requires a version of FreeType that is too great. */ + /* */ + /* To add a new renderer, simply use @FT_Add_Module. To retrieve a */ + /* renderer by its name, use @FT_Get_Module. */ + /* */ + FT_EXPORT( FT_Renderer ) + FT_Get_Renderer( FT_Library library, + FT_Glyph_Format format ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Renderer */ + /* */ + /* <Description> */ + /* Set the current renderer to use, and set additional mode. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library object. */ + /* */ + /* <Input> */ + /* renderer :: A handle to the renderer object. */ + /* */ + /* num_params :: The number of additional parameters. */ + /* */ + /* parameters :: Additional parameters. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* In case of success, the renderer will be used to convert glyph */ + /* images in the renderer's known format into bitmaps. */ + /* */ + /* This doesn't change the current renderer for other formats. */ + /* */ + /* Currently, no FreeType renderer module uses `parameters'; you */ + /* should thus always pass NULL as the value. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Renderer( FT_Library library, + FT_Renderer renderer, + FT_UInt num_params, + FT_Parameter* parameters ); + + /* */ + + +FT_END_HEADER + +#endif /* FTRENDER_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftsizes.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftsizes.h new file mode 100755 index 00000000..72cb08bf --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftsizes.h @@ -0,0 +1,159 @@ +/***************************************************************************/ +/* */ +/* ftsizes.h */ +/* */ +/* FreeType size objects management (specification). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Typical application would normally not need to use these functions. */ + /* However, they have been placed in a public API for the rare cases */ + /* where they are needed. */ + /* */ + /*************************************************************************/ + + +#ifndef FTSIZES_H_ +#define FTSIZES_H_ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* sizes_management */ + /* */ + /* <Title> */ + /* Size Management */ + /* */ + /* <Abstract> */ + /* Managing multiple sizes per face. */ + /* */ + /* <Description> */ + /* When creating a new face object (e.g., with @FT_New_Face), an */ + /* @FT_Size object is automatically created and used to store all */ + /* pixel-size dependent information, available in the `face->size' */ + /* field. */ + /* */ + /* It is however possible to create more sizes for a given face, */ + /* mostly in order to manage several character pixel sizes of the */ + /* same font family and style. See @FT_New_Size and @FT_Done_Size. */ + /* */ + /* Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only */ + /* modify the contents of the current `active' size; you thus need */ + /* to use @FT_Activate_Size to change it. */ + /* */ + /* 99% of applications won't need the functions provided here, */ + /* especially if they use the caching sub-system, so be cautious */ + /* when using these. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Size */ + /* */ + /* <Description> */ + /* Create a new size object from a given face object. */ + /* */ + /* <Input> */ + /* face :: A handle to a parent face object. */ + /* */ + /* <Output> */ + /* asize :: A handle to a new size object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* You need to call @FT_Activate_Size in order to select the new size */ + /* for upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size, */ + /* @FT_Load_Glyph, @FT_Load_Char, etc. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Size( FT_Face face, + FT_Size* size ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_Size */ + /* */ + /* <Description> */ + /* Discard a given size object. Note that @FT_Done_Face */ + /* automatically discards all size objects allocated with */ + /* @FT_New_Size. */ + /* */ + /* <Input> */ + /* size :: A handle to a target size object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Done_Size( FT_Size size ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Activate_Size */ + /* */ + /* <Description> */ + /* Even though it is possible to create several size objects for a */ + /* given face (see @FT_New_Size for details), functions like */ + /* @FT_Load_Glyph or @FT_Load_Char only use the one that has been */ + /* activated last to determine the `current character pixel size'. */ + /* */ + /* This function can be used to `activate' a previously created size */ + /* object. */ + /* */ + /* <Input> */ + /* size :: A handle to a target size object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* If `face' is the size's parent face object, this function changes */ + /* the value of `face->size' to the input size handle. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Activate_Size( FT_Size size ); + + /* */ + + +FT_END_HEADER + +#endif /* FTSIZES_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftsnames.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftsnames.h new file mode 100755 index 00000000..8eb8d70f --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftsnames.h @@ -0,0 +1,253 @@ +/***************************************************************************/ +/* */ +/* ftsnames.h */ +/* */ +/* Simple interface to access SFNT `name' tables (which are used */ +/* to hold font names, copyright info, notices, etc.) (specification). */ +/* */ +/* This is _not_ used to retrieve glyph names! */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTSNAMES_H_ +#define FTSNAMES_H_ + + +#include <ft2build.h> +#include FT_FREETYPE_H +#include FT_PARAMETER_TAGS_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* sfnt_names */ + /* */ + /* <Title> */ + /* SFNT Names */ + /* */ + /* <Abstract> */ + /* Access the names embedded in TrueType and OpenType files. */ + /* */ + /* <Description> */ + /* The TrueType and OpenType specifications allow the inclusion of */ + /* a special names table (`name') in font files. This table contains */ + /* textual (and internationalized) information regarding the font, */ + /* like family name, copyright, version, etc. */ + /* */ + /* The definitions below are used to access them if available. */ + /* */ + /* Note that this has nothing to do with glyph names! */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_SfntName */ + /* */ + /* <Description> */ + /* A structure used to model an SFNT `name' table entry. */ + /* */ + /* <Fields> */ + /* platform_id :: The platform ID for `string'. */ + /* See @TT_PLATFORM_XXX for possible values. */ + /* */ + /* encoding_id :: The encoding ID for `string'. */ + /* See @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX, */ + /* @TT_ISO_ID_XXX, @TT_MS_ID_XXX, and @TT_ADOBE_ID_XXX */ + /* for possible values. */ + /* */ + /* language_id :: The language ID for `string'. */ + /* See @TT_MAC_LANGID_XXX and @TT_MS_LANGID_XXX for */ + /* possible values. */ + /* */ + /* Registered OpenType values for `language_id' are */ + /* always smaller than 0x8000; values equal or larger */ + /* than 0x8000 usually indicate a language tag string */ + /* (introduced in OpenType version 1.6). Use function */ + /* @FT_Get_Sfnt_LangTag with `language_id' as its */ + /* argument to retrieve the associated language tag. */ + /* */ + /* name_id :: An identifier for `string'. */ + /* See @TT_NAME_ID_XXX for possible values. */ + /* */ + /* string :: The `name' string. Note that its format differs */ + /* depending on the (platform,encoding) pair, being */ + /* either a string of bytes (without a terminating */ + /* NULL byte) or containing UTF-16BE entities. */ + /* */ + /* string_len :: The length of `string' in bytes. */ + /* */ + /* <Note> */ + /* Please refer to the TrueType or OpenType specification for more */ + /* details. */ + /* */ + typedef struct FT_SfntName_ + { + FT_UShort platform_id; + FT_UShort encoding_id; + FT_UShort language_id; + FT_UShort name_id; + + FT_Byte* string; /* this string is *not* null-terminated! */ + FT_UInt string_len; /* in bytes */ + + } FT_SfntName; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Sfnt_Name_Count */ + /* */ + /* <Description> */ + /* Retrieve the number of name strings in the SFNT `name' table. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* <Return> */ + /* The number of strings in the `name' table. */ + /* */ + FT_EXPORT( FT_UInt ) + FT_Get_Sfnt_Name_Count( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Sfnt_Name */ + /* */ + /* <Description> */ + /* Retrieve a string of the SFNT `name' table for a given index. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* idx :: The index of the `name' string. */ + /* */ + /* <Output> */ + /* aname :: The indexed @FT_SfntName structure. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The `string' array returned in the `aname' structure is not */ + /* null-terminated. Note that you don't have to deallocate `string' */ + /* by yourself; FreeType takes care of it if you call @FT_Done_Face. */ + /* */ + /* Use @FT_Get_Sfnt_Name_Count to get the total number of available */ + /* `name' table entries, then do a loop until you get the right */ + /* platform, encoding, and name ID. */ + /* */ + /* `name' table format~1 entries can use language tags also, see */ + /* @FT_Get_Sfnt_LangTag. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Sfnt_Name( FT_Face face, + FT_UInt idx, + FT_SfntName *aname ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_SfntLangTag */ + /* */ + /* <Description> */ + /* A structure to model a language tag entry from an SFNT `name' */ + /* table. */ + /* */ + /* <Fields> */ + /* string :: The language tag string, encoded in UTF-16BE */ + /* (without trailing NULL bytes). */ + /* */ + /* string_len :: The length of `string' in *bytes*. */ + /* */ + /* <Note> */ + /* Please refer to the TrueType or OpenType specification for more */ + /* details. */ + /* */ + /* <Since> */ + /* 2.8 */ + /* */ + typedef struct FT_SfntLangTag_ + { + FT_Byte* string; /* this string is *not* null-terminated! */ + FT_UInt string_len; /* in bytes */ + + } FT_SfntLangTag; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Sfnt_LangTag */ + /* */ + /* <Description> */ + /* Retrieve the language tag associated with a language ID of an SFNT */ + /* `name' table entry. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* langID :: The language ID, as returned by @FT_Get_Sfnt_Name. */ + /* This is always a value larger than 0x8000. */ + /* */ + /* <Output> */ + /* alangTag :: The language tag associated with the `name' table */ + /* entry's language ID. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The `string' array returned in the `alangTag' structure is not */ + /* null-terminated. Note that you don't have to deallocate `string' */ + /* by yourself; FreeType takes care of it if you call @FT_Done_Face. */ + /* */ + /* Only `name' table format~1 supports language tags. For format~0 */ + /* tables, this function always returns FT_Err_Invalid_Table. For */ + /* invalid format~1 language ID values, FT_Err_Invalid_Argument is */ + /* returned. */ + /* */ + /* <Since> */ + /* 2.8 */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Sfnt_LangTag( FT_Face face, + FT_UInt langID, + FT_SfntLangTag *alangTag ); + + + /* */ + + +FT_END_HEADER + +#endif /* FTSNAMES_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftstroke.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftstroke.h new file mode 100755 index 00000000..44b6fbe1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftstroke.h @@ -0,0 +1,785 @@ +/***************************************************************************/ +/* */ +/* ftstroke.h */ +/* */ +/* FreeType path stroker (specification). */ +/* */ +/* Copyright 2002-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTSTROKE_H_ +#define FTSTROKE_H_ + +#include <ft2build.h> +#include FT_OUTLINE_H +#include FT_GLYPH_H + + +FT_BEGIN_HEADER + + + /************************************************************************ + * + * @section: + * glyph_stroker + * + * @title: + * Glyph Stroker + * + * @abstract: + * Generating bordered and stroked glyphs. + * + * @description: + * This component generates stroked outlines of a given vectorial + * glyph. It also allows you to retrieve the `outside' and/or the + * `inside' borders of the stroke. + * + * This can be useful to generate `bordered' glyph, i.e., glyphs + * displayed with a coloured (and anti-aliased) border around their + * shape. + * + * @order: + * FT_Stroker + * + * FT_Stroker_LineJoin + * FT_Stroker_LineCap + * FT_StrokerBorder + * + * FT_Outline_GetInsideBorder + * FT_Outline_GetOutsideBorder + * + * FT_Glyph_Stroke + * FT_Glyph_StrokeBorder + * + * FT_Stroker_New + * FT_Stroker_Set + * FT_Stroker_Rewind + * FT_Stroker_ParseOutline + * FT_Stroker_Done + * + * FT_Stroker_BeginSubPath + * FT_Stroker_EndSubPath + * + * FT_Stroker_LineTo + * FT_Stroker_ConicTo + * FT_Stroker_CubicTo + * + * FT_Stroker_GetBorderCounts + * FT_Stroker_ExportBorder + * FT_Stroker_GetCounts + * FT_Stroker_Export + * + */ + + + /************************************************************** + * + * @type: + * FT_Stroker + * + * @description: + * Opaque handle to a path stroker object. + */ + typedef struct FT_StrokerRec_* FT_Stroker; + + + /************************************************************** + * + * @enum: + * FT_Stroker_LineJoin + * + * @description: + * These values determine how two joining lines are rendered + * in a stroker. + * + * @values: + * FT_STROKER_LINEJOIN_ROUND :: + * Used to render rounded line joins. Circular arcs are used + * to join two lines smoothly. + * + * FT_STROKER_LINEJOIN_BEVEL :: + * Used to render beveled line joins. The outer corner of + * the joined lines is filled by enclosing the triangular + * region of the corner with a straight line between the + * outer corners of each stroke. + * + * FT_STROKER_LINEJOIN_MITER_FIXED :: + * Used to render mitered line joins, with fixed bevels if the + * miter limit is exceeded. The outer edges of the strokes + * for the two segments are extended until they meet at an + * angle. If the segments meet at too sharp an angle (such + * that the miter would extend from the intersection of the + * segments a distance greater than the product of the miter + * limit value and the border radius), then a bevel join (see + * above) is used instead. This prevents long spikes being + * created. FT_STROKER_LINEJOIN_MITER_FIXED generates a miter + * line join as used in PostScript and PDF. + * + * FT_STROKER_LINEJOIN_MITER_VARIABLE :: + * FT_STROKER_LINEJOIN_MITER :: + * Used to render mitered line joins, with variable bevels if + * the miter limit is exceeded. The intersection of the + * strokes is clipped at a line perpendicular to the bisector + * of the angle between the strokes, at the distance from the + * intersection of the segments equal to the product of the + * miter limit value and the border radius. This prevents + * long spikes being created. + * FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line + * join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias + * for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for + * backward compatibility. + */ + typedef enum FT_Stroker_LineJoin_ + { + FT_STROKER_LINEJOIN_ROUND = 0, + FT_STROKER_LINEJOIN_BEVEL = 1, + FT_STROKER_LINEJOIN_MITER_VARIABLE = 2, + FT_STROKER_LINEJOIN_MITER = FT_STROKER_LINEJOIN_MITER_VARIABLE, + FT_STROKER_LINEJOIN_MITER_FIXED = 3 + + } FT_Stroker_LineJoin; + + + /************************************************************** + * + * @enum: + * FT_Stroker_LineCap + * + * @description: + * These values determine how the end of opened sub-paths are + * rendered in a stroke. + * + * @values: + * FT_STROKER_LINECAP_BUTT :: + * The end of lines is rendered as a full stop on the last + * point itself. + * + * FT_STROKER_LINECAP_ROUND :: + * The end of lines is rendered as a half-circle around the + * last point. + * + * FT_STROKER_LINECAP_SQUARE :: + * The end of lines is rendered as a square around the + * last point. + */ + typedef enum FT_Stroker_LineCap_ + { + FT_STROKER_LINECAP_BUTT = 0, + FT_STROKER_LINECAP_ROUND, + FT_STROKER_LINECAP_SQUARE + + } FT_Stroker_LineCap; + + + /************************************************************** + * + * @enum: + * FT_StrokerBorder + * + * @description: + * These values are used to select a given stroke border + * in @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder. + * + * @values: + * FT_STROKER_BORDER_LEFT :: + * Select the left border, relative to the drawing direction. + * + * FT_STROKER_BORDER_RIGHT :: + * Select the right border, relative to the drawing direction. + * + * @note: + * Applications are generally interested in the `inside' and `outside' + * borders. However, there is no direct mapping between these and the + * `left' and `right' ones, since this really depends on the glyph's + * drawing orientation, which varies between font formats. + * + * You can however use @FT_Outline_GetInsideBorder and + * @FT_Outline_GetOutsideBorder to get these. + */ + typedef enum FT_StrokerBorder_ + { + FT_STROKER_BORDER_LEFT = 0, + FT_STROKER_BORDER_RIGHT + + } FT_StrokerBorder; + + + /************************************************************** + * + * @function: + * FT_Outline_GetInsideBorder + * + * @description: + * Retrieve the @FT_StrokerBorder value corresponding to the + * `inside' borders of a given outline. + * + * @input: + * outline :: + * The source outline handle. + * + * @return: + * The border index. @FT_STROKER_BORDER_RIGHT for empty or invalid + * outlines. + */ + FT_EXPORT( FT_StrokerBorder ) + FT_Outline_GetInsideBorder( FT_Outline* outline ); + + + /************************************************************** + * + * @function: + * FT_Outline_GetOutsideBorder + * + * @description: + * Retrieve the @FT_StrokerBorder value corresponding to the + * `outside' borders of a given outline. + * + * @input: + * outline :: + * The source outline handle. + * + * @return: + * The border index. @FT_STROKER_BORDER_LEFT for empty or invalid + * outlines. + */ + FT_EXPORT( FT_StrokerBorder ) + FT_Outline_GetOutsideBorder( FT_Outline* outline ); + + + /************************************************************** + * + * @function: + * FT_Stroker_New + * + * @description: + * Create a new stroker object. + * + * @input: + * library :: + * FreeType library handle. + * + * @output: + * astroker :: + * A new stroker object handle. NULL in case of error. + * + * @return: + * FreeType error code. 0~means success. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_New( FT_Library library, + FT_Stroker *astroker ); + + + /************************************************************** + * + * @function: + * FT_Stroker_Set + * + * @description: + * Reset a stroker object's attributes. + * + * @input: + * stroker :: + * The target stroker handle. + * + * radius :: + * The border radius. + * + * line_cap :: + * The line cap style. + * + * line_join :: + * The line join style. + * + * miter_limit :: + * The miter limit for the FT_STROKER_LINEJOIN_MITER_FIXED and + * FT_STROKER_LINEJOIN_MITER_VARIABLE line join styles, + * expressed as 16.16 fixed-point value. + * + * @note: + * The radius is expressed in the same units as the outline + * coordinates. + * + * This function calls @FT_Stroker_Rewind automatically. + */ + FT_EXPORT( void ) + FT_Stroker_Set( FT_Stroker stroker, + FT_Fixed radius, + FT_Stroker_LineCap line_cap, + FT_Stroker_LineJoin line_join, + FT_Fixed miter_limit ); + + + /************************************************************** + * + * @function: + * FT_Stroker_Rewind + * + * @description: + * Reset a stroker object without changing its attributes. + * You should call this function before beginning a new + * series of calls to @FT_Stroker_BeginSubPath or + * @FT_Stroker_EndSubPath. + * + * @input: + * stroker :: + * The target stroker handle. + */ + FT_EXPORT( void ) + FT_Stroker_Rewind( FT_Stroker stroker ); + + + /************************************************************** + * + * @function: + * FT_Stroker_ParseOutline + * + * @description: + * A convenience function used to parse a whole outline with + * the stroker. The resulting outline(s) can be retrieved + * later by functions like @FT_Stroker_GetCounts and @FT_Stroker_Export. + * + * @input: + * stroker :: + * The target stroker handle. + * + * outline :: + * The source outline. + * + * opened :: + * A boolean. If~1, the outline is treated as an open path instead + * of a closed one. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If `opened' is~0 (the default), the outline is treated as a closed + * path, and the stroker generates two distinct `border' outlines. + * + * If `opened' is~1, the outline is processed as an open path, and the + * stroker generates a single `stroke' outline. + * + * This function calls @FT_Stroker_Rewind automatically. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_ParseOutline( FT_Stroker stroker, + FT_Outline* outline, + FT_Bool opened ); + + + /************************************************************** + * + * @function: + * FT_Stroker_BeginSubPath + * + * @description: + * Start a new sub-path in the stroker. + * + * @input: + * stroker :: + * The target stroker handle. + * + * to :: + * A pointer to the start vector. + * + * open :: + * A boolean. If~1, the sub-path is treated as an open one. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function is useful when you need to stroke a path that is + * not stored as an @FT_Outline object. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_BeginSubPath( FT_Stroker stroker, + FT_Vector* to, + FT_Bool open ); + + + /************************************************************** + * + * @function: + * FT_Stroker_EndSubPath + * + * @description: + * Close the current sub-path in the stroker. + * + * @input: + * stroker :: + * The target stroker handle. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You should call this function after @FT_Stroker_BeginSubPath. + * If the subpath was not `opened', this function `draws' a + * single line segment to the start position when needed. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_EndSubPath( FT_Stroker stroker ); + + + /************************************************************** + * + * @function: + * FT_Stroker_LineTo + * + * @description: + * `Draw' a single line segment in the stroker's current sub-path, + * from the last position. + * + * @input: + * stroker :: + * The target stroker handle. + * + * to :: + * A pointer to the destination point. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You should call this function between @FT_Stroker_BeginSubPath and + * @FT_Stroker_EndSubPath. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_LineTo( FT_Stroker stroker, + FT_Vector* to ); + + + /************************************************************** + * + * @function: + * FT_Stroker_ConicTo + * + * @description: + * `Draw' a single quadratic Bezier in the stroker's current sub-path, + * from the last position. + * + * @input: + * stroker :: + * The target stroker handle. + * + * control :: + * A pointer to a Bezier control point. + * + * to :: + * A pointer to the destination point. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You should call this function between @FT_Stroker_BeginSubPath and + * @FT_Stroker_EndSubPath. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_ConicTo( FT_Stroker stroker, + FT_Vector* control, + FT_Vector* to ); + + + /************************************************************** + * + * @function: + * FT_Stroker_CubicTo + * + * @description: + * `Draw' a single cubic Bezier in the stroker's current sub-path, + * from the last position. + * + * @input: + * stroker :: + * The target stroker handle. + * + * control1 :: + * A pointer to the first Bezier control point. + * + * control2 :: + * A pointer to second Bezier control point. + * + * to :: + * A pointer to the destination point. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You should call this function between @FT_Stroker_BeginSubPath and + * @FT_Stroker_EndSubPath. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_CubicTo( FT_Stroker stroker, + FT_Vector* control1, + FT_Vector* control2, + FT_Vector* to ); + + + /************************************************************** + * + * @function: + * FT_Stroker_GetBorderCounts + * + * @description: + * Call this function once you have finished parsing your paths + * with the stroker. It returns the number of points and + * contours necessary to export one of the `border' or `stroke' + * outlines generated by the stroker. + * + * @input: + * stroker :: + * The target stroker handle. + * + * border :: + * The border index. + * + * @output: + * anum_points :: + * The number of points. + * + * anum_contours :: + * The number of contours. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * When an outline, or a sub-path, is `closed', the stroker generates + * two independent `border' outlines, named `left' and `right'. + * + * When the outline, or a sub-path, is `opened', the stroker merges + * the `border' outlines with caps. The `left' border receives all + * points, while the `right' border becomes empty. + * + * Use the function @FT_Stroker_GetCounts instead if you want to + * retrieve the counts associated to both borders. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_GetBorderCounts( FT_Stroker stroker, + FT_StrokerBorder border, + FT_UInt *anum_points, + FT_UInt *anum_contours ); + + + /************************************************************** + * + * @function: + * FT_Stroker_ExportBorder + * + * @description: + * Call this function after @FT_Stroker_GetBorderCounts to + * export the corresponding border to your own @FT_Outline + * structure. + * + * Note that this function appends the border points and + * contours to your outline, but does not try to resize its + * arrays. + * + * @input: + * stroker :: + * The target stroker handle. + * + * border :: + * The border index. + * + * outline :: + * The target outline handle. + * + * @note: + * Always call this function after @FT_Stroker_GetBorderCounts to + * get sure that there is enough room in your @FT_Outline object to + * receive all new data. + * + * When an outline, or a sub-path, is `closed', the stroker generates + * two independent `border' outlines, named `left' and `right'. + * + * When the outline, or a sub-path, is `opened', the stroker merges + * the `border' outlines with caps. The `left' border receives all + * points, while the `right' border becomes empty. + * + * Use the function @FT_Stroker_Export instead if you want to + * retrieve all borders at once. + */ + FT_EXPORT( void ) + FT_Stroker_ExportBorder( FT_Stroker stroker, + FT_StrokerBorder border, + FT_Outline* outline ); + + + /************************************************************** + * + * @function: + * FT_Stroker_GetCounts + * + * @description: + * Call this function once you have finished parsing your paths + * with the stroker. It returns the number of points and + * contours necessary to export all points/borders from the stroked + * outline/path. + * + * @input: + * stroker :: + * The target stroker handle. + * + * @output: + * anum_points :: + * The number of points. + * + * anum_contours :: + * The number of contours. + * + * @return: + * FreeType error code. 0~means success. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_GetCounts( FT_Stroker stroker, + FT_UInt *anum_points, + FT_UInt *anum_contours ); + + + /************************************************************** + * + * @function: + * FT_Stroker_Export + * + * @description: + * Call this function after @FT_Stroker_GetBorderCounts to + * export all borders to your own @FT_Outline structure. + * + * Note that this function appends the border points and + * contours to your outline, but does not try to resize its + * arrays. + * + * @input: + * stroker :: + * The target stroker handle. + * + * outline :: + * The target outline handle. + */ + FT_EXPORT( void ) + FT_Stroker_Export( FT_Stroker stroker, + FT_Outline* outline ); + + + /************************************************************** + * + * @function: + * FT_Stroker_Done + * + * @description: + * Destroy a stroker object. + * + * @input: + * stroker :: + * A stroker handle. Can be NULL. + */ + FT_EXPORT( void ) + FT_Stroker_Done( FT_Stroker stroker ); + + + /************************************************************** + * + * @function: + * FT_Glyph_Stroke + * + * @description: + * Stroke a given outline glyph object with a given stroker. + * + * @inout: + * pglyph :: + * Source glyph handle on input, new glyph handle on output. + * + * @input: + * stroker :: + * A stroker handle. + * + * destroy :: + * A Boolean. If~1, the source glyph object is destroyed + * on success. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source glyph is untouched in case of error. + * + * Adding stroke may yield a significantly wider and taller glyph + * depending on how large of a radius was used to stroke the glyph. You + * may need to manually adjust horizontal and vertical advance amounts + * to account for this added size. + */ + FT_EXPORT( FT_Error ) + FT_Glyph_Stroke( FT_Glyph *pglyph, + FT_Stroker stroker, + FT_Bool destroy ); + + + /************************************************************** + * + * @function: + * FT_Glyph_StrokeBorder + * + * @description: + * Stroke a given outline glyph object with a given stroker, but + * only return either its inside or outside border. + * + * @inout: + * pglyph :: + * Source glyph handle on input, new glyph handle on output. + * + * @input: + * stroker :: + * A stroker handle. + * + * inside :: + * A Boolean. If~1, return the inside border, otherwise + * the outside border. + * + * destroy :: + * A Boolean. If~1, the source glyph object is destroyed + * on success. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source glyph is untouched in case of error. + * + * Adding stroke may yield a significantly wider and taller glyph + * depending on how large of a radius was used to stroke the glyph. You + * may need to manually adjust horizontal and vertical advance amounts + * to account for this added size. + */ + FT_EXPORT( FT_Error ) + FT_Glyph_StrokeBorder( FT_Glyph *pglyph, + FT_Stroker stroker, + FT_Bool inside, + FT_Bool destroy ); + + /* */ + +FT_END_HEADER + +#endif /* FTSTROKE_H_ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftsynth.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftsynth.h new file mode 100755 index 00000000..ff9fb43d --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftsynth.h @@ -0,0 +1,84 @@ +/***************************************************************************/ +/* */ +/* ftsynth.h */ +/* */ +/* FreeType synthesizing code for emboldening and slanting */ +/* (specification). */ +/* */ +/* Copyright 2000-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /********* *********/ + /********* WARNING, THIS IS ALPHA CODE! THIS API *********/ + /********* IS DUE TO CHANGE UNTIL STRICTLY NOTIFIED BY THE *********/ + /********* FREETYPE DEVELOPMENT TEAM *********/ + /********* *********/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /* Main reason for not lifting the functions in this module to a */ + /* `standard' API is that the used parameters for emboldening and */ + /* slanting are not configurable. Consider the functions as a */ + /* code resource that should be copied into the application and */ + /* adapted to the particular needs. */ + + +#ifndef FTSYNTH_H_ +#define FTSYNTH_H_ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /* Embolden a glyph by a `reasonable' value (which is highly a matter of */ + /* taste). This function is actually a convenience function, providing */ + /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */ + /* */ + /* For emboldened outlines the height, width, and advance metrics are */ + /* increased by the strength of the emboldening -- this even affects */ + /* mono-width fonts! */ + /* */ + /* You can also call @FT_Outline_Get_CBox to get precise values. */ + FT_EXPORT( void ) + FT_GlyphSlot_Embolden( FT_GlyphSlot slot ); + + /* Slant an outline glyph to the right by about 12 degrees. */ + FT_EXPORT( void ) + FT_GlyphSlot_Oblique( FT_GlyphSlot slot ); + + /* */ + + +FT_END_HEADER + +#endif /* FTSYNTH_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftsystem.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftsystem.h new file mode 100755 index 00000000..f6b1629e --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftsystem.h @@ -0,0 +1,355 @@ +/***************************************************************************/ +/* */ +/* ftsystem.h */ +/* */ +/* FreeType low-level system interface definition (specification). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTSYSTEM_H_ +#define FTSYSTEM_H_ + + +#include <ft2build.h> + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* system_interface */ + /* */ + /* <Title> */ + /* System Interface */ + /* */ + /* <Abstract> */ + /* How FreeType manages memory and i/o. */ + /* */ + /* <Description> */ + /* This section contains various definitions related to memory */ + /* management and i/o access. You need to understand this */ + /* information if you want to use a custom memory manager or you own */ + /* i/o streams. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* M E M O R Y M A N A G E M E N T */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @type: + * FT_Memory + * + * @description: + * A handle to a given memory manager object, defined with an + * @FT_MemoryRec structure. + * + */ + typedef struct FT_MemoryRec_* FT_Memory; + + + /************************************************************************* + * + * @functype: + * FT_Alloc_Func + * + * @description: + * A function used to allocate `size' bytes from `memory'. + * + * @input: + * memory :: + * A handle to the source memory manager. + * + * size :: + * The size in bytes to allocate. + * + * @return: + * Address of new memory block. 0~in case of failure. + * + */ + typedef void* + (*FT_Alloc_Func)( FT_Memory memory, + long size ); + + + /************************************************************************* + * + * @functype: + * FT_Free_Func + * + * @description: + * A function used to release a given block of memory. + * + * @input: + * memory :: + * A handle to the source memory manager. + * + * block :: + * The address of the target memory block. + * + */ + typedef void + (*FT_Free_Func)( FT_Memory memory, + void* block ); + + + /************************************************************************* + * + * @functype: + * FT_Realloc_Func + * + * @description: + * A function used to re-allocate a given block of memory. + * + * @input: + * memory :: + * A handle to the source memory manager. + * + * cur_size :: + * The block's current size in bytes. + * + * new_size :: + * The block's requested new size. + * + * block :: + * The block's current address. + * + * @return: + * New block address. 0~in case of memory shortage. + * + * @note: + * In case of error, the old block must still be available. + * + */ + typedef void* + (*FT_Realloc_Func)( FT_Memory memory, + long cur_size, + long new_size, + void* block ); + + + /************************************************************************* + * + * @struct: + * FT_MemoryRec + * + * @description: + * A structure used to describe a given memory manager to FreeType~2. + * + * @fields: + * user :: + * A generic typeless pointer for user data. + * + * alloc :: + * A pointer type to an allocation function. + * + * free :: + * A pointer type to an memory freeing function. + * + * realloc :: + * A pointer type to a reallocation function. + * + */ + struct FT_MemoryRec_ + { + void* user; + FT_Alloc_Func alloc; + FT_Free_Func free; + FT_Realloc_Func realloc; + }; + + + /*************************************************************************/ + /* */ + /* I / O M A N A G E M E N T */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @type: + * FT_Stream + * + * @description: + * A handle to an input stream. + * + * @also: + * See @FT_StreamRec for the publicly accessible fields of a given + * stream object. + * + */ + typedef struct FT_StreamRec_* FT_Stream; + + + /************************************************************************* + * + * @struct: + * FT_StreamDesc + * + * @description: + * A union type used to store either a long or a pointer. This is used + * to store a file descriptor or a `FILE*' in an input stream. + * + */ + typedef union FT_StreamDesc_ + { + long value; + void* pointer; + + } FT_StreamDesc; + + + /************************************************************************* + * + * @functype: + * FT_Stream_IoFunc + * + * @description: + * A function used to seek and read data from a given input stream. + * + * @input: + * stream :: + * A handle to the source stream. + * + * offset :: + * The offset of read in stream (always from start). + * + * buffer :: + * The address of the read buffer. + * + * count :: + * The number of bytes to read from the stream. + * + * @return: + * The number of bytes effectively read by the stream. + * + * @note: + * This function might be called to perform a seek or skip operation + * with a `count' of~0. A non-zero return value then indicates an + * error. + * + */ + typedef unsigned long + (*FT_Stream_IoFunc)( FT_Stream stream, + unsigned long offset, + unsigned char* buffer, + unsigned long count ); + + + /************************************************************************* + * + * @functype: + * FT_Stream_CloseFunc + * + * @description: + * A function used to close a given input stream. + * + * @input: + * stream :: + * A handle to the target stream. + * + */ + typedef void + (*FT_Stream_CloseFunc)( FT_Stream stream ); + + + /************************************************************************* + * + * @struct: + * FT_StreamRec + * + * @description: + * A structure used to describe an input stream. + * + * @input: + * base :: + * For memory-based streams, this is the address of the first stream + * byte in memory. This field should always be set to NULL for + * disk-based streams. + * + * size :: + * The stream size in bytes. + * + * In case of compressed streams where the size is unknown before + * actually doing the decompression, the value is set to 0x7FFFFFFF. + * (Note that this size value can occur for normal streams also; it is + * thus just a hint.) + * + * pos :: + * The current position within the stream. + * + * descriptor :: + * This field is a union that can hold an integer or a pointer. It is + * used by stream implementations to store file descriptors or `FILE*' + * pointers. + * + * pathname :: + * This field is completely ignored by FreeType. However, it is often + * useful during debugging to use it to store the stream's filename + * (where available). + * + * read :: + * The stream's input function. + * + * close :: + * The stream's close function. + * + * memory :: + * The memory manager to use to preload frames. This is set + * internally by FreeType and shouldn't be touched by stream + * implementations. + * + * cursor :: + * This field is set and used internally by FreeType when parsing + * frames. + * + * limit :: + * This field is set and used internally by FreeType when parsing + * frames. + * + */ + typedef struct FT_StreamRec_ + { + unsigned char* base; + unsigned long size; + unsigned long pos; + + FT_StreamDesc descriptor; + FT_StreamDesc pathname; + FT_Stream_IoFunc read; + FT_Stream_CloseFunc close; + + FT_Memory memory; + unsigned char* cursor; + unsigned char* limit; + + } FT_StreamRec; + + /* */ + + +FT_END_HEADER + +#endif /* FTSYSTEM_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/fttrigon.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/fttrigon.h new file mode 100755 index 00000000..2e3f3f1f --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/fttrigon.h @@ -0,0 +1,350 @@ +/***************************************************************************/ +/* */ +/* fttrigon.h */ +/* */ +/* FreeType trigonometric functions (specification). */ +/* */ +/* Copyright 2001-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTTRIGON_H_ +#define FTTRIGON_H_ + +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* computations */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @type: + * FT_Angle + * + * @description: + * This type is used to model angle values in FreeType. Note that the + * angle is a 16.16 fixed-point value expressed in degrees. + * + */ + typedef FT_Fixed FT_Angle; + + + /************************************************************************* + * + * @macro: + * FT_ANGLE_PI + * + * @description: + * The angle pi expressed in @FT_Angle units. + * + */ +#define FT_ANGLE_PI ( 180L << 16 ) + + + /************************************************************************* + * + * @macro: + * FT_ANGLE_2PI + * + * @description: + * The angle 2*pi expressed in @FT_Angle units. + * + */ +#define FT_ANGLE_2PI ( FT_ANGLE_PI * 2 ) + + + /************************************************************************* + * + * @macro: + * FT_ANGLE_PI2 + * + * @description: + * The angle pi/2 expressed in @FT_Angle units. + * + */ +#define FT_ANGLE_PI2 ( FT_ANGLE_PI / 2 ) + + + /************************************************************************* + * + * @macro: + * FT_ANGLE_PI4 + * + * @description: + * The angle pi/4 expressed in @FT_Angle units. + * + */ +#define FT_ANGLE_PI4 ( FT_ANGLE_PI / 4 ) + + + /************************************************************************* + * + * @function: + * FT_Sin + * + * @description: + * Return the sinus of a given angle in fixed-point format. + * + * @input: + * angle :: + * The input angle. + * + * @return: + * The sinus value. + * + * @note: + * If you need both the sinus and cosinus for a given angle, use the + * function @FT_Vector_Unit. + * + */ + FT_EXPORT( FT_Fixed ) + FT_Sin( FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Cos + * + * @description: + * Return the cosinus of a given angle in fixed-point format. + * + * @input: + * angle :: + * The input angle. + * + * @return: + * The cosinus value. + * + * @note: + * If you need both the sinus and cosinus for a given angle, use the + * function @FT_Vector_Unit. + * + */ + FT_EXPORT( FT_Fixed ) + FT_Cos( FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Tan + * + * @description: + * Return the tangent of a given angle in fixed-point format. + * + * @input: + * angle :: + * The input angle. + * + * @return: + * The tangent value. + * + */ + FT_EXPORT( FT_Fixed ) + FT_Tan( FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Atan2 + * + * @description: + * Return the arc-tangent corresponding to a given vector (x,y) in + * the 2d plane. + * + * @input: + * x :: + * The horizontal vector coordinate. + * + * y :: + * The vertical vector coordinate. + * + * @return: + * The arc-tangent value (i.e. angle). + * + */ + FT_EXPORT( FT_Angle ) + FT_Atan2( FT_Fixed x, + FT_Fixed y ); + + + /************************************************************************* + * + * @function: + * FT_Angle_Diff + * + * @description: + * Return the difference between two angles. The result is always + * constrained to the ]-PI..PI] interval. + * + * @input: + * angle1 :: + * First angle. + * + * angle2 :: + * Second angle. + * + * @return: + * Constrained value of `value2-value1'. + * + */ + FT_EXPORT( FT_Angle ) + FT_Angle_Diff( FT_Angle angle1, + FT_Angle angle2 ); + + + /************************************************************************* + * + * @function: + * FT_Vector_Unit + * + * @description: + * Return the unit vector corresponding to a given angle. After the + * call, the value of `vec.x' will be `cos(angle)', and the value of + * `vec.y' will be `sin(angle)'. + * + * This function is useful to retrieve both the sinus and cosinus of a + * given angle quickly. + * + * @output: + * vec :: + * The address of target vector. + * + * @input: + * angle :: + * The input angle. + * + */ + FT_EXPORT( void ) + FT_Vector_Unit( FT_Vector* vec, + FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Vector_Rotate + * + * @description: + * Rotate a vector by a given angle. + * + * @inout: + * vec :: + * The address of target vector. + * + * @input: + * angle :: + * The input angle. + * + */ + FT_EXPORT( void ) + FT_Vector_Rotate( FT_Vector* vec, + FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Vector_Length + * + * @description: + * Return the length of a given vector. + * + * @input: + * vec :: + * The address of target vector. + * + * @return: + * The vector length, expressed in the same units that the original + * vector coordinates. + * + */ + FT_EXPORT( FT_Fixed ) + FT_Vector_Length( FT_Vector* vec ); + + + /************************************************************************* + * + * @function: + * FT_Vector_Polarize + * + * @description: + * Compute both the length and angle of a given vector. + * + * @input: + * vec :: + * The address of source vector. + * + * @output: + * length :: + * The vector length. + * + * angle :: + * The vector angle. + * + */ + FT_EXPORT( void ) + FT_Vector_Polarize( FT_Vector* vec, + FT_Fixed *length, + FT_Angle *angle ); + + + /************************************************************************* + * + * @function: + * FT_Vector_From_Polar + * + * @description: + * Compute vector coordinates from a length and angle. + * + * @output: + * vec :: + * The address of source vector. + * + * @input: + * length :: + * The vector length. + * + * angle :: + * The vector angle. + * + */ + FT_EXPORT( void ) + FT_Vector_From_Polar( FT_Vector* vec, + FT_Fixed length, + FT_Angle angle ); + + /* */ + + +FT_END_HEADER + +#endif /* FTTRIGON_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/fttypes.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/fttypes.h new file mode 100755 index 00000000..f638c2e5 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/fttypes.h @@ -0,0 +1,602 @@ +/***************************************************************************/ +/* */ +/* fttypes.h */ +/* */ +/* FreeType simple types definitions (specification only). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTTYPES_H_ +#define FTTYPES_H_ + + +#include <ft2build.h> +#include FT_CONFIG_CONFIG_H +#include FT_SYSTEM_H +#include FT_IMAGE_H + +#include <stddef.h> + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* basic_types */ + /* */ + /* <Title> */ + /* Basic Data Types */ + /* */ + /* <Abstract> */ + /* The basic data types defined by the library. */ + /* */ + /* <Description> */ + /* This section contains the basic data types defined by FreeType~2, */ + /* ranging from simple scalar types to bitmap descriptors. More */ + /* font-specific structures are defined in a different section. */ + /* */ + /* <Order> */ + /* FT_Byte */ + /* FT_Bytes */ + /* FT_Char */ + /* FT_Int */ + /* FT_UInt */ + /* FT_Int16 */ + /* FT_UInt16 */ + /* FT_Int32 */ + /* FT_UInt32 */ + /* FT_Int64 */ + /* FT_UInt64 */ + /* FT_Short */ + /* FT_UShort */ + /* FT_Long */ + /* FT_ULong */ + /* FT_Bool */ + /* FT_Offset */ + /* FT_PtrDist */ + /* FT_String */ + /* FT_Tag */ + /* FT_Error */ + /* FT_Fixed */ + /* FT_Pointer */ + /* FT_Pos */ + /* FT_Vector */ + /* FT_BBox */ + /* FT_Matrix */ + /* FT_FWord */ + /* FT_UFWord */ + /* FT_F2Dot14 */ + /* FT_UnitVector */ + /* FT_F26Dot6 */ + /* FT_Data */ + /* */ + /* FT_MAKE_TAG */ + /* */ + /* FT_Generic */ + /* FT_Generic_Finalizer */ + /* */ + /* FT_Bitmap */ + /* FT_Pixel_Mode */ + /* FT_Palette_Mode */ + /* FT_Glyph_Format */ + /* FT_IMAGE_TAG */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Bool */ + /* */ + /* <Description> */ + /* A typedef of unsigned char, used for simple booleans. As usual, */ + /* values 1 and~0 represent true and false, respectively. */ + /* */ + typedef unsigned char FT_Bool; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_FWord */ + /* */ + /* <Description> */ + /* A signed 16-bit integer used to store a distance in original font */ + /* units. */ + /* */ + typedef signed short FT_FWord; /* distance in FUnits */ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_UFWord */ + /* */ + /* <Description> */ + /* An unsigned 16-bit integer used to store a distance in original */ + /* font units. */ + /* */ + typedef unsigned short FT_UFWord; /* unsigned distance */ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Char */ + /* */ + /* <Description> */ + /* A simple typedef for the _signed_ char type. */ + /* */ + typedef signed char FT_Char; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Byte */ + /* */ + /* <Description> */ + /* A simple typedef for the _unsigned_ char type. */ + /* */ + typedef unsigned char FT_Byte; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Bytes */ + /* */ + /* <Description> */ + /* A typedef for constant memory areas. */ + /* */ + typedef const FT_Byte* FT_Bytes; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Tag */ + /* */ + /* <Description> */ + /* A typedef for 32-bit tags (as used in the SFNT format). */ + /* */ + typedef FT_UInt32 FT_Tag; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_String */ + /* */ + /* <Description> */ + /* A simple typedef for the char type, usually used for strings. */ + /* */ + typedef char FT_String; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Short */ + /* */ + /* <Description> */ + /* A typedef for signed short. */ + /* */ + typedef signed short FT_Short; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_UShort */ + /* */ + /* <Description> */ + /* A typedef for unsigned short. */ + /* */ + typedef unsigned short FT_UShort; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Int */ + /* */ + /* <Description> */ + /* A typedef for the int type. */ + /* */ + typedef signed int FT_Int; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_UInt */ + /* */ + /* <Description> */ + /* A typedef for the unsigned int type. */ + /* */ + typedef unsigned int FT_UInt; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Long */ + /* */ + /* <Description> */ + /* A typedef for signed long. */ + /* */ + typedef signed long FT_Long; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_ULong */ + /* */ + /* <Description> */ + /* A typedef for unsigned long. */ + /* */ + typedef unsigned long FT_ULong; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_F2Dot14 */ + /* */ + /* <Description> */ + /* A signed 2.14 fixed-point type used for unit vectors. */ + /* */ + typedef signed short FT_F2Dot14; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_F26Dot6 */ + /* */ + /* <Description> */ + /* A signed 26.6 fixed-point type used for vectorial pixel */ + /* coordinates. */ + /* */ + typedef signed long FT_F26Dot6; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Fixed */ + /* */ + /* <Description> */ + /* This type is used to store 16.16 fixed-point values, like scaling */ + /* values or matrix coefficients. */ + /* */ + typedef signed long FT_Fixed; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Error */ + /* */ + /* <Description> */ + /* The FreeType error code type. A value of~0 is always interpreted */ + /* as a successful operation. */ + /* */ + typedef int FT_Error; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Pointer */ + /* */ + /* <Description> */ + /* A simple typedef for a typeless pointer. */ + /* */ + typedef void* FT_Pointer; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Offset */ + /* */ + /* <Description> */ + /* This is equivalent to the ANSI~C `size_t' type, i.e., the largest */ + /* _unsigned_ integer type used to express a file size or position, */ + /* or a memory block size. */ + /* */ + typedef size_t FT_Offset; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_PtrDist */ + /* */ + /* <Description> */ + /* This is equivalent to the ANSI~C `ptrdiff_t' type, i.e., the */ + /* largest _signed_ integer type used to express the distance */ + /* between two pointers. */ + /* */ + typedef ft_ptrdiff_t FT_PtrDist; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_UnitVector */ + /* */ + /* <Description> */ + /* A simple structure used to store a 2D vector unit vector. Uses */ + /* FT_F2Dot14 types. */ + /* */ + /* <Fields> */ + /* x :: Horizontal coordinate. */ + /* */ + /* y :: Vertical coordinate. */ + /* */ + typedef struct FT_UnitVector_ + { + FT_F2Dot14 x; + FT_F2Dot14 y; + + } FT_UnitVector; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Matrix */ + /* */ + /* <Description> */ + /* A simple structure used to store a 2x2 matrix. Coefficients are */ + /* in 16.16 fixed-point format. The computation performed is: */ + /* */ + /* { */ + /* x' = x*xx + y*xy */ + /* y' = x*yx + y*yy */ + /* } */ + /* */ + /* <Fields> */ + /* xx :: Matrix coefficient. */ + /* */ + /* xy :: Matrix coefficient. */ + /* */ + /* yx :: Matrix coefficient. */ + /* */ + /* yy :: Matrix coefficient. */ + /* */ + typedef struct FT_Matrix_ + { + FT_Fixed xx, xy; + FT_Fixed yx, yy; + + } FT_Matrix; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Data */ + /* */ + /* <Description> */ + /* Read-only binary data represented as a pointer and a length. */ + /* */ + /* <Fields> */ + /* pointer :: The data. */ + /* */ + /* length :: The length of the data in bytes. */ + /* */ + typedef struct FT_Data_ + { + const FT_Byte* pointer; + FT_Int length; + + } FT_Data; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Generic_Finalizer */ + /* */ + /* <Description> */ + /* Describe a function used to destroy the `client' data of any */ + /* FreeType object. See the description of the @FT_Generic type for */ + /* details of usage. */ + /* */ + /* <Input> */ + /* The address of the FreeType object that is under finalization. */ + /* Its client data is accessed through its `generic' field. */ + /* */ + typedef void (*FT_Generic_Finalizer)( void* object ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Generic */ + /* */ + /* <Description> */ + /* Client applications often need to associate their own data to a */ + /* variety of FreeType core objects. For example, a text layout API */ + /* might want to associate a glyph cache to a given size object. */ + /* */ + /* Some FreeType object contains a `generic' field, of type */ + /* FT_Generic, which usage is left to client applications and font */ + /* servers. */ + /* */ + /* It can be used to store a pointer to client-specific data, as well */ + /* as the address of a `finalizer' function, which will be called by */ + /* FreeType when the object is destroyed (for example, the previous */ + /* client example would put the address of the glyph cache destructor */ + /* in the `finalizer' field). */ + /* */ + /* <Fields> */ + /* data :: A typeless pointer to any client-specified data. This */ + /* field is completely ignored by the FreeType library. */ + /* */ + /* finalizer :: A pointer to a `generic finalizer' function, which */ + /* will be called when the object is destroyed. If this */ + /* field is set to NULL, no code will be called. */ + /* */ + typedef struct FT_Generic_ + { + void* data; + FT_Generic_Finalizer finalizer; + + } FT_Generic; + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_MAKE_TAG */ + /* */ + /* <Description> */ + /* This macro converts four-letter tags that are used to label */ + /* TrueType tables into an unsigned long, to be used within FreeType. */ + /* */ + /* <Note> */ + /* The produced values *must* be 32-bit integers. Don't redefine */ + /* this macro. */ + /* */ +#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \ + (FT_Tag) \ + ( ( (FT_ULong)_x1 << 24 ) | \ + ( (FT_ULong)_x2 << 16 ) | \ + ( (FT_ULong)_x3 << 8 ) | \ + (FT_ULong)_x4 ) + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* L I S T M A N A G E M E N T */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* list_processing */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_ListNode */ + /* */ + /* <Description> */ + /* Many elements and objects in FreeType are listed through an */ + /* @FT_List record (see @FT_ListRec). As its name suggests, an */ + /* FT_ListNode is a handle to a single list element. */ + /* */ + typedef struct FT_ListNodeRec_* FT_ListNode; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_List */ + /* */ + /* <Description> */ + /* A handle to a list record (see @FT_ListRec). */ + /* */ + typedef struct FT_ListRec_* FT_List; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_ListNodeRec */ + /* */ + /* <Description> */ + /* A structure used to hold a single list element. */ + /* */ + /* <Fields> */ + /* prev :: The previous element in the list. NULL if first. */ + /* */ + /* next :: The next element in the list. NULL if last. */ + /* */ + /* data :: A typeless pointer to the listed object. */ + /* */ + typedef struct FT_ListNodeRec_ + { + FT_ListNode prev; + FT_ListNode next; + void* data; + + } FT_ListNodeRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_ListRec */ + /* */ + /* <Description> */ + /* A structure used to hold a simple doubly-linked list. These are */ + /* used in many parts of FreeType. */ + /* */ + /* <Fields> */ + /* head :: The head (first element) of doubly-linked list. */ + /* */ + /* tail :: The tail (last element) of doubly-linked list. */ + /* */ + typedef struct FT_ListRec_ + { + FT_ListNode head; + FT_ListNode tail; + + } FT_ListRec; + + /* */ + + +#define FT_IS_EMPTY( list ) ( (list).head == 0 ) +#define FT_BOOL( x ) ( (FT_Bool)( x ) ) + + /* concatenate C tokens */ +#define FT_ERR_XCAT( x, y ) x ## y +#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y ) + + /* see `ftmoderr.h' for descriptions of the following macros */ + +#define FT_ERR( e ) FT_ERR_CAT( FT_ERR_PREFIX, e ) + +#define FT_ERROR_BASE( x ) ( (x) & 0xFF ) +#define FT_ERROR_MODULE( x ) ( (x) & 0xFF00U ) + +#define FT_ERR_EQ( x, e ) \ + ( FT_ERROR_BASE( x ) == FT_ERROR_BASE( FT_ERR( e ) ) ) +#define FT_ERR_NEQ( x, e ) \ + ( FT_ERROR_BASE( x ) != FT_ERROR_BASE( FT_ERR( e ) ) ) + + +FT_END_HEADER + +#endif /* FTTYPES_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftwinfnt.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftwinfnt.h new file mode 100755 index 00000000..461c65b7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ftwinfnt.h @@ -0,0 +1,275 @@ +/***************************************************************************/ +/* */ +/* ftwinfnt.h */ +/* */ +/* FreeType API for accessing Windows fnt-specific data. */ +/* */ +/* Copyright 2003-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTWINFNT_H_ +#define FTWINFNT_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* winfnt_fonts */ + /* */ + /* <Title> */ + /* Window FNT Files */ + /* */ + /* <Abstract> */ + /* Windows FNT specific API. */ + /* */ + /* <Description> */ + /* This section contains the declaration of Windows FNT specific */ + /* functions. */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @enum: + * FT_WinFNT_ID_XXX + * + * @description: + * A list of valid values for the `charset' byte in + * @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX + * encodings (except for cp1361) can be found at + * ftp://ftp.unicode.org/Public in the MAPPINGS/VENDORS/MICSFT/WINDOWS + * subdirectory. cp1361 is roughly a superset of + * MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT. + * + * @values: + * FT_WinFNT_ID_DEFAULT :: + * This is used for font enumeration and font creation as a + * `don't care' value. Valid font files don't contain this value. + * When querying for information about the character set of the font + * that is currently selected into a specified device context, this + * return value (of the related Windows API) simply denotes failure. + * + * FT_WinFNT_ID_SYMBOL :: + * There is no known mapping table available. + * + * FT_WinFNT_ID_MAC :: + * Mac Roman encoding. + * + * FT_WinFNT_ID_OEM :: + * From Michael Poettgen <michael@poettgen.de>: + * + * The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM + * is used for the charset of vector fonts, like `modern.fon', + * `roman.fon', and `script.fon' on Windows. + * + * The `CreateFont' documentation says: The FT_WinFNT_ID_OEM value + * specifies a character set that is operating-system dependent. + * + * The `IFIMETRICS' documentation from the `Windows Driver + * Development Kit' says: This font supports an OEM-specific + * character set. The OEM character set is system dependent. + * + * In general OEM, as opposed to ANSI (i.e., cp1252), denotes the + * second default codepage that most international versions of + * Windows have. It is one of the OEM codepages from + * + * https://msdn.microsoft.com/en-us/goglobal/bb964655, + * + * and is used for the `DOS boxes', to support legacy applications. + * A German Windows version for example usually uses ANSI codepage + * 1252 and OEM codepage 850. + * + * FT_WinFNT_ID_CP874 :: + * A superset of Thai TIS 620 and ISO 8859-11. + * + * FT_WinFNT_ID_CP932 :: + * A superset of Japanese Shift-JIS (with minor deviations). + * + * FT_WinFNT_ID_CP936 :: + * A superset of simplified Chinese GB 2312-1980 (with different + * ordering and minor deviations). + * + * FT_WinFNT_ID_CP949 :: + * A superset of Korean Hangul KS~C 5601-1987 (with different + * ordering and minor deviations). + * + * FT_WinFNT_ID_CP950 :: + * A superset of traditional Chinese Big~5 ETen (with different + * ordering and minor deviations). + * + * FT_WinFNT_ID_CP1250 :: + * A superset of East European ISO 8859-2 (with slightly different + * ordering). + * + * FT_WinFNT_ID_CP1251 :: + * A superset of Russian ISO 8859-5 (with different ordering). + * + * FT_WinFNT_ID_CP1252 :: + * ANSI encoding. A superset of ISO 8859-1. + * + * FT_WinFNT_ID_CP1253 :: + * A superset of Greek ISO 8859-7 (with minor modifications). + * + * FT_WinFNT_ID_CP1254 :: + * A superset of Turkish ISO 8859-9. + * + * FT_WinFNT_ID_CP1255 :: + * A superset of Hebrew ISO 8859-8 (with some modifications). + * + * FT_WinFNT_ID_CP1256 :: + * A superset of Arabic ISO 8859-6 (with different ordering). + * + * FT_WinFNT_ID_CP1257 :: + * A superset of Baltic ISO 8859-13 (with some deviations). + * + * FT_WinFNT_ID_CP1258 :: + * For Vietnamese. This encoding doesn't cover all necessary + * characters. + * + * FT_WinFNT_ID_CP1361 :: + * Korean (Johab). + */ + +#define FT_WinFNT_ID_CP1252 0 +#define FT_WinFNT_ID_DEFAULT 1 +#define FT_WinFNT_ID_SYMBOL 2 +#define FT_WinFNT_ID_MAC 77 +#define FT_WinFNT_ID_CP932 128 +#define FT_WinFNT_ID_CP949 129 +#define FT_WinFNT_ID_CP1361 130 +#define FT_WinFNT_ID_CP936 134 +#define FT_WinFNT_ID_CP950 136 +#define FT_WinFNT_ID_CP1253 161 +#define FT_WinFNT_ID_CP1254 162 +#define FT_WinFNT_ID_CP1258 163 +#define FT_WinFNT_ID_CP1255 177 +#define FT_WinFNT_ID_CP1256 178 +#define FT_WinFNT_ID_CP1257 186 +#define FT_WinFNT_ID_CP1251 204 +#define FT_WinFNT_ID_CP874 222 +#define FT_WinFNT_ID_CP1250 238 +#define FT_WinFNT_ID_OEM 255 + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_WinFNT_HeaderRec */ + /* */ + /* <Description> */ + /* Windows FNT Header info. */ + /* */ + typedef struct FT_WinFNT_HeaderRec_ + { + FT_UShort version; + FT_ULong file_size; + FT_Byte copyright[60]; + FT_UShort file_type; + FT_UShort nominal_point_size; + FT_UShort vertical_resolution; + FT_UShort horizontal_resolution; + FT_UShort ascent; + FT_UShort internal_leading; + FT_UShort external_leading; + FT_Byte italic; + FT_Byte underline; + FT_Byte strike_out; + FT_UShort weight; + FT_Byte charset; + FT_UShort pixel_width; + FT_UShort pixel_height; + FT_Byte pitch_and_family; + FT_UShort avg_width; + FT_UShort max_width; + FT_Byte first_char; + FT_Byte last_char; + FT_Byte default_char; + FT_Byte break_char; + FT_UShort bytes_per_row; + FT_ULong device_offset; + FT_ULong face_name_offset; + FT_ULong bits_pointer; + FT_ULong bits_offset; + FT_Byte reserved; + FT_ULong flags; + FT_UShort A_space; + FT_UShort B_space; + FT_UShort C_space; + FT_UShort color_table_offset; + FT_ULong reserved1[4]; + + } FT_WinFNT_HeaderRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_WinFNT_Header */ + /* */ + /* <Description> */ + /* A handle to an @FT_WinFNT_HeaderRec structure. */ + /* */ + typedef struct FT_WinFNT_HeaderRec_* FT_WinFNT_Header; + + + /********************************************************************** + * + * @function: + * FT_Get_WinFNT_Header + * + * @description: + * Retrieve a Windows FNT font info header. + * + * @input: + * face :: A handle to the input face. + * + * @output: + * aheader :: The WinFNT header. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with Windows FNT faces, returning an error + * otherwise. + */ + FT_EXPORT( FT_Error ) + FT_Get_WinFNT_Header( FT_Face face, + FT_WinFNT_HeaderRec *aheader ); + + /* */ + + +FT_END_HEADER + +#endif /* FTWINFNT_H_ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/t1tables.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/t1tables.h new file mode 100755 index 00000000..3503c261 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/t1tables.h @@ -0,0 +1,770 @@ +/***************************************************************************/ +/* */ +/* t1tables.h */ +/* */ +/* Basic Type 1/Type 2 tables definitions and interface (specification */ +/* only). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef T1TABLES_H_ +#define T1TABLES_H_ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* type1_tables */ + /* */ + /* <Title> */ + /* Type 1 Tables */ + /* */ + /* <Abstract> */ + /* Type~1 (PostScript) specific font tables. */ + /* */ + /* <Description> */ + /* This section contains the definition of Type 1-specific tables, */ + /* including structures related to other PostScript font formats. */ + /* */ + /* <Order> */ + /* PS_FontInfoRec */ + /* PS_FontInfo */ + /* PS_PrivateRec */ + /* PS_Private */ + /* */ + /* CID_FaceDictRec */ + /* CID_FaceDict */ + /* CID_FaceInfoRec */ + /* CID_FaceInfo */ + /* */ + /* FT_Has_PS_Glyph_Names */ + /* FT_Get_PS_Font_Info */ + /* FT_Get_PS_Font_Private */ + /* FT_Get_PS_Font_Value */ + /* */ + /* T1_Blend_Flags */ + /* T1_EncodingType */ + /* PS_Dict_Keys */ + /* */ + /*************************************************************************/ + + + /* Note that we separate font data in PS_FontInfoRec and PS_PrivateRec */ + /* structures in order to support Multiple Master fonts. */ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_FontInfoRec */ + /* */ + /* <Description> */ + /* A structure used to model a Type~1 or Type~2 FontInfo dictionary. */ + /* Note that for Multiple Master fonts, each instance has its own */ + /* FontInfo dictionary. */ + /* */ + typedef struct PS_FontInfoRec_ + { + FT_String* version; + FT_String* notice; + FT_String* full_name; + FT_String* family_name; + FT_String* weight; + FT_Long italic_angle; + FT_Bool is_fixed_pitch; + FT_Short underline_position; + FT_UShort underline_thickness; + + } PS_FontInfoRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_FontInfo */ + /* */ + /* <Description> */ + /* A handle to a @PS_FontInfoRec structure. */ + /* */ + typedef struct PS_FontInfoRec_* PS_FontInfo; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* T1_FontInfo */ + /* */ + /* <Description> */ + /* This type is equivalent to @PS_FontInfoRec. It is deprecated but */ + /* kept to maintain source compatibility between various versions of */ + /* FreeType. */ + /* */ + typedef PS_FontInfoRec T1_FontInfo; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_PrivateRec */ + /* */ + /* <Description> */ + /* A structure used to model a Type~1 or Type~2 private dictionary. */ + /* Note that for Multiple Master fonts, each instance has its own */ + /* Private dictionary. */ + /* */ + typedef struct PS_PrivateRec_ + { + FT_Int unique_id; + FT_Int lenIV; + + FT_Byte num_blue_values; + FT_Byte num_other_blues; + FT_Byte num_family_blues; + FT_Byte num_family_other_blues; + + FT_Short blue_values[14]; + FT_Short other_blues[10]; + + FT_Short family_blues [14]; + FT_Short family_other_blues[10]; + + FT_Fixed blue_scale; + FT_Int blue_shift; + FT_Int blue_fuzz; + + FT_UShort standard_width[1]; + FT_UShort standard_height[1]; + + FT_Byte num_snap_widths; + FT_Byte num_snap_heights; + FT_Bool force_bold; + FT_Bool round_stem_up; + + FT_Short snap_widths [13]; /* including std width */ + FT_Short snap_heights[13]; /* including std height */ + + FT_Fixed expansion_factor; + + FT_Long language_group; + FT_Long password; + + FT_Short min_feature[2]; + + } PS_PrivateRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_Private */ + /* */ + /* <Description> */ + /* A handle to a @PS_PrivateRec structure. */ + /* */ + typedef struct PS_PrivateRec_* PS_Private; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* T1_Private */ + /* */ + /* <Description> */ + /* This type is equivalent to @PS_PrivateRec. It is deprecated but */ + /* kept to maintain source compatibility between various versions of */ + /* FreeType. */ + /* */ + typedef PS_PrivateRec T1_Private; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* T1_Blend_Flags */ + /* */ + /* <Description> */ + /* A set of flags used to indicate which fields are present in a */ + /* given blend dictionary (font info or private). Used to support */ + /* Multiple Masters fonts. */ + /* */ + /* <Values> */ + /* T1_BLEND_UNDERLINE_POSITION :: */ + /* T1_BLEND_UNDERLINE_THICKNESS :: */ + /* T1_BLEND_ITALIC_ANGLE :: */ + /* T1_BLEND_BLUE_VALUES :: */ + /* T1_BLEND_OTHER_BLUES :: */ + /* T1_BLEND_STANDARD_WIDTH :: */ + /* T1_BLEND_STANDARD_HEIGHT :: */ + /* T1_BLEND_STEM_SNAP_WIDTHS :: */ + /* T1_BLEND_STEM_SNAP_HEIGHTS :: */ + /* T1_BLEND_BLUE_SCALE :: */ + /* T1_BLEND_BLUE_SHIFT :: */ + /* T1_BLEND_FAMILY_BLUES :: */ + /* T1_BLEND_FAMILY_OTHER_BLUES :: */ + /* T1_BLEND_FORCE_BOLD :: */ + /* */ + typedef enum T1_Blend_Flags_ + { + /* required fields in a FontInfo blend dictionary */ + T1_BLEND_UNDERLINE_POSITION = 0, + T1_BLEND_UNDERLINE_THICKNESS, + T1_BLEND_ITALIC_ANGLE, + + /* required fields in a Private blend dictionary */ + T1_BLEND_BLUE_VALUES, + T1_BLEND_OTHER_BLUES, + T1_BLEND_STANDARD_WIDTH, + T1_BLEND_STANDARD_HEIGHT, + T1_BLEND_STEM_SNAP_WIDTHS, + T1_BLEND_STEM_SNAP_HEIGHTS, + T1_BLEND_BLUE_SCALE, + T1_BLEND_BLUE_SHIFT, + T1_BLEND_FAMILY_BLUES, + T1_BLEND_FAMILY_OTHER_BLUES, + T1_BLEND_FORCE_BOLD, + + T1_BLEND_MAX /* do not remove */ + + } T1_Blend_Flags; + + + /* these constants are deprecated; use the corresponding */ + /* `T1_Blend_Flags' values instead */ +#define t1_blend_underline_position T1_BLEND_UNDERLINE_POSITION +#define t1_blend_underline_thickness T1_BLEND_UNDERLINE_THICKNESS +#define t1_blend_italic_angle T1_BLEND_ITALIC_ANGLE +#define t1_blend_blue_values T1_BLEND_BLUE_VALUES +#define t1_blend_other_blues T1_BLEND_OTHER_BLUES +#define t1_blend_standard_widths T1_BLEND_STANDARD_WIDTH +#define t1_blend_standard_height T1_BLEND_STANDARD_HEIGHT +#define t1_blend_stem_snap_widths T1_BLEND_STEM_SNAP_WIDTHS +#define t1_blend_stem_snap_heights T1_BLEND_STEM_SNAP_HEIGHTS +#define t1_blend_blue_scale T1_BLEND_BLUE_SCALE +#define t1_blend_blue_shift T1_BLEND_BLUE_SHIFT +#define t1_blend_family_blues T1_BLEND_FAMILY_BLUES +#define t1_blend_family_other_blues T1_BLEND_FAMILY_OTHER_BLUES +#define t1_blend_force_bold T1_BLEND_FORCE_BOLD +#define t1_blend_max T1_BLEND_MAX + + /* */ + + + /* maximum number of Multiple Masters designs, as defined in the spec */ +#define T1_MAX_MM_DESIGNS 16 + + /* maximum number of Multiple Masters axes, as defined in the spec */ +#define T1_MAX_MM_AXIS 4 + + /* maximum number of elements in a design map */ +#define T1_MAX_MM_MAP_POINTS 20 + + + /* this structure is used to store the BlendDesignMap entry for an axis */ + typedef struct PS_DesignMap_ + { + FT_Byte num_points; + FT_Long* design_points; + FT_Fixed* blend_points; + + } PS_DesignMapRec, *PS_DesignMap; + + /* backward compatible definition */ + typedef PS_DesignMapRec T1_DesignMap; + + + typedef struct PS_BlendRec_ + { + FT_UInt num_designs; + FT_UInt num_axis; + + FT_String* axis_names[T1_MAX_MM_AXIS]; + FT_Fixed* design_pos[T1_MAX_MM_DESIGNS]; + PS_DesignMapRec design_map[T1_MAX_MM_AXIS]; + + FT_Fixed* weight_vector; + FT_Fixed* default_weight_vector; + + PS_FontInfo font_infos[T1_MAX_MM_DESIGNS + 1]; + PS_Private privates [T1_MAX_MM_DESIGNS + 1]; + + FT_ULong blend_bitflags; + + FT_BBox* bboxes [T1_MAX_MM_DESIGNS + 1]; + + /* since 2.3.0 */ + + /* undocumented, optional: the default design instance; */ + /* corresponds to default_weight_vector -- */ + /* num_default_design_vector == 0 means it is not present */ + /* in the font and associated metrics files */ + FT_UInt default_design_vector[T1_MAX_MM_DESIGNS]; + FT_UInt num_default_design_vector; + + } PS_BlendRec, *PS_Blend; + + + /* backward compatible definition */ + typedef PS_BlendRec T1_Blend; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FaceDictRec */ + /* */ + /* <Description> */ + /* A structure used to represent data in a CID top-level dictionary. */ + /* */ + typedef struct CID_FaceDictRec_ + { + PS_PrivateRec private_dict; + + FT_UInt len_buildchar; + FT_Fixed forcebold_threshold; + FT_Pos stroke_width; + FT_Fixed expansion_factor; + + FT_Byte paint_type; + FT_Byte font_type; + FT_Matrix font_matrix; + FT_Vector font_offset; + + FT_UInt num_subrs; + FT_ULong subrmap_offset; + FT_Int sd_bytes; + + } CID_FaceDictRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FaceDict */ + /* */ + /* <Description> */ + /* A handle to a @CID_FaceDictRec structure. */ + /* */ + typedef struct CID_FaceDictRec_* CID_FaceDict; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FontDict */ + /* */ + /* <Description> */ + /* This type is equivalent to @CID_FaceDictRec. It is deprecated but */ + /* kept to maintain source compatibility between various versions of */ + /* FreeType. */ + /* */ + typedef CID_FaceDictRec CID_FontDict; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FaceInfoRec */ + /* */ + /* <Description> */ + /* A structure used to represent CID Face information. */ + /* */ + typedef struct CID_FaceInfoRec_ + { + FT_String* cid_font_name; + FT_Fixed cid_version; + FT_Int cid_font_type; + + FT_String* registry; + FT_String* ordering; + FT_Int supplement; + + PS_FontInfoRec font_info; + FT_BBox font_bbox; + FT_ULong uid_base; + + FT_Int num_xuid; + FT_ULong xuid[16]; + + FT_ULong cidmap_offset; + FT_Int fd_bytes; + FT_Int gd_bytes; + FT_ULong cid_count; + + FT_Int num_dicts; + CID_FaceDict font_dicts; + + FT_ULong data_offset; + + } CID_FaceInfoRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FaceInfo */ + /* */ + /* <Description> */ + /* A handle to a @CID_FaceInfoRec structure. */ + /* */ + typedef struct CID_FaceInfoRec_* CID_FaceInfo; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_Info */ + /* */ + /* <Description> */ + /* This type is equivalent to @CID_FaceInfoRec. It is deprecated but */ + /* kept to maintain source compatibility between various versions of */ + /* FreeType. */ + /* */ + typedef CID_FaceInfoRec CID_Info; + + + /************************************************************************ + * + * @function: + * FT_Has_PS_Glyph_Names + * + * @description: + * Return true if a given face provides reliable PostScript glyph + * names. This is similar to using the @FT_HAS_GLYPH_NAMES macro, + * except that certain fonts (mostly TrueType) contain incorrect + * glyph name tables. + * + * When this function returns true, the caller is sure that the glyph + * names returned by @FT_Get_Glyph_Name are reliable. + * + * @input: + * face :: + * face handle + * + * @return: + * Boolean. True if glyph names are reliable. + * + */ + FT_EXPORT( FT_Int ) + FT_Has_PS_Glyph_Names( FT_Face face ); + + + /************************************************************************ + * + * @function: + * FT_Get_PS_Font_Info + * + * @description: + * Retrieve the @PS_FontInfoRec structure corresponding to a given + * PostScript font. + * + * @input: + * face :: + * PostScript face handle. + * + * @output: + * afont_info :: + * Output font info structure pointer. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * String pointers within the @PS_FontInfoRec structure are owned by + * the face and don't need to be freed by the caller. Missing entries + * in the font's FontInfo dictionary are represented by NULL pointers. + * + * If the font's format is not PostScript-based, this function will + * return the `FT_Err_Invalid_Argument' error code. + * + */ + FT_EXPORT( FT_Error ) + FT_Get_PS_Font_Info( FT_Face face, + PS_FontInfo afont_info ); + + + /************************************************************************ + * + * @function: + * FT_Get_PS_Font_Private + * + * @description: + * Retrieve the @PS_PrivateRec structure corresponding to a given + * PostScript font. + * + * @input: + * face :: + * PostScript face handle. + * + * @output: + * afont_private :: + * Output private dictionary structure pointer. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The string pointers within the @PS_PrivateRec structure are owned by + * the face and don't need to be freed by the caller. + * + * If the font's format is not PostScript-based, this function returns + * the `FT_Err_Invalid_Argument' error code. + * + */ + FT_EXPORT( FT_Error ) + FT_Get_PS_Font_Private( FT_Face face, + PS_Private afont_private ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* T1_EncodingType */ + /* */ + /* <Description> */ + /* An enumeration describing the `Encoding' entry in a Type 1 */ + /* dictionary. */ + /* */ + /* <Values> */ + /* T1_ENCODING_TYPE_NONE :: */ + /* T1_ENCODING_TYPE_ARRAY :: */ + /* T1_ENCODING_TYPE_STANDARD :: */ + /* T1_ENCODING_TYPE_ISOLATIN1 :: */ + /* T1_ENCODING_TYPE_EXPERT :: */ + /* */ + /* <Since> */ + /* 2.4.8 */ + /* */ + typedef enum T1_EncodingType_ + { + T1_ENCODING_TYPE_NONE = 0, + T1_ENCODING_TYPE_ARRAY, + T1_ENCODING_TYPE_STANDARD, + T1_ENCODING_TYPE_ISOLATIN1, + T1_ENCODING_TYPE_EXPERT + + } T1_EncodingType; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* PS_Dict_Keys */ + /* */ + /* <Description> */ + /* An enumeration used in calls to @FT_Get_PS_Font_Value to identify */ + /* the Type~1 dictionary entry to retrieve. */ + /* */ + /* <Values> */ + /* PS_DICT_FONT_TYPE :: */ + /* PS_DICT_FONT_MATRIX :: */ + /* PS_DICT_FONT_BBOX :: */ + /* PS_DICT_PAINT_TYPE :: */ + /* PS_DICT_FONT_NAME :: */ + /* PS_DICT_UNIQUE_ID :: */ + /* PS_DICT_NUM_CHAR_STRINGS :: */ + /* PS_DICT_CHAR_STRING_KEY :: */ + /* PS_DICT_CHAR_STRING :: */ + /* PS_DICT_ENCODING_TYPE :: */ + /* PS_DICT_ENCODING_ENTRY :: */ + /* PS_DICT_NUM_SUBRS :: */ + /* PS_DICT_SUBR :: */ + /* PS_DICT_STD_HW :: */ + /* PS_DICT_STD_VW :: */ + /* PS_DICT_NUM_BLUE_VALUES :: */ + /* PS_DICT_BLUE_VALUE :: */ + /* PS_DICT_BLUE_FUZZ :: */ + /* PS_DICT_NUM_OTHER_BLUES :: */ + /* PS_DICT_OTHER_BLUE :: */ + /* PS_DICT_NUM_FAMILY_BLUES :: */ + /* PS_DICT_FAMILY_BLUE :: */ + /* PS_DICT_NUM_FAMILY_OTHER_BLUES :: */ + /* PS_DICT_FAMILY_OTHER_BLUE :: */ + /* PS_DICT_BLUE_SCALE :: */ + /* PS_DICT_BLUE_SHIFT :: */ + /* PS_DICT_NUM_STEM_SNAP_H :: */ + /* PS_DICT_STEM_SNAP_H :: */ + /* PS_DICT_NUM_STEM_SNAP_V :: */ + /* PS_DICT_STEM_SNAP_V :: */ + /* PS_DICT_FORCE_BOLD :: */ + /* PS_DICT_RND_STEM_UP :: */ + /* PS_DICT_MIN_FEATURE :: */ + /* PS_DICT_LEN_IV :: */ + /* PS_DICT_PASSWORD :: */ + /* PS_DICT_LANGUAGE_GROUP :: */ + /* PS_DICT_VERSION :: */ + /* PS_DICT_NOTICE :: */ + /* PS_DICT_FULL_NAME :: */ + /* PS_DICT_FAMILY_NAME :: */ + /* PS_DICT_WEIGHT :: */ + /* PS_DICT_IS_FIXED_PITCH :: */ + /* PS_DICT_UNDERLINE_POSITION :: */ + /* PS_DICT_UNDERLINE_THICKNESS :: */ + /* PS_DICT_FS_TYPE :: */ + /* PS_DICT_ITALIC_ANGLE :: */ + /* */ + /* <Since> */ + /* 2.4.8 */ + /* */ + typedef enum PS_Dict_Keys_ + { + /* conventionally in the font dictionary */ + PS_DICT_FONT_TYPE, /* FT_Byte */ + PS_DICT_FONT_MATRIX, /* FT_Fixed */ + PS_DICT_FONT_BBOX, /* FT_Fixed */ + PS_DICT_PAINT_TYPE, /* FT_Byte */ + PS_DICT_FONT_NAME, /* FT_String* */ + PS_DICT_UNIQUE_ID, /* FT_Int */ + PS_DICT_NUM_CHAR_STRINGS, /* FT_Int */ + PS_DICT_CHAR_STRING_KEY, /* FT_String* */ + PS_DICT_CHAR_STRING, /* FT_String* */ + PS_DICT_ENCODING_TYPE, /* T1_EncodingType */ + PS_DICT_ENCODING_ENTRY, /* FT_String* */ + + /* conventionally in the font Private dictionary */ + PS_DICT_NUM_SUBRS, /* FT_Int */ + PS_DICT_SUBR, /* FT_String* */ + PS_DICT_STD_HW, /* FT_UShort */ + PS_DICT_STD_VW, /* FT_UShort */ + PS_DICT_NUM_BLUE_VALUES, /* FT_Byte */ + PS_DICT_BLUE_VALUE, /* FT_Short */ + PS_DICT_BLUE_FUZZ, /* FT_Int */ + PS_DICT_NUM_OTHER_BLUES, /* FT_Byte */ + PS_DICT_OTHER_BLUE, /* FT_Short */ + PS_DICT_NUM_FAMILY_BLUES, /* FT_Byte */ + PS_DICT_FAMILY_BLUE, /* FT_Short */ + PS_DICT_NUM_FAMILY_OTHER_BLUES, /* FT_Byte */ + PS_DICT_FAMILY_OTHER_BLUE, /* FT_Short */ + PS_DICT_BLUE_SCALE, /* FT_Fixed */ + PS_DICT_BLUE_SHIFT, /* FT_Int */ + PS_DICT_NUM_STEM_SNAP_H, /* FT_Byte */ + PS_DICT_STEM_SNAP_H, /* FT_Short */ + PS_DICT_NUM_STEM_SNAP_V, /* FT_Byte */ + PS_DICT_STEM_SNAP_V, /* FT_Short */ + PS_DICT_FORCE_BOLD, /* FT_Bool */ + PS_DICT_RND_STEM_UP, /* FT_Bool */ + PS_DICT_MIN_FEATURE, /* FT_Short */ + PS_DICT_LEN_IV, /* FT_Int */ + PS_DICT_PASSWORD, /* FT_Long */ + PS_DICT_LANGUAGE_GROUP, /* FT_Long */ + + /* conventionally in the font FontInfo dictionary */ + PS_DICT_VERSION, /* FT_String* */ + PS_DICT_NOTICE, /* FT_String* */ + PS_DICT_FULL_NAME, /* FT_String* */ + PS_DICT_FAMILY_NAME, /* FT_String* */ + PS_DICT_WEIGHT, /* FT_String* */ + PS_DICT_IS_FIXED_PITCH, /* FT_Bool */ + PS_DICT_UNDERLINE_POSITION, /* FT_Short */ + PS_DICT_UNDERLINE_THICKNESS, /* FT_UShort */ + PS_DICT_FS_TYPE, /* FT_UShort */ + PS_DICT_ITALIC_ANGLE, /* FT_Long */ + + PS_DICT_MAX = PS_DICT_ITALIC_ANGLE + + } PS_Dict_Keys; + + + /************************************************************************ + * + * @function: + * FT_Get_PS_Font_Value + * + * @description: + * Retrieve the value for the supplied key from a PostScript font. + * + * @input: + * face :: + * PostScript face handle. + * + * key :: + * An enumeration value representing the dictionary key to retrieve. + * + * idx :: + * For array values, this specifies the index to be returned. + * + * value :: + * A pointer to memory into which to write the value. + * + * valen_len :: + * The size, in bytes, of the memory supplied for the value. + * + * @output: + * value :: + * The value matching the above key, if it exists. + * + * @return: + * The amount of memory (in bytes) required to hold the requested + * value (if it exists, -1 otherwise). + * + * @note: + * The values returned are not pointers into the internal structures of + * the face, but are `fresh' copies, so that the memory containing them + * belongs to the calling application. This also enforces the + * `read-only' nature of these values, i.e., this function cannot be + * used to manipulate the face. + * + * `value' is a void pointer because the values returned can be of + * various types. + * + * If either `value' is NULL or `value_len' is too small, just the + * required memory size for the requested entry is returned. + * + * The `idx' parameter is used, not only to retrieve elements of, for + * example, the FontMatrix or FontBBox, but also to retrieve name keys + * from the CharStrings dictionary, and the charstrings themselves. It + * is ignored for atomic values. + * + * PS_DICT_BLUE_SCALE returns a value that is scaled up by 1000. To + * get the value as in the font stream, you need to divide by + * 65536000.0 (to remove the FT_Fixed scale, and the x1000 scale). + * + * IMPORTANT: Only key/value pairs read by the FreeType interpreter can + * be retrieved. So, for example, PostScript procedures such as NP, + * ND, and RD are not available. Arbitrary keys are, obviously, not be + * available either. + * + * If the font's format is not PostScript-based, this function returns + * the `FT_Err_Invalid_Argument' error code. + * + * @since: + * 2.4.8 + * + */ + FT_EXPORT( FT_Long ) + FT_Get_PS_Font_Value( FT_Face face, + PS_Dict_Keys key, + FT_UInt idx, + void *value, + FT_Long value_len ); + + /* */ + +FT_END_HEADER + +#endif /* T1TABLES_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ttnameid.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ttnameid.h new file mode 100755 index 00000000..8605183d --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/ttnameid.h @@ -0,0 +1,1236 @@ +/***************************************************************************/ +/* */ +/* ttnameid.h */ +/* */ +/* TrueType name ID definitions (specification only). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef TTNAMEID_H_ +#define TTNAMEID_H_ + + +#include <ft2build.h> + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* truetype_tables */ + /* */ + + + /*************************************************************************/ + /* */ + /* Possible values for the `platform' identifier code in the name */ + /* records of an SFNT `name' table. */ + /* */ + /*************************************************************************/ + + + /*********************************************************************** + * + * @enum: + * TT_PLATFORM_XXX + * + * @description: + * A list of valid values for the `platform_id' identifier code in + * @FT_CharMapRec and @FT_SfntName structures. + * + * @values: + * TT_PLATFORM_APPLE_UNICODE :: + * Used by Apple to indicate a Unicode character map and/or name entry. + * See @TT_APPLE_ID_XXX for corresponding `encoding_id' values. Note + * that name entries in this format are coded as big-endian UCS-2 + * character codes _only_. + * + * TT_PLATFORM_MACINTOSH :: + * Used by Apple to indicate a MacOS-specific charmap and/or name entry. + * See @TT_MAC_ID_XXX for corresponding `encoding_id' values. Note that + * most TrueType fonts contain an Apple roman charmap to be usable on + * MacOS systems (even if they contain a Microsoft charmap as well). + * + * TT_PLATFORM_ISO :: + * This value was used to specify ISO/IEC 10646 charmaps. It is however + * now deprecated. See @TT_ISO_ID_XXX for a list of corresponding + * `encoding_id' values. + * + * TT_PLATFORM_MICROSOFT :: + * Used by Microsoft to indicate Windows-specific charmaps. See + * @TT_MS_ID_XXX for a list of corresponding `encoding_id' values. + * Note that most fonts contain a Unicode charmap using + * (TT_PLATFORM_MICROSOFT, @TT_MS_ID_UNICODE_CS). + * + * TT_PLATFORM_CUSTOM :: + * Used to indicate application-specific charmaps. + * + * TT_PLATFORM_ADOBE :: + * This value isn't part of any font format specification, but is used + * by FreeType to report Adobe-specific charmaps in an @FT_CharMapRec + * structure. See @TT_ADOBE_ID_XXX. + */ + +#define TT_PLATFORM_APPLE_UNICODE 0 +#define TT_PLATFORM_MACINTOSH 1 +#define TT_PLATFORM_ISO 2 /* deprecated */ +#define TT_PLATFORM_MICROSOFT 3 +#define TT_PLATFORM_CUSTOM 4 +#define TT_PLATFORM_ADOBE 7 /* artificial */ + + + /*********************************************************************** + * + * @enum: + * TT_APPLE_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_APPLE_UNICODE charmaps and name entries. + * + * @values: + * TT_APPLE_ID_DEFAULT :: + * Unicode version 1.0. + * + * TT_APPLE_ID_UNICODE_1_1 :: + * Unicode 1.1; specifies Hangul characters starting at U+34xx. + * + * TT_APPLE_ID_ISO_10646 :: + * Deprecated (identical to preceding). + * + * TT_APPLE_ID_UNICODE_2_0 :: + * Unicode 2.0 and beyond (UTF-16 BMP only). + * + * TT_APPLE_ID_UNICODE_32 :: + * Unicode 3.1 and beyond, using UTF-32. + * + * TT_APPLE_ID_VARIANT_SELECTOR :: + * From Adobe, not Apple. Not a normal cmap. Specifies variations + * on a real cmap. + * + * TT_APPLE_ID_FULL_UNICODE :: + * Used for fallback fonts that provide complete Unicode coverage with + * a type~13 cmap. + */ + +#define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */ +#define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */ +#define TT_APPLE_ID_ISO_10646 2 /* deprecated */ +#define TT_APPLE_ID_UNICODE_2_0 3 /* or later */ +#define TT_APPLE_ID_UNICODE_32 4 /* 2.0 or later, full repertoire */ +#define TT_APPLE_ID_VARIANT_SELECTOR 5 /* variation selector data */ +#define TT_APPLE_ID_FULL_UNICODE 6 /* used with type 13 cmaps */ + + + /*********************************************************************** + * + * @enum: + * TT_MAC_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_MACINTOSH charmaps and name entries. + */ + +#define TT_MAC_ID_ROMAN 0 +#define TT_MAC_ID_JAPANESE 1 +#define TT_MAC_ID_TRADITIONAL_CHINESE 2 +#define TT_MAC_ID_KOREAN 3 +#define TT_MAC_ID_ARABIC 4 +#define TT_MAC_ID_HEBREW 5 +#define TT_MAC_ID_GREEK 6 +#define TT_MAC_ID_RUSSIAN 7 +#define TT_MAC_ID_RSYMBOL 8 +#define TT_MAC_ID_DEVANAGARI 9 +#define TT_MAC_ID_GURMUKHI 10 +#define TT_MAC_ID_GUJARATI 11 +#define TT_MAC_ID_ORIYA 12 +#define TT_MAC_ID_BENGALI 13 +#define TT_MAC_ID_TAMIL 14 +#define TT_MAC_ID_TELUGU 15 +#define TT_MAC_ID_KANNADA 16 +#define TT_MAC_ID_MALAYALAM 17 +#define TT_MAC_ID_SINHALESE 18 +#define TT_MAC_ID_BURMESE 19 +#define TT_MAC_ID_KHMER 20 +#define TT_MAC_ID_THAI 21 +#define TT_MAC_ID_LAOTIAN 22 +#define TT_MAC_ID_GEORGIAN 23 +#define TT_MAC_ID_ARMENIAN 24 +#define TT_MAC_ID_MALDIVIAN 25 +#define TT_MAC_ID_SIMPLIFIED_CHINESE 25 +#define TT_MAC_ID_TIBETAN 26 +#define TT_MAC_ID_MONGOLIAN 27 +#define TT_MAC_ID_GEEZ 28 +#define TT_MAC_ID_SLAVIC 29 +#define TT_MAC_ID_VIETNAMESE 30 +#define TT_MAC_ID_SINDHI 31 +#define TT_MAC_ID_UNINTERP 32 + + + /*********************************************************************** + * + * @enum: + * TT_ISO_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_ISO charmaps and name entries. + * + * Their use is now deprecated. + * + * @values: + * TT_ISO_ID_7BIT_ASCII :: + * ASCII. + * TT_ISO_ID_10646 :: + * ISO/10646. + * TT_ISO_ID_8859_1 :: + * Also known as Latin-1. + */ + +#define TT_ISO_ID_7BIT_ASCII 0 +#define TT_ISO_ID_10646 1 +#define TT_ISO_ID_8859_1 2 + + + /*********************************************************************** + * + * @enum: + * TT_MS_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_MICROSOFT charmaps and name entries. + * + * @values: + * TT_MS_ID_SYMBOL_CS :: + * Microsoft symbol encoding. See @FT_ENCODING_MS_SYMBOL. + * + * TT_MS_ID_UNICODE_CS :: + * Microsoft WGL4 charmap, matching Unicode. See + * @FT_ENCODING_UNICODE. + * + * TT_MS_ID_SJIS :: + * Shift JIS Japanese encoding. See @FT_ENCODING_SJIS. + * + * TT_MS_ID_PRC :: + * Chinese encodings as used in the People's Republic of China (PRC). + * This means the encodings GB~2312 and its supersets GBK and + * GB~18030. See @FT_ENCODING_PRC. + * + * TT_MS_ID_BIG_5 :: + * Traditional Chinese as used in Taiwan and Hong Kong. See + * @FT_ENCODING_BIG5. + * + * TT_MS_ID_WANSUNG :: + * Korean Extended Wansung encoding. See @FT_ENCODING_WANSUNG. + * + * TT_MS_ID_JOHAB :: + * Korean Johab encoding. See @FT_ENCODING_JOHAB. + * + * TT_MS_ID_UCS_4 :: + * UCS-4 or UTF-32 charmaps. This has been added to the OpenType + * specification version 1.4 (mid-2001). + */ + +#define TT_MS_ID_SYMBOL_CS 0 +#define TT_MS_ID_UNICODE_CS 1 +#define TT_MS_ID_SJIS 2 +#define TT_MS_ID_PRC 3 +#define TT_MS_ID_BIG_5 4 +#define TT_MS_ID_WANSUNG 5 +#define TT_MS_ID_JOHAB 6 +#define TT_MS_ID_UCS_4 10 + + /* this value is deprecated */ +#define TT_MS_ID_GB2312 TT_MS_ID_PRC + + + /*********************************************************************** + * + * @enum: + * TT_ADOBE_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_ADOBE charmaps. This is a FreeType-specific extension! + * + * @values: + * TT_ADOBE_ID_STANDARD :: + * Adobe standard encoding. + * TT_ADOBE_ID_EXPERT :: + * Adobe expert encoding. + * TT_ADOBE_ID_CUSTOM :: + * Adobe custom encoding. + * TT_ADOBE_ID_LATIN_1 :: + * Adobe Latin~1 encoding. + */ + +#define TT_ADOBE_ID_STANDARD 0 +#define TT_ADOBE_ID_EXPERT 1 +#define TT_ADOBE_ID_CUSTOM 2 +#define TT_ADOBE_ID_LATIN_1 3 + + + /*********************************************************************** + * + * @enum: + * TT_MAC_LANGID_XXX + * + * @description: + * Possible values of the language identifier field in the name records + * of the SFNT `name' table if the `platform' identifier code is + * @TT_PLATFORM_MACINTOSH. These values are also used as return values + * for function @FT_Get_CMap_Language_ID. + * + * The canonical source for Apple's IDs is + * + * https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html + */ + +#define TT_MAC_LANGID_ENGLISH 0 +#define TT_MAC_LANGID_FRENCH 1 +#define TT_MAC_LANGID_GERMAN 2 +#define TT_MAC_LANGID_ITALIAN 3 +#define TT_MAC_LANGID_DUTCH 4 +#define TT_MAC_LANGID_SWEDISH 5 +#define TT_MAC_LANGID_SPANISH 6 +#define TT_MAC_LANGID_DANISH 7 +#define TT_MAC_LANGID_PORTUGUESE 8 +#define TT_MAC_LANGID_NORWEGIAN 9 +#define TT_MAC_LANGID_HEBREW 10 +#define TT_MAC_LANGID_JAPANESE 11 +#define TT_MAC_LANGID_ARABIC 12 +#define TT_MAC_LANGID_FINNISH 13 +#define TT_MAC_LANGID_GREEK 14 +#define TT_MAC_LANGID_ICELANDIC 15 +#define TT_MAC_LANGID_MALTESE 16 +#define TT_MAC_LANGID_TURKISH 17 +#define TT_MAC_LANGID_CROATIAN 18 +#define TT_MAC_LANGID_CHINESE_TRADITIONAL 19 +#define TT_MAC_LANGID_URDU 20 +#define TT_MAC_LANGID_HINDI 21 +#define TT_MAC_LANGID_THAI 22 +#define TT_MAC_LANGID_KOREAN 23 +#define TT_MAC_LANGID_LITHUANIAN 24 +#define TT_MAC_LANGID_POLISH 25 +#define TT_MAC_LANGID_HUNGARIAN 26 +#define TT_MAC_LANGID_ESTONIAN 27 +#define TT_MAC_LANGID_LETTISH 28 +#define TT_MAC_LANGID_SAAMISK 29 +#define TT_MAC_LANGID_FAEROESE 30 +#define TT_MAC_LANGID_FARSI 31 +#define TT_MAC_LANGID_RUSSIAN 32 +#define TT_MAC_LANGID_CHINESE_SIMPLIFIED 33 +#define TT_MAC_LANGID_FLEMISH 34 +#define TT_MAC_LANGID_IRISH 35 +#define TT_MAC_LANGID_ALBANIAN 36 +#define TT_MAC_LANGID_ROMANIAN 37 +#define TT_MAC_LANGID_CZECH 38 +#define TT_MAC_LANGID_SLOVAK 39 +#define TT_MAC_LANGID_SLOVENIAN 40 +#define TT_MAC_LANGID_YIDDISH 41 +#define TT_MAC_LANGID_SERBIAN 42 +#define TT_MAC_LANGID_MACEDONIAN 43 +#define TT_MAC_LANGID_BULGARIAN 44 +#define TT_MAC_LANGID_UKRAINIAN 45 +#define TT_MAC_LANGID_BYELORUSSIAN 46 +#define TT_MAC_LANGID_UZBEK 47 +#define TT_MAC_LANGID_KAZAKH 48 +#define TT_MAC_LANGID_AZERBAIJANI 49 +#define TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT 49 +#define TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT 50 +#define TT_MAC_LANGID_ARMENIAN 51 +#define TT_MAC_LANGID_GEORGIAN 52 +#define TT_MAC_LANGID_MOLDAVIAN 53 +#define TT_MAC_LANGID_KIRGHIZ 54 +#define TT_MAC_LANGID_TAJIKI 55 +#define TT_MAC_LANGID_TURKMEN 56 +#define TT_MAC_LANGID_MONGOLIAN 57 +#define TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT 57 +#define TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT 58 +#define TT_MAC_LANGID_PASHTO 59 +#define TT_MAC_LANGID_KURDISH 60 +#define TT_MAC_LANGID_KASHMIRI 61 +#define TT_MAC_LANGID_SINDHI 62 +#define TT_MAC_LANGID_TIBETAN 63 +#define TT_MAC_LANGID_NEPALI 64 +#define TT_MAC_LANGID_SANSKRIT 65 +#define TT_MAC_LANGID_MARATHI 66 +#define TT_MAC_LANGID_BENGALI 67 +#define TT_MAC_LANGID_ASSAMESE 68 +#define TT_MAC_LANGID_GUJARATI 69 +#define TT_MAC_LANGID_PUNJABI 70 +#define TT_MAC_LANGID_ORIYA 71 +#define TT_MAC_LANGID_MALAYALAM 72 +#define TT_MAC_LANGID_KANNADA 73 +#define TT_MAC_LANGID_TAMIL 74 +#define TT_MAC_LANGID_TELUGU 75 +#define TT_MAC_LANGID_SINHALESE 76 +#define TT_MAC_LANGID_BURMESE 77 +#define TT_MAC_LANGID_KHMER 78 +#define TT_MAC_LANGID_LAO 79 +#define TT_MAC_LANGID_VIETNAMESE 80 +#define TT_MAC_LANGID_INDONESIAN 81 +#define TT_MAC_LANGID_TAGALOG 82 +#define TT_MAC_LANGID_MALAY_ROMAN_SCRIPT 83 +#define TT_MAC_LANGID_MALAY_ARABIC_SCRIPT 84 +#define TT_MAC_LANGID_AMHARIC 85 +#define TT_MAC_LANGID_TIGRINYA 86 +#define TT_MAC_LANGID_GALLA 87 +#define TT_MAC_LANGID_SOMALI 88 +#define TT_MAC_LANGID_SWAHILI 89 +#define TT_MAC_LANGID_RUANDA 90 +#define TT_MAC_LANGID_RUNDI 91 +#define TT_MAC_LANGID_CHEWA 92 +#define TT_MAC_LANGID_MALAGASY 93 +#define TT_MAC_LANGID_ESPERANTO 94 +#define TT_MAC_LANGID_WELSH 128 +#define TT_MAC_LANGID_BASQUE 129 +#define TT_MAC_LANGID_CATALAN 130 +#define TT_MAC_LANGID_LATIN 131 +#define TT_MAC_LANGID_QUECHUA 132 +#define TT_MAC_LANGID_GUARANI 133 +#define TT_MAC_LANGID_AYMARA 134 +#define TT_MAC_LANGID_TATAR 135 +#define TT_MAC_LANGID_UIGHUR 136 +#define TT_MAC_LANGID_DZONGKHA 137 +#define TT_MAC_LANGID_JAVANESE 138 +#define TT_MAC_LANGID_SUNDANESE 139 + + /* The following codes are new as of 2000-03-10 */ +#define TT_MAC_LANGID_GALICIAN 140 +#define TT_MAC_LANGID_AFRIKAANS 141 +#define TT_MAC_LANGID_BRETON 142 +#define TT_MAC_LANGID_INUKTITUT 143 +#define TT_MAC_LANGID_SCOTTISH_GAELIC 144 +#define TT_MAC_LANGID_MANX_GAELIC 145 +#define TT_MAC_LANGID_IRISH_GAELIC 146 +#define TT_MAC_LANGID_TONGAN 147 +#define TT_MAC_LANGID_GREEK_POLYTONIC 148 +#define TT_MAC_LANGID_GREELANDIC 149 +#define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT 150 + + + /*********************************************************************** + * + * @enum: + * TT_MS_LANGID_XXX + * + * @description: + * Possible values of the language identifier field in the name records + * of the SFNT `name' table if the `platform' identifier code is + * @TT_PLATFORM_MICROSOFT. These values are also used as return values + * for function @FT_Get_CMap_Language_ID. + * + * The canonical source for Microsoft's IDs is + * + * https://www.microsoft.com/globaldev/reference/lcid-all.mspx , + * + * however, we only provide macros for language identifiers present in + * the OpenType specification: Microsoft has abandoned the concept of + * LCIDs (language code identifiers), and format~1 of the `name' table + * provides a better mechanism for languages not covered here. + * + * More legacy values not listed in the reference can be found in the + * @FT_TRUETYPE_IDS_H header file. + */ + +#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401 +#define TT_MS_LANGID_ARABIC_IRAQ 0x0801 +#define TT_MS_LANGID_ARABIC_EGYPT 0x0C01 +#define TT_MS_LANGID_ARABIC_LIBYA 0x1001 +#define TT_MS_LANGID_ARABIC_ALGERIA 0x1401 +#define TT_MS_LANGID_ARABIC_MOROCCO 0x1801 +#define TT_MS_LANGID_ARABIC_TUNISIA 0x1C01 +#define TT_MS_LANGID_ARABIC_OMAN 0x2001 +#define TT_MS_LANGID_ARABIC_YEMEN 0x2401 +#define TT_MS_LANGID_ARABIC_SYRIA 0x2801 +#define TT_MS_LANGID_ARABIC_JORDAN 0x2C01 +#define TT_MS_LANGID_ARABIC_LEBANON 0x3001 +#define TT_MS_LANGID_ARABIC_KUWAIT 0x3401 +#define TT_MS_LANGID_ARABIC_UAE 0x3801 +#define TT_MS_LANGID_ARABIC_BAHRAIN 0x3C01 +#define TT_MS_LANGID_ARABIC_QATAR 0x4001 +#define TT_MS_LANGID_BULGARIAN_BULGARIA 0x0402 +#define TT_MS_LANGID_CATALAN_CATALAN 0x0403 +#define TT_MS_LANGID_CHINESE_TAIWAN 0x0404 +#define TT_MS_LANGID_CHINESE_PRC 0x0804 +#define TT_MS_LANGID_CHINESE_HONG_KONG 0x0C04 +#define TT_MS_LANGID_CHINESE_SINGAPORE 0x1004 +#define TT_MS_LANGID_CHINESE_MACAO 0x1404 +#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC 0x0405 +#define TT_MS_LANGID_DANISH_DENMARK 0x0406 +#define TT_MS_LANGID_GERMAN_GERMANY 0x0407 +#define TT_MS_LANGID_GERMAN_SWITZERLAND 0x0807 +#define TT_MS_LANGID_GERMAN_AUSTRIA 0x0C07 +#define TT_MS_LANGID_GERMAN_LUXEMBOURG 0x1007 +#define TT_MS_LANGID_GERMAN_LIECHTENSTEIN 0x1407 +#define TT_MS_LANGID_GREEK_GREECE 0x0408 +#define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409 +#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM 0x0809 +#define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0C09 +#define TT_MS_LANGID_ENGLISH_CANADA 0x1009 +#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND 0x1409 +#define TT_MS_LANGID_ENGLISH_IRELAND 0x1809 +#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA 0x1C09 +#define TT_MS_LANGID_ENGLISH_JAMAICA 0x2009 +#define TT_MS_LANGID_ENGLISH_CARIBBEAN 0x2409 +#define TT_MS_LANGID_ENGLISH_BELIZE 0x2809 +#define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2C09 +#define TT_MS_LANGID_ENGLISH_ZIMBABWE 0x3009 +#define TT_MS_LANGID_ENGLISH_PHILIPPINES 0x3409 +#define TT_MS_LANGID_ENGLISH_INDIA 0x4009 +#define TT_MS_LANGID_ENGLISH_MALAYSIA 0x4409 +#define TT_MS_LANGID_ENGLISH_SINGAPORE 0x4809 +#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040A +#define TT_MS_LANGID_SPANISH_MEXICO 0x080A +#define TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT 0x0C0A +#define TT_MS_LANGID_SPANISH_GUATEMALA 0x100A +#define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140A +#define TT_MS_LANGID_SPANISH_PANAMA 0x180A +#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC 0x1C0A +#define TT_MS_LANGID_SPANISH_VENEZUELA 0x200A +#define TT_MS_LANGID_SPANISH_COLOMBIA 0x240A +#define TT_MS_LANGID_SPANISH_PERU 0x280A +#define TT_MS_LANGID_SPANISH_ARGENTINA 0x2C0A +#define TT_MS_LANGID_SPANISH_ECUADOR 0x300A +#define TT_MS_LANGID_SPANISH_CHILE 0x340A +#define TT_MS_LANGID_SPANISH_URUGUAY 0x380A +#define TT_MS_LANGID_SPANISH_PARAGUAY 0x3C0A +#define TT_MS_LANGID_SPANISH_BOLIVIA 0x400A +#define TT_MS_LANGID_SPANISH_EL_SALVADOR 0x440A +#define TT_MS_LANGID_SPANISH_HONDURAS 0x480A +#define TT_MS_LANGID_SPANISH_NICARAGUA 0x4C0A +#define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500A +#define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540A +#define TT_MS_LANGID_FINNISH_FINLAND 0x040B +#define TT_MS_LANGID_FRENCH_FRANCE 0x040C +#define TT_MS_LANGID_FRENCH_BELGIUM 0x080C +#define TT_MS_LANGID_FRENCH_CANADA 0x0C0C +#define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100C +#define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140C +#define TT_MS_LANGID_FRENCH_MONACO 0x180C +#define TT_MS_LANGID_HEBREW_ISRAEL 0x040D +#define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040E +#define TT_MS_LANGID_ICELANDIC_ICELAND 0x040F +#define TT_MS_LANGID_ITALIAN_ITALY 0x0410 +#define TT_MS_LANGID_ITALIAN_SWITZERLAND 0x0810 +#define TT_MS_LANGID_JAPANESE_JAPAN 0x0411 +#define TT_MS_LANGID_KOREAN_KOREA 0x0412 +#define TT_MS_LANGID_DUTCH_NETHERLANDS 0x0413 +#define TT_MS_LANGID_DUTCH_BELGIUM 0x0813 +#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL 0x0414 +#define TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK 0x0814 +#define TT_MS_LANGID_POLISH_POLAND 0x0415 +#define TT_MS_LANGID_PORTUGUESE_BRAZIL 0x0416 +#define TT_MS_LANGID_PORTUGUESE_PORTUGAL 0x0816 +#define TT_MS_LANGID_ROMANSH_SWITZERLAND 0x0417 +#define TT_MS_LANGID_ROMANIAN_ROMANIA 0x0418 +#define TT_MS_LANGID_RUSSIAN_RUSSIA 0x0419 +#define TT_MS_LANGID_CROATIAN_CROATIA 0x041A +#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081A +#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0C1A +#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA 0x101A +#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x141A +#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN 0x181A +#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x1C1A +#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC 0x201A +#define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041B +#define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041C +#define TT_MS_LANGID_SWEDISH_SWEDEN 0x041D +#define TT_MS_LANGID_SWEDISH_FINLAND 0x081D +#define TT_MS_LANGID_THAI_THAILAND 0x041E +#define TT_MS_LANGID_TURKISH_TURKEY 0x041F +#define TT_MS_LANGID_URDU_PAKISTAN 0x0420 +#define TT_MS_LANGID_INDONESIAN_INDONESIA 0x0421 +#define TT_MS_LANGID_UKRAINIAN_UKRAINE 0x0422 +#define TT_MS_LANGID_BELARUSIAN_BELARUS 0x0423 +#define TT_MS_LANGID_SLOVENIAN_SLOVENIA 0x0424 +#define TT_MS_LANGID_ESTONIAN_ESTONIA 0x0425 +#define TT_MS_LANGID_LATVIAN_LATVIA 0x0426 +#define TT_MS_LANGID_LITHUANIAN_LITHUANIA 0x0427 +#define TT_MS_LANGID_TAJIK_TAJIKISTAN 0x0428 +#define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042A +#define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042B +#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042C +#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082C +#define TT_MS_LANGID_BASQUE_BASQUE 0x042D +#define TT_MS_LANGID_UPPER_SORBIAN_GERMANY 0x042E +#define TT_MS_LANGID_LOWER_SORBIAN_GERMANY 0x082E +#define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042F +#define TT_MS_LANGID_SETSWANA_SOUTH_AFRICA 0x0432 +#define TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA 0x0434 +#define TT_MS_LANGID_ISIZULU_SOUTH_AFRICA 0x0435 +#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA 0x0436 +#define TT_MS_LANGID_GEORGIAN_GEORGIA 0x0437 +#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS 0x0438 +#define TT_MS_LANGID_HINDI_INDIA 0x0439 +#define TT_MS_LANGID_MALTESE_MALTA 0x043A +#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY 0x043B +#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN 0x083B +#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND 0x0C3B +#define TT_MS_LANGID_SAMI_LULE_NORWAY 0x103B +#define TT_MS_LANGID_SAMI_LULE_SWEDEN 0x143B +#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY 0x183B +#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN 0x1C3B +#define TT_MS_LANGID_SAMI_SKOLT_FINLAND 0x203B +#define TT_MS_LANGID_SAMI_INARI_FINLAND 0x243B +#define TT_MS_LANGID_IRISH_IRELAND 0x083C +#define TT_MS_LANGID_MALAY_MALAYSIA 0x043E +#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083E +#define TT_MS_LANGID_KAZAKH_KAZAKHSTAN 0x043F +#define TT_MS_LANGID_KYRGYZ_KYRGYZSTAN /* Cyrillic*/ 0x0440 +#define TT_MS_LANGID_KISWAHILI_KENYA 0x0441 +#define TT_MS_LANGID_TURKMEN_TURKMENISTAN 0x0442 +#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN 0x0443 +#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC 0x0843 +#define TT_MS_LANGID_TATAR_RUSSIA 0x0444 +#define TT_MS_LANGID_BENGALI_INDIA 0x0445 +#define TT_MS_LANGID_BENGALI_BANGLADESH 0x0845 +#define TT_MS_LANGID_PUNJABI_INDIA 0x0446 +#define TT_MS_LANGID_GUJARATI_INDIA 0x0447 +#define TT_MS_LANGID_ODIA_INDIA 0x0448 +#define TT_MS_LANGID_TAMIL_INDIA 0x0449 +#define TT_MS_LANGID_TELUGU_INDIA 0x044A +#define TT_MS_LANGID_KANNADA_INDIA 0x044B +#define TT_MS_LANGID_MALAYALAM_INDIA 0x044C +#define TT_MS_LANGID_ASSAMESE_INDIA 0x044D +#define TT_MS_LANGID_MARATHI_INDIA 0x044E +#define TT_MS_LANGID_SANSKRIT_INDIA 0x044F +#define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450 +#define TT_MS_LANGID_MONGOLIAN_PRC 0x0850 +#define TT_MS_LANGID_TIBETAN_PRC 0x0451 +#define TT_MS_LANGID_WELSH_UNITED_KINGDOM 0x0452 +#define TT_MS_LANGID_KHMER_CAMBODIA 0x0453 +#define TT_MS_LANGID_LAO_LAOS 0x0454 +#define TT_MS_LANGID_GALICIAN_GALICIAN 0x0456 +#define TT_MS_LANGID_KONKANI_INDIA 0x0457 +#define TT_MS_LANGID_SYRIAC_SYRIA 0x045A +#define TT_MS_LANGID_SINHALA_SRI_LANKA 0x045B +#define TT_MS_LANGID_INUKTITUT_CANADA 0x045D +#define TT_MS_LANGID_INUKTITUT_CANADA_LATIN 0x085D +#define TT_MS_LANGID_AMHARIC_ETHIOPIA 0x045E +#define TT_MS_LANGID_TAMAZIGHT_ALGERIA 0x085F +#define TT_MS_LANGID_NEPALI_NEPAL 0x0461 +#define TT_MS_LANGID_FRISIAN_NETHERLANDS 0x0462 +#define TT_MS_LANGID_PASHTO_AFGHANISTAN 0x0463 +#define TT_MS_LANGID_FILIPINO_PHILIPPINES 0x0464 +#define TT_MS_LANGID_DHIVEHI_MALDIVES 0x0465 +#define TT_MS_LANGID_HAUSA_NIGERIA 0x0468 +#define TT_MS_LANGID_YORUBA_NIGERIA 0x046A +#define TT_MS_LANGID_QUECHUA_BOLIVIA 0x046B +#define TT_MS_LANGID_QUECHUA_ECUADOR 0x086B +#define TT_MS_LANGID_QUECHUA_PERU 0x0C6B +#define TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA 0x046C +#define TT_MS_LANGID_BASHKIR_RUSSIA 0x046D +#define TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG 0x046E +#define TT_MS_LANGID_GREENLANDIC_GREENLAND 0x046F +#define TT_MS_LANGID_IGBO_NIGERIA 0x0470 +#define TT_MS_LANGID_YI_PRC 0x0478 +#define TT_MS_LANGID_MAPUDUNGUN_CHILE 0x047A +#define TT_MS_LANGID_MOHAWK_MOHAWK 0x047C +#define TT_MS_LANGID_BRETON_FRANCE 0x047E +#define TT_MS_LANGID_UIGHUR_PRC 0x0480 +#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0481 +#define TT_MS_LANGID_OCCITAN_FRANCE 0x0482 +#define TT_MS_LANGID_CORSICAN_FRANCE 0x0483 +#define TT_MS_LANGID_ALSATIAN_FRANCE 0x0484 +#define TT_MS_LANGID_YAKUT_RUSSIA 0x0485 +#define TT_MS_LANGID_KICHE_GUATEMALA 0x0486 +#define TT_MS_LANGID_KINYARWANDA_RWANDA 0x0487 +#define TT_MS_LANGID_WOLOF_SENEGAL 0x0488 +#define TT_MS_LANGID_DARI_AFGHANISTAN 0x048C + + /* */ + + + /* legacy macro definitions not present in OpenType 1.8.1 */ +#define TT_MS_LANGID_ARABIC_GENERAL 0x0001 +#define TT_MS_LANGID_CATALAN_SPAIN \ + TT_MS_LANGID_CATALAN_CATALAN +#define TT_MS_LANGID_CHINESE_GENERAL 0x0004 +#define TT_MS_LANGID_CHINESE_MACAU \ + TT_MS_LANGID_CHINESE_MACAO +#define TT_MS_LANGID_GERMAN_LIECHTENSTEI \ + TT_MS_LANGID_GERMAN_LIECHTENSTEIN +#define TT_MS_LANGID_ENGLISH_GENERAL 0x0009 +#define TT_MS_LANGID_ENGLISH_INDONESIA 0x3809 +#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3C09 +#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT \ + TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT +#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40AU +#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1C0C +#define TT_MS_LANGID_FRENCH_REUNION 0x200C +#define TT_MS_LANGID_FRENCH_CONGO 0x240C + /* which was formerly: */ +#define TT_MS_LANGID_FRENCH_ZAIRE \ + TT_MS_LANGID_FRENCH_CONGO +#define TT_MS_LANGID_FRENCH_SENEGAL 0x280C +#define TT_MS_LANGID_FRENCH_CAMEROON 0x2C0C +#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300C +#define TT_MS_LANGID_FRENCH_MALI 0x340C +#define TT_MS_LANGID_FRENCH_MOROCCO 0x380C +#define TT_MS_LANGID_FRENCH_HAITI 0x3C0C +#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40CU +#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA \ + TT_MS_LANGID_KOREAN_KOREA +#define TT_MS_LANGID_KOREAN_JOHAB_KOREA 0x0812 +#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND \ + TT_MS_LANGID_ROMANSH_SWITZERLAND +#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818 +#define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819 +#define TT_MS_LANGID_URDU_INDIA 0x0820 +#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827 +#define TT_MS_LANGID_SLOVENE_SLOVENIA \ + TT_MS_LANGID_SLOVENIAN_SLOVENIA +#define TT_MS_LANGID_FARSI_IRAN 0x0429 +#define TT_MS_LANGID_BASQUE_SPAIN \ + TT_MS_LANGID_BASQUE_BASQUE +#define TT_MS_LANGID_SORBIAN_GERMANY \ + TT_MS_LANGID_UPPER_SORBIAN_GERMANY +#define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430 +#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431 +#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA \ + TT_MS_LANGID_SETSWANA_SOUTH_AFRICA +#define TT_MS_LANGID_VENDA_SOUTH_AFRICA 0x0433 +#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA \ + TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA +#define TT_MS_LANGID_ZULU_SOUTH_AFRICA \ + TT_MS_LANGID_ISIZULU_SOUTH_AFRICA +#define TT_MS_LANGID_SAAMI_LAPONIA 0x043B + /* the next two values are incorrectly inverted */ +#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C +#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C +#define TT_MS_LANGID_YIDDISH_GERMANY 0x043D +#define TT_MS_LANGID_KAZAK_KAZAKSTAN \ + TT_MS_LANGID_KAZAKH_KAZAKHSTAN +#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \ + TT_MS_LANGID_KYRGYZ_KYRGYZSTAN +#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN \ + TT_MS_LANGID_KYRGYZ_KYRGYZSTAN +#define TT_MS_LANGID_SWAHILI_KENYA \ + TT_MS_LANGID_KISWAHILI_KENYA +#define TT_MS_LANGID_TATAR_TATARSTAN \ + TT_MS_LANGID_TATAR_RUSSIA +#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN 0x0846 +#define TT_MS_LANGID_ORIYA_INDIA \ + TT_MS_LANGID_ODIA_INDIA +#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN \ + TT_MS_LANGID_MONGOLIAN_PRC +#define TT_MS_LANGID_TIBETAN_CHINA \ + TT_MS_LANGID_TIBETAN_PRC +#define TT_MS_LANGID_DZONGHKA_BHUTAN 0x0851 +#define TT_MS_LANGID_TIBETAN_BHUTAN \ + TT_MS_LANGID_DZONGHKA_BHUTAN +#define TT_MS_LANGID_WELSH_WALES \ + TT_MS_LANGID_WELSH_UNITED_KINGDOM +#define TT_MS_LANGID_BURMESE_MYANMAR 0x0455 +#define TT_MS_LANGID_GALICIAN_SPAIN \ + TT_MS_LANGID_GALICIAN_GALICIAN +#define TT_MS_LANGID_MANIPURI_INDIA /* Bengali */ 0x0458 +#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */ 0x0459 +#define TT_MS_LANGID_SINDHI_PAKISTAN 0x0859 +#define TT_MS_LANGID_SINHALESE_SRI_LANKA \ + TT_MS_LANGID_SINHALA_SRI_LANKA +#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045C +#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045F +#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN \ + TT_MS_LANGID_TAMAZIGHT_ALGERIA +#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */ 0x0460 +#define TT_MS_LANGID_KASHMIRI_SASIA 0x0860 +#define TT_MS_LANGID_KASHMIRI_INDIA \ + TT_MS_LANGID_KASHMIRI_SASIA +#define TT_MS_LANGID_NEPALI_INDIA 0x0861 +#define TT_MS_LANGID_DIVEHI_MALDIVES \ + TT_MS_LANGID_DHIVEHI_MALDIVES +#define TT_MS_LANGID_EDO_NIGERIA 0x0466 +#define TT_MS_LANGID_FULFULDE_NIGERIA 0x0467 +#define TT_MS_LANGID_IBIBIO_NIGERIA 0x0469 +#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA \ + TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA +#define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \ + TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA +#define TT_MS_LANGID_KANURI_NIGERIA 0x0471 +#define TT_MS_LANGID_OROMO_ETHIOPIA 0x0472 +#define TT_MS_LANGID_TIGRIGNA_ETHIOPIA 0x0473 +#define TT_MS_LANGID_TIGRIGNA_ERYTHREA 0x0873 +#define TT_MS_LANGID_TIGRIGNA_ERYTREA \ + TT_MS_LANGID_TIGRIGNA_ERYTHREA +#define TT_MS_LANGID_GUARANI_PARAGUAY 0x0474 +#define TT_MS_LANGID_HAWAIIAN_UNITED_STATES 0x0475 +#define TT_MS_LANGID_LATIN 0x0476 +#define TT_MS_LANGID_SOMALI_SOMALIA 0x0477 +#define TT_MS_LANGID_YI_CHINA \ + TT_MS_LANGID_YI_PRC +#define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES 0x0479 +#define TT_MS_LANGID_UIGHUR_CHINA \ + TT_MS_LANGID_UIGHUR_PRC + + + /*********************************************************************** + * + * @enum: + * TT_NAME_ID_XXX + * + * @description: + * Possible values of the `name' identifier field in the name records of + * an SFNT `name' table. These values are platform independent. + */ + +#define TT_NAME_ID_COPYRIGHT 0 +#define TT_NAME_ID_FONT_FAMILY 1 +#define TT_NAME_ID_FONT_SUBFAMILY 2 +#define TT_NAME_ID_UNIQUE_ID 3 +#define TT_NAME_ID_FULL_NAME 4 +#define TT_NAME_ID_VERSION_STRING 5 +#define TT_NAME_ID_PS_NAME 6 +#define TT_NAME_ID_TRADEMARK 7 + + /* the following values are from the OpenType spec */ +#define TT_NAME_ID_MANUFACTURER 8 +#define TT_NAME_ID_DESIGNER 9 +#define TT_NAME_ID_DESCRIPTION 10 +#define TT_NAME_ID_VENDOR_URL 11 +#define TT_NAME_ID_DESIGNER_URL 12 +#define TT_NAME_ID_LICENSE 13 +#define TT_NAME_ID_LICENSE_URL 14 + /* number 15 is reserved */ +#define TT_NAME_ID_TYPOGRAPHIC_FAMILY 16 +#define TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY 17 +#define TT_NAME_ID_MAC_FULL_NAME 18 + + /* The following code is new as of 2000-01-21 */ +#define TT_NAME_ID_SAMPLE_TEXT 19 + + /* This is new in OpenType 1.3 */ +#define TT_NAME_ID_CID_FINDFONT_NAME 20 + + /* This is new in OpenType 1.5 */ +#define TT_NAME_ID_WWS_FAMILY 21 +#define TT_NAME_ID_WWS_SUBFAMILY 22 + + /* This is new in OpenType 1.7 */ +#define TT_NAME_ID_LIGHT_BACKGROUND 23 +#define TT_NAME_ID_DARK_BACKGROUND 24 + + /* This is new in OpenType 1.8 */ +#define TT_NAME_ID_VARIATIONS_PREFIX 25 + + /* these two values are deprecated */ +#define TT_NAME_ID_PREFERRED_FAMILY TT_NAME_ID_TYPOGRAPHIC_FAMILY +#define TT_NAME_ID_PREFERRED_SUBFAMILY TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY + + + /*********************************************************************** + * + * @enum: + * TT_UCR_XXX + * + * @description: + * Possible bit mask values for the `ulUnicodeRangeX' fields in an SFNT + * `OS/2' table. + */ + + /* ulUnicodeRange1 */ + /* --------------- */ + + /* Bit 0 Basic Latin */ +#define TT_UCR_BASIC_LATIN (1L << 0) /* U+0020-U+007E */ + /* Bit 1 C1 Controls and Latin-1 Supplement */ +#define TT_UCR_LATIN1_SUPPLEMENT (1L << 1) /* U+0080-U+00FF */ + /* Bit 2 Latin Extended-A */ +#define TT_UCR_LATIN_EXTENDED_A (1L << 2) /* U+0100-U+017F */ + /* Bit 3 Latin Extended-B */ +#define TT_UCR_LATIN_EXTENDED_B (1L << 3) /* U+0180-U+024F */ + /* Bit 4 IPA Extensions */ + /* Phonetic Extensions */ + /* Phonetic Extensions Supplement */ +#define TT_UCR_IPA_EXTENSIONS (1L << 4) /* U+0250-U+02AF */ + /* U+1D00-U+1D7F */ + /* U+1D80-U+1DBF */ + /* Bit 5 Spacing Modifier Letters */ + /* Modifier Tone Letters */ +#define TT_UCR_SPACING_MODIFIER (1L << 5) /* U+02B0-U+02FF */ + /* U+A700-U+A71F */ + /* Bit 6 Combining Diacritical Marks */ + /* Combining Diacritical Marks Supplement */ +#define TT_UCR_COMBINING_DIACRITICAL_MARKS (1L << 6) /* U+0300-U+036F */ + /* U+1DC0-U+1DFF */ + /* Bit 7 Greek and Coptic */ +#define TT_UCR_GREEK (1L << 7) /* U+0370-U+03FF */ + /* Bit 8 Coptic */ +#define TT_UCR_COPTIC (1L << 8) /* U+2C80-U+2CFF */ + /* Bit 9 Cyrillic */ + /* Cyrillic Supplement */ + /* Cyrillic Extended-A */ + /* Cyrillic Extended-B */ +#define TT_UCR_CYRILLIC (1L << 9) /* U+0400-U+04FF */ + /* U+0500-U+052F */ + /* U+2DE0-U+2DFF */ + /* U+A640-U+A69F */ + /* Bit 10 Armenian */ +#define TT_UCR_ARMENIAN (1L << 10) /* U+0530-U+058F */ + /* Bit 11 Hebrew */ +#define TT_UCR_HEBREW (1L << 11) /* U+0590-U+05FF */ + /* Bit 12 Vai */ +#define TT_UCR_VAI (1L << 12) /* U+A500-U+A63F */ + /* Bit 13 Arabic */ + /* Arabic Supplement */ +#define TT_UCR_ARABIC (1L << 13) /* U+0600-U+06FF */ + /* U+0750-U+077F */ + /* Bit 14 NKo */ +#define TT_UCR_NKO (1L << 14) /* U+07C0-U+07FF */ + /* Bit 15 Devanagari */ +#define TT_UCR_DEVANAGARI (1L << 15) /* U+0900-U+097F */ + /* Bit 16 Bengali */ +#define TT_UCR_BENGALI (1L << 16) /* U+0980-U+09FF */ + /* Bit 17 Gurmukhi */ +#define TT_UCR_GURMUKHI (1L << 17) /* U+0A00-U+0A7F */ + /* Bit 18 Gujarati */ +#define TT_UCR_GUJARATI (1L << 18) /* U+0A80-U+0AFF */ + /* Bit 19 Oriya */ +#define TT_UCR_ORIYA (1L << 19) /* U+0B00-U+0B7F */ + /* Bit 20 Tamil */ +#define TT_UCR_TAMIL (1L << 20) /* U+0B80-U+0BFF */ + /* Bit 21 Telugu */ +#define TT_UCR_TELUGU (1L << 21) /* U+0C00-U+0C7F */ + /* Bit 22 Kannada */ +#define TT_UCR_KANNADA (1L << 22) /* U+0C80-U+0CFF */ + /* Bit 23 Malayalam */ +#define TT_UCR_MALAYALAM (1L << 23) /* U+0D00-U+0D7F */ + /* Bit 24 Thai */ +#define TT_UCR_THAI (1L << 24) /* U+0E00-U+0E7F */ + /* Bit 25 Lao */ +#define TT_UCR_LAO (1L << 25) /* U+0E80-U+0EFF */ + /* Bit 26 Georgian */ + /* Georgian Supplement */ +#define TT_UCR_GEORGIAN (1L << 26) /* U+10A0-U+10FF */ + /* U+2D00-U+2D2F */ + /* Bit 27 Balinese */ +#define TT_UCR_BALINESE (1L << 27) /* U+1B00-U+1B7F */ + /* Bit 28 Hangul Jamo */ +#define TT_UCR_HANGUL_JAMO (1L << 28) /* U+1100-U+11FF */ + /* Bit 29 Latin Extended Additional */ + /* Latin Extended-C */ + /* Latin Extended-D */ +#define TT_UCR_LATIN_EXTENDED_ADDITIONAL (1L << 29) /* U+1E00-U+1EFF */ + /* U+2C60-U+2C7F */ + /* U+A720-U+A7FF */ + /* Bit 30 Greek Extended */ +#define TT_UCR_GREEK_EXTENDED (1L << 30) /* U+1F00-U+1FFF */ + /* Bit 31 General Punctuation */ + /* Supplemental Punctuation */ +#define TT_UCR_GENERAL_PUNCTUATION (1L << 31) /* U+2000-U+206F */ + /* U+2E00-U+2E7F */ + + /* ulUnicodeRange2 */ + /* --------------- */ + + /* Bit 32 Superscripts And Subscripts */ +#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS (1L << 0) /* U+2070-U+209F */ + /* Bit 33 Currency Symbols */ +#define TT_UCR_CURRENCY_SYMBOLS (1L << 1) /* U+20A0-U+20CF */ + /* Bit 34 Combining Diacritical Marks For Symbols */ +#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \ + (1L << 2) /* U+20D0-U+20FF */ + /* Bit 35 Letterlike Symbols */ +#define TT_UCR_LETTERLIKE_SYMBOLS (1L << 3) /* U+2100-U+214F */ + /* Bit 36 Number Forms */ +#define TT_UCR_NUMBER_FORMS (1L << 4) /* U+2150-U+218F */ + /* Bit 37 Arrows */ + /* Supplemental Arrows-A */ + /* Supplemental Arrows-B */ + /* Miscellaneous Symbols and Arrows */ +#define TT_UCR_ARROWS (1L << 5) /* U+2190-U+21FF */ + /* U+27F0-U+27FF */ + /* U+2900-U+297F */ + /* U+2B00-U+2BFF */ + /* Bit 38 Mathematical Operators */ + /* Supplemental Mathematical Operators */ + /* Miscellaneous Mathematical Symbols-A */ + /* Miscellaneous Mathematical Symbols-B */ +#define TT_UCR_MATHEMATICAL_OPERATORS (1L << 6) /* U+2200-U+22FF */ + /* U+2A00-U+2AFF */ + /* U+27C0-U+27EF */ + /* U+2980-U+29FF */ + /* Bit 39 Miscellaneous Technical */ +#define TT_UCR_MISCELLANEOUS_TECHNICAL (1L << 7) /* U+2300-U+23FF */ + /* Bit 40 Control Pictures */ +#define TT_UCR_CONTROL_PICTURES (1L << 8) /* U+2400-U+243F */ + /* Bit 41 Optical Character Recognition */ +#define TT_UCR_OCR (1L << 9) /* U+2440-U+245F */ + /* Bit 42 Enclosed Alphanumerics */ +#define TT_UCR_ENCLOSED_ALPHANUMERICS (1L << 10) /* U+2460-U+24FF */ + /* Bit 43 Box Drawing */ +#define TT_UCR_BOX_DRAWING (1L << 11) /* U+2500-U+257F */ + /* Bit 44 Block Elements */ +#define TT_UCR_BLOCK_ELEMENTS (1L << 12) /* U+2580-U+259F */ + /* Bit 45 Geometric Shapes */ +#define TT_UCR_GEOMETRIC_SHAPES (1L << 13) /* U+25A0-U+25FF */ + /* Bit 46 Miscellaneous Symbols */ +#define TT_UCR_MISCELLANEOUS_SYMBOLS (1L << 14) /* U+2600-U+26FF */ + /* Bit 47 Dingbats */ +#define TT_UCR_DINGBATS (1L << 15) /* U+2700-U+27BF */ + /* Bit 48 CJK Symbols and Punctuation */ +#define TT_UCR_CJK_SYMBOLS (1L << 16) /* U+3000-U+303F */ + /* Bit 49 Hiragana */ +#define TT_UCR_HIRAGANA (1L << 17) /* U+3040-U+309F */ + /* Bit 50 Katakana */ + /* Katakana Phonetic Extensions */ +#define TT_UCR_KATAKANA (1L << 18) /* U+30A0-U+30FF */ + /* U+31F0-U+31FF */ + /* Bit 51 Bopomofo */ + /* Bopomofo Extended */ +#define TT_UCR_BOPOMOFO (1L << 19) /* U+3100-U+312F */ + /* U+31A0-U+31BF */ + /* Bit 52 Hangul Compatibility Jamo */ +#define TT_UCR_HANGUL_COMPATIBILITY_JAMO (1L << 20) /* U+3130-U+318F */ + /* Bit 53 Phags-Pa */ +#define TT_UCR_CJK_MISC (1L << 21) /* U+A840-U+A87F */ +#define TT_UCR_KANBUN TT_UCR_CJK_MISC /* deprecated */ +#define TT_UCR_PHAGSPA + /* Bit 54 Enclosed CJK Letters and Months */ +#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS (1L << 22) /* U+3200-U+32FF */ + /* Bit 55 CJK Compatibility */ +#define TT_UCR_CJK_COMPATIBILITY (1L << 23) /* U+3300-U+33FF */ + /* Bit 56 Hangul Syllables */ +#define TT_UCR_HANGUL (1L << 24) /* U+AC00-U+D7A3 */ + /* Bit 57 High Surrogates */ + /* High Private Use Surrogates */ + /* Low Surrogates */ + + /* According to OpenType specs v.1.3+, */ + /* setting bit 57 implies that there is */ + /* at least one codepoint beyond the */ + /* Basic Multilingual Plane that is */ + /* supported by this font. So it really */ + /* means >= U+10000. */ +#define TT_UCR_SURROGATES (1L << 25) /* U+D800-U+DB7F */ + /* U+DB80-U+DBFF */ + /* U+DC00-U+DFFF */ +#define TT_UCR_NON_PLANE_0 TT_UCR_SURROGATES + /* Bit 58 Phoenician */ +#define TT_UCR_PHOENICIAN (1L << 26) /*U+10900-U+1091F*/ + /* Bit 59 CJK Unified Ideographs */ + /* CJK Radicals Supplement */ + /* Kangxi Radicals */ + /* Ideographic Description Characters */ + /* CJK Unified Ideographs Extension A */ + /* CJK Unified Ideographs Extension B */ + /* Kanbun */ +#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS (1L << 27) /* U+4E00-U+9FFF */ + /* U+2E80-U+2EFF */ + /* U+2F00-U+2FDF */ + /* U+2FF0-U+2FFF */ + /* U+3400-U+4DB5 */ + /*U+20000-U+2A6DF*/ + /* U+3190-U+319F */ + /* Bit 60 Private Use */ +#define TT_UCR_PRIVATE_USE (1L << 28) /* U+E000-U+F8FF */ + /* Bit 61 CJK Strokes */ + /* CJK Compatibility Ideographs */ + /* CJK Compatibility Ideographs Supplement */ +#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS (1L << 29) /* U+31C0-U+31EF */ + /* U+F900-U+FAFF */ + /*U+2F800-U+2FA1F*/ + /* Bit 62 Alphabetic Presentation Forms */ +#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1L << 30) /* U+FB00-U+FB4F */ + /* Bit 63 Arabic Presentation Forms-A */ +#define TT_UCR_ARABIC_PRESENTATION_FORMS_A (1L << 31) /* U+FB50-U+FDFF */ + + /* ulUnicodeRange3 */ + /* --------------- */ + + /* Bit 64 Combining Half Marks */ +#define TT_UCR_COMBINING_HALF_MARKS (1L << 0) /* U+FE20-U+FE2F */ + /* Bit 65 Vertical forms */ + /* CJK Compatibility Forms */ +#define TT_UCR_CJK_COMPATIBILITY_FORMS (1L << 1) /* U+FE10-U+FE1F */ + /* U+FE30-U+FE4F */ + /* Bit 66 Small Form Variants */ +#define TT_UCR_SMALL_FORM_VARIANTS (1L << 2) /* U+FE50-U+FE6F */ + /* Bit 67 Arabic Presentation Forms-B */ +#define TT_UCR_ARABIC_PRESENTATION_FORMS_B (1L << 3) /* U+FE70-U+FEFE */ + /* Bit 68 Halfwidth and Fullwidth Forms */ +#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS (1L << 4) /* U+FF00-U+FFEF */ + /* Bit 69 Specials */ +#define TT_UCR_SPECIALS (1L << 5) /* U+FFF0-U+FFFD */ + /* Bit 70 Tibetan */ +#define TT_UCR_TIBETAN (1L << 6) /* U+0F00-U+0FFF */ + /* Bit 71 Syriac */ +#define TT_UCR_SYRIAC (1L << 7) /* U+0700-U+074F */ + /* Bit 72 Thaana */ +#define TT_UCR_THAANA (1L << 8) /* U+0780-U+07BF */ + /* Bit 73 Sinhala */ +#define TT_UCR_SINHALA (1L << 9) /* U+0D80-U+0DFF */ + /* Bit 74 Myanmar */ +#define TT_UCR_MYANMAR (1L << 10) /* U+1000-U+109F */ + /* Bit 75 Ethiopic */ + /* Ethiopic Supplement */ + /* Ethiopic Extended */ +#define TT_UCR_ETHIOPIC (1L << 11) /* U+1200-U+137F */ + /* U+1380-U+139F */ + /* U+2D80-U+2DDF */ + /* Bit 76 Cherokee */ +#define TT_UCR_CHEROKEE (1L << 12) /* U+13A0-U+13FF */ + /* Bit 77 Unified Canadian Aboriginal Syllabics */ +#define TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS (1L << 13) /* U+1400-U+167F */ + /* Bit 78 Ogham */ +#define TT_UCR_OGHAM (1L << 14) /* U+1680-U+169F */ + /* Bit 79 Runic */ +#define TT_UCR_RUNIC (1L << 15) /* U+16A0-U+16FF */ + /* Bit 80 Khmer */ + /* Khmer Symbols */ +#define TT_UCR_KHMER (1L << 16) /* U+1780-U+17FF */ + /* U+19E0-U+19FF */ + /* Bit 81 Mongolian */ +#define TT_UCR_MONGOLIAN (1L << 17) /* U+1800-U+18AF */ + /* Bit 82 Braille Patterns */ +#define TT_UCR_BRAILLE (1L << 18) /* U+2800-U+28FF */ + /* Bit 83 Yi Syllables */ + /* Yi Radicals */ +#define TT_UCR_YI (1L << 19) /* U+A000-U+A48F */ + /* U+A490-U+A4CF */ + /* Bit 84 Tagalog */ + /* Hanunoo */ + /* Buhid */ + /* Tagbanwa */ +#define TT_UCR_PHILIPPINE (1L << 20) /* U+1700-U+171F */ + /* U+1720-U+173F */ + /* U+1740-U+175F */ + /* U+1760-U+177F */ + /* Bit 85 Old Italic */ +#define TT_UCR_OLD_ITALIC (1L << 21) /*U+10300-U+1032F*/ + /* Bit 86 Gothic */ +#define TT_UCR_GOTHIC (1L << 22) /*U+10330-U+1034F*/ + /* Bit 87 Deseret */ +#define TT_UCR_DESERET (1L << 23) /*U+10400-U+1044F*/ + /* Bit 88 Byzantine Musical Symbols */ + /* Musical Symbols */ + /* Ancient Greek Musical Notation */ +#define TT_UCR_MUSICAL_SYMBOLS (1L << 24) /*U+1D000-U+1D0FF*/ + /*U+1D100-U+1D1FF*/ + /*U+1D200-U+1D24F*/ + /* Bit 89 Mathematical Alphanumeric Symbols */ +#define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS (1L << 25) /*U+1D400-U+1D7FF*/ + /* Bit 90 Private Use (plane 15) */ + /* Private Use (plane 16) */ +#define TT_UCR_PRIVATE_USE_SUPPLEMENTARY (1L << 26) /*U+F0000-U+FFFFD*/ + /*U+100000-U+10FFFD*/ + /* Bit 91 Variation Selectors */ + /* Variation Selectors Supplement */ +#define TT_UCR_VARIATION_SELECTORS (1L << 27) /* U+FE00-U+FE0F */ + /*U+E0100-U+E01EF*/ + /* Bit 92 Tags */ +#define TT_UCR_TAGS (1L << 28) /*U+E0000-U+E007F*/ + /* Bit 93 Limbu */ +#define TT_UCR_LIMBU (1L << 29) /* U+1900-U+194F */ + /* Bit 94 Tai Le */ +#define TT_UCR_TAI_LE (1L << 30) /* U+1950-U+197F */ + /* Bit 95 New Tai Lue */ +#define TT_UCR_NEW_TAI_LUE (1L << 31) /* U+1980-U+19DF */ + + /* ulUnicodeRange4 */ + /* --------------- */ + + /* Bit 96 Buginese */ +#define TT_UCR_BUGINESE (1L << 0) /* U+1A00-U+1A1F */ + /* Bit 97 Glagolitic */ +#define TT_UCR_GLAGOLITIC (1L << 1) /* U+2C00-U+2C5F */ + /* Bit 98 Tifinagh */ +#define TT_UCR_TIFINAGH (1L << 2) /* U+2D30-U+2D7F */ + /* Bit 99 Yijing Hexagram Symbols */ +#define TT_UCR_YIJING (1L << 3) /* U+4DC0-U+4DFF */ + /* Bit 100 Syloti Nagri */ +#define TT_UCR_SYLOTI_NAGRI (1L << 4) /* U+A800-U+A82F */ + /* Bit 101 Linear B Syllabary */ + /* Linear B Ideograms */ + /* Aegean Numbers */ +#define TT_UCR_LINEAR_B (1L << 5) /*U+10000-U+1007F*/ + /*U+10080-U+100FF*/ + /*U+10100-U+1013F*/ + /* Bit 102 Ancient Greek Numbers */ +#define TT_UCR_ANCIENT_GREEK_NUMBERS (1L << 6) /*U+10140-U+1018F*/ + /* Bit 103 Ugaritic */ +#define TT_UCR_UGARITIC (1L << 7) /*U+10380-U+1039F*/ + /* Bit 104 Old Persian */ +#define TT_UCR_OLD_PERSIAN (1L << 8) /*U+103A0-U+103DF*/ + /* Bit 105 Shavian */ +#define TT_UCR_SHAVIAN (1L << 9) /*U+10450-U+1047F*/ + /* Bit 106 Osmanya */ +#define TT_UCR_OSMANYA (1L << 10) /*U+10480-U+104AF*/ + /* Bit 107 Cypriot Syllabary */ +#define TT_UCR_CYPRIOT_SYLLABARY (1L << 11) /*U+10800-U+1083F*/ + /* Bit 108 Kharoshthi */ +#define TT_UCR_KHAROSHTHI (1L << 12) /*U+10A00-U+10A5F*/ + /* Bit 109 Tai Xuan Jing Symbols */ +#define TT_UCR_TAI_XUAN_JING (1L << 13) /*U+1D300-U+1D35F*/ + /* Bit 110 Cuneiform */ + /* Cuneiform Numbers and Punctuation */ +#define TT_UCR_CUNEIFORM (1L << 14) /*U+12000-U+123FF*/ + /*U+12400-U+1247F*/ + /* Bit 111 Counting Rod Numerals */ +#define TT_UCR_COUNTING_ROD_NUMERALS (1L << 15) /*U+1D360-U+1D37F*/ + /* Bit 112 Sundanese */ +#define TT_UCR_SUNDANESE (1L << 16) /* U+1B80-U+1BBF */ + /* Bit 113 Lepcha */ +#define TT_UCR_LEPCHA (1L << 17) /* U+1C00-U+1C4F */ + /* Bit 114 Ol Chiki */ +#define TT_UCR_OL_CHIKI (1L << 18) /* U+1C50-U+1C7F */ + /* Bit 115 Saurashtra */ +#define TT_UCR_SAURASHTRA (1L << 19) /* U+A880-U+A8DF */ + /* Bit 116 Kayah Li */ +#define TT_UCR_KAYAH_LI (1L << 20) /* U+A900-U+A92F */ + /* Bit 117 Rejang */ +#define TT_UCR_REJANG (1L << 21) /* U+A930-U+A95F */ + /* Bit 118 Cham */ +#define TT_UCR_CHAM (1L << 22) /* U+AA00-U+AA5F */ + /* Bit 119 Ancient Symbols */ +#define TT_UCR_ANCIENT_SYMBOLS (1L << 23) /*U+10190-U+101CF*/ + /* Bit 120 Phaistos Disc */ +#define TT_UCR_PHAISTOS_DISC (1L << 24) /*U+101D0-U+101FF*/ + /* Bit 121 Carian */ + /* Lycian */ + /* Lydian */ +#define TT_UCR_OLD_ANATOLIAN (1L << 25) /*U+102A0-U+102DF*/ + /*U+10280-U+1029F*/ + /*U+10920-U+1093F*/ + /* Bit 122 Domino Tiles */ + /* Mahjong Tiles */ +#define TT_UCR_GAME_TILES (1L << 26) /*U+1F030-U+1F09F*/ + /*U+1F000-U+1F02F*/ + /* Bit 123-127 Reserved for process-internal usage */ + + /* */ + + /* for backward compatibility with older FreeType versions */ +#define TT_UCR_ARABIC_PRESENTATION_A \ + TT_UCR_ARABIC_PRESENTATION_FORMS_A +#define TT_UCR_ARABIC_PRESENTATION_B \ + TT_UCR_ARABIC_PRESENTATION_FORMS_B + +#define TT_UCR_COMBINING_DIACRITICS \ + TT_UCR_COMBINING_DIACRITICAL_MARKS +#define TT_UCR_COMBINING_DIACRITICS_SYMB \ + TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB + + +FT_END_HEADER + +#endif /* TTNAMEID_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/tttables.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/tttables.h new file mode 100755 index 00000000..ce6a6177 --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/tttables.h @@ -0,0 +1,846 @@ +/***************************************************************************/ +/* */ +/* tttables.h */ +/* */ +/* Basic SFNT/TrueType tables definitions and interface */ +/* (specification only). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef TTTABLES_H_ +#define TTTABLES_H_ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* <Section> */ + /* truetype_tables */ + /* */ + /* <Title> */ + /* TrueType Tables */ + /* */ + /* <Abstract> */ + /* TrueType specific table types and functions. */ + /* */ + /* <Description> */ + /* This section contains definitions of some basic tables specific to */ + /* TrueType and OpenType as well as some routines used to access and */ + /* process them. */ + /* */ + /* <Order> */ + /* TT_Header */ + /* TT_HoriHeader */ + /* TT_VertHeader */ + /* TT_OS2 */ + /* TT_Postscript */ + /* TT_PCLT */ + /* TT_MaxProfile */ + /* */ + /* FT_Sfnt_Tag */ + /* FT_Get_Sfnt_Table */ + /* FT_Load_Sfnt_Table */ + /* FT_Sfnt_Table_Info */ + /* */ + /* FT_Get_CMap_Language_ID */ + /* FT_Get_CMap_Format */ + /* */ + /* FT_PARAM_TAG_UNPATENTED_HINTING */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_Header */ + /* */ + /* <Description> */ + /* A structure to model a TrueType font header table. All fields */ + /* follow the OpenType specification. */ + /* */ + typedef struct TT_Header_ + { + FT_Fixed Table_Version; + FT_Fixed Font_Revision; + + FT_Long CheckSum_Adjust; + FT_Long Magic_Number; + + FT_UShort Flags; + FT_UShort Units_Per_EM; + + FT_Long Created [2]; + FT_Long Modified[2]; + + FT_Short xMin; + FT_Short yMin; + FT_Short xMax; + FT_Short yMax; + + FT_UShort Mac_Style; + FT_UShort Lowest_Rec_PPEM; + + FT_Short Font_Direction; + FT_Short Index_To_Loc_Format; + FT_Short Glyph_Data_Format; + + } TT_Header; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_HoriHeader */ + /* */ + /* <Description> */ + /* A structure to model a TrueType horizontal header, the `hhea' */ + /* table, as well as the corresponding horizontal metrics table, */ + /* `hmtx'. */ + /* */ + /* <Fields> */ + /* Version :: The table version. */ + /* */ + /* Ascender :: The font's ascender, i.e., the distance */ + /* from the baseline to the top-most of all */ + /* glyph points found in the font. */ + /* */ + /* This value is invalid in many fonts, as */ + /* it is usually set by the font designer, */ + /* and often reflects only a portion of the */ + /* glyphs found in the font (maybe ASCII). */ + /* */ + /* You should use the `sTypoAscender' field */ + /* of the `OS/2' table instead if you want */ + /* the correct one. */ + /* */ + /* Descender :: The font's descender, i.e., the distance */ + /* from the baseline to the bottom-most of */ + /* all glyph points found in the font. It */ + /* is negative. */ + /* */ + /* This value is invalid in many fonts, as */ + /* it is usually set by the font designer, */ + /* and often reflects only a portion of the */ + /* glyphs found in the font (maybe ASCII). */ + /* */ + /* You should use the `sTypoDescender' */ + /* field of the `OS/2' table instead if you */ + /* want the correct one. */ + /* */ + /* Line_Gap :: The font's line gap, i.e., the distance */ + /* to add to the ascender and descender to */ + /* get the BTB, i.e., the */ + /* baseline-to-baseline distance for the */ + /* font. */ + /* */ + /* advance_Width_Max :: This field is the maximum of all advance */ + /* widths found in the font. It can be */ + /* used to compute the maximum width of an */ + /* arbitrary string of text. */ + /* */ + /* min_Left_Side_Bearing :: The minimum left side bearing of all */ + /* glyphs within the font. */ + /* */ + /* min_Right_Side_Bearing :: The minimum right side bearing of all */ + /* glyphs within the font. */ + /* */ + /* xMax_Extent :: The maximum horizontal extent (i.e., the */ + /* `width' of a glyph's bounding box) for */ + /* all glyphs in the font. */ + /* */ + /* caret_Slope_Rise :: The rise coefficient of the cursor's */ + /* slope of the cursor (slope=rise/run). */ + /* */ + /* caret_Slope_Run :: The run coefficient of the cursor's */ + /* slope. */ + /* */ + /* caret_Offset :: The cursor's offset for slanted fonts. */ + /* */ + /* Reserved :: 8~reserved bytes. */ + /* */ + /* metric_Data_Format :: Always~0. */ + /* */ + /* number_Of_HMetrics :: Number of HMetrics entries in the `hmtx' */ + /* table -- this value can be smaller than */ + /* the total number of glyphs in the font. */ + /* */ + /* long_metrics :: A pointer into the `hmtx' table. */ + /* */ + /* short_metrics :: A pointer into the `hmtx' table. */ + /* */ + /* <Note> */ + /* For an OpenType variation font, the values of the following fields */ + /* can change after a call to @FT_Set_Var_Design_Coordinates (and */ + /* friends) if the font contains an `MVAR' table: `caret_Slope_Rise', */ + /* `caret_Slope_Run', and `caret_Offset'. */ + /* */ + typedef struct TT_HoriHeader_ + { + FT_Fixed Version; + FT_Short Ascender; + FT_Short Descender; + FT_Short Line_Gap; + + FT_UShort advance_Width_Max; /* advance width maximum */ + + FT_Short min_Left_Side_Bearing; /* minimum left-sb */ + FT_Short min_Right_Side_Bearing; /* minimum right-sb */ + FT_Short xMax_Extent; /* xmax extents */ + FT_Short caret_Slope_Rise; + FT_Short caret_Slope_Run; + FT_Short caret_Offset; + + FT_Short Reserved[4]; + + FT_Short metric_Data_Format; + FT_UShort number_Of_HMetrics; + + /* The following fields are not defined by the OpenType specification */ + /* but they are used to connect the metrics header to the relevant */ + /* `hmtx' table. */ + + void* long_metrics; + void* short_metrics; + + } TT_HoriHeader; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_VertHeader */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType vertical header, the `vhea' */ + /* table, as well as the corresponding vertical metrics table, */ + /* `vmtx'. */ + /* */ + /* <Fields> */ + /* Version :: The table version. */ + /* */ + /* Ascender :: The font's ascender, i.e., the distance */ + /* from the baseline to the top-most of */ + /* all glyph points found in the font. */ + /* */ + /* This value is invalid in many fonts, as */ + /* it is usually set by the font designer, */ + /* and often reflects only a portion of */ + /* the glyphs found in the font (maybe */ + /* ASCII). */ + /* */ + /* You should use the `sTypoAscender' */ + /* field of the `OS/2' table instead if */ + /* you want the correct one. */ + /* */ + /* Descender :: The font's descender, i.e., the */ + /* distance from the baseline to the */ + /* bottom-most of all glyph points found */ + /* in the font. It is negative. */ + /* */ + /* This value is invalid in many fonts, as */ + /* it is usually set by the font designer, */ + /* and often reflects only a portion of */ + /* the glyphs found in the font (maybe */ + /* ASCII). */ + /* */ + /* You should use the `sTypoDescender' */ + /* field of the `OS/2' table instead if */ + /* you want the correct one. */ + /* */ + /* Line_Gap :: The font's line gap, i.e., the distance */ + /* to add to the ascender and descender to */ + /* get the BTB, i.e., the */ + /* baseline-to-baseline distance for the */ + /* font. */ + /* */ + /* advance_Height_Max :: This field is the maximum of all */ + /* advance heights found in the font. It */ + /* can be used to compute the maximum */ + /* height of an arbitrary string of text. */ + /* */ + /* min_Top_Side_Bearing :: The minimum top side bearing of all */ + /* glyphs within the font. */ + /* */ + /* min_Bottom_Side_Bearing :: The minimum bottom side bearing of all */ + /* glyphs within the font. */ + /* */ + /* yMax_Extent :: The maximum vertical extent (i.e., the */ + /* `height' of a glyph's bounding box) for */ + /* all glyphs in the font. */ + /* */ + /* caret_Slope_Rise :: The rise coefficient of the cursor's */ + /* slope of the cursor (slope=rise/run). */ + /* */ + /* caret_Slope_Run :: The run coefficient of the cursor's */ + /* slope. */ + /* */ + /* caret_Offset :: The cursor's offset for slanted fonts. */ + /* */ + /* Reserved :: 8~reserved bytes. */ + /* */ + /* metric_Data_Format :: Always~0. */ + /* */ + /* number_Of_VMetrics :: Number of VMetrics entries in the */ + /* `vmtx' table -- this value can be */ + /* smaller than the total number of glyphs */ + /* in the font. */ + /* */ + /* long_metrics :: A pointer into the `vmtx' table. */ + /* */ + /* short_metrics :: A pointer into the `vmtx' table. */ + /* */ + /* <Note> */ + /* For an OpenType variation font, the values of the following fields */ + /* can change after a call to @FT_Set_Var_Design_Coordinates (and */ + /* friends) if the font contains an `MVAR' table: `Ascender', */ + /* `Descender', `Line_Gap', `caret_Slope_Rise', `caret_Slope_Run', */ + /* and `caret_Offset'. */ + /* */ + typedef struct TT_VertHeader_ + { + FT_Fixed Version; + FT_Short Ascender; + FT_Short Descender; + FT_Short Line_Gap; + + FT_UShort advance_Height_Max; /* advance height maximum */ + + FT_Short min_Top_Side_Bearing; /* minimum top-sb */ + FT_Short min_Bottom_Side_Bearing; /* minimum bottom-sb */ + FT_Short yMax_Extent; /* ymax extents */ + FT_Short caret_Slope_Rise; + FT_Short caret_Slope_Run; + FT_Short caret_Offset; + + FT_Short Reserved[4]; + + FT_Short metric_Data_Format; + FT_UShort number_Of_VMetrics; + + /* The following fields are not defined by the OpenType specification */ + /* but they are used to connect the metrics header to the relevant */ + /* `vmtx' table. */ + + void* long_metrics; + void* short_metrics; + + } TT_VertHeader; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_OS2 */ + /* */ + /* <Description> */ + /* A structure to model a TrueType `OS/2' table. All fields comply */ + /* to the OpenType specification. */ + /* */ + /* Note that we now support old Mac fonts that do not include an */ + /* `OS/2' table. In this case, the `version' field is always set to */ + /* 0xFFFF. */ + /* */ + /* <Note> */ + /* For an OpenType variation font, the values of the following fields */ + /* can change after a call to @FT_Set_Var_Design_Coordinates (and */ + /* friends) if the font contains an `MVAR' table: `sCapHeight', */ + /* `sTypoAscender', `sTypoDescender', `sTypoLineGap', `sxHeight', */ + /* `usWinAscent', `usWinDescent', `yStrikeoutPosition', */ + /* `yStrikeoutSize', `ySubscriptXOffset', `ySubScriptXSize', */ + /* `ySubscriptYOffset', `ySubscriptYSize', `ySuperscriptXOffset', */ + /* `ySuperscriptXSize', `ySuperscriptYOffset', and */ + /* `ySuperscriptYSize'. */ + /* */ + /* Possible values for bits in the `ulUnicodeRangeX' fields are given */ + /* by the @TT_UCR_XXX macros. */ + /* */ + + typedef struct TT_OS2_ + { + FT_UShort version; /* 0x0001 - more or 0xFFFF */ + FT_Short xAvgCharWidth; + FT_UShort usWeightClass; + FT_UShort usWidthClass; + FT_UShort fsType; + FT_Short ySubscriptXSize; + FT_Short ySubscriptYSize; + FT_Short ySubscriptXOffset; + FT_Short ySubscriptYOffset; + FT_Short ySuperscriptXSize; + FT_Short ySuperscriptYSize; + FT_Short ySuperscriptXOffset; + FT_Short ySuperscriptYOffset; + FT_Short yStrikeoutSize; + FT_Short yStrikeoutPosition; + FT_Short sFamilyClass; + + FT_Byte panose[10]; + + FT_ULong ulUnicodeRange1; /* Bits 0-31 */ + FT_ULong ulUnicodeRange2; /* Bits 32-63 */ + FT_ULong ulUnicodeRange3; /* Bits 64-95 */ + FT_ULong ulUnicodeRange4; /* Bits 96-127 */ + + FT_Char achVendID[4]; + + FT_UShort fsSelection; + FT_UShort usFirstCharIndex; + FT_UShort usLastCharIndex; + FT_Short sTypoAscender; + FT_Short sTypoDescender; + FT_Short sTypoLineGap; + FT_UShort usWinAscent; + FT_UShort usWinDescent; + + /* only version 1 and higher: */ + + FT_ULong ulCodePageRange1; /* Bits 0-31 */ + FT_ULong ulCodePageRange2; /* Bits 32-63 */ + + /* only version 2 and higher: */ + + FT_Short sxHeight; + FT_Short sCapHeight; + FT_UShort usDefaultChar; + FT_UShort usBreakChar; + FT_UShort usMaxContext; + + /* only version 5 and higher: */ + + FT_UShort usLowerOpticalPointSize; /* in twips (1/20th points) */ + FT_UShort usUpperOpticalPointSize; /* in twips (1/20th points) */ + + } TT_OS2; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_Postscript */ + /* */ + /* <Description> */ + /* A structure to model a TrueType `post' table. All fields comply */ + /* to the OpenType specification. This structure does not reference */ + /* a font's PostScript glyph names; use @FT_Get_Glyph_Name to */ + /* retrieve them. */ + /* */ + /* <Note> */ + /* For an OpenType variation font, the values of the following fields */ + /* can change after a call to @FT_Set_Var_Design_Coordinates (and */ + /* friends) if the font contains an `MVAR' table: `underlinePosition' */ + /* and `underlineThickness'. */ + /* */ + typedef struct TT_Postscript_ + { + FT_Fixed FormatType; + FT_Fixed italicAngle; + FT_Short underlinePosition; + FT_Short underlineThickness; + FT_ULong isFixedPitch; + FT_ULong minMemType42; + FT_ULong maxMemType42; + FT_ULong minMemType1; + FT_ULong maxMemType1; + + /* Glyph names follow in the `post' table, but we don't */ + /* load them by default. */ + + } TT_Postscript; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_PCLT */ + /* */ + /* <Description> */ + /* A structure to model a TrueType `PCLT' table. All fields comply */ + /* to the OpenType specification. */ + /* */ + typedef struct TT_PCLT_ + { + FT_Fixed Version; + FT_ULong FontNumber; + FT_UShort Pitch; + FT_UShort xHeight; + FT_UShort Style; + FT_UShort TypeFamily; + FT_UShort CapHeight; + FT_UShort SymbolSet; + FT_Char TypeFace[16]; + FT_Char CharacterComplement[8]; + FT_Char FileName[6]; + FT_Char StrokeWeight; + FT_Char WidthType; + FT_Byte SerifStyle; + FT_Byte Reserved; + + } TT_PCLT; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_MaxProfile */ + /* */ + /* <Description> */ + /* The maximum profile (`maxp') table contains many max values, which */ + /* can be used to pre-allocate arrays for speeding up glyph loading */ + /* and hinting. */ + /* */ + /* <Fields> */ + /* version :: The version number. */ + /* */ + /* numGlyphs :: The number of glyphs in this TrueType */ + /* font. */ + /* */ + /* maxPoints :: The maximum number of points in a */ + /* non-composite TrueType glyph. See also */ + /* `maxCompositePoints'. */ + /* */ + /* maxContours :: The maximum number of contours in a */ + /* non-composite TrueType glyph. See also */ + /* `maxCompositeContours'. */ + /* */ + /* maxCompositePoints :: The maximum number of points in a */ + /* composite TrueType glyph. See also */ + /* `maxPoints'. */ + /* */ + /* maxCompositeContours :: The maximum number of contours in a */ + /* composite TrueType glyph. See also */ + /* `maxContours'. */ + /* */ + /* maxZones :: The maximum number of zones used for */ + /* glyph hinting. */ + /* */ + /* maxTwilightPoints :: The maximum number of points in the */ + /* twilight zone used for glyph hinting. */ + /* */ + /* maxStorage :: The maximum number of elements in the */ + /* storage area used for glyph hinting. */ + /* */ + /* maxFunctionDefs :: The maximum number of function */ + /* definitions in the TrueType bytecode for */ + /* this font. */ + /* */ + /* maxInstructionDefs :: The maximum number of instruction */ + /* definitions in the TrueType bytecode for */ + /* this font. */ + /* */ + /* maxStackElements :: The maximum number of stack elements used */ + /* during bytecode interpretation. */ + /* */ + /* maxSizeOfInstructions :: The maximum number of TrueType opcodes */ + /* used for glyph hinting. */ + /* */ + /* maxComponentElements :: The maximum number of simple (i.e., non- */ + /* composite) glyphs in a composite glyph. */ + /* */ + /* maxComponentDepth :: The maximum nesting depth of composite */ + /* glyphs. */ + /* */ + /* <Note> */ + /* This structure is only used during font loading. */ + /* */ + typedef struct TT_MaxProfile_ + { + FT_Fixed version; + FT_UShort numGlyphs; + FT_UShort maxPoints; + FT_UShort maxContours; + FT_UShort maxCompositePoints; + FT_UShort maxCompositeContours; + FT_UShort maxZones; + FT_UShort maxTwilightPoints; + FT_UShort maxStorage; + FT_UShort maxFunctionDefs; + FT_UShort maxInstructionDefs; + FT_UShort maxStackElements; + FT_UShort maxSizeOfInstructions; + FT_UShort maxComponentElements; + FT_UShort maxComponentDepth; + + } TT_MaxProfile; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Sfnt_Tag */ + /* */ + /* <Description> */ + /* An enumeration to specify indices of SFNT tables loaded and parsed */ + /* by FreeType during initialization of an SFNT font. Used in the */ + /* @FT_Get_Sfnt_Table API function. */ + /* */ + /* <Values> */ + /* FT_SFNT_HEAD :: To access the font's @TT_Header structure. */ + /* */ + /* FT_SFNT_MAXP :: To access the font's @TT_MaxProfile structure. */ + /* */ + /* FT_SFNT_OS2 :: To access the font's @TT_OS2 structure. */ + /* */ + /* FT_SFNT_HHEA :: To access the font's @TT_HoriHeader structure. */ + /* */ + /* FT_SFNT_VHEA :: To access the font's @TT_VertHeader structure. */ + /* */ + /* FT_SFNT_POST :: To access the font's @TT_Postscript structure. */ + /* */ + /* FT_SFNT_PCLT :: To access the font's @TT_PCLT structure. */ + /* */ + typedef enum FT_Sfnt_Tag_ + { + FT_SFNT_HEAD, + FT_SFNT_MAXP, + FT_SFNT_OS2, + FT_SFNT_HHEA, + FT_SFNT_VHEA, + FT_SFNT_POST, + FT_SFNT_PCLT, + + FT_SFNT_MAX + + } FT_Sfnt_Tag; + + /* these constants are deprecated; use the corresponding `FT_Sfnt_Tag' */ + /* values instead */ +#define ft_sfnt_head FT_SFNT_HEAD +#define ft_sfnt_maxp FT_SFNT_MAXP +#define ft_sfnt_os2 FT_SFNT_OS2 +#define ft_sfnt_hhea FT_SFNT_HHEA +#define ft_sfnt_vhea FT_SFNT_VHEA +#define ft_sfnt_post FT_SFNT_POST +#define ft_sfnt_pclt FT_SFNT_PCLT + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Sfnt_Table */ + /* */ + /* <Description> */ + /* Return a pointer to a given SFNT table stored within a face. */ + /* */ + /* <Input> */ + /* face :: A handle to the source. */ + /* */ + /* tag :: The index of the SFNT table. */ + /* */ + /* <Return> */ + /* A type-less pointer to the table. This will be NULL in case of */ + /* error, or if the corresponding table was not found *OR* loaded */ + /* from the file. */ + /* */ + /* Use a typecast according to `tag' to access the structure */ + /* elements. */ + /* */ + /* <Note> */ + /* The table is owned by the face object and disappears with it. */ + /* */ + /* This function is only useful to access SFNT tables that are loaded */ + /* by the sfnt, truetype, and opentype drivers. See @FT_Sfnt_Tag for */ + /* a list. */ + /* */ + /* Here an example how to access the `vhea' table: */ + /* */ + /* { */ + /* TT_VertHeader* vert_header; */ + /* */ + /* */ + /* vert_header = */ + /* (TT_VertHeader*)FT_Get_Sfnt_Table( face, FT_SFNT_VHEA ); */ + /* } */ + /* */ + FT_EXPORT( void* ) + FT_Get_Sfnt_Table( FT_Face face, + FT_Sfnt_Tag tag ); + + + /************************************************************************** + * + * @function: + * FT_Load_Sfnt_Table + * + * @description: + * Load any SFNT font table into client memory. + * + * @input: + * face :: + * A handle to the source face. + * + * tag :: + * The four-byte tag of the table to load. Use value~0 if you want + * to access the whole font file. Otherwise, you can use one of the + * definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new + * one with @FT_MAKE_TAG. + * + * offset :: + * The starting offset in the table (or file if tag~==~0). + * + * @output: + * buffer :: + * The target buffer address. The client must ensure that the memory + * array is big enough to hold the data. + * + * @inout: + * length :: + * If the `length' parameter is NULL, try to load the whole table. + * Return an error code if it fails. + * + * Else, if `*length' is~0, exit immediately while returning the + * table's (or file) full size in it. + * + * Else the number of bytes to read from the table or file, from the + * starting offset. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If you need to determine the table's length you should first call this + * function with `*length' set to~0, as in the following example: + * + * { + * FT_ULong length = 0; + * + * + * error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length ); + * if ( error ) { ... table does not exist ... } + * + * buffer = malloc( length ); + * if ( buffer == NULL ) { ... not enough memory ... } + * + * error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length ); + * if ( error ) { ... could not load table ... } + * } + * + * Note that structures like @TT_Header or @TT_OS2 can't be used with + * this function; they are limited to @FT_Get_Sfnt_Table. Reason is that + * those structures depend on the processor architecture, with varying + * size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian). + * + */ + FT_EXPORT( FT_Error ) + FT_Load_Sfnt_Table( FT_Face face, + FT_ULong tag, + FT_Long offset, + FT_Byte* buffer, + FT_ULong* length ); + + + /************************************************************************** + * + * @function: + * FT_Sfnt_Table_Info + * + * @description: + * Return information on an SFNT table. + * + * @input: + * face :: + * A handle to the source face. + * + * table_index :: + * The index of an SFNT table. The function returns + * FT_Err_Table_Missing for an invalid value. + * + * @inout: + * tag :: + * The name tag of the SFNT table. If the value is NULL, `table_index' + * is ignored, and `length' returns the number of SFNT tables in the + * font. + * + * @output: + * length :: + * The length of the SFNT table (or the number of SFNT tables, depending + * on `tag'). + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * While parsing fonts, FreeType handles SFNT tables with length zero as + * missing. + * + */ + FT_EXPORT( FT_Error ) + FT_Sfnt_Table_Info( FT_Face face, + FT_UInt table_index, + FT_ULong *tag, + FT_ULong *length ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_CMap_Language_ID */ + /* */ + /* <Description> */ + /* Return cmap language ID as specified in the OpenType standard. */ + /* Definitions of language ID values are in file @FT_TRUETYPE_IDS_H. */ + /* */ + /* <Input> */ + /* charmap :: */ + /* The target charmap. */ + /* */ + /* <Return> */ + /* The language ID of `charmap'. If `charmap' doesn't belong to an */ + /* SFNT face, just return~0 as the default value. */ + /* */ + /* For a format~14 cmap (to access Unicode IVS), the return value is */ + /* 0xFFFFFFFF. */ + /* */ + FT_EXPORT( FT_ULong ) + FT_Get_CMap_Language_ID( FT_CharMap charmap ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_CMap_Format */ + /* */ + /* <Description> */ + /* Return the format of an SFNT `cmap' table. */ + /* */ + /* <Input> */ + /* charmap :: */ + /* The target charmap. */ + /* */ + /* <Return> */ + /* The format of `charmap'. If `charmap' doesn't belong to an SFNT */ + /* face, return -1. */ + /* */ + FT_EXPORT( FT_Long ) + FT_Get_CMap_Format( FT_CharMap charmap ); + + /* */ + + +FT_END_HEADER + +#endif /* TTTABLES_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/tttags.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/tttags.h new file mode 100755 index 00000000..e5cee68a --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/freetype/tttags.h @@ -0,0 +1,121 @@ +/***************************************************************************/ +/* */ +/* tttags.h */ +/* */ +/* Tags for TrueType and OpenType tables (specification only). */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef TTAGS_H_ +#define TTAGS_H_ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + +#define TTAG_avar FT_MAKE_TAG( 'a', 'v', 'a', 'r' ) +#define TTAG_BASE FT_MAKE_TAG( 'B', 'A', 'S', 'E' ) +#define TTAG_bdat FT_MAKE_TAG( 'b', 'd', 'a', 't' ) +#define TTAG_BDF FT_MAKE_TAG( 'B', 'D', 'F', ' ' ) +#define TTAG_bhed FT_MAKE_TAG( 'b', 'h', 'e', 'd' ) +#define TTAG_bloc FT_MAKE_TAG( 'b', 'l', 'o', 'c' ) +#define TTAG_bsln FT_MAKE_TAG( 'b', 's', 'l', 'n' ) +#define TTAG_CBDT FT_MAKE_TAG( 'C', 'B', 'D', 'T' ) +#define TTAG_CBLC FT_MAKE_TAG( 'C', 'B', 'L', 'C' ) +#define TTAG_CFF FT_MAKE_TAG( 'C', 'F', 'F', ' ' ) +#define TTAG_CFF2 FT_MAKE_TAG( 'C', 'F', 'F', '2' ) +#define TTAG_CID FT_MAKE_TAG( 'C', 'I', 'D', ' ' ) +#define TTAG_cmap FT_MAKE_TAG( 'c', 'm', 'a', 'p' ) +#define TTAG_cvar FT_MAKE_TAG( 'c', 'v', 'a', 'r' ) +#define TTAG_cvt FT_MAKE_TAG( 'c', 'v', 't', ' ' ) +#define TTAG_DSIG FT_MAKE_TAG( 'D', 'S', 'I', 'G' ) +#define TTAG_EBDT FT_MAKE_TAG( 'E', 'B', 'D', 'T' ) +#define TTAG_EBLC FT_MAKE_TAG( 'E', 'B', 'L', 'C' ) +#define TTAG_EBSC FT_MAKE_TAG( 'E', 'B', 'S', 'C' ) +#define TTAG_feat FT_MAKE_TAG( 'f', 'e', 'a', 't' ) +#define TTAG_FOND FT_MAKE_TAG( 'F', 'O', 'N', 'D' ) +#define TTAG_fpgm FT_MAKE_TAG( 'f', 'p', 'g', 'm' ) +#define TTAG_fvar FT_MAKE_TAG( 'f', 'v', 'a', 'r' ) +#define TTAG_gasp FT_MAKE_TAG( 'g', 'a', 's', 'p' ) +#define TTAG_GDEF FT_MAKE_TAG( 'G', 'D', 'E', 'F' ) +#define TTAG_glyf FT_MAKE_TAG( 'g', 'l', 'y', 'f' ) +#define TTAG_GPOS FT_MAKE_TAG( 'G', 'P', 'O', 'S' ) +#define TTAG_GSUB FT_MAKE_TAG( 'G', 'S', 'U', 'B' ) +#define TTAG_gvar FT_MAKE_TAG( 'g', 'v', 'a', 'r' ) +#define TTAG_HVAR FT_MAKE_TAG( 'H', 'V', 'A', 'R' ) +#define TTAG_hdmx FT_MAKE_TAG( 'h', 'd', 'm', 'x' ) +#define TTAG_head FT_MAKE_TAG( 'h', 'e', 'a', 'd' ) +#define TTAG_hhea FT_MAKE_TAG( 'h', 'h', 'e', 'a' ) +#define TTAG_hmtx FT_MAKE_TAG( 'h', 'm', 't', 'x' ) +#define TTAG_JSTF FT_MAKE_TAG( 'J', 'S', 'T', 'F' ) +#define TTAG_just FT_MAKE_TAG( 'j', 'u', 's', 't' ) +#define TTAG_kern FT_MAKE_TAG( 'k', 'e', 'r', 'n' ) +#define TTAG_lcar FT_MAKE_TAG( 'l', 'c', 'a', 'r' ) +#define TTAG_loca FT_MAKE_TAG( 'l', 'o', 'c', 'a' ) +#define TTAG_LTSH FT_MAKE_TAG( 'L', 'T', 'S', 'H' ) +#define TTAG_LWFN FT_MAKE_TAG( 'L', 'W', 'F', 'N' ) +#define TTAG_MATH FT_MAKE_TAG( 'M', 'A', 'T', 'H' ) +#define TTAG_maxp FT_MAKE_TAG( 'm', 'a', 'x', 'p' ) +#define TTAG_META FT_MAKE_TAG( 'M', 'E', 'T', 'A' ) +#define TTAG_MMFX FT_MAKE_TAG( 'M', 'M', 'F', 'X' ) +#define TTAG_MMSD FT_MAKE_TAG( 'M', 'M', 'S', 'D' ) +#define TTAG_mort FT_MAKE_TAG( 'm', 'o', 'r', 't' ) +#define TTAG_morx FT_MAKE_TAG( 'm', 'o', 'r', 'x' ) +#define TTAG_MVAR FT_MAKE_TAG( 'M', 'V', 'A', 'R' ) +#define TTAG_name FT_MAKE_TAG( 'n', 'a', 'm', 'e' ) +#define TTAG_opbd FT_MAKE_TAG( 'o', 'p', 'b', 'd' ) +#define TTAG_OS2 FT_MAKE_TAG( 'O', 'S', '/', '2' ) +#define TTAG_OTTO FT_MAKE_TAG( 'O', 'T', 'T', 'O' ) +#define TTAG_PCLT FT_MAKE_TAG( 'P', 'C', 'L', 'T' ) +#define TTAG_POST FT_MAKE_TAG( 'P', 'O', 'S', 'T' ) +#define TTAG_post FT_MAKE_TAG( 'p', 'o', 's', 't' ) +#define TTAG_prep FT_MAKE_TAG( 'p', 'r', 'e', 'p' ) +#define TTAG_prop FT_MAKE_TAG( 'p', 'r', 'o', 'p' ) +#define TTAG_sbix FT_MAKE_TAG( 's', 'b', 'i', 'x' ) +#define TTAG_sfnt FT_MAKE_TAG( 's', 'f', 'n', 't' ) +#define TTAG_SING FT_MAKE_TAG( 'S', 'I', 'N', 'G' ) +#define TTAG_trak FT_MAKE_TAG( 't', 'r', 'a', 'k' ) +#define TTAG_true FT_MAKE_TAG( 't', 'r', 'u', 'e' ) +#define TTAG_ttc FT_MAKE_TAG( 't', 't', 'c', ' ' ) +#define TTAG_ttcf FT_MAKE_TAG( 't', 't', 'c', 'f' ) +#define TTAG_TYP1 FT_MAKE_TAG( 'T', 'Y', 'P', '1' ) +#define TTAG_typ1 FT_MAKE_TAG( 't', 'y', 'p', '1' ) +#define TTAG_VDMX FT_MAKE_TAG( 'V', 'D', 'M', 'X' ) +#define TTAG_vhea FT_MAKE_TAG( 'v', 'h', 'e', 'a' ) +#define TTAG_vmtx FT_MAKE_TAG( 'v', 'm', 't', 'x' ) +#define TTAG_VVAR FT_MAKE_TAG( 'V', 'V', 'A', 'R' ) +#define TTAG_wOFF FT_MAKE_TAG( 'w', 'O', 'F', 'F' ) + +/* used by "Keyboard.dfont" on legacy Mac OS X */ +#define TTAG_0xA5kbd FT_MAKE_TAG( 0xA5, 'k', 'b', 'd' ) + +/* used by "LastResort.dfont" on legacy Mac OS X */ +#define TTAG_0xA5lst FT_MAKE_TAG( 0xA5, 'l', 's', 't' ) + + +FT_END_HEADER + +#endif /* TTAGS_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/ft2build.h b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/ft2build.h new file mode 100755 index 00000000..e7ce99bc --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/include/freetype2/ft2build.h @@ -0,0 +1,42 @@ +/***************************************************************************/ +/* */ +/* ft2build.h */ +/* */ +/* FreeType 2 build and setup macros. */ +/* */ +/* Copyright 1996-2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This is the `entry point' for FreeType header file inclusions. It is */ + /* the only header file which should be included directly; all other */ + /* FreeType header files should be accessed with macro names (after */ + /* including `ft2build.h'). */ + /* */ + /* A typical example is */ + /* */ + /* #include <ft2build.h> */ + /* #include FT_FREETYPE_H */ + /* */ + /*************************************************************************/ + + +#ifndef FT2BUILD_H_ +#define FT2BUILD_H_ + +#include <freetype/config/ftheader.h> + +#endif /* FT2BUILD_H_ */ + + +/* END */ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/lib/libfreetype.6.dylib b/frameworks/cairosvg/dependencies/freetype/2.9.1/lib/libfreetype.6.dylib new file mode 100755 index 00000000..d81b2811 Binary files /dev/null and b/frameworks/cairosvg/dependencies/freetype/2.9.1/lib/libfreetype.6.dylib differ diff --git a/frameworks/cairosvg/dependencies/freetype/2.9.1/lib/libfreetype.dylib b/frameworks/cairosvg/dependencies/freetype/2.9.1/lib/libfreetype.dylib new file mode 120000 index 00000000..c1597ade --- /dev/null +++ b/frameworks/cairosvg/dependencies/freetype/2.9.1/lib/libfreetype.dylib @@ -0,0 +1 @@ +libfreetype.6.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-arabic.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-arabic.h new file mode 100755 index 00000000..ea82c68a --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-arabic.h @@ -0,0 +1,81 @@ +/* fribidi-arabic.h - do Arabic shaping to presentation forms + * + * Copyright (C) 2005 Behdad Esfahbod + * + * This file is part of GNU FriBidi. + * + * GNU FriBidi is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * GNU FriBidi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GNU FriBidi; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * For licensing issues, contact <fribidi.license@gmail.com> or write to + * Sharif FarsiWeb, Inc., PO Box 13445-389, Tehran, Iran. + * + * Author(s): + * Behdad Esfahbod, 2005 + */ +#ifndef _FRIBIDI_ARABIC_H +#define _FRIBIDI_ARABIC_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" +#include "fribidi-flags.h" +#include "fribidi-bidi-types.h" +#include "fribidi-joining.h" + +#include "fribidi-begindecls.h" + + +/* fribidi_shape_arabic - do Arabic shaping + * + * The actual shaping that is done depends on the flags set. Only flags + * starting with FRIBIDI_FLAG_SHAPE_ARAB_ affect this function. + * Currently these are: + * + * * FRIBIDI_FLAG_SHAPE_MIRRORING: Do mirroring. + * * FRIBIDI_FLAG_SHAPE_ARAB_PRES: Shape Arabic characters to their + * presentation form glyphs. + * * FRIBIDI_FLAG_SHAPE_ARAB_LIGA: Form mandatory Arabic ligatures. + * * FRIBIDI_FLAG_SHAPE_ARAB_CONSOLE: Perform additional Arabic shaping + * suitable for text rendered on + * grid terminals with no mark + * rendering capabilities. + * + * Of the above, FRIBIDI_FLAG_SHAPE_ARAB_CONSOLE is only used in special + * cases, but the rest are recommended in any environment that doesn't have + * other means for doing Arabic shaping. The set of extra flags that enable + * this level of Arabic support has a shortcut named FRIBIDI_FLAGS_ARABIC. + */ +FRIBIDI_ENTRY void +fribidi_shape_arabic ( + FriBidiFlags flags, /* shaping flags */ + const FriBidiLevel *embedding_levels, + const FriBidiStrIndex len, /* input string length */ + FriBidiArabicProp *ar_props, /* input/output Arabic properties as + * computed by fribidi_join_arabic */ + FriBidiChar *str /* string to shape */ +); + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_ARABIC_H */ +/* Editor directions: + * Local Variables: + * mode: c + * c-basic-offset: 2 + * indent-tabs-mode: t + * tab-width: 8 + * End: + * vim: textwidth=78: autoindent: cindent: shiftwidth=2: tabstop=8: + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-begindecls.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-begindecls.h new file mode 100755 index 00000000..0f4acdd1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-begindecls.h @@ -0,0 +1,3 @@ +#ifdef FRIBIDI_BEGIN_DECLS +FRIBIDI_BEGIN_DECLS +#endif /* FRIBIDI_BEGIN_DECLS */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-bidi-types-list.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-bidi-types-list.h new file mode 100755 index 00000000..c4ffc6f1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-bidi-types-list.h @@ -0,0 +1,96 @@ +#ifndef __FRIBIDI_DOC +/* FriBidi + * fribidi-bidi-types-list.h - list of bidi types + * + * Author: + * Behdad Esfahbod, 2001, 2002, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc. + * Copyright (C) 2001,2002 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +/* *INDENT-OFF* */ +#endif /* !__FRIBIDI_DOC */ +#ifndef _FRIBIDI_ADD_TYPE +# define _FRIBIDI_ADD_TYPE(x,y) +#endif +#ifndef _FRIBIDI_ADD_ALIAS +# define _FRIBIDI_ADD_ALIAS(x1,x2) +#endif + +#if !defined(_FRIBIDI_PAR_TYPES) || defined(_FRIBIDI_ALL_TYPES) + +_FRIBIDI_ADD_TYPE (LTR, 'L') /* Left-To-Right letter */ +_FRIBIDI_ADD_TYPE (RTL, 'R') /* Right-To-Left letter */ +_FRIBIDI_ADD_TYPE (AL, 'A') /* Arabic Letter */ +_FRIBIDI_ADD_TYPE (EN, '1') /* European Numeral */ +_FRIBIDI_ADD_TYPE (AN, '9') /* Arabic Numeral */ +_FRIBIDI_ADD_TYPE (ES, 'w') /* European number Separator */ +_FRIBIDI_ADD_TYPE (ET, 'w') /* European number Terminator */ +_FRIBIDI_ADD_TYPE (CS, 'w') /* Common Separator */ +_FRIBIDI_ADD_TYPE (NSM, '`') /* Non Spacing Mark */ +_FRIBIDI_ADD_TYPE (BN, 'b') /* Boundary Neutral */ +_FRIBIDI_ADD_TYPE (BS, 'B') /* Block Separator */ +_FRIBIDI_ADD_TYPE (SS, 'S') /* Segment Separator */ +_FRIBIDI_ADD_TYPE (WS, '_') /* WhiteSpace */ +_FRIBIDI_ADD_TYPE (ON, 'n') /* Other Neutral */ +_FRIBIDI_ADD_TYPE (LRE, '+') /* Left-to-Right Embedding */ +_FRIBIDI_ADD_TYPE (RLE, '+') /* Right-to-Left Embedding */ +_FRIBIDI_ADD_TYPE (LRO, '+') /* Left-to-Right Override */ +_FRIBIDI_ADD_TYPE (RLO, '+') /* Right-to-Left Override */ +_FRIBIDI_ADD_TYPE (PDF, '-') /* Pop Directional Flag */ +_FRIBIDI_ADD_TYPE (LRI, '+') /* Left-to-Right Isolate */ +_FRIBIDI_ADD_TYPE (RLI, '+') /* Right-to-Left Isolate */ +_FRIBIDI_ADD_TYPE (FSI, '+') /* First-Strong Isolate */ +_FRIBIDI_ADD_TYPE (PDI, '-') /* Pop Directional Isolate */ + +#if defined(_FRIBIDI_ADD_ALIAS) +_FRIBIDI_ADD_ALIAS (L, LTR) +_FRIBIDI_ADD_ALIAS (R, RTL) +_FRIBIDI_ADD_ALIAS (B, BS) +_FRIBIDI_ADD_ALIAS (S, SS) +#endif /* _FRIBIDI_ADD_ALIAS */ + +#if defined(_FRIBIDI_SENTINEL_TYPE) || defined(_FRIBIDI_ALL_TYPES) +_FRIBIDI_ADD_TYPE (SENTINEL, '$') /* SENTINEL */ +#endif /* _FRIBIDI_SENTINEL_TYPES || _FRIBIDI_ALL_TYPES*/ +#endif /* !_FRIBIDI_PAR_TYPES || _FRIBIDI_ALL_TYPES */ + +#if defined(_FRIBIDI_PAR_TYPES) || defined(_FRIBIDI_ALL_TYPES) +# if !defined(_FRIBIDI_ALL_TYPES) +_FRIBIDI_ADD_TYPE (LTR, 'L') /* Left-To-Right paragraph */ +_FRIBIDI_ADD_TYPE (RTL, 'R') /* Right-To-Left paragraph */ +_FRIBIDI_ADD_TYPE (ON, 'n') /* directiOn-Neutral paragraph */ +# endif /* !_FRIBIDI_ALL_TYPES */ +_FRIBIDI_ADD_TYPE (WLTR, 'l') /* Weak Left To Right paragraph */ +_FRIBIDI_ADD_TYPE (WRTL, 'r') /* Weak Right To Left paragraph */ +#endif /* _FRIBIDI_PAR_TYPES || _FRIBIDI_ALL_TYPES*/ + +#if defined(_FRIBIDI_ENUM_TYPES) +typedef enum { +# define _FRIBIDI_ADD_TYPE _FRIBIDI_ENUM_ADD_TYPE +# include "fribidi-bidi-types-list.h" +# undef _FRIBIDI_ADD_TYPE + _FRIBIDI_TYPES_MAX +} _FRIBIDI_ENUM_TYPES +#endif /* _FRIBIDI_ENUM_TYPES */ + +#ifndef __FRIBIDI_DOC +/* *INDENT-ON* */ +#endif /* !__FRIBIDI_DOC */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-bidi-types.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-bidi-types.h new file mode 100755 index 00000000..db947a56 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-bidi-types.h @@ -0,0 +1,405 @@ +/* FriBidi + * fribidi-bidi-types.h - character bidi types + * + * Author: + * Behdad Esfahbod, 2001, 2002, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc. + * Copyright (C) 2001,2002 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_BIDI_TYPES_H +#define _FRIBIDI_BIDI_TYPES_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" + +#include "fribidi-begindecls.h" + +typedef signed char FriBidiLevel; + +/* + * Define bit masks that bidi types are based on, each mask has + * only one bit set. + */ + +/* RTL mask better be the least significant bit. */ +#define FRIBIDI_MASK_RTL 0x00000001L /* Is right to left */ +#define FRIBIDI_MASK_ARABIC 0x00000002L /* Is arabic */ + +/* Each char can be only one of the three following. */ +#define FRIBIDI_MASK_STRONG 0x00000010L /* Is strong */ +#define FRIBIDI_MASK_WEAK 0x00000020L /* Is weak */ +#define FRIBIDI_MASK_NEUTRAL 0x00000040L /* Is neutral */ +#define FRIBIDI_MASK_SENTINEL 0x00000080L /* Is sentinel */ +/* Sentinels are not valid chars, just identify the start/end of strings. */ + +/* Each char can be only one of the six following. */ +#define FRIBIDI_MASK_LETTER 0x00000100L /* Is letter: L, R, AL */ +#define FRIBIDI_MASK_NUMBER 0x00000200L /* Is number: EN, AN */ +#define FRIBIDI_MASK_NUMSEPTER 0x00000400L /* Is separator or terminator: ES, ET, CS */ +#define FRIBIDI_MASK_SPACE 0x00000800L /* Is space: BN, BS, SS, WS */ +#define FRIBIDI_MASK_EXPLICIT 0x00001000L /* Is explicit mark: LRE, RLE, LRO, RLO, PDF */ +#define FRIBIDI_MASK_ISOLATE 0x00008000L /* Is isolate mark: LRI, RLI, FSI, PDI */ + +/* Can be set only if FRIBIDI_MASK_SPACE is also set. */ +#define FRIBIDI_MASK_SEPARATOR 0x00002000L /* Is text separator: BS, SS */ +/* Can be set only if FRIBIDI_MASK_EXPLICIT is also set. */ +#define FRIBIDI_MASK_OVERRIDE 0x00004000L /* Is explicit override: LRO, RLO */ +#define FRIBIDI_MASK_FIRST 0x02000000L /* Whether direction is determined by first strong */ + + +/* The following exist to make types pairwise different, some of them can + * be removed but are here because of efficiency (make queries faster). */ + +#define FRIBIDI_MASK_ES 0x00010000L +#define FRIBIDI_MASK_ET 0x00020000L +#define FRIBIDI_MASK_CS 0x00040000L + +#define FRIBIDI_MASK_NSM 0x00080000L +#define FRIBIDI_MASK_BN 0x00100000L + +#define FRIBIDI_MASK_BS 0x00200000L +#define FRIBIDI_MASK_SS 0x00400000L +#define FRIBIDI_MASK_WS 0x00800000L + +/* We reserve a single bit for user's private use: we will never use it. */ +#define FRIBIDI_MASK_PRIVATE 0x01000000L + + +/* + * Define values for FriBidiCharType + */ + +/* Strong types */ + +/* Left-To-Right letter */ +#define FRIBIDI_TYPE_LTR_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER ) +/* Right-To-Left letter */ +#define FRIBIDI_TYPE_RTL_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER \ + | FRIBIDI_MASK_RTL) +/* Arabic Letter */ +#define FRIBIDI_TYPE_AL_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER \ + | FRIBIDI_MASK_RTL | FRIBIDI_MASK_ARABIC ) +/* Left-to-Right Embedding */ +#define FRIBIDI_TYPE_LRE_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT) +/* Right-to-Left Embedding */ +#define FRIBIDI_TYPE_RLE_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT \ + | FRIBIDI_MASK_RTL ) +/* Left-to-Right Override */ +#define FRIBIDI_TYPE_LRO_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT \ + | FRIBIDI_MASK_OVERRIDE ) +/* Right-to-Left Override */ +#define FRIBIDI_TYPE_RLO_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT \ + | FRIBIDI_MASK_RTL | FRIBIDI_MASK_OVERRIDE ) + +/* Weak types */ + +/* Pop Directional Flag*/ +#define FRIBIDI_TYPE_PDF_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_EXPLICIT ) +/* European Numeral */ +#define FRIBIDI_TYPE_EN_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMBER ) +/* Arabic Numeral */ +#define FRIBIDI_TYPE_AN_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMBER \ + | FRIBIDI_MASK_ARABIC ) +/* European number Separator */ +#define FRIBIDI_TYPE_ES_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMSEPTER \ + | FRIBIDI_MASK_ES ) +/* European number Terminator */ +#define FRIBIDI_TYPE_ET_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMSEPTER \ + | FRIBIDI_MASK_ET ) +/* Common Separator */ +#define FRIBIDI_TYPE_CS_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMSEPTER \ + | FRIBIDI_MASK_CS ) +/* Non Spacing Mark */ +#define FRIBIDI_TYPE_NSM_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NSM ) +/* Boundary Neutral */ +#define FRIBIDI_TYPE_BN_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_SPACE \ + | FRIBIDI_MASK_BN ) + +/* Neutral types */ + +/* Block Separator */ +#define FRIBIDI_TYPE_BS_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_SPACE \ + | FRIBIDI_MASK_SEPARATOR | FRIBIDI_MASK_BS ) +/* Segment Separator */ +#define FRIBIDI_TYPE_SS_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_SPACE \ + | FRIBIDI_MASK_SEPARATOR | FRIBIDI_MASK_SS ) +/* WhiteSpace */ +#define FRIBIDI_TYPE_WS_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_SPACE \ + | FRIBIDI_MASK_WS ) +/* Other Neutral */ +#define FRIBIDI_TYPE_ON_VAL ( FRIBIDI_MASK_NEUTRAL ) + + +/* The following are used in specifying paragraph direction only. */ + +/* Weak Left-To-Right */ +#define FRIBIDI_TYPE_WLTR_VAL ( FRIBIDI_MASK_WEAK ) +/* Weak Right-To-Left */ +#define FRIBIDI_TYPE_WRTL_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_RTL ) + +/* start or end of text (run list) SENTINEL. Only used internally */ +#define FRIBIDI_TYPE_SENTINEL ( FRIBIDI_MASK_SENTINEL ) + +/* Private types for applications. More private types can be obtained by + * summing up from this one. */ +#define FRIBIDI_TYPE_PRIVATE ( FRIBIDI_MASK_PRIVATE ) + + +/* New types in Unicode 6.3 */ + +/* Left-to-Right Isolate */ +#define FRIBIDI_TYPE_LRI_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_ISOLATE ) +/* Right-to-Left Isolate */ +#define FRIBIDI_TYPE_RLI_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_ISOLATE | FRIBIDI_MASK_RTL ) +/* First strong isolate */ +#define FRIBIDI_TYPE_FSI_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_ISOLATE | FRIBIDI_MASK_FIRST ) + +/* Pop Directional Isolate*/ +#define FRIBIDI_TYPE_PDI_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_WEAK | FRIBIDI_MASK_ISOLATE ) + +/* Define Enums only if sizeof(int) == 4 (UTF-32), and not compiling C++. + * The problem with C++ is that then casts between int32 and enum will fail! + */ +#if defined(__FRIBIDI_DOC) || (FRIBIDI_SIZEOF_INT+0 == 4 && !defined(__cplusplus)) + +typedef enum +{ +# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) \ + FRIBIDI_TYPE_##TYPE = FRIBIDI_TYPE_##TYPE##_VAL, +# include "fribidi-bidi-types-list.h" +# undef _FRIBIDI_ADD_TYPE + _FRIBIDI_TYPE_SENTINEL = FRIBIDI_TYPE_SENTINEL /* Don't use this */ +} FriBidiCharType; + +typedef enum +{ +# define _FRIBIDI_PAR_TYPES +# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) \ + FRIBIDI_PAR_##TYPE = FRIBIDI_TYPE_##TYPE##_VAL, +# include "fribidi-bidi-types-list.h" +# undef _FRIBIDI_ADD_TYPE +# undef _FRIBIDI_PAR_TYPES + _FRIBIDI_PAR_SENTINEL = FRIBIDI_TYPE_SENTINEL /* Don't use this */ +} FriBidiParType; + +#else + +typedef uint32_t FriBidiCharType; +# define FRIBIDI_TYPE_LTR FRIBIDI_TYPE_LTR_VAL +# define FRIBIDI_TYPE_RTL FRIBIDI_TYPE_RTL_VAL +# define FRIBIDI_TYPE_AL FRIBIDI_TYPE_AL_VAL +# define FRIBIDI_TYPE_EN FRIBIDI_TYPE_EN_VAL +# define FRIBIDI_TYPE_AN FRIBIDI_TYPE_AN_VAL +# define FRIBIDI_TYPE_ES FRIBIDI_TYPE_ES_VAL +# define FRIBIDI_TYPE_ET FRIBIDI_TYPE_ET_VAL +# define FRIBIDI_TYPE_CS FRIBIDI_TYPE_CS_VAL +# define FRIBIDI_TYPE_NSM FRIBIDI_TYPE_NSM_VAL +# define FRIBIDI_TYPE_BN FRIBIDI_TYPE_BN_VAL +# define FRIBIDI_TYPE_BS FRIBIDI_TYPE_BS_VAL +# define FRIBIDI_TYPE_SS FRIBIDI_TYPE_SS_VAL +# define FRIBIDI_TYPE_WS FRIBIDI_TYPE_WS_VAL +# define FRIBIDI_TYPE_ON FRIBIDI_TYPE_ON_VAL +# define FRIBIDI_TYPE_LRE FRIBIDI_TYPE_LRE_VAL +# define FRIBIDI_TYPE_RLE FRIBIDI_TYPE_RLE_VAL +# define FRIBIDI_TYPE_LRO FRIBIDI_TYPE_LRO_VAL +# define FRIBIDI_TYPE_RLO FRIBIDI_TYPE_RLO_VAL +# define FRIBIDI_TYPE_PDF FRIBIDI_TYPE_PDF_VAL +# define FRIBIDI_TYPE_LRI FRIBIDI_TYPE_PDF_LRI +# define FRIBIDI_TYPE_RLI FRIBIDI_TYPE_PDF_RLI +# define FRIBIDI_TYPE_FSI FRIBIDI_TYPE_PDF_FSI +# define FRIBIDI_TYPE_PDI FRIBIDI_TYPE_PDF_PDI + +typedef uint32_t FriBidiParType; +# define FRIBIDI_PAR_LTR FRIBIDI_TYPE_LTR_VAL +# define FRIBIDI_PAR_RTL FRIBIDI_TYPE_RTL_VAL +# define FRIBIDI_PAR_ON FRIBIDI_TYPE_ON_VAL +# define FRIBIDI_PAR_WLTR FRIBIDI_TYPE_WLTR_VAL +# define FRIBIDI_PAR_WRTL FRIBIDI_TYPE_WRTL_VAL + +#endif + +/* Please don't use these two type names, use FRIBIDI_PAR_* form instead. */ +#define FRIBIDI_TYPE_WLTR FRIBIDI_PAR_WLTR +#define FRIBIDI_TYPE_WRTL FRIBIDI_PAR_WRTL + + +/* + * Defining macros for needed queries, It is fully dependent on the + * implementation of FriBidiCharType. + */ + + +/* Is right-to-left level? */ +#define FRIBIDI_LEVEL_IS_RTL(lev) ((lev) & 1) + +/* Return the bidi type corresponding to the direction of the level number, + FRIBIDI_TYPE_LTR for evens and FRIBIDI_TYPE_RTL for odds. */ +#define FRIBIDI_LEVEL_TO_DIR(lev) \ + (FRIBIDI_LEVEL_IS_RTL (lev) ? FRIBIDI_TYPE_RTL : FRIBIDI_TYPE_LTR) + +/* Return the minimum level of the direction, 0 for FRIBIDI_TYPE_LTR and + 1 for FRIBIDI_TYPE_RTL and FRIBIDI_TYPE_AL. */ +#define FRIBIDI_DIR_TO_LEVEL(dir) \ + ((FriBidiLevel) (FRIBIDI_IS_RTL (dir) ? 1 : 0)) + +/* Is right to left: RTL, AL, RLE, RLO? */ +#define FRIBIDI_IS_RTL(p) ((p) & FRIBIDI_MASK_RTL) +/* Is arabic: AL, AN? */ +#define FRIBIDI_IS_ARABIC(p) ((p) & FRIBIDI_MASK_ARABIC) + +/* Is strong? */ +#define FRIBIDI_IS_STRONG(p) ((p) & FRIBIDI_MASK_STRONG) +/* Is weak? */ +#define FRIBIDI_IS_WEAK(p) ((p) & FRIBIDI_MASK_WEAK) +/* Is neutral? */ +#define FRIBIDI_IS_NEUTRAL(p) ((p) & FRIBIDI_MASK_NEUTRAL) +/* Is sentinel? */ +#define FRIBIDI_IS_SENTINEL(p) ((p) & FRIBIDI_MASK_SENTINEL) + +/* Is letter: L, R, AL? */ +#define FRIBIDI_IS_LETTER(p) ((p) & FRIBIDI_MASK_LETTER) +/* Is number: EN, AN? */ +#define FRIBIDI_IS_NUMBER(p) ((p) & FRIBIDI_MASK_NUMBER) +/* Is number separator or terminator: ES, ET, CS? */ +#define FRIBIDI_IS_NUMBER_SEPARATOR_OR_TERMINATOR(p) \ + ((p) & FRIBIDI_MASK_NUMSEPTER) +/* Is space: BN, BS, SS, WS? */ +#define FRIBIDI_IS_SPACE(p) ((p) & FRIBIDI_MASK_SPACE) +/* Is explicit mark: LRE, RLE, LRO, RLO, PDF? */ +#define FRIBIDI_IS_EXPLICIT(p) ((p) & FRIBIDI_MASK_EXPLICIT) +/* Is isolator */ +#define FRIBIDI_IS_ISOLATE(p) ((p) & FRIBIDI_MASK_ISOLATE) + +/* Is text separator: BS, SS? */ +#define FRIBIDI_IS_SEPARATOR(p) ((p) & FRIBIDI_MASK_SEPARATOR) + +/* Is explicit override: LRO, RLO? */ +#define FRIBIDI_IS_OVERRIDE(p) ((p) & FRIBIDI_MASK_OVERRIDE) + +/* Some more: */ + +/* Is left to right letter: LTR? */ +#define FRIBIDI_IS_LTR_LETTER(p) \ + ((p) & (FRIBIDI_MASK_LETTER | FRIBIDI_MASK_RTL) == FRIBIDI_MASK_LETTER) + +/* Is right to left letter: RTL, AL? */ +#define FRIBIDI_IS_RTL_LETTER(p) \ + ((p) & (FRIBIDI_MASK_LETTER | FRIBIDI_MASK_RTL) \ + == (FRIBIDI_MASK_LETTER | FRIBIDI_MASK_RTL)) + +/* Is ES or CS: ES, CS? */ +#define FRIBIDI_IS_ES_OR_CS(p) \ + ((p) & (FRIBIDI_MASK_ES | FRIBIDI_MASK_CS)) + +/* Is explicit or BN: LRE, RLE, LRO, RLO, PDF, BN? */ +#define FRIBIDI_IS_EXPLICIT_OR_BN(p) \ + ((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_BN)) + +/* Is explicit or BN or NSM: LRE, RLE, LRO, RLO, PDF, BN, NSM? */ +#define FRIBIDI_IS_EXPLICIT_OR_BN_OR_NSM(p) \ + ((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_BN | FRIBIDI_MASK_NSM)) + +/* Is explicit or BN or NSM: LRE, RLE, LRO, RLO, PDF, BN, NSM? */ +#define FRIBIDI_IS_EXPLICIT_OR_ISOLATE_OR_BN_OR_NSM(p) \ + ((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_ISOLATE | FRIBIDI_MASK_BN | FRIBIDI_MASK_NSM)) + +/* Is explicit or BN or WS: LRE, RLE, LRO, RLO, PDF, BN, WS? */ +#define FRIBIDI_IS_EXPLICIT_OR_BN_OR_WS(p) \ + ((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_BN | FRIBIDI_MASK_WS)) + +/* Is explicit or separator or BN or WS: LRE, RLE, LRO, RLO, PDF, BS, SS, BN, WS? */ +#define FRIBIDI_IS_EXPLICIT_OR_SEPARATOR_OR_BN_OR_WS(p) \ + ((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_SEPARATOR \ + | FRIBIDI_MASK_BN | FRIBIDI_MASK_WS)) + +/* Is private-use type for application? */ +#define FRIBIDI_IS_PRIVATE(p) ((p) & FRIBIDI_MASK_PRIVATE) + +/* Define some conversions. */ + +/* Change numbers to RTL: EN,AN -> RTL. */ +#define FRIBIDI_CHANGE_NUMBER_TO_RTL(p) \ + (FRIBIDI_IS_NUMBER(p) ? FRIBIDI_TYPE_RTL : (p)) + +/* Override status of an explicit mark: + * LRO,LRE->LTR, RLO,RLE->RTL, otherwise->ON. */ +#define FRIBIDI_EXPLICIT_TO_OVERRIDE_DIR(p) \ + (FRIBIDI_IS_OVERRIDE(p) ? FRIBIDI_LEVEL_TO_DIR(FRIBIDI_DIR_TO_LEVEL(p)) \ + : FRIBIDI_TYPE_ON) + +/* Weaken type for paragraph fallback purposes: + * LTR->WLTR, RTL->WRTL. */ +#define FRIBIDI_WEAK_PARAGRAPH(p) (FRIBIDI_PAR_WLTR | ((p) & FRIBIDI_MASK_RTL)) + + +/* Functions finally */ + + +/* fribidi_get_bidi_type - get character bidi type + * + * This function returns the bidi type of a character as defined in Table 3.7 + * Bidirectional Character Types of the Unicode Bidirectional Algorithm + * available at + * http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types, using + * data provided in file UnicodeData.txt of the Unicode Character Database + * available at http://www.unicode.org/Public/UNIDATA/UnicodeData.txt. + * + * There are a few macros defined in fribidi-bidi-types.h for querying a bidi + * type. + */ +FRIBIDI_ENTRY FriBidiCharType +fribidi_get_bidi_type ( + FriBidiChar ch /* input character */ +) FRIBIDI_GNUC_CONST; + +/* fribidi_get_bidi_types - get bidi types for an string of characters + * + * This function finds the bidi types of an string of characters. See + * fribidi_get_bidi_type() for more information about the bidi types returned + * by this function. + */ + FRIBIDI_ENTRY void fribidi_get_bidi_types ( + const FriBidiChar *str, /* input string */ + const FriBidiStrIndex len, /* input string length */ + FriBidiCharType *btypes /* output bidi types */ +); + +/* fribidi_get_bidi_type_name - get bidi type name + * + * This function returns the bidi type name of a character type. The + * returned string is a static string and should not be freed. + * + * The type names are the same as ones defined in Table 3.7 Bidirectional + * Character Types of the Unicode Bidirectional Algorithm available at + * http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types, with a + * few modifications: L->LTR, R->RTL, B->BS, S->SS. + */ + FRIBIDI_ENTRY const char *fribidi_get_bidi_type_name ( + FriBidiCharType t /* input bidi type */ +) FRIBIDI_GNUC_CONST; + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_BIDI_TYPES_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-bidi.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-bidi.h new file mode 100755 index 00000000..10672a6d --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-bidi.h @@ -0,0 +1,142 @@ +/* FriBidi + * fribidi-bidi.h - bidirectional algorithm + * + * Authors: + * Behdad Esfahbod, 2001, 2002, 2004 + * Dov Grobgeld, 1999, 2000 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc + * Copyright (C) 2001,2002 Behdad Esfahbod + * Copyright (C) 1999,2000 Dov Grobgeld + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_BIDI_H +#define _FRIBIDI_BIDI_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" +#include "fribidi-flags.h" +#include "fribidi-bidi-types.h" + +#include "fribidi-begindecls.h" + +/* fribidi_get_par_direction - get base paragraph direction + * + * This function finds the base direction of a single paragraph, + * as defined by rule P2 of the Unicode Bidirectional Algorithm available at + * http://www.unicode.org/reports/tr9/#P2. + * + * You typically do not need this function as + * fribidi_get_par_embedding_levels() knows how to compute base direction + * itself, but you may need this to implement a more sophisticated paragraph + * direction handling. Note that you can pass more than a paragraph to this + * function and the direction of the first non-neutral paragraph is returned, + * which is a very good heuristic to set direction of the neutral paragraphs + * at the beginning of text. For other neutral paragraphs, you better use the + * direction of the previous paragraph. + * + * Returns: Base pargraph direction. No weak paragraph direction is returned, + * only LTR, RTL, or ON. + */ +FRIBIDI_ENTRY FriBidiParType fribidi_get_par_direction ( + const FriBidiCharType *bidi_types, /* input list of bidi types as returned by + fribidi_get_bidi_types() */ + const FriBidiStrIndex len /* input string length */ +); + +/* fribidi_get_par_embedding_levels_ex - get bidi embedding levels of a paragraph + * + * This function finds the bidi embedding levels of a single paragraph, + * as defined by the Unicode Bidirectional Algorithm available at + * http://www.unicode.org/reports/tr9/. This function implements rules P2 to + * I1 inclusive, and parts 1 to 3 of L1, except for rule X9 which is + * implemented in fribidi_remove_bidi_marks(). Part 4 of L1 is implemented + * in fribidi_reorder_line(). + * + * There are a few macros defined in fribidi-bidi-types.h to work with this + * embedding levels. + * + * Returns: Maximum level found plus one, or zero if any error occurred + * (memory allocation failure most probably). + */ +FRIBIDI_ENTRY FriBidiLevel +fribidi_get_par_embedding_levels_ex ( + const FriBidiCharType *bidi_types, /* input list of bidi types as returned by + fribidi_get_bidi_types() */ + const FriBidiBracketType *bracket_types, /* input list of bracket types as returned by + fribidi_get_bracket_types() */ + const FriBidiStrIndex len, /* input string length of the paragraph */ + FriBidiParType *pbase_dir, /* requested and resolved paragraph + * base direction */ + FriBidiLevel *embedding_levels /* output list of embedding levels */ +) FRIBIDI_GNUC_WARN_UNUSED; + +/* fribidi_reorder_line - reorder a line of logical string to visual + * + * This function reorders the characters in a line of text from logical to + * final visual order. This function implements part 4 of rule L1, and rules + * L2 and L3 of the Unicode Bidirectional Algorithm available at + * http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels. + * + * As a side effect it also sets position maps if not NULL. + * + * You should provide the resolved paragraph direction and embedding levels as + * set by fribidi_get_par_embedding_levels(). Also note that the embedding + * levels may change a bit. To be exact, the embedding level of any sequence + * of white space at the end of line is reset to the paragraph embedding level + * (That is part 4 of rule L1). + * + * Note that the bidi types and embedding levels are not reordered. You can + * reorder these (or any other) arrays using the map later. The user is + * responsible to initialize map to something sensible, like an identity + * mapping, or pass NULL if no map is needed. + * + * There is an optional part to this function, which is whether non-spacing + * marks for right-to-left parts of the text should be reordered to come after + * their base characters in the visual string or not. Most rendering engines + * expect this behavior, but console-based systems for example do not like it. + * This is controlled by the FRIBIDI_FLAG_REORDER_NSM flag. The flag is on + * in FRIBIDI_FLAGS_DEFAULT. + * + * Returns: Maximum level found in this line plus one, or zero if any error + * occurred (memory allocation failure most probably). + */ + FRIBIDI_ENTRY FriBidiLevel fribidi_reorder_line ( + FriBidiFlags flags, /* reorder flags */ + const FriBidiCharType *bidi_types, /* input list of bidi types as returned by + fribidi_get_bidi_types() */ + const FriBidiStrIndex len, /* input length of the line */ + const FriBidiStrIndex off, /* input offset of the beginning of the line + in the paragraph */ + const FriBidiParType base_dir, /* resolved paragraph base direction */ + FriBidiLevel *embedding_levels, /* input list of embedding levels, + as returned by + fribidi_get_par_embedding_levels */ + FriBidiChar *visual_str, /* visual string to reorder */ + FriBidiStrIndex *map /* a map of string indices which is reordered + * to reflect where each glyph ends up. */ +) FRIBIDI_GNUC_WARN_UNUSED; + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_BIDI_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-brackets.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-brackets.h new file mode 100755 index 00000000..5569defe --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-brackets.h @@ -0,0 +1,89 @@ +/* fribidi-brackets.h - get bracket character property + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc + * Copyright (C) 2001, 2002, 2004 Behdad Esfahbod + * Copyright (C) 1999, 2000, 2017 Dov Grobgeld + * + * This file is part of GNU FriBidi. + * + * GNU FriBidi is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * GNU FriBidi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GNU FriBidi; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * For licensing issues, contact <fribidi.license@gmail.com> or write to + * Sharif FarsiWeb, Inc., PO Box 13445-389, Tehran, Iran. + * + * Author(s): + * Behdad Esfahbod, 2001, 2002, 2004 + * Dov Grobgeld, 1999, 2000, 2017 + */ +#ifndef _FRIBIDI_BRACKETS_H +#define _FRIBIDI_BRACKETS_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" +#include "fribidi-bidi-types.h" + +#include "fribidi-begindecls.h" + +/* fribidi_get_bracket - get bracketed character + * + * This function finds the bracketed equivalent of a character as defined in + * the file BidiBrackets.txt of the Unicode Character Database available at + * http://www.unicode.org/Public/UNIDATA/BidiBrackets.txt. + * + * If the input character is a declared as a brackets character in the + * Unicode standard and has a bracketed equivalent. The matching bracketed + * character is put in the output, otherwise the input character itself is + * put. + * + * Returns: The bracket type of the character. Use the + * FRIBIDI_IS_BRACKET(FriBidiBracketType) to test if it is a valid + * property. + */ +FRIBIDI_ENTRY FriBidiBracketType fribidi_get_bracket ( + FriBidiChar ch /* input character */ +); + +/* fribidi_get_bracket_types - get bracketed characters + * + * This function finds the bracketed characters of an string of characters. + * See fribidi_get_bracket() for more information about the bracketed + * characters returned by this function. + */ +FRIBIDI_ENTRY void +fribidi_get_bracket_types ( + const FriBidiChar *str, /* input string */ + const FriBidiStrIndex len, /* input string length */ + const FriBidiCharType *types, /* input bidi types */ + FriBidiBracketType *btypes /* output bracketed characters */ +); + +#define FRIBIDI_BRACKET_OPEN_MASK 0x80000000 +#define FRIBIDI_BRACKET_ID_MASK 0x7fffffff +#define FRIBIDI_IS_BRACKET_OPEN(bt) ((bt & FRIBIDI_BRACKET_OPEN_MASK)>0) +#define FRIBIDI_BRACKET_ID(bt) ((bt & FRIBIDI_BRACKET_ID_MASK)) + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_BRACKETS_H */ +/* Editor directions: + * Local Variables: + * mode: c + * c-basic-offset: 2 + * indent-tabs-mode: t + * tab-width: 8 + * End: + * vim: textwidth=78: autoindent: cindent: shiftwidth=2: tabstop=8: + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-char-sets-list.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-char-sets-list.h new file mode 100755 index 00000000..b0231d84 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-char-sets-list.h @@ -0,0 +1,54 @@ +#ifndef __FRIBIDI_DOC +/* FriBidi + * fribidi-char-sets-list.h - list of supported character sets + * + * Author: + * Behdad Esfahbod, 2001, 2002, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc. + * Copyright (C) 2001,2002 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +/* *INDENT-OFF* */ + +/* The order of types in this list should not be important at compile time, + * but apparently it should not be changed after compilation! */ +#endif /* !__FRIBIDI_DOC */ +#ifdef _FRIBIDI_ADD_CHAR_SET +# define _FRIBIDI_ADD_CHAR_SET_OTHERS _FRIBIDI_ADD_CHAR_SET +# define _FRIBIDI_ADD_CHAR_SET_ONE2ONE _FRIBIDI_ADD_CHAR_SET +#endif /* _FRIBIDI_ADD_CHAR_SET */ +#ifdef _FRIBIDI_ADD_CHAR_SET_OTHERS +_FRIBIDI_ADD_CHAR_SET_OTHERS (UTF8, utf8) /* UTF-8 (Unicode) */ +_FRIBIDI_ADD_CHAR_SET_OTHERS (CAP_RTL, cap_rtl) /* CapRTL (Test) */ +#endif /* _FRIBIDI_ADD_CHAR_SET_OTHERS */ +#ifdef _FRIBIDI_ADD_CHAR_SET_ONE2ONE +_FRIBIDI_ADD_CHAR_SET_ONE2ONE (ISO8859_6, iso8859_6) /* ISO8859-6 (Arabic) */ +_FRIBIDI_ADD_CHAR_SET_ONE2ONE (ISO8859_8, iso8859_8) /* ISO8859-8 (Hebrew) */ +_FRIBIDI_ADD_CHAR_SET_ONE2ONE (CP1255, cp1255) /* CP1255 (MS Hebrew/Yiddish) */ +_FRIBIDI_ADD_CHAR_SET_ONE2ONE (CP1256, cp1256) /* CP1256 (MS Arabic) */ +#endif /* _FRIBIDI_ADD_CHAR_SET_ONE2ONE */ +#ifdef _FRIBIDI_ADD_CHAR_SET +# undef _FRIBIDI_ADD_CHAR_SET_OTHERS +# undef _FRIBIDI_ADD_CHAR_SET_ONE2ONE +#endif /* _FRIBIDI_ADD_CHAR_SET */ + +#ifndef __FRIBIDI_DOC +/* *INDENT-ON* */ +#endif /* !__FRIBIDI_DOC */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-char-sets.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-char-sets.h new file mode 100755 index 00000000..a4af248e --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-char-sets.h @@ -0,0 +1,106 @@ +/* FriBidi + * fribidi-char-sets.h - character set conversion routines + * + * Authors: + * Behdad Esfahbod, 2001, 2002, 2004 + * Dov Grobgeld, 1999, 2000 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc + * Copyright (C) 2001,2002 Behdad Esfahbod + * Copyright (C) 1999,2000 Dov Grobgeld + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_CHAR_SETS_H +#define _FRIBIDI_CHAR_SETS_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" + +#include "fribidi-begindecls.h" + +typedef enum +{ + _FRIBIDI_CHAR_SET_NOT_FOUND, +# define _FRIBIDI_ADD_CHAR_SET(CHAR_SET, char_set) FRIBIDI_CHAR_SET_##CHAR_SET, +# include "fribidi-char-sets-list.h" +# undef _FRIBIDI_ADD_CHAR_SET + _FRIBIDI_CHAR_SETS_NUM_PLUS_ONE +} +FriBidiCharSet; + +#define FRIBIDI_CHAR_SET_NOT_FOUND _FRIBIDI_CHAR_SET_NOT_FOUND +#define FRIBIDI_CHAR_SETS_NUM (_FRIBIDI_CHAR_SETS_NUM_PLUS_ONE - 1) + + +/* fribidi_charset_to_unicode - convert string to Unicode + * + * This function converts an string from a character set, to a Unicode string. + * + * Returns: The length of the new string. + */ +FRIBIDI_ENTRY FriBidiStrIndex fribidi_charset_to_unicode ( + FriBidiCharSet char_set, /* character set to convert from */ + const char *s, /* input string encoded in char_set */ + FriBidiStrIndex len, /* input string length */ + FriBidiChar *us /* output Unicode string */ +); + +/* fribidi_unicode_to_charset - convert string from Unicode + * + * This function converts a Unicode string to an string in another character + * set. It also null-terminates the output string. + * + * Returns: The length of the new string. + */ +FRIBIDI_ENTRY FriBidiStrIndex fribidi_unicode_to_charset ( + FriBidiCharSet char_set, /* character set to conver to */ + const FriBidiChar *us, /* input Unicode string */ + FriBidiStrIndex len, /* input string length */ + char *s /* output string encoded in char_set */ +); + +/* fribidi_parse_charset - parse character set name + * + * Returns: The character set named s, or FRIBIDI_CHAR_SET_NOT_FOUND if the + * character set is not available. + */ +FRIBIDI_ENTRY FriBidiCharSet fribidi_parse_charset ( + const char *s /* input name of the character set */ +); + + +FRIBIDI_ENTRY const char *fribidi_char_set_name ( + FriBidiCharSet char_set +); + +FRIBIDI_ENTRY const char *fribidi_char_set_title ( + FriBidiCharSet char_set +); + +FRIBIDI_ENTRY const char *fribidi_char_set_desc ( + FriBidiCharSet char_set +); + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_CHAR_SETS_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-common.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-common.h new file mode 100755 index 00000000..0e873cc7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-common.h @@ -0,0 +1,146 @@ +/* FriBidi + * fribidi-common.h - common include for library headers + * + * Author: + * Behdad Esfahbod, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_COMMON_H +#define _FRIBIDI_COMMON_H + +#ifdef DONT_HAVE_FRIBIDI_CONFIG_H +# define FRIBIDI "fribidi" +# define FRIBIDI_NAME "fribidi" +# define FRIBIDI_VERSION "unknown" +# define FRIBIDI_BUGREPORT "unknown" +# define FRIBIDI_INTERFACE_VERSION_STRING "unknown" +#else /* !DONT_HAVE_FRIBIDI_CONFIG_H */ +# include "fribidi-config.h" +#endif /* !DONT_HAVE_FRIBIDI_CONFIG_H */ + +#ifdef HAVE_FRIBIDI_CUSTOM_H +# include <fribidi-custom.h> +#endif /* HAVE_FRIBIDI_CUSTOM_H */ + + +/* FRIBIDI_ENTRY is a macro used to declare library entry points. */ +#ifndef FRIBIDI_ENTRY +# if (defined(_MSC_VER) || defined(FRIBIDI_BUILT_WITH_MSVC)) && !defined(FRIBIDI_STATIC) +/* if we're building fribidi itself with MSVC, FRIBIDI_ENTRY will be defined, + * so if we're here then this is an external user including fribidi headers. + * The dllimport is needed here mostly for the fribidi_version_info variable, + * for functions it's not required. Probably needs more fine-tuning if + * someone starts building fribidi as static library with MSVC. We'll cross + * that brige when we get there. */ +# define FRIBIDI_ENTRY __declspec(dllimport) extern +# else +# define FRIBIDI_ENTRY extern +# endif +#endif /* !FRIBIDI_ENTRY */ + +#ifdef __ICC +#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS \ + _Pragma ("warning (push)") \ + _Pragma ("warning (disable:1478)") +#define FRIBIDI_END_IGNORE_DEPRECATIONS \ + _Pragma ("warning (pop)") +#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#define FRIBIDI_END_IGNORE_DEPRECATIONS \ + _Pragma ("GCC diagnostic pop") +#elif defined (_MSC_VER) && (_MSC_VER >= 1500) +#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS \ + __pragma (warning (push)) \ + __pragma (warning (disable : 4996)) +#define FRIBIDI_END_IGNORE_DEPRECATIONS \ + __pragma (warning (pop)) +#elif defined (__clang__) +#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") +#define FRIBIDI_END_IGNORE_DEPRECATIONS \ + _Pragma("clang diagnostic pop") +#else +#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS +#define FRIBIDI_END_IGNORE_DEPRECATIONS +#endif + +#if defined(__GNUC__) && (__GNUC__ > 2) +# define FRIBIDI_GNUC_WARN_UNUSED __attribute__((__warn_unused_result__)) +# define FRIBIDI_GNUC_MALLOC __attribute__((__malloc__)) +# define FRIBIDI_GNUC_HIDDEN __attribute__((__visibility__ ("hidden"))) +# define FRIBIDI_GNUC_CONST __attribute__((__const__)) +# define FRIBIDI_GNUC_DEPRECATED __attribute__((__unused__)) +#else /* __GNUC__ */ +# define FRIBIDI_GNUC_WARN_UNUSED +# define FRIBIDI_GNUC_MALLOC +# define FRIBIDI_GNUC_HIDDEN +# define FRIBIDI_GNUC_CONST +# define FRIBIDI_GNUC_DEPRECATED +#endif /* __GNUC__ */ + +/* FRIBIDI_BEGIN_DECLS should be used at the beginning of your declarations, + * so that C++ compilers don't mangle their names. Use FRIBIDI_END_DECLS at + * the end of C declarations. */ +#ifndef FRIBIDI_BEGIN_DECLS +# ifdef __cplusplus +# define FRIBIDI_BEGIN_DECLS extern "C" { +# define FRIBIDI_END_DECLS } +# else /* !__cplusplus */ +# define FRIBIDI_BEGIN_DECLS /* empty */ +# define FRIBIDI_END_DECLS /* empty */ +# endif /* !__cplusplus */ +#endif /* !FRIBIDI_BEGIN_DECLS */ + + + + +/* fribidi_debug_status - get current debug state + * + */ +FRIBIDI_ENTRY int fribidi_debug_status ( + void +); + +/* fribidi_set_debug - set debug state + * + */ +FRIBIDI_ENTRY int +fribidi_set_debug ( + int state /* new state to set */ +); + + + + + + + + + + + +#endif /* !_FRIBIDI_COMMON_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-config.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-config.h new file mode 100755 index 00000000..3868341c --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-config.h @@ -0,0 +1,23 @@ +/* lib/fribidi-config.h. Generated from fribidi-config.h.in by configure. */ +/* Not copyrighted, in public domain. */ +#ifndef FRIBIDI_CONFIG_H +#define FRIBIDI_CONFIG_H + +#define FRIBIDI "fribidi" +#define FRIBIDI_NAME "GNU FriBidi" +#define FRIBIDI_BUGREPORT "https://github.com/fribidi/fribidi/issues/new" + +#define FRIBIDI_VERSION "1.0.2" +#define FRIBIDI_MAJOR_VERSION 1 +#define FRIBIDI_MINOR_VERSION 0 +#define FRIBIDI_MICRO_VERSION 2 +#define FRIBIDI_INTERFACE_VERSION 4 +#define FRIBIDI_INTERFACE_VERSION_STRING "4" + +/* The size of a `int', as computed by sizeof. */ +#define FRIBIDI_SIZEOF_INT 4 + +/* Define if fribidi was built with MSVC */ +#undef FRIBIDI_BUILT_WITH_MSVC + +#endif /* FRIBIDI_CONFIG_H */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-deprecated.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-deprecated.h new file mode 100755 index 00000000..0eaecd72 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-deprecated.h @@ -0,0 +1,244 @@ +/* FriBidi + * fribidi-deprecated.h - Deprecated interfaces + * + * Author: + * Behdad Esfahbod, 2004, 2005 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc + * Copyright (C) 2004, 2005 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_DEPRECATED_H +#define _FRIBIDI_DEPRECATED_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" + +#include "fribidi-bidi-types.h" + +#include "fribidi-begindecls.h" + + + +/* fribidi_mirroring_status - get current mirroring status + * + * This function is deprecated and only used with other deprecated functions. + */ + FRIBIDI_ENTRY fribidi_boolean fribidi_mirroring_status ( + void +) FRIBIDI_GNUC_DEPRECATED; + +/* fribidi_set_mirroring - set mirroring on or off + * + * This function is used to turn character mirroring on or off. + * Character mirroring is the act of replacing a mirrorable glyph + * (character), eg. left parenthesis, with the matching glyph, + * eg. right parenthesis, in a right-to-left resolved context. + * If your rendering engine does mirroring itself, you may want to + * turn it off here. + * + * This flag is on by default. + * This function is deprecated and only used with other deprecated functions. + * + * Returns: the new mirroring status. + */ + FRIBIDI_ENTRY fribidi_boolean fribidi_set_mirroring ( + fribidi_boolean state /* new state to set */ +) FRIBIDI_GNUC_DEPRECATED; + + +/* fribidi_reorder_nsm_status - get current marks reordering status + * + * This function is deprecated and only used with other deprecated functions. + */ + FRIBIDI_ENTRY fribidi_boolean fribidi_reorder_nsm_status ( + void +) FRIBIDI_GNUC_DEPRECATED; + +/* fribidi_set_reorder_nsm - set marks reordering on or off + * + * This function is used to turn non-spacing marks reordering on or + * off. Reordering non-spacing marks is the act of placing non-spacing + * marks (bidi class NSM) after their base character in a right-to-left + * resolved context. If your rendering engine expects non-spacing marks + * always after the base character in the memory representation of the + * visual string, you need this option on. An example of where people + * may need it off is when rendering in the console when non-spacing + * marks cannot be applied on top of the base character. + * + * This flag is on by default. + * This function is deprecated and only used with other deprecated functions. + * + * Returns: the new marks reordering status. + */ + FRIBIDI_ENTRY fribidi_boolean fribidi_set_reorder_nsm ( + fribidi_boolean state /* new state to set */ +) FRIBIDI_GNUC_DEPRECATED; + + + + +/* fribidi_log2vis_get_embedding_levels - get embedding levels + * + * Deprecated. Replaced by fribidi_get_par_embedding_levels_ex. + */ +FRIBIDI_ENTRY FriBidiLevel +fribidi_log2vis_get_embedding_levels ( + const FriBidiCharType *bidi_types, /* input list of bidi types as returned by + fribidi_get_bidi_types() */ + const FriBidiStrIndex len, /* input string length of the paragraph */ + FriBidiParType *pbase_dir, /* requested and resolved paragraph + * base direction */ + FriBidiLevel *embedding_levels /* output list of embedding levels */ +) FRIBIDI_GNUC_DEPRECATED; + +/* fribidi_get_type - get character bidi type + * + * Deprecated. Replaced by fribidi_get_bidi_type. + */ +FRIBIDI_ENTRY FriBidiCharType +fribidi_get_type ( + FriBidiChar ch /* input character */ +) FRIBIDI_GNUC_DEPRECATED; + +/* fribidi_get_type_internal - get character bidi type + * + * Deprecated. Replaced by fribidi_get_bidi_type. + */ +FRIBIDI_ENTRY FriBidiCharType +fribidi_get_type_internal ( + FriBidiChar ch /* input character */ +) FRIBIDI_GNUC_DEPRECATED; + +/* fribidi_remove_bidi_marks - remove bidi marks out of an string + * + * This function removes the bidi and boundary-neutral marks out of an string + * and the accompanying lists. It implements rule X9 of the Unicode + * Bidirectional Algorithm available at + * http://www.unicode.org/reports/tr9/#X9, with the exception that it removes + * U+200E LEFT-TO-RIGHT MARK and U+200F RIGHT-TO-LEFT MARK too. + * + * If any of the input lists are NULL, the list is skipped. If str is the + * visual string, then positions_to_this is positions_L_to_V and + * position_from_this_list is positions_V_to_L; if str is the logical + * string, the other way. Moreover, the position maps should be filled with + * valid entries. + * + * A position map pointing to a removed character is filled with \-1. By the + * way, you should not use embedding_levels if str is visual string. + * + * For best results this function should be run on a whole paragraph, not + * lines; but feel free to do otherwise if you know what you are doing. + * Deprecated. Use fribidi_remove_special_chars instead. + * + * Returns: New length of the string, or \-1 if an error occurred (memory + * allocation failure most probably). + */ +FRIBIDI_ENTRY FriBidiStrIndex +fribidi_remove_bidi_marks ( + FriBidiChar *str, /* input string to clean */ + const FriBidiStrIndex len, /* input string length */ + FriBidiStrIndex *positions_to_this, /* list mapping positions to the + order used in str */ + FriBidiStrIndex *position_from_this_list, /* list mapping positions from the + order used in str */ + FriBidiLevel *embedding_levels /* list of embedding levels */ +) + FRIBIDI_GNUC_WARN_UNUSED FRIBIDI_GNUC_DEPRECATED; + + +/* fribidi_log2vis - get visual string + * + * This function converts the logical input string to the visual output + * strings as specified by the Unicode Bidirectional Algorithm. As a side + * effect it also generates mapping lists between the two strings, and the + * list of embedding levels as defined by the algorithm. + * + * If NULL is passed as any of the the lists, the list is ignored and not + * filled. + * + * This function is obsolete because it only handles one-line paragraphs. + * Please consider using other functions instead. Deprecated. + * + * Returns: Maximum level found plus one, or zero if any error occurred + * (memory allocation failure most probably). + */ + FRIBIDI_ENTRY FriBidiLevel fribidi_log2vis ( + const FriBidiChar *str, /* input logical string */ + const FriBidiStrIndex len, /* input string length */ + FriBidiParType *pbase_dir, /* requested and resolved paragraph + * base direction */ + FriBidiChar *visual_str, /* output visual string */ + FriBidiStrIndex *positions_L_to_V, /* output mapping from logical to + * visual string positions */ + FriBidiStrIndex *positions_V_to_L, /* output mapping from visual string + * back to the logical string + * positions */ + FriBidiLevel *embedding_levels /* output list of embedding levels */ +) + FRIBIDI_GNUC_WARN_UNUSED FRIBIDI_GNUC_DEPRECATED; + + +/* fribidi_get_par_embedding_levels - get bidi embedding levels of a paragraph + * + * Deprecated interface to fribidi_get_par_embedding_levels_ex(). Refer to + * it for documentation. + */ +FRIBIDI_ENTRY FriBidiLevel +fribidi_get_par_embedding_levels ( + const FriBidiCharType *bidi_types, /* input list of bidi types as returned by + fribidi_get_bidi_types() */ + const FriBidiStrIndex len, /* input string length of the paragraph */ + FriBidiParType *pbase_dir, /* requested and resolved paragraph + * base direction */ + FriBidiLevel *embedding_levels /* output list of embedding levels */ +) + FRIBIDI_GNUC_WARN_UNUSED FRIBIDI_GNUC_DEPRECATED; + +#define UNI_MAX_BIDI_LEVEL FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL +#define UNI_LRM FRIBIDI_CHAR_LRM +#define UNI_RLM FRIBIDI_CHAR_RLM +#define UNI_LRE FRIBIDI_CHAR_LRE +#define UNI_RLE FRIBIDI_CHAR_RLE +#define UNI_LRO FRIBIDI_CHAR_LRO +#define UNI_RLO FRIBIDI_CHAR_RLO +#define UNI_LS FRIBIDI_CHAR_LS +#define UNI_PS FRIBIDI_CHAR_PS +#define UNI_ZWNJ FRIBIDI_CHAR_ZWNJ +#define UNI_ZWJ FRIBIDI_CHAR_ZWJ +#define UNI_HEBREW_ALEF FRIBIDI_CHAR_HEBREW_ALEF +#define UNI_ARABIC_ALEF FRIBIDI_CHAR_ARABIC_ALEF +#define UNI_ARABIC_ZERO FRIBIDI_CHAR_ARABIC_ZERO +#define UNI_FARSI_ZERO FRIBIDI_CHAR_PERSIAN_ZERO + +#define FRIBIDI_TYPE_WL FRIBIDI_PAR_WLTR +#define FRIBIDI_TYPE_WR FRIBIDI_PAR_WRTL +#define FRIBIDI_TYPE_L FRIBIDI_PAR_LTR +#define FRIBIDI_TYPE_R FRIBIDI_PAR_RTL +#define FRIBIDI_TYPE_N FRIBIDI_PAR_ON +#define FRIBIDI_TYPE_B FRIBIDI_TYPE_BS +#define FRIBIDI_TYPE_S FRIBIDI_TYPE_SS + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_DEPRECATED_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-enddecls.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-enddecls.h new file mode 100755 index 00000000..eb300c9e --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-enddecls.h @@ -0,0 +1,3 @@ +#ifdef FRIBIDI_END_DECLS +FRIBIDI_END_DECLS +#endif /* FRIBIDI_END_DECLS */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-flags.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-flags.h new file mode 100755 index 00000000..166c93a6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-flags.h @@ -0,0 +1,72 @@ +/* FriBidi + * fribidi-flags.h - option flags + * + * Author: + * Behdad Esfahbod, 2005 + * + * Copyright (C) 2005 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_FLAGS_H +#define _FRIBIDI_FLAGS_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" + +#include "fribidi-begindecls.h" + +typedef uint32_t FriBidiFlags; + +/* + * Define option flags that various functions use. Each mask has + * only one bit set. + */ + +#define FRIBIDI_FLAG_SHAPE_MIRRORING 0x00000001 +#define FRIBIDI_FLAG_REORDER_NSM 0x00000002 + +#define FRIBIDI_FLAG_SHAPE_ARAB_PRES 0x00000100 +#define FRIBIDI_FLAG_SHAPE_ARAB_LIGA 0x00000200 +#define FRIBIDI_FLAG_SHAPE_ARAB_CONSOLE 0x00000400 + +#define FRIBIDI_FLAG_REMOVE_BIDI 0x00010000 +#define FRIBIDI_FLAG_REMOVE_JOINING 0x00020000 +#define FRIBIDI_FLAG_REMOVE_SPECIALS 0x00040000 + + +/* + * And their combinations. + */ + +#define FRIBIDI_FLAGS_DEFAULT ( \ + FRIBIDI_FLAG_SHAPE_MIRRORING | \ + FRIBIDI_FLAG_REORDER_NSM | \ + FRIBIDI_FLAG_REMOVE_SPECIALS ) + +#define FRIBIDI_FLAGS_ARABIC ( \ + FRIBIDI_FLAG_SHAPE_ARAB_PRES | \ + FRIBIDI_FLAG_SHAPE_ARAB_LIGA ) + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_FLAGS_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-joining-types-list.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-joining-types-list.h new file mode 100755 index 00000000..198bad0f --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-joining-types-list.h @@ -0,0 +1,44 @@ +#ifndef __FRIBIDI_DOC +/* FriBidi + * fribidi-joining-types-list.h - list of joining types + * + * Author: + * Behdad Esfahbod, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc. + * Copyright (C) 2004 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +/* *INDENT-OFF* */ +#endif /* !__FRIBIDI_DOC */ +#ifndef _FRIBIDI_ADD_TYPE +# define _FRIBIDI_ADD_TYPE(x,y) +#endif + +_FRIBIDI_ADD_TYPE (U, '|') /* nUn-joining, e.g. Full Stop */ +_FRIBIDI_ADD_TYPE (R, '<') /* Right-joining, e.g. Arabic Letter Dal */ +_FRIBIDI_ADD_TYPE (D, '+') /* Dual-joining, e.g. Arabic Letter Ain */ +_FRIBIDI_ADD_TYPE (C, '-') /* join-Causing, e.g. Tatweel, ZWJ */ +_FRIBIDI_ADD_TYPE (T, '^') /* Transparent, e.g. Arabic Fatha */ +_FRIBIDI_ADD_TYPE (L, '>') /* Left-joining, i.e. fictional */ +_FRIBIDI_ADD_TYPE (G, '~') /* iGnored, e.g. LRE, RLE, ZWNBSP */ + +#ifndef __FRIBIDI_DOC +/* *INDENT-ON* */ +#endif /* !__FRIBIDI_DOC */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-joining-types.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-joining-types.h new file mode 100755 index 00000000..7f6750af --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-joining-types.h @@ -0,0 +1,249 @@ +/* FriBidi + * fribidi-joining-types.h - character joining types + * + * Author: + * Behdad Esfahbod, 2001, 2002, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc. + * Copyright (C) 2001,2002 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_JOINING_TYPES_H +#define _FRIBIDI_JOINING_TYPES_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" + +#include "fribidi-begindecls.h" + +/* + * Define bit masks that joining types are based on, each mask has + * only one bit set. + */ + +#define FRIBIDI_MASK_JOINS_RIGHT 0x01 /* May join to right */ +#define FRIBIDI_MASK_JOINS_LEFT 0x02 /* May join to right */ +#define FRIBIDI_MASK_ARAB_SHAPES 0x04 /* May Arabic shape */ +#define FRIBIDI_MASK_TRANSPARENT 0x08 /* Is transparent */ +#define FRIBIDI_MASK_IGNORED 0x10 /* Is ignored */ +#define FRIBIDI_MASK_LIGATURED 0x20 /* Is ligatured */ + +/* + * Define values for FriBidiJoiningType + */ + +/* nUn-joining */ +#define FRIBIDI_JOINING_TYPE_U_VAL ( 0 ) + +/* Right-joining */ +#define FRIBIDI_JOINING_TYPE_R_VAL \ + ( FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_ARAB_SHAPES ) + +/* Dual-joining */ +#define FRIBIDI_JOINING_TYPE_D_VAL \ + ( FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT \ + | FRIBIDI_MASK_ARAB_SHAPES ) + +/* join-Causing */ +#define FRIBIDI_JOINING_TYPE_C_VAL \ + ( FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT ) + +/* Left-joining */ +#define FRIBIDI_JOINING_TYPE_L_VAL \ + ( FRIBIDI_MASK_JOINS_LEFT | FRIBIDI_MASK_ARAB_SHAPES ) + +/* Transparent */ +#define FRIBIDI_JOINING_TYPE_T_VAL \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_ARAB_SHAPES ) + +/* iGnored */ +#define FRIBIDI_JOINING_TYPE_G_VAL ( FRIBIDI_MASK_IGNORED ) + + +enum _FriBidiJoiningTypeEnum +{ +# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) \ + FRIBIDI_JOINING_TYPE_##TYPE = FRIBIDI_JOINING_TYPE_##TYPE##_VAL, +# include "fribidi-joining-types-list.h" +# undef _FRIBIDI_ADD_TYPE + _FRIBIDI_JOINING_TYPE_JUNK /* Don't use this */ +}; + +#ifdef __FRIBIDI_DOC +typedef enum _FriBidiJoiningTypeEnum FriBidiJoiningType; +#else /* !__FRIBIDI_DOC */ +typedef uint8_t FriBidiJoiningType; +#endif /* !__FRIBIDI_DOC */ + +/* FriBidiArabicProp is essentially the same type as FriBidiJoiningType, but + * not limited to the few values returned by fribidi_get_joining_type. */ +typedef uint8_t FriBidiArabicProp; + +/* + * The equivalent of JoiningType values for ArabicProp + */ + +/* Primary Arabic Joining Classes (Table 8-2) */ + +/* nUn-joining */ +#define FRIBIDI_IS_JOINING_TYPE_U(p) \ + ( 0 == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED \ + | FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT ) ) ) + +/* Right-joining */ +#define FRIBIDI_IS_JOINING_TYPE_R(p) \ + ( FRIBIDI_MASK_JOINS_RIGHT == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED \ + | FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT ) ) ) + +/* Dual-joining */ +#define FRIBIDI_IS_JOINING_TYPE_D(p) \ + ( ( FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT \ + | FRIBIDI_MASK_ARAB_SHAPES ) == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED \ + | FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT \ + | FRIBIDI_MASK_ARAB_SHAPES ) ) ) + +/* join-Causing */ +#define FRIBIDI_IS_JOINING_TYPE_C(p) \ + ( ( FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT ) == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED \ + | FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT \ + | FRIBIDI_MASK_ARAB_SHAPES ) ) ) + +/* Left-joining */ +#define FRIBIDI_IS_JOINING_TYPE_L(p) \ + ( FRIBIDI_MASK_JOINS_LEFT == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED \ + | FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT ) ) ) + +/* Transparent */ +#define FRIBIDI_IS_JOINING_TYPE_T(p) \ + ( FRIBIDI_MASK_TRANSPARENT == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED ) ) ) + +/* iGnored */ +#define FRIBIDI_IS_JOINING_TYPE_G(p) \ + ( FRIBIDI_MASK_IGNORED == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED ) ) ) + +/* and for Derived Arabic Joining Classes (Table 8-3) */ + +/* Right join-Causing */ +#define FRIBIDI_IS_JOINING_TYPE_RC(p) \ + ( FRIBIDI_MASK_JOINS_RIGHT == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED \ + | FRIBIDI_MASK_JOINS_RIGHT ) ) ) + +/* Left join-Causing */ +#define FRIBIDI_IS_JOINING_TYPE_LC(p) \ + ( FRIBIDI_MASK_JOINS_LEFT == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED \ + | FRIBIDI_MASK_JOINS_LEFT ) ) ) + + +/* + * Defining macros for needed queries, It is fully dependent on the + * implementation of FriBidiJoiningType. + */ + +/* Joins to right: R, D, C? */ +#define FRIBIDI_JOINS_RIGHT(p) ((p) & FRIBIDI_MASK_JOINS_RIGHT) + +/* Joins to left: L, D, C? */ +#define FRIBIDI_JOINS_LEFT(p) ((p) & FRIBIDI_MASK_JOINS_LEFT) + +/* May shape: R, D, L, T? */ +#define FRIBIDI_ARAB_SHAPES(p) ((p) & FRIBIDI_MASK_ARAB_SHAPES) + +/* Is skipped in joining: T, G? */ +#define FRIBIDI_IS_JOIN_SKIPPED(p) \ + ((p) & (FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED)) + +/* Is base that will be shaped: R, D, L? */ +#define FRIBIDI_IS_JOIN_BASE_SHAPES(p) \ + ( FRIBIDI_MASK_ARAB_SHAPES == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED \ + | FRIBIDI_MASK_ARAB_SHAPES ) ) ) + +#define FRIBIDI_JOINS_PRECEDING_MASK(level) \ + (FRIBIDI_LEVEL_IS_RTL (level) ? FRIBIDI_MASK_JOINS_RIGHT \ + : FRIBIDI_MASK_JOINS_LEFT) + +#define FRIBIDI_JOINS_FOLLOWING_MASK(level) \ + (FRIBIDI_LEVEL_IS_RTL (level) ? FRIBIDI_MASK_JOINS_LEFT \ + : FRIBIDI_MASK_JOINS_RIGHT) + +#define FRIBIDI_JOIN_SHAPE(p) \ + ((p) & ( FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT )) + +/* Functions finally */ + + +/* fribidi_get_joining_type - get character joining type + * + * This function returns the joining type of a character as defined in Table + * 8-2 Primary Arabic Joining Classes of the Unicode standard available at + * http://www.unicode.org/versions/Unicode4.0.0/ch08.pdf#G7462, using data + * provided in file ArabicShaping.txt and UnicodeData.txt of the Unicode + * Character Database available at + * http://www.unicode.org/Public/UNIDATA/ArabicShaping.txt and + * http://www.unicode.org/Public/UNIDATA/UnicodeData.txt. + * + * There are a few macros defined in fribidi-joining-types.h for querying a + * joining type. + */ +FRIBIDI_ENTRY FriBidiJoiningType +fribidi_get_joining_type ( + FriBidiChar ch /* input character */ +) FRIBIDI_GNUC_CONST; + +/* fribidi_get_joining_types - get joining types for an string of characters + * + * This function finds the joining types of an string of characters. See + * fribidi_get_joining_type for more information about the joining types + * returned by this function. + */ + FRIBIDI_ENTRY void fribidi_get_joining_types ( + const FriBidiChar *str, /* input string */ + const FriBidiStrIndex len, /* input string length */ + FriBidiJoiningType *jtypes /* output joining types */ +); + +/* fribidi_get_joining_type_name - get joining type name + * + * This function returns the joining type name of a joining type. The + * returned string is a static string and should not be freed. + * + * The type names are the same as ones defined in Table 8-2 Primary Arabic + * Joining Classes of the Unicode standard available at + * http://www.unicode.org/versions/Unicode4.0.0/ch08.pdf#G7462. + */ + FRIBIDI_ENTRY const char *fribidi_get_joining_type_name ( + FriBidiJoiningType j /* input joining type */ +) FRIBIDI_GNUC_CONST; + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_JOINING_TYPES_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-joining.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-joining.h new file mode 100755 index 00000000..92539dd0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-joining.h @@ -0,0 +1,74 @@ +/* FriBidi + * fribidi-joining.h - Arabic joining algorithm + * + * Authors: + * Behdad Esfahbod, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc + * Copyright (C) 2004 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_JOINING_H +#define _FRIBIDI_JOINING_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" +#include "fribidi-bidi-types.h" +#include "fribidi-joining-types.h" + +#include "fribidi-begindecls.h" + +/* fribidi_join_arabic - do Arabic joining + * + * This function does the Arabic joining algorithm. Means, given Arabic + * joining types of the characters in ar_props (don't worry, + * FriBidiJoiningType can be casted to FriBidiArabicProp automagically), this + * function modifies this properties to grasp the effect of neighboring + * characters. You probably need this information later to do Arabic shaping. + * + * This function implements rules R1 to R7 inclusive (all rules) of the Arabic + * Cursive Joining algorithm of the Unicode standard as available at + * http://www.unicode.org/versions/Unicode4.0.0/ch08.pdf#G7462. It also + * interacts correctly with the bidirection algorithm as defined in Section + * 3.5 Shaping of the Unicode Bidirectional Algorithm available at + * http://www.unicode.org/reports/tr9/#Shaping. + * + * There are a few macros defined in fribidi-joining-types.h for querying the + * Arabic properties computed by this function. + */ +FRIBIDI_ENTRY void fribidi_join_arabic ( + const FriBidiCharType *bidi_types, /* input list of bidi types as + returned by + fribidi_get_bidi_types() */ + const FriBidiStrIndex len, /* input string length */ + const FriBidiLevel *embedding_levels, /* input list of embedding + levels, as returned by + fribidi_get_par_embedding_levels */ + FriBidiArabicProp *ar_props /* Arabic properties to analyze, initialized by + joining types, as returned by + fribidi_get_joining_types */ +); + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_JOINING_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-mirroring.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-mirroring.h new file mode 100755 index 00000000..ddc3a14f --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-mirroring.h @@ -0,0 +1,86 @@ +/* fribidi-mirroring.h - get mirrored character + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc + * Copyright (C) 2001, 2002, 2004 Behdad Esfahbod + * Copyright (C) 1999, 2000, 2017 Dov Grobgeld + * + * This file is part of GNU FriBidi. + * + * GNU FriBidi is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * GNU FriBidi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GNU FriBidi; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * For licensing issues, contact <fribidi.license@gmail.com> or write to + * Sharif FarsiWeb, Inc., PO Box 13445-389, Tehran, Iran. + * + * Author(s): + * Behdad Esfahbod, 2001, 2002, 2004 + * Dov Grobgeld, 1999, 2000 + */ +#ifndef _FRIBIDI_MIRRORING_H +#define _FRIBIDI_MIRRORING_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" +#include "fribidi-bidi-types.h" + +#include "fribidi-begindecls.h" + +/* fribidi_get_mirror_char - get mirrored character + * + * This function finds the mirrored equivalent of a character as defined in + * the file BidiMirroring.txt of the Unicode Character Database available at + * http://www.unicode.org/Public/UNIDATA/BidiMirroring.txt. + * + * If the input character is a declared as a mirroring character in the + * Unicode standard and has a mirrored equivalent. The matching mirrored + * character is put in the output, otherwise the input character itself is + * put. + * + * Returns: if the character has a mirroring equivalent or not. + */ +FRIBIDI_ENTRY fribidi_boolean fribidi_get_mirror_char ( + FriBidiChar ch, /* input character */ + FriBidiChar *mirrored_ch /* output mirrored character */ +); + +/* fribidi_shape_mirroring - do mirroring shaping + * + * This functions replaces mirroring characters on right-to-left embeddings in + * string with their mirrored equivalent as returned by + * fribidi_get_mirror_char(). + * + * This function implements rule L4 of the Unicode Bidirectional Algorithm + * available at http://www.unicode.org/reports/tr9/#L4. + */ +FRIBIDI_ENTRY void fribidi_shape_mirroring ( + const FriBidiLevel *embedding_levels, /* input list of embedding + levels, as returned by + fribidi_get_par_embedding_levels */ + const FriBidiStrIndex len, /* input string length */ + FriBidiChar *str /* string to shape */ +); + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_MIRRORING_H */ +/* Editor directions: + * Local Variables: + * mode: c + * c-basic-offset: 2 + * indent-tabs-mode: t + * tab-width: 8 + * End: + * vim: textwidth=78: autoindent: cindent: shiftwidth=2: tabstop=8: + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-shape.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-shape.h new file mode 100755 index 00000000..ff258b5c --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-shape.h @@ -0,0 +1,71 @@ +/* FriBidi + * fribidi-shape.h - shaping + * + * Author: + * Behdad Esfahbod, 2004, 2005 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc + * Copyright (C) 2004, 2005 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_SHAPE_H +#define _FRIBIDI_SHAPE_H + +#include "fribidi-types.h" +#include "fribidi-flags.h" +#include "fribidi-bidi-types.h" +#include "fribidi-joining-types.h" + +#include "fribidi-begindecls.h" + + +/* fribidi_shape - do bidi-aware shaping + * + * This function does all shaping work that depends on the resolved embedding + * levels of the characters. Currently it does mirroring and Arabic shaping, + * but the list may grow in the future. This function is a wrapper around + * fribidi_shape_mirroring and fribidi_shape_arabic. + * + * The flags parameter specifies which shapings are applied. The only flags + * affecting the functionality of this function are those beginning with + * FRIBIDI_FLAG_SHAPE_. Of these, only FRIBIDI_FLAG_SHAPE_MIRRORING is on + * in FRIBIDI_FLAGS_DEFAULT. For details of the Arabic-specific flags see + * fribidi_shape_arabic. If ar_props is NULL, no Arabic shaping is performed. + * + * Feel free to do your own shaping before or after calling this function, + * but you should take care of embedding levels yourself then. + */ +FRIBIDI_ENTRY void fribidi_shape ( + FriBidiFlags flags, /* shaping flags */ + const FriBidiLevel *embedding_levels, /* input list of embedding + levels, as returned by + fribidi_get_par_embedding_levels */ + const FriBidiStrIndex len, /* input string length */ + FriBidiArabicProp *ar_props, /* input/output Arabic properties as + * computed by fribidi_join_arabic */ + FriBidiChar *str /* string to shape */ +); + + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_SHAPE_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-types.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-types.h new file mode 100755 index 00000000..9f1746fa --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-types.h @@ -0,0 +1,83 @@ +/* FriBidi + * fribidi-types.h - define data types for the rest of the library + * + * Author: + * Behdad Esfahbod, 2001, 2002, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc. + * Copyright (C) 2001,2002 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_TYPES_H +#define _FRIBIDI_TYPES_H + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include "fribidi-common.h" + +#include "fribidi-begindecls.h" + + +# if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || \ + defined (_sgi) || defined (__sun) || defined (sun) || \ + defined (__digital__) || defined (__HP_cc) +# include <inttypes.h> +# elif defined (_AIX) +# include <sys/inttypes.h> +# else +# include <stdint.h> +# endif + +typedef int fribidi_boolean; + +typedef uint32_t FriBidiChar; +typedef int FriBidiStrIndex; + +/* The MSB is used to indicate an opening bracket */ +typedef FriBidiChar FriBidiBracketType; + +/* Use FRIBIDI_NO_BRACKET for assigning to a non-bracket */ +#define FRIBIDI_NO_BRACKET 0 + +/* A few macros for working with bits */ + +#define FRIBIDI_TEST_BITS(x, mask) (((x) & (mask)) ? 1 : 0) + +#define FRIBIDI_INCLUDE_BITS(x, mask) ((x) | (mask)) + +#define FRIBIDI_EXCLUDE_BITS(x, mask) ((x) & ~(mask)) + +#define FRIBIDI_SET_BITS(x, mask) ((x) |= (mask)) + +#define FRIBIDI_UNSET_BITS(x, mask) ((x) &= ~(mask)) + +#define FRIBIDI_ADJUST_BITS(x, mask, cond) \ + ((x) = ((x) & ~(mask)) | ((cond) ? (mask) : 0)) + +#define FRIBIDI_ADJUST_AND_TEST_BITS(x, mask, cond) \ + FRIBIDI_TEST_BITS(FRIBIDI_ADJUST_BITS((x), (mask), (cond)), (mask)) + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_TYPES_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-unicode-version.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-unicode-version.h new file mode 100755 index 00000000..6d8ed04e --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-unicode-version.h @@ -0,0 +1,10 @@ +/* fribidi-unicode-version.h + * generated by gen-unicode-version (GNU FriBidi 1.0.1) + * from the file ReadMe.txt */ + +#define FRIBIDI_UNICODE_VERSION "10.0.0" +#define FRIBIDI_UNICODE_MAJOR_VERSION 10 +#define FRIBIDI_UNICODE_MINOR_VERSION 0 +#define FRIBIDI_UNICODE_MICRO_VERSION 0 + +/* End of generated fribidi-unicode-version.h */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-unicode.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-unicode.h new file mode 100755 index 00000000..b057c8aa --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi-unicode.h @@ -0,0 +1,105 @@ +/* FriBidi + * fribidi-unicode.h - general Unicode definitions + * + * Author: + * Behdad Esfahbod, 2001, 2002, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc + * Copyright (C) 2001,2002 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_UNICODE_H +#define _FRIBIDI_UNICODE_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" + +#include "fribidi-begindecls.h" + +/* We do not support surrogates yet */ +#define FRIBIDI_UNICODE_CHARS (sizeof(FriBidiChar) >= 4 ? 0x110000 : 0xFFFE) + +/* Unicode version - FRIBIDI_UNICODE_VERSION */ +#ifdef DONT_HAVE_FRIBIDI_UNICODE_VERSION_H +# define FRIBIDI_UNICODE_VERSION "unknown" +#else /* !DONT_HAVE_FRIBIDI_UNICODE_VERSION_H */ +# include "fribidi-unicode-version.h" +#endif /* !DONT_HAVE_FRIBIDI_UNICODE_VERSION_H */ + +/* An string containing the version the Unicode standard implemented, + * in the form of "x.y.z", or "unknown". */ +extern const char *fribidi_unicode_version; + + +/* Unicode Bidirectional Algorithm definitions: */ + +/* Number of types defined in the bidi algorithm */ +#define FRIBIDI_BIDI_NUM_TYPES 19 + +/* The maximum embedding level value assigned by explicit marks */ +#define FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL 125 + +/* The maximum *number* of different resolved embedding levels: 0-126 */ +#define FRIBIDI_BIDI_MAX_RESOLVED_LEVELS 127 + +/* The maximum *number* of nested brackets: 0-63 */ +#define FRIBIDI_BIDI_MAX_NESTED_BRACKET_PAIRS 63 + +/* A few Unicode characters: */ + +/* Bidirectional marks */ +#define FRIBIDI_CHAR_LRM 0x200E +#define FRIBIDI_CHAR_RLM 0x200F +#define FRIBIDI_CHAR_LRE 0x202A +#define FRIBIDI_CHAR_RLE 0x202B +#define FRIBIDI_CHAR_PDF 0x202C +#define FRIBIDI_CHAR_LRO 0x202D +#define FRIBIDI_CHAR_RLO 0x202E +#define FRIBIDI_CHAR_LRI 0x2066 +#define FRIBIDI_CHAR_RLI 0x2067 +#define FRIBIDI_CHAR_FSI 0x2068 +#define FRIBIDI_CHAR_PDI 0x2069 + +/* Line and Paragraph Separators */ +#define FRIBIDI_CHAR_LS 0x2028 +#define FRIBIDI_CHAR_PS 0x2029 + +/* Arabic Joining marks */ +#define FRIBIDI_CHAR_ZWNJ 0x200C +#define FRIBIDI_CHAR_ZWJ 0x200D + +/* Hebrew and Arabic */ +#define FRIBIDI_CHAR_HEBREW_ALEF 0x05D0 +#define FRIBIDI_CHAR_ARABIC_ALEF 0x0627 +#define FRIBIDI_CHAR_ARABIC_ZERO 0x0660 +#define FRIBIDI_CHAR_PERSIAN_ZERO 0x06F0 + +/* Misc */ +#define FRIBIDI_CHAR_ZWNBSP 0xFEFF + +/* Char we place for a deleted slot, to delete later */ +#define FRIBIDI_CHAR_FILL FRIBIDI_CHAR_ZWNBSP + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_UNICODE_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi.h b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi.h new file mode 100755 index 00000000..c925bd59 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/include/fribidi/fribidi.h @@ -0,0 +1,63 @@ +/* FriBidi + * fribidi.h - Unicode bidirectional and Arabic joining/shaping algorithms + * + * Author: + * Behdad Esfahbod, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_H +#define _FRIBIDI_H + +#include "fribidi-common.h" + +#include "fribidi-unicode.h" +#include "fribidi-types.h" +#include "fribidi-flags.h" +#include "fribidi-bidi-types.h" +#include "fribidi-bidi.h" +#include "fribidi-joining-types.h" +#include "fribidi-joining.h" +#include "fribidi-mirroring.h" +#include "fribidi-brackets.h" +#include "fribidi-arabic.h" +#include "fribidi-shape.h" +#include "fribidi-char-sets.h" + + +#ifdef FRIBIDI_NO_DEPRECATED +#else +# include "fribidi-deprecated.h" +#endif /* !FRIBIDI_NO_DEPRECATED */ + + +#include "fribidi-begindecls.h" + + + +/* An string containing the version information of the library. */ +FRIBIDI_ENTRY const char *fribidi_version_info; + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/lib/libfribidi.0.dylib b/frameworks/cairosvg/dependencies/fribidi/1.0.2/lib/libfribidi.0.dylib new file mode 100755 index 00000000..95b56db5 Binary files /dev/null and b/frameworks/cairosvg/dependencies/fribidi/1.0.2/lib/libfribidi.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.2/lib/libfribidi.dylib b/frameworks/cairosvg/dependencies/fribidi/1.0.2/lib/libfribidi.dylib new file mode 120000 index 00000000..fe6d5626 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.2/lib/libfribidi.dylib @@ -0,0 +1 @@ +libfribidi.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-arabic.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-arabic.h new file mode 100755 index 00000000..ea82c68a --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-arabic.h @@ -0,0 +1,81 @@ +/* fribidi-arabic.h - do Arabic shaping to presentation forms + * + * Copyright (C) 2005 Behdad Esfahbod + * + * This file is part of GNU FriBidi. + * + * GNU FriBidi is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * GNU FriBidi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GNU FriBidi; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * For licensing issues, contact <fribidi.license@gmail.com> or write to + * Sharif FarsiWeb, Inc., PO Box 13445-389, Tehran, Iran. + * + * Author(s): + * Behdad Esfahbod, 2005 + */ +#ifndef _FRIBIDI_ARABIC_H +#define _FRIBIDI_ARABIC_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" +#include "fribidi-flags.h" +#include "fribidi-bidi-types.h" +#include "fribidi-joining.h" + +#include "fribidi-begindecls.h" + + +/* fribidi_shape_arabic - do Arabic shaping + * + * The actual shaping that is done depends on the flags set. Only flags + * starting with FRIBIDI_FLAG_SHAPE_ARAB_ affect this function. + * Currently these are: + * + * * FRIBIDI_FLAG_SHAPE_MIRRORING: Do mirroring. + * * FRIBIDI_FLAG_SHAPE_ARAB_PRES: Shape Arabic characters to their + * presentation form glyphs. + * * FRIBIDI_FLAG_SHAPE_ARAB_LIGA: Form mandatory Arabic ligatures. + * * FRIBIDI_FLAG_SHAPE_ARAB_CONSOLE: Perform additional Arabic shaping + * suitable for text rendered on + * grid terminals with no mark + * rendering capabilities. + * + * Of the above, FRIBIDI_FLAG_SHAPE_ARAB_CONSOLE is only used in special + * cases, but the rest are recommended in any environment that doesn't have + * other means for doing Arabic shaping. The set of extra flags that enable + * this level of Arabic support has a shortcut named FRIBIDI_FLAGS_ARABIC. + */ +FRIBIDI_ENTRY void +fribidi_shape_arabic ( + FriBidiFlags flags, /* shaping flags */ + const FriBidiLevel *embedding_levels, + const FriBidiStrIndex len, /* input string length */ + FriBidiArabicProp *ar_props, /* input/output Arabic properties as + * computed by fribidi_join_arabic */ + FriBidiChar *str /* string to shape */ +); + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_ARABIC_H */ +/* Editor directions: + * Local Variables: + * mode: c + * c-basic-offset: 2 + * indent-tabs-mode: t + * tab-width: 8 + * End: + * vim: textwidth=78: autoindent: cindent: shiftwidth=2: tabstop=8: + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-begindecls.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-begindecls.h new file mode 100755 index 00000000..0f4acdd1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-begindecls.h @@ -0,0 +1,3 @@ +#ifdef FRIBIDI_BEGIN_DECLS +FRIBIDI_BEGIN_DECLS +#endif /* FRIBIDI_BEGIN_DECLS */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-bidi-types-list.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-bidi-types-list.h new file mode 100755 index 00000000..c4ffc6f1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-bidi-types-list.h @@ -0,0 +1,96 @@ +#ifndef __FRIBIDI_DOC +/* FriBidi + * fribidi-bidi-types-list.h - list of bidi types + * + * Author: + * Behdad Esfahbod, 2001, 2002, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc. + * Copyright (C) 2001,2002 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +/* *INDENT-OFF* */ +#endif /* !__FRIBIDI_DOC */ +#ifndef _FRIBIDI_ADD_TYPE +# define _FRIBIDI_ADD_TYPE(x,y) +#endif +#ifndef _FRIBIDI_ADD_ALIAS +# define _FRIBIDI_ADD_ALIAS(x1,x2) +#endif + +#if !defined(_FRIBIDI_PAR_TYPES) || defined(_FRIBIDI_ALL_TYPES) + +_FRIBIDI_ADD_TYPE (LTR, 'L') /* Left-To-Right letter */ +_FRIBIDI_ADD_TYPE (RTL, 'R') /* Right-To-Left letter */ +_FRIBIDI_ADD_TYPE (AL, 'A') /* Arabic Letter */ +_FRIBIDI_ADD_TYPE (EN, '1') /* European Numeral */ +_FRIBIDI_ADD_TYPE (AN, '9') /* Arabic Numeral */ +_FRIBIDI_ADD_TYPE (ES, 'w') /* European number Separator */ +_FRIBIDI_ADD_TYPE (ET, 'w') /* European number Terminator */ +_FRIBIDI_ADD_TYPE (CS, 'w') /* Common Separator */ +_FRIBIDI_ADD_TYPE (NSM, '`') /* Non Spacing Mark */ +_FRIBIDI_ADD_TYPE (BN, 'b') /* Boundary Neutral */ +_FRIBIDI_ADD_TYPE (BS, 'B') /* Block Separator */ +_FRIBIDI_ADD_TYPE (SS, 'S') /* Segment Separator */ +_FRIBIDI_ADD_TYPE (WS, '_') /* WhiteSpace */ +_FRIBIDI_ADD_TYPE (ON, 'n') /* Other Neutral */ +_FRIBIDI_ADD_TYPE (LRE, '+') /* Left-to-Right Embedding */ +_FRIBIDI_ADD_TYPE (RLE, '+') /* Right-to-Left Embedding */ +_FRIBIDI_ADD_TYPE (LRO, '+') /* Left-to-Right Override */ +_FRIBIDI_ADD_TYPE (RLO, '+') /* Right-to-Left Override */ +_FRIBIDI_ADD_TYPE (PDF, '-') /* Pop Directional Flag */ +_FRIBIDI_ADD_TYPE (LRI, '+') /* Left-to-Right Isolate */ +_FRIBIDI_ADD_TYPE (RLI, '+') /* Right-to-Left Isolate */ +_FRIBIDI_ADD_TYPE (FSI, '+') /* First-Strong Isolate */ +_FRIBIDI_ADD_TYPE (PDI, '-') /* Pop Directional Isolate */ + +#if defined(_FRIBIDI_ADD_ALIAS) +_FRIBIDI_ADD_ALIAS (L, LTR) +_FRIBIDI_ADD_ALIAS (R, RTL) +_FRIBIDI_ADD_ALIAS (B, BS) +_FRIBIDI_ADD_ALIAS (S, SS) +#endif /* _FRIBIDI_ADD_ALIAS */ + +#if defined(_FRIBIDI_SENTINEL_TYPE) || defined(_FRIBIDI_ALL_TYPES) +_FRIBIDI_ADD_TYPE (SENTINEL, '$') /* SENTINEL */ +#endif /* _FRIBIDI_SENTINEL_TYPES || _FRIBIDI_ALL_TYPES*/ +#endif /* !_FRIBIDI_PAR_TYPES || _FRIBIDI_ALL_TYPES */ + +#if defined(_FRIBIDI_PAR_TYPES) || defined(_FRIBIDI_ALL_TYPES) +# if !defined(_FRIBIDI_ALL_TYPES) +_FRIBIDI_ADD_TYPE (LTR, 'L') /* Left-To-Right paragraph */ +_FRIBIDI_ADD_TYPE (RTL, 'R') /* Right-To-Left paragraph */ +_FRIBIDI_ADD_TYPE (ON, 'n') /* directiOn-Neutral paragraph */ +# endif /* !_FRIBIDI_ALL_TYPES */ +_FRIBIDI_ADD_TYPE (WLTR, 'l') /* Weak Left To Right paragraph */ +_FRIBIDI_ADD_TYPE (WRTL, 'r') /* Weak Right To Left paragraph */ +#endif /* _FRIBIDI_PAR_TYPES || _FRIBIDI_ALL_TYPES*/ + +#if defined(_FRIBIDI_ENUM_TYPES) +typedef enum { +# define _FRIBIDI_ADD_TYPE _FRIBIDI_ENUM_ADD_TYPE +# include "fribidi-bidi-types-list.h" +# undef _FRIBIDI_ADD_TYPE + _FRIBIDI_TYPES_MAX +} _FRIBIDI_ENUM_TYPES +#endif /* _FRIBIDI_ENUM_TYPES */ + +#ifndef __FRIBIDI_DOC +/* *INDENT-ON* */ +#endif /* !__FRIBIDI_DOC */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-bidi-types.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-bidi-types.h new file mode 100755 index 00000000..db947a56 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-bidi-types.h @@ -0,0 +1,405 @@ +/* FriBidi + * fribidi-bidi-types.h - character bidi types + * + * Author: + * Behdad Esfahbod, 2001, 2002, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc. + * Copyright (C) 2001,2002 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_BIDI_TYPES_H +#define _FRIBIDI_BIDI_TYPES_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" + +#include "fribidi-begindecls.h" + +typedef signed char FriBidiLevel; + +/* + * Define bit masks that bidi types are based on, each mask has + * only one bit set. + */ + +/* RTL mask better be the least significant bit. */ +#define FRIBIDI_MASK_RTL 0x00000001L /* Is right to left */ +#define FRIBIDI_MASK_ARABIC 0x00000002L /* Is arabic */ + +/* Each char can be only one of the three following. */ +#define FRIBIDI_MASK_STRONG 0x00000010L /* Is strong */ +#define FRIBIDI_MASK_WEAK 0x00000020L /* Is weak */ +#define FRIBIDI_MASK_NEUTRAL 0x00000040L /* Is neutral */ +#define FRIBIDI_MASK_SENTINEL 0x00000080L /* Is sentinel */ +/* Sentinels are not valid chars, just identify the start/end of strings. */ + +/* Each char can be only one of the six following. */ +#define FRIBIDI_MASK_LETTER 0x00000100L /* Is letter: L, R, AL */ +#define FRIBIDI_MASK_NUMBER 0x00000200L /* Is number: EN, AN */ +#define FRIBIDI_MASK_NUMSEPTER 0x00000400L /* Is separator or terminator: ES, ET, CS */ +#define FRIBIDI_MASK_SPACE 0x00000800L /* Is space: BN, BS, SS, WS */ +#define FRIBIDI_MASK_EXPLICIT 0x00001000L /* Is explicit mark: LRE, RLE, LRO, RLO, PDF */ +#define FRIBIDI_MASK_ISOLATE 0x00008000L /* Is isolate mark: LRI, RLI, FSI, PDI */ + +/* Can be set only if FRIBIDI_MASK_SPACE is also set. */ +#define FRIBIDI_MASK_SEPARATOR 0x00002000L /* Is text separator: BS, SS */ +/* Can be set only if FRIBIDI_MASK_EXPLICIT is also set. */ +#define FRIBIDI_MASK_OVERRIDE 0x00004000L /* Is explicit override: LRO, RLO */ +#define FRIBIDI_MASK_FIRST 0x02000000L /* Whether direction is determined by first strong */ + + +/* The following exist to make types pairwise different, some of them can + * be removed but are here because of efficiency (make queries faster). */ + +#define FRIBIDI_MASK_ES 0x00010000L +#define FRIBIDI_MASK_ET 0x00020000L +#define FRIBIDI_MASK_CS 0x00040000L + +#define FRIBIDI_MASK_NSM 0x00080000L +#define FRIBIDI_MASK_BN 0x00100000L + +#define FRIBIDI_MASK_BS 0x00200000L +#define FRIBIDI_MASK_SS 0x00400000L +#define FRIBIDI_MASK_WS 0x00800000L + +/* We reserve a single bit for user's private use: we will never use it. */ +#define FRIBIDI_MASK_PRIVATE 0x01000000L + + +/* + * Define values for FriBidiCharType + */ + +/* Strong types */ + +/* Left-To-Right letter */ +#define FRIBIDI_TYPE_LTR_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER ) +/* Right-To-Left letter */ +#define FRIBIDI_TYPE_RTL_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER \ + | FRIBIDI_MASK_RTL) +/* Arabic Letter */ +#define FRIBIDI_TYPE_AL_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER \ + | FRIBIDI_MASK_RTL | FRIBIDI_MASK_ARABIC ) +/* Left-to-Right Embedding */ +#define FRIBIDI_TYPE_LRE_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT) +/* Right-to-Left Embedding */ +#define FRIBIDI_TYPE_RLE_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT \ + | FRIBIDI_MASK_RTL ) +/* Left-to-Right Override */ +#define FRIBIDI_TYPE_LRO_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT \ + | FRIBIDI_MASK_OVERRIDE ) +/* Right-to-Left Override */ +#define FRIBIDI_TYPE_RLO_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT \ + | FRIBIDI_MASK_RTL | FRIBIDI_MASK_OVERRIDE ) + +/* Weak types */ + +/* Pop Directional Flag*/ +#define FRIBIDI_TYPE_PDF_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_EXPLICIT ) +/* European Numeral */ +#define FRIBIDI_TYPE_EN_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMBER ) +/* Arabic Numeral */ +#define FRIBIDI_TYPE_AN_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMBER \ + | FRIBIDI_MASK_ARABIC ) +/* European number Separator */ +#define FRIBIDI_TYPE_ES_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMSEPTER \ + | FRIBIDI_MASK_ES ) +/* European number Terminator */ +#define FRIBIDI_TYPE_ET_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMSEPTER \ + | FRIBIDI_MASK_ET ) +/* Common Separator */ +#define FRIBIDI_TYPE_CS_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMSEPTER \ + | FRIBIDI_MASK_CS ) +/* Non Spacing Mark */ +#define FRIBIDI_TYPE_NSM_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NSM ) +/* Boundary Neutral */ +#define FRIBIDI_TYPE_BN_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_SPACE \ + | FRIBIDI_MASK_BN ) + +/* Neutral types */ + +/* Block Separator */ +#define FRIBIDI_TYPE_BS_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_SPACE \ + | FRIBIDI_MASK_SEPARATOR | FRIBIDI_MASK_BS ) +/* Segment Separator */ +#define FRIBIDI_TYPE_SS_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_SPACE \ + | FRIBIDI_MASK_SEPARATOR | FRIBIDI_MASK_SS ) +/* WhiteSpace */ +#define FRIBIDI_TYPE_WS_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_SPACE \ + | FRIBIDI_MASK_WS ) +/* Other Neutral */ +#define FRIBIDI_TYPE_ON_VAL ( FRIBIDI_MASK_NEUTRAL ) + + +/* The following are used in specifying paragraph direction only. */ + +/* Weak Left-To-Right */ +#define FRIBIDI_TYPE_WLTR_VAL ( FRIBIDI_MASK_WEAK ) +/* Weak Right-To-Left */ +#define FRIBIDI_TYPE_WRTL_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_RTL ) + +/* start or end of text (run list) SENTINEL. Only used internally */ +#define FRIBIDI_TYPE_SENTINEL ( FRIBIDI_MASK_SENTINEL ) + +/* Private types for applications. More private types can be obtained by + * summing up from this one. */ +#define FRIBIDI_TYPE_PRIVATE ( FRIBIDI_MASK_PRIVATE ) + + +/* New types in Unicode 6.3 */ + +/* Left-to-Right Isolate */ +#define FRIBIDI_TYPE_LRI_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_ISOLATE ) +/* Right-to-Left Isolate */ +#define FRIBIDI_TYPE_RLI_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_ISOLATE | FRIBIDI_MASK_RTL ) +/* First strong isolate */ +#define FRIBIDI_TYPE_FSI_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_ISOLATE | FRIBIDI_MASK_FIRST ) + +/* Pop Directional Isolate*/ +#define FRIBIDI_TYPE_PDI_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_WEAK | FRIBIDI_MASK_ISOLATE ) + +/* Define Enums only if sizeof(int) == 4 (UTF-32), and not compiling C++. + * The problem with C++ is that then casts between int32 and enum will fail! + */ +#if defined(__FRIBIDI_DOC) || (FRIBIDI_SIZEOF_INT+0 == 4 && !defined(__cplusplus)) + +typedef enum +{ +# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) \ + FRIBIDI_TYPE_##TYPE = FRIBIDI_TYPE_##TYPE##_VAL, +# include "fribidi-bidi-types-list.h" +# undef _FRIBIDI_ADD_TYPE + _FRIBIDI_TYPE_SENTINEL = FRIBIDI_TYPE_SENTINEL /* Don't use this */ +} FriBidiCharType; + +typedef enum +{ +# define _FRIBIDI_PAR_TYPES +# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) \ + FRIBIDI_PAR_##TYPE = FRIBIDI_TYPE_##TYPE##_VAL, +# include "fribidi-bidi-types-list.h" +# undef _FRIBIDI_ADD_TYPE +# undef _FRIBIDI_PAR_TYPES + _FRIBIDI_PAR_SENTINEL = FRIBIDI_TYPE_SENTINEL /* Don't use this */ +} FriBidiParType; + +#else + +typedef uint32_t FriBidiCharType; +# define FRIBIDI_TYPE_LTR FRIBIDI_TYPE_LTR_VAL +# define FRIBIDI_TYPE_RTL FRIBIDI_TYPE_RTL_VAL +# define FRIBIDI_TYPE_AL FRIBIDI_TYPE_AL_VAL +# define FRIBIDI_TYPE_EN FRIBIDI_TYPE_EN_VAL +# define FRIBIDI_TYPE_AN FRIBIDI_TYPE_AN_VAL +# define FRIBIDI_TYPE_ES FRIBIDI_TYPE_ES_VAL +# define FRIBIDI_TYPE_ET FRIBIDI_TYPE_ET_VAL +# define FRIBIDI_TYPE_CS FRIBIDI_TYPE_CS_VAL +# define FRIBIDI_TYPE_NSM FRIBIDI_TYPE_NSM_VAL +# define FRIBIDI_TYPE_BN FRIBIDI_TYPE_BN_VAL +# define FRIBIDI_TYPE_BS FRIBIDI_TYPE_BS_VAL +# define FRIBIDI_TYPE_SS FRIBIDI_TYPE_SS_VAL +# define FRIBIDI_TYPE_WS FRIBIDI_TYPE_WS_VAL +# define FRIBIDI_TYPE_ON FRIBIDI_TYPE_ON_VAL +# define FRIBIDI_TYPE_LRE FRIBIDI_TYPE_LRE_VAL +# define FRIBIDI_TYPE_RLE FRIBIDI_TYPE_RLE_VAL +# define FRIBIDI_TYPE_LRO FRIBIDI_TYPE_LRO_VAL +# define FRIBIDI_TYPE_RLO FRIBIDI_TYPE_RLO_VAL +# define FRIBIDI_TYPE_PDF FRIBIDI_TYPE_PDF_VAL +# define FRIBIDI_TYPE_LRI FRIBIDI_TYPE_PDF_LRI +# define FRIBIDI_TYPE_RLI FRIBIDI_TYPE_PDF_RLI +# define FRIBIDI_TYPE_FSI FRIBIDI_TYPE_PDF_FSI +# define FRIBIDI_TYPE_PDI FRIBIDI_TYPE_PDF_PDI + +typedef uint32_t FriBidiParType; +# define FRIBIDI_PAR_LTR FRIBIDI_TYPE_LTR_VAL +# define FRIBIDI_PAR_RTL FRIBIDI_TYPE_RTL_VAL +# define FRIBIDI_PAR_ON FRIBIDI_TYPE_ON_VAL +# define FRIBIDI_PAR_WLTR FRIBIDI_TYPE_WLTR_VAL +# define FRIBIDI_PAR_WRTL FRIBIDI_TYPE_WRTL_VAL + +#endif + +/* Please don't use these two type names, use FRIBIDI_PAR_* form instead. */ +#define FRIBIDI_TYPE_WLTR FRIBIDI_PAR_WLTR +#define FRIBIDI_TYPE_WRTL FRIBIDI_PAR_WRTL + + +/* + * Defining macros for needed queries, It is fully dependent on the + * implementation of FriBidiCharType. + */ + + +/* Is right-to-left level? */ +#define FRIBIDI_LEVEL_IS_RTL(lev) ((lev) & 1) + +/* Return the bidi type corresponding to the direction of the level number, + FRIBIDI_TYPE_LTR for evens and FRIBIDI_TYPE_RTL for odds. */ +#define FRIBIDI_LEVEL_TO_DIR(lev) \ + (FRIBIDI_LEVEL_IS_RTL (lev) ? FRIBIDI_TYPE_RTL : FRIBIDI_TYPE_LTR) + +/* Return the minimum level of the direction, 0 for FRIBIDI_TYPE_LTR and + 1 for FRIBIDI_TYPE_RTL and FRIBIDI_TYPE_AL. */ +#define FRIBIDI_DIR_TO_LEVEL(dir) \ + ((FriBidiLevel) (FRIBIDI_IS_RTL (dir) ? 1 : 0)) + +/* Is right to left: RTL, AL, RLE, RLO? */ +#define FRIBIDI_IS_RTL(p) ((p) & FRIBIDI_MASK_RTL) +/* Is arabic: AL, AN? */ +#define FRIBIDI_IS_ARABIC(p) ((p) & FRIBIDI_MASK_ARABIC) + +/* Is strong? */ +#define FRIBIDI_IS_STRONG(p) ((p) & FRIBIDI_MASK_STRONG) +/* Is weak? */ +#define FRIBIDI_IS_WEAK(p) ((p) & FRIBIDI_MASK_WEAK) +/* Is neutral? */ +#define FRIBIDI_IS_NEUTRAL(p) ((p) & FRIBIDI_MASK_NEUTRAL) +/* Is sentinel? */ +#define FRIBIDI_IS_SENTINEL(p) ((p) & FRIBIDI_MASK_SENTINEL) + +/* Is letter: L, R, AL? */ +#define FRIBIDI_IS_LETTER(p) ((p) & FRIBIDI_MASK_LETTER) +/* Is number: EN, AN? */ +#define FRIBIDI_IS_NUMBER(p) ((p) & FRIBIDI_MASK_NUMBER) +/* Is number separator or terminator: ES, ET, CS? */ +#define FRIBIDI_IS_NUMBER_SEPARATOR_OR_TERMINATOR(p) \ + ((p) & FRIBIDI_MASK_NUMSEPTER) +/* Is space: BN, BS, SS, WS? */ +#define FRIBIDI_IS_SPACE(p) ((p) & FRIBIDI_MASK_SPACE) +/* Is explicit mark: LRE, RLE, LRO, RLO, PDF? */ +#define FRIBIDI_IS_EXPLICIT(p) ((p) & FRIBIDI_MASK_EXPLICIT) +/* Is isolator */ +#define FRIBIDI_IS_ISOLATE(p) ((p) & FRIBIDI_MASK_ISOLATE) + +/* Is text separator: BS, SS? */ +#define FRIBIDI_IS_SEPARATOR(p) ((p) & FRIBIDI_MASK_SEPARATOR) + +/* Is explicit override: LRO, RLO? */ +#define FRIBIDI_IS_OVERRIDE(p) ((p) & FRIBIDI_MASK_OVERRIDE) + +/* Some more: */ + +/* Is left to right letter: LTR? */ +#define FRIBIDI_IS_LTR_LETTER(p) \ + ((p) & (FRIBIDI_MASK_LETTER | FRIBIDI_MASK_RTL) == FRIBIDI_MASK_LETTER) + +/* Is right to left letter: RTL, AL? */ +#define FRIBIDI_IS_RTL_LETTER(p) \ + ((p) & (FRIBIDI_MASK_LETTER | FRIBIDI_MASK_RTL) \ + == (FRIBIDI_MASK_LETTER | FRIBIDI_MASK_RTL)) + +/* Is ES or CS: ES, CS? */ +#define FRIBIDI_IS_ES_OR_CS(p) \ + ((p) & (FRIBIDI_MASK_ES | FRIBIDI_MASK_CS)) + +/* Is explicit or BN: LRE, RLE, LRO, RLO, PDF, BN? */ +#define FRIBIDI_IS_EXPLICIT_OR_BN(p) \ + ((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_BN)) + +/* Is explicit or BN or NSM: LRE, RLE, LRO, RLO, PDF, BN, NSM? */ +#define FRIBIDI_IS_EXPLICIT_OR_BN_OR_NSM(p) \ + ((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_BN | FRIBIDI_MASK_NSM)) + +/* Is explicit or BN or NSM: LRE, RLE, LRO, RLO, PDF, BN, NSM? */ +#define FRIBIDI_IS_EXPLICIT_OR_ISOLATE_OR_BN_OR_NSM(p) \ + ((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_ISOLATE | FRIBIDI_MASK_BN | FRIBIDI_MASK_NSM)) + +/* Is explicit or BN or WS: LRE, RLE, LRO, RLO, PDF, BN, WS? */ +#define FRIBIDI_IS_EXPLICIT_OR_BN_OR_WS(p) \ + ((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_BN | FRIBIDI_MASK_WS)) + +/* Is explicit or separator or BN or WS: LRE, RLE, LRO, RLO, PDF, BS, SS, BN, WS? */ +#define FRIBIDI_IS_EXPLICIT_OR_SEPARATOR_OR_BN_OR_WS(p) \ + ((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_SEPARATOR \ + | FRIBIDI_MASK_BN | FRIBIDI_MASK_WS)) + +/* Is private-use type for application? */ +#define FRIBIDI_IS_PRIVATE(p) ((p) & FRIBIDI_MASK_PRIVATE) + +/* Define some conversions. */ + +/* Change numbers to RTL: EN,AN -> RTL. */ +#define FRIBIDI_CHANGE_NUMBER_TO_RTL(p) \ + (FRIBIDI_IS_NUMBER(p) ? FRIBIDI_TYPE_RTL : (p)) + +/* Override status of an explicit mark: + * LRO,LRE->LTR, RLO,RLE->RTL, otherwise->ON. */ +#define FRIBIDI_EXPLICIT_TO_OVERRIDE_DIR(p) \ + (FRIBIDI_IS_OVERRIDE(p) ? FRIBIDI_LEVEL_TO_DIR(FRIBIDI_DIR_TO_LEVEL(p)) \ + : FRIBIDI_TYPE_ON) + +/* Weaken type for paragraph fallback purposes: + * LTR->WLTR, RTL->WRTL. */ +#define FRIBIDI_WEAK_PARAGRAPH(p) (FRIBIDI_PAR_WLTR | ((p) & FRIBIDI_MASK_RTL)) + + +/* Functions finally */ + + +/* fribidi_get_bidi_type - get character bidi type + * + * This function returns the bidi type of a character as defined in Table 3.7 + * Bidirectional Character Types of the Unicode Bidirectional Algorithm + * available at + * http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types, using + * data provided in file UnicodeData.txt of the Unicode Character Database + * available at http://www.unicode.org/Public/UNIDATA/UnicodeData.txt. + * + * There are a few macros defined in fribidi-bidi-types.h for querying a bidi + * type. + */ +FRIBIDI_ENTRY FriBidiCharType +fribidi_get_bidi_type ( + FriBidiChar ch /* input character */ +) FRIBIDI_GNUC_CONST; + +/* fribidi_get_bidi_types - get bidi types for an string of characters + * + * This function finds the bidi types of an string of characters. See + * fribidi_get_bidi_type() for more information about the bidi types returned + * by this function. + */ + FRIBIDI_ENTRY void fribidi_get_bidi_types ( + const FriBidiChar *str, /* input string */ + const FriBidiStrIndex len, /* input string length */ + FriBidiCharType *btypes /* output bidi types */ +); + +/* fribidi_get_bidi_type_name - get bidi type name + * + * This function returns the bidi type name of a character type. The + * returned string is a static string and should not be freed. + * + * The type names are the same as ones defined in Table 3.7 Bidirectional + * Character Types of the Unicode Bidirectional Algorithm available at + * http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types, with a + * few modifications: L->LTR, R->RTL, B->BS, S->SS. + */ + FRIBIDI_ENTRY const char *fribidi_get_bidi_type_name ( + FriBidiCharType t /* input bidi type */ +) FRIBIDI_GNUC_CONST; + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_BIDI_TYPES_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-bidi.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-bidi.h new file mode 100755 index 00000000..10672a6d --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-bidi.h @@ -0,0 +1,142 @@ +/* FriBidi + * fribidi-bidi.h - bidirectional algorithm + * + * Authors: + * Behdad Esfahbod, 2001, 2002, 2004 + * Dov Grobgeld, 1999, 2000 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc + * Copyright (C) 2001,2002 Behdad Esfahbod + * Copyright (C) 1999,2000 Dov Grobgeld + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_BIDI_H +#define _FRIBIDI_BIDI_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" +#include "fribidi-flags.h" +#include "fribidi-bidi-types.h" + +#include "fribidi-begindecls.h" + +/* fribidi_get_par_direction - get base paragraph direction + * + * This function finds the base direction of a single paragraph, + * as defined by rule P2 of the Unicode Bidirectional Algorithm available at + * http://www.unicode.org/reports/tr9/#P2. + * + * You typically do not need this function as + * fribidi_get_par_embedding_levels() knows how to compute base direction + * itself, but you may need this to implement a more sophisticated paragraph + * direction handling. Note that you can pass more than a paragraph to this + * function and the direction of the first non-neutral paragraph is returned, + * which is a very good heuristic to set direction of the neutral paragraphs + * at the beginning of text. For other neutral paragraphs, you better use the + * direction of the previous paragraph. + * + * Returns: Base pargraph direction. No weak paragraph direction is returned, + * only LTR, RTL, or ON. + */ +FRIBIDI_ENTRY FriBidiParType fribidi_get_par_direction ( + const FriBidiCharType *bidi_types, /* input list of bidi types as returned by + fribidi_get_bidi_types() */ + const FriBidiStrIndex len /* input string length */ +); + +/* fribidi_get_par_embedding_levels_ex - get bidi embedding levels of a paragraph + * + * This function finds the bidi embedding levels of a single paragraph, + * as defined by the Unicode Bidirectional Algorithm available at + * http://www.unicode.org/reports/tr9/. This function implements rules P2 to + * I1 inclusive, and parts 1 to 3 of L1, except for rule X9 which is + * implemented in fribidi_remove_bidi_marks(). Part 4 of L1 is implemented + * in fribidi_reorder_line(). + * + * There are a few macros defined in fribidi-bidi-types.h to work with this + * embedding levels. + * + * Returns: Maximum level found plus one, or zero if any error occurred + * (memory allocation failure most probably). + */ +FRIBIDI_ENTRY FriBidiLevel +fribidi_get_par_embedding_levels_ex ( + const FriBidiCharType *bidi_types, /* input list of bidi types as returned by + fribidi_get_bidi_types() */ + const FriBidiBracketType *bracket_types, /* input list of bracket types as returned by + fribidi_get_bracket_types() */ + const FriBidiStrIndex len, /* input string length of the paragraph */ + FriBidiParType *pbase_dir, /* requested and resolved paragraph + * base direction */ + FriBidiLevel *embedding_levels /* output list of embedding levels */ +) FRIBIDI_GNUC_WARN_UNUSED; + +/* fribidi_reorder_line - reorder a line of logical string to visual + * + * This function reorders the characters in a line of text from logical to + * final visual order. This function implements part 4 of rule L1, and rules + * L2 and L3 of the Unicode Bidirectional Algorithm available at + * http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels. + * + * As a side effect it also sets position maps if not NULL. + * + * You should provide the resolved paragraph direction and embedding levels as + * set by fribidi_get_par_embedding_levels(). Also note that the embedding + * levels may change a bit. To be exact, the embedding level of any sequence + * of white space at the end of line is reset to the paragraph embedding level + * (That is part 4 of rule L1). + * + * Note that the bidi types and embedding levels are not reordered. You can + * reorder these (or any other) arrays using the map later. The user is + * responsible to initialize map to something sensible, like an identity + * mapping, or pass NULL if no map is needed. + * + * There is an optional part to this function, which is whether non-spacing + * marks for right-to-left parts of the text should be reordered to come after + * their base characters in the visual string or not. Most rendering engines + * expect this behavior, but console-based systems for example do not like it. + * This is controlled by the FRIBIDI_FLAG_REORDER_NSM flag. The flag is on + * in FRIBIDI_FLAGS_DEFAULT. + * + * Returns: Maximum level found in this line plus one, or zero if any error + * occurred (memory allocation failure most probably). + */ + FRIBIDI_ENTRY FriBidiLevel fribidi_reorder_line ( + FriBidiFlags flags, /* reorder flags */ + const FriBidiCharType *bidi_types, /* input list of bidi types as returned by + fribidi_get_bidi_types() */ + const FriBidiStrIndex len, /* input length of the line */ + const FriBidiStrIndex off, /* input offset of the beginning of the line + in the paragraph */ + const FriBidiParType base_dir, /* resolved paragraph base direction */ + FriBidiLevel *embedding_levels, /* input list of embedding levels, + as returned by + fribidi_get_par_embedding_levels */ + FriBidiChar *visual_str, /* visual string to reorder */ + FriBidiStrIndex *map /* a map of string indices which is reordered + * to reflect where each glyph ends up. */ +) FRIBIDI_GNUC_WARN_UNUSED; + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_BIDI_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-brackets.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-brackets.h new file mode 100755 index 00000000..5569defe --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-brackets.h @@ -0,0 +1,89 @@ +/* fribidi-brackets.h - get bracket character property + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc + * Copyright (C) 2001, 2002, 2004 Behdad Esfahbod + * Copyright (C) 1999, 2000, 2017 Dov Grobgeld + * + * This file is part of GNU FriBidi. + * + * GNU FriBidi is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * GNU FriBidi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GNU FriBidi; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * For licensing issues, contact <fribidi.license@gmail.com> or write to + * Sharif FarsiWeb, Inc., PO Box 13445-389, Tehran, Iran. + * + * Author(s): + * Behdad Esfahbod, 2001, 2002, 2004 + * Dov Grobgeld, 1999, 2000, 2017 + */ +#ifndef _FRIBIDI_BRACKETS_H +#define _FRIBIDI_BRACKETS_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" +#include "fribidi-bidi-types.h" + +#include "fribidi-begindecls.h" + +/* fribidi_get_bracket - get bracketed character + * + * This function finds the bracketed equivalent of a character as defined in + * the file BidiBrackets.txt of the Unicode Character Database available at + * http://www.unicode.org/Public/UNIDATA/BidiBrackets.txt. + * + * If the input character is a declared as a brackets character in the + * Unicode standard and has a bracketed equivalent. The matching bracketed + * character is put in the output, otherwise the input character itself is + * put. + * + * Returns: The bracket type of the character. Use the + * FRIBIDI_IS_BRACKET(FriBidiBracketType) to test if it is a valid + * property. + */ +FRIBIDI_ENTRY FriBidiBracketType fribidi_get_bracket ( + FriBidiChar ch /* input character */ +); + +/* fribidi_get_bracket_types - get bracketed characters + * + * This function finds the bracketed characters of an string of characters. + * See fribidi_get_bracket() for more information about the bracketed + * characters returned by this function. + */ +FRIBIDI_ENTRY void +fribidi_get_bracket_types ( + const FriBidiChar *str, /* input string */ + const FriBidiStrIndex len, /* input string length */ + const FriBidiCharType *types, /* input bidi types */ + FriBidiBracketType *btypes /* output bracketed characters */ +); + +#define FRIBIDI_BRACKET_OPEN_MASK 0x80000000 +#define FRIBIDI_BRACKET_ID_MASK 0x7fffffff +#define FRIBIDI_IS_BRACKET_OPEN(bt) ((bt & FRIBIDI_BRACKET_OPEN_MASK)>0) +#define FRIBIDI_BRACKET_ID(bt) ((bt & FRIBIDI_BRACKET_ID_MASK)) + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_BRACKETS_H */ +/* Editor directions: + * Local Variables: + * mode: c + * c-basic-offset: 2 + * indent-tabs-mode: t + * tab-width: 8 + * End: + * vim: textwidth=78: autoindent: cindent: shiftwidth=2: tabstop=8: + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-char-sets-list.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-char-sets-list.h new file mode 100755 index 00000000..b0231d84 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-char-sets-list.h @@ -0,0 +1,54 @@ +#ifndef __FRIBIDI_DOC +/* FriBidi + * fribidi-char-sets-list.h - list of supported character sets + * + * Author: + * Behdad Esfahbod, 2001, 2002, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc. + * Copyright (C) 2001,2002 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +/* *INDENT-OFF* */ + +/* The order of types in this list should not be important at compile time, + * but apparently it should not be changed after compilation! */ +#endif /* !__FRIBIDI_DOC */ +#ifdef _FRIBIDI_ADD_CHAR_SET +# define _FRIBIDI_ADD_CHAR_SET_OTHERS _FRIBIDI_ADD_CHAR_SET +# define _FRIBIDI_ADD_CHAR_SET_ONE2ONE _FRIBIDI_ADD_CHAR_SET +#endif /* _FRIBIDI_ADD_CHAR_SET */ +#ifdef _FRIBIDI_ADD_CHAR_SET_OTHERS +_FRIBIDI_ADD_CHAR_SET_OTHERS (UTF8, utf8) /* UTF-8 (Unicode) */ +_FRIBIDI_ADD_CHAR_SET_OTHERS (CAP_RTL, cap_rtl) /* CapRTL (Test) */ +#endif /* _FRIBIDI_ADD_CHAR_SET_OTHERS */ +#ifdef _FRIBIDI_ADD_CHAR_SET_ONE2ONE +_FRIBIDI_ADD_CHAR_SET_ONE2ONE (ISO8859_6, iso8859_6) /* ISO8859-6 (Arabic) */ +_FRIBIDI_ADD_CHAR_SET_ONE2ONE (ISO8859_8, iso8859_8) /* ISO8859-8 (Hebrew) */ +_FRIBIDI_ADD_CHAR_SET_ONE2ONE (CP1255, cp1255) /* CP1255 (MS Hebrew/Yiddish) */ +_FRIBIDI_ADD_CHAR_SET_ONE2ONE (CP1256, cp1256) /* CP1256 (MS Arabic) */ +#endif /* _FRIBIDI_ADD_CHAR_SET_ONE2ONE */ +#ifdef _FRIBIDI_ADD_CHAR_SET +# undef _FRIBIDI_ADD_CHAR_SET_OTHERS +# undef _FRIBIDI_ADD_CHAR_SET_ONE2ONE +#endif /* _FRIBIDI_ADD_CHAR_SET */ + +#ifndef __FRIBIDI_DOC +/* *INDENT-ON* */ +#endif /* !__FRIBIDI_DOC */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-char-sets.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-char-sets.h new file mode 100755 index 00000000..a4af248e --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-char-sets.h @@ -0,0 +1,106 @@ +/* FriBidi + * fribidi-char-sets.h - character set conversion routines + * + * Authors: + * Behdad Esfahbod, 2001, 2002, 2004 + * Dov Grobgeld, 1999, 2000 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc + * Copyright (C) 2001,2002 Behdad Esfahbod + * Copyright (C) 1999,2000 Dov Grobgeld + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_CHAR_SETS_H +#define _FRIBIDI_CHAR_SETS_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" + +#include "fribidi-begindecls.h" + +typedef enum +{ + _FRIBIDI_CHAR_SET_NOT_FOUND, +# define _FRIBIDI_ADD_CHAR_SET(CHAR_SET, char_set) FRIBIDI_CHAR_SET_##CHAR_SET, +# include "fribidi-char-sets-list.h" +# undef _FRIBIDI_ADD_CHAR_SET + _FRIBIDI_CHAR_SETS_NUM_PLUS_ONE +} +FriBidiCharSet; + +#define FRIBIDI_CHAR_SET_NOT_FOUND _FRIBIDI_CHAR_SET_NOT_FOUND +#define FRIBIDI_CHAR_SETS_NUM (_FRIBIDI_CHAR_SETS_NUM_PLUS_ONE - 1) + + +/* fribidi_charset_to_unicode - convert string to Unicode + * + * This function converts an string from a character set, to a Unicode string. + * + * Returns: The length of the new string. + */ +FRIBIDI_ENTRY FriBidiStrIndex fribidi_charset_to_unicode ( + FriBidiCharSet char_set, /* character set to convert from */ + const char *s, /* input string encoded in char_set */ + FriBidiStrIndex len, /* input string length */ + FriBidiChar *us /* output Unicode string */ +); + +/* fribidi_unicode_to_charset - convert string from Unicode + * + * This function converts a Unicode string to an string in another character + * set. It also null-terminates the output string. + * + * Returns: The length of the new string. + */ +FRIBIDI_ENTRY FriBidiStrIndex fribidi_unicode_to_charset ( + FriBidiCharSet char_set, /* character set to conver to */ + const FriBidiChar *us, /* input Unicode string */ + FriBidiStrIndex len, /* input string length */ + char *s /* output string encoded in char_set */ +); + +/* fribidi_parse_charset - parse character set name + * + * Returns: The character set named s, or FRIBIDI_CHAR_SET_NOT_FOUND if the + * character set is not available. + */ +FRIBIDI_ENTRY FriBidiCharSet fribidi_parse_charset ( + const char *s /* input name of the character set */ +); + + +FRIBIDI_ENTRY const char *fribidi_char_set_name ( + FriBidiCharSet char_set +); + +FRIBIDI_ENTRY const char *fribidi_char_set_title ( + FriBidiCharSet char_set +); + +FRIBIDI_ENTRY const char *fribidi_char_set_desc ( + FriBidiCharSet char_set +); + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_CHAR_SETS_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-common.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-common.h new file mode 100755 index 00000000..0e873cc7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-common.h @@ -0,0 +1,146 @@ +/* FriBidi + * fribidi-common.h - common include for library headers + * + * Author: + * Behdad Esfahbod, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_COMMON_H +#define _FRIBIDI_COMMON_H + +#ifdef DONT_HAVE_FRIBIDI_CONFIG_H +# define FRIBIDI "fribidi" +# define FRIBIDI_NAME "fribidi" +# define FRIBIDI_VERSION "unknown" +# define FRIBIDI_BUGREPORT "unknown" +# define FRIBIDI_INTERFACE_VERSION_STRING "unknown" +#else /* !DONT_HAVE_FRIBIDI_CONFIG_H */ +# include "fribidi-config.h" +#endif /* !DONT_HAVE_FRIBIDI_CONFIG_H */ + +#ifdef HAVE_FRIBIDI_CUSTOM_H +# include <fribidi-custom.h> +#endif /* HAVE_FRIBIDI_CUSTOM_H */ + + +/* FRIBIDI_ENTRY is a macro used to declare library entry points. */ +#ifndef FRIBIDI_ENTRY +# if (defined(_MSC_VER) || defined(FRIBIDI_BUILT_WITH_MSVC)) && !defined(FRIBIDI_STATIC) +/* if we're building fribidi itself with MSVC, FRIBIDI_ENTRY will be defined, + * so if we're here then this is an external user including fribidi headers. + * The dllimport is needed here mostly for the fribidi_version_info variable, + * for functions it's not required. Probably needs more fine-tuning if + * someone starts building fribidi as static library with MSVC. We'll cross + * that brige when we get there. */ +# define FRIBIDI_ENTRY __declspec(dllimport) extern +# else +# define FRIBIDI_ENTRY extern +# endif +#endif /* !FRIBIDI_ENTRY */ + +#ifdef __ICC +#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS \ + _Pragma ("warning (push)") \ + _Pragma ("warning (disable:1478)") +#define FRIBIDI_END_IGNORE_DEPRECATIONS \ + _Pragma ("warning (pop)") +#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#define FRIBIDI_END_IGNORE_DEPRECATIONS \ + _Pragma ("GCC diagnostic pop") +#elif defined (_MSC_VER) && (_MSC_VER >= 1500) +#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS \ + __pragma (warning (push)) \ + __pragma (warning (disable : 4996)) +#define FRIBIDI_END_IGNORE_DEPRECATIONS \ + __pragma (warning (pop)) +#elif defined (__clang__) +#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") +#define FRIBIDI_END_IGNORE_DEPRECATIONS \ + _Pragma("clang diagnostic pop") +#else +#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS +#define FRIBIDI_END_IGNORE_DEPRECATIONS +#endif + +#if defined(__GNUC__) && (__GNUC__ > 2) +# define FRIBIDI_GNUC_WARN_UNUSED __attribute__((__warn_unused_result__)) +# define FRIBIDI_GNUC_MALLOC __attribute__((__malloc__)) +# define FRIBIDI_GNUC_HIDDEN __attribute__((__visibility__ ("hidden"))) +# define FRIBIDI_GNUC_CONST __attribute__((__const__)) +# define FRIBIDI_GNUC_DEPRECATED __attribute__((__unused__)) +#else /* __GNUC__ */ +# define FRIBIDI_GNUC_WARN_UNUSED +# define FRIBIDI_GNUC_MALLOC +# define FRIBIDI_GNUC_HIDDEN +# define FRIBIDI_GNUC_CONST +# define FRIBIDI_GNUC_DEPRECATED +#endif /* __GNUC__ */ + +/* FRIBIDI_BEGIN_DECLS should be used at the beginning of your declarations, + * so that C++ compilers don't mangle their names. Use FRIBIDI_END_DECLS at + * the end of C declarations. */ +#ifndef FRIBIDI_BEGIN_DECLS +# ifdef __cplusplus +# define FRIBIDI_BEGIN_DECLS extern "C" { +# define FRIBIDI_END_DECLS } +# else /* !__cplusplus */ +# define FRIBIDI_BEGIN_DECLS /* empty */ +# define FRIBIDI_END_DECLS /* empty */ +# endif /* !__cplusplus */ +#endif /* !FRIBIDI_BEGIN_DECLS */ + + + + +/* fribidi_debug_status - get current debug state + * + */ +FRIBIDI_ENTRY int fribidi_debug_status ( + void +); + +/* fribidi_set_debug - set debug state + * + */ +FRIBIDI_ENTRY int +fribidi_set_debug ( + int state /* new state to set */ +); + + + + + + + + + + + +#endif /* !_FRIBIDI_COMMON_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-config.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-config.h new file mode 100755 index 00000000..91b05b71 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-config.h @@ -0,0 +1,23 @@ +/* lib/fribidi-config.h. Generated from fribidi-config.h.in by configure. */ +/* Not copyrighted, in public domain. */ +#ifndef FRIBIDI_CONFIG_H +#define FRIBIDI_CONFIG_H + +#define FRIBIDI "fribidi" +#define FRIBIDI_NAME "GNU FriBidi" +#define FRIBIDI_BUGREPORT "https://github.com/fribidi/fribidi/issues/new" + +#define FRIBIDI_VERSION "1.0.3" +#define FRIBIDI_MAJOR_VERSION 1 +#define FRIBIDI_MINOR_VERSION 0 +#define FRIBIDI_MICRO_VERSION 3 +#define FRIBIDI_INTERFACE_VERSION 4 +#define FRIBIDI_INTERFACE_VERSION_STRING "4" + +/* The size of a `int', as computed by sizeof. */ +#define FRIBIDI_SIZEOF_INT 4 + +/* Define if fribidi was built with MSVC */ +#undef FRIBIDI_BUILT_WITH_MSVC + +#endif /* FRIBIDI_CONFIG_H */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-deprecated.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-deprecated.h new file mode 100755 index 00000000..0eaecd72 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-deprecated.h @@ -0,0 +1,244 @@ +/* FriBidi + * fribidi-deprecated.h - Deprecated interfaces + * + * Author: + * Behdad Esfahbod, 2004, 2005 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc + * Copyright (C) 2004, 2005 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_DEPRECATED_H +#define _FRIBIDI_DEPRECATED_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" + +#include "fribidi-bidi-types.h" + +#include "fribidi-begindecls.h" + + + +/* fribidi_mirroring_status - get current mirroring status + * + * This function is deprecated and only used with other deprecated functions. + */ + FRIBIDI_ENTRY fribidi_boolean fribidi_mirroring_status ( + void +) FRIBIDI_GNUC_DEPRECATED; + +/* fribidi_set_mirroring - set mirroring on or off + * + * This function is used to turn character mirroring on or off. + * Character mirroring is the act of replacing a mirrorable glyph + * (character), eg. left parenthesis, with the matching glyph, + * eg. right parenthesis, in a right-to-left resolved context. + * If your rendering engine does mirroring itself, you may want to + * turn it off here. + * + * This flag is on by default. + * This function is deprecated and only used with other deprecated functions. + * + * Returns: the new mirroring status. + */ + FRIBIDI_ENTRY fribidi_boolean fribidi_set_mirroring ( + fribidi_boolean state /* new state to set */ +) FRIBIDI_GNUC_DEPRECATED; + + +/* fribidi_reorder_nsm_status - get current marks reordering status + * + * This function is deprecated and only used with other deprecated functions. + */ + FRIBIDI_ENTRY fribidi_boolean fribidi_reorder_nsm_status ( + void +) FRIBIDI_GNUC_DEPRECATED; + +/* fribidi_set_reorder_nsm - set marks reordering on or off + * + * This function is used to turn non-spacing marks reordering on or + * off. Reordering non-spacing marks is the act of placing non-spacing + * marks (bidi class NSM) after their base character in a right-to-left + * resolved context. If your rendering engine expects non-spacing marks + * always after the base character in the memory representation of the + * visual string, you need this option on. An example of where people + * may need it off is when rendering in the console when non-spacing + * marks cannot be applied on top of the base character. + * + * This flag is on by default. + * This function is deprecated and only used with other deprecated functions. + * + * Returns: the new marks reordering status. + */ + FRIBIDI_ENTRY fribidi_boolean fribidi_set_reorder_nsm ( + fribidi_boolean state /* new state to set */ +) FRIBIDI_GNUC_DEPRECATED; + + + + +/* fribidi_log2vis_get_embedding_levels - get embedding levels + * + * Deprecated. Replaced by fribidi_get_par_embedding_levels_ex. + */ +FRIBIDI_ENTRY FriBidiLevel +fribidi_log2vis_get_embedding_levels ( + const FriBidiCharType *bidi_types, /* input list of bidi types as returned by + fribidi_get_bidi_types() */ + const FriBidiStrIndex len, /* input string length of the paragraph */ + FriBidiParType *pbase_dir, /* requested and resolved paragraph + * base direction */ + FriBidiLevel *embedding_levels /* output list of embedding levels */ +) FRIBIDI_GNUC_DEPRECATED; + +/* fribidi_get_type - get character bidi type + * + * Deprecated. Replaced by fribidi_get_bidi_type. + */ +FRIBIDI_ENTRY FriBidiCharType +fribidi_get_type ( + FriBidiChar ch /* input character */ +) FRIBIDI_GNUC_DEPRECATED; + +/* fribidi_get_type_internal - get character bidi type + * + * Deprecated. Replaced by fribidi_get_bidi_type. + */ +FRIBIDI_ENTRY FriBidiCharType +fribidi_get_type_internal ( + FriBidiChar ch /* input character */ +) FRIBIDI_GNUC_DEPRECATED; + +/* fribidi_remove_bidi_marks - remove bidi marks out of an string + * + * This function removes the bidi and boundary-neutral marks out of an string + * and the accompanying lists. It implements rule X9 of the Unicode + * Bidirectional Algorithm available at + * http://www.unicode.org/reports/tr9/#X9, with the exception that it removes + * U+200E LEFT-TO-RIGHT MARK and U+200F RIGHT-TO-LEFT MARK too. + * + * If any of the input lists are NULL, the list is skipped. If str is the + * visual string, then positions_to_this is positions_L_to_V and + * position_from_this_list is positions_V_to_L; if str is the logical + * string, the other way. Moreover, the position maps should be filled with + * valid entries. + * + * A position map pointing to a removed character is filled with \-1. By the + * way, you should not use embedding_levels if str is visual string. + * + * For best results this function should be run on a whole paragraph, not + * lines; but feel free to do otherwise if you know what you are doing. + * Deprecated. Use fribidi_remove_special_chars instead. + * + * Returns: New length of the string, or \-1 if an error occurred (memory + * allocation failure most probably). + */ +FRIBIDI_ENTRY FriBidiStrIndex +fribidi_remove_bidi_marks ( + FriBidiChar *str, /* input string to clean */ + const FriBidiStrIndex len, /* input string length */ + FriBidiStrIndex *positions_to_this, /* list mapping positions to the + order used in str */ + FriBidiStrIndex *position_from_this_list, /* list mapping positions from the + order used in str */ + FriBidiLevel *embedding_levels /* list of embedding levels */ +) + FRIBIDI_GNUC_WARN_UNUSED FRIBIDI_GNUC_DEPRECATED; + + +/* fribidi_log2vis - get visual string + * + * This function converts the logical input string to the visual output + * strings as specified by the Unicode Bidirectional Algorithm. As a side + * effect it also generates mapping lists between the two strings, and the + * list of embedding levels as defined by the algorithm. + * + * If NULL is passed as any of the the lists, the list is ignored and not + * filled. + * + * This function is obsolete because it only handles one-line paragraphs. + * Please consider using other functions instead. Deprecated. + * + * Returns: Maximum level found plus one, or zero if any error occurred + * (memory allocation failure most probably). + */ + FRIBIDI_ENTRY FriBidiLevel fribidi_log2vis ( + const FriBidiChar *str, /* input logical string */ + const FriBidiStrIndex len, /* input string length */ + FriBidiParType *pbase_dir, /* requested and resolved paragraph + * base direction */ + FriBidiChar *visual_str, /* output visual string */ + FriBidiStrIndex *positions_L_to_V, /* output mapping from logical to + * visual string positions */ + FriBidiStrIndex *positions_V_to_L, /* output mapping from visual string + * back to the logical string + * positions */ + FriBidiLevel *embedding_levels /* output list of embedding levels */ +) + FRIBIDI_GNUC_WARN_UNUSED FRIBIDI_GNUC_DEPRECATED; + + +/* fribidi_get_par_embedding_levels - get bidi embedding levels of a paragraph + * + * Deprecated interface to fribidi_get_par_embedding_levels_ex(). Refer to + * it for documentation. + */ +FRIBIDI_ENTRY FriBidiLevel +fribidi_get_par_embedding_levels ( + const FriBidiCharType *bidi_types, /* input list of bidi types as returned by + fribidi_get_bidi_types() */ + const FriBidiStrIndex len, /* input string length of the paragraph */ + FriBidiParType *pbase_dir, /* requested and resolved paragraph + * base direction */ + FriBidiLevel *embedding_levels /* output list of embedding levels */ +) + FRIBIDI_GNUC_WARN_UNUSED FRIBIDI_GNUC_DEPRECATED; + +#define UNI_MAX_BIDI_LEVEL FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL +#define UNI_LRM FRIBIDI_CHAR_LRM +#define UNI_RLM FRIBIDI_CHAR_RLM +#define UNI_LRE FRIBIDI_CHAR_LRE +#define UNI_RLE FRIBIDI_CHAR_RLE +#define UNI_LRO FRIBIDI_CHAR_LRO +#define UNI_RLO FRIBIDI_CHAR_RLO +#define UNI_LS FRIBIDI_CHAR_LS +#define UNI_PS FRIBIDI_CHAR_PS +#define UNI_ZWNJ FRIBIDI_CHAR_ZWNJ +#define UNI_ZWJ FRIBIDI_CHAR_ZWJ +#define UNI_HEBREW_ALEF FRIBIDI_CHAR_HEBREW_ALEF +#define UNI_ARABIC_ALEF FRIBIDI_CHAR_ARABIC_ALEF +#define UNI_ARABIC_ZERO FRIBIDI_CHAR_ARABIC_ZERO +#define UNI_FARSI_ZERO FRIBIDI_CHAR_PERSIAN_ZERO + +#define FRIBIDI_TYPE_WL FRIBIDI_PAR_WLTR +#define FRIBIDI_TYPE_WR FRIBIDI_PAR_WRTL +#define FRIBIDI_TYPE_L FRIBIDI_PAR_LTR +#define FRIBIDI_TYPE_R FRIBIDI_PAR_RTL +#define FRIBIDI_TYPE_N FRIBIDI_PAR_ON +#define FRIBIDI_TYPE_B FRIBIDI_TYPE_BS +#define FRIBIDI_TYPE_S FRIBIDI_TYPE_SS + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_DEPRECATED_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-enddecls.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-enddecls.h new file mode 100755 index 00000000..eb300c9e --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-enddecls.h @@ -0,0 +1,3 @@ +#ifdef FRIBIDI_END_DECLS +FRIBIDI_END_DECLS +#endif /* FRIBIDI_END_DECLS */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-flags.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-flags.h new file mode 100755 index 00000000..166c93a6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-flags.h @@ -0,0 +1,72 @@ +/* FriBidi + * fribidi-flags.h - option flags + * + * Author: + * Behdad Esfahbod, 2005 + * + * Copyright (C) 2005 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_FLAGS_H +#define _FRIBIDI_FLAGS_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" + +#include "fribidi-begindecls.h" + +typedef uint32_t FriBidiFlags; + +/* + * Define option flags that various functions use. Each mask has + * only one bit set. + */ + +#define FRIBIDI_FLAG_SHAPE_MIRRORING 0x00000001 +#define FRIBIDI_FLAG_REORDER_NSM 0x00000002 + +#define FRIBIDI_FLAG_SHAPE_ARAB_PRES 0x00000100 +#define FRIBIDI_FLAG_SHAPE_ARAB_LIGA 0x00000200 +#define FRIBIDI_FLAG_SHAPE_ARAB_CONSOLE 0x00000400 + +#define FRIBIDI_FLAG_REMOVE_BIDI 0x00010000 +#define FRIBIDI_FLAG_REMOVE_JOINING 0x00020000 +#define FRIBIDI_FLAG_REMOVE_SPECIALS 0x00040000 + + +/* + * And their combinations. + */ + +#define FRIBIDI_FLAGS_DEFAULT ( \ + FRIBIDI_FLAG_SHAPE_MIRRORING | \ + FRIBIDI_FLAG_REORDER_NSM | \ + FRIBIDI_FLAG_REMOVE_SPECIALS ) + +#define FRIBIDI_FLAGS_ARABIC ( \ + FRIBIDI_FLAG_SHAPE_ARAB_PRES | \ + FRIBIDI_FLAG_SHAPE_ARAB_LIGA ) + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_FLAGS_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-joining-types-list.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-joining-types-list.h new file mode 100755 index 00000000..198bad0f --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-joining-types-list.h @@ -0,0 +1,44 @@ +#ifndef __FRIBIDI_DOC +/* FriBidi + * fribidi-joining-types-list.h - list of joining types + * + * Author: + * Behdad Esfahbod, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc. + * Copyright (C) 2004 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +/* *INDENT-OFF* */ +#endif /* !__FRIBIDI_DOC */ +#ifndef _FRIBIDI_ADD_TYPE +# define _FRIBIDI_ADD_TYPE(x,y) +#endif + +_FRIBIDI_ADD_TYPE (U, '|') /* nUn-joining, e.g. Full Stop */ +_FRIBIDI_ADD_TYPE (R, '<') /* Right-joining, e.g. Arabic Letter Dal */ +_FRIBIDI_ADD_TYPE (D, '+') /* Dual-joining, e.g. Arabic Letter Ain */ +_FRIBIDI_ADD_TYPE (C, '-') /* join-Causing, e.g. Tatweel, ZWJ */ +_FRIBIDI_ADD_TYPE (T, '^') /* Transparent, e.g. Arabic Fatha */ +_FRIBIDI_ADD_TYPE (L, '>') /* Left-joining, i.e. fictional */ +_FRIBIDI_ADD_TYPE (G, '~') /* iGnored, e.g. LRE, RLE, ZWNBSP */ + +#ifndef __FRIBIDI_DOC +/* *INDENT-ON* */ +#endif /* !__FRIBIDI_DOC */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-joining-types.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-joining-types.h new file mode 100755 index 00000000..7f6750af --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-joining-types.h @@ -0,0 +1,249 @@ +/* FriBidi + * fribidi-joining-types.h - character joining types + * + * Author: + * Behdad Esfahbod, 2001, 2002, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc. + * Copyright (C) 2001,2002 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_JOINING_TYPES_H +#define _FRIBIDI_JOINING_TYPES_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" + +#include "fribidi-begindecls.h" + +/* + * Define bit masks that joining types are based on, each mask has + * only one bit set. + */ + +#define FRIBIDI_MASK_JOINS_RIGHT 0x01 /* May join to right */ +#define FRIBIDI_MASK_JOINS_LEFT 0x02 /* May join to right */ +#define FRIBIDI_MASK_ARAB_SHAPES 0x04 /* May Arabic shape */ +#define FRIBIDI_MASK_TRANSPARENT 0x08 /* Is transparent */ +#define FRIBIDI_MASK_IGNORED 0x10 /* Is ignored */ +#define FRIBIDI_MASK_LIGATURED 0x20 /* Is ligatured */ + +/* + * Define values for FriBidiJoiningType + */ + +/* nUn-joining */ +#define FRIBIDI_JOINING_TYPE_U_VAL ( 0 ) + +/* Right-joining */ +#define FRIBIDI_JOINING_TYPE_R_VAL \ + ( FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_ARAB_SHAPES ) + +/* Dual-joining */ +#define FRIBIDI_JOINING_TYPE_D_VAL \ + ( FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT \ + | FRIBIDI_MASK_ARAB_SHAPES ) + +/* join-Causing */ +#define FRIBIDI_JOINING_TYPE_C_VAL \ + ( FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT ) + +/* Left-joining */ +#define FRIBIDI_JOINING_TYPE_L_VAL \ + ( FRIBIDI_MASK_JOINS_LEFT | FRIBIDI_MASK_ARAB_SHAPES ) + +/* Transparent */ +#define FRIBIDI_JOINING_TYPE_T_VAL \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_ARAB_SHAPES ) + +/* iGnored */ +#define FRIBIDI_JOINING_TYPE_G_VAL ( FRIBIDI_MASK_IGNORED ) + + +enum _FriBidiJoiningTypeEnum +{ +# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) \ + FRIBIDI_JOINING_TYPE_##TYPE = FRIBIDI_JOINING_TYPE_##TYPE##_VAL, +# include "fribidi-joining-types-list.h" +# undef _FRIBIDI_ADD_TYPE + _FRIBIDI_JOINING_TYPE_JUNK /* Don't use this */ +}; + +#ifdef __FRIBIDI_DOC +typedef enum _FriBidiJoiningTypeEnum FriBidiJoiningType; +#else /* !__FRIBIDI_DOC */ +typedef uint8_t FriBidiJoiningType; +#endif /* !__FRIBIDI_DOC */ + +/* FriBidiArabicProp is essentially the same type as FriBidiJoiningType, but + * not limited to the few values returned by fribidi_get_joining_type. */ +typedef uint8_t FriBidiArabicProp; + +/* + * The equivalent of JoiningType values for ArabicProp + */ + +/* Primary Arabic Joining Classes (Table 8-2) */ + +/* nUn-joining */ +#define FRIBIDI_IS_JOINING_TYPE_U(p) \ + ( 0 == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED \ + | FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT ) ) ) + +/* Right-joining */ +#define FRIBIDI_IS_JOINING_TYPE_R(p) \ + ( FRIBIDI_MASK_JOINS_RIGHT == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED \ + | FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT ) ) ) + +/* Dual-joining */ +#define FRIBIDI_IS_JOINING_TYPE_D(p) \ + ( ( FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT \ + | FRIBIDI_MASK_ARAB_SHAPES ) == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED \ + | FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT \ + | FRIBIDI_MASK_ARAB_SHAPES ) ) ) + +/* join-Causing */ +#define FRIBIDI_IS_JOINING_TYPE_C(p) \ + ( ( FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT ) == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED \ + | FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT \ + | FRIBIDI_MASK_ARAB_SHAPES ) ) ) + +/* Left-joining */ +#define FRIBIDI_IS_JOINING_TYPE_L(p) \ + ( FRIBIDI_MASK_JOINS_LEFT == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED \ + | FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT ) ) ) + +/* Transparent */ +#define FRIBIDI_IS_JOINING_TYPE_T(p) \ + ( FRIBIDI_MASK_TRANSPARENT == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED ) ) ) + +/* iGnored */ +#define FRIBIDI_IS_JOINING_TYPE_G(p) \ + ( FRIBIDI_MASK_IGNORED == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED ) ) ) + +/* and for Derived Arabic Joining Classes (Table 8-3) */ + +/* Right join-Causing */ +#define FRIBIDI_IS_JOINING_TYPE_RC(p) \ + ( FRIBIDI_MASK_JOINS_RIGHT == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED \ + | FRIBIDI_MASK_JOINS_RIGHT ) ) ) + +/* Left join-Causing */ +#define FRIBIDI_IS_JOINING_TYPE_LC(p) \ + ( FRIBIDI_MASK_JOINS_LEFT == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED \ + | FRIBIDI_MASK_JOINS_LEFT ) ) ) + + +/* + * Defining macros for needed queries, It is fully dependent on the + * implementation of FriBidiJoiningType. + */ + +/* Joins to right: R, D, C? */ +#define FRIBIDI_JOINS_RIGHT(p) ((p) & FRIBIDI_MASK_JOINS_RIGHT) + +/* Joins to left: L, D, C? */ +#define FRIBIDI_JOINS_LEFT(p) ((p) & FRIBIDI_MASK_JOINS_LEFT) + +/* May shape: R, D, L, T? */ +#define FRIBIDI_ARAB_SHAPES(p) ((p) & FRIBIDI_MASK_ARAB_SHAPES) + +/* Is skipped in joining: T, G? */ +#define FRIBIDI_IS_JOIN_SKIPPED(p) \ + ((p) & (FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED)) + +/* Is base that will be shaped: R, D, L? */ +#define FRIBIDI_IS_JOIN_BASE_SHAPES(p) \ + ( FRIBIDI_MASK_ARAB_SHAPES == ( (p) & \ + ( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED \ + | FRIBIDI_MASK_ARAB_SHAPES ) ) ) + +#define FRIBIDI_JOINS_PRECEDING_MASK(level) \ + (FRIBIDI_LEVEL_IS_RTL (level) ? FRIBIDI_MASK_JOINS_RIGHT \ + : FRIBIDI_MASK_JOINS_LEFT) + +#define FRIBIDI_JOINS_FOLLOWING_MASK(level) \ + (FRIBIDI_LEVEL_IS_RTL (level) ? FRIBIDI_MASK_JOINS_LEFT \ + : FRIBIDI_MASK_JOINS_RIGHT) + +#define FRIBIDI_JOIN_SHAPE(p) \ + ((p) & ( FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT )) + +/* Functions finally */ + + +/* fribidi_get_joining_type - get character joining type + * + * This function returns the joining type of a character as defined in Table + * 8-2 Primary Arabic Joining Classes of the Unicode standard available at + * http://www.unicode.org/versions/Unicode4.0.0/ch08.pdf#G7462, using data + * provided in file ArabicShaping.txt and UnicodeData.txt of the Unicode + * Character Database available at + * http://www.unicode.org/Public/UNIDATA/ArabicShaping.txt and + * http://www.unicode.org/Public/UNIDATA/UnicodeData.txt. + * + * There are a few macros defined in fribidi-joining-types.h for querying a + * joining type. + */ +FRIBIDI_ENTRY FriBidiJoiningType +fribidi_get_joining_type ( + FriBidiChar ch /* input character */ +) FRIBIDI_GNUC_CONST; + +/* fribidi_get_joining_types - get joining types for an string of characters + * + * This function finds the joining types of an string of characters. See + * fribidi_get_joining_type for more information about the joining types + * returned by this function. + */ + FRIBIDI_ENTRY void fribidi_get_joining_types ( + const FriBidiChar *str, /* input string */ + const FriBidiStrIndex len, /* input string length */ + FriBidiJoiningType *jtypes /* output joining types */ +); + +/* fribidi_get_joining_type_name - get joining type name + * + * This function returns the joining type name of a joining type. The + * returned string is a static string and should not be freed. + * + * The type names are the same as ones defined in Table 8-2 Primary Arabic + * Joining Classes of the Unicode standard available at + * http://www.unicode.org/versions/Unicode4.0.0/ch08.pdf#G7462. + */ + FRIBIDI_ENTRY const char *fribidi_get_joining_type_name ( + FriBidiJoiningType j /* input joining type */ +) FRIBIDI_GNUC_CONST; + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_JOINING_TYPES_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-joining.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-joining.h new file mode 100755 index 00000000..92539dd0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-joining.h @@ -0,0 +1,74 @@ +/* FriBidi + * fribidi-joining.h - Arabic joining algorithm + * + * Authors: + * Behdad Esfahbod, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc + * Copyright (C) 2004 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_JOINING_H +#define _FRIBIDI_JOINING_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" +#include "fribidi-bidi-types.h" +#include "fribidi-joining-types.h" + +#include "fribidi-begindecls.h" + +/* fribidi_join_arabic - do Arabic joining + * + * This function does the Arabic joining algorithm. Means, given Arabic + * joining types of the characters in ar_props (don't worry, + * FriBidiJoiningType can be casted to FriBidiArabicProp automagically), this + * function modifies this properties to grasp the effect of neighboring + * characters. You probably need this information later to do Arabic shaping. + * + * This function implements rules R1 to R7 inclusive (all rules) of the Arabic + * Cursive Joining algorithm of the Unicode standard as available at + * http://www.unicode.org/versions/Unicode4.0.0/ch08.pdf#G7462. It also + * interacts correctly with the bidirection algorithm as defined in Section + * 3.5 Shaping of the Unicode Bidirectional Algorithm available at + * http://www.unicode.org/reports/tr9/#Shaping. + * + * There are a few macros defined in fribidi-joining-types.h for querying the + * Arabic properties computed by this function. + */ +FRIBIDI_ENTRY void fribidi_join_arabic ( + const FriBidiCharType *bidi_types, /* input list of bidi types as + returned by + fribidi_get_bidi_types() */ + const FriBidiStrIndex len, /* input string length */ + const FriBidiLevel *embedding_levels, /* input list of embedding + levels, as returned by + fribidi_get_par_embedding_levels */ + FriBidiArabicProp *ar_props /* Arabic properties to analyze, initialized by + joining types, as returned by + fribidi_get_joining_types */ +); + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_JOINING_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-mirroring.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-mirroring.h new file mode 100755 index 00000000..ddc3a14f --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-mirroring.h @@ -0,0 +1,86 @@ +/* fribidi-mirroring.h - get mirrored character + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc + * Copyright (C) 2001, 2002, 2004 Behdad Esfahbod + * Copyright (C) 1999, 2000, 2017 Dov Grobgeld + * + * This file is part of GNU FriBidi. + * + * GNU FriBidi is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * GNU FriBidi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GNU FriBidi; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * For licensing issues, contact <fribidi.license@gmail.com> or write to + * Sharif FarsiWeb, Inc., PO Box 13445-389, Tehran, Iran. + * + * Author(s): + * Behdad Esfahbod, 2001, 2002, 2004 + * Dov Grobgeld, 1999, 2000 + */ +#ifndef _FRIBIDI_MIRRORING_H +#define _FRIBIDI_MIRRORING_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" +#include "fribidi-bidi-types.h" + +#include "fribidi-begindecls.h" + +/* fribidi_get_mirror_char - get mirrored character + * + * This function finds the mirrored equivalent of a character as defined in + * the file BidiMirroring.txt of the Unicode Character Database available at + * http://www.unicode.org/Public/UNIDATA/BidiMirroring.txt. + * + * If the input character is a declared as a mirroring character in the + * Unicode standard and has a mirrored equivalent. The matching mirrored + * character is put in the output, otherwise the input character itself is + * put. + * + * Returns: if the character has a mirroring equivalent or not. + */ +FRIBIDI_ENTRY fribidi_boolean fribidi_get_mirror_char ( + FriBidiChar ch, /* input character */ + FriBidiChar *mirrored_ch /* output mirrored character */ +); + +/* fribidi_shape_mirroring - do mirroring shaping + * + * This functions replaces mirroring characters on right-to-left embeddings in + * string with their mirrored equivalent as returned by + * fribidi_get_mirror_char(). + * + * This function implements rule L4 of the Unicode Bidirectional Algorithm + * available at http://www.unicode.org/reports/tr9/#L4. + */ +FRIBIDI_ENTRY void fribidi_shape_mirroring ( + const FriBidiLevel *embedding_levels, /* input list of embedding + levels, as returned by + fribidi_get_par_embedding_levels */ + const FriBidiStrIndex len, /* input string length */ + FriBidiChar *str /* string to shape */ +); + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_MIRRORING_H */ +/* Editor directions: + * Local Variables: + * mode: c + * c-basic-offset: 2 + * indent-tabs-mode: t + * tab-width: 8 + * End: + * vim: textwidth=78: autoindent: cindent: shiftwidth=2: tabstop=8: + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-shape.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-shape.h new file mode 100755 index 00000000..ff258b5c --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-shape.h @@ -0,0 +1,71 @@ +/* FriBidi + * fribidi-shape.h - shaping + * + * Author: + * Behdad Esfahbod, 2004, 2005 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc + * Copyright (C) 2004, 2005 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_SHAPE_H +#define _FRIBIDI_SHAPE_H + +#include "fribidi-types.h" +#include "fribidi-flags.h" +#include "fribidi-bidi-types.h" +#include "fribidi-joining-types.h" + +#include "fribidi-begindecls.h" + + +/* fribidi_shape - do bidi-aware shaping + * + * This function does all shaping work that depends on the resolved embedding + * levels of the characters. Currently it does mirroring and Arabic shaping, + * but the list may grow in the future. This function is a wrapper around + * fribidi_shape_mirroring and fribidi_shape_arabic. + * + * The flags parameter specifies which shapings are applied. The only flags + * affecting the functionality of this function are those beginning with + * FRIBIDI_FLAG_SHAPE_. Of these, only FRIBIDI_FLAG_SHAPE_MIRRORING is on + * in FRIBIDI_FLAGS_DEFAULT. For details of the Arabic-specific flags see + * fribidi_shape_arabic. If ar_props is NULL, no Arabic shaping is performed. + * + * Feel free to do your own shaping before or after calling this function, + * but you should take care of embedding levels yourself then. + */ +FRIBIDI_ENTRY void fribidi_shape ( + FriBidiFlags flags, /* shaping flags */ + const FriBidiLevel *embedding_levels, /* input list of embedding + levels, as returned by + fribidi_get_par_embedding_levels */ + const FriBidiStrIndex len, /* input string length */ + FriBidiArabicProp *ar_props, /* input/output Arabic properties as + * computed by fribidi_join_arabic */ + FriBidiChar *str /* string to shape */ +); + + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_SHAPE_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-types.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-types.h new file mode 100755 index 00000000..9f1746fa --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-types.h @@ -0,0 +1,83 @@ +/* FriBidi + * fribidi-types.h - define data types for the rest of the library + * + * Author: + * Behdad Esfahbod, 2001, 2002, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc. + * Copyright (C) 2001,2002 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_TYPES_H +#define _FRIBIDI_TYPES_H + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include "fribidi-common.h" + +#include "fribidi-begindecls.h" + + +# if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || \ + defined (_sgi) || defined (__sun) || defined (sun) || \ + defined (__digital__) || defined (__HP_cc) +# include <inttypes.h> +# elif defined (_AIX) +# include <sys/inttypes.h> +# else +# include <stdint.h> +# endif + +typedef int fribidi_boolean; + +typedef uint32_t FriBidiChar; +typedef int FriBidiStrIndex; + +/* The MSB is used to indicate an opening bracket */ +typedef FriBidiChar FriBidiBracketType; + +/* Use FRIBIDI_NO_BRACKET for assigning to a non-bracket */ +#define FRIBIDI_NO_BRACKET 0 + +/* A few macros for working with bits */ + +#define FRIBIDI_TEST_BITS(x, mask) (((x) & (mask)) ? 1 : 0) + +#define FRIBIDI_INCLUDE_BITS(x, mask) ((x) | (mask)) + +#define FRIBIDI_EXCLUDE_BITS(x, mask) ((x) & ~(mask)) + +#define FRIBIDI_SET_BITS(x, mask) ((x) |= (mask)) + +#define FRIBIDI_UNSET_BITS(x, mask) ((x) &= ~(mask)) + +#define FRIBIDI_ADJUST_BITS(x, mask, cond) \ + ((x) = ((x) & ~(mask)) | ((cond) ? (mask) : 0)) + +#define FRIBIDI_ADJUST_AND_TEST_BITS(x, mask, cond) \ + FRIBIDI_TEST_BITS(FRIBIDI_ADJUST_BITS((x), (mask), (cond)), (mask)) + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_TYPES_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-unicode-version.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-unicode-version.h new file mode 100755 index 00000000..6d8ed04e --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-unicode-version.h @@ -0,0 +1,10 @@ +/* fribidi-unicode-version.h + * generated by gen-unicode-version (GNU FriBidi 1.0.1) + * from the file ReadMe.txt */ + +#define FRIBIDI_UNICODE_VERSION "10.0.0" +#define FRIBIDI_UNICODE_MAJOR_VERSION 10 +#define FRIBIDI_UNICODE_MINOR_VERSION 0 +#define FRIBIDI_UNICODE_MICRO_VERSION 0 + +/* End of generated fribidi-unicode-version.h */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-unicode.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-unicode.h new file mode 100755 index 00000000..b057c8aa --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi-unicode.h @@ -0,0 +1,105 @@ +/* FriBidi + * fribidi-unicode.h - general Unicode definitions + * + * Author: + * Behdad Esfahbod, 2001, 2002, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc + * Copyright (C) 2001,2002 Behdad Esfahbod + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_UNICODE_H +#define _FRIBIDI_UNICODE_H + +#include "fribidi-common.h" + +#include "fribidi-types.h" + +#include "fribidi-begindecls.h" + +/* We do not support surrogates yet */ +#define FRIBIDI_UNICODE_CHARS (sizeof(FriBidiChar) >= 4 ? 0x110000 : 0xFFFE) + +/* Unicode version - FRIBIDI_UNICODE_VERSION */ +#ifdef DONT_HAVE_FRIBIDI_UNICODE_VERSION_H +# define FRIBIDI_UNICODE_VERSION "unknown" +#else /* !DONT_HAVE_FRIBIDI_UNICODE_VERSION_H */ +# include "fribidi-unicode-version.h" +#endif /* !DONT_HAVE_FRIBIDI_UNICODE_VERSION_H */ + +/* An string containing the version the Unicode standard implemented, + * in the form of "x.y.z", or "unknown". */ +extern const char *fribidi_unicode_version; + + +/* Unicode Bidirectional Algorithm definitions: */ + +/* Number of types defined in the bidi algorithm */ +#define FRIBIDI_BIDI_NUM_TYPES 19 + +/* The maximum embedding level value assigned by explicit marks */ +#define FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL 125 + +/* The maximum *number* of different resolved embedding levels: 0-126 */ +#define FRIBIDI_BIDI_MAX_RESOLVED_LEVELS 127 + +/* The maximum *number* of nested brackets: 0-63 */ +#define FRIBIDI_BIDI_MAX_NESTED_BRACKET_PAIRS 63 + +/* A few Unicode characters: */ + +/* Bidirectional marks */ +#define FRIBIDI_CHAR_LRM 0x200E +#define FRIBIDI_CHAR_RLM 0x200F +#define FRIBIDI_CHAR_LRE 0x202A +#define FRIBIDI_CHAR_RLE 0x202B +#define FRIBIDI_CHAR_PDF 0x202C +#define FRIBIDI_CHAR_LRO 0x202D +#define FRIBIDI_CHAR_RLO 0x202E +#define FRIBIDI_CHAR_LRI 0x2066 +#define FRIBIDI_CHAR_RLI 0x2067 +#define FRIBIDI_CHAR_FSI 0x2068 +#define FRIBIDI_CHAR_PDI 0x2069 + +/* Line and Paragraph Separators */ +#define FRIBIDI_CHAR_LS 0x2028 +#define FRIBIDI_CHAR_PS 0x2029 + +/* Arabic Joining marks */ +#define FRIBIDI_CHAR_ZWNJ 0x200C +#define FRIBIDI_CHAR_ZWJ 0x200D + +/* Hebrew and Arabic */ +#define FRIBIDI_CHAR_HEBREW_ALEF 0x05D0 +#define FRIBIDI_CHAR_ARABIC_ALEF 0x0627 +#define FRIBIDI_CHAR_ARABIC_ZERO 0x0660 +#define FRIBIDI_CHAR_PERSIAN_ZERO 0x06F0 + +/* Misc */ +#define FRIBIDI_CHAR_ZWNBSP 0xFEFF + +/* Char we place for a deleted slot, to delete later */ +#define FRIBIDI_CHAR_FILL FRIBIDI_CHAR_ZWNBSP + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_UNICODE_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi.h b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi.h new file mode 100755 index 00000000..c925bd59 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/include/fribidi/fribidi.h @@ -0,0 +1,63 @@ +/* FriBidi + * fribidi.h - Unicode bidirectional and Arabic joining/shaping algorithms + * + * Author: + * Behdad Esfahbod, 2004 + * + * Copyright (C) 2004 Sharif FarsiWeb, Inc + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library, in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA + * + * For licensing issues, contact <fribidi.license@gmail.com>. + */ +#ifndef _FRIBIDI_H +#define _FRIBIDI_H + +#include "fribidi-common.h" + +#include "fribidi-unicode.h" +#include "fribidi-types.h" +#include "fribidi-flags.h" +#include "fribidi-bidi-types.h" +#include "fribidi-bidi.h" +#include "fribidi-joining-types.h" +#include "fribidi-joining.h" +#include "fribidi-mirroring.h" +#include "fribidi-brackets.h" +#include "fribidi-arabic.h" +#include "fribidi-shape.h" +#include "fribidi-char-sets.h" + + +#ifdef FRIBIDI_NO_DEPRECATED +#else +# include "fribidi-deprecated.h" +#endif /* !FRIBIDI_NO_DEPRECATED */ + + +#include "fribidi-begindecls.h" + + + +/* An string containing the version information of the library. */ +FRIBIDI_ENTRY const char *fribidi_version_info; + +#include "fribidi-enddecls.h" + +#endif /* !_FRIBIDI_H */ +/* Editor directions: + * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent + */ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/lib/libfribidi.0.dylib b/frameworks/cairosvg/dependencies/fribidi/1.0.3/lib/libfribidi.0.dylib new file mode 100755 index 00000000..ecb93159 Binary files /dev/null and b/frameworks/cairosvg/dependencies/fribidi/1.0.3/lib/libfribidi.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/fribidi/1.0.3/lib/libfribidi.dylib b/frameworks/cairosvg/dependencies/fribidi/1.0.3/lib/libfribidi.dylib new file mode 120000 index 00000000..fe6d5626 --- /dev/null +++ b/frameworks/cairosvg/dependencies/fribidi/1.0.3/lib/libfribidi.dylib @@ -0,0 +1 @@ +libfribidi.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h new file mode 100755 index 00000000..8691709f --- /dev/null +++ b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h @@ -0,0 +1,224 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ +/* GdkPixbuf library - Animation support + * + * Copyright (C) 1999 The Free Software Foundation + * + * Authors: Mark Crichton <crichton@gimp.org> + * Miguel de Icaza <miguel@gnu.org> + * Federico Mena-Quintero <federico@gimp.org> + * Havoc Pennington <hp@redhat.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef GDK_PIXBUF_ANIMATION_H +#define GDK_PIXBUF_ANIMATION_H + +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly." +#endif + +#include <glib-object.h> +#include <gdk-pixbuf/gdk-pixbuf-core.h> + +G_BEGIN_DECLS + +/* Animation support */ + +/** + * GdkPixbufAnimation: + * + * An opaque struct representing an animation. + */ +typedef struct _GdkPixbufAnimation GdkPixbufAnimation; + + +/** + * GdkPixbufAnimationIter: + * + * An opaque struct representing an iterator which points to a + * certain position in an animation. + */ +typedef struct _GdkPixbufAnimationIter GdkPixbufAnimationIter; + +#define GDK_TYPE_PIXBUF_ANIMATION (gdk_pixbuf_animation_get_type ()) +#define GDK_PIXBUF_ANIMATION(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_ANIMATION, GdkPixbufAnimation)) +#define GDK_IS_PIXBUF_ANIMATION(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_ANIMATION)) + +#define GDK_TYPE_PIXBUF_ANIMATION_ITER (gdk_pixbuf_animation_iter_get_type ()) +#define GDK_PIXBUF_ANIMATION_ITER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_ANIMATION_ITER, GdkPixbufAnimationIter)) +#define GDK_IS_PIXBUF_ANIMATION_ITER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_ANIMATION_ITER)) + +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_animation_get_type (void) G_GNUC_CONST; + +#ifdef G_OS_WIN32 +/* API/ABI compat, see gdk-pixbuf-core.h for details */ +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbufAnimation *gdk_pixbuf_animation_new_from_file_utf8 (const char *filename, + GError **error); +#endif + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbufAnimation *gdk_pixbuf_animation_new_from_file (const char *filename, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_28 +GdkPixbufAnimation *gdk_pixbuf_animation_new_from_stream (GInputStream *stream, + GCancellable *cancellable, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_28 +void gdk_pixbuf_animation_new_from_stream_async (GInputStream *stream, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GDK_PIXBUF_AVAILABLE_IN_2_28 +GdkPixbufAnimation *gdk_pixbuf_animation_new_from_stream_finish (GAsyncResult*async_result, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_28 +GdkPixbufAnimation *gdk_pixbuf_animation_new_from_resource(const char *resource_path, + GError **error); + +#ifndef GDK_PIXBUF_DISABLE_DEPRECATED + +GDK_PIXBUF_DEPRECATED_IN_2_0_FOR(g_object_ref) +GdkPixbufAnimation *gdk_pixbuf_animation_ref (GdkPixbufAnimation *animation); +GDK_PIXBUF_DEPRECATED_IN_2_0_FOR(g_object_unref) +void gdk_pixbuf_animation_unref (GdkPixbufAnimation *animation); +#endif + +GDK_PIXBUF_AVAILABLE_IN_ALL +int gdk_pixbuf_animation_get_width (GdkPixbufAnimation *animation); +GDK_PIXBUF_AVAILABLE_IN_ALL +int gdk_pixbuf_animation_get_height (GdkPixbufAnimation *animation); +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_animation_is_static_image (GdkPixbufAnimation *animation); +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_animation_get_static_image (GdkPixbufAnimation *animation); + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbufAnimationIter *gdk_pixbuf_animation_get_iter (GdkPixbufAnimation *animation, + const GTimeVal *start_time); +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_animation_iter_get_type (void) G_GNUC_CONST; +GDK_PIXBUF_AVAILABLE_IN_ALL +int gdk_pixbuf_animation_iter_get_delay_time (GdkPixbufAnimationIter *iter); +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_animation_iter_get_pixbuf (GdkPixbufAnimationIter *iter); +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_animation_iter_on_currently_loading_frame (GdkPixbufAnimationIter *iter); +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_animation_iter_advance (GdkPixbufAnimationIter *iter, + const GTimeVal *current_time); + + +#ifdef GDK_PIXBUF_ENABLE_BACKEND + + + +/** + * GdkPixbufAnimationClass: + * @parent_class: the parent class + * @is_static_image: returns whether the given animation is just a static image. + * @get_static_image: returns a static image representing the given animation. + * @get_size: fills @width and @height with the frame size of the animation. + * @get_iter: returns an iterator for the given animation. + * + * Modules supporting animations must derive a type from + * #GdkPixbufAnimation, providing suitable implementations of the + * virtual functions. + */ +typedef struct _GdkPixbufAnimationClass GdkPixbufAnimationClass; + +#define GDK_PIXBUF_ANIMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_ANIMATION, GdkPixbufAnimationClass)) +#define GDK_IS_PIXBUF_ANIMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_ANIMATION)) +#define GDK_PIXBUF_ANIMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_ANIMATION, GdkPixbufAnimationClass)) + +/* Private part of the GdkPixbufAnimation structure */ +struct _GdkPixbufAnimation { + GObject parent_instance; + +}; + +struct _GdkPixbufAnimationClass { + GObjectClass parent_class; + + /*< public >*/ + + gboolean (*is_static_image) (GdkPixbufAnimation *anim); + + GdkPixbuf* (*get_static_image) (GdkPixbufAnimation *anim); + + void (*get_size) (GdkPixbufAnimation *anim, + int *width, + int *height); + + GdkPixbufAnimationIter* (*get_iter) (GdkPixbufAnimation *anim, + const GTimeVal *start_time); + +}; + + + +/** + * GdkPixbufAnimationIterClass: + * @parent_class: the parent class + * @get_delay_time: returns the time in milliseconds that the current frame + * should be shown. + * @get_pixbuf: returns the current frame. + * @on_currently_loading_frame: returns whether the current frame of @iter is + * being loaded. + * @advance: advances the iterator to @current_time, possibly changing the + * current frame. + * + * Modules supporting animations must derive a type from + * #GdkPixbufAnimationIter, providing suitable implementations of the + * virtual functions. + */ +typedef struct _GdkPixbufAnimationIterClass GdkPixbufAnimationIterClass; + +#define GDK_PIXBUF_ANIMATION_ITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_ANIMATION_ITER, GdkPixbufAnimationIterClass)) +#define GDK_IS_PIXBUF_ANIMATION_ITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_ANIMATION_ITER)) +#define GDK_PIXBUF_ANIMATION_ITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_ANIMATION_ITER, GdkPixbufAnimationIterClass)) + +struct _GdkPixbufAnimationIter { + GObject parent_instance; + +}; + +struct _GdkPixbufAnimationIterClass { + GObjectClass parent_class; + + /*< public >*/ + + int (*get_delay_time) (GdkPixbufAnimationIter *iter); + + GdkPixbuf* (*get_pixbuf) (GdkPixbufAnimationIter *iter); + + gboolean (*on_currently_loading_frame) (GdkPixbufAnimationIter *iter); + + gboolean (*advance) (GdkPixbufAnimationIter *iter, + const GTimeVal *current_time); +}; + + +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_non_anim_get_type (void) G_GNUC_CONST; +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbufAnimation* gdk_pixbuf_non_anim_new (GdkPixbuf *pixbuf); + +#endif /* GDK_PIXBUF_ENABLE_BACKEND */ + +G_END_DECLS + +#endif /* GDK_PIXBUF_ANIMATION_H */ diff --git a/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-autocleanups.h b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-autocleanups.h new file mode 100755 index 00000000..9b6f58b1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-autocleanups.h @@ -0,0 +1,37 @@ +/* GdkPixbuf library - Autocleanup definitions + * + * Copyright (C) 2015 Kalev Lember <kalevlember@gmail.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef GDK_PIXBUF_AUTOCLEANUPS_H +#define GDK_PIXBUF_AUTOCLEANUPS_H + +/* We need all the types, so don't try to include this directly */ +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly." +#endif + +#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkPixbuf, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkPixbufAnimation, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkPixbufAnimationIter, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkPixbufLoader, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkPixbufSimpleAnim, g_object_unref) + +#endif + +#endif /* GDK_PIXBUF_AUTOCLEANUPS_H */ diff --git a/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h new file mode 100755 index 00000000..f4c928d8 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h @@ -0,0 +1,586 @@ +/* GdkPixbuf library - GdkPixbuf data structure + * + * Copyright (C) 2003 The Free Software Foundation + * + * Authors: Mark Crichton <crichton@gimp.org> + * Miguel de Icaza <miguel@gnu.org> + * Federico Mena-Quintero <federico@gimp.org> + * Havoc Pennington <hp@redhat.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef GDK_PIXBUF_CORE_H +#define GDK_PIXBUF_CORE_H + +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly." +#endif + +#include <glib.h> +#include <glib-object.h> +#include <gio/gio.h> + +#include <gdk-pixbuf/gdk-pixbuf-macros.h> + +G_BEGIN_DECLS + +/** + * SECTION:gdk-pixbuf + * @Short_description: Information that describes an image. + * @Title: The GdkPixbuf Structure + * + * The #GdkPixbuf structure contains + * information that describes an image in memory. + * + * ## Image Data ## {#image-data} + * + * Image data in a pixbuf is stored in memory in uncompressed, + * packed format. Rows in the image are stored top to bottom, and + * in each row pixels are stored from left to right. There may be + * padding at the end of a row. The "rowstride" value of a pixbuf, + * as returned by gdk_pixbuf_get_rowstride(), indicates the number + * of bytes between rows. + * + * ## put_pixel() Example ## {#put-pixel} + * + * The following code illustrates a simple put_pixel() + * function for RGB pixbufs with 8 bits per channel with an alpha + * channel. It is not included in the gdk-pixbuf library for + * performance reasons; rather than making several function calls + * for each pixel, your own code can take shortcuts. + * + * |[<!-- language="C" --> + * static void + * put_pixel (GdkPixbuf *pixbuf, int x, int y, guchar red, guchar green, guchar blue, guchar alpha) + * { + * int width, height, rowstride, n_channels; + * guchar *pixels, *p; + * + * n_channels = gdk_pixbuf_get_n_channels (pixbuf); + * + * g_assert (gdk_pixbuf_get_colorspace (pixbuf) == GDK_COLORSPACE_RGB); + * g_assert (gdk_pixbuf_get_bits_per_sample (pixbuf) == 8); + * g_assert (gdk_pixbuf_get_has_alpha (pixbuf)); + * g_assert (n_channels == 4); + * + * width = gdk_pixbuf_get_width (pixbuf); + * height = gdk_pixbuf_get_height (pixbuf); + * + * g_assert (x >= 0 && x < width); + * g_assert (y >= 0 && y < height); + * + * rowstride = gdk_pixbuf_get_rowstride (pixbuf); + * pixels = gdk_pixbuf_get_pixels (pixbuf); + * + * p = pixels + y * rowstride + x * n_channels; + * p[0] = red; + * p[1] = green; + * p[2] = blue; + * p[3] = alpha; + * } + * ]| + * + * This function will not work for pixbufs with images that are + * other than 8 bits per sample or channel, but it will work for + * most of the pixbufs that GTK+ uses. + * + * If you are doing memcpy() of raw pixbuf data, note that the last row + * in the pixbuf may not be as wide as the full rowstride, but rather + * just as wide as the pixel data needs to be. That is, it is unsafe to + * do `memcpy (dest, pixels, rowstride * height)` to copy a whole pixbuf. + * Use gdk_pixbuf_copy() instead, or compute the width in bytes of the + * last row as `width * ((n_channels * bits_per_sample + 7) / 8)`. + */ + + +/** + * GdkPixbufAlphaMode: + * @GDK_PIXBUF_ALPHA_BILEVEL: A bilevel clipping mask (black and white) + * will be created and used to draw the image. Pixels below 0.5 opacity + * will be considered fully transparent, and all others will be + * considered fully opaque. + * @GDK_PIXBUF_ALPHA_FULL: For now falls back to #GDK_PIXBUF_ALPHA_BILEVEL. + * In the future it will do full alpha compositing. + * + * These values can be passed to + * gdk_pixbuf_xlib_render_to_drawable_alpha() to control how the alpha + * channel of an image should be handled. This function can create a + * bilevel clipping mask (black and white) and use it while painting + * the image. In the future, when the X Window System gets an alpha + * channel extension, it will be possible to do full alpha + * compositing onto arbitrary drawables. For now both cases fall + * back to a bilevel clipping mask. + */ +typedef enum +{ + GDK_PIXBUF_ALPHA_BILEVEL, + GDK_PIXBUF_ALPHA_FULL +} GdkPixbufAlphaMode; + +/** + * GdkColorspace: + * @GDK_COLORSPACE_RGB: Indicates a red/green/blue additive color space. + * + * This enumeration defines the color spaces that are supported by + * the gdk-pixbuf library. Currently only RGB is supported. + */ +/* Note that these values are encoded in inline pixbufs + * as ints, so don't reorder them + */ +typedef enum { + GDK_COLORSPACE_RGB +} GdkColorspace; + +/* All of these are opaque structures */ + +/** + * GdkPixbuf: + * + * This is the main structure in the gdk-pixbuf library. It is + * used to represent images. It contains information about the + * image's pixel data, its color space, bits per sample, width and + * height, and the rowstride (the number of bytes between the start of + * one row and the start of the next). + */ +typedef struct _GdkPixbuf GdkPixbuf; + +#define GDK_TYPE_PIXBUF (gdk_pixbuf_get_type ()) +#define GDK_PIXBUF(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF, GdkPixbuf)) +#define GDK_IS_PIXBUF(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF)) + + +/** + * GdkPixbufDestroyNotify: + * @pixels: (array) (element-type guint8): The pixel array of the pixbuf + * that is being finalized. + * @data: (closure): User closure data. + * + * A function of this type is responsible for freeing the pixel array + * of a pixbuf. The gdk_pixbuf_new_from_data() function lets you + * pass in a pre-allocated pixel array so that a pixbuf can be + * created from it; in this case you will need to pass in a function + * of #GdkPixbufDestroyNotify so that the pixel data can be freed + * when the pixbuf is finalized. + */ +typedef void (* GdkPixbufDestroyNotify) (guchar *pixels, gpointer data); + +/** + * GDK_PIXBUF_ERROR: + * + * Error domain used for pixbuf operations. Indicates that the error code + * will be in the #GdkPixbufError enumeration. See #GError for + * information on error domains and error codes. + */ +#define GDK_PIXBUF_ERROR gdk_pixbuf_error_quark () + +/** + * GdkPixbufError: + * @GDK_PIXBUF_ERROR_CORRUPT_IMAGE: An image file was broken somehow. + * @GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY: Not enough memory. + * @GDK_PIXBUF_ERROR_BAD_OPTION: A bad option was passed to a pixbuf save module. + * @GDK_PIXBUF_ERROR_UNKNOWN_TYPE: Unknown image type. + * @GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION: Don't know how to perform the + * given operation on the type of image at hand. + * @GDK_PIXBUF_ERROR_FAILED: Generic failure code, something went wrong. + * @GDK_PIXBUF_ERROR_INCOMPLETE_ANIMATION: Only part of the animation was loaded. + * + * An error code in the #GDK_PIXBUF_ERROR domain. Many gdk-pixbuf + * operations can cause errors in this domain, or in the #G_FILE_ERROR + * domain. + */ +typedef enum { + /* image data hosed */ + GDK_PIXBUF_ERROR_CORRUPT_IMAGE, + /* no mem to load image */ + GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY, + /* bad option passed to save routine */ + GDK_PIXBUF_ERROR_BAD_OPTION, + /* unsupported image type (sort of an ENOSYS) */ + GDK_PIXBUF_ERROR_UNKNOWN_TYPE, + /* unsupported operation (load, save) for image type */ + GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION, + GDK_PIXBUF_ERROR_FAILED, + GDK_PIXBUF_ERROR_INCOMPLETE_ANIMATION +} GdkPixbufError; + +GDK_PIXBUF_AVAILABLE_IN_ALL +GQuark gdk_pixbuf_error_quark (void); + + + +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_get_type (void) G_GNUC_CONST; + +/* Reference counting */ + +#ifndef GDK_PIXBUF_DISABLE_DEPRECATED +GDK_PIXBUF_DEPRECATED_IN_2_0_FOR(g_object_ref) +GdkPixbuf *gdk_pixbuf_ref (GdkPixbuf *pixbuf); +GDK_PIXBUF_DEPRECATED_IN_2_0_FOR(g_object_unref) +void gdk_pixbuf_unref (GdkPixbuf *pixbuf); +#endif + +/* GdkPixbuf accessors */ + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkColorspace gdk_pixbuf_get_colorspace (const GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_ALL +int gdk_pixbuf_get_n_channels (const GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_get_has_alpha (const GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_ALL +int gdk_pixbuf_get_bits_per_sample (const GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_ALL +guchar *gdk_pixbuf_get_pixels (const GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_ALL +int gdk_pixbuf_get_width (const GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_ALL +int gdk_pixbuf_get_height (const GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_ALL +int gdk_pixbuf_get_rowstride (const GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_2_26 +gsize gdk_pixbuf_get_byte_length (const GdkPixbuf *pixbuf); + +GDK_PIXBUF_AVAILABLE_IN_2_26 +guchar *gdk_pixbuf_get_pixels_with_length (const GdkPixbuf *pixbuf, + guint *length); + +GDK_PIXBUF_AVAILABLE_IN_2_32 +const guint8* gdk_pixbuf_read_pixels (const GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_2_32 +GBytes * gdk_pixbuf_read_pixel_bytes (const GdkPixbuf *pixbuf); + + + +/* Create a blank pixbuf with an optimal rowstride and a new buffer */ + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_new (GdkColorspace colorspace, gboolean has_alpha, int bits_per_sample, + int width, int height); + +GDK_PIXBUF_AVAILABLE_IN_2_36 +gint gdk_pixbuf_calculate_rowstride (GdkColorspace colorspace, + gboolean has_alpha, + int bits_per_sample, + int width, + int height); + +/* Copy a pixbuf */ +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_copy (const GdkPixbuf *pixbuf); + +/* Create a pixbuf which points to the pixels of another pixbuf */ +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_new_subpixbuf (GdkPixbuf *src_pixbuf, + int src_x, + int src_y, + int width, + int height); + +/* Simple loading */ + +#ifdef G_OS_WIN32 +/* In previous versions these _utf8 variants where exported and linked to + * by default. Export them here for ABI (and gi API) compat. + */ + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_new_from_file_utf8 (const char *filename, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_4 +GdkPixbuf *gdk_pixbuf_new_from_file_at_size_utf8 (const char *filename, + int width, + int height, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_6 +GdkPixbuf *gdk_pixbuf_new_from_file_at_scale_utf8 (const char *filename, + int width, + int height, + gboolean preserve_aspect_ratio, + GError **error); +#endif + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_new_from_file (const char *filename, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_4 +GdkPixbuf *gdk_pixbuf_new_from_file_at_size (const char *filename, + int width, + int height, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_6 +GdkPixbuf *gdk_pixbuf_new_from_file_at_scale (const char *filename, + int width, + int height, + gboolean preserve_aspect_ratio, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_26 +GdkPixbuf *gdk_pixbuf_new_from_resource (const char *resource_path, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_26 +GdkPixbuf *gdk_pixbuf_new_from_resource_at_scale (const char *resource_path, + int width, + int height, + gboolean preserve_aspect_ratio, + GError **error); + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_new_from_data (const guchar *data, + GdkColorspace colorspace, + gboolean has_alpha, + int bits_per_sample, + int width, int height, + int rowstride, + GdkPixbufDestroyNotify destroy_fn, + gpointer destroy_fn_data); + +GDK_PIXBUF_AVAILABLE_IN_2_32 +GdkPixbuf *gdk_pixbuf_new_from_bytes (GBytes *data, + GdkColorspace colorspace, + gboolean has_alpha, + int bits_per_sample, + int width, int height, + int rowstride); + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_new_from_xpm_data (const char **data); + +#ifndef GDK_PIXBUF_DISABLE_DEPRECATED +GDK_PIXBUF_DEPRECATED_IN_2_32 +GdkPixbuf* gdk_pixbuf_new_from_inline (gint data_length, + const guint8 *data, + gboolean copy_pixels, + GError **error); +#endif + +/* Mutations */ +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_fill (GdkPixbuf *pixbuf, + guint32 pixel); + +/* Saving */ + +#ifndef __GTK_DOC_IGNORE__ +#ifdef G_OS_WIN32 +/* DLL ABI stability hack. */ +#define gdk_pixbuf_save gdk_pixbuf_save_utf8 +#endif +#endif + +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_save (GdkPixbuf *pixbuf, + const char *filename, + const char *type, + GError **error, + ...) G_GNUC_NULL_TERMINATED; + +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_savev (GdkPixbuf *pixbuf, + const char *filename, + const char *type, + char **option_keys, + char **option_values, + GError **error); + +#ifdef G_OS_WIN32 +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_savev_utf8 (GdkPixbuf *pixbuf, + const char *filename, + const char *type, + char **option_keys, + char **option_values, + GError **error); +#endif + +/* Saving to a callback function */ + + +/** + * GdkPixbufSaveFunc: + * @buf: (array length=count) (element-type guint8): bytes to be written. + * @count: number of bytes in @buf. + * @error: (out): A location to return an error. + * @data: (closure): user data passed to gdk_pixbuf_save_to_callback(). + * + * Specifies the type of the function passed to + * gdk_pixbuf_save_to_callback(). It is called once for each block of + * bytes that is "written" by gdk_pixbuf_save_to_callback(). If + * successful it should return %TRUE. If an error occurs it should set + * @error and return %FALSE, in which case gdk_pixbuf_save_to_callback() + * will fail with the same error. + * + * Since: 2.4 + * Returns: %TRUE if successful, %FALSE (with @error set) if failed. + */ + +typedef gboolean (*GdkPixbufSaveFunc) (const gchar *buf, + gsize count, + GError **error, + gpointer data); + +GDK_PIXBUF_AVAILABLE_IN_2_4 +gboolean gdk_pixbuf_save_to_callback (GdkPixbuf *pixbuf, + GdkPixbufSaveFunc save_func, + gpointer user_data, + const char *type, + GError **error, + ...) G_GNUC_NULL_TERMINATED; + +GDK_PIXBUF_AVAILABLE_IN_2_4 +gboolean gdk_pixbuf_save_to_callbackv (GdkPixbuf *pixbuf, + GdkPixbufSaveFunc save_func, + gpointer user_data, + const char *type, + char **option_keys, + char **option_values, + GError **error); + +/* Saving into a newly allocated char array */ + +GDK_PIXBUF_AVAILABLE_IN_2_4 +gboolean gdk_pixbuf_save_to_buffer (GdkPixbuf *pixbuf, + gchar **buffer, + gsize *buffer_size, + const char *type, + GError **error, + ...) G_GNUC_NULL_TERMINATED; + +GDK_PIXBUF_AVAILABLE_IN_2_4 +gboolean gdk_pixbuf_save_to_bufferv (GdkPixbuf *pixbuf, + gchar **buffer, + gsize *buffer_size, + const char *type, + char **option_keys, + char **option_values, + GError **error); + +GDK_PIXBUF_AVAILABLE_IN_2_14 +GdkPixbuf *gdk_pixbuf_new_from_stream (GInputStream *stream, + GCancellable *cancellable, + GError **error); + +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_new_from_stream_async (GInputStream *stream, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_new_from_stream_finish (GAsyncResult *async_result, + GError **error); + +GDK_PIXBUF_AVAILABLE_IN_2_14 +GdkPixbuf *gdk_pixbuf_new_from_stream_at_scale (GInputStream *stream, + gint width, + gint height, + gboolean preserve_aspect_ratio, + GCancellable *cancellable, + GError **error); + +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_new_from_stream_at_scale_async (GInputStream *stream, + gint width, + gint height, + gboolean preserve_aspect_ratio, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GDK_PIXBUF_AVAILABLE_IN_2_14 +gboolean gdk_pixbuf_save_to_stream (GdkPixbuf *pixbuf, + GOutputStream *stream, + const char *type, + GCancellable *cancellable, + GError **error, + ...); + +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_save_to_stream_async (GdkPixbuf *pixbuf, + GOutputStream *stream, + const gchar *type, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data, + ...); + +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_save_to_stream_finish (GAsyncResult *async_result, + GError **error); + +GDK_PIXBUF_AVAILABLE_IN_2_36 +void gdk_pixbuf_save_to_streamv_async (GdkPixbuf *pixbuf, + GOutputStream *stream, + const gchar *type, + gchar **option_keys, + gchar **option_values, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GDK_PIXBUF_AVAILABLE_IN_2_36 +gboolean gdk_pixbuf_save_to_streamv (GdkPixbuf *pixbuf, + GOutputStream *stream, + const char *type, + char **option_keys, + char **option_values, + GCancellable *cancellable, + GError **error); + +/* Adding an alpha channel */ +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_add_alpha (const GdkPixbuf *pixbuf, gboolean substitute_color, + guchar r, guchar g, guchar b); + +/* Copy an area of a pixbuf onto another one */ +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_copy_area (const GdkPixbuf *src_pixbuf, + int src_x, int src_y, + int width, int height, + GdkPixbuf *dest_pixbuf, + int dest_x, int dest_y); + +/* Brighten/darken and optionally make it pixelated-looking */ +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_saturate_and_pixelate (const GdkPixbuf *src, + GdkPixbuf *dest, + gfloat saturation, + gboolean pixelate); + +/* Transform an image to agree with its embedded orientation option / tag */ +GDK_PIXBUF_AVAILABLE_IN_2_12 +GdkPixbuf *gdk_pixbuf_apply_embedded_orientation (GdkPixbuf *src); + +/* key/value pairs that can be attached by the pixbuf loader */ +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_set_option (GdkPixbuf *pixbuf, + const gchar *key, + const gchar *value); +GDK_PIXBUF_AVAILABLE_IN_ALL +const gchar * gdk_pixbuf_get_option (GdkPixbuf *pixbuf, + const gchar *key); +GDK_PIXBUF_AVAILABLE_IN_2_36 +gboolean gdk_pixbuf_remove_option (GdkPixbuf *pixbuf, + const gchar *key); +GDK_PIXBUF_AVAILABLE_IN_2_32 +GHashTable * gdk_pixbuf_get_options (GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_2_36 +gboolean gdk_pixbuf_copy_options (GdkPixbuf *src_pixbuf, + GdkPixbuf *dest_pixbuf); + + +G_END_DECLS + + +#endif /* GDK_PIXBUF_CORE_H */ diff --git a/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h new file mode 100755 index 00000000..f6926647 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h @@ -0,0 +1,40 @@ + +/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */ + +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly." +#endif + +#ifndef __GDK_PIXBUF_ENUM_TYPES_H__ +#define __GDK_PIXBUF_ENUM_TYPES_H__ + +#include <glib-object.h> + +#include <gdk-pixbuf/gdk-pixbuf-macros.h> + +G_BEGIN_DECLS + +/* enumerations from "gdk-pixbuf-core.h" */ +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_alpha_mode_get_type (void) G_GNUC_CONST; +#define GDK_TYPE_PIXBUF_ALPHA_MODE (gdk_pixbuf_alpha_mode_get_type ()) +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_colorspace_get_type (void) G_GNUC_CONST; +#define GDK_TYPE_COLORSPACE (gdk_colorspace_get_type ()) +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_error_get_type (void) G_GNUC_CONST; +#define GDK_TYPE_PIXBUF_ERROR (gdk_pixbuf_error_get_type ()) + +/* enumerations from "gdk-pixbuf-transform.h" */ +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_interp_type_get_type (void) G_GNUC_CONST; +#define GDK_TYPE_INTERP_TYPE (gdk_interp_type_get_type ()) +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_rotation_get_type (void) G_GNUC_CONST; +#define GDK_TYPE_PIXBUF_ROTATION (gdk_pixbuf_rotation_get_type ()) +G_END_DECLS + +#endif /* __GDK_PIXBUF_ENUM_TYPES_H__ */ + +/* Generated data ends here */ + diff --git a/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-features.h b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-features.h new file mode 100755 index 00000000..f6ff6d41 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-features.h @@ -0,0 +1,124 @@ +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly." +#endif + +#ifndef GDK_PIXBUF_FEATURES_H +#define GDK_PIXBUF_FEATURES_H 1 + +#include <glib.h> + +/** + * SECTION:initialization_versions + * @Short_description: +Library version numbers. + * @Title: Initialization and Versions + * + * These macros and variables let you check the version of gdk-pixbuf + * you're linking against. + */ + +/** + * GDK_PIXBUF_MAJOR: + * + * Major version of gdk-pixbuf library, that is the "0" in + * "0.8.2" for example. + */ +/** + * GDK_PIXBUF_MINOR: + * + * Minor version of gdk-pixbuf library, that is the "8" in + * "0.8.2" for example. + */ +/** + * GDK_PIXBUF_MICRO: + * + * Micro version of gdk-pixbuf library, that is the "2" in + * "0.8.2" for example. + */ +/** + * GDK_PIXBUF_VERSION: + * + * Contains the full version of the gdk-pixbuf header as a string. + * This is the version being compiled against; contrast with + * #gdk_pixbuf_version. + */ + +#define GDK_PIXBUF_MAJOR (2) +#define GDK_PIXBUF_MINOR (36) +#define GDK_PIXBUF_MICRO (12) +#define GDK_PIXBUF_VERSION "2.36.12" + +#ifndef _GDK_PIXBUF_EXTERN +#define _GDK_PIXBUF_EXTERN extern +#endif + +/* We prefix variable declarations so they can + * properly get exported/imported from Windows DLLs. + */ +#ifdef G_PLATFORM_WIN32 +# ifdef GDK_PIXBUF_STATIC_COMPILATION +# define GDK_PIXBUF_VAR extern +# else /* !GDK_PIXBUF_STATIC_COMPILATION */ +# ifdef GDK_PIXBUF_C_COMPILATION +# ifdef DLL_EXPORT +# define GDK_PIXBUF_VAR _GDK_PIXBUF_EXTERN +# else /* !DLL_EXPORT */ +# define GDK_PIXBUF_VAR extern +# endif /* !DLL_EXPORT */ +# else /* !GDK_PIXBUF_C_COMPILATION */ +# define GDK_PIXBUF_VAR extern __declspec(dllimport) +# endif /* !GDK_PIXBUF_C_COMPILATION */ +# endif /* !GDK_PIXBUF_STATIC_COMPILATION */ +#else /* !G_PLATFORM_WIN32 */ +# define GDK_PIXBUF_VAR _GDK_PIXBUF_EXTERN +#endif /* !G_PLATFORM_WIN32 */ + +/** + * gdk_pixbuf_major_version: + * + * The major version number of the gdk-pixbuf library. (e.g. in + * gdk-pixbuf version 1.2.5 this is 1.) + * + * + * This variable is in the library, so represents the + * gdk-pixbuf library you have linked against. Contrast with the + * #GDK_PIXBUF_MAJOR macro, which represents the major version of the + * gdk-pixbuf headers you have included. + */ +/** + * gdk_pixbuf_minor_version: + * + * The minor version number of the gdk-pixbuf library. (e.g. in + * gdk-pixbuf version 1.2.5 this is 2.) + * + * + * This variable is in the library, so represents the + * gdk-pixbuf library you have linked against. Contrast with the + * #GDK_PIXBUF_MINOR macro, which represents the minor version of the + * gdk-pixbuf headers you have included. + */ +/** + * gdk_pixbuf_micro_version: + * + * The micro version number of the gdk-pixbuf library. (e.g. in + * gdk-pixbuf version 1.2.5 this is 5.) + * + * + * This variable is in the library, so represents the + * gdk-pixbuf library you have linked against. Contrast with the + * #GDK_PIXBUF_MICRO macro, which represents the micro version of the + * gdk-pixbuf headers you have included. + */ +/** + * gdk_pixbuf_version: + * + * Contains the full version of the gdk-pixbuf library as a string. + * This is the version currently in use by a running program. + */ + +GDK_PIXBUF_VAR const guint gdk_pixbuf_major_version; +GDK_PIXBUF_VAR const guint gdk_pixbuf_minor_version; +GDK_PIXBUF_VAR const guint gdk_pixbuf_micro_version; +GDK_PIXBUF_VAR const char *gdk_pixbuf_version; + +#endif /* GDK_PIXBUF_FEATURES_H */ diff --git a/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h new file mode 100755 index 00000000..88e21b56 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h @@ -0,0 +1,365 @@ +/* GdkPixbuf library - Io handling. This is an internal header for + * GdkPixbuf. You should never use it unless you are doing development for + * GdkPixbuf itself. + * + * Copyright (C) 1999 The Free Software Foundation + * + * Authors: Mark Crichton <crichton@gimp.org> + * Miguel de Icaza <miguel@gnu.org> + * Federico Mena-Quintero <federico@gimp.org> + * Jonathan Blandford <jrb@redhat.com> + * Michael Fulbright <drmike@redhat.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef GDK_PIXBUF_IO_H +#define GDK_PIXBUF_IO_H + +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly." +#endif + +#include <stdio.h> +#include <glib.h> +#include <gmodule.h> +#include <gdk-pixbuf/gdk-pixbuf-core.h> +#include <gdk-pixbuf/gdk-pixbuf-animation.h> + +G_BEGIN_DECLS + +typedef struct _GdkPixbufFormat GdkPixbufFormat; + +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_format_get_type (void) G_GNUC_CONST; + +GDK_PIXBUF_AVAILABLE_IN_ALL +GSList *gdk_pixbuf_get_formats (void); +GDK_PIXBUF_AVAILABLE_IN_2_2 +gchar *gdk_pixbuf_format_get_name (GdkPixbufFormat *format); +GDK_PIXBUF_AVAILABLE_IN_2_2 +gchar *gdk_pixbuf_format_get_description (GdkPixbufFormat *format); +GDK_PIXBUF_AVAILABLE_IN_2_2 +gchar **gdk_pixbuf_format_get_mime_types (GdkPixbufFormat *format); +GDK_PIXBUF_AVAILABLE_IN_2_2 +gchar **gdk_pixbuf_format_get_extensions (GdkPixbufFormat *format); +GDK_PIXBUF_AVAILABLE_IN_2_36 +gboolean gdk_pixbuf_format_is_save_option_supported (GdkPixbufFormat *format, + const gchar *option_key); +GDK_PIXBUF_AVAILABLE_IN_2_2 +gboolean gdk_pixbuf_format_is_writable (GdkPixbufFormat *format); +GDK_PIXBUF_AVAILABLE_IN_2_6 +gboolean gdk_pixbuf_format_is_scalable (GdkPixbufFormat *format); +GDK_PIXBUF_AVAILABLE_IN_2_6 +gboolean gdk_pixbuf_format_is_disabled (GdkPixbufFormat *format); +GDK_PIXBUF_AVAILABLE_IN_2_6 +void gdk_pixbuf_format_set_disabled (GdkPixbufFormat *format, + gboolean disabled); +GDK_PIXBUF_AVAILABLE_IN_2_6 +gchar *gdk_pixbuf_format_get_license (GdkPixbufFormat *format); + +GDK_PIXBUF_AVAILABLE_IN_2_4 +GdkPixbufFormat *gdk_pixbuf_get_file_info (const gchar *filename, + gint *width, + gint *height); +GDK_PIXBUF_AVAILABLE_IN_2_32 +void gdk_pixbuf_get_file_info_async (const gchar *filename, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GDK_PIXBUF_AVAILABLE_IN_2_32 +GdkPixbufFormat *gdk_pixbuf_get_file_info_finish (GAsyncResult *async_result, + gint *width, + gint *height, + GError **error); + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbufFormat *gdk_pixbuf_format_copy (const GdkPixbufFormat *format); +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_format_free (GdkPixbufFormat *format); + +#ifdef GDK_PIXBUF_ENABLE_BACKEND + + + +/** + * GdkPixbufModuleSizeFunc: + * @width: pointer to a location containing the current image width + * @height: pointer to a location containing the current image height + * @user_data: the loader. + * + * Defines the type of the function that gets called once the size + * of the loaded image is known. + * + * The function is expected to set @width and @height to the desired + * size to which the image should be scaled. If a module has no efficient + * way to achieve the desired scaling during the loading of the image, it may + * either ignore the size request, or only approximate it - gdk-pixbuf will + * then perform the required scaling on the completely loaded image. + * + * If the function sets @width or @height to zero, the module should interpret + * this as a hint that it will be closed soon and shouldn't allocate further + * resources. This convention is used to implement gdk_pixbuf_get_file_info() + * efficiently. + * + * Since: 2.2 + */ +typedef void (* GdkPixbufModuleSizeFunc) (gint *width, + gint *height, + gpointer user_data); + +/** + * GdkPixbufModulePreparedFunc: + * @pixbuf: the #GdkPixbuf that is currently being loaded. + * @anim: if an animation is being loaded, the #GdkPixbufAnimation, else %NULL. + * @user_data: the loader. + * + * Defines the type of the function that gets called once the initial + * setup of @pixbuf is done. + * + * #GdkPixbufLoader uses a function of this type to emit the + * "<link linkend="GdkPixbufLoader-area-prepared">area_prepared</link>" + * signal. + * + * Since: 2.2 + */ +typedef void (* GdkPixbufModulePreparedFunc) (GdkPixbuf *pixbuf, + GdkPixbufAnimation *anim, + gpointer user_data); + +/** + * GdkPixbufModuleUpdatedFunc: + * @pixbuf: the #GdkPixbuf that is currently being loaded. + * @x: the X origin of the updated area. + * @y: the Y origin of the updated area. + * @width: the width of the updated area. + * @height: the height of the updated area. + * @user_data: the loader. + * + * Defines the type of the function that gets called every time a region + * of @pixbuf is updated. + * + * #GdkPixbufLoader uses a function of this type to emit the + * "<link linkend="GdkPixbufLoader-area-updated">area_updated</link>" + * signal. + * + * Since: 2.2 + */ +typedef void (* GdkPixbufModuleUpdatedFunc) (GdkPixbuf *pixbuf, + int x, + int y, + int width, + int height, + gpointer user_data); + +/** + * GdkPixbufModulePattern: + * @prefix: the prefix for this pattern + * @mask: mask containing bytes which modify how the prefix is matched against + * test data + * @relevance: relevance of this pattern + * + * The signature of a module is a set of prefixes. Prefixes are encoded as + * pairs of ordinary strings, where the second string, called the mask, if + * not %NULL, must be of the same length as the first one and may contain + * ' ', '!', 'x', 'z', and 'n' to indicate bytes that must be matched, + * not matched, "don't-care"-bytes, zeros and non-zeros. + * Each prefix has an associated integer that describes the relevance of + * the prefix, with 0 meaning a mismatch and 100 a "perfect match". + * + * Starting with gdk-pixbuf 2.8, the first byte of the mask may be '*', + * indicating an unanchored pattern that matches not only at the beginning, + * but also in the middle. Versions prior to 2.8 will interpret the '*' + * like an 'x'. + * + * The signature of a module is stored as an array of + * #GdkPixbufModulePatterns. The array is terminated by a pattern + * where the @prefix is %NULL. + * + * + * <informalexample><programlisting> + * GdkPixbufModulePattern *signature[] = { + * { "abcdx", " !x z", 100 }, + * { "bla", NULL, 90 }, + * { NULL, NULL, 0 } + * }; + * </programlisting> + * The example matches e.g. "auud\0" with relevance 100, and "blau" with + * relevance 90.</informalexample> + * + * Since: 2.2 + */ +typedef struct _GdkPixbufModulePattern GdkPixbufModulePattern; +struct _GdkPixbufModulePattern { + char *prefix; + char *mask; + int relevance; +}; + +/** + * GdkPixbufModule: + * @module_name: the name of the module, usually the same as the + * usual file extension for images of this type, eg. "xpm", "jpeg" or "png". + * @module_path: the path from which the module is loaded. + * @module: the loaded #GModule. + * @info: a #GdkPixbufFormat holding information about the module. + * @load: loads an image from a file. + * @load_xpm_data: loads an image from data in memory. + * @begin_load: begins an incremental load. + * @stop_load: stops an incremental load. + * @load_increment: continues an incremental load. + * @load_animation: loads an animation from a file. + * @save: saves a #GdkPixbuf to a file. + * @save_to_callback: saves a #GdkPixbuf by calling the given #GdkPixbufSaveFunc. + * @is_save_option_supported: returns whether a save option key is supported by the module + * + * A #GdkPixbufModule contains the necessary functions to load and save + * images in a certain file format. + * + * A #GdkPixbufModule can be loaded dynamically from a #GModule. + * Each loadable module must contain a #GdkPixbufModuleFillVtableFunc function + * named <function>fill_vtable</function>, which will get called when the module + * is loaded and must set the function pointers of the #GdkPixbufModule. + */ +typedef struct _GdkPixbufModule GdkPixbufModule; +struct _GdkPixbufModule { + char *module_name; + char *module_path; + GModule *module; + GdkPixbufFormat *info; + + GdkPixbuf *(* load) (FILE *f, + GError **error); + GdkPixbuf *(* load_xpm_data) (const char **data); + + /* Incremental loading */ + + gpointer (* begin_load) (GdkPixbufModuleSizeFunc size_func, + GdkPixbufModulePreparedFunc prepare_func, + GdkPixbufModuleUpdatedFunc update_func, + gpointer user_data, + GError **error); + gboolean (* stop_load) (gpointer context, + GError **error); + gboolean (* load_increment) (gpointer context, + const guchar *buf, + guint size, + GError **error); + + /* Animation loading */ + GdkPixbufAnimation *(* load_animation) (FILE *f, + GError **error); + + /* Saving */ + gboolean (* save) (FILE *f, + GdkPixbuf *pixbuf, + gchar **param_keys, + gchar **param_values, + GError **error); + + gboolean (*save_to_callback) (GdkPixbufSaveFunc save_func, + gpointer user_data, + GdkPixbuf *pixbuf, + gchar **option_keys, + gchar **option_values, + GError **error); + + gboolean (* is_save_option_supported) (const gchar *option_key); + + /*< private >*/ + void (*_reserved1) (void); + void (*_reserved2) (void); + void (*_reserved3) (void); + void (*_reserved4) (void); +}; + +/** + * GdkPixbufModuleFillVtableFunc: + * @module: a #GdkPixbufModule. + * + * Defines the type of the function used to set the vtable of a + * #GdkPixbufModule when it is loaded. + * + * Since: 2.2 + */ + +typedef void (* GdkPixbufModuleFillVtableFunc) (GdkPixbufModule *module); + +/** + * GdkPixbufModuleFillInfoFunc: + * @info: a #GdkPixbufFormat. + * + * Defines the type of the function used to fill a + * #GdkPixbufFormat structure with information about a module. + * + * Since: 2.2 + */ +typedef void (* GdkPixbufModuleFillInfoFunc) (GdkPixbufFormat *info); + +/** + * GdkPixbufFormatFlags: + * @GDK_PIXBUF_FORMAT_WRITABLE: the module can write out images in the format. + * @GDK_PIXBUF_FORMAT_SCALABLE: the image format is scalable + * @GDK_PIXBUF_FORMAT_THREADSAFE: the module is threadsafe. gdk-pixbuf + * ignores modules that are not marked as threadsafe. (Since 2.28). + * + * Flags which allow a module to specify further details about the supported + * operations. + * + * Since: 2.2 + */ +typedef enum /*< skip >*/ +{ + GDK_PIXBUF_FORMAT_WRITABLE = 1 << 0, + GDK_PIXBUF_FORMAT_SCALABLE = 1 << 1, + GDK_PIXBUF_FORMAT_THREADSAFE = 1 << 2 +} GdkPixbufFormatFlags; + +/** + * GdkPixbufFormat: + * @name: the name of the image format. + * @signature: the signature of the module. + * @domain: the message domain for the @description. + * @description: a description of the image format. + * @mime_types: a %NULL-terminated array of MIME types for the image format. + * @extensions: a %NULL-terminated array of typical filename extensions for the + * image format. + * @flags: a combination of #GdkPixbufFormatFlags. + * @disabled: a boolean determining whether the loader is disabled. + * @license: a string containing license information, typically set to + * shorthands like "GPL", "LGPL", etc. + * + * A #GdkPixbufFormat contains information about the image format accepted by a + * module. Only modules should access the fields directly, applications should + * use the <function>gdk_pixbuf_format_*</function> functions. + * + * Since: 2.2 + */ +struct _GdkPixbufFormat { + gchar *name; + GdkPixbufModulePattern *signature; + gchar *domain; + gchar *description; + gchar **mime_types; + gchar **extensions; + guint32 flags; + gboolean disabled; + gchar *license; +}; + +#endif /* GDK_PIXBUF_ENABLE_BACKEND */ + +G_END_DECLS + +#endif /* GDK_PIXBUF_IO_H */ diff --git a/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-loader.h b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-loader.h new file mode 100755 index 00000000..83648205 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-loader.h @@ -0,0 +1,119 @@ +/* GdkPixbuf library - Progressive loader object + * + * Copyright (C) 1999 The Free Software Foundation + * + * Authors: Mark Crichton <crichton@gimp.org> + * Miguel de Icaza <miguel@gnu.org> + * Federico Mena-Quintero <federico@gimp.org> + * Jonathan Blandford <jrb@redhat.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef GDK_PIXBUF_LOADER_H +#define GDK_PIXBUF_LOADER_H + +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly." +#endif + +#include <glib.h> +#include <glib-object.h> +#include <gdk-pixbuf/gdk-pixbuf-core.h> +#include <gdk-pixbuf/gdk-pixbuf-animation.h> +#include <gdk-pixbuf/gdk-pixbuf-io.h> + +G_BEGIN_DECLS + +#define GDK_TYPE_PIXBUF_LOADER (gdk_pixbuf_loader_get_type ()) +#define GDK_PIXBUF_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoader)) +#define GDK_PIXBUF_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoaderClass)) +#define GDK_IS_PIXBUF_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_PIXBUF_LOADER)) +#define GDK_IS_PIXBUF_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_LOADER)) +#define GDK_PIXBUF_LOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoaderClass)) + +/** + * GdkPixbufLoader: + * + * The GdkPixbufLoader struct contains only private + * fields. + */ +typedef struct _GdkPixbufLoader GdkPixbufLoader; +struct _GdkPixbufLoader +{ + GObject parent_instance; + + /*< private >*/ + gpointer priv; +}; + +typedef struct _GdkPixbufLoaderClass GdkPixbufLoaderClass; +struct _GdkPixbufLoaderClass +{ + GObjectClass parent_class; + + void (*size_prepared) (GdkPixbufLoader *loader, + int width, + int height); + + void (*area_prepared) (GdkPixbufLoader *loader); + + /* Last known frame needs a redraw for x, y, width, height */ + void (*area_updated) (GdkPixbufLoader *loader, + int x, + int y, + int width, + int height); + + void (*closed) (GdkPixbufLoader *loader); +}; + +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_loader_get_type (void) G_GNUC_CONST; +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbufLoader * gdk_pixbuf_loader_new (void); +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbufLoader * gdk_pixbuf_loader_new_with_type (const char *image_type, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_4 +GdkPixbufLoader * gdk_pixbuf_loader_new_with_mime_type (const char *mime_type, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_2 +void gdk_pixbuf_loader_set_size (GdkPixbufLoader *loader, + int width, + int height); +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_loader_write (GdkPixbufLoader *loader, + const guchar *buf, + gsize count, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_30 +gboolean gdk_pixbuf_loader_write_bytes (GdkPixbufLoader *loader, + GBytes *buffer, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf * gdk_pixbuf_loader_get_pixbuf (GdkPixbufLoader *loader); +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbufAnimation * gdk_pixbuf_loader_get_animation (GdkPixbufLoader *loader); +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_loader_close (GdkPixbufLoader *loader, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_2 +GdkPixbufFormat *gdk_pixbuf_loader_get_format (GdkPixbufLoader *loader); + +G_END_DECLS + +#endif + + diff --git a/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-macros.h b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-macros.h new file mode 100755 index 00000000..06296220 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-macros.h @@ -0,0 +1,662 @@ +/* GdkPixbuf library - GdkPixbuf Macros + * + * Copyright (C) 2016 Chun-wei Fan + * + * Authors: Chun-wei Fan <fanc999@yahoo.com.tw> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly." +#endif + +#ifndef GDK_PIXBUF_MACROS_H +#define GDK_PIXBUF_MACROS_H + +#include <glib.h> + +#include <gdk-pixbuf/gdk-pixbuf-features.h> + +/** + * GDK_PIXBUF_CHECK_VERSION: + * @major: major version (e.g. 2 for version 2.34.0) + * @minor: minor version (e.g. 34 for version 2.34.0) + * @micro: micro version (e.g. 0 for version 2.34.0) + * + * Macro to test the version of GdkPixbuf being compiled against. + * + * Returns: %TRUE if the version of the GdkPixbuf header files + * is the same as or newer than the passed-in version. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_CHECK_VERSION(major, minor, micro) \ + (GDK_PIXBUF_MAJOR > (major) || \ + (GDK_PIXBUF_MAJOR == (major) && GDK_PIXBUF_MINOR > (minor)) || \ + (GDK_PIXBUF_MAJOR == (major) && GDK_PIXBUF_MINOR == (minor) && \ + GDK_PIXBUF_MICRO >= (micro))) + +/** + * GDK_PIXBUF_VERSION_2_0: + * + * A macro that evaluates to the 2.0 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_0 (G_ENCODE_VERSION (2, 0)) + +/** + * GDK_PIXBUF_VERSION_2_2: + * + * A macro that evaluates to the 2.2 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_2 (G_ENCODE_VERSION (2, 2)) + +/** + * GDK_PIXBUF_VERSION_2_4: + * + * A macro that evaluates to the 2.4 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_4 (G_ENCODE_VERSION (2, 4)) + +/** + * GDK_PIXBUF_VERSION_2_6: + * + * A macro that evaluates to the 2.6 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_6 (G_ENCODE_VERSION (2, 6)) + +/** + * GDK_PIXBUF_VERSION_2_8: + * + * A macro that evaluates to the 2.8 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_8 (G_ENCODE_VERSION (2, 8)) + +/** + * GDK_PIXBUF_VERSION_2_10: + * + * A macro that evaluates to the 2.10 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_10 (G_ENCODE_VERSION (2, 10)) + +/** + * GDK_PIXBUF_VERSION_2_12: + * + * A macro that evaluates to the 2.12 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_12 (G_ENCODE_VERSION (2, 12)) + +/** + * GDK_PIXBUF_VERSION_2_14: + * + * A macro that evaluates to the 2.14 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_14 (G_ENCODE_VERSION (2, 14)) + +/** + * GDK_PIXBUF_VERSION_2_16: + * + * A macro that evaluates to the 2.16 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_16 (G_ENCODE_VERSION (2, 16)) + +/** + * GDK_PIXBUF_VERSION_2_18: + * + * A macro that evaluates to the 2.18 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_18 (G_ENCODE_VERSION (2, 18)) + +/** + * GDK_PIXBUF_VERSION_2_20: + * + * A macro that evaluates to the 2.20 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_20 (G_ENCODE_VERSION (2, 20)) + +/** + * GDK_PIXBUF_VERSION_2_22: + * + * A macro that evaluates to the 2.22 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_22 (G_ENCODE_VERSION (2, 22)) + +/** + * GDK_PIXBUF_VERSION_2_24: + * + * A macro that evaluates to the 2.24 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_24 (G_ENCODE_VERSION (2, 24)) + +/** + * GDK_PIXBUF_VERSION_2_26: + * + * A macro that evaluates to the 2.26 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_26 (G_ENCODE_VERSION (2, 26)) + +/** + * GDK_PIXBUF_VERSION_2_28: + * + * A macro that evaluates to the 2.28 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_28 (G_ENCODE_VERSION (2, 28)) + +/** + * GDK_PIXBUF_VERSION_2_30: + * + * A macro that evaluates to the 2.30 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_30 (G_ENCODE_VERSION (2, 30)) + +/** + * GDK_PIXBUF_VERSION_2_32: + * + * A macro that evaluates to the 2.32 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_32 (G_ENCODE_VERSION (2, 32)) + +/** + * GDK_PIXBUF_VERSION_2_34: + * + * A macro that evaluates to the 2.34 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_34 (G_ENCODE_VERSION (2, 34)) + +/** + * GDK_PIXBUF_VERSION_2_36: + * + * A macro that evaluates to the 2.36 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_36 (G_ENCODE_VERSION (2, 36)) + +#ifndef __GTK_DOC_IGNORE__ +#if (GDK_PIXBUF_MINOR % 2) +#define GDK_PIXBUF_VERSION_CUR_STABLE (G_ENCODE_VERSION (GDK_PIXBUF_MAJOR, GDK_PIXBUF_MINOR + 1)) +#else +#define GDK_PIXBUF_VERSION_CUR_STABLE (G_ENCODE_VERSION (GDK_PIXBUF_MAJOR, GDK_PIXBUF_MINOR)) +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if (GDK_PIXBUF_MINOR % 2) +#define GDK_PIXBUF_VERSION_PREV_STABLE (G_ENCODE_VERSION (GDK_PIXBUF_MAJOR, GDK_PIXBUF_MINOR - 1)) +#else +#define GDK_PIXBUF_VERSION_PREV_STABLE (G_ENCODE_VERSION (GDK_PIXBUF_MAJOR, GDK_PIXBUF_MINOR - 2)) +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +/** + * GDK_PIXBUF_VERSION_MIN_REQUIRED: + * + * A macro that should be defined by the user prior to including + * the gdk-pixbuf.h header. + * The definition should be one of the predefined version + * macros: %GDK_PIXBUF_VERSION_2_0, %GDK_PIXBUF_VERSION_2_2, ... + * + * This macro defines the lower bound for the GdkPixbuf API to use. + * + * If a function has been deprecated in a newer version of GdkPixbuf, + * defining this symbol hides the compiler warnings for those functions + * without disabling warnings for the other deprecated functions. + * + * <warning> + * Warning: if you define this macro, do not forget to update it! Especially + * when writing new code. Otherwise you can miss the new deprecations. + * </warning> + * + * Since: 2.36 + */ +#ifndef GDK_PIXBUF_VERSION_MIN_REQUIRED +#define GDK_PIXBUF_VERSION_MIN_REQUIRED (GDK_PIXBUF_VERSION_CUR_STABLE) +#endif + +/** + * GDK_PIXBUF_VERSION_MAX_ALLOWED: + * + * A macro that should be defined by the user prior to including + * the gdk-pixbuf.h header. + * The definition should be one of the predefined version + * macros: %GDK_PIXBUF_VERSION_2_0, %GDK_PIXBUF_VERSION_2_2, ... + * + * This macro defines the upper bound for the GdkPixbuf API to use. + * + * If a function has been introduced in a newer version of GdkPixbuf, + * it is possible to use this symbol to get compiler warnings when + * trying to use that function. + * + * Since: 2.36 + */ +#ifndef GDK_PIXBUF_VERSION_MAX_ALLOWED +#if GDK_PIXBUF_VERSION_MIN_REQUIRED > GDK_PIXBUF_VERSION_PREV_STABLE +#define GDK_PIXBUF_VERSION_MAX_ALLOWED GDK_PIXBUF_VERSION_MIN_REQUIRED +#else +#define GDK_PIXBUF_VERSION_MAX_ALLOWED GDK_PIXBUF_VERSION_CUR_STABLE +#endif +#endif + +/* sanity checks */ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_MIN_REQUIRED +#error "GDK_PIXBUF_VERSION_MAX_ALLOWED must be >= GDK_PIXBUF_VERSION_MIN_REQUIRED" +#endif +#if GDK_PIXBUF_VERSION_MIN_REQUIRED < GDK_PIXBUF_VERSION_2_0 +#error "GDK_PIXBUF_VERSION_MIN_REQUIRED must be >= GDK_PIXBUF_VERSION_2_0" +#endif + +#ifndef __GTK_DOC_IGNORE__ +#define GDK_PIXBUF_AVAILABLE_IN_ALL _GDK_PIXBUF_EXTERN +#endif + +/* Every new stable minor release should add a set of macros here */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_0 +#define GDK_PIXBUF_DEPRECATED_IN_2_0 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_0_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_0 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_0_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_0 +#define GDK_PIXBUF_AVAILABLE_IN_2_0 G_UNAVAILABLE(2, 0) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_0 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_2 +#define GDK_PIXBUF_DEPRECATED_IN_2_2 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_2_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_2 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_2_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_2 +#define GDK_PIXBUF_AVAILABLE_IN_2_2 G_UNAVAILABLE(2, 2) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_2 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_4 +#define GDK_PIXBUF_DEPRECATED_IN_2_4 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_4_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_4 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_4_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_4 +#define GDK_PIXBUF_AVAILABLE_IN_2_4 G_UNAVAILABLE(2, 4) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_4 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_6 +#define GDK_PIXBUF_DEPRECATED_IN_2_6 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_6_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_6 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_6_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_6 +#define GDK_PIXBUF_AVAILABLE_IN_2_6 G_UNAVAILABLE(2, 6) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_6 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_8 +#define GDK_PIXBUF_DEPRECATED_IN_2_8 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_8_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_8 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_8_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_8 +#define GDK_PIXBUF_AVAILABLE_IN_2_8 G_UNAVAILABLE(2, 8) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_8 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_10 +#define GDK_PIXBUF_DEPRECATED_IN_2_10 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_10_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_10 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_10_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_10 +#define GDK_PIXBUF_AVAILABLE_IN_2_10 G_UNAVAILABLE(2, 10) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_10 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_12 +#define GDK_PIXBUF_DEPRECATED_IN_2_12 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_12_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_12 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_12_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_12 +#define GDK_PIXBUF_AVAILABLE_IN_2_12 G_UNAVAILABLE(2, 12) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_12 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_14 +#define GDK_PIXBUF_DEPRECATED_IN_2_14 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_14_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_14 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_14_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_14 +#define GDK_PIXBUF_AVAILABLE_IN_2_14 G_UNAVAILABLE(2, 14) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_14 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_16 +#define GDK_PIXBUF_DEPRECATED_IN_2_16 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_16_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_16 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_16_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_16 +#define GDK_PIXBUF_AVAILABLE_IN_2_16 G_UNAVAILABLE(2, 16) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_16 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_18 +#define GDK_PIXBUF_DEPRECATED_IN_2_18 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_18_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_18 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_18_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_18 +#define GDK_PIXBUF_AVAILABLE_IN_2_18 G_UNAVAILABLE(2, 18) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_18 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_20 +#define GDK_PIXBUF_DEPRECATED_IN_2_20 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_20_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_20 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_20_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_20 +#define GDK_PIXBUF_AVAILABLE_IN_2_20 G_UNAVAILABLE(2, 20) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_20 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_22 +#define GDK_PIXBUF_DEPRECATED_IN_2_22 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_22_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_22 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_22_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_22 +#define GDK_PIXBUF_AVAILABLE_IN_2_22 G_UNAVAILABLE(2, 22) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_22 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_24 +#define GDK_PIXBUF_DEPRECATED_IN_2_24 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_24_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_24 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_24_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_24 +#define GDK_PIXBUF_AVAILABLE_IN_2_24 G_UNAVAILABLE(2, 22) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_24 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_26 +#define GDK_PIXBUF_DEPRECATED_IN_2_26 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_26_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_26 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_26_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_26 +#define GDK_PIXBUF_AVAILABLE_IN_2_26 G_UNAVAILABLE(2, 22) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_26 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_28 +#define GDK_PIXBUF_DEPRECATED_IN_2_28 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_28_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_28 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_28_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_28 +#define GDK_PIXBUF_AVAILABLE_IN_2_28 G_UNAVAILABLE(2, 22) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_28 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_30 +#define GDK_PIXBUF_DEPRECATED_IN_2_30 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_30_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_30 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_30_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_30 +#define GDK_PIXBUF_AVAILABLE_IN_2_30 G_UNAVAILABLE(2, 22) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_30 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_32 +#define GDK_PIXBUF_DEPRECATED_IN_2_32 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_32_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_32 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_32_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_32 +#define GDK_PIXBUF_AVAILABLE_IN_2_32 G_UNAVAILABLE(2, 22) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_32 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_34 +#define GDK_PIXBUF_DEPRECATED_IN_2_34 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_34_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_34 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_34_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_34 +#define GDK_PIXBUF_AVAILABLE_IN_2_34 G_UNAVAILABLE(2, 22) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_34 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_36 +#define GDK_PIXBUF_DEPRECATED_IN_2_36 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_36_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_36 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_36_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_36 +#define GDK_PIXBUF_AVAILABLE_IN_2_36 G_UNAVAILABLE(2, 22) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_36 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#endif /* GDK_PIXBUF_MACROS_H */ diff --git a/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-marshal.h b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-marshal.h new file mode 100755 index 00000000..0b4153a8 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-marshal.h @@ -0,0 +1,38 @@ +#if !defined(GDK_PIXBUF_DISABLE_DEPRECATED) || defined(GDK_PIXBUF_COMPILATION) +/* This file is generated by glib-genmarshal, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */ +#ifndef ___GDK_PIXBUF_MARSHAL_MARSHAL_H__ +#define ___GDK_PIXBUF_MARSHAL_MARSHAL_H__ + +#include <glib-object.h> + +G_BEGIN_DECLS + +/* VOID:VOID (./gdk-pixbuf-marshal.list:25) */ +#define _gdk_pixbuf_marshal_VOID__VOID g_cclosure_marshal_VOID__VOID + +/* VOID:INT,INT (./gdk-pixbuf-marshal.list:26) */ +extern +void _gdk_pixbuf_marshal_VOID__INT_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + +/* VOID:INT,INT,INT,INT (./gdk-pixbuf-marshal.list:27) */ +extern +void _gdk_pixbuf_marshal_VOID__INT_INT_INT_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + +/* VOID:POINTER (./gdk-pixbuf-marshal.list:28) */ +#define _gdk_pixbuf_marshal_VOID__POINTER g_cclosure_marshal_VOID__POINTER + + +G_END_DECLS + +#endif /* ___GDK_PIXBUF_MARSHAL_MARSHAL_H__ */ +#endif /* !GDK_PIXBUF_DISABLE_DEPRECATED || GDK_PIXBUF_COMPILATION */ diff --git a/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h new file mode 100755 index 00000000..487120e0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h @@ -0,0 +1,70 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ +/* GdkPixbuf library - Simple frame-based animations + * + * Copyright (C) 2004 Dom Lachowicz + * + * Authors: Dom Lachowicz <cinamod@hotmail.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef GDK_PIXBUF_SIMPLE_ANIM_H +#define GDK_PIXBUF_SIMPLE_ANIM_H + +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly." +#endif + +#include <gdk-pixbuf/gdk-pixbuf-animation.h> + +G_BEGIN_DECLS + +/** + * GdkPixbufSimpleAnim: + * + * An opaque struct representing a simple animation. + */ +typedef struct _GdkPixbufSimpleAnim GdkPixbufSimpleAnim; +typedef struct _GdkPixbufSimpleAnimClass GdkPixbufSimpleAnimClass; + +#define GDK_TYPE_PIXBUF_SIMPLE_ANIM (gdk_pixbuf_simple_anim_get_type ()) +#define GDK_PIXBUF_SIMPLE_ANIM(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_SIMPLE_ANIM, GdkPixbufSimpleAnim)) +#define GDK_IS_PIXBUF_SIMPLE_ANIM(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_SIMPLE_ANIM)) + +#define GDK_PIXBUF_SIMPLE_ANIM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_SIMPLE_ANIM, GdkPixbufSimpleAnimClass)) +#define GDK_IS_PIXBUF_SIMPLE_ANIM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_SIMPLE_ANIM)) +#define GDK_PIXBUF_SIMPLE_ANIM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_SIMPLE_ANIM, GdkPixbufSimpleAnimClass)) + +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_simple_anim_get_type (void) G_GNUC_CONST; +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_simple_anim_iter_get_type (void) G_GNUC_CONST; + +GDK_PIXBUF_AVAILABLE_IN_2_8 +GdkPixbufSimpleAnim *gdk_pixbuf_simple_anim_new (gint width, + gint height, + gfloat rate); +GDK_PIXBUF_AVAILABLE_IN_2_8 +void gdk_pixbuf_simple_anim_add_frame (GdkPixbufSimpleAnim *animation, + GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_simple_anim_set_loop (GdkPixbufSimpleAnim *animation, + gboolean loop); +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_simple_anim_get_loop (GdkPixbufSimpleAnim *animation); + +G_END_DECLS + + +#endif /* GDK_PIXBUF_SIMPLE_ANIM_H */ diff --git a/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-transform.h b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-transform.h new file mode 100755 index 00000000..875628c7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-transform.h @@ -0,0 +1,165 @@ +/* GdkPixbuf library - transformations + * + * Copyright (C) 2003 The Free Software Foundation + * + * Authors: Mark Crichton <crichton@gimp.org> + * Miguel de Icaza <miguel@gnu.org> + * Federico Mena-Quintero <federico@gimp.org> + * Havoc Pennington <hp@redhat.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef GDK_PIXBUF_TRANSFORM_H +#define GDK_PIXBUF_TRANSFORM_H + +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly." +#endif + +#include <glib.h> +#include <gdk-pixbuf/gdk-pixbuf-core.h> + + +G_BEGIN_DECLS + +/* Scaling */ + +/** + * GdkInterpType: + * @GDK_INTERP_NEAREST: Nearest neighbor sampling; this is the fastest + * and lowest quality mode. Quality is normally unacceptable when scaling + * down, but may be OK when scaling up. + * @GDK_INTERP_TILES: This is an accurate simulation of the PostScript + * image operator without any interpolation enabled. Each pixel is + * rendered as a tiny parallelogram of solid color, the edges of which + * are implemented with antialiasing. It resembles nearest neighbor for + * enlargement, and bilinear for reduction. + * @GDK_INTERP_BILINEAR: Best quality/speed balance; use this mode by + * default. Bilinear interpolation. For enlargement, it is + * equivalent to point-sampling the ideal bilinear-interpolated image. + * For reduction, it is equivalent to laying down small tiles and + * integrating over the coverage area. + * @GDK_INTERP_HYPER: This is the slowest and highest quality + * reconstruction function. It is derived from the hyperbolic filters in + * Wolberg's "Digital Image Warping", and is formally defined as the + * hyperbolic-filter sampling the ideal hyperbolic-filter interpolated + * image (the filter is designed to be idempotent for 1:1 pixel mapping). + * + * This enumeration describes the different interpolation modes that + * can be used with the scaling functions. @GDK_INTERP_NEAREST is + * the fastest scaling method, but has horrible quality when + * scaling down. @GDK_INTERP_BILINEAR is the best choice if you + * aren't sure what to choose, it has a good speed/quality balance. + * + * <note> + * Cubic filtering is missing from the list; hyperbolic + * interpolation is just as fast and results in higher quality. + * </note> + */ +typedef enum { + GDK_INTERP_NEAREST, + GDK_INTERP_TILES, + GDK_INTERP_BILINEAR, + GDK_INTERP_HYPER +} GdkInterpType; + +/** + * GdkPixbufRotation: + * @GDK_PIXBUF_ROTATE_NONE: No rotation. + * @GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE: Rotate by 90 degrees. + * @GDK_PIXBUF_ROTATE_UPSIDEDOWN: Rotate by 180 degrees. + * @GDK_PIXBUF_ROTATE_CLOCKWISE: Rotate by 270 degrees. + * + * The possible rotations which can be passed to gdk_pixbuf_rotate_simple(). + * To make them easier to use, their numerical values are the actual degrees. + */ +typedef enum { + GDK_PIXBUF_ROTATE_NONE = 0, + GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE = 90, + GDK_PIXBUF_ROTATE_UPSIDEDOWN = 180, + GDK_PIXBUF_ROTATE_CLOCKWISE = 270 +} GdkPixbufRotation; + +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_scale (const GdkPixbuf *src, + GdkPixbuf *dest, + int dest_x, + int dest_y, + int dest_width, + int dest_height, + double offset_x, + double offset_y, + double scale_x, + double scale_y, + GdkInterpType interp_type); +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_composite (const GdkPixbuf *src, + GdkPixbuf *dest, + int dest_x, + int dest_y, + int dest_width, + int dest_height, + double offset_x, + double offset_y, + double scale_x, + double scale_y, + GdkInterpType interp_type, + int overall_alpha); +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_composite_color (const GdkPixbuf *src, + GdkPixbuf *dest, + int dest_x, + int dest_y, + int dest_width, + int dest_height, + double offset_x, + double offset_y, + double scale_x, + double scale_y, + GdkInterpType interp_type, + int overall_alpha, + int check_x, + int check_y, + int check_size, + guint32 color1, + guint32 color2); + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_scale_simple (const GdkPixbuf *src, + int dest_width, + int dest_height, + GdkInterpType interp_type); + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_composite_color_simple (const GdkPixbuf *src, + int dest_width, + int dest_height, + GdkInterpType interp_type, + int overall_alpha, + int check_size, + guint32 color1, + guint32 color2); + +GDK_PIXBUF_AVAILABLE_IN_2_6 +GdkPixbuf *gdk_pixbuf_rotate_simple (const GdkPixbuf *src, + GdkPixbufRotation angle); +GDK_PIXBUF_AVAILABLE_IN_2_6 +GdkPixbuf *gdk_pixbuf_flip (const GdkPixbuf *src, + gboolean horizontal); + +G_END_DECLS + + +#endif /* GDK_PIXBUF_TRANSFORM_H */ diff --git a/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf.h b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf.h new file mode 100755 index 00000000..0770b2fd --- /dev/null +++ b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf.h @@ -0,0 +1,46 @@ +/* GdkPixbuf library - Main header file + * + * Copyright (C) 1999 The Free Software Foundation + * + * Authors: Mark Crichton <crichton@gimp.org> + * Miguel de Icaza <miguel@gnu.org> + * Federico Mena-Quintero <federico@gimp.org> + * Havoc Pennington <hp@redhat.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef GDK_PIXBUF_H +#define GDK_PIXBUF_H + +#define GDK_PIXBUF_H_INSIDE + +#include <glib.h> +#include <gdk-pixbuf/gdk-pixbuf-macros.h> +#include <gdk-pixbuf/gdk-pixbuf-features.h> +#include <glib-object.h> + +#include <gdk-pixbuf/gdk-pixbuf-core.h> +#include <gdk-pixbuf/gdk-pixbuf-transform.h> +#include <gdk-pixbuf/gdk-pixbuf-animation.h> +#include <gdk-pixbuf/gdk-pixbuf-simple-anim.h> +#include <gdk-pixbuf/gdk-pixbuf-io.h> +#include <gdk-pixbuf/gdk-pixbuf-loader.h> +#include <gdk-pixbuf/gdk-pixbuf-enum-types.h> + +#include <gdk-pixbuf/gdk-pixbuf-autocleanups.h> + +#undef GDK_PIXBUF_H_INSIDE + +#endif /* GDK_PIXBUF_H */ diff --git a/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixdata.h b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixdata.h new file mode 100755 index 00000000..0aa2a255 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixdata.h @@ -0,0 +1,176 @@ +/* GdkPixbuf library - GdkPixdata - functions for inlined pixbuf handling + * Copyright (C) 1999, 2001 Tim Janik + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ +#ifndef __GDK_PIXDATA_H__ +#define __GDK_PIXDATA_H__ + +#ifndef GDK_PIXBUF_DISABLE_DEPRECATED +#include <gdk-pixbuf/gdk-pixbuf.h> + +G_BEGIN_DECLS + +/** + * GDK_PIXBUF_MAGIC_NUMBER: + * + * Magic number for #GdkPixdata structures. + **/ +#define GDK_PIXBUF_MAGIC_NUMBER (0x47646b50) /* 'GdkP' */ + +/** + * GdkPixdataType: + * @GDK_PIXDATA_COLOR_TYPE_RGB: each pixel has red, green and blue samples. + * @GDK_PIXDATA_COLOR_TYPE_RGBA: each pixel has red, green and blue samples + * and an alpha value. + * @GDK_PIXDATA_COLOR_TYPE_MASK: mask for the colortype flags of the enum. + * @GDK_PIXDATA_SAMPLE_WIDTH_8: each sample has 8 bits. + * @GDK_PIXDATA_SAMPLE_WIDTH_MASK: mask for the sample width flags of the enum. + * @GDK_PIXDATA_ENCODING_RAW: the pixel data is in raw form. + * @GDK_PIXDATA_ENCODING_RLE: the pixel data is run-length encoded. Runs may + * be up to 127 bytes long; their length is stored in a single byte + * preceding the pixel data for the run. If a run is constant, its length + * byte has the high bit set and the pixel data consists of a single pixel + * which must be repeated. + * @GDK_PIXDATA_ENCODING_MASK: mask for the encoding flags of the enum. + * + * An enumeration containing three sets of flags for a #GdkPixdata struct: + * one for the used colorspace, one for the width of the samples and one + * for the encoding of the pixel data. + **/ +typedef enum +{ + /* colorspace + alpha */ + GDK_PIXDATA_COLOR_TYPE_RGB = 0x01, + GDK_PIXDATA_COLOR_TYPE_RGBA = 0x02, + GDK_PIXDATA_COLOR_TYPE_MASK = 0xff, + /* width, support 8bits only currently */ + GDK_PIXDATA_SAMPLE_WIDTH_8 = 0x01 << 16, + GDK_PIXDATA_SAMPLE_WIDTH_MASK = 0x0f << 16, + /* encoding */ + GDK_PIXDATA_ENCODING_RAW = 0x01 << 24, + GDK_PIXDATA_ENCODING_RLE = 0x02 << 24, + GDK_PIXDATA_ENCODING_MASK = 0x0f << 24 +} GdkPixdataType; + +/** + * GdkPixdata: + * @magic: magic number. A valid #GdkPixdata structure must have + * #GDK_PIXBUF_MAGIC_NUMBER here. + * @length: less than 1 to disable length checks, otherwise + * #GDK_PIXDATA_HEADER_LENGTH + length of @pixel_data. + * @pixdata_type: information about colorspace, sample width and + * encoding, in a #GdkPixdataType. + * @rowstride: Distance in bytes between rows. + * @width: Width of the image in pixels. + * @height: Height of the image in pixels. + * @pixel_data: (array) (element-type guint8): @width x @height pixels, encoded according to @pixdata_type + * and @rowstride. + * + * A #GdkPixdata contains pixbuf information in a form suitable for + * serialization and streaming. + **/ +typedef struct _GdkPixdata GdkPixdata; +struct _GdkPixdata +{ + guint32 magic; /* GDK_PIXBUF_MAGIC_NUMBER */ + gint32 length; /* <1 to disable length checks, otherwise: + * GDK_PIXDATA_HEADER_LENGTH + pixel_data length + */ + guint32 pixdata_type; /* GdkPixdataType */ + guint32 rowstride; + guint32 width; + guint32 height; + guint8 *pixel_data; +}; + +/** + * GDK_PIXDATA_HEADER_LENGTH: + * + * The length of a #GdkPixdata structure without the @pixel_data pointer. + **/ +#define GDK_PIXDATA_HEADER_LENGTH (4 + 4 + 4 + 4 + 4 + 4) + +/* the returned stream is plain htonl of GdkPixdata members + pixel_data */ +GDK_PIXBUF_DEPRECATED_IN_2_32 +guint8* gdk_pixdata_serialize (const GdkPixdata *pixdata, + guint *stream_length_p); +GDK_PIXBUF_DEPRECATED_IN_2_32 +gboolean gdk_pixdata_deserialize (GdkPixdata *pixdata, + guint stream_length, + const guint8 *stream, + GError **error); +GDK_PIXBUF_DEPRECATED_IN_2_32 +gpointer gdk_pixdata_from_pixbuf (GdkPixdata *pixdata, + const GdkPixbuf *pixbuf, + gboolean use_rle); +GDK_PIXBUF_DEPRECATED_IN_2_32 +GdkPixbuf* gdk_pixbuf_from_pixdata (const GdkPixdata *pixdata, + gboolean copy_pixels, + GError **error); +/** + * GdkPixdataDumpType: + * @GDK_PIXDATA_DUMP_PIXDATA_STREAM: Generate pixbuf data stream (a single + * string containing a serialized #GdkPixdata structure in network byte + * order). + * @GDK_PIXDATA_DUMP_PIXDATA_STRUCT: Generate #GdkPixdata structure (needs + * the #GdkPixdata structure definition from gdk-pixdata.h). + * @GDK_PIXDATA_DUMP_MACROS: Generate <function>*_ROWSTRIDE</function>, + * <function>*_WIDTH</function>, <function>*_HEIGHT</function>, + * <function>*_BYTES_PER_PIXEL</function> and + * <function>*_RLE_PIXEL_DATA</function> or <function>*_PIXEL_DATA</function> + * macro definitions for the image. + * @GDK_PIXDATA_DUMP_GTYPES: Generate GLib data types instead of + * standard C data types. + * @GDK_PIXDATA_DUMP_CTYPES: Generate standard C data types instead of + * GLib data types. + * @GDK_PIXDATA_DUMP_STATIC: Generate static symbols. + * @GDK_PIXDATA_DUMP_CONST: Generate const symbols. + * @GDK_PIXDATA_DUMP_RLE_DECODER: Provide a <function>*_RUN_LENGTH_DECODE(image_buf, rle_data, size, bpp)</function> + * macro definition to decode run-length encoded image data. + * + * An enumeration which is used by gdk_pixdata_to_csource() to + * determine the form of C source to be generated. The three values + * @GDK_PIXDATA_DUMP_PIXDATA_STREAM, @GDK_PIXDATA_DUMP_PIXDATA_STRUCT + * and @GDK_PIXDATA_DUMP_MACROS are mutually exclusive, as are + * @GDK_PIXBUF_DUMP_GTYPES and @GDK_PIXBUF_DUMP_CTYPES. The remaining + * elements are optional flags that can be freely added. + **/ +typedef enum +{ + /* type of source to save */ + GDK_PIXDATA_DUMP_PIXDATA_STREAM = 0, + GDK_PIXDATA_DUMP_PIXDATA_STRUCT = 1, + GDK_PIXDATA_DUMP_MACROS = 2, + /* type of variables to use */ + GDK_PIXDATA_DUMP_GTYPES = 0, + GDK_PIXDATA_DUMP_CTYPES = 1 << 8, + GDK_PIXDATA_DUMP_STATIC = 1 << 9, + GDK_PIXDATA_DUMP_CONST = 1 << 10, + /* save RLE decoder macro? */ + GDK_PIXDATA_DUMP_RLE_DECODER = 1 << 16 +} GdkPixdataDumpType; + + +GDK_PIXBUF_DEPRECATED_IN_2_32 +GString* gdk_pixdata_to_csource (GdkPixdata *pixdata, + const gchar *name, + GdkPixdataDumpType dump_type); + + +G_END_DECLS + +#endif /* GDK_PIXBUF_DISABLE_DEPRECATED */ + +#endif /* __GDK_PIXDATA_H__ */ diff --git a/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/lib/libgdk_pixbuf-2.0.0.dylib b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/lib/libgdk_pixbuf-2.0.0.dylib new file mode 100755 index 00000000..2d6584d1 Binary files /dev/null and b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/lib/libgdk_pixbuf-2.0.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/lib/libgdk_pixbuf-2.0.dylib b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/lib/libgdk_pixbuf-2.0.dylib new file mode 120000 index 00000000..5feb31db --- /dev/null +++ b/frameworks/cairosvg/dependencies/gdk-pixbuf/2.36.12/lib/libgdk_pixbuf-2.0.dylib @@ -0,0 +1 @@ +libgdk_pixbuf-2.0.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/include/autosprintf.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/include/autosprintf.h new file mode 100755 index 00000000..1c9eb18a --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/include/autosprintf.h @@ -0,0 +1,67 @@ +/* Class autosprintf - formatted output to an ostream. + Copyright (C) 2002, 2012-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _AUTOSPRINTF_H +#define _AUTOSPRINTF_H + +/* This feature is available in gcc versions 2.5 and later. */ +#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ +# define _AUTOSPRINTF_ATTRIBUTE_FORMAT() /* empty */ +#else +/* The __-protected variants of 'format' and 'printf' attributes + are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) +# define _AUTOSPRINTF_ATTRIBUTE_FORMAT() \ + __attribute__ ((__format__ (__printf__, 2, 3))) +# else +# define _AUTOSPRINTF_ATTRIBUTE_FORMAT() \ + __attribute__ ((format (printf, 2, 3))) +# endif +#endif + +#include <string> +#include <iostream> + +namespace gnu +{ + /* A temporary object, usually allocated on the stack, representing + the result of an asprintf() call. */ + class autosprintf + { + public: + /* Constructor: takes a format string and the printf arguments. */ + autosprintf (const char *format, ...) + _AUTOSPRINTF_ATTRIBUTE_FORMAT(); + /* Copy constructor. */ + autosprintf (const autosprintf& src); + autosprintf& operator = (autosprintf copy); + /* Destructor: frees the temporarily allocated string. */ + ~autosprintf (); + /* Conversion to string. */ + operator char * () const; + operator std::string () const; + /* Output to an ostream. */ + friend inline std::ostream& operator<< (std::ostream& stream, const autosprintf& tmp) + { + stream << (tmp.str ? tmp.str : "(error in autosprintf)"); + return stream; + } + private: + char *str; + }; +} + +#endif /* _AUTOSPRINTF_H */ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/include/gettext-po.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/include/gettext-po.h new file mode 100755 index 00000000..a42ae224 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/include/gettext-po.h @@ -0,0 +1,357 @@ +/* Public API for GNU gettext PO files - contained in libgettextpo. + Copyright (C) 2003-2008, 2010, 2015-2016 Free Software Foundation, Inc. + Written by Bruno Haible <bruno@clisp.org>, 2003. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _GETTEXT_PO_H +#define _GETTEXT_PO_H 1 + +#include <stdlib.h> + +#ifdef __cplusplus +extern "C" { +#endif + + +/* =========================== Meta Information ============================ */ + +/* Version number: (major<<16) + (minor<<8) + subminor */ +#define LIBGETTEXTPO_VERSION 0x001308 +extern int libgettextpo_version; + +/* ================================= Types ================================= */ + +/* A po_file_t represents the contents of a PO file. */ +typedef struct po_file *po_file_t; + +/* A po_message_iterator_t represents an iterator through a domain of a + PO file. */ +typedef struct po_message_iterator *po_message_iterator_t; + +/* A po_message_t represents a message in a PO file. */ +typedef struct po_message *po_message_t; + +/* A po_filepos_t represents a string's position within a source file. */ +typedef struct po_filepos *po_filepos_t; + +/* A po_error_handler handles error situations. */ +struct po_error_handler +{ + /* Signal an error. The error message is built from FORMAT and the following + arguments. ERRNUM, if nonzero, is an errno value. + Must increment the error_message_count variable declared in error.h. + Must not return if STATUS is nonzero. */ + void (*error) (int status, int errnum, + const char *format, ...) +#if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3) && !__STRICT_ANSI__ + __attribute__ ((__format__ (__printf__, 3, 4))) +#endif + ; + + /* Signal an error. The error message is built from FORMAT and the following + arguments. The error location is at FILENAME line LINENO. ERRNUM, if + nonzero, is an errno value. + Must increment the error_message_count variable declared in error.h. + Must not return if STATUS is nonzero. */ + void (*error_at_line) (int status, int errnum, + const char *filename, unsigned int lineno, + const char *format, ...) +#if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3) && !__STRICT_ANSI__ + __attribute__ ((__format__ (__printf__, 5, 6))) +#endif + ; + + /* Signal a multiline warning. The PREFIX applies to all lines of the + MESSAGE. Free the PREFIX and MESSAGE when done. */ + void (*multiline_warning) (char *prefix, char *message); + + /* Signal a multiline error. The PREFIX applies to all lines of the + MESSAGE. Free the PREFIX and MESSAGE when done. + Must increment the error_message_count variable declared in error.h if + PREFIX is non-NULL. */ + void (*multiline_error) (char *prefix, char *message); +}; +typedef const struct po_error_handler *po_error_handler_t; + +/* A po_xerror_handler handles warnings, error and fatal error situations. */ +#define PO_SEVERITY_WARNING 0 /* just a warning, tell the user */ +#define PO_SEVERITY_ERROR 1 /* an error, the operation cannot complete */ +#define PO_SEVERITY_FATAL_ERROR 2 /* an error, the operation must be aborted */ +struct po_xerror_handler +{ + /* Signal a problem of the given severity. + MESSAGE and/or FILENAME + LINENO indicate where the problem occurred. + If FILENAME is NULL, FILENAME and LINENO and COLUMN should be ignored. + If LINENO is (size_t)(-1), LINENO and COLUMN should be ignored. + If COLUMN is (size_t)(-1), it should be ignored. + MESSAGE_TEXT is the problem description (if MULTILINE_P is true, + multiple lines of text, each terminated with a newline, otherwise + usually a single line). + Must not return if SEVERITY is PO_SEVERITY_FATAL_ERROR. */ + void (*xerror) (int severity, + po_message_t message, + const char *filename, size_t lineno, size_t column, + int multiline_p, const char *message_text); + /* Signal a problem that refers to two messages. + Similar to two calls to xerror. + If possible, a "..." can be appended to MESSAGE_TEXT1 and prepended to + MESSAGE_TEXT2. */ + void (*xerror2) (int severity, + po_message_t message1, + const char *filename1, size_t lineno1, size_t column1, + int multiline_p1, const char *message_text1, + po_message_t message2, + const char *filename2, size_t lineno2, size_t column2, + int multiline_p2, const char *message_text2); +}; +typedef const struct po_xerror_handler *po_xerror_handler_t; + +/* Memory allocation: + The memory allocations performed by these functions use xmalloc(), + therefore will cause a program exit if memory is exhausted. + The memory allocated by po_file_read, and implicitly returned through + the po_message_* functions, lasts until freed with po_file_free. */ + + +/* ============================= po_file_t API ============================= */ + +/* Create an empty PO file representation in memory. */ +extern po_file_t po_file_create (void); + +/* Read a PO file into memory. + Return its contents. Upon failure, return NULL and set errno. */ +#define po_file_read po_file_read_v3 +extern po_file_t po_file_read (const char *filename, + po_xerror_handler_t handler); + +/* Write an in-memory PO file to a file. + Upon failure, return NULL and set errno. */ +#define po_file_write po_file_write_v2 +extern po_file_t po_file_write (po_file_t file, const char *filename, + po_xerror_handler_t handler); + +/* Free a PO file from memory. */ +extern void po_file_free (po_file_t file); + +/* Return the names of the domains covered by a PO file in memory. */ +extern const char * const * po_file_domains (po_file_t file); + + +/* =========================== Header entry API ============================ */ + +/* Return the header entry of a domain of a PO file in memory. + The domain NULL denotes the default domain. + Return NULL if there is no header entry. */ +extern const char * po_file_domain_header (po_file_t file, const char *domain); + +/* Return the value of a field in a header entry. + The return value is either a freshly allocated string, to be freed by the + caller, or NULL. */ +extern char * po_header_field (const char *header, const char *field); + +/* Return the header entry with a given field set to a given value. The field + is added if necessary. + The return value is a freshly allocated string. */ +extern char * po_header_set_field (const char *header, const char *field, const char *value); + + +/* ======================= po_message_iterator_t API ======================= */ + +/* Create an iterator for traversing a domain of a PO file in memory. + The domain NULL denotes the default domain. */ +extern po_message_iterator_t po_message_iterator (po_file_t file, const char *domain); + +/* Free an iterator. */ +extern void po_message_iterator_free (po_message_iterator_t iterator); + +/* Return the next message, and advance the iterator. + Return NULL at the end of the message list. */ +extern po_message_t po_next_message (po_message_iterator_t iterator); + +/* Insert a message in a PO file in memory, in the domain and at the position + indicated by the iterator. The iterator thereby advances past the freshly + inserted message. */ +extern void po_message_insert (po_message_iterator_t iterator, po_message_t message); + + +/* =========================== po_message_t API ============================ */ + +/* Return a freshly constructed message. + To finish initializing the message, you must set the msgid and msgstr. */ +extern po_message_t po_message_create (void); + +/* Return the context of a message, or NULL for a message not restricted to a + context. */ +extern const char * po_message_msgctxt (po_message_t message); + +/* Change the context of a message. NULL means a message not restricted to a + context. */ +extern void po_message_set_msgctxt (po_message_t message, const char *msgctxt); + +/* Return the msgid (untranslated English string) of a message. */ +extern const char * po_message_msgid (po_message_t message); + +/* Change the msgid (untranslated English string) of a message. */ +extern void po_message_set_msgid (po_message_t message, const char *msgid); + +/* Return the msgid_plural (untranslated English plural string) of a message, + or NULL for a message without plural. */ +extern const char * po_message_msgid_plural (po_message_t message); + +/* Change the msgid_plural (untranslated English plural string) of a message. + NULL means a message without plural. */ +extern void po_message_set_msgid_plural (po_message_t message, const char *msgid_plural); + +/* Return the msgstr (translation) of a message. + Return the empty string for an untranslated message. */ +extern const char * po_message_msgstr (po_message_t message); + +/* Change the msgstr (translation) of a message. + Use an empty string to denote an untranslated message. */ +extern void po_message_set_msgstr (po_message_t message, const char *msgstr); + +/* Return the msgstr[index] for a message with plural handling, or + NULL when the index is out of range or for a message without plural. */ +extern const char * po_message_msgstr_plural (po_message_t message, int index); + +/* Change the msgstr[index] for a message with plural handling. + Use a NULL value at the end to reduce the number of plural forms. */ +extern void po_message_set_msgstr_plural (po_message_t message, int index, const char *msgstr); + +/* Return the comments for a message. */ +extern const char * po_message_comments (po_message_t message); + +/* Change the comments for a message. + comments should be a multiline string, ending in a newline, or empty. */ +extern void po_message_set_comments (po_message_t message, const char *comments); + +/* Return the extracted comments for a message. */ +extern const char * po_message_extracted_comments (po_message_t message); + +/* Change the extracted comments for a message. + comments should be a multiline string, ending in a newline, or empty. */ +extern void po_message_set_extracted_comments (po_message_t message, const char *comments); + +/* Return the i-th file position for a message, or NULL if i is out of + range. */ +extern po_filepos_t po_message_filepos (po_message_t message, int i); + +/* Remove the i-th file position from a message. + The indices of all following file positions for the message are decremented + by one. */ +extern void po_message_remove_filepos (po_message_t message, int i); + +/* Add a file position to a message, if it is not already present for the + message. + file is the file name. + start_line is the line number where the string starts, or (size_t)(-1) if no + line number is available. */ +extern void po_message_add_filepos (po_message_t message, const char *file, size_t start_line); + +/* Return the previous context of a message, or NULL for none. */ +extern const char * po_message_prev_msgctxt (po_message_t message); + +/* Change the previous context of a message. NULL is allowed. */ +extern void po_message_set_prev_msgctxt (po_message_t message, const char *prev_msgctxt); + +/* Return the previous msgid (untranslated English string) of a message, or + NULL for none. */ +extern const char * po_message_prev_msgid (po_message_t message); + +/* Change the previous msgid (untranslated English string) of a message. + NULL is allowed. */ +extern void po_message_set_prev_msgid (po_message_t message, const char *prev_msgid); + +/* Return the previous msgid_plural (untranslated English plural string) of a + message, or NULL for none. */ +extern const char * po_message_prev_msgid_plural (po_message_t message); + +/* Change the previous msgid_plural (untranslated English plural string) of a + message. NULL is allowed. */ +extern void po_message_set_prev_msgid_plural (po_message_t message, const char *prev_msgid_plural); + +/* Return true if the message is marked obsolete. */ +extern int po_message_is_obsolete (po_message_t message); + +/* Change the obsolete mark of a message. */ +extern void po_message_set_obsolete (po_message_t message, int obsolete); + +/* Return true if the message is marked fuzzy. */ +extern int po_message_is_fuzzy (po_message_t message); + +/* Change the fuzzy mark of a message. */ +extern void po_message_set_fuzzy (po_message_t message, int fuzzy); + +/* Return true if the message is marked as being a format string of the given + type (e.g. "c-format"). */ +extern int po_message_is_format (po_message_t message, const char *format_type); + +/* Change the format string mark for a given type of a message. */ +extern void po_message_set_format (po_message_t message, const char *format_type, /*bool*/int value); + +/* If a numeric range of a message is set, return true and store the minimum + and maximum value in *MINP and *MAXP. */ +extern int po_message_is_range (po_message_t message, int *minp, int *maxp); + +/* Change the numeric range of a message. MIN and MAX must be non-negative, + with MIN < MAX. Use MIN = MAX = -1 to remove the numeric range of a + message. */ +extern void po_message_set_range (po_message_t message, int min, int max); + + +/* =========================== po_filepos_t API ============================ */ + +/* Return the file name. */ +extern const char * po_filepos_file (po_filepos_t filepos); + +/* Return the line number where the string starts, or (size_t)(-1) if no line + number is available. */ +extern size_t po_filepos_start_line (po_filepos_t filepos); + + +/* ============================ Format type API ============================= */ + +/* Return a NULL terminated array of the supported format types. */ +extern const char * const * po_format_list (void); + +/* Return the pretty name associated with a format type. + For example, for "csharp-format", return "C#". + Return NULL if the argument is not a supported format type. */ +extern const char * po_format_pretty_name (const char *format_type); + + +/* ============================= Checking API ============================== */ + +/* Test whether an entire file PO file is valid, like msgfmt does it. + If it is invalid, pass the reasons to the handler. */ +extern void po_file_check_all (po_file_t file, po_xerror_handler_t handler); + +/* Test a single message, to be inserted in a PO file in memory, like msgfmt + does it. If it is invalid, pass the reasons to the handler. The iterator + is not modified by this call; it only specifies the file and the domain. */ +extern void po_message_check_all (po_message_t message, po_message_iterator_t iterator, po_xerror_handler_t handler); + +/* Test whether the message translation is a valid format string if the message + is marked as being a format string. If it is invalid, pass the reasons to + the handler. */ +#define po_message_check_format po_message_check_format_v2 +extern void po_message_check_format (po_message_t message, po_xerror_handler_t handler); + + +#ifdef __cplusplus +} +#endif + +#endif /* _GETTEXT_PO_H */ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/include/libintl.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/include/libintl.h new file mode 100755 index 00000000..0e646a30 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/include/libintl.h @@ -0,0 +1,464 @@ +/* Message catalogs for internationalization. + Copyright (C) 1995-1997, 2000-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _LIBINTL_H +#define _LIBINTL_H 1 + +#include <locale.h> +#if (defined __APPLE__ && defined __MACH__) && 1 +# include <xlocale.h> +#endif + +/* The LC_MESSAGES locale category is the category used by the functions + gettext() and dgettext(). It is specified in POSIX, but not in ANSI C. + On systems that don't define it, use an arbitrary value instead. + On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5) + then includes <libintl.h> (i.e. this file!) and then only defines + LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES + in this case. */ +#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) +# define LC_MESSAGES 1729 +#endif + +/* We define an additional symbol to signal that we use the GNU + implementation of gettext. */ +#define __USE_GNU_GETTEXT 1 + +/* Provide information about the supported file formats. Returns the + maximum minor revision number supported for a given major revision. */ +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ + ((major) == 0 || (major) == 1 ? 1 : -1) + +/* Resolve a platform specific conflict on DJGPP. GNU gettext takes + precedence over _conio_gettext. */ +#ifdef __DJGPP__ +# undef gettext +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Version number: (major<<16) + (minor<<8) + subminor */ +#define LIBINTL_VERSION 0x001308 +extern int libintl_version; + + +/* We redirect the functions to those prefixed with "libintl_". This is + necessary, because some systems define gettext/textdomain/... in the C + library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer). + If we used the unprefixed names, there would be cases where the + definition in the C library would override the one in the libintl.so + shared library. Recall that on ELF systems, the symbols are looked + up in the following order: + 1. in the executable, + 2. in the shared libraries specified on the link command line, in order, + 3. in the dependencies of the shared libraries specified on the link + command line, + 4. in the dlopen()ed shared libraries, in the order in which they were + dlopen()ed. + The definition in the C library would override the one in libintl.so if + either + * -lc is given on the link command line and -lintl isn't, or + * -lc is given on the link command line before -lintl, or + * libintl.so is a dependency of a dlopen()ed shared library but not + linked to the executable at link time. + Since Solaris gettext() behaves differently than GNU gettext(), this + would be unacceptable. + + The redirection happens by default through macros in C, so that &gettext + is independent of the compilation unit, but through inline functions in + C++, in order not to interfere with the name mangling of class fields or + class methods called 'gettext'. */ + +/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS. + If he doesn't, we choose the method. A third possible method is + _INTL_REDIRECT_ASM, supported only by GCC. */ +#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) +# if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus) +# define _INTL_REDIRECT_ASM +# else +# ifdef __cplusplus +# define _INTL_REDIRECT_INLINE +# else +# define _INTL_REDIRECT_MACROS +# endif +# endif +#endif +/* Auxiliary macros. */ +#ifdef _INTL_REDIRECT_ASM +# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname)) +# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring +# define _INTL_STRINGIFY(prefix) #prefix +#else +# define _INTL_ASM(cname) +#endif + +/* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return + its n-th argument literally. This enables GCC to warn for example about + printf (gettext ("foo %y")). */ +#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && defined __cplusplus) +# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n))) +#else +# define _INTL_MAY_RETURN_STRING_ARG(n) +#endif + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_gettext (const char *__msgid) + _INTL_MAY_RETURN_STRING_ARG (1); +static inline char *gettext (const char *__msgid) +{ + return libintl_gettext (__msgid); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define gettext libintl_gettext +#endif +extern char *gettext (const char *__msgid) + _INTL_ASM (libintl_gettext) + _INTL_MAY_RETURN_STRING_ARG (1); +#endif + +/* Look up MSGID in the DOMAINNAME message catalog for the current + LC_MESSAGES locale. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dgettext (const char *__domainname, const char *__msgid) + _INTL_MAY_RETURN_STRING_ARG (2); +static inline char *dgettext (const char *__domainname, const char *__msgid) +{ + return libintl_dgettext (__domainname, __msgid); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define dgettext libintl_dgettext +#endif +extern char *dgettext (const char *__domainname, const char *__msgid) + _INTL_ASM (libintl_dgettext) + _INTL_MAY_RETURN_STRING_ARG (2); +#endif + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dcgettext (const char *__domainname, const char *__msgid, + int __category) + _INTL_MAY_RETURN_STRING_ARG (2); +static inline char *dcgettext (const char *__domainname, const char *__msgid, + int __category) +{ + return libintl_dcgettext (__domainname, __msgid, __category); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define dcgettext libintl_dcgettext +#endif +extern char *dcgettext (const char *__domainname, const char *__msgid, + int __category) + _INTL_ASM (libintl_dcgettext) + _INTL_MAY_RETURN_STRING_ARG (2); +#endif + + +/* Similar to 'gettext' but select the plural form corresponding to the + number N. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n) + _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); +static inline char *ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n) +{ + return libintl_ngettext (__msgid1, __msgid2, __n); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define ngettext libintl_ngettext +#endif +extern char *ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n) + _INTL_ASM (libintl_ngettext) + _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); +#endif + +/* Similar to 'dgettext' but select the plural form corresponding to the + number N. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dngettext (const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n) + _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); +static inline char *dngettext (const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n) +{ + return libintl_dngettext (__domainname, __msgid1, __msgid2, __n); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define dngettext libintl_dngettext +#endif +extern char *dngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n) + _INTL_ASM (libintl_dngettext) + _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); +#endif + +/* Similar to 'dcgettext' but select the plural form corresponding to the + number N. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) + _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); +static inline char *dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) +{ + return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define dcngettext libintl_dcngettext +#endif +extern char *dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) + _INTL_ASM (libintl_dcngettext) + _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); +#endif + + + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_textdomain (const char *__domainname); +static inline char *textdomain (const char *__domainname) +{ + return libintl_textdomain (__domainname); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define textdomain libintl_textdomain +#endif +extern char *textdomain (const char *__domainname) + _INTL_ASM (libintl_textdomain); +#endif + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_bindtextdomain (const char *__domainname, + const char *__dirname); +static inline char *bindtextdomain (const char *__domainname, + const char *__dirname) +{ + return libintl_bindtextdomain (__domainname, __dirname); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define bindtextdomain libintl_bindtextdomain +#endif +extern char *bindtextdomain (const char *__domainname, const char *__dirname) + _INTL_ASM (libintl_bindtextdomain); +#endif + +/* Specify the character encoding in which the messages from the + DOMAINNAME message catalog will be returned. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_bind_textdomain_codeset (const char *__domainname, + const char *__codeset); +static inline char *bind_textdomain_codeset (const char *__domainname, + const char *__codeset) +{ + return libintl_bind_textdomain_codeset (__domainname, __codeset); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define bind_textdomain_codeset libintl_bind_textdomain_codeset +#endif +extern char *bind_textdomain_codeset (const char *__domainname, + const char *__codeset) + _INTL_ASM (libintl_bind_textdomain_codeset); +#endif + + + +/* Support for format strings with positions in *printf(), following the + POSIX/XSI specification. + Note: These replacements for the *printf() functions are visible only + in source files that #include <libintl.h> or #include "gettext.h". + Packages that use *printf() in source files that don't refer to _() + or gettext() but for which the format string could be the return value + of _() or gettext() need to add this #include. Oh well. */ + +#if !1 + +#include <stdio.h> +#include <stddef.h> + +/* Get va_list. */ +#if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER +# include <stdarg.h> +#else +# include <varargs.h> +#endif + +#if !(defined fprintf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef fprintf +#define fprintf libintl_fprintf +extern int fprintf (FILE *, const char *, ...); +#endif +#if !(defined vfprintf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef vfprintf +#define vfprintf libintl_vfprintf +extern int vfprintf (FILE *, const char *, va_list); +#endif + +#if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef printf +#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ +/* Don't break __attribute__((format(printf,M,N))). + This redefinition is only possible because the libc in NetBSD, Cygwin, + mingw does not have a function __printf__. + Alternatively, we could have done this redirection only when compiling with + __GNUC__, together with a symbol redirection: + extern int printf (const char *, ...) + __asm__ (#__USER_LABEL_PREFIX__ "libintl_printf"); + But doing it now would introduce a binary incompatibility with already + distributed versions of libintl on these systems. */ +# define libintl_printf __printf__ +#endif +#define printf libintl_printf +extern int printf (const char *, ...); +#endif +#if !(defined vprintf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef vprintf +#define vprintf libintl_vprintf +extern int vprintf (const char *, va_list); +#endif + +#if !(defined sprintf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef sprintf +#define sprintf libintl_sprintf +extern int sprintf (char *, const char *, ...); +#endif +#if !(defined vsprintf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef vsprintf +#define vsprintf libintl_vsprintf +extern int vsprintf (char *, const char *, va_list); +#endif + +#if 1 + +#if !(defined snprintf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef snprintf +#define snprintf libintl_snprintf +extern int snprintf (char *, size_t, const char *, ...); +#endif +#if !(defined vsnprintf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef vsnprintf +#define vsnprintf libintl_vsnprintf +extern int vsnprintf (char *, size_t, const char *, va_list); +#endif + +#endif + +#if 1 + +#if !(defined asprintf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef asprintf +#define asprintf libintl_asprintf +extern int asprintf (char **, const char *, ...); +#endif +#if !(defined vasprintf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef vasprintf +#define vasprintf libintl_vasprintf +extern int vasprintf (char **, const char *, va_list); +#endif + +#endif + +#if 0 + +#undef fwprintf +#define fwprintf libintl_fwprintf +extern int fwprintf (FILE *, const wchar_t *, ...); +#undef vfwprintf +#define vfwprintf libintl_vfwprintf +extern int vfwprintf (FILE *, const wchar_t *, va_list); + +#undef wprintf +#define wprintf libintl_wprintf +extern int wprintf (const wchar_t *, ...); +#undef vwprintf +#define vwprintf libintl_vwprintf +extern int vwprintf (const wchar_t *, va_list); + +#undef swprintf +#define swprintf libintl_swprintf +extern int swprintf (wchar_t *, size_t, const wchar_t *, ...); +#undef vswprintf +#define vswprintf libintl_vswprintf +extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list); + +#endif + +#endif + + +/* Support for the locale chosen by the user. */ +#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ + +#ifndef GNULIB_defined_setlocale /* don't override gnulib */ +#undef setlocale +#define setlocale libintl_setlocale +extern char *setlocale (int, const char *); +#endif + +#if 1 + +#undef newlocale +#define newlocale libintl_newlocale +extern locale_t newlocale (int, const char *, locale_t); + +#endif + +#endif + + +/* Support for relocatable packages. */ + +/* Sets the original and the current installation prefix of the package. + Relocation simply replaces a pathname starting with the original prefix + by the corresponding pathname with the current prefix instead. Both + prefixes should be directory names without trailing slash (i.e. use "" + instead of "/"). */ +#define libintl_set_relocation_prefix libintl_set_relocation_prefix +extern void + libintl_set_relocation_prefix (const char *orig_prefix, + const char *curr_prefix); + + +#ifdef __cplusplus +} +#endif + +#endif /* libintl.h */ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libasprintf.0.dylib b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libasprintf.0.dylib new file mode 100755 index 00000000..d418895c Binary files /dev/null and b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libasprintf.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libasprintf.dylib b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libasprintf.dylib new file mode 120000 index 00000000..0b18b1d3 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libasprintf.dylib @@ -0,0 +1 @@ +libasprintf.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libgettextlib-0.19.8.1.dylib b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libgettextlib-0.19.8.1.dylib new file mode 100755 index 00000000..b76bcff5 Binary files /dev/null and b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libgettextlib-0.19.8.1.dylib differ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libgettextlib.dylib b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libgettextlib.dylib new file mode 120000 index 00000000..9332e649 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libgettextlib.dylib @@ -0,0 +1 @@ +libgettextlib-0.19.8.1.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libgettextpo.0.dylib b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libgettextpo.0.dylib new file mode 100755 index 00000000..3f6a38b6 Binary files /dev/null and b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libgettextpo.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libgettextpo.dylib b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libgettextpo.dylib new file mode 120000 index 00000000..1fc95db6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libgettextpo.dylib @@ -0,0 +1 @@ +libgettextpo.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libgettextsrc-0.19.8.1.dylib b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libgettextsrc-0.19.8.1.dylib new file mode 100755 index 00000000..a3721711 Binary files /dev/null and b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libgettextsrc-0.19.8.1.dylib differ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libgettextsrc.dylib b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libgettextsrc.dylib new file mode 120000 index 00000000..3868aad9 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libgettextsrc.dylib @@ -0,0 +1 @@ +libgettextsrc-0.19.8.1.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libintl.8.dylib b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libintl.8.dylib new file mode 100755 index 00000000..8006fbae Binary files /dev/null and b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libintl.8.dylib differ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libintl.dylib b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libintl.dylib new file mode 120000 index 00000000..888892c4 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/lib/libintl.dylib @@ -0,0 +1 @@ +libintl.8.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/doc/gettext/examples/hello-c++-kde/hellowindow.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/doc/gettext/examples/hello-c++-kde/hellowindow.h new file mode 100755 index 00000000..4c2c78ee --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/doc/gettext/examples/hello-c++-kde/hellowindow.h @@ -0,0 +1,20 @@ +// Example for use of GNU gettext. +// Copyright (C) 2003, 2015-2016 Free Software Foundation, Inc. +// This file is published under the GNU General Public License. + +/* Declare KMainWindow. */ +#include <kmainwindow.h> +/* Declare QPushButton. */ +#include <qpushbutton.h> + +// The main window widget. + +class HelloMainWindow : public KMainWindow +{ + Q_OBJECT +public: + HelloMainWindow (QWidget * parent = NULL, const char * name = NULL); + ~HelloMainWindow (); +public: + QPushButton *button; +}; diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/doc/gettext/examples/hello-objc-gnustep/AppController.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/doc/gettext/examples/hello-objc-gnustep/AppController.h new file mode 100755 index 00000000..7b1912a7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/doc/gettext/examples/hello-objc-gnustep/AppController.h @@ -0,0 +1,35 @@ +/* Example for use of GNU gettext. + This file is in the public domain. + + Interface of the AppController class. */ + +#include <AppKit/AppKit.h> + +@class Hello; + +@interface AppController : NSObject +{ + Hello *hello; +} + ++ (void)initialize; + +- (id)init; +- (void)dealloc; + +- (void)awakeFromNib; + +- (void)applicationDidFinishLaunching + :(NSNotification *)notif; + +- (BOOL)applicationShouldTerminate:(id)sender; +- (void)applicationWillTerminate:(NSNotification *)notification; + +- (BOOL)application:(NSApplication *)application openFile:(NSString *)fileName; + +- (void)showPrefPanel:(id)sender; +- (void)showInfoPanel:(id)sender; + +- (void)showHelloWindow:(id)sender; + +@end diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/doc/gettext/examples/hello-objc-gnustep/Hello.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/doc/gettext/examples/hello-objc-gnustep/Hello.h new file mode 100755 index 00000000..89458eda --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/doc/gettext/examples/hello-objc-gnustep/Hello.h @@ -0,0 +1,31 @@ +/* Example for use of GNU gettext. + This file is in the public domain. + + Interface of the Hello class. */ + +#include <AppKit/AppKit.h> + +@interface Hello : NSObject +{ + NSWindow *window; + + NSTextField *label1; + NSTextField *label2; + + id okButton; +} + +- (id)init; +- (void)dealloc; + +- (void)makeKeyAndOrderFront; + +- (void)done; + +@end + +@interface Hello (UIBuilder) + +- (void)createUI; + +@end diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/gettext.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/gettext.h new file mode 100755 index 00000000..841b072b --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/gettext.h @@ -0,0 +1,292 @@ +/* Convenience header for conditional use of GNU <libintl.h>. + Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2016 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _LIBGETTEXT_H +#define _LIBGETTEXT_H 1 + +/* NLS can be disabled through the configure --disable-nls option. */ +#if ENABLE_NLS + +/* Get declarations of GNU message catalog functions. */ +# include <libintl.h> + +/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by + the gettext() and ngettext() macros. This is an alternative to calling + textdomain(), and is useful for libraries. */ +# ifdef DEFAULT_TEXT_DOMAIN +# undef gettext +# define gettext(Msgid) \ + dgettext (DEFAULT_TEXT_DOMAIN, Msgid) +# undef ngettext +# define ngettext(Msgid1, Msgid2, N) \ + dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) +# endif + +#else + +/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which + chokes if dcgettext is defined as a macro. So include it now, to make + later inclusions of <locale.h> a NOP. We don't include <libintl.h> + as well because people using "gettext.h" will not include <libintl.h>, + and also including <libintl.h> would fail on SunOS 4, whereas <locale.h> + is OK. */ +#if defined(__sun) +# include <locale.h> +#endif + +/* Many header files from the libstdc++ coming with g++ 3.3 or newer include + <libintl.h>, which chokes if dcgettext is defined as a macro. So include + it now, to make later inclusions of <libintl.h> a NOP. */ +#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) +# include <cstdlib> +# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H +# include <libintl.h> +# endif +#endif + +/* Disabled NLS. + The casts to 'const char *' serve the purpose of producing warnings + for invalid uses of the value returned from these functions. + On pre-ANSI systems without 'const', the config.h file is supposed to + contain "#define const". */ +# undef gettext +# define gettext(Msgid) ((const char *) (Msgid)) +# undef dgettext +# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) +# undef dcgettext +# define dcgettext(Domainname, Msgid, Category) \ + ((void) (Category), dgettext (Domainname, Msgid)) +# undef ngettext +# define ngettext(Msgid1, Msgid2, N) \ + ((N) == 1 \ + ? ((void) (Msgid2), (const char *) (Msgid1)) \ + : ((void) (Msgid1), (const char *) (Msgid2))) +# undef dngettext +# define dngettext(Domainname, Msgid1, Msgid2, N) \ + ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) +# undef dcngettext +# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ + ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N)) +# undef textdomain +# define textdomain(Domainname) ((const char *) (Domainname)) +# undef bindtextdomain +# define bindtextdomain(Domainname, Dirname) \ + ((void) (Domainname), (const char *) (Dirname)) +# undef bind_textdomain_codeset +# define bind_textdomain_codeset(Domainname, Codeset) \ + ((void) (Domainname), (const char *) (Codeset)) + +#endif + +/* Prefer gnulib's setlocale override over libintl's setlocale override. */ +#ifdef GNULIB_defined_setlocale +# undef setlocale +# define setlocale rpl_setlocale +#endif + +/* A pseudo function call that serves as a marker for the automated + extraction of messages, but does not call gettext(). The run-time + translation is done at a different place in the code. + The argument, String, should be a literal string. Concatenated strings + and other string expressions won't work. + The macro's expansion is not parenthesized, so that it is suitable as + initializer for static 'char[]' or 'const char[]' variables. */ +#define gettext_noop(String) String + +/* The separator between msgctxt and msgid in a .mo file. */ +#define GETTEXT_CONTEXT_GLUE "\004" + +/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a + MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be + short and rarely need to change. + The letter 'p' stands for 'particular' or 'special'. */ +#ifdef DEFAULT_TEXT_DOMAIN +# define pgettext(Msgctxt, Msgid) \ + pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) +#else +# define pgettext(Msgctxt, Msgid) \ + pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) +#endif +#define dpgettext(Domainname, Msgctxt, Msgid) \ + pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) +#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ + pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) +#ifdef DEFAULT_TEXT_DOMAIN +# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ + npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) +#else +# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ + npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) +#endif +#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ + npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) +#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ + npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +pgettext_aux (const char *domain, + const char *msg_ctxt_id, const char *msgid, + int category) +{ + const char *translation = dcgettext (domain, msg_ctxt_id, category); + if (translation == msg_ctxt_id) + return msgid; + else + return translation; +} + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +npgettext_aux (const char *domain, + const char *msg_ctxt_id, const char *msgid, + const char *msgid_plural, unsigned long int n, + int category) +{ + const char *translation = + dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); + if (translation == msg_ctxt_id || translation == msgid_plural) + return (n == 1 ? msgid : msgid_plural); + else + return translation; +} + +/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID + can be arbitrary expressions. But for string literals these macros are + less efficient than those above. */ + +#include <string.h> + +#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ + /* || __STDC_VERSION__ >= 199901L */ ) +# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 +#else +# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0 +#endif + +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS +#include <stdlib.h> +#endif + +#define pgettext_expr(Msgctxt, Msgid) \ + dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) +#define dpgettext_expr(Domainname, Msgctxt, Msgid) \ + dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +dcpgettext_expr (const char *domain, + const char *msgctxt, const char *msgid, + int category) +{ + size_t msgctxt_len = strlen (msgctxt) + 1; + size_t msgid_len = strlen (msgid) + 1; + const char *translation; +#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + char msg_ctxt_id[msgctxt_len + msgid_len]; +#else + char buf[1024]; + char *msg_ctxt_id = + (msgctxt_len + msgid_len <= sizeof (buf) + ? buf + : (char *) malloc (msgctxt_len + msgid_len)); + if (msg_ctxt_id != NULL) +#endif + { + int found_translation; + memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); + msg_ctxt_id[msgctxt_len - 1] = '\004'; + memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); + translation = dcgettext (domain, msg_ctxt_id, category); + found_translation = (translation != msg_ctxt_id); +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + if (msg_ctxt_id != buf) + free (msg_ctxt_id); +#endif + if (found_translation) + return translation; + } + return msgid; +} + +#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ + dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) +#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ + dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +dcnpgettext_expr (const char *domain, + const char *msgctxt, const char *msgid, + const char *msgid_plural, unsigned long int n, + int category) +{ + size_t msgctxt_len = strlen (msgctxt) + 1; + size_t msgid_len = strlen (msgid) + 1; + const char *translation; +#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + char msg_ctxt_id[msgctxt_len + msgid_len]; +#else + char buf[1024]; + char *msg_ctxt_id = + (msgctxt_len + msgid_len <= sizeof (buf) + ? buf + : (char *) malloc (msgctxt_len + msgid_len)); + if (msg_ctxt_id != NULL) +#endif + { + int found_translation; + memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); + msg_ctxt_id[msgctxt_len - 1] = '\004'; + memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); + translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); + found_translation = !(translation == msg_ctxt_id || translation == msgid_plural); +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + if (msg_ctxt_id != buf) + free (msg_ctxt_id); +#endif + if (found_translation) + return translation; + } + return (n == 1 ? msgid : msgid_plural); +} + +#endif /* _LIBGETTEXT_H */ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/eval-plural.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/eval-plural.h new file mode 100755 index 00000000..74358606 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/eval-plural.h @@ -0,0 +1,106 @@ +/* Plural expression evaluation. + Copyright (C) 2000-2003, 2007, 2015-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef STATIC +#define STATIC static +#endif + +/* Evaluate the plural expression and return an index value. */ +STATIC +unsigned long int +internal_function +plural_eval (const struct expression *pexp, unsigned long int n) +{ + switch (pexp->nargs) + { + case 0: + switch (pexp->operation) + { + case var: + return n; + case num: + return pexp->val.num; + default: + break; + } + /* NOTREACHED */ + break; + case 1: + { + /* pexp->operation must be lnot. */ + unsigned long int arg = plural_eval (pexp->val.args[0], n); + return ! arg; + } + case 2: + { + unsigned long int leftarg = plural_eval (pexp->val.args[0], n); + if (pexp->operation == lor) + return leftarg || plural_eval (pexp->val.args[1], n); + else if (pexp->operation == land) + return leftarg && plural_eval (pexp->val.args[1], n); + else + { + unsigned long int rightarg = plural_eval (pexp->val.args[1], n); + + switch (pexp->operation) + { + case mult: + return leftarg * rightarg; + case divide: +#if !INTDIV0_RAISES_SIGFPE + if (rightarg == 0) + raise (SIGFPE); +#endif + return leftarg / rightarg; + case module: +#if !INTDIV0_RAISES_SIGFPE + if (rightarg == 0) + raise (SIGFPE); +#endif + return leftarg % rightarg; + case plus: + return leftarg + rightarg; + case minus: + return leftarg - rightarg; + case less_than: + return leftarg < rightarg; + case greater_than: + return leftarg > rightarg; + case less_or_equal: + return leftarg <= rightarg; + case greater_or_equal: + return leftarg >= rightarg; + case equal: + return leftarg == rightarg; + case not_equal: + return leftarg != rightarg; + default: + break; + } + } + /* NOTREACHED */ + break; + } + case 3: + { + /* pexp->operation must be qmop. */ + unsigned long int boolarg = plural_eval (pexp->val.args[0], n); + return plural_eval (pexp->val.args[boolarg ? 1 : 2], n); + } + } + /* NOTREACHED */ + return 0; +} diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/export.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/export.h new file mode 100755 index 00000000..b5c47ad5 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/export.h @@ -0,0 +1,6 @@ + +#if @HAVE_VISIBILITY@ && BUILDING_LIBINTL +#define LIBINTL_DLL_EXPORTED __attribute__((__visibility__("default"))) +#else +#define LIBINTL_DLL_EXPORTED +#endif diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/gettextP.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/gettextP.h new file mode 100755 index 00000000..52be2fc4 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/gettextP.h @@ -0,0 +1,313 @@ +/* Header describing internals of libintl library. + Copyright (C) 1995-2016 Free Software Foundation, Inc. + Written by Ulrich Drepper <drepper@cygnus.com>, 1995. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _GETTEXTP_H +#define _GETTEXTP_H + +#include <stddef.h> /* Get size_t. */ + +#ifdef _LIBC +# include "../iconv/gconv_int.h" +#else +# if HAVE_ICONV +# include <iconv.h> +# endif +#endif + +/* Handle multi-threaded applications. */ +#ifdef _LIBC +# include <bits/libc-lock.h> +# define gl_rwlock_define __libc_rwlock_define +#else +# include "lock.h" +#endif + +#ifdef _LIBC +struct loaded_domain; +extern char *__gettext (const char *__msgid); +extern char *__dgettext (const char *__domainname, const char *__msgid); +extern char *__dcgettext (const char *__domainname, const char *__msgid, + int __category); +extern char *__ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n); +extern char *__dngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int n); +extern char *__dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category); +extern char *__dcigettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + int __plural, unsigned long int __n, + int __category); +extern char *__textdomain (const char *__domainname); +extern char *__bindtextdomain (const char *__domainname, + const char *__dirname); +extern char *__bind_textdomain_codeset (const char *__domainname, + const char *__codeset); +extern void _nl_finddomain_subfreeres (void) attribute_hidden; +extern void _nl_unload_domain (struct loaded_domain *__domain) + internal_function attribute_hidden; +#else +/* Declare the exported libintl_* functions, in a way that allows us to + call them under their real name. */ +# undef _INTL_REDIRECT_INLINE +# undef _INTL_REDIRECT_MACROS +# define _INTL_REDIRECT_MACROS +# include "libgnuintl.h" +# ifdef IN_LIBGLOCALE +extern char *gl_dcigettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + int __plural, unsigned long int __n, + int __category, + const char *__localename, const char *__encoding); +# else +extern char *libintl_dcigettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + int __plural, unsigned long int __n, + int __category); +# endif +#endif + +#include "loadinfo.h" + +#include "gmo.h" /* Get nls_uint32. */ + +/* @@ end of prolog @@ */ + +#ifndef internal_function +# define internal_function +#endif + +#ifndef attribute_hidden +# define attribute_hidden +#endif + +/* Tell the compiler when a conditional or integer expression is + almost always true or almost always false. */ +#ifndef HAVE_BUILTIN_EXPECT +# define __builtin_expect(expr, val) (expr) +#endif + +#ifndef W +# define W(flag, data) ((flag) ? SWAP (data) : (data)) +#endif + + +#ifdef _LIBC +# include <byteswap.h> +# define SWAP(i) bswap_32 (i) +#else +static inline nls_uint32 +# ifdef __cplusplus +SWAP (nls_uint32 i) +# else +SWAP (i) + nls_uint32 i; +# endif +{ + return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); +} +#endif + + +/* In-memory representation of system dependent string. */ +struct sysdep_string_desc +{ + /* Length of addressed string, including the trailing NUL. */ + size_t length; + /* Pointer to addressed string. */ + const char *pointer; +}; + +/* Cache of translated strings after charset conversion. + Note: The strings are converted to the target encoding only on an as-needed + basis. */ +struct converted_domain +{ + /* The target encoding name. */ + const char *encoding; + /* The descriptor for conversion from the message catalog's encoding to + this target encoding. */ +#ifdef _LIBC + __gconv_t conv; +#else +# if HAVE_ICONV + iconv_t conv; +# endif +#endif + /* The table of translated strings after charset conversion. */ + char **conv_tab; +}; + +/* The representation of an opened message catalog. */ +struct loaded_domain +{ + /* Pointer to memory containing the .mo file. */ + const char *data; + /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed. */ + int use_mmap; + /* Size of mmap()ed memory. */ + size_t mmap_size; + /* 1 if the .mo file uses a different endianness than this machine. */ + int must_swap; + /* Pointer to additional malloc()ed memory. */ + void *malloced; + + /* Number of static strings pairs. */ + nls_uint32 nstrings; + /* Pointer to descriptors of original strings in the file. */ + const struct string_desc *orig_tab; + /* Pointer to descriptors of translated strings in the file. */ + const struct string_desc *trans_tab; + + /* Number of system dependent strings pairs. */ + nls_uint32 n_sysdep_strings; + /* Pointer to descriptors of original sysdep strings. */ + const struct sysdep_string_desc *orig_sysdep_tab; + /* Pointer to descriptors of translated sysdep strings. */ + const struct sysdep_string_desc *trans_sysdep_tab; + + /* Size of hash table. */ + nls_uint32 hash_size; + /* Pointer to hash table. */ + const nls_uint32 *hash_tab; + /* 1 if the hash table uses a different endianness than this machine. */ + int must_swap_hash_tab; + + /* Cache of charset conversions of the translated strings. */ + struct converted_domain *conversions; + size_t nconversions; + gl_rwlock_define (, conversions_lock) + + const struct expression *plural; + unsigned long int nplurals; +}; + +/* We want to allocate a string at the end of the struct. But ISO C + doesn't allow zero sized arrays. */ +#ifdef __GNUC__ +# define ZERO 0 +#else +# define ZERO 1 +#endif + +/* A set of settings bound to a message domain. Used to store settings + from bindtextdomain() and bind_textdomain_codeset(). */ +struct binding +{ + struct binding *next; + char *dirname; + char *codeset; + char domainname[ZERO]; +}; + +/* A counter which is incremented each time some previous translations + become invalid. + This variable is part of the external ABI of the GNU libintl. */ +#if defined __KLIBC__ && !defined _LIBC +# define _nl_msg_cat_cntr libintl_nl_msg_cat_cntr +#endif +#ifdef IN_LIBGLOCALE +# include <glocale/config.h> +extern LIBGLOCALE_DLL_EXPORTED int _nl_msg_cat_cntr; +#else +extern LIBINTL_DLL_EXPORTED int _nl_msg_cat_cntr; +#endif + +#ifndef _LIBC +extern const char *_nl_language_preferences_default (void); +# define gl_locale_name_canonicalize _nl_locale_name_canonicalize +extern void _nl_locale_name_canonicalize (char *name); +# define gl_locale_name_from_win32_LANGID _nl_locale_name_from_win32_LANGID +/* extern const char *_nl_locale_name_from_win32_LANGID (LANGID langid); */ +# define gl_locale_name_from_win32_LCID _nl_locale_name_from_win32_LCID +/* extern const char *_nl_locale_name_from_win32_LCID (LCID lcid); */ +# define gl_locale_name_thread_unsafe _nl_locale_name_thread_unsafe +extern const char *_nl_locale_name_thread_unsafe (int category, + const char *categoryname); +# define gl_locale_name_thread _nl_locale_name_thread +/* extern const char *_nl_locale_name_thread (int category, + const char *categoryname); */ +# define gl_locale_name_posix _nl_locale_name_posix +extern const char *_nl_locale_name_posix (int category, + const char *categoryname); +# define gl_locale_name_environ _nl_locale_name_environ +extern const char *_nl_locale_name_environ (int category, + const char *categoryname); +# define gl_locale_name_default _nl_locale_name_default +extern const char *_nl_locale_name_default (void); +# define gl_locale_name _nl_locale_name +/* extern const char *_nl_locale_name (int category, + const char *categoryname); */ +#endif + +struct loaded_l10nfile *_nl_find_domain (const char *__dirname, char *__locale, + const char *__domainname, + struct binding *__domainbinding) + internal_function; +void _nl_load_domain (struct loaded_l10nfile *__domain, + struct binding *__domainbinding) + internal_function; + +#ifdef IN_LIBGLOCALE +char *_nl_find_msg (struct loaded_l10nfile *domain_file, + struct binding *domainbinding, const char *encoding, + const char *msgid, + size_t *lengthp) + internal_function; +#else +char *_nl_find_msg (struct loaded_l10nfile *domain_file, + struct binding *domainbinding, const char *msgid, + int convert, size_t *lengthp) + internal_function; +#endif + +/* The internal variables in the standalone libintl.a must have different + names than the internal variables in GNU libc, otherwise programs + using libintl.a cannot be linked statically. */ +#if !defined _LIBC +# define _nl_default_dirname libintl_nl_default_dirname +# define _nl_domain_bindings libintl_nl_domain_bindings +#endif + +/* Contains the default location of the message catalogs. */ +extern const char _nl_default_dirname[]; +#ifdef _LIBC +libc_hidden_proto (_nl_default_dirname) +#endif + +/* List with bindings of specific domains. */ +extern struct binding *_nl_domain_bindings; + +/* The internal variables in the standalone libintl.a must have different + names than the internal variables in GNU libc, otherwise programs + using libintl.a cannot be linked statically. */ +#if !defined _LIBC +# define _nl_default_default_domain libintl_nl_default_default_domain +# define _nl_current_default_domain libintl_nl_current_default_domain +#endif + +/* Name of the default text domain. */ +extern const char _nl_default_default_domain[] attribute_hidden; + +/* Default text domain in which entries for gettext(3) are to be found. */ +extern const char *_nl_current_default_domain attribute_hidden; + +/* @@ begin of epilog @@ */ + +#endif /* gettextP.h */ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/gmo.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/gmo.h new file mode 100755 index 00000000..028cac9f --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/gmo.h @@ -0,0 +1,150 @@ +/* Description of GNU message catalog format: general file layout. + Copyright (C) 1995-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _GETTEXT_H +#define _GETTEXT_H 1 + +#include <limits.h> + +/* @@ end of prolog @@ */ + +/* The magic number of the GNU message catalog format. */ +#define _MAGIC 0x950412de +#define _MAGIC_SWAPPED 0xde120495 + +/* Revision number of the currently used .mo (binary) file format. */ +#define MO_REVISION_NUMBER 0 +#define MO_REVISION_NUMBER_WITH_SYSDEP_I 1 + +/* The following contortions are an attempt to use the C preprocessor + to determine an unsigned integral type that is 32 bits wide. An + alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but + as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work + when cross-compiling. */ + +#if __STDC__ +# define UINT_MAX_32_BITS 4294967295U +#else +# define UINT_MAX_32_BITS 0xFFFFFFFF +#endif + +/* If UINT_MAX isn't defined, assume it's a 32-bit type. + This should be valid for all systems GNU cares about because + that doesn't include 16-bit systems, and only modern systems + (that certainly have <limits.h>) have 64+-bit integral types. */ + +#ifndef UINT_MAX +# define UINT_MAX UINT_MAX_32_BITS +#endif + +#if UINT_MAX == UINT_MAX_32_BITS +typedef unsigned nls_uint32; +#else +# if USHRT_MAX == UINT_MAX_32_BITS +typedef unsigned short nls_uint32; +# else +# if ULONG_MAX == UINT_MAX_32_BITS +typedef unsigned long nls_uint32; +# else + /* The following line is intended to throw an error. Using #error is + not portable enough. */ + "Cannot determine unsigned 32-bit data type." +# endif +# endif +#endif + + +/* Header for binary .mo file format. */ +struct mo_file_header +{ + /* The magic number. */ + nls_uint32 magic; + /* The revision number of the file format. */ + nls_uint32 revision; + + /* The following are only used in .mo files with major revision 0 or 1. */ + + /* The number of strings pairs. */ + nls_uint32 nstrings; + /* Offset of table with start offsets of original strings. */ + nls_uint32 orig_tab_offset; + /* Offset of table with start offsets of translated strings. */ + nls_uint32 trans_tab_offset; + /* Size of hash table. */ + nls_uint32 hash_tab_size; + /* Offset of first hash table entry. */ + nls_uint32 hash_tab_offset; + + /* The following are only used in .mo files with minor revision >= 1. */ + + /* The number of system dependent segments. */ + nls_uint32 n_sysdep_segments; + /* Offset of table describing system dependent segments. */ + nls_uint32 sysdep_segments_offset; + /* The number of system dependent strings pairs. */ + nls_uint32 n_sysdep_strings; + /* Offset of table with start offsets of original sysdep strings. */ + nls_uint32 orig_sysdep_tab_offset; + /* Offset of table with start offsets of translated sysdep strings. */ + nls_uint32 trans_sysdep_tab_offset; +}; + +/* Descriptor for static string contained in the binary .mo file. */ +struct string_desc +{ + /* Length of addressed string, not including the trailing NUL. */ + nls_uint32 length; + /* Offset of string in file. */ + nls_uint32 offset; +}; + +/* The following are only used in .mo files with minor revision >= 1. */ + +/* Descriptor for system dependent string segment. */ +struct sysdep_segment +{ + /* Length of addressed string, including the trailing NUL. */ + nls_uint32 length; + /* Offset of string in file. */ + nls_uint32 offset; +}; + +/* Pair of a static and a system dependent segment, in struct sysdep_string. */ +struct segment_pair +{ + /* Size of static segment. */ + nls_uint32 segsize; + /* Reference to system dependent string segment, or ~0 at the end. */ + nls_uint32 sysdepref; +}; + +/* Descriptor for system dependent string. */ +struct sysdep_string +{ + /* Offset of static string segments in file. */ + nls_uint32 offset; + /* Alternating sequence of static and system dependent segments. + The last segment is a static segment, including the trailing NUL. */ + struct segment_pair segments[1]; +}; + +/* Marker for the end of the segments[] array. This has the value 0xFFFFFFFF, + regardless whether 'int' is 16 bit, 32 bit, or 64 bit. */ +#define SEGMENTS_END ((nls_uint32) ~0) + +/* @@ begin of epilog @@ */ + +#endif /* gettext.h */ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/hash-string.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/hash-string.h new file mode 100755 index 00000000..473d7704 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/hash-string.h @@ -0,0 +1,34 @@ +/* Description of GNU message catalog format: string hashing function. + Copyright (C) 1995-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* @@ end of prolog @@ */ + +/* We assume to have `unsigned long int' value with at least 32 bits. */ +#define HASHWORDBITS 32 + + +#ifndef _LIBC +# ifdef IN_LIBINTL +# define __hash_string libintl_hash_string +# else +# define __hash_string hash_string +# endif +#endif + +/* Defines the so called `hashpjw' function by P.J. Weinberger + [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, + 1986, 1987 Bell Telephone Laboratories, Inc.] */ +extern unsigned long int __hash_string (const char *str_param); diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/libgnuintl.in.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/libgnuintl.in.h new file mode 100755 index 00000000..dc1947f8 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/libgnuintl.in.h @@ -0,0 +1,466 @@ +/* Message catalogs for internationalization. + Copyright (C) 1995-1997, 2000-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _LIBINTL_H +#define _LIBINTL_H 1 + +#include <locale.h> +#if (defined __APPLE__ && defined __MACH__) && @HAVE_NEWLOCALE@ +# include <xlocale.h> +#endif + +/* The LC_MESSAGES locale category is the category used by the functions + gettext() and dgettext(). It is specified in POSIX, but not in ANSI C. + On systems that don't define it, use an arbitrary value instead. + On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5) + then includes <libintl.h> (i.e. this file!) and then only defines + LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES + in this case. */ +#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) +# define LC_MESSAGES 1729 +#endif + +/* We define an additional symbol to signal that we use the GNU + implementation of gettext. */ +#define __USE_GNU_GETTEXT 1 + +/* Provide information about the supported file formats. Returns the + maximum minor revision number supported for a given major revision. */ +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ + ((major) == 0 || (major) == 1 ? 1 : -1) + +/* Resolve a platform specific conflict on DJGPP. GNU gettext takes + precedence over _conio_gettext. */ +#ifdef __DJGPP__ +# undef gettext +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Version number: (major<<16) + (minor<<8) + subminor */ +#define LIBINTL_VERSION 0x001308 +extern int libintl_version; + + +/* We redirect the functions to those prefixed with "libintl_". This is + necessary, because some systems define gettext/textdomain/... in the C + library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer). + If we used the unprefixed names, there would be cases where the + definition in the C library would override the one in the libintl.so + shared library. Recall that on ELF systems, the symbols are looked + up in the following order: + 1. in the executable, + 2. in the shared libraries specified on the link command line, in order, + 3. in the dependencies of the shared libraries specified on the link + command line, + 4. in the dlopen()ed shared libraries, in the order in which they were + dlopen()ed. + The definition in the C library would override the one in libintl.so if + either + * -lc is given on the link command line and -lintl isn't, or + * -lc is given on the link command line before -lintl, or + * libintl.so is a dependency of a dlopen()ed shared library but not + linked to the executable at link time. + Since Solaris gettext() behaves differently than GNU gettext(), this + would be unacceptable. + + The redirection happens by default through macros in C, so that &gettext + is independent of the compilation unit, but through inline functions in + C++, in order not to interfere with the name mangling of class fields or + class methods called 'gettext'. */ + +/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS. + If he doesn't, we choose the method. A third possible method is + _INTL_REDIRECT_ASM, supported only by GCC. */ +#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) +# if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus) +# define _INTL_REDIRECT_ASM +# else +# ifdef __cplusplus +# define _INTL_REDIRECT_INLINE +# else +# define _INTL_REDIRECT_MACROS +# endif +# endif +#endif +/* Auxiliary macros. */ +#ifdef _INTL_REDIRECT_ASM +# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname)) +# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring +# define _INTL_STRINGIFY(prefix) #prefix +#else +# define _INTL_ASM(cname) +#endif + +/* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return + its n-th argument literally. This enables GCC to warn for example about + printf (gettext ("foo %y")). */ +#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && defined __cplusplus) +# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n))) +#else +# define _INTL_MAY_RETURN_STRING_ARG(n) +#endif + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_gettext (const char *__msgid) + _INTL_MAY_RETURN_STRING_ARG (1); +static inline char *gettext (const char *__msgid) +{ + return libintl_gettext (__msgid); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define gettext libintl_gettext +#endif +extern char *gettext (const char *__msgid) + _INTL_ASM (libintl_gettext) + _INTL_MAY_RETURN_STRING_ARG (1); +#endif + +/* Look up MSGID in the DOMAINNAME message catalog for the current + LC_MESSAGES locale. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dgettext (const char *__domainname, const char *__msgid) + _INTL_MAY_RETURN_STRING_ARG (2); +static inline char *dgettext (const char *__domainname, const char *__msgid) +{ + return libintl_dgettext (__domainname, __msgid); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define dgettext libintl_dgettext +#endif +extern char *dgettext (const char *__domainname, const char *__msgid) + _INTL_ASM (libintl_dgettext) + _INTL_MAY_RETURN_STRING_ARG (2); +#endif + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dcgettext (const char *__domainname, const char *__msgid, + int __category) + _INTL_MAY_RETURN_STRING_ARG (2); +static inline char *dcgettext (const char *__domainname, const char *__msgid, + int __category) +{ + return libintl_dcgettext (__domainname, __msgid, __category); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define dcgettext libintl_dcgettext +#endif +extern char *dcgettext (const char *__domainname, const char *__msgid, + int __category) + _INTL_ASM (libintl_dcgettext) + _INTL_MAY_RETURN_STRING_ARG (2); +#endif + + +/* Similar to 'gettext' but select the plural form corresponding to the + number N. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n) + _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); +static inline char *ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n) +{ + return libintl_ngettext (__msgid1, __msgid2, __n); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define ngettext libintl_ngettext +#endif +extern char *ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n) + _INTL_ASM (libintl_ngettext) + _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); +#endif + +/* Similar to 'dgettext' but select the plural form corresponding to the + number N. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dngettext (const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n) + _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); +static inline char *dngettext (const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n) +{ + return libintl_dngettext (__domainname, __msgid1, __msgid2, __n); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define dngettext libintl_dngettext +#endif +extern char *dngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n) + _INTL_ASM (libintl_dngettext) + _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); +#endif + +/* Similar to 'dcgettext' but select the plural form corresponding to the + number N. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) + _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); +static inline char *dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) +{ + return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define dcngettext libintl_dcngettext +#endif +extern char *dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) + _INTL_ASM (libintl_dcngettext) + _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); +#endif + + +#ifndef IN_LIBGLOCALE + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_textdomain (const char *__domainname); +static inline char *textdomain (const char *__domainname) +{ + return libintl_textdomain (__domainname); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define textdomain libintl_textdomain +#endif +extern char *textdomain (const char *__domainname) + _INTL_ASM (libintl_textdomain); +#endif + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_bindtextdomain (const char *__domainname, + const char *__dirname); +static inline char *bindtextdomain (const char *__domainname, + const char *__dirname) +{ + return libintl_bindtextdomain (__domainname, __dirname); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define bindtextdomain libintl_bindtextdomain +#endif +extern char *bindtextdomain (const char *__domainname, const char *__dirname) + _INTL_ASM (libintl_bindtextdomain); +#endif + +/* Specify the character encoding in which the messages from the + DOMAINNAME message catalog will be returned. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_bind_textdomain_codeset (const char *__domainname, + const char *__codeset); +static inline char *bind_textdomain_codeset (const char *__domainname, + const char *__codeset) +{ + return libintl_bind_textdomain_codeset (__domainname, __codeset); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define bind_textdomain_codeset libintl_bind_textdomain_codeset +#endif +extern char *bind_textdomain_codeset (const char *__domainname, + const char *__codeset) + _INTL_ASM (libintl_bind_textdomain_codeset); +#endif + +#endif /* IN_LIBGLOCALE */ + + +/* Support for format strings with positions in *printf(), following the + POSIX/XSI specification. + Note: These replacements for the *printf() functions are visible only + in source files that #include <libintl.h> or #include "gettext.h". + Packages that use *printf() in source files that don't refer to _() + or gettext() but for which the format string could be the return value + of _() or gettext() need to add this #include. Oh well. */ + +#if !@HAVE_POSIX_PRINTF@ + +#include <stdio.h> +#include <stddef.h> + +/* Get va_list. */ +#if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER +# include <stdarg.h> +#else +# include <varargs.h> +#endif + +#if !(defined fprintf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef fprintf +#define fprintf libintl_fprintf +extern int fprintf (FILE *, const char *, ...); +#endif +#if !(defined vfprintf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef vfprintf +#define vfprintf libintl_vfprintf +extern int vfprintf (FILE *, const char *, va_list); +#endif + +#if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef printf +#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ +/* Don't break __attribute__((format(printf,M,N))). + This redefinition is only possible because the libc in NetBSD, Cygwin, + mingw does not have a function __printf__. + Alternatively, we could have done this redirection only when compiling with + __GNUC__, together with a symbol redirection: + extern int printf (const char *, ...) + __asm__ (#__USER_LABEL_PREFIX__ "libintl_printf"); + But doing it now would introduce a binary incompatibility with already + distributed versions of libintl on these systems. */ +# define libintl_printf __printf__ +#endif +#define printf libintl_printf +extern int printf (const char *, ...); +#endif +#if !(defined vprintf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef vprintf +#define vprintf libintl_vprintf +extern int vprintf (const char *, va_list); +#endif + +#if !(defined sprintf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef sprintf +#define sprintf libintl_sprintf +extern int sprintf (char *, const char *, ...); +#endif +#if !(defined vsprintf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef vsprintf +#define vsprintf libintl_vsprintf +extern int vsprintf (char *, const char *, va_list); +#endif + +#if @HAVE_SNPRINTF@ + +#if !(defined snprintf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef snprintf +#define snprintf libintl_snprintf +extern int snprintf (char *, size_t, const char *, ...); +#endif +#if !(defined vsnprintf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef vsnprintf +#define vsnprintf libintl_vsnprintf +extern int vsnprintf (char *, size_t, const char *, va_list); +#endif + +#endif + +#if @HAVE_ASPRINTF@ + +#if !(defined asprintf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef asprintf +#define asprintf libintl_asprintf +extern int asprintf (char **, const char *, ...); +#endif +#if !(defined vasprintf && defined _GL_STDIO_H) /* don't override gnulib */ +#undef vasprintf +#define vasprintf libintl_vasprintf +extern int vasprintf (char **, const char *, va_list); +#endif + +#endif + +#if @HAVE_WPRINTF@ + +#undef fwprintf +#define fwprintf libintl_fwprintf +extern int fwprintf (FILE *, const wchar_t *, ...); +#undef vfwprintf +#define vfwprintf libintl_vfwprintf +extern int vfwprintf (FILE *, const wchar_t *, va_list); + +#undef wprintf +#define wprintf libintl_wprintf +extern int wprintf (const wchar_t *, ...); +#undef vwprintf +#define vwprintf libintl_vwprintf +extern int vwprintf (const wchar_t *, va_list); + +#undef swprintf +#define swprintf libintl_swprintf +extern int swprintf (wchar_t *, size_t, const wchar_t *, ...); +#undef vswprintf +#define vswprintf libintl_vswprintf +extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list); + +#endif + +#endif + + +/* Support for the locale chosen by the user. */ +#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ + +#ifndef GNULIB_defined_setlocale /* don't override gnulib */ +#undef setlocale +#define setlocale libintl_setlocale +extern char *setlocale (int, const char *); +#endif + +#if @HAVE_NEWLOCALE@ + +#undef newlocale +#define newlocale libintl_newlocale +extern locale_t newlocale (int, const char *, locale_t); + +#endif + +#endif + + +/* Support for relocatable packages. */ + +/* Sets the original and the current installation prefix of the package. + Relocation simply replaces a pathname starting with the original prefix + by the corresponding pathname with the current prefix instead. Both + prefixes should be directory names without trailing slash (i.e. use "" + instead of "/"). */ +#define libintl_set_relocation_prefix libintl_set_relocation_prefix +extern void + libintl_set_relocation_prefix (const char *orig_prefix, + const char *curr_prefix); + + +#ifdef __cplusplus +} +#endif + +#endif /* libintl.h */ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/loadinfo.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/loadinfo.h new file mode 100755 index 00000000..2e15f93a --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/loadinfo.h @@ -0,0 +1,130 @@ +/* Copyright (C) 1996-2016 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _LOADINFO_H +#define _LOADINFO_H 1 + +/* Declarations of locale dependent catalog lookup functions. + Implemented in + + localealias.c Possibly replace a locale name by another. + explodename.c Split a locale name into its various fields. + l10nflist.c Generate a list of filenames of possible message catalogs. + finddomain.c Find and open the relevant message catalogs. + + The main function _nl_find_domain() in finddomain.c is declared + in gettextP.h. + */ + +#ifndef internal_function +# define internal_function +#endif + +#ifndef LIBINTL_DLL_EXPORTED +# define LIBINTL_DLL_EXPORTED +#endif + +/* Tell the compiler when a conditional or integer expression is + almost always true or almost always false. */ +#ifndef HAVE_BUILTIN_EXPECT +# define __builtin_expect(expr, val) (expr) +#endif + +/* Separator in PATH like lists of pathnames. */ +#if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__ + /* Win32, OS/2, DOS */ +# define PATH_SEPARATOR ';' +#else + /* Unix */ +# define PATH_SEPARATOR ':' +#endif + +/* Encoding of locale name parts. */ +#define XPG_NORM_CODESET 1 +#define XPG_CODESET 2 +#define XPG_TERRITORY 4 +#define XPG_MODIFIER 8 + + +struct loaded_l10nfile +{ + const char *filename; + int decided; + + const void *data; + + struct loaded_l10nfile *next; + struct loaded_l10nfile *successor[1]; +}; + + +/* Normalize codeset name. There is no standard for the codeset + names. Normalization allows the user to use any of the common + names. The return value is dynamically allocated and has to be + freed by the caller. */ +extern const char *_nl_normalize_codeset (const char *codeset, + size_t name_len); + +/* Lookup a locale dependent file. + *L10NFILE_LIST denotes a pool of lookup results of locale dependent + files of the same kind, sorted in decreasing order of ->filename. + DIRLIST and DIRLIST_LEN are an argz list of directories in which to + look, containing at least one directory (i.e. DIRLIST_LEN > 0). + MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER + are the pieces of the locale name, as produced by _nl_explode_name(). + FILENAME is the filename suffix. + The return value is the lookup result, either found in *L10NFILE_LIST, + or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL. + If the return value is non-NULL, it is added to *L10NFILE_LIST, and + its ->next field denotes the chaining inside *L10NFILE_LIST, and + furthermore its ->successor[] field contains a list of other lookup + results from which this lookup result inherits. */ +extern struct loaded_l10nfile * +_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list, + const char *dirlist, size_t dirlist_len, int mask, + const char *language, const char *territory, + const char *codeset, const char *normalized_codeset, + const char *modifier, + const char *filename, int do_allocate); + +/* Lookup the real locale name for a locale alias NAME, or NULL if + NAME is not a locale alias (but possibly a real locale name). + The return value is statically allocated and must not be freed. */ +/* Part of the libintl ABI only for the sake of the gettext.m4 macro. */ +extern LIBINTL_DLL_EXPORTED const char *_nl_expand_alias (const char *name); + +/* Split a locale name NAME into its pieces: language, modifier, + territory, codeset. + NAME gets destructively modified: NUL bytes are inserted here and + there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY, + *CODESET gets assigned either a pointer into the old NAME string, or + NULL. *NORMALIZED_CODESET gets assigned the expanded *CODESET, if it + is different from *CODESET; this one is dynamically allocated and has + to be freed by the caller. + The return value is a bitmask, where each bit corresponds to one + filled-in value: + XPG_MODIFIER for *MODIFIER, + XPG_TERRITORY for *TERRITORY, + XPG_CODESET for *CODESET, + XPG_NORM_CODESET for *NORMALIZED_CODESET. + */ +extern int _nl_explode_name (char *name, const char **language, + const char **modifier, const char **territory, + const char **codeset, + const char **normalized_codeset); + +#endif /* loadinfo.h */ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/localcharset.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/localcharset.h new file mode 100755 index 00000000..0f5e78db --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/localcharset.h @@ -0,0 +1,40 @@ +/* Determine a canonical name for the current locale's character encoding. + Copyright (C) 2000-2003, 2015 Free Software Foundation, Inc. + This file is part of the GNU CHARSET Library. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _LOCALCHARSET_H +#define _LOCALCHARSET_H + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Determine the current locale's character encoding, and canonicalize it + into one of the canonical names listed in config.charset. + The result must not be freed; it is statically allocated. + If the canonical name cannot be determined, the result is a non-canonical + name. */ +extern const char * locale_charset (void); + + +#ifdef __cplusplus +} +#endif + + +#endif /* _LOCALCHARSET_H */ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/lock.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/lock.h new file mode 100755 index 00000000..6b173f81 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/lock.h @@ -0,0 +1,927 @@ +/* Locking in multithreaded situations. + Copyright (C) 2005-2008, 2015-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* Written by Bruno Haible <bruno@clisp.org>, 2005. + Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, + gthr-win32.h. */ + +/* This file contains locking primitives for use with a given thread library. + It does not contain primitives for creating threads or for other + synchronization primitives. + + Normal (non-recursive) locks: + Type: gl_lock_t + Declaration: gl_lock_define(extern, name) + Initializer: gl_lock_define_initialized(, name) + Initialization: gl_lock_init (name); + Taking the lock: gl_lock_lock (name); + Releasing the lock: gl_lock_unlock (name); + De-initialization: gl_lock_destroy (name); + Equivalent functions with control of error handling: + Initialization: err = glthread_lock_init (&name); + Taking the lock: err = glthread_lock_lock (&name); + Releasing the lock: err = glthread_lock_unlock (&name); + De-initialization: err = glthread_lock_destroy (&name); + + Read-Write (non-recursive) locks: + Type: gl_rwlock_t + Declaration: gl_rwlock_define(extern, name) + Initializer: gl_rwlock_define_initialized(, name) + Initialization: gl_rwlock_init (name); + Taking the lock: gl_rwlock_rdlock (name); + gl_rwlock_wrlock (name); + Releasing the lock: gl_rwlock_unlock (name); + De-initialization: gl_rwlock_destroy (name); + Equivalent functions with control of error handling: + Initialization: err = glthread_rwlock_init (&name); + Taking the lock: err = glthread_rwlock_rdlock (&name); + err = glthread_rwlock_wrlock (&name); + Releasing the lock: err = glthread_rwlock_unlock (&name); + De-initialization: err = glthread_rwlock_destroy (&name); + + Recursive locks: + Type: gl_recursive_lock_t + Declaration: gl_recursive_lock_define(extern, name) + Initializer: gl_recursive_lock_define_initialized(, name) + Initialization: gl_recursive_lock_init (name); + Taking the lock: gl_recursive_lock_lock (name); + Releasing the lock: gl_recursive_lock_unlock (name); + De-initialization: gl_recursive_lock_destroy (name); + Equivalent functions with control of error handling: + Initialization: err = glthread_recursive_lock_init (&name); + Taking the lock: err = glthread_recursive_lock_lock (&name); + Releasing the lock: err = glthread_recursive_lock_unlock (&name); + De-initialization: err = glthread_recursive_lock_destroy (&name); + + Once-only execution: + Type: gl_once_t + Initializer: gl_once_define(extern, name) + Execution: gl_once (name, initfunction); + Equivalent functions with control of error handling: + Execution: err = glthread_once (&name, initfunction); +*/ + + +#ifndef _LOCK_H +#define _LOCK_H + +#include <errno.h> +#include <stdlib.h> + +/* ========================================================================= */ + +#if USE_POSIX_THREADS + +/* Use the POSIX threads library. */ + +# include <pthread.h> + +# ifdef __cplusplus +extern "C" { +# endif + +# if PTHREAD_IN_USE_DETECTION_HARD + +/* The pthread_in_use() detection needs to be done at runtime. */ +# define pthread_in_use() \ + glthread_in_use () +extern int glthread_in_use (void); + +# endif + +# if USE_POSIX_THREADS_WEAK + +/* Use weak references to the POSIX threads library. */ + +/* Weak references avoid dragging in external libraries if the other parts + of the program don't use them. Here we use them, because we don't want + every program that uses libintl to depend on libpthread. This assumes + that libpthread would not be loaded after libintl; i.e. if libintl is + loaded first, by an executable that does not depend on libpthread, and + then a module is dynamically loaded that depends on libpthread, libintl + will not be multithread-safe. */ + +/* The way to test at runtime whether libpthread is present is to test + whether a function pointer's value, such as &pthread_mutex_init, is + non-NULL. However, some versions of GCC have a bug through which, in + PIC mode, &foo != NULL always evaluates to true if there is a direct + call to foo(...) in the same function. To avoid this, we test the + address of a function in libpthread that we don't use. */ + +# pragma weak pthread_mutex_init +# pragma weak pthread_mutex_lock +# pragma weak pthread_mutex_unlock +# pragma weak pthread_mutex_destroy +# pragma weak pthread_rwlock_init +# pragma weak pthread_rwlock_rdlock +# pragma weak pthread_rwlock_wrlock +# pragma weak pthread_rwlock_unlock +# pragma weak pthread_rwlock_destroy +# pragma weak pthread_once +# pragma weak pthread_cond_init +# pragma weak pthread_cond_wait +# pragma weak pthread_cond_signal +# pragma weak pthread_cond_broadcast +# pragma weak pthread_cond_destroy +# pragma weak pthread_mutexattr_init +# pragma weak pthread_mutexattr_settype +# pragma weak pthread_mutexattr_destroy +# ifndef pthread_self +# pragma weak pthread_self +# endif + +# if !PTHREAD_IN_USE_DETECTION_HARD +# pragma weak pthread_cancel +# define pthread_in_use() (pthread_cancel != NULL) +# endif + +# else + +# if !PTHREAD_IN_USE_DETECTION_HARD +# define pthread_in_use() 1 +# endif + +# endif + +/* -------------------------- gl_lock_t datatype -------------------------- */ + +typedef pthread_mutex_t gl_lock_t; +# define gl_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS pthread_mutex_t NAME; +# define gl_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS pthread_mutex_t NAME = gl_lock_initializer; +# define gl_lock_initializer \ + PTHREAD_MUTEX_INITIALIZER +# define glthread_lock_init(LOCK) \ + (pthread_in_use () ? pthread_mutex_init (LOCK, NULL) : 0) +# define glthread_lock_lock(LOCK) \ + (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0) +# define glthread_lock_unlock(LOCK) \ + (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0) +# define glthread_lock_destroy(LOCK) \ + (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0) + +/* ------------------------- gl_rwlock_t datatype ------------------------- */ + +# if HAVE_PTHREAD_RWLOCK + +# ifdef PTHREAD_RWLOCK_INITIALIZER + +typedef pthread_rwlock_t gl_rwlock_t; +# define gl_rwlock_define(STORAGECLASS, NAME) \ + STORAGECLASS pthread_rwlock_t NAME; +# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS pthread_rwlock_t NAME = gl_rwlock_initializer; +# define gl_rwlock_initializer \ + PTHREAD_RWLOCK_INITIALIZER +# define glthread_rwlock_init(LOCK) \ + (pthread_in_use () ? pthread_rwlock_init (LOCK, NULL) : 0) +# define glthread_rwlock_rdlock(LOCK) \ + (pthread_in_use () ? pthread_rwlock_rdlock (LOCK) : 0) +# define glthread_rwlock_wrlock(LOCK) \ + (pthread_in_use () ? pthread_rwlock_wrlock (LOCK) : 0) +# define glthread_rwlock_unlock(LOCK) \ + (pthread_in_use () ? pthread_rwlock_unlock (LOCK) : 0) +# define glthread_rwlock_destroy(LOCK) \ + (pthread_in_use () ? pthread_rwlock_destroy (LOCK) : 0) + +# else + +typedef struct + { + int initialized; + pthread_mutex_t guard; /* protects the initialization */ + pthread_rwlock_t rwlock; /* read-write lock */ + } + gl_rwlock_t; +# define gl_rwlock_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_rwlock_t NAME; +# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; +# define gl_rwlock_initializer \ + { 0, PTHREAD_MUTEX_INITIALIZER } +# define glthread_rwlock_init(LOCK) \ + (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) +# define glthread_rwlock_rdlock(LOCK) \ + (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) +# define glthread_rwlock_wrlock(LOCK) \ + (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) +# define glthread_rwlock_unlock(LOCK) \ + (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) +# define glthread_rwlock_destroy(LOCK) \ + (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) +extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); +extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); +extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); +extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); +extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); + +# endif + +# else + +typedef struct + { + pthread_mutex_t lock; /* protects the remaining fields */ + pthread_cond_t waiting_readers; /* waiting readers */ + pthread_cond_t waiting_writers; /* waiting writers */ + unsigned int waiting_writers_count; /* number of waiting writers */ + int runcount; /* number of readers running, or -1 when a writer runs */ + } + gl_rwlock_t; +# define gl_rwlock_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_rwlock_t NAME; +# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; +# define gl_rwlock_initializer \ + { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0 } +# define glthread_rwlock_init(LOCK) \ + (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) +# define glthread_rwlock_rdlock(LOCK) \ + (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) +# define glthread_rwlock_wrlock(LOCK) \ + (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) +# define glthread_rwlock_unlock(LOCK) \ + (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) +# define glthread_rwlock_destroy(LOCK) \ + (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) +extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); +extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); +extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); +extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); +extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); + +# endif + +/* --------------------- gl_recursive_lock_t datatype --------------------- */ + +# if HAVE_PTHREAD_MUTEX_RECURSIVE + +# if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP + +typedef pthread_mutex_t gl_recursive_lock_t; +# define gl_recursive_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS pthread_mutex_t NAME; +# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS pthread_mutex_t NAME = gl_recursive_lock_initializer; +# ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER +# define gl_recursive_lock_initializer \ + PTHREAD_RECURSIVE_MUTEX_INITIALIZER +# else +# define gl_recursive_lock_initializer \ + PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP +# endif +# define glthread_recursive_lock_init(LOCK) \ + (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_lock(LOCK) \ + (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0) +# define glthread_recursive_lock_unlock(LOCK) \ + (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0) +# define glthread_recursive_lock_destroy(LOCK) \ + (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0) +extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); + +# else + +typedef struct + { + pthread_mutex_t recmutex; /* recursive mutex */ + pthread_mutex_t guard; /* protects the initialization */ + int initialized; + } + gl_recursive_lock_t; +# define gl_recursive_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_recursive_lock_t NAME; +# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; +# define gl_recursive_lock_initializer \ + { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER, 0 } +# define glthread_recursive_lock_init(LOCK) \ + (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_lock(LOCK) \ + (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_unlock(LOCK) \ + (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_destroy(LOCK) \ + (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) +extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); + +# endif + +# else + +/* Old versions of POSIX threads on Solaris did not have recursive locks. + We have to implement them ourselves. */ + +typedef struct + { + pthread_mutex_t mutex; + pthread_t owner; + unsigned long depth; + } + gl_recursive_lock_t; +# define gl_recursive_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_recursive_lock_t NAME; +# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; +# define gl_recursive_lock_initializer \ + { PTHREAD_MUTEX_INITIALIZER, (pthread_t) 0, 0 } +# define glthread_recursive_lock_init(LOCK) \ + (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_lock(LOCK) \ + (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_unlock(LOCK) \ + (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_destroy(LOCK) \ + (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) +extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); + +# endif + +/* -------------------------- gl_once_t datatype -------------------------- */ + +typedef pthread_once_t gl_once_t; +# define gl_once_define(STORAGECLASS, NAME) \ + STORAGECLASS pthread_once_t NAME = PTHREAD_ONCE_INIT; +# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ + (pthread_in_use () \ + ? pthread_once (ONCE_CONTROL, INITFUNCTION) \ + : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) +extern int glthread_once_singlethreaded (pthread_once_t *once_control); + +# ifdef __cplusplus +} +# endif + +#endif + +/* ========================================================================= */ + +#if USE_PTH_THREADS + +/* Use the GNU Pth threads library. */ + +# include <pth.h> + +# ifdef __cplusplus +extern "C" { +# endif + +# if USE_PTH_THREADS_WEAK + +/* Use weak references to the GNU Pth threads library. */ + +# pragma weak pth_mutex_init +# pragma weak pth_mutex_acquire +# pragma weak pth_mutex_release +# pragma weak pth_rwlock_init +# pragma weak pth_rwlock_acquire +# pragma weak pth_rwlock_release +# pragma weak pth_once + +# pragma weak pth_cancel +# define pth_in_use() (pth_cancel != NULL) + +# else + +# define pth_in_use() 1 + +# endif + +/* -------------------------- gl_lock_t datatype -------------------------- */ + +typedef pth_mutex_t gl_lock_t; +# define gl_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS pth_mutex_t NAME; +# define gl_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS pth_mutex_t NAME = gl_lock_initializer; +# define gl_lock_initializer \ + PTH_MUTEX_INIT +# define glthread_lock_init(LOCK) \ + (pth_in_use () && !pth_mutex_init (LOCK) ? errno : 0) +# define glthread_lock_lock(LOCK) \ + (pth_in_use () && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0) +# define glthread_lock_unlock(LOCK) \ + (pth_in_use () && !pth_mutex_release (LOCK) ? errno : 0) +# define glthread_lock_destroy(LOCK) \ + ((void)(LOCK), 0) + +/* ------------------------- gl_rwlock_t datatype ------------------------- */ + +typedef pth_rwlock_t gl_rwlock_t; +# define gl_rwlock_define(STORAGECLASS, NAME) \ + STORAGECLASS pth_rwlock_t NAME; +# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS pth_rwlock_t NAME = gl_rwlock_initializer; +# define gl_rwlock_initializer \ + PTH_RWLOCK_INIT +# define glthread_rwlock_init(LOCK) \ + (pth_in_use () && !pth_rwlock_init (LOCK) ? errno : 0) +# define glthread_rwlock_rdlock(LOCK) \ + (pth_in_use () && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RD, 0, NULL) ? errno : 0) +# define glthread_rwlock_wrlock(LOCK) \ + (pth_in_use () && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RW, 0, NULL) ? errno : 0) +# define glthread_rwlock_unlock(LOCK) \ + (pth_in_use () && !pth_rwlock_release (LOCK) ? errno : 0) +# define glthread_rwlock_destroy(LOCK) \ + ((void)(LOCK), 0) + +/* --------------------- gl_recursive_lock_t datatype --------------------- */ + +/* In Pth, mutexes are recursive by default. */ +typedef pth_mutex_t gl_recursive_lock_t; +# define gl_recursive_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS pth_mutex_t NAME; +# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS pth_mutex_t NAME = gl_recursive_lock_initializer; +# define gl_recursive_lock_initializer \ + PTH_MUTEX_INIT +# define glthread_recursive_lock_init(LOCK) \ + (pth_in_use () && !pth_mutex_init (LOCK) ? errno : 0) +# define glthread_recursive_lock_lock(LOCK) \ + (pth_in_use () && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0) +# define glthread_recursive_lock_unlock(LOCK) \ + (pth_in_use () && !pth_mutex_release (LOCK) ? errno : 0) +# define glthread_recursive_lock_destroy(LOCK) \ + ((void)(LOCK), 0) + +/* -------------------------- gl_once_t datatype -------------------------- */ + +typedef pth_once_t gl_once_t; +# define gl_once_define(STORAGECLASS, NAME) \ + STORAGECLASS pth_once_t NAME = PTH_ONCE_INIT; +# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ + (pth_in_use () \ + ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \ + : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) +extern int glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void)); +extern int glthread_once_singlethreaded (pth_once_t *once_control); + +# ifdef __cplusplus +} +# endif + +#endif + +/* ========================================================================= */ + +#if USE_SOLARIS_THREADS + +/* Use the old Solaris threads library. */ + +# include <thread.h> +# include <synch.h> + +# ifdef __cplusplus +extern "C" { +# endif + +# if USE_SOLARIS_THREADS_WEAK + +/* Use weak references to the old Solaris threads library. */ + +# pragma weak mutex_init +# pragma weak mutex_lock +# pragma weak mutex_unlock +# pragma weak mutex_destroy +# pragma weak rwlock_init +# pragma weak rw_rdlock +# pragma weak rw_wrlock +# pragma weak rw_unlock +# pragma weak rwlock_destroy +# pragma weak thr_self + +# pragma weak thr_suspend +# define thread_in_use() (thr_suspend != NULL) + +# else + +# define thread_in_use() 1 + +# endif + +/* -------------------------- gl_lock_t datatype -------------------------- */ + +typedef mutex_t gl_lock_t; +# define gl_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS mutex_t NAME; +# define gl_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS mutex_t NAME = gl_lock_initializer; +# define gl_lock_initializer \ + DEFAULTMUTEX +# define glthread_lock_init(LOCK) \ + (thread_in_use () ? mutex_init (LOCK, USYNC_THREAD, NULL) : 0) +# define glthread_lock_lock(LOCK) \ + (thread_in_use () ? mutex_lock (LOCK) : 0) +# define glthread_lock_unlock(LOCK) \ + (thread_in_use () ? mutex_unlock (LOCK) : 0) +# define glthread_lock_destroy(LOCK) \ + (thread_in_use () ? mutex_destroy (LOCK) : 0) + +/* ------------------------- gl_rwlock_t datatype ------------------------- */ + +typedef rwlock_t gl_rwlock_t; +# define gl_rwlock_define(STORAGECLASS, NAME) \ + STORAGECLASS rwlock_t NAME; +# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS rwlock_t NAME = gl_rwlock_initializer; +# define gl_rwlock_initializer \ + DEFAULTRWLOCK +# define glthread_rwlock_init(LOCK) \ + (thread_in_use () ? rwlock_init (LOCK, USYNC_THREAD, NULL) : 0) +# define glthread_rwlock_rdlock(LOCK) \ + (thread_in_use () ? rw_rdlock (LOCK) : 0) +# define glthread_rwlock_wrlock(LOCK) \ + (thread_in_use () ? rw_wrlock (LOCK) : 0) +# define glthread_rwlock_unlock(LOCK) \ + (thread_in_use () ? rw_unlock (LOCK) : 0) +# define glthread_rwlock_destroy(LOCK) \ + (thread_in_use () ? rwlock_destroy (LOCK) : 0) + +/* --------------------- gl_recursive_lock_t datatype --------------------- */ + +/* Old Solaris threads did not have recursive locks. + We have to implement them ourselves. */ + +typedef struct + { + mutex_t mutex; + thread_t owner; + unsigned long depth; + } + gl_recursive_lock_t; +# define gl_recursive_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_recursive_lock_t NAME; +# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; +# define gl_recursive_lock_initializer \ + { DEFAULTMUTEX, (thread_t) 0, 0 } +# define glthread_recursive_lock_init(LOCK) \ + (thread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_lock(LOCK) \ + (thread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_unlock(LOCK) \ + (thread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_destroy(LOCK) \ + (thread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) +extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); + +/* -------------------------- gl_once_t datatype -------------------------- */ + +typedef struct + { + volatile int inited; + mutex_t mutex; + } + gl_once_t; +# define gl_once_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_once_t NAME = { 0, DEFAULTMUTEX }; +# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ + (thread_in_use () \ + ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \ + : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) +extern int glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void)); +extern int glthread_once_singlethreaded (gl_once_t *once_control); + +# ifdef __cplusplus +} +# endif + +#endif + +/* ========================================================================= */ + +#if USE_WINDOWS_THREADS + +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ +# include <windows.h> + +# ifdef __cplusplus +extern "C" { +# endif + +/* We can use CRITICAL_SECTION directly, rather than the native Windows Event, + Mutex, Semaphore types, because + - we need only to synchronize inside a single process (address space), + not inter-process locking, + - we don't need to support trylock operations. (TryEnterCriticalSection + does not work on Windows 95/98/ME. Packages that need trylock usually + define their own mutex type.) */ + +/* There is no way to statically initialize a CRITICAL_SECTION. It needs + to be done lazily, once only. For this we need spinlocks. */ + +typedef struct { volatile int done; volatile long started; } gl_spinlock_t; + +/* -------------------------- gl_lock_t datatype -------------------------- */ + +typedef struct + { + gl_spinlock_t guard; /* protects the initialization */ + CRITICAL_SECTION lock; + } + gl_lock_t; +# define gl_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_lock_t NAME; +# define gl_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS gl_lock_t NAME = gl_lock_initializer; +# define gl_lock_initializer \ + { { 0, -1 } } +# define glthread_lock_init(LOCK) \ + (glthread_lock_init_func (LOCK), 0) +# define glthread_lock_lock(LOCK) \ + glthread_lock_lock_func (LOCK) +# define glthread_lock_unlock(LOCK) \ + glthread_lock_unlock_func (LOCK) +# define glthread_lock_destroy(LOCK) \ + glthread_lock_destroy_func (LOCK) +extern void glthread_lock_init_func (gl_lock_t *lock); +extern int glthread_lock_lock_func (gl_lock_t *lock); +extern int glthread_lock_unlock_func (gl_lock_t *lock); +extern int glthread_lock_destroy_func (gl_lock_t *lock); + +/* ------------------------- gl_rwlock_t datatype ------------------------- */ + +/* It is impossible to implement read-write locks using plain locks, without + introducing an extra thread dedicated to managing read-write locks. + Therefore here we need to use the low-level Event type. */ + +typedef struct + { + HANDLE *array; /* array of waiting threads, each represented by an event */ + unsigned int count; /* number of waiting threads */ + unsigned int alloc; /* length of allocated array */ + unsigned int offset; /* index of first waiting thread in array */ + } + gl_carray_waitqueue_t; +typedef struct + { + gl_spinlock_t guard; /* protects the initialization */ + CRITICAL_SECTION lock; /* protects the remaining fields */ + gl_carray_waitqueue_t waiting_readers; /* waiting readers */ + gl_carray_waitqueue_t waiting_writers; /* waiting writers */ + int runcount; /* number of readers running, or -1 when a writer runs */ + } + gl_rwlock_t; +# define gl_rwlock_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_rwlock_t NAME; +# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; +# define gl_rwlock_initializer \ + { { 0, -1 } } +# define glthread_rwlock_init(LOCK) \ + (glthread_rwlock_init_func (LOCK), 0) +# define glthread_rwlock_rdlock(LOCK) \ + glthread_rwlock_rdlock_func (LOCK) +# define glthread_rwlock_wrlock(LOCK) \ + glthread_rwlock_wrlock_func (LOCK) +# define glthread_rwlock_unlock(LOCK) \ + glthread_rwlock_unlock_func (LOCK) +# define glthread_rwlock_destroy(LOCK) \ + glthread_rwlock_destroy_func (LOCK) +extern void glthread_rwlock_init_func (gl_rwlock_t *lock); +extern int glthread_rwlock_rdlock_func (gl_rwlock_t *lock); +extern int glthread_rwlock_wrlock_func (gl_rwlock_t *lock); +extern int glthread_rwlock_unlock_func (gl_rwlock_t *lock); +extern int glthread_rwlock_destroy_func (gl_rwlock_t *lock); + +/* --------------------- gl_recursive_lock_t datatype --------------------- */ + +/* The native Windows documentation says that CRITICAL_SECTION already + implements a recursive lock. But we need not rely on it: It's easy to + implement a recursive lock without this assumption. */ + +typedef struct + { + gl_spinlock_t guard; /* protects the initialization */ + DWORD owner; + unsigned long depth; + CRITICAL_SECTION lock; + } + gl_recursive_lock_t; +# define gl_recursive_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_recursive_lock_t NAME; +# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; +# define gl_recursive_lock_initializer \ + { { 0, -1 }, 0, 0 } +# define glthread_recursive_lock_init(LOCK) \ + (glthread_recursive_lock_init_func (LOCK), 0) +# define glthread_recursive_lock_lock(LOCK) \ + glthread_recursive_lock_lock_func (LOCK) +# define glthread_recursive_lock_unlock(LOCK) \ + glthread_recursive_lock_unlock_func (LOCK) +# define glthread_recursive_lock_destroy(LOCK) \ + glthread_recursive_lock_destroy_func (LOCK) +extern void glthread_recursive_lock_init_func (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock); + +/* -------------------------- gl_once_t datatype -------------------------- */ + +typedef struct + { + volatile int inited; + volatile long started; + CRITICAL_SECTION lock; + } + gl_once_t; +# define gl_once_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_once_t NAME = { -1, -1 }; +# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ + (glthread_once_func (ONCE_CONTROL, INITFUNCTION), 0) +extern void glthread_once_func (gl_once_t *once_control, void (*initfunction) (void)); + +# ifdef __cplusplus +} +# endif + +#endif + +/* ========================================================================= */ + +#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) + +/* Provide dummy implementation if threads are not supported. */ + +/* -------------------------- gl_lock_t datatype -------------------------- */ + +typedef int gl_lock_t; +# define gl_lock_define(STORAGECLASS, NAME) +# define gl_lock_define_initialized(STORAGECLASS, NAME) +# define glthread_lock_init(NAME) 0 +# define glthread_lock_lock(NAME) 0 +# define glthread_lock_unlock(NAME) 0 +# define glthread_lock_destroy(NAME) 0 + +/* ------------------------- gl_rwlock_t datatype ------------------------- */ + +typedef int gl_rwlock_t; +# define gl_rwlock_define(STORAGECLASS, NAME) +# define gl_rwlock_define_initialized(STORAGECLASS, NAME) +# define glthread_rwlock_init(NAME) 0 +# define glthread_rwlock_rdlock(NAME) 0 +# define glthread_rwlock_wrlock(NAME) 0 +# define glthread_rwlock_unlock(NAME) 0 +# define glthread_rwlock_destroy(NAME) 0 + +/* --------------------- gl_recursive_lock_t datatype --------------------- */ + +typedef int gl_recursive_lock_t; +# define gl_recursive_lock_define(STORAGECLASS, NAME) +# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) +# define glthread_recursive_lock_init(NAME) 0 +# define glthread_recursive_lock_lock(NAME) 0 +# define glthread_recursive_lock_unlock(NAME) 0 +# define glthread_recursive_lock_destroy(NAME) 0 + +/* -------------------------- gl_once_t datatype -------------------------- */ + +typedef int gl_once_t; +# define gl_once_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_once_t NAME = 0; +# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ + (*(ONCE_CONTROL) == 0 ? (*(ONCE_CONTROL) = ~ 0, INITFUNCTION (), 0) : 0) + +#endif + +/* ========================================================================= */ + +/* Macros with built-in error handling. */ + +/* -------------------------- gl_lock_t datatype -------------------------- */ + +#define gl_lock_init(NAME) \ + do \ + { \ + if (glthread_lock_init (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_lock_lock(NAME) \ + do \ + { \ + if (glthread_lock_lock (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_lock_unlock(NAME) \ + do \ + { \ + if (glthread_lock_unlock (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_lock_destroy(NAME) \ + do \ + { \ + if (glthread_lock_destroy (&NAME)) \ + abort (); \ + } \ + while (0) + +/* ------------------------- gl_rwlock_t datatype ------------------------- */ + +#define gl_rwlock_init(NAME) \ + do \ + { \ + if (glthread_rwlock_init (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_rwlock_rdlock(NAME) \ + do \ + { \ + if (glthread_rwlock_rdlock (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_rwlock_wrlock(NAME) \ + do \ + { \ + if (glthread_rwlock_wrlock (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_rwlock_unlock(NAME) \ + do \ + { \ + if (glthread_rwlock_unlock (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_rwlock_destroy(NAME) \ + do \ + { \ + if (glthread_rwlock_destroy (&NAME)) \ + abort (); \ + } \ + while (0) + +/* --------------------- gl_recursive_lock_t datatype --------------------- */ + +#define gl_recursive_lock_init(NAME) \ + do \ + { \ + if (glthread_recursive_lock_init (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_recursive_lock_lock(NAME) \ + do \ + { \ + if (glthread_recursive_lock_lock (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_recursive_lock_unlock(NAME) \ + do \ + { \ + if (glthread_recursive_lock_unlock (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_recursive_lock_destroy(NAME) \ + do \ + { \ + if (glthread_recursive_lock_destroy (&NAME)) \ + abort (); \ + } \ + while (0) + +/* -------------------------- gl_once_t datatype -------------------------- */ + +#define gl_once(NAME, INITFUNCTION) \ + do \ + { \ + if (glthread_once (&NAME, INITFUNCTION)) \ + abort (); \ + } \ + while (0) + +/* ========================================================================= */ + +#endif /* _LOCK_H */ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/os2compat.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/os2compat.h new file mode 100755 index 00000000..d92ecbe0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/os2compat.h @@ -0,0 +1,44 @@ +/* OS/2 compatibility defines. + This file is intended to be included from config.h + Copyright (C) 2001-2002, 2015-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* When included from os2compat.h we need all the original definitions */ +#ifndef OS2_AWARE + +#undef LIBDIR +#define LIBDIR _nlos2_libdir +extern char *_nlos2_libdir; + +#undef LOCALEDIR +#define LOCALEDIR _nlos2_localedir +extern char *_nlos2_localedir; + +#undef LOCALE_ALIAS_PATH +#define LOCALE_ALIAS_PATH _nlos2_localealiaspath +extern char *_nlos2_localealiaspath; + +#endif + +#undef HAVE_STRCASECMP +#define HAVE_STRCASECMP 1 +#define strcasecmp stricmp +#define strncasecmp strnicmp + +/* We have our own getenv() which works even if library is compiled as DLL */ +#define getenv _nl_getenv + +/* Older versions of gettext used -1 as the value of LC_MESSAGES */ +#define LC_MESSAGES_COMPAT (-1) diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/plural-exp.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/plural-exp.h new file mode 100755 index 00000000..6278b954 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/plural-exp.h @@ -0,0 +1,141 @@ +/* Expression parsing and evaluation for plural form selection. + Copyright (C) 2000-2016 Free Software Foundation, Inc. + Written by Ulrich Drepper <drepper@cygnus.com>, 2000. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _PLURAL_EXP_H +#define _PLURAL_EXP_H + +#ifndef internal_function +# define internal_function +#endif + +#ifndef attribute_hidden +# define attribute_hidden +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + +enum expression_operator +{ + /* Without arguments: */ + var, /* The variable "n". */ + num, /* Decimal number. */ + /* Unary operators: */ + lnot, /* Logical NOT. */ + /* Binary operators: */ + mult, /* Multiplication. */ + divide, /* Division. */ + module, /* Modulo operation. */ + plus, /* Addition. */ + minus, /* Subtraction. */ + less_than, /* Comparison. */ + greater_than, /* Comparison. */ + less_or_equal, /* Comparison. */ + greater_or_equal, /* Comparison. */ + equal, /* Comparison for equality. */ + not_equal, /* Comparison for inequality. */ + land, /* Logical AND. */ + lor, /* Logical OR. */ + /* Ternary operators: */ + qmop /* Question mark operator. */ +}; + +/* This is the representation of the expressions to determine the + plural form. */ +struct expression +{ + int nargs; /* Number of arguments. */ + enum expression_operator operation; + union + { + unsigned long int num; /* Number value for `num'. */ + struct expression *args[3]; /* Up to three arguments. */ + } val; +}; + +/* This is the data structure to pass information to the parser and get + the result in a thread-safe way. */ +struct parse_args +{ + const char *cp; + struct expression *res; +}; + + +/* Names for the libintl functions are a problem. This source code is used + 1. in the GNU C Library library, + 2. in the GNU libintl library, + 3. in the GNU gettext tools. + The function names in each situation must be different, to allow for + binary incompatible changes in 'struct expression'. Furthermore, + 1. in the GNU C Library library, the names have a __ prefix, + 2.+3. in the GNU libintl library and in the GNU gettext tools, the names + must follow ANSI C and not start with __. + So we have to distinguish the three cases. */ +#ifdef _LIBC +# define FREE_EXPRESSION __gettext_free_exp +# define PLURAL_PARSE __gettextparse +# define GERMANIC_PLURAL __gettext_germanic_plural +# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural +#elif defined (IN_LIBINTL) +# define FREE_EXPRESSION libintl_gettext_free_exp +# define PLURAL_PARSE libintl_gettextparse +# define GERMANIC_PLURAL libintl_gettext_germanic_plural +# define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural +#else +# define FREE_EXPRESSION free_plural_expression +# define PLURAL_PARSE parse_plural_expression +# define GERMANIC_PLURAL germanic_plural +# define EXTRACT_PLURAL_EXPRESSION extract_plural_expression +#endif + +#if (defined __GNUC__ && !(defined __APPLE_CC_ && __APPLE_CC__ > 1) \ + && !defined __cplusplus) \ + || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) \ + || (defined __SUNPRO_C && 0x560 <= __SUNPRO_C \ + && !(defined __STDC__ && __STDC__ == 1)) +# define HAVE_STRUCT_INITIALIZER 1 +#else +# define HAVE_STRUCT_INITIALIZER 0 +#endif + +extern void FREE_EXPRESSION (struct expression *exp) + internal_function; +extern int PLURAL_PARSE (struct parse_args *arg); +#if HAVE_STRUCT_INITIALIZER +extern const struct expression GERMANIC_PLURAL attribute_hidden; +#else +extern struct expression GERMANIC_PLURAL attribute_hidden; +#endif +extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry, + const struct expression **pluralp, + unsigned long int *npluralsp) + internal_function; + +#if !defined (_LIBC) && !defined (IN_LIBINTL) && !defined (IN_LIBGLOCALE) +extern unsigned long int plural_eval (const struct expression *pexp, + unsigned long int n); +#endif + + +#ifdef __cplusplus +} +#endif + +#endif /* _PLURAL_EXP_H */ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/printf-args.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/printf-args.h new file mode 100755 index 00000000..946328b4 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/printf-args.h @@ -0,0 +1,158 @@ +/* Decomposed printf argument list. + Copyright (C) 1999, 2002-2003, 2006-2007, 2011, 2015-2016 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _PRINTF_ARGS_H +#define _PRINTF_ARGS_H + +/* This file can be parametrized with the following macros: + ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. + PRINTF_FETCHARGS Name of the function to be declared. + STATIC Set to 'static' to declare the function static. */ + +/* Default parameters. */ +#ifndef PRINTF_FETCHARGS +# define PRINTF_FETCHARGS printf_fetchargs +#endif + +/* Get size_t. */ +#include <stddef.h> + +/* Get wchar_t. */ +#if HAVE_WCHAR_T +# include <stddef.h> +#endif + +/* Get wint_t. */ +#if HAVE_WINT_T +# include <wchar.h> +#endif + +/* Get va_list. */ +#include <stdarg.h> + + +/* Argument types */ +typedef enum +{ + TYPE_NONE, + TYPE_SCHAR, + TYPE_UCHAR, + TYPE_SHORT, + TYPE_USHORT, + TYPE_INT, + TYPE_UINT, + TYPE_LONGINT, + TYPE_ULONGINT, +#if HAVE_LONG_LONG_INT + TYPE_LONGLONGINT, + TYPE_ULONGLONGINT, +#endif + TYPE_DOUBLE, + TYPE_LONGDOUBLE, + TYPE_CHAR, +#if HAVE_WINT_T + TYPE_WIDE_CHAR, +#endif + TYPE_STRING, +#if HAVE_WCHAR_T + TYPE_WIDE_STRING, +#endif + TYPE_POINTER, + TYPE_COUNT_SCHAR_POINTER, + TYPE_COUNT_SHORT_POINTER, + TYPE_COUNT_INT_POINTER, + TYPE_COUNT_LONGINT_POINTER +#if HAVE_LONG_LONG_INT +, TYPE_COUNT_LONGLONGINT_POINTER +#endif +#if ENABLE_UNISTDIO + /* The unistdio extensions. */ +, TYPE_U8_STRING +, TYPE_U16_STRING +, TYPE_U32_STRING +#endif +} arg_type; + +/* Polymorphic argument */ +typedef struct +{ + arg_type type; + union + { + signed char a_schar; + unsigned char a_uchar; + short a_short; + unsigned short a_ushort; + int a_int; + unsigned int a_uint; + long int a_longint; + unsigned long int a_ulongint; +#if HAVE_LONG_LONG_INT + long long int a_longlongint; + unsigned long long int a_ulonglongint; +#endif + float a_float; + double a_double; + long double a_longdouble; + int a_char; +#if HAVE_WINT_T + wint_t a_wide_char; +#endif + const char* a_string; +#if HAVE_WCHAR_T + const wchar_t* a_wide_string; +#endif + void* a_pointer; + signed char * a_count_schar_pointer; + short * a_count_short_pointer; + int * a_count_int_pointer; + long int * a_count_longint_pointer; +#if HAVE_LONG_LONG_INT + long long int * a_count_longlongint_pointer; +#endif +#if ENABLE_UNISTDIO + /* The unistdio extensions. */ + const uint8_t * a_u8_string; + const uint16_t * a_u16_string; + const uint32_t * a_u32_string; +#endif + } + a; +} +argument; + +/* Number of directly allocated arguments (no malloc() needed). */ +#define N_DIRECT_ALLOC_ARGUMENTS 7 + +typedef struct +{ + size_t count; + argument *arg; + argument direct_alloc_arg[N_DIRECT_ALLOC_ARGUMENTS]; +} +arguments; + + +/* Fetch the arguments, putting them into a. */ +#ifdef STATIC +STATIC +#else +extern +#endif +int PRINTF_FETCHARGS (va_list args, arguments *a); + +#endif /* _PRINTF_ARGS_H */ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/printf-parse.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/printf-parse.h new file mode 100755 index 00000000..547d9d0e --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/printf-parse.h @@ -0,0 +1,85 @@ +/* Parse printf format string. + Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2011, 2015-2016 Free + Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _PRINTF_PARSE_H +#define _PRINTF_PARSE_H + +#if HAVE_FEATURES_H +# include <features.h> /* for __GLIBC__, __UCLIBC__ */ +#endif + +#include "printf-args.h" + + +/* Flags */ +#define FLAG_GROUP 1 /* ' flag */ +#define FLAG_LEFT 2 /* - flag */ +#define FLAG_SHOWSIGN 4 /* + flag */ +#define FLAG_SPACE 8 /* space flag */ +#define FLAG_ALT 16 /* # flag */ +#define FLAG_ZERO 32 +#if __GLIBC__ >= 2 && !defined __UCLIBC__ +# define FLAG_LOCALIZED 64 /* I flag, uses localized digits */ +#endif + +/* arg_index value indicating that no argument is consumed. */ +#define ARG_NONE (~(size_t)0) + +/* Number of directly allocated directives (no malloc() needed). */ +#define N_DIRECT_ALLOC_DIRECTIVES 7 + +/* A parsed directive. */ +typedef struct +{ + const char* dir_start; + const char* dir_end; + int flags; + const char* width_start; + const char* width_end; + size_t width_arg_index; + const char* precision_start; + const char* precision_end; + size_t precision_arg_index; + char conversion; /* d i o u x X f e E g G c s p n U % but not C S */ + size_t arg_index; +} +char_directive; + +/* A parsed format string. */ +typedef struct +{ + size_t count; + char_directive *dir; + size_t max_width_length; + size_t max_precision_length; + char_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; +} +char_directives; + + +/* Parses the format string. Fills in the number N of directives, and fills + in directives[0], ..., directives[N-1], and sets directives[N].dir_start + to the end of the format string. Also fills in the arg_type fields of the + arguments and the needed count of arguments. */ +#ifdef STATIC +STATIC +#else +extern +#endif +int printf_parse (const char *format, char_directives *d, arguments *a); + +#endif /* _PRINTF_PARSE_H */ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/relocatable.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/relocatable.h new file mode 100755 index 00000000..ecad3a76 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/relocatable.h @@ -0,0 +1,81 @@ +/* Provide relocatable packages. + Copyright (C) 2003, 2005, 2008, 2015-2016 Free Software Foundation, Inc. + Written by Bruno Haible <bruno@clisp.org>, 2003. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _RELOCATABLE_H +#define _RELOCATABLE_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* This can be enabled through the configure --enable-relocatable option. */ +#if ENABLE_RELOCATABLE + +/* When building a DLL, we must export some functions. Note that because + this is a private .h file, we don't need to use __declspec(dllimport) + in any case. */ +#if HAVE_VISIBILITY && BUILDING_DLL +# define RELOCATABLE_DLL_EXPORTED __attribute__((__visibility__("default"))) +#elif defined _MSC_VER && BUILDING_DLL +# define RELOCATABLE_DLL_EXPORTED __declspec(dllexport) +#else +# define RELOCATABLE_DLL_EXPORTED +#endif + +/* Sets the original and the current installation prefix of the package. + Relocation simply replaces a pathname starting with the original prefix + by the corresponding pathname with the current prefix instead. Both + prefixes should be directory names without trailing slash (i.e. use "" + instead of "/"). */ +extern RELOCATABLE_DLL_EXPORTED void + set_relocation_prefix (const char *orig_prefix, + const char *curr_prefix); + +/* Returns the pathname, relocated according to the current installation + directory. + The returned string is either PATHNAME unmodified or a freshly allocated + string that you can free with free() after casting it to 'char *'. */ +extern const char * relocate (const char *pathname); + +/* Memory management: relocate() potentially allocates memory, because it has + to construct a fresh pathname. If this is a problem because your program + calls relocate() frequently, think about caching the result. Or free the + return value if it was different from the argument pathname. */ + +/* Convenience function: + Computes the current installation prefix, based on the original + installation prefix, the original installation directory of a particular + file, and the current pathname of this file. + Returns it, freshly allocated. Returns NULL upon failure. */ +extern char * compute_curr_prefix (const char *orig_installprefix, + const char *orig_installdir, + const char *curr_pathname); + +#else + +/* By default, we use the hardwired pathnames. */ +#define relocate(pathname) (pathname) + +#endif + + +#ifdef __cplusplus +} +#endif + +#endif /* _RELOCATABLE_H */ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/tsearch.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/tsearch.h new file mode 100755 index 00000000..243eca66 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/tsearch.h @@ -0,0 +1,81 @@ +/* Binary tree data structure. + Copyright (C) 2006, 2015-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _TSEARCH_H +#define _TSEARCH_H + +#if HAVE_TSEARCH + +/* Get tseach(), tfind(), tdelete(), twalk() declarations. */ +#include <search.h> + +#else + +#ifdef __cplusplus +extern "C" { +#endif + +/* See <http://www.opengroup.org/susv3xbd/search.h.html>, + <http://www.opengroup.org/susv3xsh/tsearch.html> + for details. */ + +typedef enum +{ + preorder, + postorder, + endorder, + leaf +} +VISIT; + +/* Searches an element in the tree *VROOTP that compares equal to KEY. + If one is found, it is returned. Otherwise, a new element equal to KEY + is inserted in the tree and is returned. */ +extern void * tsearch (const void *key, void **vrootp, + int (*compar) (const void *, const void *)); + +/* Searches an element in the tree *VROOTP that compares equal to KEY. + If one is found, it is returned. Otherwise, NULL is returned. */ +extern void * tfind (const void *key, void *const *vrootp, + int (*compar) (const void *, const void *)); + +/* Searches an element in the tree *VROOTP that compares equal to KEY. + If one is found, it is removed from the tree, and its parent node is + returned. Otherwise, NULL is returned. */ +extern void * tdelete (const void *key, void **vrootp, + int (*compar) (const void *, const void *)); + +/* Perform a depth-first, left-to-right traversal of the tree VROOT. + The ACTION function is called: + - for non-leaf nodes: 3 times, before the left subtree traversal, + after the left subtree traversal but before the right subtree traversal, + and after the right subtree traversal, + - for leaf nodes: once. + The arguments passed to ACTION are: + 1. the node; it can be casted to a 'const void * const *', i.e. into a + pointer to the key, + 2. an indicator which visit of the node this is, + 3. the level of the node in the tree (0 for the root). */ +extern void twalk (const void *vroot, + void (*action) (const void *, VISIT, int)); + +#ifdef __cplusplus +} +#endif + +#endif + +#endif /* _TSEARCH_H */ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/vasnprintf.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/vasnprintf.h new file mode 100755 index 00000000..5a2bbfc8 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/vasnprintf.h @@ -0,0 +1,76 @@ +/* vsprintf with automatic memory allocation. + Copyright (C) 2002-2004, 2012, 2015-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _VASNPRINTF_H +#define _VASNPRINTF_H + +/* Get va_list. */ +#include <stdarg.h> + +/* Get size_t. */ +#include <stddef.h> + +#ifndef __attribute__ +/* This feature is available in gcc versions 2.5 and later. */ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ +# define __attribute__(Spec) /* empty */ +# endif +/* The __-protected variants of 'format' and 'printf' attributes + are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) +# define __format__ format +# define __printf__ printf +# endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Write formatted output to a string dynamically allocated with malloc(). + You can pass a preallocated buffer for the result in RESULTBUF and its + size in *LENGTHP; otherwise you pass RESULTBUF = NULL. + If successful, return the address of the string (this may be = RESULTBUF + if no dynamic memory allocation was necessary) and set *LENGTHP to the + number of resulting bytes, excluding the trailing NUL. Upon error, set + errno and return NULL. + + When dynamic memory allocation occurs, the preallocated buffer is left + alone (with possibly modified contents). This makes it possible to use + a statically allocated or stack-allocated buffer, like this: + + char buf[100]; + size_t len = sizeof (buf); + char *output = vasnprintf (buf, &len, format, args); + if (output == NULL) + ... error handling ...; + else + { + ... use the output string ...; + if (output != buf) + free (output); + } + */ +extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) + __attribute__ ((__format__ (__printf__, 3, 4))); +extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) + __attribute__ ((__format__ (__printf__, 3, 0))); + +#ifdef __cplusplus +} +#endif + +#endif /* _VASNPRINTF_H */ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/vasnwprintf.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/vasnwprintf.h new file mode 100755 index 00000000..aeb69d2b --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/vasnwprintf.h @@ -0,0 +1,44 @@ +/* vswprintf with automatic memory allocation. + Copyright (C) 2002-2003, 2015-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _VASNWPRINTF_H +#define _VASNWPRINTF_H + +/* Get va_list. */ +#include <stdarg.h> + +/* Get wchar_t, size_t. */ +#include <stddef.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Write formatted output to a string dynamically allocated with malloc(). + You can pass a preallocated buffer for the result in RESULTBUF and its + size in *LENGTHP; otherwise you pass RESULTBUF = NULL. + If successful, return the address of the string (this may be = RESULTBUF + if no dynamic memory allocation was necessary) and set *LENGTHP to the + number of resulting bytes, excluding the trailing NUL. Upon error, set + errno and return NULL. */ +extern wchar_t * asnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, ...); +extern wchar_t * vasnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, va_list args); + +#ifdef __cplusplus +} +#endif + +#endif /* _VASNWPRINTF_H */ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/verify.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/verify.h new file mode 100755 index 00000000..267de295 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/verify.h @@ -0,0 +1,279 @@ +/* Compile-time assert-like macros. + + Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ + +#ifndef _GL_VERIFY_H +#define _GL_VERIFY_H + + +/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11. + This is supported by GCC 4.6.0 and later, in C mode, and its use + here generates easier-to-read diagnostics when verify (R) fails. + + Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11. + This will likely be supported by future GCC versions, in C++ mode. + + Use this only with GCC. If we were willing to slow 'configure' + down we could also use it with other compilers, but since this + affects only the quality of diagnostics, why bother? */ +#if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \ + && (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \ + && !defined __cplusplus) +# define _GL_HAVE__STATIC_ASSERT 1 +#endif +/* The condition (99 < __GNUC__) is temporary, until we know about the + first G++ release that supports static_assert. */ +#if (99 < __GNUC__) && defined __cplusplus +# define _GL_HAVE_STATIC_ASSERT 1 +#endif + +/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other + system headers, defines a conflicting _Static_assert that is no + better than ours; override it. */ +#ifndef _GL_HAVE_STATIC_ASSERT +# include <stddef.h> +# undef _Static_assert +#endif + +/* Each of these macros verifies that its argument R is nonzero. To + be portable, R should be an integer constant expression. Unlike + assert (R), there is no run-time overhead. + + If _Static_assert works, verify (R) uses it directly. Similarly, + _GL_VERIFY_TRUE works by packaging a _Static_assert inside a struct + that is an operand of sizeof. + + The code below uses several ideas for C++ compilers, and for C + compilers that do not support _Static_assert: + + * The first step is ((R) ? 1 : -1). Given an expression R, of + integral or boolean or floating-point type, this yields an + expression of integral type, whose value is later verified to be + constant and nonnegative. + + * Next this expression W is wrapped in a type + struct _gl_verify_type { + unsigned int _gl_verify_error_if_negative: W; + }. + If W is negative, this yields a compile-time error. No compiler can + deal with a bit-field of negative size. + + One might think that an array size check would have the same + effect, that is, that the type struct { unsigned int dummy[W]; } + would work as well. However, inside a function, some compilers + (such as C++ compilers and GNU C) allow local parameters and + variables inside array size expressions. With these compilers, + an array size check would not properly diagnose this misuse of + the verify macro: + + void function (int n) { verify (n < 0); } + + * For the verify macro, the struct _gl_verify_type will need to + somehow be embedded into a declaration. To be portable, this + declaration must declare an object, a constant, a function, or a + typedef name. If the declared entity uses the type directly, + such as in + + struct dummy {...}; + typedef struct {...} dummy; + extern struct {...} *dummy; + extern void dummy (struct {...} *); + extern struct {...} *dummy (void); + + two uses of the verify macro would yield colliding declarations + if the entity names are not disambiguated. A workaround is to + attach the current line number to the entity name: + + #define _GL_CONCAT0(x, y) x##y + #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) + extern struct {...} * _GL_CONCAT (dummy, __LINE__); + + But this has the problem that two invocations of verify from + within the same macro would collide, since the __LINE__ value + would be the same for both invocations. (The GCC __COUNTER__ + macro solves this problem, but is not portable.) + + A solution is to use the sizeof operator. It yields a number, + getting rid of the identity of the type. Declarations like + + extern int dummy [sizeof (struct {...})]; + extern void dummy (int [sizeof (struct {...})]); + extern int (*dummy (void)) [sizeof (struct {...})]; + + can be repeated. + + * Should the implementation use a named struct or an unnamed struct? + Which of the following alternatives can be used? + + extern int dummy [sizeof (struct {...})]; + extern int dummy [sizeof (struct _gl_verify_type {...})]; + extern void dummy (int [sizeof (struct {...})]); + extern void dummy (int [sizeof (struct _gl_verify_type {...})]); + extern int (*dummy (void)) [sizeof (struct {...})]; + extern int (*dummy (void)) [sizeof (struct _gl_verify_type {...})]; + + In the second and sixth case, the struct type is exported to the + outer scope; two such declarations therefore collide. GCC warns + about the first, third, and fourth cases. So the only remaining + possibility is the fifth case: + + extern int (*dummy (void)) [sizeof (struct {...})]; + + * GCC warns about duplicate declarations of the dummy function if + -Wredundant-decls is used. GCC 4.3 and later have a builtin + __COUNTER__ macro that can let us generate unique identifiers for + each dummy function, to suppress this warning. + + * This implementation exploits the fact that older versions of GCC, + which do not support _Static_assert, also do not warn about the + last declaration mentioned above. + + * GCC warns if -Wnested-externs is enabled and verify() is used + within a function body; but inside a function, you can always + arrange to use verify_expr() instead. + + * In C++, any struct definition inside sizeof is invalid. + Use a template type to work around the problem. */ + +/* Concatenate two preprocessor tokens. */ +#define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) +#define _GL_CONCAT0(x, y) x##y + +/* _GL_COUNTER is an integer, preferably one that changes each time we + use it. Use __COUNTER__ if it works, falling back on __LINE__ + otherwise. __LINE__ isn't perfect, but it's better than a + constant. */ +#if defined __COUNTER__ && __COUNTER__ != __COUNTER__ +# define _GL_COUNTER __COUNTER__ +#else +# define _GL_COUNTER __LINE__ +#endif + +/* Generate a symbol with the given prefix, making it unique if + possible. */ +#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) + +/* Verify requirement R at compile-time, as an integer constant expression + that returns 1. If R is false, fail at compile-time, preferably + with a diagnostic that includes the string-literal DIAGNOSTIC. */ + +#define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \ + (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC))) + +#ifdef __cplusplus +# if !GNULIB_defined_struct__gl_verify_type +template <int w> + struct _gl_verify_type { + unsigned int _gl_verify_error_if_negative: w; + }; +# define GNULIB_defined_struct__gl_verify_type 1 +# endif +# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ + _gl_verify_type<(R) ? 1 : -1> +#elif defined _GL_HAVE__STATIC_ASSERT +# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ + struct { \ + _Static_assert (R, DIAGNOSTIC); \ + int _gl_dummy; \ + } +#else +# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ + struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; } +#endif + +/* Verify requirement R at compile-time, as a declaration without a + trailing ';'. If R is false, fail at compile-time, preferably + with a diagnostic that includes the string-literal DIAGNOSTIC. + + Unfortunately, unlike C11, this implementation must appear as an + ordinary declaration, and cannot appear inside struct { ... }. */ + +#ifdef _GL_HAVE__STATIC_ASSERT +# define _GL_VERIFY _Static_assert +#else +# define _GL_VERIFY(R, DIAGNOSTIC) \ + extern int (*_GL_GENSYM (_gl_verify_function) (void)) \ + [_GL_VERIFY_TRUE (R, DIAGNOSTIC)] +#endif + +/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ +#ifdef _GL_STATIC_ASSERT_H +# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert +# define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC) +# endif +# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert +# define static_assert _Static_assert /* C11 requires this #define. */ +# endif +#endif + +/* @assert.h omit start@ */ + +/* Each of these macros verifies that its argument R is nonzero. To + be portable, R should be an integer constant expression. Unlike + assert (R), there is no run-time overhead. + + There are two macros, since no single macro can be used in all + contexts in C. verify_true (R) is for scalar contexts, including + integer constant expression contexts. verify (R) is for declaration + contexts, e.g., the top level. */ + +/* Verify requirement R at compile-time, as an integer constant expression. + Return 1. This is equivalent to verify_expr (R, 1). + + verify_true is obsolescent; please use verify_expr instead. */ + +#define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")") + +/* Verify requirement R at compile-time. Return the value of the + expression E. */ + +#define verify_expr(R, E) \ + (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E)) + +/* Verify requirement R at compile-time, as a declaration without a + trailing ';'. */ + +#define verify(R) _GL_VERIFY (R, "verify (" #R ")") + +#ifndef __has_builtin +# define __has_builtin(x) 0 +#endif + +/* Assume that R always holds. This lets the compiler optimize + accordingly. R should not have side-effects; it may or may not be + evaluated. Behavior is undefined if R is false. */ + +#if (__has_builtin (__builtin_unreachable) \ + || 4 < __GNUC__ + (5 <= __GNUC_MINOR__)) +# define assume(R) ((R) ? (void) 0 : __builtin_unreachable ()) +#elif 1200 <= _MSC_VER +# define assume(R) __assume (R) +#elif (defined lint \ + && (__has_builtin (__builtin_trap) \ + || 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__)))) + /* Doing it this way helps various packages when configured with + --enable-gcc-warnings, which compiles with -Dlint. It's nicer + when 'assume' silences warnings even with older GCCs. */ +# define assume(R) ((R) ? (void) 0 : __builtin_trap ()) +#else +# define assume(R) ((void) (0 && (R))) +#endif + +/* @assert.h omit end@ */ + +#endif diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/wprintf-parse.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/wprintf-parse.h new file mode 100755 index 00000000..73d828cf --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/wprintf-parse.h @@ -0,0 +1,85 @@ +/* Parse printf format string. + Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2011, 2015-2016 Free + Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _WPRINTF_PARSE_H +#define _WPRINTF_PARSE_H + +#if HAVE_FEATURES_H +# include <features.h> /* for __GLIBC__, __UCLIBC__ */ +#endif + +#include "printf-args.h" + + +/* Flags */ +#define FLAG_GROUP 1 /* ' flag */ +#define FLAG_LEFT 2 /* - flag */ +#define FLAG_SHOWSIGN 4 /* + flag */ +#define FLAG_SPACE 8 /* space flag */ +#define FLAG_ALT 16 /* # flag */ +#define FLAG_ZERO 32 +#if __GLIBC__ >= 2 && !defined __UCLIBC__ +# define FLAG_LOCALIZED 64 /* I flag, uses localized digits */ +#endif + +/* arg_index value indicating that no argument is consumed. */ +#define ARG_NONE (~(size_t)0) + +/* Number of directly allocated directives (no malloc() needed). */ +#define N_DIRECT_ALLOC_DIRECTIVES 7 + +/* A parsed directive. */ +typedef struct +{ + const wchar_t* dir_start; + const wchar_t* dir_end; + int flags; + const wchar_t* width_start; + const wchar_t* width_end; + size_t width_arg_index; + const wchar_t* precision_start; + const wchar_t* precision_end; + size_t precision_arg_index; + wchar_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ + size_t arg_index; +} +wchar_t_directive; + +/* A parsed format string. */ +typedef struct +{ + size_t count; + wchar_t_directive *dir; + size_t max_width_length; + size_t max_precision_length; + wchar_t_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; +} +wchar_t_directives; + + +/* Parses the format string. Fills in the number N of directives, and fills + in directives[0], ..., directives[N-1], and sets directives[N].dir_start + to the end of the format string. Also fills in the arg_type fields of the + arguments and the needed count of arguments. */ +#ifdef STATIC +STATIC +#else +extern +#endif +int wprintf_parse (const wchar_t *format, wchar_t_directives *d, arguments *a); + +#endif /* _WPRINTF_PARSE_H */ diff --git a/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/xsize.h b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/xsize.h new file mode 100755 index 00000000..c82712d3 --- /dev/null +++ b/frameworks/cairosvg/dependencies/gettext/0.19.8.1/share/gettext/intl/xsize.h @@ -0,0 +1,117 @@ +/* xsize.h -- Checked size_t computations. + + Copyright (C) 2003, 2008-2016 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _XSIZE_H +#define _XSIZE_H + +/* Get size_t. */ +#include <stddef.h> + +/* Get SIZE_MAX. */ +#include <limits.h> +#if HAVE_STDINT_H +# include <stdint.h> +#endif + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef XSIZE_INLINE +# define XSIZE_INLINE _GL_INLINE +#endif + +/* The size of memory objects is often computed through expressions of + type size_t. Example: + void* p = malloc (header_size + n * element_size). + These computations can lead to overflow. When this happens, malloc() + returns a piece of memory that is way too small, and the program then + crashes while attempting to fill the memory. + To avoid this, the functions and macros in this file check for overflow. + The convention is that SIZE_MAX represents overflow. + malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc + implementation that uses mmap --, it's recommended to use size_overflow_p() + or size_in_bounds_p() before invoking malloc(). + The example thus becomes: + size_t size = xsum (header_size, xtimes (n, element_size)); + void *p = (size_in_bounds_p (size) ? malloc (size) : NULL); +*/ + +/* Convert an arbitrary value >= 0 to type size_t. */ +#define xcast_size_t(N) \ + ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX) + +/* Sum of two sizes, with overflow check. */ +XSIZE_INLINE size_t +#if __GNUC__ >= 3 +__attribute__ ((__pure__)) +#endif +xsum (size_t size1, size_t size2) +{ + size_t sum = size1 + size2; + return (sum >= size1 ? sum : SIZE_MAX); +} + +/* Sum of three sizes, with overflow check. */ +XSIZE_INLINE size_t +#if __GNUC__ >= 3 +__attribute__ ((__pure__)) +#endif +xsum3 (size_t size1, size_t size2, size_t size3) +{ + return xsum (xsum (size1, size2), size3); +} + +/* Sum of four sizes, with overflow check. */ +XSIZE_INLINE size_t +#if __GNUC__ >= 3 +__attribute__ ((__pure__)) +#endif +xsum4 (size_t size1, size_t size2, size_t size3, size_t size4) +{ + return xsum (xsum (xsum (size1, size2), size3), size4); +} + +/* Maximum of two sizes, with overflow check. */ +XSIZE_INLINE size_t +#if __GNUC__ >= 3 +__attribute__ ((__pure__)) +#endif +xmax (size_t size1, size_t size2) +{ + /* No explicit check is needed here, because for any n: + max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */ + return (size1 >= size2 ? size1 : size2); +} + +/* Multiplication of a count with an element size, with overflow check. + The count must be >= 0 and the element size must be > 0. + This is a macro, not a function, so that it works correctly even + when N is of a wider type and N > SIZE_MAX. */ +#define xtimes(N, ELSIZE) \ + ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX) + +/* Check for overflow. */ +#define size_overflow_p(SIZE) \ + ((SIZE) == SIZE_MAX) +/* Check against overflow. */ +#define size_in_bounds_p(SIZE) \ + ((SIZE) != SIZE_MAX) + +_GL_INLINE_HEADER_END + +#endif /* _XSIZE_H */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gdesktopappinfo.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gdesktopappinfo.h new file mode 100755 index 00000000..a2df3dd5 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gdesktopappinfo.h @@ -0,0 +1,180 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_DESKTOP_APP_INFO_H__ +#define __G_DESKTOP_APP_INFO_H__ + +#include <gio/gio.h> + +G_BEGIN_DECLS + +#define G_TYPE_DESKTOP_APP_INFO (g_desktop_app_info_get_type ()) +#define G_DESKTOP_APP_INFO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DESKTOP_APP_INFO, GDesktopAppInfo)) +#define G_DESKTOP_APP_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DESKTOP_APP_INFO, GDesktopAppInfoClass)) +#define G_IS_DESKTOP_APP_INFO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DESKTOP_APP_INFO)) +#define G_IS_DESKTOP_APP_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DESKTOP_APP_INFO)) +#define G_DESKTOP_APP_INFO_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DESKTOP_APP_INFO, GDesktopAppInfoClass)) + +typedef struct _GDesktopAppInfo GDesktopAppInfo; +typedef struct _GDesktopAppInfoClass GDesktopAppInfoClass; + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDesktopAppInfo, g_object_unref) + +struct _GDesktopAppInfoClass +{ + GObjectClass parent_class; +}; + + +GLIB_AVAILABLE_IN_ALL +GType g_desktop_app_info_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GDesktopAppInfo *g_desktop_app_info_new_from_filename (const char *filename); +GLIB_AVAILABLE_IN_ALL +GDesktopAppInfo *g_desktop_app_info_new_from_keyfile (GKeyFile *key_file); + +GLIB_AVAILABLE_IN_ALL +const char * g_desktop_app_info_get_filename (GDesktopAppInfo *info); + +GLIB_AVAILABLE_IN_2_30 +const char * g_desktop_app_info_get_generic_name (GDesktopAppInfo *info); +GLIB_AVAILABLE_IN_2_30 +const char * g_desktop_app_info_get_categories (GDesktopAppInfo *info); +GLIB_AVAILABLE_IN_2_30 +const char * const *g_desktop_app_info_get_keywords (GDesktopAppInfo *info); +GLIB_AVAILABLE_IN_2_30 +gboolean g_desktop_app_info_get_nodisplay (GDesktopAppInfo *info); +GLIB_AVAILABLE_IN_2_30 +gboolean g_desktop_app_info_get_show_in (GDesktopAppInfo *info, + const gchar *desktop_env); +GLIB_AVAILABLE_IN_2_34 +const char * g_desktop_app_info_get_startup_wm_class (GDesktopAppInfo *info); + +GLIB_AVAILABLE_IN_ALL +GDesktopAppInfo *g_desktop_app_info_new (const char *desktop_id); +GLIB_AVAILABLE_IN_ALL +gboolean g_desktop_app_info_get_is_hidden (GDesktopAppInfo *info); + +GLIB_DEPRECATED_IN_2_42 +void g_desktop_app_info_set_desktop_env (const char *desktop_env); + +GLIB_AVAILABLE_IN_2_36 +gboolean g_desktop_app_info_has_key (GDesktopAppInfo *info, + const char *key); +GLIB_AVAILABLE_IN_2_36 +char * g_desktop_app_info_get_string (GDesktopAppInfo *info, + const char *key); +GLIB_AVAILABLE_IN_2_56 +char * g_desktop_app_info_get_locale_string (GDesktopAppInfo *info, + const char *key); +GLIB_AVAILABLE_IN_2_36 +gboolean g_desktop_app_info_get_boolean (GDesktopAppInfo *info, + const char *key); + +GLIB_AVAILABLE_IN_2_38 +const gchar * const * g_desktop_app_info_list_actions (GDesktopAppInfo *info); + +GLIB_AVAILABLE_IN_2_38 +void g_desktop_app_info_launch_action (GDesktopAppInfo *info, + const gchar *action_name, + GAppLaunchContext *launch_context); + +GLIB_AVAILABLE_IN_2_38 +gchar * g_desktop_app_info_get_action_name (GDesktopAppInfo *info, + const gchar *action_name); + +#ifndef G_DISABLE_DEPRECATED + +#define G_TYPE_DESKTOP_APP_INFO_LOOKUP (g_desktop_app_info_lookup_get_type ()) +#define G_DESKTOP_APP_INFO_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP, GDesktopAppInfoLookup)) +#define G_IS_DESKTOP_APP_INFO_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP)) +#define G_DESKTOP_APP_INFO_LOOKUP_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP, GDesktopAppInfoLookupIface)) + +/** + * G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME: + * + * Extension point for default handler to URI association. See + * [Extending GIO][extending-gio]. + */ +#define G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME "gio-desktop-app-info-lookup" + +#endif /* G_DISABLE_DEPRECATED */ + +/** + * GDesktopAppInfoLookupIface: + * @get_default_for_uri_scheme: Virtual method for + * g_desktop_app_info_lookup_get_default_for_uri_scheme(). + * + * Interface that is used by backends to associate default + * handlers with URI schemes. + */ +typedef struct _GDesktopAppInfoLookup GDesktopAppInfoLookup; +typedef struct _GDesktopAppInfoLookupIface GDesktopAppInfoLookupIface; + +struct _GDesktopAppInfoLookupIface +{ + GTypeInterface g_iface; + + GAppInfo * (* get_default_for_uri_scheme) (GDesktopAppInfoLookup *lookup, + const char *uri_scheme); +}; + +GLIB_DEPRECATED +GType g_desktop_app_info_lookup_get_type (void) G_GNUC_CONST; + +GLIB_DEPRECATED +GAppInfo *g_desktop_app_info_lookup_get_default_for_uri_scheme (GDesktopAppInfoLookup *lookup, + const char *uri_scheme); + +/** + * GDesktopAppLaunchCallback: + * @appinfo: a #GDesktopAppInfo + * @pid: Process identifier + * @user_data: User data + * + * During invocation, g_desktop_app_info_launch_uris_as_manager() may + * create one or more child processes. This callback is invoked once + * for each, providing the process ID. + */ +typedef void (*GDesktopAppLaunchCallback) (GDesktopAppInfo *appinfo, + GPid pid, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_28 +gboolean g_desktop_app_info_launch_uris_as_manager (GDesktopAppInfo *appinfo, + GList *uris, + GAppLaunchContext *launch_context, + GSpawnFlags spawn_flags, + GSpawnChildSetupFunc user_setup, + gpointer user_setup_data, + GDesktopAppLaunchCallback pid_callback, + gpointer pid_callback_data, + GError **error); + +GLIB_AVAILABLE_IN_2_40 +gchar *** g_desktop_app_info_search (const gchar *search_string); + +GLIB_AVAILABLE_IN_2_42 +GList *g_desktop_app_info_get_implementations (const gchar *interface); + +G_END_DECLS + +#endif /* __G_DESKTOP_APP_INFO_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gfiledescriptorbased.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gfiledescriptorbased.h new file mode 100755 index 00000000..1709c5f0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gfiledescriptorbased.h @@ -0,0 +1,66 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Christian Kellner + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Christian Kellner <gicmo@gnome.org> + */ + +#ifndef __G_FILE_DESCRIPTOR_BASED_H__ +#define __G_FILE_DESCRIPTOR_BASED_H__ + +#include <gio/gio.h> + +G_BEGIN_DECLS + +#define G_TYPE_FILE_DESCRIPTOR_BASED (g_file_descriptor_based_get_type ()) +#define G_FILE_DESCRIPTOR_BASED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_FILE_DESCRIPTOR_BASED, GFileDescriptorBased)) +#define G_IS_FILE_DESCRIPTOR_BASED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_FILE_DESCRIPTOR_BASED)) +#define G_FILE_DESCRIPTOR_BASED_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_FILE_DESCRIPTOR_BASED, GFileDescriptorBasedIface)) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileDescriptorBased, g_object_unref) + +/** + * GFileDescriptorBased: + * + * An interface for file descriptor based io objects. + **/ +typedef struct _GFileDescriptorBasedIface GFileDescriptorBasedIface; + +/** + * GFileDescriptorBasedIface: + * @g_iface: The parent interface. + * @get_fd: Gets the underlying file descriptor. + * + * An interface for file descriptor based io objects. + **/ +struct _GFileDescriptorBasedIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + int (*get_fd) (GFileDescriptorBased *fd_based); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_file_descriptor_based_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +int g_file_descriptor_based_get_fd (GFileDescriptorBased *fd_based); + +G_END_DECLS + + +#endif /* __G_FILE_DESCRIPTOR_BASED_H__ */ + diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixconnection.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixconnection.h new file mode 100755 index 00000000..620c72b9 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixconnection.h @@ -0,0 +1,100 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2009 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_UNIX_CONNECTION_H__ +#define __G_UNIX_CONNECTION_H__ + +#include <gio/gio.h> + +G_BEGIN_DECLS + +#define G_TYPE_UNIX_CONNECTION (g_unix_connection_get_type ()) +#define G_UNIX_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_UNIX_CONNECTION, GUnixConnection)) +#define G_UNIX_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_UNIX_CONNECTION, GUnixConnectionClass)) +#define G_IS_UNIX_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_UNIX_CONNECTION)) +#define G_IS_UNIX_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_UNIX_CONNECTION)) +#define G_UNIX_CONNECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_UNIX_CONNECTION, GUnixConnectionClass)) + +typedef struct _GUnixConnection GUnixConnection; +typedef struct _GUnixConnectionPrivate GUnixConnectionPrivate; +typedef struct _GUnixConnectionClass GUnixConnectionClass; + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixConnection, g_object_unref) + +struct _GUnixConnectionClass +{ + GSocketConnectionClass parent_class; +}; + +struct _GUnixConnection +{ + GSocketConnection parent_instance; + GUnixConnectionPrivate *priv; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_unix_connection_get_type (void); + +GLIB_AVAILABLE_IN_ALL +gboolean g_unix_connection_send_fd (GUnixConnection *connection, + gint fd, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gint g_unix_connection_receive_fd (GUnixConnection *connection, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_unix_connection_send_credentials (GUnixConnection *connection, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_2_32 +void g_unix_connection_send_credentials_async (GUnixConnection *connection, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_2_32 +gboolean g_unix_connection_send_credentials_finish (GUnixConnection *connection, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_2_32 +GCredentials *g_unix_connection_receive_credentials (GUnixConnection *connection, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_2_32 +void g_unix_connection_receive_credentials_async (GUnixConnection *connection, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GCredentials *g_unix_connection_receive_credentials_finish (GUnixConnection *connection, + GAsyncResult *result, + GError **error); + +G_END_DECLS + +#endif /* __G_UNIX_CONNECTION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixcredentialsmessage.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixcredentialsmessage.h new file mode 100755 index 00000000..2f3ad758 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixcredentialsmessage.h @@ -0,0 +1,87 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Red Hat, Inc. + * Copyright (C) 2009 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_UNIX_CREDENTIALS_MESSAGE_H__ +#define __G_UNIX_CREDENTIALS_MESSAGE_H__ + +#include <gio/gio.h> + +G_BEGIN_DECLS + +#define G_TYPE_UNIX_CREDENTIALS_MESSAGE (g_unix_credentials_message_get_type ()) +#define G_UNIX_CREDENTIALS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_CREDENTIALS_MESSAGE, GUnixCredentialsMessage)) +#define G_UNIX_CREDENTIALS_MESSAGE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), G_TYPE_UNIX_CREDENTIALS_MESSAGE, GUnixCredentialsMessageClass)) +#define G_IS_UNIX_CREDENTIALS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_CREDENTIALS_MESSAGE)) +#define G_IS_UNIX_CREDENTIALS_MESSAGE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), G_TYPE_UNIX_CREDENTIALS_MESSAGE)) +#define G_UNIX_CREDENTIALS_MESSAGE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_UNIX_CREDENTIALS_MESSAGE, GUnixCredentialsMessageClass)) + +typedef struct _GUnixCredentialsMessagePrivate GUnixCredentialsMessagePrivate; +typedef struct _GUnixCredentialsMessageClass GUnixCredentialsMessageClass; + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixCredentialsMessage, g_object_unref) + +/** + * GUnixCredentialsMessageClass: + * + * Class structure for #GUnixCredentialsMessage. + * + * Since: 2.26 + */ +struct _GUnixCredentialsMessageClass +{ + GSocketControlMessageClass parent_class; + + /*< private >*/ + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); +}; + +/** + * GUnixCredentialsMessage: + * + * The #GUnixCredentialsMessage structure contains only private data + * and should only be accessed using the provided API. + * + * Since: 2.26 + */ +struct _GUnixCredentialsMessage +{ + GSocketControlMessage parent_instance; + GUnixCredentialsMessagePrivate *priv; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_unix_credentials_message_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GSocketControlMessage *g_unix_credentials_message_new (void); +GLIB_AVAILABLE_IN_ALL +GSocketControlMessage *g_unix_credentials_message_new_with_credentials (GCredentials *credentials); +GLIB_AVAILABLE_IN_ALL +GCredentials *g_unix_credentials_message_get_credentials (GUnixCredentialsMessage *message); + +GLIB_AVAILABLE_IN_ALL +gboolean g_unix_credentials_message_is_supported (void); + +G_END_DECLS + +#endif /* __G_UNIX_CREDENTIALS_MESSAGE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixfdlist.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixfdlist.h new file mode 100755 index 00000000..9d3204a7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixfdlist.h @@ -0,0 +1,95 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2009 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_UNIX_FD_LIST_H__ +#define __G_UNIX_FD_LIST_H__ + +#include <gio/gio.h> + +G_BEGIN_DECLS + +#define G_TYPE_UNIX_FD_LIST (g_unix_fd_list_get_type ()) +#define G_UNIX_FD_LIST(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_UNIX_FD_LIST, GUnixFDList)) +#define G_UNIX_FD_LIST_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_UNIX_FD_LIST, GUnixFDListClass)) +#define G_IS_UNIX_FD_LIST(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_UNIX_FD_LIST)) +#define G_IS_UNIX_FD_LIST_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_UNIX_FD_LIST)) +#define G_UNIX_FD_LIST_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_UNIX_FD_LIST, GUnixFDListClass)) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixFDList, g_object_unref) + +typedef struct _GUnixFDListPrivate GUnixFDListPrivate; +typedef struct _GUnixFDListClass GUnixFDListClass; + +struct _GUnixFDListClass +{ + GObjectClass parent_class; + + /*< private >*/ + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +struct _GUnixFDList +{ + GObject parent_instance; + GUnixFDListPrivate *priv; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_unix_fd_list_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GUnixFDList * g_unix_fd_list_new (void); +GLIB_AVAILABLE_IN_ALL +GUnixFDList * g_unix_fd_list_new_from_array (const gint *fds, + gint n_fds); + +GLIB_AVAILABLE_IN_ALL +gint g_unix_fd_list_append (GUnixFDList *list, + gint fd, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gint g_unix_fd_list_get_length (GUnixFDList *list); + +GLIB_AVAILABLE_IN_ALL +gint g_unix_fd_list_get (GUnixFDList *list, + gint index_, + GError **error); + +GLIB_AVAILABLE_IN_ALL +const gint * g_unix_fd_list_peek_fds (GUnixFDList *list, + gint *length); + +GLIB_AVAILABLE_IN_ALL +gint * g_unix_fd_list_steal_fds (GUnixFDList *list, + gint *length); + +G_END_DECLS + +#endif /* __G_UNIX_FD_LIST_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixfdmessage.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixfdmessage.h new file mode 100755 index 00000000..c766e2a6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixfdmessage.h @@ -0,0 +1,84 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2009 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_UNIX_FD_MESSAGE_H__ +#define __G_UNIX_FD_MESSAGE_H__ + +#include <gio/gio.h> +#include <gio/gunixfdlist.h> + +G_BEGIN_DECLS + +#define G_TYPE_UNIX_FD_MESSAGE (g_unix_fd_message_get_type ()) +#define G_UNIX_FD_MESSAGE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_UNIX_FD_MESSAGE, GUnixFDMessage)) +#define G_UNIX_FD_MESSAGE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_UNIX_FD_MESSAGE, GUnixFDMessageClass)) +#define G_IS_UNIX_FD_MESSAGE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_UNIX_FD_MESSAGE)) +#define G_IS_UNIX_FD_MESSAGE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_UNIX_FD_MESSAGE)) +#define G_UNIX_FD_MESSAGE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_UNIX_FD_MESSAGE, GUnixFDMessageClass)) + +typedef struct _GUnixFDMessagePrivate GUnixFDMessagePrivate; +typedef struct _GUnixFDMessageClass GUnixFDMessageClass; +typedef struct _GUnixFDMessage GUnixFDMessage; + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixFDMessage, g_object_unref) + +struct _GUnixFDMessageClass +{ + GSocketControlMessageClass parent_class; + + /*< private >*/ + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); +}; + +struct _GUnixFDMessage +{ + GSocketControlMessage parent_instance; + GUnixFDMessagePrivate *priv; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_unix_fd_message_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GSocketControlMessage * g_unix_fd_message_new_with_fd_list (GUnixFDList *fd_list); +GLIB_AVAILABLE_IN_ALL +GSocketControlMessage * g_unix_fd_message_new (void); + +GLIB_AVAILABLE_IN_ALL +GUnixFDList * g_unix_fd_message_get_fd_list (GUnixFDMessage *message); + +GLIB_AVAILABLE_IN_ALL +gint * g_unix_fd_message_steal_fds (GUnixFDMessage *message, + gint *length); +GLIB_AVAILABLE_IN_ALL +gboolean g_unix_fd_message_append_fd (GUnixFDMessage *message, + gint fd, + GError **error); + +G_END_DECLS + +#endif /* __G_UNIX_FD_MESSAGE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixinputstream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixinputstream.h new file mode 100755 index 00000000..1fba553b --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixinputstream.h @@ -0,0 +1,83 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_UNIX_INPUT_STREAM_H__ +#define __G_UNIX_INPUT_STREAM_H__ + +#include <gio/gio.h> + +G_BEGIN_DECLS + +#define G_TYPE_UNIX_INPUT_STREAM (g_unix_input_stream_get_type ()) +#define G_UNIX_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_INPUT_STREAM, GUnixInputStream)) +#define G_UNIX_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_INPUT_STREAM, GUnixInputStreamClass)) +#define G_IS_UNIX_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_INPUT_STREAM)) +#define G_IS_UNIX_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_UNIX_INPUT_STREAM)) +#define G_UNIX_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_UNIX_INPUT_STREAM, GUnixInputStreamClass)) + +/** + * GUnixInputStream: + * + * Implements #GInputStream for reading from selectable unix file descriptors + **/ +typedef struct _GUnixInputStream GUnixInputStream; +typedef struct _GUnixInputStreamClass GUnixInputStreamClass; +typedef struct _GUnixInputStreamPrivate GUnixInputStreamPrivate; + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixInputStream, g_object_unref) + +struct _GUnixInputStream +{ + GInputStream parent_instance; + + /*< private >*/ + GUnixInputStreamPrivate *priv; +}; + +struct _GUnixInputStreamClass +{ + GInputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_unix_input_stream_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GInputStream * g_unix_input_stream_new (gint fd, + gboolean close_fd); +GLIB_AVAILABLE_IN_ALL +void g_unix_input_stream_set_close_fd (GUnixInputStream *stream, + gboolean close_fd); +GLIB_AVAILABLE_IN_ALL +gboolean g_unix_input_stream_get_close_fd (GUnixInputStream *stream); +GLIB_AVAILABLE_IN_ALL +gint g_unix_input_stream_get_fd (GUnixInputStream *stream); + +G_END_DECLS + +#endif /* __G_UNIX_INPUT_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixmounts.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixmounts.h new file mode 100755 index 00000000..04d6b072 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixmounts.h @@ -0,0 +1,163 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_UNIX_MOUNTS_H__ +#define __G_UNIX_MOUNTS_H__ + +#include <gio/gio.h> + +G_BEGIN_DECLS + +/** + * GUnixMountEntry: + * + * Defines a Unix mount entry (e.g. <filename>/media/cdrom</filename>). + * This corresponds roughly to a mtab entry. + **/ +typedef struct _GUnixMountEntry GUnixMountEntry; + +#define G_TYPE_UNIX_MOUNT_ENTRY (g_unix_mount_entry_get_type ()) +GLIB_AVAILABLE_IN_2_54 +GType g_unix_mount_entry_get_type (void) G_GNUC_CONST; + +/** + * GUnixMountPoint: + * + * Defines a Unix mount point (e.g. <filename>/dev</filename>). + * This corresponds roughly to a fstab entry. + **/ +typedef struct _GUnixMountPoint GUnixMountPoint; + +#define G_TYPE_UNIX_MOUNT_POINT (g_unix_mount_point_get_type ()) +GLIB_AVAILABLE_IN_2_54 +GType g_unix_mount_point_get_type (void) G_GNUC_CONST; + +/** + * GUnixMountMonitor: + * + * Watches #GUnixMounts for changes. + **/ +typedef struct _GUnixMountMonitor GUnixMountMonitor; +typedef struct _GUnixMountMonitorClass GUnixMountMonitorClass; + +#define G_TYPE_UNIX_MOUNT_MONITOR (g_unix_mount_monitor_get_type ()) +#define G_UNIX_MOUNT_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_MOUNT_MONITOR, GUnixMountMonitor)) +#define G_UNIX_MOUNT_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_MOUNT_MONITOR, GUnixMountMonitorClass)) +#define G_IS_UNIX_MOUNT_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_MOUNT_MONITOR)) +#define G_IS_UNIX_MOUNT_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_UNIX_MOUNT_MONITOR)) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixMountMonitor, g_object_unref) + +GLIB_AVAILABLE_IN_ALL +void g_unix_mount_free (GUnixMountEntry *mount_entry); +GLIB_AVAILABLE_IN_2_54 +GUnixMountEntry *g_unix_mount_copy (GUnixMountEntry *mount_entry); +GLIB_AVAILABLE_IN_ALL +void g_unix_mount_point_free (GUnixMountPoint *mount_point); +GLIB_AVAILABLE_IN_2_54 +GUnixMountPoint *g_unix_mount_point_copy (GUnixMountPoint *mount_point); +GLIB_AVAILABLE_IN_ALL +gint g_unix_mount_compare (GUnixMountEntry *mount1, + GUnixMountEntry *mount2); +GLIB_AVAILABLE_IN_ALL +const char * g_unix_mount_get_mount_path (GUnixMountEntry *mount_entry); +GLIB_AVAILABLE_IN_ALL +const char * g_unix_mount_get_device_path (GUnixMountEntry *mount_entry); +GLIB_AVAILABLE_IN_ALL +const char * g_unix_mount_get_fs_type (GUnixMountEntry *mount_entry); +GLIB_AVAILABLE_IN_ALL +gboolean g_unix_mount_is_readonly (GUnixMountEntry *mount_entry); +GLIB_AVAILABLE_IN_ALL +gboolean g_unix_mount_is_system_internal (GUnixMountEntry *mount_entry); +GLIB_AVAILABLE_IN_ALL +gboolean g_unix_mount_guess_can_eject (GUnixMountEntry *mount_entry); +GLIB_AVAILABLE_IN_ALL +gboolean g_unix_mount_guess_should_display (GUnixMountEntry *mount_entry); +GLIB_AVAILABLE_IN_ALL +char * g_unix_mount_guess_name (GUnixMountEntry *mount_entry); +GLIB_AVAILABLE_IN_ALL +GIcon * g_unix_mount_guess_icon (GUnixMountEntry *mount_entry); +GLIB_AVAILABLE_IN_ALL +GIcon * g_unix_mount_guess_symbolic_icon (GUnixMountEntry *mount_entry); + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixMountEntry, g_unix_mount_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixMountPoint, g_unix_mount_point_free) + +GLIB_AVAILABLE_IN_ALL +gint g_unix_mount_point_compare (GUnixMountPoint *mount1, + GUnixMountPoint *mount2); +GLIB_AVAILABLE_IN_ALL +const char * g_unix_mount_point_get_mount_path (GUnixMountPoint *mount_point); +GLIB_AVAILABLE_IN_ALL +const char * g_unix_mount_point_get_device_path (GUnixMountPoint *mount_point); +GLIB_AVAILABLE_IN_ALL +const char * g_unix_mount_point_get_fs_type (GUnixMountPoint *mount_point); +GLIB_AVAILABLE_IN_2_32 +const char * g_unix_mount_point_get_options (GUnixMountPoint *mount_point); +GLIB_AVAILABLE_IN_ALL +gboolean g_unix_mount_point_is_readonly (GUnixMountPoint *mount_point); +GLIB_AVAILABLE_IN_ALL +gboolean g_unix_mount_point_is_user_mountable (GUnixMountPoint *mount_point); +GLIB_AVAILABLE_IN_ALL +gboolean g_unix_mount_point_is_loopback (GUnixMountPoint *mount_point); +GLIB_AVAILABLE_IN_ALL +gboolean g_unix_mount_point_guess_can_eject (GUnixMountPoint *mount_point); +GLIB_AVAILABLE_IN_ALL +char * g_unix_mount_point_guess_name (GUnixMountPoint *mount_point); +GLIB_AVAILABLE_IN_ALL +GIcon * g_unix_mount_point_guess_icon (GUnixMountPoint *mount_point); +GLIB_AVAILABLE_IN_ALL +GIcon * g_unix_mount_point_guess_symbolic_icon (GUnixMountPoint *mount_point); + + +GLIB_AVAILABLE_IN_ALL +GList * g_unix_mount_points_get (guint64 *time_read); +GLIB_AVAILABLE_IN_ALL +GList * g_unix_mounts_get (guint64 *time_read); +GLIB_AVAILABLE_IN_ALL +GUnixMountEntry *g_unix_mount_at (const char *mount_path, + guint64 *time_read); +GLIB_AVAILABLE_IN_2_52 +GUnixMountEntry *g_unix_mount_for (const char *file_path, + guint64 *time_read); +GLIB_AVAILABLE_IN_ALL +gboolean g_unix_mounts_changed_since (guint64 time); +GLIB_AVAILABLE_IN_ALL +gboolean g_unix_mount_points_changed_since (guint64 time); + +GLIB_AVAILABLE_IN_ALL +GType g_unix_mount_monitor_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_2_44 +GUnixMountMonitor *g_unix_mount_monitor_get (void); +GLIB_DEPRECATED_IN_2_44_FOR(g_unix_mount_monitor_get) +GUnixMountMonitor *g_unix_mount_monitor_new (void); +GLIB_DEPRECATED_IN_2_44 +void g_unix_mount_monitor_set_rate_limit (GUnixMountMonitor *mount_monitor, + int limit_msec); + +GLIB_AVAILABLE_IN_ALL +gboolean g_unix_is_mount_path_system_internal (const char *mount_path); +GLIB_AVAILABLE_IN_2_56 +gboolean g_unix_is_system_fs_type (const char *fs_type); +GLIB_AVAILABLE_IN_2_56 +gboolean g_unix_is_system_device_path (const char *device_path); + +G_END_DECLS + +#endif /* __G_UNIX_MOUNTS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixoutputstream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixoutputstream.h new file mode 100755 index 00000000..2d1d7688 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixoutputstream.h @@ -0,0 +1,82 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_UNIX_OUTPUT_STREAM_H__ +#define __G_UNIX_OUTPUT_STREAM_H__ + +#include <gio/gio.h> + +G_BEGIN_DECLS + +#define G_TYPE_UNIX_OUTPUT_STREAM (g_unix_output_stream_get_type ()) +#define G_UNIX_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_OUTPUT_STREAM, GUnixOutputStream)) +#define G_UNIX_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_OUTPUT_STREAM, GUnixOutputStreamClass)) +#define G_IS_UNIX_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_OUTPUT_STREAM)) +#define G_IS_UNIX_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_UNIX_OUTPUT_STREAM)) +#define G_UNIX_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_UNIX_OUTPUT_STREAM, GUnixOutputStreamClass)) + +/** + * GUnixOutputStream: + * + * Implements #GOutputStream for outputting to selectable unix file descriptors + **/ +typedef struct _GUnixOutputStream GUnixOutputStream; +typedef struct _GUnixOutputStreamClass GUnixOutputStreamClass; +typedef struct _GUnixOutputStreamPrivate GUnixOutputStreamPrivate; + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixOutputStream, g_object_unref) + +struct _GUnixOutputStream +{ + GOutputStream parent_instance; + + /*< private >*/ + GUnixOutputStreamPrivate *priv; +}; + +struct _GUnixOutputStreamClass +{ + GOutputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_unix_output_stream_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GOutputStream * g_unix_output_stream_new (gint fd, + gboolean close_fd); +GLIB_AVAILABLE_IN_ALL +void g_unix_output_stream_set_close_fd (GUnixOutputStream *stream, + gboolean close_fd); +GLIB_AVAILABLE_IN_ALL +gboolean g_unix_output_stream_get_close_fd (GUnixOutputStream *stream); +GLIB_AVAILABLE_IN_ALL +gint g_unix_output_stream_get_fd (GUnixOutputStream *stream); +G_END_DECLS + +#endif /* __G_UNIX_OUTPUT_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixsocketaddress.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixsocketaddress.h new file mode 100755 index 00000000..1c1df143 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/gio-unix-2.0/gio/gunixsocketaddress.h @@ -0,0 +1,81 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Christian Kellner, Samuel Cormier-Iijima + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Christian Kellner <gicmo@gnome.org> + * Samuel Cormier-Iijima <sciyoshi@gmail.com> + */ + +#ifndef __G_UNIX_SOCKET_ADDRESS_H__ +#define __G_UNIX_SOCKET_ADDRESS_H__ + +#include <gio/gio.h> + +G_BEGIN_DECLS + +#define G_TYPE_UNIX_SOCKET_ADDRESS (g_unix_socket_address_get_type ()) +#define G_UNIX_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_SOCKET_ADDRESS, GUnixSocketAddress)) +#define G_UNIX_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_SOCKET_ADDRESS, GUnixSocketAddressClass)) +#define G_IS_UNIX_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_SOCKET_ADDRESS)) +#define G_IS_UNIX_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_UNIX_SOCKET_ADDRESS)) +#define G_UNIX_SOCKET_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_UNIX_SOCKET_ADDRESS, GUnixSocketAddressClass)) + +typedef struct _GUnixSocketAddress GUnixSocketAddress; +typedef struct _GUnixSocketAddressClass GUnixSocketAddressClass; +typedef struct _GUnixSocketAddressPrivate GUnixSocketAddressPrivate; + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixSocketAddress, g_object_unref) + +struct _GUnixSocketAddress +{ + GSocketAddress parent_instance; + + /*< private >*/ + GUnixSocketAddressPrivate *priv; +}; + +struct _GUnixSocketAddressClass +{ + GSocketAddressClass parent_class; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_unix_socket_address_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GSocketAddress *g_unix_socket_address_new (const gchar *path); +GLIB_DEPRECATED_FOR(g_unix_socket_address_new_with_type) +GSocketAddress *g_unix_socket_address_new_abstract (const gchar *path, + gint path_len); +GLIB_AVAILABLE_IN_ALL +GSocketAddress *g_unix_socket_address_new_with_type (const gchar *path, + gint path_len, + GUnixSocketAddressType type); +GLIB_AVAILABLE_IN_ALL +const char * g_unix_socket_address_get_path (GUnixSocketAddress *address); +GLIB_AVAILABLE_IN_ALL +gsize g_unix_socket_address_get_path_len (GUnixSocketAddress *address); +GLIB_AVAILABLE_IN_ALL +GUnixSocketAddressType g_unix_socket_address_get_address_type (GUnixSocketAddress *address); +GLIB_DEPRECATED +gboolean g_unix_socket_address_get_is_abstract (GUnixSocketAddress *address); + +GLIB_AVAILABLE_IN_ALL +gboolean g_unix_socket_address_abstract_names_supported (void); + +G_END_DECLS + +#endif /* __G_UNIX_SOCKET_ADDRESS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gaction.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gaction.h new file mode 100755 index 00000000..f9f4b38e --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gaction.h @@ -0,0 +1,98 @@ +/* + * Copyright © 2010 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_ACTION_H__ +#define __G_ACTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_ACTION (g_action_get_type ()) +#define G_ACTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_ACTION, GAction)) +#define G_IS_ACTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_ACTION)) +#define G_ACTION_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \ + G_TYPE_ACTION, GActionInterface)) + +typedef struct _GActionInterface GActionInterface; + +struct _GActionInterface +{ + GTypeInterface g_iface; + + /* virtual functions */ + const gchar * (* get_name) (GAction *action); + const GVariantType * (* get_parameter_type) (GAction *action); + const GVariantType * (* get_state_type) (GAction *action); + GVariant * (* get_state_hint) (GAction *action); + + gboolean (* get_enabled) (GAction *action); + GVariant * (* get_state) (GAction *action); + + void (* change_state) (GAction *action, + GVariant *value); + void (* activate) (GAction *action, + GVariant *parameter); +}; + +GLIB_AVAILABLE_IN_2_30 +GType g_action_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +const gchar * g_action_get_name (GAction *action); +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_action_get_parameter_type (GAction *action); +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_action_get_state_type (GAction *action); +GLIB_AVAILABLE_IN_ALL +GVariant * g_action_get_state_hint (GAction *action); + +GLIB_AVAILABLE_IN_ALL +gboolean g_action_get_enabled (GAction *action); +GLIB_AVAILABLE_IN_ALL +GVariant * g_action_get_state (GAction *action); + +GLIB_AVAILABLE_IN_ALL +void g_action_change_state (GAction *action, + GVariant *value); +GLIB_AVAILABLE_IN_ALL +void g_action_activate (GAction *action, + GVariant *parameter); + +GLIB_AVAILABLE_IN_2_28 +gboolean g_action_name_is_valid (const gchar *action_name); + +GLIB_AVAILABLE_IN_2_38 +gboolean g_action_parse_detailed_name (const gchar *detailed_name, + gchar **action_name, + GVariant **target_value, + GError **error); + +GLIB_AVAILABLE_IN_2_38 +gchar * g_action_print_detailed_name (const gchar *action_name, + GVariant *target_value); + +G_END_DECLS + +#endif /* __G_ACTION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gactiongroup.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gactiongroup.h new file mode 100755 index 00000000..bba8a236 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gactiongroup.h @@ -0,0 +1,161 @@ +/* + * Copyright © 2010 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_ACTION_GROUP_H__ +#define __G_ACTION_GROUP_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + + +#define G_TYPE_ACTION_GROUP (g_action_group_get_type ()) +#define G_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_ACTION_GROUP, GActionGroup)) +#define G_IS_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_ACTION_GROUP)) +#define G_ACTION_GROUP_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \ + G_TYPE_ACTION_GROUP, GActionGroupInterface)) + +typedef struct _GActionGroupInterface GActionGroupInterface; + +struct _GActionGroupInterface +{ + GTypeInterface g_iface; + + /* virtual functions */ + gboolean (* has_action) (GActionGroup *action_group, + const gchar *action_name); + + gchar ** (* list_actions) (GActionGroup *action_group); + + gboolean (* get_action_enabled) (GActionGroup *action_group, + const gchar *action_name); + + const GVariantType * (* get_action_parameter_type) (GActionGroup *action_group, + const gchar *action_name); + + const GVariantType * (* get_action_state_type) (GActionGroup *action_group, + const gchar *action_name); + + GVariant * (* get_action_state_hint) (GActionGroup *action_group, + const gchar *action_name); + + GVariant * (* get_action_state) (GActionGroup *action_group, + const gchar *action_name); + + void (* change_action_state) (GActionGroup *action_group, + const gchar *action_name, + GVariant *value); + + void (* activate_action) (GActionGroup *action_group, + const gchar *action_name, + GVariant *parameter); + + /* signals */ + void (* action_added) (GActionGroup *action_group, + const gchar *action_name); + void (* action_removed) (GActionGroup *action_group, + const gchar *action_name); + void (* action_enabled_changed) (GActionGroup *action_group, + const gchar *action_name, + gboolean enabled); + void (* action_state_changed) (GActionGroup *action_group, + const gchar *action_name, + GVariant *state); + + /* more virtual functions */ + gboolean (* query_action) (GActionGroup *action_group, + const gchar *action_name, + gboolean *enabled, + const GVariantType **parameter_type, + const GVariantType **state_type, + GVariant **state_hint, + GVariant **state); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_action_group_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +gboolean g_action_group_has_action (GActionGroup *action_group, + const gchar *action_name); +GLIB_AVAILABLE_IN_ALL +gchar ** g_action_group_list_actions (GActionGroup *action_group); + +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_action_group_get_action_parameter_type (GActionGroup *action_group, + const gchar *action_name); +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_action_group_get_action_state_type (GActionGroup *action_group, + const gchar *action_name); +GLIB_AVAILABLE_IN_ALL +GVariant * g_action_group_get_action_state_hint (GActionGroup *action_group, + const gchar *action_name); + +GLIB_AVAILABLE_IN_ALL +gboolean g_action_group_get_action_enabled (GActionGroup *action_group, + const gchar *action_name); + +GLIB_AVAILABLE_IN_ALL +GVariant * g_action_group_get_action_state (GActionGroup *action_group, + const gchar *action_name); +GLIB_AVAILABLE_IN_ALL +void g_action_group_change_action_state (GActionGroup *action_group, + const gchar *action_name, + GVariant *value); + +GLIB_AVAILABLE_IN_ALL +void g_action_group_activate_action (GActionGroup *action_group, + const gchar *action_name, + GVariant *parameter); + +/* signals */ +GLIB_AVAILABLE_IN_ALL +void g_action_group_action_added (GActionGroup *action_group, + const gchar *action_name); +GLIB_AVAILABLE_IN_ALL +void g_action_group_action_removed (GActionGroup *action_group, + const gchar *action_name); +GLIB_AVAILABLE_IN_ALL +void g_action_group_action_enabled_changed (GActionGroup *action_group, + const gchar *action_name, + gboolean enabled); + +GLIB_AVAILABLE_IN_ALL +void g_action_group_action_state_changed (GActionGroup *action_group, + const gchar *action_name, + GVariant *state); + +GLIB_AVAILABLE_IN_2_32 +gboolean g_action_group_query_action (GActionGroup *action_group, + const gchar *action_name, + gboolean *enabled, + const GVariantType **parameter_type, + const GVariantType **state_type, + GVariant **state_hint, + GVariant **state); + +G_END_DECLS + +#endif /* __G_ACTION_GROUP_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gactiongroupexporter.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gactiongroupexporter.h new file mode 100755 index 00000000..ba28c895 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gactiongroupexporter.h @@ -0,0 +1,45 @@ +/* + * Copyright © 2010 Codethink Limited + * Copyright © 2011 Canonical Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + */ + + +#ifndef __G_ACTION_GROUP_EXPORTER_H__ +#define __G_ACTION_GROUP_EXPORTER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_2_32 +guint g_dbus_connection_export_action_group (GDBusConnection *connection, + const gchar *object_path, + GActionGroup *action_group, + GError **error); + +GLIB_AVAILABLE_IN_2_32 +void g_dbus_connection_unexport_action_group (GDBusConnection *connection, + guint export_id); + +G_END_DECLS + +#endif /* __G_ACTION_GROUP_EXPORTER_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gactionmap.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gactionmap.h new file mode 100755 index 00000000..2a22a277 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gactionmap.h @@ -0,0 +1,95 @@ +/* + * Copyright © 2010 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_ACTION_MAP_H__ +#define __G_ACTION_MAP_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + + +#define G_TYPE_ACTION_MAP (g_action_map_get_type ()) +#define G_ACTION_MAP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_ACTION_MAP, GActionMap)) +#define G_IS_ACTION_MAP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_ACTION_MAP)) +#define G_ACTION_MAP_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \ + G_TYPE_ACTION_MAP, GActionMapInterface)) + +typedef struct _GActionMapInterface GActionMapInterface; +typedef struct _GActionEntry GActionEntry; + +struct _GActionMapInterface +{ + GTypeInterface g_iface; + + GAction * (* lookup_action) (GActionMap *action_map, + const gchar *action_name); + void (* add_action) (GActionMap *action_map, + GAction *action); + void (* remove_action) (GActionMap *action_map, + const gchar *action_name); +}; + +struct _GActionEntry +{ + const gchar *name; + + void (* activate) (GSimpleAction *action, + GVariant *parameter, + gpointer user_data); + + const gchar *parameter_type; + + const gchar *state; + + void (* change_state) (GSimpleAction *action, + GVariant *value, + gpointer user_data); + + /*< private >*/ + gsize padding[3]; +}; + +GLIB_AVAILABLE_IN_2_32 +GType g_action_map_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_32 +GAction * g_action_map_lookup_action (GActionMap *action_map, + const gchar *action_name); +GLIB_AVAILABLE_IN_2_32 +void g_action_map_add_action (GActionMap *action_map, + GAction *action); +GLIB_AVAILABLE_IN_2_32 +void g_action_map_remove_action (GActionMap *action_map, + const gchar *action_name); +GLIB_AVAILABLE_IN_2_32 +void g_action_map_add_action_entries (GActionMap *action_map, + const GActionEntry *entries, + gint n_entries, + gpointer user_data); + +G_END_DECLS + +#endif /* __G_ACTION_MAP_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gappinfo.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gappinfo.h new file mode 100755 index 00000000..4889be92 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gappinfo.h @@ -0,0 +1,324 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_APP_INFO_H__ +#define __G_APP_INFO_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_APP_INFO (g_app_info_get_type ()) +#define G_APP_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_APP_INFO, GAppInfo)) +#define G_IS_APP_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_APP_INFO)) +#define G_APP_INFO_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_APP_INFO, GAppInfoIface)) + +#define G_TYPE_APP_LAUNCH_CONTEXT (g_app_launch_context_get_type ()) +#define G_APP_LAUNCH_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_APP_LAUNCH_CONTEXT, GAppLaunchContext)) +#define G_APP_LAUNCH_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_APP_LAUNCH_CONTEXT, GAppLaunchContextClass)) +#define G_IS_APP_LAUNCH_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_APP_LAUNCH_CONTEXT)) +#define G_IS_APP_LAUNCH_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_APP_LAUNCH_CONTEXT)) +#define G_APP_LAUNCH_CONTEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_APP_LAUNCH_CONTEXT, GAppLaunchContextClass)) + +typedef struct _GAppLaunchContextClass GAppLaunchContextClass; +typedef struct _GAppLaunchContextPrivate GAppLaunchContextPrivate; + +/** + * GAppInfo: + * + * Information about an installed application and methods to launch + * it (with file arguments). + */ + +/** + * GAppInfoIface: + * @g_iface: The parent interface. + * @dup: Copies a #GAppInfo. + * @equal: Checks two #GAppInfos for equality. + * @get_id: Gets a string identifier for a #GAppInfo. + * @get_name: Gets the name of the application for a #GAppInfo. + * @get_description: Gets a short description for the application described by the #GAppInfo. + * @get_executable: Gets the executable name for the #GAppInfo. + * @get_icon: Gets the #GIcon for the #GAppInfo. + * @launch: Launches an application specified by the #GAppInfo. + * @supports_uris: Indicates whether the application specified supports launching URIs. + * @supports_files: Indicates whether the application specified accepts filename arguments. + * @launch_uris: Launches an application with a list of URIs. + * @should_show: Returns whether an application should be shown (e.g. when getting a list of installed applications). + * [FreeDesktop.Org Startup Notification Specification](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt). + * @set_as_default_for_type: Sets an application as default for a given content type. + * @set_as_default_for_extension: Sets an application as default for a given file extension. + * @add_supports_type: Adds to the #GAppInfo information about supported file types. + * @can_remove_supports_type: Checks for support for removing supported file types from a #GAppInfo. + * @remove_supports_type: Removes a supported application type from a #GAppInfo. + * @can_delete: Checks if a #GAppInfo can be deleted. Since 2.20 + * @do_delete: Deletes a #GAppInfo. Since 2.20 + * @get_commandline: Gets the commandline for the #GAppInfo. Since 2.20 + * @get_display_name: Gets the display name for the #GAppInfo. Since 2.24 + * @set_as_last_used_for_type: Sets the application as the last used. See g_app_info_set_as_last_used_for_type(). + * @get_supported_types: Retrieves the list of content types that @app_info claims to support. + * + * Application Information interface, for operating system portability. + */ +typedef struct _GAppInfoIface GAppInfoIface; + +struct _GAppInfoIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + GAppInfo * (* dup) (GAppInfo *appinfo); + gboolean (* equal) (GAppInfo *appinfo1, + GAppInfo *appinfo2); + const char * (* get_id) (GAppInfo *appinfo); + const char * (* get_name) (GAppInfo *appinfo); + const char * (* get_description) (GAppInfo *appinfo); + const char * (* get_executable) (GAppInfo *appinfo); + GIcon * (* get_icon) (GAppInfo *appinfo); + gboolean (* launch) (GAppInfo *appinfo, + GList *files, + GAppLaunchContext *context, + GError **error); + gboolean (* supports_uris) (GAppInfo *appinfo); + gboolean (* supports_files) (GAppInfo *appinfo); + gboolean (* launch_uris) (GAppInfo *appinfo, + GList *uris, + GAppLaunchContext *context, + GError **error); + gboolean (* should_show) (GAppInfo *appinfo); + + /* For changing associations */ + gboolean (* set_as_default_for_type) (GAppInfo *appinfo, + const char *content_type, + GError **error); + gboolean (* set_as_default_for_extension) (GAppInfo *appinfo, + const char *extension, + GError **error); + gboolean (* add_supports_type) (GAppInfo *appinfo, + const char *content_type, + GError **error); + gboolean (* can_remove_supports_type) (GAppInfo *appinfo); + gboolean (* remove_supports_type) (GAppInfo *appinfo, + const char *content_type, + GError **error); + gboolean (* can_delete) (GAppInfo *appinfo); + gboolean (* do_delete) (GAppInfo *appinfo); + const char * (* get_commandline) (GAppInfo *appinfo); + const char * (* get_display_name) (GAppInfo *appinfo); + gboolean (* set_as_last_used_for_type) (GAppInfo *appinfo, + const char *content_type, + GError **error); + const char ** (* get_supported_types) (GAppInfo *appinfo); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_app_info_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GAppInfo * g_app_info_create_from_commandline (const char *commandline, + const char *application_name, + GAppInfoCreateFlags flags, + GError **error); +GLIB_AVAILABLE_IN_ALL +GAppInfo * g_app_info_dup (GAppInfo *appinfo); +GLIB_AVAILABLE_IN_ALL +gboolean g_app_info_equal (GAppInfo *appinfo1, + GAppInfo *appinfo2); +GLIB_AVAILABLE_IN_ALL +const char *g_app_info_get_id (GAppInfo *appinfo); +GLIB_AVAILABLE_IN_ALL +const char *g_app_info_get_name (GAppInfo *appinfo); +GLIB_AVAILABLE_IN_ALL +const char *g_app_info_get_display_name (GAppInfo *appinfo); +GLIB_AVAILABLE_IN_ALL +const char *g_app_info_get_description (GAppInfo *appinfo); +GLIB_AVAILABLE_IN_ALL +const char *g_app_info_get_executable (GAppInfo *appinfo); +GLIB_AVAILABLE_IN_ALL +const char *g_app_info_get_commandline (GAppInfo *appinfo); +GLIB_AVAILABLE_IN_ALL +GIcon * g_app_info_get_icon (GAppInfo *appinfo); +GLIB_AVAILABLE_IN_ALL +gboolean g_app_info_launch (GAppInfo *appinfo, + GList *files, + GAppLaunchContext *context, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_app_info_supports_uris (GAppInfo *appinfo); +GLIB_AVAILABLE_IN_ALL +gboolean g_app_info_supports_files (GAppInfo *appinfo); +GLIB_AVAILABLE_IN_ALL +gboolean g_app_info_launch_uris (GAppInfo *appinfo, + GList *uris, + GAppLaunchContext *context, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_app_info_should_show (GAppInfo *appinfo); + +GLIB_AVAILABLE_IN_ALL +gboolean g_app_info_set_as_default_for_type (GAppInfo *appinfo, + const char *content_type, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_app_info_set_as_default_for_extension (GAppInfo *appinfo, + const char *extension, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_app_info_add_supports_type (GAppInfo *appinfo, + const char *content_type, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_app_info_can_remove_supports_type (GAppInfo *appinfo); +GLIB_AVAILABLE_IN_ALL +gboolean g_app_info_remove_supports_type (GAppInfo *appinfo, + const char *content_type, + GError **error); +GLIB_AVAILABLE_IN_2_34 +const char **g_app_info_get_supported_types (GAppInfo *appinfo); + +GLIB_AVAILABLE_IN_ALL +gboolean g_app_info_can_delete (GAppInfo *appinfo); +GLIB_AVAILABLE_IN_ALL +gboolean g_app_info_delete (GAppInfo *appinfo); + +GLIB_AVAILABLE_IN_ALL +gboolean g_app_info_set_as_last_used_for_type (GAppInfo *appinfo, + const char *content_type, + GError **error); + +GLIB_AVAILABLE_IN_ALL +GList * g_app_info_get_all (void); +GLIB_AVAILABLE_IN_ALL +GList * g_app_info_get_all_for_type (const char *content_type); +GLIB_AVAILABLE_IN_ALL +GList * g_app_info_get_recommended_for_type (const gchar *content_type); +GLIB_AVAILABLE_IN_ALL +GList * g_app_info_get_fallback_for_type (const gchar *content_type); + +GLIB_AVAILABLE_IN_ALL +void g_app_info_reset_type_associations (const char *content_type); +GLIB_AVAILABLE_IN_ALL +GAppInfo *g_app_info_get_default_for_type (const char *content_type, + gboolean must_support_uris); +GLIB_AVAILABLE_IN_ALL +GAppInfo *g_app_info_get_default_for_uri_scheme (const char *uri_scheme); + +GLIB_AVAILABLE_IN_ALL +gboolean g_app_info_launch_default_for_uri (const char *uri, + GAppLaunchContext *context, + GError **error); + +GLIB_AVAILABLE_IN_2_50 +void g_app_info_launch_default_for_uri_async (const char *uri, + GAppLaunchContext *context, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_2_50 +gboolean g_app_info_launch_default_for_uri_finish (GAsyncResult *result, + GError **error); + + +/** + * GAppLaunchContext: + * + * Integrating the launch with the launching application. This is used to + * handle for instance startup notification and launching the new application + * on the same screen as the launching window. + */ +struct _GAppLaunchContext +{ + GObject parent_instance; + + /*< private >*/ + GAppLaunchContextPrivate *priv; +}; + +struct _GAppLaunchContextClass +{ + GObjectClass parent_class; + + char * (* get_display) (GAppLaunchContext *context, + GAppInfo *info, + GList *files); + char * (* get_startup_notify_id) (GAppLaunchContext *context, + GAppInfo *info, + GList *files); + void (* launch_failed) (GAppLaunchContext *context, + const char *startup_notify_id); + void (* launched) (GAppLaunchContext *context, + GAppInfo *info, + GVariant *platform_data); + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_app_launch_context_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GAppLaunchContext *g_app_launch_context_new (void); + +GLIB_AVAILABLE_IN_2_32 +void g_app_launch_context_setenv (GAppLaunchContext *context, + const char *variable, + const char *value); +GLIB_AVAILABLE_IN_2_32 +void g_app_launch_context_unsetenv (GAppLaunchContext *context, + const char *variable); +GLIB_AVAILABLE_IN_2_32 +char ** g_app_launch_context_get_environment (GAppLaunchContext *context); + +GLIB_AVAILABLE_IN_ALL +char * g_app_launch_context_get_display (GAppLaunchContext *context, + GAppInfo *info, + GList *files); +GLIB_AVAILABLE_IN_ALL +char * g_app_launch_context_get_startup_notify_id (GAppLaunchContext *context, + GAppInfo *info, + GList *files); +GLIB_AVAILABLE_IN_ALL +void g_app_launch_context_launch_failed (GAppLaunchContext *context, + const char * startup_notify_id); + +#define G_TYPE_APP_INFO_MONITOR (g_app_info_monitor_get_type ()) +#define G_APP_INFO_MONITOR(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_APP_INFO_MONITOR, GAppInfoMonitor)) +#define G_IS_APP_INFO_MONITOR(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_APP_INFO_MONITOR)) + +typedef struct _GAppInfoMonitor GAppInfoMonitor; + +GLIB_AVAILABLE_IN_2_40 +GType g_app_info_monitor_get_type (void); + +GLIB_AVAILABLE_IN_2_40 +GAppInfoMonitor * g_app_info_monitor_get (void); + +G_END_DECLS + +#endif /* __G_APP_INFO_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gapplication.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gapplication.h new file mode 100755 index 00000000..cdb93655 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gapplication.h @@ -0,0 +1,251 @@ +/* + * Copyright © 2010 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_APPLICATION_H__ +#define __G_APPLICATION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_APPLICATION (g_application_get_type ()) +#define G_APPLICATION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_APPLICATION, GApplication)) +#define G_APPLICATION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_APPLICATION, GApplicationClass)) +#define G_IS_APPLICATION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_APPLICATION)) +#define G_IS_APPLICATION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_APPLICATION)) +#define G_APPLICATION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_APPLICATION, GApplicationClass)) + +typedef struct _GApplicationPrivate GApplicationPrivate; +typedef struct _GApplicationClass GApplicationClass; + +struct _GApplication +{ + /*< private >*/ + GObject parent_instance; + + GApplicationPrivate *priv; +}; + +struct _GApplicationClass +{ + /*< private >*/ + GObjectClass parent_class; + + /*< public >*/ + /* signals */ + void (* startup) (GApplication *application); + + void (* activate) (GApplication *application); + + void (* open) (GApplication *application, + GFile **files, + gint n_files, + const gchar *hint); + + int (* command_line) (GApplication *application, + GApplicationCommandLine *command_line); + + /* vfuncs */ + + /** + * GApplicationClass::local_command_line: + * @application: a #GApplication + * @arguments: (inout) (array zero-terminated=1): array of command line arguments + * @exit_status: (out): exit status to fill after processing the command line. + * + * This virtual function is always invoked in the local instance. It + * gets passed a pointer to a %NULL-terminated copy of @argv and is + * expected to remove arguments that it handled (shifting up remaining + * arguments). + * + * The last argument to local_command_line() is a pointer to the @status + * variable which can used to set the exit status that is returned from + * g_application_run(). + * + * See g_application_run() for more details on #GApplication startup. + * + * Returns: %TRUE if the commandline has been completely handled + */ + gboolean (* local_command_line) (GApplication *application, + gchar ***arguments, + int *exit_status); + + void (* before_emit) (GApplication *application, + GVariant *platform_data); + void (* after_emit) (GApplication *application, + GVariant *platform_data); + void (* add_platform_data) (GApplication *application, + GVariantBuilder *builder); + void (* quit_mainloop) (GApplication *application); + void (* run_mainloop) (GApplication *application); + void (* shutdown) (GApplication *application); + + gboolean (* dbus_register) (GApplication *application, + GDBusConnection *connection, + const gchar *object_path, + GError **error); + void (* dbus_unregister) (GApplication *application, + GDBusConnection *connection, + const gchar *object_path); + gint (* handle_local_options)(GApplication *application, + GVariantDict *options); + + /*< private >*/ + gpointer padding[8]; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_application_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +gboolean g_application_id_is_valid (const gchar *application_id); + +GLIB_AVAILABLE_IN_ALL +GApplication * g_application_new (const gchar *application_id, + GApplicationFlags flags); + +GLIB_AVAILABLE_IN_ALL +const gchar * g_application_get_application_id (GApplication *application); +GLIB_AVAILABLE_IN_ALL +void g_application_set_application_id (GApplication *application, + const gchar *application_id); + +GLIB_AVAILABLE_IN_2_34 +GDBusConnection * g_application_get_dbus_connection (GApplication *application); +GLIB_AVAILABLE_IN_2_34 +const gchar * g_application_get_dbus_object_path (GApplication *application); + +GLIB_AVAILABLE_IN_ALL +guint g_application_get_inactivity_timeout (GApplication *application); +GLIB_AVAILABLE_IN_ALL +void g_application_set_inactivity_timeout (GApplication *application, + guint inactivity_timeout); + +GLIB_AVAILABLE_IN_ALL +GApplicationFlags g_application_get_flags (GApplication *application); +GLIB_AVAILABLE_IN_ALL +void g_application_set_flags (GApplication *application, + GApplicationFlags flags); + +GLIB_AVAILABLE_IN_2_42 +const gchar * g_application_get_resource_base_path (GApplication *application); +GLIB_AVAILABLE_IN_2_42 +void g_application_set_resource_base_path (GApplication *application, + const gchar *resource_path); + +GLIB_DEPRECATED +void g_application_set_action_group (GApplication *application, + GActionGroup *action_group); + +GLIB_AVAILABLE_IN_2_40 +void g_application_add_main_option_entries (GApplication *application, + const GOptionEntry *entries); + +GLIB_AVAILABLE_IN_2_42 +void g_application_add_main_option (GApplication *application, + const char *long_name, + char short_name, + GOptionFlags flags, + GOptionArg arg, + const char *description, + const char *arg_description); +GLIB_AVAILABLE_IN_2_40 +void g_application_add_option_group (GApplication *application, + GOptionGroup *group); +GLIB_AVAILABLE_IN_2_56 +void g_application_set_option_context_parameter_string (GApplication *application, + const gchar *parameter_string); +GLIB_AVAILABLE_IN_2_56 +void g_application_set_option_context_summary (GApplication *application, + const gchar *summary); +GLIB_AVAILABLE_IN_2_56 +void g_application_set_option_context_description (GApplication *application, + const gchar *description); +GLIB_AVAILABLE_IN_ALL +gboolean g_application_get_is_registered (GApplication *application); +GLIB_AVAILABLE_IN_ALL +gboolean g_application_get_is_remote (GApplication *application); + +GLIB_AVAILABLE_IN_ALL +gboolean g_application_register (GApplication *application, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_application_hold (GApplication *application); +GLIB_AVAILABLE_IN_ALL +void g_application_release (GApplication *application); + +GLIB_AVAILABLE_IN_ALL +void g_application_activate (GApplication *application); + +GLIB_AVAILABLE_IN_ALL +void g_application_open (GApplication *application, + GFile **files, + gint n_files, + const gchar *hint); + +GLIB_AVAILABLE_IN_ALL +int g_application_run (GApplication *application, + int argc, + char **argv); + +GLIB_AVAILABLE_IN_2_32 +void g_application_quit (GApplication *application); + +GLIB_AVAILABLE_IN_2_32 +GApplication * g_application_get_default (void); +GLIB_AVAILABLE_IN_2_32 +void g_application_set_default (GApplication *application); + +GLIB_AVAILABLE_IN_2_38 +void g_application_mark_busy (GApplication *application); +GLIB_AVAILABLE_IN_2_38 +void g_application_unmark_busy (GApplication *application); +GLIB_AVAILABLE_IN_2_44 +gboolean g_application_get_is_busy (GApplication *application); + +GLIB_AVAILABLE_IN_2_40 +void g_application_send_notification (GApplication *application, + const gchar *id, + GNotification *notification); +GLIB_AVAILABLE_IN_2_40 +void g_application_withdraw_notification (GApplication *application, + const gchar *id); + +GLIB_AVAILABLE_IN_2_44 +void g_application_bind_busy_property (GApplication *application, + gpointer object, + const gchar *property); + +GLIB_AVAILABLE_IN_2_44 +void g_application_unbind_busy_property (GApplication *application, + gpointer object, + const gchar *property); + +G_END_DECLS + +#endif /* __G_APPLICATION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gapplicationcommandline.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gapplicationcommandline.h new file mode 100755 index 00000000..6610e86b --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gapplicationcommandline.h @@ -0,0 +1,122 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2010 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_APPLICATION_COMMAND_LINE_H__ +#define __G_APPLICATION_COMMAND_LINE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_APPLICATION_COMMAND_LINE (g_application_command_line_get_type ()) +#define G_APPLICATION_COMMAND_LINE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_APPLICATION_COMMAND_LINE, \ + GApplicationCommandLine)) +#define G_APPLICATION_COMMAND_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_APPLICATION_COMMAND_LINE, \ + GApplicationCommandLineClass)) +#define G_IS_APPLICATION_COMMAND_LINE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_APPLICATION_COMMAND_LINE)) +#define G_IS_APPLICATION_COMMAND_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_APPLICATION_COMMAND_LINE)) +#define G_APPLICATION_COMMAND_LINE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_APPLICATION_COMMAND_LINE, \ + GApplicationCommandLineClass)) + +typedef struct _GApplicationCommandLinePrivate GApplicationCommandLinePrivate; +typedef struct _GApplicationCommandLineClass GApplicationCommandLineClass; + +struct _GApplicationCommandLine +{ + /*< private >*/ + GObject parent_instance; + + GApplicationCommandLinePrivate *priv; +}; + +struct _GApplicationCommandLineClass +{ + /*< private >*/ + GObjectClass parent_class; + + void (* print_literal) (GApplicationCommandLine *cmdline, + const gchar *message); + void (* printerr_literal) (GApplicationCommandLine *cmdline, + const gchar *message); + GInputStream * (* get_stdin) (GApplicationCommandLine *cmdline); + + gpointer padding[11]; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_application_command_line_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +gchar ** g_application_command_line_get_arguments (GApplicationCommandLine *cmdline, + int *argc); + +GLIB_AVAILABLE_IN_2_40 +GVariantDict * g_application_command_line_get_options_dict (GApplicationCommandLine *cmdline); + +GLIB_AVAILABLE_IN_2_36 +GInputStream * g_application_command_line_get_stdin (GApplicationCommandLine *cmdline); + +GLIB_AVAILABLE_IN_ALL +const gchar * const * g_application_command_line_get_environ (GApplicationCommandLine *cmdline); + +GLIB_AVAILABLE_IN_ALL +const gchar * g_application_command_line_getenv (GApplicationCommandLine *cmdline, + const gchar *name); + +GLIB_AVAILABLE_IN_ALL +const gchar * g_application_command_line_get_cwd (GApplicationCommandLine *cmdline); + +GLIB_AVAILABLE_IN_ALL +gboolean g_application_command_line_get_is_remote (GApplicationCommandLine *cmdline); + +GLIB_AVAILABLE_IN_ALL +void g_application_command_line_print (GApplicationCommandLine *cmdline, + const gchar *format, + ...) G_GNUC_PRINTF(2, 3); +GLIB_AVAILABLE_IN_ALL +void g_application_command_line_printerr (GApplicationCommandLine *cmdline, + const gchar *format, + ...) G_GNUC_PRINTF(2, 3); + +GLIB_AVAILABLE_IN_ALL +int g_application_command_line_get_exit_status (GApplicationCommandLine *cmdline); +GLIB_AVAILABLE_IN_ALL +void g_application_command_line_set_exit_status (GApplicationCommandLine *cmdline, + int exit_status); + +GLIB_AVAILABLE_IN_ALL +GVariant * g_application_command_line_get_platform_data (GApplicationCommandLine *cmdline); + +GLIB_AVAILABLE_IN_2_36 +GFile * g_application_command_line_create_file_for_arg (GApplicationCommandLine *cmdline, + const gchar *arg); + +G_END_DECLS + +#endif /* __G_APPLICATION_COMMAND_LINE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gasyncinitable.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gasyncinitable.h new file mode 100755 index 00000000..8b05a22e --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gasyncinitable.h @@ -0,0 +1,124 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2009 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_ASYNC_INITABLE_H__ +#define __G_ASYNC_INITABLE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> +#include <gio/ginitable.h> + +G_BEGIN_DECLS + +#define G_TYPE_ASYNC_INITABLE (g_async_initable_get_type ()) +#define G_ASYNC_INITABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_ASYNC_INITABLE, GAsyncInitable)) +#define G_IS_ASYNC_INITABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_ASYNC_INITABLE)) +#define G_ASYNC_INITABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_ASYNC_INITABLE, GAsyncInitableIface)) +#define G_TYPE_IS_ASYNC_INITABLE(type) (g_type_is_a ((type), G_TYPE_ASYNC_INITABLE)) + +/** + * GAsyncInitable: + * + * Interface for asynchronously initializable objects. + * + * Since: 2.22 + **/ +typedef struct _GAsyncInitableIface GAsyncInitableIface; + +/** + * GAsyncInitableIface: + * @g_iface: The parent interface. + * @init_async: Starts initialization of the object. + * @init_finish: Finishes initialization of the object. + * + * Provides an interface for asynchronous initializing object such that + * initialization may fail. + * + * Since: 2.22 + **/ +struct _GAsyncInitableIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + void (* init_async) (GAsyncInitable *initable, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* init_finish) (GAsyncInitable *initable, + GAsyncResult *res, + GError **error); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_async_initable_get_type (void) G_GNUC_CONST; + + +GLIB_AVAILABLE_IN_ALL +void g_async_initable_init_async (GAsyncInitable *initable, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_async_initable_init_finish (GAsyncInitable *initable, + GAsyncResult *res, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_async_initable_new_async (GType object_type, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data, + const gchar *first_property_name, + ...); +GLIB_DEPRECATED_IN_2_54_FOR(g_object_new_with_properties and g_async_initable_init_async) +void g_async_initable_newv_async (GType object_type, + guint n_parameters, + GParameter *parameters, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +void g_async_initable_new_valist_async (GType object_type, + const gchar *first_property_name, + va_list var_args, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GObject *g_async_initable_new_finish (GAsyncInitable *initable, + GAsyncResult *res, + GError **error); + + + +G_END_DECLS + + +#endif /* __G_ASYNC_INITABLE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gasyncresult.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gasyncresult.h new file mode 100755 index 00000000..7ea9e397 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gasyncresult.h @@ -0,0 +1,85 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_ASYNC_RESULT_H__ +#define __G_ASYNC_RESULT_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_ASYNC_RESULT (g_async_result_get_type ()) +#define G_ASYNC_RESULT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_ASYNC_RESULT, GAsyncResult)) +#define G_IS_ASYNC_RESULT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_ASYNC_RESULT)) +#define G_ASYNC_RESULT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_ASYNC_RESULT, GAsyncResultIface)) + +/** + * GAsyncResult: + * + * Holds results information for an asynchronous operation, + * usually passed directly to a asynchronous _finish() operation. + **/ +typedef struct _GAsyncResultIface GAsyncResultIface; + + +/** + * GAsyncResultIface: + * @g_iface: The parent interface. + * @get_user_data: Gets the user data passed to the callback. + * @get_source_object: Gets the source object that issued the asynchronous operation. + * @is_tagged: Checks if a result is tagged with a particular source. + * + * Interface definition for #GAsyncResult. + **/ +struct _GAsyncResultIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + gpointer (* get_user_data) (GAsyncResult *res); + GObject * (* get_source_object) (GAsyncResult *res); + + gboolean (* is_tagged) (GAsyncResult *res, + gpointer source_tag); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_async_result_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +gpointer g_async_result_get_user_data (GAsyncResult *res); +GLIB_AVAILABLE_IN_ALL +GObject *g_async_result_get_source_object (GAsyncResult *res); + +GLIB_AVAILABLE_IN_2_34 +gboolean g_async_result_legacy_propagate_error (GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_2_34 +gboolean g_async_result_is_tagged (GAsyncResult *res, + gpointer source_tag); + +G_END_DECLS + +#endif /* __G_ASYNC_RESULT_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gbufferedinputstream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gbufferedinputstream.h new file mode 100755 index 00000000..19c42147 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gbufferedinputstream.h @@ -0,0 +1,133 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Christian Kellner <gicmo@gnome.org> + */ + +#ifndef __G_BUFFERED_INPUT_STREAM_H__ +#define __G_BUFFERED_INPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gfilterinputstream.h> + +G_BEGIN_DECLS + +#define G_TYPE_BUFFERED_INPUT_STREAM (g_buffered_input_stream_get_type ()) +#define G_BUFFERED_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_BUFFERED_INPUT_STREAM, GBufferedInputStream)) +#define G_BUFFERED_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_BUFFERED_INPUT_STREAM, GBufferedInputStreamClass)) +#define G_IS_BUFFERED_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_BUFFERED_INPUT_STREAM)) +#define G_IS_BUFFERED_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_BUFFERED_INPUT_STREAM)) +#define G_BUFFERED_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_BUFFERED_INPUT_STREAM, GBufferedInputStreamClass)) + +/** + * GBufferedInputStream: + * + * Implements #GFilterInputStream with a sized input buffer. + **/ +typedef struct _GBufferedInputStreamClass GBufferedInputStreamClass; +typedef struct _GBufferedInputStreamPrivate GBufferedInputStreamPrivate; + +struct _GBufferedInputStream +{ + GFilterInputStream parent_instance; + + /*< private >*/ + GBufferedInputStreamPrivate *priv; +}; + +struct _GBufferedInputStreamClass +{ + GFilterInputStreamClass parent_class; + + gssize (* fill) (GBufferedInputStream *stream, + gssize count, + GCancellable *cancellable, + GError **error); + + /* Async ops: (optional in derived classes) */ + void (* fill_async) (GBufferedInputStream *stream, + gssize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gssize (* fill_finish) (GBufferedInputStream *stream, + GAsyncResult *result, + GError **error); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + + +GLIB_AVAILABLE_IN_ALL +GType g_buffered_input_stream_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GInputStream* g_buffered_input_stream_new (GInputStream *base_stream); +GLIB_AVAILABLE_IN_ALL +GInputStream* g_buffered_input_stream_new_sized (GInputStream *base_stream, + gsize size); + +GLIB_AVAILABLE_IN_ALL +gsize g_buffered_input_stream_get_buffer_size (GBufferedInputStream *stream); +GLIB_AVAILABLE_IN_ALL +void g_buffered_input_stream_set_buffer_size (GBufferedInputStream *stream, + gsize size); +GLIB_AVAILABLE_IN_ALL +gsize g_buffered_input_stream_get_available (GBufferedInputStream *stream); +GLIB_AVAILABLE_IN_ALL +gsize g_buffered_input_stream_peek (GBufferedInputStream *stream, + void *buffer, + gsize offset, + gsize count); +GLIB_AVAILABLE_IN_ALL +const void* g_buffered_input_stream_peek_buffer (GBufferedInputStream *stream, + gsize *count); + +GLIB_AVAILABLE_IN_ALL +gssize g_buffered_input_stream_fill (GBufferedInputStream *stream, + gssize count, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_buffered_input_stream_fill_async (GBufferedInputStream *stream, + gssize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gssize g_buffered_input_stream_fill_finish (GBufferedInputStream *stream, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +int g_buffered_input_stream_read_byte (GBufferedInputStream *stream, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + +#endif /* __G_BUFFERED_INPUT_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gbufferedoutputstream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gbufferedoutputstream.h new file mode 100755 index 00000000..f88f2795 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gbufferedoutputstream.h @@ -0,0 +1,86 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Christian Kellner <gicmo@gnome.org> + */ + +#ifndef __G_BUFFERED_OUTPUT_STREAM_H__ +#define __G_BUFFERED_OUTPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gfilteroutputstream.h> + +G_BEGIN_DECLS + +#define G_TYPE_BUFFERED_OUTPUT_STREAM (g_buffered_output_stream_get_type ()) +#define G_BUFFERED_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_BUFFERED_OUTPUT_STREAM, GBufferedOutputStream)) +#define G_BUFFERED_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_BUFFERED_OUTPUT_STREAM, GBufferedOutputStreamClass)) +#define G_IS_BUFFERED_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_BUFFERED_OUTPUT_STREAM)) +#define G_IS_BUFFERED_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_BUFFERED_OUTPUT_STREAM)) +#define G_BUFFERED_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_BUFFERED_OUTPUT_STREAM, GBufferedOutputStreamClass)) + +/** + * GBufferedOutputStream: + * + * An implementation of #GFilterOutputStream with a sized buffer. + **/ +typedef struct _GBufferedOutputStreamClass GBufferedOutputStreamClass; +typedef struct _GBufferedOutputStreamPrivate GBufferedOutputStreamPrivate; + +struct _GBufferedOutputStream +{ + GFilterOutputStream parent_instance; + + /*< protected >*/ + GBufferedOutputStreamPrivate *priv; +}; + +struct _GBufferedOutputStreamClass +{ + GFilterOutputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); +}; + + +GLIB_AVAILABLE_IN_ALL +GType g_buffered_output_stream_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GOutputStream* g_buffered_output_stream_new (GOutputStream *base_stream); +GLIB_AVAILABLE_IN_ALL +GOutputStream* g_buffered_output_stream_new_sized (GOutputStream *base_stream, + gsize size); +GLIB_AVAILABLE_IN_ALL +gsize g_buffered_output_stream_get_buffer_size (GBufferedOutputStream *stream); +GLIB_AVAILABLE_IN_ALL +void g_buffered_output_stream_set_buffer_size (GBufferedOutputStream *stream, + gsize size); +GLIB_AVAILABLE_IN_ALL +gboolean g_buffered_output_stream_get_auto_grow (GBufferedOutputStream *stream); +GLIB_AVAILABLE_IN_ALL +void g_buffered_output_stream_set_auto_grow (GBufferedOutputStream *stream, + gboolean auto_grow); + +G_END_DECLS + +#endif /* __G_BUFFERED_OUTPUT_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gbytesicon.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gbytesicon.h new file mode 100755 index 00000000..5661044b --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gbytesicon.h @@ -0,0 +1,52 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_BYTES_ICON_H__ +#define __G_BYTES_ICON_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_BYTES_ICON (g_bytes_icon_get_type ()) +#define G_BYTES_ICON(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_BYTES_ICON, GBytesIcon)) +#define G_IS_BYTES_ICON(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_BYTES_ICON)) + +/** + * GBytesIcon: + * + * Gets an icon for a #GBytes. Implements #GLoadableIcon. + **/ +GLIB_AVAILABLE_IN_2_38 +GType g_bytes_icon_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_38 +GIcon * g_bytes_icon_new (GBytes *bytes); + +GLIB_AVAILABLE_IN_2_38 +GBytes * g_bytes_icon_get_bytes (GBytesIcon *icon); + +G_END_DECLS + +#endif /* __G_BYTES_ICON_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gcancellable.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gcancellable.h new file mode 100755 index 00000000..45b9a5a1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gcancellable.h @@ -0,0 +1,118 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_CANCELLABLE_H__ +#define __G_CANCELLABLE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_CANCELLABLE (g_cancellable_get_type ()) +#define G_CANCELLABLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CANCELLABLE, GCancellable)) +#define G_CANCELLABLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CANCELLABLE, GCancellableClass)) +#define G_IS_CANCELLABLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CANCELLABLE)) +#define G_IS_CANCELLABLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CANCELLABLE)) +#define G_CANCELLABLE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CANCELLABLE, GCancellableClass)) + +/** + * GCancellable: + * + * Allows actions to be cancelled. + */ +typedef struct _GCancellableClass GCancellableClass; +typedef struct _GCancellablePrivate GCancellablePrivate; + +struct _GCancellable +{ + GObject parent_instance; + + /*< private >*/ + GCancellablePrivate *priv; +}; + +struct _GCancellableClass +{ + GObjectClass parent_class; + + void (* cancelled) (GCancellable *cancellable); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_cancellable_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GCancellable *g_cancellable_new (void); + +/* These are only safe to call inside a cancellable op */ +GLIB_AVAILABLE_IN_ALL +gboolean g_cancellable_is_cancelled (GCancellable *cancellable); +GLIB_AVAILABLE_IN_ALL +gboolean g_cancellable_set_error_if_cancelled (GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +int g_cancellable_get_fd (GCancellable *cancellable); +GLIB_AVAILABLE_IN_ALL +gboolean g_cancellable_make_pollfd (GCancellable *cancellable, + GPollFD *pollfd); +GLIB_AVAILABLE_IN_ALL +void g_cancellable_release_fd (GCancellable *cancellable); + +GLIB_AVAILABLE_IN_ALL +GSource * g_cancellable_source_new (GCancellable *cancellable); + +GLIB_AVAILABLE_IN_ALL +GCancellable *g_cancellable_get_current (void); +GLIB_AVAILABLE_IN_ALL +void g_cancellable_push_current (GCancellable *cancellable); +GLIB_AVAILABLE_IN_ALL +void g_cancellable_pop_current (GCancellable *cancellable); +GLIB_AVAILABLE_IN_ALL +void g_cancellable_reset (GCancellable *cancellable); +GLIB_AVAILABLE_IN_ALL +gulong g_cancellable_connect (GCancellable *cancellable, + GCallback callback, + gpointer data, + GDestroyNotify data_destroy_func); +GLIB_AVAILABLE_IN_ALL +void g_cancellable_disconnect (GCancellable *cancellable, + gulong handler_id); + + +/* This is safe to call from another thread */ +GLIB_AVAILABLE_IN_ALL +void g_cancellable_cancel (GCancellable *cancellable); + +G_END_DECLS + +#endif /* __G_CANCELLABLE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gcharsetconverter.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gcharsetconverter.h new file mode 100755 index 00000000..610f774d --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gcharsetconverter.h @@ -0,0 +1,63 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2009 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_CHARSET_CONVERTER_H__ +#define __G_CHARSET_CONVERTER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gconverter.h> + +G_BEGIN_DECLS + +#define G_TYPE_CHARSET_CONVERTER (g_charset_converter_get_type ()) +#define G_CHARSET_CONVERTER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CHARSET_CONVERTER, GCharsetConverter)) +#define G_CHARSET_CONVERTER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CHARSET_CONVERTER, GCharsetConverterClass)) +#define G_IS_CHARSET_CONVERTER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CHARSET_CONVERTER)) +#define G_IS_CHARSET_CONVERTER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CHARSET_CONVERTER)) +#define G_CHARSET_CONVERTER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CHARSET_CONVERTER, GCharsetConverterClass)) + +typedef struct _GCharsetConverterClass GCharsetConverterClass; + +struct _GCharsetConverterClass +{ + GObjectClass parent_class; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_charset_converter_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GCharsetConverter *g_charset_converter_new (const gchar *to_charset, + const gchar *from_charset, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_charset_converter_set_use_fallback (GCharsetConverter *converter, + gboolean use_fallback); +GLIB_AVAILABLE_IN_ALL +gboolean g_charset_converter_get_use_fallback (GCharsetConverter *converter); +GLIB_AVAILABLE_IN_ALL +guint g_charset_converter_get_num_fallbacks (GCharsetConverter *converter); + +G_END_DECLS + +#endif /* __G_CHARSET_CONVERTER_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gcontenttype.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gcontenttype.h new file mode 100755 index 00000000..d87672dd --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gcontenttype.h @@ -0,0 +1,74 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_CONTENT_TYPE_H__ +#define __G_CONTENT_TYPE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +gboolean g_content_type_equals (const gchar *type1, + const gchar *type2); +GLIB_AVAILABLE_IN_ALL +gboolean g_content_type_is_a (const gchar *type, + const gchar *supertype); +GLIB_AVAILABLE_IN_2_52 +gboolean g_content_type_is_mime_type (const gchar *type, + const gchar *mime_type); +GLIB_AVAILABLE_IN_ALL +gboolean g_content_type_is_unknown (const gchar *type); +GLIB_AVAILABLE_IN_ALL +gchar * g_content_type_get_description (const gchar *type); +GLIB_AVAILABLE_IN_ALL +gchar * g_content_type_get_mime_type (const gchar *type); +GLIB_AVAILABLE_IN_ALL +GIcon * g_content_type_get_icon (const gchar *type); +GLIB_AVAILABLE_IN_2_34 +GIcon * g_content_type_get_symbolic_icon (const gchar *type); +GLIB_AVAILABLE_IN_2_34 +gchar * g_content_type_get_generic_icon_name (const gchar *type); + +GLIB_AVAILABLE_IN_ALL +gboolean g_content_type_can_be_executable (const gchar *type); + +GLIB_AVAILABLE_IN_ALL +gchar * g_content_type_from_mime_type (const gchar *mime_type); + +GLIB_AVAILABLE_IN_ALL +gchar * g_content_type_guess (const gchar *filename, + const guchar *data, + gsize data_size, + gboolean *result_uncertain); + +GLIB_AVAILABLE_IN_ALL +gchar ** g_content_type_guess_for_tree (GFile *root); + +GLIB_AVAILABLE_IN_ALL +GList * g_content_types_get_registered (void); + +G_END_DECLS + +#endif /* __G_CONTENT_TYPE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gconverter.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gconverter.h new file mode 100755 index 00000000..87164534 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gconverter.h @@ -0,0 +1,96 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2009 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_CONVERTER_H__ +#define __G_CONVERTER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_CONVERTER (g_converter_get_type ()) +#define G_CONVERTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_CONVERTER, GConverter)) +#define G_IS_CONVERTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_CONVERTER)) +#define G_CONVERTER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_CONVERTER, GConverterIface)) + +/** + * GConverter: + * + * Seek object for streaming operations. + * + * Since: 2.24 + **/ +typedef struct _GConverterIface GConverterIface; + +/** + * GConverterIface: + * @g_iface: The parent interface. + * @convert: Converts data. + * @reset: Reverts the internal state of the converter to its initial state. + * + * Provides an interface for converting data from one type + * to another type. The conversion can be stateful + * and may fail at any place. + * + * Since: 2.24 + **/ +struct _GConverterIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + GConverterResult (* convert) (GConverter *converter, + const void *inbuf, + gsize inbuf_size, + void *outbuf, + gsize outbuf_size, + GConverterFlags flags, + gsize *bytes_read, + gsize *bytes_written, + GError **error); + void (* reset) (GConverter *converter); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_converter_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GConverterResult g_converter_convert (GConverter *converter, + const void *inbuf, + gsize inbuf_size, + void *outbuf, + gsize outbuf_size, + GConverterFlags flags, + gsize *bytes_read, + gsize *bytes_written, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_converter_reset (GConverter *converter); + + +G_END_DECLS + + +#endif /* __G_CONVERTER_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gconverterinputstream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gconverterinputstream.h new file mode 100755 index 00000000..48cc1022 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gconverterinputstream.h @@ -0,0 +1,80 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2009 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_CONVERTER_INPUT_STREAM_H__ +#define __G_CONVERTER_INPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gfilterinputstream.h> +#include <gio/gconverter.h> + +G_BEGIN_DECLS + +#define G_TYPE_CONVERTER_INPUT_STREAM (g_converter_input_stream_get_type ()) +#define G_CONVERTER_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CONVERTER_INPUT_STREAM, GConverterInputStream)) +#define G_CONVERTER_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CONVERTER_INPUT_STREAM, GConverterInputStreamClass)) +#define G_IS_CONVERTER_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CONVERTER_INPUT_STREAM)) +#define G_IS_CONVERTER_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CONVERTER_INPUT_STREAM)) +#define G_CONVERTER_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CONVERTER_INPUT_STREAM, GConverterInputStreamClass)) + +/** + * GConverterInputStream: + * + * An implementation of #GFilterInputStream that allows data + * conversion. + **/ +typedef struct _GConverterInputStreamClass GConverterInputStreamClass; +typedef struct _GConverterInputStreamPrivate GConverterInputStreamPrivate; + +struct _GConverterInputStream +{ + GFilterInputStream parent_instance; + + /*< private >*/ + GConverterInputStreamPrivate *priv; +}; + +struct _GConverterInputStreamClass +{ + GFilterInputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_converter_input_stream_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GInputStream *g_converter_input_stream_new (GInputStream *base_stream, + GConverter *converter); +GLIB_AVAILABLE_IN_ALL +GConverter *g_converter_input_stream_get_converter (GConverterInputStream *converter_stream); + +G_END_DECLS + +#endif /* __G_CONVERTER_INPUT_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gconverteroutputstream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gconverteroutputstream.h new file mode 100755 index 00000000..b9a1e5d4 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gconverteroutputstream.h @@ -0,0 +1,80 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2009 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_CONVERTER_OUTPUT_STREAM_H__ +#define __G_CONVERTER_OUTPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gfilteroutputstream.h> +#include <gio/gconverter.h> + +G_BEGIN_DECLS + +#define G_TYPE_CONVERTER_OUTPUT_STREAM (g_converter_output_stream_get_type ()) +#define G_CONVERTER_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CONVERTER_OUTPUT_STREAM, GConverterOutputStream)) +#define G_CONVERTER_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CONVERTER_OUTPUT_STREAM, GConverterOutputStreamClass)) +#define G_IS_CONVERTER_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CONVERTER_OUTPUT_STREAM)) +#define G_IS_CONVERTER_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CONVERTER_OUTPUT_STREAM)) +#define G_CONVERTER_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CONVERTER_OUTPUT_STREAM, GConverterOutputStreamClass)) + +/** + * GConverterOutputStream: + * + * An implementation of #GFilterOutputStream that allows data + * conversion. + **/ +typedef struct _GConverterOutputStreamClass GConverterOutputStreamClass; +typedef struct _GConverterOutputStreamPrivate GConverterOutputStreamPrivate; + +struct _GConverterOutputStream +{ + GFilterOutputStream parent_instance; + + /*< private >*/ + GConverterOutputStreamPrivate *priv; +}; + +struct _GConverterOutputStreamClass +{ + GFilterOutputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_converter_output_stream_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GOutputStream *g_converter_output_stream_new (GOutputStream *base_stream, + GConverter *converter); +GLIB_AVAILABLE_IN_ALL +GConverter *g_converter_output_stream_get_converter (GConverterOutputStream *converter_stream); + +G_END_DECLS + +#endif /* __G_CONVERTER_OUTPUT_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gcredentials.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gcredentials.h new file mode 100755 index 00000000..25cebf2b --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gcredentials.h @@ -0,0 +1,85 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_CREDENTIALS_H__ +#define __G_CREDENTIALS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +#ifdef G_OS_UNIX +/* To get the uid_t type */ +#include <unistd.h> +#include <sys/types.h> +#endif + +G_BEGIN_DECLS + +#define G_TYPE_CREDENTIALS (g_credentials_get_type ()) +#define G_CREDENTIALS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CREDENTIALS, GCredentials)) +#define G_CREDENTIALS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CREDENTIALS, GCredentialsClass)) +#define G_CREDENTIALS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CREDENTIALS, GCredentialsClass)) +#define G_IS_CREDENTIALS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CREDENTIALS)) +#define G_IS_CREDENTIALS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CREDENTIALS)) + +typedef struct _GCredentialsClass GCredentialsClass; + +GLIB_AVAILABLE_IN_ALL +GType g_credentials_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GCredentials *g_credentials_new (void); + +GLIB_AVAILABLE_IN_ALL +gchar *g_credentials_to_string (GCredentials *credentials); + +GLIB_AVAILABLE_IN_ALL +gpointer g_credentials_get_native (GCredentials *credentials, + GCredentialsType native_type); + +GLIB_AVAILABLE_IN_ALL +void g_credentials_set_native (GCredentials *credentials, + GCredentialsType native_type, + gpointer native); + +GLIB_AVAILABLE_IN_ALL +gboolean g_credentials_is_same_user (GCredentials *credentials, + GCredentials *other_credentials, + GError **error); + +#ifdef G_OS_UNIX +GLIB_AVAILABLE_IN_2_36 +pid_t g_credentials_get_unix_pid (GCredentials *credentials, + GError **error); +GLIB_AVAILABLE_IN_ALL +uid_t g_credentials_get_unix_user (GCredentials *credentials, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_credentials_set_unix_user (GCredentials *credentials, + uid_t uid, + GError **error); +#endif + +G_END_DECLS + +#endif /* __G_DBUS_PROXY_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdatagrambased.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdatagrambased.h new file mode 100755 index 00000000..838b485d --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdatagrambased.h @@ -0,0 +1,144 @@ +/* + * Copyright 2015 Collabora Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Philip Withnall <philip.withnall@collabora.co.uk> + */ + +#ifndef __G_DATAGRAM_BASED_H__ +#define __G_DATAGRAM_BASED_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_DATAGRAM_BASED (g_datagram_based_get_type ()) +#define G_DATAGRAM_BASED(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_DATAGRAM_BASED, GDatagramBased)) +#define G_IS_DATAGRAM_BASED(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_DATAGRAM_BASED)) +#define G_DATAGRAM_BASED_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \ + G_TYPE_DATAGRAM_BASED, \ + GDatagramBasedInterface)) +#define G_TYPE_IS_DATAGRAM_BASED(type) (g_type_is_a ((type), \ + G_TYPE_DATAGRAM_BASED)) + +/** + * GDatagramBased: + * + * Interface for socket-like objects with datagram semantics. + * + * Since: 2.48 + */ +typedef struct _GDatagramBasedInterface GDatagramBasedInterface; + +/** + * GDatagramBasedInterface: + * @g_iface: The parent interface. + * @receive_messages: Virtual method for g_datagram_based_receive_messages(). + * @send_messages: Virtual method for g_datagram_based_send_messages(). + * @create_source: Virtual method for g_datagram_based_create_source(). + * @condition_check: Virtual method for g_datagram_based_condition_check(). + * @condition_wait: Virtual method for + * g_datagram_based_condition_wait(). + * + * Provides an interface for socket-like objects which have datagram semantics, + * following the Berkeley sockets API. The interface methods are thin wrappers + * around the corresponding virtual methods, and no pre-processing of inputs is + * implemented — so implementations of this API must handle all functionality + * documented in the interface methods. + * + * Since: 2.48 + */ +struct _GDatagramBasedInterface +{ + GTypeInterface g_iface; + + /* Virtual table */ + gint (*receive_messages) (GDatagramBased *datagram_based, + GInputMessage *messages, + guint num_messages, + gint flags, + gint64 timeout, + GCancellable *cancellable, + GError **error); + gint (*send_messages) (GDatagramBased *datagram_based, + GOutputMessage *messages, + guint num_messages, + gint flags, + gint64 timeout, + GCancellable *cancellable, + GError **error); + + GSource *(*create_source) (GDatagramBased *datagram_based, + GIOCondition condition, + GCancellable *cancellable); + GIOCondition (*condition_check) (GDatagramBased *datagram_based, + GIOCondition condition); + gboolean (*condition_wait) (GDatagramBased *datagram_based, + GIOCondition condition, + gint64 timeout, + GCancellable *cancellable, + GError **error); +}; + +GLIB_AVAILABLE_IN_2_48 +GType +g_datagram_based_get_type (void); + +GLIB_AVAILABLE_IN_2_48 +gint +g_datagram_based_receive_messages (GDatagramBased *datagram_based, + GInputMessage *messages, + guint num_messages, + gint flags, + gint64 timeout, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_2_48 +gint +g_datagram_based_send_messages (GDatagramBased *datagram_based, + GOutputMessage *messages, + guint num_messages, + gint flags, + gint64 timeout, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_2_48 +GSource * +g_datagram_based_create_source (GDatagramBased *datagram_based, + GIOCondition condition, + GCancellable *cancellable); +GLIB_AVAILABLE_IN_2_48 +GIOCondition +g_datagram_based_condition_check (GDatagramBased *datagram_based, + GIOCondition condition); +GLIB_AVAILABLE_IN_2_48 +gboolean +g_datagram_based_condition_wait (GDatagramBased *datagram_based, + GIOCondition condition, + gint64 timeout, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + +#endif /* __G_DATAGRAM_BASED_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdatainputstream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdatainputstream.h new file mode 100755 index 00000000..3ad3b825 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdatainputstream.h @@ -0,0 +1,180 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_DATA_INPUT_STREAM_H__ +#define __G_DATA_INPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gbufferedinputstream.h> + +G_BEGIN_DECLS + +#define G_TYPE_DATA_INPUT_STREAM (g_data_input_stream_get_type ()) +#define G_DATA_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DATA_INPUT_STREAM, GDataInputStream)) +#define G_DATA_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DATA_INPUT_STREAM, GDataInputStreamClass)) +#define G_IS_DATA_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DATA_INPUT_STREAM)) +#define G_IS_DATA_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DATA_INPUT_STREAM)) +#define G_DATA_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DATA_INPUT_STREAM, GDataInputStreamClass)) + +/** + * GDataInputStream: + * + * An implementation of #GBufferedInputStream that allows for high-level + * data manipulation of arbitrary data (including binary operations). + **/ +typedef struct _GDataInputStreamClass GDataInputStreamClass; +typedef struct _GDataInputStreamPrivate GDataInputStreamPrivate; + +struct _GDataInputStream +{ + GBufferedInputStream parent_instance; + + /*< private >*/ + GDataInputStreamPrivate *priv; +}; + +struct _GDataInputStreamClass +{ + GBufferedInputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_data_input_stream_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GDataInputStream * g_data_input_stream_new (GInputStream *base_stream); + +GLIB_AVAILABLE_IN_ALL +void g_data_input_stream_set_byte_order (GDataInputStream *stream, + GDataStreamByteOrder order); +GLIB_AVAILABLE_IN_ALL +GDataStreamByteOrder g_data_input_stream_get_byte_order (GDataInputStream *stream); +GLIB_AVAILABLE_IN_ALL +void g_data_input_stream_set_newline_type (GDataInputStream *stream, + GDataStreamNewlineType type); +GLIB_AVAILABLE_IN_ALL +GDataStreamNewlineType g_data_input_stream_get_newline_type (GDataInputStream *stream); +GLIB_AVAILABLE_IN_ALL +guchar g_data_input_stream_read_byte (GDataInputStream *stream, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gint16 g_data_input_stream_read_int16 (GDataInputStream *stream, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +guint16 g_data_input_stream_read_uint16 (GDataInputStream *stream, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gint32 g_data_input_stream_read_int32 (GDataInputStream *stream, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +guint32 g_data_input_stream_read_uint32 (GDataInputStream *stream, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gint64 g_data_input_stream_read_int64 (GDataInputStream *stream, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +guint64 g_data_input_stream_read_uint64 (GDataInputStream *stream, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +char * g_data_input_stream_read_line (GDataInputStream *stream, + gsize *length, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_2_30 +char * g_data_input_stream_read_line_utf8 (GDataInputStream *stream, + gsize *length, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_data_input_stream_read_line_async (GDataInputStream *stream, + gint io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +char * g_data_input_stream_read_line_finish (GDataInputStream *stream, + GAsyncResult *result, + gsize *length, + GError **error); +GLIB_AVAILABLE_IN_2_30 +char * g_data_input_stream_read_line_finish_utf8(GDataInputStream *stream, + GAsyncResult *result, + gsize *length, + GError **error); +GLIB_DEPRECATED_IN_2_56_FOR (g_data_input_stream_read_upto) +char * g_data_input_stream_read_until (GDataInputStream *stream, + const gchar *stop_chars, + gsize *length, + GCancellable *cancellable, + GError **error); +GLIB_DEPRECATED_IN_2_56_FOR (g_data_input_stream_read_upto_async) +void g_data_input_stream_read_until_async (GDataInputStream *stream, + const gchar *stop_chars, + gint io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_DEPRECATED_IN_2_56_FOR (g_data_input_stream_read_upto_finish) +char * g_data_input_stream_read_until_finish (GDataInputStream *stream, + GAsyncResult *result, + gsize *length, + GError **error); + +GLIB_AVAILABLE_IN_ALL +char * g_data_input_stream_read_upto (GDataInputStream *stream, + const gchar *stop_chars, + gssize stop_chars_len, + gsize *length, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_data_input_stream_read_upto_async (GDataInputStream *stream, + const gchar *stop_chars, + gssize stop_chars_len, + gint io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +char * g_data_input_stream_read_upto_finish (GDataInputStream *stream, + GAsyncResult *result, + gsize *length, + GError **error); + +G_END_DECLS + +#endif /* __G_DATA_INPUT_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdataoutputstream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdataoutputstream.h new file mode 100755 index 00000000..62cf7b5e --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdataoutputstream.h @@ -0,0 +1,125 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_DATA_OUTPUT_STREAM_H__ +#define __G_DATA_OUTPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gfilteroutputstream.h> + +G_BEGIN_DECLS + +#define G_TYPE_DATA_OUTPUT_STREAM (g_data_output_stream_get_type ()) +#define G_DATA_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DATA_OUTPUT_STREAM, GDataOutputStream)) +#define G_DATA_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DATA_OUTPUT_STREAM, GDataOutputStreamClass)) +#define G_IS_DATA_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DATA_OUTPUT_STREAM)) +#define G_IS_DATA_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DATA_OUTPUT_STREAM)) +#define G_DATA_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DATA_OUTPUT_STREAM, GDataOutputStreamClass)) + +/** + * GDataOutputStream: + * + * An implementation of #GBufferedOutputStream that allows for high-level + * data manipulation of arbitrary data (including binary operations). + **/ +typedef struct _GDataOutputStream GDataOutputStream; +typedef struct _GDataOutputStreamClass GDataOutputStreamClass; +typedef struct _GDataOutputStreamPrivate GDataOutputStreamPrivate; + +struct _GDataOutputStream +{ + GFilterOutputStream parent_instance; + + /*< private >*/ + GDataOutputStreamPrivate *priv; +}; + +struct _GDataOutputStreamClass +{ + GFilterOutputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + + +GLIB_AVAILABLE_IN_ALL +GType g_data_output_stream_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GDataOutputStream * g_data_output_stream_new (GOutputStream *base_stream); + +GLIB_AVAILABLE_IN_ALL +void g_data_output_stream_set_byte_order (GDataOutputStream *stream, + GDataStreamByteOrder order); +GLIB_AVAILABLE_IN_ALL +GDataStreamByteOrder g_data_output_stream_get_byte_order (GDataOutputStream *stream); + +GLIB_AVAILABLE_IN_ALL +gboolean g_data_output_stream_put_byte (GDataOutputStream *stream, + guchar data, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_data_output_stream_put_int16 (GDataOutputStream *stream, + gint16 data, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_data_output_stream_put_uint16 (GDataOutputStream *stream, + guint16 data, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_data_output_stream_put_int32 (GDataOutputStream *stream, + gint32 data, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_data_output_stream_put_uint32 (GDataOutputStream *stream, + guint32 data, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_data_output_stream_put_int64 (GDataOutputStream *stream, + gint64 data, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_data_output_stream_put_uint64 (GDataOutputStream *stream, + guint64 data, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_data_output_stream_put_string (GDataOutputStream *stream, + const char *str, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + +#endif /* __G_DATA_OUTPUT_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusactiongroup.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusactiongroup.h new file mode 100755 index 00000000..93e6a2cf --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusactiongroup.h @@ -0,0 +1,54 @@ +/* + * Copyright © 2010 Codethink Limited + * Copyright © 2011 Canonical Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_DBUS_ACTION_GROUP_H__ +#define __G_DBUS_ACTION_GROUP_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include "giotypes.h" + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_ACTION_GROUP (g_dbus_action_group_get_type ()) +#define G_DBUS_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_DBUS_ACTION_GROUP, GDBusActionGroup)) +#define G_DBUS_ACTION_GROUP_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_DBUS_ACTION_GROUP, GDBusActionGroupClass)) +#define G_IS_DBUS_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_DBUS_ACTION_GROUP)) +#define G_IS_DBUS_ACTION_GROUP_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_DBUS_ACTION_GROUP)) +#define G_DBUS_ACTION_GROUP_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_DBUS_ACTION_GROUP, GDBusActionGroupClass)) + +GLIB_AVAILABLE_IN_ALL +GType g_dbus_action_group_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_32 +GDBusActionGroup * g_dbus_action_group_get (GDBusConnection *connection, + const gchar *bus_name, + const gchar *object_path); + +G_END_DECLS + +#endif /* __G_DBUS_ACTION_GROUP_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusaddress.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusaddress.h new file mode 100755 index 00000000..43915bb8 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusaddress.h @@ -0,0 +1,65 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_ADDRESS_H__ +#define __G_DBUS_ADDRESS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_2_36 +gchar *g_dbus_address_escape_value (const gchar *string); + +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_is_address (const gchar *string); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_is_supported_address (const gchar *string, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_dbus_address_get_stream (const gchar *address, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +GIOStream *g_dbus_address_get_stream_finish (GAsyncResult *res, + gchar **out_guid, + GError **error); + +GLIB_AVAILABLE_IN_ALL +GIOStream *g_dbus_address_get_stream_sync (const gchar *address, + gchar **out_guid, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gchar *g_dbus_address_get_for_bus_sync (GBusType bus_type, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + +#endif /* __G_DBUS_ADDRESS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusauthobserver.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusauthobserver.h new file mode 100755 index 00000000..8fe7b329 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusauthobserver.h @@ -0,0 +1,51 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_AUTH_OBSERVER_H__ +#define __G_DBUS_AUTH_OBSERVER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_AUTH_OBSERVER (g_dbus_auth_observer_get_type ()) +#define G_DBUS_AUTH_OBSERVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_AUTH_OBSERVER, GDBusAuthObserver)) +#define G_IS_DBUS_AUTH_OBSERVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_AUTH_OBSERVER)) + +GLIB_AVAILABLE_IN_ALL +GType g_dbus_auth_observer_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GDBusAuthObserver *g_dbus_auth_observer_new (void); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_auth_observer_authorize_authenticated_peer (GDBusAuthObserver *observer, + GIOStream *stream, + GCredentials *credentials); + +GLIB_AVAILABLE_IN_2_34 +gboolean g_dbus_auth_observer_allow_mechanism (GDBusAuthObserver *observer, + const gchar *mechanism); + +G_END_DECLS + +#endif /* _G_DBUS_AUTH_OBSERVER_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusconnection.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusconnection.h new file mode 100755 index 00000000..b2c50354 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusconnection.h @@ -0,0 +1,681 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_CONNECTION_H__ +#define __G_DBUS_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_CONNECTION (g_dbus_connection_get_type ()) +#define G_DBUS_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_CONNECTION, GDBusConnection)) +#define G_IS_DBUS_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_CONNECTION)) + +GLIB_AVAILABLE_IN_ALL +GType g_dbus_connection_get_type (void) G_GNUC_CONST; + +/* ---------------------------------------------------------------------------------------------------- */ + +GLIB_AVAILABLE_IN_ALL +void g_bus_get (GBusType bus_type, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GDBusConnection *g_bus_get_finish (GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GDBusConnection *g_bus_get_sync (GBusType bus_type, + GCancellable *cancellable, + GError **error); + +/* ---------------------------------------------------------------------------------------------------- */ + +GLIB_AVAILABLE_IN_ALL +void g_dbus_connection_new (GIOStream *stream, + const gchar *guid, + GDBusConnectionFlags flags, + GDBusAuthObserver *observer, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_connection_new_finish (GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_connection_new_sync (GIOStream *stream, + const gchar *guid, + GDBusConnectionFlags flags, + GDBusAuthObserver *observer, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_dbus_connection_new_for_address (const gchar *address, + GDBusConnectionFlags flags, + GDBusAuthObserver *observer, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_connection_new_for_address_finish (GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_connection_new_for_address_sync (const gchar *address, + GDBusConnectionFlags flags, + GDBusAuthObserver *observer, + GCancellable *cancellable, + GError **error); + +/* ---------------------------------------------------------------------------------------------------- */ + +GLIB_AVAILABLE_IN_ALL +void g_dbus_connection_start_message_processing (GDBusConnection *connection); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_connection_is_closed (GDBusConnection *connection); +GLIB_AVAILABLE_IN_ALL +GIOStream *g_dbus_connection_get_stream (GDBusConnection *connection); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_connection_get_guid (GDBusConnection *connection); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_connection_get_unique_name (GDBusConnection *connection); +GLIB_AVAILABLE_IN_ALL +GCredentials *g_dbus_connection_get_peer_credentials (GDBusConnection *connection); + +GLIB_AVAILABLE_IN_2_34 +guint32 g_dbus_connection_get_last_serial (GDBusConnection *connection); + +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_connection_get_exit_on_close (GDBusConnection *connection); +GLIB_AVAILABLE_IN_ALL +void g_dbus_connection_set_exit_on_close (GDBusConnection *connection, + gboolean exit_on_close); +GLIB_AVAILABLE_IN_ALL +GDBusCapabilityFlags g_dbus_connection_get_capabilities (GDBusConnection *connection); + +/* ---------------------------------------------------------------------------------------------------- */ + +GLIB_AVAILABLE_IN_ALL +void g_dbus_connection_close (GDBusConnection *connection, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_connection_close_finish (GDBusConnection *connection, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_connection_close_sync (GDBusConnection *connection, + GCancellable *cancellable, + GError **error); + +/* ---------------------------------------------------------------------------------------------------- */ + +GLIB_AVAILABLE_IN_ALL +void g_dbus_connection_flush (GDBusConnection *connection, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_connection_flush_finish (GDBusConnection *connection, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_connection_flush_sync (GDBusConnection *connection, + GCancellable *cancellable, + GError **error); + +/* ---------------------------------------------------------------------------------------------------- */ + +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_connection_send_message (GDBusConnection *connection, + GDBusMessage *message, + GDBusSendMessageFlags flags, + volatile guint32 *out_serial, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_dbus_connection_send_message_with_reply (GDBusConnection *connection, + GDBusMessage *message, + GDBusSendMessageFlags flags, + gint timeout_msec, + volatile guint32 *out_serial, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_connection_send_message_with_reply_finish (GDBusConnection *connection, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_connection_send_message_with_reply_sync (GDBusConnection *connection, + GDBusMessage *message, + GDBusSendMessageFlags flags, + gint timeout_msec, + volatile guint32 *out_serial, + GCancellable *cancellable, + GError **error); + +/* ---------------------------------------------------------------------------------------------------- */ + +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_connection_emit_signal (GDBusConnection *connection, + const gchar *destination_bus_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *signal_name, + GVariant *parameters, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_dbus_connection_call (GDBusConnection *connection, + const gchar *bus_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + const GVariantType *reply_type, + GDBusCallFlags flags, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GVariant *g_dbus_connection_call_finish (GDBusConnection *connection, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GVariant *g_dbus_connection_call_sync (GDBusConnection *connection, + const gchar *bus_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + const GVariantType *reply_type, + GDBusCallFlags flags, + gint timeout_msec, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_2_30 +void g_dbus_connection_call_with_unix_fd_list (GDBusConnection *connection, + const gchar *bus_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + const GVariantType *reply_type, + GDBusCallFlags flags, + gint timeout_msec, + GUnixFDList *fd_list, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_2_30 +GVariant *g_dbus_connection_call_with_unix_fd_list_finish (GDBusConnection *connection, + GUnixFDList **out_fd_list, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_2_30 +GVariant *g_dbus_connection_call_with_unix_fd_list_sync (GDBusConnection *connection, + const gchar *bus_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + const GVariantType *reply_type, + GDBusCallFlags flags, + gint timeout_msec, + GUnixFDList *fd_list, + GUnixFDList **out_fd_list, + GCancellable *cancellable, + GError **error); + +/* ---------------------------------------------------------------------------------------------------- */ + + +/** + * GDBusInterfaceMethodCallFunc: + * @connection: A #GDBusConnection. + * @sender: The unique bus name of the remote caller. + * @object_path: The object path that the method was invoked on. + * @interface_name: The D-Bus interface name the method was invoked on. + * @method_name: The name of the method that was invoked. + * @parameters: A #GVariant tuple with parameters. + * @invocation: (transfer full): A #GDBusMethodInvocation object that must be used to return a value or error. + * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object(). + * + * The type of the @method_call function in #GDBusInterfaceVTable. + * + * Since: 2.26 + */ +typedef void (*GDBusInterfaceMethodCallFunc) (GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation, + gpointer user_data); + +/** + * GDBusInterfaceGetPropertyFunc: + * @connection: A #GDBusConnection. + * @sender: The unique bus name of the remote caller. + * @object_path: The object path that the method was invoked on. + * @interface_name: The D-Bus interface name for the property. + * @property_name: The name of the property to get the value of. + * @error: Return location for error. + * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object(). + * + * The type of the @get_property function in #GDBusInterfaceVTable. + * + * Returns: A #GVariant with the value for @property_name or %NULL if + * @error is set. If the returned #GVariant is floating, it is + * consumed - otherwise its reference count is decreased by one. + * + * Since: 2.26 + */ +typedef GVariant *(*GDBusInterfaceGetPropertyFunc) (GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error, + gpointer user_data); + +/** + * GDBusInterfaceSetPropertyFunc: + * @connection: A #GDBusConnection. + * @sender: The unique bus name of the remote caller. + * @object_path: The object path that the method was invoked on. + * @interface_name: The D-Bus interface name for the property. + * @property_name: The name of the property to get the value of. + * @value: The value to set the property to. + * @error: Return location for error. + * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object(). + * + * The type of the @set_property function in #GDBusInterfaceVTable. + * + * Returns: %TRUE if the property was set to @value, %FALSE if @error is set. + * + * Since: 2.26 + */ +typedef gboolean (*GDBusInterfaceSetPropertyFunc) (GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *value, + GError **error, + gpointer user_data); + +/** + * GDBusInterfaceVTable: + * @method_call: Function for handling incoming method calls. + * @get_property: Function for getting a property. + * @set_property: Function for setting a property. + * + * Virtual table for handling properties and method calls for a D-Bus + * interface. + * + * Since 2.38, if you want to handle getting/setting D-Bus properties + * asynchronously, give %NULL as your get_property() or set_property() + * function. The D-Bus call will be directed to your @method_call function, + * with the provided @interface_name set to "org.freedesktop.DBus.Properties". + * + * Ownership of the #GDBusMethodInvocation object passed to the + * method_call() function is transferred to your handler; you must + * call one of the methods of #GDBusMethodInvocation to return a reply + * (possibly empty), or an error. These functions also take ownership + * of the passed-in invocation object, so unless the invocation + * object has otherwise been referenced, it will be then be freed. + * Calling one of these functions may be done within your + * method_call() implementation but it also can be done at a later + * point to handle the method asynchronously. + * + * The usual checks on the validity of the calls is performed. For + * `Get` calls, an error is automatically returned if the property does + * not exist or the permissions do not allow access. The same checks are + * performed for `Set` calls, and the provided value is also checked for + * being the correct type. + * + * For both `Get` and `Set` calls, the #GDBusMethodInvocation + * passed to the @method_call handler can be queried with + * g_dbus_method_invocation_get_property_info() to get a pointer + * to the #GDBusPropertyInfo of the property. + * + * If you have readable properties specified in your interface info, + * you must ensure that you either provide a non-%NULL @get_property() + * function or provide implementations of both the `Get` and `GetAll` + * methods on org.freedesktop.DBus.Properties interface in your @method_call + * function. Note that the required return type of the `Get` call is + * `(v)`, not the type of the property. `GetAll` expects a return value + * of type `a{sv}`. + * + * If you have writable properties specified in your interface info, + * you must ensure that you either provide a non-%NULL @set_property() + * function or provide an implementation of the `Set` call. If implementing + * the call, you must return the value of type %G_VARIANT_TYPE_UNIT. + * + * Since: 2.26 + */ +struct _GDBusInterfaceVTable +{ + GDBusInterfaceMethodCallFunc method_call; + GDBusInterfaceGetPropertyFunc get_property; + GDBusInterfaceSetPropertyFunc set_property; + + /*< private >*/ + /* Padding for future expansion - also remember to update + * gdbusconnection.c:_g_dbus_interface_vtable_copy() when + * changing this. + */ + gpointer padding[8]; +}; + +GLIB_AVAILABLE_IN_ALL +guint g_dbus_connection_register_object (GDBusConnection *connection, + const gchar *object_path, + GDBusInterfaceInfo *interface_info, + const GDBusInterfaceVTable *vtable, + gpointer user_data, + GDestroyNotify user_data_free_func, + GError **error); +GLIB_AVAILABLE_IN_2_46 +guint g_dbus_connection_register_object_with_closures (GDBusConnection *connection, + const gchar *object_path, + GDBusInterfaceInfo *interface_info, + GClosure *method_call_closure, + GClosure *get_property_closure, + GClosure *set_property_closure, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_connection_unregister_object (GDBusConnection *connection, + guint registration_id); + +/* ---------------------------------------------------------------------------------------------------- */ + +/** + * GDBusSubtreeEnumerateFunc: + * @connection: A #GDBusConnection. + * @sender: The unique bus name of the remote caller. + * @object_path: The object path that was registered with g_dbus_connection_register_subtree(). + * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree(). + * + * The type of the @enumerate function in #GDBusSubtreeVTable. + * + * This function is called when generating introspection data and also + * when preparing to dispatch incoming messages in the event that the + * %G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is not + * specified (ie: to verify that the object path is valid). + * + * Hierarchies are not supported; the items that you return should not + * contain the '/' character. + * + * The return value will be freed with g_strfreev(). + * + * Returns: A newly allocated array of strings for node names that are children of @object_path. + * + * Since: 2.26 + */ +typedef gchar** (*GDBusSubtreeEnumerateFunc) (GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + gpointer user_data); + +/** + * GDBusSubtreeIntrospectFunc: + * @connection: A #GDBusConnection. + * @sender: The unique bus name of the remote caller. + * @object_path: The object path that was registered with g_dbus_connection_register_subtree(). + * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree. + * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree(). + * + * The type of the @introspect function in #GDBusSubtreeVTable. + * + * Subtrees are flat. @node, if non-%NULL, is always exactly one + * segment of the object path (ie: it never contains a slash). + * + * This function should return %NULL to indicate that there is no object + * at this node. + * + * If this function returns non-%NULL, the return value is expected to + * be a %NULL-terminated array of pointers to #GDBusInterfaceInfo + * structures describing the interfaces implemented by @node. This + * array will have g_dbus_interface_info_unref() called on each item + * before being freed with g_free(). + * + * The difference between returning %NULL and an array containing zero + * items is that the standard DBus interfaces will returned to the + * remote introspector in the empty array case, but not in the %NULL + * case. + * + * Returns: A %NULL-terminated array of pointers to #GDBusInterfaceInfo, or %NULL. + * + * Since: 2.26 + */ +typedef GDBusInterfaceInfo ** (*GDBusSubtreeIntrospectFunc) (GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *node, + gpointer user_data); + +/** + * GDBusSubtreeDispatchFunc: + * @connection: A #GDBusConnection. + * @sender: The unique bus name of the remote caller. + * @object_path: The object path that was registered with g_dbus_connection_register_subtree(). + * @interface_name: The D-Bus interface name that the method call or property access is for. + * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree. + * @out_user_data: (nullable) (not optional): Return location for user data to pass to functions in the returned #GDBusInterfaceVTable (never %NULL). + * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree(). + * + * The type of the @dispatch function in #GDBusSubtreeVTable. + * + * Subtrees are flat. @node, if non-%NULL, is always exactly one + * segment of the object path (ie: it never contains a slash). + * + * Returns: A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods. + * + * Since: 2.26 + */ +typedef const GDBusInterfaceVTable * (*GDBusSubtreeDispatchFunc) (GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *node, + gpointer *out_user_data, + gpointer user_data); + +/** + * GDBusSubtreeVTable: + * @enumerate: Function for enumerating child nodes. + * @introspect: Function for introspecting a child node. + * @dispatch: Function for dispatching a remote call on a child node. + * + * Virtual table for handling subtrees registered with g_dbus_connection_register_subtree(). + * + * Since: 2.26 + */ +struct _GDBusSubtreeVTable +{ + GDBusSubtreeEnumerateFunc enumerate; + GDBusSubtreeIntrospectFunc introspect; + GDBusSubtreeDispatchFunc dispatch; + + /*< private >*/ + /* Padding for future expansion - also remember to update + * gdbusconnection.c:_g_dbus_subtree_vtable_copy() when + * changing this. + */ + gpointer padding[8]; +}; + +GLIB_AVAILABLE_IN_ALL +guint g_dbus_connection_register_subtree (GDBusConnection *connection, + const gchar *object_path, + const GDBusSubtreeVTable *vtable, + GDBusSubtreeFlags flags, + gpointer user_data, + GDestroyNotify user_data_free_func, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_connection_unregister_subtree (GDBusConnection *connection, + guint registration_id); + +/* ---------------------------------------------------------------------------------------------------- */ + +/** + * GDBusSignalCallback: + * @connection: A #GDBusConnection. + * @sender_name: The unique bus name of the sender of the signal. + * @object_path: The object path that the signal was emitted on. + * @interface_name: The name of the interface. + * @signal_name: The name of the signal. + * @parameters: A #GVariant tuple with parameters for the signal. + * @user_data: User data passed when subscribing to the signal. + * + * Signature for callback function used in g_dbus_connection_signal_subscribe(). + * + * Since: 2.26 + */ +typedef void (*GDBusSignalCallback) (GDBusConnection *connection, + const gchar *sender_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *signal_name, + GVariant *parameters, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +guint g_dbus_connection_signal_subscribe (GDBusConnection *connection, + const gchar *sender, + const gchar *interface_name, + const gchar *member, + const gchar *object_path, + const gchar *arg0, + GDBusSignalFlags flags, + GDBusSignalCallback callback, + gpointer user_data, + GDestroyNotify user_data_free_func); +GLIB_AVAILABLE_IN_ALL +void g_dbus_connection_signal_unsubscribe (GDBusConnection *connection, + guint subscription_id); + +/* ---------------------------------------------------------------------------------------------------- */ + +/** + * GDBusMessageFilterFunction: + * @connection: (transfer none): A #GDBusConnection. + * @message: (transfer full): A locked #GDBusMessage that the filter function takes ownership of. + * @incoming: %TRUE if it is a message received from the other peer, %FALSE if it is + * a message to be sent to the other peer. + * @user_data: User data passed when adding the filter. + * + * Signature for function used in g_dbus_connection_add_filter(). + * + * A filter function is passed a #GDBusMessage and expected to return + * a #GDBusMessage too. Passive filter functions that don't modify the + * message can simply return the @message object: + * |[ + * static GDBusMessage * + * passive_filter (GDBusConnection *connection + * GDBusMessage *message, + * gboolean incoming, + * gpointer user_data) + * { + * // inspect @message + * return message; + * } + * ]| + * Filter functions that wants to drop a message can simply return %NULL: + * |[ + * static GDBusMessage * + * drop_filter (GDBusConnection *connection + * GDBusMessage *message, + * gboolean incoming, + * gpointer user_data) + * { + * if (should_drop_message) + * { + * g_object_unref (message); + * message = NULL; + * } + * return message; + * } + * ]| + * Finally, a filter function may modify a message by copying it: + * |[ + * static GDBusMessage * + * modifying_filter (GDBusConnection *connection + * GDBusMessage *message, + * gboolean incoming, + * gpointer user_data) + * { + * GDBusMessage *copy; + * GError *error; + * + * error = NULL; + * copy = g_dbus_message_copy (message, &error); + * // handle @error being set + * g_object_unref (message); + * + * // modify @copy + * + * return copy; + * } + * ]| + * If the returned #GDBusMessage is different from @message and cannot + * be sent on @connection (it could use features, such as file + * descriptors, not compatible with @connection), then a warning is + * logged to standard error. Applications can + * check this ahead of time using g_dbus_message_to_blob() passing a + * #GDBusCapabilityFlags value obtained from @connection. + * + * Returns: (transfer full) (nullable): A #GDBusMessage that will be freed with + * g_object_unref() or %NULL to drop the message. Passive filter + * functions can simply return the passed @message object. + * + * Since: 2.26 + */ +typedef GDBusMessage *(*GDBusMessageFilterFunction) (GDBusConnection *connection, + GDBusMessage *message, + gboolean incoming, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +guint g_dbus_connection_add_filter (GDBusConnection *connection, + GDBusMessageFilterFunction filter_function, + gpointer user_data, + GDestroyNotify user_data_free_func); + +GLIB_AVAILABLE_IN_ALL +void g_dbus_connection_remove_filter (GDBusConnection *connection, + guint filter_id); + +/* ---------------------------------------------------------------------------------------------------- */ + + +G_END_DECLS + +#endif /* __G_DBUS_CONNECTION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbuserror.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbuserror.h new file mode 100755 index 00000000..35a156cb --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbuserror.h @@ -0,0 +1,109 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_ERROR_H__ +#define __G_DBUS_ERROR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +/** + * G_DBUS_ERROR: + * + * Error domain for errors generated by a remote message bus. Errors + * in this domain will be from the #GDBusError enumeration. See + * #GError for more information on error domains. + * + * Note that this error domain is intended only for + * returning errors from a remote message bus process. Errors + * generated locally in-process by e.g. #GDBusConnection should use the + * %G_IO_ERROR domain. + * + * Since: 2.26 + */ +#define G_DBUS_ERROR g_dbus_error_quark() + +GLIB_AVAILABLE_IN_ALL +GQuark g_dbus_error_quark (void); + +/* Used by applications to check, get and strip the D-Bus error name */ +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_error_is_remote_error (const GError *error); +GLIB_AVAILABLE_IN_ALL +gchar *g_dbus_error_get_remote_error (const GError *error); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_error_strip_remote_error (GError *error); + +/** + * GDBusErrorEntry: + * @error_code: An error code. + * @dbus_error_name: The D-Bus error name to associate with @error_code. + * + * Struct used in g_dbus_error_register_error_domain(). + * + * Since: 2.26 + */ +struct _GDBusErrorEntry +{ + gint error_code; + const gchar *dbus_error_name; +}; + +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_error_register_error (GQuark error_domain, + gint error_code, + const gchar *dbus_error_name); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_error_unregister_error (GQuark error_domain, + gint error_code, + const gchar *dbus_error_name); +GLIB_AVAILABLE_IN_ALL +void g_dbus_error_register_error_domain (const gchar *error_domain_quark_name, + volatile gsize *quark_volatile, + const GDBusErrorEntry *entries, + guint num_entries); + +/* Only used by object mappings to map back and forth to GError */ +GLIB_AVAILABLE_IN_ALL +GError *g_dbus_error_new_for_dbus_error (const gchar *dbus_error_name, + const gchar *dbus_error_message); +GLIB_AVAILABLE_IN_ALL +void g_dbus_error_set_dbus_error (GError **error, + const gchar *dbus_error_name, + const gchar *dbus_error_message, + const gchar *format, + ...) G_GNUC_PRINTF(4, 5); +GLIB_AVAILABLE_IN_ALL +void g_dbus_error_set_dbus_error_valist (GError **error, + const gchar *dbus_error_name, + const gchar *dbus_error_message, + const gchar *format, + va_list var_args) G_GNUC_PRINTF(4, 0); +GLIB_AVAILABLE_IN_ALL +gchar *g_dbus_error_encode_gerror (const GError *error); + +G_END_DECLS + +#endif /* __G_DBUS_ERROR_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusinterface.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusinterface.h new file mode 100755 index 00000000..b2f3c440 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusinterface.h @@ -0,0 +1,81 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_INTERFACE_H__ +#define __G_DBUS_INTERFACE_H__ + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_INTERFACE (g_dbus_interface_get_type()) +#define G_DBUS_INTERFACE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_INTERFACE, GDBusInterface)) +#define G_IS_DBUS_INTERFACE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_INTERFACE)) +#define G_DBUS_INTERFACE_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), G_TYPE_DBUS_INTERFACE, GDBusInterfaceIface)) + +/** + * GDBusInterface: + * + * Base type for D-Bus interfaces. + * + * Since: 2.30 + */ + +typedef struct _GDBusInterfaceIface GDBusInterfaceIface; + +/** + * GDBusInterfaceIface: + * @parent_iface: The parent interface. + * @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_get_info(). + * @get_object: Gets the enclosing #GDBusObject. See g_dbus_interface_get_object(). + * @set_object: Sets the enclosing #GDBusObject. See g_dbus_interface_set_object(). + * @dup_object: Gets a reference to the enclosing #GDBusObject. See g_dbus_interface_dup_object(). Added in 2.32. + * + * Base type for D-Bus interfaces. + * + * Since: 2.30 + */ +struct _GDBusInterfaceIface +{ + GTypeInterface parent_iface; + + /* Virtual Functions */ + GDBusInterfaceInfo *(*get_info) (GDBusInterface *interface_); + GDBusObject *(*get_object) (GDBusInterface *interface_); + void (*set_object) (GDBusInterface *interface_, + GDBusObject *object); + GDBusObject *(*dup_object) (GDBusInterface *interface_); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_dbus_interface_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GDBusInterfaceInfo *g_dbus_interface_get_info (GDBusInterface *interface_); +GLIB_AVAILABLE_IN_ALL +GDBusObject *g_dbus_interface_get_object (GDBusInterface *interface_); +GLIB_AVAILABLE_IN_ALL +void g_dbus_interface_set_object (GDBusInterface *interface_, + GDBusObject *object); +GLIB_AVAILABLE_IN_2_32 +GDBusObject *g_dbus_interface_dup_object (GDBusInterface *interface_); + +G_END_DECLS + +#endif /* __G_DBUS_INTERFACE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusinterfaceskeleton.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusinterfaceskeleton.h new file mode 100755 index 00000000..bf3b630e --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusinterfaceskeleton.h @@ -0,0 +1,127 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_INTERFACE_SKELETON_H__ +#define __G_DBUS_INTERFACE_SKELETON_H__ + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_INTERFACE_SKELETON (g_dbus_interface_skeleton_get_type ()) +#define G_DBUS_INTERFACE_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_INTERFACE_SKELETON, GDBusInterfaceSkeleton)) +#define G_DBUS_INTERFACE_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_INTERFACE_SKELETON, GDBusInterfaceSkeletonClass)) +#define G_DBUS_INTERFACE_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_INTERFACE_SKELETON, GDBusInterfaceSkeletonClass)) +#define G_IS_DBUS_INTERFACE_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_INTERFACE_SKELETON)) +#define G_IS_DBUS_INTERFACE_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_INTERFACE_SKELETON)) + +typedef struct _GDBusInterfaceSkeletonClass GDBusInterfaceSkeletonClass; +typedef struct _GDBusInterfaceSkeletonPrivate GDBusInterfaceSkeletonPrivate; + +/** + * GDBusInterfaceSkeleton: + * + * The #GDBusInterfaceSkeleton structure contains private data and should + * only be accessed using the provided API. + * + * Since: 2.30 + */ +struct _GDBusInterfaceSkeleton +{ + /*< private >*/ + GObject parent_instance; + GDBusInterfaceSkeletonPrivate *priv; +}; + +/** + * GDBusInterfaceSkeletonClass: + * @parent_class: The parent class. + * @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_skeleton_get_info() for details. + * @get_vtable: Returns a #GDBusInterfaceVTable. See g_dbus_interface_skeleton_get_vtable() for details. + * @get_properties: Returns a #GVariant with all properties. See g_dbus_interface_skeleton_get_properties(). + * @flush: Emits outstanding changes, if any. See g_dbus_interface_skeleton_flush(). + * @g_authorize_method: Signal class handler for the #GDBusInterfaceSkeleton::g-authorize-method signal. + * + * Class structure for #GDBusInterfaceSkeleton. + * + * Since: 2.30 + */ +struct _GDBusInterfaceSkeletonClass +{ + GObjectClass parent_class; + + /* Virtual Functions */ + GDBusInterfaceInfo *(*get_info) (GDBusInterfaceSkeleton *interface_); + GDBusInterfaceVTable *(*get_vtable) (GDBusInterfaceSkeleton *interface_); + GVariant *(*get_properties) (GDBusInterfaceSkeleton *interface_); + void (*flush) (GDBusInterfaceSkeleton *interface_); + + /*< private >*/ + gpointer vfunc_padding[8]; + /*< public >*/ + + /* Signals */ + gboolean (*g_authorize_method) (GDBusInterfaceSkeleton *interface_, + GDBusMethodInvocation *invocation); + + /*< private >*/ + gpointer signal_padding[8]; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_dbus_interface_skeleton_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GDBusInterfaceSkeletonFlags g_dbus_interface_skeleton_get_flags (GDBusInterfaceSkeleton *interface_); +GLIB_AVAILABLE_IN_ALL +void g_dbus_interface_skeleton_set_flags (GDBusInterfaceSkeleton *interface_, + GDBusInterfaceSkeletonFlags flags); +GLIB_AVAILABLE_IN_ALL +GDBusInterfaceInfo *g_dbus_interface_skeleton_get_info (GDBusInterfaceSkeleton *interface_); +GLIB_AVAILABLE_IN_ALL +GDBusInterfaceVTable *g_dbus_interface_skeleton_get_vtable (GDBusInterfaceSkeleton *interface_); +GLIB_AVAILABLE_IN_ALL +GVariant *g_dbus_interface_skeleton_get_properties (GDBusInterfaceSkeleton *interface_); +GLIB_AVAILABLE_IN_ALL +void g_dbus_interface_skeleton_flush (GDBusInterfaceSkeleton *interface_); + +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_interface_skeleton_export (GDBusInterfaceSkeleton *interface_, + GDBusConnection *connection, + const gchar *object_path, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_dbus_interface_skeleton_unexport (GDBusInterfaceSkeleton *interface_); +GLIB_AVAILABLE_IN_ALL +void g_dbus_interface_skeleton_unexport_from_connection (GDBusInterfaceSkeleton *interface_, + GDBusConnection *connection); + +GLIB_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_interface_skeleton_get_connection (GDBusInterfaceSkeleton *interface_); +GLIB_AVAILABLE_IN_ALL +GList *g_dbus_interface_skeleton_get_connections (GDBusInterfaceSkeleton *interface_); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_interface_skeleton_has_connection (GDBusInterfaceSkeleton *interface_, + GDBusConnection *connection); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_interface_skeleton_get_object_path (GDBusInterfaceSkeleton *interface_); + +G_END_DECLS + +#endif /* __G_DBUS_INTERFACE_SKELETON_H */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusintrospection.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusintrospection.h new file mode 100755 index 00000000..14b17105 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusintrospection.h @@ -0,0 +1,325 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_INTROSPECTION_H__ +#define __G_DBUS_INTROSPECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +/** + * GDBusAnnotationInfo: + * @ref_count: The reference count or -1 if statically allocated. + * @key: The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated". + * @value: The value of the annotation. + * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. + * + * Information about an annotation. + * + * Since: 2.26 + */ +struct _GDBusAnnotationInfo +{ + /*< public >*/ + volatile gint ref_count; + gchar *key; + gchar *value; + GDBusAnnotationInfo **annotations; +}; + +/** + * GDBusArgInfo: + * @ref_count: The reference count or -1 if statically allocated. + * @name: Name of the argument, e.g. @unix_user_id. + * @signature: D-Bus signature of the argument (a single complete type). + * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. + * + * Information about an argument for a method or a signal. + * + * Since: 2.26 + */ +struct _GDBusArgInfo +{ + /*< public >*/ + volatile gint ref_count; + gchar *name; + gchar *signature; + GDBusAnnotationInfo **annotations; +}; + +/** + * GDBusMethodInfo: + * @ref_count: The reference count or -1 if statically allocated. + * @name: The name of the D-Bus method, e.g. @RequestName. + * @in_args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no in arguments. + * @out_args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no out arguments. + * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. + * + * Information about a method on an D-Bus interface. + * + * Since: 2.26 + */ +struct _GDBusMethodInfo +{ + /*< public >*/ + volatile gint ref_count; + gchar *name; + GDBusArgInfo **in_args; + GDBusArgInfo **out_args; + GDBusAnnotationInfo **annotations; +}; + +/** + * GDBusSignalInfo: + * @ref_count: The reference count or -1 if statically allocated. + * @name: The name of the D-Bus signal, e.g. "NameOwnerChanged". + * @args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no arguments. + * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. + * + * Information about a signal on a D-Bus interface. + * + * Since: 2.26 + */ +struct _GDBusSignalInfo +{ + /*< public >*/ + volatile gint ref_count; + gchar *name; + GDBusArgInfo **args; + GDBusAnnotationInfo **annotations; +}; + +/** + * GDBusPropertyInfo: + * @ref_count: The reference count or -1 if statically allocated. + * @name: The name of the D-Bus property, e.g. "SupportedFilesystems". + * @signature: The D-Bus signature of the property (a single complete type). + * @flags: Access control flags for the property. + * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. + * + * Information about a D-Bus property on a D-Bus interface. + * + * Since: 2.26 + */ +struct _GDBusPropertyInfo +{ + /*< public >*/ + volatile gint ref_count; + gchar *name; + gchar *signature; + GDBusPropertyInfoFlags flags; + GDBusAnnotationInfo **annotations; +}; + +/** + * GDBusInterfaceInfo: + * @ref_count: The reference count or -1 if statically allocated. + * @name: The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties". + * @methods: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusMethodInfo structures or %NULL if there are no methods. + * @signals: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusSignalInfo structures or %NULL if there are no signals. + * @properties: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusPropertyInfo structures or %NULL if there are no properties. + * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. + * + * Information about a D-Bus interface. + * + * Since: 2.26 + */ +struct _GDBusInterfaceInfo +{ + /*< public >*/ + volatile gint ref_count; + gchar *name; + GDBusMethodInfo **methods; + GDBusSignalInfo **signals; + GDBusPropertyInfo **properties; + GDBusAnnotationInfo **annotations; +}; + +/** + * GDBusNodeInfo: + * @ref_count: The reference count or -1 if statically allocated. + * @path: The path of the node or %NULL if omitted. Note that this may be a relative path. See the D-Bus specification for more details. + * @interfaces: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures or %NULL if there are no interfaces. + * @nodes: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusNodeInfo structures or %NULL if there are no nodes. + * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. + * + * Information about nodes in a remote object hierarchy. + * + * Since: 2.26 + */ +struct _GDBusNodeInfo +{ + /*< public >*/ + volatile gint ref_count; + gchar *path; + GDBusInterfaceInfo **interfaces; + GDBusNodeInfo **nodes; + GDBusAnnotationInfo **annotations; +}; + +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_annotation_info_lookup (GDBusAnnotationInfo **annotations, + const gchar *name); +GLIB_AVAILABLE_IN_ALL +GDBusMethodInfo *g_dbus_interface_info_lookup_method (GDBusInterfaceInfo *info, + const gchar *name); +GLIB_AVAILABLE_IN_ALL +GDBusSignalInfo *g_dbus_interface_info_lookup_signal (GDBusInterfaceInfo *info, + const gchar *name); +GLIB_AVAILABLE_IN_ALL +GDBusPropertyInfo *g_dbus_interface_info_lookup_property (GDBusInterfaceInfo *info, + const gchar *name); +GLIB_AVAILABLE_IN_ALL +void g_dbus_interface_info_cache_build (GDBusInterfaceInfo *info); +GLIB_AVAILABLE_IN_ALL +void g_dbus_interface_info_cache_release (GDBusInterfaceInfo *info); + +GLIB_AVAILABLE_IN_ALL +void g_dbus_interface_info_generate_xml (GDBusInterfaceInfo *info, + guint indent, + GString *string_builder); + +GLIB_AVAILABLE_IN_ALL +GDBusNodeInfo *g_dbus_node_info_new_for_xml (const gchar *xml_data, + GError **error); +GLIB_AVAILABLE_IN_ALL +GDBusInterfaceInfo *g_dbus_node_info_lookup_interface (GDBusNodeInfo *info, + const gchar *name); +GLIB_AVAILABLE_IN_ALL +void g_dbus_node_info_generate_xml (GDBusNodeInfo *info, + guint indent, + GString *string_builder); + +GLIB_AVAILABLE_IN_ALL +GDBusNodeInfo *g_dbus_node_info_ref (GDBusNodeInfo *info); +GLIB_AVAILABLE_IN_ALL +GDBusInterfaceInfo *g_dbus_interface_info_ref (GDBusInterfaceInfo *info); +GLIB_AVAILABLE_IN_ALL +GDBusMethodInfo *g_dbus_method_info_ref (GDBusMethodInfo *info); +GLIB_AVAILABLE_IN_ALL +GDBusSignalInfo *g_dbus_signal_info_ref (GDBusSignalInfo *info); +GLIB_AVAILABLE_IN_ALL +GDBusPropertyInfo *g_dbus_property_info_ref (GDBusPropertyInfo *info); +GLIB_AVAILABLE_IN_ALL +GDBusArgInfo *g_dbus_arg_info_ref (GDBusArgInfo *info); +GLIB_AVAILABLE_IN_ALL +GDBusAnnotationInfo *g_dbus_annotation_info_ref (GDBusAnnotationInfo *info); + +GLIB_AVAILABLE_IN_ALL +void g_dbus_node_info_unref (GDBusNodeInfo *info); +GLIB_AVAILABLE_IN_ALL +void g_dbus_interface_info_unref (GDBusInterfaceInfo *info); +GLIB_AVAILABLE_IN_ALL +void g_dbus_method_info_unref (GDBusMethodInfo *info); +GLIB_AVAILABLE_IN_ALL +void g_dbus_signal_info_unref (GDBusSignalInfo *info); +GLIB_AVAILABLE_IN_ALL +void g_dbus_property_info_unref (GDBusPropertyInfo *info); +GLIB_AVAILABLE_IN_ALL +void g_dbus_arg_info_unref (GDBusArgInfo *info); +GLIB_AVAILABLE_IN_ALL +void g_dbus_annotation_info_unref (GDBusAnnotationInfo *info); + +/** + * G_TYPE_DBUS_NODE_INFO: + * + * The #GType for a boxed type holding a #GDBusNodeInfo. + * + * Since: 2.26 + */ +#define G_TYPE_DBUS_NODE_INFO (g_dbus_node_info_get_type ()) + +/** + * G_TYPE_DBUS_INTERFACE_INFO: + * + * The #GType for a boxed type holding a #GDBusInterfaceInfo. + * + * Since: 2.26 + */ +#define G_TYPE_DBUS_INTERFACE_INFO (g_dbus_interface_info_get_type ()) + +/** + * G_TYPE_DBUS_METHOD_INFO: + * + * The #GType for a boxed type holding a #GDBusMethodInfo. + * + * Since: 2.26 + */ +#define G_TYPE_DBUS_METHOD_INFO (g_dbus_method_info_get_type ()) + +/** + * G_TYPE_DBUS_SIGNAL_INFO: + * + * The #GType for a boxed type holding a #GDBusSignalInfo. + * + * Since: 2.26 + */ +#define G_TYPE_DBUS_SIGNAL_INFO (g_dbus_signal_info_get_type ()) + +/** + * G_TYPE_DBUS_PROPERTY_INFO: + * + * The #GType for a boxed type holding a #GDBusPropertyInfo. + * + * Since: 2.26 + */ +#define G_TYPE_DBUS_PROPERTY_INFO (g_dbus_property_info_get_type ()) + +/** + * G_TYPE_DBUS_ARG_INFO: + * + * The #GType for a boxed type holding a #GDBusArgInfo. + * + * Since: 2.26 + */ +#define G_TYPE_DBUS_ARG_INFO (g_dbus_arg_info_get_type ()) + +/** + * G_TYPE_DBUS_ANNOTATION_INFO: + * + * The #GType for a boxed type holding a #GDBusAnnotationInfo. + * + * Since: 2.26 + */ +#define G_TYPE_DBUS_ANNOTATION_INFO (g_dbus_annotation_info_get_type ()) + +GLIB_AVAILABLE_IN_ALL +GType g_dbus_node_info_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_dbus_interface_info_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_dbus_method_info_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_dbus_signal_info_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_dbus_property_info_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_dbus_arg_info_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_dbus_annotation_info_get_type (void) G_GNUC_CONST; + +G_END_DECLS + +#endif /* __G_DBUS_INTROSPECTION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusmenumodel.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusmenumodel.h new file mode 100755 index 00000000..dd2882d2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusmenumodel.h @@ -0,0 +1,45 @@ +/* + * Copyright © 2011 Canonical Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_DBUS_MENU_MODEL_H__ +#define __G_DBUS_MENU_MODEL_H__ + +#include <gio/gdbusconnection.h> + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_MENU_MODEL (g_dbus_menu_model_get_type ()) +#define G_DBUS_MENU_MODEL(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_DBUS_MENU_MODEL, GDBusMenuModel)) +#define G_IS_DBUS_MENU_MODEL(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_DBUS_MENU_MODEL)) + +typedef struct _GDBusMenuModel GDBusMenuModel; + +GLIB_AVAILABLE_IN_ALL +GType g_dbus_menu_model_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GDBusMenuModel * g_dbus_menu_model_get (GDBusConnection *connection, + const gchar *bus_name, + const gchar *object_path); + +G_END_DECLS + +#endif /* __G_DBUS_MENU_MODEL_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusmessage.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusmessage.h new file mode 100755 index 00000000..5f039dc9 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusmessage.h @@ -0,0 +1,197 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_MESSAGE_H__ +#define __G_DBUS_MESSAGE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_MESSAGE (g_dbus_message_get_type ()) +#define G_DBUS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_MESSAGE, GDBusMessage)) +#define G_IS_DBUS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_MESSAGE)) + +GLIB_AVAILABLE_IN_ALL +GType g_dbus_message_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_message_new (void); +GLIB_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_message_new_signal (const gchar *path, + const gchar *interface_, + const gchar *signal); +GLIB_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_message_new_method_call (const gchar *name, + const gchar *path, + const gchar *interface_, + const gchar *method); +GLIB_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_message_new_method_reply (GDBusMessage *method_call_message); +GLIB_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_message_new_method_error (GDBusMessage *method_call_message, + const gchar *error_name, + const gchar *error_message_format, + ...) G_GNUC_PRINTF(3, 4); +GLIB_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_message_new_method_error_valist (GDBusMessage *method_call_message, + const gchar *error_name, + const gchar *error_message_format, + va_list var_args); +GLIB_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_message_new_method_error_literal (GDBusMessage *method_call_message, + const gchar *error_name, + const gchar *error_message); +GLIB_AVAILABLE_IN_ALL +gchar *g_dbus_message_print (GDBusMessage *message, + guint indent); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_message_get_locked (GDBusMessage *message); +GLIB_AVAILABLE_IN_ALL +void g_dbus_message_lock (GDBusMessage *message); +GLIB_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_message_copy (GDBusMessage *message, + GError **error); +GLIB_AVAILABLE_IN_ALL +GDBusMessageByteOrder g_dbus_message_get_byte_order (GDBusMessage *message); +GLIB_AVAILABLE_IN_ALL +void g_dbus_message_set_byte_order (GDBusMessage *message, + GDBusMessageByteOrder byte_order); + +GLIB_AVAILABLE_IN_ALL +GDBusMessageType g_dbus_message_get_message_type (GDBusMessage *message); +GLIB_AVAILABLE_IN_ALL +void g_dbus_message_set_message_type (GDBusMessage *message, + GDBusMessageType type); +GLIB_AVAILABLE_IN_ALL +GDBusMessageFlags g_dbus_message_get_flags (GDBusMessage *message); +GLIB_AVAILABLE_IN_ALL +void g_dbus_message_set_flags (GDBusMessage *message, + GDBusMessageFlags flags); +GLIB_AVAILABLE_IN_ALL +guint32 g_dbus_message_get_serial (GDBusMessage *message); +GLIB_AVAILABLE_IN_ALL +void g_dbus_message_set_serial (GDBusMessage *message, + guint32 serial); +GLIB_AVAILABLE_IN_ALL +GVariant *g_dbus_message_get_header (GDBusMessage *message, + GDBusMessageHeaderField header_field); +GLIB_AVAILABLE_IN_ALL +void g_dbus_message_set_header (GDBusMessage *message, + GDBusMessageHeaderField header_field, + GVariant *value); +GLIB_AVAILABLE_IN_ALL +guchar *g_dbus_message_get_header_fields (GDBusMessage *message); +GLIB_AVAILABLE_IN_ALL +GVariant *g_dbus_message_get_body (GDBusMessage *message); +GLIB_AVAILABLE_IN_ALL +void g_dbus_message_set_body (GDBusMessage *message, + GVariant *body); +GLIB_AVAILABLE_IN_ALL +GUnixFDList *g_dbus_message_get_unix_fd_list (GDBusMessage *message); +GLIB_AVAILABLE_IN_ALL +void g_dbus_message_set_unix_fd_list (GDBusMessage *message, + GUnixFDList *fd_list); + +GLIB_AVAILABLE_IN_ALL +guint32 g_dbus_message_get_reply_serial (GDBusMessage *message); +GLIB_AVAILABLE_IN_ALL +void g_dbus_message_set_reply_serial (GDBusMessage *message, + guint32 value); + +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_message_get_interface (GDBusMessage *message); +GLIB_AVAILABLE_IN_ALL +void g_dbus_message_set_interface (GDBusMessage *message, + const gchar *value); + +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_message_get_member (GDBusMessage *message); +GLIB_AVAILABLE_IN_ALL +void g_dbus_message_set_member (GDBusMessage *message, + const gchar *value); + +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_message_get_path (GDBusMessage *message); +GLIB_AVAILABLE_IN_ALL +void g_dbus_message_set_path (GDBusMessage *message, + const gchar *value); + +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_message_get_sender (GDBusMessage *message); +GLIB_AVAILABLE_IN_ALL +void g_dbus_message_set_sender (GDBusMessage *message, + const gchar *value); + +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_message_get_destination (GDBusMessage *message); +GLIB_AVAILABLE_IN_ALL +void g_dbus_message_set_destination (GDBusMessage *message, + const gchar *value); + +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_message_get_error_name (GDBusMessage *message); +GLIB_AVAILABLE_IN_ALL +void g_dbus_message_set_error_name (GDBusMessage *message, + const gchar *value); + +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_message_get_signature (GDBusMessage *message); +GLIB_AVAILABLE_IN_ALL +void g_dbus_message_set_signature (GDBusMessage *message, + const gchar *value); + +GLIB_AVAILABLE_IN_ALL +guint32 g_dbus_message_get_num_unix_fds (GDBusMessage *message); +GLIB_AVAILABLE_IN_ALL +void g_dbus_message_set_num_unix_fds (GDBusMessage *message, + guint32 value); + +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_message_get_arg0 (GDBusMessage *message); + + +GLIB_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_message_new_from_blob (guchar *blob, + gsize blob_len, + GDBusCapabilityFlags capabilities, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gssize g_dbus_message_bytes_needed (guchar *blob, + gsize blob_len, + GError **error); + +GLIB_AVAILABLE_IN_ALL +guchar *g_dbus_message_to_blob (GDBusMessage *message, + gsize *out_size, + GDBusCapabilityFlags capabilities, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_message_to_gerror (GDBusMessage *message, + GError **error); + +G_END_DECLS + +#endif /* __G_DBUS_MESSAGE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusmethodinvocation.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusmethodinvocation.h new file mode 100755 index 00000000..061256ff --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusmethodinvocation.h @@ -0,0 +1,97 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_METHOD_INVOCATION_H__ +#define __G_DBUS_METHOD_INVOCATION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_METHOD_INVOCATION (g_dbus_method_invocation_get_type ()) +#define G_DBUS_METHOD_INVOCATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_METHOD_INVOCATION, GDBusMethodInvocation)) +#define G_IS_DBUS_METHOD_INVOCATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_METHOD_INVOCATION)) + +GLIB_AVAILABLE_IN_ALL +GType g_dbus_method_invocation_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_method_invocation_get_sender (GDBusMethodInvocation *invocation); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_method_invocation_get_object_path (GDBusMethodInvocation *invocation); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_method_invocation_get_interface_name (GDBusMethodInvocation *invocation); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_method_invocation_get_method_name (GDBusMethodInvocation *invocation); +GLIB_AVAILABLE_IN_ALL +const GDBusMethodInfo *g_dbus_method_invocation_get_method_info (GDBusMethodInvocation *invocation); +GLIB_AVAILABLE_IN_2_38 +const GDBusPropertyInfo *g_dbus_method_invocation_get_property_info (GDBusMethodInvocation *invocation); +GLIB_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_method_invocation_get_connection (GDBusMethodInvocation *invocation); +GLIB_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_method_invocation_get_message (GDBusMethodInvocation *invocation); +GLIB_AVAILABLE_IN_ALL +GVariant *g_dbus_method_invocation_get_parameters (GDBusMethodInvocation *invocation); +GLIB_AVAILABLE_IN_ALL +gpointer g_dbus_method_invocation_get_user_data (GDBusMethodInvocation *invocation); + +GLIB_AVAILABLE_IN_ALL +void g_dbus_method_invocation_return_value (GDBusMethodInvocation *invocation, + GVariant *parameters); +GLIB_AVAILABLE_IN_ALL +void g_dbus_method_invocation_return_value_with_unix_fd_list (GDBusMethodInvocation *invocation, + GVariant *parameters, + GUnixFDList *fd_list); +GLIB_AVAILABLE_IN_ALL +void g_dbus_method_invocation_return_error (GDBusMethodInvocation *invocation, + GQuark domain, + gint code, + const gchar *format, + ...) G_GNUC_PRINTF(4, 5); +GLIB_AVAILABLE_IN_ALL +void g_dbus_method_invocation_return_error_valist (GDBusMethodInvocation *invocation, + GQuark domain, + gint code, + const gchar *format, + va_list var_args) + G_GNUC_PRINTF(4, 0); +GLIB_AVAILABLE_IN_ALL +void g_dbus_method_invocation_return_error_literal (GDBusMethodInvocation *invocation, + GQuark domain, + gint code, + const gchar *message); +GLIB_AVAILABLE_IN_ALL +void g_dbus_method_invocation_return_gerror (GDBusMethodInvocation *invocation, + const GError *error); +GLIB_AVAILABLE_IN_ALL +void g_dbus_method_invocation_take_error (GDBusMethodInvocation *invocation, + GError *error); +GLIB_AVAILABLE_IN_ALL +void g_dbus_method_invocation_return_dbus_error (GDBusMethodInvocation *invocation, + const gchar *error_name, + const gchar *error_message); + +G_END_DECLS + +#endif /* __G_DBUS_METHOD_INVOCATION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusnameowning.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusnameowning.h new file mode 100755 index 00000000..89c011a2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusnameowning.h @@ -0,0 +1,115 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_NAME_OWNING_H__ +#define __G_DBUS_NAME_OWNING_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +/** + * GBusAcquiredCallback: + * @connection: The #GDBusConnection to a message bus. + * @name: The name that is requested to be owned. + * @user_data: User data passed to g_bus_own_name(). + * + * Invoked when a connection to a message bus has been obtained. + * + * Since: 2.26 + */ +typedef void (*GBusAcquiredCallback) (GDBusConnection *connection, + const gchar *name, + gpointer user_data); + +/** + * GBusNameAcquiredCallback: + * @connection: The #GDBusConnection on which to acquired the name. + * @name: The name being owned. + * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection(). + * + * Invoked when the name is acquired. + * + * Since: 2.26 + */ +typedef void (*GBusNameAcquiredCallback) (GDBusConnection *connection, + const gchar *name, + gpointer user_data); + +/** + * GBusNameLostCallback: + * @connection: The #GDBusConnection on which to acquire the name or %NULL if + * the connection was disconnected. + * @name: The name being owned. + * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection(). + * + * Invoked when the name is lost or @connection has been closed. + * + * Since: 2.26 + */ +typedef void (*GBusNameLostCallback) (GDBusConnection *connection, + const gchar *name, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +guint g_bus_own_name (GBusType bus_type, + const gchar *name, + GBusNameOwnerFlags flags, + GBusAcquiredCallback bus_acquired_handler, + GBusNameAcquiredCallback name_acquired_handler, + GBusNameLostCallback name_lost_handler, + gpointer user_data, + GDestroyNotify user_data_free_func); + +GLIB_AVAILABLE_IN_ALL +guint g_bus_own_name_on_connection (GDBusConnection *connection, + const gchar *name, + GBusNameOwnerFlags flags, + GBusNameAcquiredCallback name_acquired_handler, + GBusNameLostCallback name_lost_handler, + gpointer user_data, + GDestroyNotify user_data_free_func); + +GLIB_AVAILABLE_IN_ALL +guint g_bus_own_name_with_closures (GBusType bus_type, + const gchar *name, + GBusNameOwnerFlags flags, + GClosure *bus_acquired_closure, + GClosure *name_acquired_closure, + GClosure *name_lost_closure); + +GLIB_AVAILABLE_IN_ALL +guint g_bus_own_name_on_connection_with_closures ( + GDBusConnection *connection, + const gchar *name, + GBusNameOwnerFlags flags, + GClosure *name_acquired_closure, + GClosure *name_lost_closure); + +GLIB_AVAILABLE_IN_ALL +void g_bus_unown_name (guint owner_id); + +G_END_DECLS + +#endif /* __G_DBUS_NAME_OWNING_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusnamewatching.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusnamewatching.h new file mode 100755 index 00000000..491e21e2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusnamewatching.h @@ -0,0 +1,102 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_NAME_WATCHING_H__ +#define __G_DBUS_NAME_WATCHING_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +/** + * GBusNameAppearedCallback: + * @connection: The #GDBusConnection the name is being watched on. + * @name: The name being watched. + * @name_owner: Unique name of the owner of the name being watched. + * @user_data: User data passed to g_bus_watch_name(). + * + * Invoked when the name being watched is known to have to have a owner. + * + * Since: 2.26 + */ +typedef void (*GBusNameAppearedCallback) (GDBusConnection *connection, + const gchar *name, + const gchar *name_owner, + gpointer user_data); + +/** + * GBusNameVanishedCallback: + * @connection: The #GDBusConnection the name is being watched on, or + * %NULL. + * @name: The name being watched. + * @user_data: User data passed to g_bus_watch_name(). + * + * Invoked when the name being watched is known not to have to have a owner. + * + * This is also invoked when the #GDBusConnection on which the watch was + * established has been closed. In that case, @connection will be + * %NULL. + * + * Since: 2.26 + */ +typedef void (*GBusNameVanishedCallback) (GDBusConnection *connection, + const gchar *name, + gpointer user_data); + + +GLIB_AVAILABLE_IN_ALL +guint g_bus_watch_name (GBusType bus_type, + const gchar *name, + GBusNameWatcherFlags flags, + GBusNameAppearedCallback name_appeared_handler, + GBusNameVanishedCallback name_vanished_handler, + gpointer user_data, + GDestroyNotify user_data_free_func); +GLIB_AVAILABLE_IN_ALL +guint g_bus_watch_name_on_connection (GDBusConnection *connection, + const gchar *name, + GBusNameWatcherFlags flags, + GBusNameAppearedCallback name_appeared_handler, + GBusNameVanishedCallback name_vanished_handler, + gpointer user_data, + GDestroyNotify user_data_free_func); +GLIB_AVAILABLE_IN_ALL +guint g_bus_watch_name_with_closures (GBusType bus_type, + const gchar *name, + GBusNameWatcherFlags flags, + GClosure *name_appeared_closure, + GClosure *name_vanished_closure); +GLIB_AVAILABLE_IN_ALL +guint g_bus_watch_name_on_connection_with_closures ( + GDBusConnection *connection, + const gchar *name, + GBusNameWatcherFlags flags, + GClosure *name_appeared_closure, + GClosure *name_vanished_closure); +GLIB_AVAILABLE_IN_ALL +void g_bus_unwatch_name (guint watcher_id); + +G_END_DECLS + +#endif /* __G_DBUS_NAME_WATCHING_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusobject.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusobject.h new file mode 100755 index 00000000..157c52b1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusobject.h @@ -0,0 +1,78 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_OBJECT_H__ +#define __G_DBUS_OBJECT_H__ + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_OBJECT (g_dbus_object_get_type()) +#define G_DBUS_OBJECT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT, GDBusObject)) +#define G_IS_DBUS_OBJECT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT)) +#define G_DBUS_OBJECT_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), G_TYPE_DBUS_OBJECT, GDBusObjectIface)) + +typedef struct _GDBusObjectIface GDBusObjectIface; + +/** + * GDBusObjectIface: + * @parent_iface: The parent interface. + * @get_object_path: Returns the object path. See g_dbus_object_get_object_path(). + * @get_interfaces: Returns all interfaces. See g_dbus_object_get_interfaces(). + * @get_interface: Returns an interface by name. See g_dbus_object_get_interface(). + * @interface_added: Signal handler for the #GDBusObject::interface-added signal. + * @interface_removed: Signal handler for the #GDBusObject::interface-removed signal. + * + * Base object type for D-Bus objects. + * + * Since: 2.30 + */ +struct _GDBusObjectIface +{ + GTypeInterface parent_iface; + + /* Virtual Functions */ + const gchar *(*get_object_path) (GDBusObject *object); + GList *(*get_interfaces) (GDBusObject *object); + GDBusInterface *(*get_interface) (GDBusObject *object, + const gchar *interface_name); + + /* Signals */ + void (*interface_added) (GDBusObject *object, + GDBusInterface *interface_); + void (*interface_removed) (GDBusObject *object, + GDBusInterface *interface_); + +}; + +GLIB_AVAILABLE_IN_ALL +GType g_dbus_object_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_object_get_object_path (GDBusObject *object); +GLIB_AVAILABLE_IN_ALL +GList *g_dbus_object_get_interfaces (GDBusObject *object); +GLIB_AVAILABLE_IN_ALL +GDBusInterface *g_dbus_object_get_interface (GDBusObject *object, + const gchar *interface_name); + +G_END_DECLS + +#endif /* __G_DBUS_OBJECT_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusobjectmanager.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusobjectmanager.h new file mode 100755 index 00000000..260ae2ee --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusobjectmanager.h @@ -0,0 +1,94 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_OBJECT_MANAGER_H__ +#define __G_DBUS_OBJECT_MANAGER_H__ + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_OBJECT_MANAGER (g_dbus_object_manager_get_type()) +#define G_DBUS_OBJECT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_MANAGER, GDBusObjectManager)) +#define G_IS_DBUS_OBJECT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_MANAGER)) +#define G_DBUS_OBJECT_MANAGER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), G_TYPE_DBUS_OBJECT_MANAGER, GDBusObjectManagerIface)) + +typedef struct _GDBusObjectManagerIface GDBusObjectManagerIface; + +/** + * GDBusObjectManagerIface: + * @parent_iface: The parent interface. + * @get_object_path: Virtual function for g_dbus_object_manager_get_object_path(). + * @get_objects: Virtual function for g_dbus_object_manager_get_objects(). + * @get_object: Virtual function for g_dbus_object_manager_get_object(). + * @get_interface: Virtual function for g_dbus_object_manager_get_interface(). + * @object_added: Signal handler for the #GDBusObjectManager::object-added signal. + * @object_removed: Signal handler for the #GDBusObjectManager::object-removed signal. + * @interface_added: Signal handler for the #GDBusObjectManager::interface-added signal. + * @interface_removed: Signal handler for the #GDBusObjectManager::interface-removed signal. + * + * Base type for D-Bus object managers. + * + * Since: 2.30 + */ +struct _GDBusObjectManagerIface +{ + GTypeInterface parent_iface; + + /* Virtual Functions */ + const gchar *(*get_object_path) (GDBusObjectManager *manager); + GList *(*get_objects) (GDBusObjectManager *manager); + GDBusObject *(*get_object) (GDBusObjectManager *manager, + const gchar *object_path); + GDBusInterface *(*get_interface) (GDBusObjectManager *manager, + const gchar *object_path, + const gchar *interface_name); + + /* Signals */ + void (*object_added) (GDBusObjectManager *manager, + GDBusObject *object); + void (*object_removed) (GDBusObjectManager *manager, + GDBusObject *object); + + void (*interface_added) (GDBusObjectManager *manager, + GDBusObject *object, + GDBusInterface *interface_); + void (*interface_removed) (GDBusObjectManager *manager, + GDBusObject *object, + GDBusInterface *interface_); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_dbus_object_manager_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_object_manager_get_object_path (GDBusObjectManager *manager); +GLIB_AVAILABLE_IN_ALL +GList *g_dbus_object_manager_get_objects (GDBusObjectManager *manager); +GLIB_AVAILABLE_IN_ALL +GDBusObject *g_dbus_object_manager_get_object (GDBusObjectManager *manager, + const gchar *object_path); +GLIB_AVAILABLE_IN_ALL +GDBusInterface *g_dbus_object_manager_get_interface (GDBusObjectManager *manager, + const gchar *object_path, + const gchar *interface_name); + +G_END_DECLS + +#endif /* __G_DBUS_OBJECT_MANAGER_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusobjectmanagerclient.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusobjectmanagerclient.h new file mode 100755 index 00000000..eafabfbf --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusobjectmanagerclient.h @@ -0,0 +1,146 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_OBJECT_MANAGER_CLIENT_H__ +#define __G_DBUS_OBJECT_MANAGER_CLIENT_H__ + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_OBJECT_MANAGER_CLIENT (g_dbus_object_manager_client_get_type ()) +#define G_DBUS_OBJECT_MANAGER_CLIENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT, GDBusObjectManagerClient)) +#define G_DBUS_OBJECT_MANAGER_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT, GDBusObjectManagerClientClass)) +#define G_DBUS_OBJECT_MANAGER_CLIENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT, GDBusObjectManagerClientClass)) +#define G_IS_DBUS_OBJECT_MANAGER_CLIENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT)) +#define G_IS_DBUS_OBJECT_MANAGER_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT)) + +typedef struct _GDBusObjectManagerClientClass GDBusObjectManagerClientClass; +typedef struct _GDBusObjectManagerClientPrivate GDBusObjectManagerClientPrivate; + +/** + * GDBusObjectManagerClient: + * + * The #GDBusObjectManagerClient structure contains private data and should + * only be accessed using the provided API. + * + * Since: 2.30 + */ +struct _GDBusObjectManagerClient +{ + /*< private >*/ + GObject parent_instance; + GDBusObjectManagerClientPrivate *priv; +}; + +/** + * GDBusObjectManagerClientClass: + * @parent_class: The parent class. + * @interface_proxy_signal: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-signal signal. + * @interface_proxy_properties_changed: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-properties-changed signal. + * + * Class structure for #GDBusObjectManagerClient. + * + * Since: 2.30 + */ +struct _GDBusObjectManagerClientClass +{ + GObjectClass parent_class; + + /* signals */ + void (*interface_proxy_signal) (GDBusObjectManagerClient *manager, + GDBusObjectProxy *object_proxy, + GDBusProxy *interface_proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters); + + void (*interface_proxy_properties_changed) (GDBusObjectManagerClient *manager, + GDBusObjectProxy *object_proxy, + GDBusProxy *interface_proxy, + GVariant *changed_properties, + const gchar* const *invalidated_properties); + + /*< private >*/ + gpointer padding[8]; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_dbus_object_manager_client_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +void g_dbus_object_manager_client_new (GDBusConnection *connection, + GDBusObjectManagerClientFlags flags, + const gchar *name, + const gchar *object_path, + GDBusProxyTypeFunc get_proxy_type_func, + gpointer get_proxy_type_user_data, + GDestroyNotify get_proxy_type_destroy_notify, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GDBusObjectManager *g_dbus_object_manager_client_new_finish (GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GDBusObjectManager *g_dbus_object_manager_client_new_sync (GDBusConnection *connection, + GDBusObjectManagerClientFlags flags, + const gchar *name, + const gchar *object_path, + GDBusProxyTypeFunc get_proxy_type_func, + gpointer get_proxy_type_user_data, + GDestroyNotify get_proxy_type_destroy_notify, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_dbus_object_manager_client_new_for_bus (GBusType bus_type, + GDBusObjectManagerClientFlags flags, + const gchar *name, + const gchar *object_path, + GDBusProxyTypeFunc get_proxy_type_func, + gpointer get_proxy_type_user_data, + GDestroyNotify get_proxy_type_destroy_notify, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GDBusObjectManager *g_dbus_object_manager_client_new_for_bus_finish (GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GDBusObjectManager *g_dbus_object_manager_client_new_for_bus_sync (GBusType bus_type, + GDBusObjectManagerClientFlags flags, + const gchar *name, + const gchar *object_path, + GDBusProxyTypeFunc get_proxy_type_func, + gpointer get_proxy_type_user_data, + GDestroyNotify get_proxy_type_destroy_notify, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_object_manager_client_get_connection (GDBusObjectManagerClient *manager); +GLIB_AVAILABLE_IN_ALL +GDBusObjectManagerClientFlags g_dbus_object_manager_client_get_flags (GDBusObjectManagerClient *manager); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_object_manager_client_get_name (GDBusObjectManagerClient *manager); +GLIB_AVAILABLE_IN_ALL +gchar *g_dbus_object_manager_client_get_name_owner (GDBusObjectManagerClient *manager); + +G_END_DECLS + +#endif /* __G_DBUS_OBJECT_MANAGER_CLIENT_H */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusobjectmanagerserver.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusobjectmanagerserver.h new file mode 100755 index 00000000..dd725b73 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusobjectmanagerserver.h @@ -0,0 +1,93 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_OBJECT_MANAGER_SERVER_H__ +#define __G_DBUS_OBJECT_MANAGER_SERVER_H__ + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_OBJECT_MANAGER_SERVER (g_dbus_object_manager_server_get_type ()) +#define G_DBUS_OBJECT_MANAGER_SERVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_MANAGER_SERVER, GDBusObjectManagerServer)) +#define G_DBUS_OBJECT_MANAGER_SERVER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_OBJECT_MANAGER_SERVER, GDBusObjectManagerServerClass)) +#define G_DBUS_OBJECT_MANAGER_SERVER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_OBJECT_MANAGER_SERVER, GDBusObjectManagerServerClass)) +#define G_IS_DBUS_OBJECT_MANAGER_SERVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_MANAGER_SERVER)) +#define G_IS_DBUS_OBJECT_MANAGER_SERVER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_OBJECT_MANAGER_SERVER)) + +typedef struct _GDBusObjectManagerServerClass GDBusObjectManagerServerClass; +typedef struct _GDBusObjectManagerServerPrivate GDBusObjectManagerServerPrivate; + +/** + * GDBusObjectManagerServer: + * + * The #GDBusObjectManagerServer structure contains private data and should + * only be accessed using the provided API. + * + * Since: 2.30 + */ +struct _GDBusObjectManagerServer +{ + /*< private >*/ + GObject parent_instance; + GDBusObjectManagerServerPrivate *priv; +}; + +/** + * GDBusObjectManagerServerClass: + * @parent_class: The parent class. + * + * Class structure for #GDBusObjectManagerServer. + * + * Since: 2.30 + */ +struct _GDBusObjectManagerServerClass +{ + GObjectClass parent_class; + + /*< private >*/ + gpointer padding[8]; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_dbus_object_manager_server_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GDBusObjectManagerServer *g_dbus_object_manager_server_new (const gchar *object_path); +GLIB_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_object_manager_server_get_connection (GDBusObjectManagerServer *manager); +GLIB_AVAILABLE_IN_ALL +void g_dbus_object_manager_server_set_connection (GDBusObjectManagerServer *manager, + GDBusConnection *connection); +GLIB_AVAILABLE_IN_ALL +void g_dbus_object_manager_server_export (GDBusObjectManagerServer *manager, + GDBusObjectSkeleton *object); +GLIB_AVAILABLE_IN_ALL +void g_dbus_object_manager_server_export_uniquely (GDBusObjectManagerServer *manager, + GDBusObjectSkeleton *object); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_object_manager_server_is_exported (GDBusObjectManagerServer *manager, + GDBusObjectSkeleton *object); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_object_manager_server_unexport (GDBusObjectManagerServer *manager, + const gchar *object_path); + +G_END_DECLS + +#endif /* __G_DBUS_OBJECT_MANAGER_SERVER_H */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusobjectproxy.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusobjectproxy.h new file mode 100755 index 00000000..38c8d511 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusobjectproxy.h @@ -0,0 +1,79 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_OBJECT_PROXY_H__ +#define __G_DBUS_OBJECT_PROXY_H__ + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_OBJECT_PROXY (g_dbus_object_proxy_get_type ()) +#define G_DBUS_OBJECT_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_PROXY, GDBusObjectProxy)) +#define G_DBUS_OBJECT_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_OBJECT_PROXY, GDBusObjectProxyClass)) +#define G_DBUS_OBJECT_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_OBJECT_PROXY, GDBusObjectProxyClass)) +#define G_IS_DBUS_OBJECT_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_PROXY)) +#define G_IS_DBUS_OBJECT_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_OBJECT_PROXY)) + +typedef struct _GDBusObjectProxyClass GDBusObjectProxyClass; +typedef struct _GDBusObjectProxyPrivate GDBusObjectProxyPrivate; + +/** + * GDBusObjectProxy: + * + * The #GDBusObjectProxy structure contains private data and should + * only be accessed using the provided API. + * + * Since: 2.30 + */ +struct _GDBusObjectProxy +{ + /*< private >*/ + GObject parent_instance; + GDBusObjectProxyPrivate *priv; +}; + +/** + * GDBusObjectProxyClass: + * @parent_class: The parent class. + * + * Class structure for #GDBusObjectProxy. + * + * Since: 2.30 + */ +struct _GDBusObjectProxyClass +{ + GObjectClass parent_class; + + /*< private >*/ + gpointer padding[8]; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_dbus_object_proxy_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GDBusObjectProxy *g_dbus_object_proxy_new (GDBusConnection *connection, + const gchar *object_path); +GLIB_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_object_proxy_get_connection (GDBusObjectProxy *proxy); + +G_END_DECLS + +#endif /* __G_DBUS_OBJECT_PROXY_H */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusobjectskeleton.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusobjectskeleton.h new file mode 100755 index 00000000..fe6952f5 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusobjectskeleton.h @@ -0,0 +1,96 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_OBJECT_SKELETON_H__ +#define __G_DBUS_OBJECT_SKELETON_H__ + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_OBJECT_SKELETON (g_dbus_object_skeleton_get_type ()) +#define G_DBUS_OBJECT_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_SKELETON, GDBusObjectSkeleton)) +#define G_DBUS_OBJECT_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_OBJECT_SKELETON, GDBusObjectSkeletonClass)) +#define G_DBUS_OBJECT_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_OBJECT_SKELETON, GDBusObjectSkeletonClass)) +#define G_IS_DBUS_OBJECT_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_SKELETON)) +#define G_IS_DBUS_OBJECT_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_OBJECT_SKELETON)) + +typedef struct _GDBusObjectSkeletonClass GDBusObjectSkeletonClass; +typedef struct _GDBusObjectSkeletonPrivate GDBusObjectSkeletonPrivate; + +/** + * GDBusObjectSkeleton: + * + * The #GDBusObjectSkeleton structure contains private data and should only be + * accessed using the provided API. + * + * Since: 2.30 + */ +struct _GDBusObjectSkeleton +{ + /*< private >*/ + GObject parent_instance; + GDBusObjectSkeletonPrivate *priv; +}; + +/** + * GDBusObjectSkeletonClass: + * @parent_class: The parent class. + * @authorize_method: Signal class handler for the #GDBusObjectSkeleton::authorize-method signal. + * + * Class structure for #GDBusObjectSkeleton. + * + * Since: 2.30 + */ +struct _GDBusObjectSkeletonClass +{ + GObjectClass parent_class; + + /* Signals */ + gboolean (*authorize_method) (GDBusObjectSkeleton *object, + GDBusInterfaceSkeleton *interface_, + GDBusMethodInvocation *invocation); + + /*< private >*/ + gpointer padding[8]; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_dbus_object_skeleton_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GDBusObjectSkeleton *g_dbus_object_skeleton_new (const gchar *object_path); +GLIB_AVAILABLE_IN_ALL +void g_dbus_object_skeleton_flush (GDBusObjectSkeleton *object); +GLIB_AVAILABLE_IN_ALL +void g_dbus_object_skeleton_add_interface (GDBusObjectSkeleton *object, + GDBusInterfaceSkeleton *interface_); +GLIB_AVAILABLE_IN_ALL +void g_dbus_object_skeleton_remove_interface (GDBusObjectSkeleton *object, + GDBusInterfaceSkeleton *interface_); +GLIB_AVAILABLE_IN_ALL +void g_dbus_object_skeleton_remove_interface_by_name (GDBusObjectSkeleton *object, + const gchar *interface_name); +GLIB_AVAILABLE_IN_ALL +void g_dbus_object_skeleton_set_object_path (GDBusObjectSkeleton *object, + const gchar *object_path); + +G_END_DECLS + +#endif /* __G_DBUS_OBJECT_SKELETON_H */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusproxy.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusproxy.h new file mode 100755 index 00000000..6be9871e --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusproxy.h @@ -0,0 +1,214 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_PROXY_H__ +#define __G_DBUS_PROXY_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> +#include <gio/gdbusintrospection.h> + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_PROXY (g_dbus_proxy_get_type ()) +#define G_DBUS_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_PROXY, GDBusProxy)) +#define G_DBUS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_PROXY, GDBusProxyClass)) +#define G_DBUS_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_PROXY, GDBusProxyClass)) +#define G_IS_DBUS_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_PROXY)) +#define G_IS_DBUS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_PROXY)) + +typedef struct _GDBusProxyClass GDBusProxyClass; +typedef struct _GDBusProxyPrivate GDBusProxyPrivate; + +/** + * GDBusProxy: + * + * The #GDBusProxy structure contains only private data and + * should only be accessed using the provided API. + * + * Since: 2.26 + */ +struct _GDBusProxy +{ + /*< private >*/ + GObject parent_instance; + GDBusProxyPrivate *priv; +}; + +/** + * GDBusProxyClass: + * @g_properties_changed: Signal class handler for the #GDBusProxy::g-properties-changed signal. + * @g_signal: Signal class handler for the #GDBusProxy::g-signal signal. + * + * Class structure for #GDBusProxy. + * + * Since: 2.26 + */ +struct _GDBusProxyClass +{ + /*< private >*/ + GObjectClass parent_class; + + /*< public >*/ + /* Signals */ + void (*g_properties_changed) (GDBusProxy *proxy, + GVariant *changed_properties, + const gchar* const *invalidated_properties); + void (*g_signal) (GDBusProxy *proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters); + + /*< private >*/ + /* Padding for future expansion */ + gpointer padding[32]; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_dbus_proxy_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +void g_dbus_proxy_new (GDBusConnection *connection, + GDBusProxyFlags flags, + GDBusInterfaceInfo *info, + const gchar *name, + const gchar *object_path, + const gchar *interface_name, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GDBusProxy *g_dbus_proxy_new_finish (GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GDBusProxy *g_dbus_proxy_new_sync (GDBusConnection *connection, + GDBusProxyFlags flags, + GDBusInterfaceInfo *info, + const gchar *name, + const gchar *object_path, + const gchar *interface_name, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_dbus_proxy_new_for_bus (GBusType bus_type, + GDBusProxyFlags flags, + GDBusInterfaceInfo *info, + const gchar *name, + const gchar *object_path, + const gchar *interface_name, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GDBusProxy *g_dbus_proxy_new_for_bus_finish (GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GDBusProxy *g_dbus_proxy_new_for_bus_sync (GBusType bus_type, + GDBusProxyFlags flags, + GDBusInterfaceInfo *info, + const gchar *name, + const gchar *object_path, + const gchar *interface_name, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_proxy_get_connection (GDBusProxy *proxy); +GLIB_AVAILABLE_IN_ALL +GDBusProxyFlags g_dbus_proxy_get_flags (GDBusProxy *proxy); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_proxy_get_name (GDBusProxy *proxy); +GLIB_AVAILABLE_IN_ALL +gchar *g_dbus_proxy_get_name_owner (GDBusProxy *proxy); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_proxy_get_object_path (GDBusProxy *proxy); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_proxy_get_interface_name (GDBusProxy *proxy); +GLIB_AVAILABLE_IN_ALL +gint g_dbus_proxy_get_default_timeout (GDBusProxy *proxy); +GLIB_AVAILABLE_IN_ALL +void g_dbus_proxy_set_default_timeout (GDBusProxy *proxy, + gint timeout_msec); +GLIB_AVAILABLE_IN_ALL +GDBusInterfaceInfo *g_dbus_proxy_get_interface_info (GDBusProxy *proxy); +GLIB_AVAILABLE_IN_ALL +void g_dbus_proxy_set_interface_info (GDBusProxy *proxy, + GDBusInterfaceInfo *info); +GLIB_AVAILABLE_IN_ALL +GVariant *g_dbus_proxy_get_cached_property (GDBusProxy *proxy, + const gchar *property_name); +GLIB_AVAILABLE_IN_ALL +void g_dbus_proxy_set_cached_property (GDBusProxy *proxy, + const gchar *property_name, + GVariant *value); +GLIB_AVAILABLE_IN_ALL +gchar **g_dbus_proxy_get_cached_property_names (GDBusProxy *proxy); +GLIB_AVAILABLE_IN_ALL +void g_dbus_proxy_call (GDBusProxy *proxy, + const gchar *method_name, + GVariant *parameters, + GDBusCallFlags flags, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GVariant *g_dbus_proxy_call_finish (GDBusProxy *proxy, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GVariant *g_dbus_proxy_call_sync (GDBusProxy *proxy, + const gchar *method_name, + GVariant *parameters, + GDBusCallFlags flags, + gint timeout_msec, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_dbus_proxy_call_with_unix_fd_list (GDBusProxy *proxy, + const gchar *method_name, + GVariant *parameters, + GDBusCallFlags flags, + gint timeout_msec, + GUnixFDList *fd_list, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GVariant *g_dbus_proxy_call_with_unix_fd_list_finish (GDBusProxy *proxy, + GUnixFDList **out_fd_list, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GVariant *g_dbus_proxy_call_with_unix_fd_list_sync (GDBusProxy *proxy, + const gchar *method_name, + GVariant *parameters, + GDBusCallFlags flags, + gint timeout_msec, + GUnixFDList *fd_list, + GUnixFDList **out_fd_list, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + +#endif /* __G_DBUS_PROXY_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusserver.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusserver.h new file mode 100755 index 00000000..123eac4d --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusserver.h @@ -0,0 +1,60 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_SERVER_H__ +#define __G_DBUS_SERVER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_SERVER (g_dbus_server_get_type ()) +#define G_DBUS_SERVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_SERVER, GDBusServer)) +#define G_IS_DBUS_SERVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_SERVER)) + +GLIB_AVAILABLE_IN_ALL +GType g_dbus_server_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GDBusServer *g_dbus_server_new_sync (const gchar *address, + GDBusServerFlags flags, + const gchar *guid, + GDBusAuthObserver *observer, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_server_get_client_address (GDBusServer *server); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dbus_server_get_guid (GDBusServer *server); +GLIB_AVAILABLE_IN_ALL +GDBusServerFlags g_dbus_server_get_flags (GDBusServer *server); +GLIB_AVAILABLE_IN_ALL +void g_dbus_server_start (GDBusServer *server); +GLIB_AVAILABLE_IN_ALL +void g_dbus_server_stop (GDBusServer *server); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_server_is_active (GDBusServer *server); + +G_END_DECLS + +#endif /* __G_DBUS_SERVER_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusutils.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusutils.h new file mode 100755 index 00000000..5aecb514 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdbusutils.h @@ -0,0 +1,55 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DBUS_UTILS_H__ +#define __G_DBUS_UTILS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_is_guid (const gchar *string); +GLIB_AVAILABLE_IN_ALL +gchar *g_dbus_generate_guid (void); + +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_is_name (const gchar *string); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_is_unique_name (const gchar *string); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_is_member_name (const gchar *string); +GLIB_AVAILABLE_IN_ALL +gboolean g_dbus_is_interface_name (const gchar *string); + +GLIB_AVAILABLE_IN_ALL +void g_dbus_gvariant_to_gvalue (GVariant *value, + GValue *out_gvalue); +GLIB_AVAILABLE_IN_ALL +GVariant *g_dbus_gvalue_to_gvariant (const GValue *gvalue, + const GVariantType *type); + +G_END_DECLS + +#endif /* __G_DBUS_UTILS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdrive.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdrive.h new file mode 100755 index 00000000..a3370421 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdrive.h @@ -0,0 +1,263 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + * David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_DRIVE_H__ +#define __G_DRIVE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_DRIVE (g_drive_get_type ()) +#define G_DRIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_DRIVE, GDrive)) +#define G_IS_DRIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_DRIVE)) +#define G_DRIVE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_DRIVE, GDriveIface)) + +/** + * GDriveIface: + * @g_iface: The parent interface. + * @changed: Signal emitted when the drive is changed. + * @disconnected: The removed signal that is emitted when the #GDrive have been disconnected. If the recipient is holding references to the object they should release them so the object can be finalized. + * @eject_button: Signal emitted when the physical eject button (if any) of a drive have been pressed. + * @get_name: Returns the name for the given #GDrive. + * @get_icon: Returns a #GIcon for the given #GDrive. + * @has_volumes: Returns %TRUE if the #GDrive has mountable volumes. + * @get_volumes: Returns a list #GList of #GVolume for the #GDrive. + * @is_removable: Returns %TRUE if the #GDrive and/or its media is considered removable by the user. Since 2.50. + * @is_media_removable: Returns %TRUE if the #GDrive supports removal and insertion of media. + * @has_media: Returns %TRUE if the #GDrive has media inserted. + * @is_media_check_automatic: Returns %TRUE if the #GDrive is capabable of automatically detecting media changes. + * @can_poll_for_media: Returns %TRUE if the #GDrive is capable of manually polling for media change. + * @can_eject: Returns %TRUE if the #GDrive can eject media. + * @eject: Ejects a #GDrive. + * @eject_finish: Finishes an eject operation. + * @poll_for_media: Poll for media insertion/removal on a #GDrive. + * @poll_for_media_finish: Finishes a media poll operation. + * @get_identifier: Returns the identifier of the given kind, or %NULL if + * the #GDrive doesn't have one. + * @enumerate_identifiers: Returns an array strings listing the kinds + * of identifiers which the #GDrive has. + * @get_start_stop_type: Gets a #GDriveStartStopType with details about starting/stopping the drive. Since 2.22. + * @can_stop: Returns %TRUE if a #GDrive can be stopped. Since 2.22. + * @stop: Stops a #GDrive. Since 2.22. + * @stop_finish: Finishes a stop operation. Since 2.22. + * @can_start: Returns %TRUE if a #GDrive can be started. Since 2.22. + * @can_start_degraded: Returns %TRUE if a #GDrive can be started degraded. Since 2.22. + * @start: Starts a #GDrive. Since 2.22. + * @start_finish: Finishes a start operation. Since 2.22. + * @stop_button: Signal emitted when the physical stop button (if any) of a drive have been pressed. Since 2.22. + * @eject_with_operation: Starts ejecting a #GDrive using a #GMountOperation. Since 2.22. + * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22. + * @get_sort_key: Gets a key used for sorting #GDrive instances or %NULL if no such key exists. Since 2.32. + * @get_symbolic_icon: Returns a symbolic #GIcon for the given #GDrive. Since 2.34. + * + * Interface for creating #GDrive implementations. + */ +typedef struct _GDriveIface GDriveIface; + +struct _GDriveIface +{ + GTypeInterface g_iface; + + /* signals */ + void (* changed) (GDrive *drive); + void (* disconnected) (GDrive *drive); + void (* eject_button) (GDrive *drive); + + /* Virtual Table */ + char * (* get_name) (GDrive *drive); + GIcon * (* get_icon) (GDrive *drive); + gboolean (* has_volumes) (GDrive *drive); + GList * (* get_volumes) (GDrive *drive); + gboolean (* is_media_removable) (GDrive *drive); + gboolean (* has_media) (GDrive *drive); + gboolean (* is_media_check_automatic) (GDrive *drive); + gboolean (* can_eject) (GDrive *drive); + gboolean (* can_poll_for_media) (GDrive *drive); + void (* eject) (GDrive *drive, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* eject_finish) (GDrive *drive, + GAsyncResult *result, + GError **error); + void (* poll_for_media) (GDrive *drive, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* poll_for_media_finish) (GDrive *drive, + GAsyncResult *result, + GError **error); + + char * (* get_identifier) (GDrive *drive, + const char *kind); + char ** (* enumerate_identifiers) (GDrive *drive); + + GDriveStartStopType (* get_start_stop_type) (GDrive *drive); + + gboolean (* can_start) (GDrive *drive); + gboolean (* can_start_degraded) (GDrive *drive); + void (* start) (GDrive *drive, + GDriveStartFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* start_finish) (GDrive *drive, + GAsyncResult *result, + GError **error); + + gboolean (* can_stop) (GDrive *drive); + void (* stop) (GDrive *drive, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* stop_finish) (GDrive *drive, + GAsyncResult *result, + GError **error); + /* signal, not VFunc */ + void (* stop_button) (GDrive *drive); + + void (* eject_with_operation) (GDrive *drive, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* eject_with_operation_finish) (GDrive *drive, + GAsyncResult *result, + GError **error); + + const gchar * (* get_sort_key) (GDrive *drive); + GIcon * (* get_symbolic_icon) (GDrive *drive); + gboolean (* is_removable) (GDrive *drive); + +}; + +GLIB_AVAILABLE_IN_ALL +GType g_drive_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +char * g_drive_get_name (GDrive *drive); +GLIB_AVAILABLE_IN_ALL +GIcon * g_drive_get_icon (GDrive *drive); +GLIB_AVAILABLE_IN_ALL +GIcon * g_drive_get_symbolic_icon (GDrive *drive); +GLIB_AVAILABLE_IN_ALL +gboolean g_drive_has_volumes (GDrive *drive); +GLIB_AVAILABLE_IN_ALL +GList * g_drive_get_volumes (GDrive *drive); +GLIB_AVAILABLE_IN_2_50 +gboolean g_drive_is_removable (GDrive *drive); +GLIB_AVAILABLE_IN_ALL +gboolean g_drive_is_media_removable (GDrive *drive); +GLIB_AVAILABLE_IN_ALL +gboolean g_drive_has_media (GDrive *drive); +GLIB_AVAILABLE_IN_ALL +gboolean g_drive_is_media_check_automatic (GDrive *drive); +GLIB_AVAILABLE_IN_ALL +gboolean g_drive_can_poll_for_media (GDrive *drive); +GLIB_AVAILABLE_IN_ALL +gboolean g_drive_can_eject (GDrive *drive); +GLIB_DEPRECATED_FOR(g_drive_eject_with_operation) +void g_drive_eject (GDrive *drive, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_DEPRECATED_FOR(g_drive_eject_with_operation_finish) +gboolean g_drive_eject_finish (GDrive *drive, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_drive_poll_for_media (GDrive *drive, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_drive_poll_for_media_finish (GDrive *drive, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +char * g_drive_get_identifier (GDrive *drive, + const char *kind); +GLIB_AVAILABLE_IN_ALL +char ** g_drive_enumerate_identifiers (GDrive *drive); + +GLIB_AVAILABLE_IN_ALL +GDriveStartStopType g_drive_get_start_stop_type (GDrive *drive); + +GLIB_AVAILABLE_IN_ALL +gboolean g_drive_can_start (GDrive *drive); +GLIB_AVAILABLE_IN_ALL +gboolean g_drive_can_start_degraded (GDrive *drive); +GLIB_AVAILABLE_IN_ALL +void g_drive_start (GDrive *drive, + GDriveStartFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_drive_start_finish (GDrive *drive, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_drive_can_stop (GDrive *drive); +GLIB_AVAILABLE_IN_ALL +void g_drive_stop (GDrive *drive, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_drive_stop_finish (GDrive *drive, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_drive_eject_with_operation (GDrive *drive, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_drive_eject_with_operation_finish (GDrive *drive, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_2_32 +const gchar *g_drive_get_sort_key (GDrive *drive); + +G_END_DECLS + +#endif /* __G_DRIVE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdtlsclientconnection.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdtlsclientconnection.h new file mode 100755 index 00000000..daf8e54f --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdtlsclientconnection.h @@ -0,0 +1,75 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2010 Red Hat, Inc. + * Copyright © 2015 Collabora, Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_DTLS_CLIENT_CONNECTION_H__ +#define __G_DTLS_CLIENT_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gdtlsconnection.h> + +G_BEGIN_DECLS + +#define G_TYPE_DTLS_CLIENT_CONNECTION (g_dtls_client_connection_get_type ()) +#define G_DTLS_CLIENT_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_DTLS_CLIENT_CONNECTION, GDtlsClientConnection)) +#define G_IS_DTLS_CLIENT_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_DTLS_CLIENT_CONNECTION)) +#define G_DTLS_CLIENT_CONNECTION_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_DTLS_CLIENT_CONNECTION, GDtlsClientConnectionInterface)) + +typedef struct _GDtlsClientConnectionInterface GDtlsClientConnectionInterface; + +/** + * GDtlsClientConnectionInterface: + * @g_iface: The parent interface. + * + * vtable for a #GDtlsClientConnection implementation. + * + * Since: 2.48 + */ +struct _GDtlsClientConnectionInterface +{ + GTypeInterface g_iface; +}; + +GLIB_AVAILABLE_IN_2_48 +GType g_dtls_client_connection_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_48 +GDatagramBased *g_dtls_client_connection_new (GDatagramBased *base_socket, + GSocketConnectable *server_identity, + GError **error); + +GLIB_AVAILABLE_IN_2_48 +GTlsCertificateFlags g_dtls_client_connection_get_validation_flags (GDtlsClientConnection *conn); +GLIB_AVAILABLE_IN_2_48 +void g_dtls_client_connection_set_validation_flags (GDtlsClientConnection *conn, + GTlsCertificateFlags flags); +GLIB_AVAILABLE_IN_2_48 +GSocketConnectable *g_dtls_client_connection_get_server_identity (GDtlsClientConnection *conn); +GLIB_AVAILABLE_IN_2_48 +void g_dtls_client_connection_set_server_identity (GDtlsClientConnection *conn, + GSocketConnectable *identity); +GLIB_AVAILABLE_IN_2_48 +GList * g_dtls_client_connection_get_accepted_cas (GDtlsClientConnection *conn); + + +G_END_DECLS + +#endif /* __G_DTLS_CLIENT_CONNECTION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdtlsconnection.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdtlsconnection.h new file mode 100755 index 00000000..207b6dfd --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdtlsconnection.h @@ -0,0 +1,191 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2010 Red Hat, Inc. + * Copyright © 2015 Collabora, Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_DTLS_CONNECTION_H__ +#define __G_DTLS_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gdatagrambased.h> + +G_BEGIN_DECLS + +#define G_TYPE_DTLS_CONNECTION (g_dtls_connection_get_type ()) +#define G_DTLS_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_DTLS_CONNECTION, GDtlsConnection)) +#define G_IS_DTLS_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_DTLS_CONNECTION)) +#define G_DTLS_CONNECTION_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_DTLS_CONNECTION, GDtlsConnectionInterface)) + +typedef struct _GDtlsConnectionInterface GDtlsConnectionInterface; + +/** + * GDtlsConnectionInterface: + * @g_iface: The parent interface. + * @accept_certificate: Check whether to accept a certificate. + * @handshake: Perform a handshake operation. + * @handshake_async: Start an asynchronous handshake operation. + * @handshake_finish: Finish an asynchronous handshake operation. + * @shutdown: Shut down one or both directions of the connection. + * @shutdown_async: Start an asynchronous shutdown operation. + * @shutdown_finish: Finish an asynchronous shutdown operation. + * + * Virtual method table for a #GDtlsConnection implementation. + * + * Since: 2.48 + */ +struct _GDtlsConnectionInterface +{ + GTypeInterface g_iface; + + /* signals */ + gboolean (*accept_certificate) (GDtlsConnection *connection, + GTlsCertificate *peer_cert, + GTlsCertificateFlags errors); + + /* methods */ + gboolean (*handshake) (GDtlsConnection *conn, + GCancellable *cancellable, + GError **error); + + void (*handshake_async) (GDtlsConnection *conn, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*handshake_finish) (GDtlsConnection *conn, + GAsyncResult *result, + GError **error); + + gboolean (*shutdown) (GDtlsConnection *conn, + gboolean shutdown_read, + gboolean shutdown_write, + GCancellable *cancellable, + GError **error); + + void (*shutdown_async) (GDtlsConnection *conn, + gboolean shutdown_read, + gboolean shutdown_write, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*shutdown_finish) (GDtlsConnection *conn, + GAsyncResult *result, + GError **error); +}; + +GLIB_AVAILABLE_IN_2_48 +GType g_dtls_connection_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_48 +void g_dtls_connection_set_database (GDtlsConnection *conn, + GTlsDatabase *database); +GLIB_AVAILABLE_IN_2_48 +GTlsDatabase *g_dtls_connection_get_database (GDtlsConnection *conn); + +GLIB_AVAILABLE_IN_2_48 +void g_dtls_connection_set_certificate (GDtlsConnection *conn, + GTlsCertificate *certificate); +GLIB_AVAILABLE_IN_2_48 +GTlsCertificate *g_dtls_connection_get_certificate (GDtlsConnection *conn); + +GLIB_AVAILABLE_IN_2_48 +void g_dtls_connection_set_interaction (GDtlsConnection *conn, + GTlsInteraction *interaction); +GLIB_AVAILABLE_IN_2_48 +GTlsInteraction *g_dtls_connection_get_interaction (GDtlsConnection *conn); + +GLIB_AVAILABLE_IN_2_48 +GTlsCertificate *g_dtls_connection_get_peer_certificate (GDtlsConnection *conn); +GLIB_AVAILABLE_IN_2_48 +GTlsCertificateFlags g_dtls_connection_get_peer_certificate_errors (GDtlsConnection *conn); + +GLIB_AVAILABLE_IN_2_48 +void g_dtls_connection_set_require_close_notify (GDtlsConnection *conn, + gboolean require_close_notify); +GLIB_AVAILABLE_IN_2_48 +gboolean g_dtls_connection_get_require_close_notify (GDtlsConnection *conn); + +GLIB_AVAILABLE_IN_2_48 +void g_dtls_connection_set_rehandshake_mode (GDtlsConnection *conn, + GTlsRehandshakeMode mode); +GLIB_AVAILABLE_IN_2_48 +GTlsRehandshakeMode g_dtls_connection_get_rehandshake_mode (GDtlsConnection *conn); + +GLIB_AVAILABLE_IN_2_48 +gboolean g_dtls_connection_handshake (GDtlsConnection *conn, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_2_48 +void g_dtls_connection_handshake_async (GDtlsConnection *conn, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_2_48 +gboolean g_dtls_connection_handshake_finish (GDtlsConnection *conn, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_2_48 +gboolean g_dtls_connection_shutdown (GDtlsConnection *conn, + gboolean shutdown_read, + gboolean shutdown_write, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_2_48 +void g_dtls_connection_shutdown_async (GDtlsConnection *conn, + gboolean shutdown_read, + gboolean shutdown_write, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_2_48 +gboolean g_dtls_connection_shutdown_finish (GDtlsConnection *conn, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_2_48 +gboolean g_dtls_connection_close (GDtlsConnection *conn, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_2_48 +void g_dtls_connection_close_async (GDtlsConnection *conn, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_2_48 +gboolean g_dtls_connection_close_finish (GDtlsConnection *conn, + GAsyncResult *result, + GError **error); + +/*< protected >*/ +GLIB_AVAILABLE_IN_2_48 +gboolean g_dtls_connection_emit_accept_certificate (GDtlsConnection *conn, + GTlsCertificate *peer_cert, + GTlsCertificateFlags errors); +G_END_DECLS + +#endif /* __G_DTLS_CONNECTION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdtlsserverconnection.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdtlsserverconnection.h new file mode 100755 index 00000000..24ecb76c --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gdtlsserverconnection.h @@ -0,0 +1,69 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2010 Red Hat, Inc. + * Copyright © 2015 Collabora, Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_DTLS_SERVER_CONNECTION_H__ +#define __G_DTLS_SERVER_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gdtlsconnection.h> + +G_BEGIN_DECLS + +#define G_TYPE_DTLS_SERVER_CONNECTION (g_dtls_server_connection_get_type ()) +#define G_DTLS_SERVER_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_DTLS_SERVER_CONNECTION, GDtlsServerConnection)) +#define G_IS_DTLS_SERVER_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_DTLS_SERVER_CONNECTION)) +#define G_DTLS_SERVER_CONNECTION_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_DTLS_SERVER_CONNECTION, GDtlsServerConnectionInterface)) + +/** + * GDtlsServerConnection: + * + * DTLS server-side connection. This is the server-side implementation + * of a #GDtlsConnection. + * + * Since: 2.48 + */ +typedef struct _GDtlsServerConnectionInterface GDtlsServerConnectionInterface; + +/** + * GDtlsServerConnectionInterface: + * @g_iface: The parent interface. + * + * vtable for a #GDtlsServerConnection implementation. + * + * Since: 2.48 + */ +struct _GDtlsServerConnectionInterface +{ + GTypeInterface g_iface; +}; + +GLIB_AVAILABLE_IN_2_48 +GType g_dtls_server_connection_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_48 +GDatagramBased *g_dtls_server_connection_new (GDatagramBased *base_socket, + GTlsCertificate *certificate, + GError **error); + +G_END_DECLS + +#endif /* __G_DTLS_SERVER_CONNECTION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gemblem.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gemblem.h new file mode 100755 index 00000000..094f9cb8 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gemblem.h @@ -0,0 +1,61 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Clemens N. Buss <cebuzz@gmail.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + */ + +#ifndef __G_EMBLEM_H__ +#define __G_EMBLEM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gioenums.h> + +G_BEGIN_DECLS + +#define G_TYPE_EMBLEM (g_emblem_get_type ()) +#define G_EMBLEM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_EMBLEM, GEmblem)) +#define G_EMBLEM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_EMBLEM, GEmblemClass)) +#define G_IS_EMBLEM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_EMBLEM)) +#define G_IS_EMBLEM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_EMBLEM)) +#define G_EMBLEM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_EMBLEM, GEmblemClass)) + +/** + * GEmblem: + * + * An object for Emblems + */ +typedef struct _GEmblem GEmblem; +typedef struct _GEmblemClass GEmblemClass; + +GLIB_AVAILABLE_IN_ALL +GType g_emblem_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GEmblem *g_emblem_new (GIcon *icon); +GLIB_AVAILABLE_IN_ALL +GEmblem *g_emblem_new_with_origin (GIcon *icon, + GEmblemOrigin origin); +GLIB_AVAILABLE_IN_ALL +GIcon *g_emblem_get_icon (GEmblem *emblem); +GLIB_AVAILABLE_IN_ALL +GEmblemOrigin g_emblem_get_origin (GEmblem *emblem); + +G_END_DECLS + +#endif /* __G_EMBLEM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gemblemedicon.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gemblemedicon.h new file mode 100755 index 00000000..3374e0a6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gemblemedicon.h @@ -0,0 +1,81 @@ +/* Gio - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Matthias Clasen <mclasen@redhat.com> + * Clemens N. Buss <cebuzz@gmail.com> + */ + +#ifndef __G_EMBLEMED_ICON_H__ +#define __G_EMBLEMED_ICON_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gicon.h> +#include <gio/gemblem.h> + +G_BEGIN_DECLS + +#define G_TYPE_EMBLEMED_ICON (g_emblemed_icon_get_type ()) +#define G_EMBLEMED_ICON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_EMBLEMED_ICON, GEmblemedIcon)) +#define G_EMBLEMED_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_EMBLEMED_ICON, GEmblemedIconClass)) +#define G_IS_EMBLEMED_ICON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_EMBLEMED_ICON)) +#define G_IS_EMBLEMED_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_EMBLEMED_ICON)) +#define G_EMBLEMED_ICON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_EMBLEMED_ICON, GEmblemedIconClass)) + +/** + * GEmblemedIcon: + * + * An implementation of #GIcon for icons with emblems. + **/ +typedef struct _GEmblemedIcon GEmblemedIcon; +typedef struct _GEmblemedIconClass GEmblemedIconClass; +typedef struct _GEmblemedIconPrivate GEmblemedIconPrivate; + +struct _GEmblemedIcon +{ + GObject parent_instance; + + /*< private >*/ + GEmblemedIconPrivate *priv; +}; + +struct _GEmblemedIconClass +{ + GObjectClass parent_class; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_emblemed_icon_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GIcon *g_emblemed_icon_new (GIcon *icon, + GEmblem *emblem); +GLIB_AVAILABLE_IN_ALL +GIcon *g_emblemed_icon_get_icon (GEmblemedIcon *emblemed); +GLIB_AVAILABLE_IN_ALL +GList *g_emblemed_icon_get_emblems (GEmblemedIcon *emblemed); +GLIB_AVAILABLE_IN_ALL +void g_emblemed_icon_add_emblem (GEmblemedIcon *emblemed, + GEmblem *emblem); +GLIB_AVAILABLE_IN_ALL +void g_emblemed_icon_clear_emblems (GEmblemedIcon *emblemed); + +G_END_DECLS + +#endif /* __G_EMBLEMED_ICON_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfile.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfile.h new file mode 100755 index 00000000..4aff644c --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfile.h @@ -0,0 +1,1274 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_FILE_H__ +#define __G_FILE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_FILE (g_file_get_type ()) +#define G_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_FILE, GFile)) +#define G_IS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_FILE)) +#define G_FILE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_FILE, GFileIface)) + +#if 0 +/** + * GFile: + * + * A handle to an object implementing the #GFileIface interface. + * Generally stores a location within the file system. Handles do not + * necessarily represent files or directories that currently exist. + **/ +typedef struct _GFile GFile; /* Dummy typedef */ +#endif +typedef struct _GFileIface GFileIface; + + +/** + * GFileIface: + * @g_iface: The parent interface. + * @dup: Duplicates a #GFile. + * @hash: Creates a hash of a #GFile. + * @equal: Checks equality of two given #GFiles. + * @is_native: Checks to see if a file is native to the system. + * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme. + * @get_uri_scheme: Gets the URI scheme for a #GFile. + * @get_basename: Gets the basename for a given #GFile. + * @get_path: Gets the current path within a #GFile. + * @get_uri: Gets a URI for the path within a #GFile. + * @get_parse_name: Gets the parsed name for the #GFile. + * @get_parent: Gets the parent directory for the #GFile. + * @prefix_matches: Checks whether a #GFile contains a specified file. + * @get_relative_path: Gets the path for a #GFile relative to a given path. + * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path. + * @get_child_for_display_name: Gets the child #GFile for a given display name. + * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile. + * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile. + * @enumerate_children_finish: Finishes asynchronously enumerating the children. + * @query_info: Gets the #GFileInfo for a #GFile. + * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile. + * @query_info_finish: Finishes an asynchronous query info operation. + * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on. + * @query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on. + * @query_filesystem_info_finish: Finishes asynchronously getting the file system info. + * @find_enclosing_mount: Gets a #GMount for the #GFile. + * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile. + * @find_enclosing_mount_finish: Finishes asynchronously getting the volume. + * @set_display_name: Sets the display name for a #GFile. + * @set_display_name_async: Asynchronously sets a #GFile's display name. + * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name. + * @query_settable_attributes: Returns a list of #GFileAttributes that can be set. + * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttributes that can be set. + * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes. + * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable. + * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable. + * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces. + * @set_attribute: Sets a #GFileAttribute. + * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo. + * @set_attributes_async: Asynchronously sets a file's attributes. + * @set_attributes_finish: Finishes setting a file's attributes asynchronously. + * @read_fn: Reads a file asynchronously. + * @read_async: Asynchronously reads a file. + * @read_finish: Finishes asynchronously reading a file. + * @append_to: Writes to the end of a file. + * @append_to_async: Asynchronously writes to the end of a file. + * @append_to_finish: Finishes an asynchronous file append operation. + * @create: Creates a new file. + * @create_async: Asynchronously creates a file. + * @create_finish: Finishes asynchronously creating a file. + * @replace: Replaces the contents of a file. + * @replace_async: Asynchronously replaces the contents of a file. + * @replace_finish: Finishes asynchronously replacing a file. + * @delete_file: Deletes a file. + * @delete_file_async: Asynchronously deletes a file. + * @delete_file_finish: Finishes an asynchronous delete. + * @trash: Sends a #GFile to the Trash location. + * @trash_async: Asynchronously sends a #GFile to the Trash location. + * @trash_finish: Finishes an asynchronous file trashing operation. + * @make_directory: Makes a directory. + * @make_directory_async: Asynchronously makes a directory. + * @make_directory_finish: Finishes making a directory asynchronously. + * @make_symbolic_link: Makes a symbolic link. + * @_make_symbolic_link_async: Asynchronously makes a symbolic link + * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously. + * @copy: Copies a file. + * @copy_async: Asynchronously copies a file. + * @copy_finish: Finishes an asynchronous copy operation. + * @move: Moves a file. + * @_move_async: Asynchronously moves a file. + * @_move_finish: Finishes an asynchronous move operation. + * @mount_mountable: Mounts a mountable object. + * @mount_mountable_finish: Finishes a mounting operation. + * @unmount_mountable: Unmounts a mountable object. + * @unmount_mountable_finish: Finishes an unmount operation. + * @eject_mountable: Ejects a mountable. + * @eject_mountable_finish: Finishes an eject operation. + * @mount_enclosing_volume: Mounts a specified location. + * @mount_enclosing_volume_finish: Finishes mounting a specified location. + * @monitor_dir: Creates a #GFileMonitor for the location. + * @monitor_file: Creates a #GFileMonitor for the location. + * @open_readwrite: Open file read/write. Since 2.22. + * @open_readwrite_async: Asynchronously opens file read/write. Since 2.22. + * @open_readwrite_finish: Finishes an asynchronous open read/write. Since 2.22. + * @create_readwrite: Creates file read/write. Since 2.22. + * @create_readwrite_async: Asynchronously creates file read/write. Since 2.22. + * @create_readwrite_finish: Finishes an asynchronous creates read/write. Since 2.22. + * @replace_readwrite: Replaces file read/write. Since 2.22. + * @replace_readwrite_async: Asynchronously replaces file read/write. Since 2.22. + * @replace_readwrite_finish: Finishes an asynchronous replace read/write. Since 2.22. + * @start_mountable: Starts a mountable object. Since 2.22. + * @start_mountable_finish: Finishes an start operation. Since 2.22. + * @stop_mountable: Stops a mountable. Since 2.22. + * @stop_mountable_finish: Finishes an stop operation. Since 2.22. + * @supports_thread_contexts: a boolean that indicates whether the #GFile implementation supports thread-default contexts. Since 2.22. + * @unmount_mountable_with_operation: Unmounts a mountable object using a #GMountOperation. Since 2.22. + * @unmount_mountable_with_operation_finish: Finishes an unmount operation using a #GMountOperation. Since 2.22. + * @eject_mountable_with_operation: Ejects a mountable object using a #GMountOperation. Since 2.22. + * @eject_mountable_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22. + * @poll_mountable: Polls a mountable object for media changes. Since 2.22. + * @poll_mountable_finish: Finishes an poll operation for media changes. Since 2.22. + * @measure_disk_usage: Recursively measures the disk usage of @file. Since 2.38 + * @measure_disk_usage_async: Asynchronously recursively measures the disk usage of @file. Since 2.38 + * @measure_disk_usage_finish: Finishes an asynchronous recursive measurement of the disk usage of @file. Since 2.38 + * + * An interface for writing VFS file handles. + **/ +struct _GFileIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + GFile * (* dup) (GFile *file); + guint (* hash) (GFile *file); + gboolean (* equal) (GFile *file1, + GFile *file2); + gboolean (* is_native) (GFile *file); + gboolean (* has_uri_scheme) (GFile *file, + const char *uri_scheme); + char * (* get_uri_scheme) (GFile *file); + char * (* get_basename) (GFile *file); + char * (* get_path) (GFile *file); + char * (* get_uri) (GFile *file); + char * (* get_parse_name) (GFile *file); + GFile * (* get_parent) (GFile *file); + gboolean (* prefix_matches) (GFile *prefix, + GFile *file); + char * (* get_relative_path) (GFile *parent, + GFile *descendant); + GFile * (* resolve_relative_path) (GFile *file, + const char *relative_path); + GFile * (* get_child_for_display_name) (GFile *file, + const char *display_name, + GError **error); + + GFileEnumerator * (* enumerate_children) (GFile *file, + const char *attributes, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); + void (* enumerate_children_async) (GFile *file, + const char *attributes, + GFileQueryInfoFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileEnumerator * (* enumerate_children_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + GFileInfo * (* query_info) (GFile *file, + const char *attributes, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); + void (* query_info_async) (GFile *file, + const char *attributes, + GFileQueryInfoFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileInfo * (* query_info_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + GFileInfo * (* query_filesystem_info) (GFile *file, + const char *attributes, + GCancellable *cancellable, + GError **error); + void (* query_filesystem_info_async) (GFile *file, + const char *attributes, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileInfo * (* query_filesystem_info_finish)(GFile *file, + GAsyncResult *res, + GError **error); + + GMount * (* find_enclosing_mount) (GFile *file, + GCancellable *cancellable, + GError **error); + void (* find_enclosing_mount_async) (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GMount * (* find_enclosing_mount_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + GFile * (* set_display_name) (GFile *file, + const char *display_name, + GCancellable *cancellable, + GError **error); + void (* set_display_name_async) (GFile *file, + const char *display_name, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFile * (* set_display_name_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + GFileAttributeInfoList * (* query_settable_attributes) (GFile *file, + GCancellable *cancellable, + GError **error); + void (* _query_settable_attributes_async) (void); + void (* _query_settable_attributes_finish) (void); + + GFileAttributeInfoList * (* query_writable_namespaces) (GFile *file, + GCancellable *cancellable, + GError **error); + void (* _query_writable_namespaces_async) (void); + void (* _query_writable_namespaces_finish) (void); + + gboolean (* set_attribute) (GFile *file, + const char *attribute, + GFileAttributeType type, + gpointer value_p, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); + gboolean (* set_attributes_from_info) (GFile *file, + GFileInfo *info, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); + void (* set_attributes_async) (GFile *file, + GFileInfo *info, + GFileQueryInfoFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* set_attributes_finish) (GFile *file, + GAsyncResult *result, + GFileInfo **info, + GError **error); + + GFileInputStream * (* read_fn) (GFile *file, + GCancellable *cancellable, + GError **error); + void (* read_async) (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileInputStream * (* read_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + GFileOutputStream * (* append_to) (GFile *file, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); + void (* append_to_async) (GFile *file, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileOutputStream * (* append_to_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + GFileOutputStream * (* create) (GFile *file, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); + void (* create_async) (GFile *file, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileOutputStream * (* create_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + GFileOutputStream * (* replace) (GFile *file, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); + void (* replace_async) (GFile *file, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileOutputStream * (* replace_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + gboolean (* delete_file) (GFile *file, + GCancellable *cancellable, + GError **error); + void (* delete_file_async) (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* delete_file_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + gboolean (* trash) (GFile *file, + GCancellable *cancellable, + GError **error); + void (* trash_async) (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* trash_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + gboolean (* make_directory) (GFile *file, + GCancellable *cancellable, + GError **error); + void (* make_directory_async) (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* make_directory_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + gboolean (* make_symbolic_link) (GFile *file, + const char *symlink_value, + GCancellable *cancellable, + GError **error); + void (* _make_symbolic_link_async) (void); + void (* _make_symbolic_link_finish) (void); + + gboolean (* copy) (GFile *source, + GFile *destination, + GFileCopyFlags flags, + GCancellable *cancellable, + GFileProgressCallback progress_callback, + gpointer progress_callback_data, + GError **error); + void (* copy_async) (GFile *source, + GFile *destination, + GFileCopyFlags flags, + int io_priority, + GCancellable *cancellable, + GFileProgressCallback progress_callback, + gpointer progress_callback_data, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* copy_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + gboolean (* move) (GFile *source, + GFile *destination, + GFileCopyFlags flags, + GCancellable *cancellable, + GFileProgressCallback progress_callback, + gpointer progress_callback_data, + GError **error); + void (* _move_async) (void); + void (* _move_finish) (void); + + void (* mount_mountable) (GFile *file, + GMountMountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFile * (* mount_mountable_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + void (* unmount_mountable) (GFile *file, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* unmount_mountable_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + void (* eject_mountable) (GFile *file, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* eject_mountable_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + void (* mount_enclosing_volume) (GFile *location, + GMountMountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* mount_enclosing_volume_finish) (GFile *location, + GAsyncResult *result, + GError **error); + + GFileMonitor * (* monitor_dir) (GFile *file, + GFileMonitorFlags flags, + GCancellable *cancellable, + GError **error); + GFileMonitor * (* monitor_file) (GFile *file, + GFileMonitorFlags flags, + GCancellable *cancellable, + GError **error); + + GFileIOStream * (* open_readwrite) (GFile *file, + GCancellable *cancellable, + GError **error); + void (* open_readwrite_async) (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileIOStream * (* open_readwrite_finish) (GFile *file, + GAsyncResult *res, + GError **error); + GFileIOStream * (* create_readwrite) (GFile *file, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); + void (* create_readwrite_async) (GFile *file, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileIOStream * (* create_readwrite_finish) (GFile *file, + GAsyncResult *res, + GError **error); + GFileIOStream * (* replace_readwrite) (GFile *file, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); + void (* replace_readwrite_async) (GFile *file, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileIOStream * (* replace_readwrite_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + void (* start_mountable) (GFile *file, + GDriveStartFlags flags, + GMountOperation *start_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* start_mountable_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + void (* stop_mountable) (GFile *file, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* stop_mountable_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + gboolean supports_thread_contexts; + + void (* unmount_mountable_with_operation) (GFile *file, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* unmount_mountable_with_operation_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + void (* eject_mountable_with_operation) (GFile *file, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* eject_mountable_with_operation_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + void (* poll_mountable) (GFile *file, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* poll_mountable_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + gboolean (* measure_disk_usage) (GFile *file, + GFileMeasureFlags flags, + GCancellable *cancellable, + GFileMeasureProgressCallback progress_callback, + gpointer progress_data, + guint64 *disk_usage, + guint64 *num_dirs, + guint64 *num_files, + GError **error); + void (* measure_disk_usage_async) (GFile *file, + GFileMeasureFlags flags, + gint io_priority, + GCancellable *cancellable, + GFileMeasureProgressCallback progress_callback, + gpointer progress_data, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* measure_disk_usage_finish) (GFile *file, + GAsyncResult *result, + guint64 *disk_usage, + guint64 *num_dirs, + guint64 *num_files, + GError **error); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_file_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GFile * g_file_new_for_path (const char *path); +GLIB_AVAILABLE_IN_ALL +GFile * g_file_new_for_uri (const char *uri); +GLIB_AVAILABLE_IN_ALL +GFile * g_file_new_for_commandline_arg (const char *arg); +GLIB_AVAILABLE_IN_2_36 +GFile * g_file_new_for_commandline_arg_and_cwd (const gchar *arg, + const gchar *cwd); +GLIB_AVAILABLE_IN_2_32 +GFile * g_file_new_tmp (const char *tmpl, + GFileIOStream **iostream, + GError **error); +GLIB_AVAILABLE_IN_ALL +GFile * g_file_parse_name (const char *parse_name); +GLIB_AVAILABLE_IN_2_56 +GFile * g_file_new_build_filename (const gchar *first_element, + ...) G_GNUC_NULL_TERMINATED; +GLIB_AVAILABLE_IN_ALL +GFile * g_file_dup (GFile *file); +GLIB_AVAILABLE_IN_ALL +guint g_file_hash (gconstpointer file); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_equal (GFile *file1, + GFile *file2); +GLIB_AVAILABLE_IN_ALL +char * g_file_get_basename (GFile *file); +GLIB_AVAILABLE_IN_ALL +char * g_file_get_path (GFile *file); +GLIB_AVAILABLE_IN_2_56 +const char * g_file_peek_path (GFile *file); +GLIB_AVAILABLE_IN_ALL +char * g_file_get_uri (GFile *file); +GLIB_AVAILABLE_IN_ALL +char * g_file_get_parse_name (GFile *file); +GLIB_AVAILABLE_IN_ALL +GFile * g_file_get_parent (GFile *file); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_has_parent (GFile *file, + GFile *parent); +GLIB_AVAILABLE_IN_ALL +GFile * g_file_get_child (GFile *file, + const char *name); +GLIB_AVAILABLE_IN_ALL +GFile * g_file_get_child_for_display_name (GFile *file, + const char *display_name, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_has_prefix (GFile *file, + GFile *prefix); +GLIB_AVAILABLE_IN_ALL +char * g_file_get_relative_path (GFile *parent, + GFile *descendant); +GLIB_AVAILABLE_IN_ALL +GFile * g_file_resolve_relative_path (GFile *file, + const char *relative_path); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_is_native (GFile *file); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_has_uri_scheme (GFile *file, + const char *uri_scheme); +GLIB_AVAILABLE_IN_ALL +char * g_file_get_uri_scheme (GFile *file); +GLIB_AVAILABLE_IN_ALL +GFileInputStream * g_file_read (GFile *file, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_read_async (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GFileInputStream * g_file_read_finish (GFile *file, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GFileOutputStream * g_file_append_to (GFile *file, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +GFileOutputStream * g_file_create (GFile *file, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +GFileOutputStream * g_file_replace (GFile *file, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_append_to_async (GFile *file, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GFileOutputStream * g_file_append_to_finish (GFile *file, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_create_async (GFile *file, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GFileOutputStream * g_file_create_finish (GFile *file, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_replace_async (GFile *file, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GFileOutputStream * g_file_replace_finish (GFile *file, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GFileIOStream * g_file_open_readwrite (GFile *file, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_open_readwrite_async (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GFileIOStream * g_file_open_readwrite_finish (GFile *file, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GFileIOStream * g_file_create_readwrite (GFile *file, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_create_readwrite_async (GFile *file, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GFileIOStream * g_file_create_readwrite_finish (GFile *file, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GFileIOStream * g_file_replace_readwrite (GFile *file, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_replace_readwrite_async (GFile *file, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GFileIOStream * g_file_replace_readwrite_finish (GFile *file, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_query_exists (GFile *file, + GCancellable *cancellable); +GLIB_AVAILABLE_IN_ALL +GFileType g_file_query_file_type (GFile *file, + GFileQueryInfoFlags flags, + GCancellable *cancellable); +GLIB_AVAILABLE_IN_ALL +GFileInfo * g_file_query_info (GFile *file, + const char *attributes, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_query_info_async (GFile *file, + const char *attributes, + GFileQueryInfoFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GFileInfo * g_file_query_info_finish (GFile *file, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GFileInfo * g_file_query_filesystem_info (GFile *file, + const char *attributes, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_query_filesystem_info_async (GFile *file, + const char *attributes, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GFileInfo * g_file_query_filesystem_info_finish (GFile *file, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GMount * g_file_find_enclosing_mount (GFile *file, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_find_enclosing_mount_async (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GMount * g_file_find_enclosing_mount_finish (GFile *file, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GFileEnumerator * g_file_enumerate_children (GFile *file, + const char *attributes, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_enumerate_children_async (GFile *file, + const char *attributes, + GFileQueryInfoFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GFileEnumerator * g_file_enumerate_children_finish (GFile *file, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +GFile * g_file_set_display_name (GFile *file, + const char *display_name, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_set_display_name_async (GFile *file, + const char *display_name, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GFile * g_file_set_display_name_finish (GFile *file, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_delete (GFile *file, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_2_34 +void g_file_delete_async (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_34 +gboolean g_file_delete_finish (GFile *file, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_file_trash (GFile *file, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_2_38 +void g_file_trash_async (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_38 +gboolean g_file_trash_finish (GFile *file, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_file_copy (GFile *source, + GFile *destination, + GFileCopyFlags flags, + GCancellable *cancellable, + GFileProgressCallback progress_callback, + gpointer progress_callback_data, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_copy_async (GFile *source, + GFile *destination, + GFileCopyFlags flags, + int io_priority, + GCancellable *cancellable, + GFileProgressCallback progress_callback, + gpointer progress_callback_data, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_copy_finish (GFile *file, + GAsyncResult *res, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_move (GFile *source, + GFile *destination, + GFileCopyFlags flags, + GCancellable *cancellable, + GFileProgressCallback progress_callback, + gpointer progress_callback_data, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_make_directory (GFile *file, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_2_38 +void g_file_make_directory_async (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_2_38 +gboolean g_file_make_directory_finish (GFile *file, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_file_make_directory_with_parents (GFile *file, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_make_symbolic_link (GFile *file, + const char *symlink_value, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_set_attribute (GFile *file, + const char *attribute, + GFileAttributeType type, + gpointer value_p, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_set_attributes_from_info (GFile *file, + GFileInfo *info, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_set_attributes_async (GFile *file, + GFileInfo *info, + GFileQueryInfoFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_set_attributes_finish (GFile *file, + GAsyncResult *result, + GFileInfo **info, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_set_attribute_string (GFile *file, + const char *attribute, + const char *value, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_set_attribute_byte_string (GFile *file, + const char *attribute, + const char *value, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_set_attribute_uint32 (GFile *file, + const char *attribute, + guint32 value, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_set_attribute_int32 (GFile *file, + const char *attribute, + gint32 value, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_set_attribute_uint64 (GFile *file, + const char *attribute, + guint64 value, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_set_attribute_int64 (GFile *file, + const char *attribute, + gint64 value, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_mount_enclosing_volume (GFile *location, + GMountMountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_mount_enclosing_volume_finish (GFile *location, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_mount_mountable (GFile *file, + GMountMountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GFile * g_file_mount_mountable_finish (GFile *file, + GAsyncResult *result, + GError **error); +GLIB_DEPRECATED_FOR(g_file_unmount_mountable_with_operation) +void g_file_unmount_mountable (GFile *file, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_DEPRECATED_FOR(g_file_unmount_mountable_with_operation_finish) +gboolean g_file_unmount_mountable_finish (GFile *file, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_unmount_mountable_with_operation (GFile *file, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_unmount_mountable_with_operation_finish (GFile *file, + GAsyncResult *result, + GError **error); +GLIB_DEPRECATED_FOR(g_file_eject_mountable_with_operation) +void g_file_eject_mountable (GFile *file, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_DEPRECATED_FOR(g_file_eject_mountable_with_operation_finish) +gboolean g_file_eject_mountable_finish (GFile *file, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_eject_mountable_with_operation (GFile *file, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_eject_mountable_with_operation_finish (GFile *file, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_file_copy_attributes (GFile *source, + GFile *destination, + GFileCopyFlags flags, + GCancellable *cancellable, + GError **error); + + +GLIB_AVAILABLE_IN_ALL +GFileMonitor* g_file_monitor_directory (GFile *file, + GFileMonitorFlags flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +GFileMonitor* g_file_monitor_file (GFile *file, + GFileMonitorFlags flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +GFileMonitor* g_file_monitor (GFile *file, + GFileMonitorFlags flags, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_2_38 +gboolean g_file_measure_disk_usage (GFile *file, + GFileMeasureFlags flags, + GCancellable *cancellable, + GFileMeasureProgressCallback progress_callback, + gpointer progress_data, + guint64 *disk_usage, + guint64 *num_dirs, + guint64 *num_files, + GError **error); + +GLIB_AVAILABLE_IN_2_38 +void g_file_measure_disk_usage_async (GFile *file, + GFileMeasureFlags flags, + gint io_priority, + GCancellable *cancellable, + GFileMeasureProgressCallback progress_callback, + gpointer progress_data, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_38 +gboolean g_file_measure_disk_usage_finish (GFile *file, + GAsyncResult *result, + guint64 *disk_usage, + guint64 *num_dirs, + guint64 *num_files, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_file_start_mountable (GFile *file, + GDriveStartFlags flags, + GMountOperation *start_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_start_mountable_finish (GFile *file, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_stop_mountable (GFile *file, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_stop_mountable_finish (GFile *file, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_file_poll_mountable (GFile *file, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_poll_mountable_finish (GFile *file, + GAsyncResult *result, + GError **error); + +/* Utilities */ + +GLIB_AVAILABLE_IN_ALL +GAppInfo *g_file_query_default_handler (GFile *file, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_load_contents (GFile *file, + GCancellable *cancellable, + char **contents, + gsize *length, + char **etag_out, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_load_contents_async (GFile *file, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_load_contents_finish (GFile *file, + GAsyncResult *res, + char **contents, + gsize *length, + char **etag_out, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_load_partial_contents_async (GFile *file, + GCancellable *cancellable, + GFileReadMoreCallback read_more_callback, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_load_partial_contents_finish (GFile *file, + GAsyncResult *res, + char **contents, + gsize *length, + char **etag_out, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_replace_contents (GFile *file, + const char *contents, + gsize length, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + char **new_etag, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_replace_contents_async (GFile *file, + const char *contents, + gsize length, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_2_40 +void g_file_replace_contents_bytes_async (GFile *file, + GBytes *contents, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_replace_contents_finish (GFile *file, + GAsyncResult *res, + char **new_etag, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_file_supports_thread_contexts (GFile *file); + +GLIB_AVAILABLE_IN_2_56 +GBytes *g_file_load_bytes (GFile *file, + GCancellable *cancellable, + gchar **etag_out, + GError **error); +GLIB_AVAILABLE_IN_2_56 +void g_file_load_bytes_async (GFile *file, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_2_56 +GBytes *g_file_load_bytes_finish (GFile *file, + GAsyncResult *result, + gchar **etag_out, + GError **error); + +G_END_DECLS + +#endif /* __G_FILE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileattribute.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileattribute.h new file mode 100755 index 00000000..a5510470 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileattribute.h @@ -0,0 +1,84 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_FILE_ATTRIBUTE_H__ +#define __G_FILE_ATTRIBUTE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +/** + * GFileAttributeInfo: + * @name: the name of the attribute. + * @type: the #GFileAttributeType type of the attribute. + * @flags: a set of #GFileAttributeInfoFlags. + * + * Information about a specific attribute. + **/ +struct _GFileAttributeInfo +{ + char *name; + GFileAttributeType type; + GFileAttributeInfoFlags flags; +}; + +/** + * GFileAttributeInfoList: + * @infos: an array of #GFileAttributeInfos. + * @n_infos: the number of values in the array. + * + * Acts as a lightweight registry for possible valid file attributes. + * The registry stores Key-Value pair formats as #GFileAttributeInfos. + **/ +struct _GFileAttributeInfoList +{ + GFileAttributeInfo *infos; + int n_infos; +}; + +#define G_TYPE_FILE_ATTRIBUTE_INFO_LIST (g_file_attribute_info_list_get_type ()) +GLIB_AVAILABLE_IN_ALL +GType g_file_attribute_info_list_get_type (void); + +GLIB_AVAILABLE_IN_ALL +GFileAttributeInfoList * g_file_attribute_info_list_new (void); +GLIB_AVAILABLE_IN_ALL +GFileAttributeInfoList * g_file_attribute_info_list_ref (GFileAttributeInfoList *list); +GLIB_AVAILABLE_IN_ALL +void g_file_attribute_info_list_unref (GFileAttributeInfoList *list); +GLIB_AVAILABLE_IN_ALL +GFileAttributeInfoList * g_file_attribute_info_list_dup (GFileAttributeInfoList *list); +GLIB_AVAILABLE_IN_ALL +const GFileAttributeInfo *g_file_attribute_info_list_lookup (GFileAttributeInfoList *list, + const char *name); +GLIB_AVAILABLE_IN_ALL +void g_file_attribute_info_list_add (GFileAttributeInfoList *list, + const char *name, + GFileAttributeType type, + GFileAttributeInfoFlags flags); + +G_END_DECLS + +#endif /* __G_FILE_INFO_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileenumerator.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileenumerator.h new file mode 100755 index 00000000..d4fd396b --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileenumerator.h @@ -0,0 +1,152 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_FILE_ENUMERATOR_H__ +#define __G_FILE_ENUMERATOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_FILE_ENUMERATOR (g_file_enumerator_get_type ()) +#define G_FILE_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_ENUMERATOR, GFileEnumerator)) +#define G_FILE_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_ENUMERATOR, GFileEnumeratorClass)) +#define G_IS_FILE_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_ENUMERATOR)) +#define G_IS_FILE_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_ENUMERATOR)) +#define G_FILE_ENUMERATOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_ENUMERATOR, GFileEnumeratorClass)) + +/** + * GFileEnumerator: + * + * A per matched file iterator. + **/ +typedef struct _GFileEnumeratorClass GFileEnumeratorClass; +typedef struct _GFileEnumeratorPrivate GFileEnumeratorPrivate; + +struct _GFileEnumerator +{ + GObject parent_instance; + + /*< private >*/ + GFileEnumeratorPrivate *priv; +}; + +struct _GFileEnumeratorClass +{ + GObjectClass parent_class; + + /* Virtual Table */ + + GFileInfo * (* next_file) (GFileEnumerator *enumerator, + GCancellable *cancellable, + GError **error); + gboolean (* close_fn) (GFileEnumerator *enumerator, + GCancellable *cancellable, + GError **error); + + void (* next_files_async) (GFileEnumerator *enumerator, + int num_files, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GList * (* next_files_finish) (GFileEnumerator *enumerator, + GAsyncResult *result, + GError **error); + void (* close_async) (GFileEnumerator *enumerator, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* close_finish) (GFileEnumerator *enumerator, + GAsyncResult *result, + GError **error); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); + void (*_g_reserved7) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_file_enumerator_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GFileInfo *g_file_enumerator_next_file (GFileEnumerator *enumerator, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_enumerator_close (GFileEnumerator *enumerator, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_enumerator_next_files_async (GFileEnumerator *enumerator, + int num_files, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GList * g_file_enumerator_next_files_finish (GFileEnumerator *enumerator, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_enumerator_close_async (GFileEnumerator *enumerator, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_enumerator_close_finish (GFileEnumerator *enumerator, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_enumerator_is_closed (GFileEnumerator *enumerator); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_enumerator_has_pending (GFileEnumerator *enumerator); +GLIB_AVAILABLE_IN_ALL +void g_file_enumerator_set_pending (GFileEnumerator *enumerator, + gboolean pending); +GLIB_AVAILABLE_IN_ALL +GFile * g_file_enumerator_get_container (GFileEnumerator *enumerator); +GLIB_AVAILABLE_IN_2_36 +GFile * g_file_enumerator_get_child (GFileEnumerator *enumerator, + GFileInfo *info); + +GLIB_AVAILABLE_IN_2_44 +gboolean g_file_enumerator_iterate (GFileEnumerator *direnum, + GFileInfo **out_info, + GFile **out_child, + GCancellable *cancellable, + GError **error); + + +G_END_DECLS + +#endif /* __G_FILE_ENUMERATOR_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileicon.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileicon.h new file mode 100755 index 00000000..08a4ea6c --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileicon.h @@ -0,0 +1,57 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_FILE_ICON_H__ +#define __G_FILE_ICON_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_FILE_ICON (g_file_icon_get_type ()) +#define G_FILE_ICON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_ICON, GFileIcon)) +#define G_FILE_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_ICON, GFileIconClass)) +#define G_IS_FILE_ICON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_ICON)) +#define G_IS_FILE_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_ICON)) +#define G_FILE_ICON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_ICON, GFileIconClass)) + +/** + * GFileIcon: + * + * Gets an icon for a #GFile. Implements #GLoadableIcon. + **/ +typedef struct _GFileIconClass GFileIconClass; + +GLIB_AVAILABLE_IN_ALL +GType g_file_icon_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GIcon * g_file_icon_new (GFile *file); + +GLIB_AVAILABLE_IN_ALL +GFile * g_file_icon_get_file (GFileIcon *icon); + +G_END_DECLS + +#endif /* __G_FILE_ICON_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileinfo.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileinfo.h new file mode 100755 index 00000000..4decee34 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileinfo.h @@ -0,0 +1,1106 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_FILE_INFO_H__ +#define __G_FILE_INFO_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_FILE_INFO (g_file_info_get_type ()) +#define G_FILE_INFO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_INFO, GFileInfo)) +#define G_FILE_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_INFO, GFileInfoClass)) +#define G_IS_FILE_INFO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_INFO)) +#define G_IS_FILE_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_INFO)) +#define G_FILE_INFO_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_INFO, GFileInfoClass)) + +/** + * GFileInfo: + * + * Stores information about a file system object referenced by a #GFile. + **/ +typedef struct _GFileInfoClass GFileInfoClass; + + +/* Common Attributes: */ +/** + * G_FILE_ATTRIBUTE_STANDARD_TYPE: + * + * A key in the "standard" namespace for storing file types. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + * The value for this key should contain a #GFileType. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_TYPE "standard::type" /* uint32 (GFileType) */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN: + * + * A key in the "standard" namespace for checking if a file is hidden. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN "standard::is-hidden" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP: + * + * A key in the "standard" namespace for checking if a file is a backup file. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP "standard::is-backup" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK: + * + * A key in the "standard" namespace for checking if the file is a symlink. + * Typically the actual type is something else, if we followed the symlink + * to get the type. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK "standard::is-symlink" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL: + * + * A key in the "standard" namespace for checking if a file is virtual. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL "standard::is-virtual" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE: + * + * A key in the "standard" namespace for checking if a file is + * volatile. This is meant for opaque, non-POSIX-like backends to + * indicate that the URI is not persistent. Applications should look + * at #G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET for the persistent URI. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.46 + **/ +#define G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE "standard::is-volatile" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_NAME: + * + * A key in the "standard" namespace for getting the name of the file. + * The name is the on-disk filename which may not be in any known encoding, + * and can thus not be generally displayed as is. + * Use #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the + * name in a user interface. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_NAME "standard::name" /* byte string */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME: + * + * A key in the "standard" namespace for getting the display name of the file. + * A display name is guaranteed to be in UTF8 and can thus be displayed in + * the UI. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "standard::display-name" /* string */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME: + * + * A key in the "standard" namespace for edit name of the file. + * An edit name is similar to the display name, but it is meant to be + * used when you want to rename the file in the UI. The display name + * might contain information you don't want in the new filename (such as + * "(invalid unicode)" if the filename was in an invalid encoding). + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME "standard::edit-name" /* string */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_COPY_NAME: + * + * A key in the "standard" namespace for getting the copy name of the file. + * The copy name is an optional version of the name. If available it's always + * in UTF8, and corresponds directly to the original filename (only transcoded to + * UTF8). This is useful if you want to copy the file to another filesystem that + * might have a different encoding. If the filename is not a valid string in the + * encoding selected for the filesystem it is in then the copy name will not be set. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_COPY_NAME "standard::copy-name" /* string */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION: + * + * A key in the "standard" namespace for getting the description of the file. + * The description is a utf8 string that describes the file, generally containing + * the filename, but can also contain furter information. Example descriptions + * could be "filename (on hostname)" for a remote file or "filename (in trash)" + * for a file in the trash. This is useful for instance as the window title + * when displaying a directory or for a bookmarks menu. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION "standard::description" /* string */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_ICON: + * + * A key in the "standard" namespace for getting the icon for the file. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. + * The value for this key should contain a #GIcon. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_ICON "standard::icon" /* object (GIcon) */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON: + * + * A key in the "standard" namespace for getting the symbolic icon for the file. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. + * The value for this key should contain a #GIcon. + * + * Since: 2.34 + **/ +#define G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON "standard::symbolic-icon" /* object (GIcon) */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE: + * + * A key in the "standard" namespace for getting the content type of the file. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + * The value for this key should contain a valid content type. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE "standard::content-type" /* string */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE: + * + * A key in the "standard" namespace for getting the fast content type. + * The fast content type isn't as reliable as the regular one, as it + * only uses the filename to guess it, but it is faster to calculate than the + * regular content type. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + * + **/ +#define G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE "standard::fast-content-type" /* string */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_SIZE: + * + * A key in the "standard" namespace for getting the file's size (in bytes). + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_SIZE "standard::size" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE: + * + * A key in the "standard" namespace for getting the amount of disk space + * that is consumed by the file (in bytes). This will generally be larger + * than the file size (due to block size overhead) but can occasionally be + * smaller (for example, for sparse files). + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + * + * Since: 2.20 + **/ +#define G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE "standard::allocated-size" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET: + * + * A key in the "standard" namespace for getting the symlink target, if the file + * is a symlink. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET "standard::symlink-target" /* byte string */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_TARGET_URI: + * + * A key in the "standard" namespace for getting the target URI for the file, in + * the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_TARGET_URI "standard::target-uri" /* string */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER: + * + * A key in the "standard" namespace for setting the sort order of a file. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32. + * An example use would be in file managers, which would use this key + * to set the order files are displayed. Files with smaller sort order + * should be sorted first, and files without sort order as if sort order + * was zero. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER "standard::sort-order" /* int32 */ + +/* Entity tags, used to avoid missing updates on save */ + +/** + * G_FILE_ATTRIBUTE_ETAG_VALUE: + * + * A key in the "etag" namespace for getting the value of the file's + * entity tag. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_ETAG_VALUE "etag::value" /* string */ + +/* File identifier, for e.g. avoiding loops when doing recursive + * directory scanning + */ + +/** + * G_FILE_ATTRIBUTE_ID_FILE: + * + * A key in the "id" namespace for getting a file identifier. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + * An example use would be during listing files, to avoid recursive + * directory scanning. + **/ +#define G_FILE_ATTRIBUTE_ID_FILE "id::file" /* string */ + +/** + * G_FILE_ATTRIBUTE_ID_FILESYSTEM: + * + * A key in the "id" namespace for getting the file system identifier. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + * An example use would be during drag and drop to see if the source + * and target are on the same filesystem (default to move) or not (default + * to copy). + **/ +#define G_FILE_ATTRIBUTE_ID_FILESYSTEM "id::filesystem" /* string */ + +/* Calculated Access Rights for current user */ + +/** + * G_FILE_ATTRIBUTE_ACCESS_CAN_READ: + * + * A key in the "access" namespace for getting read privileges. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * This attribute will be %TRUE if the user is able to read the file. + **/ +#define G_FILE_ATTRIBUTE_ACCESS_CAN_READ "access::can-read" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE: + * + * A key in the "access" namespace for getting write privileges. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * This attribute will be %TRUE if the user is able to write to the file. + **/ +#define G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE "access::can-write" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE: + * + * A key in the "access" namespace for getting execution privileges. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * This attribute will be %TRUE if the user is able to execute the file. + **/ +#define G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE "access::can-execute" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE: + * + * A key in the "access" namespace for checking deletion privileges. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * This attribute will be %TRUE if the user is able to delete the file. + **/ +#define G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE "access::can-delete" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH: + * + * A key in the "access" namespace for checking trashing privileges. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * This attribute will be %TRUE if the user is able to move the file to + * the trash. + **/ +#define G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH "access::can-trash" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME: + * + * A key in the "access" namespace for checking renaming privileges. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * This attribute will be %TRUE if the user is able to rename the file. + **/ +#define G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME "access::can-rename" /* boolean */ + +/* TODO: Should we have special version for directories? can_enumerate, etc */ + +/* Mountable attributes */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT: + * + * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT "mountable::can-mount" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT: + * + * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT "mountable::can-unmount" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT: + * + * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT "mountable::can-eject" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE: + * + * A key in the "mountable" namespace for getting the unix device. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE "mountable::unix-device" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE: + * + * A key in the "mountable" namespace for getting the unix device file. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + * + * Since: 2.22 + **/ +#define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE "mountable::unix-device-file" /* string */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI: + * + * A key in the "mountable" namespace for getting the HAL UDI for the mountable + * file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI "mountable::hal-udi" /* string */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START: + * + * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.22 + */ +#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START "mountable::can-start" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED: + * + * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started + * degraded. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.22 + */ +#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED "mountable::can-start-degraded" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP: + * + * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.22 + */ +#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP "mountable::can-stop" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE: + * + * A key in the "mountable" namespace for getting the #GDriveStartStopType. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + * + * Since: 2.22 + */ +#define G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE "mountable::start-stop-type" /* uint32 (GDriveStartStopType) */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL: + * + * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.22 + */ +#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL "mountable::can-poll" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC: + * + * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) + * is automatically polled for media. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.22 + */ +#define G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC "mountable::is-media-check-automatic" /* boolean */ + +/* Time attributes */ + +/** + * G_FILE_ATTRIBUTE_TIME_MODIFIED: + * + * A key in the "time" namespace for getting the time the file was last + * modified. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the + * file was modified, in seconds since the UNIX epoch. + **/ +#define G_FILE_ATTRIBUTE_TIME_MODIFIED "time::modified" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC: + * + * A key in the "time" namespace for getting the microseconds of the time + * the file was last modified. This should be used in conjunction with + * #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC "time::modified-usec" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_TIME_ACCESS: + * + * A key in the "time" namespace for getting the time the file was last + * accessed. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the + * file was last accessed, in seconds since the UNIX epoch. + **/ +#define G_FILE_ATTRIBUTE_TIME_ACCESS "time::access" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_TIME_ACCESS_USEC: + * + * A key in the "time" namespace for getting the microseconds of the time + * the file was last accessed. This should be used in conjunction with + * #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_TIME_ACCESS_USEC "time::access-usec" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_TIME_CHANGED: + * + * A key in the "time" namespace for getting the time the file was last + * changed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, + * and contains the time since the file was last changed, in seconds since the + * UNIX epoch. + * + * This corresponds to the traditional UNIX ctime. + **/ +#define G_FILE_ATTRIBUTE_TIME_CHANGED "time::changed" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_TIME_CHANGED_USEC: + * + * A key in the "time" namespace for getting the microseconds of the time + * the file was last changed. This should be used in conjunction with + * #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_TIME_CHANGED_USEC "time::changed-usec" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_TIME_CREATED: + * + * A key in the "time" namespace for getting the time the file was created. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, + * and contains the time since the file was created, in seconds since the UNIX + * epoch. + * + * This corresponds to the NTFS ctime. + **/ +#define G_FILE_ATTRIBUTE_TIME_CREATED "time::created" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_TIME_CREATED_USEC: + * + * A key in the "time" namespace for getting the microseconds of the time + * the file was created. This should be used in conjunction with + * #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_TIME_CREATED_USEC "time::created-usec" /* uint32 */ + +/* Unix specific attributes */ + +/** + * G_FILE_ATTRIBUTE_UNIX_DEVICE: + * + * A key in the "unix" namespace for getting the device id of the device the + * file is located on (see stat() documentation). This attribute is only + * available for UNIX file systems. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_UNIX_DEVICE "unix::device" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_UNIX_INODE: + * + * A key in the "unix" namespace for getting the inode of the file. + * This attribute is only available for UNIX file systems. Corresponding + * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + **/ +#define G_FILE_ATTRIBUTE_UNIX_INODE "unix::inode" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_UNIX_MODE: + * + * A key in the "unix" namespace for getting the mode of the file + * (e.g. whether the file is a regular file, symlink, etc). See lstat() + * documentation. This attribute is only available for UNIX file systems. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_UNIX_MODE "unix::mode" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_UNIX_NLINK: + * + * A key in the "unix" namespace for getting the number of hard links + * for a file. See lstat() documentation. This attribute is only available + * for UNIX file systems. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_UNIX_NLINK "unix::nlink" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_UNIX_UID: + * + * A key in the "unix" namespace for getting the user ID for the file. + * This attribute is only available for UNIX file systems. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_UNIX_UID "unix::uid" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_UNIX_GID: + * + * A key in the "unix" namespace for getting the group ID for the file. + * This attribute is only available for UNIX file systems. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_UNIX_GID "unix::gid" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_UNIX_RDEV: + * + * A key in the "unix" namespace for getting the device ID for the file + * (if it is a special file). See lstat() documentation. This attribute + * is only available for UNIX file systems. Corresponding #GFileAttributeType + * is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_UNIX_RDEV "unix::rdev" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE: + * + * A key in the "unix" namespace for getting the block size for the file + * system. This attribute is only available for UNIX file systems. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE "unix::block-size" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_UNIX_BLOCKS: + * + * A key in the "unix" namespace for getting the number of blocks allocated + * for the file. This attribute is only available for UNIX file systems. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + **/ +#define G_FILE_ATTRIBUTE_UNIX_BLOCKS "unix::blocks" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT: + * + * A key in the "unix" namespace for checking if the file represents a + * UNIX mount point. This attribute is %TRUE if the file is a UNIX mount + * point. This attribute is only available for UNIX file systems. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT "unix::is-mountpoint" /* boolean */ + +/* DOS specific attributes */ + +/** + * G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE: + * + * A key in the "dos" namespace for checking if the file's archive flag + * is set. This attribute is %TRUE if the archive flag is set. This attribute + * is only available for DOS file systems. Corresponding #GFileAttributeType + * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE "dos::is-archive" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_DOS_IS_SYSTEM: + * + * A key in the "dos" namespace for checking if the file's backup flag + * is set. This attribute is %TRUE if the backup flag is set. This attribute + * is only available for DOS file systems. Corresponding #GFileAttributeType + * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_DOS_IS_SYSTEM "dos::is-system" /* boolean */ + +/* Owner attributes */ + +/** + * G_FILE_ATTRIBUTE_OWNER_USER: + * + * A key in the "owner" namespace for getting the user name of the + * file's owner. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_OWNER_USER "owner::user" /* string */ + +/** + * G_FILE_ATTRIBUTE_OWNER_USER_REAL: + * + * A key in the "owner" namespace for getting the real name of the + * user that owns the file. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_OWNER_USER_REAL "owner::user-real" /* string */ + +/** + * G_FILE_ATTRIBUTE_OWNER_GROUP: + * + * A key in the "owner" namespace for getting the file owner's group. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_OWNER_GROUP "owner::group" /* string */ + +/* Thumbnails */ + +/** + * G_FILE_ATTRIBUTE_THUMBNAIL_PATH: + * + * A key in the "thumbnail" namespace for getting the path to the thumbnail + * image. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + **/ +#define G_FILE_ATTRIBUTE_THUMBNAIL_PATH "thumbnail::path" /* bytestring */ +/** + * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED: + * + * A key in the "thumbnail" namespace for checking if thumbnailing failed. + * This attribute is %TRUE if thumbnailing failed. Corresponding + * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_THUMBNAILING_FAILED "thumbnail::failed" /* boolean */ +/** + * G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID: + * + * A key in the "thumbnail" namespace for checking whether the thumbnail is outdated. + * This attribute is %TRUE if the thumbnail is up-to-date with the file it represents, + * and %FALSE if the file has been modified since the thumbnail was generated. + * + * If %G_FILE_ATTRIBUTE_THUMBNAILING_FAILED is %TRUE and this attribute is %FALSE, + * it indicates that thumbnailing may be attempted again and may succeed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.40 + */ +#define G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID "thumbnail::is-valid" /* boolean */ + +/* Preview */ + +/** + * G_FILE_ATTRIBUTE_PREVIEW_ICON: + * + * A key in the "preview" namespace for getting a #GIcon that can be + * used to get preview of the file. For example, it may be a low + * resolution thumbnail without metadata. Corresponding + * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. The value + * for this key should contain a #GIcon. + * + * Since: 2.20 + **/ +#define G_FILE_ATTRIBUTE_PREVIEW_ICON "preview::icon" /* object (GIcon) */ + +/* File system info (for g_file_get_filesystem_info) */ + +/** + * G_FILE_ATTRIBUTE_FILESYSTEM_SIZE: + * + * A key in the "filesystem" namespace for getting the total size (in bytes) of the file system, + * used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType + * is %G_FILE_ATTRIBUTE_TYPE_UINT64. + **/ +#define G_FILE_ATTRIBUTE_FILESYSTEM_SIZE "filesystem::size" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_FILESYSTEM_FREE: + * + * A key in the "filesystem" namespace for getting the number of bytes of free space left on the + * file system. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_UINT64. + **/ +#define G_FILE_ATTRIBUTE_FILESYSTEM_FREE "filesystem::free" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_FILESYSTEM_USED: + * + * A key in the "filesystem" namespace for getting the number of bytes of used on the + * file system. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_UINT64. + * + * Since: 2.32 + */ +#define G_FILE_ATTRIBUTE_FILESYSTEM_USED "filesystem::used" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_FILESYSTEM_TYPE: + * + * A key in the "filesystem" namespace for getting the file system's type. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_FILESYSTEM_TYPE "filesystem::type" /* string */ + +/** + * G_FILE_ATTRIBUTE_FILESYSTEM_READONLY: + * + * A key in the "filesystem" namespace for checking if the file system + * is read only. Is set to %TRUE if the file system is read only. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_FILESYSTEM_READONLY "filesystem::readonly" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW: + * + * A key in the "filesystem" namespace for hinting a file manager + * application whether it should preview (e.g. thumbnail) files on the + * file system. The value for this key contain a + * #GFilesystemPreviewType. + **/ +#define G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW "filesystem::use-preview" /* uint32 (GFilesystemPreviewType) */ + +/** + * G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE: + * + * A key in the "filesystem" namespace for checking if the file system + * is remote. Is set to %TRUE if the file system is remote. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE "filesystem::remote" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_GVFS_BACKEND: + * + * A key in the "gvfs" namespace that gets the name of the current + * GVFS backend in use. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_GVFS_BACKEND "gvfs::backend" /* string */ + +/** + * G_FILE_ATTRIBUTE_SELINUX_CONTEXT: + * + * A key in the "selinux" namespace for getting the file's SELinux + * context. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only + * available if GLib has been built with SELinux support. + **/ +#define G_FILE_ATTRIBUTE_SELINUX_CONTEXT "selinux::context" /* string */ + +/** + * G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT: + * + * A key in the "trash" namespace. When requested against + * `trash:///` returns the number of (toplevel) items in the trash folder. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT "trash::item-count" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_TRASH_ORIG_PATH: + * + * A key in the "trash" namespace. When requested against + * items in `trash:///`, will return the original path to the file before it + * was trashed. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + * + * Since: 2.24 + **/ +#define G_FILE_ATTRIBUTE_TRASH_ORIG_PATH "trash::orig-path" /* byte string */ + +/** + * G_FILE_ATTRIBUTE_TRASH_DELETION_DATE: + * + * A key in the "trash" namespace. When requested against + * items in `trash:///`, will return the date and time when the file + * was trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss. + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + * + * Since: 2.24 + **/ +#define G_FILE_ATTRIBUTE_TRASH_DELETION_DATE "trash::deletion-date" /* string */ + +/** + * G_FILE_ATTRIBUTE_RECENT_MODIFIED: + * + * A key in the "recent" namespace for getting time, when the metadata for the + * file in `recent:///` was last changed. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_INT64. + * + * Since: 2.52 + **/ +#define G_FILE_ATTRIBUTE_RECENT_MODIFIED "recent::modified" /* int64 (time_t) */ + +GLIB_AVAILABLE_IN_ALL +GType g_file_info_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GFileInfo * g_file_info_new (void); +GLIB_AVAILABLE_IN_ALL +GFileInfo * g_file_info_dup (GFileInfo *other); +GLIB_AVAILABLE_IN_ALL +void g_file_info_copy_into (GFileInfo *src_info, + GFileInfo *dest_info); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_info_has_attribute (GFileInfo *info, + const char *attribute); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_info_has_namespace (GFileInfo *info, + const char *name_space); +GLIB_AVAILABLE_IN_ALL +char ** g_file_info_list_attributes (GFileInfo *info, + const char *name_space); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_info_get_attribute_data (GFileInfo *info, + const char *attribute, + GFileAttributeType *type, + gpointer *value_pp, + GFileAttributeStatus *status); +GLIB_AVAILABLE_IN_ALL +GFileAttributeType g_file_info_get_attribute_type (GFileInfo *info, + const char *attribute); +GLIB_AVAILABLE_IN_ALL +void g_file_info_remove_attribute (GFileInfo *info, + const char *attribute); +GLIB_AVAILABLE_IN_ALL +GFileAttributeStatus g_file_info_get_attribute_status (GFileInfo *info, + const char *attribute); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_info_set_attribute_status (GFileInfo *info, + const char *attribute, + GFileAttributeStatus status); +GLIB_AVAILABLE_IN_ALL +char * g_file_info_get_attribute_as_string (GFileInfo *info, + const char *attribute); +GLIB_AVAILABLE_IN_ALL +const char * g_file_info_get_attribute_string (GFileInfo *info, + const char *attribute); +GLIB_AVAILABLE_IN_ALL +const char * g_file_info_get_attribute_byte_string (GFileInfo *info, + const char *attribute); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_info_get_attribute_boolean (GFileInfo *info, + const char *attribute); +GLIB_AVAILABLE_IN_ALL +guint32 g_file_info_get_attribute_uint32 (GFileInfo *info, + const char *attribute); +GLIB_AVAILABLE_IN_ALL +gint32 g_file_info_get_attribute_int32 (GFileInfo *info, + const char *attribute); +GLIB_AVAILABLE_IN_ALL +guint64 g_file_info_get_attribute_uint64 (GFileInfo *info, + const char *attribute); +GLIB_AVAILABLE_IN_ALL +gint64 g_file_info_get_attribute_int64 (GFileInfo *info, + const char *attribute); +GLIB_AVAILABLE_IN_ALL +GObject * g_file_info_get_attribute_object (GFileInfo *info, + const char *attribute); +GLIB_AVAILABLE_IN_ALL +char ** g_file_info_get_attribute_stringv (GFileInfo *info, + const char *attribute); + +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_attribute (GFileInfo *info, + const char *attribute, + GFileAttributeType type, + gpointer value_p); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_attribute_string (GFileInfo *info, + const char *attribute, + const char *attr_value); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_attribute_byte_string (GFileInfo *info, + const char *attribute, + const char *attr_value); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_attribute_boolean (GFileInfo *info, + const char *attribute, + gboolean attr_value); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_attribute_uint32 (GFileInfo *info, + const char *attribute, + guint32 attr_value); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_attribute_int32 (GFileInfo *info, + const char *attribute, + gint32 attr_value); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_attribute_uint64 (GFileInfo *info, + const char *attribute, + guint64 attr_value); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_attribute_int64 (GFileInfo *info, + const char *attribute, + gint64 attr_value); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_attribute_object (GFileInfo *info, + const char *attribute, + GObject *attr_value); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_attribute_stringv (GFileInfo *info, + const char *attribute, + char **attr_value); + +GLIB_AVAILABLE_IN_ALL +void g_file_info_clear_status (GFileInfo *info); + +/* Helper getters: */ +GLIB_AVAILABLE_IN_2_36 +GDateTime * g_file_info_get_deletion_date (GFileInfo *info); +GLIB_AVAILABLE_IN_ALL +GFileType g_file_info_get_file_type (GFileInfo *info); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_info_get_is_hidden (GFileInfo *info); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_info_get_is_backup (GFileInfo *info); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_info_get_is_symlink (GFileInfo *info); +GLIB_AVAILABLE_IN_ALL +const char * g_file_info_get_name (GFileInfo *info); +GLIB_AVAILABLE_IN_ALL +const char * g_file_info_get_display_name (GFileInfo *info); +GLIB_AVAILABLE_IN_ALL +const char * g_file_info_get_edit_name (GFileInfo *info); +GLIB_AVAILABLE_IN_ALL +GIcon * g_file_info_get_icon (GFileInfo *info); +GLIB_AVAILABLE_IN_ALL +GIcon * g_file_info_get_symbolic_icon (GFileInfo *info); +GLIB_AVAILABLE_IN_ALL +const char * g_file_info_get_content_type (GFileInfo *info); +GLIB_AVAILABLE_IN_ALL +goffset g_file_info_get_size (GFileInfo *info); +GLIB_AVAILABLE_IN_ALL +void g_file_info_get_modification_time (GFileInfo *info, + GTimeVal *result); +GLIB_AVAILABLE_IN_ALL +const char * g_file_info_get_symlink_target (GFileInfo *info); +GLIB_AVAILABLE_IN_ALL +const char * g_file_info_get_etag (GFileInfo *info); +GLIB_AVAILABLE_IN_ALL +gint32 g_file_info_get_sort_order (GFileInfo *info); + +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_attribute_mask (GFileInfo *info, + GFileAttributeMatcher *mask); +GLIB_AVAILABLE_IN_ALL +void g_file_info_unset_attribute_mask (GFileInfo *info); + +/* Helper setters: */ +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_file_type (GFileInfo *info, + GFileType type); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_is_hidden (GFileInfo *info, + gboolean is_hidden); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_is_symlink (GFileInfo *info, + gboolean is_symlink); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_name (GFileInfo *info, + const char *name); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_display_name (GFileInfo *info, + const char *display_name); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_edit_name (GFileInfo *info, + const char *edit_name); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_icon (GFileInfo *info, + GIcon *icon); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_symbolic_icon (GFileInfo *info, + GIcon *icon); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_content_type (GFileInfo *info, + const char *content_type); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_size (GFileInfo *info, + goffset size); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_modification_time (GFileInfo *info, + GTimeVal *mtime); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_symlink_target (GFileInfo *info, + const char *symlink_target); +GLIB_AVAILABLE_IN_ALL +void g_file_info_set_sort_order (GFileInfo *info, + gint32 sort_order); + +#define G_TYPE_FILE_ATTRIBUTE_MATCHER (g_file_attribute_matcher_get_type ()) +GLIB_AVAILABLE_IN_ALL +GType g_file_attribute_matcher_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GFileAttributeMatcher *g_file_attribute_matcher_new (const char *attributes); +GLIB_AVAILABLE_IN_ALL +GFileAttributeMatcher *g_file_attribute_matcher_ref (GFileAttributeMatcher *matcher); +GLIB_AVAILABLE_IN_ALL +void g_file_attribute_matcher_unref (GFileAttributeMatcher *matcher); +GLIB_AVAILABLE_IN_ALL +GFileAttributeMatcher *g_file_attribute_matcher_subtract (GFileAttributeMatcher *matcher, + GFileAttributeMatcher *subtract); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_attribute_matcher_matches (GFileAttributeMatcher *matcher, + const char *attribute); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_attribute_matcher_matches_only (GFileAttributeMatcher *matcher, + const char *attribute); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_attribute_matcher_enumerate_namespace (GFileAttributeMatcher *matcher, + const char *ns); +GLIB_AVAILABLE_IN_ALL +const char * g_file_attribute_matcher_enumerate_next (GFileAttributeMatcher *matcher); +GLIB_AVAILABLE_IN_2_32 +char * g_file_attribute_matcher_to_string (GFileAttributeMatcher *matcher); + +G_END_DECLS + +#endif /* __G_FILE_INFO_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileinputstream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileinputstream.h new file mode 100755 index 00000000..f84eecce --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileinputstream.h @@ -0,0 +1,114 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_FILE_INPUT_STREAM_H__ +#define __G_FILE_INPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/ginputstream.h> + +G_BEGIN_DECLS + +#define G_TYPE_FILE_INPUT_STREAM (g_file_input_stream_get_type ()) +#define G_FILE_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_INPUT_STREAM, GFileInputStream)) +#define G_FILE_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_INPUT_STREAM, GFileInputStreamClass)) +#define G_IS_FILE_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_INPUT_STREAM)) +#define G_IS_FILE_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_INPUT_STREAM)) +#define G_FILE_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_INPUT_STREAM, GFileInputStreamClass)) + +/** + * GFileInputStream: + * + * A subclass of GInputStream for opened files. This adds + * a few file-specific operations and seeking. + * + * #GFileInputStream implements #GSeekable. + **/ +typedef struct _GFileInputStreamClass GFileInputStreamClass; +typedef struct _GFileInputStreamPrivate GFileInputStreamPrivate; + +struct _GFileInputStream +{ + GInputStream parent_instance; + + /*< private >*/ + GFileInputStreamPrivate *priv; +}; + +struct _GFileInputStreamClass +{ + GInputStreamClass parent_class; + + goffset (* tell) (GFileInputStream *stream); + gboolean (* can_seek) (GFileInputStream *stream); + gboolean (* seek) (GFileInputStream *stream, + goffset offset, + GSeekType type, + GCancellable *cancellable, + GError **error); + GFileInfo * (* query_info) (GFileInputStream *stream, + const char *attributes, + GCancellable *cancellable, + GError **error); + void (* query_info_async) (GFileInputStream *stream, + const char *attributes, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileInfo * (* query_info_finish) (GFileInputStream *stream, + GAsyncResult *result, + GError **error); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_file_input_stream_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GFileInfo *g_file_input_stream_query_info (GFileInputStream *stream, + const char *attributes, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_input_stream_query_info_async (GFileInputStream *stream, + const char *attributes, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GFileInfo *g_file_input_stream_query_info_finish (GFileInputStream *stream, + GAsyncResult *result, + GError **error); + +G_END_DECLS + +#endif /* __G_FILE_FILE_INPUT_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileiostream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileiostream.h new file mode 100755 index 00000000..ca61db65 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileiostream.h @@ -0,0 +1,121 @@ +/* GIO - GLib Input, Io and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_FILE_IO_STREAM_H__ +#define __G_FILE_IO_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giostream.h> + +G_BEGIN_DECLS + +#define G_TYPE_FILE_IO_STREAM (g_file_io_stream_get_type ()) +#define G_FILE_IO_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_IO_STREAM, GFileIOStream)) +#define G_FILE_IO_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_IO_STREAM, GFileIOStreamClass)) +#define G_IS_FILE_IO_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_IO_STREAM)) +#define G_IS_FILE_IO_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_IO_STREAM)) +#define G_FILE_IO_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_IO_STREAM, GFileIOStreamClass)) + +/** + * GFileIOStream: + * + * A subclass of GIOStream for opened files. This adds + * a few file-specific operations and seeking and truncating. + * + * #GFileIOStream implements GSeekable. + **/ +typedef struct _GFileIOStreamClass GFileIOStreamClass; +typedef struct _GFileIOStreamPrivate GFileIOStreamPrivate; + +struct _GFileIOStream +{ + GIOStream parent_instance; + + /*< private >*/ + GFileIOStreamPrivate *priv; +}; + +struct _GFileIOStreamClass +{ + GIOStreamClass parent_class; + + goffset (* tell) (GFileIOStream *stream); + gboolean (* can_seek) (GFileIOStream *stream); + gboolean (* seek) (GFileIOStream *stream, + goffset offset, + GSeekType type, + GCancellable *cancellable, + GError **error); + gboolean (* can_truncate) (GFileIOStream *stream); + gboolean (* truncate_fn) (GFileIOStream *stream, + goffset size, + GCancellable *cancellable, + GError **error); + GFileInfo * (* query_info) (GFileIOStream *stream, + const char *attributes, + GCancellable *cancellable, + GError **error); + void (* query_info_async) (GFileIOStream *stream, + const char *attributes, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileInfo * (* query_info_finish) (GFileIOStream *stream, + GAsyncResult *result, + GError **error); + char * (* get_etag) (GFileIOStream *stream); + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_file_io_stream_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GFileInfo *g_file_io_stream_query_info (GFileIOStream *stream, + const char *attributes, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_io_stream_query_info_async (GFileIOStream *stream, + const char *attributes, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GFileInfo *g_file_io_stream_query_info_finish (GFileIOStream *stream, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +char * g_file_io_stream_get_etag (GFileIOStream *stream); + +G_END_DECLS + +#endif /* __G_FILE_FILE_IO_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfilemonitor.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfilemonitor.h new file mode 100755 index 00000000..724d8def --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfilemonitor.h @@ -0,0 +1,98 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_FILE_MONITOR_H__ +#define __G_FILE_MONITOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_FILE_MONITOR (g_file_monitor_get_type ()) +#define G_FILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_MONITOR, GFileMonitor)) +#define G_FILE_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_MONITOR, GFileMonitorClass)) +#define G_IS_FILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_MONITOR)) +#define G_IS_FILE_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_MONITOR)) +#define G_FILE_MONITOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_MONITOR, GFileMonitorClass)) + +typedef struct _GFileMonitorClass GFileMonitorClass; +typedef struct _GFileMonitorPrivate GFileMonitorPrivate; + +/** + * GFileMonitor: + * + * Watches for changes to a file. + **/ +struct _GFileMonitor +{ + GObject parent_instance; + + /*< private >*/ + GFileMonitorPrivate *priv; +}; + +struct _GFileMonitorClass +{ + GObjectClass parent_class; + + /* Signals */ + void (* changed) (GFileMonitor *monitor, + GFile *file, + GFile *other_file, + GFileMonitorEvent event_type); + + /* Virtual Table */ + gboolean (* cancel) (GFileMonitor *monitor); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_file_monitor_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +gboolean g_file_monitor_cancel (GFileMonitor *monitor); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_monitor_is_cancelled (GFileMonitor *monitor); +GLIB_AVAILABLE_IN_ALL +void g_file_monitor_set_rate_limit (GFileMonitor *monitor, + gint limit_msecs); + + +/* For implementations */ +GLIB_AVAILABLE_IN_ALL +void g_file_monitor_emit_event (GFileMonitor *monitor, + GFile *child, + GFile *other_file, + GFileMonitorEvent event_type); + +G_END_DECLS + +#endif /* __G_FILE_MONITOR_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfilenamecompleter.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfilenamecompleter.h new file mode 100755 index 00000000..b10f18de --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfilenamecompleter.h @@ -0,0 +1,79 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_FILENAME_COMPLETER_H__ +#define __G_FILENAME_COMPLETER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_FILENAME_COMPLETER (g_filename_completer_get_type ()) +#define G_FILENAME_COMPLETER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILENAME_COMPLETER, GFilenameCompleter)) +#define G_FILENAME_COMPLETER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILENAME_COMPLETER, GFilenameCompleterClass)) +#define G_FILENAME_COMPLETER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILENAME_COMPLETER, GFilenameCompleterClass)) +#define G_IS_FILENAME_COMPLETER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILENAME_COMPLETER)) +#define G_IS_FILENAME_COMPLETER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILENAME_COMPLETER)) + +/** + * GFilenameCompleter: + * + * Completes filenames based on files that exist within the file system. + **/ +typedef struct _GFilenameCompleterClass GFilenameCompleterClass; + +struct _GFilenameCompleterClass +{ + GObjectClass parent_class; + + /*< public >*/ + /* signals */ + void (* got_completion_data) (GFilenameCompleter *filename_completer); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_filename_completer_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GFilenameCompleter *g_filename_completer_new (void); + +GLIB_AVAILABLE_IN_ALL +char * g_filename_completer_get_completion_suffix (GFilenameCompleter *completer, + const char *initial_text); +GLIB_AVAILABLE_IN_ALL +char ** g_filename_completer_get_completions (GFilenameCompleter *completer, + const char *initial_text); +GLIB_AVAILABLE_IN_ALL +void g_filename_completer_set_dirs_only (GFilenameCompleter *completer, + gboolean dirs_only); + +G_END_DECLS + +#endif /* __G_FILENAME_COMPLETER_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileoutputstream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileoutputstream.h new file mode 100755 index 00000000..5df63efb --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfileoutputstream.h @@ -0,0 +1,122 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_FILE_OUTPUT_STREAM_H__ +#define __G_FILE_OUTPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/goutputstream.h> + +G_BEGIN_DECLS + +#define G_TYPE_FILE_OUTPUT_STREAM (g_file_output_stream_get_type ()) +#define G_FILE_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_OUTPUT_STREAM, GFileOutputStream)) +#define G_FILE_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_OUTPUT_STREAM, GFileOutputStreamClass)) +#define G_IS_FILE_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_OUTPUT_STREAM)) +#define G_IS_FILE_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_OUTPUT_STREAM)) +#define G_FILE_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_OUTPUT_STREAM, GFileOutputStreamClass)) + +/** + * GFileOutputStream: + * + * A subclass of GOutputStream for opened files. This adds + * a few file-specific operations and seeking and truncating. + * + * #GFileOutputStream implements GSeekable. + **/ +typedef struct _GFileOutputStreamClass GFileOutputStreamClass; +typedef struct _GFileOutputStreamPrivate GFileOutputStreamPrivate; + +struct _GFileOutputStream +{ + GOutputStream parent_instance; + + /*< private >*/ + GFileOutputStreamPrivate *priv; +}; + +struct _GFileOutputStreamClass +{ + GOutputStreamClass parent_class; + + goffset (* tell) (GFileOutputStream *stream); + gboolean (* can_seek) (GFileOutputStream *stream); + gboolean (* seek) (GFileOutputStream *stream, + goffset offset, + GSeekType type, + GCancellable *cancellable, + GError **error); + gboolean (* can_truncate) (GFileOutputStream *stream); + gboolean (* truncate_fn) (GFileOutputStream *stream, + goffset size, + GCancellable *cancellable, + GError **error); + GFileInfo * (* query_info) (GFileOutputStream *stream, + const char *attributes, + GCancellable *cancellable, + GError **error); + void (* query_info_async) (GFileOutputStream *stream, + const char *attributes, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileInfo * (* query_info_finish) (GFileOutputStream *stream, + GAsyncResult *result, + GError **error); + char * (* get_etag) (GFileOutputStream *stream); + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_file_output_stream_get_type (void) G_GNUC_CONST; + + +GLIB_AVAILABLE_IN_ALL +GFileInfo *g_file_output_stream_query_info (GFileOutputStream *stream, + const char *attributes, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_file_output_stream_query_info_async (GFileOutputStream *stream, + const char *attributes, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GFileInfo *g_file_output_stream_query_info_finish (GFileOutputStream *stream, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +char * g_file_output_stream_get_etag (GFileOutputStream *stream); + +G_END_DECLS + +#endif /* __G_FILE_FILE_OUTPUT_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfilterinputstream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfilterinputstream.h new file mode 100755 index 00000000..b44a4589 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfilterinputstream.h @@ -0,0 +1,78 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Christian Kellner <gicmo@gnome.org> + */ + +#ifndef __G_FILTER_INPUT_STREAM_H__ +#define __G_FILTER_INPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/ginputstream.h> + +G_BEGIN_DECLS + +#define G_TYPE_FILTER_INPUT_STREAM (g_filter_input_stream_get_type ()) +#define G_FILTER_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILTER_INPUT_STREAM, GFilterInputStream)) +#define G_FILTER_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILTER_INPUT_STREAM, GFilterInputStreamClass)) +#define G_IS_FILTER_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILTER_INPUT_STREAM)) +#define G_IS_FILTER_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILTER_INPUT_STREAM)) +#define G_FILTER_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILTER_INPUT_STREAM, GFilterInputStreamClass)) + +/** + * GFilterInputStream: + * + * A base class for all input streams that work on an underlying stream. + **/ +typedef struct _GFilterInputStreamClass GFilterInputStreamClass; + +struct _GFilterInputStream +{ + GInputStream parent_instance; + + /*<protected >*/ + GInputStream *base_stream; +}; + +struct _GFilterInputStreamClass +{ + GInputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); +}; + + +GLIB_AVAILABLE_IN_ALL +GType g_filter_input_stream_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GInputStream * g_filter_input_stream_get_base_stream (GFilterInputStream *stream); +GLIB_AVAILABLE_IN_ALL +gboolean g_filter_input_stream_get_close_base_stream (GFilterInputStream *stream); +GLIB_AVAILABLE_IN_ALL +void g_filter_input_stream_set_close_base_stream (GFilterInputStream *stream, + gboolean close_base); + +G_END_DECLS + +#endif /* __G_FILTER_INPUT_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfilteroutputstream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfilteroutputstream.h new file mode 100755 index 00000000..105e72be --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gfilteroutputstream.h @@ -0,0 +1,78 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Christian Kellner <gicmo@gnome.org> + */ + +#ifndef __G_FILTER_OUTPUT_STREAM_H__ +#define __G_FILTER_OUTPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/goutputstream.h> + +G_BEGIN_DECLS + +#define G_TYPE_FILTER_OUTPUT_STREAM (g_filter_output_stream_get_type ()) +#define G_FILTER_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILTER_OUTPUT_STREAM, GFilterOutputStream)) +#define G_FILTER_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILTER_OUTPUT_STREAM, GFilterOutputStreamClass)) +#define G_IS_FILTER_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILTER_OUTPUT_STREAM)) +#define G_IS_FILTER_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILTER_OUTPUT_STREAM)) +#define G_FILTER_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILTER_OUTPUT_STREAM, GFilterOutputStreamClass)) + +/** + * GFilterOutputStream: + * + * A base class for all output streams that work on an underlying stream. + **/ +typedef struct _GFilterOutputStreamClass GFilterOutputStreamClass; + +struct _GFilterOutputStream +{ + GOutputStream parent_instance; + + /*< protected >*/ + GOutputStream *base_stream; +}; + +struct _GFilterOutputStreamClass +{ + GOutputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); +}; + + +GLIB_AVAILABLE_IN_ALL +GType g_filter_output_stream_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GOutputStream * g_filter_output_stream_get_base_stream (GFilterOutputStream *stream); +GLIB_AVAILABLE_IN_ALL +gboolean g_filter_output_stream_get_close_base_stream (GFilterOutputStream *stream); +GLIB_AVAILABLE_IN_ALL +void g_filter_output_stream_set_close_base_stream (GFilterOutputStream *stream, + gboolean close_base); + +G_END_DECLS + +#endif /* __G_FILTER_OUTPUT_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gicon.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gicon.h new file mode 100755 index 00000000..a4a03cbe --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gicon.h @@ -0,0 +1,102 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_ICON_H__ +#define __G_ICON_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_ICON (g_icon_get_type ()) +#define G_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_ICON, GIcon)) +#define G_IS_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_ICON)) +#define G_ICON_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_ICON, GIconIface)) + +/** + * GIcon: + * + * An abstract type that specifies an icon. + **/ +typedef struct _GIconIface GIconIface; + +/** + * GIconIface: + * @g_iface: The parent interface. + * @hash: A hash for a given #GIcon. + * @equal: Checks if two #GIcons are equal. + * @to_tokens: Serializes a #GIcon into tokens. The tokens must not + * contain any whitespace. Don't implement if the #GIcon can't be + * serialized (Since 2.20). + * @from_tokens: Constructs a #GIcon from tokens. Set the #GError if + * the tokens are malformed. Don't implement if the #GIcon can't be + * serialized (Since 2.20). + * @serialize: Serializes a #GIcon into a #GVariant. Since: 2.38 + * + * GIconIface is used to implement GIcon types for various + * different systems. See #GThemedIcon and #GLoadableIcon for + * examples of how to implement this interface. + */ +struct _GIconIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + guint (* hash) (GIcon *icon); + gboolean (* equal) (GIcon *icon1, + GIcon *icon2); + gboolean (* to_tokens) (GIcon *icon, + GPtrArray *tokens, + gint *out_version); + GIcon * (* from_tokens) (gchar **tokens, + gint num_tokens, + gint version, + GError **error); + + GVariant * (* serialize) (GIcon *icon); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_icon_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +guint g_icon_hash (gconstpointer icon); +GLIB_AVAILABLE_IN_ALL +gboolean g_icon_equal (GIcon *icon1, + GIcon *icon2); +GLIB_AVAILABLE_IN_ALL +gchar *g_icon_to_string (GIcon *icon); +GLIB_AVAILABLE_IN_ALL +GIcon *g_icon_new_for_string (const gchar *str, + GError **error); + +GLIB_AVAILABLE_IN_2_38 +GVariant * g_icon_serialize (GIcon *icon); +GLIB_AVAILABLE_IN_2_38 +GIcon * g_icon_deserialize (GVariant *value); + +G_END_DECLS + +#endif /* __G_ICON_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/ginetaddress.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/ginetaddress.h new file mode 100755 index 00000000..2963affa --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/ginetaddress.h @@ -0,0 +1,124 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Christian Kellner, Samuel Cormier-Iijima + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Christian Kellner <gicmo@gnome.org> + * Samuel Cormier-Iijima <sciyoshi@gmail.com> + */ + +#ifndef __G_INET_ADDRESS_H__ +#define __G_INET_ADDRESS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_INET_ADDRESS (g_inet_address_get_type ()) +#define G_INET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INET_ADDRESS, GInetAddress)) +#define G_INET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_INET_ADDRESS, GInetAddressClass)) +#define G_IS_INET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INET_ADDRESS)) +#define G_IS_INET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INET_ADDRESS)) +#define G_INET_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_INET_ADDRESS, GInetAddressClass)) + +typedef struct _GInetAddressClass GInetAddressClass; +typedef struct _GInetAddressPrivate GInetAddressPrivate; + +struct _GInetAddress +{ + GObject parent_instance; + + /*< private >*/ + GInetAddressPrivate *priv; +}; + +struct _GInetAddressClass +{ + GObjectClass parent_class; + + gchar * (*to_string) (GInetAddress *address); + const guint8 * (*to_bytes) (GInetAddress *address); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_inet_address_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GInetAddress * g_inet_address_new_from_string (const gchar *string); + +GLIB_AVAILABLE_IN_ALL +GInetAddress * g_inet_address_new_from_bytes (const guint8 *bytes, + GSocketFamily family); + +GLIB_AVAILABLE_IN_ALL +GInetAddress * g_inet_address_new_loopback (GSocketFamily family); + +GLIB_AVAILABLE_IN_ALL +GInetAddress * g_inet_address_new_any (GSocketFamily family); + +GLIB_AVAILABLE_IN_ALL +gboolean g_inet_address_equal (GInetAddress *address, + GInetAddress *other_address); + +GLIB_AVAILABLE_IN_ALL +gchar * g_inet_address_to_string (GInetAddress *address); + +GLIB_AVAILABLE_IN_ALL +const guint8 * g_inet_address_to_bytes (GInetAddress *address); + +GLIB_AVAILABLE_IN_ALL +gsize g_inet_address_get_native_size (GInetAddress *address); + +GLIB_AVAILABLE_IN_ALL +GSocketFamily g_inet_address_get_family (GInetAddress *address); + +GLIB_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_any (GInetAddress *address); + +GLIB_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_loopback (GInetAddress *address); + +GLIB_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_link_local (GInetAddress *address); + +GLIB_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_site_local (GInetAddress *address); + +GLIB_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_multicast (GInetAddress *address); + +GLIB_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_mc_global (GInetAddress *address); + +GLIB_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_mc_link_local (GInetAddress *address); + +GLIB_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_mc_node_local (GInetAddress *address); + +GLIB_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_mc_org_local (GInetAddress *address); + +GLIB_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_mc_site_local (GInetAddress *address); + +G_END_DECLS + +#endif /* __G_INET_ADDRESS_H__ */ + diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/ginetaddressmask.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/ginetaddressmask.h new file mode 100755 index 00000000..ce5e285c --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/ginetaddressmask.h @@ -0,0 +1,85 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright 2011 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_INET_ADDRESS_MASK_H__ +#define __G_INET_ADDRESS_MASK_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_INET_ADDRESS_MASK (g_inet_address_mask_get_type ()) +#define G_INET_ADDRESS_MASK(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INET_ADDRESS_MASK, GInetAddressMask)) +#define G_INET_ADDRESS_MASK_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_INET_ADDRESS_MASK, GInetAddressMaskClass)) +#define G_IS_INET_ADDRESS_MASK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INET_ADDRESS_MASK)) +#define G_IS_INET_ADDRESS_MASK_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INET_ADDRESS_MASK)) +#define G_INET_ADDRESS_MASK_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_INET_ADDRESS_MASK, GInetAddressMaskClass)) + +typedef struct _GInetAddressMaskClass GInetAddressMaskClass; +typedef struct _GInetAddressMaskPrivate GInetAddressMaskPrivate; + +struct _GInetAddressMask +{ + GObject parent_instance; + + /*< private >*/ + GInetAddressMaskPrivate *priv; +}; + +struct _GInetAddressMaskClass +{ + GObjectClass parent_class; + +}; + +GLIB_AVAILABLE_IN_2_32 +GType g_inet_address_mask_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_32 +GInetAddressMask *g_inet_address_mask_new (GInetAddress *addr, + guint length, + GError **error); + +GLIB_AVAILABLE_IN_2_32 +GInetAddressMask *g_inet_address_mask_new_from_string (const gchar *mask_string, + GError **error); +GLIB_AVAILABLE_IN_2_32 +gchar *g_inet_address_mask_to_string (GInetAddressMask *mask); + +GLIB_AVAILABLE_IN_2_32 +GSocketFamily g_inet_address_mask_get_family (GInetAddressMask *mask); +GLIB_AVAILABLE_IN_2_32 +GInetAddress *g_inet_address_mask_get_address (GInetAddressMask *mask); +GLIB_AVAILABLE_IN_2_32 +guint g_inet_address_mask_get_length (GInetAddressMask *mask); + +GLIB_AVAILABLE_IN_2_32 +gboolean g_inet_address_mask_matches (GInetAddressMask *mask, + GInetAddress *address); +GLIB_AVAILABLE_IN_2_32 +gboolean g_inet_address_mask_equal (GInetAddressMask *mask, + GInetAddressMask *mask2); + +G_END_DECLS + +#endif /* __G_INET_ADDRESS_MASK_H__ */ + diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/ginetsocketaddress.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/ginetsocketaddress.h new file mode 100755 index 00000000..e05ba098 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/ginetsocketaddress.h @@ -0,0 +1,78 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Christian Kellner, Samuel Cormier-Iijima + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Christian Kellner <gicmo@gnome.org> + * Samuel Cormier-Iijima <sciyoshi@gmail.com> + */ + +#ifndef __G_INET_SOCKET_ADDRESS_H__ +#define __G_INET_SOCKET_ADDRESS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gsocketaddress.h> + +G_BEGIN_DECLS + +#define G_TYPE_INET_SOCKET_ADDRESS (g_inet_socket_address_get_type ()) +#define G_INET_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INET_SOCKET_ADDRESS, GInetSocketAddress)) +#define G_INET_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_INET_SOCKET_ADDRESS, GInetSocketAddressClass)) +#define G_IS_INET_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INET_SOCKET_ADDRESS)) +#define G_IS_INET_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INET_SOCKET_ADDRESS)) +#define G_INET_SOCKET_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_INET_SOCKET_ADDRESS, GInetSocketAddressClass)) + +typedef struct _GInetSocketAddressClass GInetSocketAddressClass; +typedef struct _GInetSocketAddressPrivate GInetSocketAddressPrivate; + +struct _GInetSocketAddress +{ + GSocketAddress parent_instance; + + /*< private >*/ + GInetSocketAddressPrivate *priv; +}; + +struct _GInetSocketAddressClass +{ + GSocketAddressClass parent_class; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_inet_socket_address_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GSocketAddress *g_inet_socket_address_new (GInetAddress *address, + guint16 port); +GLIB_AVAILABLE_IN_2_40 +GSocketAddress *g_inet_socket_address_new_from_string (const char *address, + guint port); + +GLIB_AVAILABLE_IN_ALL +GInetAddress * g_inet_socket_address_get_address (GInetSocketAddress *address); +GLIB_AVAILABLE_IN_ALL +guint16 g_inet_socket_address_get_port (GInetSocketAddress *address); + +GLIB_AVAILABLE_IN_2_32 +guint32 g_inet_socket_address_get_flowinfo (GInetSocketAddress *address); +GLIB_AVAILABLE_IN_2_32 +guint32 g_inet_socket_address_get_scope_id (GInetSocketAddress *address); + +G_END_DECLS + +#endif /* __G_INET_SOCKET_ADDRESS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/ginitable.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/ginitable.h new file mode 100755 index 00000000..c29098d5 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/ginitable.h @@ -0,0 +1,100 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2009 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_INITABLE_H__ +#define __G_INITABLE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_INITABLE (g_initable_get_type ()) +#define G_INITABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_INITABLE, GInitable)) +#define G_IS_INITABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_INITABLE)) +#define G_INITABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_INITABLE, GInitableIface)) +#define G_TYPE_IS_INITABLE(type) (g_type_is_a ((type), G_TYPE_INITABLE)) + +/** + * GInitable: + * + * Interface for initializable objects. + * + * Since: 2.22 + **/ +typedef struct _GInitableIface GInitableIface; + +/** + * GInitableIface: + * @g_iface: The parent interface. + * @init: Initializes the object. + * + * Provides an interface for initializing object such that initialization + * may fail. + * + * Since: 2.22 + **/ +struct _GInitableIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + gboolean (* init) (GInitable *initable, + GCancellable *cancellable, + GError **error); +}; + + +GLIB_AVAILABLE_IN_ALL +GType g_initable_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +gboolean g_initable_init (GInitable *initable, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gpointer g_initable_new (GType object_type, + GCancellable *cancellable, + GError **error, + const gchar *first_property_name, + ...); + +GLIB_DEPRECATED_IN_2_54_FOR(g_object_new_with_properties and g_initable_init) +gpointer g_initable_newv (GType object_type, + guint n_parameters, + GParameter *parameters, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +GObject* g_initable_new_valist (GType object_type, + const gchar *first_property_name, + va_list var_args, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + + +#endif /* __G_INITABLE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/ginputstream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/ginputstream.h new file mode 100755 index 00000000..53b14e38 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/ginputstream.h @@ -0,0 +1,216 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_INPUT_STREAM_H__ +#define __G_INPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_INPUT_STREAM (g_input_stream_get_type ()) +#define G_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INPUT_STREAM, GInputStream)) +#define G_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_INPUT_STREAM, GInputStreamClass)) +#define G_IS_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INPUT_STREAM)) +#define G_IS_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INPUT_STREAM)) +#define G_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_INPUT_STREAM, GInputStreamClass)) + +/** + * GInputStream: + * + * Base class for streaming input operations. + **/ +typedef struct _GInputStreamClass GInputStreamClass; +typedef struct _GInputStreamPrivate GInputStreamPrivate; + +struct _GInputStream +{ + GObject parent_instance; + + /*< private >*/ + GInputStreamPrivate *priv; +}; + +struct _GInputStreamClass +{ + GObjectClass parent_class; + + /* Sync ops: */ + + gssize (* read_fn) (GInputStream *stream, + void *buffer, + gsize count, + GCancellable *cancellable, + GError **error); + gssize (* skip) (GInputStream *stream, + gsize count, + GCancellable *cancellable, + GError **error); + gboolean (* close_fn) (GInputStream *stream, + GCancellable *cancellable, + GError **error); + + /* Async ops: (optional in derived classes) */ + void (* read_async) (GInputStream *stream, + void *buffer, + gsize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gssize (* read_finish) (GInputStream *stream, + GAsyncResult *result, + GError **error); + void (* skip_async) (GInputStream *stream, + gsize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gssize (* skip_finish) (GInputStream *stream, + GAsyncResult *result, + GError **error); + void (* close_async) (GInputStream *stream, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* close_finish) (GInputStream *stream, + GAsyncResult *result, + GError **error); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_input_stream_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +gssize g_input_stream_read (GInputStream *stream, + void *buffer, + gsize count, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_input_stream_read_all (GInputStream *stream, + void *buffer, + gsize count, + gsize *bytes_read, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_2_34 +GBytes *g_input_stream_read_bytes (GInputStream *stream, + gsize count, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gssize g_input_stream_skip (GInputStream *stream, + gsize count, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_input_stream_close (GInputStream *stream, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_input_stream_read_async (GInputStream *stream, + void *buffer, + gsize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gssize g_input_stream_read_finish (GInputStream *stream, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_2_44 +void g_input_stream_read_all_async (GInputStream *stream, + void *buffer, + gsize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_2_44 +gboolean g_input_stream_read_all_finish (GInputStream *stream, + GAsyncResult *result, + gsize *bytes_read, + GError **error); + +GLIB_AVAILABLE_IN_2_34 +void g_input_stream_read_bytes_async (GInputStream *stream, + gsize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_2_34 +GBytes *g_input_stream_read_bytes_finish (GInputStream *stream, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_input_stream_skip_async (GInputStream *stream, + gsize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gssize g_input_stream_skip_finish (GInputStream *stream, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_input_stream_close_async (GInputStream *stream, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_input_stream_close_finish (GInputStream *stream, + GAsyncResult *result, + GError **error); + +/* For implementations: */ + +GLIB_AVAILABLE_IN_ALL +gboolean g_input_stream_is_closed (GInputStream *stream); +GLIB_AVAILABLE_IN_ALL +gboolean g_input_stream_has_pending (GInputStream *stream); +GLIB_AVAILABLE_IN_ALL +gboolean g_input_stream_set_pending (GInputStream *stream, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_input_stream_clear_pending (GInputStream *stream); + +G_END_DECLS + +#endif /* __G_INPUT_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gio-autocleanups.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gio-autocleanups.h new file mode 100755 index 00000000..62470228 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gio-autocleanups.h @@ -0,0 +1,150 @@ +/* + * Copyright © 2015 Canonical Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Ryan Lortie <desrt@desrt.ca> + */ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAction, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GActionMap, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAppInfo, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAppLaunchContext, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAppInfoMonitor, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GApplicationCommandLine, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GApplication, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAsyncInitable, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAsyncResult, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GBufferedInputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GBufferedOutputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GBytesIcon, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GCancellable, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GCharsetConverter, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GConverter, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GConverterInputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GConverterOutputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GCredentials, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDatagramBased, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDataInputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDataOutputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusActionGroup, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusAuthObserver, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusInterface, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusInterfaceSkeleton, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusMenuModel, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusMessage, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusMethodInvocation, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusNodeInfo, g_dbus_node_info_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusObject, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusObjectManagerClient, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusObjectManager, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusObjectManagerServer, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusObjectProxy, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusObjectSkeleton, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusProxy, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusServer, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDrive, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GEmblemedIcon, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GEmblem, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileEnumerator, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFile, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileAttributeInfoList, g_file_attribute_info_list_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileIcon, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileInfo, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileInputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileIOStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileMonitor, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFilenameCompleter, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileOutputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFilterInputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFilterOutputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GIcon, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInetAddress, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInetAddressMask, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInetSocketAddress, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitable, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GIOModule, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GIOStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GLoadableIcon, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMemoryInputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMemoryOutputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMenu, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMenuItem, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMenuModel, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMenuAttributeIter, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMenuLinkIter, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMount, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMountOperation, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GNativeVolumeMonitor, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GNetworkAddress, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GNetworkMonitor, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GNetworkService, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GNotification, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GOutputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GPermission, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GPollableInputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GPollableOutputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GPropertyAction, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GProxyAddressEnumerator, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GProxyAddress, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GProxy, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GProxyResolver, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GRemoteActionGroup, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GResolver, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSeekable, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSettingsBackend, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSettingsSchema, g_settings_schema_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSettings, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSimpleActionGroup, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSimpleAction, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSimpleAsyncResult, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSimplePermission, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSimpleProxyResolver, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketAddressEnumerator, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketAddress, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketClient, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketConnectable, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketControlMessage, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocket, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketListener, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketService, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSubprocess, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSubprocessLauncher, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTask, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTcpConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTcpWrapperConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTestDBus, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GThemedIcon, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GThreadedSocketService, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsBackend, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsCertificate, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsClientConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsDatabase, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsFileDatabase, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsInteraction, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsPassword, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsServerConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVfs, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVolume, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVolumeMonitor, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GZlibCompressor, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GZlibDecompressor, g_object_unref) diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gio.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gio.h new file mode 100755 index 00000000..f4d934da --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gio.h @@ -0,0 +1,176 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_IO_H__ +#define __G_IO_H__ + +#define __GIO_GIO_H_INSIDE__ + +#include <gio/giotypes.h> + +#include <gio/gaction.h> +#include <gio/gactiongroup.h> +#include <gio/gactiongroupexporter.h> +#include <gio/gactionmap.h> +#include <gio/gappinfo.h> +#include <gio/gapplication.h> +#include <gio/gapplicationcommandline.h> +#include <gio/gasyncinitable.h> +#include <gio/gasyncresult.h> +#include <gio/gbufferedinputstream.h> +#include <gio/gbufferedoutputstream.h> +#include <gio/gbytesicon.h> +#include <gio/gcancellable.h> +#include <gio/gcharsetconverter.h> +#include <gio/gcontenttype.h> +#include <gio/gconverter.h> +#include <gio/gconverterinputstream.h> +#include <gio/gconverteroutputstream.h> +#include <gio/gcredentials.h> +#include <gio/gdatagrambased.h> +#include <gio/gdatainputstream.h> +#include <gio/gdataoutputstream.h> +#include <gio/gdbusaddress.h> +#include <gio/gdbusauthobserver.h> +#include <gio/gdbusconnection.h> +#include <gio/gdbuserror.h> +#include <gio/gdbusintrospection.h> +#include <gio/gdbusmessage.h> +#include <gio/gdbusmethodinvocation.h> +#include <gio/gdbusnameowning.h> +#include <gio/gdbusnamewatching.h> +#include <gio/gdbusproxy.h> +#include <gio/gdbusserver.h> +#include <gio/gdbusutils.h> +#include <gio/gdrive.h> +#include <gio/gdtlsclientconnection.h> +#include <gio/gdtlsconnection.h> +#include <gio/gdtlsserverconnection.h> +#include <gio/gemblemedicon.h> +#include <gio/gfileattribute.h> +#include <gio/gfileenumerator.h> +#include <gio/gfile.h> +#include <gio/gfileicon.h> +#include <gio/gfileinfo.h> +#include <gio/gfileinputstream.h> +#include <gio/gfileiostream.h> +#include <gio/gfilemonitor.h> +#include <gio/gfilenamecompleter.h> +#include <gio/gfileoutputstream.h> +#include <gio/gfilterinputstream.h> +#include <gio/gfilteroutputstream.h> +#include <gio/gicon.h> +#include <gio/ginetaddress.h> +#include <gio/ginetaddressmask.h> +#include <gio/ginetsocketaddress.h> +#include <gio/ginitable.h> +#include <gio/ginputstream.h> +#include <gio/gioenums.h> +#include <gio/gioenumtypes.h> +#include <gio/gioerror.h> +#include <gio/giomodule.h> +#include <gio/gioscheduler.h> +#include <gio/giostream.h> +#include <gio/gloadableicon.h> +#include <gio/gmemoryinputstream.h> +#include <gio/gmemoryoutputstream.h> +#include <gio/gmount.h> +#include <gio/gmountoperation.h> +#include <gio/gnativevolumemonitor.h> +#include <gio/gnetworkaddress.h> +#include <gio/gnetworkmonitor.h> +#include <gio/gnetworkservice.h> +#include <gio/goutputstream.h> +#include <gio/gpermission.h> +#include <gio/gpollableinputstream.h> +#include <gio/gpollableoutputstream.h> +#include <gio/gpollableutils.h> +#include <gio/gpropertyaction.h> +#include <gio/gproxy.h> +#include <gio/gproxyaddress.h> +#include <gio/gproxyaddressenumerator.h> +#include <gio/gproxyresolver.h> +#include <gio/gresolver.h> +#include <gio/gresource.h> +#include <gio/gseekable.h> +#include <gio/gsettingsschema.h> +#include <gio/gsettings.h> +#include <gio/gsimpleaction.h> +#include <gio/gsimpleactiongroup.h> +#include <gio/gsimpleasyncresult.h> +#include <gio/gsimpleiostream.h> +#include <gio/gsimplepermission.h> +#include <gio/gsocketaddressenumerator.h> +#include <gio/gsocketaddress.h> +#include <gio/gsocketclient.h> +#include <gio/gsocketconnectable.h> +#include <gio/gsocketconnection.h> +#include <gio/gsocketcontrolmessage.h> +#include <gio/gsocket.h> +#include <gio/gsocketlistener.h> +#include <gio/gsocketservice.h> +#include <gio/gsrvtarget.h> +#include <gio/gsimpleproxyresolver.h> +#include <gio/gtask.h> +#include <gio/gsubprocess.h> +#include <gio/gsubprocesslauncher.h> +#include <gio/gtcpconnection.h> +#include <gio/gtcpwrapperconnection.h> +#include <gio/gtestdbus.h> +#include <gio/gthemedicon.h> +#include <gio/gthreadedsocketservice.h> +#include <gio/gtlsbackend.h> +#include <gio/gtlscertificate.h> +#include <gio/gtlsclientconnection.h> +#include <gio/gtlsconnection.h> +#include <gio/gtlsdatabase.h> +#include <gio/gtlsfiledatabase.h> +#include <gio/gtlsinteraction.h> +#include <gio/gtlsserverconnection.h> +#include <gio/gtlspassword.h> +#include <gio/gvfs.h> +#include <gio/gvolume.h> +#include <gio/gvolumemonitor.h> +#include <gio/gzlibcompressor.h> +#include <gio/gzlibdecompressor.h> +#include <gio/gdbusinterface.h> +#include <gio/gdbusinterfaceskeleton.h> +#include <gio/gdbusobject.h> +#include <gio/gdbusobjectskeleton.h> +#include <gio/gdbusobjectproxy.h> +#include <gio/gdbusobjectmanager.h> +#include <gio/gdbusobjectmanagerclient.h> +#include <gio/gdbusobjectmanagerserver.h> +#include <gio/gdbusactiongroup.h> +#include <gio/gremoteactiongroup.h> +#include <gio/gmenumodel.h> +#include <gio/gmenu.h> +#include <gio/gmenuexporter.h> +#include <gio/gdbusmenumodel.h> +#include <gio/gnotification.h> +#include <gio/glistmodel.h> +#include <gio/gliststore.h> + +#include <gio/gio-autocleanups.h> + +#undef __GIO_GIO_H_INSIDE__ + +#endif /* __G_IO_H__ */ + diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gioenums.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gioenums.h new file mode 100755 index 00000000..bc844b9b --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gioenums.h @@ -0,0 +1,1909 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __GIO_ENUMS_H__ +#define __GIO_ENUMS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <glib-object.h> + +G_BEGIN_DECLS + + +/** + * GAppInfoCreateFlags: + * @G_APP_INFO_CREATE_NONE: No flags. + * @G_APP_INFO_CREATE_NEEDS_TERMINAL: Application opens in a terminal window. + * @G_APP_INFO_CREATE_SUPPORTS_URIS: Application supports URI arguments. + * @G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION: Application supports startup notification. Since 2.26 + * + * Flags used when creating a #GAppInfo. + */ +typedef enum { + G_APP_INFO_CREATE_NONE = 0, /*< nick=none >*/ + G_APP_INFO_CREATE_NEEDS_TERMINAL = (1 << 0), /*< nick=needs-terminal >*/ + G_APP_INFO_CREATE_SUPPORTS_URIS = (1 << 1), /*< nick=supports-uris >*/ + G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION = (1 << 2) /*< nick=supports-startup-notification >*/ +} GAppInfoCreateFlags; + +/** + * GConverterFlags: + * @G_CONVERTER_NO_FLAGS: No flags. + * @G_CONVERTER_INPUT_AT_END: At end of input data + * @G_CONVERTER_FLUSH: Flush data + * + * Flags used when calling a g_converter_convert(). + * + * Since: 2.24 + */ +typedef enum { + G_CONVERTER_NO_FLAGS = 0, /*< nick=none >*/ + G_CONVERTER_INPUT_AT_END = (1 << 0), /*< nick=input-at-end >*/ + G_CONVERTER_FLUSH = (1 << 1) /*< nick=flush >*/ +} GConverterFlags; + +/** + * GConverterResult: + * @G_CONVERTER_ERROR: There was an error during conversion. + * @G_CONVERTER_CONVERTED: Some data was consumed or produced + * @G_CONVERTER_FINISHED: The conversion is finished + * @G_CONVERTER_FLUSHED: Flushing is finished + * + * Results returned from g_converter_convert(). + * + * Since: 2.24 + */ +typedef enum { + G_CONVERTER_ERROR = 0, /*< nick=error >*/ + G_CONVERTER_CONVERTED = 1, /*< nick=converted >*/ + G_CONVERTER_FINISHED = 2, /*< nick=finished >*/ + G_CONVERTER_FLUSHED = 3 /*< nick=flushed >*/ +} GConverterResult; + + +/** + * GDataStreamByteOrder: + * @G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN: Selects Big Endian byte order. + * @G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN: Selects Little Endian byte order. + * @G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN: Selects endianness based on host machine's architecture. + * + * #GDataStreamByteOrder is used to ensure proper endianness of streaming data sources + * across various machine architectures. + * + **/ +typedef enum { + G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN, + G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN, + G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN +} GDataStreamByteOrder; + + +/** + * GDataStreamNewlineType: + * @G_DATA_STREAM_NEWLINE_TYPE_LF: Selects "LF" line endings, common on most modern UNIX platforms. + * @G_DATA_STREAM_NEWLINE_TYPE_CR: Selects "CR" line endings. + * @G_DATA_STREAM_NEWLINE_TYPE_CR_LF: Selects "CR, LF" line ending, common on Microsoft Windows. + * @G_DATA_STREAM_NEWLINE_TYPE_ANY: Automatically try to handle any line ending type. + * + * #GDataStreamNewlineType is used when checking for or setting the line endings for a given file. + **/ +typedef enum { + G_DATA_STREAM_NEWLINE_TYPE_LF, + G_DATA_STREAM_NEWLINE_TYPE_CR, + G_DATA_STREAM_NEWLINE_TYPE_CR_LF, + G_DATA_STREAM_NEWLINE_TYPE_ANY +} GDataStreamNewlineType; + + +/** + * GFileAttributeType: + * @G_FILE_ATTRIBUTE_TYPE_INVALID: indicates an invalid or uninitalized type. + * @G_FILE_ATTRIBUTE_TYPE_STRING: a null terminated UTF8 string. + * @G_FILE_ATTRIBUTE_TYPE_BYTE_STRING: a zero terminated string of non-zero bytes. + * @G_FILE_ATTRIBUTE_TYPE_BOOLEAN: a boolean value. + * @G_FILE_ATTRIBUTE_TYPE_UINT32: an unsigned 4-byte/32-bit integer. + * @G_FILE_ATTRIBUTE_TYPE_INT32: a signed 4-byte/32-bit integer. + * @G_FILE_ATTRIBUTE_TYPE_UINT64: an unsigned 8-byte/64-bit integer. + * @G_FILE_ATTRIBUTE_TYPE_INT64: a signed 8-byte/64-bit integer. + * @G_FILE_ATTRIBUTE_TYPE_OBJECT: a #GObject. + * @G_FILE_ATTRIBUTE_TYPE_STRINGV: a %NULL terminated char **. Since 2.22 + * + * The data types for file attributes. + **/ +typedef enum { + G_FILE_ATTRIBUTE_TYPE_INVALID = 0, + G_FILE_ATTRIBUTE_TYPE_STRING, + G_FILE_ATTRIBUTE_TYPE_BYTE_STRING, /* zero terminated string of non-zero bytes */ + G_FILE_ATTRIBUTE_TYPE_BOOLEAN, + G_FILE_ATTRIBUTE_TYPE_UINT32, + G_FILE_ATTRIBUTE_TYPE_INT32, + G_FILE_ATTRIBUTE_TYPE_UINT64, + G_FILE_ATTRIBUTE_TYPE_INT64, + G_FILE_ATTRIBUTE_TYPE_OBJECT, + G_FILE_ATTRIBUTE_TYPE_STRINGV +} GFileAttributeType; + + +/** + * GFileAttributeInfoFlags: + * @G_FILE_ATTRIBUTE_INFO_NONE: no flags set. + * @G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE: copy the attribute values when the file is copied. + * @G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED: copy the attribute values when the file is moved. + * + * Flags specifying the behaviour of an attribute. + **/ +typedef enum { + G_FILE_ATTRIBUTE_INFO_NONE = 0, + G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE = (1 << 0), + G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED = (1 << 1) +} GFileAttributeInfoFlags; + + +/** + * GFileAttributeStatus: + * @G_FILE_ATTRIBUTE_STATUS_UNSET: Attribute value is unset (empty). + * @G_FILE_ATTRIBUTE_STATUS_SET: Attribute value is set. + * @G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING: Indicates an error in setting the value. + * + * Used by g_file_set_attributes_from_info() when setting file attributes. + **/ +typedef enum { + G_FILE_ATTRIBUTE_STATUS_UNSET = 0, + G_FILE_ATTRIBUTE_STATUS_SET, + G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING +} GFileAttributeStatus; + + +/** + * GFileQueryInfoFlags: + * @G_FILE_QUERY_INFO_NONE: No flags set. + * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks. + * + * Flags used when querying a #GFileInfo. + */ +typedef enum { + G_FILE_QUERY_INFO_NONE = 0, + G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS = (1 << 0) /*< nick=nofollow-symlinks >*/ +} GFileQueryInfoFlags; + + +/** + * GFileCreateFlags: + * @G_FILE_CREATE_NONE: No flags set. + * @G_FILE_CREATE_PRIVATE: Create a file that can only be + * accessed by the current user. + * @G_FILE_CREATE_REPLACE_DESTINATION: Replace the destination + * as if it didn't exist before. Don't try to keep any old + * permissions, replace instead of following links. This + * is generally useful if you're doing a "copy over" + * rather than a "save new version of" replace operation. + * You can think of it as "unlink destination" before + * writing to it, although the implementation may not + * be exactly like that. Since 2.20 + * + * Flags used when an operation may create a file. + */ +typedef enum { + G_FILE_CREATE_NONE = 0, + G_FILE_CREATE_PRIVATE = (1 << 0), + G_FILE_CREATE_REPLACE_DESTINATION = (1 << 1) +} GFileCreateFlags; + +/** + * GFileMeasureFlags: + * @G_FILE_MEASURE_NONE: No flags set. + * @G_FILE_MEASURE_REPORT_ANY_ERROR: Report any error encountered + * while traversing the directory tree. Normally errors are only + * reported for the toplevel file. + * @G_FILE_MEASURE_APPARENT_SIZE: Tally usage based on apparent file + * sizes. Normally, the block-size is used, if available, as this is a + * more accurate representation of disk space used. + * Compare with `du --apparent-size`. + * @G_FILE_MEASURE_NO_XDEV: Do not cross mount point boundaries. + * Compare with `du -x`. + * + * Flags that can be used with g_file_measure_disk_usage(). + * + * Since: 2.38 + **/ +typedef enum { + G_FILE_MEASURE_NONE = 0, + G_FILE_MEASURE_REPORT_ANY_ERROR = (1 << 1), + G_FILE_MEASURE_APPARENT_SIZE = (1 << 2), + G_FILE_MEASURE_NO_XDEV = (1 << 3) +} GFileMeasureFlags; + +/** + * GMountMountFlags: + * @G_MOUNT_MOUNT_NONE: No flags set. + * + * Flags used when mounting a mount. + */ +typedef enum /*< flags >*/ { + G_MOUNT_MOUNT_NONE = 0 +} GMountMountFlags; + + +/** + * GMountUnmountFlags: + * @G_MOUNT_UNMOUNT_NONE: No flags set. + * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding + * file operations on the mount. + * + * Flags used when an unmounting a mount. + */ +typedef enum { + G_MOUNT_UNMOUNT_NONE = 0, + G_MOUNT_UNMOUNT_FORCE = (1 << 0) +} GMountUnmountFlags; + +/** + * GDriveStartFlags: + * @G_DRIVE_START_NONE: No flags set. + * + * Flags used when starting a drive. + * + * Since: 2.22 + */ +typedef enum /*< flags >*/ { + G_DRIVE_START_NONE = 0 +} GDriveStartFlags; + +/** + * GDriveStartStopType: + * @G_DRIVE_START_STOP_TYPE_UNKNOWN: Unknown or drive doesn't support + * start/stop. + * @G_DRIVE_START_STOP_TYPE_SHUTDOWN: The stop method will physically + * shut down the drive and e.g. power down the port the drive is + * attached to. + * @G_DRIVE_START_STOP_TYPE_NETWORK: The start/stop methods are used + * for connecting/disconnect to the drive over the network. + * @G_DRIVE_START_STOP_TYPE_MULTIDISK: The start/stop methods will + * assemble/disassemble a virtual drive from several physical + * drives. + * @G_DRIVE_START_STOP_TYPE_PASSWORD: The start/stop methods will + * unlock/lock the disk (for example using the ATA <quote>SECURITY + * UNLOCK DEVICE</quote> command) + * + * Enumeration describing how a drive can be started/stopped. + * + * Since: 2.22 + */ +typedef enum { + G_DRIVE_START_STOP_TYPE_UNKNOWN, + G_DRIVE_START_STOP_TYPE_SHUTDOWN, + G_DRIVE_START_STOP_TYPE_NETWORK, + G_DRIVE_START_STOP_TYPE_MULTIDISK, + G_DRIVE_START_STOP_TYPE_PASSWORD +} GDriveStartStopType; + +/** + * GFileCopyFlags: + * @G_FILE_COPY_NONE: No flags set. + * @G_FILE_COPY_OVERWRITE: Overwrite any existing files + * @G_FILE_COPY_BACKUP: Make a backup of any existing files. + * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks. + * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo). + * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported. + * @G_FILE_COPY_TARGET_DEFAULT_PERMS: Leaves target file with default perms, instead of setting the source file perms. + * + * Flags used when copying or moving files. + */ +typedef enum { + G_FILE_COPY_NONE = 0, /*< nick=none >*/ + G_FILE_COPY_OVERWRITE = (1 << 0), + G_FILE_COPY_BACKUP = (1 << 1), + G_FILE_COPY_NOFOLLOW_SYMLINKS = (1 << 2), + G_FILE_COPY_ALL_METADATA = (1 << 3), + G_FILE_COPY_NO_FALLBACK_FOR_MOVE = (1 << 4), + G_FILE_COPY_TARGET_DEFAULT_PERMS = (1 << 5) +} GFileCopyFlags; + + +/** + * GFileMonitorFlags: + * @G_FILE_MONITOR_NONE: No flags set. + * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events. + * @G_FILE_MONITOR_SEND_MOVED: Pair DELETED and CREATED events caused + * by file renames (moves) and send a single G_FILE_MONITOR_EVENT_MOVED + * event instead (NB: not supported on all backends; the default + * behaviour -without specifying this flag- is to send single DELETED + * and CREATED events). Deprecated since 2.46: use + * %G_FILE_MONITOR_WATCH_MOVES instead. + * @G_FILE_MONITOR_WATCH_HARD_LINKS: Watch for changes to the file made + * via another hard link. Since 2.36. + * @G_FILE_MONITOR_WATCH_MOVES: Watch for rename operations on a + * monitored directory. This causes %G_FILE_MONITOR_EVENT_RENAMED, + * %G_FILE_MONITOR_EVENT_MOVED_IN and %G_FILE_MONITOR_EVENT_MOVED_OUT + * events to be emitted when possible. Since: 2.46. + * + * Flags used to set what a #GFileMonitor will watch for. + */ +typedef enum { + G_FILE_MONITOR_NONE = 0, + G_FILE_MONITOR_WATCH_MOUNTS = (1 << 0), + G_FILE_MONITOR_SEND_MOVED = (1 << 1), + G_FILE_MONITOR_WATCH_HARD_LINKS = (1 << 2), + G_FILE_MONITOR_WATCH_MOVES = (1 << 3) +} GFileMonitorFlags; + + +/** + * GFileType: + * @G_FILE_TYPE_UNKNOWN: File's type is unknown. + * @G_FILE_TYPE_REGULAR: File handle represents a regular file. + * @G_FILE_TYPE_DIRECTORY: File handle represents a directory. + * @G_FILE_TYPE_SYMBOLIC_LINK: File handle represents a symbolic link + * (Unix systems). + * @G_FILE_TYPE_SPECIAL: File is a "special" file, such as a socket, fifo, + * block device, or character device. + * @G_FILE_TYPE_SHORTCUT: File is a shortcut (Windows systems). + * @G_FILE_TYPE_MOUNTABLE: File is a mountable location. + * + * Indicates the file's on-disk type. + **/ +typedef enum { + G_FILE_TYPE_UNKNOWN = 0, + G_FILE_TYPE_REGULAR, + G_FILE_TYPE_DIRECTORY, + G_FILE_TYPE_SYMBOLIC_LINK, + G_FILE_TYPE_SPECIAL, /* socket, fifo, blockdev, chardev */ + G_FILE_TYPE_SHORTCUT, + G_FILE_TYPE_MOUNTABLE +} GFileType; + + +/** + * GFilesystemPreviewType: + * @G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS: Only preview files if user has explicitly requested it. + * @G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL: Preview files if user has requested preview of "local" files. + * @G_FILESYSTEM_PREVIEW_TYPE_NEVER: Never preview files. + * + * Indicates a hint from the file system whether files should be + * previewed in a file manager. Returned as the value of the key + * #G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW. + **/ +typedef enum { + G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS = 0, + G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL, + G_FILESYSTEM_PREVIEW_TYPE_NEVER +} GFilesystemPreviewType; + + +/** + * GFileMonitorEvent: + * @G_FILE_MONITOR_EVENT_CHANGED: a file changed. + * @G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: a hint that this was probably the last change in a set of changes. + * @G_FILE_MONITOR_EVENT_DELETED: a file was deleted. + * @G_FILE_MONITOR_EVENT_CREATED: a file was created. + * @G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: a file attribute was changed. + * @G_FILE_MONITOR_EVENT_PRE_UNMOUNT: the file location will soon be unmounted. + * @G_FILE_MONITOR_EVENT_UNMOUNTED: the file location was unmounted. + * @G_FILE_MONITOR_EVENT_MOVED: the file was moved -- only sent if the + * (deprecated) %G_FILE_MONITOR_SEND_MOVED flag is set + * @G_FILE_MONITOR_EVENT_RENAMED: the file was renamed within the + * current directory -- only sent if the %G_FILE_MONITOR_WATCH_MOVES + * flag is set. Since: 2.46. + * @G_FILE_MONITOR_EVENT_MOVED_IN: the file was moved into the + * monitored directory from another location -- only sent if the + * %G_FILE_MONITOR_WATCH_MOVES flag is set. Since: 2.46. + * @G_FILE_MONITOR_EVENT_MOVED_OUT: the file was moved out of the + * monitored directory to another location -- only sent if the + * %G_FILE_MONITOR_WATCH_MOVES flag is set. Since: 2.46 + * + * Specifies what type of event a monitor event is. + **/ +typedef enum { + G_FILE_MONITOR_EVENT_CHANGED, + G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT, + G_FILE_MONITOR_EVENT_DELETED, + G_FILE_MONITOR_EVENT_CREATED, + G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED, + G_FILE_MONITOR_EVENT_PRE_UNMOUNT, + G_FILE_MONITOR_EVENT_UNMOUNTED, + G_FILE_MONITOR_EVENT_MOVED, + G_FILE_MONITOR_EVENT_RENAMED, + G_FILE_MONITOR_EVENT_MOVED_IN, + G_FILE_MONITOR_EVENT_MOVED_OUT +} GFileMonitorEvent; + + +/* This enumeration conflicts with GIOError in giochannel.h. However, + * that is only used as a return value in some deprecated functions. + * So, we reuse the same prefix for the enumeration values, but call + * the actual enumeration (which is rarely used) GIOErrorEnum. + */ +/** + * GIOErrorEnum: + * @G_IO_ERROR_FAILED: Generic error condition for when an operation fails + * and no more specific #GIOErrorEnum value is defined. + * @G_IO_ERROR_NOT_FOUND: File not found. + * @G_IO_ERROR_EXISTS: File already exists. + * @G_IO_ERROR_IS_DIRECTORY: File is a directory. + * @G_IO_ERROR_NOT_DIRECTORY: File is not a directory. + * @G_IO_ERROR_NOT_EMPTY: File is a directory that isn't empty. + * @G_IO_ERROR_NOT_REGULAR_FILE: File is not a regular file. + * @G_IO_ERROR_NOT_SYMBOLIC_LINK: File is not a symbolic link. + * @G_IO_ERROR_NOT_MOUNTABLE_FILE: File cannot be mounted. + * @G_IO_ERROR_FILENAME_TOO_LONG: Filename is too many characters. + * @G_IO_ERROR_INVALID_FILENAME: Filename is invalid or contains invalid characters. + * @G_IO_ERROR_TOO_MANY_LINKS: File contains too many symbolic links. + * @G_IO_ERROR_NO_SPACE: No space left on drive. + * @G_IO_ERROR_INVALID_ARGUMENT: Invalid argument. + * @G_IO_ERROR_PERMISSION_DENIED: Permission denied. + * @G_IO_ERROR_NOT_SUPPORTED: Operation (or one of its parameters) not supported + * @G_IO_ERROR_NOT_MOUNTED: File isn't mounted. + * @G_IO_ERROR_ALREADY_MOUNTED: File is already mounted. + * @G_IO_ERROR_CLOSED: File was closed. + * @G_IO_ERROR_CANCELLED: Operation was cancelled. See #GCancellable. + * @G_IO_ERROR_PENDING: Operations are still pending. + * @G_IO_ERROR_READ_ONLY: File is read only. + * @G_IO_ERROR_CANT_CREATE_BACKUP: Backup couldn't be created. + * @G_IO_ERROR_WRONG_ETAG: File's Entity Tag was incorrect. + * @G_IO_ERROR_TIMED_OUT: Operation timed out. + * @G_IO_ERROR_WOULD_RECURSE: Operation would be recursive. + * @G_IO_ERROR_BUSY: File is busy. + * @G_IO_ERROR_WOULD_BLOCK: Operation would block. + * @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations). + * @G_IO_ERROR_WOULD_MERGE: Operation would merge files. + * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has + * already interacted with the user. Do not display any error dialog. + * @G_IO_ERROR_TOO_MANY_OPEN_FILES: The current process has too many files + * open and can't open any more. Duplicate descriptors do count toward + * this limit. Since 2.20 + * @G_IO_ERROR_NOT_INITIALIZED: The object has not been initialized. Since 2.22 + * @G_IO_ERROR_ADDRESS_IN_USE: The requested address is already in use. Since 2.22 + * @G_IO_ERROR_PARTIAL_INPUT: Need more input to finish operation. Since 2.24 + * @G_IO_ERROR_INVALID_DATA: The input data was invalid. Since 2.24 + * @G_IO_ERROR_DBUS_ERROR: A remote object generated an error that + * doesn't correspond to a locally registered #GError error + * domain. Use g_dbus_error_get_remote_error() to extract the D-Bus + * error name and g_dbus_error_strip_remote_error() to fix up the + * message so it matches what was received on the wire. Since 2.26. + * @G_IO_ERROR_HOST_UNREACHABLE: Host unreachable. Since 2.26 + * @G_IO_ERROR_NETWORK_UNREACHABLE: Network unreachable. Since 2.26 + * @G_IO_ERROR_CONNECTION_REFUSED: Connection refused. Since 2.26 + * @G_IO_ERROR_PROXY_FAILED: Connection to proxy server failed. Since 2.26 + * @G_IO_ERROR_PROXY_AUTH_FAILED: Proxy authentication failed. Since 2.26 + * @G_IO_ERROR_PROXY_NEED_AUTH: Proxy server needs authentication. Since 2.26 + * @G_IO_ERROR_PROXY_NOT_ALLOWED: Proxy connection is not allowed by ruleset. + * Since 2.26 + * @G_IO_ERROR_BROKEN_PIPE: Broken pipe. Since 2.36 + * @G_IO_ERROR_CONNECTION_CLOSED: Connection closed by peer. Note that this + * is the same code as %G_IO_ERROR_BROKEN_PIPE; before 2.44 some + * "connection closed" errors returned %G_IO_ERROR_BROKEN_PIPE, but others + * returned %G_IO_ERROR_FAILED. Now they should all return the same + * value, which has this more logical name. Since 2.44. + * @G_IO_ERROR_NOT_CONNECTED: Transport endpoint is not connected. Since 2.44 + * @G_IO_ERROR_MESSAGE_TOO_LARGE: Message too large. Since 2.48. + * + * Error codes returned by GIO functions. + * + * Note that this domain may be extended in future GLib releases. In + * general, new error codes either only apply to new APIs, or else + * replace %G_IO_ERROR_FAILED in cases that were not explicitly + * distinguished before. You should therefore avoid writing code like + * |[<!-- language="C" --> + * if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_FAILED)) + * { + * // Assume that this is EPRINTERONFIRE + * ... + * } + * ]| + * but should instead treat all unrecognized error codes the same as + * #G_IO_ERROR_FAILED. + **/ +typedef enum { + G_IO_ERROR_FAILED, + G_IO_ERROR_NOT_FOUND, + G_IO_ERROR_EXISTS, + G_IO_ERROR_IS_DIRECTORY, + G_IO_ERROR_NOT_DIRECTORY, + G_IO_ERROR_NOT_EMPTY, + G_IO_ERROR_NOT_REGULAR_FILE, + G_IO_ERROR_NOT_SYMBOLIC_LINK, + G_IO_ERROR_NOT_MOUNTABLE_FILE, + G_IO_ERROR_FILENAME_TOO_LONG, + G_IO_ERROR_INVALID_FILENAME, + G_IO_ERROR_TOO_MANY_LINKS, + G_IO_ERROR_NO_SPACE, + G_IO_ERROR_INVALID_ARGUMENT, + G_IO_ERROR_PERMISSION_DENIED, + G_IO_ERROR_NOT_SUPPORTED, + G_IO_ERROR_NOT_MOUNTED, + G_IO_ERROR_ALREADY_MOUNTED, + G_IO_ERROR_CLOSED, + G_IO_ERROR_CANCELLED, + G_IO_ERROR_PENDING, + G_IO_ERROR_READ_ONLY, + G_IO_ERROR_CANT_CREATE_BACKUP, + G_IO_ERROR_WRONG_ETAG, + G_IO_ERROR_TIMED_OUT, + G_IO_ERROR_WOULD_RECURSE, + G_IO_ERROR_BUSY, + G_IO_ERROR_WOULD_BLOCK, + G_IO_ERROR_HOST_NOT_FOUND, + G_IO_ERROR_WOULD_MERGE, + G_IO_ERROR_FAILED_HANDLED, + G_IO_ERROR_TOO_MANY_OPEN_FILES, + G_IO_ERROR_NOT_INITIALIZED, + G_IO_ERROR_ADDRESS_IN_USE, + G_IO_ERROR_PARTIAL_INPUT, + G_IO_ERROR_INVALID_DATA, + G_IO_ERROR_DBUS_ERROR, + G_IO_ERROR_HOST_UNREACHABLE, + G_IO_ERROR_NETWORK_UNREACHABLE, + G_IO_ERROR_CONNECTION_REFUSED, + G_IO_ERROR_PROXY_FAILED, + G_IO_ERROR_PROXY_AUTH_FAILED, + G_IO_ERROR_PROXY_NEED_AUTH, + G_IO_ERROR_PROXY_NOT_ALLOWED, + G_IO_ERROR_BROKEN_PIPE, + G_IO_ERROR_CONNECTION_CLOSED = G_IO_ERROR_BROKEN_PIPE, + G_IO_ERROR_NOT_CONNECTED, + G_IO_ERROR_MESSAGE_TOO_LARGE +} GIOErrorEnum; + + +/** + * GAskPasswordFlags: + * @G_ASK_PASSWORD_NEED_PASSWORD: operation requires a password. + * @G_ASK_PASSWORD_NEED_USERNAME: operation requires a username. + * @G_ASK_PASSWORD_NEED_DOMAIN: operation requires a domain. + * @G_ASK_PASSWORD_SAVING_SUPPORTED: operation supports saving settings. + * @G_ASK_PASSWORD_ANONYMOUS_SUPPORTED: operation supports anonymous users. + * + * #GAskPasswordFlags are used to request specific information from the + * user, or to notify the user of their choices in an authentication + * situation. + **/ +typedef enum { + G_ASK_PASSWORD_NEED_PASSWORD = (1 << 0), + G_ASK_PASSWORD_NEED_USERNAME = (1 << 1), + G_ASK_PASSWORD_NEED_DOMAIN = (1 << 2), + G_ASK_PASSWORD_SAVING_SUPPORTED = (1 << 3), + G_ASK_PASSWORD_ANONYMOUS_SUPPORTED = (1 << 4) +} GAskPasswordFlags; + + +/** + * GPasswordSave: + * @G_PASSWORD_SAVE_NEVER: never save a password. + * @G_PASSWORD_SAVE_FOR_SESSION: save a password for the session. + * @G_PASSWORD_SAVE_PERMANENTLY: save a password permanently. + * + * #GPasswordSave is used to indicate the lifespan of a saved password. + * + * #Gvfs stores passwords in the Gnome keyring when this flag allows it + * to, and later retrieves it again from there. + **/ +typedef enum { + G_PASSWORD_SAVE_NEVER, + G_PASSWORD_SAVE_FOR_SESSION, + G_PASSWORD_SAVE_PERMANENTLY +} GPasswordSave; + + +/** + * GMountOperationResult: + * @G_MOUNT_OPERATION_HANDLED: The request was fulfilled and the + * user specified data is now available + * @G_MOUNT_OPERATION_ABORTED: The user requested the mount operation + * to be aborted + * @G_MOUNT_OPERATION_UNHANDLED: The request was unhandled (i.e. not + * implemented) + * + * #GMountOperationResult is returned as a result when a request for + * information is send by the mounting operation. + **/ +typedef enum { + G_MOUNT_OPERATION_HANDLED, + G_MOUNT_OPERATION_ABORTED, + G_MOUNT_OPERATION_UNHANDLED +} GMountOperationResult; + + +/** + * GOutputStreamSpliceFlags: + * @G_OUTPUT_STREAM_SPLICE_NONE: Do not close either stream. + * @G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE: Close the source stream after + * the splice. + * @G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET: Close the target stream after + * the splice. + * + * GOutputStreamSpliceFlags determine how streams should be spliced. + **/ +typedef enum { + G_OUTPUT_STREAM_SPLICE_NONE = 0, + G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE = (1 << 0), + G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET = (1 << 1) +} GOutputStreamSpliceFlags; + + +/** + * GIOStreamSpliceFlags: + * @G_IO_STREAM_SPLICE_NONE: Do not close either stream. + * @G_IO_STREAM_SPLICE_CLOSE_STREAM1: Close the first stream after + * the splice. + * @G_IO_STREAM_SPLICE_CLOSE_STREAM2: Close the second stream after + * the splice. + * @G_IO_STREAM_SPLICE_WAIT_FOR_BOTH: Wait for both splice operations to finish + * before calling the callback. + * + * GIOStreamSpliceFlags determine how streams should be spliced. + * + * Since: 2.28 + **/ +typedef enum { + G_IO_STREAM_SPLICE_NONE = 0, + G_IO_STREAM_SPLICE_CLOSE_STREAM1 = (1 << 0), + G_IO_STREAM_SPLICE_CLOSE_STREAM2 = (1 << 1), + G_IO_STREAM_SPLICE_WAIT_FOR_BOTH = (1 << 2) +} GIOStreamSpliceFlags; + +/** + * GEmblemOrigin: + * @G_EMBLEM_ORIGIN_UNKNOWN: Emblem of unknown origin + * @G_EMBLEM_ORIGIN_DEVICE: Emblem adds device-specific information + * @G_EMBLEM_ORIGIN_LIVEMETADATA: Emblem depicts live metadata, such as "readonly" + * @G_EMBLEM_ORIGIN_TAG: Emblem comes from a user-defined tag, e.g. set by nautilus (in the future) + * + * GEmblemOrigin is used to add information about the origin of the emblem + * to #GEmblem. + * + * Since: 2.18 + */ +typedef enum { + G_EMBLEM_ORIGIN_UNKNOWN, + G_EMBLEM_ORIGIN_DEVICE, + G_EMBLEM_ORIGIN_LIVEMETADATA, + G_EMBLEM_ORIGIN_TAG +} GEmblemOrigin; + +/** + * GResolverError: + * @G_RESOLVER_ERROR_NOT_FOUND: the requested name/address/service was not + * found + * @G_RESOLVER_ERROR_TEMPORARY_FAILURE: the requested information could not + * be looked up due to a network error or similar problem + * @G_RESOLVER_ERROR_INTERNAL: unknown error + * + * An error code used with %G_RESOLVER_ERROR in a #GError returned + * from a #GResolver routine. + * + * Since: 2.22 + */ +typedef enum { + G_RESOLVER_ERROR_NOT_FOUND, + G_RESOLVER_ERROR_TEMPORARY_FAILURE, + G_RESOLVER_ERROR_INTERNAL +} GResolverError; + +/** + * GResolverRecordType: + * @G_RESOLVER_RECORD_SRV: lookup DNS SRV records for a domain + * @G_RESOLVER_RECORD_MX: lookup DNS MX records for a domain + * @G_RESOLVER_RECORD_TXT: lookup DNS TXT records for a name + * @G_RESOLVER_RECORD_SOA: lookup DNS SOA records for a zone + * @G_RESOLVER_RECORD_NS: lookup DNS NS records for a domain + * + * The type of record that g_resolver_lookup_records() or + * g_resolver_lookup_records_async() should retrieve. The records are returned + * as lists of #GVariant tuples. Each record type has different values in + * the variant tuples returned. + * + * %G_RESOLVER_RECORD_SRV records are returned as variants with the signature + * '(qqqs)', containing a guint16 with the priority, a guint16 with the + * weight, a guint16 with the port, and a string of the hostname. + * + * %G_RESOLVER_RECORD_MX records are returned as variants with the signature + * '(qs)', representing a guint16 with the preference, and a string containing + * the mail exchanger hostname. + * + * %G_RESOLVER_RECORD_TXT records are returned as variants with the signature + * '(as)', representing an array of the strings in the text record. + * + * %G_RESOLVER_RECORD_SOA records are returned as variants with the signature + * '(ssuuuuu)', representing a string containing the primary name server, a + * string containing the administrator, the serial as a guint32, the refresh + * interval as guint32, the retry interval as a guint32, the expire timeout + * as a guint32, and the ttl as a guint32. + * + * %G_RESOLVER_RECORD_NS records are returned as variants with the signature + * '(s)', representing a string of the hostname of the name server. + * + * Since: 2.34 + */ +typedef enum { + G_RESOLVER_RECORD_SRV = 1, + G_RESOLVER_RECORD_MX, + G_RESOLVER_RECORD_TXT, + G_RESOLVER_RECORD_SOA, + G_RESOLVER_RECORD_NS +} GResolverRecordType; + +/** + * GResourceError: + * @G_RESOURCE_ERROR_NOT_FOUND: no file was found at the requested path + * @G_RESOURCE_ERROR_INTERNAL: unknown error + * + * An error code used with %G_RESOURCE_ERROR in a #GError returned + * from a #GResource routine. + * + * Since: 2.32 + */ +typedef enum { + G_RESOURCE_ERROR_NOT_FOUND, + G_RESOURCE_ERROR_INTERNAL +} GResourceError; + +/** + * GResourceFlags: + * @G_RESOURCE_FLAGS_NONE: No flags set. + * @G_RESOURCE_FLAGS_COMPRESSED: The file is compressed. + * + * GResourceFlags give information about a particular file inside a resource + * bundle. + * + * Since: 2.32 + **/ +typedef enum { + G_RESOURCE_FLAGS_NONE = 0, + G_RESOURCE_FLAGS_COMPRESSED = (1<<0) +} GResourceFlags; + +/** + * GResourceLookupFlags: + * @G_RESOURCE_LOOKUP_FLAGS_NONE: No flags set. + * + * GResourceLookupFlags determine how resource path lookups are handled. + * + * Since: 2.32 + **/ +typedef enum /*< flags >*/ { + G_RESOURCE_LOOKUP_FLAGS_NONE = 0 +} GResourceLookupFlags; + +/** + * GSocketFamily: + * @G_SOCKET_FAMILY_INVALID: no address family + * @G_SOCKET_FAMILY_IPV4: the IPv4 family + * @G_SOCKET_FAMILY_IPV6: the IPv6 family + * @G_SOCKET_FAMILY_UNIX: the UNIX domain family + * + * The protocol family of a #GSocketAddress. (These values are + * identical to the system defines %AF_INET, %AF_INET6 and %AF_UNIX, + * if available.) + * + * Since: 2.22 + */ +typedef enum { + G_SOCKET_FAMILY_INVALID, + G_SOCKET_FAMILY_UNIX = GLIB_SYSDEF_AF_UNIX, + G_SOCKET_FAMILY_IPV4 = GLIB_SYSDEF_AF_INET, + G_SOCKET_FAMILY_IPV6 = GLIB_SYSDEF_AF_INET6 +} GSocketFamily; + +/** + * GSocketType: + * @G_SOCKET_TYPE_INVALID: Type unknown or wrong + * @G_SOCKET_TYPE_STREAM: Reliable connection-based byte streams (e.g. TCP). + * @G_SOCKET_TYPE_DATAGRAM: Connectionless, unreliable datagram passing. + * (e.g. UDP) + * @G_SOCKET_TYPE_SEQPACKET: Reliable connection-based passing of datagrams + * of fixed maximum length (e.g. SCTP). + * + * Flags used when creating a #GSocket. Some protocols may not implement + * all the socket types. + * + * Since: 2.22 + */ +typedef enum +{ + G_SOCKET_TYPE_INVALID, + G_SOCKET_TYPE_STREAM, + G_SOCKET_TYPE_DATAGRAM, + G_SOCKET_TYPE_SEQPACKET +} GSocketType; + +/** + * GSocketMsgFlags: + * @G_SOCKET_MSG_NONE: No flags. + * @G_SOCKET_MSG_OOB: Request to send/receive out of band data. + * @G_SOCKET_MSG_PEEK: Read data from the socket without removing it from + * the queue. + * @G_SOCKET_MSG_DONTROUTE: Don't use a gateway to send out the packet, + * only send to hosts on directly connected networks. + * + * Flags used in g_socket_receive_message() and g_socket_send_message(). + * The flags listed in the enum are some commonly available flags, but the + * values used for them are the same as on the platform, and any other flags + * are passed in/out as is. So to use a platform specific flag, just include + * the right system header and pass in the flag. + * + * Since: 2.22 + */ +typedef enum /*< flags >*/ +{ + G_SOCKET_MSG_NONE, + G_SOCKET_MSG_OOB = GLIB_SYSDEF_MSG_OOB, + G_SOCKET_MSG_PEEK = GLIB_SYSDEF_MSG_PEEK, + G_SOCKET_MSG_DONTROUTE = GLIB_SYSDEF_MSG_DONTROUTE +} GSocketMsgFlags; + +/** + * GSocketProtocol: + * @G_SOCKET_PROTOCOL_UNKNOWN: The protocol type is unknown + * @G_SOCKET_PROTOCOL_DEFAULT: The default protocol for the family/type + * @G_SOCKET_PROTOCOL_TCP: TCP over IP + * @G_SOCKET_PROTOCOL_UDP: UDP over IP + * @G_SOCKET_PROTOCOL_SCTP: SCTP over IP + * + * A protocol identifier is specified when creating a #GSocket, which is a + * family/type specific identifier, where 0 means the default protocol for + * the particular family/type. + * + * This enum contains a set of commonly available and used protocols. You + * can also pass any other identifiers handled by the platform in order to + * use protocols not listed here. + * + * Since: 2.22 + */ +typedef enum { + G_SOCKET_PROTOCOL_UNKNOWN = -1, + G_SOCKET_PROTOCOL_DEFAULT = 0, + G_SOCKET_PROTOCOL_TCP = 6, + G_SOCKET_PROTOCOL_UDP = 17, + G_SOCKET_PROTOCOL_SCTP = 132 +} GSocketProtocol; + +/** + * GZlibCompressorFormat: + * @G_ZLIB_COMPRESSOR_FORMAT_ZLIB: deflate compression with zlib header + * @G_ZLIB_COMPRESSOR_FORMAT_GZIP: gzip file format + * @G_ZLIB_COMPRESSOR_FORMAT_RAW: deflate compression with no header + * + * Used to select the type of data format to use for #GZlibDecompressor + * and #GZlibCompressor. + * + * Since: 2.24 + */ +typedef enum { + G_ZLIB_COMPRESSOR_FORMAT_ZLIB, + G_ZLIB_COMPRESSOR_FORMAT_GZIP, + G_ZLIB_COMPRESSOR_FORMAT_RAW +} GZlibCompressorFormat; + +/** + * GUnixSocketAddressType: + * @G_UNIX_SOCKET_ADDRESS_INVALID: invalid + * @G_UNIX_SOCKET_ADDRESS_ANONYMOUS: anonymous + * @G_UNIX_SOCKET_ADDRESS_PATH: a filesystem path + * @G_UNIX_SOCKET_ADDRESS_ABSTRACT: an abstract name + * @G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED: an abstract name, 0-padded + * to the full length of a unix socket name + * + * The type of name used by a #GUnixSocketAddress. + * %G_UNIX_SOCKET_ADDRESS_PATH indicates a traditional unix domain + * socket bound to a filesystem path. %G_UNIX_SOCKET_ADDRESS_ANONYMOUS + * indicates a socket not bound to any name (eg, a client-side socket, + * or a socket created with socketpair()). + * + * For abstract sockets, there are two incompatible ways of naming + * them; the man pages suggest using the entire `struct sockaddr_un` + * as the name, padding the unused parts of the %sun_path field with + * zeroes; this corresponds to %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED. + * However, many programs instead just use a portion of %sun_path, and + * pass an appropriate smaller length to bind() or connect(). This is + * %G_UNIX_SOCKET_ADDRESS_ABSTRACT. + * + * Since: 2.26 + */ +typedef enum { + G_UNIX_SOCKET_ADDRESS_INVALID, + G_UNIX_SOCKET_ADDRESS_ANONYMOUS, + G_UNIX_SOCKET_ADDRESS_PATH, + G_UNIX_SOCKET_ADDRESS_ABSTRACT, + G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED +} GUnixSocketAddressType; + +/** + * GBusType: + * @G_BUS_TYPE_STARTER: An alias for the message bus that activated the process, if any. + * @G_BUS_TYPE_NONE: Not a message bus. + * @G_BUS_TYPE_SYSTEM: The system-wide message bus. + * @G_BUS_TYPE_SESSION: The login session message bus. + * + * An enumeration for well-known message buses. + * + * Since: 2.26 + */ +typedef enum +{ + G_BUS_TYPE_STARTER = -1, + G_BUS_TYPE_NONE = 0, + G_BUS_TYPE_SYSTEM = 1, + G_BUS_TYPE_SESSION = 2 +} GBusType; + +/** + * GBusNameOwnerFlags: + * @G_BUS_NAME_OWNER_FLAGS_NONE: No flags set. + * @G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT: Allow another message bus connection to claim the name. + * @G_BUS_NAME_OWNER_FLAGS_REPLACE: If another message bus connection owns the name and have + * specified #G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, then take the name from the other connection. + * @G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE: If another message bus connection owns the name, immediately + * return an error from g_bus_own_name() rather than entering the waiting queue for that name. (Since 2.54) + * + * Flags used in g_bus_own_name(). + * + * Since: 2.26 + */ +typedef enum +{ + G_BUS_NAME_OWNER_FLAGS_NONE = 0, /*< nick=none >*/ + G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT = (1<<0), /*< nick=allow-replacement >*/ + G_BUS_NAME_OWNER_FLAGS_REPLACE = (1<<1), /*< nick=replace >*/ + G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE = (1<<2) /*< nick=do-not-queue >*/ +} GBusNameOwnerFlags; +/* When adding new flags, their numeric values must currently match those + * used in the D-Bus Specification. */ + +/** + * GBusNameWatcherFlags: + * @G_BUS_NAME_WATCHER_FLAGS_NONE: No flags set. + * @G_BUS_NAME_WATCHER_FLAGS_AUTO_START: If no-one owns the name when + * beginning to watch the name, ask the bus to launch an owner for the + * name. + * + * Flags used in g_bus_watch_name(). + * + * Since: 2.26 + */ +typedef enum +{ + G_BUS_NAME_WATCHER_FLAGS_NONE = 0, + G_BUS_NAME_WATCHER_FLAGS_AUTO_START = (1<<0) +} GBusNameWatcherFlags; + +/** + * GDBusProxyFlags: + * @G_DBUS_PROXY_FLAGS_NONE: No flags set. + * @G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES: Don't load properties. + * @G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS: Don't connect to signals on the remote object. + * @G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START: If the proxy is for a well-known name, + * do not ask the bus to launch an owner during proxy initialization or a method call. + * This flag is only meaningful in proxies for well-known names. + * @G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES: If set, the property value for any __invalidated property__ will be (asynchronously) retrieved upon receiving the [`PropertiesChanged`](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties) D-Bus signal and the property will not cause emission of the #GDBusProxy::g-properties-changed signal. When the value is received the #GDBusProxy::g-properties-changed signal is emitted for the property along with the retrieved value. Since 2.32. + * @G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION: If the proxy is for a well-known name, + * do not ask the bus to launch an owner during proxy initialization, but allow it to be + * autostarted by a method call. This flag is only meaningful in proxies for well-known names, + * and only if %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is not also specified. + * + * Flags used when constructing an instance of a #GDBusProxy derived class. + * + * Since: 2.26 + */ +typedef enum +{ + G_DBUS_PROXY_FLAGS_NONE = 0, + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES = (1<<0), + G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS = (1<<1), + G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START = (1<<2), + G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES = (1<<3), + G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION = (1<<4) +} GDBusProxyFlags; + +/** + * GDBusError: + * @G_DBUS_ERROR_FAILED: + * A generic error; "something went wrong" - see the error message for + * more. + * @G_DBUS_ERROR_NO_MEMORY: + * There was not enough memory to complete an operation. + * @G_DBUS_ERROR_SERVICE_UNKNOWN: + * The bus doesn't know how to launch a service to supply the bus name + * you wanted. + * @G_DBUS_ERROR_NAME_HAS_NO_OWNER: + * The bus name you referenced doesn't exist (i.e. no application owns + * it). + * @G_DBUS_ERROR_NO_REPLY: + * No reply to a message expecting one, usually means a timeout occurred. + * @G_DBUS_ERROR_IO_ERROR: + * Something went wrong reading or writing to a socket, for example. + * @G_DBUS_ERROR_BAD_ADDRESS: + * A D-Bus bus address was malformed. + * @G_DBUS_ERROR_NOT_SUPPORTED: + * Requested operation isn't supported (like ENOSYS on UNIX). + * @G_DBUS_ERROR_LIMITS_EXCEEDED: + * Some limited resource is exhausted. + * @G_DBUS_ERROR_ACCESS_DENIED: + * Security restrictions don't allow doing what you're trying to do. + * @G_DBUS_ERROR_AUTH_FAILED: + * Authentication didn't work. + * @G_DBUS_ERROR_NO_SERVER: + * Unable to connect to server (probably caused by ECONNREFUSED on a + * socket). + * @G_DBUS_ERROR_TIMEOUT: + * Certain timeout errors, possibly ETIMEDOUT on a socket. Note that + * %G_DBUS_ERROR_NO_REPLY is used for message reply timeouts. Warning: + * this is confusingly-named given that %G_DBUS_ERROR_TIMED_OUT also + * exists. We can't fix it for compatibility reasons so just be + * careful. + * @G_DBUS_ERROR_NO_NETWORK: + * No network access (probably ENETUNREACH on a socket). + * @G_DBUS_ERROR_ADDRESS_IN_USE: + * Can't bind a socket since its address is in use (i.e. EADDRINUSE). + * @G_DBUS_ERROR_DISCONNECTED: + * The connection is disconnected and you're trying to use it. + * @G_DBUS_ERROR_INVALID_ARGS: + * Invalid arguments passed to a method call. + * @G_DBUS_ERROR_FILE_NOT_FOUND: + * Missing file. + * @G_DBUS_ERROR_FILE_EXISTS: + * Existing file and the operation you're using does not silently overwrite. + * @G_DBUS_ERROR_UNKNOWN_METHOD: + * Method name you invoked isn't known by the object you invoked it on. + * @G_DBUS_ERROR_UNKNOWN_OBJECT: + * Object you invoked a method on isn't known. Since 2.42 + * @G_DBUS_ERROR_UNKNOWN_INTERFACE: + * Interface you invoked a method on isn't known by the object. Since 2.42 + * @G_DBUS_ERROR_UNKNOWN_PROPERTY: + * Property you tried to access isn't known by the object. Since 2.42 + * @G_DBUS_ERROR_PROPERTY_READ_ONLY: + * Property you tried to set is read-only. Since 2.42 + * @G_DBUS_ERROR_TIMED_OUT: + * Certain timeout errors, e.g. while starting a service. Warning: this is + * confusingly-named given that %G_DBUS_ERROR_TIMEOUT also exists. We + * can't fix it for compatibility reasons so just be careful. + * @G_DBUS_ERROR_MATCH_RULE_NOT_FOUND: + * Tried to remove or modify a match rule that didn't exist. + * @G_DBUS_ERROR_MATCH_RULE_INVALID: + * The match rule isn't syntactically valid. + * @G_DBUS_ERROR_SPAWN_EXEC_FAILED: + * While starting a new process, the exec() call failed. + * @G_DBUS_ERROR_SPAWN_FORK_FAILED: + * While starting a new process, the fork() call failed. + * @G_DBUS_ERROR_SPAWN_CHILD_EXITED: + * While starting a new process, the child exited with a status code. + * @G_DBUS_ERROR_SPAWN_CHILD_SIGNALED: + * While starting a new process, the child exited on a signal. + * @G_DBUS_ERROR_SPAWN_FAILED: + * While starting a new process, something went wrong. + * @G_DBUS_ERROR_SPAWN_SETUP_FAILED: + * We failed to setup the environment correctly. + * @G_DBUS_ERROR_SPAWN_CONFIG_INVALID: + * We failed to setup the config parser correctly. + * @G_DBUS_ERROR_SPAWN_SERVICE_INVALID: + * Bus name was not valid. + * @G_DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND: + * Service file not found in system-services directory. + * @G_DBUS_ERROR_SPAWN_PERMISSIONS_INVALID: + * Permissions are incorrect on the setuid helper. + * @G_DBUS_ERROR_SPAWN_FILE_INVALID: + * Service file invalid (Name, User or Exec missing). + * @G_DBUS_ERROR_SPAWN_NO_MEMORY: + * Tried to get a UNIX process ID and it wasn't available. + * @G_DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN: + * Tried to get a UNIX process ID and it wasn't available. + * @G_DBUS_ERROR_INVALID_SIGNATURE: + * A type signature is not valid. + * @G_DBUS_ERROR_INVALID_FILE_CONTENT: + * A file contains invalid syntax or is otherwise broken. + * @G_DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: + * Asked for SELinux security context and it wasn't available. + * @G_DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN: + * Asked for ADT audit data and it wasn't available. + * @G_DBUS_ERROR_OBJECT_PATH_IN_USE: + * There's already an object with the requested object path. + * + * Error codes for the %G_DBUS_ERROR error domain. + * + * Since: 2.26 + */ +typedef enum +{ + /* Well-known errors in the org.freedesktop.DBus.Error namespace */ + G_DBUS_ERROR_FAILED, /* org.freedesktop.DBus.Error.Failed */ + G_DBUS_ERROR_NO_MEMORY, /* org.freedesktop.DBus.Error.NoMemory */ + G_DBUS_ERROR_SERVICE_UNKNOWN, /* org.freedesktop.DBus.Error.ServiceUnknown */ + G_DBUS_ERROR_NAME_HAS_NO_OWNER, /* org.freedesktop.DBus.Error.NameHasNoOwner */ + G_DBUS_ERROR_NO_REPLY, /* org.freedesktop.DBus.Error.NoReply */ + G_DBUS_ERROR_IO_ERROR, /* org.freedesktop.DBus.Error.IOError */ + G_DBUS_ERROR_BAD_ADDRESS, /* org.freedesktop.DBus.Error.BadAddress */ + G_DBUS_ERROR_NOT_SUPPORTED, /* org.freedesktop.DBus.Error.NotSupported */ + G_DBUS_ERROR_LIMITS_EXCEEDED, /* org.freedesktop.DBus.Error.LimitsExceeded */ + G_DBUS_ERROR_ACCESS_DENIED, /* org.freedesktop.DBus.Error.AccessDenied */ + G_DBUS_ERROR_AUTH_FAILED, /* org.freedesktop.DBus.Error.AuthFailed */ + G_DBUS_ERROR_NO_SERVER, /* org.freedesktop.DBus.Error.NoServer */ + G_DBUS_ERROR_TIMEOUT, /* org.freedesktop.DBus.Error.Timeout */ + G_DBUS_ERROR_NO_NETWORK, /* org.freedesktop.DBus.Error.NoNetwork */ + G_DBUS_ERROR_ADDRESS_IN_USE, /* org.freedesktop.DBus.Error.AddressInUse */ + G_DBUS_ERROR_DISCONNECTED, /* org.freedesktop.DBus.Error.Disconnected */ + G_DBUS_ERROR_INVALID_ARGS, /* org.freedesktop.DBus.Error.InvalidArgs */ + G_DBUS_ERROR_FILE_NOT_FOUND, /* org.freedesktop.DBus.Error.FileNotFound */ + G_DBUS_ERROR_FILE_EXISTS, /* org.freedesktop.DBus.Error.FileExists */ + G_DBUS_ERROR_UNKNOWN_METHOD, /* org.freedesktop.DBus.Error.UnknownMethod */ + G_DBUS_ERROR_TIMED_OUT, /* org.freedesktop.DBus.Error.TimedOut */ + G_DBUS_ERROR_MATCH_RULE_NOT_FOUND, /* org.freedesktop.DBus.Error.MatchRuleNotFound */ + G_DBUS_ERROR_MATCH_RULE_INVALID, /* org.freedesktop.DBus.Error.MatchRuleInvalid */ + G_DBUS_ERROR_SPAWN_EXEC_FAILED, /* org.freedesktop.DBus.Error.Spawn.ExecFailed */ + G_DBUS_ERROR_SPAWN_FORK_FAILED, /* org.freedesktop.DBus.Error.Spawn.ForkFailed */ + G_DBUS_ERROR_SPAWN_CHILD_EXITED, /* org.freedesktop.DBus.Error.Spawn.ChildExited */ + G_DBUS_ERROR_SPAWN_CHILD_SIGNALED, /* org.freedesktop.DBus.Error.Spawn.ChildSignaled */ + G_DBUS_ERROR_SPAWN_FAILED, /* org.freedesktop.DBus.Error.Spawn.Failed */ + G_DBUS_ERROR_SPAWN_SETUP_FAILED, /* org.freedesktop.DBus.Error.Spawn.FailedToSetup */ + G_DBUS_ERROR_SPAWN_CONFIG_INVALID, /* org.freedesktop.DBus.Error.Spawn.ConfigInvalid */ + G_DBUS_ERROR_SPAWN_SERVICE_INVALID, /* org.freedesktop.DBus.Error.Spawn.ServiceNotValid */ + G_DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND, /* org.freedesktop.DBus.Error.Spawn.ServiceNotFound */ + G_DBUS_ERROR_SPAWN_PERMISSIONS_INVALID, /* org.freedesktop.DBus.Error.Spawn.PermissionsInvalid */ + G_DBUS_ERROR_SPAWN_FILE_INVALID, /* org.freedesktop.DBus.Error.Spawn.FileInvalid */ + G_DBUS_ERROR_SPAWN_NO_MEMORY, /* org.freedesktop.DBus.Error.Spawn.NoMemory */ + G_DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN, /* org.freedesktop.DBus.Error.UnixProcessIdUnknown */ + G_DBUS_ERROR_INVALID_SIGNATURE, /* org.freedesktop.DBus.Error.InvalidSignature */ + G_DBUS_ERROR_INVALID_FILE_CONTENT, /* org.freedesktop.DBus.Error.InvalidFileContent */ + G_DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN, /* org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown */ + G_DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN, /* org.freedesktop.DBus.Error.AdtAuditDataUnknown */ + G_DBUS_ERROR_OBJECT_PATH_IN_USE, /* org.freedesktop.DBus.Error.ObjectPathInUse */ + G_DBUS_ERROR_UNKNOWN_OBJECT, /* org.freedesktop.DBus.Error.UnknownObject */ + G_DBUS_ERROR_UNKNOWN_INTERFACE, /* org.freedesktop.DBus.Error.UnknownInterface */ + G_DBUS_ERROR_UNKNOWN_PROPERTY, /* org.freedesktop.DBus.Error.UnknownProperty */ + G_DBUS_ERROR_PROPERTY_READ_ONLY /* org.freedesktop.DBus.Error.PropertyReadOnly */ +} GDBusError; +/* Remember to update g_dbus_error_quark() in gdbuserror.c if you extend this enumeration */ + +/** + * GDBusConnectionFlags: + * @G_DBUS_CONNECTION_FLAGS_NONE: No flags set. + * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT: Perform authentication against server. + * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER: Perform authentication against client. + * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: When + * authenticating as a server, allow the anonymous authentication + * method. + * @G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION: Pass this flag if connecting to a peer that is a + * message bus. This means that the Hello() method will be invoked as part of the connection setup. + * @G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING: If set, processing of D-Bus messages is + * delayed until g_dbus_connection_start_message_processing() is called. + * + * Flags used when creating a new #GDBusConnection. + * + * Since: 2.26 + */ +typedef enum { + G_DBUS_CONNECTION_FLAGS_NONE = 0, + G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT = (1<<0), + G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER = (1<<1), + G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS = (1<<2), + G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION = (1<<3), + G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING = (1<<4) +} GDBusConnectionFlags; + +/** + * GDBusCapabilityFlags: + * @G_DBUS_CAPABILITY_FLAGS_NONE: No flags set. + * @G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING: The connection + * supports exchanging UNIX file descriptors with the remote peer. + * + * Capabilities negotiated with the remote peer. + * + * Since: 2.26 + */ +typedef enum { + G_DBUS_CAPABILITY_FLAGS_NONE = 0, + G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING = (1<<0) +} GDBusCapabilityFlags; + +/** + * GDBusCallFlags: + * @G_DBUS_CALL_FLAGS_NONE: No flags set. + * @G_DBUS_CALL_FLAGS_NO_AUTO_START: The bus must not launch + * an owner for the destination name in response to this method + * invocation. + * @G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION: the caller is prepared to + * wait for interactive authorization. Since 2.46. + * + * Flags used in g_dbus_connection_call() and similar APIs. + * + * Since: 2.26 + */ +typedef enum { + G_DBUS_CALL_FLAGS_NONE = 0, + G_DBUS_CALL_FLAGS_NO_AUTO_START = (1<<0), + G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION = (1<<1) +} GDBusCallFlags; +/* (1<<31) is reserved for internal use by GDBusConnection, do not use it. */ + +/** + * GDBusMessageType: + * @G_DBUS_MESSAGE_TYPE_INVALID: Message is of invalid type. + * @G_DBUS_MESSAGE_TYPE_METHOD_CALL: Method call. + * @G_DBUS_MESSAGE_TYPE_METHOD_RETURN: Method reply. + * @G_DBUS_MESSAGE_TYPE_ERROR: Error reply. + * @G_DBUS_MESSAGE_TYPE_SIGNAL: Signal emission. + * + * Message types used in #GDBusMessage. + * + * Since: 2.26 + */ +typedef enum { + G_DBUS_MESSAGE_TYPE_INVALID, + G_DBUS_MESSAGE_TYPE_METHOD_CALL, + G_DBUS_MESSAGE_TYPE_METHOD_RETURN, + G_DBUS_MESSAGE_TYPE_ERROR, + G_DBUS_MESSAGE_TYPE_SIGNAL +} GDBusMessageType; + +/** + * GDBusMessageFlags: + * @G_DBUS_MESSAGE_FLAGS_NONE: No flags set. + * @G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED: A reply is not expected. + * @G_DBUS_MESSAGE_FLAGS_NO_AUTO_START: The bus must not launch an + * owner for the destination name in response to this message. + * @G_DBUS_MESSAGE_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION: If set on a method + * call, this flag means that the caller is prepared to wait for interactive + * authorization. Since 2.46. + * + * Message flags used in #GDBusMessage. + * + * Since: 2.26 + */ +typedef enum { + G_DBUS_MESSAGE_FLAGS_NONE = 0, + G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED = (1<<0), + G_DBUS_MESSAGE_FLAGS_NO_AUTO_START = (1<<1), + G_DBUS_MESSAGE_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION = (1<<2) +} GDBusMessageFlags; + +/** + * GDBusMessageHeaderField: + * @G_DBUS_MESSAGE_HEADER_FIELD_INVALID: Not a valid header field. + * @G_DBUS_MESSAGE_HEADER_FIELD_PATH: The object path. + * @G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE: The interface name. + * @G_DBUS_MESSAGE_HEADER_FIELD_MEMBER: The method or signal name. + * @G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME: The name of the error that occurred. + * @G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL: The serial number the message is a reply to. + * @G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION: The name the message is intended for. + * @G_DBUS_MESSAGE_HEADER_FIELD_SENDER: Unique name of the sender of the message (filled in by the bus). + * @G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE: The signature of the message body. + * @G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS: The number of UNIX file descriptors that accompany the message. + * + * Header fields used in #GDBusMessage. + * + * Since: 2.26 + */ +typedef enum { + G_DBUS_MESSAGE_HEADER_FIELD_INVALID, + G_DBUS_MESSAGE_HEADER_FIELD_PATH, + G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE, + G_DBUS_MESSAGE_HEADER_FIELD_MEMBER, + G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME, + G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL, + G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION, + G_DBUS_MESSAGE_HEADER_FIELD_SENDER, + G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE, + G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS +} GDBusMessageHeaderField; + +/** + * GDBusPropertyInfoFlags: + * @G_DBUS_PROPERTY_INFO_FLAGS_NONE: No flags set. + * @G_DBUS_PROPERTY_INFO_FLAGS_READABLE: Property is readable. + * @G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE: Property is writable. + * + * Flags describing the access control of a D-Bus property. + * + * Since: 2.26 + */ +typedef enum +{ + G_DBUS_PROPERTY_INFO_FLAGS_NONE = 0, + G_DBUS_PROPERTY_INFO_FLAGS_READABLE = (1<<0), + G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE = (1<<1) +} GDBusPropertyInfoFlags; + +/** + * GDBusSubtreeFlags: + * @G_DBUS_SUBTREE_FLAGS_NONE: No flags set. + * @G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES: Method calls to objects not in the enumerated range + * will still be dispatched. This is useful if you want + * to dynamically spawn objects in the subtree. + * + * Flags passed to g_dbus_connection_register_subtree(). + * + * Since: 2.26 + */ +typedef enum +{ + G_DBUS_SUBTREE_FLAGS_NONE = 0, + G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES = (1<<0) +} GDBusSubtreeFlags; + +/** + * GDBusServerFlags: + * @G_DBUS_SERVER_FLAGS_NONE: No flags set. + * @G_DBUS_SERVER_FLAGS_RUN_IN_THREAD: All #GDBusServer::new-connection + * signals will run in separated dedicated threads (see signal for + * details). + * @G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: Allow the anonymous + * authentication method. + * + * Flags used when creating a #GDBusServer. + * + * Since: 2.26 + */ +typedef enum +{ + G_DBUS_SERVER_FLAGS_NONE = 0, + G_DBUS_SERVER_FLAGS_RUN_IN_THREAD = (1<<0), + G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS = (1<<1) +} GDBusServerFlags; + +/** + * GDBusSignalFlags: + * @G_DBUS_SIGNAL_FLAGS_NONE: No flags set. + * @G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE: Don't actually send the AddMatch + * D-Bus call for this signal subscription. This gives you more control + * over which match rules you add (but you must add them manually). + * @G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE: Match first arguments that + * contain a bus or interface name with the given namespace. + * @G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH: Match first arguments that + * contain an object path that is either equivalent to the given path, + * or one of the paths is a subpath of the other. + * + * Flags used when subscribing to signals via g_dbus_connection_signal_subscribe(). + * + * Since: 2.26 + */ +typedef enum /*< flags >*/ +{ + G_DBUS_SIGNAL_FLAGS_NONE = 0, + G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE = (1<<0), + G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE = (1<<1), + G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH = (1<<2) +} GDBusSignalFlags; + +/** + * GDBusSendMessageFlags: + * @G_DBUS_SEND_MESSAGE_FLAGS_NONE: No flags set. + * @G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL: Do not automatically + * assign a serial number from the #GDBusConnection object when + * sending a message. + * + * Flags used when sending #GDBusMessages on a #GDBusConnection. + * + * Since: 2.26 + */ +typedef enum +{ + G_DBUS_SEND_MESSAGE_FLAGS_NONE = 0, + G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL = (1<<0) +} GDBusSendMessageFlags; +/* (1<<31) is reserved for internal use by GDBusConnection, do not use it. */ + +/** + * GCredentialsType: + * @G_CREDENTIALS_TYPE_INVALID: Indicates an invalid native credential type. + * @G_CREDENTIALS_TYPE_LINUX_UCRED: The native credentials type is a struct ucred. + * @G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED: The native credentials type is a struct cmsgcred. + * @G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED: The native credentials type is a struct sockpeercred. Added in 2.30. + * @G_CREDENTIALS_TYPE_SOLARIS_UCRED: The native credentials type is a ucred_t. Added in 2.40. + * @G_CREDENTIALS_TYPE_NETBSD_UNPCBID: The native credentials type is a struct unpcbid. + * + * Enumeration describing different kinds of native credential types. + * + * Since: 2.26 + */ +typedef enum +{ + G_CREDENTIALS_TYPE_INVALID, + G_CREDENTIALS_TYPE_LINUX_UCRED, + G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED, + G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED, + G_CREDENTIALS_TYPE_SOLARIS_UCRED, + G_CREDENTIALS_TYPE_NETBSD_UNPCBID +} GCredentialsType; + +/** + * GDBusMessageByteOrder: + * @G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN: The byte order is big endian. + * @G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN: The byte order is little endian. + * + * Enumeration used to describe the byte order of a D-Bus message. + * + * Since: 2.26 + */ +typedef enum +{ + G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN = 'B', + G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN = 'l' +} GDBusMessageByteOrder; + +/** + * GApplicationFlags: + * @G_APPLICATION_FLAGS_NONE: Default + * @G_APPLICATION_IS_SERVICE: Run as a service. In this mode, registration + * fails if the service is already running, and the application + * will initially wait up to 10 seconds for an initial activation + * message to arrive. + * @G_APPLICATION_IS_LAUNCHER: Don't try to become the primary instance. + * @G_APPLICATION_HANDLES_OPEN: This application handles opening files (in + * the primary instance). Note that this flag only affects the default + * implementation of local_command_line(), and has no effect if + * %G_APPLICATION_HANDLES_COMMAND_LINE is given. + * See g_application_run() for details. + * @G_APPLICATION_HANDLES_COMMAND_LINE: This application handles command line + * arguments (in the primary instance). Note that this flag only affect + * the default implementation of local_command_line(). + * See g_application_run() for details. + * @G_APPLICATION_SEND_ENVIRONMENT: Send the environment of the + * launching process to the primary instance. Set this flag if your + * application is expected to behave differently depending on certain + * environment variables. For instance, an editor might be expected + * to use the `GIT_COMMITTER_NAME` environment variable + * when editing a git commit message. The environment is available + * to the #GApplication::command-line signal handler, via + * g_application_command_line_getenv(). + * @G_APPLICATION_NON_UNIQUE: Make no attempts to do any of the typical + * single-instance application negotiation, even if the application + * ID is given. The application neither attempts to become the + * owner of the application ID nor does it check if an existing + * owner already exists. Everything occurs in the local process. + * Since: 2.30. + * @G_APPLICATION_CAN_OVERRIDE_APP_ID: Allow users to override the + * application ID from the command line with `--gapplication-app-id`. + * Since: 2.48 + * + * Flags used to define the behaviour of a #GApplication. + * + * Since: 2.28 + **/ +typedef enum +{ + G_APPLICATION_FLAGS_NONE, + G_APPLICATION_IS_SERVICE = (1 << 0), + G_APPLICATION_IS_LAUNCHER = (1 << 1), + + G_APPLICATION_HANDLES_OPEN = (1 << 2), + G_APPLICATION_HANDLES_COMMAND_LINE = (1 << 3), + G_APPLICATION_SEND_ENVIRONMENT = (1 << 4), + + G_APPLICATION_NON_UNIQUE = (1 << 5), + + G_APPLICATION_CAN_OVERRIDE_APP_ID = (1 << 6) +} GApplicationFlags; + +/** + * GTlsError: + * @G_TLS_ERROR_UNAVAILABLE: No TLS provider is available + * @G_TLS_ERROR_MISC: Miscellaneous TLS error + * @G_TLS_ERROR_BAD_CERTIFICATE: A certificate could not be parsed + * @G_TLS_ERROR_NOT_TLS: The TLS handshake failed because the + * peer does not seem to be a TLS server. + * @G_TLS_ERROR_HANDSHAKE: The TLS handshake failed because the + * peer's certificate was not acceptable. + * @G_TLS_ERROR_CERTIFICATE_REQUIRED: The TLS handshake failed because + * the server requested a client-side certificate, but none was + * provided. See g_tls_connection_set_certificate(). + * @G_TLS_ERROR_EOF: The TLS connection was closed without proper + * notice, which may indicate an attack. See + * g_tls_connection_set_require_close_notify(). + * + * An error code used with %G_TLS_ERROR in a #GError returned from a + * TLS-related routine. + * + * Since: 2.28 + */ +typedef enum { + G_TLS_ERROR_UNAVAILABLE, + G_TLS_ERROR_MISC, + G_TLS_ERROR_BAD_CERTIFICATE, + G_TLS_ERROR_NOT_TLS, + G_TLS_ERROR_HANDSHAKE, + G_TLS_ERROR_CERTIFICATE_REQUIRED, + G_TLS_ERROR_EOF +} GTlsError; + +/** + * GTlsCertificateFlags: + * @G_TLS_CERTIFICATE_UNKNOWN_CA: The signing certificate authority is + * not known. + * @G_TLS_CERTIFICATE_BAD_IDENTITY: The certificate does not match the + * expected identity of the site that it was retrieved from. + * @G_TLS_CERTIFICATE_NOT_ACTIVATED: The certificate's activation time + * is still in the future + * @G_TLS_CERTIFICATE_EXPIRED: The certificate has expired + * @G_TLS_CERTIFICATE_REVOKED: The certificate has been revoked + * according to the #GTlsConnection's certificate revocation list. + * @G_TLS_CERTIFICATE_INSECURE: The certificate's algorithm is + * considered insecure. + * @G_TLS_CERTIFICATE_GENERIC_ERROR: Some other error occurred validating + * the certificate + * @G_TLS_CERTIFICATE_VALIDATE_ALL: the combination of all of the above + * flags + * + * A set of flags describing TLS certification validation. This can be + * used to set which validation steps to perform (eg, with + * g_tls_client_connection_set_validation_flags()), or to describe why + * a particular certificate was rejected (eg, in + * #GTlsConnection::accept-certificate). + * + * Since: 2.28 + */ +typedef enum { + G_TLS_CERTIFICATE_UNKNOWN_CA = (1 << 0), + G_TLS_CERTIFICATE_BAD_IDENTITY = (1 << 1), + G_TLS_CERTIFICATE_NOT_ACTIVATED = (1 << 2), + G_TLS_CERTIFICATE_EXPIRED = (1 << 3), + G_TLS_CERTIFICATE_REVOKED = (1 << 4), + G_TLS_CERTIFICATE_INSECURE = (1 << 5), + G_TLS_CERTIFICATE_GENERIC_ERROR = (1 << 6), + + G_TLS_CERTIFICATE_VALIDATE_ALL = 0x007f +} GTlsCertificateFlags; + +/** + * GTlsAuthenticationMode: + * @G_TLS_AUTHENTICATION_NONE: client authentication not required + * @G_TLS_AUTHENTICATION_REQUESTED: client authentication is requested + * @G_TLS_AUTHENTICATION_REQUIRED: client authentication is required + * + * The client authentication mode for a #GTlsServerConnection. + * + * Since: 2.28 + */ +typedef enum { + G_TLS_AUTHENTICATION_NONE, + G_TLS_AUTHENTICATION_REQUESTED, + G_TLS_AUTHENTICATION_REQUIRED +} GTlsAuthenticationMode; + +/** + * GTlsRehandshakeMode: + * @G_TLS_REHANDSHAKE_NEVER: Never allow rehandshaking + * @G_TLS_REHANDSHAKE_SAFELY: Allow safe rehandshaking only + * @G_TLS_REHANDSHAKE_UNSAFELY: Allow unsafe rehandshaking + * + * When to allow rehandshaking. See + * g_tls_connection_set_rehandshake_mode(). + * + * Since: 2.28 + */ +typedef enum { + G_TLS_REHANDSHAKE_NEVER, + G_TLS_REHANDSHAKE_SAFELY, + G_TLS_REHANDSHAKE_UNSAFELY +} GTlsRehandshakeMode; + +/** + * GTlsPasswordFlags: + * @G_TLS_PASSWORD_NONE: No flags + * @G_TLS_PASSWORD_RETRY: The password was wrong, and the user should retry. + * @G_TLS_PASSWORD_MANY_TRIES: Hint to the user that the password has been + * wrong many times, and the user may not have many chances left. + * @G_TLS_PASSWORD_FINAL_TRY: Hint to the user that this is the last try to get + * this password right. + * + * Various flags for the password. + * + * Since: 2.30 + */ + +typedef enum _GTlsPasswordFlags +{ + G_TLS_PASSWORD_NONE = 0, + G_TLS_PASSWORD_RETRY = 1 << 1, + G_TLS_PASSWORD_MANY_TRIES = 1 << 2, + G_TLS_PASSWORD_FINAL_TRY = 1 << 3 +} GTlsPasswordFlags; + +/** + * GTlsInteractionResult: + * @G_TLS_INTERACTION_UNHANDLED: The interaction was unhandled (i.e. not + * implemented). + * @G_TLS_INTERACTION_HANDLED: The interaction completed, and resulting data + * is available. + * @G_TLS_INTERACTION_FAILED: The interaction has failed, or was cancelled. + * and the operation should be aborted. + * + * #GTlsInteractionResult is returned by various functions in #GTlsInteraction + * when finishing an interaction request. + * + * Since: 2.30 + */ +typedef enum { + G_TLS_INTERACTION_UNHANDLED, + G_TLS_INTERACTION_HANDLED, + G_TLS_INTERACTION_FAILED +} GTlsInteractionResult; + +/** + * GDBusInterfaceSkeletonFlags: + * @G_DBUS_INTERFACE_SKELETON_FLAGS_NONE: No flags set. + * @G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD: Each method invocation is handled in + * a thread dedicated to the invocation. This means that the method implementation can use blocking IO + * without blocking any other part of the process. It also means that the method implementation must + * use locking to access data structures used by other threads. + * + * Flags describing the behavior of a #GDBusInterfaceSkeleton instance. + * + * Since: 2.30 + */ +typedef enum +{ + G_DBUS_INTERFACE_SKELETON_FLAGS_NONE = 0, + G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD = (1<<0) +} GDBusInterfaceSkeletonFlags; + +/** + * GDBusObjectManagerClientFlags: + * @G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE: No flags set. + * @G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START: If not set and the + * manager is for a well-known name, then request the bus to launch + * an owner for the name if no-one owns the name. This flag can only + * be used in managers for well-known names. + * + * Flags used when constructing a #GDBusObjectManagerClient. + * + * Since: 2.30 + */ +typedef enum +{ + G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE = 0, + G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START = (1<<0) +} GDBusObjectManagerClientFlags; + +/** + * GTlsDatabaseVerifyFlags: + * @G_TLS_DATABASE_VERIFY_NONE: No verification flags + * + * Flags for g_tls_database_verify_chain(). + * + * Since: 2.30 + */ +typedef enum /*< flags >*/ { + G_TLS_DATABASE_VERIFY_NONE = 0 +} GTlsDatabaseVerifyFlags; + +/** + * GTlsDatabaseLookupFlags: + * @G_TLS_DATABASE_LOOKUP_NONE: No lookup flags + * @G_TLS_DATABASE_LOOKUP_KEYPAIR: Restrict lookup to certificates that have + * a private key. + * + * Flags for g_tls_database_lookup_certificate_for_handle(), + * g_tls_database_lookup_certificate_issuer(), + * and g_tls_database_lookup_certificates_issued_by(). + * + * Since: 2.30 + */ +typedef enum { + G_TLS_DATABASE_LOOKUP_NONE = 0, + G_TLS_DATABASE_LOOKUP_KEYPAIR = 1 +} GTlsDatabaseLookupFlags; + +/** + * GTlsCertificateRequestFlags: + * @G_TLS_CERTIFICATE_REQUEST_NONE: No flags + * + * Flags for g_tls_interaction_request_certificate(), + * g_tls_interaction_request_certificate_async(), and + * g_tls_interaction_invoke_request_certificate(). + * + * Since: 2.40 + */ +typedef enum { + G_TLS_CERTIFICATE_REQUEST_NONE = 0 +} GTlsCertificateRequestFlags; + +/** + * GIOModuleScopeFlags: + * @G_IO_MODULE_SCOPE_NONE: No module scan flags + * @G_IO_MODULE_SCOPE_BLOCK_DUPLICATES: When using this scope to load or + * scan modules, automatically block a modules which has the same base + * basename as previously loaded module. + * + * Flags for use with g_io_module_scope_new(). + * + * Since: 2.30 + */ +typedef enum { + G_IO_MODULE_SCOPE_NONE, + G_IO_MODULE_SCOPE_BLOCK_DUPLICATES +} GIOModuleScopeFlags; + +/** + * GSocketClientEvent: + * @G_SOCKET_CLIENT_RESOLVING: The client is doing a DNS lookup. + * @G_SOCKET_CLIENT_RESOLVED: The client has completed a DNS lookup. + * @G_SOCKET_CLIENT_CONNECTING: The client is connecting to a remote + * host (either a proxy or the destination server). + * @G_SOCKET_CLIENT_CONNECTED: The client has connected to a remote + * host. + * @G_SOCKET_CLIENT_PROXY_NEGOTIATING: The client is negotiating + * with a proxy to connect to the destination server. + * @G_SOCKET_CLIENT_PROXY_NEGOTIATED: The client has negotiated + * with the proxy server. + * @G_SOCKET_CLIENT_TLS_HANDSHAKING: The client is performing a + * TLS handshake. + * @G_SOCKET_CLIENT_TLS_HANDSHAKED: The client has performed a + * TLS handshake. + * @G_SOCKET_CLIENT_COMPLETE: The client is done with a particular + * #GSocketConnectable. + * + * Describes an event occurring on a #GSocketClient. See the + * #GSocketClient::event signal for more details. + * + * Additional values may be added to this type in the future. + * + * Since: 2.32 + */ +typedef enum { + G_SOCKET_CLIENT_RESOLVING, + G_SOCKET_CLIENT_RESOLVED, + G_SOCKET_CLIENT_CONNECTING, + G_SOCKET_CLIENT_CONNECTED, + G_SOCKET_CLIENT_PROXY_NEGOTIATING, + G_SOCKET_CLIENT_PROXY_NEGOTIATED, + G_SOCKET_CLIENT_TLS_HANDSHAKING, + G_SOCKET_CLIENT_TLS_HANDSHAKED, + G_SOCKET_CLIENT_COMPLETE +} GSocketClientEvent; + +/** + * GSocketListenerEvent: + * @G_SOCKET_LISTENER_BINDING: The listener is about to bind a socket. + * @G_SOCKET_LISTENER_BOUND: The listener has bound a socket. + * @G_SOCKET_LISTENER_LISTENING: The listener is about to start + * listening on this socket. + * @G_SOCKET_LISTENER_LISTENED: The listener is now listening on + * this socket. + * + * Describes an event occurring on a #GSocketListener. See the + * #GSocketListener::event signal for more details. + * + * Additional values may be added to this type in the future. + * + * Since: 2.46 + */ +typedef enum { + G_SOCKET_LISTENER_BINDING, + G_SOCKET_LISTENER_BOUND, + G_SOCKET_LISTENER_LISTENING, + G_SOCKET_LISTENER_LISTENED +} GSocketListenerEvent; + +/** + * GTestDBusFlags: + * @G_TEST_DBUS_NONE: No flags. + * + * Flags to define future #GTestDBus behaviour. + * + * Since: 2.34 + */ +typedef enum /*< flags >*/ { + G_TEST_DBUS_NONE = 0 +} GTestDBusFlags; + +/** + * GSubprocessFlags: + * @G_SUBPROCESS_FLAGS_NONE: No flags. + * @G_SUBPROCESS_FLAGS_STDIN_PIPE: create a pipe for the stdin of the + * spawned process that can be accessed with + * g_subprocess_get_stdin_pipe(). + * @G_SUBPROCESS_FLAGS_STDIN_INHERIT: stdin is inherited from the + * calling process. + * @G_SUBPROCESS_FLAGS_STDOUT_PIPE: create a pipe for the stdout of the + * spawned process that can be accessed with + * g_subprocess_get_stdout_pipe(). + * @G_SUBPROCESS_FLAGS_STDOUT_SILENCE: silence the stdout of the spawned + * process (ie: redirect to `/dev/null`). + * @G_SUBPROCESS_FLAGS_STDERR_PIPE: create a pipe for the stderr of the + * spawned process that can be accessed with + * g_subprocess_get_stderr_pipe(). + * @G_SUBPROCESS_FLAGS_STDERR_SILENCE: silence the stderr of the spawned + * process (ie: redirect to `/dev/null`). + * @G_SUBPROCESS_FLAGS_STDERR_MERGE: merge the stderr of the spawned + * process with whatever the stdout happens to be. This is a good way + * of directing both streams to a common log file, for example. + * @G_SUBPROCESS_FLAGS_INHERIT_FDS: spawned processes will inherit the + * file descriptors of their parent, unless those descriptors have + * been explicitly marked as close-on-exec. This flag has no effect + * over the "standard" file descriptors (stdin, stdout, stderr). + * + * Flags to define the behaviour of a #GSubprocess. + * + * Note that the default for stdin is to redirect from `/dev/null`. For + * stdout and stderr the default are for them to inherit the + * corresponding descriptor from the calling process. + * + * Note that it is a programmer error to mix 'incompatible' flags. For + * example, you may not request both %G_SUBPROCESS_FLAGS_STDOUT_PIPE and + * %G_SUBPROCESS_FLAGS_STDOUT_SILENCE. + * + * Since: 2.40 + **/ +typedef enum { + G_SUBPROCESS_FLAGS_NONE = 0, + G_SUBPROCESS_FLAGS_STDIN_PIPE = (1u << 0), + G_SUBPROCESS_FLAGS_STDIN_INHERIT = (1u << 1), + G_SUBPROCESS_FLAGS_STDOUT_PIPE = (1u << 2), + G_SUBPROCESS_FLAGS_STDOUT_SILENCE = (1u << 3), + G_SUBPROCESS_FLAGS_STDERR_PIPE = (1u << 4), + G_SUBPROCESS_FLAGS_STDERR_SILENCE = (1u << 5), + G_SUBPROCESS_FLAGS_STDERR_MERGE = (1u << 6), + G_SUBPROCESS_FLAGS_INHERIT_FDS = (1u << 7) +} GSubprocessFlags; + +/** + * GNotificationPriority: + * @G_NOTIFICATION_PRIORITY_LOW: for notifications that do not require + * immediate attention - typically used for contextual background + * information, such as contact birthdays or local weather + * @G_NOTIFICATION_PRIORITY_NORMAL: the default priority, to be used for the + * majority of notifications (for example email messages, software updates, + * completed download/sync operations) + * @G_NOTIFICATION_PRIORITY_HIGH: for events that require more attention, + * usually because responses are time-sensitive (for example chat and SMS + * messages or alarms) + * @G_NOTIFICATION_PRIORITY_URGENT: for urgent notifications, or notifications + * that require a response in a short space of time (for example phone calls + * or emergency warnings) + * + * Priority levels for #GNotifications. + * + * Since: 2.42 + */ +typedef enum { + G_NOTIFICATION_PRIORITY_NORMAL, + G_NOTIFICATION_PRIORITY_LOW, + G_NOTIFICATION_PRIORITY_HIGH, + G_NOTIFICATION_PRIORITY_URGENT +} GNotificationPriority; + +/** + * GNetworkConnectivity: + * @G_NETWORK_CONNECTIVITY_LOCAL: The host is not configured with a + * route to the Internet; it may or may not be connected to a local + * network. + * @G_NETWORK_CONNECTIVITY_LIMITED: The host is connected to a network, but + * does not appear to be able to reach the full Internet, perhaps + * due to upstream network problems. + * @G_NETWORK_CONNECTIVITY_PORTAL: The host is behind a captive portal and + * cannot reach the full Internet. + * @G_NETWORK_CONNECTIVITY_FULL: The host is connected to a network, and + * appears to be able to reach the full Internet. + * + * The host's network connectivity state, as reported by #GNetworkMonitor. + * + * Since: 2.44 + */ +typedef enum { + G_NETWORK_CONNECTIVITY_LOCAL = 1, + G_NETWORK_CONNECTIVITY_LIMITED = 2, + G_NETWORK_CONNECTIVITY_PORTAL = 3, + G_NETWORK_CONNECTIVITY_FULL = 4 +} GNetworkConnectivity; + +G_END_DECLS + +#endif /* __GIO_ENUMS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gioenumtypes.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gioenumtypes.h new file mode 100755 index 00000000..811c00a8 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gioenumtypes.h @@ -0,0 +1,171 @@ + +/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */ + +#ifndef __GIO_ENUM_TYPES_H__ +#define __GIO_ENUM_TYPES_H__ + +#include <glib-object.h> + +G_BEGIN_DECLS + +/* enumerations from "gioenums.h" */ +GLIB_AVAILABLE_IN_ALL GType g_app_info_create_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_APP_INFO_CREATE_FLAGS (g_app_info_create_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_converter_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_CONVERTER_FLAGS (g_converter_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_converter_result_get_type (void) G_GNUC_CONST; +#define G_TYPE_CONVERTER_RESULT (g_converter_result_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_data_stream_byte_order_get_type (void) G_GNUC_CONST; +#define G_TYPE_DATA_STREAM_BYTE_ORDER (g_data_stream_byte_order_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_data_stream_newline_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_DATA_STREAM_NEWLINE_TYPE (g_data_stream_newline_type_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_file_attribute_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_ATTRIBUTE_TYPE (g_file_attribute_type_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_file_attribute_info_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_ATTRIBUTE_INFO_FLAGS (g_file_attribute_info_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_file_attribute_status_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_ATTRIBUTE_STATUS (g_file_attribute_status_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_file_query_info_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_QUERY_INFO_FLAGS (g_file_query_info_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_file_create_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_CREATE_FLAGS (g_file_create_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_file_measure_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_MEASURE_FLAGS (g_file_measure_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_mount_mount_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_MOUNT_MOUNT_FLAGS (g_mount_mount_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_mount_unmount_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_MOUNT_UNMOUNT_FLAGS (g_mount_unmount_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_drive_start_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DRIVE_START_FLAGS (g_drive_start_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_drive_start_stop_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_DRIVE_START_STOP_TYPE (g_drive_start_stop_type_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_file_copy_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_COPY_FLAGS (g_file_copy_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_file_monitor_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_MONITOR_FLAGS (g_file_monitor_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_file_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_TYPE (g_file_type_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_filesystem_preview_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILESYSTEM_PREVIEW_TYPE (g_filesystem_preview_type_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_file_monitor_event_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_MONITOR_EVENT (g_file_monitor_event_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_io_error_enum_get_type (void) G_GNUC_CONST; +#define G_TYPE_IO_ERROR_ENUM (g_io_error_enum_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_ask_password_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_ASK_PASSWORD_FLAGS (g_ask_password_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_password_save_get_type (void) G_GNUC_CONST; +#define G_TYPE_PASSWORD_SAVE (g_password_save_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_mount_operation_result_get_type (void) G_GNUC_CONST; +#define G_TYPE_MOUNT_OPERATION_RESULT (g_mount_operation_result_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_output_stream_splice_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_OUTPUT_STREAM_SPLICE_FLAGS (g_output_stream_splice_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_io_stream_splice_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_IO_STREAM_SPLICE_FLAGS (g_io_stream_splice_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_emblem_origin_get_type (void) G_GNUC_CONST; +#define G_TYPE_EMBLEM_ORIGIN (g_emblem_origin_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_resolver_error_get_type (void) G_GNUC_CONST; +#define G_TYPE_RESOLVER_ERROR (g_resolver_error_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_resolver_record_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_RESOLVER_RECORD_TYPE (g_resolver_record_type_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_resource_error_get_type (void) G_GNUC_CONST; +#define G_TYPE_RESOURCE_ERROR (g_resource_error_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_resource_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_RESOURCE_FLAGS (g_resource_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_resource_lookup_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_RESOURCE_LOOKUP_FLAGS (g_resource_lookup_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_socket_family_get_type (void) G_GNUC_CONST; +#define G_TYPE_SOCKET_FAMILY (g_socket_family_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_socket_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_SOCKET_TYPE (g_socket_type_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_socket_msg_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_SOCKET_MSG_FLAGS (g_socket_msg_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_socket_protocol_get_type (void) G_GNUC_CONST; +#define G_TYPE_SOCKET_PROTOCOL (g_socket_protocol_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_zlib_compressor_format_get_type (void) G_GNUC_CONST; +#define G_TYPE_ZLIB_COMPRESSOR_FORMAT (g_zlib_compressor_format_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_unix_socket_address_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_UNIX_SOCKET_ADDRESS_TYPE (g_unix_socket_address_type_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_bus_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_BUS_TYPE (g_bus_type_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_bus_name_owner_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_BUS_NAME_OWNER_FLAGS (g_bus_name_owner_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_bus_name_watcher_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_BUS_NAME_WATCHER_FLAGS (g_bus_name_watcher_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_dbus_proxy_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_PROXY_FLAGS (g_dbus_proxy_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_dbus_error_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_ERROR (g_dbus_error_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_dbus_connection_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_CONNECTION_FLAGS (g_dbus_connection_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_dbus_capability_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_CAPABILITY_FLAGS (g_dbus_capability_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_dbus_call_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_CALL_FLAGS (g_dbus_call_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_dbus_message_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_MESSAGE_TYPE (g_dbus_message_type_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_dbus_message_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_MESSAGE_FLAGS (g_dbus_message_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_dbus_message_header_field_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_MESSAGE_HEADER_FIELD (g_dbus_message_header_field_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_dbus_property_info_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_PROPERTY_INFO_FLAGS (g_dbus_property_info_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_dbus_subtree_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_SUBTREE_FLAGS (g_dbus_subtree_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_dbus_server_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_SERVER_FLAGS (g_dbus_server_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_dbus_signal_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_SIGNAL_FLAGS (g_dbus_signal_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_dbus_send_message_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_SEND_MESSAGE_FLAGS (g_dbus_send_message_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_credentials_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_CREDENTIALS_TYPE (g_credentials_type_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_dbus_message_byte_order_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_MESSAGE_BYTE_ORDER (g_dbus_message_byte_order_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_application_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_APPLICATION_FLAGS (g_application_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_tls_error_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_ERROR (g_tls_error_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_tls_certificate_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_CERTIFICATE_FLAGS (g_tls_certificate_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_tls_authentication_mode_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_AUTHENTICATION_MODE (g_tls_authentication_mode_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_tls_rehandshake_mode_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_REHANDSHAKE_MODE (g_tls_rehandshake_mode_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_tls_password_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_PASSWORD_FLAGS (g_tls_password_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_tls_interaction_result_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_INTERACTION_RESULT (g_tls_interaction_result_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_dbus_interface_skeleton_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_INTERFACE_SKELETON_FLAGS (g_dbus_interface_skeleton_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_dbus_object_manager_client_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_OBJECT_MANAGER_CLIENT_FLAGS (g_dbus_object_manager_client_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_tls_database_verify_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_DATABASE_VERIFY_FLAGS (g_tls_database_verify_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_tls_database_lookup_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_DATABASE_LOOKUP_FLAGS (g_tls_database_lookup_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_tls_certificate_request_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_CERTIFICATE_REQUEST_FLAGS (g_tls_certificate_request_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_io_module_scope_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_IO_MODULE_SCOPE_FLAGS (g_io_module_scope_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_socket_client_event_get_type (void) G_GNUC_CONST; +#define G_TYPE_SOCKET_CLIENT_EVENT (g_socket_client_event_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_socket_listener_event_get_type (void) G_GNUC_CONST; +#define G_TYPE_SOCKET_LISTENER_EVENT (g_socket_listener_event_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_test_dbus_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_TEST_DBUS_FLAGS (g_test_dbus_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_subprocess_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_SUBPROCESS_FLAGS (g_subprocess_flags_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_notification_priority_get_type (void) G_GNUC_CONST; +#define G_TYPE_NOTIFICATION_PRIORITY (g_notification_priority_get_type ()) +GLIB_AVAILABLE_IN_ALL GType g_network_connectivity_get_type (void) G_GNUC_CONST; +#define G_TYPE_NETWORK_CONNECTIVITY (g_network_connectivity_get_type ()) + +/* enumerations from "gsettings.h" */ +GLIB_AVAILABLE_IN_ALL GType g_settings_bind_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_SETTINGS_BIND_FLAGS (g_settings_bind_flags_get_type ()) +G_END_DECLS + +#endif /* __GIO_ENUM_TYPES_H__ */ + +/* Generated data ends here */ + diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gioerror.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gioerror.h new file mode 100755 index 00000000..b3d64464 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gioerror.h @@ -0,0 +1,53 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_IO_ERROR_H__ +#define __G_IO_ERROR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <glib.h> +#include <gio/gioenums.h> + +G_BEGIN_DECLS + +/** + * G_IO_ERROR: + * + * Error domain for GIO. Errors in this domain will be from the #GIOErrorEnum enumeration. + * See #GError for more information on error domains. + **/ +#define G_IO_ERROR g_io_error_quark() + +GLIB_AVAILABLE_IN_ALL +GQuark g_io_error_quark (void); +GLIB_AVAILABLE_IN_ALL +GIOErrorEnum g_io_error_from_errno (gint err_no); + +#ifdef G_OS_WIN32 +GLIB_AVAILABLE_IN_ALL +GIOErrorEnum g_io_error_from_win32_error (gint error_code); +#endif + +G_END_DECLS + +#endif /* __G_IO_ERROR_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/giomodule.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/giomodule.h new file mode 100755 index 00000000..e94b8099 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/giomodule.h @@ -0,0 +1,193 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_IO_MODULE_H__ +#define __G_IO_MODULE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> +#include <gmodule.h> + +G_BEGIN_DECLS + +typedef struct _GIOModuleScope GIOModuleScope; + +GLIB_AVAILABLE_IN_2_30 +GIOModuleScope * g_io_module_scope_new (GIOModuleScopeFlags flags); +GLIB_AVAILABLE_IN_2_30 +void g_io_module_scope_free (GIOModuleScope *scope); +GLIB_AVAILABLE_IN_2_30 +void g_io_module_scope_block (GIOModuleScope *scope, + const gchar *basename); + +#define G_IO_TYPE_MODULE (g_io_module_get_type ()) +#define G_IO_MODULE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_IO_TYPE_MODULE, GIOModule)) +#define G_IO_MODULE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_IO_TYPE_MODULE, GIOModuleClass)) +#define G_IO_IS_MODULE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_IO_TYPE_MODULE)) +#define G_IO_IS_MODULE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_IO_TYPE_MODULE)) +#define G_IO_MODULE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_IO_TYPE_MODULE, GIOModuleClass)) + +/** + * GIOModule: + * + * Opaque module base class for extending GIO. + **/ +typedef struct _GIOModuleClass GIOModuleClass; + +GLIB_AVAILABLE_IN_ALL +GType g_io_module_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GIOModule *g_io_module_new (const gchar *filename); + +GLIB_AVAILABLE_IN_ALL +void g_io_modules_scan_all_in_directory (const char *dirname); +GLIB_AVAILABLE_IN_ALL +GList *g_io_modules_load_all_in_directory (const gchar *dirname); + +GLIB_AVAILABLE_IN_2_30 +void g_io_modules_scan_all_in_directory_with_scope (const gchar *dirname, + GIOModuleScope *scope); +GLIB_AVAILABLE_IN_2_30 +GList *g_io_modules_load_all_in_directory_with_scope (const gchar *dirname, + GIOModuleScope *scope); + +GLIB_AVAILABLE_IN_ALL +GIOExtensionPoint *g_io_extension_point_register (const char *name); +GLIB_AVAILABLE_IN_ALL +GIOExtensionPoint *g_io_extension_point_lookup (const char *name); +GLIB_AVAILABLE_IN_ALL +void g_io_extension_point_set_required_type (GIOExtensionPoint *extension_point, + GType type); +GLIB_AVAILABLE_IN_ALL +GType g_io_extension_point_get_required_type (GIOExtensionPoint *extension_point); +GLIB_AVAILABLE_IN_ALL +GList *g_io_extension_point_get_extensions (GIOExtensionPoint *extension_point); +GLIB_AVAILABLE_IN_ALL +GIOExtension * g_io_extension_point_get_extension_by_name (GIOExtensionPoint *extension_point, + const char *name); +GLIB_AVAILABLE_IN_ALL +GIOExtension * g_io_extension_point_implement (const char *extension_point_name, + GType type, + const char *extension_name, + gint priority); + +GLIB_AVAILABLE_IN_ALL +GType g_io_extension_get_type (GIOExtension *extension); +GLIB_AVAILABLE_IN_ALL +const char * g_io_extension_get_name (GIOExtension *extension); +GLIB_AVAILABLE_IN_ALL +gint g_io_extension_get_priority (GIOExtension *extension); +GLIB_AVAILABLE_IN_ALL +GTypeClass* g_io_extension_ref_class (GIOExtension *extension); + + +/* API for the modules to implement */ + +/** + * g_io_module_load: + * @module: a #GIOModule. + * + * Required API for GIO modules to implement. + * + * This function is run after the module has been loaded into GIO, + * to initialize the module. Typically, this function will call + * g_io_extension_point_implement(). + * + * Since 2.56, this function should be named `g_io_<modulename>_load`, where + * `modulename` is the plugin’s filename with the `lib` or `libgio` prefix and + * everything after the first dot removed, and with `-` replaced with `_` + * throughout. For example, `libgiognutls-helper.so` becomes `gnutls_helper`. + * Using the new symbol names avoids name clashes when building modules + * statically. The old symbol names continue to be supported, but cannot be used + * for static builds. + **/ +GLIB_AVAILABLE_IN_ALL +void g_io_module_load (GIOModule *module); + +/** + * g_io_module_unload: + * @module: a #GIOModule. + * + * Required API for GIO modules to implement. + * + * This function is run when the module is being unloaded from GIO, + * to finalize the module. + * + * Since 2.56, this function should be named `g_io_<modulename>_unload`, where + * `modulename` is the plugin’s filename with the `lib` or `libgio` prefix and + * everything after the first dot removed, and with `-` replaced with `_` + * throughout. For example, `libgiognutls-helper.so` becomes `gnutls_helper`. + * Using the new symbol names avoids name clashes when building modules + * statically. The old symbol names continue to be supported, but cannot be used + * for static builds. + **/ +GLIB_AVAILABLE_IN_ALL +void g_io_module_unload (GIOModule *module); + +/** + * g_io_module_query: + * + * Optional API for GIO modules to implement. + * + * Should return a list of all the extension points that may be + * implemented in this module. + * + * This method will not be called in normal use, however it may be + * called when probing existing modules and recording which extension + * points that this model is used for. This means we won't have to + * load and initialize this module unless its needed. + * + * If this function is not implemented by the module the module will + * always be loaded, initialized and then unloaded on application + * startup so that it can register its extension points during init. + * + * Note that a module need not actually implement all the extension + * points that g_io_module_query() returns, since the exact list of + * extension may depend on runtime issues. However all extension + * points actually implemented must be returned by g_io_module_query() + * (if defined). + * + * When installing a module that implements g_io_module_query() you must + * run gio-querymodules in order to build the cache files required for + * lazy loading. + * + * Since 2.56, this function should be named `g_io_<modulename>_query`, where + * `modulename` is the plugin’s filename with the `lib` or `libgio` prefix and + * everything after the first dot removed, and with `-` replaced with `_` + * throughout. For example, `libgiognutls-helper.so` becomes `gnutls_helper`. + * Using the new symbol names avoids name clashes when building modules + * statically. The old symbol names continue to be supported, but cannot be used + * for static builds. + * + * Returns: (transfer full): A %NULL-terminated array of strings, + * listing the supported extension points of the module. The array + * must be suitable for freeing with g_strfreev(). + * + * Since: 2.24 + **/ +GLIB_AVAILABLE_IN_ALL +char **g_io_module_query (void); + +G_END_DECLS + +#endif /* __G_IO_MODULE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gioscheduler.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gioscheduler.h new file mode 100755 index 00000000..d58cff60 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gioscheduler.h @@ -0,0 +1,54 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_IO_SCHEDULER_H__ +#define __G_IO_SCHEDULER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + + +GLIB_DEPRECATED_IN_2_36_FOR ("GThreadPool or g_task_run_in_thread") +void g_io_scheduler_push_job (GIOSchedulerJobFunc job_func, + gpointer user_data, + GDestroyNotify notify, + gint io_priority, + GCancellable *cancellable); +GLIB_DEPRECATED_IN_2_36 +void g_io_scheduler_cancel_all_jobs (void); +GLIB_DEPRECATED_IN_2_36_FOR (g_main_context_invoke) +gboolean g_io_scheduler_job_send_to_mainloop (GIOSchedulerJob *job, + GSourceFunc func, + gpointer user_data, + GDestroyNotify notify); +GLIB_DEPRECATED_IN_2_36_FOR (g_main_context_invoke) +void g_io_scheduler_job_send_to_mainloop_async (GIOSchedulerJob *job, + GSourceFunc func, + gpointer user_data, + GDestroyNotify notify); + +G_END_DECLS + +#endif /* __G_IO_SCHEDULER_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/giostream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/giostream.h new file mode 100755 index 00000000..5dbe0e6e --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/giostream.h @@ -0,0 +1,135 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2008, 2009 Codethink Limited + * Copyright © 2009 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * See the included COPYING file for more information. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + * Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_IO_STREAM_H__ +#define __G_IO_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/ginputstream.h> +#include <gio/goutputstream.h> +#include <gio/gcancellable.h> +#include <gio/gioerror.h> + +G_BEGIN_DECLS + +#define G_TYPE_IO_STREAM (g_io_stream_get_type ()) +#define G_IO_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_IO_STREAM, GIOStream)) +#define G_IO_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_IO_STREAM, GIOStreamClass)) +#define G_IS_IO_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_IO_STREAM)) +#define G_IS_IO_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_IO_STREAM)) +#define G_IO_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_IO_STREAM, GIOStreamClass)) + +typedef struct _GIOStreamPrivate GIOStreamPrivate; +typedef struct _GIOStreamClass GIOStreamClass; + +/** + * GIOStream: + * + * Base class for read-write streams. + **/ +struct _GIOStream +{ + GObject parent_instance; + + /*< private >*/ + GIOStreamPrivate *priv; +}; + +struct _GIOStreamClass +{ + GObjectClass parent_class; + + GInputStream * (*get_input_stream) (GIOStream *stream); + GOutputStream * (*get_output_stream) (GIOStream *stream); + + gboolean (* close_fn) (GIOStream *stream, + GCancellable *cancellable, + GError **error); + void (* close_async) (GIOStream *stream, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* close_finish) (GIOStream *stream, + GAsyncResult *result, + GError **error); + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); + void (*_g_reserved7) (void); + void (*_g_reserved8) (void); + void (*_g_reserved9) (void); + void (*_g_reserved10) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_io_stream_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GInputStream * g_io_stream_get_input_stream (GIOStream *stream); +GLIB_AVAILABLE_IN_ALL +GOutputStream *g_io_stream_get_output_stream (GIOStream *stream); + +GLIB_AVAILABLE_IN_ALL +void g_io_stream_splice_async (GIOStream *stream1, + GIOStream *stream2, + GIOStreamSpliceFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +gboolean g_io_stream_splice_finish (GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_io_stream_close (GIOStream *stream, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_io_stream_close_async (GIOStream *stream, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_io_stream_close_finish (GIOStream *stream, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_io_stream_is_closed (GIOStream *stream); +GLIB_AVAILABLE_IN_ALL +gboolean g_io_stream_has_pending (GIOStream *stream); +GLIB_AVAILABLE_IN_ALL +gboolean g_io_stream_set_pending (GIOStream *stream, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_io_stream_clear_pending (GIOStream *stream); + +G_END_DECLS + +#endif /* __G_IO_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/giotypes.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/giotypes.h new file mode 100755 index 00000000..738e517b --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/giotypes.h @@ -0,0 +1,654 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __GIO_TYPES_H__ +#define __GIO_TYPES_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gioenums.h> + +G_BEGIN_DECLS + +typedef struct _GAppLaunchContext GAppLaunchContext; +typedef struct _GAppInfo GAppInfo; /* Dummy typedef */ +typedef struct _GAsyncResult GAsyncResult; /* Dummy typedef */ +typedef struct _GAsyncInitable GAsyncInitable; +typedef struct _GBufferedInputStream GBufferedInputStream; +typedef struct _GBufferedOutputStream GBufferedOutputStream; +typedef struct _GCancellable GCancellable; +typedef struct _GCharsetConverter GCharsetConverter; +typedef struct _GConverter GConverter; +typedef struct _GConverterInputStream GConverterInputStream; +typedef struct _GConverterOutputStream GConverterOutputStream; +typedef struct _GDatagramBased GDatagramBased; +typedef struct _GDataInputStream GDataInputStream; +typedef struct _GSimplePermission GSimplePermission; +typedef struct _GZlibCompressor GZlibCompressor; +typedef struct _GZlibDecompressor GZlibDecompressor; + +typedef struct _GSimpleActionGroup GSimpleActionGroup; +typedef struct _GRemoteActionGroup GRemoteActionGroup; +typedef struct _GDBusActionGroup GDBusActionGroup; +typedef struct _GActionMap GActionMap; +typedef struct _GActionGroup GActionGroup; +typedef struct _GPropertyAction GPropertyAction; +typedef struct _GSimpleAction GSimpleAction; +typedef struct _GAction GAction; +typedef struct _GApplication GApplication; +typedef struct _GApplicationCommandLine GApplicationCommandLine; +typedef struct _GSettingsBackend GSettingsBackend; +typedef struct _GSettings GSettings; +typedef struct _GPermission GPermission; + +typedef struct _GMenuModel GMenuModel; +typedef struct _GNotification GNotification; + +/** + * GDrive: + * + * Opaque drive object. + **/ +typedef struct _GDrive GDrive; /* Dummy typedef */ +typedef struct _GFileEnumerator GFileEnumerator; +typedef struct _GFileMonitor GFileMonitor; +typedef struct _GFilterInputStream GFilterInputStream; +typedef struct _GFilterOutputStream GFilterOutputStream; + +/** + * GFile: + * + * A handle to an object implementing the #GFileIface interface. + * Generally stores a location within the file system. Handles do not + * necessarily represent files or directories that currently exist. + **/ +typedef struct _GFile GFile; /* Dummy typedef */ +typedef struct _GFileInfo GFileInfo; + +/** + * GFileAttributeMatcher: + * + * Determines if a string matches a file attribute. + **/ +typedef struct _GFileAttributeMatcher GFileAttributeMatcher; +typedef struct _GFileAttributeInfo GFileAttributeInfo; +typedef struct _GFileAttributeInfoList GFileAttributeInfoList; +typedef struct _GFileDescriptorBased GFileDescriptorBased; +typedef struct _GFileInputStream GFileInputStream; +typedef struct _GFileOutputStream GFileOutputStream; +typedef struct _GFileIOStream GFileIOStream; +typedef struct _GFileIcon GFileIcon; +typedef struct _GFilenameCompleter GFilenameCompleter; + + +typedef struct _GIcon GIcon; /* Dummy typedef */ +typedef struct _GInetAddress GInetAddress; +typedef struct _GInetAddressMask GInetAddressMask; +typedef struct _GInetSocketAddress GInetSocketAddress; +typedef struct _GNativeSocketAddress GNativeSocketAddress; +typedef struct _GInputStream GInputStream; +typedef struct _GInitable GInitable; +typedef struct _GIOModule GIOModule; +typedef struct _GIOExtensionPoint GIOExtensionPoint; +typedef struct _GIOExtension GIOExtension; + +/** + * GIOSchedulerJob: + * + * Opaque class for defining and scheduling IO jobs. + **/ +typedef struct _GIOSchedulerJob GIOSchedulerJob; +typedef struct _GIOStreamAdapter GIOStreamAdapter; +typedef struct _GLoadableIcon GLoadableIcon; /* Dummy typedef */ +typedef struct _GBytesIcon GBytesIcon; +typedef struct _GMemoryInputStream GMemoryInputStream; +typedef struct _GMemoryOutputStream GMemoryOutputStream; + +/** + * GMount: + * + * A handle to an object implementing the #GMountIface interface. + **/ +typedef struct _GMount GMount; /* Dummy typedef */ +typedef struct _GMountOperation GMountOperation; +typedef struct _GNetworkAddress GNetworkAddress; +typedef struct _GNetworkMonitor GNetworkMonitor; +typedef struct _GNetworkService GNetworkService; +typedef struct _GOutputStream GOutputStream; +typedef struct _GIOStream GIOStream; +typedef struct _GSimpleIOStream GSimpleIOStream; +typedef struct _GPollableInputStream GPollableInputStream; /* Dummy typedef */ +typedef struct _GPollableOutputStream GPollableOutputStream; /* Dummy typedef */ +typedef struct _GResolver GResolver; + +/** + * GResource: + * + * A resource bundle. + * + * Since: 2.32 + */ +typedef struct _GResource GResource; +typedef struct _GSeekable GSeekable; +typedef struct _GSimpleAsyncResult GSimpleAsyncResult; + +/** + * GSocket: + * + * A lowlevel network socket object. + * + * Since: 2.22 + **/ +typedef struct _GSocket GSocket; + +/** + * GSocketControlMessage: + * + * Base class for socket-type specific control messages that can be sent and + * received over #GSocket. + **/ +typedef struct _GSocketControlMessage GSocketControlMessage; +/** + * GSocketClient: + * + * A helper class for network clients to make connections. + * + * Since: 2.22 + **/ +typedef struct _GSocketClient GSocketClient; +/** + * GSocketConnection: + * + * A socket connection GIOStream object for connection-oriented sockets. + * + * Since: 2.22 + **/ +typedef struct _GSocketConnection GSocketConnection; +/** + * GSocketListener: + * + * A helper class for network servers to listen for and accept connections. + * + * Since: 2.22 + **/ +typedef struct _GSocketListener GSocketListener; +/** + * GSocketService: + * + * A helper class for handling accepting incomming connections in the + * glib mainloop. + * + * Since: 2.22 + **/ +typedef struct _GSocketService GSocketService; +typedef struct _GSocketAddress GSocketAddress; +typedef struct _GSocketAddressEnumerator GSocketAddressEnumerator; +typedef struct _GSocketConnectable GSocketConnectable; +typedef struct _GSrvTarget GSrvTarget; +typedef struct _GTask GTask; +/** + * GTcpConnection: + * + * A #GSocketConnection for TCP/IP connections. + * + * Since: 2.22 + **/ +typedef struct _GTcpConnection GTcpConnection; +typedef struct _GTcpWrapperConnection GTcpWrapperConnection; +/** + * GThreadedSocketService: + * + * A helper class for handling accepting incoming connections in the + * glib mainloop and handling them in a thread. + * + * Since: 2.22 + **/ +typedef struct _GThreadedSocketService GThreadedSocketService; +typedef struct _GDtlsConnection GDtlsConnection; +typedef struct _GDtlsClientConnection GDtlsClientConnection; /* Dummy typedef */ +typedef struct _GDtlsServerConnection GDtlsServerConnection; /* Dummy typedef */ +typedef struct _GThemedIcon GThemedIcon; +typedef struct _GTlsCertificate GTlsCertificate; +typedef struct _GTlsClientConnection GTlsClientConnection; /* Dummy typedef */ +typedef struct _GTlsConnection GTlsConnection; +typedef struct _GTlsDatabase GTlsDatabase; +typedef struct _GTlsFileDatabase GTlsFileDatabase; +typedef struct _GTlsInteraction GTlsInteraction; +typedef struct _GTlsPassword GTlsPassword; +typedef struct _GTlsServerConnection GTlsServerConnection; /* Dummy typedef */ +typedef struct _GVfs GVfs; /* Dummy typedef */ + +/** + * GProxyResolver: + * + * A helper class to enumerate proxies base on URI. + * + * Since: 2.26 + **/ +typedef struct _GProxyResolver GProxyResolver; +typedef struct _GProxy GProxy; +typedef struct _GProxyAddress GProxyAddress; +typedef struct _GProxyAddressEnumerator GProxyAddressEnumerator; + +/** + * GVolume: + * + * Opaque mountable volume object. + **/ +typedef struct _GVolume GVolume; /* Dummy typedef */ +typedef struct _GVolumeMonitor GVolumeMonitor; + +/** + * GAsyncReadyCallback: + * @source_object: (nullable): the object the asynchronous operation was started with. + * @res: a #GAsyncResult. + * @user_data: user data passed to the callback. + * + * Type definition for a function that will be called back when an asynchronous + * operation within GIO has been completed. #GAsyncReadyCallback + * callbacks from #GTask are guaranteed to be invoked in a later + * iteration of the + * [thread-default main context][g-main-context-push-thread-default] + * where the #GTask was created. All other users of + * #GAsyncReadyCallback must likewise call it asynchronously in a + * later iteration of the main context. + **/ +typedef void (*GAsyncReadyCallback) (GObject *source_object, + GAsyncResult *res, + gpointer user_data); + +/** + * GFileProgressCallback: + * @current_num_bytes: the current number of bytes in the operation. + * @total_num_bytes: the total number of bytes in the operation. + * @user_data: user data passed to the callback. + * + * When doing file operations that may take a while, such as moving + * a file or copying a file, a progress callback is used to pass how + * far along that operation is to the application. + **/ +typedef void (*GFileProgressCallback) (goffset current_num_bytes, + goffset total_num_bytes, + gpointer user_data); + +/** + * GFileReadMoreCallback: + * @file_contents: the data as currently read. + * @file_size: the size of the data currently read. + * @callback_data: (closure): data passed to the callback. + * + * When loading the partial contents of a file with g_file_load_partial_contents_async(), + * it may become necessary to determine if any more data from the file should be loaded. + * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data + * should be read, or %FALSE otherwise. + * + * Returns: %TRUE if more data should be read back. %FALSE otherwise. + **/ +typedef gboolean (* GFileReadMoreCallback) (const char *file_contents, + goffset file_size, + gpointer callback_data); + +/** + * GFileMeasureProgressCallback: + * @reporting: %TRUE if more reports will come + * @current_size: the current cumulative size measurement + * @num_dirs: the number of directories visited so far + * @num_files: the number of non-directory files encountered + * @user_data: the data passed to the original request for this callback + * + * This callback type is used by g_file_measure_disk_usage() to make + * periodic progress reports when measuring the amount of disk spaced + * used by a directory. + * + * These calls are made on a best-effort basis and not all types of + * #GFile will support them. At the minimum, however, one call will + * always be made immediately. + * + * In the case that there is no support, @reporting will be set to + * %FALSE (and the other values undefined) and no further calls will be + * made. Otherwise, the @reporting will be %TRUE and the other values + * all-zeros during the first (immediate) call. In this way, you can + * know which type of progress UI to show without a delay. + * + * For g_file_measure_disk_usage() the callback is made directly. For + * g_file_measure_disk_usage_async() the callback is made via the + * default main context of the calling thread (ie: the same way that the + * final async result would be reported). + * + * @current_size is in the same units as requested by the operation (see + * %G_FILE_DISK_USAGE_APPARENT_SIZE). + * + * The frequency of the updates is implementation defined, but is + * ideally about once every 200ms. + * + * The last progress callback may or may not be equal to the final + * result. Always check the async result to get the final value. + * + * Since: 2.38 + **/ +typedef void (* GFileMeasureProgressCallback) (gboolean reporting, + guint64 current_size, + guint64 num_dirs, + guint64 num_files, + gpointer user_data); + +/** + * GIOSchedulerJobFunc: + * @job: a #GIOSchedulerJob. + * @cancellable: optional #GCancellable object, %NULL to ignore. + * @user_data: the data to pass to callback function + * + * I/O Job function. + * + * Long-running jobs should periodically check the @cancellable + * to see if they have been cancelled. + * + * Returns: %TRUE if this function should be called again to + * complete the job, %FALSE if the job is complete (or cancelled) + **/ +typedef gboolean (*GIOSchedulerJobFunc) (GIOSchedulerJob *job, + GCancellable *cancellable, + gpointer user_data); + +/** + * GSimpleAsyncThreadFunc: + * @res: a #GSimpleAsyncResult. + * @object: a #GObject. + * @cancellable: optional #GCancellable object, %NULL to ignore. + * + * Simple thread function that runs an asynchronous operation and + * checks for cancellation. + **/ +typedef void (*GSimpleAsyncThreadFunc) (GSimpleAsyncResult *res, + GObject *object, + GCancellable *cancellable); + +/** + * GSocketSourceFunc: + * @socket: the #GSocket + * @condition: the current condition at the source fired. + * @user_data: data passed in by the user. + * + * This is the function type of the callback used for the #GSource + * returned by g_socket_create_source(). + * + * Returns: it should return %FALSE if the source should be removed. + * + * Since: 2.22 + */ +typedef gboolean (*GSocketSourceFunc) (GSocket *socket, + GIOCondition condition, + gpointer user_data); + +/** + * GDatagramBasedSourceFunc: + * @datagram_based: the #GDatagramBased + * @condition: the current condition at the source fired + * @user_data: data passed in by the user + * + * This is the function type of the callback used for the #GSource + * returned by g_datagram_based_create_source(). + * + * Returns: %G_SOURCE_REMOVE if the source should be removed, + * %G_SOURCE_CONTINUE otherwise + * + * Since: 2.48 + */ +typedef gboolean (*GDatagramBasedSourceFunc) (GDatagramBased *datagram_based, + GIOCondition condition, + gpointer user_data); + +/** + * GInputVector: + * @buffer: Pointer to a buffer where data will be written. + * @size: the available size in @buffer. + * + * Structure used for scatter/gather data input. + * You generally pass in an array of #GInputVectors + * and the operation will store the read data starting in the + * first buffer, switching to the next as needed. + * + * Since: 2.22 + */ +typedef struct _GInputVector GInputVector; + +struct _GInputVector { + gpointer buffer; + gsize size; +}; + +/** + * GInputMessage: + * @address: (optional) (out) (transfer full): return location + * for a #GSocketAddress, or %NULL + * @vectors: (array length=num_vectors) (out): pointer to an + * array of input vectors + * @num_vectors: the number of input vectors pointed to by @vectors + * @bytes_received: (out): will be set to the number of bytes that have been + * received + * @flags: (out): collection of #GSocketMsgFlags for the received message, + * outputted by the call + * @control_messages: (array length=num_control_messages) (optional) + * (out) (transfer full): return location for a + * caller-allocated array of #GSocketControlMessages, or %NULL + * @num_control_messages: (out) (optional): return location for the number of + * elements in @control_messages + * + * Structure used for scatter/gather data input when receiving multiple + * messages or packets in one go. You generally pass in an array of empty + * #GInputVectors and the operation will use all the buffers as if they + * were one buffer, and will set @bytes_received to the total number of bytes + * received across all #GInputVectors. + * + * This structure closely mirrors `struct mmsghdr` and `struct msghdr` from + * the POSIX sockets API (see `man 2 recvmmsg`). + * + * If @address is non-%NULL then it is set to the source address the message + * was received from, and the caller must free it afterwards. + * + * If @control_messages is non-%NULL then it is set to an array of control + * messages received with the message (if any), and the caller must free it + * afterwards. @num_control_messages is set to the number of elements in + * this array, which may be zero. + * + * Flags relevant to this message will be returned in @flags. For example, + * `MSG_EOR` or `MSG_TRUNC`. + * + * Since: 2.48 + */ +typedef struct _GInputMessage GInputMessage; + +struct _GInputMessage { + GSocketAddress **address; + + GInputVector *vectors; + guint num_vectors; + + gsize bytes_received; + gint flags; + + GSocketControlMessage ***control_messages; + guint *num_control_messages; +}; + +/** + * GOutputVector: + * @buffer: Pointer to a buffer of data to read. + * @size: the size of @buffer. + * + * Structure used for scatter/gather data output. + * You generally pass in an array of #GOutputVectors + * and the operation will use all the buffers as if they were + * one buffer. + * + * Since: 2.22 + */ +typedef struct _GOutputVector GOutputVector; + +struct _GOutputVector { + gconstpointer buffer; + gsize size; +}; + +/** + * GOutputMessage: + * @address: (nullable): a #GSocketAddress, or %NULL + * @vectors: pointer to an array of output vectors + * @num_vectors: the number of output vectors pointed to by @vectors. + * @bytes_sent: initialize to 0. Will be set to the number of bytes + * that have been sent + * @control_messages: (array length=num_control_messages) (nullable): a pointer + * to an array of #GSocketControlMessages, or %NULL. + * @num_control_messages: number of elements in @control_messages. + * + * Structure used for scatter/gather data output when sending multiple + * messages or packets in one go. You generally pass in an array of + * #GOutputVectors and the operation will use all the buffers as if they + * were one buffer. + * + * If @address is %NULL then the message is sent to the default receiver + * (as previously set by g_socket_connect()). + * + * Since: 2.44 + */ +typedef struct _GOutputMessage GOutputMessage; + +struct _GOutputMessage { + GSocketAddress *address; + + GOutputVector *vectors; + guint num_vectors; + + guint bytes_sent; + + GSocketControlMessage **control_messages; + guint num_control_messages; +}; + +typedef struct _GCredentials GCredentials; +typedef struct _GUnixCredentialsMessage GUnixCredentialsMessage; +typedef struct _GUnixFDList GUnixFDList; +typedef struct _GDBusMessage GDBusMessage; +typedef struct _GDBusConnection GDBusConnection; +typedef struct _GDBusProxy GDBusProxy; +typedef struct _GDBusMethodInvocation GDBusMethodInvocation; +typedef struct _GDBusServer GDBusServer; +typedef struct _GDBusAuthObserver GDBusAuthObserver; +typedef struct _GDBusErrorEntry GDBusErrorEntry; +typedef struct _GDBusInterfaceVTable GDBusInterfaceVTable; +typedef struct _GDBusSubtreeVTable GDBusSubtreeVTable; +typedef struct _GDBusAnnotationInfo GDBusAnnotationInfo; +typedef struct _GDBusArgInfo GDBusArgInfo; +typedef struct _GDBusMethodInfo GDBusMethodInfo; +typedef struct _GDBusSignalInfo GDBusSignalInfo; +typedef struct _GDBusPropertyInfo GDBusPropertyInfo; +typedef struct _GDBusInterfaceInfo GDBusInterfaceInfo; +typedef struct _GDBusNodeInfo GDBusNodeInfo; + +/** + * GCancellableSourceFunc: + * @cancellable: the #GCancellable + * @user_data: data passed in by the user. + * + * This is the function type of the callback used for the #GSource + * returned by g_cancellable_source_new(). + * + * Returns: it should return %FALSE if the source should be removed. + * + * Since: 2.28 + */ +typedef gboolean (*GCancellableSourceFunc) (GCancellable *cancellable, + gpointer user_data); + +/** + * GPollableSourceFunc: + * @pollable_stream: the #GPollableInputStream or #GPollableOutputStream + * @user_data: data passed in by the user. + * + * This is the function type of the callback used for the #GSource + * returned by g_pollable_input_stream_create_source() and + * g_pollable_output_stream_create_source(). + * + * Returns: it should return %FALSE if the source should be removed. + * + * Since: 2.28 + */ +typedef gboolean (*GPollableSourceFunc) (GObject *pollable_stream, + gpointer user_data); + +typedef struct _GDBusInterface GDBusInterface; /* Dummy typedef */ +typedef struct _GDBusInterfaceSkeleton GDBusInterfaceSkeleton; +typedef struct _GDBusObject GDBusObject; /* Dummy typedef */ +typedef struct _GDBusObjectSkeleton GDBusObjectSkeleton; +typedef struct _GDBusObjectProxy GDBusObjectProxy; +typedef struct _GDBusObjectManager GDBusObjectManager; /* Dummy typedef */ +typedef struct _GDBusObjectManagerClient GDBusObjectManagerClient; +typedef struct _GDBusObjectManagerServer GDBusObjectManagerServer; + +/** + * GDBusProxyTypeFunc: + * @manager: A #GDBusObjectManagerClient. + * @object_path: The object path of the remote object. + * @interface_name: (nullable): The interface name of the remote object or %NULL if a #GDBusObjectProxy #GType is requested. + * @user_data: User data. + * + * Function signature for a function used to determine the #GType to + * use for an interface proxy (if @interface_name is not %NULL) or + * object proxy (if @interface_name is %NULL). + * + * This function is called in the + * [thread-default main loop][g-main-context-push-thread-default] + * that @manager was constructed in. + * + * Returns: A #GType to use for the remote object. The returned type + * must be a #GDBusProxy or #GDBusObjectProxy -derived + * type. + * + * Since: 2.30 + */ +typedef GType (*GDBusProxyTypeFunc) (GDBusObjectManagerClient *manager, + const gchar *object_path, + const gchar *interface_name, + gpointer user_data); + +typedef struct _GTestDBus GTestDBus; + +/** + * GSubprocess: + * + * A child process. + * + * Since: 2.40 + */ +typedef struct _GSubprocess GSubprocess; +/** + * GSubprocessLauncher: + * + * Options for launching a child process. + * + * Since: 2.40 + */ +typedef struct _GSubprocessLauncher GSubprocessLauncher; + +G_END_DECLS + +#endif /* __GIO_TYPES_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/glistmodel.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/glistmodel.h new file mode 100755 index 00000000..48348afd --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/glistmodel.h @@ -0,0 +1,72 @@ +/* + * Copyright 2015 Lars Uebernickel + * Copyright 2015 Ryan Lortie + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: + * Lars Uebernickel <lars@uebernic.de> + * Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_LIST_MODEL_H__ +#define __G_LIST_MODEL_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_LIST_MODEL g_list_model_get_type () +GLIB_AVAILABLE_IN_2_44 +G_DECLARE_INTERFACE(GListModel, g_list_model, G, LIST_MODEL, GObject) + +struct _GListModelInterface +{ + GTypeInterface g_iface; + + GType (* get_item_type) (GListModel *list); + + guint (* get_n_items) (GListModel *list); + + gpointer (* get_item) (GListModel *list, + guint position); +}; + +GLIB_AVAILABLE_IN_2_44 +GType g_list_model_get_item_type (GListModel *list); + +GLIB_AVAILABLE_IN_2_44 +guint g_list_model_get_n_items (GListModel *list); + +GLIB_AVAILABLE_IN_2_44 +gpointer g_list_model_get_item (GListModel *list, + guint position); + +GLIB_AVAILABLE_IN_2_44 +GObject * g_list_model_get_object (GListModel *list, + guint position); + +GLIB_AVAILABLE_IN_2_44 +void g_list_model_items_changed (GListModel *list, + guint position, + guint removed, + guint added); + +G_END_DECLS + +#endif /* __G_LIST_MODEL_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gliststore.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gliststore.h new file mode 100755 index 00000000..407d542f --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gliststore.h @@ -0,0 +1,77 @@ +/* + * Copyright 2015 Lars Uebernickel + * Copyright 2015 Ryan Lortie + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: + * Lars Uebernickel <lars@uebernic.de> + * Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_LIST_STORE_H__ +#define __G_LIST_STORE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_LIST_STORE (g_list_store_get_type ()) +GLIB_AVAILABLE_IN_2_44 +G_DECLARE_FINAL_TYPE(GListStore, g_list_store, G, LIST_STORE, GObject) + +GLIB_AVAILABLE_IN_2_44 +GListStore * g_list_store_new (GType item_type); + +GLIB_AVAILABLE_IN_2_44 +void g_list_store_insert (GListStore *store, + guint position, + gpointer item); + +GLIB_AVAILABLE_IN_2_44 +guint g_list_store_insert_sorted (GListStore *store, + gpointer item, + GCompareDataFunc compare_func, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_46 +void g_list_store_sort (GListStore *store, + GCompareDataFunc compare_func, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_44 +void g_list_store_append (GListStore *store, + gpointer item); + +GLIB_AVAILABLE_IN_2_44 +void g_list_store_remove (GListStore *store, + guint position); + +GLIB_AVAILABLE_IN_2_44 +void g_list_store_remove_all (GListStore *store); + +GLIB_AVAILABLE_IN_2_44 +void g_list_store_splice (GListStore *store, + guint position, + guint n_removals, + gpointer *additions, + guint n_additions); + +G_END_DECLS + +#endif /* __G_LIST_STORE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gloadableicon.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gloadableicon.h new file mode 100755 index 00000000..c2951c99 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gloadableicon.h @@ -0,0 +1,99 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_LOADABLE_ICON_H__ +#define __G_LOADABLE_ICON_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_LOADABLE_ICON (g_loadable_icon_get_type ()) +#define G_LOADABLE_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_LOADABLE_ICON, GLoadableIcon)) +#define G_IS_LOADABLE_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_LOADABLE_ICON)) +#define G_LOADABLE_ICON_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_LOADABLE_ICON, GLoadableIconIface)) + +/** + * GLoadableIcon: + * + * Generic type for all kinds of icons that can be loaded + * as a stream. + **/ +typedef struct _GLoadableIconIface GLoadableIconIface; + +/** + * GLoadableIconIface: + * @g_iface: The parent interface. + * @load: Loads an icon. + * @load_async: Loads an icon asynchronously. + * @load_finish: Finishes an asynchronous icon load. + * + * Interface for icons that can be loaded as a stream. + **/ +struct _GLoadableIconIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + GInputStream * (* load) (GLoadableIcon *icon, + int size, + char **type, + GCancellable *cancellable, + GError **error); + void (* load_async) (GLoadableIcon *icon, + int size, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GInputStream * (* load_finish) (GLoadableIcon *icon, + GAsyncResult *res, + char **type, + GError **error); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_loadable_icon_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GInputStream *g_loadable_icon_load (GLoadableIcon *icon, + int size, + char **type, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_loadable_icon_load_async (GLoadableIcon *icon, + int size, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GInputStream *g_loadable_icon_load_finish (GLoadableIcon *icon, + GAsyncResult *res, + char **type, + GError **error); + +G_END_DECLS + +#endif /* __G_LOADABLE_ICON_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmemoryinputstream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmemoryinputstream.h new file mode 100755 index 00000000..7563fd64 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmemoryinputstream.h @@ -0,0 +1,90 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Christian Kellner <gicmo@gnome.org> + */ + +#ifndef __G_MEMORY_INPUT_STREAM_H__ +#define __G_MEMORY_INPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/ginputstream.h> + +G_BEGIN_DECLS + +#define G_TYPE_MEMORY_INPUT_STREAM (g_memory_input_stream_get_type ()) +#define G_MEMORY_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_MEMORY_INPUT_STREAM, GMemoryInputStream)) +#define G_MEMORY_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_MEMORY_INPUT_STREAM, GMemoryInputStreamClass)) +#define G_IS_MEMORY_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_MEMORY_INPUT_STREAM)) +#define G_IS_MEMORY_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_MEMORY_INPUT_STREAM)) +#define G_MEMORY_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_MEMORY_INPUT_STREAM, GMemoryInputStreamClass)) + +/** + * GMemoryInputStream: + * + * Implements #GInputStream for arbitrary memory chunks. + **/ +typedef struct _GMemoryInputStreamClass GMemoryInputStreamClass; +typedef struct _GMemoryInputStreamPrivate GMemoryInputStreamPrivate; + +struct _GMemoryInputStream +{ + GInputStream parent_instance; + + /*< private >*/ + GMemoryInputStreamPrivate *priv; +}; + +struct _GMemoryInputStreamClass +{ + GInputStreamClass parent_class; + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + + +GLIB_AVAILABLE_IN_ALL +GType g_memory_input_stream_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GInputStream * g_memory_input_stream_new (void); +GLIB_AVAILABLE_IN_ALL +GInputStream * g_memory_input_stream_new_from_data (const void *data, + gssize len, + GDestroyNotify destroy); +GLIB_AVAILABLE_IN_2_34 +GInputStream * g_memory_input_stream_new_from_bytes (GBytes *bytes); + +GLIB_AVAILABLE_IN_ALL +void g_memory_input_stream_add_data (GMemoryInputStream *stream, + const void *data, + gssize len, + GDestroyNotify destroy); +GLIB_AVAILABLE_IN_2_34 +void g_memory_input_stream_add_bytes (GMemoryInputStream *stream, + GBytes *bytes); + +G_END_DECLS + +#endif /* __G_MEMORY_INPUT_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmemoryoutputstream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmemoryoutputstream.h new file mode 100755 index 00000000..5418d23d --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmemoryoutputstream.h @@ -0,0 +1,107 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Christian Kellner <gicmo@gnome.org> + */ + +#ifndef __G_MEMORY_OUTPUT_STREAM_H__ +#define __G_MEMORY_OUTPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/goutputstream.h> + +G_BEGIN_DECLS + +#define G_TYPE_MEMORY_OUTPUT_STREAM (g_memory_output_stream_get_type ()) +#define G_MEMORY_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_MEMORY_OUTPUT_STREAM, GMemoryOutputStream)) +#define G_MEMORY_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_MEMORY_OUTPUT_STREAM, GMemoryOutputStreamClass)) +#define G_IS_MEMORY_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_MEMORY_OUTPUT_STREAM)) +#define G_IS_MEMORY_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_MEMORY_OUTPUT_STREAM)) +#define G_MEMORY_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_MEMORY_OUTPUT_STREAM, GMemoryOutputStreamClass)) + +/** + * GMemoryOutputStream: + * + * Implements #GOutputStream for arbitrary memory chunks. + **/ +typedef struct _GMemoryOutputStreamClass GMemoryOutputStreamClass; +typedef struct _GMemoryOutputStreamPrivate GMemoryOutputStreamPrivate; + +struct _GMemoryOutputStream +{ + GOutputStream parent_instance; + + /*< private >*/ + GMemoryOutputStreamPrivate *priv; +}; + +struct _GMemoryOutputStreamClass +{ + GOutputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +/** + * GReallocFunc: + * @data: memory block to reallocate + * @size: size to reallocate @data to + * + * Changes the size of the memory block pointed to by @data to + * @size bytes. + * + * The function should have the same semantics as realloc(). + * + * Returns: a pointer to the reallocated memory + */ +typedef gpointer (* GReallocFunc) (gpointer data, + gsize size); + +GLIB_AVAILABLE_IN_ALL +GType g_memory_output_stream_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GOutputStream *g_memory_output_stream_new (gpointer data, + gsize size, + GReallocFunc realloc_function, + GDestroyNotify destroy_function); +GLIB_AVAILABLE_IN_2_36 +GOutputStream *g_memory_output_stream_new_resizable (void); +GLIB_AVAILABLE_IN_ALL +gpointer g_memory_output_stream_get_data (GMemoryOutputStream *ostream); +GLIB_AVAILABLE_IN_ALL +gsize g_memory_output_stream_get_size (GMemoryOutputStream *ostream); +GLIB_AVAILABLE_IN_ALL +gsize g_memory_output_stream_get_data_size (GMemoryOutputStream *ostream); +GLIB_AVAILABLE_IN_ALL +gpointer g_memory_output_stream_steal_data (GMemoryOutputStream *ostream); + +GLIB_AVAILABLE_IN_2_34 +GBytes * g_memory_output_stream_steal_as_bytes (GMemoryOutputStream *ostream); + +G_END_DECLS + +#endif /* __G_MEMORY_OUTPUT_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmenu.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmenu.h new file mode 100755 index 00000000..66094383 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmenu.h @@ -0,0 +1,182 @@ +/* + * Copyright © 2011 Canonical Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_MENU_H__ +#define __G_MENU_H__ + +#include <gio/gmenumodel.h> + +G_BEGIN_DECLS + +#define G_TYPE_MENU (g_menu_get_type ()) +#define G_MENU(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_MENU, GMenu)) +#define G_IS_MENU(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_MENU)) + +#define G_TYPE_MENU_ITEM (g_menu_item_get_type ()) +#define G_MENU_ITEM(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_MENU_ITEM, GMenuItem)) +#define G_IS_MENU_ITEM(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_MENU_ITEM)) + +typedef struct _GMenuItem GMenuItem; +typedef struct _GMenu GMenu; + +GLIB_AVAILABLE_IN_2_32 +GType g_menu_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_2_32 +GMenu * g_menu_new (void); + +GLIB_AVAILABLE_IN_2_32 +void g_menu_freeze (GMenu *menu); + +GLIB_AVAILABLE_IN_2_32 +void g_menu_insert_item (GMenu *menu, + gint position, + GMenuItem *item); +GLIB_AVAILABLE_IN_2_32 +void g_menu_prepend_item (GMenu *menu, + GMenuItem *item); +GLIB_AVAILABLE_IN_2_32 +void g_menu_append_item (GMenu *menu, + GMenuItem *item); +GLIB_AVAILABLE_IN_2_32 +void g_menu_remove (GMenu *menu, + gint position); + +GLIB_AVAILABLE_IN_2_38 +void g_menu_remove_all (GMenu *menu); + +GLIB_AVAILABLE_IN_2_32 +void g_menu_insert (GMenu *menu, + gint position, + const gchar *label, + const gchar *detailed_action); +GLIB_AVAILABLE_IN_2_32 +void g_menu_prepend (GMenu *menu, + const gchar *label, + const gchar *detailed_action); +GLIB_AVAILABLE_IN_2_32 +void g_menu_append (GMenu *menu, + const gchar *label, + const gchar *detailed_action); + +GLIB_AVAILABLE_IN_2_32 +void g_menu_insert_section (GMenu *menu, + gint position, + const gchar *label, + GMenuModel *section); +GLIB_AVAILABLE_IN_2_32 +void g_menu_prepend_section (GMenu *menu, + const gchar *label, + GMenuModel *section); +GLIB_AVAILABLE_IN_2_32 +void g_menu_append_section (GMenu *menu, + const gchar *label, + GMenuModel *section); + +GLIB_AVAILABLE_IN_2_32 +void g_menu_insert_submenu (GMenu *menu, + gint position, + const gchar *label, + GMenuModel *submenu); +GLIB_AVAILABLE_IN_2_32 +void g_menu_prepend_submenu (GMenu *menu, + const gchar *label, + GMenuModel *submenu); +GLIB_AVAILABLE_IN_2_32 +void g_menu_append_submenu (GMenu *menu, + const gchar *label, + GMenuModel *submenu); + + +GLIB_AVAILABLE_IN_2_32 +GType g_menu_item_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_2_32 +GMenuItem * g_menu_item_new (const gchar *label, + const gchar *detailed_action); + +GLIB_AVAILABLE_IN_2_34 +GMenuItem * g_menu_item_new_from_model (GMenuModel *model, + gint item_index); + +GLIB_AVAILABLE_IN_2_32 +GMenuItem * g_menu_item_new_submenu (const gchar *label, + GMenuModel *submenu); + +GLIB_AVAILABLE_IN_2_32 +GMenuItem * g_menu_item_new_section (const gchar *label, + GMenuModel *section); + +GLIB_AVAILABLE_IN_2_34 +GVariant * g_menu_item_get_attribute_value (GMenuItem *menu_item, + const gchar *attribute, + const GVariantType *expected_type); +GLIB_AVAILABLE_IN_2_34 +gboolean g_menu_item_get_attribute (GMenuItem *menu_item, + const gchar *attribute, + const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_2_34 +GMenuModel *g_menu_item_get_link (GMenuItem *menu_item, + const gchar *link); + +GLIB_AVAILABLE_IN_2_32 +void g_menu_item_set_attribute_value (GMenuItem *menu_item, + const gchar *attribute, + GVariant *value); +GLIB_AVAILABLE_IN_2_32 +void g_menu_item_set_attribute (GMenuItem *menu_item, + const gchar *attribute, + const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_2_32 +void g_menu_item_set_link (GMenuItem *menu_item, + const gchar *link, + GMenuModel *model); +GLIB_AVAILABLE_IN_2_32 +void g_menu_item_set_label (GMenuItem *menu_item, + const gchar *label); +GLIB_AVAILABLE_IN_2_32 +void g_menu_item_set_submenu (GMenuItem *menu_item, + GMenuModel *submenu); +GLIB_AVAILABLE_IN_2_32 +void g_menu_item_set_section (GMenuItem *menu_item, + GMenuModel *section); +GLIB_AVAILABLE_IN_2_32 +void g_menu_item_set_action_and_target_value (GMenuItem *menu_item, + const gchar *action, + GVariant *target_value); +GLIB_AVAILABLE_IN_2_32 +void g_menu_item_set_action_and_target (GMenuItem *menu_item, + const gchar *action, + const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_2_32 +void g_menu_item_set_detailed_action (GMenuItem *menu_item, + const gchar *detailed_action); + +GLIB_AVAILABLE_IN_2_38 +void g_menu_item_set_icon (GMenuItem *menu_item, + GIcon *icon); + +G_END_DECLS + +#endif /* __G_MENU_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmenuexporter.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmenuexporter.h new file mode 100755 index 00000000..650aaf0e --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmenuexporter.h @@ -0,0 +1,40 @@ +/* + * Copyright © 2011 Canonical Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_MENU_EXPORTER_H__ +#define __G_MENU_EXPORTER_H__ + +#include <gio/gdbusconnection.h> +#include <gio/gmenumodel.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_2_32 +guint g_dbus_connection_export_menu_model (GDBusConnection *connection, + const gchar *object_path, + GMenuModel *menu, + GError **error); + +GLIB_AVAILABLE_IN_2_32 +void g_dbus_connection_unexport_menu_model (GDBusConnection *connection, + guint export_id); + +G_END_DECLS + +#endif /* __G_MENU_EXPORTER_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmenumodel.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmenumodel.h new file mode 100755 index 00000000..34c8d0f3 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmenumodel.h @@ -0,0 +1,305 @@ +/* + * Copyright © 2011 Canonical Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_MENU_MODEL_H__ +#define __G_MENU_MODEL_H__ + +#include <glib-object.h> + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +/** + * G_MENU_ATTRIBUTE_ACTION: + * + * The menu item attribute which holds the action name of the item. Action + * names are namespaced with an identifier for the action group in which the + * action resides. For example, "win." for window-specific actions and "app." + * for application-wide actions. + * + * See also g_menu_model_get_item_attribute() and g_menu_item_set_attribute(). + * + * Since: 2.32 + **/ +#define G_MENU_ATTRIBUTE_ACTION "action" + +/** + * G_MENU_ATTRIBUTE_ACTION_NAMESPACE: + * + * The menu item attribute that holds the namespace for all action names in + * menus that are linked from this item. + * + * Since: 2.36 + **/ +#define G_MENU_ATTRIBUTE_ACTION_NAMESPACE "action-namespace" + +/** + * G_MENU_ATTRIBUTE_TARGET: + * + * The menu item attribute which holds the target with which the item's action + * will be activated. + * + * See also g_menu_item_set_action_and_target() + * + * Since: 2.32 + **/ +#define G_MENU_ATTRIBUTE_TARGET "target" + +/** + * G_MENU_ATTRIBUTE_LABEL: + * + * The menu item attribute which holds the label of the item. + * + * Since: 2.32 + **/ +#define G_MENU_ATTRIBUTE_LABEL "label" + +/** + * G_MENU_ATTRIBUTE_ICON: + * + * The menu item attribute which holds the icon of the item. + * + * The icon is stored in the format returned by g_icon_serialize(). + * + * This attribute is intended only to represent 'noun' icons such as + * favicons for a webpage, or application icons. It should not be used + * for 'verbs' (ie: stock icons). + * + * Since: 2.38 + **/ +#define G_MENU_ATTRIBUTE_ICON "icon" + +/** + * G_MENU_LINK_SUBMENU: + * + * The name of the link that associates a menu item with a submenu. + * + * See also g_menu_item_set_link(). + * + * Since: 2.32 + **/ +#define G_MENU_LINK_SUBMENU "submenu" + +/** + * G_MENU_LINK_SECTION: + * + * The name of the link that associates a menu item with a section. The linked + * menu will usually be shown in place of the menu item, using the item's label + * as a header. + * + * See also g_menu_item_set_link(). + * + * Since: 2.32 + **/ +#define G_MENU_LINK_SECTION "section" + +#define G_TYPE_MENU_MODEL (g_menu_model_get_type ()) +#define G_MENU_MODEL(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_MENU_MODEL, GMenuModel)) +#define G_MENU_MODEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_MENU_MODEL, GMenuModelClass)) +#define G_IS_MENU_MODEL(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_MENU_MODEL)) +#define G_IS_MENU_MODEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_MENU_MODEL)) +#define G_MENU_MODEL_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_MENU_MODEL, GMenuModelClass)) + +typedef struct _GMenuModelPrivate GMenuModelPrivate; +typedef struct _GMenuModelClass GMenuModelClass; + +typedef struct _GMenuAttributeIterPrivate GMenuAttributeIterPrivate; +typedef struct _GMenuAttributeIterClass GMenuAttributeIterClass; +typedef struct _GMenuAttributeIter GMenuAttributeIter; + +typedef struct _GMenuLinkIterPrivate GMenuLinkIterPrivate; +typedef struct _GMenuLinkIterClass GMenuLinkIterClass; +typedef struct _GMenuLinkIter GMenuLinkIter; + +struct _GMenuModel +{ + GObject parent_instance; + GMenuModelPrivate *priv; +}; + +/** + * GMenuModelClass::get_item_attributes: + * @model: the #GMenuModel to query + * @item_index: The #GMenuItem to query + * @attributes: (out) (element-type utf8 GLib.Variant): Attributes on the item + * + * Gets all the attributes associated with the item in the menu model. + */ +/** + * GMenuModelClass::get_item_links: + * @model: the #GMenuModel to query + * @item_index: The #GMenuItem to query + * @links: (out) (element-type utf8 Gio.MenuModel): Links from the item + * + * Gets all the links associated with the item in the menu model. + */ +struct _GMenuModelClass +{ + GObjectClass parent_class; + + gboolean (*is_mutable) (GMenuModel *model); + gint (*get_n_items) (GMenuModel *model); + void (*get_item_attributes) (GMenuModel *model, + gint item_index, + GHashTable **attributes); + GMenuAttributeIter * (*iterate_item_attributes) (GMenuModel *model, + gint item_index); + GVariant * (*get_item_attribute_value) (GMenuModel *model, + gint item_index, + const gchar *attribute, + const GVariantType *expected_type); + void (*get_item_links) (GMenuModel *model, + gint item_index, + GHashTable **links); + GMenuLinkIter * (*iterate_item_links) (GMenuModel *model, + gint item_index); + GMenuModel * (*get_item_link) (GMenuModel *model, + gint item_index, + const gchar *link); +}; + +GLIB_AVAILABLE_IN_2_32 +GType g_menu_model_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_32 +gboolean g_menu_model_is_mutable (GMenuModel *model); +GLIB_AVAILABLE_IN_2_32 +gint g_menu_model_get_n_items (GMenuModel *model); + +GLIB_AVAILABLE_IN_2_32 +GMenuAttributeIter * g_menu_model_iterate_item_attributes (GMenuModel *model, + gint item_index); +GLIB_AVAILABLE_IN_2_32 +GVariant * g_menu_model_get_item_attribute_value (GMenuModel *model, + gint item_index, + const gchar *attribute, + const GVariantType *expected_type); +GLIB_AVAILABLE_IN_2_32 +gboolean g_menu_model_get_item_attribute (GMenuModel *model, + gint item_index, + const gchar *attribute, + const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_2_32 +GMenuLinkIter * g_menu_model_iterate_item_links (GMenuModel *model, + gint item_index); +GLIB_AVAILABLE_IN_2_32 +GMenuModel * g_menu_model_get_item_link (GMenuModel *model, + gint item_index, + const gchar *link); + +GLIB_AVAILABLE_IN_2_32 +void g_menu_model_items_changed (GMenuModel *model, + gint position, + gint removed, + gint added); + + +#define G_TYPE_MENU_ATTRIBUTE_ITER (g_menu_attribute_iter_get_type ()) +#define G_MENU_ATTRIBUTE_ITER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_MENU_ATTRIBUTE_ITER, GMenuAttributeIter)) +#define G_MENU_ATTRIBUTE_ITER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_MENU_ATTRIBUTE_ITER, GMenuAttributeIterClass)) +#define G_IS_MENU_ATTRIBUTE_ITER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_MENU_ATTRIBUTE_ITER)) +#define G_IS_MENU_ATTRIBUTE_ITER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_MENU_ATTRIBUTE_ITER)) +#define G_MENU_ATTRIBUTE_ITER_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_MENU_ATTRIBUTE_ITER, GMenuAttributeIterClass)) + +struct _GMenuAttributeIter +{ + GObject parent_instance; + GMenuAttributeIterPrivate *priv; +}; + +struct _GMenuAttributeIterClass +{ + GObjectClass parent_class; + + gboolean (*get_next) (GMenuAttributeIter *iter, + const gchar **out_name, + GVariant **value); +}; + +GLIB_AVAILABLE_IN_2_32 +GType g_menu_attribute_iter_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_32 +gboolean g_menu_attribute_iter_get_next (GMenuAttributeIter *iter, + const gchar **out_name, + GVariant **value); +GLIB_AVAILABLE_IN_2_32 +gboolean g_menu_attribute_iter_next (GMenuAttributeIter *iter); +GLIB_AVAILABLE_IN_2_32 +const gchar * g_menu_attribute_iter_get_name (GMenuAttributeIter *iter); +GLIB_AVAILABLE_IN_2_32 +GVariant * g_menu_attribute_iter_get_value (GMenuAttributeIter *iter); + + +#define G_TYPE_MENU_LINK_ITER (g_menu_link_iter_get_type ()) +#define G_MENU_LINK_ITER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_MENU_LINK_ITER, GMenuLinkIter)) +#define G_MENU_LINK_ITER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_MENU_LINK_ITER, GMenuLinkIterClass)) +#define G_IS_MENU_LINK_ITER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_MENU_LINK_ITER)) +#define G_IS_MENU_LINK_ITER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_MENU_LINK_ITER)) +#define G_MENU_LINK_ITER_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_MENU_LINK_ITER, GMenuLinkIterClass)) + +struct _GMenuLinkIter +{ + GObject parent_instance; + GMenuLinkIterPrivate *priv; +}; + +struct _GMenuLinkIterClass +{ + GObjectClass parent_class; + + gboolean (*get_next) (GMenuLinkIter *iter, + const gchar **out_link, + GMenuModel **value); +}; + +GLIB_AVAILABLE_IN_2_32 +GType g_menu_link_iter_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_32 +gboolean g_menu_link_iter_get_next (GMenuLinkIter *iter, + const gchar **out_link, + GMenuModel **value); +GLIB_AVAILABLE_IN_2_32 +gboolean g_menu_link_iter_next (GMenuLinkIter *iter); +GLIB_AVAILABLE_IN_2_32 +const gchar * g_menu_link_iter_get_name (GMenuLinkIter *iter); +GLIB_AVAILABLE_IN_2_32 +GMenuModel * g_menu_link_iter_get_value (GMenuLinkIter *iter); + +G_END_DECLS + +#endif /* __G_MENU_MODEL_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmount.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmount.h new file mode 100755 index 00000000..c376a613 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmount.h @@ -0,0 +1,276 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2008 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + * David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_MOUNT_H__ +#define __G_MOUNT_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_MOUNT (g_mount_get_type ()) +#define G_MOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_MOUNT, GMount)) +#define G_IS_MOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_MOUNT)) +#define G_MOUNT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_MOUNT, GMountIface)) + +typedef struct _GMountIface GMountIface; + +/** + * GMountIface: + * @g_iface: The parent interface. + * @changed: Changed signal that is emitted when the mount's state has changed. + * @unmounted: The unmounted signal that is emitted when the #GMount have been unmounted. If the recipient is holding references to the object they should release them so the object can be finalized. + * @pre_unmount: The ::pre-unmount signal that is emitted when the #GMount will soon be emitted. If the recipient is somehow holding the mount open by keeping an open file on it it should close the file. + * @get_root: Gets a #GFile to the root directory of the #GMount. + * @get_name: Gets a string containing the name of the #GMount. + * @get_icon: Gets a #GIcon for the #GMount. + * @get_uuid: Gets the UUID for the #GMount. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns %NULL if there is no UUID available. + * @get_volume: Gets a #GVolume the mount is located on. Returns %NULL if the #GMount is not associated with a #GVolume. + * @get_drive: Gets a #GDrive the volume of the mount is located on. Returns %NULL if the #GMount is not associated with a #GDrive or a #GVolume. This is convenience method for getting the #GVolume and using that to get the #GDrive. + * @can_unmount: Checks if a #GMount can be unmounted. + * @can_eject: Checks if a #GMount can be ejected. + * @unmount: Starts unmounting a #GMount. + * @unmount_finish: Finishes an unmounting operation. + * @eject: Starts ejecting a #GMount. + * @eject_finish: Finishes an eject operation. + * @remount: Starts remounting a #GMount. + * @remount_finish: Finishes a remounting operation. + * @guess_content_type: Starts guessing the type of the content of a #GMount. + * See g_mount_guess_content_type() for more information on content + * type guessing. This operation was added in 2.18. + * @guess_content_type_finish: Finishes a content type guessing operation. Added in 2.18. + * @guess_content_type_sync: Synchronous variant of @guess_content_type. Added in 2.18 + * @unmount_with_operation: Starts unmounting a #GMount using a #GMountOperation. Since 2.22. + * @unmount_with_operation_finish: Finishes an unmounting operation using a #GMountOperation. Since 2.22. + * @eject_with_operation: Starts ejecting a #GMount using a #GMountOperation. Since 2.22. + * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22. + * @get_default_location: Gets a #GFile indication a start location that can be use as the entry point for this mount. Since 2.24. + * @get_sort_key: Gets a key used for sorting #GMount instance or %NULL if no such key exists. Since 2.32. + * @get_symbolic_icon: Gets a symbolic #GIcon for the #GMount. Since 2.34. + * + * Interface for implementing operations for mounts. + **/ +struct _GMountIface +{ + GTypeInterface g_iface; + + /* signals */ + + void (* changed) (GMount *mount); + void (* unmounted) (GMount *mount); + + /* Virtual Table */ + + GFile * (* get_root) (GMount *mount); + char * (* get_name) (GMount *mount); + GIcon * (* get_icon) (GMount *mount); + char * (* get_uuid) (GMount *mount); + GVolume * (* get_volume) (GMount *mount); + GDrive * (* get_drive) (GMount *mount); + gboolean (* can_unmount) (GMount *mount); + gboolean (* can_eject) (GMount *mount); + + void (* unmount) (GMount *mount, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* unmount_finish) (GMount *mount, + GAsyncResult *result, + GError **error); + + void (* eject) (GMount *mount, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* eject_finish) (GMount *mount, + GAsyncResult *result, + GError **error); + + void (* remount) (GMount *mount, + GMountMountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* remount_finish) (GMount *mount, + GAsyncResult *result, + GError **error); + + void (* guess_content_type) (GMount *mount, + gboolean force_rescan, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gchar ** (* guess_content_type_finish) (GMount *mount, + GAsyncResult *result, + GError **error); + gchar ** (* guess_content_type_sync) (GMount *mount, + gboolean force_rescan, + GCancellable *cancellable, + GError **error); + + /* Signal, not VFunc */ + void (* pre_unmount) (GMount *mount); + + void (* unmount_with_operation) (GMount *mount, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* unmount_with_operation_finish) (GMount *mount, + GAsyncResult *result, + GError **error); + + void (* eject_with_operation) (GMount *mount, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* eject_with_operation_finish) (GMount *mount, + GAsyncResult *result, + GError **error); + GFile * (* get_default_location) (GMount *mount); + + const gchar * (* get_sort_key) (GMount *mount); + GIcon * (* get_symbolic_icon) (GMount *mount); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_mount_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GFile * g_mount_get_root (GMount *mount); +GLIB_AVAILABLE_IN_ALL +GFile * g_mount_get_default_location (GMount *mount); +GLIB_AVAILABLE_IN_ALL +char * g_mount_get_name (GMount *mount); +GLIB_AVAILABLE_IN_ALL +GIcon * g_mount_get_icon (GMount *mount); +GLIB_AVAILABLE_IN_ALL +GIcon * g_mount_get_symbolic_icon (GMount *mount); +GLIB_AVAILABLE_IN_ALL +char * g_mount_get_uuid (GMount *mount); +GLIB_AVAILABLE_IN_ALL +GVolume * g_mount_get_volume (GMount *mount); +GLIB_AVAILABLE_IN_ALL +GDrive * g_mount_get_drive (GMount *mount); +GLIB_AVAILABLE_IN_ALL +gboolean g_mount_can_unmount (GMount *mount); +GLIB_AVAILABLE_IN_ALL +gboolean g_mount_can_eject (GMount *mount); + +GLIB_DEPRECATED_FOR(g_mount_unmount_with_operation) +void g_mount_unmount (GMount *mount, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_DEPRECATED_FOR(g_mount_unmount_with_operation_finish) +gboolean g_mount_unmount_finish (GMount *mount, + GAsyncResult *result, + GError **error); + +GLIB_DEPRECATED_FOR(g_mount_eject_with_operation) +void g_mount_eject (GMount *mount, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_DEPRECATED_FOR(g_mount_eject_with_operation_finish) +gboolean g_mount_eject_finish (GMount *mount, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_mount_remount (GMount *mount, + GMountMountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_mount_remount_finish (GMount *mount, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_mount_guess_content_type (GMount *mount, + gboolean force_rescan, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gchar ** g_mount_guess_content_type_finish (GMount *mount, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar ** g_mount_guess_content_type_sync (GMount *mount, + gboolean force_rescan, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_mount_is_shadowed (GMount *mount); +GLIB_AVAILABLE_IN_ALL +void g_mount_shadow (GMount *mount); +GLIB_AVAILABLE_IN_ALL +void g_mount_unshadow (GMount *mount); + +GLIB_AVAILABLE_IN_ALL +void g_mount_unmount_with_operation (GMount *mount, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_mount_unmount_with_operation_finish (GMount *mount, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_mount_eject_with_operation (GMount *mount, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_mount_eject_with_operation_finish (GMount *mount, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +const gchar *g_mount_get_sort_key (GMount *mount); + +G_END_DECLS + +#endif /* __G_MOUNT_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmountoperation.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmountoperation.h new file mode 100755 index 00000000..24b96e00 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gmountoperation.h @@ -0,0 +1,155 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_MOUNT_OPERATION_H__ +#define __G_MOUNT_OPERATION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_MOUNT_OPERATION (g_mount_operation_get_type ()) +#define G_MOUNT_OPERATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_MOUNT_OPERATION, GMountOperation)) +#define G_MOUNT_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_MOUNT_OPERATION, GMountOperationClass)) +#define G_IS_MOUNT_OPERATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_MOUNT_OPERATION)) +#define G_IS_MOUNT_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_MOUNT_OPERATION)) +#define G_MOUNT_OPERATION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_MOUNT_OPERATION, GMountOperationClass)) + +/** + * GMountOperation: + * + * Class for providing authentication methods for mounting operations, + * such as mounting a file locally, or authenticating with a server. + **/ +typedef struct _GMountOperationClass GMountOperationClass; +typedef struct _GMountOperationPrivate GMountOperationPrivate; + +struct _GMountOperation +{ + GObject parent_instance; + + GMountOperationPrivate *priv; +}; + +struct _GMountOperationClass +{ + GObjectClass parent_class; + + /* signals: */ + + void (* ask_password) (GMountOperation *op, + const char *message, + const char *default_user, + const char *default_domain, + GAskPasswordFlags flags); + + /** + * GMountOperationClass::ask_question: + * @op: + * @message: + * @choices: (array zero-terminated=1) (element-type utf8): + */ + void (* ask_question) (GMountOperation *op, + const char *message, + const char *choices[]); + + void (* reply) (GMountOperation *op, + GMountOperationResult result); + + void (* aborted) (GMountOperation *op); + + /** + * GMountOperationClass::show_processes: + * @op: + * @message: + * @processes: (element-type GPid): + * @choices: (array zero-terminated=1) (element-type utf8): + * + * Since: 2.22 + */ + void (* show_processes) (GMountOperation *op, + const gchar *message, + GArray *processes, + const gchar *choices[]); + + void (* show_unmount_progress) (GMountOperation *op, + const gchar *message, + gint64 time_left, + gint64 bytes_left); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); + void (*_g_reserved7) (void); + void (*_g_reserved8) (void); + void (*_g_reserved9) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_mount_operation_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GMountOperation * g_mount_operation_new (void); + +GLIB_AVAILABLE_IN_ALL +const char * g_mount_operation_get_username (GMountOperation *op); +GLIB_AVAILABLE_IN_ALL +void g_mount_operation_set_username (GMountOperation *op, + const char *username); +GLIB_AVAILABLE_IN_ALL +const char * g_mount_operation_get_password (GMountOperation *op); +GLIB_AVAILABLE_IN_ALL +void g_mount_operation_set_password (GMountOperation *op, + const char *password); +GLIB_AVAILABLE_IN_ALL +gboolean g_mount_operation_get_anonymous (GMountOperation *op); +GLIB_AVAILABLE_IN_ALL +void g_mount_operation_set_anonymous (GMountOperation *op, + gboolean anonymous); +GLIB_AVAILABLE_IN_ALL +const char * g_mount_operation_get_domain (GMountOperation *op); +GLIB_AVAILABLE_IN_ALL +void g_mount_operation_set_domain (GMountOperation *op, + const char *domain); +GLIB_AVAILABLE_IN_ALL +GPasswordSave g_mount_operation_get_password_save (GMountOperation *op); +GLIB_AVAILABLE_IN_ALL +void g_mount_operation_set_password_save (GMountOperation *op, + GPasswordSave save); +GLIB_AVAILABLE_IN_ALL +int g_mount_operation_get_choice (GMountOperation *op); +GLIB_AVAILABLE_IN_ALL +void g_mount_operation_set_choice (GMountOperation *op, + int choice); +GLIB_AVAILABLE_IN_ALL +void g_mount_operation_reply (GMountOperation *op, + GMountOperationResult result); + +G_END_DECLS + +#endif /* __G_MOUNT_OPERATION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gnativevolumemonitor.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gnativevolumemonitor.h new file mode 100755 index 00000000..73905470 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gnativevolumemonitor.h @@ -0,0 +1,61 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_NATIVE_VOLUME_MONITOR_H__ +#define __G_NATIVE_VOLUME_MONITOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gvolumemonitor.h> + +G_BEGIN_DECLS + +#define G_TYPE_NATIVE_VOLUME_MONITOR (g_native_volume_monitor_get_type ()) +#define G_NATIVE_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_NATIVE_VOLUME_MONITOR, GNativeVolumeMonitor)) +#define G_NATIVE_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_NATIVE_VOLUME_MONITOR, GNativeVolumeMonitorClass)) +#define G_IS_NATIVE_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_NATIVE_VOLUME_MONITOR)) +#define G_IS_NATIVE_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_NATIVE_VOLUME_MONITOR)) + +#define G_NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME "gio-native-volume-monitor" + +typedef struct _GNativeVolumeMonitor GNativeVolumeMonitor; +typedef struct _GNativeVolumeMonitorClass GNativeVolumeMonitorClass; + +struct _GNativeVolumeMonitor +{ + GVolumeMonitor parent_instance; +}; + +struct _GNativeVolumeMonitorClass +{ + GVolumeMonitorClass parent_class; + + GMount * (* get_mount_for_mount_path) (const char *mount_path, + GCancellable *cancellable); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_native_volume_monitor_get_type (void) G_GNUC_CONST; + +G_END_DECLS + +#endif /* __G_NATIVE_VOLUME_MONITOR_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gnetworkaddress.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gnetworkaddress.h new file mode 100755 index 00000000..10bb0b50 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gnetworkaddress.h @@ -0,0 +1,80 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_NETWORK_ADDRESS_H__ +#define __G_NETWORK_ADDRESS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_NETWORK_ADDRESS (g_network_address_get_type ()) +#define G_NETWORK_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_NETWORK_ADDRESS, GNetworkAddress)) +#define G_NETWORK_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_NETWORK_ADDRESS, GNetworkAddressClass)) +#define G_IS_NETWORK_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_NETWORK_ADDRESS)) +#define G_IS_NETWORK_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_NETWORK_ADDRESS)) +#define G_NETWORK_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_NETWORK_ADDRESS, GNetworkAddressClass)) + +typedef struct _GNetworkAddressClass GNetworkAddressClass; +typedef struct _GNetworkAddressPrivate GNetworkAddressPrivate; + +struct _GNetworkAddress +{ + GObject parent_instance; + + /*< private >*/ + GNetworkAddressPrivate *priv; +}; + +struct _GNetworkAddressClass +{ + GObjectClass parent_class; + +}; + +GLIB_AVAILABLE_IN_ALL +GType g_network_address_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GSocketConnectable *g_network_address_new (const gchar *hostname, + guint16 port); +GLIB_AVAILABLE_IN_2_44 +GSocketConnectable *g_network_address_new_loopback (guint16 port); +GLIB_AVAILABLE_IN_ALL +GSocketConnectable *g_network_address_parse (const gchar *host_and_port, + guint16 default_port, + GError **error); +GLIB_AVAILABLE_IN_ALL +GSocketConnectable *g_network_address_parse_uri (const gchar *uri, + guint16 default_port, + GError **error); +GLIB_AVAILABLE_IN_ALL +const gchar *g_network_address_get_hostname (GNetworkAddress *addr); +GLIB_AVAILABLE_IN_ALL +guint16 g_network_address_get_port (GNetworkAddress *addr); +GLIB_AVAILABLE_IN_ALL +const gchar *g_network_address_get_scheme (GNetworkAddress *addr); + + +G_END_DECLS + +#endif /* __G_NETWORK_ADDRESS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gnetworking.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gnetworking.h new file mode 100755 index 00000000..34e1bb56 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gnetworking.h @@ -0,0 +1,82 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008-2011 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_NETWORKING_H__ +#define __G_NETWORKING_H__ + +#include <glib.h> + +#ifdef G_OS_WIN32 + +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0501 +#endif +#include <winsock2.h> +#include <ws2tcpip.h> +#include <windns.h> +#include <mswsock.h> + +#include <iphlpapi.h> +#undef interface + +#else /* !G_OS_WIN32 */ + +#include <sys/types.h> + +#include <netdb.h> +#include <netinet/in.h> +#include <netinet/tcp.h> +#include <resolv.h> +#include <sys/socket.h> +#include <sys/un.h> +#include <net/if.h> + +#include <arpa/inet.h> +#include <arpa/nameser.h> +#include <arpa/nameser_compat.h> + +#ifndef T_SRV +#define T_SRV 33 +#endif + +#ifndef _PATH_RESCONF +#define _PATH_RESCONF "/etc/resolv.conf" +#endif + +#ifndef CMSG_LEN +/* CMSG_LEN and CMSG_SPACE are defined by RFC 2292, but missing on + * some older platforms. + */ +#define CMSG_LEN(len) ((size_t)CMSG_DATA((struct cmsghdr *)NULL) + (len)) + +/* CMSG_SPACE must add at least as much padding as CMSG_NXTHDR() + * adds. We overestimate here. + */ +#define GLIB_ALIGN_TO_SIZEOF(len, obj) (((len) + sizeof (obj) - 1) & ~(sizeof (obj) - 1)) +#define CMSG_SPACE(len) GLIB_ALIGN_TO_SIZEOF (CMSG_LEN (len), struct cmsghdr) +#endif +#endif + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_2_36 +void g_networking_init (void); + +G_END_DECLS + +#endif /* __G_NETWORKING_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gnetworkmonitor.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gnetworkmonitor.h new file mode 100755 index 00000000..dcaeaad3 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gnetworkmonitor.h @@ -0,0 +1,99 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright 2011 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_NETWORK_MONITOR_H__ +#define __G_NETWORK_MONITOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +/** + * G_NETWORK_MONITOR_EXTENSION_POINT_NAME: + * + * Extension point for network status monitoring functionality. + * See [Extending GIO][extending-gio]. + * + * Since: 2.30 + */ +#define G_NETWORK_MONITOR_EXTENSION_POINT_NAME "gio-network-monitor" + +#define G_TYPE_NETWORK_MONITOR (g_network_monitor_get_type ()) +#define G_NETWORK_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_NETWORK_MONITOR, GNetworkMonitor)) +#define G_IS_NETWORK_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_NETWORK_MONITOR)) +#define G_NETWORK_MONITOR_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), G_TYPE_NETWORK_MONITOR, GNetworkMonitorInterface)) + +typedef struct _GNetworkMonitorInterface GNetworkMonitorInterface; + +struct _GNetworkMonitorInterface { + GTypeInterface g_iface; + + void (*network_changed) (GNetworkMonitor *monitor, + gboolean network_available); + + gboolean (*can_reach) (GNetworkMonitor *monitor, + GSocketConnectable *connectable, + GCancellable *cancellable, + GError **error); + void (*can_reach_async) (GNetworkMonitor *monitor, + GSocketConnectable *connectable, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*can_reach_finish) (GNetworkMonitor *monitor, + GAsyncResult *result, + GError **error); +}; + +GLIB_AVAILABLE_IN_2_32 +GType g_network_monitor_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_2_32 +GNetworkMonitor *g_network_monitor_get_default (void); + +GLIB_AVAILABLE_IN_2_32 +gboolean g_network_monitor_get_network_available (GNetworkMonitor *monitor); + +GLIB_AVAILABLE_IN_2_46 +gboolean g_network_monitor_get_network_metered (GNetworkMonitor *monitor); + +GLIB_AVAILABLE_IN_2_44 +GNetworkConnectivity g_network_monitor_get_connectivity (GNetworkMonitor *monitor); + +GLIB_AVAILABLE_IN_2_32 +gboolean g_network_monitor_can_reach (GNetworkMonitor *monitor, + GSocketConnectable *connectable, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_2_32 +void g_network_monitor_can_reach_async (GNetworkMonitor *monitor, + GSocketConnectable *connectable, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_2_32 +gboolean g_network_monitor_can_reach_finish (GNetworkMonitor *monitor, + GAsyncResult *result, + GError **error); + +G_END_DECLS + +#endif /* __G_NETWORK_MONITOR_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gnetworkservice.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gnetworkservice.h new file mode 100755 index 00000000..9cdb4ab4 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gnetworkservice.h @@ -0,0 +1,76 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_NETWORK_SERVICE_H__ +#define __G_NETWORK_SERVICE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_NETWORK_SERVICE (g_network_service_get_type ()) +#define G_NETWORK_SERVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_NETWORK_SERVICE, GNetworkService)) +#define G_NETWORK_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_NETWORK_SERVICE, GNetworkServiceClass)) +#define G_IS_NETWORK_SERVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_NETWORK_SERVICE)) +#define G_IS_NETWORK_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_NETWORK_SERVICE)) +#define G_NETWORK_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_NETWORK_SERVICE, GNetworkServiceClass)) + +typedef struct _GNetworkServiceClass GNetworkServiceClass; +typedef struct _GNetworkServicePrivate GNetworkServicePrivate; + +struct _GNetworkService +{ + GObject parent_instance; + + /*< private >*/ + GNetworkServicePrivate *priv; +}; + +struct _GNetworkServiceClass +{ + GObjectClass parent_class; + +}; + +GLIB_AVAILABLE_IN_ALL +GType g_network_service_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GSocketConnectable *g_network_service_new (const gchar *service, + const gchar *protocol, + const gchar *domain); + +GLIB_AVAILABLE_IN_ALL +const gchar *g_network_service_get_service (GNetworkService *srv); +GLIB_AVAILABLE_IN_ALL +const gchar *g_network_service_get_protocol (GNetworkService *srv); +GLIB_AVAILABLE_IN_ALL +const gchar *g_network_service_get_domain (GNetworkService *srv); +GLIB_AVAILABLE_IN_ALL +const gchar *g_network_service_get_scheme (GNetworkService *srv); +GLIB_AVAILABLE_IN_ALL +void g_network_service_set_scheme (GNetworkService *srv, const gchar *scheme); + +G_END_DECLS + +#endif /* __G_NETWORK_SERVICE_H__ */ + diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gnotification.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gnotification.h new file mode 100755 index 00000000..55e68301 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gnotification.h @@ -0,0 +1,97 @@ +/* + * Copyright © 2013 Lars Uebernickel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Lars Uebernickel <lars@uebernic.de> + */ + +#ifndef __G_NOTIFICATION_H__ +#define __G_NOTIFICATION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> +#include <gio/gioenums.h> + +G_BEGIN_DECLS + +#define G_TYPE_NOTIFICATION (g_notification_get_type ()) +#define G_NOTIFICATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_NOTIFICATION, GNotification)) +#define G_IS_NOTIFICATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_NOTIFICATION)) + +GLIB_AVAILABLE_IN_2_40 +GType g_notification_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_40 +GNotification * g_notification_new (const gchar *title); + +GLIB_AVAILABLE_IN_2_40 +void g_notification_set_title (GNotification *notification, + const gchar *title); + +GLIB_AVAILABLE_IN_2_40 +void g_notification_set_body (GNotification *notification, + const gchar *body); + +GLIB_AVAILABLE_IN_2_40 +void g_notification_set_icon (GNotification *notification, + GIcon *icon); + +GLIB_DEPRECATED_IN_2_42_FOR(g_notification_set_priority) +void g_notification_set_urgent (GNotification *notification, + gboolean urgent); + +GLIB_AVAILABLE_IN_2_42 +void g_notification_set_priority (GNotification *notification, + GNotificationPriority priority); + +GLIB_AVAILABLE_IN_2_40 +void g_notification_add_button (GNotification *notification, + const gchar *label, + const gchar *detailed_action); + +GLIB_AVAILABLE_IN_2_40 +void g_notification_add_button_with_target (GNotification *notification, + const gchar *label, + const gchar *action, + const gchar *target_format, + ...); + +GLIB_AVAILABLE_IN_2_40 +void g_notification_add_button_with_target_value (GNotification *notification, + const gchar *label, + const gchar *action, + GVariant *target); + +GLIB_AVAILABLE_IN_2_40 +void g_notification_set_default_action (GNotification *notification, + const gchar *detailed_action); + +GLIB_AVAILABLE_IN_2_40 +void g_notification_set_default_action_and_target (GNotification *notification, + const gchar *action, + const gchar *target_format, + ...); + +GLIB_AVAILABLE_IN_2_40 +void g_notification_set_default_action_and_target_value (GNotification *notification, + const gchar *action, + GVariant *target); + +G_END_DECLS + +#endif diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/goutputstream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/goutputstream.h new file mode 100755 index 00000000..fef1b8fd --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/goutputstream.h @@ -0,0 +1,270 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_OUTPUT_STREAM_H__ +#define __G_OUTPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_OUTPUT_STREAM (g_output_stream_get_type ()) +#define G_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_OUTPUT_STREAM, GOutputStream)) +#define G_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_OUTPUT_STREAM, GOutputStreamClass)) +#define G_IS_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_OUTPUT_STREAM)) +#define G_IS_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_OUTPUT_STREAM)) +#define G_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_OUTPUT_STREAM, GOutputStreamClass)) + +/** + * GOutputStream: + * + * Base class for writing output. + * + * All classes derived from GOutputStream should implement synchronous + * writing, splicing, flushing and closing streams, but may implement + * asynchronous versions. + **/ +typedef struct _GOutputStreamClass GOutputStreamClass; +typedef struct _GOutputStreamPrivate GOutputStreamPrivate; + +struct _GOutputStream +{ + GObject parent_instance; + + /*< private >*/ + GOutputStreamPrivate *priv; +}; + + +struct _GOutputStreamClass +{ + GObjectClass parent_class; + + /* Sync ops: */ + + gssize (* write_fn) (GOutputStream *stream, + const void *buffer, + gsize count, + GCancellable *cancellable, + GError **error); + gssize (* splice) (GOutputStream *stream, + GInputStream *source, + GOutputStreamSpliceFlags flags, + GCancellable *cancellable, + GError **error); + gboolean (* flush) (GOutputStream *stream, + GCancellable *cancellable, + GError **error); + gboolean (* close_fn) (GOutputStream *stream, + GCancellable *cancellable, + GError **error); + + /* Async ops: (optional in derived classes) */ + + void (* write_async) (GOutputStream *stream, + const void *buffer, + gsize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gssize (* write_finish) (GOutputStream *stream, + GAsyncResult *result, + GError **error); + void (* splice_async) (GOutputStream *stream, + GInputStream *source, + GOutputStreamSpliceFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gssize (* splice_finish) (GOutputStream *stream, + GAsyncResult *result, + GError **error); + void (* flush_async) (GOutputStream *stream, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* flush_finish) (GOutputStream *stream, + GAsyncResult *result, + GError **error); + void (* close_async) (GOutputStream *stream, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* close_finish) (GOutputStream *stream, + GAsyncResult *result, + GError **error); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); + void (*_g_reserved7) (void); + void (*_g_reserved8) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_output_stream_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +gssize g_output_stream_write (GOutputStream *stream, + const void *buffer, + gsize count, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_output_stream_write_all (GOutputStream *stream, + const void *buffer, + gsize count, + gsize *bytes_written, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_2_40 +gboolean g_output_stream_printf (GOutputStream *stream, + gsize *bytes_written, + GCancellable *cancellable, + GError **error, + const gchar *format, + ...) G_GNUC_PRINTF (5, 6); +GLIB_AVAILABLE_IN_2_40 +gboolean g_output_stream_vprintf (GOutputStream *stream, + gsize *bytes_written, + GCancellable *cancellable, + GError **error, + const gchar *format, + va_list args) G_GNUC_PRINTF (5, 0); +GLIB_AVAILABLE_IN_2_34 +gssize g_output_stream_write_bytes (GOutputStream *stream, + GBytes *bytes, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gssize g_output_stream_splice (GOutputStream *stream, + GInputStream *source, + GOutputStreamSpliceFlags flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_output_stream_flush (GOutputStream *stream, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_output_stream_close (GOutputStream *stream, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_output_stream_write_async (GOutputStream *stream, + const void *buffer, + gsize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gssize g_output_stream_write_finish (GOutputStream *stream, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_2_44 +void g_output_stream_write_all_async (GOutputStream *stream, + const void *buffer, + gsize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_44 +gboolean g_output_stream_write_all_finish (GOutputStream *stream, + GAsyncResult *result, + gsize *bytes_written, + GError **error); + +GLIB_AVAILABLE_IN_2_34 +void g_output_stream_write_bytes_async (GOutputStream *stream, + GBytes *bytes, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_2_34 +gssize g_output_stream_write_bytes_finish (GOutputStream *stream, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_output_stream_splice_async (GOutputStream *stream, + GInputStream *source, + GOutputStreamSpliceFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gssize g_output_stream_splice_finish (GOutputStream *stream, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_output_stream_flush_async (GOutputStream *stream, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_output_stream_flush_finish (GOutputStream *stream, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_output_stream_close_async (GOutputStream *stream, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_output_stream_close_finish (GOutputStream *stream, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_output_stream_is_closed (GOutputStream *stream); +GLIB_AVAILABLE_IN_ALL +gboolean g_output_stream_is_closing (GOutputStream *stream); +GLIB_AVAILABLE_IN_ALL +gboolean g_output_stream_has_pending (GOutputStream *stream); +GLIB_AVAILABLE_IN_ALL +gboolean g_output_stream_set_pending (GOutputStream *stream, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_output_stream_clear_pending (GOutputStream *stream); + + +G_END_DECLS + +#endif /* __G_OUTPUT_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gpermission.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gpermission.h new file mode 100755 index 00000000..0c2b0bdf --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gpermission.h @@ -0,0 +1,127 @@ +/* + * Copyright © 2010 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_PERMISSION_H__ +#define __G_PERMISSION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_PERMISSION (g_permission_get_type ()) +#define G_PERMISSION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_PERMISSION, GPermission)) +#define G_PERMISSION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_PERMISSION, GPermissionClass)) +#define G_IS_PERMISSION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_PERMISSION)) +#define G_IS_PERMISSION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_PERMISSION)) +#define G_PERMISSION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_PERMISSION, GPermissionClass)) + +typedef struct _GPermissionPrivate GPermissionPrivate; +typedef struct _GPermissionClass GPermissionClass; + +struct _GPermission +{ + GObject parent_instance; + + /*< private >*/ + GPermissionPrivate *priv; +}; + +struct _GPermissionClass { + GObjectClass parent_class; + + gboolean (*acquire) (GPermission *permission, + GCancellable *cancellable, + GError **error); + void (*acquire_async) (GPermission *permission, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*acquire_finish) (GPermission *permission, + GAsyncResult *result, + GError **error); + + gboolean (*release) (GPermission *permission, + GCancellable *cancellable, + GError **error); + void (*release_async) (GPermission *permission, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*release_finish) (GPermission *permission, + GAsyncResult *result, + GError **error); + + gpointer reserved[16]; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_permission_get_type (void); +GLIB_AVAILABLE_IN_ALL +gboolean g_permission_acquire (GPermission *permission, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_permission_acquire_async (GPermission *permission, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_permission_acquire_finish (GPermission *permission, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_permission_release (GPermission *permission, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_permission_release_async (GPermission *permission, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_permission_release_finish (GPermission *permission, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_permission_get_allowed (GPermission *permission); +GLIB_AVAILABLE_IN_ALL +gboolean g_permission_get_can_acquire (GPermission *permission); +GLIB_AVAILABLE_IN_ALL +gboolean g_permission_get_can_release (GPermission *permission); + +GLIB_AVAILABLE_IN_ALL +void g_permission_impl_update (GPermission *permission, + gboolean allowed, + gboolean can_acquire, + gboolean can_release); + +G_END_DECLS + +#endif /* __G_PERMISSION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gpollableinputstream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gpollableinputstream.h new file mode 100755 index 00000000..ce50312e --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gpollableinputstream.h @@ -0,0 +1,105 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_POLLABLE_INPUT_STREAM_H__ +#define __G_POLLABLE_INPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gio.h> + +G_BEGIN_DECLS + +#define G_TYPE_POLLABLE_INPUT_STREAM (g_pollable_input_stream_get_type ()) +#define G_POLLABLE_INPUT_STREAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_POLLABLE_INPUT_STREAM, GPollableInputStream)) +#define G_IS_POLLABLE_INPUT_STREAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_POLLABLE_INPUT_STREAM)) +#define G_POLLABLE_INPUT_STREAM_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_POLLABLE_INPUT_STREAM, GPollableInputStreamInterface)) + +/** + * GPollableInputStream: + * + * An interface for a #GInputStream that can be polled for readability. + * + * Since: 2.28 + */ +typedef struct _GPollableInputStreamInterface GPollableInputStreamInterface; + +/** + * GPollableInputStreamInterface: + * @g_iface: The parent interface. + * @can_poll: Checks if the #GPollableInputStream instance is actually pollable + * @is_readable: Checks if the stream is readable + * @create_source: Creates a #GSource to poll the stream + * @read_nonblocking: Does a non-blocking read or returns + * %G_IO_ERROR_WOULD_BLOCK + * + * The interface for pollable input streams. + * + * The default implementation of @can_poll always returns %TRUE. + * + * The default implementation of @read_nonblocking calls + * g_pollable_input_stream_is_readable(), and then calls + * g_input_stream_read() if it returns %TRUE. This means you only need + * to override it if it is possible that your @is_readable + * implementation may return %TRUE when the stream is not actually + * readable. + * + * Since: 2.28 + */ +struct _GPollableInputStreamInterface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + gboolean (*can_poll) (GPollableInputStream *stream); + + gboolean (*is_readable) (GPollableInputStream *stream); + GSource * (*create_source) (GPollableInputStream *stream, + GCancellable *cancellable); + gssize (*read_nonblocking) (GPollableInputStream *stream, + void *buffer, + gsize count, + GError **error); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_pollable_input_stream_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +gboolean g_pollable_input_stream_can_poll (GPollableInputStream *stream); + +GLIB_AVAILABLE_IN_ALL +gboolean g_pollable_input_stream_is_readable (GPollableInputStream *stream); +GLIB_AVAILABLE_IN_ALL +GSource *g_pollable_input_stream_create_source (GPollableInputStream *stream, + GCancellable *cancellable); + +GLIB_AVAILABLE_IN_ALL +gssize g_pollable_input_stream_read_nonblocking (GPollableInputStream *stream, + void *buffer, + gsize count, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + + +#endif /* __G_POLLABLE_INPUT_STREAM_H__ */ + diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gpollableoutputstream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gpollableoutputstream.h new file mode 100755 index 00000000..bf13584d --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gpollableoutputstream.h @@ -0,0 +1,105 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_POLLABLE_OUTPUT_STREAM_H__ +#define __G_POLLABLE_OUTPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gio.h> + +G_BEGIN_DECLS + +#define G_TYPE_POLLABLE_OUTPUT_STREAM (g_pollable_output_stream_get_type ()) +#define G_POLLABLE_OUTPUT_STREAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_POLLABLE_OUTPUT_STREAM, GPollableOutputStream)) +#define G_IS_POLLABLE_OUTPUT_STREAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_POLLABLE_OUTPUT_STREAM)) +#define G_POLLABLE_OUTPUT_STREAM_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_POLLABLE_OUTPUT_STREAM, GPollableOutputStreamInterface)) + +/** + * GPollableOutputStream: + * + * An interface for a #GOutputStream that can be polled for readability. + * + * Since: 2.28 + */ +typedef struct _GPollableOutputStreamInterface GPollableOutputStreamInterface; + +/** + * GPollableOutputStreamInterface: + * @g_iface: The parent interface. + * @can_poll: Checks if the #GPollableOutputStream instance is actually pollable + * @is_writable: Checks if the stream is writable + * @create_source: Creates a #GSource to poll the stream + * @write_nonblocking: Does a non-blocking write or returns + * %G_IO_ERROR_WOULD_BLOCK + * + * The interface for pollable output streams. + * + * The default implementation of @can_poll always returns %TRUE. + * + * The default implementation of @write_nonblocking calls + * g_pollable_output_stream_is_writable(), and then calls + * g_output_stream_write() if it returns %TRUE. This means you only + * need to override it if it is possible that your @is_writable + * implementation may return %TRUE when the stream is not actually + * writable. + * + * Since: 2.28 + */ +struct _GPollableOutputStreamInterface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + gboolean (*can_poll) (GPollableOutputStream *stream); + + gboolean (*is_writable) (GPollableOutputStream *stream); + GSource * (*create_source) (GPollableOutputStream *stream, + GCancellable *cancellable); + gssize (*write_nonblocking) (GPollableOutputStream *stream, + const void *buffer, + gsize count, + GError **error); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_pollable_output_stream_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +gboolean g_pollable_output_stream_can_poll (GPollableOutputStream *stream); + +GLIB_AVAILABLE_IN_ALL +gboolean g_pollable_output_stream_is_writable (GPollableOutputStream *stream); +GLIB_AVAILABLE_IN_ALL +GSource *g_pollable_output_stream_create_source (GPollableOutputStream *stream, + GCancellable *cancellable); + +GLIB_AVAILABLE_IN_ALL +gssize g_pollable_output_stream_write_nonblocking (GPollableOutputStream *stream, + const void *buffer, + gsize count, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + + +#endif /* __G_POLLABLE_OUTPUT_STREAM_H__ */ + diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gpollableutils.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gpollableutils.h new file mode 100755 index 00000000..007048cf --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gpollableutils.h @@ -0,0 +1,64 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2012 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_POLLABLE_UTILS_H__ +#define __G_POLLABLE_UTILS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gio.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +GSource *g_pollable_source_new (GObject *pollable_stream); + +GLIB_AVAILABLE_IN_2_34 +GSource *g_pollable_source_new_full (gpointer pollable_stream, + GSource *child_source, + GCancellable *cancellable); + +GLIB_AVAILABLE_IN_2_34 +gssize g_pollable_stream_read (GInputStream *stream, + void *buffer, + gsize count, + gboolean blocking, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_2_34 +gssize g_pollable_stream_write (GOutputStream *stream, + const void *buffer, + gsize count, + gboolean blocking, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_2_34 +gboolean g_pollable_stream_write_all (GOutputStream *stream, + const void *buffer, + gsize count, + gboolean blocking, + gsize *bytes_written, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + +#endif /* _G_POLLABLE_UTILS_H_ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gpropertyaction.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gpropertyaction.h new file mode 100755 index 00000000..6fb4e633 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gpropertyaction.h @@ -0,0 +1,47 @@ +/* + * Copyright © 2013 Canonical Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_PROPERTY_ACTION_H__ +#define __G_PROPERTY_ACTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_PROPERTY_ACTION (g_property_action_get_type ()) +#define G_PROPERTY_ACTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_PROPERTY_ACTION, GPropertyAction)) +#define G_IS_PROPERTY_ACTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_PROPERTY_ACTION)) + +GLIB_AVAILABLE_IN_2_38 +GType g_property_action_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_38 +GPropertyAction * g_property_action_new (const gchar *name, + gpointer object, + const gchar *property_name); + +G_END_DECLS + +#endif /* __G_PROPERTY_ACTION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gproxy.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gproxy.h new file mode 100755 index 00000000..5589f21d --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gproxy.h @@ -0,0 +1,128 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ + +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Collabora Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> + */ + +#ifndef __G_PROXY_H__ +#define __G_PROXY_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_PROXY (g_proxy_get_type ()) +#define G_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_PROXY, GProxy)) +#define G_IS_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_PROXY)) +#define G_PROXY_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_PROXY, GProxyInterface)) + +/** + * G_PROXY_EXTENSION_POINT_NAME: + * + * Extension point for proxy functionality. + * See [Extending GIO][extending-gio]. + * + * Since: 2.26 + */ +#define G_PROXY_EXTENSION_POINT_NAME "gio-proxy" + +/** + * GProxy: + * + * Interface that handles proxy connection and payload. + * + * Since: 2.26 + */ +typedef struct _GProxyInterface GProxyInterface; + +/** + * GProxyInterface: + * @g_iface: The parent interface. + * @connect: Connect to proxy server and wrap (if required) the #connection + * to handle payload. + * @connect_async: Same as connect() but asynchronous. + * @connect_finish: Returns the result of connect_async() + * @supports_hostname: Returns whether the proxy supports hostname lookups. + * + * Provides an interface for handling proxy connection and payload. + * + * Since: 2.26 + */ +struct _GProxyInterface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + GIOStream * (* connect) (GProxy *proxy, + GIOStream *connection, + GProxyAddress *proxy_address, + GCancellable *cancellable, + GError **error); + + void (* connect_async) (GProxy *proxy, + GIOStream *connection, + GProxyAddress *proxy_address, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + GIOStream * (* connect_finish) (GProxy *proxy, + GAsyncResult *result, + GError **error); + + gboolean (* supports_hostname) (GProxy *proxy); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_proxy_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GProxy *g_proxy_get_default_for_protocol (const gchar *protocol); + +GLIB_AVAILABLE_IN_ALL +GIOStream *g_proxy_connect (GProxy *proxy, + GIOStream *connection, + GProxyAddress *proxy_address, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_proxy_connect_async (GProxy *proxy, + GIOStream *connection, + GProxyAddress *proxy_address, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +GIOStream *g_proxy_connect_finish (GProxy *proxy, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_proxy_supports_hostname (GProxy *proxy); + +G_END_DECLS + +#endif /* __G_PROXY_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gproxyaddress.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gproxyaddress.h new file mode 100755 index 00000000..21b1992e --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gproxyaddress.h @@ -0,0 +1,86 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Collabora, Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> + */ + +#ifndef __G_PROXY_ADDRESS_H__ +#define __G_PROXY_ADDRESS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/ginetsocketaddress.h> + +G_BEGIN_DECLS + +#define G_TYPE_PROXY_ADDRESS (g_proxy_address_get_type ()) +#define G_PROXY_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_PROXY_ADDRESS, GProxyAddress)) +#define G_PROXY_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_PROXY_ADDRESS, GProxyAddressClass)) +#define G_IS_PROXY_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_PROXY_ADDRESS)) +#define G_IS_PROXY_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_PROXY_ADDRESS)) +#define G_PROXY_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_PROXY_ADDRESS, GProxyAddressClass)) + +typedef struct _GProxyAddressClass GProxyAddressClass; +typedef struct _GProxyAddressPrivate GProxyAddressPrivate; + +struct _GProxyAddress +{ + GInetSocketAddress parent_instance; + + /*< private >*/ + GProxyAddressPrivate *priv; +}; + +struct _GProxyAddressClass +{ + GInetSocketAddressClass parent_class; +}; + + +GLIB_AVAILABLE_IN_ALL +GType g_proxy_address_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GSocketAddress *g_proxy_address_new (GInetAddress *inetaddr, + guint16 port, + const gchar *protocol, + const gchar *dest_hostname, + guint16 dest_port, + const gchar *username, + const gchar *password); + +GLIB_AVAILABLE_IN_ALL +const gchar *g_proxy_address_get_protocol (GProxyAddress *proxy); +GLIB_AVAILABLE_IN_2_34 +const gchar *g_proxy_address_get_destination_protocol (GProxyAddress *proxy); +GLIB_AVAILABLE_IN_ALL +const gchar *g_proxy_address_get_destination_hostname (GProxyAddress *proxy); +GLIB_AVAILABLE_IN_ALL +guint16 g_proxy_address_get_destination_port (GProxyAddress *proxy); +GLIB_AVAILABLE_IN_ALL +const gchar *g_proxy_address_get_username (GProxyAddress *proxy); +GLIB_AVAILABLE_IN_ALL +const gchar *g_proxy_address_get_password (GProxyAddress *proxy); + +GLIB_AVAILABLE_IN_2_34 +const gchar *g_proxy_address_get_uri (GProxyAddress *proxy); + +G_END_DECLS + +#endif /* __G_PROXY_ADDRESS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gproxyaddressenumerator.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gproxyaddressenumerator.h new file mode 100755 index 00000000..1b99e35c --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gproxyaddressenumerator.h @@ -0,0 +1,74 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Collabora, Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> + */ + +#ifndef __G_PROXY_ADDRESS_ENUMERATOR_H__ +#define __G_PROXY_ADDRESS_ENUMERATOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gsocketaddressenumerator.h> + +G_BEGIN_DECLS + +#define G_TYPE_PROXY_ADDRESS_ENUMERATOR (g_proxy_address_enumerator_get_type ()) +#define G_PROXY_ADDRESS_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_PROXY_ADDRESS_ENUMERATOR, GProxyAddressEnumerator)) +#define G_PROXY_ADDRESS_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_PROXY_ADDRESS_ENUMERATOR, GProxyAddressEnumeratorClass)) +#define G_IS_PROXY_ADDRESS_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_PROXY_ADDRESS_ENUMERATOR)) +#define G_IS_PROXY_ADDRESS_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_PROXY_ADDRESS_ENUMERATOR)) +#define G_PROXY_ADDRESS_ENUMERATOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_PROXY_ADDRESS_ENUMERATOR, GProxyAddressEnumeratorClass)) + +/** + * GProxyAddressEnumerator: + * + * A subclass of #GSocketAddressEnumerator that takes another address + * enumerator and wraps its results in #GProxyAddresses as + * directed by the default #GProxyResolver. + */ + +typedef struct _GProxyAddressEnumeratorClass GProxyAddressEnumeratorClass; +typedef struct _GProxyAddressEnumeratorPrivate GProxyAddressEnumeratorPrivate; + +struct _GProxyAddressEnumerator +{ + GSocketAddressEnumerator parent_instance; + GProxyAddressEnumeratorPrivate *priv; +}; + +struct _GProxyAddressEnumeratorClass +{ + GSocketAddressEnumeratorClass parent_class; + + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); + void (*_g_reserved7) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_proxy_address_enumerator_get_type (void) G_GNUC_CONST; + +G_END_DECLS + +#endif /* __G_PROXY_ADDRESS_ENUMERATOR_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gproxyresolver.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gproxyresolver.h new file mode 100755 index 00000000..c8ed8281 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gproxyresolver.h @@ -0,0 +1,95 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Collabora, Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> + */ + +#ifndef __G_PROXY_RESOLVER_H__ +#define __G_PROXY_RESOLVER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_PROXY_RESOLVER (g_proxy_resolver_get_type ()) +#define G_PROXY_RESOLVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_PROXY_RESOLVER, GProxyResolver)) +#define G_IS_PROXY_RESOLVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_PROXY_RESOLVER)) +#define G_PROXY_RESOLVER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), G_TYPE_PROXY_RESOLVER, GProxyResolverInterface)) + +/** + * G_PROXY_RESOLVER_EXTENSION_POINT_NAME: + * + * Extension point for proxy resolving functionality. + * See [Extending GIO][extending-gio]. + */ +#define G_PROXY_RESOLVER_EXTENSION_POINT_NAME "gio-proxy-resolver" + +typedef struct _GProxyResolverInterface GProxyResolverInterface; + +struct _GProxyResolverInterface { + GTypeInterface g_iface; + + /* Virtual Table */ + gboolean (* is_supported) (GProxyResolver *resolver); + + gchar ** (* lookup) (GProxyResolver *resolver, + const gchar *uri, + GCancellable *cancellable, + GError **error); + + void (* lookup_async) (GProxyResolver *resolver, + const gchar *uri, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + gchar ** (* lookup_finish) (GProxyResolver *resolver, + GAsyncResult *result, + GError **error); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_proxy_resolver_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GProxyResolver *g_proxy_resolver_get_default (void); + +GLIB_AVAILABLE_IN_ALL +gboolean g_proxy_resolver_is_supported (GProxyResolver *resolver); +GLIB_AVAILABLE_IN_ALL +gchar **g_proxy_resolver_lookup (GProxyResolver *resolver, + const gchar *uri, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_proxy_resolver_lookup_async (GProxyResolver *resolver, + const gchar *uri, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gchar **g_proxy_resolver_lookup_finish (GProxyResolver *resolver, + GAsyncResult *result, + GError **error); + + +G_END_DECLS + +#endif /* __G_PROXY_RESOLVER_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gremoteactiongroup.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gremoteactiongroup.h new file mode 100755 index 00000000..206c7373 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gremoteactiongroup.h @@ -0,0 +1,75 @@ +/* + * Copyright © 2011 Canonical Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_REMOTE_ACTION_GROUP_H__ +#define __G_REMOTE_ACTION_GROUP_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + + +#define G_TYPE_REMOTE_ACTION_GROUP (g_remote_action_group_get_type ()) +#define G_REMOTE_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_REMOTE_ACTION_GROUP, GRemoteActionGroup)) +#define G_IS_REMOTE_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_REMOTE_ACTION_GROUP)) +#define G_REMOTE_ACTION_GROUP_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \ + G_TYPE_REMOTE_ACTION_GROUP, \ + GRemoteActionGroupInterface)) + +typedef struct _GRemoteActionGroupInterface GRemoteActionGroupInterface; + +struct _GRemoteActionGroupInterface +{ + GTypeInterface g_iface; + + void (* activate_action_full) (GRemoteActionGroup *remote, + const gchar *action_name, + GVariant *parameter, + GVariant *platform_data); + + void (* change_action_state_full) (GRemoteActionGroup *remote, + const gchar *action_name, + GVariant *value, + GVariant *platform_data); +}; + +GLIB_AVAILABLE_IN_2_32 +GType g_remote_action_group_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_32 +void g_remote_action_group_activate_action_full (GRemoteActionGroup *remote, + const gchar *action_name, + GVariant *parameter, + GVariant *platform_data); + +GLIB_AVAILABLE_IN_2_32 +void g_remote_action_group_change_action_state_full (GRemoteActionGroup *remote, + const gchar *action_name, + GVariant *value, + GVariant *platform_data); + +G_END_DECLS + +#endif /* __G_REMOTE_ACTION_GROUP_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gresolver.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gresolver.h new file mode 100755 index 00000000..a39e8f7f --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gresolver.h @@ -0,0 +1,212 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_RESOLVER_H__ +#define __G_RESOLVER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_RESOLVER (g_resolver_get_type ()) +#define G_RESOLVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_RESOLVER, GResolver)) +#define G_RESOLVER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_RESOLVER, GResolverClass)) +#define G_IS_RESOLVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_RESOLVER)) +#define G_IS_RESOLVER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_RESOLVER)) +#define G_RESOLVER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_RESOLVER, GResolverClass)) + +typedef struct _GResolverPrivate GResolverPrivate; +typedef struct _GResolverClass GResolverClass; + +struct _GResolver { + GObject parent_instance; + + GResolverPrivate *priv; +}; + +struct _GResolverClass { + GObjectClass parent_class; + + /* Signals */ + void ( *reload) (GResolver *resolver); + + /* Virtual methods */ + GList * ( *lookup_by_name) (GResolver *resolver, + const gchar *hostname, + GCancellable *cancellable, + GError **error); + void ( *lookup_by_name_async) (GResolver *resolver, + const gchar *hostname, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GList * ( *lookup_by_name_finish) (GResolver *resolver, + GAsyncResult *result, + GError **error); + + gchar * ( *lookup_by_address) (GResolver *resolver, + GInetAddress *address, + GCancellable *cancellable, + GError **error); + void ( *lookup_by_address_async) (GResolver *resolver, + GInetAddress *address, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gchar * ( *lookup_by_address_finish) (GResolver *resolver, + GAsyncResult *result, + GError **error); + + GList * ( *lookup_service) (GResolver *resolver, + const gchar *rrname, + GCancellable *cancellable, + GError **error); + void ( *lookup_service_async) (GResolver *resolver, + const gchar *rrname, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GList * ( *lookup_service_finish) (GResolver *resolver, + GAsyncResult *result, + GError **error); + + GList * ( *lookup_records) (GResolver *resolver, + const gchar *rrname, + GResolverRecordType record_type, + GCancellable *cancellable, + GError **error); + + void ( *lookup_records_async) (GResolver *resolver, + const gchar *rrname, + GResolverRecordType record_type, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + GList * ( *lookup_records_finish) (GResolver *resolver, + GAsyncResult *result, + GError **error); + + /* Padding for future expansion */ + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); + +}; + +GLIB_AVAILABLE_IN_ALL +GType g_resolver_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GResolver *g_resolver_get_default (void); +GLIB_AVAILABLE_IN_ALL +void g_resolver_set_default (GResolver *resolver); + +GLIB_AVAILABLE_IN_ALL +GList *g_resolver_lookup_by_name (GResolver *resolver, + const gchar *hostname, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_resolver_lookup_by_name_async (GResolver *resolver, + const gchar *hostname, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GList *g_resolver_lookup_by_name_finish (GResolver *resolver, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_resolver_free_addresses (GList *addresses); + +GLIB_AVAILABLE_IN_ALL +gchar *g_resolver_lookup_by_address (GResolver *resolver, + GInetAddress *address, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_resolver_lookup_by_address_async (GResolver *resolver, + GInetAddress *address, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gchar *g_resolver_lookup_by_address_finish (GResolver *resolver, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +GList *g_resolver_lookup_service (GResolver *resolver, + const gchar *service, + const gchar *protocol, + const gchar *domain, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_resolver_lookup_service_async (GResolver *resolver, + const gchar *service, + const gchar *protocol, + const gchar *domain, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GList *g_resolver_lookup_service_finish (GResolver *resolver, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_2_34 +GList *g_resolver_lookup_records (GResolver *resolver, + const gchar *rrname, + GResolverRecordType record_type, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_2_34 +void g_resolver_lookup_records_async (GResolver *resolver, + const gchar *rrname, + GResolverRecordType record_type, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_2_34 +GList *g_resolver_lookup_records_finish (GResolver *resolver, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_resolver_free_targets (GList *targets); + +/** + * G_RESOLVER_ERROR: + * + * Error domain for #GResolver. Errors in this domain will be from the + * #GResolverError enumeration. See #GError for more information on + * error domains. + */ +#define G_RESOLVER_ERROR (g_resolver_error_quark ()) +GLIB_AVAILABLE_IN_ALL +GQuark g_resolver_error_quark (void); + +G_END_DECLS + +#endif /* __G_RESOLVER_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gresource.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gresource.h new file mode 100755 index 00000000..e9870c14 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gresource.h @@ -0,0 +1,130 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_RESOURCE_H__ +#define __G_RESOURCE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +/** + * G_TYPE_RESOURCE: + * + * The #GType for #GResource. + */ +#define G_TYPE_RESOURCE (g_resource_get_type ()) + + +/** + * G_RESOURCE_ERROR: + * + * Error domain for #GResource. Errors in this domain will be from the + * #GResourceError enumeration. See #GError for more information on + * error domains. + */ +#define G_RESOURCE_ERROR (g_resource_error_quark ()) +GLIB_AVAILABLE_IN_2_32 +GQuark g_resource_error_quark (void); + +typedef struct _GStaticResource GStaticResource; + +struct _GStaticResource { + /*< private >*/ + const guint8 *data; + gsize data_len; + GResource *resource; + GStaticResource *next; + gpointer padding; +}; + +GLIB_AVAILABLE_IN_2_32 +GType g_resource_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_2_32 +GResource * g_resource_new_from_data (GBytes *data, + GError **error); +GLIB_AVAILABLE_IN_2_32 +GResource * g_resource_ref (GResource *resource); +GLIB_AVAILABLE_IN_2_32 +void g_resource_unref (GResource *resource); +GLIB_AVAILABLE_IN_2_32 +GResource * g_resource_load (const gchar *filename, + GError **error); +GLIB_AVAILABLE_IN_2_32 +GInputStream *g_resource_open_stream (GResource *resource, + const char *path, + GResourceLookupFlags lookup_flags, + GError **error); +GLIB_AVAILABLE_IN_2_32 +GBytes * g_resource_lookup_data (GResource *resource, + const char *path, + GResourceLookupFlags lookup_flags, + GError **error); +GLIB_AVAILABLE_IN_2_32 +char ** g_resource_enumerate_children (GResource *resource, + const char *path, + GResourceLookupFlags lookup_flags, + GError **error); +GLIB_AVAILABLE_IN_2_32 +gboolean g_resource_get_info (GResource *resource, + const char *path, + GResourceLookupFlags lookup_flags, + gsize *size, + guint32 *flags, + GError **error); + +GLIB_AVAILABLE_IN_2_32 +void g_resources_register (GResource *resource); +GLIB_AVAILABLE_IN_2_32 +void g_resources_unregister (GResource *resource); +GLIB_AVAILABLE_IN_2_32 +GInputStream *g_resources_open_stream (const char *path, + GResourceLookupFlags lookup_flags, + GError **error); +GLIB_AVAILABLE_IN_2_32 +GBytes * g_resources_lookup_data (const char *path, + GResourceLookupFlags lookup_flags, + GError **error); +GLIB_AVAILABLE_IN_2_32 +char ** g_resources_enumerate_children (const char *path, + GResourceLookupFlags lookup_flags, + GError **error); +GLIB_AVAILABLE_IN_2_32 +gboolean g_resources_get_info (const char *path, + GResourceLookupFlags lookup_flags, + gsize *size, + guint32 *flags, + GError **error); + + +GLIB_AVAILABLE_IN_2_32 +void g_static_resource_init (GStaticResource *static_resource); +GLIB_AVAILABLE_IN_2_32 +void g_static_resource_fini (GStaticResource *static_resource); +GLIB_AVAILABLE_IN_2_32 +GResource *g_static_resource_get_resource (GStaticResource *static_resource); + +G_END_DECLS + +#endif /* __G_RESOURCE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gseekable.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gseekable.h new file mode 100755 index 00000000..191f3cca --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gseekable.h @@ -0,0 +1,103 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_SEEKABLE_H__ +#define __G_SEEKABLE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_SEEKABLE (g_seekable_get_type ()) +#define G_SEEKABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_SEEKABLE, GSeekable)) +#define G_IS_SEEKABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_SEEKABLE)) +#define G_SEEKABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_SEEKABLE, GSeekableIface)) + +/** + * GSeekable: + * + * Seek object for streaming operations. + **/ +typedef struct _GSeekableIface GSeekableIface; + +/** + * GSeekableIface: + * @g_iface: The parent interface. + * @tell: Tells the current location within a stream. + * @can_seek: Checks if seeking is supported by the stream. + * @seek: Seeks to a location within a stream. + * @can_truncate: Checks if truncation is supported by the stream. + * @truncate_fn: Truncates a stream. + * + * Provides an interface for implementing seekable functionality on I/O Streams. + **/ +struct _GSeekableIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + goffset (* tell) (GSeekable *seekable); + + gboolean (* can_seek) (GSeekable *seekable); + gboolean (* seek) (GSeekable *seekable, + goffset offset, + GSeekType type, + GCancellable *cancellable, + GError **error); + + gboolean (* can_truncate) (GSeekable *seekable); + gboolean (* truncate_fn) (GSeekable *seekable, + goffset offset, + GCancellable *cancellable, + GError **error); + + /* TODO: Async seek/truncate */ +}; + +GLIB_AVAILABLE_IN_ALL +GType g_seekable_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +goffset g_seekable_tell (GSeekable *seekable); +GLIB_AVAILABLE_IN_ALL +gboolean g_seekable_can_seek (GSeekable *seekable); +GLIB_AVAILABLE_IN_ALL +gboolean g_seekable_seek (GSeekable *seekable, + goffset offset, + GSeekType type, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_seekable_can_truncate (GSeekable *seekable); +GLIB_AVAILABLE_IN_ALL +gboolean g_seekable_truncate (GSeekable *seekable, + goffset offset, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + + +#endif /* __G_SEEKABLE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsettings.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsettings.h new file mode 100755 index 00000000..d3d5a076 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsettings.h @@ -0,0 +1,345 @@ +/* + * Copyright © 2009, 2010 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_SETTINGS_H__ +#define __G_SETTINGS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gsettingsschema.h> +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_SETTINGS (g_settings_get_type ()) +#define G_SETTINGS(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SETTINGS, GSettings)) +#define G_SETTINGS_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_SETTINGS, GSettingsClass)) +#define G_IS_SETTINGS(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_SETTINGS)) +#define G_IS_SETTINGS_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_SETTINGS)) +#define G_SETTINGS_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_SETTINGS, GSettingsClass)) + +typedef struct _GSettingsPrivate GSettingsPrivate; +typedef struct _GSettingsClass GSettingsClass; + +struct _GSettingsClass +{ + GObjectClass parent_class; + + /* Signals */ + void (*writable_changed) (GSettings *settings, + const gchar *key); + void (*changed) (GSettings *settings, + const gchar *key); + gboolean (*writable_change_event) (GSettings *settings, + GQuark key); + gboolean (*change_event) (GSettings *settings, + const GQuark *keys, + gint n_keys); + + gpointer padding[20]; +}; + +struct _GSettings +{ + GObject parent_instance; + GSettingsPrivate *priv; +}; + + +GLIB_AVAILABLE_IN_ALL +GType g_settings_get_type (void); + +GLIB_DEPRECATED_IN_2_40_FOR(g_settings_schema_source_list_schemas) +const gchar * const * g_settings_list_schemas (void); +GLIB_DEPRECATED_IN_2_40_FOR(g_settings_schema_source_list_schemas) +const gchar * const * g_settings_list_relocatable_schemas (void); +GLIB_AVAILABLE_IN_ALL +GSettings * g_settings_new (const gchar *schema_id); +GLIB_AVAILABLE_IN_ALL +GSettings * g_settings_new_with_path (const gchar *schema_id, + const gchar *path); +GLIB_AVAILABLE_IN_ALL +GSettings * g_settings_new_with_backend (const gchar *schema_id, + GSettingsBackend *backend); +GLIB_AVAILABLE_IN_ALL +GSettings * g_settings_new_with_backend_and_path (const gchar *schema_id, + GSettingsBackend *backend, + const gchar *path); +GLIB_AVAILABLE_IN_2_32 +GSettings * g_settings_new_full (GSettingsSchema *schema, + GSettingsBackend *backend, + const gchar *path); +GLIB_AVAILABLE_IN_ALL +gchar ** g_settings_list_children (GSettings *settings); +GLIB_DEPRECATED_IN_2_46_FOR(g_settings_schema_list_keys) +gchar ** g_settings_list_keys (GSettings *settings); +GLIB_DEPRECATED_IN_2_40_FOR(g_settings_schema_key_get_range) +GVariant * g_settings_get_range (GSettings *settings, + const gchar *key); +GLIB_DEPRECATED_IN_2_40_FOR(g_settings_schema_key_range_check) +gboolean g_settings_range_check (GSettings *settings, + const gchar *key, + GVariant *value); + +GLIB_AVAILABLE_IN_ALL +gboolean g_settings_set_value (GSettings *settings, + const gchar *key, + GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_settings_get_value (GSettings *settings, + const gchar *key); + +GLIB_AVAILABLE_IN_2_40 +GVariant * g_settings_get_user_value (GSettings *settings, + const gchar *key); +GLIB_AVAILABLE_IN_2_40 +GVariant * g_settings_get_default_value (GSettings *settings, + const gchar *key); + +GLIB_AVAILABLE_IN_ALL +gboolean g_settings_set (GSettings *settings, + const gchar *key, + const gchar *format, + ...); +GLIB_AVAILABLE_IN_ALL +void g_settings_get (GSettings *settings, + const gchar *key, + const gchar *format, + ...); +GLIB_AVAILABLE_IN_ALL +void g_settings_reset (GSettings *settings, + const gchar *key); + +GLIB_AVAILABLE_IN_ALL +gint g_settings_get_int (GSettings *settings, + const gchar *key); +GLIB_AVAILABLE_IN_ALL +gboolean g_settings_set_int (GSettings *settings, + const gchar *key, + gint value); +GLIB_AVAILABLE_IN_2_50 +gint64 g_settings_get_int64 (GSettings *settings, + const gchar *key); +GLIB_AVAILABLE_IN_2_50 +gboolean g_settings_set_int64 (GSettings *settings, + const gchar *key, + gint64 value); +GLIB_AVAILABLE_IN_2_32 +guint g_settings_get_uint (GSettings *settings, + const gchar *key); +GLIB_AVAILABLE_IN_2_32 +gboolean g_settings_set_uint (GSettings *settings, + const gchar *key, + guint value); +GLIB_AVAILABLE_IN_2_50 +guint64 g_settings_get_uint64 (GSettings *settings, + const gchar *key); +GLIB_AVAILABLE_IN_2_50 +gboolean g_settings_set_uint64 (GSettings *settings, + const gchar *key, + guint64 value); +GLIB_AVAILABLE_IN_ALL +gchar * g_settings_get_string (GSettings *settings, + const gchar *key); +GLIB_AVAILABLE_IN_ALL +gboolean g_settings_set_string (GSettings *settings, + const gchar *key, + const gchar *value); +GLIB_AVAILABLE_IN_ALL +gboolean g_settings_get_boolean (GSettings *settings, + const gchar *key); +GLIB_AVAILABLE_IN_ALL +gboolean g_settings_set_boolean (GSettings *settings, + const gchar *key, + gboolean value); +GLIB_AVAILABLE_IN_ALL +gdouble g_settings_get_double (GSettings *settings, + const gchar *key); +GLIB_AVAILABLE_IN_ALL +gboolean g_settings_set_double (GSettings *settings, + const gchar *key, + gdouble value); +GLIB_AVAILABLE_IN_ALL +gchar ** g_settings_get_strv (GSettings *settings, + const gchar *key); +GLIB_AVAILABLE_IN_ALL +gboolean g_settings_set_strv (GSettings *settings, + const gchar *key, + const gchar *const *value); +GLIB_AVAILABLE_IN_ALL +gint g_settings_get_enum (GSettings *settings, + const gchar *key); +GLIB_AVAILABLE_IN_ALL +gboolean g_settings_set_enum (GSettings *settings, + const gchar *key, + gint value); +GLIB_AVAILABLE_IN_ALL +guint g_settings_get_flags (GSettings *settings, + const gchar *key); +GLIB_AVAILABLE_IN_ALL +gboolean g_settings_set_flags (GSettings *settings, + const gchar *key, + guint value); +GLIB_AVAILABLE_IN_ALL +GSettings * g_settings_get_child (GSettings *settings, + const gchar *name); + +GLIB_AVAILABLE_IN_ALL +gboolean g_settings_is_writable (GSettings *settings, + const gchar *name); + +GLIB_AVAILABLE_IN_ALL +void g_settings_delay (GSettings *settings); +GLIB_AVAILABLE_IN_ALL +void g_settings_apply (GSettings *settings); +GLIB_AVAILABLE_IN_ALL +void g_settings_revert (GSettings *settings); +GLIB_AVAILABLE_IN_ALL +gboolean g_settings_get_has_unapplied (GSettings *settings); +GLIB_AVAILABLE_IN_ALL +void g_settings_sync (void); + +/** + * GSettingsBindSetMapping: + * @value: a #GValue containing the property value to map + * @expected_type: the #GVariantType to create + * @user_data: user data that was specified when the binding was created + * + * The type for the function that is used to convert an object property + * value to a #GVariant for storing it in #GSettings. + * + * Returns: a new #GVariant holding the data from @value, + * or %NULL in case of an error + */ +typedef GVariant * (*GSettingsBindSetMapping) (const GValue *value, + const GVariantType *expected_type, + gpointer user_data); + +/** + * GSettingsBindGetMapping: + * @value: return location for the property value + * @variant: the #GVariant + * @user_data: user data that was specified when the binding was created + * + * The type for the function that is used to convert from #GSettings to + * an object property. The @value is already initialized to hold values + * of the appropriate type. + * + * Returns: %TRUE if the conversion succeeded, %FALSE in case of an error + */ +typedef gboolean (*GSettingsBindGetMapping) (GValue *value, + GVariant *variant, + gpointer user_data); + +/** + * GSettingsGetMapping: + * @value: the #GVariant to map, or %NULL + * @result: (out): the result of the mapping + * @user_data: (closure): the user data that was passed to + * g_settings_get_mapped() + * + * The type of the function that is used to convert from a value stored + * in a #GSettings to a value that is useful to the application. + * + * If the value is successfully mapped, the result should be stored at + * @result and %TRUE returned. If mapping fails (for example, if @value + * is not in the right format) then %FALSE should be returned. + * + * If @value is %NULL then it means that the mapping function is being + * given a "last chance" to successfully return a valid value. %TRUE + * must be returned in this case. + * + * Returns: %TRUE if the conversion succeeded, %FALSE in case of an error + **/ +typedef gboolean (*GSettingsGetMapping) (GVariant *value, + gpointer *result, + gpointer user_data); + +/** + * GSettingsBindFlags: + * @G_SETTINGS_BIND_DEFAULT: Equivalent to `G_SETTINGS_BIND_GET|G_SETTINGS_BIND_SET` + * @G_SETTINGS_BIND_GET: Update the #GObject property when the setting changes. + * It is an error to use this flag if the property is not writable. + * @G_SETTINGS_BIND_SET: Update the setting when the #GObject property changes. + * It is an error to use this flag if the property is not readable. + * @G_SETTINGS_BIND_NO_SENSITIVITY: Do not try to bind a "sensitivity" property to the writability of the setting + * @G_SETTINGS_BIND_GET_NO_CHANGES: When set in addition to #G_SETTINGS_BIND_GET, set the #GObject property + * value initially from the setting, but do not listen for changes of the setting + * @G_SETTINGS_BIND_INVERT_BOOLEAN: When passed to g_settings_bind(), uses a pair of mapping functions that invert + * the boolean value when mapping between the setting and the property. The setting and property must both + * be booleans. You cannot pass this flag to g_settings_bind_with_mapping(). + * + * Flags used when creating a binding. These flags determine in which + * direction the binding works. The default is to synchronize in both + * directions. + */ +typedef enum +{ + G_SETTINGS_BIND_DEFAULT, + G_SETTINGS_BIND_GET = (1<<0), + G_SETTINGS_BIND_SET = (1<<1), + G_SETTINGS_BIND_NO_SENSITIVITY = (1<<2), + G_SETTINGS_BIND_GET_NO_CHANGES = (1<<3), + G_SETTINGS_BIND_INVERT_BOOLEAN = (1<<4) +} GSettingsBindFlags; + +GLIB_AVAILABLE_IN_ALL +void g_settings_bind (GSettings *settings, + const gchar *key, + gpointer object, + const gchar *property, + GSettingsBindFlags flags); +GLIB_AVAILABLE_IN_ALL +void g_settings_bind_with_mapping (GSettings *settings, + const gchar *key, + gpointer object, + const gchar *property, + GSettingsBindFlags flags, + GSettingsBindGetMapping get_mapping, + GSettingsBindSetMapping set_mapping, + gpointer user_data, + GDestroyNotify destroy); +GLIB_AVAILABLE_IN_ALL +void g_settings_bind_writable (GSettings *settings, + const gchar *key, + gpointer object, + const gchar *property, + gboolean inverted); +GLIB_AVAILABLE_IN_ALL +void g_settings_unbind (gpointer object, + const gchar *property); + +GLIB_AVAILABLE_IN_2_32 +GAction * g_settings_create_action (GSettings *settings, + const gchar *key); + +GLIB_AVAILABLE_IN_ALL +gpointer g_settings_get_mapped (GSettings *settings, + const gchar *key, + GSettingsGetMapping mapping, + gpointer user_data); + +G_END_DECLS + +#endif /* __G_SETTINGS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsettingsbackend.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsettingsbackend.h new file mode 100755 index 00000000..34bae6b6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsettingsbackend.h @@ -0,0 +1,174 @@ +/* + * Copyright © 2009, 2010 Codethink Limited + * Copyright © 2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + * Matthias Clasen <mclasen@redhat.com> + */ + +#ifndef __G_SETTINGS_BACKEND_H__ +#define __G_SETTINGS_BACKEND_H__ + +#if !defined (G_SETTINGS_ENABLE_BACKEND) && !defined (GIO_COMPILATION) +#error "You must define G_SETTINGS_ENABLE_BACKEND before including <gio/gsettingsbackend.h>." +#endif + +#define __GIO_GIO_H_INSIDE__ +#include <gio/giotypes.h> +#undef __GIO_GIO_H_INSIDE__ + +G_BEGIN_DECLS + +#define G_TYPE_SETTINGS_BACKEND (g_settings_backend_get_type ()) +#define G_SETTINGS_BACKEND(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SETTINGS_BACKEND, GSettingsBackend)) +#define G_SETTINGS_BACKEND_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_SETTINGS_BACKEND, GSettingsBackendClass)) +#define G_IS_SETTINGS_BACKEND(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SETTINGS_BACKEND)) +#define G_IS_SETTINGS_BACKEND_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_SETTINGS_BACKEND)) +#define G_SETTINGS_BACKEND_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_SETTINGS_BACKEND, GSettingsBackendClass)) + +/** + * G_SETTINGS_BACKEND_EXTENSION_POINT_NAME: + * + * Extension point for #GSettingsBackend functionality. + **/ +#define G_SETTINGS_BACKEND_EXTENSION_POINT_NAME "gsettings-backend" + +/** + * GSettingsBackend: + * + * An implementation of a settings storage repository. + **/ +typedef struct _GSettingsBackendPrivate GSettingsBackendPrivate; +typedef struct _GSettingsBackendClass GSettingsBackendClass; + +/** + * GSettingsBackendClass: + * @read: virtual method to read a key's value + * @get_writable: virtual method to get if a key is writable + * @write: virtual method to change key's value + * @write_tree: virtual method to change a tree of keys + * @reset: virtual method to reset state + * @subscribe: virtual method to subscribe to key changes + * @unsubscribe: virtual method to unsubscribe to key changes + * @sync: virtual method to sync state + * @get_permission: virtual method to get permission of a key + * @read_user_value: virtual method to read user's key value + * + * Class structure for #GSettingsBackend. + */ +struct _GSettingsBackendClass +{ + GObjectClass parent_class; + + GVariant * (*read) (GSettingsBackend *backend, + const gchar *key, + const GVariantType *expected_type, + gboolean default_value); + + gboolean (*get_writable) (GSettingsBackend *backend, + const gchar *key); + + gboolean (*write) (GSettingsBackend *backend, + const gchar *key, + GVariant *value, + gpointer origin_tag); + gboolean (*write_tree) (GSettingsBackend *backend, + GTree *tree, + gpointer origin_tag); + void (*reset) (GSettingsBackend *backend, + const gchar *key, + gpointer origin_tag); + + void (*subscribe) (GSettingsBackend *backend, + const gchar *name); + void (*unsubscribe) (GSettingsBackend *backend, + const gchar *name); + void (*sync) (GSettingsBackend *backend); + + GPermission * (*get_permission) (GSettingsBackend *backend, + const gchar *path); + + GVariant * (*read_user_value) (GSettingsBackend *backend, + const gchar *key, + const GVariantType *expected_type); + + /*< private >*/ + gpointer padding[23]; +}; + +struct _GSettingsBackend +{ + GObject parent_instance; + + /*< private >*/ + GSettingsBackendPrivate *priv; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_settings_backend_get_type (void); + +GLIB_AVAILABLE_IN_ALL +void g_settings_backend_changed (GSettingsBackend *backend, + const gchar *key, + gpointer origin_tag); +GLIB_AVAILABLE_IN_ALL +void g_settings_backend_path_changed (GSettingsBackend *backend, + const gchar *path, + gpointer origin_tag); +GLIB_AVAILABLE_IN_ALL +void g_settings_backend_flatten_tree (GTree *tree, + gchar **path, + const gchar ***keys, + GVariant ***values); +GLIB_AVAILABLE_IN_ALL +void g_settings_backend_keys_changed (GSettingsBackend *backend, + const gchar *path, + gchar const * const *items, + gpointer origin_tag); + +GLIB_AVAILABLE_IN_ALL +void g_settings_backend_path_writable_changed (GSettingsBackend *backend, + const gchar *path); +GLIB_AVAILABLE_IN_ALL +void g_settings_backend_writable_changed (GSettingsBackend *backend, + const gchar *key); +GLIB_AVAILABLE_IN_ALL +void g_settings_backend_changed_tree (GSettingsBackend *backend, + GTree *tree, + gpointer origin_tag); + +GLIB_AVAILABLE_IN_ALL +GSettingsBackend * g_settings_backend_get_default (void); + +GLIB_AVAILABLE_IN_ALL +GSettingsBackend * g_keyfile_settings_backend_new (const gchar *filename, + const gchar *root_path, + const gchar *root_group); + +GLIB_AVAILABLE_IN_ALL +GSettingsBackend * g_null_settings_backend_new (void); + +GLIB_AVAILABLE_IN_ALL +GSettingsBackend * g_memory_settings_backend_new (void); + +G_END_DECLS + +#endif /* __G_SETTINGS_BACKEND_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsettingsschema.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsettingsschema.h new file mode 100755 index 00000000..219e3091 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsettingsschema.h @@ -0,0 +1,112 @@ +/* + * Copyright © 2010 Codethink Limited + * Copyright © 2011 Canonical Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_SETTINGS_SCHEMA_H__ +#define __G_SETTINGS_SCHEMA_H__ + +#include <glib-object.h> + +G_BEGIN_DECLS + +typedef struct _GSettingsSchemaSource GSettingsSchemaSource; +typedef struct _GSettingsSchema GSettingsSchema; +typedef struct _GSettingsSchemaKey GSettingsSchemaKey; + +#define G_TYPE_SETTINGS_SCHEMA_SOURCE (g_settings_schema_source_get_type ()) +GLIB_AVAILABLE_IN_2_32 +GType g_settings_schema_source_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_32 +GSettingsSchemaSource * g_settings_schema_source_get_default (void); +GLIB_AVAILABLE_IN_2_32 +GSettingsSchemaSource * g_settings_schema_source_ref (GSettingsSchemaSource *source); +GLIB_AVAILABLE_IN_2_32 +void g_settings_schema_source_unref (GSettingsSchemaSource *source); + +GLIB_AVAILABLE_IN_2_32 +GSettingsSchemaSource * g_settings_schema_source_new_from_directory (const gchar *directory, + GSettingsSchemaSource *parent, + gboolean trusted, + GError **error); + +GLIB_AVAILABLE_IN_2_32 +GSettingsSchema * g_settings_schema_source_lookup (GSettingsSchemaSource *source, + const gchar *schema_id, + gboolean recursive); + +GLIB_AVAILABLE_IN_2_40 +void g_settings_schema_source_list_schemas (GSettingsSchemaSource *source, + gboolean recursive, + gchar ***non_relocatable, + gchar ***relocatable); + +#define G_TYPE_SETTINGS_SCHEMA (g_settings_schema_get_type ()) +GLIB_AVAILABLE_IN_2_32 +GType g_settings_schema_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_32 +GSettingsSchema * g_settings_schema_ref (GSettingsSchema *schema); +GLIB_AVAILABLE_IN_2_32 +void g_settings_schema_unref (GSettingsSchema *schema); + +GLIB_AVAILABLE_IN_2_32 +const gchar * g_settings_schema_get_id (GSettingsSchema *schema); +GLIB_AVAILABLE_IN_2_32 +const gchar * g_settings_schema_get_path (GSettingsSchema *schema); +GLIB_AVAILABLE_IN_2_40 +GSettingsSchemaKey * g_settings_schema_get_key (GSettingsSchema *schema, + const gchar *name); +GLIB_AVAILABLE_IN_2_40 +gboolean g_settings_schema_has_key (GSettingsSchema *schema, + const gchar *name); +GLIB_AVAILABLE_IN_2_46 +gchar** g_settings_schema_list_keys (GSettingsSchema *schema); + + +GLIB_AVAILABLE_IN_2_44 +gchar ** g_settings_schema_list_children (GSettingsSchema *schema); + +#define G_TYPE_SETTINGS_SCHEMA_KEY (g_settings_schema_key_get_type ()) +GLIB_AVAILABLE_IN_2_40 +GType g_settings_schema_key_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_40 +GSettingsSchemaKey * g_settings_schema_key_ref (GSettingsSchemaKey *key); +GLIB_AVAILABLE_IN_2_40 +void g_settings_schema_key_unref (GSettingsSchemaKey *key); + +GLIB_AVAILABLE_IN_2_40 +const GVariantType * g_settings_schema_key_get_value_type (GSettingsSchemaKey *key); +GLIB_AVAILABLE_IN_2_40 +GVariant * g_settings_schema_key_get_default_value (GSettingsSchemaKey *key); +GLIB_AVAILABLE_IN_2_40 +GVariant * g_settings_schema_key_get_range (GSettingsSchemaKey *key); +GLIB_AVAILABLE_IN_2_40 +gboolean g_settings_schema_key_range_check (GSettingsSchemaKey *key, + GVariant *value); + +GLIB_AVAILABLE_IN_2_44 +const gchar * g_settings_schema_key_get_name (GSettingsSchemaKey *key); +GLIB_AVAILABLE_IN_2_40 +const gchar * g_settings_schema_key_get_summary (GSettingsSchemaKey *key); +GLIB_AVAILABLE_IN_2_40 +const gchar * g_settings_schema_key_get_description (GSettingsSchemaKey *key); + +G_END_DECLS + +#endif /* __G_SETTINGS_SCHEMA_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsimpleaction.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsimpleaction.h new file mode 100755 index 00000000..041eb7ec --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsimpleaction.h @@ -0,0 +1,63 @@ +/* + * Copyright © 2010 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_SIMPLE_ACTION_H__ +#define __G_SIMPLE_ACTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_SIMPLE_ACTION (g_simple_action_get_type ()) +#define G_SIMPLE_ACTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SIMPLE_ACTION, GSimpleAction)) +#define G_IS_SIMPLE_ACTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SIMPLE_ACTION)) + +GLIB_AVAILABLE_IN_ALL +GType g_simple_action_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GSimpleAction * g_simple_action_new (const gchar *name, + const GVariantType *parameter_type); + +GLIB_AVAILABLE_IN_ALL +GSimpleAction * g_simple_action_new_stateful (const gchar *name, + const GVariantType *parameter_type, + GVariant *state); + +GLIB_AVAILABLE_IN_ALL +void g_simple_action_set_enabled (GSimpleAction *simple, + gboolean enabled); + +GLIB_AVAILABLE_IN_2_30 +void g_simple_action_set_state (GSimpleAction *simple, + GVariant *value); + +GLIB_AVAILABLE_IN_2_44 +void g_simple_action_set_state_hint (GSimpleAction *simple, + GVariant *state_hint); + +G_END_DECLS + +#endif /* __G_SIMPLE_ACTION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsimpleactiongroup.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsimpleactiongroup.h new file mode 100755 index 00000000..6ad46e7d --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsimpleactiongroup.h @@ -0,0 +1,97 @@ +/* + * Copyright © 2010 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_SIMPLE_ACTION_GROUP_H__ +#define __G_SIMPLE_ACTION_GROUP_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include "gactiongroup.h" +#include "gactionmap.h" + +G_BEGIN_DECLS + +#define G_TYPE_SIMPLE_ACTION_GROUP (g_simple_action_group_get_type ()) +#define G_SIMPLE_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SIMPLE_ACTION_GROUP, GSimpleActionGroup)) +#define G_SIMPLE_ACTION_GROUP_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_SIMPLE_ACTION_GROUP, GSimpleActionGroupClass)) +#define G_IS_SIMPLE_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SIMPLE_ACTION_GROUP)) +#define G_IS_SIMPLE_ACTION_GROUP_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_SIMPLE_ACTION_GROUP)) +#define G_SIMPLE_ACTION_GROUP_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_SIMPLE_ACTION_GROUP, GSimpleActionGroupClass)) + +typedef struct _GSimpleActionGroupPrivate GSimpleActionGroupPrivate; +typedef struct _GSimpleActionGroupClass GSimpleActionGroupClass; + +/** + * GSimpleActionGroup: + * + * The #GSimpleActionGroup structure contains private data and should only be accessed using the provided API. + * + * Since: 2.28 + */ +struct _GSimpleActionGroup +{ + /*< private >*/ + GObject parent_instance; + + GSimpleActionGroupPrivate *priv; +}; + +struct _GSimpleActionGroupClass +{ + /*< private >*/ + GObjectClass parent_class; + + /*< private >*/ + gpointer padding[12]; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_simple_action_group_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GSimpleActionGroup * g_simple_action_group_new (void); + +GLIB_DEPRECATED_IN_2_38_FOR (g_action_map_lookup_action) +GAction * g_simple_action_group_lookup (GSimpleActionGroup *simple, + const gchar *action_name); + +GLIB_DEPRECATED_IN_2_38_FOR (g_action_map_add_action) +void g_simple_action_group_insert (GSimpleActionGroup *simple, + GAction *action); + +GLIB_DEPRECATED_IN_2_38_FOR (g_action_map_remove_action) +void g_simple_action_group_remove (GSimpleActionGroup *simple, + const gchar *action_name); + +GLIB_DEPRECATED_IN_2_38_FOR (g_action_map_add_action_entries) +void g_simple_action_group_add_entries (GSimpleActionGroup *simple, + const GActionEntry *entries, + gint n_entries, + gpointer user_data); + +G_END_DECLS + +#endif /* __G_SIMPLE_ACTION_GROUP_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsimpleasyncresult.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsimpleasyncresult.h new file mode 100755 index 00000000..8daa91d4 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsimpleasyncresult.h @@ -0,0 +1,162 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_SIMPLE_ASYNC_RESULT_H__ +#define __G_SIMPLE_ASYNC_RESULT_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_SIMPLE_ASYNC_RESULT (g_simple_async_result_get_type ()) +#define G_SIMPLE_ASYNC_RESULT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_SIMPLE_ASYNC_RESULT, GSimpleAsyncResult)) +#define G_SIMPLE_ASYNC_RESULT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_SIMPLE_ASYNC_RESULT, GSimpleAsyncResultClass)) +#define G_IS_SIMPLE_ASYNC_RESULT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_SIMPLE_ASYNC_RESULT)) +#define G_IS_SIMPLE_ASYNC_RESULT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_SIMPLE_ASYNC_RESULT)) +#define G_SIMPLE_ASYNC_RESULT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_SIMPLE_ASYNC_RESULT, GSimpleAsyncResultClass)) + +/** + * GSimpleAsyncResult: + * + * A simple implementation of #GAsyncResult. + **/ +typedef struct _GSimpleAsyncResultClass GSimpleAsyncResultClass; + + +GLIB_AVAILABLE_IN_ALL +GType g_simple_async_result_get_type (void) G_GNUC_CONST; + +GLIB_DEPRECATED_IN_2_46_FOR(g_task_new) +GSimpleAsyncResult *g_simple_async_result_new (GObject *source_object, + GAsyncReadyCallback callback, + gpointer user_data, + gpointer source_tag); +GLIB_DEPRECATED_IN_2_46_FOR(g_task_new) +GSimpleAsyncResult *g_simple_async_result_new_error (GObject *source_object, + GAsyncReadyCallback callback, + gpointer user_data, + GQuark domain, + gint code, + const char *format, + ...) G_GNUC_PRINTF (6, 7); +GLIB_DEPRECATED_IN_2_46_FOR(g_task_new) +GSimpleAsyncResult *g_simple_async_result_new_from_error (GObject *source_object, + GAsyncReadyCallback callback, + gpointer user_data, + const GError *error); +GLIB_DEPRECATED_IN_2_46_FOR(g_task_new) +GSimpleAsyncResult *g_simple_async_result_new_take_error (GObject *source_object, + GAsyncReadyCallback callback, + gpointer user_data, + GError *error); + +GLIB_DEPRECATED_IN_2_46 +void g_simple_async_result_set_op_res_gpointer (GSimpleAsyncResult *simple, + gpointer op_res, + GDestroyNotify destroy_op_res); +GLIB_DEPRECATED_IN_2_46 +gpointer g_simple_async_result_get_op_res_gpointer (GSimpleAsyncResult *simple); + +GLIB_DEPRECATED_IN_2_46 +void g_simple_async_result_set_op_res_gssize (GSimpleAsyncResult *simple, + gssize op_res); +GLIB_DEPRECATED_IN_2_46 +gssize g_simple_async_result_get_op_res_gssize (GSimpleAsyncResult *simple); + +GLIB_DEPRECATED_IN_2_46 +void g_simple_async_result_set_op_res_gboolean (GSimpleAsyncResult *simple, + gboolean op_res); +GLIB_DEPRECATED_IN_2_46 +gboolean g_simple_async_result_get_op_res_gboolean (GSimpleAsyncResult *simple); + + + +GLIB_AVAILABLE_IN_2_32 /* Also deprecated, but can't mark something both AVAILABLE and DEPRECATED */ +void g_simple_async_result_set_check_cancellable (GSimpleAsyncResult *simple, + GCancellable *check_cancellable); +GLIB_DEPRECATED_IN_2_46 +gpointer g_simple_async_result_get_source_tag (GSimpleAsyncResult *simple); +GLIB_DEPRECATED_IN_2_46 +void g_simple_async_result_set_handle_cancellation (GSimpleAsyncResult *simple, + gboolean handle_cancellation); +GLIB_DEPRECATED_IN_2_46 +void g_simple_async_result_complete (GSimpleAsyncResult *simple); +GLIB_DEPRECATED_IN_2_46 +void g_simple_async_result_complete_in_idle (GSimpleAsyncResult *simple); +GLIB_DEPRECATED_IN_2_46 +void g_simple_async_result_run_in_thread (GSimpleAsyncResult *simple, + GSimpleAsyncThreadFunc func, + int io_priority, + GCancellable *cancellable); +GLIB_DEPRECATED_IN_2_46 +void g_simple_async_result_set_from_error (GSimpleAsyncResult *simple, + const GError *error); +GLIB_DEPRECATED_IN_2_46 +void g_simple_async_result_take_error (GSimpleAsyncResult *simple, + GError *error); +GLIB_DEPRECATED_IN_2_46 +gboolean g_simple_async_result_propagate_error (GSimpleAsyncResult *simple, + GError **dest); +GLIB_DEPRECATED_IN_2_46 +void g_simple_async_result_set_error (GSimpleAsyncResult *simple, + GQuark domain, + gint code, + const char *format, + ...) G_GNUC_PRINTF (4, 5); +GLIB_DEPRECATED_IN_2_46 +void g_simple_async_result_set_error_va (GSimpleAsyncResult *simple, + GQuark domain, + gint code, + const char *format, + va_list args) + G_GNUC_PRINTF(4, 0); +GLIB_DEPRECATED_IN_2_46 +gboolean g_simple_async_result_is_valid (GAsyncResult *result, + GObject *source, + gpointer source_tag); + +GLIB_DEPRECATED_IN_2_46_FOR(g_task_report_error) +void g_simple_async_report_error_in_idle (GObject *object, + GAsyncReadyCallback callback, + gpointer user_data, + GQuark domain, + gint code, + const char *format, + ...) G_GNUC_PRINTF(6, 7); +GLIB_DEPRECATED_IN_2_46_FOR(g_task_report_error) +void g_simple_async_report_gerror_in_idle (GObject *object, + GAsyncReadyCallback callback, + gpointer user_data, + const GError *error); +GLIB_DEPRECATED_IN_2_46_FOR(g_task_report_error) +void g_simple_async_report_take_gerror_in_idle (GObject *object, + GAsyncReadyCallback callback, + gpointer user_data, + GError *error); + +G_END_DECLS + + + +#endif /* __G_SIMPLE_ASYNC_RESULT_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsimpleiostream.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsimpleiostream.h new file mode 100755 index 00000000..37919d32 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsimpleiostream.h @@ -0,0 +1,45 @@ +/* + * Copyright © 2014 NICE s.r.l. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ignacio Casal Quinteiro <ignacio.casal@nice-software.com> + */ + +#ifndef __G_SIMPLE_IO_STREAM_H__ +#define __G_SIMPLE_IO_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> +#include <gio/giostream.h> + +G_BEGIN_DECLS + +#define G_TYPE_SIMPLE_IO_STREAM (g_simple_io_stream_get_type ()) +#define G_SIMPLE_IO_STREAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_SIMPLE_IO_STREAM, GSimpleIOStream)) +#define G_IS_SIMPLE_IO_STREAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_SIMPLE_IO_STREAM)) + +GLIB_AVAILABLE_IN_2_44 +GType g_simple_io_stream_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_44 +GIOStream *g_simple_io_stream_new (GInputStream *input_stream, + GOutputStream *output_stream); + +G_END_DECLS + +#endif /* __G_SIMPLE_IO_STREAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsimplepermission.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsimplepermission.h new file mode 100755 index 00000000..11b8d122 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsimplepermission.h @@ -0,0 +1,45 @@ +/* + * Copyright © 2010 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_SIMPLE_PERMISSION_H__ +#define __G_SIMPLE_PERMISSION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_SIMPLE_PERMISSION (g_simple_permission_get_type ()) +#define G_SIMPLE_PERMISSION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SIMPLE_PERMISSION, \ + GSimplePermission)) +#define G_IS_SIMPLE_PERMISSION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SIMPLE_PERMISSION)) + +GLIB_AVAILABLE_IN_ALL +GType g_simple_permission_get_type (void); +GLIB_AVAILABLE_IN_ALL +GPermission * g_simple_permission_new (gboolean allowed); + +G_END_DECLS + +#endif /* __G_SIMPLE_PERMISSION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsimpleproxyresolver.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsimpleproxyresolver.h new file mode 100755 index 00000000..e1bb199f --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsimpleproxyresolver.h @@ -0,0 +1,89 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright 2010, 2013 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_SIMPLE_PROXY_RESOLVER_H__ +#define __G_SIMPLE_PROXY_RESOLVER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gproxyresolver.h> + +G_BEGIN_DECLS + +#define G_TYPE_SIMPLE_PROXY_RESOLVER (g_simple_proxy_resolver_get_type ()) +#define G_SIMPLE_PROXY_RESOLVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_SIMPLE_PROXY_RESOLVER, GSimpleProxyResolver)) +#define G_SIMPLE_PROXY_RESOLVER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_SIMPLE_PROXY_RESOLVER, GSimpleProxyResolverClass)) +#define G_IS_SIMPLE_PROXY_RESOLVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_SIMPLE_PROXY_RESOLVER)) +#define G_IS_SIMPLE_PROXY_RESOLVER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_SIMPLE_PROXY_RESOLVER)) +#define G_SIMPLE_PROXY_RESOLVER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_SIMPLE_PROXY_RESOLVER, GSimpleProxyResolverClass)) + +/** + * GSimpleProxyResolver: + * + * A #GProxyResolver implementation for using a fixed set of proxies. + **/ +typedef struct _GSimpleProxyResolver GSimpleProxyResolver; +typedef struct _GSimpleProxyResolverPrivate GSimpleProxyResolverPrivate; +typedef struct _GSimpleProxyResolverClass GSimpleProxyResolverClass; + +struct _GSimpleProxyResolver +{ + GObject parent_instance; + + /*< private >*/ + GSimpleProxyResolverPrivate *priv; +}; + +struct _GSimpleProxyResolverClass +{ + GObjectClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GLIB_AVAILABLE_IN_2_36 +GType g_simple_proxy_resolver_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_36 +GProxyResolver *g_simple_proxy_resolver_new (const gchar *default_proxy, + gchar **ignore_hosts); + +GLIB_AVAILABLE_IN_2_36 +void g_simple_proxy_resolver_set_default_proxy (GSimpleProxyResolver *resolver, + const gchar *default_proxy); + +GLIB_AVAILABLE_IN_2_36 +void g_simple_proxy_resolver_set_ignore_hosts (GSimpleProxyResolver *resolver, + gchar **ignore_hosts); + +GLIB_AVAILABLE_IN_2_36 +void g_simple_proxy_resolver_set_uri_proxy (GSimpleProxyResolver *resolver, + const gchar *uri_scheme, + const gchar *proxy); + +G_END_DECLS + +#endif /* __G_SIMPLE_PROXY_RESOLVER_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocket.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocket.h new file mode 100755 index 00000000..a65cbc22 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocket.h @@ -0,0 +1,317 @@ +/* + * Copyright © 2008 Christian Kellner, Samuel Cormier-Iijima + * Copyright © 2009 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Christian Kellner <gicmo@gnome.org> + * Samuel Cormier-Iijima <sciyoshi@gmail.com> + * Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_SOCKET_H__ +#define __G_SOCKET_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_SOCKET (g_socket_get_type ()) +#define G_SOCKET(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SOCKET, GSocket)) +#define G_SOCKET_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_SOCKET, GSocketClass)) +#define G_IS_SOCKET(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SOCKET)) +#define G_IS_SOCKET_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_SOCKET)) +#define G_SOCKET_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_SOCKET, GSocketClass)) + +typedef struct _GSocketPrivate GSocketPrivate; +typedef struct _GSocketClass GSocketClass; + +struct _GSocketClass +{ + GObjectClass parent_class; + + /*< private >*/ + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); + void (*_g_reserved7) (void); + void (*_g_reserved8) (void); + void (*_g_reserved9) (void); + void (*_g_reserved10) (void); +}; + +struct _GSocket +{ + GObject parent_instance; + GSocketPrivate *priv; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_socket_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GSocket * g_socket_new (GSocketFamily family, + GSocketType type, + GSocketProtocol protocol, + GError **error); +GLIB_AVAILABLE_IN_ALL +GSocket * g_socket_new_from_fd (gint fd, + GError **error); +GLIB_AVAILABLE_IN_ALL +int g_socket_get_fd (GSocket *socket); +GLIB_AVAILABLE_IN_ALL +GSocketFamily g_socket_get_family (GSocket *socket); +GLIB_AVAILABLE_IN_ALL +GSocketType g_socket_get_socket_type (GSocket *socket); +GLIB_AVAILABLE_IN_ALL +GSocketProtocol g_socket_get_protocol (GSocket *socket); +GLIB_AVAILABLE_IN_ALL +GSocketAddress * g_socket_get_local_address (GSocket *socket, + GError **error); +GLIB_AVAILABLE_IN_ALL +GSocketAddress * g_socket_get_remote_address (GSocket *socket, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_socket_set_blocking (GSocket *socket, + gboolean blocking); +GLIB_AVAILABLE_IN_ALL +gboolean g_socket_get_blocking (GSocket *socket); +GLIB_AVAILABLE_IN_ALL +void g_socket_set_keepalive (GSocket *socket, + gboolean keepalive); +GLIB_AVAILABLE_IN_ALL +gboolean g_socket_get_keepalive (GSocket *socket); +GLIB_AVAILABLE_IN_ALL +gint g_socket_get_listen_backlog (GSocket *socket); +GLIB_AVAILABLE_IN_ALL +void g_socket_set_listen_backlog (GSocket *socket, + gint backlog); +GLIB_AVAILABLE_IN_ALL +guint g_socket_get_timeout (GSocket *socket); +GLIB_AVAILABLE_IN_ALL +void g_socket_set_timeout (GSocket *socket, + guint timeout); + +GLIB_AVAILABLE_IN_2_32 +guint g_socket_get_ttl (GSocket *socket); +GLIB_AVAILABLE_IN_2_32 +void g_socket_set_ttl (GSocket *socket, + guint ttl); + +GLIB_AVAILABLE_IN_2_32 +gboolean g_socket_get_broadcast (GSocket *socket); +GLIB_AVAILABLE_IN_2_32 +void g_socket_set_broadcast (GSocket *socket, + gboolean broadcast); + +GLIB_AVAILABLE_IN_2_32 +gboolean g_socket_get_multicast_loopback (GSocket *socket); +GLIB_AVAILABLE_IN_2_32 +void g_socket_set_multicast_loopback (GSocket *socket, + gboolean loopback); +GLIB_AVAILABLE_IN_2_32 +guint g_socket_get_multicast_ttl (GSocket *socket); +GLIB_AVAILABLE_IN_2_32 +void g_socket_set_multicast_ttl (GSocket *socket, + guint ttl); +GLIB_AVAILABLE_IN_ALL +gboolean g_socket_is_connected (GSocket *socket); +GLIB_AVAILABLE_IN_ALL +gboolean g_socket_bind (GSocket *socket, + GSocketAddress *address, + gboolean allow_reuse, + GError **error); +GLIB_AVAILABLE_IN_2_32 +gboolean g_socket_join_multicast_group (GSocket *socket, + GInetAddress *group, + gboolean source_specific, + const gchar *iface, + GError **error); +GLIB_AVAILABLE_IN_2_32 +gboolean g_socket_leave_multicast_group (GSocket *socket, + GInetAddress *group, + gboolean source_specific, + const gchar *iface, + GError **error); +GLIB_AVAILABLE_IN_2_56 +gboolean g_socket_join_multicast_group_ssm (GSocket *socket, + GInetAddress *group, + GInetAddress *source_specific, + const gchar *iface, + GError **error); +GLIB_AVAILABLE_IN_2_56 +gboolean g_socket_leave_multicast_group_ssm (GSocket *socket, + GInetAddress *group, + GInetAddress *source_specific, + const gchar *iface, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_socket_connect (GSocket *socket, + GSocketAddress *address, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_socket_check_connect_result (GSocket *socket, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gssize g_socket_get_available_bytes (GSocket *socket); + +GLIB_AVAILABLE_IN_ALL +GIOCondition g_socket_condition_check (GSocket *socket, + GIOCondition condition); +GLIB_AVAILABLE_IN_ALL +gboolean g_socket_condition_wait (GSocket *socket, + GIOCondition condition, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_2_32 +gboolean g_socket_condition_timed_wait (GSocket *socket, + GIOCondition condition, + gint64 timeout, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +GSocket * g_socket_accept (GSocket *socket, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_socket_listen (GSocket *socket, + GError **error); +GLIB_AVAILABLE_IN_ALL +gssize g_socket_receive (GSocket *socket, + gchar *buffer, + gsize size, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gssize g_socket_receive_from (GSocket *socket, + GSocketAddress **address, + gchar *buffer, + gsize size, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gssize g_socket_send (GSocket *socket, + const gchar *buffer, + gsize size, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gssize g_socket_send_to (GSocket *socket, + GSocketAddress *address, + const gchar *buffer, + gsize size, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gssize g_socket_receive_message (GSocket *socket, + GSocketAddress **address, + GInputVector *vectors, + gint num_vectors, + GSocketControlMessage ***messages, + gint *num_messages, + gint *flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gssize g_socket_send_message (GSocket *socket, + GSocketAddress *address, + GOutputVector *vectors, + gint num_vectors, + GSocketControlMessage **messages, + gint num_messages, + gint flags, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_2_48 +gint g_socket_receive_messages (GSocket *socket, + GInputMessage *messages, + guint num_messages, + gint flags, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_2_44 +gint g_socket_send_messages (GSocket *socket, + GOutputMessage *messages, + guint num_messages, + gint flags, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_socket_close (GSocket *socket, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_socket_shutdown (GSocket *socket, + gboolean shutdown_read, + gboolean shutdown_write, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_socket_is_closed (GSocket *socket); +GLIB_AVAILABLE_IN_ALL +GSource * g_socket_create_source (GSocket *socket, + GIOCondition condition, + GCancellable *cancellable); +GLIB_AVAILABLE_IN_ALL +gboolean g_socket_speaks_ipv4 (GSocket *socket); +GLIB_AVAILABLE_IN_ALL +GCredentials *g_socket_get_credentials (GSocket *socket, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gssize g_socket_receive_with_blocking (GSocket *socket, + gchar *buffer, + gsize size, + gboolean blocking, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gssize g_socket_send_with_blocking (GSocket *socket, + const gchar *buffer, + gsize size, + gboolean blocking, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_2_36 +gboolean g_socket_get_option (GSocket *socket, + gint level, + gint optname, + gint *value, + GError **error); +GLIB_AVAILABLE_IN_2_36 +gboolean g_socket_set_option (GSocket *socket, + gint level, + gint optname, + gint value, + GError **error); + +G_END_DECLS + +#endif /* __G_SOCKET_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketaddress.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketaddress.h new file mode 100755 index 00000000..ca2dbdae --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketaddress.h @@ -0,0 +1,82 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Christian Kellner, Samuel Cormier-Iijima + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Christian Kellner <gicmo@gnome.org> + * Samuel Cormier-Iijima <sciyoshi@gmail.com> + */ + +#ifndef __G_SOCKET_ADDRESS_H__ +#define __G_SOCKET_ADDRESS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_SOCKET_ADDRESS (g_socket_address_get_type ()) +#define G_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_SOCKET_ADDRESS, GSocketAddress)) +#define G_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_SOCKET_ADDRESS, GSocketAddressClass)) +#define G_IS_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_SOCKET_ADDRESS)) +#define G_IS_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_SOCKET_ADDRESS)) +#define G_SOCKET_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_SOCKET_ADDRESS, GSocketAddressClass)) + +typedef struct _GSocketAddressClass GSocketAddressClass; + +struct _GSocketAddress +{ + GObject parent_instance; +}; + +struct _GSocketAddressClass +{ + GObjectClass parent_class; + + GSocketFamily (*get_family) (GSocketAddress *address); + + gssize (*get_native_size) (GSocketAddress *address); + + gboolean (*to_native) (GSocketAddress *address, + gpointer dest, + gsize destlen, + GError **error); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_socket_address_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GSocketFamily g_socket_address_get_family (GSocketAddress *address); + +GLIB_AVAILABLE_IN_ALL +GSocketAddress * g_socket_address_new_from_native (gpointer native, + gsize len); + +GLIB_AVAILABLE_IN_ALL +gboolean g_socket_address_to_native (GSocketAddress *address, + gpointer dest, + gsize destlen, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gssize g_socket_address_get_native_size (GSocketAddress *address); + +G_END_DECLS + +#endif /* __G_SOCKET_ADDRESS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketaddressenumerator.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketaddressenumerator.h new file mode 100755 index 00000000..f148f636 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketaddressenumerator.h @@ -0,0 +1,91 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_SOCKET_ADDRESS_ENUMERATOR_H__ +#define __G_SOCKET_ADDRESS_ENUMERATOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_SOCKET_ADDRESS_ENUMERATOR (g_socket_address_enumerator_get_type ()) +#define G_SOCKET_ADDRESS_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_SOCKET_ADDRESS_ENUMERATOR, GSocketAddressEnumerator)) +#define G_SOCKET_ADDRESS_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_SOCKET_ADDRESS_ENUMERATOR, GSocketAddressEnumeratorClass)) +#define G_IS_SOCKET_ADDRESS_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_SOCKET_ADDRESS_ENUMERATOR)) +#define G_IS_SOCKET_ADDRESS_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_SOCKET_ADDRESS_ENUMERATOR)) +#define G_SOCKET_ADDRESS_ENUMERATOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_SOCKET_ADDRESS_ENUMERATOR, GSocketAddressEnumeratorClass)) + +/** + * GSocketAddressEnumerator: + * + * Enumerator type for objects that contain or generate + * #GSocketAddress instances. + */ +typedef struct _GSocketAddressEnumeratorClass GSocketAddressEnumeratorClass; + +struct _GSocketAddressEnumerator +{ + GObject parent_instance; + +}; + +struct _GSocketAddressEnumeratorClass +{ + GObjectClass parent_class; + + /* Virtual Table */ + + GSocketAddress * (* next) (GSocketAddressEnumerator *enumerator, + GCancellable *cancellable, + GError **error); + + void (* next_async) (GSocketAddressEnumerator *enumerator, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GSocketAddress * (* next_finish) (GSocketAddressEnumerator *enumerator, + GAsyncResult *result, + GError **error); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_socket_address_enumerator_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GSocketAddress *g_socket_address_enumerator_next (GSocketAddressEnumerator *enumerator, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_socket_address_enumerator_next_async (GSocketAddressEnumerator *enumerator, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GSocketAddress *g_socket_address_enumerator_next_finish (GSocketAddressEnumerator *enumerator, + GAsyncResult *result, + GError **error); + +G_END_DECLS + + +#endif /* __G_SOCKET_ADDRESS_ENUMERATOR_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketclient.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketclient.h new file mode 100755 index 00000000..f0153450 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketclient.h @@ -0,0 +1,197 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2008, 2009 Codethink Limited + * Copyright © 2009 Red Hat, Inc + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + * Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_SOCKET_CLIENT_H__ +#define __G_SOCKET_CLIENT_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_SOCKET_CLIENT (g_socket_client_get_type ()) +#define G_SOCKET_CLIENT(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SOCKET_CLIENT, GSocketClient)) +#define G_SOCKET_CLIENT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_SOCKET_CLIENT, GSocketClientClass)) +#define G_IS_SOCKET_CLIENT(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SOCKET_CLIENT)) +#define G_IS_SOCKET_CLIENT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_SOCKET_CLIENT)) +#define G_SOCKET_CLIENT_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_SOCKET_CLIENT, GSocketClientClass)) + +typedef struct _GSocketClientPrivate GSocketClientPrivate; +typedef struct _GSocketClientClass GSocketClientClass; + +struct _GSocketClientClass +{ + GObjectClass parent_class; + + void (* event) (GSocketClient *client, + GSocketClientEvent event, + GSocketConnectable *connectable, + GIOStream *connection); + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); +}; + +struct _GSocketClient +{ + GObject parent_instance; + GSocketClientPrivate *priv; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_socket_client_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GSocketClient *g_socket_client_new (void); + +GLIB_AVAILABLE_IN_ALL +GSocketFamily g_socket_client_get_family (GSocketClient *client); +GLIB_AVAILABLE_IN_ALL +void g_socket_client_set_family (GSocketClient *client, + GSocketFamily family); +GLIB_AVAILABLE_IN_ALL +GSocketType g_socket_client_get_socket_type (GSocketClient *client); +GLIB_AVAILABLE_IN_ALL +void g_socket_client_set_socket_type (GSocketClient *client, + GSocketType type); +GLIB_AVAILABLE_IN_ALL +GSocketProtocol g_socket_client_get_protocol (GSocketClient *client); +GLIB_AVAILABLE_IN_ALL +void g_socket_client_set_protocol (GSocketClient *client, + GSocketProtocol protocol); +GLIB_AVAILABLE_IN_ALL +GSocketAddress *g_socket_client_get_local_address (GSocketClient *client); +GLIB_AVAILABLE_IN_ALL +void g_socket_client_set_local_address (GSocketClient *client, + GSocketAddress *address); +GLIB_AVAILABLE_IN_ALL +guint g_socket_client_get_timeout (GSocketClient *client); +GLIB_AVAILABLE_IN_ALL +void g_socket_client_set_timeout (GSocketClient *client, + guint timeout); +GLIB_AVAILABLE_IN_ALL +gboolean g_socket_client_get_enable_proxy (GSocketClient *client); +GLIB_AVAILABLE_IN_ALL +void g_socket_client_set_enable_proxy (GSocketClient *client, + gboolean enable); + +GLIB_AVAILABLE_IN_2_28 +gboolean g_socket_client_get_tls (GSocketClient *client); +GLIB_AVAILABLE_IN_2_28 +void g_socket_client_set_tls (GSocketClient *client, + gboolean tls); +GLIB_AVAILABLE_IN_2_28 +GTlsCertificateFlags g_socket_client_get_tls_validation_flags (GSocketClient *client); +GLIB_AVAILABLE_IN_2_28 +void g_socket_client_set_tls_validation_flags (GSocketClient *client, + GTlsCertificateFlags flags); +GLIB_AVAILABLE_IN_2_36 +GProxyResolver *g_socket_client_get_proxy_resolver (GSocketClient *client); +GLIB_AVAILABLE_IN_2_36 +void g_socket_client_set_proxy_resolver (GSocketClient *client, + GProxyResolver *proxy_resolver); + +GLIB_AVAILABLE_IN_ALL +GSocketConnection * g_socket_client_connect (GSocketClient *client, + GSocketConnectable *connectable, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +GSocketConnection * g_socket_client_connect_to_host (GSocketClient *client, + const gchar *host_and_port, + guint16 default_port, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +GSocketConnection * g_socket_client_connect_to_service (GSocketClient *client, + const gchar *domain, + const gchar *service, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_2_26 +GSocketConnection * g_socket_client_connect_to_uri (GSocketClient *client, + const gchar *uri, + guint16 default_port, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_socket_client_connect_async (GSocketClient *client, + GSocketConnectable *connectable, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GSocketConnection * g_socket_client_connect_finish (GSocketClient *client, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_socket_client_connect_to_host_async (GSocketClient *client, + const gchar *host_and_port, + guint16 default_port, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GSocketConnection * g_socket_client_connect_to_host_finish (GSocketClient *client, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_socket_client_connect_to_service_async (GSocketClient *client, + const gchar *domain, + const gchar *service, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GSocketConnection * g_socket_client_connect_to_service_finish (GSocketClient *client, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_socket_client_connect_to_uri_async (GSocketClient *client, + const gchar *uri, + guint16 default_port, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GSocketConnection * g_socket_client_connect_to_uri_finish (GSocketClient *client, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_socket_client_add_application_proxy (GSocketClient *client, + const gchar *protocol); + +G_END_DECLS + +#endif /* __G_SOCKET_CLIENT_H___ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketconnectable.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketconnectable.h new file mode 100755 index 00000000..6528d493 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketconnectable.h @@ -0,0 +1,81 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_SOCKET_CONNECTABLE_H__ +#define __G_SOCKET_CONNECTABLE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_SOCKET_CONNECTABLE (g_socket_connectable_get_type ()) +#define G_SOCKET_CONNECTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_SOCKET_CONNECTABLE, GSocketConnectable)) +#define G_IS_SOCKET_CONNECTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_SOCKET_CONNECTABLE)) +#define G_SOCKET_CONNECTABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_SOCKET_CONNECTABLE, GSocketConnectableIface)) + +/** + * GSocketConnectable: + * + * Interface for objects that contain or generate #GSocketAddresses. + */ +typedef struct _GSocketConnectableIface GSocketConnectableIface; + +/** + * GSocketConnectableIface: + * @g_iface: The parent interface. + * @enumerate: Creates a #GSocketAddressEnumerator + * @proxy_enumerate: Creates a #GProxyAddressEnumerator + * @to_string: Format the connectable’s address as a string for debugging. + * Implementing this is optional. (Since: 2.48) + * + * Provides an interface for returning a #GSocketAddressEnumerator + * and #GProxyAddressEnumerator + */ +struct _GSocketConnectableIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + GSocketAddressEnumerator * (* enumerate) (GSocketConnectable *connectable); + + GSocketAddressEnumerator * (* proxy_enumerate) (GSocketConnectable *connectable); + + gchar * (* to_string) (GSocketConnectable *connectable); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_socket_connectable_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GSocketAddressEnumerator *g_socket_connectable_enumerate (GSocketConnectable *connectable); + +GLIB_AVAILABLE_IN_ALL +GSocketAddressEnumerator *g_socket_connectable_proxy_enumerate (GSocketConnectable *connectable); + +GLIB_AVAILABLE_IN_2_48 +gchar *g_socket_connectable_to_string (GSocketConnectable *connectable); + +G_END_DECLS + + +#endif /* __G_SOCKET_CONNECTABLE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketconnection.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketconnection.h new file mode 100755 index 00000000..bc7a0760 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketconnection.h @@ -0,0 +1,115 @@ +/* GIO - GLib Input, Output and Streaming Library + * Copyright © 2008 Christian Kellner, Samuel Cormier-Iijima + * Copyright © 2009 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Christian Kellner <gicmo@gnome.org> + * Samuel Cormier-Iijima <sciyoshi@gmail.com> + * Ryan Lortie <desrt@desrt.ca> + * Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_SOCKET_CONNECTION_H__ +#define __G_SOCKET_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <glib-object.h> +#include <gio/gsocket.h> +#include <gio/giostream.h> + +G_BEGIN_DECLS + +#define G_TYPE_SOCKET_CONNECTION (g_socket_connection_get_type ()) +#define G_SOCKET_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SOCKET_CONNECTION, GSocketConnection)) +#define G_SOCKET_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_SOCKET_CONNECTION, GSocketConnectionClass)) +#define G_IS_SOCKET_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SOCKET_CONNECTION)) +#define G_IS_SOCKET_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_SOCKET_CONNECTION)) +#define G_SOCKET_CONNECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_SOCKET_CONNECTION, GSocketConnectionClass)) + +typedef struct _GSocketConnectionPrivate GSocketConnectionPrivate; +typedef struct _GSocketConnectionClass GSocketConnectionClass; + +struct _GSocketConnectionClass +{ + GIOStreamClass parent_class; + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); +}; + +struct _GSocketConnection +{ + GIOStream parent_instance; + GSocketConnectionPrivate *priv; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_socket_connection_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_32 +gboolean g_socket_connection_is_connected (GSocketConnection *connection); +GLIB_AVAILABLE_IN_2_32 +gboolean g_socket_connection_connect (GSocketConnection *connection, + GSocketAddress *address, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_2_32 +void g_socket_connection_connect_async (GSocketConnection *connection, + GSocketAddress *address, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_2_32 +gboolean g_socket_connection_connect_finish (GSocketConnection *connection, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +GSocket *g_socket_connection_get_socket (GSocketConnection *connection); +GLIB_AVAILABLE_IN_ALL +GSocketAddress *g_socket_connection_get_local_address (GSocketConnection *connection, + GError **error); +GLIB_AVAILABLE_IN_ALL +GSocketAddress *g_socket_connection_get_remote_address (GSocketConnection *connection, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_socket_connection_factory_register_type (GType g_type, + GSocketFamily family, + GSocketType type, + gint protocol); +GLIB_AVAILABLE_IN_ALL +GType g_socket_connection_factory_lookup_type (GSocketFamily family, + GSocketType type, + gint protocol_id); +GLIB_AVAILABLE_IN_ALL +GSocketConnection *g_socket_connection_factory_create_connection (GSocket *socket); + +G_END_DECLS + +#endif /* __G_SOCKET_CONNECTION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketcontrolmessage.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketcontrolmessage.h new file mode 100755 index 00000000..a4a5d019 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketcontrolmessage.h @@ -0,0 +1,111 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2009 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_SOCKET_CONTROL_MESSAGE_H__ +#define __G_SOCKET_CONTROL_MESSAGE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_SOCKET_CONTROL_MESSAGE (g_socket_control_message_get_type ()) +#define G_SOCKET_CONTROL_MESSAGE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SOCKET_CONTROL_MESSAGE, \ + GSocketControlMessage)) +#define G_SOCKET_CONTROL_MESSAGE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_SOCKET_CONTROL_MESSAGE, \ + GSocketControlMessageClass)) +#define G_IS_SOCKET_CONTROL_MESSAGE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SOCKET_CONTROL_MESSAGE)) +#define G_IS_SOCKET_CONTROL_MESSAGE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_SOCKET_CONTROL_MESSAGE)) +#define G_SOCKET_CONTROL_MESSAGE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_SOCKET_CONTROL_MESSAGE, \ + GSocketControlMessageClass)) + +typedef struct _GSocketControlMessagePrivate GSocketControlMessagePrivate; +typedef struct _GSocketControlMessageClass GSocketControlMessageClass; + +/** + * GSocketControlMessageClass: + * @get_size: gets the size of the message. + * @get_level: gets the protocol of the message. + * @get_type: gets the protocol specific type of the message. + * @serialize: Writes out the message data. + * @deserialize: Tries to deserialize a message. + * + * Class structure for #GSocketControlMessage. + **/ + +struct _GSocketControlMessageClass +{ + GObjectClass parent_class; + + gsize (* get_size) (GSocketControlMessage *message); + int (* get_level) (GSocketControlMessage *message); + int (* get_type) (GSocketControlMessage *message); + void (* serialize) (GSocketControlMessage *message, + gpointer data); + GSocketControlMessage *(* deserialize) (int level, + int type, + gsize size, + gpointer data); + + /*< private >*/ + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +struct _GSocketControlMessage +{ + GObject parent_instance; + GSocketControlMessagePrivate *priv; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_socket_control_message_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gsize g_socket_control_message_get_size (GSocketControlMessage *message); +GLIB_AVAILABLE_IN_ALL +int g_socket_control_message_get_level (GSocketControlMessage *message); +GLIB_AVAILABLE_IN_ALL +int g_socket_control_message_get_msg_type (GSocketControlMessage *message); +GLIB_AVAILABLE_IN_ALL +void g_socket_control_message_serialize (GSocketControlMessage *message, + gpointer data); +GLIB_AVAILABLE_IN_ALL +GSocketControlMessage *g_socket_control_message_deserialize (int level, + int type, + gsize size, + gpointer data); + + +G_END_DECLS + +#endif /* __G_SOCKET_CONTROL_MESSAGE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketlistener.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketlistener.h new file mode 100755 index 00000000..e5185c28 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketlistener.h @@ -0,0 +1,155 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2008 Christian Kellner, Samuel Cormier-Iijima + * Copyright © 2009 Codethink Limited + * Copyright © 2009 Red Hat, Inc + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Christian Kellner <gicmo@gnome.org> + * Samuel Cormier-Iijima <sciyoshi@gmail.com> + * Ryan Lortie <desrt@desrt.ca> + * Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_SOCKET_LISTENER_H__ +#define __G_SOCKET_LISTENER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_SOCKET_LISTENER (g_socket_listener_get_type ()) +#define G_SOCKET_LISTENER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SOCKET_LISTENER, GSocketListener)) +#define G_SOCKET_LISTENER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_SOCKET_LISTENER, GSocketListenerClass)) +#define G_IS_SOCKET_LISTENER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SOCKET_LISTENER)) +#define G_IS_SOCKET_LISTENER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_SOCKET_LISTENER)) +#define G_SOCKET_LISTENER_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_SOCKET_LISTENER, GSocketListenerClass)) + +typedef struct _GSocketListenerPrivate GSocketListenerPrivate; +typedef struct _GSocketListenerClass GSocketListenerClass; + +/** + * GSocketListenerClass: + * @changed: virtual method called when the set of socket listened to changes + * + * Class structure for #GSocketListener. + **/ +struct _GSocketListenerClass +{ + GObjectClass parent_class; + + void (* changed) (GSocketListener *listener); + + void (* event) (GSocketListener *listener, + GSocketListenerEvent event, + GSocket *socket); + + /* Padding for future expansion */ + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); +}; + +struct _GSocketListener +{ + GObject parent_instance; + GSocketListenerPrivate *priv; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_socket_listener_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GSocketListener * g_socket_listener_new (void); + +GLIB_AVAILABLE_IN_ALL +void g_socket_listener_set_backlog (GSocketListener *listener, + int listen_backlog); + +GLIB_AVAILABLE_IN_ALL +gboolean g_socket_listener_add_socket (GSocketListener *listener, + GSocket *socket, + GObject *source_object, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_socket_listener_add_address (GSocketListener *listener, + GSocketAddress *address, + GSocketType type, + GSocketProtocol protocol, + GObject *source_object, + GSocketAddress **effective_address, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_socket_listener_add_inet_port (GSocketListener *listener, + guint16 port, + GObject *source_object, + GError **error); +GLIB_AVAILABLE_IN_ALL +guint16 g_socket_listener_add_any_inet_port (GSocketListener *listener, + GObject *source_object, + GError **error); + +GLIB_AVAILABLE_IN_ALL +GSocket * g_socket_listener_accept_socket (GSocketListener *listener, + GObject **source_object, + GCancellable *cancellable, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_socket_listener_accept_socket_async (GSocketListener *listener, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GSocket * g_socket_listener_accept_socket_finish (GSocketListener *listener, + GAsyncResult *result, + GObject **source_object, + GError **error); + + +GLIB_AVAILABLE_IN_ALL +GSocketConnection * g_socket_listener_accept (GSocketListener *listener, + GObject **source_object, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_socket_listener_accept_async (GSocketListener *listener, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +GSocketConnection * g_socket_listener_accept_finish (GSocketListener *listener, + GAsyncResult *result, + GObject **source_object, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_socket_listener_close (GSocketListener *listener); + +G_END_DECLS + +#endif /* __G_SOCKET_LISTENER_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketservice.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketservice.h new file mode 100755 index 00000000..f25a1b6b --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsocketservice.h @@ -0,0 +1,93 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2009 Codethink Limited + * Copyright © 2009 Red Hat, Inc + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + * Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_SOCKET_SERVICE_H__ +#define __G_SOCKET_SERVICE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gsocketlistener.h> + +G_BEGIN_DECLS + +#define G_TYPE_SOCKET_SERVICE (g_socket_service_get_type ()) +#define G_SOCKET_SERVICE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SOCKET_SERVICE, GSocketService)) +#define G_SOCKET_SERVICE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_SOCKET_SERVICE, GSocketServiceClass)) +#define G_IS_SOCKET_SERVICE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SOCKET_SERVICE)) +#define G_IS_SOCKET_SERVICE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_SOCKET_SERVICE)) +#define G_SOCKET_SERVICE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_SOCKET_SERVICE, GSocketServiceClass)) + +typedef struct _GSocketServicePrivate GSocketServicePrivate; +typedef struct _GSocketServiceClass GSocketServiceClass; + +/** + * GSocketServiceClass: + * @incomming: signal emitted when new connections are accepted + * + * Class structure for #GSocketService. + */ +struct _GSocketServiceClass +{ + GSocketListenerClass parent_class; + + gboolean (* incoming) (GSocketService *service, + GSocketConnection *connection, + GObject *source_object); + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); +}; + +struct _GSocketService +{ + GSocketListener parent_instance; + GSocketServicePrivate *priv; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_socket_service_get_type (void); + +GLIB_AVAILABLE_IN_ALL +GSocketService *g_socket_service_new (void); +GLIB_AVAILABLE_IN_ALL +void g_socket_service_start (GSocketService *service); +GLIB_AVAILABLE_IN_ALL +void g_socket_service_stop (GSocketService *service); +GLIB_AVAILABLE_IN_ALL +gboolean g_socket_service_is_active (GSocketService *service); + + +G_END_DECLS + +#endif /* __G_SOCKET_SERVICE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsrvtarget.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsrvtarget.h new file mode 100755 index 00000000..3ef16f13 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsrvtarget.h @@ -0,0 +1,59 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_SRV_TARGET_H__ +#define __G_SRV_TARGET_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +GType g_srv_target_get_type (void) G_GNUC_CONST; +#define G_TYPE_SRV_TARGET (g_srv_target_get_type ()) + +GLIB_AVAILABLE_IN_ALL +GSrvTarget *g_srv_target_new (const gchar *hostname, + guint16 port, + guint16 priority, + guint16 weight); +GLIB_AVAILABLE_IN_ALL +GSrvTarget *g_srv_target_copy (GSrvTarget *target); +GLIB_AVAILABLE_IN_ALL +void g_srv_target_free (GSrvTarget *target); + +GLIB_AVAILABLE_IN_ALL +const gchar *g_srv_target_get_hostname (GSrvTarget *target); +GLIB_AVAILABLE_IN_ALL +guint16 g_srv_target_get_port (GSrvTarget *target); +GLIB_AVAILABLE_IN_ALL +guint16 g_srv_target_get_priority (GSrvTarget *target); +GLIB_AVAILABLE_IN_ALL +guint16 g_srv_target_get_weight (GSrvTarget *target); + +GLIB_AVAILABLE_IN_ALL +GList *g_srv_target_list_sort (GList *targets); + +G_END_DECLS + +#endif /* __G_SRV_TARGET_H__ */ + diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsubprocess.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsubprocess.h new file mode 100755 index 00000000..68bb26aa --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsubprocess.h @@ -0,0 +1,167 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2012 Colin Walters <walters@verbum.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Colin Walters <walters@verbum.org> + */ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#ifndef __G_SUBPROCESS_H__ +#define __G_SUBPROCESS_H__ + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_SUBPROCESS (g_subprocess_get_type ()) +#define G_SUBPROCESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_SUBPROCESS, GSubprocess)) +#define G_IS_SUBPROCESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_SUBPROCESS)) + +GLIB_AVAILABLE_IN_2_40 +GType g_subprocess_get_type (void) G_GNUC_CONST; + +/**** Core API ****/ + +GLIB_AVAILABLE_IN_2_40 +GSubprocess * g_subprocess_new (GSubprocessFlags flags, + GError **error, + const gchar *argv0, + ...) G_GNUC_NULL_TERMINATED; +GLIB_AVAILABLE_IN_2_40 +GSubprocess * g_subprocess_newv (const gchar * const *argv, + GSubprocessFlags flags, + GError **error); + +GLIB_AVAILABLE_IN_2_40 +GOutputStream * g_subprocess_get_stdin_pipe (GSubprocess *subprocess); + +GLIB_AVAILABLE_IN_2_40 +GInputStream * g_subprocess_get_stdout_pipe (GSubprocess *subprocess); + +GLIB_AVAILABLE_IN_2_40 +GInputStream * g_subprocess_get_stderr_pipe (GSubprocess *subprocess); + +GLIB_AVAILABLE_IN_2_40 +const gchar * g_subprocess_get_identifier (GSubprocess *subprocess); + +#ifdef G_OS_UNIX +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_send_signal (GSubprocess *subprocess, + gint signal_num); +#endif + +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_force_exit (GSubprocess *subprocess); + +GLIB_AVAILABLE_IN_2_40 +gboolean g_subprocess_wait (GSubprocess *subprocess, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_wait_async (GSubprocess *subprocess, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_40 +gboolean g_subprocess_wait_finish (GSubprocess *subprocess, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_2_40 +gboolean g_subprocess_wait_check (GSubprocess *subprocess, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_wait_check_async (GSubprocess *subprocess, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_40 +gboolean g_subprocess_wait_check_finish (GSubprocess *subprocess, + GAsyncResult *result, + GError **error); + + +GLIB_AVAILABLE_IN_2_40 +gint g_subprocess_get_status (GSubprocess *subprocess); + +GLIB_AVAILABLE_IN_2_40 +gboolean g_subprocess_get_successful (GSubprocess *subprocess); + +GLIB_AVAILABLE_IN_2_40 +gboolean g_subprocess_get_if_exited (GSubprocess *subprocess); + +GLIB_AVAILABLE_IN_2_40 +gint g_subprocess_get_exit_status (GSubprocess *subprocess); + +GLIB_AVAILABLE_IN_2_40 +gboolean g_subprocess_get_if_signaled (GSubprocess *subprocess); + +GLIB_AVAILABLE_IN_2_40 +gint g_subprocess_get_term_sig (GSubprocess *subprocess); + +GLIB_AVAILABLE_IN_2_40 +gboolean g_subprocess_communicate (GSubprocess *subprocess, + GBytes *stdin_buf, + GCancellable *cancellable, + GBytes **stdout_buf, + GBytes **stderr_buf, + GError **error); +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_communicate_async (GSubprocess *subprocess, + GBytes *stdin_buf, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_40 +gboolean g_subprocess_communicate_finish (GSubprocess *subprocess, + GAsyncResult *result, + GBytes **stdout_buf, + GBytes **stderr_buf, + GError **error); + +GLIB_AVAILABLE_IN_2_40 +gboolean g_subprocess_communicate_utf8 (GSubprocess *subprocess, + const char *stdin_buf, + GCancellable *cancellable, + char **stdout_buf, + char **stderr_buf, + GError **error); +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_communicate_utf8_async (GSubprocess *subprocess, + const char *stdin_buf, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_40 +gboolean g_subprocess_communicate_utf8_finish (GSubprocess *subprocess, + GAsyncResult *result, + char **stdout_buf, + char **stderr_buf, + GError **error); + +G_END_DECLS + +#endif /* __G_SUBPROCESS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsubprocesslauncher.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsubprocesslauncher.h new file mode 100755 index 00000000..05d83f13 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gsubprocesslauncher.h @@ -0,0 +1,116 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2012,2013 Colin Walters <walters@verbum.org> + * Copyright © 2012,2013 Canonical Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Ryan Lortie <desrt@desrt.ca> + * Author: Colin Walters <walters@verbum.org> + */ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#ifndef __G_SUBPROCESS_LAUNCHER_H__ +#define __G_SUBPROCESS_LAUNCHER_H__ + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_SUBPROCESS_LAUNCHER (g_subprocess_launcher_get_type ()) +#define G_SUBPROCESS_LAUNCHER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_SUBPROCESS_LAUNCHER, GSubprocessLauncher)) +#define G_IS_SUBPROCESS_LAUNCHER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_SUBPROCESS_LAUNCHER)) + +GLIB_AVAILABLE_IN_2_40 +GType g_subprocess_launcher_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_40 +GSubprocessLauncher * g_subprocess_launcher_new (GSubprocessFlags flags); + +GLIB_AVAILABLE_IN_2_40 +GSubprocess * g_subprocess_launcher_spawn (GSubprocessLauncher *self, + GError **error, + const gchar *argv0, + ...) G_GNUC_NULL_TERMINATED; + +GLIB_AVAILABLE_IN_2_40 +GSubprocess * g_subprocess_launcher_spawnv (GSubprocessLauncher *self, + const gchar * const *argv, + GError **error); + +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_launcher_set_environ (GSubprocessLauncher *self, + gchar **env); + +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_launcher_setenv (GSubprocessLauncher *self, + const gchar *variable, + const gchar *value, + gboolean overwrite); + +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_launcher_unsetenv (GSubprocessLauncher *self, + const gchar *variable); + +GLIB_AVAILABLE_IN_2_40 +const gchar * g_subprocess_launcher_getenv (GSubprocessLauncher *self, + const gchar *variable); + +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_launcher_set_cwd (GSubprocessLauncher *self, + const gchar *cwd); +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_launcher_set_flags (GSubprocessLauncher *self, + GSubprocessFlags flags); + +/* Extended I/O control, only available on UNIX */ +#ifdef G_OS_UNIX +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_launcher_set_stdin_file_path (GSubprocessLauncher *self, + const gchar *path); +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_launcher_take_stdin_fd (GSubprocessLauncher *self, + gint fd); +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_launcher_set_stdout_file_path (GSubprocessLauncher *self, + const gchar *path); +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_launcher_take_stdout_fd (GSubprocessLauncher *self, + gint fd); +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_launcher_set_stderr_file_path (GSubprocessLauncher *self, + const gchar *path); +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_launcher_take_stderr_fd (GSubprocessLauncher *self, + gint fd); + +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_launcher_take_fd (GSubprocessLauncher *self, + gint source_fd, + gint target_fd); + +/* Child setup, only available on UNIX */ +GLIB_AVAILABLE_IN_2_40 +void g_subprocess_launcher_set_child_setup (GSubprocessLauncher *self, + GSpawnChildSetupFunc child_setup, + gpointer user_data, + GDestroyNotify destroy_notify); +#endif + +G_END_DECLS + +#endif /* __G_SUBPROCESS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtask.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtask.h new file mode 100755 index 00000000..92cd2b14 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtask.h @@ -0,0 +1,160 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright 2011 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_TASK_H__ +#define __G_TASK_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_TASK (g_task_get_type ()) +#define G_TASK(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_TASK, GTask)) +#define G_TASK_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_TASK, GTaskClass)) +#define G_IS_TASK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_TASK)) +#define G_IS_TASK_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_TASK)) +#define G_TASK_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_TASK, GTaskClass)) + +typedef struct _GTaskClass GTaskClass; + +GLIB_AVAILABLE_IN_2_36 +GType g_task_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_36 +GTask *g_task_new (gpointer source_object, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer callback_data); + +GLIB_AVAILABLE_IN_2_36 +void g_task_report_error (gpointer source_object, + GAsyncReadyCallback callback, + gpointer callback_data, + gpointer source_tag, + GError *error); +GLIB_AVAILABLE_IN_2_36 +void g_task_report_new_error (gpointer source_object, + GAsyncReadyCallback callback, + gpointer callback_data, + gpointer source_tag, + GQuark domain, + gint code, + const char *format, + ...) G_GNUC_PRINTF(7, 8); + +GLIB_AVAILABLE_IN_2_36 +void g_task_set_task_data (GTask *task, + gpointer task_data, + GDestroyNotify task_data_destroy); +GLIB_AVAILABLE_IN_2_36 +void g_task_set_priority (GTask *task, + gint priority); +GLIB_AVAILABLE_IN_2_36 +void g_task_set_check_cancellable (GTask *task, + gboolean check_cancellable); +GLIB_AVAILABLE_IN_2_36 +void g_task_set_source_tag (GTask *task, + gpointer source_tag); + +GLIB_AVAILABLE_IN_2_36 +gpointer g_task_get_source_object (GTask *task); +GLIB_AVAILABLE_IN_2_36 +gpointer g_task_get_task_data (GTask *task); +GLIB_AVAILABLE_IN_2_36 +gint g_task_get_priority (GTask *task); +GLIB_AVAILABLE_IN_2_36 +GMainContext *g_task_get_context (GTask *task); +GLIB_AVAILABLE_IN_2_36 +GCancellable *g_task_get_cancellable (GTask *task); +GLIB_AVAILABLE_IN_2_36 +gboolean g_task_get_check_cancellable (GTask *task); +GLIB_AVAILABLE_IN_2_36 +gpointer g_task_get_source_tag (GTask *task); + +GLIB_AVAILABLE_IN_2_36 +gboolean g_task_is_valid (gpointer result, + gpointer source_object); + + +typedef void (*GTaskThreadFunc) (GTask *task, + gpointer source_object, + gpointer task_data, + GCancellable *cancellable); +GLIB_AVAILABLE_IN_2_36 +void g_task_run_in_thread (GTask *task, + GTaskThreadFunc task_func); +GLIB_AVAILABLE_IN_2_36 +void g_task_run_in_thread_sync (GTask *task, + GTaskThreadFunc task_func); +GLIB_AVAILABLE_IN_2_36 +gboolean g_task_set_return_on_cancel (GTask *task, + gboolean return_on_cancel); +GLIB_AVAILABLE_IN_2_36 +gboolean g_task_get_return_on_cancel (GTask *task); + +GLIB_AVAILABLE_IN_2_36 +void g_task_attach_source (GTask *task, + GSource *source, + GSourceFunc callback); + + +GLIB_AVAILABLE_IN_2_36 +void g_task_return_pointer (GTask *task, + gpointer result, + GDestroyNotify result_destroy); +GLIB_AVAILABLE_IN_2_36 +void g_task_return_boolean (GTask *task, + gboolean result); +GLIB_AVAILABLE_IN_2_36 +void g_task_return_int (GTask *task, + gssize result); + +GLIB_AVAILABLE_IN_2_36 +void g_task_return_error (GTask *task, + GError *error); +GLIB_AVAILABLE_IN_2_36 +void g_task_return_new_error (GTask *task, + GQuark domain, + gint code, + const char *format, + ...) G_GNUC_PRINTF (4, 5); + +GLIB_AVAILABLE_IN_2_36 +gboolean g_task_return_error_if_cancelled (GTask *task); + +GLIB_AVAILABLE_IN_2_36 +gpointer g_task_propagate_pointer (GTask *task, + GError **error); +GLIB_AVAILABLE_IN_2_36 +gboolean g_task_propagate_boolean (GTask *task, + GError **error); +GLIB_AVAILABLE_IN_2_36 +gssize g_task_propagate_int (GTask *task, + GError **error); +GLIB_AVAILABLE_IN_2_36 +gboolean g_task_had_error (GTask *task); +GLIB_AVAILABLE_IN_2_44 +gboolean g_task_get_completed (GTask *task); + +G_END_DECLS + +#endif /* __G_TASK_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtcpconnection.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtcpconnection.h new file mode 100755 index 00000000..39645f91 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtcpconnection.h @@ -0,0 +1,69 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2008, 2009 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_TCP_CONNECTION_H__ +#define __G_TCP_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gsocketconnection.h> + +G_BEGIN_DECLS + +#define G_TYPE_TCP_CONNECTION (g_tcp_connection_get_type ()) +#define G_TCP_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_TCP_CONNECTION, GTcpConnection)) +#define G_TCP_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_TCP_CONNECTION, GTcpConnectionClass)) +#define G_IS_TCP_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_TCP_CONNECTION)) +#define G_IS_TCP_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_TCP_CONNECTION)) +#define G_TCP_CONNECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_TCP_CONNECTION, GTcpConnectionClass)) + +typedef struct _GTcpConnectionPrivate GTcpConnectionPrivate; +typedef struct _GTcpConnectionClass GTcpConnectionClass; + +struct _GTcpConnectionClass +{ + GSocketConnectionClass parent_class; +}; + +struct _GTcpConnection +{ + GSocketConnection parent_instance; + GTcpConnectionPrivate *priv; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_tcp_connection_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +void g_tcp_connection_set_graceful_disconnect (GTcpConnection *connection, + gboolean graceful_disconnect); +GLIB_AVAILABLE_IN_ALL +gboolean g_tcp_connection_get_graceful_disconnect (GTcpConnection *connection); + +G_END_DECLS + +#endif /* __G_TCP_CONNECTION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtcpwrapperconnection.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtcpwrapperconnection.h new file mode 100755 index 00000000..a32acad7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtcpwrapperconnection.h @@ -0,0 +1,69 @@ +/* GIO - GLib Input, Output and Streaming Library + * Copyright © 2010 Collabora Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> + * + */ + +#ifndef __G_TCP_WRAPPER_CONNECTION_H__ +#define __G_TCP_WRAPPER_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gtcpconnection.h> + +G_BEGIN_DECLS + +#define G_TYPE_TCP_WRAPPER_CONNECTION (g_tcp_wrapper_connection_get_type ()) +#define G_TCP_WRAPPER_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_TCP_WRAPPER_CONNECTION, GTcpWrapperConnection)) +#define G_TCP_WRAPPER_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_TCP_WRAPPER_CONNECTION, GTcpWrapperConnectionClass)) +#define G_IS_TCP_WRAPPER_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_TCP_WRAPPER_CONNECTION)) +#define G_IS_TCP_WRAPPER_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_TCP_WRAPPER_CONNECTION)) +#define G_TCP_WRAPPER_CONNECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_TCP_WRAPPER_CONNECTION, GTcpWrapperConnectionClass)) + +typedef struct _GTcpWrapperConnectionPrivate GTcpWrapperConnectionPrivate; +typedef struct _GTcpWrapperConnectionClass GTcpWrapperConnectionClass; + +struct _GTcpWrapperConnectionClass +{ + GTcpConnectionClass parent_class; +}; + +struct _GTcpWrapperConnection +{ + GTcpConnection parent_instance; + GTcpWrapperConnectionPrivate *priv; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_tcp_wrapper_connection_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GSocketConnection *g_tcp_wrapper_connection_new (GIOStream *base_io_stream, + GSocket *socket); +GLIB_AVAILABLE_IN_ALL +GIOStream *g_tcp_wrapper_connection_get_base_io_stream (GTcpWrapperConnection *conn); + +G_END_DECLS + +#endif /* __G_TCP_WRAPPER_CONNECTION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtestdbus.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtestdbus.h new file mode 100755 index 00000000..9467f59a --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtestdbus.h @@ -0,0 +1,72 @@ +/* GIO testing utilities + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * Copyright (C) 2012 Collabora Ltd. <http://www.collabora.co.uk/> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: David Zeuthen <davidz@redhat.com> + * Xavier Claessens <xavier.claessens@collabora.co.uk> + */ + +#ifndef __G_TEST_DBUS_H__ +#define __G_TEST_DBUS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_TEST_DBUS \ + (g_test_dbus_get_type ()) +#define G_TEST_DBUS(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_TEST_DBUS, \ + GTestDBus)) +#define G_IS_TEST_DBUS(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_TEST_DBUS)) + +GLIB_AVAILABLE_IN_2_34 +GType g_test_dbus_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_2_34 +GTestDBus * g_test_dbus_new (GTestDBusFlags flags); + +GLIB_AVAILABLE_IN_2_34 +GTestDBusFlags g_test_dbus_get_flags (GTestDBus *self); + +GLIB_AVAILABLE_IN_2_34 +const gchar * g_test_dbus_get_bus_address (GTestDBus *self); + +GLIB_AVAILABLE_IN_2_34 +void g_test_dbus_add_service_dir (GTestDBus *self, + const gchar *path); + +GLIB_AVAILABLE_IN_2_34 +void g_test_dbus_up (GTestDBus *self); + +GLIB_AVAILABLE_IN_2_34 +void g_test_dbus_stop (GTestDBus *self); + +GLIB_AVAILABLE_IN_2_34 +void g_test_dbus_down (GTestDBus *self); + +GLIB_AVAILABLE_IN_2_34 +void g_test_dbus_unset (void); + +G_END_DECLS + +#endif /* __G_TEST_DBUS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gthemedicon.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gthemedicon.h new file mode 100755 index 00000000..3a145b5c --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gthemedicon.h @@ -0,0 +1,68 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_THEMED_ICON_H__ +#define __G_THEMED_ICON_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_THEMED_ICON (g_themed_icon_get_type ()) +#define G_THEMED_ICON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_THEMED_ICON, GThemedIcon)) +#define G_THEMED_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_THEMED_ICON, GThemedIconClass)) +#define G_IS_THEMED_ICON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_THEMED_ICON)) +#define G_IS_THEMED_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_THEMED_ICON)) +#define G_THEMED_ICON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_THEMED_ICON, GThemedIconClass)) + +/** + * GThemedIcon: + * + * An implementation of #GIcon for themed icons. + **/ +typedef struct _GThemedIconClass GThemedIconClass; + +GLIB_AVAILABLE_IN_ALL +GType g_themed_icon_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GIcon *g_themed_icon_new (const char *iconname); +GLIB_AVAILABLE_IN_ALL +GIcon *g_themed_icon_new_with_default_fallbacks (const char *iconname); +GLIB_AVAILABLE_IN_ALL +GIcon *g_themed_icon_new_from_names (char **iconnames, + int len); +GLIB_AVAILABLE_IN_ALL +void g_themed_icon_prepend_name (GThemedIcon *icon, + const char *iconname); +GLIB_AVAILABLE_IN_ALL +void g_themed_icon_append_name (GThemedIcon *icon, + const char *iconname); + +GLIB_AVAILABLE_IN_ALL +const gchar* const * g_themed_icon_get_names (GThemedIcon *icon); + +G_END_DECLS + +#endif /* __G_THEMED_ICON_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gthreadedsocketservice.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gthreadedsocketservice.h new file mode 100755 index 00000000..fa3204f9 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gthreadedsocketservice.h @@ -0,0 +1,81 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2009 Codethink Limited + * Copyright © 2009 Red Hat, Inc + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Ryan Lortie <desrt@desrt.ca> + * Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_THREADED_SOCKET_SERVICE_H__ +#define __G_THREADED_SOCKET_SERVICE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gsocketservice.h> + +G_BEGIN_DECLS + +#define G_TYPE_THREADED_SOCKET_SERVICE (g_threaded_socket_service_get_type ()) +#define G_THREADED_SOCKET_SERVICE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_THREADED_SOCKET_SERVICE, \ + GThreadedSocketService)) +#define G_THREADED_SOCKET_SERVICE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_THREADED_SOCKET_SERVICE, \ + GThreadedSocketServiceClass)) +#define G_IS_THREADED_SOCKET_SERVICE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_THREADED_SOCKET_SERVICE)) +#define G_IS_THREADED_SOCKET_SERVICE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_THREADED_SOCKET_SERVICE)) +#define G_THREADED_SOCKET_SERVICE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_THREADED_SOCKET_SERVICE, \ + GThreadedSocketServiceClass)) + +typedef struct _GThreadedSocketServicePrivate GThreadedSocketServicePrivate; +typedef struct _GThreadedSocketServiceClass GThreadedSocketServiceClass; + +struct _GThreadedSocketServiceClass +{ + GSocketServiceClass parent_class; + + gboolean (* run) (GThreadedSocketService *service, + GSocketConnection *connection, + GObject *source_object); + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +struct _GThreadedSocketService +{ + GSocketService parent_instance; + GThreadedSocketServicePrivate *priv; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_threaded_socket_service_get_type (void); +GLIB_AVAILABLE_IN_ALL +GSocketService * g_threaded_socket_service_new (int max_threads); + +G_END_DECLS + +#endif /* __G_THREADED_SOCKET_SERVICE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsbackend.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsbackend.h new file mode 100755 index 00000000..a75036fe --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsbackend.h @@ -0,0 +1,110 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Red Hat, Inc. + * Copyright © 2015 Collabora, Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_TLS_BACKEND_H__ +#define __G_TLS_BACKEND_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +/** + * G_TLS_BACKEND_EXTENSION_POINT_NAME: + * + * Extension point for TLS functionality via #GTlsBackend. + * See [Extending GIO][extending-gio]. + */ +#define G_TLS_BACKEND_EXTENSION_POINT_NAME "gio-tls-backend" + +#define G_TYPE_TLS_BACKEND (g_tls_backend_get_type ()) +#define G_TLS_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_TLS_BACKEND, GTlsBackend)) +#define G_IS_TLS_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_TLS_BACKEND)) +#define G_TLS_BACKEND_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_TLS_BACKEND, GTlsBackendInterface)) + +typedef struct _GTlsBackend GTlsBackend; +typedef struct _GTlsBackendInterface GTlsBackendInterface; + +/** + * GTlsBackendInterface: + * @g_iface: The parent interface. + * @supports_tls: returns whether the backend supports TLS. + * @supports_dtls: returns whether the backend supports DTLS + * @get_default_database: returns a default #GTlsDatabase instance. + * @get_certificate_type: returns the #GTlsCertificate implementation type + * @get_client_connection_type: returns the #GTlsClientConnection implementation type + * @get_server_connection_type: returns the #GTlsServerConnection implementation type + * @get_file_database_type: returns the #GTlsFileDatabase implementation type. + * @get_dtls_client_connection_type: returns the #GDtlsClientConnection implementation type + * @get_dtls_server_connection_type: returns the #GDtlsServerConnection implementation type + * + * Provides an interface for describing TLS-related types. + * + * Since: 2.28 + */ +struct _GTlsBackendInterface +{ + GTypeInterface g_iface; + + /* methods */ + gboolean ( *supports_tls) (GTlsBackend *backend); + GType ( *get_certificate_type) (void); + GType ( *get_client_connection_type) (void); + GType ( *get_server_connection_type) (void); + GType ( *get_file_database_type) (void); + GTlsDatabase * ( *get_default_database) (GTlsBackend *backend); + gboolean ( *supports_dtls) (GTlsBackend *backend); + GType ( *get_dtls_client_connection_type) (void); + GType ( *get_dtls_server_connection_type) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_tls_backend_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GTlsBackend * g_tls_backend_get_default (void); + +GLIB_AVAILABLE_IN_ALL +GTlsDatabase * g_tls_backend_get_default_database (GTlsBackend *backend); + +GLIB_AVAILABLE_IN_ALL +gboolean g_tls_backend_supports_tls (GTlsBackend *backend); +GLIB_AVAILABLE_IN_2_48 +gboolean g_tls_backend_supports_dtls (GTlsBackend *backend); + +GLIB_AVAILABLE_IN_ALL +GType g_tls_backend_get_certificate_type (GTlsBackend *backend); +GLIB_AVAILABLE_IN_ALL +GType g_tls_backend_get_client_connection_type (GTlsBackend *backend); +GLIB_AVAILABLE_IN_ALL +GType g_tls_backend_get_server_connection_type (GTlsBackend *backend); +GLIB_AVAILABLE_IN_ALL +GType g_tls_backend_get_file_database_type (GTlsBackend *backend); + +GLIB_AVAILABLE_IN_2_48 +GType g_tls_backend_get_dtls_client_connection_type (GTlsBackend *backend); +GLIB_AVAILABLE_IN_2_48 +GType g_tls_backend_get_dtls_server_connection_type (GTlsBackend *backend); + +G_END_DECLS + +#endif /* __G_TLS_BACKEND_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlscertificate.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlscertificate.h new file mode 100755 index 00000000..a064543c --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlscertificate.h @@ -0,0 +1,92 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_TLS_CERTIFICATE_H__ +#define __G_TLS_CERTIFICATE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_TLS_CERTIFICATE (g_tls_certificate_get_type ()) +#define G_TLS_CERTIFICATE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TLS_CERTIFICATE, GTlsCertificate)) +#define G_TLS_CERTIFICATE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_TLS_CERTIFICATE, GTlsCertificateClass)) +#define G_IS_TLS_CERTIFICATE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TLS_CERTIFICATE)) +#define G_IS_TLS_CERTIFICATE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_TLS_CERTIFICATE)) +#define G_TLS_CERTIFICATE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), G_TYPE_TLS_CERTIFICATE, GTlsCertificateClass)) + +typedef struct _GTlsCertificateClass GTlsCertificateClass; +typedef struct _GTlsCertificatePrivate GTlsCertificatePrivate; + +struct _GTlsCertificate { + GObject parent_instance; + + GTlsCertificatePrivate *priv; +}; + +struct _GTlsCertificateClass +{ + GObjectClass parent_class; + + GTlsCertificateFlags (* verify) (GTlsCertificate *cert, + GSocketConnectable *identity, + GTlsCertificate *trusted_ca); + + /*< private >*/ + /* Padding for future expansion */ + gpointer padding[8]; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_tls_certificate_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GTlsCertificate *g_tls_certificate_new_from_pem (const gchar *data, + gssize length, + GError **error); + +GLIB_AVAILABLE_IN_ALL +GTlsCertificate *g_tls_certificate_new_from_file (const gchar *file, + GError **error); +GLIB_AVAILABLE_IN_ALL +GTlsCertificate *g_tls_certificate_new_from_files (const gchar *cert_file, + const gchar *key_file, + GError **error); +GLIB_AVAILABLE_IN_ALL +GList *g_tls_certificate_list_new_from_file (const gchar *file, + GError **error); + +GLIB_AVAILABLE_IN_ALL +GTlsCertificate *g_tls_certificate_get_issuer (GTlsCertificate *cert); + +GLIB_AVAILABLE_IN_ALL +GTlsCertificateFlags g_tls_certificate_verify (GTlsCertificate *cert, + GSocketConnectable *identity, + GTlsCertificate *trusted_ca); + +GLIB_AVAILABLE_IN_2_34 +gboolean g_tls_certificate_is_same (GTlsCertificate *cert_one, + GTlsCertificate *cert_two); + +G_END_DECLS + +#endif /* __G_TLS_CERTIFICATE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsclientconnection.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsclientconnection.h new file mode 100755 index 00000000..29dbafcf --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsclientconnection.h @@ -0,0 +1,86 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_TLS_CLIENT_CONNECTION_H__ +#define __G_TLS_CLIENT_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gtlsconnection.h> + +G_BEGIN_DECLS + +#define G_TYPE_TLS_CLIENT_CONNECTION (g_tls_client_connection_get_type ()) +#define G_TLS_CLIENT_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TLS_CLIENT_CONNECTION, GTlsClientConnection)) +#define G_IS_TLS_CLIENT_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TLS_CLIENT_CONNECTION)) +#define G_TLS_CLIENT_CONNECTION_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_TLS_CLIENT_CONNECTION, GTlsClientConnectionInterface)) + +typedef struct _GTlsClientConnectionInterface GTlsClientConnectionInterface; + +/** + * GTlsClientConnectionInterface: + * @g_iface: The parent interface. + * @copy_session_state: Copies session state from one #GTlsClientConnection to another. + * + * vtable for a #GTlsClientConnection implementation. + * + * Since: 2.26 + */ +struct _GTlsClientConnectionInterface +{ + GTypeInterface g_iface; + + void ( *copy_session_state ) (GTlsClientConnection *conn, + GTlsClientConnection *source); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_tls_client_connection_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GIOStream * g_tls_client_connection_new (GIOStream *base_io_stream, + GSocketConnectable *server_identity, + GError **error); + +GLIB_AVAILABLE_IN_ALL +GTlsCertificateFlags g_tls_client_connection_get_validation_flags (GTlsClientConnection *conn); +GLIB_AVAILABLE_IN_ALL +void g_tls_client_connection_set_validation_flags (GTlsClientConnection *conn, + GTlsCertificateFlags flags); +GLIB_AVAILABLE_IN_ALL +GSocketConnectable *g_tls_client_connection_get_server_identity (GTlsClientConnection *conn); +GLIB_AVAILABLE_IN_ALL +void g_tls_client_connection_set_server_identity (GTlsClientConnection *conn, + GSocketConnectable *identity); +GLIB_DEPRECATED_IN_2_56 +gboolean g_tls_client_connection_get_use_ssl3 (GTlsClientConnection *conn); +GLIB_DEPRECATED_IN_2_56 +void g_tls_client_connection_set_use_ssl3 (GTlsClientConnection *conn, + gboolean use_ssl3); +GLIB_AVAILABLE_IN_ALL +GList * g_tls_client_connection_get_accepted_cas (GTlsClientConnection *conn); + +GLIB_AVAILABLE_IN_2_46 +void g_tls_client_connection_copy_session_state (GTlsClientConnection *conn, + GTlsClientConnection *source); + +G_END_DECLS + +#endif /* __G_TLS_CLIENT_CONNECTION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsconnection.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsconnection.h new file mode 100755 index 00000000..9c038e29 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsconnection.h @@ -0,0 +1,154 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_TLS_CONNECTION_H__ +#define __G_TLS_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giostream.h> + +G_BEGIN_DECLS + +#define G_TYPE_TLS_CONNECTION (g_tls_connection_get_type ()) +#define G_TLS_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TLS_CONNECTION, GTlsConnection)) +#define G_TLS_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_TLS_CONNECTION, GTlsConnectionClass)) +#define G_IS_TLS_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TLS_CONNECTION)) +#define G_IS_TLS_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_TLS_CONNECTION)) +#define G_TLS_CONNECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), G_TYPE_TLS_CONNECTION, GTlsConnectionClass)) + +typedef struct _GTlsConnectionClass GTlsConnectionClass; +typedef struct _GTlsConnectionPrivate GTlsConnectionPrivate; + +struct _GTlsConnection { + GIOStream parent_instance; + + GTlsConnectionPrivate *priv; +}; + +struct _GTlsConnectionClass +{ + GIOStreamClass parent_class; + + /* signals */ + gboolean ( *accept_certificate) (GTlsConnection *connection, + GTlsCertificate *peer_cert, + GTlsCertificateFlags errors); + + /* methods */ + gboolean ( *handshake ) (GTlsConnection *conn, + GCancellable *cancellable, + GError **error); + + void ( *handshake_async ) (GTlsConnection *conn, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean ( *handshake_finish ) (GTlsConnection *conn, + GAsyncResult *result, + GError **error); + + /*< private >*/ + /* Padding for future expansion */ + gpointer padding[8]; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_tls_connection_get_type (void) G_GNUC_CONST; + +GLIB_DEPRECATED +void g_tls_connection_set_use_system_certdb (GTlsConnection *conn, + gboolean use_system_certdb); +GLIB_DEPRECATED +gboolean g_tls_connection_get_use_system_certdb (GTlsConnection *conn); + +GLIB_AVAILABLE_IN_ALL +void g_tls_connection_set_database (GTlsConnection *conn, + GTlsDatabase *database); +GLIB_AVAILABLE_IN_ALL +GTlsDatabase * g_tls_connection_get_database (GTlsConnection *conn); + +GLIB_AVAILABLE_IN_ALL +void g_tls_connection_set_certificate (GTlsConnection *conn, + GTlsCertificate *certificate); +GLIB_AVAILABLE_IN_ALL +GTlsCertificate *g_tls_connection_get_certificate (GTlsConnection *conn); + +GLIB_AVAILABLE_IN_ALL +void g_tls_connection_set_interaction (GTlsConnection *conn, + GTlsInteraction *interaction); +GLIB_AVAILABLE_IN_ALL +GTlsInteraction * g_tls_connection_get_interaction (GTlsConnection *conn); + +GLIB_AVAILABLE_IN_ALL +GTlsCertificate *g_tls_connection_get_peer_certificate (GTlsConnection *conn); +GLIB_AVAILABLE_IN_ALL +GTlsCertificateFlags g_tls_connection_get_peer_certificate_errors (GTlsConnection *conn); + +GLIB_AVAILABLE_IN_ALL +void g_tls_connection_set_require_close_notify (GTlsConnection *conn, + gboolean require_close_notify); +GLIB_AVAILABLE_IN_ALL +gboolean g_tls_connection_get_require_close_notify (GTlsConnection *conn); + +GLIB_AVAILABLE_IN_ALL +void g_tls_connection_set_rehandshake_mode (GTlsConnection *conn, + GTlsRehandshakeMode mode); +GLIB_AVAILABLE_IN_ALL +GTlsRehandshakeMode g_tls_connection_get_rehandshake_mode (GTlsConnection *conn); + +GLIB_AVAILABLE_IN_ALL +gboolean g_tls_connection_handshake (GTlsConnection *conn, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_tls_connection_handshake_async (GTlsConnection *conn, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_tls_connection_handshake_finish (GTlsConnection *conn, + GAsyncResult *result, + GError **error); + +/** + * G_TLS_ERROR: + * + * Error domain for TLS. Errors in this domain will be from the + * #GTlsError enumeration. See #GError for more information on error + * domains. + */ +#define G_TLS_ERROR (g_tls_error_quark ()) +GLIB_AVAILABLE_IN_ALL +GQuark g_tls_error_quark (void); + + +/*< protected >*/ +GLIB_AVAILABLE_IN_ALL +gboolean g_tls_connection_emit_accept_certificate (GTlsConnection *conn, + GTlsCertificate *peer_cert, + GTlsCertificateFlags errors); + +G_END_DECLS + +#endif /* __G_TLS_CONNECTION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsdatabase.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsdatabase.h new file mode 100755 index 00000000..5dafd7bc --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsdatabase.h @@ -0,0 +1,247 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Collabora, Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Stef Walter <stefw@collabora.co.uk> + */ + +#ifndef __G_TLS_DATABASE_H__ +#define __G_TLS_DATABASE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER "1.3.6.1.5.5.7.3.1" +#define G_TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT "1.3.6.1.5.5.7.3.2" + +#define G_TYPE_TLS_DATABASE (g_tls_database_get_type ()) +#define G_TLS_DATABASE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TLS_DATABASE, GTlsDatabase)) +#define G_TLS_DATABASE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_TLS_DATABASE, GTlsDatabaseClass)) +#define G_IS_TLS_DATABASE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TLS_DATABASE)) +#define G_IS_TLS_DATABASE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_TLS_DATABASE)) +#define G_TLS_DATABASE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), G_TYPE_TLS_DATABASE, GTlsDatabaseClass)) + +typedef struct _GTlsDatabaseClass GTlsDatabaseClass; +typedef struct _GTlsDatabasePrivate GTlsDatabasePrivate; + +struct _GTlsDatabase +{ + GObject parent_instance; + + GTlsDatabasePrivate *priv; +}; + +struct _GTlsDatabaseClass +{ + GObjectClass parent_class; + + /* virtual methods */ + + GTlsCertificateFlags (*verify_chain) (GTlsDatabase *self, + GTlsCertificate *chain, + const gchar *purpose, + GSocketConnectable *identity, + GTlsInteraction *interaction, + GTlsDatabaseVerifyFlags flags, + GCancellable *cancellable, + GError **error); + + void (*verify_chain_async) (GTlsDatabase *self, + GTlsCertificate *chain, + const gchar *purpose, + GSocketConnectable *identity, + GTlsInteraction *interaction, + GTlsDatabaseVerifyFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + GTlsCertificateFlags (*verify_chain_finish) (GTlsDatabase *self, + GAsyncResult *result, + GError **error); + + gchar* (*create_certificate_handle) (GTlsDatabase *self, + GTlsCertificate *certificate); + + GTlsCertificate* (*lookup_certificate_for_handle) (GTlsDatabase *self, + const gchar *handle, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GError **error); + + void (*lookup_certificate_for_handle_async) (GTlsDatabase *self, + const gchar *handle, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + GTlsCertificate* (*lookup_certificate_for_handle_finish) (GTlsDatabase *self, + GAsyncResult *result, + GError **error); + + GTlsCertificate* (*lookup_certificate_issuer) (GTlsDatabase *self, + GTlsCertificate *certificate, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GError **error); + + void (*lookup_certificate_issuer_async) (GTlsDatabase *self, + GTlsCertificate *certificate, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + GTlsCertificate* (*lookup_certificate_issuer_finish) (GTlsDatabase *self, + GAsyncResult *result, + GError **error); + + GList* (*lookup_certificates_issued_by) (GTlsDatabase *self, + GByteArray *issuer_raw_dn, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GError **error); + + void (*lookup_certificates_issued_by_async) (GTlsDatabase *self, + GByteArray *issuer_raw_dn, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + GList* (*lookup_certificates_issued_by_finish) (GTlsDatabase *self, + GAsyncResult *result, + GError **error); + + /*< private >*/ + /* Padding for future expansion */ + gpointer padding[16]; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_tls_database_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GTlsCertificateFlags g_tls_database_verify_chain (GTlsDatabase *self, + GTlsCertificate *chain, + const gchar *purpose, + GSocketConnectable *identity, + GTlsInteraction *interaction, + GTlsDatabaseVerifyFlags flags, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_tls_database_verify_chain_async (GTlsDatabase *self, + GTlsCertificate *chain, + const gchar *purpose, + GSocketConnectable *identity, + GTlsInteraction *interaction, + GTlsDatabaseVerifyFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +GTlsCertificateFlags g_tls_database_verify_chain_finish (GTlsDatabase *self, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gchar* g_tls_database_create_certificate_handle (GTlsDatabase *self, + GTlsCertificate *certificate); + +GLIB_AVAILABLE_IN_ALL +GTlsCertificate* g_tls_database_lookup_certificate_for_handle (GTlsDatabase *self, + const gchar *handle, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_tls_database_lookup_certificate_for_handle_async (GTlsDatabase *self, + const gchar *handle, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +GTlsCertificate* g_tls_database_lookup_certificate_for_handle_finish (GTlsDatabase *self, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +GTlsCertificate* g_tls_database_lookup_certificate_issuer (GTlsDatabase *self, + GTlsCertificate *certificate, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_tls_database_lookup_certificate_issuer_async (GTlsDatabase *self, + GTlsCertificate *certificate, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +GTlsCertificate* g_tls_database_lookup_certificate_issuer_finish (GTlsDatabase *self, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_ALL +GList* g_tls_database_lookup_certificates_issued_by (GTlsDatabase *self, + GByteArray *issuer_raw_dn, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_tls_database_lookup_certificates_issued_by_async (GTlsDatabase *self, + GByteArray *issuer_raw_dn, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +GList* g_tls_database_lookup_certificates_issued_by_finish (GTlsDatabase *self, + GAsyncResult *result, + GError **error); + +G_END_DECLS + +#endif /* __G_TLS_DATABASE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsfiledatabase.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsfiledatabase.h new file mode 100755 index 00000000..1ee4631b --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsfiledatabase.h @@ -0,0 +1,58 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2010 Collabora, Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * See the included COPYING file for more information. + * + * Author: Stef Walter <stefw@collabora.co.uk> + */ + +#ifndef __G_TLS_FILE_DATABASE_H__ +#define __G_TLS_FILE_DATABASE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_TLS_FILE_DATABASE (g_tls_file_database_get_type ()) +#define G_TLS_FILE_DATABASE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TLS_FILE_DATABASE, GTlsFileDatabase)) +#define G_IS_TLS_FILE_DATABASE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TLS_FILE_DATABASE)) +#define G_TLS_FILE_DATABASE_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_TLS_FILE_DATABASE, GTlsFileDatabaseInterface)) + +typedef struct _GTlsFileDatabaseInterface GTlsFileDatabaseInterface; + +/** + * GTlsFileDatabaseInterface: + * @g_iface: The parent interface. + * + * Provides an interface for #GTlsFileDatabase implementations. + * + */ +struct _GTlsFileDatabaseInterface +{ + GTypeInterface g_iface; + + /*< private >*/ + /* Padding for future expansion */ + gpointer padding[8]; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_tls_file_database_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GTlsDatabase* g_tls_file_database_new (const gchar *anchors, + GError **error); + +G_END_DECLS + +#endif /* __G_TLS_FILE_DATABASE_H___ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsinteraction.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsinteraction.h new file mode 100755 index 00000000..03552fb1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsinteraction.h @@ -0,0 +1,148 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2011 Collabora, Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Stef Walter <stefw@collabora.co.uk> + */ + +#ifndef __G_TLS_INTERACTION_H__ +#define __G_TLS_INTERACTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_TLS_INTERACTION (g_tls_interaction_get_type ()) +#define G_TLS_INTERACTION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_TLS_INTERACTION, GTlsInteraction)) +#define G_TLS_INTERACTION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_TLS_INTERACTION, GTlsInteractionClass)) +#define G_IS_TLS_INTERACTION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_TLS_INTERACTION)) +#define G_IS_TLS_INTERACTION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_TLS_INTERACTION)) +#define G_TLS_INTERACTION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_TLS_INTERACTION, GTlsInteractionClass)) + +typedef struct _GTlsInteractionClass GTlsInteractionClass; +typedef struct _GTlsInteractionPrivate GTlsInteractionPrivate; + +struct _GTlsInteraction +{ + /*< private >*/ + GObject parent_instance; + GTlsInteractionPrivate *priv; +}; + +struct _GTlsInteractionClass +{ + /*< private >*/ + GObjectClass parent_class; + + /*< public >*/ + GTlsInteractionResult (* ask_password) (GTlsInteraction *interaction, + GTlsPassword *password, + GCancellable *cancellable, + GError **error); + + void (* ask_password_async) (GTlsInteraction *interaction, + GTlsPassword *password, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + GTlsInteractionResult (* ask_password_finish) (GTlsInteraction *interaction, + GAsyncResult *result, + GError **error); + + GTlsInteractionResult (* request_certificate) (GTlsInteraction *interaction, + GTlsConnection *connection, + GTlsCertificateRequestFlags flags, + GCancellable *cancellable, + GError **error); + + void (* request_certificate_async) (GTlsInteraction *interaction, + GTlsConnection *connection, + GTlsCertificateRequestFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + GTlsInteractionResult (* request_certificate_finish) (GTlsInteraction *interaction, + GAsyncResult *result, + GError **error); + + /*< private >*/ + /* Padding for future expansion */ + gpointer padding[21]; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_tls_interaction_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GTlsInteractionResult g_tls_interaction_invoke_ask_password (GTlsInteraction *interaction, + GTlsPassword *password, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +GTlsInteractionResult g_tls_interaction_ask_password (GTlsInteraction *interaction, + GTlsPassword *password, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_tls_interaction_ask_password_async (GTlsInteraction *interaction, + GTlsPassword *password, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +GTlsInteractionResult g_tls_interaction_ask_password_finish (GTlsInteraction *interaction, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_2_40 +GTlsInteractionResult g_tls_interaction_invoke_request_certificate (GTlsInteraction *interaction, + GTlsConnection *connection, + GTlsCertificateRequestFlags flags, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_2_40 +GTlsInteractionResult g_tls_interaction_request_certificate (GTlsInteraction *interaction, + GTlsConnection *connection, + GTlsCertificateRequestFlags flags, + GCancellable *cancellable, + GError **error); + +GLIB_AVAILABLE_IN_2_40 +void g_tls_interaction_request_certificate_async (GTlsInteraction *interaction, + GTlsConnection *connection, + GTlsCertificateRequestFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_40 +GTlsInteractionResult g_tls_interaction_request_certificate_finish (GTlsInteraction *interaction, + GAsyncResult *result, + GError **error); + +G_END_DECLS + +#endif /* __G_TLS_INTERACTION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlspassword.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlspassword.h new file mode 100755 index 00000000..befe706a --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlspassword.h @@ -0,0 +1,119 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2011 Collabora, Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Stef Walter <stefw@collabora.co.uk> + */ + +#ifndef __G_TLS_PASSWORD_H__ +#define __G_TLS_PASSWORD_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_TLS_PASSWORD (g_tls_password_get_type ()) +#define G_TLS_PASSWORD(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_TLS_PASSWORD, GTlsPassword)) +#define G_TLS_PASSWORD_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_TLS_PASSWORD, GTlsPasswordClass)) +#define G_IS_TLS_PASSWORD(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_TLS_PASSWORD)) +#define G_IS_TLS_PASSWORD_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_TLS_PASSWORD)) +#define G_TLS_PASSWORD_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_TLS_PASSWORD, GTlsPasswordClass)) + +typedef struct _GTlsPasswordClass GTlsPasswordClass; +typedef struct _GTlsPasswordPrivate GTlsPasswordPrivate; + +struct _GTlsPassword +{ + GObject parent_instance; + + GTlsPasswordPrivate *priv; +}; + +/** + * GTlsPasswordClass: + * @get_value: virtual method for g_tls_password_get_value() + * @set_value: virtual method for g_tls_password_set_value() + * @get_default_warning: virtual method for g_tls_password_get_warning() if no + * value has been set using g_tls_password_set_warning() + * + * Class structure for #GTlsPassword. + */ +struct _GTlsPasswordClass +{ + GObjectClass parent_class; + + /* methods */ + + const guchar * ( *get_value) (GTlsPassword *password, + gsize *length); + + void ( *set_value) (GTlsPassword *password, + guchar *value, + gssize length, + GDestroyNotify destroy); + + const gchar* ( *get_default_warning) (GTlsPassword *password); + + /*< private >*/ + /* Padding for future expansion */ + gpointer padding[4]; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_tls_password_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GTlsPassword * g_tls_password_new (GTlsPasswordFlags flags, + const gchar *description); + +GLIB_AVAILABLE_IN_ALL +const guchar * g_tls_password_get_value (GTlsPassword *password, + gsize *length); +GLIB_AVAILABLE_IN_ALL +void g_tls_password_set_value (GTlsPassword *password, + const guchar *value, + gssize length); +GLIB_AVAILABLE_IN_ALL +void g_tls_password_set_value_full (GTlsPassword *password, + guchar *value, + gssize length, + GDestroyNotify destroy); + +GLIB_AVAILABLE_IN_ALL +GTlsPasswordFlags g_tls_password_get_flags (GTlsPassword *password); +GLIB_AVAILABLE_IN_ALL +void g_tls_password_set_flags (GTlsPassword *password, + GTlsPasswordFlags flags); + +GLIB_AVAILABLE_IN_ALL +const gchar* g_tls_password_get_description (GTlsPassword *password); +GLIB_AVAILABLE_IN_ALL +void g_tls_password_set_description (GTlsPassword *password, + const gchar *description); + +GLIB_AVAILABLE_IN_ALL +const gchar * g_tls_password_get_warning (GTlsPassword *password); +GLIB_AVAILABLE_IN_ALL +void g_tls_password_set_warning (GTlsPassword *password, + const gchar *warning); + +G_END_DECLS + +#endif /* __G_TLS_PASSWORD_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsserverconnection.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsserverconnection.h new file mode 100755 index 00000000..6926e7d1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gtlsserverconnection.h @@ -0,0 +1,69 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_TLS_SERVER_CONNECTION_H__ +#define __G_TLS_SERVER_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gtlsconnection.h> + +G_BEGIN_DECLS + +#define G_TYPE_TLS_SERVER_CONNECTION (g_tls_server_connection_get_type ()) +#define G_TLS_SERVER_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TLS_SERVER_CONNECTION, GTlsServerConnection)) +#define G_IS_TLS_SERVER_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TLS_SERVER_CONNECTION)) +#define G_TLS_SERVER_CONNECTION_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_TLS_SERVER_CONNECTION, GTlsServerConnectionInterface)) + +/** + * GTlsServerConnection: + * + * TLS server-side connection. This is the server-side implementation + * of a #GTlsConnection. + * + * Since: 2.28 + */ +typedef struct _GTlsServerConnectionInterface GTlsServerConnectionInterface; + +/** + * GTlsServerConnectionInterface: + * @g_iface: The parent interface. + * + * vtable for a #GTlsServerConnection implementation. + * + * Since: 2.26 + */ +struct _GTlsServerConnectionInterface +{ + GTypeInterface g_iface; + +}; + +GLIB_AVAILABLE_IN_ALL +GType g_tls_server_connection_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GIOStream * g_tls_server_connection_new (GIOStream *base_io_stream, + GTlsCertificate *certificate, + GError **error); + +G_END_DECLS + +#endif /* __G_TLS_SERVER_CONNECTION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gvfs.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gvfs.h new file mode 100755 index 00000000..46ad792c --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gvfs.h @@ -0,0 +1,168 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_VFS_H__ +#define __G_VFS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_VFS (g_vfs_get_type ()) +#define G_VFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_VFS, GVfs)) +#define G_VFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_VFS, GVfsClass)) +#define G_VFS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_VFS, GVfsClass)) +#define G_IS_VFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_VFS)) +#define G_IS_VFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_VFS)) + +/** + * GVfsFileLookupFunc: + * @vfs: a #GVfs + * @identifier: the identifier to lookup a #GFile for. This can either + * be an URI or a parse name as returned by g_file_get_parse_name() + * @user_data: user data passed to the function + * + * This function type is used by g_vfs_register_uri_scheme() to make it + * possible for a client to associate an URI scheme to a different #GFile + * implementation. + * + * The client should return a reference to the new file that has been + * created for @uri, or %NULL to continue with the default implementation. + * + * Returns: (transfer full): a #GFile for @identifier. + * + * Since: 2.50 + */ +typedef GFile * (* GVfsFileLookupFunc) (GVfs *vfs, + const char *identifier, + gpointer user_data); + +/** + * G_VFS_EXTENSION_POINT_NAME: + * + * Extension point for #GVfs functionality. + * See [Extending GIO][extending-gio]. + */ +#define G_VFS_EXTENSION_POINT_NAME "gio-vfs" + +/** + * GVfs: + * + * Virtual File System object. + **/ +typedef struct _GVfsClass GVfsClass; + +struct _GVfs +{ + GObject parent_instance; +}; + +struct _GVfsClass +{ + GObjectClass parent_class; + + /* Virtual Table */ + + gboolean (* is_active) (GVfs *vfs); + GFile * (* get_file_for_path) (GVfs *vfs, + const char *path); + GFile * (* get_file_for_uri) (GVfs *vfs, + const char *uri); + const gchar * const * (* get_supported_uri_schemes) (GVfs *vfs); + GFile * (* parse_name) (GVfs *vfs, + const char *parse_name); + + /*< private >*/ + void (* local_file_add_info) (GVfs *vfs, + const char *filename, + guint64 device, + GFileAttributeMatcher *attribute_matcher, + GFileInfo *info, + GCancellable *cancellable, + gpointer *extra_data, + GDestroyNotify *free_extra_data); + void (* add_writable_namespaces) (GVfs *vfs, + GFileAttributeInfoList *list); + gboolean (* local_file_set_attributes) (GVfs *vfs, + const char *filename, + GFileInfo *info, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); + void (* local_file_removed) (GVfs *vfs, + const char *filename); + void (* local_file_moved) (GVfs *vfs, + const char *source, + const char *dest); + GIcon * (* deserialize_icon) (GVfs *vfs, + GVariant *value); + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_vfs_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +gboolean g_vfs_is_active (GVfs *vfs); +GLIB_AVAILABLE_IN_ALL +GFile * g_vfs_get_file_for_path (GVfs *vfs, + const char *path); +GLIB_AVAILABLE_IN_ALL +GFile * g_vfs_get_file_for_uri (GVfs *vfs, + const char *uri); +GLIB_AVAILABLE_IN_ALL +const gchar* const * g_vfs_get_supported_uri_schemes (GVfs *vfs); + +GLIB_AVAILABLE_IN_ALL +GFile * g_vfs_parse_name (GVfs *vfs, + const char *parse_name); + +GLIB_AVAILABLE_IN_ALL +GVfs * g_vfs_get_default (void); +GLIB_AVAILABLE_IN_ALL +GVfs * g_vfs_get_local (void); + +GLIB_AVAILABLE_IN_2_50 +gboolean g_vfs_register_uri_scheme (GVfs *vfs, + const char *scheme, + GVfsFileLookupFunc uri_func, + gpointer uri_data, + GDestroyNotify uri_destroy, + GVfsFileLookupFunc parse_name_func, + gpointer parse_name_data, + GDestroyNotify parse_name_destroy); +GLIB_AVAILABLE_IN_2_50 +gboolean g_vfs_unregister_uri_scheme (GVfs *vfs, + const char *scheme); + + +G_END_DECLS + +#endif /* __G_VFS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gvolume.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gvolume.h new file mode 100755 index 00000000..c4a506e8 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gvolume.h @@ -0,0 +1,251 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + * David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_VOLUME_H__ +#define __G_VOLUME_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +/** + * G_VOLUME_IDENTIFIER_KIND_HAL_UDI: + * + * The string used to obtain a Hal UDI with g_volume_get_identifier(). + */ +#define G_VOLUME_IDENTIFIER_KIND_HAL_UDI "hal-udi" + +/** + * G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE: + * + * The string used to obtain a Unix device path with g_volume_get_identifier(). + */ +#define G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE "unix-device" + +/** + * G_VOLUME_IDENTIFIER_KIND_LABEL: + * + * The string used to obtain a filesystem label with g_volume_get_identifier(). + */ +#define G_VOLUME_IDENTIFIER_KIND_LABEL "label" + +/** + * G_VOLUME_IDENTIFIER_KIND_UUID: + * + * The string used to obtain a UUID with g_volume_get_identifier(). + */ +#define G_VOLUME_IDENTIFIER_KIND_UUID "uuid" + +/** + * G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT: + * + * The string used to obtain a NFS mount with g_volume_get_identifier(). + */ +#define G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT "nfs-mount" + +/** + * G_VOLUME_IDENTIFIER_KIND_CLASS: + * + * The string used to obtain the volume class with g_volume_get_identifier(). + * + * Known volume classes include `device` and `network`. Other classes may + * be added in the future. + * + * This is intended to be used by applications to classify #GVolume + * instances into different sections - for example a file manager or + * file chooser can use this information to show `network` volumes under + * a "Network" heading and `device` volumes under a "Devices" heading. + */ +#define G_VOLUME_IDENTIFIER_KIND_CLASS "class" + + +#define G_TYPE_VOLUME (g_volume_get_type ()) +#define G_VOLUME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_VOLUME, GVolume)) +#define G_IS_VOLUME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_VOLUME)) +#define G_VOLUME_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_VOLUME, GVolumeIface)) + +/** + * GVolumeIface: + * @g_iface: The parent interface. + * @changed: Changed signal that is emitted when the volume's state has changed. + * @removed: The removed signal that is emitted when the #GVolume have been removed. If the recipient is holding references to the object they should release them so the object can be finalized. + * @get_name: Gets a string containing the name of the #GVolume. + * @get_icon: Gets a #GIcon for the #GVolume. + * @get_uuid: Gets the UUID for the #GVolume. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns %NULL if there is no UUID available. + * @get_drive: Gets a #GDrive the volume is located on. Returns %NULL if the #GVolume is not associated with a #GDrive. + * @get_mount: Gets a #GMount representing the mounted volume. Returns %NULL if the #GVolume is not mounted. + * @can_mount: Returns %TRUE if the #GVolume can be mounted. + * @can_eject: Checks if a #GVolume can be ejected. + * @mount_fn: Mounts a given #GVolume. + * #GVolume implementations must emit the #GMountOperation::aborted + * signal before completing a mount operation that is aborted while + * awaiting input from the user through a #GMountOperation instance. + * @mount_finish: Finishes a mount operation. + * @eject: Ejects a given #GVolume. + * @eject_finish: Finishes an eject operation. + * @get_identifier: Returns the [identifier][volume-identifier] of the given kind, or %NULL if + * the #GVolume doesn't have one. + * @enumerate_identifiers: Returns an array strings listing the kinds + * of [identifiers][volume-identifier] which the #GVolume has. + * @should_automount: Returns %TRUE if the #GVolume should be automatically mounted. + * @get_activation_root: Returns the activation root for the #GVolume if it is known in advance or %NULL if + * it is not known. + * @eject_with_operation: Starts ejecting a #GVolume using a #GMountOperation. Since 2.22. + * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22. + * @get_sort_key: Gets a key used for sorting #GVolume instance or %NULL if no such key exists. Since 2.32. + * @get_symbolic_icon: Gets a symbolic #GIcon for the #GVolume. Since 2.34. + * + * Interface for implementing operations for mountable volumes. + **/ +typedef struct _GVolumeIface GVolumeIface; + +struct _GVolumeIface +{ + GTypeInterface g_iface; + + /* signals */ + + void (* changed) (GVolume *volume); + void (* removed) (GVolume *volume); + + /* Virtual Table */ + + char * (* get_name) (GVolume *volume); + GIcon * (* get_icon) (GVolume *volume); + char * (* get_uuid) (GVolume *volume); + GDrive * (* get_drive) (GVolume *volume); + GMount * (* get_mount) (GVolume *volume); + gboolean (* can_mount) (GVolume *volume); + gboolean (* can_eject) (GVolume *volume); + void (* mount_fn) (GVolume *volume, + GMountMountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* mount_finish) (GVolume *volume, + GAsyncResult *result, + GError **error); + void (* eject) (GVolume *volume, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* eject_finish) (GVolume *volume, + GAsyncResult *result, + GError **error); + + char * (* get_identifier) (GVolume *volume, + const char *kind); + char ** (* enumerate_identifiers) (GVolume *volume); + + gboolean (* should_automount) (GVolume *volume); + + GFile * (* get_activation_root) (GVolume *volume); + + void (* eject_with_operation) (GVolume *volume, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* eject_with_operation_finish) (GVolume *volume, + GAsyncResult *result, + GError **error); + + const gchar * (* get_sort_key) (GVolume *volume); + GIcon * (* get_symbolic_icon) (GVolume *volume); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_volume_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +char * g_volume_get_name (GVolume *volume); +GLIB_AVAILABLE_IN_ALL +GIcon * g_volume_get_icon (GVolume *volume); +GLIB_AVAILABLE_IN_ALL +GIcon * g_volume_get_symbolic_icon (GVolume *volume); +GLIB_AVAILABLE_IN_ALL +char * g_volume_get_uuid (GVolume *volume); +GLIB_AVAILABLE_IN_ALL +GDrive * g_volume_get_drive (GVolume *volume); +GLIB_AVAILABLE_IN_ALL +GMount * g_volume_get_mount (GVolume *volume); +GLIB_AVAILABLE_IN_ALL +gboolean g_volume_can_mount (GVolume *volume); +GLIB_AVAILABLE_IN_ALL +gboolean g_volume_can_eject (GVolume *volume); +GLIB_AVAILABLE_IN_ALL +gboolean g_volume_should_automount (GVolume *volume); +GLIB_AVAILABLE_IN_ALL +void g_volume_mount (GVolume *volume, + GMountMountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_volume_mount_finish (GVolume *volume, + GAsyncResult *result, + GError **error); +GLIB_DEPRECATED_FOR(g_volume_eject_with_operation) +void g_volume_eject (GVolume *volume, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GLIB_DEPRECATED_FOR(g_volume_eject_with_operation_finish) +gboolean g_volume_eject_finish (GVolume *volume, + GAsyncResult *result, + GError **error); +GLIB_AVAILABLE_IN_ALL +char * g_volume_get_identifier (GVolume *volume, + const char *kind); +GLIB_AVAILABLE_IN_ALL +char ** g_volume_enumerate_identifiers (GVolume *volume); + +GLIB_AVAILABLE_IN_ALL +GFile * g_volume_get_activation_root (GVolume *volume); + +GLIB_AVAILABLE_IN_ALL +void g_volume_eject_with_operation (GVolume *volume, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_volume_eject_with_operation_finish (GVolume *volume, + GAsyncResult *result, + GError **error); + +GLIB_AVAILABLE_IN_2_32 +const gchar *g_volume_get_sort_key (GVolume *volume); + +G_END_DECLS + +#endif /* __G_VOLUME_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gvolumemonitor.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gvolumemonitor.h new file mode 100755 index 00000000..899942f6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gvolumemonitor.h @@ -0,0 +1,154 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ + +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + * David Zeuthen <davidz@redhat.com> + */ + +#ifndef __G_VOLUME_MONITOR_H__ +#define __G_VOLUME_MONITOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/giotypes.h> + +G_BEGIN_DECLS + +#define G_TYPE_VOLUME_MONITOR (g_volume_monitor_get_type ()) +#define G_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_VOLUME_MONITOR, GVolumeMonitor)) +#define G_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_VOLUME_MONITOR, GVolumeMonitorClass)) +#define G_VOLUME_MONITOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_VOLUME_MONITOR, GVolumeMonitorClass)) +#define G_IS_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_VOLUME_MONITOR)) +#define G_IS_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_VOLUME_MONITOR)) + +/** + * G_VOLUME_MONITOR_EXTENSION_POINT_NAME: + * + * Extension point for volume monitor functionality. + * See [Extending GIO][extending-gio]. + */ +#define G_VOLUME_MONITOR_EXTENSION_POINT_NAME "gio-volume-monitor" + +/** + * GVolumeMonitor: + * + * A Volume Monitor that watches for volume events. + **/ +typedef struct _GVolumeMonitorClass GVolumeMonitorClass; + +struct _GVolumeMonitor +{ + GObject parent_instance; + + /*< private >*/ + gpointer priv; +}; + +struct _GVolumeMonitorClass +{ + GObjectClass parent_class; + + /*< public >*/ + /* signals */ + void (* volume_added) (GVolumeMonitor *volume_monitor, + GVolume *volume); + void (* volume_removed) (GVolumeMonitor *volume_monitor, + GVolume *volume); + void (* volume_changed) (GVolumeMonitor *volume_monitor, + GVolume *volume); + + void (* mount_added) (GVolumeMonitor *volume_monitor, + GMount *mount); + void (* mount_removed) (GVolumeMonitor *volume_monitor, + GMount *mount); + void (* mount_pre_unmount) (GVolumeMonitor *volume_monitor, + GMount *mount); + void (* mount_changed) (GVolumeMonitor *volume_monitor, + GMount *mount); + + void (* drive_connected) (GVolumeMonitor *volume_monitor, + GDrive *drive); + void (* drive_disconnected) (GVolumeMonitor *volume_monitor, + GDrive *drive); + void (* drive_changed) (GVolumeMonitor *volume_monitor, + GDrive *drive); + + /* Vtable */ + + gboolean (* is_supported) (void); + + GList * (* get_connected_drives) (GVolumeMonitor *volume_monitor); + GList * (* get_volumes) (GVolumeMonitor *volume_monitor); + GList * (* get_mounts) (GVolumeMonitor *volume_monitor); + + GVolume * (* get_volume_for_uuid) (GVolumeMonitor *volume_monitor, + const char *uuid); + + GMount * (* get_mount_for_uuid) (GVolumeMonitor *volume_monitor, + const char *uuid); + + + /* These arguments are unfortunately backwards by mistake (bug #520169). Deprecated in 2.20. */ + GVolume * (* adopt_orphan_mount) (GMount *mount, + GVolumeMonitor *volume_monitor); + + /* signal added in 2.17 */ + void (* drive_eject_button) (GVolumeMonitor *volume_monitor, + GDrive *drive); + + /* signal added in 2.21 */ + void (* drive_stop_button) (GVolumeMonitor *volume_monitor, + GDrive *drive); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); +}; + +GLIB_AVAILABLE_IN_ALL +GType g_volume_monitor_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GVolumeMonitor *g_volume_monitor_get (void); +GLIB_AVAILABLE_IN_ALL +GList * g_volume_monitor_get_connected_drives (GVolumeMonitor *volume_monitor); +GLIB_AVAILABLE_IN_ALL +GList * g_volume_monitor_get_volumes (GVolumeMonitor *volume_monitor); +GLIB_AVAILABLE_IN_ALL +GList * g_volume_monitor_get_mounts (GVolumeMonitor *volume_monitor); +GLIB_AVAILABLE_IN_ALL +GVolume * g_volume_monitor_get_volume_for_uuid (GVolumeMonitor *volume_monitor, + const char *uuid); +GLIB_AVAILABLE_IN_ALL +GMount * g_volume_monitor_get_mount_for_uuid (GVolumeMonitor *volume_monitor, + const char *uuid); + +GLIB_DEPRECATED +GVolume * g_volume_monitor_adopt_orphan_mount (GMount *mount); + +G_END_DECLS + +#endif /* __G_VOLUME_MONITOR_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gzlibcompressor.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gzlibcompressor.h new file mode 100755 index 00000000..f89b30f2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gzlibcompressor.h @@ -0,0 +1,62 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2009 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_ZLIB_COMPRESSOR_H__ +#define __G_ZLIB_COMPRESSOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gconverter.h> +#include <gio/gfileinfo.h> + +G_BEGIN_DECLS + +#define G_TYPE_ZLIB_COMPRESSOR (g_zlib_compressor_get_type ()) +#define G_ZLIB_COMPRESSOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_ZLIB_COMPRESSOR, GZlibCompressor)) +#define G_ZLIB_COMPRESSOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_ZLIB_COMPRESSOR, GZlibCompressorClass)) +#define G_IS_ZLIB_COMPRESSOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_ZLIB_COMPRESSOR)) +#define G_IS_ZLIB_COMPRESSOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_ZLIB_COMPRESSOR)) +#define G_ZLIB_COMPRESSOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_ZLIB_COMPRESSOR, GZlibCompressorClass)) + +typedef struct _GZlibCompressorClass GZlibCompressorClass; + +struct _GZlibCompressorClass +{ + GObjectClass parent_class; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_zlib_compressor_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GZlibCompressor *g_zlib_compressor_new (GZlibCompressorFormat format, + int level); + +GLIB_AVAILABLE_IN_ALL +GFileInfo *g_zlib_compressor_get_file_info (GZlibCompressor *compressor); +GLIB_AVAILABLE_IN_ALL +void g_zlib_compressor_set_file_info (GZlibCompressor *compressor, + GFileInfo *file_info); + +G_END_DECLS + +#endif /* __G_ZLIB_COMPRESSOR_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gzlibdecompressor.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gzlibdecompressor.h new file mode 100755 index 00000000..373ac67d --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gio/gzlibdecompressor.h @@ -0,0 +1,58 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2009 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_ZLIB_DECOMPRESSOR_H__ +#define __G_ZLIB_DECOMPRESSOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only <gio/gio.h> can be included directly." +#endif + +#include <gio/gconverter.h> +#include <gio/gfileinfo.h> + +G_BEGIN_DECLS + +#define G_TYPE_ZLIB_DECOMPRESSOR (g_zlib_decompressor_get_type ()) +#define G_ZLIB_DECOMPRESSOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_ZLIB_DECOMPRESSOR, GZlibDecompressor)) +#define G_ZLIB_DECOMPRESSOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_ZLIB_DECOMPRESSOR, GZlibDecompressorClass)) +#define G_IS_ZLIB_DECOMPRESSOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_ZLIB_DECOMPRESSOR)) +#define G_IS_ZLIB_DECOMPRESSOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_ZLIB_DECOMPRESSOR)) +#define G_ZLIB_DECOMPRESSOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_ZLIB_DECOMPRESSOR, GZlibDecompressorClass)) + +typedef struct _GZlibDecompressorClass GZlibDecompressorClass; + +struct _GZlibDecompressorClass +{ + GObjectClass parent_class; +}; + +GLIB_AVAILABLE_IN_ALL +GType g_zlib_decompressor_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GZlibDecompressor *g_zlib_decompressor_new (GZlibCompressorFormat format); + +GLIB_AVAILABLE_IN_ALL +GFileInfo *g_zlib_decompressor_get_file_info (GZlibDecompressor *decompressor); + +G_END_DECLS + +#endif /* __G_ZLIB_DECOMPRESSOR_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib-object.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib-object.h new file mode 100755 index 00000000..35562339 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib-object.h @@ -0,0 +1,42 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1998, 1999, 2000 Tim Janik and Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ +#ifndef __GLIB_GOBJECT_H__ +#define __GLIB_GOBJECT_H__ + +#define __GLIB_GOBJECT_H_INSIDE__ + +/* topmost include file for GObject header files */ +#include <gobject/gbinding.h> +#include <gobject/gboxed.h> +#include <gobject/genums.h> +#include <gobject/gobject.h> +#include <gobject/gparam.h> +#include <gobject/gparamspecs.h> +#include <gobject/gsignal.h> +#include <gobject/gsourceclosure.h> +#include <gobject/gtype.h> +#include <gobject/gtypemodule.h> +#include <gobject/gtypeplugin.h> +#include <gobject/gvalue.h> +#include <gobject/gvaluearray.h> +#include <gobject/gvaluetypes.h> + +#include <gobject/gobject-autocleanups.h> + +#undef __GLIB_GOBJECT_H_INSIDE__ + +#endif /* __GLIB_GOBJECT_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib-unix.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib-unix.h new file mode 100755 index 00000000..ef8702d7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib-unix.h @@ -0,0 +1,119 @@ +/* glib-unix.h - Unix specific integration + * Copyright (C) 2011 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_UNIX_H__ +#define __G_UNIX_H__ + +/* We need to include the UNIX headers needed to use the APIs below, + * but we also take this opportunity to include a wide selection of + * other UNIX headers. If one of the headers below is broken on some + * system, work around it here (or better, fix the system or tell + * people to use a better one). + */ +#include <unistd.h> +#include <errno.h> +#include <sys/wait.h> +#include <stdlib.h> +#include <fcntl.h> + +#include <glib.h> + +#ifndef G_OS_UNIX +#error "This header may only be used on UNIX" +#endif + +G_BEGIN_DECLS + +/** + * G_UNIX_ERROR: + * + * Error domain for API in the g_unix_ namespace. Note that there is no + * exported enumeration mapping %errno. Instead, all functions ensure that + * %errno is relevant. The code for all #G_UNIX_ERROR is always 0, and the + * error message is always generated via g_strerror(). + * + * It is expected that most code will not look at %errno from these APIs. + * Important cases where one would want to differentiate between errors are + * already covered by existing cross-platform GLib API, such as e.g. #GFile + * wrapping `ENOENT`. However, it is provided for completeness, at least. + */ +#define G_UNIX_ERROR (g_unix_error_quark()) + +GLIB_AVAILABLE_IN_2_30 +GQuark g_unix_error_quark (void); + +GLIB_AVAILABLE_IN_2_30 +gboolean g_unix_open_pipe (gint *fds, + gint flags, + GError **error); + +GLIB_AVAILABLE_IN_2_30 +gboolean g_unix_set_fd_nonblocking (gint fd, + gboolean nonblock, + GError **error); + +GLIB_AVAILABLE_IN_2_30 +GSource *g_unix_signal_source_new (gint signum); + +GLIB_AVAILABLE_IN_2_30 +guint g_unix_signal_add_full (gint priority, + gint signum, + GSourceFunc handler, + gpointer user_data, + GDestroyNotify notify); + +GLIB_AVAILABLE_IN_2_30 +guint g_unix_signal_add (gint signum, + GSourceFunc handler, + gpointer user_data); + +/** + * GUnixFDSourceFunc: + * @fd: the fd that triggered the event + * @condition: the IO conditions reported on @fd + * @user_data: user data passed to g_unix_fd_add() + * + * The type of functions to be called when a UNIX fd watch source + * triggers. + * + * Returns: %FALSE if the source should be removed + **/ +typedef gboolean (*GUnixFDSourceFunc) (gint fd, + GIOCondition condition, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_36 +GSource *g_unix_fd_source_new (gint fd, + GIOCondition condition); + +GLIB_AVAILABLE_IN_2_36 +guint g_unix_fd_add_full (gint priority, + gint fd, + GIOCondition condition, + GUnixFDSourceFunc function, + gpointer user_data, + GDestroyNotify notify); + +GLIB_AVAILABLE_IN_2_36 +guint g_unix_fd_add (gint fd, + GIOCondition condition, + GUnixFDSourceFunc function, + gpointer user_data); + +G_END_DECLS + +#endif /* __G_UNIX_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib.h new file mode 100755 index 00000000..4f5a7f70 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib.h @@ -0,0 +1,115 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_LIB_H__ +#define __G_LIB_H__ + +#define __GLIB_H_INSIDE__ + +#include <glib/galloca.h> +#include <glib/garray.h> +#include <glib/gasyncqueue.h> +#include <glib/gatomic.h> +#include <glib/gbacktrace.h> +#include <glib/gbase64.h> +#include <glib/gbitlock.h> +#include <glib/gbookmarkfile.h> +#include <glib/gbytes.h> +#include <glib/gcharset.h> +#include <glib/gchecksum.h> +#include <glib/gconvert.h> +#include <glib/gdataset.h> +#include <glib/gdate.h> +#include <glib/gdatetime.h> +#include <glib/gdir.h> +#include <glib/genviron.h> +#include <glib/gerror.h> +#include <glib/gfileutils.h> +#include <glib/ggettext.h> +#include <glib/ghash.h> +#include <glib/ghmac.h> +#include <glib/ghook.h> +#include <glib/ghostutils.h> +#include <glib/giochannel.h> +#include <glib/gkeyfile.h> +#include <glib/glist.h> +#include <glib/gmacros.h> +#include <glib/gmain.h> +#include <glib/gmappedfile.h> +#include <glib/gmarkup.h> +#include <glib/gmem.h> +#include <glib/gmessages.h> +#include <glib/gnode.h> +#include <glib/goption.h> +#include <glib/gpattern.h> +#include <glib/gpoll.h> +#include <glib/gprimes.h> +#include <glib/gqsort.h> +#include <glib/gquark.h> +#include <glib/gqueue.h> +#include <glib/grand.h> +#include <glib/gregex.h> +#include <glib/gscanner.h> +#include <glib/gsequence.h> +#include <glib/gshell.h> +#include <glib/gslice.h> +#include <glib/gslist.h> +#include <glib/gspawn.h> +#include <glib/gstrfuncs.h> +#include <glib/gstring.h> +#include <glib/gstringchunk.h> +#include <glib/gtestutils.h> +#include <glib/gthread.h> +#include <glib/gthreadpool.h> +#include <glib/gtimer.h> +#include <glib/gtimezone.h> +#include <glib/gtrashstack.h> +#include <glib/gtree.h> +#include <glib/gtypes.h> +#include <glib/gunicode.h> +#include <glib/gurifuncs.h> +#include <glib/gutils.h> +#include <glib/guuid.h> +#include <glib/gvarianttype.h> +#include <glib/gvariant.h> +#include <glib/gversion.h> +#include <glib/gversionmacros.h> +#ifdef G_PLATFORM_WIN32 +#include <glib/gwin32.h> +#endif + +#ifndef G_DISABLE_DEPRECATED +#include <glib/deprecated/gallocator.h> +#include <glib/deprecated/gcache.h> +#include <glib/deprecated/gcompletion.h> +#include <glib/deprecated/gmain.h> +#include <glib/deprecated/grel.h> +#include <glib/deprecated/gthread.h> +#endif /* G_DISABLE_DEPRECATED */ + +#include <glib/glib-autocleanups.h> + +#undef __GLIB_H_INSIDE__ + +#endif /* __G_LIB_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/deprecated/gallocator.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/deprecated/gallocator.h new file mode 100755 index 00000000..005e92b6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/deprecated/gallocator.h @@ -0,0 +1,88 @@ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_ALLOCATOR_H__ +#define __G_ALLOCATOR_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +typedef struct _GAllocator GAllocator; +typedef struct _GMemChunk GMemChunk; + +#define G_ALLOC_ONLY 1 +#define G_ALLOC_AND_FREE 2 +#define G_ALLOCATOR_LIST 1 +#define G_ALLOCATOR_SLIST 2 +#define G_ALLOCATOR_NODE 3 + +#define g_chunk_new(type, chunk) ((type *) g_mem_chunk_alloc (chunk)) +#define g_chunk_new0(type, chunk) ((type *) g_mem_chunk_alloc0 (chunk)) +#define g_chunk_free(mem, mem_chunk) (g_mem_chunk_free (mem_chunk, mem)) +#define g_mem_chunk_create(type, x, y) (g_mem_chunk_new (NULL, sizeof (type), 0, 0)) + + +GLIB_DEPRECATED +GMemChunk * g_mem_chunk_new (const gchar *name, + gint atom_size, + gsize area_size, + gint type); +GLIB_DEPRECATED +void g_mem_chunk_destroy (GMemChunk *mem_chunk); +GLIB_DEPRECATED +gpointer g_mem_chunk_alloc (GMemChunk *mem_chunk); +GLIB_DEPRECATED +gpointer g_mem_chunk_alloc0 (GMemChunk *mem_chunk); +GLIB_DEPRECATED +void g_mem_chunk_free (GMemChunk *mem_chunk, + gpointer mem); +GLIB_DEPRECATED +void g_mem_chunk_clean (GMemChunk *mem_chunk); +GLIB_DEPRECATED +void g_mem_chunk_reset (GMemChunk *mem_chunk); +GLIB_DEPRECATED +void g_mem_chunk_print (GMemChunk *mem_chunk); +GLIB_DEPRECATED +void g_mem_chunk_info (void); +GLIB_DEPRECATED +void g_blow_chunks (void); + + +GLIB_DEPRECATED +GAllocator * g_allocator_new (const gchar *name, + guint n_preallocs); +GLIB_DEPRECATED +void g_allocator_free (GAllocator *allocator); +GLIB_DEPRECATED +void g_list_push_allocator (GAllocator *allocator); +GLIB_DEPRECATED +void g_list_pop_allocator (void); +GLIB_DEPRECATED +void g_slist_push_allocator (GAllocator *allocator); +GLIB_DEPRECATED +void g_slist_pop_allocator (void); +GLIB_DEPRECATED +void g_node_push_allocator (GAllocator *allocator); +GLIB_DEPRECATED +void g_node_pop_allocator (void); + +G_END_DECLS + +#endif /* __G_ALLOCATOR_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/deprecated/gcache.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/deprecated/gcache.h new file mode 100755 index 00000000..2885697f --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/deprecated/gcache.h @@ -0,0 +1,75 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_CACHE_H__ +#define __G_CACHE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/glist.h> + +G_BEGIN_DECLS + +#ifndef G_DISABLE_DEPRECATED + +typedef struct _GCache GCache; + +typedef gpointer (*GCacheNewFunc) (gpointer key); +typedef gpointer (*GCacheDupFunc) (gpointer value); +typedef void (*GCacheDestroyFunc) (gpointer value); + +/* Caches + */ +GLIB_DEPRECATED +GCache* g_cache_new (GCacheNewFunc value_new_func, + GCacheDestroyFunc value_destroy_func, + GCacheDupFunc key_dup_func, + GCacheDestroyFunc key_destroy_func, + GHashFunc hash_key_func, + GHashFunc hash_value_func, + GEqualFunc key_equal_func); +GLIB_DEPRECATED +void g_cache_destroy (GCache *cache); +GLIB_DEPRECATED +gpointer g_cache_insert (GCache *cache, + gpointer key); +GLIB_DEPRECATED +void g_cache_remove (GCache *cache, + gconstpointer value); +GLIB_DEPRECATED +void g_cache_key_foreach (GCache *cache, + GHFunc func, + gpointer user_data); +GLIB_DEPRECATED +void g_cache_value_foreach (GCache *cache, + GHFunc func, + gpointer user_data); + +#endif + +G_END_DECLS + +#endif /* __G_CACHE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/deprecated/gcompletion.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/deprecated/gcompletion.h new file mode 100755 index 00000000..2fd1f039 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/deprecated/gcompletion.h @@ -0,0 +1,83 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_COMPLETION_H__ +#define __G_COMPLETION_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/glist.h> + +G_BEGIN_DECLS + +typedef struct _GCompletion GCompletion; + +typedef gchar* (*GCompletionFunc) (gpointer); + +/* GCompletion + */ + +typedef gint (*GCompletionStrncmpFunc) (const gchar *s1, + const gchar *s2, + gsize n); + +struct _GCompletion +{ + GList* items; + GCompletionFunc func; + + gchar* prefix; + GList* cache; + GCompletionStrncmpFunc strncmp_func; +}; + +GLIB_DEPRECATED_IN_2_26 +GCompletion* g_completion_new (GCompletionFunc func); +GLIB_DEPRECATED_IN_2_26 +void g_completion_add_items (GCompletion* cmp, + GList* items); +GLIB_DEPRECATED_IN_2_26 +void g_completion_remove_items (GCompletion* cmp, + GList* items); +GLIB_DEPRECATED_IN_2_26 +void g_completion_clear_items (GCompletion* cmp); +GLIB_DEPRECATED_IN_2_26 +GList* g_completion_complete (GCompletion* cmp, + const gchar* prefix, + gchar** new_prefix); +GLIB_DEPRECATED_IN_2_26 +GList* g_completion_complete_utf8 (GCompletion *cmp, + const gchar* prefix, + gchar** new_prefix); +GLIB_DEPRECATED_IN_2_26 +void g_completion_set_compare (GCompletion *cmp, + GCompletionStrncmpFunc strncmp_func); +GLIB_DEPRECATED_IN_2_26 +void g_completion_free (GCompletion* cmp); + +G_END_DECLS + +#endif /* __G_COMPLETION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/deprecated/gmain.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/deprecated/gmain.h new file mode 100755 index 00000000..d14dd0ed --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/deprecated/gmain.h @@ -0,0 +1,139 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_DEPRECATED_MAIN_H__ +#define __G_DEPRECATED_MAIN_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gmain.h> + +G_BEGIN_DECLS + +#ifndef G_DISABLE_DEPRECATED + +/* ============== Compat main loop stuff ================== */ + +/** + * g_main_new: + * @is_running: set to %TRUE to indicate that the loop is running. This + * is not very important since calling g_main_run() will set this + * to %TRUE anyway. + * + * Creates a new #GMainLoop for th default main context. + * + * Returns: a new #GMainLoop + * + * Deprecated: 2.2: Use g_main_loop_new() instead + */ +#define g_main_new(is_running) g_main_loop_new (NULL, is_running) + +/** + * g_main_run: + * @loop: a #GMainLoop + * + * Runs a main loop until it stops running. + * + * Deprecated: 2.2: Use g_main_loop_run() instead + */ +#define g_main_run(loop) g_main_loop_run(loop) + +/** + * g_main_quit: + * @loop: a #GMainLoop + * + * Stops the #GMainLoop. + * If g_main_run() was called to run the #GMainLoop, it will now return. + * + * Deprecated: 2.2: Use g_main_loop_quit() instead + */ +#define g_main_quit(loop) g_main_loop_quit(loop) + +/** + * g_main_destroy: + * @loop: a #GMainLoop + * + * Frees the memory allocated for the #GMainLoop. + * + * Deprecated: 2.2: Use g_main_loop_unref() instead + */ +#define g_main_destroy(loop) g_main_loop_unref(loop) + +/** + * g_main_is_running: + * @loop: a #GMainLoop + * + * Checks if the main loop is running. + * + * Returns: %TRUE if the main loop is running + * + * Deprecated: 2.2: Use g_main_loop_is_running() instead + */ +#define g_main_is_running(loop) g_main_loop_is_running(loop) + +/** + * g_main_iteration: + * @may_block: set to %TRUE if it should block (i.e. wait) until an event + * source becomes ready. It will return after an event source has been + * processed. If set to %FALSE it will return immediately if no event + * source is ready to be processed. + * + * Runs a single iteration for the default #GMainContext. + * + * Returns: %TRUE if more events are pending. + * + * Deprecated: 2.2: Use g_main_context_iteration() instead. + */ +#define g_main_iteration(may_block) g_main_context_iteration (NULL, may_block) + +/** + * g_main_pending: + * + * Checks if any events are pending for the default #GMainContext + * (i.e. ready to be processed). + * + * Returns: %TRUE if any events are pending. + * + * Deprected: 2.2: Use g_main_context_pending() instead. + */ +#define g_main_pending() g_main_context_pending (NULL) + +/** + * g_main_set_poll_func: + * @func: the function to call to poll all file descriptors + * + * Sets the function to use for the handle polling of file descriptors + * for the default main context. + * + * Deprecated: 2.2: Use g_main_context_set_poll_func() again + */ +#define g_main_set_poll_func(func) g_main_context_set_poll_func (NULL, func) + +#endif + +G_END_DECLS + +#endif /* __G_DEPRECATED_MAIN_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/deprecated/grel.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/deprecated/grel.h new file mode 100755 index 00000000..3a65240c --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/deprecated/grel.h @@ -0,0 +1,105 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_REL_H__ +#define __G_REL_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +typedef struct _GRelation GRelation; +typedef struct _GTuples GTuples; + +struct _GTuples +{ + guint len; +}; + +/* GRelation + * + * Indexed Relations. Imagine a really simple table in a + * database. Relations are not ordered. This data type is meant for + * maintaining a N-way mapping. + * + * g_relation_new() creates a relation with FIELDS fields + * + * g_relation_destroy() frees all resources + * g_tuples_destroy() frees the result of g_relation_select() + * + * g_relation_index() indexes relation FIELD with the provided + * equality and hash functions. this must be done before any + * calls to insert are made. + * + * g_relation_insert() inserts a new tuple. you are expected to + * provide the right number of fields. + * + * g_relation_delete() deletes all relations with KEY in FIELD + * g_relation_select() returns ... + * g_relation_count() counts ... + */ + +GLIB_DEPRECATED_IN_2_26 +GRelation* g_relation_new (gint fields); +GLIB_DEPRECATED_IN_2_26 +void g_relation_destroy (GRelation *relation); +GLIB_DEPRECATED_IN_2_26 +void g_relation_index (GRelation *relation, + gint field, + GHashFunc hash_func, + GEqualFunc key_equal_func); +GLIB_DEPRECATED_IN_2_26 +void g_relation_insert (GRelation *relation, + ...); +GLIB_DEPRECATED_IN_2_26 +gint g_relation_delete (GRelation *relation, + gconstpointer key, + gint field); +GLIB_DEPRECATED_IN_2_26 +GTuples* g_relation_select (GRelation *relation, + gconstpointer key, + gint field); +GLIB_DEPRECATED_IN_2_26 +gint g_relation_count (GRelation *relation, + gconstpointer key, + gint field); +GLIB_DEPRECATED_IN_2_26 +gboolean g_relation_exists (GRelation *relation, + ...); +GLIB_DEPRECATED_IN_2_26 +void g_relation_print (GRelation *relation); +GLIB_DEPRECATED_IN_2_26 +void g_tuples_destroy (GTuples *tuples); +GLIB_DEPRECATED_IN_2_26 +gpointer g_tuples_index (GTuples *tuples, + gint index_, + gint field); + +G_END_DECLS + +#endif /* __G_REL_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/deprecated/gthread.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/deprecated/gthread.h new file mode 100755 index 00000000..d0814a87 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/deprecated/gthread.h @@ -0,0 +1,293 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_DEPRECATED_THREAD_H__ +#define __G_DEPRECATED_THREAD_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gthread.h> + +G_BEGIN_DECLS + +#ifndef G_DISABLE_DEPRECATED + +typedef enum +{ + G_THREAD_PRIORITY_LOW, + G_THREAD_PRIORITY_NORMAL, + G_THREAD_PRIORITY_HIGH, + G_THREAD_PRIORITY_URGENT +} GThreadPriority; + +#endif + +struct _GThread +{ + /*< private >*/ + GThreadFunc func; + gpointer data; + gboolean joinable; + GThreadPriority priority; +}; + +#ifndef G_DISABLE_DEPRECATED + +typedef struct _GThreadFunctions GThreadFunctions; +struct _GThreadFunctions +{ + GMutex* (*mutex_new) (void); + void (*mutex_lock) (GMutex *mutex); + gboolean (*mutex_trylock) (GMutex *mutex); + void (*mutex_unlock) (GMutex *mutex); + void (*mutex_free) (GMutex *mutex); + GCond* (*cond_new) (void); + void (*cond_signal) (GCond *cond); + void (*cond_broadcast) (GCond *cond); + void (*cond_wait) (GCond *cond, + GMutex *mutex); + gboolean (*cond_timed_wait) (GCond *cond, + GMutex *mutex, + GTimeVal *end_time); + void (*cond_free) (GCond *cond); + GPrivate* (*private_new) (GDestroyNotify destructor); + gpointer (*private_get) (GPrivate *private_key); + void (*private_set) (GPrivate *private_key, + gpointer data); + void (*thread_create) (GThreadFunc func, + gpointer data, + gulong stack_size, + gboolean joinable, + gboolean bound, + GThreadPriority priority, + gpointer thread, + GError **error); + void (*thread_yield) (void); + void (*thread_join) (gpointer thread); + void (*thread_exit) (void); + void (*thread_set_priority)(gpointer thread, + GThreadPriority priority); + void (*thread_self) (gpointer thread); + gboolean (*thread_equal) (gpointer thread1, + gpointer thread2); +}; + +GLIB_VAR GThreadFunctions g_thread_functions_for_glib_use; +GLIB_VAR gboolean g_thread_use_default_impl; + +GLIB_VAR guint64 (*g_thread_gettime) (void); + +GLIB_DEPRECATED_IN_2_32_FOR(g_thread_new) +GThread *g_thread_create (GThreadFunc func, + gpointer data, + gboolean joinable, + GError **error); + +GLIB_DEPRECATED_IN_2_32_FOR(g_thread_new) +GThread *g_thread_create_full (GThreadFunc func, + gpointer data, + gulong stack_size, + gboolean joinable, + gboolean bound, + GThreadPriority priority, + GError **error); + +GLIB_DEPRECATED_IN_2_32 +void g_thread_set_priority (GThread *thread, + GThreadPriority priority); + +GLIB_DEPRECATED_IN_2_32 +void g_thread_foreach (GFunc thread_func, + gpointer user_data); + +#ifndef G_OS_WIN32 +#include <sys/types.h> +#include <pthread.h> +#endif + +#define g_static_mutex_get_mutex g_static_mutex_get_mutex_impl +#define G_STATIC_MUTEX_INIT { NULL } +typedef struct +{ + GMutex *mutex; +#ifndef G_OS_WIN32 + /* only for ABI compatibility reasons */ + pthread_mutex_t unused; +#endif +} GStaticMutex; + +#define g_static_mutex_lock(mutex) \ + g_mutex_lock (g_static_mutex_get_mutex (mutex)) +#define g_static_mutex_trylock(mutex) \ + g_mutex_trylock (g_static_mutex_get_mutex (mutex)) +#define g_static_mutex_unlock(mutex) \ + g_mutex_unlock (g_static_mutex_get_mutex (mutex)) + +GLIB_DEPRECATED_IN_2_32_FOR(g_mutex_init) +void g_static_mutex_init (GStaticMutex *mutex); +GLIB_DEPRECATED_IN_2_32_FOR(g_mutex_clear) +void g_static_mutex_free (GStaticMutex *mutex); +GLIB_DEPRECATED_IN_2_32_FOR(GMutex) +GMutex *g_static_mutex_get_mutex_impl (GStaticMutex *mutex); + +typedef struct _GStaticRecMutex GStaticRecMutex; +struct _GStaticRecMutex +{ + /*< private >*/ + GStaticMutex mutex; + guint depth; + + /* ABI compat only */ + union { +#ifdef G_OS_WIN32 + void *owner; +#else + pthread_t owner; +#endif + gdouble dummy; + } unused; +}; + +#define G_STATIC_REC_MUTEX_INIT { G_STATIC_MUTEX_INIT } +GLIB_DEPRECATED_IN_2_32_FOR(g_rec_mutex_init) +void g_static_rec_mutex_init (GStaticRecMutex *mutex); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rec_mutex_lock) +void g_static_rec_mutex_lock (GStaticRecMutex *mutex); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rec_mutex_try_lock) +gboolean g_static_rec_mutex_trylock (GStaticRecMutex *mutex); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rec_mutex_unlock) +void g_static_rec_mutex_unlock (GStaticRecMutex *mutex); + +GLIB_DEPRECATED_IN_2_32 +void g_static_rec_mutex_lock_full (GStaticRecMutex *mutex, + guint depth); + +GLIB_DEPRECATED_IN_2_32 +guint g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rec_mutex_free) +void g_static_rec_mutex_free (GStaticRecMutex *mutex); + +typedef struct _GStaticRWLock GStaticRWLock; +struct _GStaticRWLock +{ + /*< private >*/ + GStaticMutex mutex; + GCond *read_cond; + GCond *write_cond; + guint read_counter; + gboolean have_writer; + guint want_to_read; + guint want_to_write; +}; + +#define G_STATIC_RW_LOCK_INIT { G_STATIC_MUTEX_INIT, NULL, NULL, 0, FALSE, 0, 0 } + +GLIB_DEPRECATED_IN_2_32_FOR(g_rw_lock_init) +void g_static_rw_lock_init (GStaticRWLock *lock); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rw_lock_reader_lock) +void g_static_rw_lock_reader_lock (GStaticRWLock *lock); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rw_lock_reader_trylock) +gboolean g_static_rw_lock_reader_trylock (GStaticRWLock *lock); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rw_lock_reader_unlock) +void g_static_rw_lock_reader_unlock (GStaticRWLock *lock); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rw_lock_writer_lock) +void g_static_rw_lock_writer_lock (GStaticRWLock *lock); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rw_lock_writer_trylock) +gboolean g_static_rw_lock_writer_trylock (GStaticRWLock *lock); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rw_lock_writer_unlock) +void g_static_rw_lock_writer_unlock (GStaticRWLock *lock); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rw_lock_free) +void g_static_rw_lock_free (GStaticRWLock *lock); + +GLIB_DEPRECATED_IN_2_32 +GPrivate * g_private_new (GDestroyNotify notify); + +typedef struct _GStaticPrivate GStaticPrivate; +struct _GStaticPrivate +{ + /*< private >*/ + guint index; +}; + +#define G_STATIC_PRIVATE_INIT { 0 } +GLIB_DEPRECATED_IN_2_32 +void g_static_private_init (GStaticPrivate *private_key); + +GLIB_DEPRECATED_IN_2_32_FOR(g_private_get) +gpointer g_static_private_get (GStaticPrivate *private_key); + +GLIB_DEPRECATED_IN_2_32_FOR(g_private_set) +void g_static_private_set (GStaticPrivate *private_key, + gpointer data, + GDestroyNotify notify); + +GLIB_DEPRECATED_IN_2_32 +void g_static_private_free (GStaticPrivate *private_key); + +GLIB_DEPRECATED_IN_2_32 +gboolean g_once_init_enter_impl (volatile gsize *location); + +GLIB_DEPRECATED_IN_2_32 +void g_thread_init (gpointer vtable); +GLIB_DEPRECATED_IN_2_32 +void g_thread_init_with_errorcheck_mutexes (gpointer vtable); + +GLIB_DEPRECATED_IN_2_32 +gboolean g_thread_get_initialized (void); + +GLIB_VAR gboolean g_threads_got_initialized; + +#define g_thread_supported() (1) + +GLIB_DEPRECATED_IN_2_32 +GMutex * g_mutex_new (void); +GLIB_DEPRECATED_IN_2_32 +void g_mutex_free (GMutex *mutex); +GLIB_DEPRECATED_IN_2_32 +GCond * g_cond_new (void); +GLIB_DEPRECATED_IN_2_32 +void g_cond_free (GCond *cond); +GLIB_DEPRECATED_IN_2_32 +gboolean g_cond_timed_wait (GCond *cond, + GMutex *mutex, + GTimeVal *timeval); + +#endif + +G_END_DECLS + +#endif /* __G_DEPRECATED_THREAD_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/galloca.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/galloca.h new file mode 100755 index 00000000..47151ee8 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/galloca.h @@ -0,0 +1,103 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_ALLOCA_H__ +#define __G_ALLOCA_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +#if defined(__BIONIC__) && defined (GLIB_HAVE_ALLOCA_H) +# include <alloca.h> +#elif defined(__GNUC__) +/* GCC does the right thing */ +# undef alloca +# define alloca(size) __builtin_alloca (size) +#elif defined (GLIB_HAVE_ALLOCA_H) +/* a native and working alloca.h is there */ +# include <alloca.h> +#else /* !__GNUC__ && !GLIB_HAVE_ALLOCA_H */ +# if defined(_MSC_VER) || defined(__DMC__) +# include <malloc.h> +# define alloca _alloca +# else /* !_MSC_VER && !__DMC__ */ +# ifdef _AIX +# pragma alloca +# else /* !_AIX */ +# ifndef alloca /* predefined by HP cc +Olibcalls */ +G_BEGIN_DECLS +char *alloca (); +G_END_DECLS +# endif /* !alloca */ +# endif /* !_AIX */ +# endif /* !_MSC_VER && !__DMC__ */ +#endif /* !__GNUC__ && !GLIB_HAVE_ALLOCA_H */ + +/** + * g_alloca: + * @size: number of bytes to allocate. + * + * Allocates @size bytes on the stack; these bytes will be freed when the current + * stack frame is cleaned up. This macro essentially just wraps the alloca() + * function present on most UNIX variants. + * Thus it provides the same advantages and pitfalls as alloca(): + * + * - alloca() is very fast, as on most systems it's implemented by just adjusting + * the stack pointer register. + * + * - It doesn't cause any memory fragmentation, within its scope, separate alloca() + * blocks just build up and are released together at function end. + * + * - Allocation sizes have to fit into the current stack frame. For instance in a + * threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes, + * so be sparse with alloca() uses. + * + * - Allocation failure due to insufficient stack space is not indicated with a %NULL + * return like e.g. with malloc(). Instead, most systems probably handle it the same + * way as out of stack space situations from infinite function recursion, i.e. + * with a segmentation fault. + * + * - Special care has to be taken when mixing alloca() with GNU C variable sized arrays. + * Stack space allocated with alloca() in the same scope as a variable sized array + * will be freed together with the variable sized array upon exit of that scope, and + * not upon exit of the enclosing function scope. + * + * Returns: space for @size bytes, allocated on the stack + */ +#define g_alloca(size) alloca (size) +/** + * g_newa: + * @struct_type: Type of memory chunks to be allocated + * @n_structs: Number of chunks to be allocated + * + * Wraps g_alloca() in a more typesafe manner. + * + * Returns: Pointer to stack space for @n_structs chunks of type @struct_type + */ +#define g_newa(struct_type, n_structs) ((struct_type*) g_alloca (sizeof (struct_type) * (gsize) (n_structs))) + +#endif /* __G_ALLOCA_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/garray.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/garray.h new file mode 100755 index 00000000..3490f14f --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/garray.h @@ -0,0 +1,247 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_ARRAY_H__ +#define __G_ARRAY_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +typedef struct _GBytes GBytes; +typedef struct _GArray GArray; +typedef struct _GByteArray GByteArray; +typedef struct _GPtrArray GPtrArray; + +struct _GArray +{ + gchar *data; + guint len; +}; + +struct _GByteArray +{ + guint8 *data; + guint len; +}; + +struct _GPtrArray +{ + gpointer *pdata; + guint len; +}; + +/* Resizable arrays. remove fills any cleared spot and shortens the + * array, while preserving the order. remove_fast will distort the + * order by moving the last element to the position of the removed. + */ + +#define g_array_append_val(a,v) g_array_append_vals (a, &(v), 1) +#define g_array_prepend_val(a,v) g_array_prepend_vals (a, &(v), 1) +#define g_array_insert_val(a,i,v) g_array_insert_vals (a, i, &(v), 1) +#define g_array_index(a,t,i) (((t*) (void *) (a)->data) [(i)]) + +GLIB_AVAILABLE_IN_ALL +GArray* g_array_new (gboolean zero_terminated, + gboolean clear_, + guint element_size); +GLIB_AVAILABLE_IN_ALL +GArray* g_array_sized_new (gboolean zero_terminated, + gboolean clear_, + guint element_size, + guint reserved_size); +GLIB_AVAILABLE_IN_ALL +gchar* g_array_free (GArray *array, + gboolean free_segment); +GLIB_AVAILABLE_IN_ALL +GArray *g_array_ref (GArray *array); +GLIB_AVAILABLE_IN_ALL +void g_array_unref (GArray *array); +GLIB_AVAILABLE_IN_ALL +guint g_array_get_element_size (GArray *array); +GLIB_AVAILABLE_IN_ALL +GArray* g_array_append_vals (GArray *array, + gconstpointer data, + guint len); +GLIB_AVAILABLE_IN_ALL +GArray* g_array_prepend_vals (GArray *array, + gconstpointer data, + guint len); +GLIB_AVAILABLE_IN_ALL +GArray* g_array_insert_vals (GArray *array, + guint index_, + gconstpointer data, + guint len); +GLIB_AVAILABLE_IN_ALL +GArray* g_array_set_size (GArray *array, + guint length); +GLIB_AVAILABLE_IN_ALL +GArray* g_array_remove_index (GArray *array, + guint index_); +GLIB_AVAILABLE_IN_ALL +GArray* g_array_remove_index_fast (GArray *array, + guint index_); +GLIB_AVAILABLE_IN_ALL +GArray* g_array_remove_range (GArray *array, + guint index_, + guint length); +GLIB_AVAILABLE_IN_ALL +void g_array_sort (GArray *array, + GCompareFunc compare_func); +GLIB_AVAILABLE_IN_ALL +void g_array_sort_with_data (GArray *array, + GCompareDataFunc compare_func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +void g_array_set_clear_func (GArray *array, + GDestroyNotify clear_func); + +/* Resizable pointer array. This interface is much less complicated + * than the above. Add appends a pointer. Remove fills any cleared + * spot and shortens the array. remove_fast will again distort order. + */ +#define g_ptr_array_index(array,index_) ((array)->pdata)[index_] +GLIB_AVAILABLE_IN_ALL +GPtrArray* g_ptr_array_new (void); +GLIB_AVAILABLE_IN_ALL +GPtrArray* g_ptr_array_new_with_free_func (GDestroyNotify element_free_func); +GLIB_AVAILABLE_IN_ALL +GPtrArray* g_ptr_array_sized_new (guint reserved_size); +GLIB_AVAILABLE_IN_ALL +GPtrArray* g_ptr_array_new_full (guint reserved_size, + GDestroyNotify element_free_func); +GLIB_AVAILABLE_IN_ALL +gpointer* g_ptr_array_free (GPtrArray *array, + gboolean free_seg); +GLIB_AVAILABLE_IN_ALL +GPtrArray* g_ptr_array_ref (GPtrArray *array); +GLIB_AVAILABLE_IN_ALL +void g_ptr_array_unref (GPtrArray *array); +GLIB_AVAILABLE_IN_ALL +void g_ptr_array_set_free_func (GPtrArray *array, + GDestroyNotify element_free_func); +GLIB_AVAILABLE_IN_ALL +void g_ptr_array_set_size (GPtrArray *array, + gint length); +GLIB_AVAILABLE_IN_ALL +gpointer g_ptr_array_remove_index (GPtrArray *array, + guint index_); +GLIB_AVAILABLE_IN_ALL +gpointer g_ptr_array_remove_index_fast (GPtrArray *array, + guint index_); +GLIB_AVAILABLE_IN_ALL +gboolean g_ptr_array_remove (GPtrArray *array, + gpointer data); +GLIB_AVAILABLE_IN_ALL +gboolean g_ptr_array_remove_fast (GPtrArray *array, + gpointer data); +GLIB_AVAILABLE_IN_ALL +GPtrArray *g_ptr_array_remove_range (GPtrArray *array, + guint index_, + guint length); +GLIB_AVAILABLE_IN_ALL +void g_ptr_array_add (GPtrArray *array, + gpointer data); +GLIB_AVAILABLE_IN_2_40 +void g_ptr_array_insert (GPtrArray *array, + gint index_, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_ptr_array_sort (GPtrArray *array, + GCompareFunc compare_func); +GLIB_AVAILABLE_IN_ALL +void g_ptr_array_sort_with_data (GPtrArray *array, + GCompareDataFunc compare_func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +void g_ptr_array_foreach (GPtrArray *array, + GFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_2_54 +gboolean g_ptr_array_find (GPtrArray *haystack, + gconstpointer needle, + guint *index_); +GLIB_AVAILABLE_IN_2_54 +gboolean g_ptr_array_find_with_equal_func (GPtrArray *haystack, + gconstpointer needle, + GEqualFunc equal_func, + guint *index_); + + +/* Byte arrays, an array of guint8. Implemented as a GArray, + * but type-safe. + */ + +GLIB_AVAILABLE_IN_ALL +GByteArray* g_byte_array_new (void); +GLIB_AVAILABLE_IN_ALL +GByteArray* g_byte_array_new_take (guint8 *data, + gsize len); +GLIB_AVAILABLE_IN_ALL +GByteArray* g_byte_array_sized_new (guint reserved_size); +GLIB_AVAILABLE_IN_ALL +guint8* g_byte_array_free (GByteArray *array, + gboolean free_segment); +GLIB_AVAILABLE_IN_ALL +GBytes* g_byte_array_free_to_bytes (GByteArray *array); +GLIB_AVAILABLE_IN_ALL +GByteArray *g_byte_array_ref (GByteArray *array); +GLIB_AVAILABLE_IN_ALL +void g_byte_array_unref (GByteArray *array); +GLIB_AVAILABLE_IN_ALL +GByteArray* g_byte_array_append (GByteArray *array, + const guint8 *data, + guint len); +GLIB_AVAILABLE_IN_ALL +GByteArray* g_byte_array_prepend (GByteArray *array, + const guint8 *data, + guint len); +GLIB_AVAILABLE_IN_ALL +GByteArray* g_byte_array_set_size (GByteArray *array, + guint length); +GLIB_AVAILABLE_IN_ALL +GByteArray* g_byte_array_remove_index (GByteArray *array, + guint index_); +GLIB_AVAILABLE_IN_ALL +GByteArray* g_byte_array_remove_index_fast (GByteArray *array, + guint index_); +GLIB_AVAILABLE_IN_ALL +GByteArray* g_byte_array_remove_range (GByteArray *array, + guint index_, + guint length); +GLIB_AVAILABLE_IN_ALL +void g_byte_array_sort (GByteArray *array, + GCompareFunc compare_func); +GLIB_AVAILABLE_IN_ALL +void g_byte_array_sort_with_data (GByteArray *array, + GCompareDataFunc compare_func, + gpointer user_data); + +G_END_DECLS + +#endif /* __G_ARRAY_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gasyncqueue.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gasyncqueue.h new file mode 100755 index 00000000..05980a77 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gasyncqueue.h @@ -0,0 +1,122 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_ASYNCQUEUE_H__ +#define __G_ASYNCQUEUE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gthread.h> + +G_BEGIN_DECLS + +typedef struct _GAsyncQueue GAsyncQueue; + +GLIB_AVAILABLE_IN_ALL +GAsyncQueue *g_async_queue_new (void); +GLIB_AVAILABLE_IN_ALL +GAsyncQueue *g_async_queue_new_full (GDestroyNotify item_free_func); +GLIB_AVAILABLE_IN_ALL +void g_async_queue_lock (GAsyncQueue *queue); +GLIB_AVAILABLE_IN_ALL +void g_async_queue_unlock (GAsyncQueue *queue); +GLIB_AVAILABLE_IN_ALL +GAsyncQueue *g_async_queue_ref (GAsyncQueue *queue); +GLIB_AVAILABLE_IN_ALL +void g_async_queue_unref (GAsyncQueue *queue); + +GLIB_DEPRECATED_FOR(g_async_queue_ref) +void g_async_queue_ref_unlocked (GAsyncQueue *queue); + +GLIB_DEPRECATED_FOR(g_async_queue_unref) +void g_async_queue_unref_and_unlock (GAsyncQueue *queue); + +GLIB_AVAILABLE_IN_ALL +void g_async_queue_push (GAsyncQueue *queue, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_async_queue_push_unlocked (GAsyncQueue *queue, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_async_queue_push_sorted (GAsyncQueue *queue, + gpointer data, + GCompareDataFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +void g_async_queue_push_sorted_unlocked (GAsyncQueue *queue, + gpointer data, + GCompareDataFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gpointer g_async_queue_pop (GAsyncQueue *queue); +GLIB_AVAILABLE_IN_ALL +gpointer g_async_queue_pop_unlocked (GAsyncQueue *queue); +GLIB_AVAILABLE_IN_ALL +gpointer g_async_queue_try_pop (GAsyncQueue *queue); +GLIB_AVAILABLE_IN_ALL +gpointer g_async_queue_try_pop_unlocked (GAsyncQueue *queue); +GLIB_AVAILABLE_IN_ALL +gpointer g_async_queue_timeout_pop (GAsyncQueue *queue, + guint64 timeout); +GLIB_AVAILABLE_IN_ALL +gpointer g_async_queue_timeout_pop_unlocked (GAsyncQueue *queue, + guint64 timeout); +GLIB_AVAILABLE_IN_ALL +gint g_async_queue_length (GAsyncQueue *queue); +GLIB_AVAILABLE_IN_ALL +gint g_async_queue_length_unlocked (GAsyncQueue *queue); +GLIB_AVAILABLE_IN_ALL +void g_async_queue_sort (GAsyncQueue *queue, + GCompareDataFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +void g_async_queue_sort_unlocked (GAsyncQueue *queue, + GCompareDataFunc func, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_46 +gboolean g_async_queue_remove (GAsyncQueue *queue, + gpointer item); +GLIB_AVAILABLE_IN_2_46 +gboolean g_async_queue_remove_unlocked (GAsyncQueue *queue, + gpointer item); +GLIB_AVAILABLE_IN_2_46 +void g_async_queue_push_front (GAsyncQueue *queue, + gpointer item); +GLIB_AVAILABLE_IN_2_46 +void g_async_queue_push_front_unlocked (GAsyncQueue *queue, + gpointer item); + +GLIB_DEPRECATED_FOR(g_async_queue_timeout_pop) +gpointer g_async_queue_timed_pop (GAsyncQueue *queue, + GTimeVal *end_time); +GLIB_DEPRECATED_FOR(g_async_queue_timeout_pop_unlocked) +gpointer g_async_queue_timed_pop_unlocked (GAsyncQueue *queue, + GTimeVal *end_time); + +G_END_DECLS + +#endif /* __G_ASYNCQUEUE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gatomic.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gatomic.h new file mode 100755 index 00000000..8e5efccb --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gatomic.h @@ -0,0 +1,289 @@ +/* + * Copyright © 2011 Ryan Lortie + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_ATOMIC_H__ +#define __G_ATOMIC_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +gint g_atomic_int_get (const volatile gint *atomic); +GLIB_AVAILABLE_IN_ALL +void g_atomic_int_set (volatile gint *atomic, + gint newval); +GLIB_AVAILABLE_IN_ALL +void g_atomic_int_inc (volatile gint *atomic); +GLIB_AVAILABLE_IN_ALL +gboolean g_atomic_int_dec_and_test (volatile gint *atomic); +GLIB_AVAILABLE_IN_ALL +gboolean g_atomic_int_compare_and_exchange (volatile gint *atomic, + gint oldval, + gint newval); +GLIB_AVAILABLE_IN_ALL +gint g_atomic_int_add (volatile gint *atomic, + gint val); +GLIB_AVAILABLE_IN_2_30 +guint g_atomic_int_and (volatile guint *atomic, + guint val); +GLIB_AVAILABLE_IN_2_30 +guint g_atomic_int_or (volatile guint *atomic, + guint val); +GLIB_AVAILABLE_IN_ALL +guint g_atomic_int_xor (volatile guint *atomic, + guint val); + +GLIB_AVAILABLE_IN_ALL +gpointer g_atomic_pointer_get (const volatile void *atomic); +GLIB_AVAILABLE_IN_ALL +void g_atomic_pointer_set (volatile void *atomic, + gpointer newval); +GLIB_AVAILABLE_IN_ALL +gboolean g_atomic_pointer_compare_and_exchange (volatile void *atomic, + gpointer oldval, + gpointer newval); +GLIB_AVAILABLE_IN_ALL +gssize g_atomic_pointer_add (volatile void *atomic, + gssize val); +GLIB_AVAILABLE_IN_2_30 +gsize g_atomic_pointer_and (volatile void *atomic, + gsize val); +GLIB_AVAILABLE_IN_2_30 +gsize g_atomic_pointer_or (volatile void *atomic, + gsize val); +GLIB_AVAILABLE_IN_ALL +gsize g_atomic_pointer_xor (volatile void *atomic, + gsize val); + +GLIB_DEPRECATED_IN_2_30_FOR(g_atomic_int_add) +gint g_atomic_int_exchange_and_add (volatile gint *atomic, + gint val); + +G_END_DECLS + +#if defined(G_ATOMIC_LOCK_FREE) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) + +/* We prefer the new C11-style atomic extension of GCC if available */ +#if defined(__ATOMIC_SEQ_CST) && !defined(__clang__) + +/* This assumes sizeof(int) is 4: gatomic.c statically + * asserts that (using G_STATIC_ASSERT at top-level in a header was + * problematic, see #730932) */ + +#define g_atomic_int_get(atomic) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ *(atomic) : 1); \ + (gint) __atomic_load_4 ((atomic), __ATOMIC_SEQ_CST); \ + })) +#define g_atomic_int_set(atomic, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (newval) : 1); \ + __atomic_store_4 ((atomic), (newval), __ATOMIC_SEQ_CST); \ + })) + +#if GLIB_SIZEOF_VOID_P == 8 + +#define g_atomic_pointer_get(atomic) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (gpointer) __atomic_load_8 ((atomic), __ATOMIC_SEQ_CST); \ + })) +#define g_atomic_pointer_set(atomic, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + __atomic_store_8 ((atomic), (gsize) (newval), __ATOMIC_SEQ_CST); \ + })) + +#else /* GLIB_SIZEOF_VOID_P == 8 */ + +/* This assumes that if sizeof(void *) is not 8, then it is 4: + * gatomic.c statically asserts that (using G_STATIC_ASSERT + * at top-level in a header was problematic, see #730932) */ + +#define g_atomic_pointer_get(atomic) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (gpointer) __atomic_load_4 ((atomic), __ATOMIC_SEQ_CST); \ + })) +#define g_atomic_pointer_set(atomic, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + __atomic_store_4 ((atomic), (gsize) (newval), __ATOMIC_SEQ_CST); \ + })) + +#endif /* GLIB_SIZEOF_VOID_P == 8 */ + +#else /* defined(__ATOMIC_SEQ_CST) */ + +#define g_atomic_int_get(atomic) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ *(atomic) : 1); \ + __sync_synchronize (); \ + (gint) *(atomic); \ + })) +#define g_atomic_int_set(atomic, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (newval) : 1); \ + *(atomic) = (newval); \ + __sync_synchronize (); \ + })) +#define g_atomic_pointer_get(atomic) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + __sync_synchronize (); \ + (gpointer) *(atomic); \ + })) +#define g_atomic_pointer_set(atomic, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + *(atomic) = (__typeof__ (*(atomic))) (gsize) (newval); \ + __sync_synchronize (); \ + })) + +#endif /* !defined(__ATOMIC_SEQ_CST) */ + +#define g_atomic_int_inc(atomic) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ *(atomic) : 1); \ + (void) __sync_fetch_and_add ((atomic), 1); \ + })) +#define g_atomic_int_dec_and_test(atomic) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ *(atomic) : 1); \ + __sync_fetch_and_sub ((atomic), 1) == 1; \ + })) +#define g_atomic_int_compare_and_exchange(atomic, oldval, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (newval) ^ (oldval) : 1); \ + (gboolean) __sync_bool_compare_and_swap ((atomic), (oldval), (newval)); \ + })) +#define g_atomic_int_add(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (val) : 1); \ + (gint) __sync_fetch_and_add ((atomic), (val)); \ + })) +#define g_atomic_int_and(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (val) : 1); \ + (guint) __sync_fetch_and_and ((atomic), (val)); \ + })) +#define g_atomic_int_or(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (val) : 1); \ + (guint) __sync_fetch_and_or ((atomic), (val)); \ + })) +#define g_atomic_int_xor(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (val) : 1); \ + (guint) __sync_fetch_and_xor ((atomic), (val)); \ + })) + +#define g_atomic_pointer_compare_and_exchange(atomic, oldval, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + (gboolean) __sync_bool_compare_and_swap ((atomic), (oldval), (newval)); \ + })) +#define g_atomic_pointer_add(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + (void) (0 ? (val) ^ (val) : 1); \ + (gssize) __sync_fetch_and_add ((atomic), (val)); \ + })) +#define g_atomic_pointer_and(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + (void) (0 ? (val) ^ (val) : 1); \ + (gsize) __sync_fetch_and_and ((atomic), (val)); \ + })) +#define g_atomic_pointer_or(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + (void) (0 ? (val) ^ (val) : 1); \ + (gsize) __sync_fetch_and_or ((atomic), (val)); \ + })) +#define g_atomic_pointer_xor(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + (void) (0 ? (val) ^ (val) : 1); \ + (gsize) __sync_fetch_and_xor ((atomic), (val)); \ + })) + +#else /* defined(G_ATOMIC_LOCK_FREE) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) */ + +#define g_atomic_int_get(atomic) \ + (g_atomic_int_get ((gint *) (atomic))) +#define g_atomic_int_set(atomic, newval) \ + (g_atomic_int_set ((gint *) (atomic), (gint) (newval))) +#define g_atomic_int_compare_and_exchange(atomic, oldval, newval) \ + (g_atomic_int_compare_and_exchange ((gint *) (atomic), (oldval), (newval))) +#define g_atomic_int_add(atomic, val) \ + (g_atomic_int_add ((gint *) (atomic), (val))) +#define g_atomic_int_and(atomic, val) \ + (g_atomic_int_and ((guint *) (atomic), (val))) +#define g_atomic_int_or(atomic, val) \ + (g_atomic_int_or ((guint *) (atomic), (val))) +#define g_atomic_int_xor(atomic, val) \ + (g_atomic_int_xor ((guint *) (atomic), (val))) +#define g_atomic_int_inc(atomic) \ + (g_atomic_int_inc ((gint *) (atomic))) +#define g_atomic_int_dec_and_test(atomic) \ + (g_atomic_int_dec_and_test ((gint *) (atomic))) + +#define g_atomic_pointer_get(atomic) \ + (g_atomic_pointer_get (atomic)) +#define g_atomic_pointer_set(atomic, newval) \ + (g_atomic_pointer_set ((atomic), (gpointer) (newval))) +#define g_atomic_pointer_compare_and_exchange(atomic, oldval, newval) \ + (g_atomic_pointer_compare_and_exchange ((atomic), (gpointer) (oldval), (gpointer) (newval))) +#define g_atomic_pointer_add(atomic, val) \ + (g_atomic_pointer_add ((atomic), (gssize) (val))) +#define g_atomic_pointer_and(atomic, val) \ + (g_atomic_pointer_and ((atomic), (gsize) (val))) +#define g_atomic_pointer_or(atomic, val) \ + (g_atomic_pointer_or ((atomic), (gsize) (val))) +#define g_atomic_pointer_xor(atomic, val) \ + (g_atomic_pointer_xor ((atomic), (gsize) (val))) + +#endif /* defined(__GNUC__) && defined(G_ATOMIC_OP_USE_GCC_BUILTINS) */ + +#endif /* __G_ATOMIC_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gbacktrace.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gbacktrace.h new file mode 100755 index 00000000..d7322f4e --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gbacktrace.h @@ -0,0 +1,69 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_BACKTRACE_H__ +#define __G_BACKTRACE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> +#ifdef __sun__ +#include <sys/select.h> +#endif +#include <signal.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +void g_on_error_query (const gchar *prg_name); +GLIB_AVAILABLE_IN_ALL +void g_on_error_stack_trace (const gchar *prg_name); + +/** + * G_BREAKPOINT: + * + * Inserts a breakpoint instruction into the code. + * + * On x86 and alpha systems this is implemented as a soft interrupt + * and on other architectures it raises a `SIGTRAP` signal. + */ +#if (defined (__i386__) || defined (__x86_64__)) && defined (__GNUC__) && __GNUC__ >= 2 +# define G_BREAKPOINT() G_STMT_START{ __asm__ __volatile__ ("int $03"); }G_STMT_END +#elif (defined (_MSC_VER) || defined (__DMC__)) && defined (_M_IX86) +# define G_BREAKPOINT() G_STMT_START{ __asm int 3h }G_STMT_END +#elif defined (_MSC_VER) +# define G_BREAKPOINT() G_STMT_START{ __debugbreak(); }G_STMT_END +#elif defined (__alpha__) && !defined(__osf__) && defined (__GNUC__) && __GNUC__ >= 2 +# define G_BREAKPOINT() G_STMT_START{ __asm__ __volatile__ ("bpt"); }G_STMT_END +#elif defined (__APPLE__) +# define G_BREAKPOINT() G_STMT_START{ __builtin_trap(); }G_STMT_END +#else /* !__i386__ && !__alpha__ */ +# define G_BREAKPOINT() G_STMT_START{ raise (SIGTRAP); }G_STMT_END +#endif /* __i386__ */ + +G_END_DECLS + +#endif /* __G_BACKTRACE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gbase64.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gbase64.h new file mode 100755 index 00000000..662c597f --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gbase64.h @@ -0,0 +1,61 @@ +/* gbase64.h - Base64 coding functions + * + * Copyright (C) 2005 Alexander Larsson <alexl@redhat.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_BASE64_H__ +#define __G_BASE64_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +gsize g_base64_encode_step (const guchar *in, + gsize len, + gboolean break_lines, + gchar *out, + gint *state, + gint *save); +GLIB_AVAILABLE_IN_ALL +gsize g_base64_encode_close (gboolean break_lines, + gchar *out, + gint *state, + gint *save); +GLIB_AVAILABLE_IN_ALL +gchar* g_base64_encode (const guchar *data, + gsize len) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gsize g_base64_decode_step (const gchar *in, + gsize len, + guchar *out, + gint *state, + guint *save); +GLIB_AVAILABLE_IN_ALL +guchar *g_base64_decode (const gchar *text, + gsize *out_len) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +guchar *g_base64_decode_inplace (gchar *text, + gsize *out_len); + + +G_END_DECLS + +#endif /* __G_BASE64_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gbitlock.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gbitlock.h new file mode 100755 index 00000000..8054bc8a --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gbitlock.h @@ -0,0 +1,76 @@ +/* + * Copyright © 2008 Ryan Lortie + * Copyright © 2010 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_BITLOCK_H__ +#define __G_BITLOCK_H__ + +#include <glib/gtypes.h> + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +void g_bit_lock (volatile gint *address, + gint lock_bit); +GLIB_AVAILABLE_IN_ALL +gboolean g_bit_trylock (volatile gint *address, + gint lock_bit); +GLIB_AVAILABLE_IN_ALL +void g_bit_unlock (volatile gint *address, + gint lock_bit); + +GLIB_AVAILABLE_IN_ALL +void g_pointer_bit_lock (volatile void *address, + gint lock_bit); +GLIB_AVAILABLE_IN_ALL +gboolean g_pointer_bit_trylock (volatile void *address, + gint lock_bit); +GLIB_AVAILABLE_IN_ALL +void g_pointer_bit_unlock (volatile void *address, + gint lock_bit); + +#ifdef __GNUC__ + +#define g_pointer_bit_lock(address, lock_bit) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(address) == sizeof (gpointer)); \ + g_pointer_bit_lock ((address), (lock_bit)); \ + })) + +#define g_pointer_bit_trylock(address, lock_bit) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(address) == sizeof (gpointer)); \ + g_pointer_bit_trylock ((address), (lock_bit)); \ + })) + +#define g_pointer_bit_unlock(address, lock_bit) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(address) == sizeof (gpointer)); \ + g_pointer_bit_unlock ((address), (lock_bit)); \ + })) + +#endif + +G_END_DECLS + +#endif /* __G_BITLOCK_H_ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gbookmarkfile.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gbookmarkfile.h new file mode 100755 index 00000000..b87d27e0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gbookmarkfile.h @@ -0,0 +1,254 @@ +/* gbookmarkfile.h: parsing and building desktop bookmarks + * + * Copyright (C) 2005-2006 Emmanuele Bassi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_BOOKMARK_FILE_H__ +#define __G_BOOKMARK_FILE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gerror.h> +#include <time.h> + +G_BEGIN_DECLS + +/** + * G_BOOKMARK_FILE_ERROR: + * + * Error domain for bookmark file parsing. + * Errors in this domain will be from the #GBookmarkFileError + * enumeration. See #GError for information on error domains. + */ +#define G_BOOKMARK_FILE_ERROR (g_bookmark_file_error_quark ()) + + +/** + * GBookmarkFileError: + * @G_BOOKMARK_FILE_ERROR_INVALID_URI: URI was ill-formed + * @G_BOOKMARK_FILE_ERROR_INVALID_VALUE: a requested field was not found + * @G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED: a requested application did + * not register a bookmark + * @G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND: a requested URI was not found + * @G_BOOKMARK_FILE_ERROR_READ: document was ill formed + * @G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was + * in an unknown encoding + * @G_BOOKMARK_FILE_ERROR_WRITE: an error occurred while writing + * @G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND: requested file was not found + * + * Error codes returned by bookmark file parsing. + */ +typedef enum +{ + G_BOOKMARK_FILE_ERROR_INVALID_URI, + G_BOOKMARK_FILE_ERROR_INVALID_VALUE, + G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED, + G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND, + G_BOOKMARK_FILE_ERROR_READ, + G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING, + G_BOOKMARK_FILE_ERROR_WRITE, + G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND +} GBookmarkFileError; + +GLIB_AVAILABLE_IN_ALL +GQuark g_bookmark_file_error_quark (void); + +/** + * GBookmarkFile: + * + * The `GBookmarkFile` structure contains only + * private data and should not be directly accessed. + */ +typedef struct _GBookmarkFile GBookmarkFile; + +GLIB_AVAILABLE_IN_ALL +GBookmarkFile *g_bookmark_file_new (void); +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_free (GBookmarkFile *bookmark); + +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_load_from_file (GBookmarkFile *bookmark, + const gchar *filename, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_load_from_data (GBookmarkFile *bookmark, + const gchar *data, + gsize length, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_load_from_data_dirs (GBookmarkFile *bookmark, + const gchar *file, + gchar **full_path, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar * g_bookmark_file_to_data (GBookmarkFile *bookmark, + gsize *length, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_to_file (GBookmarkFile *bookmark, + const gchar *filename, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_set_title (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *title); +GLIB_AVAILABLE_IN_ALL +gchar * g_bookmark_file_get_title (GBookmarkFile *bookmark, + const gchar *uri, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_set_description (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *description); +GLIB_AVAILABLE_IN_ALL +gchar * g_bookmark_file_get_description (GBookmarkFile *bookmark, + const gchar *uri, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_set_mime_type (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *mime_type); +GLIB_AVAILABLE_IN_ALL +gchar * g_bookmark_file_get_mime_type (GBookmarkFile *bookmark, + const gchar *uri, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_set_groups (GBookmarkFile *bookmark, + const gchar *uri, + const gchar **groups, + gsize length); +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_add_group (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *group); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_has_group (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *group, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar ** g_bookmark_file_get_groups (GBookmarkFile *bookmark, + const gchar *uri, + gsize *length, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_add_application (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *name, + const gchar *exec); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_has_application (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *name, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar ** g_bookmark_file_get_applications (GBookmarkFile *bookmark, + const gchar *uri, + gsize *length, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_set_app_info (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *name, + const gchar *exec, + gint count, + time_t stamp, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_get_app_info (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *name, + gchar **exec, + guint *count, + time_t *stamp, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_set_is_private (GBookmarkFile *bookmark, + const gchar *uri, + gboolean is_private); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_get_is_private (GBookmarkFile *bookmark, + const gchar *uri, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_set_icon (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *href, + const gchar *mime_type); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_get_icon (GBookmarkFile *bookmark, + const gchar *uri, + gchar **href, + gchar **mime_type, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_set_added (GBookmarkFile *bookmark, + const gchar *uri, + time_t added); +GLIB_AVAILABLE_IN_ALL +time_t g_bookmark_file_get_added (GBookmarkFile *bookmark, + const gchar *uri, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_set_modified (GBookmarkFile *bookmark, + const gchar *uri, + time_t modified); +GLIB_AVAILABLE_IN_ALL +time_t g_bookmark_file_get_modified (GBookmarkFile *bookmark, + const gchar *uri, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_set_visited (GBookmarkFile *bookmark, + const gchar *uri, + time_t visited); +GLIB_AVAILABLE_IN_ALL +time_t g_bookmark_file_get_visited (GBookmarkFile *bookmark, + const gchar *uri, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_has_item (GBookmarkFile *bookmark, + const gchar *uri); +GLIB_AVAILABLE_IN_ALL +gint g_bookmark_file_get_size (GBookmarkFile *bookmark); +GLIB_AVAILABLE_IN_ALL +gchar ** g_bookmark_file_get_uris (GBookmarkFile *bookmark, + gsize *length) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_remove_group (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *group, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_remove_application (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *name, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_remove_item (GBookmarkFile *bookmark, + const gchar *uri, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_move_item (GBookmarkFile *bookmark, + const gchar *old_uri, + const gchar *new_uri, + GError **error); + +G_END_DECLS + +#endif /* __G_BOOKMARK_FILE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gbytes.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gbytes.h new file mode 100755 index 00000000..0bb1517b --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gbytes.h @@ -0,0 +1,90 @@ +/* + * Copyright © 2009, 2010 Codethink Limited + * Copyright © 2011 Collabora Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Ryan Lortie <desrt@desrt.ca> + * Stef Walter <stefw@collabora.co.uk> + */ + +#ifndef __G_BYTES_H__ +#define __G_BYTES_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> +#include <glib/garray.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +GBytes * g_bytes_new (gconstpointer data, + gsize size); + +GLIB_AVAILABLE_IN_ALL +GBytes * g_bytes_new_take (gpointer data, + gsize size); + +GLIB_AVAILABLE_IN_ALL +GBytes * g_bytes_new_static (gconstpointer data, + gsize size); + +GLIB_AVAILABLE_IN_ALL +GBytes * g_bytes_new_with_free_func (gconstpointer data, + gsize size, + GDestroyNotify free_func, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +GBytes * g_bytes_new_from_bytes (GBytes *bytes, + gsize offset, + gsize length); + +GLIB_AVAILABLE_IN_ALL +gconstpointer g_bytes_get_data (GBytes *bytes, + gsize *size); + +GLIB_AVAILABLE_IN_ALL +gsize g_bytes_get_size (GBytes *bytes); + +GLIB_AVAILABLE_IN_ALL +GBytes * g_bytes_ref (GBytes *bytes); + +GLIB_AVAILABLE_IN_ALL +void g_bytes_unref (GBytes *bytes); + +GLIB_AVAILABLE_IN_ALL +gpointer g_bytes_unref_to_data (GBytes *bytes, + gsize *size); + +GLIB_AVAILABLE_IN_ALL +GByteArray * g_bytes_unref_to_array (GBytes *bytes); + +GLIB_AVAILABLE_IN_ALL +guint g_bytes_hash (gconstpointer bytes); + +GLIB_AVAILABLE_IN_ALL +gboolean g_bytes_equal (gconstpointer bytes1, + gconstpointer bytes2); + +GLIB_AVAILABLE_IN_ALL +gint g_bytes_compare (gconstpointer bytes1, + gconstpointer bytes2); + +G_END_DECLS + +#endif /* __G_BYTES_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gcharset.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gcharset.h new file mode 100755 index 00000000..fccedc7c --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gcharset.h @@ -0,0 +1,42 @@ +/* gcharset.h - Charset functions + * + * Copyright (C) 2011 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_CHARSET_H__ +#define __G_CHARSET_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +gboolean g_get_charset (const char **charset); +GLIB_AVAILABLE_IN_ALL +gchar * g_get_codeset (void); + +GLIB_AVAILABLE_IN_ALL +const gchar * const * g_get_language_names (void); +GLIB_AVAILABLE_IN_ALL +gchar ** g_get_locale_variants (const gchar *locale); + +G_END_DECLS + +#endif /* __G_CHARSET_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gchecksum.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gchecksum.h new file mode 100755 index 00000000..599f439c --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gchecksum.h @@ -0,0 +1,103 @@ +/* gchecksum.h - data hashing functions + * + * Copyright (C) 2007 Emmanuele Bassi <ebassi@gnome.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_CHECKSUM_H__ +#define __G_CHECKSUM_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> +#include <glib/gbytes.h> + +G_BEGIN_DECLS + +/** + * GChecksumType: + * @G_CHECKSUM_MD5: Use the MD5 hashing algorithm + * @G_CHECKSUM_SHA1: Use the SHA-1 hashing algorithm + * @G_CHECKSUM_SHA256: Use the SHA-256 hashing algorithm + * @G_CHECKSUM_SHA384: Use the SHA-384 hashing algorithm (Since: 2.51) + * @G_CHECKSUM_SHA512: Use the SHA-512 hashing algorithm (Since: 2.36) + * + * The hashing algorithm to be used by #GChecksum when performing the + * digest of some data. + * + * Note that the #GChecksumType enumeration may be extended at a later + * date to include new hashing algorithm types. + * + * Since: 2.16 + */ +typedef enum { + G_CHECKSUM_MD5, + G_CHECKSUM_SHA1, + G_CHECKSUM_SHA256, + G_CHECKSUM_SHA512, + G_CHECKSUM_SHA384 +} GChecksumType; + +/** + * GChecksum: + * + * An opaque structure representing a checksumming operation. + * To create a new GChecksum, use g_checksum_new(). To free + * a GChecksum, use g_checksum_free(). + * + * Since: 2.16 + */ +typedef struct _GChecksum GChecksum; + +GLIB_AVAILABLE_IN_ALL +gssize g_checksum_type_get_length (GChecksumType checksum_type); + +GLIB_AVAILABLE_IN_ALL +GChecksum * g_checksum_new (GChecksumType checksum_type); +GLIB_AVAILABLE_IN_ALL +void g_checksum_reset (GChecksum *checksum); +GLIB_AVAILABLE_IN_ALL +GChecksum * g_checksum_copy (const GChecksum *checksum); +GLIB_AVAILABLE_IN_ALL +void g_checksum_free (GChecksum *checksum); +GLIB_AVAILABLE_IN_ALL +void g_checksum_update (GChecksum *checksum, + const guchar *data, + gssize length); +GLIB_AVAILABLE_IN_ALL +const gchar * g_checksum_get_string (GChecksum *checksum); +GLIB_AVAILABLE_IN_ALL +void g_checksum_get_digest (GChecksum *checksum, + guint8 *buffer, + gsize *digest_len); + +GLIB_AVAILABLE_IN_ALL +gchar *g_compute_checksum_for_data (GChecksumType checksum_type, + const guchar *data, + gsize length); +GLIB_AVAILABLE_IN_ALL +gchar *g_compute_checksum_for_string (GChecksumType checksum_type, + const gchar *str, + gssize length); + +GLIB_AVAILABLE_IN_2_34 +gchar *g_compute_checksum_for_bytes (GChecksumType checksum_type, + GBytes *data); + +G_END_DECLS + +#endif /* __G_CHECKSUM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gconvert.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gconvert.h new file mode 100755 index 00000000..d0d37215 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gconvert.h @@ -0,0 +1,177 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_CONVERT_H__ +#define __G_CONVERT_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gerror.h> + +G_BEGIN_DECLS + +/** + * GConvertError: + * @G_CONVERT_ERROR_NO_CONVERSION: Conversion between the requested character + * sets is not supported. + * @G_CONVERT_ERROR_ILLEGAL_SEQUENCE: Invalid byte sequence in conversion input; + * or the character sequence could not be represented in the target + * character set. + * @G_CONVERT_ERROR_FAILED: Conversion failed for some reason. + * @G_CONVERT_ERROR_PARTIAL_INPUT: Partial character sequence at end of input. + * @G_CONVERT_ERROR_BAD_URI: URI is invalid. + * @G_CONVERT_ERROR_NOT_ABSOLUTE_PATH: Pathname is not an absolute path. + * @G_CONVERT_ERROR_NO_MEMORY: No memory available. Since: 2.40 + * @G_CONVERT_ERROR_EMBEDDED_NUL: An embedded NUL character is present in + * conversion output where a NUL-terminated string is expected. + * Since: 2.56 + * + * Error codes returned by character set conversion routines. + */ +typedef enum +{ + G_CONVERT_ERROR_NO_CONVERSION, + G_CONVERT_ERROR_ILLEGAL_SEQUENCE, + G_CONVERT_ERROR_FAILED, + G_CONVERT_ERROR_PARTIAL_INPUT, + G_CONVERT_ERROR_BAD_URI, + G_CONVERT_ERROR_NOT_ABSOLUTE_PATH, + G_CONVERT_ERROR_NO_MEMORY, + G_CONVERT_ERROR_EMBEDDED_NUL +} GConvertError; + +/** + * G_CONVERT_ERROR: + * + * Error domain for character set conversions. Errors in this domain will + * be from the #GConvertError enumeration. See #GError for information on + * error domains. + */ +#define G_CONVERT_ERROR g_convert_error_quark() +GLIB_AVAILABLE_IN_ALL +GQuark g_convert_error_quark (void); + +/** + * GIConv: (skip) + * + * The GIConv struct wraps an iconv() conversion descriptor. It contains + * private data and should only be accessed using the following functions. + */ +typedef struct _GIConv *GIConv; + +GLIB_AVAILABLE_IN_ALL +GIConv g_iconv_open (const gchar *to_codeset, + const gchar *from_codeset); +GLIB_AVAILABLE_IN_ALL +gsize g_iconv (GIConv converter, + gchar **inbuf, + gsize *inbytes_left, + gchar **outbuf, + gsize *outbytes_left); +GLIB_AVAILABLE_IN_ALL +gint g_iconv_close (GIConv converter); + + +GLIB_AVAILABLE_IN_ALL +gchar* g_convert (const gchar *str, + gssize len, + const gchar *to_codeset, + const gchar *from_codeset, + gsize *bytes_read, + gsize *bytes_written, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_convert_with_iconv (const gchar *str, + gssize len, + GIConv converter, + gsize *bytes_read, + gsize *bytes_written, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_convert_with_fallback (const gchar *str, + gssize len, + const gchar *to_codeset, + const gchar *from_codeset, + const gchar *fallback, + gsize *bytes_read, + gsize *bytes_written, + GError **error) G_GNUC_MALLOC; + + +/* Convert between libc's idea of strings and UTF-8. + */ +GLIB_AVAILABLE_IN_ALL +gchar* g_locale_to_utf8 (const gchar *opsysstring, + gssize len, + gsize *bytes_read, + gsize *bytes_written, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_locale_from_utf8 (const gchar *utf8string, + gssize len, + gsize *bytes_read, + gsize *bytes_written, + GError **error) G_GNUC_MALLOC; + +/* Convert between the operating system (or C runtime) + * representation of file names and UTF-8. + */ +GLIB_AVAILABLE_IN_ALL +gchar* g_filename_to_utf8 (const gchar *opsysstring, + gssize len, + gsize *bytes_read, + gsize *bytes_written, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_filename_from_utf8 (const gchar *utf8string, + gssize len, + gsize *bytes_read, + gsize *bytes_written, + GError **error) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gchar *g_filename_from_uri (const gchar *uri, + gchar **hostname, + GError **error) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gchar *g_filename_to_uri (const gchar *filename, + const gchar *hostname, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar *g_filename_display_name (const gchar *filename) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gboolean g_get_filename_charsets (const gchar ***charsets); + +GLIB_AVAILABLE_IN_ALL +gchar *g_filename_display_basename (const gchar *filename) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gchar **g_uri_list_extract_uris (const gchar *uri_list) G_GNUC_MALLOC; + +G_END_DECLS + +#endif /* __G_CONVERT_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gdataset.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gdataset.h new file mode 100755 index 00000000..89a34c71 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gdataset.h @@ -0,0 +1,150 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_DATASET_H__ +#define __G_DATASET_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gquark.h> + +G_BEGIN_DECLS + +typedef struct _GData GData; + +typedef void (*GDataForeachFunc) (GQuark key_id, + gpointer data, + gpointer user_data); + +/* Keyed Data List + */ +GLIB_AVAILABLE_IN_ALL +void g_datalist_init (GData **datalist); +GLIB_AVAILABLE_IN_ALL +void g_datalist_clear (GData **datalist); +GLIB_AVAILABLE_IN_ALL +gpointer g_datalist_id_get_data (GData **datalist, + GQuark key_id); +GLIB_AVAILABLE_IN_ALL +void g_datalist_id_set_data_full (GData **datalist, + GQuark key_id, + gpointer data, + GDestroyNotify destroy_func); + +typedef gpointer (*GDuplicateFunc) (gpointer data, gpointer user_data); + +GLIB_AVAILABLE_IN_2_34 +gpointer g_datalist_id_dup_data (GData **datalist, + GQuark key_id, + GDuplicateFunc dup_func, + gpointer user_data); +GLIB_AVAILABLE_IN_2_34 +gboolean g_datalist_id_replace_data (GData **datalist, + GQuark key_id, + gpointer oldval, + gpointer newval, + GDestroyNotify destroy, + GDestroyNotify *old_destroy); + +GLIB_AVAILABLE_IN_ALL +gpointer g_datalist_id_remove_no_notify (GData **datalist, + GQuark key_id); +GLIB_AVAILABLE_IN_ALL +void g_datalist_foreach (GData **datalist, + GDataForeachFunc func, + gpointer user_data); + +/** + * G_DATALIST_FLAGS_MASK: + * + * A bitmask that restricts the possible flags passed to + * g_datalist_set_flags(). Passing a flags value where + * flags & ~G_DATALIST_FLAGS_MASK != 0 is an error. + */ +#define G_DATALIST_FLAGS_MASK 0x3 + +GLIB_AVAILABLE_IN_ALL +void g_datalist_set_flags (GData **datalist, + guint flags); +GLIB_AVAILABLE_IN_ALL +void g_datalist_unset_flags (GData **datalist, + guint flags); +GLIB_AVAILABLE_IN_ALL +guint g_datalist_get_flags (GData **datalist); + +#define g_datalist_id_set_data(dl, q, d) \ + g_datalist_id_set_data_full ((dl), (q), (d), NULL) +#define g_datalist_id_remove_data(dl, q) \ + g_datalist_id_set_data ((dl), (q), NULL) +#define g_datalist_set_data_full(dl, k, d, f) \ + g_datalist_id_set_data_full ((dl), g_quark_from_string (k), (d), (f)) +#define g_datalist_remove_no_notify(dl, k) \ + g_datalist_id_remove_no_notify ((dl), g_quark_try_string (k)) +#define g_datalist_set_data(dl, k, d) \ + g_datalist_set_data_full ((dl), (k), (d), NULL) +#define g_datalist_remove_data(dl, k) \ + g_datalist_id_set_data ((dl), g_quark_try_string (k), NULL) + +/* Location Associated Keyed Data + */ +GLIB_AVAILABLE_IN_ALL +void g_dataset_destroy (gconstpointer dataset_location); +GLIB_AVAILABLE_IN_ALL +gpointer g_dataset_id_get_data (gconstpointer dataset_location, + GQuark key_id); +GLIB_AVAILABLE_IN_ALL +gpointer g_datalist_get_data (GData **datalist, + const gchar *key); +GLIB_AVAILABLE_IN_ALL +void g_dataset_id_set_data_full (gconstpointer dataset_location, + GQuark key_id, + gpointer data, + GDestroyNotify destroy_func); +GLIB_AVAILABLE_IN_ALL +gpointer g_dataset_id_remove_no_notify (gconstpointer dataset_location, + GQuark key_id); +GLIB_AVAILABLE_IN_ALL +void g_dataset_foreach (gconstpointer dataset_location, + GDataForeachFunc func, + gpointer user_data); +#define g_dataset_id_set_data(l, k, d) \ + g_dataset_id_set_data_full ((l), (k), (d), NULL) +#define g_dataset_id_remove_data(l, k) \ + g_dataset_id_set_data ((l), (k), NULL) +#define g_dataset_get_data(l, k) \ + (g_dataset_id_get_data ((l), g_quark_try_string (k))) +#define g_dataset_set_data_full(l, k, d, f) \ + g_dataset_id_set_data_full ((l), g_quark_from_string (k), (d), (f)) +#define g_dataset_remove_no_notify(l, k) \ + g_dataset_id_remove_no_notify ((l), g_quark_try_string (k)) +#define g_dataset_set_data(l, k, d) \ + g_dataset_set_data_full ((l), (k), (d), NULL) +#define g_dataset_remove_data(l, k) \ + g_dataset_id_set_data ((l), g_quark_try_string (k), NULL) + +G_END_DECLS + +#endif /* __G_DATASET_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gdate.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gdate.h new file mode 100755 index 00000000..63feb353 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gdate.h @@ -0,0 +1,311 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_DATE_H__ +#define __G_DATE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <time.h> + +#include <glib/gtypes.h> +#include <glib/gquark.h> + +G_BEGIN_DECLS + +/* GDate + * + * Date calculations (not time for now, to be resolved). These are a + * mutant combination of Steffen Beyer's DateCalc routines + * (http://www.perl.com/CPAN/authors/id/STBEY/) and Jon Trowbridge's + * date routines (written for in-house software). Written by Havoc + * Pennington <hp@pobox.com> + */ + +typedef gint32 GTime; +typedef guint16 GDateYear; +typedef guint8 GDateDay; /* day of the month */ +typedef struct _GDate GDate; + +/* enum used to specify order of appearance in parsed date strings */ +typedef enum +{ + G_DATE_DAY = 0, + G_DATE_MONTH = 1, + G_DATE_YEAR = 2 +} GDateDMY; + +/* actual week and month values */ +typedef enum +{ + G_DATE_BAD_WEEKDAY = 0, + G_DATE_MONDAY = 1, + G_DATE_TUESDAY = 2, + G_DATE_WEDNESDAY = 3, + G_DATE_THURSDAY = 4, + G_DATE_FRIDAY = 5, + G_DATE_SATURDAY = 6, + G_DATE_SUNDAY = 7 +} GDateWeekday; +typedef enum +{ + G_DATE_BAD_MONTH = 0, + G_DATE_JANUARY = 1, + G_DATE_FEBRUARY = 2, + G_DATE_MARCH = 3, + G_DATE_APRIL = 4, + G_DATE_MAY = 5, + G_DATE_JUNE = 6, + G_DATE_JULY = 7, + G_DATE_AUGUST = 8, + G_DATE_SEPTEMBER = 9, + G_DATE_OCTOBER = 10, + G_DATE_NOVEMBER = 11, + G_DATE_DECEMBER = 12 +} GDateMonth; + +#define G_DATE_BAD_JULIAN 0U +#define G_DATE_BAD_DAY 0U +#define G_DATE_BAD_YEAR 0U + +/* Note: directly manipulating structs is generally a bad idea, but + * in this case it's an *incredibly* bad idea, because all or part + * of this struct can be invalid at any given time. Use the functions, + * or you will get hosed, I promise. + */ +struct _GDate +{ + guint julian_days : 32; /* julian days representation - we use a + * bitfield hoping that 64 bit platforms + * will pack this whole struct in one big + * int + */ + + guint julian : 1; /* julian is valid */ + guint dmy : 1; /* dmy is valid */ + + /* DMY representation */ + guint day : 6; + guint month : 4; + guint year : 16; +}; + +/* g_date_new() returns an invalid date, you then have to _set() stuff + * to get a usable object. You can also allocate a GDate statically, + * then call g_date_clear() to initialize. + */ +GLIB_AVAILABLE_IN_ALL +GDate* g_date_new (void); +GLIB_AVAILABLE_IN_ALL +GDate* g_date_new_dmy (GDateDay day, + GDateMonth month, + GDateYear year); +GLIB_AVAILABLE_IN_ALL +GDate* g_date_new_julian (guint32 julian_day); +GLIB_AVAILABLE_IN_ALL +void g_date_free (GDate *date); +GLIB_AVAILABLE_IN_2_56 +GDate* g_date_copy (const GDate *date); + +/* check g_date_valid() after doing an operation that might fail, like + * _parse. Almost all g_date operations are undefined on invalid + * dates (the exceptions are the mutators, since you need those to + * return to validity). + */ +GLIB_AVAILABLE_IN_ALL +gboolean g_date_valid (const GDate *date); +GLIB_AVAILABLE_IN_ALL +gboolean g_date_valid_day (GDateDay day) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_date_valid_month (GDateMonth month) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_date_valid_year (GDateYear year) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_date_valid_weekday (GDateWeekday weekday) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_date_valid_julian (guint32 julian_date) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_date_valid_dmy (GDateDay day, + GDateMonth month, + GDateYear year) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GDateWeekday g_date_get_weekday (const GDate *date); +GLIB_AVAILABLE_IN_ALL +GDateMonth g_date_get_month (const GDate *date); +GLIB_AVAILABLE_IN_ALL +GDateYear g_date_get_year (const GDate *date); +GLIB_AVAILABLE_IN_ALL +GDateDay g_date_get_day (const GDate *date); +GLIB_AVAILABLE_IN_ALL +guint32 g_date_get_julian (const GDate *date); +GLIB_AVAILABLE_IN_ALL +guint g_date_get_day_of_year (const GDate *date); +/* First monday/sunday is the start of week 1; if we haven't reached + * that day, return 0. These are not ISO weeks of the year; that + * routine needs to be added. + * these functions return the number of weeks, starting on the + * corrsponding day + */ +GLIB_AVAILABLE_IN_ALL +guint g_date_get_monday_week_of_year (const GDate *date); +GLIB_AVAILABLE_IN_ALL +guint g_date_get_sunday_week_of_year (const GDate *date); +GLIB_AVAILABLE_IN_ALL +guint g_date_get_iso8601_week_of_year (const GDate *date); + +/* If you create a static date struct you need to clear it to get it + * in a sane state before use. You can clear a whole array at + * once with the ndates argument. + */ +GLIB_AVAILABLE_IN_ALL +void g_date_clear (GDate *date, + guint n_dates); + +/* The parse routine is meant for dates typed in by a user, so it + * permits many formats but tries to catch common typos. If your data + * needs to be strictly validated, it is not an appropriate function. + */ +GLIB_AVAILABLE_IN_ALL +void g_date_set_parse (GDate *date, + const gchar *str); +GLIB_AVAILABLE_IN_ALL +void g_date_set_time_t (GDate *date, + time_t timet); +GLIB_AVAILABLE_IN_ALL +void g_date_set_time_val (GDate *date, + GTimeVal *timeval); +#ifndef G_DISABLE_DEPRECATED +GLIB_DEPRECATED_FOR(g_date_set_time_t) +void g_date_set_time (GDate *date, + GTime time_); +#endif +GLIB_AVAILABLE_IN_ALL +void g_date_set_month (GDate *date, + GDateMonth month); +GLIB_AVAILABLE_IN_ALL +void g_date_set_day (GDate *date, + GDateDay day); +GLIB_AVAILABLE_IN_ALL +void g_date_set_year (GDate *date, + GDateYear year); +GLIB_AVAILABLE_IN_ALL +void g_date_set_dmy (GDate *date, + GDateDay day, + GDateMonth month, + GDateYear y); +GLIB_AVAILABLE_IN_ALL +void g_date_set_julian (GDate *date, + guint32 julian_date); +GLIB_AVAILABLE_IN_ALL +gboolean g_date_is_first_of_month (const GDate *date); +GLIB_AVAILABLE_IN_ALL +gboolean g_date_is_last_of_month (const GDate *date); + +/* To go forward by some number of weeks just go forward weeks*7 days */ +GLIB_AVAILABLE_IN_ALL +void g_date_add_days (GDate *date, + guint n_days); +GLIB_AVAILABLE_IN_ALL +void g_date_subtract_days (GDate *date, + guint n_days); + +/* If you add/sub months while day > 28, the day might change */ +GLIB_AVAILABLE_IN_ALL +void g_date_add_months (GDate *date, + guint n_months); +GLIB_AVAILABLE_IN_ALL +void g_date_subtract_months (GDate *date, + guint n_months); + +/* If it's feb 29, changing years can move you to the 28th */ +GLIB_AVAILABLE_IN_ALL +void g_date_add_years (GDate *date, + guint n_years); +GLIB_AVAILABLE_IN_ALL +void g_date_subtract_years (GDate *date, + guint n_years); +GLIB_AVAILABLE_IN_ALL +gboolean g_date_is_leap_year (GDateYear year) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +guint8 g_date_get_days_in_month (GDateMonth month, + GDateYear year) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +guint8 g_date_get_monday_weeks_in_year (GDateYear year) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +guint8 g_date_get_sunday_weeks_in_year (GDateYear year) G_GNUC_CONST; + +/* Returns the number of days between the two dates. If date2 comes + before date1, a negative value is return. */ +GLIB_AVAILABLE_IN_ALL +gint g_date_days_between (const GDate *date1, + const GDate *date2); + +/* qsort-friendly (with a cast...) */ +GLIB_AVAILABLE_IN_ALL +gint g_date_compare (const GDate *lhs, + const GDate *rhs); +GLIB_AVAILABLE_IN_ALL +void g_date_to_struct_tm (const GDate *date, + struct tm *tm); + +GLIB_AVAILABLE_IN_ALL +void g_date_clamp (GDate *date, + const GDate *min_date, + const GDate *max_date); + +/* Swap date1 and date2's values if date1 > date2. */ +GLIB_AVAILABLE_IN_ALL +void g_date_order (GDate *date1, GDate *date2); + +/* Just like strftime() except you can only use date-related formats. + * Using a time format is undefined. + */ +GLIB_AVAILABLE_IN_ALL +gsize g_date_strftime (gchar *s, + gsize slen, + const gchar *format, + const GDate *date); + +#ifndef G_DISABLE_DEPRECATED + +#define g_date_weekday g_date_get_weekday +#define g_date_month g_date_get_month +#define g_date_year g_date_get_year +#define g_date_day g_date_get_day +#define g_date_julian g_date_get_julian +#define g_date_day_of_year g_date_get_day_of_year +#define g_date_monday_week_of_year g_date_get_monday_week_of_year +#define g_date_sunday_week_of_year g_date_get_sunday_week_of_year +#define g_date_days_in_month g_date_get_days_in_month +#define g_date_monday_weeks_in_year g_date_get_monday_weeks_in_year +#define g_date_sunday_weeks_in_year g_date_get_sunday_weeks_in_year + +#endif /* G_DISABLE_DEPRECATED */ + +G_END_DECLS + +#endif /* __G_DATE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gdatetime.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gdatetime.h new file mode 100755 index 00000000..025e452a --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gdatetime.h @@ -0,0 +1,266 @@ +/* + * Copyright (C) 2009-2010 Christian Hergert <chris@dronelabs.com> + * Copyright © 2010 Codethink Limited + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * licence, or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Authors: Christian Hergert <chris@dronelabs.com> + * Thiago Santos <thiago.sousa.santos@collabora.co.uk> + * Emmanuele Bassi <ebassi@linux.intel.com> + * Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_DATE_TIME_H__ +#define __G_DATE_TIME_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtimezone.h> + +G_BEGIN_DECLS + +/** + * G_TIME_SPAN_DAY: + * + * Evaluates to a time span of one day. + * + * Since: 2.26 + */ +#define G_TIME_SPAN_DAY (G_GINT64_CONSTANT (86400000000)) + +/** + * G_TIME_SPAN_HOUR: + * + * Evaluates to a time span of one hour. + * + * Since: 2.26 + */ +#define G_TIME_SPAN_HOUR (G_GINT64_CONSTANT (3600000000)) + +/** + * G_TIME_SPAN_MINUTE: + * + * Evaluates to a time span of one minute. + * + * Since: 2.26 + */ +#define G_TIME_SPAN_MINUTE (G_GINT64_CONSTANT (60000000)) + +/** + * G_TIME_SPAN_SECOND: + * + * Evaluates to a time span of one second. + * + * Since: 2.26 + */ +#define G_TIME_SPAN_SECOND (G_GINT64_CONSTANT (1000000)) + +/** + * G_TIME_SPAN_MILLISECOND: + * + * Evaluates to a time span of one millisecond. + * + * Since: 2.26 + */ +#define G_TIME_SPAN_MILLISECOND (G_GINT64_CONSTANT (1000)) + +/** + * GTimeSpan: + * + * A value representing an interval of time, in microseconds. + * + * Since: 2.26 + */ +typedef gint64 GTimeSpan; + +/** + * GDateTime: + * + * `GDateTime` is an opaque structure whose members + * cannot be accessed directly. + * + * Since: 2.26 + */ +typedef struct _GDateTime GDateTime; + +GLIB_AVAILABLE_IN_ALL +void g_date_time_unref (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_ref (GDateTime *datetime); + +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_new_now (GTimeZone *tz); +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_new_now_local (void); +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_new_now_utc (void); + +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_new_from_unix_local (gint64 t); +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_new_from_unix_utc (gint64 t); + +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_new_from_timeval_local (const GTimeVal *tv); +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_new_from_timeval_utc (const GTimeVal *tv); + +GLIB_AVAILABLE_IN_2_56 +GDateTime * g_date_time_new_from_iso8601 (const gchar *text, + GTimeZone *default_tz); + +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_new (GTimeZone *tz, + gint year, + gint month, + gint day, + gint hour, + gint minute, + gdouble seconds); +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_new_local (gint year, + gint month, + gint day, + gint hour, + gint minute, + gdouble seconds); +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_new_utc (gint year, + gint month, + gint day, + gint hour, + gint minute, + gdouble seconds); + +GLIB_AVAILABLE_IN_ALL +G_GNUC_WARN_UNUSED_RESULT +GDateTime * g_date_time_add (GDateTime *datetime, + GTimeSpan timespan); + +GLIB_AVAILABLE_IN_ALL +G_GNUC_WARN_UNUSED_RESULT +GDateTime * g_date_time_add_years (GDateTime *datetime, + gint years); +GLIB_AVAILABLE_IN_ALL +G_GNUC_WARN_UNUSED_RESULT +GDateTime * g_date_time_add_months (GDateTime *datetime, + gint months); +GLIB_AVAILABLE_IN_ALL +G_GNUC_WARN_UNUSED_RESULT +GDateTime * g_date_time_add_weeks (GDateTime *datetime, + gint weeks); +GLIB_AVAILABLE_IN_ALL +G_GNUC_WARN_UNUSED_RESULT +GDateTime * g_date_time_add_days (GDateTime *datetime, + gint days); + +GLIB_AVAILABLE_IN_ALL +G_GNUC_WARN_UNUSED_RESULT +GDateTime * g_date_time_add_hours (GDateTime *datetime, + gint hours); +GLIB_AVAILABLE_IN_ALL +G_GNUC_WARN_UNUSED_RESULT +GDateTime * g_date_time_add_minutes (GDateTime *datetime, + gint minutes); +GLIB_AVAILABLE_IN_ALL +G_GNUC_WARN_UNUSED_RESULT +GDateTime * g_date_time_add_seconds (GDateTime *datetime, + gdouble seconds); + +GLIB_AVAILABLE_IN_ALL +G_GNUC_WARN_UNUSED_RESULT +GDateTime * g_date_time_add_full (GDateTime *datetime, + gint years, + gint months, + gint days, + gint hours, + gint minutes, + gdouble seconds); + +GLIB_AVAILABLE_IN_ALL +gint g_date_time_compare (gconstpointer dt1, + gconstpointer dt2); +GLIB_AVAILABLE_IN_ALL +GTimeSpan g_date_time_difference (GDateTime *end, + GDateTime *begin); +GLIB_AVAILABLE_IN_ALL +guint g_date_time_hash (gconstpointer datetime); +GLIB_AVAILABLE_IN_ALL +gboolean g_date_time_equal (gconstpointer dt1, + gconstpointer dt2); + +GLIB_AVAILABLE_IN_ALL +void g_date_time_get_ymd (GDateTime *datetime, + gint *year, + gint *month, + gint *day); + +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_year (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_month (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_day_of_month (GDateTime *datetime); + +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_week_numbering_year (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_week_of_year (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_day_of_week (GDateTime *datetime); + +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_day_of_year (GDateTime *datetime); + +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_hour (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_minute (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_second (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_microsecond (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gdouble g_date_time_get_seconds (GDateTime *datetime); + +GLIB_AVAILABLE_IN_ALL +gint64 g_date_time_to_unix (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gboolean g_date_time_to_timeval (GDateTime *datetime, + GTimeVal *tv); + +GLIB_AVAILABLE_IN_ALL +GTimeSpan g_date_time_get_utc_offset (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +const gchar * g_date_time_get_timezone_abbreviation (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gboolean g_date_time_is_daylight_savings (GDateTime *datetime); + +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_to_timezone (GDateTime *datetime, + GTimeZone *tz); +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_to_local (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_to_utc (GDateTime *datetime); + +GLIB_AVAILABLE_IN_ALL +gchar * g_date_time_format (GDateTime *datetime, + const gchar *format) G_GNUC_MALLOC; + +G_END_DECLS + +#endif /* __G_DATE_TIME_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gdir.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gdir.h new file mode 100755 index 00000000..8f9d6bd7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gdir.h @@ -0,0 +1,52 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * gdir.c: Simplified wrapper around the DIRENT functions. + * + * Copyright 2001 Hans Breuer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_DIR_H__ +#define __G_DIR_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gerror.h> + +#ifdef G_OS_UNIX +#include <dirent.h> +#endif + +G_BEGIN_DECLS + +typedef struct _GDir GDir; + +GLIB_AVAILABLE_IN_ALL +GDir * g_dir_open (const gchar *path, + guint flags, + GError **error); +GLIB_AVAILABLE_IN_ALL +const gchar * g_dir_read_name (GDir *dir); +GLIB_AVAILABLE_IN_ALL +void g_dir_rewind (GDir *dir); +GLIB_AVAILABLE_IN_ALL +void g_dir_close (GDir *dir); + +G_END_DECLS + +#endif /* __G_DIR_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/genviron.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/genviron.h new file mode 100755 index 00000000..c4bf01a5 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/genviron.h @@ -0,0 +1,63 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_ENVIRON_H__ +#define __G_ENVIRON_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +const gchar * g_getenv (const gchar *variable); +GLIB_AVAILABLE_IN_ALL +gboolean g_setenv (const gchar *variable, + const gchar *value, + gboolean overwrite); +GLIB_AVAILABLE_IN_ALL +void g_unsetenv (const gchar *variable); +GLIB_AVAILABLE_IN_ALL +gchar ** g_listenv (void); + +GLIB_AVAILABLE_IN_ALL +gchar ** g_get_environ (void); +GLIB_AVAILABLE_IN_ALL +const gchar * g_environ_getenv (gchar **envp, + const gchar *variable); +GLIB_AVAILABLE_IN_ALL +gchar ** g_environ_setenv (gchar **envp, + const gchar *variable, + const gchar *value, + gboolean overwrite) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +gchar ** g_environ_unsetenv (gchar **envp, + const gchar *variable) G_GNUC_WARN_UNUSED_RESULT; + +G_END_DECLS + +#endif /* __G_ENVIRON_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gerror.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gerror.h new file mode 100755 index 00000000..8ecff04e --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gerror.h @@ -0,0 +1,117 @@ +/* gerror.h - Error reporting system + * + * Copyright 2000 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_ERROR_H__ +#define __G_ERROR_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <stdarg.h> + +#include <glib/gquark.h> + +G_BEGIN_DECLS + +/** + * GError: + * @domain: error domain, e.g. #G_FILE_ERROR + * @code: error code, e.g. %G_FILE_ERROR_NOENT + * @message: human-readable informative error message + * + * The `GError` structure contains information about + * an error that has occurred. + */ +typedef struct _GError GError; + +struct _GError +{ + GQuark domain; + gint code; + gchar *message; +}; + +GLIB_AVAILABLE_IN_ALL +GError* g_error_new (GQuark domain, + gint code, + const gchar *format, + ...) G_GNUC_PRINTF (3, 4); + +GLIB_AVAILABLE_IN_ALL +GError* g_error_new_literal (GQuark domain, + gint code, + const gchar *message); +GLIB_AVAILABLE_IN_ALL +GError* g_error_new_valist (GQuark domain, + gint code, + const gchar *format, + va_list args) G_GNUC_PRINTF(3, 0); + +GLIB_AVAILABLE_IN_ALL +void g_error_free (GError *error); +GLIB_AVAILABLE_IN_ALL +GError* g_error_copy (const GError *error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_error_matches (const GError *error, + GQuark domain, + gint code); + +/* if (err) *err = g_error_new(domain, code, format, ...), also has + * some sanity checks. + */ +GLIB_AVAILABLE_IN_ALL +void g_set_error (GError **err, + GQuark domain, + gint code, + const gchar *format, + ...) G_GNUC_PRINTF (4, 5); + +GLIB_AVAILABLE_IN_ALL +void g_set_error_literal (GError **err, + GQuark domain, + gint code, + const gchar *message); + +/* if (dest) *dest = src; also has some sanity checks. + */ +GLIB_AVAILABLE_IN_ALL +void g_propagate_error (GError **dest, + GError *src); + +/* if (err && *err) { g_error_free(*err); *err = NULL; } */ +GLIB_AVAILABLE_IN_ALL +void g_clear_error (GError **err); + +/* if (err) prefix the formatted string to the ->message */ +GLIB_AVAILABLE_IN_ALL +void g_prefix_error (GError **err, + const gchar *format, + ...) G_GNUC_PRINTF (2, 3); + +/* g_propagate_error then g_error_prefix on dest */ +GLIB_AVAILABLE_IN_ALL +void g_propagate_prefixed_error (GError **dest, + GError *src, + const gchar *format, + ...) G_GNUC_PRINTF (3, 4); + +G_END_DECLS + +#endif /* __G_ERROR_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gfileutils.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gfileutils.h new file mode 100755 index 00000000..b24651e3 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gfileutils.h @@ -0,0 +1,177 @@ +/* gfileutils.h - File utility functions + * + * Copyright 2000 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_FILEUTILS_H__ +#define __G_FILEUTILS_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glibconfig.h> +#include <glib/gerror.h> + +G_BEGIN_DECLS + +#define G_FILE_ERROR g_file_error_quark () + +typedef enum +{ + G_FILE_ERROR_EXIST, + G_FILE_ERROR_ISDIR, + G_FILE_ERROR_ACCES, + G_FILE_ERROR_NAMETOOLONG, + G_FILE_ERROR_NOENT, + G_FILE_ERROR_NOTDIR, + G_FILE_ERROR_NXIO, + G_FILE_ERROR_NODEV, + G_FILE_ERROR_ROFS, + G_FILE_ERROR_TXTBSY, + G_FILE_ERROR_FAULT, + G_FILE_ERROR_LOOP, + G_FILE_ERROR_NOSPC, + G_FILE_ERROR_NOMEM, + G_FILE_ERROR_MFILE, + G_FILE_ERROR_NFILE, + G_FILE_ERROR_BADF, + G_FILE_ERROR_INVAL, + G_FILE_ERROR_PIPE, + G_FILE_ERROR_AGAIN, + G_FILE_ERROR_INTR, + G_FILE_ERROR_IO, + G_FILE_ERROR_PERM, + G_FILE_ERROR_NOSYS, + G_FILE_ERROR_FAILED +} GFileError; + +/* For backward-compat reasons, these are synced to an old + * anonymous enum in libgnome. But don't use that enum + * in new code. + */ +typedef enum +{ + G_FILE_TEST_IS_REGULAR = 1 << 0, + G_FILE_TEST_IS_SYMLINK = 1 << 1, + G_FILE_TEST_IS_DIR = 1 << 2, + G_FILE_TEST_IS_EXECUTABLE = 1 << 3, + G_FILE_TEST_EXISTS = 1 << 4 +} GFileTest; + +GLIB_AVAILABLE_IN_ALL +GQuark g_file_error_quark (void); +/* So other code can generate a GFileError */ +GLIB_AVAILABLE_IN_ALL +GFileError g_file_error_from_errno (gint err_no); + +GLIB_AVAILABLE_IN_ALL +gboolean g_file_test (const gchar *filename, + GFileTest test); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_get_contents (const gchar *filename, + gchar **contents, + gsize *length, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_set_contents (const gchar *filename, + const gchar *contents, + gssize length, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar *g_file_read_link (const gchar *filename, + GError **error); + +/* Wrapper / workalike for mkdtemp() */ +GLIB_AVAILABLE_IN_2_30 +gchar *g_mkdtemp (gchar *tmpl); +GLIB_AVAILABLE_IN_2_30 +gchar *g_mkdtemp_full (gchar *tmpl, + gint mode); + +/* Wrapper / workalike for mkstemp() */ +GLIB_AVAILABLE_IN_ALL +gint g_mkstemp (gchar *tmpl); +GLIB_AVAILABLE_IN_ALL +gint g_mkstemp_full (gchar *tmpl, + gint flags, + gint mode); + +/* Wrappers for g_mkstemp and g_mkdtemp() */ +GLIB_AVAILABLE_IN_ALL +gint g_file_open_tmp (const gchar *tmpl, + gchar **name_used, + GError **error); +GLIB_AVAILABLE_IN_2_30 +gchar *g_dir_make_tmp (const gchar *tmpl, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gchar *g_build_path (const gchar *separator, + const gchar *first_element, + ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED; +GLIB_AVAILABLE_IN_ALL +gchar *g_build_pathv (const gchar *separator, + gchar **args) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gchar *g_build_filename (const gchar *first_element, + ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED; +GLIB_AVAILABLE_IN_ALL +gchar *g_build_filenamev (gchar **args) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_2_56 +gchar *g_build_filename_valist (const gchar *first_element, + va_list *args) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gint g_mkdir_with_parents (const gchar *pathname, + gint mode); + +#ifdef G_OS_WIN32 + +/* On Win32, the canonical directory separator is the backslash, and + * the search path separator is the semicolon. Note that also the + * (forward) slash works as directory separator. + */ +#define G_IS_DIR_SEPARATOR(c) ((c) == G_DIR_SEPARATOR || (c) == '/') + +#else /* !G_OS_WIN32 */ + +#define G_IS_DIR_SEPARATOR(c) ((c) == G_DIR_SEPARATOR) + +#endif /* !G_OS_WIN32 */ + +GLIB_AVAILABLE_IN_ALL +gboolean g_path_is_absolute (const gchar *file_name); +GLIB_AVAILABLE_IN_ALL +const gchar *g_path_skip_root (const gchar *file_name); + +GLIB_DEPRECATED_FOR(g_path_get_basename) +const gchar *g_basename (const gchar *file_name); +#ifndef G_DISABLE_DEPRECATED +#define g_dirname g_path_get_dirname +#endif + +GLIB_AVAILABLE_IN_ALL +gchar *g_get_current_dir (void); +GLIB_AVAILABLE_IN_ALL +gchar *g_path_get_basename (const gchar *file_name) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar *g_path_get_dirname (const gchar *file_name) G_GNUC_MALLOC; + +G_END_DECLS + +#endif /* __G_FILEUTILS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/ggettext.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/ggettext.h new file mode 100755 index 00000000..036f9d53 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/ggettext.h @@ -0,0 +1,63 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_GETTEXT_H__ +#define __G_GETTEXT_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +const gchar *g_strip_context (const gchar *msgid, + const gchar *msgval) G_GNUC_FORMAT(1); + +GLIB_AVAILABLE_IN_ALL +const gchar *g_dgettext (const gchar *domain, + const gchar *msgid) G_GNUC_FORMAT(2); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dcgettext (const gchar *domain, + const gchar *msgid, + gint category) G_GNUC_FORMAT(2); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dngettext (const gchar *domain, + const gchar *msgid, + const gchar *msgid_plural, + gulong n) G_GNUC_FORMAT(3); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dpgettext (const gchar *domain, + const gchar *msgctxtid, + gsize msgidoffset) G_GNUC_FORMAT(2); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dpgettext2 (const gchar *domain, + const gchar *context, + const gchar *msgid) G_GNUC_FORMAT(3); + +G_END_DECLS + +#endif /* __G_GETTEXT_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/ghash.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/ghash.h new file mode 100755 index 00000000..5c8cb919 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/ghash.h @@ -0,0 +1,185 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_HASH_H__ +#define __G_HASH_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> +#include <glib/glist.h> + +G_BEGIN_DECLS + +typedef struct _GHashTable GHashTable; + +typedef gboolean (*GHRFunc) (gpointer key, + gpointer value, + gpointer user_data); + +typedef struct _GHashTableIter GHashTableIter; + +struct _GHashTableIter +{ + /*< private >*/ + gpointer dummy1; + gpointer dummy2; + gpointer dummy3; + int dummy4; + gboolean dummy5; + gpointer dummy6; +}; + +GLIB_AVAILABLE_IN_ALL +GHashTable* g_hash_table_new (GHashFunc hash_func, + GEqualFunc key_equal_func); +GLIB_AVAILABLE_IN_ALL +GHashTable* g_hash_table_new_full (GHashFunc hash_func, + GEqualFunc key_equal_func, + GDestroyNotify key_destroy_func, + GDestroyNotify value_destroy_func); +GLIB_AVAILABLE_IN_ALL +void g_hash_table_destroy (GHashTable *hash_table); +GLIB_AVAILABLE_IN_ALL +gboolean g_hash_table_insert (GHashTable *hash_table, + gpointer key, + gpointer value); +GLIB_AVAILABLE_IN_ALL +gboolean g_hash_table_replace (GHashTable *hash_table, + gpointer key, + gpointer value); +GLIB_AVAILABLE_IN_ALL +gboolean g_hash_table_add (GHashTable *hash_table, + gpointer key); +GLIB_AVAILABLE_IN_ALL +gboolean g_hash_table_remove (GHashTable *hash_table, + gconstpointer key); +GLIB_AVAILABLE_IN_ALL +void g_hash_table_remove_all (GHashTable *hash_table); +GLIB_AVAILABLE_IN_ALL +gboolean g_hash_table_steal (GHashTable *hash_table, + gconstpointer key); +GLIB_AVAILABLE_IN_ALL +void g_hash_table_steal_all (GHashTable *hash_table); +GLIB_AVAILABLE_IN_ALL +gpointer g_hash_table_lookup (GHashTable *hash_table, + gconstpointer key); +GLIB_AVAILABLE_IN_ALL +gboolean g_hash_table_contains (GHashTable *hash_table, + gconstpointer key); +GLIB_AVAILABLE_IN_ALL +gboolean g_hash_table_lookup_extended (GHashTable *hash_table, + gconstpointer lookup_key, + gpointer *orig_key, + gpointer *value); +GLIB_AVAILABLE_IN_ALL +void g_hash_table_foreach (GHashTable *hash_table, + GHFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gpointer g_hash_table_find (GHashTable *hash_table, + GHRFunc predicate, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +guint g_hash_table_foreach_remove (GHashTable *hash_table, + GHRFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +guint g_hash_table_foreach_steal (GHashTable *hash_table, + GHRFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +guint g_hash_table_size (GHashTable *hash_table); +GLIB_AVAILABLE_IN_ALL +GList * g_hash_table_get_keys (GHashTable *hash_table); +GLIB_AVAILABLE_IN_ALL +GList * g_hash_table_get_values (GHashTable *hash_table); +GLIB_AVAILABLE_IN_2_40 +gpointer * g_hash_table_get_keys_as_array (GHashTable *hash_table, + guint *length); + +GLIB_AVAILABLE_IN_ALL +void g_hash_table_iter_init (GHashTableIter *iter, + GHashTable *hash_table); +GLIB_AVAILABLE_IN_ALL +gboolean g_hash_table_iter_next (GHashTableIter *iter, + gpointer *key, + gpointer *value); +GLIB_AVAILABLE_IN_ALL +GHashTable* g_hash_table_iter_get_hash_table (GHashTableIter *iter); +GLIB_AVAILABLE_IN_ALL +void g_hash_table_iter_remove (GHashTableIter *iter); +GLIB_AVAILABLE_IN_2_30 +void g_hash_table_iter_replace (GHashTableIter *iter, + gpointer value); +GLIB_AVAILABLE_IN_ALL +void g_hash_table_iter_steal (GHashTableIter *iter); + +GLIB_AVAILABLE_IN_ALL +GHashTable* g_hash_table_ref (GHashTable *hash_table); +GLIB_AVAILABLE_IN_ALL +void g_hash_table_unref (GHashTable *hash_table); + +#ifndef G_DISABLE_DEPRECATED +#define g_hash_table_freeze(hash_table) ((void)0) +#define g_hash_table_thaw(hash_table) ((void)0) +#endif + +/* Hash Functions + */ +GLIB_AVAILABLE_IN_ALL +gboolean g_str_equal (gconstpointer v1, + gconstpointer v2); +GLIB_AVAILABLE_IN_ALL +guint g_str_hash (gconstpointer v); + +GLIB_AVAILABLE_IN_ALL +gboolean g_int_equal (gconstpointer v1, + gconstpointer v2); +GLIB_AVAILABLE_IN_ALL +guint g_int_hash (gconstpointer v); + +GLIB_AVAILABLE_IN_ALL +gboolean g_int64_equal (gconstpointer v1, + gconstpointer v2); +GLIB_AVAILABLE_IN_ALL +guint g_int64_hash (gconstpointer v); + +GLIB_AVAILABLE_IN_ALL +gboolean g_double_equal (gconstpointer v1, + gconstpointer v2); +GLIB_AVAILABLE_IN_ALL +guint g_double_hash (gconstpointer v); + +GLIB_AVAILABLE_IN_ALL +guint g_direct_hash (gconstpointer v) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_direct_equal (gconstpointer v1, + gconstpointer v2) G_GNUC_CONST; + +G_END_DECLS + +#endif /* __G_HASH_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/ghmac.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/ghmac.h new file mode 100755 index 00000000..36e24eb2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/ghmac.h @@ -0,0 +1,83 @@ +/* ghmac.h - secure data hashing + * + * Copyright (C) 2011 Stef Walter <stefw@collabora.co.uk> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_HMAC_H__ +#define __G_HMAC_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> +#include "gchecksum.h" + +G_BEGIN_DECLS + +/** + * GHmac: + * + * An opaque structure representing a HMAC operation. + * To create a new GHmac, use g_hmac_new(). To free + * a GHmac, use g_hmac_unref(). + * + * Since: 2.30 + */ +typedef struct _GHmac GHmac; + +GLIB_AVAILABLE_IN_2_30 +GHmac * g_hmac_new (GChecksumType digest_type, + const guchar *key, + gsize key_len); +GLIB_AVAILABLE_IN_2_30 +GHmac * g_hmac_copy (const GHmac *hmac); +GLIB_AVAILABLE_IN_2_30 +GHmac * g_hmac_ref (GHmac *hmac); +GLIB_AVAILABLE_IN_2_30 +void g_hmac_unref (GHmac *hmac); +GLIB_AVAILABLE_IN_2_30 +void g_hmac_update (GHmac *hmac, + const guchar *data, + gssize length); +GLIB_AVAILABLE_IN_2_30 +const gchar * g_hmac_get_string (GHmac *hmac); +GLIB_AVAILABLE_IN_2_30 +void g_hmac_get_digest (GHmac *hmac, + guint8 *buffer, + gsize *digest_len); + +GLIB_AVAILABLE_IN_2_30 +gchar *g_compute_hmac_for_data (GChecksumType digest_type, + const guchar *key, + gsize key_len, + const guchar *data, + gsize length); +GLIB_AVAILABLE_IN_2_30 +gchar *g_compute_hmac_for_string (GChecksumType digest_type, + const guchar *key, + gsize key_len, + const gchar *str, + gssize length); +GLIB_AVAILABLE_IN_2_50 +gchar *g_compute_hmac_for_bytes (GChecksumType digest_type, + GBytes *key, + GBytes *data); + + +G_END_DECLS + +#endif /* __G_CHECKSUM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/ghook.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/ghook.h new file mode 100755 index 00000000..83ad1bde --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/ghook.h @@ -0,0 +1,202 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_HOOK_H__ +#define __G_HOOK_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gmem.h> + +G_BEGIN_DECLS + + +/* --- typedefs --- */ +typedef struct _GHook GHook; +typedef struct _GHookList GHookList; + +typedef gint (*GHookCompareFunc) (GHook *new_hook, + GHook *sibling); +typedef gboolean (*GHookFindFunc) (GHook *hook, + gpointer data); +typedef void (*GHookMarshaller) (GHook *hook, + gpointer marshal_data); +typedef gboolean (*GHookCheckMarshaller) (GHook *hook, + gpointer marshal_data); +typedef void (*GHookFunc) (gpointer data); +typedef gboolean (*GHookCheckFunc) (gpointer data); +typedef void (*GHookFinalizeFunc) (GHookList *hook_list, + GHook *hook); +typedef enum +{ + G_HOOK_FLAG_ACTIVE = 1 << 0, + G_HOOK_FLAG_IN_CALL = 1 << 1, + G_HOOK_FLAG_MASK = 0x0f +} GHookFlagMask; +#define G_HOOK_FLAG_USER_SHIFT (4) + + +/* --- structures --- */ +struct _GHookList +{ + gulong seq_id; + guint hook_size : 16; + guint is_setup : 1; + GHook *hooks; + gpointer dummy3; + GHookFinalizeFunc finalize_hook; + gpointer dummy[2]; +}; +struct _GHook +{ + gpointer data; + GHook *next; + GHook *prev; + guint ref_count; + gulong hook_id; + guint flags; + gpointer func; + GDestroyNotify destroy; +}; + + +/* --- macros --- */ +#define G_HOOK(hook) ((GHook*) (hook)) +#define G_HOOK_FLAGS(hook) (G_HOOK (hook)->flags) +#define G_HOOK_ACTIVE(hook) ((G_HOOK_FLAGS (hook) & \ + G_HOOK_FLAG_ACTIVE) != 0) +#define G_HOOK_IN_CALL(hook) ((G_HOOK_FLAGS (hook) & \ + G_HOOK_FLAG_IN_CALL) != 0) +#define G_HOOK_IS_VALID(hook) (G_HOOK (hook)->hook_id != 0 && \ + (G_HOOK_FLAGS (hook) & \ + G_HOOK_FLAG_ACTIVE)) +#define G_HOOK_IS_UNLINKED(hook) (G_HOOK (hook)->next == NULL && \ + G_HOOK (hook)->prev == NULL && \ + G_HOOK (hook)->hook_id == 0 && \ + G_HOOK (hook)->ref_count == 0) + + +/* --- prototypes --- */ +/* callback maintenance functions */ +GLIB_AVAILABLE_IN_ALL +void g_hook_list_init (GHookList *hook_list, + guint hook_size); +GLIB_AVAILABLE_IN_ALL +void g_hook_list_clear (GHookList *hook_list); +GLIB_AVAILABLE_IN_ALL +GHook* g_hook_alloc (GHookList *hook_list); +GLIB_AVAILABLE_IN_ALL +void g_hook_free (GHookList *hook_list, + GHook *hook); +GLIB_AVAILABLE_IN_ALL +GHook * g_hook_ref (GHookList *hook_list, + GHook *hook); +GLIB_AVAILABLE_IN_ALL +void g_hook_unref (GHookList *hook_list, + GHook *hook); +GLIB_AVAILABLE_IN_ALL +gboolean g_hook_destroy (GHookList *hook_list, + gulong hook_id); +GLIB_AVAILABLE_IN_ALL +void g_hook_destroy_link (GHookList *hook_list, + GHook *hook); +GLIB_AVAILABLE_IN_ALL +void g_hook_prepend (GHookList *hook_list, + GHook *hook); +GLIB_AVAILABLE_IN_ALL +void g_hook_insert_before (GHookList *hook_list, + GHook *sibling, + GHook *hook); +GLIB_AVAILABLE_IN_ALL +void g_hook_insert_sorted (GHookList *hook_list, + GHook *hook, + GHookCompareFunc func); +GLIB_AVAILABLE_IN_ALL +GHook* g_hook_get (GHookList *hook_list, + gulong hook_id); +GLIB_AVAILABLE_IN_ALL +GHook* g_hook_find (GHookList *hook_list, + gboolean need_valids, + GHookFindFunc func, + gpointer data); +GLIB_AVAILABLE_IN_ALL +GHook* g_hook_find_data (GHookList *hook_list, + gboolean need_valids, + gpointer data); +GLIB_AVAILABLE_IN_ALL +GHook* g_hook_find_func (GHookList *hook_list, + gboolean need_valids, + gpointer func); +GLIB_AVAILABLE_IN_ALL +GHook* g_hook_find_func_data (GHookList *hook_list, + gboolean need_valids, + gpointer func, + gpointer data); +/* return the first valid hook, and increment its reference count */ +GLIB_AVAILABLE_IN_ALL +GHook* g_hook_first_valid (GHookList *hook_list, + gboolean may_be_in_call); +/* return the next valid hook with incremented reference count, and + * decrement the reference count of the original hook + */ +GLIB_AVAILABLE_IN_ALL +GHook* g_hook_next_valid (GHookList *hook_list, + GHook *hook, + gboolean may_be_in_call); +/* GHookCompareFunc implementation to insert hooks sorted by their id */ +GLIB_AVAILABLE_IN_ALL +gint g_hook_compare_ids (GHook *new_hook, + GHook *sibling); +/* convenience macros */ +#define g_hook_append( hook_list, hook ) \ + g_hook_insert_before ((hook_list), NULL, (hook)) +/* invoke all valid hooks with the (*GHookFunc) signature. + */ +GLIB_AVAILABLE_IN_ALL +void g_hook_list_invoke (GHookList *hook_list, + gboolean may_recurse); +/* invoke all valid hooks with the (*GHookCheckFunc) signature, + * and destroy the hook if FALSE is returned. + */ +GLIB_AVAILABLE_IN_ALL +void g_hook_list_invoke_check (GHookList *hook_list, + gboolean may_recurse); +/* invoke a marshaller on all valid hooks. + */ +GLIB_AVAILABLE_IN_ALL +void g_hook_list_marshal (GHookList *hook_list, + gboolean may_recurse, + GHookMarshaller marshaller, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_hook_list_marshal_check (GHookList *hook_list, + gboolean may_recurse, + GHookCheckMarshaller marshaller, + gpointer marshal_data); + +G_END_DECLS + +#endif /* __G_HOOK_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/ghostutils.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/ghostutils.h new file mode 100755 index 00000000..59d2d41e --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/ghostutils.h @@ -0,0 +1,43 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 2008 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_HOST_UTILS_H__ +#define __G_HOST_UTILS_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +gboolean g_hostname_is_non_ascii (const gchar *hostname); +GLIB_AVAILABLE_IN_ALL +gboolean g_hostname_is_ascii_encoded (const gchar *hostname); +GLIB_AVAILABLE_IN_ALL +gboolean g_hostname_is_ip_address (const gchar *hostname); + +GLIB_AVAILABLE_IN_ALL +gchar *g_hostname_to_ascii (const gchar *hostname); +GLIB_AVAILABLE_IN_ALL +gchar *g_hostname_to_unicode (const gchar *hostname); + +G_END_DECLS + +#endif /* __G_HOST_UTILS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gi18n-lib.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gi18n-lib.h new file mode 100755 index 00000000..74e50a3a --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gi18n-lib.h @@ -0,0 +1,36 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997, 2002 Peter Mattis, Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_I18N_LIB_H__ +#define __G_I18N_LIB_H__ + +#include <glib.h> + +#include <libintl.h> +#include <string.h> + +#ifndef GETTEXT_PACKAGE +#error You must define GETTEXT_PACKAGE before including gi18n-lib.h. Did you forget to include config.h? +#endif + +#define _(String) ((char *) g_dgettext (GETTEXT_PACKAGE, String)) +#define Q_(String) g_dpgettext (GETTEXT_PACKAGE, String, 0) +#define N_(String) (String) +#define C_(Context,String) g_dpgettext (GETTEXT_PACKAGE, Context "\004" String, strlen (Context) + 1) +#define NC_(Context, String) (String) + +#endif /* __G_I18N_LIB_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gi18n.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gi18n.h new file mode 100755 index 00000000..5f996d24 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gi18n.h @@ -0,0 +1,32 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997, 2002 Peter Mattis, Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_I18N_H__ +#define __G_I18N_H__ + +#include <glib.h> + +#include <libintl.h> +#include <string.h> + +#define _(String) gettext (String) +#define Q_(String) g_dpgettext (NULL, String, 0) +#define N_(String) (String) +#define C_(Context,String) g_dpgettext (NULL, Context "\004" String, strlen (Context) + 1) +#define NC_(Context, String) (String) + +#endif /* __G_I18N_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/giochannel.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/giochannel.h new file mode 100755 index 00000000..1da90ef6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/giochannel.h @@ -0,0 +1,404 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_IOCHANNEL_H__ +#define __G_IOCHANNEL_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gconvert.h> +#include <glib/gmain.h> +#include <glib/gstring.h> + +G_BEGIN_DECLS + +/* GIOChannel + */ + +typedef struct _GIOChannel GIOChannel; +typedef struct _GIOFuncs GIOFuncs; + +typedef enum +{ + G_IO_ERROR_NONE, + G_IO_ERROR_AGAIN, + G_IO_ERROR_INVAL, + G_IO_ERROR_UNKNOWN +} GIOError; + +#define G_IO_CHANNEL_ERROR g_io_channel_error_quark() + +typedef enum +{ + /* Derived from errno */ + G_IO_CHANNEL_ERROR_FBIG, + G_IO_CHANNEL_ERROR_INVAL, + G_IO_CHANNEL_ERROR_IO, + G_IO_CHANNEL_ERROR_ISDIR, + G_IO_CHANNEL_ERROR_NOSPC, + G_IO_CHANNEL_ERROR_NXIO, + G_IO_CHANNEL_ERROR_OVERFLOW, + G_IO_CHANNEL_ERROR_PIPE, + /* Other */ + G_IO_CHANNEL_ERROR_FAILED +} GIOChannelError; + +typedef enum +{ + G_IO_STATUS_ERROR, + G_IO_STATUS_NORMAL, + G_IO_STATUS_EOF, + G_IO_STATUS_AGAIN +} GIOStatus; + +typedef enum +{ + G_SEEK_CUR, + G_SEEK_SET, + G_SEEK_END +} GSeekType; + +typedef enum +{ + G_IO_FLAG_APPEND = 1 << 0, + G_IO_FLAG_NONBLOCK = 1 << 1, + G_IO_FLAG_IS_READABLE = 1 << 2, /* Read only flag */ + G_IO_FLAG_IS_WRITABLE = 1 << 3, /* Read only flag */ + G_IO_FLAG_IS_WRITEABLE = 1 << 3, /* Misspelling in 2.29.10 and earlier */ + G_IO_FLAG_IS_SEEKABLE = 1 << 4, /* Read only flag */ + G_IO_FLAG_MASK = (1 << 5) - 1, + G_IO_FLAG_GET_MASK = G_IO_FLAG_MASK, + G_IO_FLAG_SET_MASK = G_IO_FLAG_APPEND | G_IO_FLAG_NONBLOCK +} GIOFlags; + +struct _GIOChannel +{ + /*< private >*/ + gint ref_count; + GIOFuncs *funcs; + + gchar *encoding; + GIConv read_cd; + GIConv write_cd; + gchar *line_term; /* String which indicates the end of a line of text */ + guint line_term_len; /* So we can have null in the line term */ + + gsize buf_size; + GString *read_buf; /* Raw data from the channel */ + GString *encoded_read_buf; /* Channel data converted to UTF-8 */ + GString *write_buf; /* Data ready to be written to the file */ + gchar partial_write_buf[6]; /* UTF-8 partial characters, null terminated */ + + /* Group the flags together, immediately after partial_write_buf, to save memory */ + + guint use_buffer : 1; /* The encoding uses the buffers */ + guint do_encode : 1; /* The encoding uses the GIConv coverters */ + guint close_on_unref : 1; /* Close the channel on final unref */ + guint is_readable : 1; /* Cached GIOFlag */ + guint is_writeable : 1; /* ditto */ + guint is_seekable : 1; /* ditto */ + + gpointer reserved1; + gpointer reserved2; +}; + +typedef gboolean (*GIOFunc) (GIOChannel *source, + GIOCondition condition, + gpointer data); +struct _GIOFuncs +{ + GIOStatus (*io_read) (GIOChannel *channel, + gchar *buf, + gsize count, + gsize *bytes_read, + GError **err); + GIOStatus (*io_write) (GIOChannel *channel, + const gchar *buf, + gsize count, + gsize *bytes_written, + GError **err); + GIOStatus (*io_seek) (GIOChannel *channel, + gint64 offset, + GSeekType type, + GError **err); + GIOStatus (*io_close) (GIOChannel *channel, + GError **err); + GSource* (*io_create_watch) (GIOChannel *channel, + GIOCondition condition); + void (*io_free) (GIOChannel *channel); + GIOStatus (*io_set_flags) (GIOChannel *channel, + GIOFlags flags, + GError **err); + GIOFlags (*io_get_flags) (GIOChannel *channel); +}; + +GLIB_AVAILABLE_IN_ALL +void g_io_channel_init (GIOChannel *channel); +GLIB_AVAILABLE_IN_ALL +GIOChannel *g_io_channel_ref (GIOChannel *channel); +GLIB_AVAILABLE_IN_ALL +void g_io_channel_unref (GIOChannel *channel); + +GLIB_DEPRECATED_FOR(g_io_channel_read_chars) +GIOError g_io_channel_read (GIOChannel *channel, + gchar *buf, + gsize count, + gsize *bytes_read); + +GLIB_DEPRECATED_FOR(g_io_channel_write_chars) +GIOError g_io_channel_write (GIOChannel *channel, + const gchar *buf, + gsize count, + gsize *bytes_written); + +GLIB_DEPRECATED_FOR(g_io_channel_seek_position) +GIOError g_io_channel_seek (GIOChannel *channel, + gint64 offset, + GSeekType type); + +GLIB_DEPRECATED_FOR(g_io_channel_shutdown) +void g_io_channel_close (GIOChannel *channel); + +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_shutdown (GIOChannel *channel, + gboolean flush, + GError **err); +GLIB_AVAILABLE_IN_ALL +guint g_io_add_watch_full (GIOChannel *channel, + gint priority, + GIOCondition condition, + GIOFunc func, + gpointer user_data, + GDestroyNotify notify); +GLIB_AVAILABLE_IN_ALL +GSource * g_io_create_watch (GIOChannel *channel, + GIOCondition condition); +GLIB_AVAILABLE_IN_ALL +guint g_io_add_watch (GIOChannel *channel, + GIOCondition condition, + GIOFunc func, + gpointer user_data); + +/* character encoding conversion involved functions. + */ + +GLIB_AVAILABLE_IN_ALL +void g_io_channel_set_buffer_size (GIOChannel *channel, + gsize size); +GLIB_AVAILABLE_IN_ALL +gsize g_io_channel_get_buffer_size (GIOChannel *channel); +GLIB_AVAILABLE_IN_ALL +GIOCondition g_io_channel_get_buffer_condition (GIOChannel *channel); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_set_flags (GIOChannel *channel, + GIOFlags flags, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOFlags g_io_channel_get_flags (GIOChannel *channel); +GLIB_AVAILABLE_IN_ALL +void g_io_channel_set_line_term (GIOChannel *channel, + const gchar *line_term, + gint length); +GLIB_AVAILABLE_IN_ALL +const gchar * g_io_channel_get_line_term (GIOChannel *channel, + gint *length); +GLIB_AVAILABLE_IN_ALL +void g_io_channel_set_buffered (GIOChannel *channel, + gboolean buffered); +GLIB_AVAILABLE_IN_ALL +gboolean g_io_channel_get_buffered (GIOChannel *channel); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_set_encoding (GIOChannel *channel, + const gchar *encoding, + GError **error); +GLIB_AVAILABLE_IN_ALL +const gchar * g_io_channel_get_encoding (GIOChannel *channel); +GLIB_AVAILABLE_IN_ALL +void g_io_channel_set_close_on_unref (GIOChannel *channel, + gboolean do_close); +GLIB_AVAILABLE_IN_ALL +gboolean g_io_channel_get_close_on_unref (GIOChannel *channel); + + +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_flush (GIOChannel *channel, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_read_line (GIOChannel *channel, + gchar **str_return, + gsize *length, + gsize *terminator_pos, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_read_line_string (GIOChannel *channel, + GString *buffer, + gsize *terminator_pos, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_read_to_end (GIOChannel *channel, + gchar **str_return, + gsize *length, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_read_chars (GIOChannel *channel, + gchar *buf, + gsize count, + gsize *bytes_read, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_read_unichar (GIOChannel *channel, + gunichar *thechar, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_write_chars (GIOChannel *channel, + const gchar *buf, + gssize count, + gsize *bytes_written, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_write_unichar (GIOChannel *channel, + gunichar thechar, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_seek_position (GIOChannel *channel, + gint64 offset, + GSeekType type, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOChannel* g_io_channel_new_file (const gchar *filename, + const gchar *mode, + GError **error); + +/* Error handling */ + +GLIB_AVAILABLE_IN_ALL +GQuark g_io_channel_error_quark (void); +GLIB_AVAILABLE_IN_ALL +GIOChannelError g_io_channel_error_from_errno (gint en); + +/* On Unix, IO channels created with this function for any file + * descriptor or socket. + * + * On Win32, this can be used either for files opened with the MSVCRT + * (the Microsoft run-time C library) _open() or _pipe, including file + * descriptors 0, 1 and 2 (corresponding to stdin, stdout and stderr), + * or for Winsock SOCKETs. If the parameter is a legal file + * descriptor, it is assumed to be such, otherwise it should be a + * SOCKET. This relies on SOCKETs and file descriptors not + * overlapping. If you want to be certain, call either + * g_io_channel_win32_new_fd() or g_io_channel_win32_new_socket() + * instead as appropriate. + * + * The term file descriptor as used in the context of Win32 refers to + * the emulated Unix-like file descriptors MSVCRT provides. The native + * corresponding concept is file HANDLE. There isn't as of yet a way to + * get GIOChannels for Win32 file HANDLEs. + */ +GLIB_AVAILABLE_IN_ALL +GIOChannel* g_io_channel_unix_new (int fd); +GLIB_AVAILABLE_IN_ALL +gint g_io_channel_unix_get_fd (GIOChannel *channel); + + +/* Hook for GClosure / GSource integration. Don't touch */ +GLIB_VAR GSourceFuncs g_io_watch_funcs; + +#ifdef G_OS_WIN32 + +/* You can use this "pseudo file descriptor" in a GPollFD to add + * polling for Windows messages. GTK applications should not do that. + */ + +#define G_WIN32_MSG_HANDLE 19981206 + +/* Use this to get a GPollFD from a GIOChannel, so that you can call + * g_io_channel_win32_poll(). After calling this you should only use + * g_io_channel_read() to read from the GIOChannel, i.e. never read() + * from the underlying file descriptor. For SOCKETs, it is possible to call + * recv(). + */ +GLIB_AVAILABLE_IN_ALL +void g_io_channel_win32_make_pollfd (GIOChannel *channel, + GIOCondition condition, + GPollFD *fd); + +/* This can be used to wait a until at least one of the channels is readable. + * On Unix you would do a select() on the file descriptors of the channels. + */ +GLIB_AVAILABLE_IN_ALL +gint g_io_channel_win32_poll (GPollFD *fds, + gint n_fds, + gint timeout_); + +/* Create an IO channel for Windows messages for window handle hwnd. */ +#if GLIB_SIZEOF_VOID_P == 8 +/* We use gsize here so that it is still an integer type and not a + * pointer, like the guint in the traditional prototype. We can't use + * intptr_t as that is not portable enough. + */ +GLIB_AVAILABLE_IN_ALL +GIOChannel *g_io_channel_win32_new_messages (gsize hwnd); +#else +GLIB_AVAILABLE_IN_ALL +GIOChannel *g_io_channel_win32_new_messages (guint hwnd); +#endif + +/* Create an IO channel for C runtime (emulated Unix-like) file + * descriptors. After calling g_io_add_watch() on a IO channel + * returned by this function, you shouldn't call read() on the file + * descriptor. This is because adding polling for a file descriptor is + * implemented on Win32 by starting a thread that sits blocked in a + * read() from the file descriptor most of the time. All reads from + * the file descriptor should be done by this internal GLib + * thread. Your code should call only g_io_channel_read_chars(). + */ +GLIB_AVAILABLE_IN_ALL +GIOChannel* g_io_channel_win32_new_fd (gint fd); + +/* Get the C runtime file descriptor of a channel. */ +GLIB_AVAILABLE_IN_ALL +gint g_io_channel_win32_get_fd (GIOChannel *channel); + +/* Create an IO channel for a winsock socket. The parameter should be + * a SOCKET. Contrary to IO channels for file descriptors (on *Win32), + * you can use normal recv() or recvfrom() on sockets even if GLib + * is polling them. + */ +GLIB_AVAILABLE_IN_ALL +GIOChannel *g_io_channel_win32_new_socket (gint socket); + +GLIB_DEPRECATED_FOR(g_io_channel_win32_new_socket) +GIOChannel *g_io_channel_win32_new_stream_socket (gint socket); + +GLIB_AVAILABLE_IN_ALL +void g_io_channel_win32_set_debug (GIOChannel *channel, + gboolean flag); + +#endif + +G_END_DECLS + +#endif /* __G_IOCHANNEL_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gkeyfile.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gkeyfile.h new file mode 100755 index 00000000..78495518 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gkeyfile.h @@ -0,0 +1,330 @@ +/* gkeyfile.h - desktop entry file parser + * + * Copyright 2004 Red Hat, Inc. + * + * Ray Strode <halfline@hawaii.rr.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_KEY_FILE_H__ +#define __G_KEY_FILE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gbytes.h> +#include <glib/gerror.h> + +G_BEGIN_DECLS + +typedef enum +{ + G_KEY_FILE_ERROR_UNKNOWN_ENCODING, + G_KEY_FILE_ERROR_PARSE, + G_KEY_FILE_ERROR_NOT_FOUND, + G_KEY_FILE_ERROR_KEY_NOT_FOUND, + G_KEY_FILE_ERROR_GROUP_NOT_FOUND, + G_KEY_FILE_ERROR_INVALID_VALUE +} GKeyFileError; + +#define G_KEY_FILE_ERROR g_key_file_error_quark() + +GLIB_AVAILABLE_IN_ALL +GQuark g_key_file_error_quark (void); + +typedef struct _GKeyFile GKeyFile; + +typedef enum +{ + G_KEY_FILE_NONE = 0, + G_KEY_FILE_KEEP_COMMENTS = 1 << 0, + G_KEY_FILE_KEEP_TRANSLATIONS = 1 << 1 +} GKeyFileFlags; + +GLIB_AVAILABLE_IN_ALL +GKeyFile *g_key_file_new (void); +GLIB_AVAILABLE_IN_ALL +GKeyFile *g_key_file_ref (GKeyFile *key_file); +GLIB_AVAILABLE_IN_ALL +void g_key_file_unref (GKeyFile *key_file); +GLIB_AVAILABLE_IN_ALL +void g_key_file_free (GKeyFile *key_file); +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_list_separator (GKeyFile *key_file, + gchar separator); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_load_from_file (GKeyFile *key_file, + const gchar *file, + GKeyFileFlags flags, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_load_from_data (GKeyFile *key_file, + const gchar *data, + gsize length, + GKeyFileFlags flags, + GError **error); +GLIB_AVAILABLE_IN_2_50 +gboolean g_key_file_load_from_bytes (GKeyFile *key_file, + GBytes *bytes, + GKeyFileFlags flags, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_load_from_dirs (GKeyFile *key_file, + const gchar *file, + const gchar **search_dirs, + gchar **full_path, + GKeyFileFlags flags, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_load_from_data_dirs (GKeyFile *key_file, + const gchar *file, + gchar **full_path, + GKeyFileFlags flags, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar *g_key_file_to_data (GKeyFile *key_file, + gsize *length, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_2_40 +gboolean g_key_file_save_to_file (GKeyFile *key_file, + const gchar *filename, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar *g_key_file_get_start_group (GKeyFile *key_file) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar **g_key_file_get_groups (GKeyFile *key_file, + gsize *length) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar **g_key_file_get_keys (GKeyFile *key_file, + const gchar *group_name, + gsize *length, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_has_group (GKeyFile *key_file, + const gchar *group_name); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_has_key (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar *g_key_file_get_value (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_value (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *value); +GLIB_AVAILABLE_IN_ALL +gchar *g_key_file_get_string (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_string (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *string); +GLIB_AVAILABLE_IN_ALL +gchar *g_key_file_get_locale_string (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *locale, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_2_56 +gchar *g_key_file_get_locale_for_key (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *locale) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_locale_string (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *locale, + const gchar *string); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_get_boolean (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_boolean (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gboolean value); +GLIB_AVAILABLE_IN_ALL +gint g_key_file_get_integer (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_integer (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gint value); +GLIB_AVAILABLE_IN_ALL +gint64 g_key_file_get_int64 (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_int64 (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gint64 value); +GLIB_AVAILABLE_IN_ALL +guint64 g_key_file_get_uint64 (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_uint64 (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + guint64 value); +GLIB_AVAILABLE_IN_ALL +gdouble g_key_file_get_double (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_double (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gdouble value); +GLIB_AVAILABLE_IN_ALL +gchar **g_key_file_get_string_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gsize *length, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_string_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar * const list[], + gsize length); +GLIB_AVAILABLE_IN_ALL +gchar **g_key_file_get_locale_string_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *locale, + gsize *length, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_locale_string_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *locale, + const gchar * const list[], + gsize length); +GLIB_AVAILABLE_IN_ALL +gboolean *g_key_file_get_boolean_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gsize *length, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_boolean_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gboolean list[], + gsize length); +GLIB_AVAILABLE_IN_ALL +gint *g_key_file_get_integer_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gsize *length, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_double_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gdouble list[], + gsize length); +GLIB_AVAILABLE_IN_ALL +gdouble *g_key_file_get_double_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gsize *length, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_integer_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gint list[], + gsize length); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_set_comment (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *comment, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar *g_key_file_get_comment (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_remove_comment (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_remove_key (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_remove_group (GKeyFile *key_file, + const gchar *group_name, + GError **error); + +/* Defines for handling freedesktop.org Desktop files */ +#define G_KEY_FILE_DESKTOP_GROUP "Desktop Entry" + +#define G_KEY_FILE_DESKTOP_KEY_TYPE "Type" +#define G_KEY_FILE_DESKTOP_KEY_VERSION "Version" +#define G_KEY_FILE_DESKTOP_KEY_NAME "Name" +#define G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME "GenericName" +#define G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY "NoDisplay" +#define G_KEY_FILE_DESKTOP_KEY_COMMENT "Comment" +#define G_KEY_FILE_DESKTOP_KEY_ICON "Icon" +#define G_KEY_FILE_DESKTOP_KEY_HIDDEN "Hidden" +#define G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN "OnlyShowIn" +#define G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN "NotShowIn" +#define G_KEY_FILE_DESKTOP_KEY_TRY_EXEC "TryExec" +#define G_KEY_FILE_DESKTOP_KEY_EXEC "Exec" +#define G_KEY_FILE_DESKTOP_KEY_PATH "Path" +#define G_KEY_FILE_DESKTOP_KEY_TERMINAL "Terminal" +#define G_KEY_FILE_DESKTOP_KEY_MIME_TYPE "MimeType" +#define G_KEY_FILE_DESKTOP_KEY_CATEGORIES "Categories" +#define G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY "StartupNotify" +#define G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS "StartupWMClass" +#define G_KEY_FILE_DESKTOP_KEY_URL "URL" +#define G_KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE "DBusActivatable" +#define G_KEY_FILE_DESKTOP_KEY_ACTIONS "Actions" + +#define G_KEY_FILE_DESKTOP_TYPE_APPLICATION "Application" +#define G_KEY_FILE_DESKTOP_TYPE_LINK "Link" +#define G_KEY_FILE_DESKTOP_TYPE_DIRECTORY "Directory" + +G_END_DECLS + +#endif /* __G_KEY_FILE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/glib-autocleanups.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/glib-autocleanups.h new file mode 100755 index 00000000..9f86bd99 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/glib-autocleanups.h @@ -0,0 +1,89 @@ +/* + * Copyright © 2015 Canonical Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Ryan Lortie <desrt@desrt.ca> + */ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +static inline void +g_autoptr_cleanup_generic_gfree (void *p) +{ + void **pp = (void**)p; + g_free (*pp); +} + +static inline void +g_autoptr_cleanup_gstring_free (GString *string) +{ + if (string) + g_string_free (string, TRUE); +} + +/* If adding a cleanup here, please also add a test case to + * glib/tests/autoptr.c + */ +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAsyncQueue, g_async_queue_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GBookmarkFile, g_bookmark_file_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GBytes, g_bytes_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GChecksum, g_checksum_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDateTime, g_date_time_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDir, g_dir_close) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GError, g_error_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GHashTable, g_hash_table_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GHmac, g_hmac_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GIOChannel, g_io_channel_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GKeyFile, g_key_file_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GList, g_list_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GArray, g_array_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GPtrArray, g_ptr_array_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GByteArray, g_byte_array_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMainContext, g_main_context_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMainLoop, g_main_loop_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSource, g_source_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMappedFile, g_mapped_file_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMarkupParseContext, g_markup_parse_context_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GNode, g_node_destroy) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GOptionContext, g_option_context_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GOptionGroup, g_option_group_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GPatternSpec, g_pattern_spec_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GQueue, g_queue_free) +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GQueue, g_queue_clear) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GRand, g_rand_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GRegex, g_regex_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMatchInfo, g_match_info_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GScanner, g_scanner_destroy) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSequence, g_sequence_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSList, g_slist_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GString, g_autoptr_cleanup_gstring_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GStringChunk, g_string_chunk_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GThread, g_thread_unref) +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GMutex, g_mutex_clear) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMutexLocker, g_mutex_locker_free) +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GCond, g_cond_clear) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTimer, g_timer_destroy) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTimeZone, g_time_zone_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTree, g_tree_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVariant, g_variant_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVariantBuilder, g_variant_builder_unref) +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GVariantBuilder, g_variant_builder_clear) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVariantIter, g_variant_iter_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVariantDict, g_variant_dict_unref) +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GVariantDict, g_variant_dict_clear) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVariantType, g_variant_type_free) +G_DEFINE_AUTO_CLEANUP_FREE_FUNC(GStrv, g_strfreev, NULL) diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/glist.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/glist.h new file mode 100755 index 00000000..af35cd52 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/glist.h @@ -0,0 +1,152 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_LIST_H__ +#define __G_LIST_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gmem.h> +#include <glib/gnode.h> + +G_BEGIN_DECLS + +typedef struct _GList GList; + +struct _GList +{ + gpointer data; + GList *next; + GList *prev; +}; + +/* Doubly linked lists + */ +GLIB_AVAILABLE_IN_ALL +GList* g_list_alloc (void) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +void g_list_free (GList *list); +GLIB_AVAILABLE_IN_ALL +void g_list_free_1 (GList *list); +#define g_list_free1 g_list_free_1 +GLIB_AVAILABLE_IN_ALL +void g_list_free_full (GList *list, + GDestroyNotify free_func); +GLIB_AVAILABLE_IN_ALL +GList* g_list_append (GList *list, + gpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_prepend (GList *list, + gpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_insert (GList *list, + gpointer data, + gint position) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_insert_sorted (GList *list, + gpointer data, + GCompareFunc func) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_insert_sorted_with_data (GList *list, + gpointer data, + GCompareDataFunc func, + gpointer user_data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_insert_before (GList *list, + GList *sibling, + gpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_concat (GList *list1, + GList *list2) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_remove (GList *list, + gconstpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_remove_all (GList *list, + gconstpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_remove_link (GList *list, + GList *llink) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_delete_link (GList *list, + GList *link_) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_reverse (GList *list) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_copy (GList *list) G_GNUC_WARN_UNUSED_RESULT; + +GLIB_AVAILABLE_IN_2_34 +GList* g_list_copy_deep (GList *list, + GCopyFunc func, + gpointer user_data) G_GNUC_WARN_UNUSED_RESULT; + +GLIB_AVAILABLE_IN_ALL +GList* g_list_nth (GList *list, + guint n); +GLIB_AVAILABLE_IN_ALL +GList* g_list_nth_prev (GList *list, + guint n); +GLIB_AVAILABLE_IN_ALL +GList* g_list_find (GList *list, + gconstpointer data); +GLIB_AVAILABLE_IN_ALL +GList* g_list_find_custom (GList *list, + gconstpointer data, + GCompareFunc func); +GLIB_AVAILABLE_IN_ALL +gint g_list_position (GList *list, + GList *llink); +GLIB_AVAILABLE_IN_ALL +gint g_list_index (GList *list, + gconstpointer data); +GLIB_AVAILABLE_IN_ALL +GList* g_list_last (GList *list); +GLIB_AVAILABLE_IN_ALL +GList* g_list_first (GList *list); +GLIB_AVAILABLE_IN_ALL +guint g_list_length (GList *list); +GLIB_AVAILABLE_IN_ALL +void g_list_foreach (GList *list, + GFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GList* g_list_sort (GList *list, + GCompareFunc compare_func) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_sort_with_data (GList *list, + GCompareDataFunc compare_func, + gpointer user_data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +gpointer g_list_nth_data (GList *list, + guint n); + + +#define g_list_previous(list) ((list) ? (((GList *)(list))->prev) : NULL) +#define g_list_next(list) ((list) ? (((GList *)(list))->next) : NULL) + +G_END_DECLS + +#endif /* __G_LIST_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gmacros.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gmacros.h new file mode 100755 index 00000000..430a3fbb --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gmacros.h @@ -0,0 +1,501 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +/* This file must not include any other glib header file and must thus + * not refer to variables from glibconfig.h + */ + +#ifndef __G_MACROS_H__ +#define __G_MACROS_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +/* We include stddef.h to get the system's definition of NULL + */ +#include <stddef.h> + +#ifdef __GNUC__ +#define G_GNUC_CHECK_VERSION(major, minor) \ + ((__GNUC__ > (major)) || \ + ((__GNUC__ == (major)) && \ + (__GNUC_MINOR__ >= (minor)))) +#else +#define G_GNUC_CHECK_VERSION(major, minor) 0 +#endif + +/* Here we provide G_GNUC_EXTENSION as an alias for __extension__, + * where this is valid. This allows for warningless compilation of + * "long long" types even in the presence of '-ansi -pedantic'. + */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) +#define G_GNUC_EXTENSION __extension__ +#else +#define G_GNUC_EXTENSION +#endif + +/* Every compiler that we target supports inlining, but some of them may + * complain about it if we don't say "__inline". If we have C99, or if + * we are using C++, then we can use "inline" directly. Unfortunately + * Visual Studio does not support __STDC_VERSION__, so we need to check + * whether we are on Visual Studio 2013 or earlier to see that we need to + * say "__inline" in C mode. + * Otherwise, we say "__inline" to avoid the warning. + */ +#define G_CAN_INLINE +#ifndef __cplusplus +# ifdef _MSC_VER +# if (_MSC_VER < 1900) +# define G_INLINE_DEFINE_NEEDED +# endif +# elif !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199900) +# define G_INLINE_DEFINE_NEEDED +# endif +#endif + +#ifdef G_INLINE_DEFINE_NEEDED +# undef inline +# define inline __inline +#endif + +#undef G_INLINE_DEFINE_NEEDED + +/* For historical reasons we need to continue to support those who + * define G_IMPLEMENT_INLINES to mean "don't implement this here". + */ +#ifdef G_IMPLEMENT_INLINES +# define G_INLINE_FUNC extern +# undef G_CAN_INLINE +#else +# define G_INLINE_FUNC static inline +#endif /* G_IMPLEMENT_INLINES */ + +/* Provide macros to feature the GCC function attribute. + */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +#define G_GNUC_PURE __attribute__((__pure__)) +#define G_GNUC_MALLOC __attribute__((__malloc__)) +#else +#define G_GNUC_PURE +#define G_GNUC_MALLOC +#endif + +#if __GNUC__ >= 4 +#define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__)) +#else +#define G_GNUC_NULL_TERMINATED +#endif + +/* Clang feature detection: http://clang.llvm.org/docs/LanguageExtensions.html */ +#ifndef __has_attribute +#define __has_attribute(x) 0 +#endif + +#ifndef __has_feature +#define __has_feature(x) 0 +#endif + +#ifndef __has_builtin +#define __has_builtin(x) 0 +#endif + +#if (!defined(__clang__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) || \ + (defined(__clang__) && __has_attribute(__alloc_size__)) +#define G_GNUC_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) +#define G_GNUC_ALLOC_SIZE2(x,y) __attribute__((__alloc_size__(x,y))) +#else +#define G_GNUC_ALLOC_SIZE(x) +#define G_GNUC_ALLOC_SIZE2(x,y) +#endif + +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) +#define G_GNUC_PRINTF( format_idx, arg_idx ) \ + __attribute__((__format__ (__printf__, format_idx, arg_idx))) +#define G_GNUC_SCANF( format_idx, arg_idx ) \ + __attribute__((__format__ (__scanf__, format_idx, arg_idx))) +#define G_GNUC_FORMAT( arg_idx ) \ + __attribute__((__format_arg__ (arg_idx))) +#define G_GNUC_NORETURN \ + __attribute__((__noreturn__)) +#define G_GNUC_CONST \ + __attribute__((__const__)) +#define G_GNUC_UNUSED \ + __attribute__((__unused__)) +#define G_GNUC_NO_INSTRUMENT \ + __attribute__((__no_instrument_function__)) +#else /* !__GNUC__ */ +#define G_GNUC_PRINTF( format_idx, arg_idx ) +#define G_GNUC_SCANF( format_idx, arg_idx ) +#define G_GNUC_FORMAT( arg_idx ) +#define G_GNUC_NORETURN +#define G_GNUC_CONST +#define G_GNUC_UNUSED +#define G_GNUC_NO_INSTRUMENT +#endif /* !__GNUC__ */ + +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) +#define G_GNUC_DEPRECATED __attribute__((__deprecated__)) +#else +#define G_GNUC_DEPRECATED +#endif /* __GNUC__ */ + +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +#define G_GNUC_DEPRECATED_FOR(f) \ + __attribute__((deprecated("Use " #f " instead"))) +#else +#define G_GNUC_DEPRECATED_FOR(f) G_GNUC_DEPRECATED +#endif /* __GNUC__ */ + +#ifdef __ICC +#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + _Pragma ("warning (push)") \ + _Pragma ("warning (disable:1478)") +#define G_GNUC_END_IGNORE_DEPRECATIONS \ + _Pragma ("warning (pop)") +#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#define G_GNUC_END_IGNORE_DEPRECATIONS \ + _Pragma ("GCC diagnostic pop") +#elif defined (_MSC_VER) && (_MSC_VER >= 1500) +#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + __pragma (warning (push)) \ + __pragma (warning (disable : 4996)) +#define G_GNUC_END_IGNORE_DEPRECATIONS \ + __pragma (warning (pop)) +#elif defined (__clang__) +#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") +#define G_GNUC_END_IGNORE_DEPRECATIONS \ + _Pragma("clang diagnostic pop") +#else +#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS +#define G_GNUC_END_IGNORE_DEPRECATIONS +#endif + +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) +#define G_GNUC_MAY_ALIAS __attribute__((may_alias)) +#else +#define G_GNUC_MAY_ALIAS +#endif + +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +#define G_GNUC_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +#define G_GNUC_WARN_UNUSED_RESULT +#endif /* __GNUC__ */ + +#ifndef G_DISABLE_DEPRECATED +/* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with + * macros, so we can refer to them as strings unconditionally. + * usage not-recommended since gcc-3.0 + */ +#if defined (__GNUC__) && (__GNUC__ < 3) +#define G_GNUC_FUNCTION __FUNCTION__ +#define G_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__ +#else /* !__GNUC__ */ +#define G_GNUC_FUNCTION "" +#define G_GNUC_PRETTY_FUNCTION "" +#endif /* !__GNUC__ */ +#endif /* !G_DISABLE_DEPRECATED */ + +#if __has_feature(attribute_analyzer_noreturn) && defined(__clang_analyzer__) +#define G_ANALYZER_ANALYZING 1 +#define G_ANALYZER_NORETURN __attribute__((analyzer_noreturn)) +#else +#define G_ANALYZER_ANALYZING 0 +#define G_ANALYZER_NORETURN +#endif + +#define G_STRINGIFY(macro_or_string) G_STRINGIFY_ARG (macro_or_string) +#define G_STRINGIFY_ARG(contents) #contents + +#ifndef __GI_SCANNER__ /* The static assert macro really confuses the introspection parser */ +#define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2 +#define G_PASTE(identifier1,identifier2) G_PASTE_ARGS (identifier1, identifier2) +#ifdef __COUNTER__ +#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED +#else +#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __LINE__)[(expr) ? 1 : -1] G_GNUC_UNUSED +#endif +#define G_STATIC_ASSERT_EXPR(expr) ((void) sizeof (char[(expr) ? 1 : -1])) +#endif + +/* Provide a string identifying the current code position */ +#if defined(__GNUC__) && (__GNUC__ < 3) && !defined(__cplusplus) +#define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) ":" __PRETTY_FUNCTION__ "()" +#else +#define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) +#endif + +/* Provide a string identifying the current function, non-concatenatable */ +#if defined (__GNUC__) && defined (__cplusplus) +#define G_STRFUNC ((const char*) (__PRETTY_FUNCTION__)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#define G_STRFUNC ((const char*) (__func__)) +#elif defined (__GNUC__) || (defined(_MSC_VER) && (_MSC_VER > 1300)) +#define G_STRFUNC ((const char*) (__FUNCTION__)) +#else +#define G_STRFUNC ((const char*) ("???")) +#endif + +/* Guard C code in headers, while including them from C++ */ +#ifdef __cplusplus +#define G_BEGIN_DECLS extern "C" { +#define G_END_DECLS } +#else +#define G_BEGIN_DECLS +#define G_END_DECLS +#endif + +/* Provide definitions for some commonly used macros. + * Some of them are only provided if they haven't already + * been defined. It is assumed that if they are already + * defined then the current definition is correct. + */ +#ifndef NULL +# ifdef __cplusplus +# define NULL (0L) +# else /* !__cplusplus */ +# define NULL ((void*) 0) +# endif /* !__cplusplus */ +#endif + +#ifndef FALSE +#define FALSE (0) +#endif + +#ifndef TRUE +#define TRUE (!FALSE) +#endif + +#undef MAX +#define MAX(a, b) (((a) > (b)) ? (a) : (b)) + +#undef MIN +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) + +#undef ABS +#define ABS(a) (((a) < 0) ? -(a) : (a)) + +#undef CLAMP +#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) + +/* Count the number of elements in an array. The array must be defined + * as such; using this with a dynamically allocated array will give + * incorrect results. + */ +#define G_N_ELEMENTS(arr) (sizeof (arr) / sizeof ((arr)[0])) + +/* Macros by analogy to GINT_TO_POINTER, GPOINTER_TO_INT + */ +#define GPOINTER_TO_SIZE(p) ((gsize) (p)) +#define GSIZE_TO_POINTER(s) ((gpointer) (gsize) (s)) + +/* Provide convenience macros for handling structure + * fields through their offsets. + */ + +#if (defined(__GNUC__) && __GNUC__ >= 4) || defined (_MSC_VER) +#define G_STRUCT_OFFSET(struct_type, member) \ + ((glong) offsetof (struct_type, member)) +#else +#define G_STRUCT_OFFSET(struct_type, member) \ + ((glong) ((guint8*) &((struct_type*) 0)->member)) +#endif + +#define G_STRUCT_MEMBER_P(struct_p, struct_offset) \ + ((gpointer) ((guint8*) (struct_p) + (glong) (struct_offset))) +#define G_STRUCT_MEMBER(member_type, struct_p, struct_offset) \ + (*(member_type*) G_STRUCT_MEMBER_P ((struct_p), (struct_offset))) + +/* Provide simple macro statement wrappers: + * G_STMT_START { statements; } G_STMT_END; + * This can be used as a single statement, like: + * if (x) G_STMT_START { ... } G_STMT_END; else ... + * This intentionally does not use compiler extensions like GCC's '({...})' to + * avoid portability issue or side effects when compiled with different compilers. + * MSVC complains about "while(0)": C4127: "Conditional expression is constant", + * so we use __pragma to avoid the warning since the use here is intentional. + */ +#if !(defined (G_STMT_START) && defined (G_STMT_END)) +#define G_STMT_START do +#if defined (_MSC_VER) && (_MSC_VER >= 1500) +#define G_STMT_END \ + __pragma(warning(push)) \ + __pragma(warning(disable:4127)) \ + while(0) \ + __pragma(warning(pop)) +#else +#define G_STMT_END while (0) +#endif +#endif + +/* Deprecated -- do not use. */ +#ifndef G_DISABLE_DEPRECATED +#ifdef G_DISABLE_CONST_RETURNS +#define G_CONST_RETURN +#else +#define G_CONST_RETURN const +#endif +#endif + +/* + * The G_LIKELY and G_UNLIKELY macros let the programmer give hints to + * the compiler about the expected result of an expression. Some compilers + * can use this information for optimizations. + * + * The _G_BOOLEAN_EXPR macro is intended to trigger a gcc warning when + * putting assignments in g_return_if_fail (). + */ +#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__) +#define _G_BOOLEAN_EXPR(expr) \ + G_GNUC_EXTENSION ({ \ + int _g_boolean_var_; \ + if (expr) \ + _g_boolean_var_ = 1; \ + else \ + _g_boolean_var_ = 0; \ + _g_boolean_var_; \ +}) +#define G_LIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR((expr)), 1)) +#define G_UNLIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR((expr)), 0)) +#else +#define G_LIKELY(expr) (expr) +#define G_UNLIKELY(expr) (expr) +#endif + +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) +#define G_DEPRECATED __attribute__((__deprecated__)) +#elif defined(_MSC_VER) && (_MSC_VER >= 1300) +#define G_DEPRECATED __declspec(deprecated) +#else +#define G_DEPRECATED +#endif + +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +#define G_DEPRECATED_FOR(f) __attribute__((__deprecated__("Use '" #f "' instead"))) +#elif defined(_MSC_FULL_VER) && (_MSC_FULL_VER > 140050320) +#define G_DEPRECATED_FOR(f) __declspec(deprecated("is deprecated. Use '" #f "' instead")) +#else +#define G_DEPRECATED_FOR(f) G_DEPRECATED +#endif + +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +#define G_UNAVAILABLE(maj,min) __attribute__((deprecated("Not available before " #maj "." #min))) +#elif defined(_MSC_FULL_VER) && (_MSC_FULL_VER > 140050320) +#define G_UNAVAILABLE(maj,min) __declspec(deprecated("is not available before " #maj "." #min)) +#else +#define G_UNAVAILABLE(maj,min) G_DEPRECATED +#endif + +#ifndef _GLIB_EXTERN +#define _GLIB_EXTERN extern +#endif + +/* These macros are used to mark deprecated functions in GLib headers, + * and thus have to be exposed in installed headers. But please + * do *not* use them in other projects. Instead, use G_DEPRECATED + * or define your own wrappers around it. + */ + +#ifdef GLIB_DISABLE_DEPRECATION_WARNINGS +#define GLIB_DEPRECATED _GLIB_EXTERN +#define GLIB_DEPRECATED_FOR(f) _GLIB_EXTERN +#define GLIB_UNAVAILABLE(maj,min) _GLIB_EXTERN +#else +#define GLIB_DEPRECATED G_DEPRECATED _GLIB_EXTERN +#define GLIB_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _GLIB_EXTERN +#define GLIB_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _GLIB_EXTERN +#endif + +#ifndef __GI_SCANNER__ + +#ifdef __GNUC__ + +/* these macros are private */ +#define _GLIB_AUTOPTR_FUNC_NAME(TypeName) glib_autoptr_cleanup_##TypeName +#define _GLIB_AUTOPTR_TYPENAME(TypeName) TypeName##_autoptr +#define _GLIB_AUTOPTR_LIST_FUNC_NAME(TypeName) glib_listautoptr_cleanup_##TypeName +#define _GLIB_AUTOPTR_LIST_TYPENAME(TypeName) TypeName##_listautoptr +#define _GLIB_AUTOPTR_SLIST_FUNC_NAME(TypeName) glib_slistautoptr_cleanup_##TypeName +#define _GLIB_AUTOPTR_SLIST_TYPENAME(TypeName) TypeName##_slistautoptr +#define _GLIB_AUTO_FUNC_NAME(TypeName) glib_auto_cleanup_##TypeName +#define _GLIB_CLEANUP(func) __attribute__((cleanup(func))) +#define _GLIB_DEFINE_AUTOPTR_CHAINUP(ModuleObjName, ParentName) \ + typedef ModuleObjName *_GLIB_AUTOPTR_TYPENAME(ModuleObjName); \ + static inline void _GLIB_AUTOPTR_FUNC_NAME(ModuleObjName) (ModuleObjName **_ptr) { \ + _GLIB_AUTOPTR_FUNC_NAME(ParentName) ((ParentName **) _ptr); } \ + + +/* these macros are API */ +#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func) \ + typedef TypeName *_GLIB_AUTOPTR_TYPENAME(TypeName); \ + typedef GList *_GLIB_AUTOPTR_LIST_TYPENAME(TypeName); \ + typedef GSList *_GLIB_AUTOPTR_SLIST_TYPENAME(TypeName); \ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + static inline void _GLIB_AUTOPTR_FUNC_NAME(TypeName) (TypeName **_ptr) { if (*_ptr) (func) (*_ptr); } \ + static inline void _GLIB_AUTOPTR_LIST_FUNC_NAME(TypeName) (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) func); } \ + static inline void _GLIB_AUTOPTR_SLIST_FUNC_NAME(TypeName) (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) func); } \ + G_GNUC_END_IGNORE_DEPRECATIONS +#define G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TypeName, func) \ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + static inline void _GLIB_AUTO_FUNC_NAME(TypeName) (TypeName *_ptr) { (func) (_ptr); } \ + G_GNUC_END_IGNORE_DEPRECATIONS +#define G_DEFINE_AUTO_CLEANUP_FREE_FUNC(TypeName, func, none) \ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + static inline void _GLIB_AUTO_FUNC_NAME(TypeName) (TypeName *_ptr) { if (*_ptr != none) (func) (*_ptr); } \ + G_GNUC_END_IGNORE_DEPRECATIONS +#define g_autoptr(TypeName) _GLIB_CLEANUP(_GLIB_AUTOPTR_FUNC_NAME(TypeName)) _GLIB_AUTOPTR_TYPENAME(TypeName) +#define g_autolist(TypeName) _GLIB_CLEANUP(_GLIB_AUTOPTR_LIST_FUNC_NAME(TypeName)) _GLIB_AUTOPTR_LIST_TYPENAME(TypeName) +#define g_autoslist(TypeName) _GLIB_CLEANUP(_GLIB_AUTOPTR_SLIST_FUNC_NAME(TypeName)) _GLIB_AUTOPTR_SLIST_TYPENAME(TypeName) +#define g_auto(TypeName) _GLIB_CLEANUP(_GLIB_AUTO_FUNC_NAME(TypeName)) TypeName +#define g_autofree _GLIB_CLEANUP(g_autoptr_cleanup_generic_gfree) + +#else /* not GNU C */ +/* this (dummy) macro is private */ +#define _GLIB_DEFINE_AUTOPTR_CHAINUP(ModuleObjName, ParentName) + +/* these (dummy) macros are API */ +#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func) +#define G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TypeName, func) +#define G_DEFINE_AUTO_CLEANUP_FREE_FUNC(TypeName, func, none) + +/* no declaration of g_auto() or g_autoptr() here */ +#endif /* __GNUC__ */ + +#else + +#define _GLIB_DEFINE_AUTOPTR_CHAINUP(ModuleObjName, ParentName) + +#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func) +#define G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TypeName, func) +#define G_DEFINE_AUTO_CLEANUP_FREE_FUNC(TypeName, func, none) + +#endif /* __GI_SCANNER__ */ + +#endif /* __G_MACROS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gmain.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gmain.h new file mode 100755 index 00000000..76e2c14c --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gmain.h @@ -0,0 +1,662 @@ +/* gmain.h - the GLib Main loop + * Copyright (C) 1998-2000 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_MAIN_H__ +#define __G_MAIN_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gpoll.h> +#include <glib/gslist.h> +#include <glib/gthread.h> + +G_BEGIN_DECLS + +typedef enum /*< flags >*/ +{ + G_IO_IN GLIB_SYSDEF_POLLIN, + G_IO_OUT GLIB_SYSDEF_POLLOUT, + G_IO_PRI GLIB_SYSDEF_POLLPRI, + G_IO_ERR GLIB_SYSDEF_POLLERR, + G_IO_HUP GLIB_SYSDEF_POLLHUP, + G_IO_NVAL GLIB_SYSDEF_POLLNVAL +} GIOCondition; + + +/** + * GMainContext: + * + * The `GMainContext` struct is an opaque data + * type representing a set of sources to be handled in a main loop. + */ +typedef struct _GMainContext GMainContext; + +/** + * GMainLoop: + * + * The `GMainLoop` struct is an opaque data type + * representing the main event loop of a GLib or GTK+ application. + */ +typedef struct _GMainLoop GMainLoop; + +/** + * GSource: + * + * The `GSource` struct is an opaque data type + * representing an event source. + */ +typedef struct _GSource GSource; +typedef struct _GSourcePrivate GSourcePrivate; + +/** + * GSourceCallbackFuncs: + * @ref: Called when a reference is added to the callback object + * @unref: Called when a reference to the callback object is dropped + * @get: Called to extract the callback function and data from the + * callback object. + * + * The `GSourceCallbackFuncs` struct contains + * functions for managing callback objects. + */ +typedef struct _GSourceCallbackFuncs GSourceCallbackFuncs; + +/** + * GSourceFuncs: + * @prepare: Called before all the file descriptors are polled. If the + * source can determine that it is ready here (without waiting for the + * results of the poll() call) it should return %TRUE. It can also return + * a @timeout_ value which should be the maximum timeout (in milliseconds) + * which should be passed to the poll() call. The actual timeout used will + * be -1 if all sources returned -1, or it will be the minimum of all + * the @timeout_ values returned which were >= 0. Since 2.36 this may + * be %NULL, in which case the effect is as if the function always returns + * %FALSE with a timeout of -1. If @prepare returns a + * timeout and the source also has a ready time set, then the + * lower of the two will be used. + * @check: Called after all the file descriptors are polled. The source + * should return %TRUE if it is ready to be dispatched. Note that some + * time may have passed since the previous prepare function was called, + * so the source should be checked again here. Since 2.36 this may + * be %NULL, in which case the effect is as if the function always returns + * %FALSE. + * @dispatch: Called to dispatch the event source, after it has returned + * %TRUE in either its @prepare or its @check function, or if a ready time + * has been reached. The @dispatch function receives a callback function and + * user data. The callback function may be %NULL if the source was never + * connected to a callback using g_source_set_callback(). The @dispatch + * function should call the callback function with @user_data and whatever + * additional parameters are needed for this type of event source. The + * return value of the @dispatch function should be #G_SOURCE_REMOVE if the + * source should be removed or #G_SOURCE_CONTINUE to keep it. + * @finalize: Called when the source is finalized. At this point, the source + * will have been destroyed, had its callback cleared, and have been removed + * from its #GMainContext, but it will still have its final reference count, + * so methods can be called on it from within this function. + * + * The `GSourceFuncs` struct contains a table of + * functions used to handle event sources in a generic manner. + * + * For idle sources, the prepare and check functions always return %TRUE + * to indicate that the source is always ready to be processed. The prepare + * function also returns a timeout value of 0 to ensure that the poll() call + * doesn't block (since that would be time wasted which could have been spent + * running the idle function). + * + * For timeout sources, the prepare and check functions both return %TRUE + * if the timeout interval has expired. The prepare function also returns + * a timeout value to ensure that the poll() call doesn't block too long + * and miss the next timeout. + * + * For file descriptor sources, the prepare function typically returns %FALSE, + * since it must wait until poll() has been called before it knows whether + * any events need to be processed. It sets the returned timeout to -1 to + * indicate that it doesn't mind how long the poll() call blocks. In the + * check function, it tests the results of the poll() call to see if the + * required condition has been met, and returns %TRUE if so. + */ +typedef struct _GSourceFuncs GSourceFuncs; + +/** + * GPid: + * + * A type which is used to hold a process identification. + * + * On UNIX, processes are identified by a process id (an integer), + * while Windows uses process handles (which are pointers). + * + * GPid is used in GLib only for descendant processes spawned with + * the g_spawn functions. + */ +/* defined in glibconfig.h */ + +/** + * G_PID_FORMAT: + * + * A format specifier that can be used in printf()-style format strings + * when printing a #GPid. + * + * Since: 2.50 + */ +/* defined in glibconfig.h */ + +/** + * GSourceFunc: + * @user_data: data passed to the function, set when the source was + * created with one of the above functions + * + * Specifies the type of function passed to g_timeout_add(), + * g_timeout_add_full(), g_idle_add(), and g_idle_add_full(). + * + * Returns: %FALSE if the source should be removed. #G_SOURCE_CONTINUE and + * #G_SOURCE_REMOVE are more memorable names for the return value. + */ +typedef gboolean (*GSourceFunc) (gpointer user_data); + +/** + * GChildWatchFunc: + * @pid: the process id of the child process + * @status: Status information about the child process, encoded + * in a platform-specific manner + * @user_data: user data passed to g_child_watch_add() + * + * Prototype of a #GChildWatchSource callback, called when a child + * process has exited. To interpret @status, see the documentation + * for g_spawn_check_exit_status(). + */ +typedef void (*GChildWatchFunc) (GPid pid, + gint status, + gpointer user_data); +struct _GSource +{ + /*< private >*/ + gpointer callback_data; + GSourceCallbackFuncs *callback_funcs; + + const GSourceFuncs *source_funcs; + guint ref_count; + + GMainContext *context; + + gint priority; + guint flags; + guint source_id; + + GSList *poll_fds; + + GSource *prev; + GSource *next; + + char *name; + + GSourcePrivate *priv; +}; + +struct _GSourceCallbackFuncs +{ + void (*ref) (gpointer cb_data); + void (*unref) (gpointer cb_data); + void (*get) (gpointer cb_data, + GSource *source, + GSourceFunc *func, + gpointer *data); +}; + +/** + * GSourceDummyMarshal: + * + * This is just a placeholder for #GClosureMarshal, + * which cannot be used here for dependency reasons. + */ +typedef void (*GSourceDummyMarshal) (void); + +struct _GSourceFuncs +{ + gboolean (*prepare) (GSource *source, + gint *timeout_); + gboolean (*check) (GSource *source); + gboolean (*dispatch) (GSource *source, + GSourceFunc callback, + gpointer user_data); + void (*finalize) (GSource *source); /* Can be NULL */ + + /*< private >*/ + /* For use by g_source_set_closure */ + GSourceFunc closure_callback; + GSourceDummyMarshal closure_marshal; /* Really is of type GClosureMarshal */ +}; + +/* Standard priorities */ + +/** + * G_PRIORITY_HIGH: + * + * Use this for high priority event sources. + * + * It is not used within GLib or GTK+. + */ +#define G_PRIORITY_HIGH -100 + +/** + * G_PRIORITY_DEFAULT: + * + * Use this for default priority event sources. + * + * In GLib this priority is used when adding timeout functions + * with g_timeout_add(). In GDK this priority is used for events + * from the X server. + */ +#define G_PRIORITY_DEFAULT 0 + +/** + * G_PRIORITY_HIGH_IDLE: + * + * Use this for high priority idle functions. + * + * GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations, + * and #G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is + * done to ensure that any pending resizes are processed before any + * pending redraws, so that widgets are not redrawn twice unnecessarily.) + */ +#define G_PRIORITY_HIGH_IDLE 100 + +/** + * G_PRIORITY_DEFAULT_IDLE: + * + * Use this for default priority idle functions. + * + * In GLib this priority is used when adding idle functions with + * g_idle_add(). + */ +#define G_PRIORITY_DEFAULT_IDLE 200 + +/** + * G_PRIORITY_LOW: + * + * Use this for very low priority background tasks. + * + * It is not used within GLib or GTK+. + */ +#define G_PRIORITY_LOW 300 + +/** + * G_SOURCE_REMOVE: + * + * Use this macro as the return value of a #GSourceFunc to remove + * the #GSource from the main loop. + * + * Since: 2.32 + */ +#define G_SOURCE_REMOVE FALSE + +/** + * G_SOURCE_CONTINUE: + * + * Use this macro as the return value of a #GSourceFunc to leave + * the #GSource in the main loop. + * + * Since: 2.32 + */ +#define G_SOURCE_CONTINUE TRUE + +/* GMainContext: */ + +GLIB_AVAILABLE_IN_ALL +GMainContext *g_main_context_new (void); +GLIB_AVAILABLE_IN_ALL +GMainContext *g_main_context_ref (GMainContext *context); +GLIB_AVAILABLE_IN_ALL +void g_main_context_unref (GMainContext *context); +GLIB_AVAILABLE_IN_ALL +GMainContext *g_main_context_default (void); + +GLIB_AVAILABLE_IN_ALL +gboolean g_main_context_iteration (GMainContext *context, + gboolean may_block); +GLIB_AVAILABLE_IN_ALL +gboolean g_main_context_pending (GMainContext *context); + +/* For implementation of legacy interfaces + */ +GLIB_AVAILABLE_IN_ALL +GSource *g_main_context_find_source_by_id (GMainContext *context, + guint source_id); +GLIB_AVAILABLE_IN_ALL +GSource *g_main_context_find_source_by_user_data (GMainContext *context, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GSource *g_main_context_find_source_by_funcs_user_data (GMainContext *context, + GSourceFuncs *funcs, + gpointer user_data); + +/* Low level functions for implementing custom main loops. + */ +GLIB_AVAILABLE_IN_ALL +void g_main_context_wakeup (GMainContext *context); +GLIB_AVAILABLE_IN_ALL +gboolean g_main_context_acquire (GMainContext *context); +GLIB_AVAILABLE_IN_ALL +void g_main_context_release (GMainContext *context); +GLIB_AVAILABLE_IN_ALL +gboolean g_main_context_is_owner (GMainContext *context); +GLIB_AVAILABLE_IN_ALL +gboolean g_main_context_wait (GMainContext *context, + GCond *cond, + GMutex *mutex); + +GLIB_AVAILABLE_IN_ALL +gboolean g_main_context_prepare (GMainContext *context, + gint *priority); +GLIB_AVAILABLE_IN_ALL +gint g_main_context_query (GMainContext *context, + gint max_priority, + gint *timeout_, + GPollFD *fds, + gint n_fds); +GLIB_AVAILABLE_IN_ALL +gboolean g_main_context_check (GMainContext *context, + gint max_priority, + GPollFD *fds, + gint n_fds); +GLIB_AVAILABLE_IN_ALL +void g_main_context_dispatch (GMainContext *context); + +GLIB_AVAILABLE_IN_ALL +void g_main_context_set_poll_func (GMainContext *context, + GPollFunc func); +GLIB_AVAILABLE_IN_ALL +GPollFunc g_main_context_get_poll_func (GMainContext *context); + +/* Low level functions for use by source implementations + */ +GLIB_AVAILABLE_IN_ALL +void g_main_context_add_poll (GMainContext *context, + GPollFD *fd, + gint priority); +GLIB_AVAILABLE_IN_ALL +void g_main_context_remove_poll (GMainContext *context, + GPollFD *fd); + +GLIB_AVAILABLE_IN_ALL +gint g_main_depth (void); +GLIB_AVAILABLE_IN_ALL +GSource *g_main_current_source (void); + +/* GMainContexts for other threads + */ +GLIB_AVAILABLE_IN_ALL +void g_main_context_push_thread_default (GMainContext *context); +GLIB_AVAILABLE_IN_ALL +void g_main_context_pop_thread_default (GMainContext *context); +GLIB_AVAILABLE_IN_ALL +GMainContext *g_main_context_get_thread_default (void); +GLIB_AVAILABLE_IN_ALL +GMainContext *g_main_context_ref_thread_default (void); + +/* GMainLoop: */ + +GLIB_AVAILABLE_IN_ALL +GMainLoop *g_main_loop_new (GMainContext *context, + gboolean is_running); +GLIB_AVAILABLE_IN_ALL +void g_main_loop_run (GMainLoop *loop); +GLIB_AVAILABLE_IN_ALL +void g_main_loop_quit (GMainLoop *loop); +GLIB_AVAILABLE_IN_ALL +GMainLoop *g_main_loop_ref (GMainLoop *loop); +GLIB_AVAILABLE_IN_ALL +void g_main_loop_unref (GMainLoop *loop); +GLIB_AVAILABLE_IN_ALL +gboolean g_main_loop_is_running (GMainLoop *loop); +GLIB_AVAILABLE_IN_ALL +GMainContext *g_main_loop_get_context (GMainLoop *loop); + +/* GSource: */ + +GLIB_AVAILABLE_IN_ALL +GSource *g_source_new (GSourceFuncs *source_funcs, + guint struct_size); +GLIB_AVAILABLE_IN_ALL +GSource *g_source_ref (GSource *source); +GLIB_AVAILABLE_IN_ALL +void g_source_unref (GSource *source); + +GLIB_AVAILABLE_IN_ALL +guint g_source_attach (GSource *source, + GMainContext *context); +GLIB_AVAILABLE_IN_ALL +void g_source_destroy (GSource *source); + +GLIB_AVAILABLE_IN_ALL +void g_source_set_priority (GSource *source, + gint priority); +GLIB_AVAILABLE_IN_ALL +gint g_source_get_priority (GSource *source); +GLIB_AVAILABLE_IN_ALL +void g_source_set_can_recurse (GSource *source, + gboolean can_recurse); +GLIB_AVAILABLE_IN_ALL +gboolean g_source_get_can_recurse (GSource *source); +GLIB_AVAILABLE_IN_ALL +guint g_source_get_id (GSource *source); + +GLIB_AVAILABLE_IN_ALL +GMainContext *g_source_get_context (GSource *source); + +GLIB_AVAILABLE_IN_ALL +void g_source_set_callback (GSource *source, + GSourceFunc func, + gpointer data, + GDestroyNotify notify); + +GLIB_AVAILABLE_IN_ALL +void g_source_set_funcs (GSource *source, + GSourceFuncs *funcs); +GLIB_AVAILABLE_IN_ALL +gboolean g_source_is_destroyed (GSource *source); + +GLIB_AVAILABLE_IN_ALL +void g_source_set_name (GSource *source, + const char *name); +GLIB_AVAILABLE_IN_ALL +const char * g_source_get_name (GSource *source); +GLIB_AVAILABLE_IN_ALL +void g_source_set_name_by_id (guint tag, + const char *name); + +GLIB_AVAILABLE_IN_2_36 +void g_source_set_ready_time (GSource *source, + gint64 ready_time); +GLIB_AVAILABLE_IN_2_36 +gint64 g_source_get_ready_time (GSource *source); + +#ifdef G_OS_UNIX +GLIB_AVAILABLE_IN_2_36 +gpointer g_source_add_unix_fd (GSource *source, + gint fd, + GIOCondition events); +GLIB_AVAILABLE_IN_2_36 +void g_source_modify_unix_fd (GSource *source, + gpointer tag, + GIOCondition new_events); +GLIB_AVAILABLE_IN_2_36 +void g_source_remove_unix_fd (GSource *source, + gpointer tag); +GLIB_AVAILABLE_IN_2_36 +GIOCondition g_source_query_unix_fd (GSource *source, + gpointer tag); +#endif + +/* Used to implement g_source_connect_closure and internally*/ +GLIB_AVAILABLE_IN_ALL +void g_source_set_callback_indirect (GSource *source, + gpointer callback_data, + GSourceCallbackFuncs *callback_funcs); + +GLIB_AVAILABLE_IN_ALL +void g_source_add_poll (GSource *source, + GPollFD *fd); +GLIB_AVAILABLE_IN_ALL +void g_source_remove_poll (GSource *source, + GPollFD *fd); + +GLIB_AVAILABLE_IN_ALL +void g_source_add_child_source (GSource *source, + GSource *child_source); +GLIB_AVAILABLE_IN_ALL +void g_source_remove_child_source (GSource *source, + GSource *child_source); + +GLIB_DEPRECATED_IN_2_28_FOR(g_source_get_time) +void g_source_get_current_time (GSource *source, + GTimeVal *timeval); + +GLIB_AVAILABLE_IN_ALL +gint64 g_source_get_time (GSource *source); + + /* void g_source_connect_closure (GSource *source, + GClosure *closure); + */ + +/* Specific source types + */ +GLIB_AVAILABLE_IN_ALL +GSource *g_idle_source_new (void); +GLIB_AVAILABLE_IN_ALL +GSource *g_child_watch_source_new (GPid pid); +GLIB_AVAILABLE_IN_ALL +GSource *g_timeout_source_new (guint interval); +GLIB_AVAILABLE_IN_ALL +GSource *g_timeout_source_new_seconds (guint interval); + +/* Miscellaneous functions + */ +GLIB_AVAILABLE_IN_ALL +void g_get_current_time (GTimeVal *result); +GLIB_AVAILABLE_IN_ALL +gint64 g_get_monotonic_time (void); +GLIB_AVAILABLE_IN_ALL +gint64 g_get_real_time (void); + + +/* Source manipulation by ID */ +GLIB_AVAILABLE_IN_ALL +gboolean g_source_remove (guint tag); +GLIB_AVAILABLE_IN_ALL +gboolean g_source_remove_by_user_data (gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs, + gpointer user_data); + +/** + * GClearHandleFunc: + * @handle_id: the handle ID to clear + * + * Specifies the type of function passed to g_clear_handle_id(). + * The implementation is expected to free the resource identified + * by @handle_id; for instance, if @handle_id is a #GSource ID, + * g_source_remove() can be used. + * + * Since: 2.56 + */ +typedef void (* GClearHandleFunc) (guint handle_id); + +GLIB_AVAILABLE_IN_2_56 +void g_clear_handle_id (guint *tag_ptr, + GClearHandleFunc clear_func); + +#define g_clear_handle_id(tag_ptr, clear_func) \ + G_STMT_START { \ + G_STATIC_ASSERT (sizeof *(tag_ptr) == sizeof (guint)); \ + guint *_tag_ptr = (guint *) (tag_ptr); \ + guint _handle_id; \ + \ + _handle_id = *_tag_ptr; \ + if (_handle_id > 0) \ + { \ + *_tag_ptr = 0; \ + if (clear_func != NULL) \ + clear_func (_handle_id); \ + } \ + } G_STMT_END + +/* Idles, child watchers and timeouts */ +GLIB_AVAILABLE_IN_ALL +guint g_timeout_add_full (gint priority, + guint interval, + GSourceFunc function, + gpointer data, + GDestroyNotify notify); +GLIB_AVAILABLE_IN_ALL +guint g_timeout_add (guint interval, + GSourceFunc function, + gpointer data); +GLIB_AVAILABLE_IN_ALL +guint g_timeout_add_seconds_full (gint priority, + guint interval, + GSourceFunc function, + gpointer data, + GDestroyNotify notify); +GLIB_AVAILABLE_IN_ALL +guint g_timeout_add_seconds (guint interval, + GSourceFunc function, + gpointer data); +GLIB_AVAILABLE_IN_ALL +guint g_child_watch_add_full (gint priority, + GPid pid, + GChildWatchFunc function, + gpointer data, + GDestroyNotify notify); +GLIB_AVAILABLE_IN_ALL +guint g_child_watch_add (GPid pid, + GChildWatchFunc function, + gpointer data); +GLIB_AVAILABLE_IN_ALL +guint g_idle_add (GSourceFunc function, + gpointer data); +GLIB_AVAILABLE_IN_ALL +guint g_idle_add_full (gint priority, + GSourceFunc function, + gpointer data, + GDestroyNotify notify); +GLIB_AVAILABLE_IN_ALL +gboolean g_idle_remove_by_data (gpointer data); + +GLIB_AVAILABLE_IN_ALL +void g_main_context_invoke_full (GMainContext *context, + gint priority, + GSourceFunc function, + gpointer data, + GDestroyNotify notify); +GLIB_AVAILABLE_IN_ALL +void g_main_context_invoke (GMainContext *context, + GSourceFunc function, + gpointer data); + +/* Hook for GClosure / GSource integration. Don't touch */ +GLIB_VAR GSourceFuncs g_timeout_funcs; +GLIB_VAR GSourceFuncs g_child_watch_funcs; +GLIB_VAR GSourceFuncs g_idle_funcs; +#ifdef G_OS_UNIX +GLIB_VAR GSourceFuncs g_unix_signal_funcs; +GLIB_VAR GSourceFuncs g_unix_fd_source_funcs; +#endif + +G_END_DECLS + +#endif /* __G_MAIN_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gmappedfile.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gmappedfile.h new file mode 100755 index 00000000..1a06f7c5 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gmappedfile.h @@ -0,0 +1,58 @@ +/* GLIB - Library of useful routines for C programming + * gmappedfile.h: Simplified wrapper around the mmap function + * + * Copyright 2005 Matthias Clasen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_MAPPED_FILE_H__ +#define __G_MAPPED_FILE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gbytes.h> +#include <glib/gerror.h> + +G_BEGIN_DECLS + +typedef struct _GMappedFile GMappedFile; + +GLIB_AVAILABLE_IN_ALL +GMappedFile *g_mapped_file_new (const gchar *filename, + gboolean writable, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +GMappedFile *g_mapped_file_new_from_fd (gint fd, + gboolean writable, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gsize g_mapped_file_get_length (GMappedFile *file); +GLIB_AVAILABLE_IN_ALL +gchar *g_mapped_file_get_contents (GMappedFile *file); +GLIB_AVAILABLE_IN_2_34 +GBytes * g_mapped_file_get_bytes (GMappedFile *file); +GLIB_AVAILABLE_IN_ALL +GMappedFile *g_mapped_file_ref (GMappedFile *file); +GLIB_AVAILABLE_IN_ALL +void g_mapped_file_unref (GMappedFile *file); + +GLIB_DEPRECATED_FOR(g_mapped_file_unref) +void g_mapped_file_free (GMappedFile *file); + +G_END_DECLS + +#endif /* __G_MAPPED_FILE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gmarkup.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gmarkup.h new file mode 100755 index 00000000..96375b55 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gmarkup.h @@ -0,0 +1,261 @@ +/* gmarkup.h - Simple XML-like string parser/writer + * + * Copyright 2000 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_MARKUP_H__ +#define __G_MARKUP_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <stdarg.h> + +#include <glib/gerror.h> +#include <glib/gslist.h> + +G_BEGIN_DECLS + +/** + * GMarkupError: + * @G_MARKUP_ERROR_BAD_UTF8: text being parsed was not valid UTF-8 + * @G_MARKUP_ERROR_EMPTY: document contained nothing, or only whitespace + * @G_MARKUP_ERROR_PARSE: document was ill-formed + * @G_MARKUP_ERROR_UNKNOWN_ELEMENT: error should be set by #GMarkupParser + * functions; element wasn't known + * @G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE: error should be set by #GMarkupParser + * functions; attribute wasn't known + * @G_MARKUP_ERROR_INVALID_CONTENT: error should be set by #GMarkupParser + * functions; content was invalid + * @G_MARKUP_ERROR_MISSING_ATTRIBUTE: error should be set by #GMarkupParser + * functions; a required attribute was missing + * + * Error codes returned by markup parsing. + */ +typedef enum +{ + G_MARKUP_ERROR_BAD_UTF8, + G_MARKUP_ERROR_EMPTY, + G_MARKUP_ERROR_PARSE, + /* The following are primarily intended for specific GMarkupParser + * implementations to set. + */ + G_MARKUP_ERROR_UNKNOWN_ELEMENT, + G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, + G_MARKUP_ERROR_INVALID_CONTENT, + G_MARKUP_ERROR_MISSING_ATTRIBUTE +} GMarkupError; + +/** + * G_MARKUP_ERROR: + * + * Error domain for markup parsing. + * Errors in this domain will be from the #GMarkupError enumeration. + * See #GError for information on error domains. + */ +#define G_MARKUP_ERROR g_markup_error_quark () + +GLIB_AVAILABLE_IN_ALL +GQuark g_markup_error_quark (void); + +/** + * GMarkupParseFlags: + * @G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: flag you should not use + * @G_MARKUP_TREAT_CDATA_AS_TEXT: When this flag is set, CDATA marked + * sections are not passed literally to the @passthrough function of + * the parser. Instead, the content of the section (without the + * `<![CDATA[` and `]]>`) is + * passed to the @text function. This flag was added in GLib 2.12 + * @G_MARKUP_PREFIX_ERROR_POSITION: Normally errors caught by GMarkup + * itself have line/column information prefixed to them to let the + * caller know the location of the error. When this flag is set the + * location information is also prefixed to errors generated by the + * #GMarkupParser implementation functions + * @G_MARKUP_IGNORE_QUALIFIED: Ignore (don't report) qualified + * attributes and tags, along with their contents. A qualified + * attribute or tag is one that contains ':' in its name (ie: is in + * another namespace). Since: 2.40. + * + * Flags that affect the behaviour of the parser. + */ +typedef enum +{ + G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1 << 0, + G_MARKUP_TREAT_CDATA_AS_TEXT = 1 << 1, + G_MARKUP_PREFIX_ERROR_POSITION = 1 << 2, + G_MARKUP_IGNORE_QUALIFIED = 1 << 3 +} GMarkupParseFlags; + +/** + * GMarkupParseContext: + * + * A parse context is used to parse a stream of bytes that + * you expect to contain marked-up text. + * + * See g_markup_parse_context_new(), #GMarkupParser, and so + * on for more details. + */ +typedef struct _GMarkupParseContext GMarkupParseContext; +typedef struct _GMarkupParser GMarkupParser; + +/** + * GMarkupParser: + * @start_element: Callback to invoke when the opening tag of an element + * is seen. The callback's @attribute_names and @attribute_values parameters + * are %NULL-terminated. + * @end_element: Callback to invoke when the closing tag of an element + * is seen. Note that this is also called for empty tags like + * `<empty/>`. + * @text: Callback to invoke when some text is seen (text is always + * inside an element). Note that the text of an element may be spread + * over multiple calls of this function. If the + * %G_MARKUP_TREAT_CDATA_AS_TEXT flag is set, this function is also + * called for the content of CDATA marked sections. + * @passthrough: Callback to invoke for comments, processing instructions + * and doctype declarations; if you're re-writing the parsed document, + * write the passthrough text back out in the same position. If the + * %G_MARKUP_TREAT_CDATA_AS_TEXT flag is not set, this function is also + * called for CDATA marked sections. + * @error: Callback to invoke when an error occurs. + * + * Any of the fields in #GMarkupParser can be %NULL, in which case they + * will be ignored. Except for the @error function, any of these callbacks + * can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT, + * %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT + * errors are intended to be set from these callbacks. If you set an error + * from a callback, g_markup_parse_context_parse() will report that error + * back to its caller. + */ +struct _GMarkupParser +{ + /* Called for open tags <foo bar="baz"> */ + void (*start_element) (GMarkupParseContext *context, + const gchar *element_name, + const gchar **attribute_names, + const gchar **attribute_values, + gpointer user_data, + GError **error); + + /* Called for close tags </foo> */ + void (*end_element) (GMarkupParseContext *context, + const gchar *element_name, + gpointer user_data, + GError **error); + + /* Called for character data */ + /* text is not nul-terminated */ + void (*text) (GMarkupParseContext *context, + const gchar *text, + gsize text_len, + gpointer user_data, + GError **error); + + /* Called for strings that should be re-saved verbatim in this same + * position, but are not otherwise interpretable. At the moment + * this includes comments and processing instructions. + */ + /* text is not nul-terminated. */ + void (*passthrough) (GMarkupParseContext *context, + const gchar *passthrough_text, + gsize text_len, + gpointer user_data, + GError **error); + + /* Called on error, including one set by other + * methods in the vtable. The GError should not be freed. + */ + void (*error) (GMarkupParseContext *context, + GError *error, + gpointer user_data); +}; + +GLIB_AVAILABLE_IN_ALL +GMarkupParseContext *g_markup_parse_context_new (const GMarkupParser *parser, + GMarkupParseFlags flags, + gpointer user_data, + GDestroyNotify user_data_dnotify); +GLIB_AVAILABLE_IN_2_36 +GMarkupParseContext *g_markup_parse_context_ref (GMarkupParseContext *context); +GLIB_AVAILABLE_IN_2_36 +void g_markup_parse_context_unref (GMarkupParseContext *context); +GLIB_AVAILABLE_IN_ALL +void g_markup_parse_context_free (GMarkupParseContext *context); +GLIB_AVAILABLE_IN_ALL +gboolean g_markup_parse_context_parse (GMarkupParseContext *context, + const gchar *text, + gssize text_len, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_markup_parse_context_push (GMarkupParseContext *context, + const GMarkupParser *parser, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gpointer g_markup_parse_context_pop (GMarkupParseContext *context); + +GLIB_AVAILABLE_IN_ALL +gboolean g_markup_parse_context_end_parse (GMarkupParseContext *context, + GError **error); +GLIB_AVAILABLE_IN_ALL +const gchar * g_markup_parse_context_get_element (GMarkupParseContext *context); +GLIB_AVAILABLE_IN_ALL +const GSList * g_markup_parse_context_get_element_stack (GMarkupParseContext *context); + +/* For user-constructed error messages, has no precise semantics */ +GLIB_AVAILABLE_IN_ALL +void g_markup_parse_context_get_position (GMarkupParseContext *context, + gint *line_number, + gint *char_number); +GLIB_AVAILABLE_IN_ALL +gpointer g_markup_parse_context_get_user_data (GMarkupParseContext *context); + +/* useful when saving */ +GLIB_AVAILABLE_IN_ALL +gchar* g_markup_escape_text (const gchar *text, + gssize length); + +GLIB_AVAILABLE_IN_ALL +gchar *g_markup_printf_escaped (const char *format, + ...) G_GNUC_PRINTF (1, 2); +GLIB_AVAILABLE_IN_ALL +gchar *g_markup_vprintf_escaped (const char *format, + va_list args) G_GNUC_PRINTF(1, 0); + +typedef enum +{ + G_MARKUP_COLLECT_INVALID, + G_MARKUP_COLLECT_STRING, + G_MARKUP_COLLECT_STRDUP, + G_MARKUP_COLLECT_BOOLEAN, + G_MARKUP_COLLECT_TRISTATE, + + G_MARKUP_COLLECT_OPTIONAL = (1 << 16) +} GMarkupCollectType; + + +/* useful from start_element */ +GLIB_AVAILABLE_IN_ALL +gboolean g_markup_collect_attributes (const gchar *element_name, + const gchar **attribute_names, + const gchar **attribute_values, + GError **error, + GMarkupCollectType first_type, + const gchar *first_attr, + ...); + +G_END_DECLS + +#endif /* __G_MARKUP_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gmem.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gmem.h new file mode 100755 index 00000000..9530512d --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gmem.h @@ -0,0 +1,372 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_MEM_H__ +#define __G_MEM_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gutils.h> + +G_BEGIN_DECLS + +/** + * GMemVTable: + * @malloc: function to use for allocating memory. + * @realloc: function to use for reallocating memory. + * @free: function to use to free memory. + * @calloc: function to use for allocating zero-filled memory. + * @try_malloc: function to use for allocating memory without a default error handler. + * @try_realloc: function to use for reallocating memory without a default error handler. + * + * A set of functions used to perform memory allocation. The same #GMemVTable must + * be used for all allocations in the same program; a call to g_mem_set_vtable(), + * if it exists, should be prior to any use of GLib. + * + * This functions related to this has been deprecated in 2.46, and no longer work. + */ +typedef struct _GMemVTable GMemVTable; + + +#if GLIB_SIZEOF_VOID_P > GLIB_SIZEOF_LONG +/** + * G_MEM_ALIGN: + * + * Indicates the number of bytes to which memory will be aligned on the + * current platform. + */ +# define G_MEM_ALIGN GLIB_SIZEOF_VOID_P +#else /* GLIB_SIZEOF_VOID_P <= GLIB_SIZEOF_LONG */ +# define G_MEM_ALIGN GLIB_SIZEOF_LONG +#endif /* GLIB_SIZEOF_VOID_P <= GLIB_SIZEOF_LONG */ + + +/* Memory allocation functions + */ + +GLIB_AVAILABLE_IN_ALL +void g_free (gpointer mem); + +GLIB_AVAILABLE_IN_2_34 +void g_clear_pointer (gpointer *pp, + GDestroyNotify destroy); + +GLIB_AVAILABLE_IN_ALL +gpointer g_malloc (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_ALL +gpointer g_malloc0 (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_ALL +gpointer g_realloc (gpointer mem, + gsize n_bytes) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +gpointer g_try_malloc (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_ALL +gpointer g_try_malloc0 (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_ALL +gpointer g_try_realloc (gpointer mem, + gsize n_bytes) G_GNUC_WARN_UNUSED_RESULT; + +GLIB_AVAILABLE_IN_ALL +gpointer g_malloc_n (gsize n_blocks, + gsize n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2); +GLIB_AVAILABLE_IN_ALL +gpointer g_malloc0_n (gsize n_blocks, + gsize n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2); +GLIB_AVAILABLE_IN_ALL +gpointer g_realloc_n (gpointer mem, + gsize n_blocks, + gsize n_block_bytes) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +gpointer g_try_malloc_n (gsize n_blocks, + gsize n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2); +GLIB_AVAILABLE_IN_ALL +gpointer g_try_malloc0_n (gsize n_blocks, + gsize n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2); +GLIB_AVAILABLE_IN_ALL +gpointer g_try_realloc_n (gpointer mem, + gsize n_blocks, + gsize n_block_bytes) G_GNUC_WARN_UNUSED_RESULT; + +#define g_clear_pointer(pp, destroy) \ + G_STMT_START { \ + G_STATIC_ASSERT (sizeof *(pp) == sizeof (gpointer)); \ + /* Only one access, please; work around type aliasing */ \ + union { char *in; gpointer *out; } _pp; \ + gpointer _p; \ + /* This assignment is needed to avoid a gcc warning */ \ + GDestroyNotify _destroy = (GDestroyNotify) (destroy); \ + \ + _pp.in = (char *) (pp); \ + _p = *_pp.out; \ + if (_p) \ + { \ + *_pp.out = NULL; \ + _destroy (_p); \ + } \ + } G_STMT_END + +/** + * g_steal_pointer: + * @pp: (not nullable): a pointer to a pointer + * + * Sets @pp to %NULL, returning the value that was there before. + * + * Conceptually, this transfers the ownership of the pointer from the + * referenced variable to the "caller" of the macro (ie: "steals" the + * reference). + * + * The return value will be properly typed, according to the type of + * @pp. + * + * This can be very useful when combined with g_autoptr() to prevent the + * return value of a function from being automatically freed. Consider + * the following example (which only works on GCC and clang): + * + * |[ + * GObject * + * create_object (void) + * { + * g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL); + * + * if (early_error_case) + * return NULL; + * + * return g_steal_pointer (&obj); + * } + * ]| + * + * It can also be used in similar ways for 'out' parameters and is + * particularly useful for dealing with optional out parameters: + * + * |[ + * gboolean + * get_object (GObject **obj_out) + * { + * g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL); + * + * if (early_error_case) + * return FALSE; + * + * if (obj_out) + * *obj_out = g_steal_pointer (&obj); + * + * return TRUE; + * } + * ]| + * + * In the above example, the object will be automatically freed in the + * early error case and also in the case that %NULL was given for + * @obj_out. + * + * Since: 2.44 + */ +static inline gpointer +g_steal_pointer (gpointer pp) +{ + gpointer *ptr = (gpointer *) pp; + gpointer ref; + + ref = *ptr; + *ptr = NULL; + + return ref; +} + +/* type safety */ +#define g_steal_pointer(pp) \ + (0 ? (*(pp)) : (g_steal_pointer) (pp)) + +/* Optimise: avoid the call to the (slower) _n function if we can + * determine at compile-time that no overflow happens. + */ +#if defined (__GNUC__) && (__GNUC__ >= 2) && defined (__OPTIMIZE__) +# define _G_NEW(struct_type, n_structs, func) \ + (struct_type *) (G_GNUC_EXTENSION ({ \ + gsize __n = (gsize) (n_structs); \ + gsize __s = sizeof (struct_type); \ + gpointer __p; \ + if (__s == 1) \ + __p = g_##func (__n); \ + else if (__builtin_constant_p (__n) && \ + (__s == 0 || __n <= G_MAXSIZE / __s)) \ + __p = g_##func (__n * __s); \ + else \ + __p = g_##func##_n (__n, __s); \ + __p; \ + })) +# define _G_RENEW(struct_type, mem, n_structs, func) \ + (struct_type *) (G_GNUC_EXTENSION ({ \ + gsize __n = (gsize) (n_structs); \ + gsize __s = sizeof (struct_type); \ + gpointer __p = (gpointer) (mem); \ + if (__s == 1) \ + __p = g_##func (__p, __n); \ + else if (__builtin_constant_p (__n) && \ + (__s == 0 || __n <= G_MAXSIZE / __s)) \ + __p = g_##func (__p, __n * __s); \ + else \ + __p = g_##func##_n (__p, __n, __s); \ + __p; \ + })) + +#else + +/* Unoptimised version: always call the _n() function. */ + +#define _G_NEW(struct_type, n_structs, func) \ + ((struct_type *) g_##func##_n ((n_structs), sizeof (struct_type))) +#define _G_RENEW(struct_type, mem, n_structs, func) \ + ((struct_type *) g_##func##_n (mem, (n_structs), sizeof (struct_type))) + +#endif + +/** + * g_new: + * @struct_type: the type of the elements to allocate + * @n_structs: the number of elements to allocate + * + * Allocates @n_structs elements of type @struct_type. + * The returned pointer is cast to a pointer to the given type. + * If @n_structs is 0 it returns %NULL. + * Care is taken to avoid overflow when calculating the size of the allocated block. + * + * Since the returned pointer is already casted to the right type, + * it is normally unnecessary to cast it explicitly, and doing + * so might hide memory allocation errors. + * + * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type + */ +#define g_new(struct_type, n_structs) _G_NEW (struct_type, n_structs, malloc) +/** + * g_new0: + * @struct_type: the type of the elements to allocate. + * @n_structs: the number of elements to allocate. + * + * Allocates @n_structs elements of type @struct_type, initialized to 0's. + * The returned pointer is cast to a pointer to the given type. + * If @n_structs is 0 it returns %NULL. + * Care is taken to avoid overflow when calculating the size of the allocated block. + * + * Since the returned pointer is already casted to the right type, + * it is normally unnecessary to cast it explicitly, and doing + * so might hide memory allocation errors. + * + * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type. + */ +#define g_new0(struct_type, n_structs) _G_NEW (struct_type, n_structs, malloc0) +/** + * g_renew: + * @struct_type: the type of the elements to allocate + * @mem: the currently allocated memory + * @n_structs: the number of elements to allocate + * + * Reallocates the memory pointed to by @mem, so that it now has space for + * @n_structs elements of type @struct_type. It returns the new address of + * the memory, which may have been moved. + * Care is taken to avoid overflow when calculating the size of the allocated block. + * + * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type + */ +#define g_renew(struct_type, mem, n_structs) _G_RENEW (struct_type, mem, n_structs, realloc) +/** + * g_try_new: + * @struct_type: the type of the elements to allocate + * @n_structs: the number of elements to allocate + * + * Attempts to allocate @n_structs elements of type @struct_type, and returns + * %NULL on failure. Contrast with g_new(), which aborts the program on failure. + * The returned pointer is cast to a pointer to the given type. + * The function returns %NULL when @n_structs is 0 of if an overflow occurs. + * + * Since: 2.8 + * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type + */ +#define g_try_new(struct_type, n_structs) _G_NEW (struct_type, n_structs, try_malloc) +/** + * g_try_new0: + * @struct_type: the type of the elements to allocate + * @n_structs: the number of elements to allocate + * + * Attempts to allocate @n_structs elements of type @struct_type, initialized + * to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts + * the program on failure. + * The returned pointer is cast to a pointer to the given type. + * The function returns %NULL when @n_structs is 0 or if an overflow occurs. + * + * Since: 2.8 + * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type + */ +#define g_try_new0(struct_type, n_structs) _G_NEW (struct_type, n_structs, try_malloc0) +/** + * g_try_renew: + * @struct_type: the type of the elements to allocate + * @mem: the currently allocated memory + * @n_structs: the number of elements to allocate + * + * Attempts to reallocate the memory pointed to by @mem, so that it now has + * space for @n_structs elements of type @struct_type, and returns %NULL on + * failure. Contrast with g_renew(), which aborts the program on failure. + * It returns the new address of the memory, which may have been moved. + * The function returns %NULL if an overflow occurs. + * + * Since: 2.8 + * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type + */ +#define g_try_renew(struct_type, mem, n_structs) _G_RENEW (struct_type, mem, n_structs, try_realloc) + + +/* Memory allocation virtualization for debugging purposes + * g_mem_set_vtable() has to be the very first GLib function called + * if being used + */ +struct _GMemVTable { + gpointer (*malloc) (gsize n_bytes); + gpointer (*realloc) (gpointer mem, + gsize n_bytes); + void (*free) (gpointer mem); + /* optional; set to NULL if not used ! */ + gpointer (*calloc) (gsize n_blocks, + gsize n_block_bytes); + gpointer (*try_malloc) (gsize n_bytes); + gpointer (*try_realloc) (gpointer mem, + gsize n_bytes); +}; +GLIB_DEPRECATED_IN_2_46 +void g_mem_set_vtable (GMemVTable *vtable); +GLIB_DEPRECATED_IN_2_46 +gboolean g_mem_is_system_malloc (void); + +GLIB_VAR gboolean g_mem_gc_friendly; + +/* Memory profiler and checker, has to be enabled via g_mem_set_vtable() + */ +GLIB_VAR GMemVTable *glib_mem_profiler_table; +GLIB_DEPRECATED_IN_2_46 +void g_mem_profile (void); + +G_END_DECLS + +#endif /* __G_MEM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gmessages.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gmessages.h new file mode 100755 index 00000000..cebdc165 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gmessages.h @@ -0,0 +1,624 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_MESSAGES_H__ +#define __G_MESSAGES_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <stdarg.h> +#include <glib/gtypes.h> +#include <glib/gmacros.h> +#include <glib/gvariant.h> + +G_BEGIN_DECLS + +/* calculate a string size, guaranteed to fit format + args. + */ +GLIB_AVAILABLE_IN_ALL +gsize g_printf_string_upper_bound (const gchar* format, + va_list args) G_GNUC_PRINTF(1, 0); + +/* Log level shift offset for user defined + * log levels (0-7 are used by GLib). + */ +#define G_LOG_LEVEL_USER_SHIFT (8) + +/* Glib log levels and flags. + */ +typedef enum +{ + /* log flags */ + G_LOG_FLAG_RECURSION = 1 << 0, + G_LOG_FLAG_FATAL = 1 << 1, + + /* GLib log levels */ + G_LOG_LEVEL_ERROR = 1 << 2, /* always fatal */ + G_LOG_LEVEL_CRITICAL = 1 << 3, + G_LOG_LEVEL_WARNING = 1 << 4, + G_LOG_LEVEL_MESSAGE = 1 << 5, + G_LOG_LEVEL_INFO = 1 << 6, + G_LOG_LEVEL_DEBUG = 1 << 7, + + G_LOG_LEVEL_MASK = ~(G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL) +} GLogLevelFlags; + +/* GLib log levels that are considered fatal by default */ +#define G_LOG_FATAL_MASK (G_LOG_FLAG_RECURSION | G_LOG_LEVEL_ERROR) + +typedef void (*GLogFunc) (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data); + +/* Logging mechanism + */ +GLIB_AVAILABLE_IN_ALL +guint g_log_set_handler (const gchar *log_domain, + GLogLevelFlags log_levels, + GLogFunc log_func, + gpointer user_data); +GLIB_AVAILABLE_IN_2_46 +guint g_log_set_handler_full (const gchar *log_domain, + GLogLevelFlags log_levels, + GLogFunc log_func, + gpointer user_data, + GDestroyNotify destroy); +GLIB_AVAILABLE_IN_ALL +void g_log_remove_handler (const gchar *log_domain, + guint handler_id); +GLIB_AVAILABLE_IN_ALL +void g_log_default_handler (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer unused_data); +GLIB_AVAILABLE_IN_ALL +GLogFunc g_log_set_default_handler (GLogFunc log_func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +void g_log (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *format, + ...) G_GNUC_PRINTF (3, 4); +GLIB_AVAILABLE_IN_ALL +void g_logv (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *format, + va_list args) G_GNUC_PRINTF(3, 0); +GLIB_AVAILABLE_IN_ALL +GLogLevelFlags g_log_set_fatal_mask (const gchar *log_domain, + GLogLevelFlags fatal_mask); +GLIB_AVAILABLE_IN_ALL +GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask); + +/* Structured logging mechanism. */ + +/** + * GLogWriterOutput: + * @G_LOG_WRITER_HANDLED: Log writer has handled the log entry. + * @G_LOG_WRITER_UNHANDLED: Log writer could not handle the log entry. + * + * Return values from #GLogWriterFuncs to indicate whether the given log entry + * was successfully handled by the writer, or whether there was an error in + * handling it (and hence a fallback writer should be used). + * + * If a #GLogWriterFunc ignores a log entry, it should return + * %G_LOG_WRITER_HANDLED. + * + * Since: 2.50 + */ +typedef enum +{ + G_LOG_WRITER_HANDLED = 1, + G_LOG_WRITER_UNHANDLED = 0, +} GLogWriterOutput; + +/** + * GLogField: + * @key: field name (UTF-8 string) + * @value: field value (arbitrary bytes) + * @length: length of @value, in bytes, or -1 if it is nul-terminated + * + * Structure representing a single field in a structured log entry. See + * g_log_structured() for details. + * + * Log fields may contain arbitrary values, including binary with embedded nul + * bytes. If the field contains a string, the string must be UTF-8 encoded and + * have a trailing nul byte. Otherwise, @length must be set to a non-negative + * value. + * + * Since: 2.50 + */ +typedef struct _GLogField GLogField; +struct _GLogField +{ + const gchar *key; + gconstpointer value; + gssize length; +}; + +/** + * GLogWriterFunc: + * @log_level: log level of the message + * @fields: (array length=n_fields): fields forming the message + * @n_fields: number of @fields + * @user_data: user data passed to g_log_set_writer_func() + * + * Writer function for log entries. A log entry is a collection of one or more + * #GLogFields, using the standard [field names from journal + * specification](https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html). + * See g_log_structured() for more information. + * + * Writer functions must ignore fields which they do not recognise, unless they + * can write arbitrary binary output, as field values may be arbitrary binary. + * + * @log_level is guaranteed to be included in @fields as the `PRIORITY` field, + * but is provided separately for convenience of deciding whether or where to + * output the log entry. + * + * Writer functions should return %G_LOG_WRITER_HANDLED if they handled the log + * message successfully or if they deliberately ignored it. If there was an + * error handling the message (for example, if the writer function is meant to + * send messages to a remote logging server and there is a network error), it + * should return %G_LOG_WRITER_UNHANDLED. This allows writer functions to be + * chained and fall back to simpler handlers in case of failure. + * + * Returns: %G_LOG_WRITER_HANDLED if the log entry was handled successfully; + * %G_LOG_WRITER_UNHANDLED otherwise + * Since: 2.50 + */ +typedef GLogWriterOutput (*GLogWriterFunc) (GLogLevelFlags log_level, + const GLogField *fields, + gsize n_fields, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_50 +void g_log_structured (const gchar *log_domain, + GLogLevelFlags log_level, + ...); +GLIB_AVAILABLE_IN_2_50 +void g_log_structured_array (GLogLevelFlags log_level, + const GLogField *fields, + gsize n_fields); + +GLIB_AVAILABLE_IN_2_50 +void g_log_variant (const gchar *log_domain, + GLogLevelFlags log_level, + GVariant *fields); + +GLIB_AVAILABLE_IN_2_50 +void g_log_set_writer_func (GLogWriterFunc func, + gpointer user_data, + GDestroyNotify user_data_free); + +GLIB_AVAILABLE_IN_2_50 +gboolean g_log_writer_supports_color (gint output_fd); +GLIB_AVAILABLE_IN_2_50 +gboolean g_log_writer_is_journald (gint output_fd); + +GLIB_AVAILABLE_IN_2_50 +gchar *g_log_writer_format_fields (GLogLevelFlags log_level, + const GLogField *fields, + gsize n_fields, + gboolean use_color); + +GLIB_AVAILABLE_IN_2_50 +GLogWriterOutput g_log_writer_journald (GLogLevelFlags log_level, + const GLogField *fields, + gsize n_fields, + gpointer user_data); +GLIB_AVAILABLE_IN_2_50 +GLogWriterOutput g_log_writer_standard_streams (GLogLevelFlags log_level, + const GLogField *fields, + gsize n_fields, + gpointer user_data); +GLIB_AVAILABLE_IN_2_50 +GLogWriterOutput g_log_writer_default (GLogLevelFlags log_level, + const GLogField *fields, + gsize n_fields, + gpointer user_data); + +/** + * G_DEBUG_HERE: + * + * A convenience form of g_log_structured(), recommended to be added to + * functions when debugging. It prints the current monotonic time and the code + * location using %G_STRLOC. + * + * Since: 2.50 + */ +#define G_DEBUG_HERE() \ + g_log_structured (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ + "CODE_FILE", __FILE__, \ + "CODE_LINE", G_STRINGIFY (__LINE__), \ + "CODE_FUNC", G_STRFUNC, \ + "MESSAGE", "%" G_GINT64_FORMAT ": %s", \ + g_get_monotonic_time (), G_STRLOC) + +/* internal */ +void _g_log_fallback_handler (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer unused_data); + +/* Internal functions, used to implement the following macros */ +GLIB_AVAILABLE_IN_ALL +void g_return_if_fail_warning (const char *log_domain, + const char *pretty_function, + const char *expression) G_ANALYZER_NORETURN; +GLIB_AVAILABLE_IN_ALL +void g_warn_message (const char *domain, + const char *file, + int line, + const char *func, + const char *warnexpr) G_ANALYZER_NORETURN; +GLIB_DEPRECATED +void g_assert_warning (const char *log_domain, + const char *file, + const int line, + const char *pretty_function, + const char *expression) G_GNUC_NORETURN; + +GLIB_AVAILABLE_IN_2_56 +void g_log_structured_standard (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *file, + const gchar *line, + const gchar *func, + const gchar *message_format, + ...) G_GNUC_PRINTF (6, 7); + +#ifndef G_LOG_DOMAIN +#define G_LOG_DOMAIN ((gchar*) 0) +#endif /* G_LOG_DOMAIN */ + +#if defined(G_HAVE_ISO_VARARGS) && !G_ANALYZER_ANALYZING +#ifdef G_LOG_USE_STRUCTURED +#define g_error(...) G_STMT_START { \ + g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, __VA_ARGS__); \ + for (;;) ; \ + } G_STMT_END +#define g_message(...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, __VA_ARGS__) +#define g_critical(...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, __VA_ARGS__) +#define g_warning(...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, __VA_ARGS__) +#define g_info(...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, __VA_ARGS__) +#define g_debug(...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, __VA_ARGS__) +#else +/* for(;;) ; so that GCC knows that control doesn't go past g_error(). + * Put space before ending semicolon to avoid C++ build warnings. + */ +#define g_error(...) G_STMT_START { \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_ERROR, \ + __VA_ARGS__); \ + for (;;) ; \ + } G_STMT_END +#define g_message(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ + __VA_ARGS__) +#define g_critical(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ + __VA_ARGS__) +#define g_warning(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_WARNING, \ + __VA_ARGS__) +#define g_info(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_INFO, \ + __VA_ARGS__) +#define g_debug(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_DEBUG, \ + __VA_ARGS__) +#endif +#elif defined(G_HAVE_GNUC_VARARGS) && !G_ANALYZER_ANALYZING +#ifdef G_LOG_USE_STRUCTURED +#define g_error(format...) G_STMT_START { \ + g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, format); \ + for (;;) ; \ + } G_STMT_END +#define g_message(format...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, format) +#define g_critical(format...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, format) +#define g_warning(format...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, format) +#define g_info(format...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, format) +#define g_debug(format...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, format) +#else +#define g_error(format...) G_STMT_START { \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_ERROR, \ + format); \ + for (;;) ; \ + } G_STMT_END + +#define g_message(format...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ + format) +#define g_critical(format...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ + format) +#define g_warning(format...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_WARNING, \ + format) +#define g_info(format...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_INFO, \ + format) +#define g_debug(format...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_DEBUG, \ + format) +#endif +#else /* no varargs macros */ +static void g_error (const gchar *format, ...) G_GNUC_NORETURN G_ANALYZER_NORETURN; +static void g_critical (const gchar *format, ...) G_ANALYZER_NORETURN; + +static inline void +g_error (const gchar *format, + ...) +{ + va_list args; + va_start (args, format); + g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, args); + va_end (args); + + for(;;) ; +} +static inline void +g_message (const gchar *format, + ...) +{ + va_list args; + va_start (args, format); + g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, format, args); + va_end (args); +} +static inline void +g_critical (const gchar *format, + ...) +{ + va_list args; + va_start (args, format); + g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, format, args); + va_end (args); +} +static inline void +g_warning (const gchar *format, + ...) +{ + va_list args; + va_start (args, format); + g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, format, args); + va_end (args); +} +static inline void +g_info (const gchar *format, + ...) +{ + va_list args; + va_start (args, format); + g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format, args); + va_end (args); +} +static inline void +g_debug (const gchar *format, + ...) +{ + va_list args; + va_start (args, format); + g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format, args); + va_end (args); +} +#endif /* !__GNUC__ */ + +/** + * GPrintFunc: + * @string: the message to output + * + * Specifies the type of the print handler functions. + * These are called with the complete formatted string to output. + */ +typedef void (*GPrintFunc) (const gchar *string); +GLIB_AVAILABLE_IN_ALL +void g_print (const gchar *format, + ...) G_GNUC_PRINTF (1, 2); +GLIB_AVAILABLE_IN_ALL +GPrintFunc g_set_print_handler (GPrintFunc func); +GLIB_AVAILABLE_IN_ALL +void g_printerr (const gchar *format, + ...) G_GNUC_PRINTF (1, 2); +GLIB_AVAILABLE_IN_ALL +GPrintFunc g_set_printerr_handler (GPrintFunc func); + +/** + * g_warn_if_reached: + * + * Logs a warning. + * + * Since: 2.16 + */ +#define g_warn_if_reached() \ + do { \ + g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, NULL); \ + } while (0) + +/** + * g_warn_if_fail: + * @expr: the expression to check + * + * Logs a warning if the expression is not true. + * + * Since: 2.16 + */ +#define g_warn_if_fail(expr) \ + do { \ + if G_LIKELY (expr) ; \ + else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, #expr); \ + } while (0) + +#ifdef G_DISABLE_CHECKS + +/** + * g_return_if_fail: + * @expr: the expression to check + * + * Verifies that the expression @expr, usually representing a precondition, + * evaluates to %TRUE. If the function returns a value, use + * g_return_val_if_fail() instead. + * + * If @expr evaluates to %FALSE, the current function should be considered to + * have undefined behaviour (a programmer error). The only correct solution + * to such an error is to change the module that is calling the current + * function, so that it avoids this incorrect call. + * + * To make this undefined behaviour visible, if @expr evaluates to %FALSE, + * the result is usually that a critical message is logged and the current + * function returns. + * + * If `G_DISABLE_CHECKS` is defined then the check is not performed. You + * should therefore not depend on any side effects of @expr. + * + * To debug failure of a g_return_if_fail() check, run the code under a debugger + * with `G_DEBUG=fatal-criticals` or `G_DEBUG=fatal-warnings` defined in the + * environment (see [Running GLib Applications](glib-running.html)): + * + * |[ + * G_DEBUG=fatal-warnings gdb ./my-program + * ]| + * + * Any unrelated failures can be skipped over in + * [gdb](https://www.gnu.org/software/gdb/) using the `continue` command. + */ +#define g_return_if_fail(expr) G_STMT_START{ (void)0; }G_STMT_END + +/** + * g_return_val_if_fail: + * @expr: the expression to check + * @val: the value to return from the current function + * if the expression is not true + * + * Verifies that the expression @expr, usually representing a precondition, + * evaluates to %TRUE. If the function does not return a value, use + * g_return_if_fail() instead. + * + * If @expr evaluates to %FALSE, the current function should be considered to + * have undefined behaviour (a programmer error). The only correct solution + * to such an error is to change the module that is calling the current + * function, so that it avoids this incorrect call. + * + * To make this undefined behaviour visible, if @expr evaluates to %FALSE, + * the result is usually that a critical message is logged and @val is + * returned from the current function. + * + * If `G_DISABLE_CHECKS` is defined then the check is not performed. You + * should therefore not depend on any side effects of @expr. + * + * See g_return_if_fail() for guidance on how to debug failure of this check. + */ +#define g_return_val_if_fail(expr,val) G_STMT_START{ (void)0; }G_STMT_END + +/** + * g_return_if_reached: + * + * Logs a critical message and returns from the current function. + * This can only be used in functions which do not return a value. + * + * See g_return_if_fail() for guidance on how to debug failure of this check. + */ +#define g_return_if_reached() G_STMT_START{ return; }G_STMT_END + +/** + * g_return_val_if_reached: + * @val: the value to return from the current function + * + * Logs a critical message and returns @val. + * + * See g_return_if_fail() for guidance on how to debug failure of this check. + */ +#define g_return_val_if_reached(val) G_STMT_START{ return (val); }G_STMT_END + +#else /* !G_DISABLE_CHECKS */ + +#define g_return_if_fail(expr) G_STMT_START{ \ + if G_LIKELY(expr) { } else \ + { \ + g_return_if_fail_warning (G_LOG_DOMAIN, \ + G_STRFUNC, \ + #expr); \ + return; \ + }; }G_STMT_END + +#define g_return_val_if_fail(expr,val) G_STMT_START{ \ + if G_LIKELY(expr) { } else \ + { \ + g_return_if_fail_warning (G_LOG_DOMAIN, \ + G_STRFUNC, \ + #expr); \ + return (val); \ + }; }G_STMT_END + +#define g_return_if_reached() G_STMT_START{ \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ + "file %s: line %d (%s): should not be reached", \ + __FILE__, \ + __LINE__, \ + G_STRFUNC); \ + return; }G_STMT_END + +#define g_return_val_if_reached(val) G_STMT_START{ \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ + "file %s: line %d (%s): should not be reached", \ + __FILE__, \ + __LINE__, \ + G_STRFUNC); \ + return (val); }G_STMT_END + +#endif /* !G_DISABLE_CHECKS */ + +G_END_DECLS + +#endif /* __G_MESSAGES_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gnode.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gnode.h new file mode 100755 index 00000000..b7220a44 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gnode.h @@ -0,0 +1,322 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_NODE_H__ +#define __G_NODE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gmem.h> + +G_BEGIN_DECLS + +typedef struct _GNode GNode; + +/* Tree traverse flags */ +typedef enum +{ + G_TRAVERSE_LEAVES = 1 << 0, + G_TRAVERSE_NON_LEAVES = 1 << 1, + G_TRAVERSE_ALL = G_TRAVERSE_LEAVES | G_TRAVERSE_NON_LEAVES, + G_TRAVERSE_MASK = 0x03, + G_TRAVERSE_LEAFS = G_TRAVERSE_LEAVES, + G_TRAVERSE_NON_LEAFS = G_TRAVERSE_NON_LEAVES +} GTraverseFlags; + +/* Tree traverse orders */ +typedef enum +{ + G_IN_ORDER, + G_PRE_ORDER, + G_POST_ORDER, + G_LEVEL_ORDER +} GTraverseType; + +typedef gboolean (*GNodeTraverseFunc) (GNode *node, + gpointer data); +typedef void (*GNodeForeachFunc) (GNode *node, + gpointer data); + +/** + * GCopyFunc: + * @src: (not nullable): A pointer to the data which should be copied + * @data: Additional data + * + * A function of this signature is used to copy the node data + * when doing a deep-copy of a tree. + * + * Returns: (not nullable): A pointer to the copy + * + * Since: 2.4 + */ +typedef gpointer (*GCopyFunc) (gconstpointer src, + gpointer data); + +/* N-way tree implementation + */ +struct _GNode +{ + gpointer data; + GNode *next; + GNode *prev; + GNode *parent; + GNode *children; +}; + +/** + * G_NODE_IS_ROOT: + * @node: a #GNode + * + * Returns %TRUE if a #GNode is the root of a tree. + * + * Returns: %TRUE if the #GNode is the root of a tree + * (i.e. it has no parent or siblings) + */ +#define G_NODE_IS_ROOT(node) (((GNode*) (node))->parent == NULL && \ + ((GNode*) (node))->prev == NULL && \ + ((GNode*) (node))->next == NULL) + +/** + * G_NODE_IS_LEAF: + * @node: a #GNode + * + * Returns %TRUE if a #GNode is a leaf node. + * + * Returns: %TRUE if the #GNode is a leaf node + * (i.e. it has no children) + */ +#define G_NODE_IS_LEAF(node) (((GNode*) (node))->children == NULL) + +GLIB_AVAILABLE_IN_ALL +GNode* g_node_new (gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_node_destroy (GNode *root); +GLIB_AVAILABLE_IN_ALL +void g_node_unlink (GNode *node); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_copy_deep (GNode *node, + GCopyFunc copy_func, + gpointer data); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_copy (GNode *node); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_insert (GNode *parent, + gint position, + GNode *node); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_insert_before (GNode *parent, + GNode *sibling, + GNode *node); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_insert_after (GNode *parent, + GNode *sibling, + GNode *node); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_prepend (GNode *parent, + GNode *node); +GLIB_AVAILABLE_IN_ALL +guint g_node_n_nodes (GNode *root, + GTraverseFlags flags); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_get_root (GNode *node); +GLIB_AVAILABLE_IN_ALL +gboolean g_node_is_ancestor (GNode *node, + GNode *descendant); +GLIB_AVAILABLE_IN_ALL +guint g_node_depth (GNode *node); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_find (GNode *root, + GTraverseType order, + GTraverseFlags flags, + gpointer data); + +/* convenience macros */ +/** + * g_node_append: + * @parent: the #GNode to place the new #GNode under + * @node: the #GNode to insert + * + * Inserts a #GNode as the last child of the given parent. + * + * Returns: the inserted #GNode + */ +#define g_node_append(parent, node) \ + g_node_insert_before ((parent), NULL, (node)) + +/** + * g_node_insert_data: + * @parent: the #GNode to place the new #GNode under + * @position: the position to place the new #GNode at. If position is -1, + * the new #GNode is inserted as the last child of @parent + * @data: the data for the new #GNode + * + * Inserts a new #GNode at the given position. + * + * Returns: the new #GNode + */ +#define g_node_insert_data(parent, position, data) \ + g_node_insert ((parent), (position), g_node_new (data)) + +/** + * g_node_insert_data_after: + * @parent: the #GNode to place the new #GNode under + * @sibling: the sibling #GNode to place the new #GNode after + * @data: the data for the new #GNode + * + * Inserts a new #GNode after the given sibling. + * + * Returns: the new #GNode + */ + +#define g_node_insert_data_after(parent, sibling, data) \ + g_node_insert_after ((parent), (sibling), g_node_new (data)) +/** + * g_node_insert_data_before: + * @parent: the #GNode to place the new #GNode under + * @sibling: the sibling #GNode to place the new #GNode before + * @data: the data for the new #GNode + * + * Inserts a new #GNode before the given sibling. + * + * Returns: the new #GNode + */ +#define g_node_insert_data_before(parent, sibling, data) \ + g_node_insert_before ((parent), (sibling), g_node_new (data)) + +/** + * g_node_prepend_data: + * @parent: the #GNode to place the new #GNode under + * @data: the data for the new #GNode + * + * Inserts a new #GNode as the first child of the given parent. + * + * Returns: the new #GNode + */ +#define g_node_prepend_data(parent, data) \ + g_node_prepend ((parent), g_node_new (data)) + +/** + * g_node_append_data: + * @parent: the #GNode to place the new #GNode under + * @data: the data for the new #GNode + * + * Inserts a new #GNode as the last child of the given parent. + * + * Returns: the new #GNode + */ +#define g_node_append_data(parent, data) \ + g_node_insert_before ((parent), NULL, g_node_new (data)) + +/* traversal function, assumes that 'node' is root + * (only traverses 'node' and its subtree). + * this function is just a high level interface to + * low level traversal functions, optimized for speed. + */ +GLIB_AVAILABLE_IN_ALL +void g_node_traverse (GNode *root, + GTraverseType order, + GTraverseFlags flags, + gint max_depth, + GNodeTraverseFunc func, + gpointer data); + +/* return the maximum tree height starting with 'node', this is an expensive + * operation, since we need to visit all nodes. this could be shortened by + * adding 'guint height' to struct _GNode, but then again, this is not very + * often needed, and would make g_node_insert() more time consuming. + */ +GLIB_AVAILABLE_IN_ALL +guint g_node_max_height (GNode *root); + +GLIB_AVAILABLE_IN_ALL +void g_node_children_foreach (GNode *node, + GTraverseFlags flags, + GNodeForeachFunc func, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_node_reverse_children (GNode *node); +GLIB_AVAILABLE_IN_ALL +guint g_node_n_children (GNode *node); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_nth_child (GNode *node, + guint n); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_last_child (GNode *node); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_find_child (GNode *node, + GTraverseFlags flags, + gpointer data); +GLIB_AVAILABLE_IN_ALL +gint g_node_child_position (GNode *node, + GNode *child); +GLIB_AVAILABLE_IN_ALL +gint g_node_child_index (GNode *node, + gpointer data); + +GLIB_AVAILABLE_IN_ALL +GNode* g_node_first_sibling (GNode *node); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_last_sibling (GNode *node); + +/** + * g_node_prev_sibling: + * @node: a #GNode + * + * Gets the previous sibling of a #GNode. + * + * Returns: the previous sibling of @node, or %NULL if @node is the first + * node or %NULL + */ +#define g_node_prev_sibling(node) ((node) ? \ + ((GNode*) (node))->prev : NULL) + +/** + * g_node_next_sibling: + * @node: a #GNode + * + * Gets the next sibling of a #GNode. + * + * Returns: the next sibling of @node, or %NULL if @node is the last node + * or %NULL + */ +#define g_node_next_sibling(node) ((node) ? \ + ((GNode*) (node))->next : NULL) + +/** + * g_node_first_child: + * @node: a #GNode + * + * Gets the first child of a #GNode. + * + * Returns: the first child of @node, or %NULL if @node is %NULL + * or has no children + */ +#define g_node_first_child(node) ((node) ? \ + ((GNode*) (node))->children : NULL) + +G_END_DECLS + +#endif /* __G_NODE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/goption.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/goption.h new file mode 100755 index 00000000..83d4f77f --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/goption.h @@ -0,0 +1,387 @@ +/* goption.h - Option parser + * + * Copyright (C) 2004 Anders Carlsson <andersca@gnome.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_OPTION_H__ +#define __G_OPTION_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gerror.h> +#include <glib/gquark.h> + +G_BEGIN_DECLS + +/** + * GOptionContext: + * + * A `GOptionContext` struct defines which options + * are accepted by the commandline option parser. The struct has only private + * fields and should not be directly accessed. + */ +typedef struct _GOptionContext GOptionContext; + +/** + * GOptionGroup: + * + * A `GOptionGroup` struct defines the options in a single + * group. The struct has only private fields and should not be directly accessed. + * + * All options in a group share the same translation function. Libraries which + * need to parse commandline options are expected to provide a function for + * getting a `GOptionGroup` holding their options, which + * the application can then add to its #GOptionContext. + */ +typedef struct _GOptionGroup GOptionGroup; +typedef struct _GOptionEntry GOptionEntry; + +/** + * GOptionFlags: + * @G_OPTION_FLAG_NONE: No flags. Since: 2.42. + * @G_OPTION_FLAG_HIDDEN: The option doesn't appear in `--help` output. + * @G_OPTION_FLAG_IN_MAIN: The option appears in the main section of the + * `--help` output, even if it is defined in a group. + * @G_OPTION_FLAG_REVERSE: For options of the %G_OPTION_ARG_NONE kind, this + * flag indicates that the sense of the option is reversed. + * @G_OPTION_FLAG_NO_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, + * this flag indicates that the callback does not take any argument + * (like a %G_OPTION_ARG_NONE option). Since 2.8 + * @G_OPTION_FLAG_FILENAME: For options of the %G_OPTION_ARG_CALLBACK + * kind, this flag indicates that the argument should be passed to the + * callback in the GLib filename encoding rather than UTF-8. Since 2.8 + * @G_OPTION_FLAG_OPTIONAL_ARG: For options of the %G_OPTION_ARG_CALLBACK + * kind, this flag indicates that the argument supply is optional. + * If no argument is given then data of %GOptionParseFunc will be + * set to NULL. Since 2.8 + * @G_OPTION_FLAG_NOALIAS: This flag turns off the automatic conflict + * resolution which prefixes long option names with `groupname-` if + * there is a conflict. This option should only be used in situations + * where aliasing is necessary to model some legacy commandline interface. + * It is not safe to use this option, unless all option groups are under + * your direct control. Since 2.8. + * + * Flags which modify individual options. + */ +typedef enum +{ + G_OPTION_FLAG_NONE = 0, + G_OPTION_FLAG_HIDDEN = 1 << 0, + G_OPTION_FLAG_IN_MAIN = 1 << 1, + G_OPTION_FLAG_REVERSE = 1 << 2, + G_OPTION_FLAG_NO_ARG = 1 << 3, + G_OPTION_FLAG_FILENAME = 1 << 4, + G_OPTION_FLAG_OPTIONAL_ARG = 1 << 5, + G_OPTION_FLAG_NOALIAS = 1 << 6 +} GOptionFlags; + +/** + * GOptionArg: + * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags. + * @G_OPTION_ARG_STRING: The option takes a string argument. + * @G_OPTION_ARG_INT: The option takes an integer argument. + * @G_OPTION_ARG_CALLBACK: The option provides a callback (of type + * #GOptionArgFunc) to parse the extra argument. + * @G_OPTION_ARG_FILENAME: The option takes a filename as argument. + * @G_OPTION_ARG_STRING_ARRAY: The option takes a string argument, multiple + * uses of the option are collected into an array of strings. + * @G_OPTION_ARG_FILENAME_ARRAY: The option takes a filename as argument, + * multiple uses of the option are collected into an array of strings. + * @G_OPTION_ARG_DOUBLE: The option takes a double argument. The argument + * can be formatted either for the user's locale or for the "C" locale. + * Since 2.12 + * @G_OPTION_ARG_INT64: The option takes a 64-bit integer. Like + * %G_OPTION_ARG_INT but for larger numbers. The number can be in + * decimal base, or in hexadecimal (when prefixed with `0x`, for + * example, `0xffffffff`). Since 2.12 + * + * The #GOptionArg enum values determine which type of extra argument the + * options expect to find. If an option expects an extra argument, it can + * be specified in several ways; with a short option: `-x arg`, with a long + * option: `--name arg` or combined in a single argument: `--name=arg`. + */ +typedef enum +{ + G_OPTION_ARG_NONE, + G_OPTION_ARG_STRING, + G_OPTION_ARG_INT, + G_OPTION_ARG_CALLBACK, + G_OPTION_ARG_FILENAME, + G_OPTION_ARG_STRING_ARRAY, + G_OPTION_ARG_FILENAME_ARRAY, + G_OPTION_ARG_DOUBLE, + G_OPTION_ARG_INT64 +} GOptionArg; + +/** + * GOptionArgFunc: + * @option_name: The name of the option being parsed. This will be either a + * single dash followed by a single letter (for a short name) or two dashes + * followed by a long option name. + * @value: The value to be parsed. + * @data: User data added to the #GOptionGroup containing the option when it + * was created with g_option_group_new() + * @error: A return location for errors. The error code %G_OPTION_ERROR_FAILED + * is intended to be used for errors in #GOptionArgFunc callbacks. + * + * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK + * options. + * + * Returns: %TRUE if the option was successfully parsed, %FALSE if an error + * occurred, in which case @error should be set with g_set_error() + */ +typedef gboolean (*GOptionArgFunc) (const gchar *option_name, + const gchar *value, + gpointer data, + GError **error); + +/** + * GOptionParseFunc: + * @context: The active #GOptionContext + * @group: The group to which the function belongs + * @data: User data added to the #GOptionGroup containing the option when it + * was created with g_option_group_new() + * @error: A return location for error details + * + * The type of function that can be called before and after parsing. + * + * Returns: %TRUE if the function completed successfully, %FALSE if an error + * occurred, in which case @error should be set with g_set_error() + */ +typedef gboolean (*GOptionParseFunc) (GOptionContext *context, + GOptionGroup *group, + gpointer data, + GError **error); + +/** + * GOptionErrorFunc: + * @context: The active #GOptionContext + * @group: The group to which the function belongs + * @data: User data added to the #GOptionGroup containing the option when it + * was created with g_option_group_new() + * @error: The #GError containing details about the parse error + * + * The type of function to be used as callback when a parse error occurs. + */ +typedef void (*GOptionErrorFunc) (GOptionContext *context, + GOptionGroup *group, + gpointer data, + GError **error); + +/** + * G_OPTION_ERROR: + * + * Error domain for option parsing. Errors in this domain will + * be from the #GOptionError enumeration. See #GError for information on + * error domains. + */ +#define G_OPTION_ERROR (g_option_error_quark ()) + +/** + * GOptionError: + * @G_OPTION_ERROR_UNKNOWN_OPTION: An option was not known to the parser. + * This error will only be reported, if the parser hasn't been instructed + * to ignore unknown options, see g_option_context_set_ignore_unknown_options(). + * @G_OPTION_ERROR_BAD_VALUE: A value couldn't be parsed. + * @G_OPTION_ERROR_FAILED: A #GOptionArgFunc callback failed. + * + * Error codes returned by option parsing. + */ +typedef enum +{ + G_OPTION_ERROR_UNKNOWN_OPTION, + G_OPTION_ERROR_BAD_VALUE, + G_OPTION_ERROR_FAILED +} GOptionError; + +GLIB_AVAILABLE_IN_ALL +GQuark g_option_error_quark (void); + +/** + * GOptionEntry: + * @long_name: The long name of an option can be used to specify it + * in a commandline as `--long_name`. Every option must have a + * long name. To resolve conflicts if multiple option groups contain + * the same long name, it is also possible to specify the option as + * `--groupname-long_name`. + * @short_name: If an option has a short name, it can be specified + * `-short_name` in a commandline. @short_name must be a printable + * ASCII character different from '-', or zero if the option has no + * short name. + * @flags: Flags from #GOptionFlags + * @arg: The type of the option, as a #GOptionArg + * @arg_data: If the @arg type is %G_OPTION_ARG_CALLBACK, then @arg_data + * must point to a #GOptionArgFunc callback function, which will be + * called to handle the extra argument. Otherwise, @arg_data is a + * pointer to a location to store the value, the required type of + * the location depends on the @arg type: + * - %G_OPTION_ARG_NONE: %gboolean + * - %G_OPTION_ARG_STRING: %gchar* + * - %G_OPTION_ARG_INT: %gint + * - %G_OPTION_ARG_FILENAME: %gchar* + * - %G_OPTION_ARG_STRING_ARRAY: %gchar** + * - %G_OPTION_ARG_FILENAME_ARRAY: %gchar** + * - %G_OPTION_ARG_DOUBLE: %gdouble + * If @arg type is %G_OPTION_ARG_STRING or %G_OPTION_ARG_FILENAME, + * the location will contain a newly allocated string if the option + * was given. That string needs to be freed by the callee using g_free(). + * Likewise if @arg type is %G_OPTION_ARG_STRING_ARRAY or + * %G_OPTION_ARG_FILENAME_ARRAY, the data should be freed using g_strfreev(). + * @description: the description for the option in `--help` + * output. The @description is translated using the @translate_func + * of the group, see g_option_group_set_translation_domain(). + * @arg_description: The placeholder to use for the extra argument parsed + * by the option in `--help` output. The @arg_description is translated + * using the @translate_func of the group, see + * g_option_group_set_translation_domain(). + * + * A GOptionEntry struct defines a single option. To have an effect, they + * must be added to a #GOptionGroup with g_option_context_add_main_entries() + * or g_option_group_add_entries(). + */ +struct _GOptionEntry +{ + const gchar *long_name; + gchar short_name; + gint flags; + + GOptionArg arg; + gpointer arg_data; + + const gchar *description; + const gchar *arg_description; +}; + +/** + * G_OPTION_REMAINING: + * + * If a long option in the main group has this name, it is not treated as a + * regular option. Instead it collects all non-option arguments which would + * otherwise be left in `argv`. The option must be of type + * %G_OPTION_ARG_CALLBACK, %G_OPTION_ARG_STRING_ARRAY + * or %G_OPTION_ARG_FILENAME_ARRAY. + * + * + * Using #G_OPTION_REMAINING instead of simply scanning `argv` + * for leftover arguments has the advantage that GOption takes care of + * necessary encoding conversions for strings or filenames. + * + * Since: 2.6 + */ +#define G_OPTION_REMAINING "" + +GLIB_AVAILABLE_IN_ALL +GOptionContext *g_option_context_new (const gchar *parameter_string); +GLIB_AVAILABLE_IN_ALL +void g_option_context_set_summary (GOptionContext *context, + const gchar *summary); +GLIB_AVAILABLE_IN_ALL +const gchar * g_option_context_get_summary (GOptionContext *context); +GLIB_AVAILABLE_IN_ALL +void g_option_context_set_description (GOptionContext *context, + const gchar *description); +GLIB_AVAILABLE_IN_ALL +const gchar * g_option_context_get_description (GOptionContext *context); +GLIB_AVAILABLE_IN_ALL +void g_option_context_free (GOptionContext *context); +GLIB_AVAILABLE_IN_ALL +void g_option_context_set_help_enabled (GOptionContext *context, + gboolean help_enabled); +GLIB_AVAILABLE_IN_ALL +gboolean g_option_context_get_help_enabled (GOptionContext *context); +GLIB_AVAILABLE_IN_ALL +void g_option_context_set_ignore_unknown_options (GOptionContext *context, + gboolean ignore_unknown); +GLIB_AVAILABLE_IN_ALL +gboolean g_option_context_get_ignore_unknown_options (GOptionContext *context); + +GLIB_AVAILABLE_IN_2_44 +void g_option_context_set_strict_posix (GOptionContext *context, + gboolean strict_posix); +GLIB_AVAILABLE_IN_2_44 +gboolean g_option_context_get_strict_posix (GOptionContext *context); + +GLIB_AVAILABLE_IN_ALL +void g_option_context_add_main_entries (GOptionContext *context, + const GOptionEntry *entries, + const gchar *translation_domain); +GLIB_AVAILABLE_IN_ALL +gboolean g_option_context_parse (GOptionContext *context, + gint *argc, + gchar ***argv, + GError **error); +GLIB_AVAILABLE_IN_2_40 +gboolean g_option_context_parse_strv (GOptionContext *context, + gchar ***arguments, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_option_context_set_translate_func (GOptionContext *context, + GTranslateFunc func, + gpointer data, + GDestroyNotify destroy_notify); +GLIB_AVAILABLE_IN_ALL +void g_option_context_set_translation_domain (GOptionContext *context, + const gchar *domain); + +GLIB_AVAILABLE_IN_ALL +void g_option_context_add_group (GOptionContext *context, + GOptionGroup *group); +GLIB_AVAILABLE_IN_ALL +void g_option_context_set_main_group (GOptionContext *context, + GOptionGroup *group); +GLIB_AVAILABLE_IN_ALL +GOptionGroup *g_option_context_get_main_group (GOptionContext *context); +GLIB_AVAILABLE_IN_ALL +gchar *g_option_context_get_help (GOptionContext *context, + gboolean main_help, + GOptionGroup *group); + +GLIB_AVAILABLE_IN_ALL +GOptionGroup *g_option_group_new (const gchar *name, + const gchar *description, + const gchar *help_description, + gpointer user_data, + GDestroyNotify destroy); +GLIB_AVAILABLE_IN_ALL +void g_option_group_set_parse_hooks (GOptionGroup *group, + GOptionParseFunc pre_parse_func, + GOptionParseFunc post_parse_func); +GLIB_AVAILABLE_IN_ALL +void g_option_group_set_error_hook (GOptionGroup *group, + GOptionErrorFunc error_func); +GLIB_DEPRECATED_IN_2_44 +void g_option_group_free (GOptionGroup *group); +GLIB_AVAILABLE_IN_2_44 +GOptionGroup *g_option_group_ref (GOptionGroup *group); +GLIB_AVAILABLE_IN_2_44 +void g_option_group_unref (GOptionGroup *group); +GLIB_AVAILABLE_IN_ALL +void g_option_group_add_entries (GOptionGroup *group, + const GOptionEntry *entries); +GLIB_AVAILABLE_IN_ALL +void g_option_group_set_translate_func (GOptionGroup *group, + GTranslateFunc func, + gpointer data, + GDestroyNotify destroy_notify); +GLIB_AVAILABLE_IN_ALL +void g_option_group_set_translation_domain (GOptionGroup *group, + const gchar *domain); + +G_END_DECLS + +#endif /* __G_OPTION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gpattern.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gpattern.h new file mode 100755 index 00000000..bd9e4a7a --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gpattern.h @@ -0,0 +1,53 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997, 1999 Peter Mattis, Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_PATTERN_H__ +#define __G_PATTERN_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + + +typedef struct _GPatternSpec GPatternSpec; + +GLIB_AVAILABLE_IN_ALL +GPatternSpec* g_pattern_spec_new (const gchar *pattern); +GLIB_AVAILABLE_IN_ALL +void g_pattern_spec_free (GPatternSpec *pspec); +GLIB_AVAILABLE_IN_ALL +gboolean g_pattern_spec_equal (GPatternSpec *pspec1, + GPatternSpec *pspec2); +GLIB_AVAILABLE_IN_ALL +gboolean g_pattern_match (GPatternSpec *pspec, + guint string_length, + const gchar *string, + const gchar *string_reversed); +GLIB_AVAILABLE_IN_ALL +gboolean g_pattern_match_string (GPatternSpec *pspec, + const gchar *string); +GLIB_AVAILABLE_IN_ALL +gboolean g_pattern_match_simple (const gchar *pattern, + const gchar *string); + +G_END_DECLS + +#endif /* __G_PATTERN_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gpoll.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gpoll.h new file mode 100755 index 00000000..2cbd6972 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gpoll.h @@ -0,0 +1,120 @@ +/* gpoll.h - poll(2) support + * Copyright (C) 2008 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_POLL_H__ +#define __G_POLL_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (__G_MAIN_H__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glibconfig.h> +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +/* Any definitions using GPollFD or GPollFunc are primarily + * for Unix and not guaranteed to be the compatible on all + * operating systems on which GLib runs. Right now, the + * GLib does use these functions on Win32 as well, but interprets + * them in a fairly different way than on Unix. If you use + * these definitions, you are should be prepared to recode + * for different operating systems. + * + * Note that on systems with a working poll(2), that function is used + * in place of g_poll(). Thus g_poll() must have the same signature as + * poll(), meaning GPollFD must have the same layout as struct pollfd. + * + * On Win32, the fd in a GPollFD should be Win32 HANDLE (*not* a file + * descriptor as provided by the C runtime) that can be used by + * MsgWaitForMultipleObjects. This does *not* include file handles + * from CreateFile, SOCKETs, nor pipe handles. (But you can use + * WSAEventSelect to signal events when a SOCKET is readable). + * + * On Win32, fd can also be the special value G_WIN32_MSG_HANDLE to + * indicate polling for messages. + * + * But note that G_WIN32_MSG_HANDLE GPollFDs should not be used by GDK + * (GTK) programs, as GDK itself wants to read messages and convert them + * to GDK events. + * + * So, unless you really know what you are doing, it's best not to try + * to use the main loop polling stuff for your own needs on + * Windows. + */ +typedef struct _GPollFD GPollFD; + +/** + * GPollFunc: + * @ufds: an array of #GPollFD elements + * @nfsd: the number of elements in @ufds + * @timeout_: the maximum time to wait for an event of the file descriptors. + * A negative value indicates an infinite timeout. + * + * Specifies the type of function passed to g_main_context_set_poll_func(). + * The semantics of the function should match those of the poll() system call. + * + * Returns: the number of #GPollFD elements which have events or errors + * reported, or -1 if an error occurred. + */ +typedef gint (*GPollFunc) (GPollFD *ufds, + guint nfsd, + gint timeout_); + +/** + * GPollFD: + * @fd: the file descriptor to poll (or a HANDLE on Win32) + * @events: a bitwise combination from #GIOCondition, specifying which + * events should be polled for. Typically for reading from a file + * descriptor you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and + * for writing you would use %G_IO_OUT | %G_IO_ERR. + * @revents: a bitwise combination of flags from #GIOCondition, returned + * from the poll() function to indicate which events occurred. + * + * Represents a file descriptor, which events to poll for, and which events + * occurred. + */ +struct _GPollFD +{ +#if defined (G_OS_WIN32) && GLIB_SIZEOF_VOID_P == 8 +#ifndef __GTK_DOC_IGNORE__ + gint64 fd; +#endif +#else + gint fd; +#endif + gushort events; + gushort revents; +}; + +/** + * G_POLLFD_FORMAT: + * + * A format specifier that can be used in printf()-style format strings + * when printing the @fd member of a #GPollFD. + */ +/* defined in glibconfig.h */ + +GLIB_AVAILABLE_IN_ALL +gint +g_poll (GPollFD *fds, + guint nfds, + gint timeout); + +G_END_DECLS + +#endif /* __G_POLL_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gprimes.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gprimes.h new file mode 100755 index 00000000..0b6ea850 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gprimes.h @@ -0,0 +1,50 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_PRIMES_H__ +#define __G_PRIMES_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +/* Prime numbers. + */ + +/* This function returns prime numbers spaced by approximately 1.5-2.0 + * and is for use in resizing data structures which prefer + * prime-valued sizes. The closest spaced prime function returns the + * next largest prime, or the highest it knows about which is about + * MAXINT/4. + */ +GLIB_AVAILABLE_IN_ALL +guint g_spaced_primes_closest (guint num) G_GNUC_CONST; + +G_END_DECLS + +#endif /* __G_PRIMES_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gprintf.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gprintf.h new file mode 100755 index 00000000..429de7a2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gprintf.h @@ -0,0 +1,57 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997, 2002 Peter Mattis, Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_PRINTF_H__ +#define __G_PRINTF_H__ + +#include <glib.h> +#include <stdio.h> +#include <stdarg.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +gint g_printf (gchar const *format, + ...) G_GNUC_PRINTF (1, 2); +GLIB_AVAILABLE_IN_ALL +gint g_fprintf (FILE *file, + gchar const *format, + ...) G_GNUC_PRINTF (2, 3); +GLIB_AVAILABLE_IN_ALL +gint g_sprintf (gchar *string, + gchar const *format, + ...) G_GNUC_PRINTF (2, 3); + +GLIB_AVAILABLE_IN_ALL +gint g_vprintf (gchar const *format, + va_list args) G_GNUC_PRINTF(1, 0); +GLIB_AVAILABLE_IN_ALL +gint g_vfprintf (FILE *file, + gchar const *format, + va_list args) G_GNUC_PRINTF(2, 0); +GLIB_AVAILABLE_IN_ALL +gint g_vsprintf (gchar *string, + gchar const *format, + va_list args) G_GNUC_PRINTF(2, 0); +GLIB_AVAILABLE_IN_ALL +gint g_vasprintf (gchar **string, + gchar const *format, + va_list args) G_GNUC_PRINTF(2, 0); + +G_END_DECLS + +#endif /* __G_PRINTF_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gqsort.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gqsort.h new file mode 100755 index 00000000..2ecd75fa --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gqsort.h @@ -0,0 +1,45 @@ + /* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_QSORT_H__ +#define __G_QSORT_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +void g_qsort_with_data (gconstpointer pbase, + gint total_elems, + gsize size, + GCompareDataFunc compare_func, + gpointer user_data); + +G_END_DECLS + +#endif /* __G_QSORT_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gquark.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gquark.h new file mode 100755 index 00000000..1822c4bf --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gquark.h @@ -0,0 +1,68 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_QUARK_H__ +#define __G_QUARK_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +typedef guint32 GQuark; + +/* Quarks (string<->id association) + */ +GLIB_AVAILABLE_IN_ALL +GQuark g_quark_try_string (const gchar *string); +GLIB_AVAILABLE_IN_ALL +GQuark g_quark_from_static_string (const gchar *string); +GLIB_AVAILABLE_IN_ALL +GQuark g_quark_from_string (const gchar *string); +GLIB_AVAILABLE_IN_ALL +const gchar * g_quark_to_string (GQuark quark) G_GNUC_CONST; + +#define G_DEFINE_QUARK(QN, q_n) \ +GQuark \ +q_n##_quark (void) \ +{ \ + static GQuark q; \ + \ + if G_UNLIKELY (q == 0) \ + q = g_quark_from_static_string (#QN); \ + \ + return q; \ +} + +GLIB_AVAILABLE_IN_ALL +const gchar * g_intern_string (const gchar *string); +GLIB_AVAILABLE_IN_ALL +const gchar * g_intern_static_string (const gchar *string); + +G_END_DECLS + +#endif /* __G_QUARK_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gqueue.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gqueue.h new file mode 100755 index 00000000..f81f5fb4 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gqueue.h @@ -0,0 +1,190 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_QUEUE_H__ +#define __G_QUEUE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/glist.h> + +G_BEGIN_DECLS + +typedef struct _GQueue GQueue; + +/** + * GQueue: + * @head: a pointer to the first element of the queue + * @tail: a pointer to the last element of the queue + * @length: the number of elements in the queue + * + * Contains the public fields of a + * [Queue][glib-Double-ended-Queues]. + */ +struct _GQueue +{ + GList *head; + GList *tail; + guint length; +}; + +/** + * G_QUEUE_INIT: + * + * A statically-allocated #GQueue must be initialized with this + * macro before it can be used. This macro can be used to initialize + * a variable, but it cannot be assigned to a variable. In that case + * you have to use g_queue_init(). + * + * |[ + * GQueue my_queue = G_QUEUE_INIT; + * ]| + * + * Since: 2.14 + */ +#define G_QUEUE_INIT { NULL, NULL, 0 } + +/* Queues + */ +GLIB_AVAILABLE_IN_ALL +GQueue* g_queue_new (void); +GLIB_AVAILABLE_IN_ALL +void g_queue_free (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +void g_queue_free_full (GQueue *queue, + GDestroyNotify free_func); +GLIB_AVAILABLE_IN_ALL +void g_queue_init (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +void g_queue_clear (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +gboolean g_queue_is_empty (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +guint g_queue_get_length (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +void g_queue_reverse (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +GQueue * g_queue_copy (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +void g_queue_foreach (GQueue *queue, + GFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GList * g_queue_find (GQueue *queue, + gconstpointer data); +GLIB_AVAILABLE_IN_ALL +GList * g_queue_find_custom (GQueue *queue, + gconstpointer data, + GCompareFunc func); +GLIB_AVAILABLE_IN_ALL +void g_queue_sort (GQueue *queue, + GCompareDataFunc compare_func, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +void g_queue_push_head (GQueue *queue, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_queue_push_tail (GQueue *queue, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_queue_push_nth (GQueue *queue, + gpointer data, + gint n); +GLIB_AVAILABLE_IN_ALL +gpointer g_queue_pop_head (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +gpointer g_queue_pop_tail (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +gpointer g_queue_pop_nth (GQueue *queue, + guint n); +GLIB_AVAILABLE_IN_ALL +gpointer g_queue_peek_head (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +gpointer g_queue_peek_tail (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +gpointer g_queue_peek_nth (GQueue *queue, + guint n); +GLIB_AVAILABLE_IN_ALL +gint g_queue_index (GQueue *queue, + gconstpointer data); +GLIB_AVAILABLE_IN_ALL +gboolean g_queue_remove (GQueue *queue, + gconstpointer data); +GLIB_AVAILABLE_IN_ALL +guint g_queue_remove_all (GQueue *queue, + gconstpointer data); +GLIB_AVAILABLE_IN_ALL +void g_queue_insert_before (GQueue *queue, + GList *sibling, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_queue_insert_after (GQueue *queue, + GList *sibling, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_queue_insert_sorted (GQueue *queue, + gpointer data, + GCompareDataFunc func, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +void g_queue_push_head_link (GQueue *queue, + GList *link_); +GLIB_AVAILABLE_IN_ALL +void g_queue_push_tail_link (GQueue *queue, + GList *link_); +GLIB_AVAILABLE_IN_ALL +void g_queue_push_nth_link (GQueue *queue, + gint n, + GList *link_); +GLIB_AVAILABLE_IN_ALL +GList* g_queue_pop_head_link (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +GList* g_queue_pop_tail_link (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +GList* g_queue_pop_nth_link (GQueue *queue, + guint n); +GLIB_AVAILABLE_IN_ALL +GList* g_queue_peek_head_link (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +GList* g_queue_peek_tail_link (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +GList* g_queue_peek_nth_link (GQueue *queue, + guint n); +GLIB_AVAILABLE_IN_ALL +gint g_queue_link_index (GQueue *queue, + GList *link_); +GLIB_AVAILABLE_IN_ALL +void g_queue_unlink (GQueue *queue, + GList *link_); +GLIB_AVAILABLE_IN_ALL +void g_queue_delete_link (GQueue *queue, + GList *link_); + +G_END_DECLS + +#endif /* __G_QUEUE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/grand.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/grand.h new file mode 100755 index 00000000..82528c77 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/grand.h @@ -0,0 +1,99 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_RAND_H__ +#define __G_RAND_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +typedef struct _GRand GRand; + +/* GRand - a good and fast random number generator: Mersenne Twister + * see http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html for more info. + * The range functions return a value in the intervall [begin, end). + * int -> [0..2^32-1] + * int_range -> [begin..end-1] + * double -> [0..1) + * double_range -> [begin..end) + */ + +GLIB_AVAILABLE_IN_ALL +GRand* g_rand_new_with_seed (guint32 seed); +GLIB_AVAILABLE_IN_ALL +GRand* g_rand_new_with_seed_array (const guint32 *seed, + guint seed_length); +GLIB_AVAILABLE_IN_ALL +GRand* g_rand_new (void); +GLIB_AVAILABLE_IN_ALL +void g_rand_free (GRand *rand_); +GLIB_AVAILABLE_IN_ALL +GRand* g_rand_copy (GRand *rand_); +GLIB_AVAILABLE_IN_ALL +void g_rand_set_seed (GRand *rand_, + guint32 seed); +GLIB_AVAILABLE_IN_ALL +void g_rand_set_seed_array (GRand *rand_, + const guint32 *seed, + guint seed_length); + +#define g_rand_boolean(rand_) ((g_rand_int (rand_) & (1 << 15)) != 0) + +GLIB_AVAILABLE_IN_ALL +guint32 g_rand_int (GRand *rand_); +GLIB_AVAILABLE_IN_ALL +gint32 g_rand_int_range (GRand *rand_, + gint32 begin, + gint32 end); +GLIB_AVAILABLE_IN_ALL +gdouble g_rand_double (GRand *rand_); +GLIB_AVAILABLE_IN_ALL +gdouble g_rand_double_range (GRand *rand_, + gdouble begin, + gdouble end); +GLIB_AVAILABLE_IN_ALL +void g_random_set_seed (guint32 seed); + +#define g_random_boolean() ((g_random_int () & (1 << 15)) != 0) + +GLIB_AVAILABLE_IN_ALL +guint32 g_random_int (void); +GLIB_AVAILABLE_IN_ALL +gint32 g_random_int_range (gint32 begin, + gint32 end); +GLIB_AVAILABLE_IN_ALL +gdouble g_random_double (void); +GLIB_AVAILABLE_IN_ALL +gdouble g_random_double_range (gdouble begin, + gdouble end); + + +G_END_DECLS + +#endif /* __G_RAND_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gregex.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gregex.h new file mode 100755 index 00000000..45e198df --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gregex.h @@ -0,0 +1,609 @@ +/* GRegex -- regular expression API wrapper around PCRE. + * + * Copyright (C) 1999, 2000 Scott Wimer + * Copyright (C) 2004, Matthias Clasen <mclasen@redhat.com> + * Copyright (C) 2005 - 2007, Marco Barisione <marco@barisione.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_REGEX_H__ +#define __G_REGEX_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gerror.h> +#include <glib/gstring.h> + +G_BEGIN_DECLS + +/** + * GRegexError: + * @G_REGEX_ERROR_COMPILE: Compilation of the regular expression failed. + * @G_REGEX_ERROR_OPTIMIZE: Optimization of the regular expression failed. + * @G_REGEX_ERROR_REPLACE: Replacement failed due to an ill-formed replacement + * string. + * @G_REGEX_ERROR_MATCH: The match process failed. + * @G_REGEX_ERROR_INTERNAL: Internal error of the regular expression engine. + * Since 2.16 + * @G_REGEX_ERROR_STRAY_BACKSLASH: "\\" at end of pattern. Since 2.16 + * @G_REGEX_ERROR_MISSING_CONTROL_CHAR: "\\c" at end of pattern. Since 2.16 + * @G_REGEX_ERROR_UNRECOGNIZED_ESCAPE: Unrecognized character follows "\\". + * Since 2.16 + * @G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER: Numbers out of order in "{}" + * quantifier. Since 2.16 + * @G_REGEX_ERROR_QUANTIFIER_TOO_BIG: Number too big in "{}" quantifier. + * Since 2.16 + * @G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS: Missing terminating "]" for + * character class. Since 2.16 + * @G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS: Invalid escape sequence + * in character class. Since 2.16 + * @G_REGEX_ERROR_RANGE_OUT_OF_ORDER: Range out of order in character class. + * Since 2.16 + * @G_REGEX_ERROR_NOTHING_TO_REPEAT: Nothing to repeat. Since 2.16 + * @G_REGEX_ERROR_UNRECOGNIZED_CHARACTER: Unrecognized character after "(?", + * "(?<" or "(?P". Since 2.16 + * @G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS: POSIX named classes are + * supported only within a class. Since 2.16 + * @G_REGEX_ERROR_UNMATCHED_PARENTHESIS: Missing terminating ")" or ")" + * without opening "(". Since 2.16 + * @G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE: Reference to non-existent + * subpattern. Since 2.16 + * @G_REGEX_ERROR_UNTERMINATED_COMMENT: Missing terminating ")" after comment. + * Since 2.16 + * @G_REGEX_ERROR_EXPRESSION_TOO_LARGE: Regular expression too large. + * Since 2.16 + * @G_REGEX_ERROR_MEMORY_ERROR: Failed to get memory. Since 2.16 + * @G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND: Lookbehind assertion is not + * fixed length. Since 2.16 + * @G_REGEX_ERROR_MALFORMED_CONDITION: Malformed number or name after "(?(". + * Since 2.16 + * @G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES: Conditional group contains + * more than two branches. Since 2.16 + * @G_REGEX_ERROR_ASSERTION_EXPECTED: Assertion expected after "(?(". + * Since 2.16 + * @G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME: Unknown POSIX class name. + * Since 2.16 + * @G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED: POSIX collating + * elements are not supported. Since 2.16 + * @G_REGEX_ERROR_HEX_CODE_TOO_LARGE: Character value in "\\x{...}" sequence + * is too large. Since 2.16 + * @G_REGEX_ERROR_INVALID_CONDITION: Invalid condition "(?(0)". Since 2.16 + * @G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND: \\C not allowed in + * lookbehind assertion. Since 2.16 + * @G_REGEX_ERROR_INFINITE_LOOP: Recursive call could loop indefinitely. + * Since 2.16 + * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR: Missing terminator + * in subpattern name. Since 2.16 + * @G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME: Two named subpatterns have + * the same name. Since 2.16 + * @G_REGEX_ERROR_MALFORMED_PROPERTY: Malformed "\\P" or "\\p" sequence. + * Since 2.16 + * @G_REGEX_ERROR_UNKNOWN_PROPERTY: Unknown property name after "\\P" or + * "\\p". Since 2.16 + * @G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG: Subpattern name is too long + * (maximum 32 characters). Since 2.16 + * @G_REGEX_ERROR_TOO_MANY_SUBPATTERNS: Too many named subpatterns (maximum + * 10,000). Since 2.16 + * @G_REGEX_ERROR_INVALID_OCTAL_VALUE: Octal value is greater than "\\377". + * Since 2.16 + * @G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE: "DEFINE" group contains more + * than one branch. Since 2.16 + * @G_REGEX_ERROR_DEFINE_REPETION: Repeating a "DEFINE" group is not allowed. + * This error is never raised. Since: 2.16 Deprecated: 2.34 + * @G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS: Inconsistent newline options. + * Since 2.16 + * @G_REGEX_ERROR_MISSING_BACK_REFERENCE: "\\g" is not followed by a braced, + * angle-bracketed, or quoted name or number, or by a plain number. Since: 2.16 + * @G_REGEX_ERROR_INVALID_RELATIVE_REFERENCE: relative reference must not be zero. Since: 2.34 + * @G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN: the backtracing + * control verb used does not allow an argument. Since: 2.34 + * @G_REGEX_ERROR_UNKNOWN_BACKTRACKING_CONTROL_VERB: unknown backtracing + * control verb. Since: 2.34 + * @G_REGEX_ERROR_NUMBER_TOO_BIG: number is too big in escape sequence. Since: 2.34 + * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME: Missing subpattern name. Since: 2.34 + * @G_REGEX_ERROR_MISSING_DIGIT: Missing digit. Since 2.34 + * @G_REGEX_ERROR_INVALID_DATA_CHARACTER: In JavaScript compatibility mode, + * "[" is an invalid data character. Since: 2.34 + * @G_REGEX_ERROR_EXTRA_SUBPATTERN_NAME: different names for subpatterns of the + * same number are not allowed. Since: 2.34 + * @G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED: the backtracing control + * verb requires an argument. Since: 2.34 + * @G_REGEX_ERROR_INVALID_CONTROL_CHAR: "\\c" must be followed by an ASCII + * character. Since: 2.34 + * @G_REGEX_ERROR_MISSING_NAME: "\\k" is not followed by a braced, angle-bracketed, or + * quoted name. Since: 2.34 + * @G_REGEX_ERROR_NOT_SUPPORTED_IN_CLASS: "\\N" is not supported in a class. Since: 2.34 + * @G_REGEX_ERROR_TOO_MANY_FORWARD_REFERENCES: too many forward references. Since: 2.34 + * @G_REGEX_ERROR_NAME_TOO_LONG: the name is too long in "(*MARK)", "(*PRUNE)", + * "(*SKIP)", or "(*THEN)". Since: 2.34 + * @G_REGEX_ERROR_CHARACTER_VALUE_TOO_LARGE: the character value in the \\u sequence is + * too large. Since: 2.34 + * + * Error codes returned by regular expressions functions. + * + * Since: 2.14 + */ +typedef enum +{ + G_REGEX_ERROR_COMPILE, + G_REGEX_ERROR_OPTIMIZE, + G_REGEX_ERROR_REPLACE, + G_REGEX_ERROR_MATCH, + G_REGEX_ERROR_INTERNAL, + + /* These are the error codes from PCRE + 100 */ + G_REGEX_ERROR_STRAY_BACKSLASH = 101, + G_REGEX_ERROR_MISSING_CONTROL_CHAR = 102, + G_REGEX_ERROR_UNRECOGNIZED_ESCAPE = 103, + G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER = 104, + G_REGEX_ERROR_QUANTIFIER_TOO_BIG = 105, + G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS = 106, + G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS = 107, + G_REGEX_ERROR_RANGE_OUT_OF_ORDER = 108, + G_REGEX_ERROR_NOTHING_TO_REPEAT = 109, + G_REGEX_ERROR_UNRECOGNIZED_CHARACTER = 112, + G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS = 113, + G_REGEX_ERROR_UNMATCHED_PARENTHESIS = 114, + G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE = 115, + G_REGEX_ERROR_UNTERMINATED_COMMENT = 118, + G_REGEX_ERROR_EXPRESSION_TOO_LARGE = 120, + G_REGEX_ERROR_MEMORY_ERROR = 121, + G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND = 125, + G_REGEX_ERROR_MALFORMED_CONDITION = 126, + G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES = 127, + G_REGEX_ERROR_ASSERTION_EXPECTED = 128, + G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME = 130, + G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED = 131, + G_REGEX_ERROR_HEX_CODE_TOO_LARGE = 134, + G_REGEX_ERROR_INVALID_CONDITION = 135, + G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND = 136, + G_REGEX_ERROR_INFINITE_LOOP = 140, + G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR = 142, + G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME = 143, + G_REGEX_ERROR_MALFORMED_PROPERTY = 146, + G_REGEX_ERROR_UNKNOWN_PROPERTY = 147, + G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG = 148, + G_REGEX_ERROR_TOO_MANY_SUBPATTERNS = 149, + G_REGEX_ERROR_INVALID_OCTAL_VALUE = 151, + G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE = 154, + G_REGEX_ERROR_DEFINE_REPETION = 155, + G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS = 156, + G_REGEX_ERROR_MISSING_BACK_REFERENCE = 157, + G_REGEX_ERROR_INVALID_RELATIVE_REFERENCE = 158, + G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN = 159, + G_REGEX_ERROR_UNKNOWN_BACKTRACKING_CONTROL_VERB = 160, + G_REGEX_ERROR_NUMBER_TOO_BIG = 161, + G_REGEX_ERROR_MISSING_SUBPATTERN_NAME = 162, + G_REGEX_ERROR_MISSING_DIGIT = 163, + G_REGEX_ERROR_INVALID_DATA_CHARACTER = 164, + G_REGEX_ERROR_EXTRA_SUBPATTERN_NAME = 165, + G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED = 166, + G_REGEX_ERROR_INVALID_CONTROL_CHAR = 168, + G_REGEX_ERROR_MISSING_NAME = 169, + G_REGEX_ERROR_NOT_SUPPORTED_IN_CLASS = 171, + G_REGEX_ERROR_TOO_MANY_FORWARD_REFERENCES = 172, + G_REGEX_ERROR_NAME_TOO_LONG = 175, + G_REGEX_ERROR_CHARACTER_VALUE_TOO_LARGE = 176 +} GRegexError; + +/** + * G_REGEX_ERROR: + * + * Error domain for regular expressions. Errors in this domain will be + * from the #GRegexError enumeration. See #GError for information on + * error domains. + * + * Since: 2.14 + */ +#define G_REGEX_ERROR g_regex_error_quark () + +GLIB_AVAILABLE_IN_ALL +GQuark g_regex_error_quark (void); + +/** + * GRegexCompileFlags: + * @G_REGEX_CASELESS: Letters in the pattern match both upper- and + * lowercase letters. This option can be changed within a pattern + * by a "(?i)" option setting. + * @G_REGEX_MULTILINE: By default, GRegex treats the strings as consisting + * of a single line of characters (even if it actually contains + * newlines). The "start of line" metacharacter ("^") matches only + * at the start of the string, while the "end of line" metacharacter + * ("$") matches only at the end of the string, or before a terminating + * newline (unless #G_REGEX_DOLLAR_ENDONLY is set). When + * #G_REGEX_MULTILINE is set, the "start of line" and "end of line" + * constructs match immediately following or immediately before any + * newline in the string, respectively, as well as at the very start + * and end. This can be changed within a pattern by a "(?m)" option + * setting. + * @G_REGEX_DOTALL: A dot metacharacter (".") in the pattern matches all + * characters, including newlines. Without it, newlines are excluded. + * This option can be changed within a pattern by a ("?s") option setting. + * @G_REGEX_EXTENDED: Whitespace data characters in the pattern are + * totally ignored except when escaped or inside a character class. + * Whitespace does not include the VT character (code 11). In addition, + * characters between an unescaped "#" outside a character class and + * the next newline character, inclusive, are also ignored. This can + * be changed within a pattern by a "(?x)" option setting. + * @G_REGEX_ANCHORED: The pattern is forced to be "anchored", that is, + * it is constrained to match only at the first matching point in the + * string that is being searched. This effect can also be achieved by + * appropriate constructs in the pattern itself such as the "^" + * metacharacter. + * @G_REGEX_DOLLAR_ENDONLY: A dollar metacharacter ("$") in the pattern + * matches only at the end of the string. Without this option, a + * dollar also matches immediately before the final character if + * it is a newline (but not before any other newlines). This option + * is ignored if #G_REGEX_MULTILINE is set. + * @G_REGEX_UNGREEDY: Inverts the "greediness" of the quantifiers so that + * they are not greedy by default, but become greedy if followed by "?". + * It can also be set by a "(?U)" option setting within the pattern. + * @G_REGEX_RAW: Usually strings must be valid UTF-8 strings, using this + * flag they are considered as a raw sequence of bytes. + * @G_REGEX_NO_AUTO_CAPTURE: Disables the use of numbered capturing + * parentheses in the pattern. Any opening parenthesis that is not + * followed by "?" behaves as if it were followed by "?:" but named + * parentheses can still be used for capturing (and they acquire numbers + * in the usual way). + * @G_REGEX_OPTIMIZE: Optimize the regular expression. If the pattern will + * be used many times, then it may be worth the effort to optimize it + * to improve the speed of matches. + * @G_REGEX_FIRSTLINE: Limits an unanchored pattern to match before (or at) the + * first newline. Since: 2.34 + * @G_REGEX_DUPNAMES: Names used to identify capturing subpatterns need not + * be unique. This can be helpful for certain types of pattern when it + * is known that only one instance of the named subpattern can ever be + * matched. + * @G_REGEX_NEWLINE_CR: Usually any newline character or character sequence is + * recognized. If this option is set, the only recognized newline character + * is '\r'. + * @G_REGEX_NEWLINE_LF: Usually any newline character or character sequence is + * recognized. If this option is set, the only recognized newline character + * is '\n'. + * @G_REGEX_NEWLINE_CRLF: Usually any newline character or character sequence is + * recognized. If this option is set, the only recognized newline character + * sequence is '\r\n'. + * @G_REGEX_NEWLINE_ANYCRLF: Usually any newline character or character sequence + * is recognized. If this option is set, the only recognized newline character + * sequences are '\r', '\n', and '\r\n'. Since: 2.34 + * @G_REGEX_BSR_ANYCRLF: Usually any newline character or character sequence + * is recognised. If this option is set, then "\R" only recognizes the newline + * characters '\r', '\n' and '\r\n'. Since: 2.34 + * @G_REGEX_JAVASCRIPT_COMPAT: Changes behaviour so that it is compatible with + * JavaScript rather than PCRE. Since: 2.34 + * + * Flags specifying compile-time options. + * + * Since: 2.14 + */ +/* Remember to update G_REGEX_COMPILE_MASK in gregex.c after + * adding a new flag. + */ +typedef enum +{ + G_REGEX_CASELESS = 1 << 0, + G_REGEX_MULTILINE = 1 << 1, + G_REGEX_DOTALL = 1 << 2, + G_REGEX_EXTENDED = 1 << 3, + G_REGEX_ANCHORED = 1 << 4, + G_REGEX_DOLLAR_ENDONLY = 1 << 5, + G_REGEX_UNGREEDY = 1 << 9, + G_REGEX_RAW = 1 << 11, + G_REGEX_NO_AUTO_CAPTURE = 1 << 12, + G_REGEX_OPTIMIZE = 1 << 13, + G_REGEX_FIRSTLINE = 1 << 18, + G_REGEX_DUPNAMES = 1 << 19, + G_REGEX_NEWLINE_CR = 1 << 20, + G_REGEX_NEWLINE_LF = 1 << 21, + G_REGEX_NEWLINE_CRLF = G_REGEX_NEWLINE_CR | G_REGEX_NEWLINE_LF, + G_REGEX_NEWLINE_ANYCRLF = G_REGEX_NEWLINE_CR | 1 << 22, + G_REGEX_BSR_ANYCRLF = 1 << 23, + G_REGEX_JAVASCRIPT_COMPAT = 1 << 25 +} GRegexCompileFlags; + +/** + * GRegexMatchFlags: + * @G_REGEX_MATCH_ANCHORED: The pattern is forced to be "anchored", that is, + * it is constrained to match only at the first matching point in the + * string that is being searched. This effect can also be achieved by + * appropriate constructs in the pattern itself such as the "^" + * metacharacter. + * @G_REGEX_MATCH_NOTBOL: Specifies that first character of the string is + * not the beginning of a line, so the circumflex metacharacter should + * not match before it. Setting this without #G_REGEX_MULTILINE (at + * compile time) causes circumflex never to match. This option affects + * only the behaviour of the circumflex metacharacter, it does not + * affect "\A". + * @G_REGEX_MATCH_NOTEOL: Specifies that the end of the subject string is + * not the end of a line, so the dollar metacharacter should not match + * it nor (except in multiline mode) a newline immediately before it. + * Setting this without #G_REGEX_MULTILINE (at compile time) causes + * dollar never to match. This option affects only the behaviour of + * the dollar metacharacter, it does not affect "\Z" or "\z". + * @G_REGEX_MATCH_NOTEMPTY: An empty string is not considered to be a valid + * match if this option is set. If there are alternatives in the pattern, + * they are tried. If all the alternatives match the empty string, the + * entire match fails. For example, if the pattern "a?b?" is applied to + * a string not beginning with "a" or "b", it matches the empty string + * at the start of the string. With this flag set, this match is not + * valid, so GRegex searches further into the string for occurrences + * of "a" or "b". + * @G_REGEX_MATCH_PARTIAL: Turns on the partial matching feature, for more + * documentation on partial matching see g_match_info_is_partial_match(). + * @G_REGEX_MATCH_NEWLINE_CR: Overrides the newline definition set when + * creating a new #GRegex, setting the '\r' character as line terminator. + * @G_REGEX_MATCH_NEWLINE_LF: Overrides the newline definition set when + * creating a new #GRegex, setting the '\n' character as line terminator. + * @G_REGEX_MATCH_NEWLINE_CRLF: Overrides the newline definition set when + * creating a new #GRegex, setting the '\r\n' characters sequence as line terminator. + * @G_REGEX_MATCH_NEWLINE_ANY: Overrides the newline definition set when + * creating a new #GRegex, any Unicode newline sequence + * is recognised as a newline. These are '\r', '\n' and '\rn', and the + * single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), + * U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and + * U+2029 PARAGRAPH SEPARATOR. + * @G_REGEX_MATCH_NEWLINE_ANYCRLF: Overrides the newline definition set when + * creating a new #GRegex; any '\r', '\n', or '\r\n' character sequence + * is recognized as a newline. Since: 2.34 + * @G_REGEX_MATCH_BSR_ANYCRLF: Overrides the newline definition for "\R" set when + * creating a new #GRegex; only '\r', '\n', or '\r\n' character sequences + * are recognized as a newline by "\R". Since: 2.34 + * @G_REGEX_MATCH_BSR_ANY: Overrides the newline definition for "\R" set when + * creating a new #GRegex; any Unicode newline character or character sequence + * are recognized as a newline by "\R". These are '\r', '\n' and '\rn', and the + * single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), + * U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and + * U+2029 PARAGRAPH SEPARATOR. Since: 2.34 + * @G_REGEX_MATCH_PARTIAL_SOFT: An alias for #G_REGEX_MATCH_PARTIAL. Since: 2.34 + * @G_REGEX_MATCH_PARTIAL_HARD: Turns on the partial matching feature. In contrast to + * to #G_REGEX_MATCH_PARTIAL_SOFT, this stops matching as soon as a partial match + * is found, without continuing to search for a possible complete match. See + * g_match_info_is_partial_match() for more information. Since: 2.34 + * @G_REGEX_MATCH_NOTEMPTY_ATSTART: Like #G_REGEX_MATCH_NOTEMPTY, but only applied to + * the start of the matched string. For anchored + * patterns this can only happen for pattern containing "\K". Since: 2.34 + * + * Flags specifying match-time options. + * + * Since: 2.14 + */ +/* Remember to update G_REGEX_MATCH_MASK in gregex.c after + * adding a new flag. */ +typedef enum +{ + G_REGEX_MATCH_ANCHORED = 1 << 4, + G_REGEX_MATCH_NOTBOL = 1 << 7, + G_REGEX_MATCH_NOTEOL = 1 << 8, + G_REGEX_MATCH_NOTEMPTY = 1 << 10, + G_REGEX_MATCH_PARTIAL = 1 << 15, + G_REGEX_MATCH_NEWLINE_CR = 1 << 20, + G_REGEX_MATCH_NEWLINE_LF = 1 << 21, + G_REGEX_MATCH_NEWLINE_CRLF = G_REGEX_MATCH_NEWLINE_CR | G_REGEX_MATCH_NEWLINE_LF, + G_REGEX_MATCH_NEWLINE_ANY = 1 << 22, + G_REGEX_MATCH_NEWLINE_ANYCRLF = G_REGEX_MATCH_NEWLINE_CR | G_REGEX_MATCH_NEWLINE_ANY, + G_REGEX_MATCH_BSR_ANYCRLF = 1 << 23, + G_REGEX_MATCH_BSR_ANY = 1 << 24, + G_REGEX_MATCH_PARTIAL_SOFT = G_REGEX_MATCH_PARTIAL, + G_REGEX_MATCH_PARTIAL_HARD = 1 << 27, + G_REGEX_MATCH_NOTEMPTY_ATSTART = 1 << 28 +} GRegexMatchFlags; + +/** + * GRegex: + * + * A GRegex is the "compiled" form of a regular expression pattern. + * This structure is opaque and its fields cannot be accessed directly. + * + * Since: 2.14 + */ +typedef struct _GRegex GRegex; + + +/** + * GMatchInfo: + * + * A GMatchInfo is an opaque struct used to return information about + * matches. + */ +typedef struct _GMatchInfo GMatchInfo; + +/** + * GRegexEvalCallback: + * @match_info: the #GMatchInfo generated by the match. + * Use g_match_info_get_regex() and g_match_info_get_string() if you + * need the #GRegex or the matched string. + * @result: a #GString containing the new string + * @user_data: user data passed to g_regex_replace_eval() + * + * Specifies the type of the function passed to g_regex_replace_eval(). + * It is called for each occurrence of the pattern in the string passed + * to g_regex_replace_eval(), and it should append the replacement to + * @result. + * + * Returns: %FALSE to continue the replacement process, %TRUE to stop it + * + * Since: 2.14 + */ +typedef gboolean (*GRegexEvalCallback) (const GMatchInfo *match_info, + GString *result, + gpointer user_data); + + +GLIB_AVAILABLE_IN_ALL +GRegex *g_regex_new (const gchar *pattern, + GRegexCompileFlags compile_options, + GRegexMatchFlags match_options, + GError **error); +GLIB_AVAILABLE_IN_ALL +GRegex *g_regex_ref (GRegex *regex); +GLIB_AVAILABLE_IN_ALL +void g_regex_unref (GRegex *regex); +GLIB_AVAILABLE_IN_ALL +const gchar *g_regex_get_pattern (const GRegex *regex); +GLIB_AVAILABLE_IN_ALL +gint g_regex_get_max_backref (const GRegex *regex); +GLIB_AVAILABLE_IN_ALL +gint g_regex_get_capture_count (const GRegex *regex); +GLIB_AVAILABLE_IN_ALL +gboolean g_regex_get_has_cr_or_lf (const GRegex *regex); +GLIB_AVAILABLE_IN_2_38 +gint g_regex_get_max_lookbehind (const GRegex *regex); +GLIB_AVAILABLE_IN_ALL +gint g_regex_get_string_number (const GRegex *regex, + const gchar *name); +GLIB_AVAILABLE_IN_ALL +gchar *g_regex_escape_string (const gchar *string, + gint length); +GLIB_AVAILABLE_IN_ALL +gchar *g_regex_escape_nul (const gchar *string, + gint length); + +GLIB_AVAILABLE_IN_ALL +GRegexCompileFlags g_regex_get_compile_flags (const GRegex *regex); +GLIB_AVAILABLE_IN_ALL +GRegexMatchFlags g_regex_get_match_flags (const GRegex *regex); + +/* Matching. */ +GLIB_AVAILABLE_IN_ALL +gboolean g_regex_match_simple (const gchar *pattern, + const gchar *string, + GRegexCompileFlags compile_options, + GRegexMatchFlags match_options); +GLIB_AVAILABLE_IN_ALL +gboolean g_regex_match (const GRegex *regex, + const gchar *string, + GRegexMatchFlags match_options, + GMatchInfo **match_info); +GLIB_AVAILABLE_IN_ALL +gboolean g_regex_match_full (const GRegex *regex, + const gchar *string, + gssize string_len, + gint start_position, + GRegexMatchFlags match_options, + GMatchInfo **match_info, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_regex_match_all (const GRegex *regex, + const gchar *string, + GRegexMatchFlags match_options, + GMatchInfo **match_info); +GLIB_AVAILABLE_IN_ALL +gboolean g_regex_match_all_full (const GRegex *regex, + const gchar *string, + gssize string_len, + gint start_position, + GRegexMatchFlags match_options, + GMatchInfo **match_info, + GError **error); + +/* String splitting. */ +GLIB_AVAILABLE_IN_ALL +gchar **g_regex_split_simple (const gchar *pattern, + const gchar *string, + GRegexCompileFlags compile_options, + GRegexMatchFlags match_options); +GLIB_AVAILABLE_IN_ALL +gchar **g_regex_split (const GRegex *regex, + const gchar *string, + GRegexMatchFlags match_options); +GLIB_AVAILABLE_IN_ALL +gchar **g_regex_split_full (const GRegex *regex, + const gchar *string, + gssize string_len, + gint start_position, + GRegexMatchFlags match_options, + gint max_tokens, + GError **error); + +/* String replacement. */ +GLIB_AVAILABLE_IN_ALL +gchar *g_regex_replace (const GRegex *regex, + const gchar *string, + gssize string_len, + gint start_position, + const gchar *replacement, + GRegexMatchFlags match_options, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar *g_regex_replace_literal (const GRegex *regex, + const gchar *string, + gssize string_len, + gint start_position, + const gchar *replacement, + GRegexMatchFlags match_options, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar *g_regex_replace_eval (const GRegex *regex, + const gchar *string, + gssize string_len, + gint start_position, + GRegexMatchFlags match_options, + GRegexEvalCallback eval, + gpointer user_data, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_regex_check_replacement (const gchar *replacement, + gboolean *has_references, + GError **error); + +/* Match info */ +GLIB_AVAILABLE_IN_ALL +GRegex *g_match_info_get_regex (const GMatchInfo *match_info); +GLIB_AVAILABLE_IN_ALL +const gchar *g_match_info_get_string (const GMatchInfo *match_info); + +GLIB_AVAILABLE_IN_ALL +GMatchInfo *g_match_info_ref (GMatchInfo *match_info); +GLIB_AVAILABLE_IN_ALL +void g_match_info_unref (GMatchInfo *match_info); +GLIB_AVAILABLE_IN_ALL +void g_match_info_free (GMatchInfo *match_info); +GLIB_AVAILABLE_IN_ALL +gboolean g_match_info_next (GMatchInfo *match_info, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_match_info_matches (const GMatchInfo *match_info); +GLIB_AVAILABLE_IN_ALL +gint g_match_info_get_match_count (const GMatchInfo *match_info); +GLIB_AVAILABLE_IN_ALL +gboolean g_match_info_is_partial_match (const GMatchInfo *match_info); +GLIB_AVAILABLE_IN_ALL +gchar *g_match_info_expand_references(const GMatchInfo *match_info, + const gchar *string_to_expand, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar *g_match_info_fetch (const GMatchInfo *match_info, + gint match_num); +GLIB_AVAILABLE_IN_ALL +gboolean g_match_info_fetch_pos (const GMatchInfo *match_info, + gint match_num, + gint *start_pos, + gint *end_pos); +GLIB_AVAILABLE_IN_ALL +gchar *g_match_info_fetch_named (const GMatchInfo *match_info, + const gchar *name); +GLIB_AVAILABLE_IN_ALL +gboolean g_match_info_fetch_named_pos (const GMatchInfo *match_info, + const gchar *name, + gint *start_pos, + gint *end_pos); +GLIB_AVAILABLE_IN_ALL +gchar **g_match_info_fetch_all (const GMatchInfo *match_info); + +G_END_DECLS + +#endif /* __G_REGEX_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gscanner.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gscanner.h new file mode 100755 index 00000000..db0d9aaf --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gscanner.h @@ -0,0 +1,303 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_SCANNER_H__ +#define __G_SCANNER_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gdataset.h> +#include <glib/ghash.h> + +G_BEGIN_DECLS + +typedef struct _GScanner GScanner; +typedef struct _GScannerConfig GScannerConfig; +typedef union _GTokenValue GTokenValue; + +typedef void (*GScannerMsgFunc) (GScanner *scanner, + gchar *message, + gboolean error); + +/* GScanner: Flexible lexical scanner for general purpose. + */ + +/* Character sets */ +#define G_CSET_A_2_Z "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +#define G_CSET_a_2_z "abcdefghijklmnopqrstuvwxyz" +#define G_CSET_DIGITS "0123456789" +#define G_CSET_LATINC "\300\301\302\303\304\305\306"\ + "\307\310\311\312\313\314\315\316\317\320"\ + "\321\322\323\324\325\326"\ + "\330\331\332\333\334\335\336" +#define G_CSET_LATINS "\337\340\341\342\343\344\345\346"\ + "\347\350\351\352\353\354\355\356\357\360"\ + "\361\362\363\364\365\366"\ + "\370\371\372\373\374\375\376\377" + +/* Error types */ +typedef enum +{ + G_ERR_UNKNOWN, + G_ERR_UNEXP_EOF, + G_ERR_UNEXP_EOF_IN_STRING, + G_ERR_UNEXP_EOF_IN_COMMENT, + G_ERR_NON_DIGIT_IN_CONST, + G_ERR_DIGIT_RADIX, + G_ERR_FLOAT_RADIX, + G_ERR_FLOAT_MALFORMED +} GErrorType; + +/* Token types */ +typedef enum +{ + G_TOKEN_EOF = 0, + + G_TOKEN_LEFT_PAREN = '(', + G_TOKEN_RIGHT_PAREN = ')', + G_TOKEN_LEFT_CURLY = '{', + G_TOKEN_RIGHT_CURLY = '}', + G_TOKEN_LEFT_BRACE = '[', + G_TOKEN_RIGHT_BRACE = ']', + G_TOKEN_EQUAL_SIGN = '=', + G_TOKEN_COMMA = ',', + + G_TOKEN_NONE = 256, + + G_TOKEN_ERROR, + + G_TOKEN_CHAR, + G_TOKEN_BINARY, + G_TOKEN_OCTAL, + G_TOKEN_INT, + G_TOKEN_HEX, + G_TOKEN_FLOAT, + G_TOKEN_STRING, + + G_TOKEN_SYMBOL, + G_TOKEN_IDENTIFIER, + G_TOKEN_IDENTIFIER_NULL, + + G_TOKEN_COMMENT_SINGLE, + G_TOKEN_COMMENT_MULTI, + + /*< private >*/ + G_TOKEN_LAST +} GTokenType; + +union _GTokenValue +{ + gpointer v_symbol; + gchar *v_identifier; + gulong v_binary; + gulong v_octal; + gulong v_int; + guint64 v_int64; + gdouble v_float; + gulong v_hex; + gchar *v_string; + gchar *v_comment; + guchar v_char; + guint v_error; +}; + +struct _GScannerConfig +{ + /* Character sets + */ + gchar *cset_skip_characters; /* default: " \t\n" */ + gchar *cset_identifier_first; + gchar *cset_identifier_nth; + gchar *cpair_comment_single; /* default: "#\n" */ + + /* Should symbol lookup work case sensitive? + */ + guint case_sensitive : 1; + + /* Boolean values to be adjusted "on the fly" + * to configure scanning behaviour. + */ + guint skip_comment_multi : 1; /* C like comment */ + guint skip_comment_single : 1; /* single line comment */ + guint scan_comment_multi : 1; /* scan multi line comments? */ + guint scan_identifier : 1; + guint scan_identifier_1char : 1; + guint scan_identifier_NULL : 1; + guint scan_symbols : 1; + guint scan_binary : 1; + guint scan_octal : 1; + guint scan_float : 1; + guint scan_hex : 1; /* '0x0ff0' */ + guint scan_hex_dollar : 1; /* '$0ff0' */ + guint scan_string_sq : 1; /* string: 'anything' */ + guint scan_string_dq : 1; /* string: "\\-escapes!\n" */ + guint numbers_2_int : 1; /* bin, octal, hex => int */ + guint int_2_float : 1; /* int => G_TOKEN_FLOAT? */ + guint identifier_2_string : 1; + guint char_2_token : 1; /* return G_TOKEN_CHAR? */ + guint symbol_2_token : 1; + guint scope_0_fallback : 1; /* try scope 0 on lookups? */ + guint store_int64 : 1; /* use value.v_int64 rather than v_int */ + + /*< private >*/ + guint padding_dummy; +}; + +struct _GScanner +{ + /* unused fields */ + gpointer user_data; + guint max_parse_errors; + + /* g_scanner_error() increments this field */ + guint parse_errors; + + /* name of input stream, featured by the default message handler */ + const gchar *input_name; + + /* quarked data */ + GData *qdata; + + /* link into the scanner configuration */ + GScannerConfig *config; + + /* fields filled in after g_scanner_get_next_token() */ + GTokenType token; + GTokenValue value; + guint line; + guint position; + + /* fields filled in after g_scanner_peek_next_token() */ + GTokenType next_token; + GTokenValue next_value; + guint next_line; + guint next_position; + + /*< private >*/ + /* to be considered private */ + GHashTable *symbol_table; + gint input_fd; + const gchar *text; + const gchar *text_end; + gchar *buffer; + guint scope_id; + + /*< public >*/ + /* handler function for _warn and _error */ + GScannerMsgFunc msg_handler; +}; + +GLIB_AVAILABLE_IN_ALL +GScanner* g_scanner_new (const GScannerConfig *config_templ); +GLIB_AVAILABLE_IN_ALL +void g_scanner_destroy (GScanner *scanner); +GLIB_AVAILABLE_IN_ALL +void g_scanner_input_file (GScanner *scanner, + gint input_fd); +GLIB_AVAILABLE_IN_ALL +void g_scanner_sync_file_offset (GScanner *scanner); +GLIB_AVAILABLE_IN_ALL +void g_scanner_input_text (GScanner *scanner, + const gchar *text, + guint text_len); +GLIB_AVAILABLE_IN_ALL +GTokenType g_scanner_get_next_token (GScanner *scanner); +GLIB_AVAILABLE_IN_ALL +GTokenType g_scanner_peek_next_token (GScanner *scanner); +GLIB_AVAILABLE_IN_ALL +GTokenType g_scanner_cur_token (GScanner *scanner); +GLIB_AVAILABLE_IN_ALL +GTokenValue g_scanner_cur_value (GScanner *scanner); +GLIB_AVAILABLE_IN_ALL +guint g_scanner_cur_line (GScanner *scanner); +GLIB_AVAILABLE_IN_ALL +guint g_scanner_cur_position (GScanner *scanner); +GLIB_AVAILABLE_IN_ALL +gboolean g_scanner_eof (GScanner *scanner); +GLIB_AVAILABLE_IN_ALL +guint g_scanner_set_scope (GScanner *scanner, + guint scope_id); +GLIB_AVAILABLE_IN_ALL +void g_scanner_scope_add_symbol (GScanner *scanner, + guint scope_id, + const gchar *symbol, + gpointer value); +GLIB_AVAILABLE_IN_ALL +void g_scanner_scope_remove_symbol (GScanner *scanner, + guint scope_id, + const gchar *symbol); +GLIB_AVAILABLE_IN_ALL +gpointer g_scanner_scope_lookup_symbol (GScanner *scanner, + guint scope_id, + const gchar *symbol); +GLIB_AVAILABLE_IN_ALL +void g_scanner_scope_foreach_symbol (GScanner *scanner, + guint scope_id, + GHFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gpointer g_scanner_lookup_symbol (GScanner *scanner, + const gchar *symbol); +GLIB_AVAILABLE_IN_ALL +void g_scanner_unexp_token (GScanner *scanner, + GTokenType expected_token, + const gchar *identifier_spec, + const gchar *symbol_spec, + const gchar *symbol_name, + const gchar *message, + gint is_error); +GLIB_AVAILABLE_IN_ALL +void g_scanner_error (GScanner *scanner, + const gchar *format, + ...) G_GNUC_PRINTF (2,3); +GLIB_AVAILABLE_IN_ALL +void g_scanner_warn (GScanner *scanner, + const gchar *format, + ...) G_GNUC_PRINTF (2,3); + +#ifndef G_DISABLE_DEPRECATED + +/* keep downward source compatibility */ +#define g_scanner_add_symbol( scanner, symbol, value ) G_STMT_START { \ + g_scanner_scope_add_symbol ((scanner), 0, (symbol), (value)); \ +} G_STMT_END +#define g_scanner_remove_symbol( scanner, symbol ) G_STMT_START { \ + g_scanner_scope_remove_symbol ((scanner), 0, (symbol)); \ +} G_STMT_END +#define g_scanner_foreach_symbol( scanner, func, data ) G_STMT_START { \ + g_scanner_scope_foreach_symbol ((scanner), 0, (func), (data)); \ +} G_STMT_END + +/* The following two functions are deprecated and will be removed in + * the next major release. They do no good. */ +#define g_scanner_freeze_symbol_table(scanner) ((void)0) +#define g_scanner_thaw_symbol_table(scanner) ((void)0) + +#endif /* G_DISABLE_DEPRECATED */ + +G_END_DECLS + +#endif /* __G_SCANNER_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gsequence.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gsequence.h new file mode 100755 index 00000000..6dce2f4f --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gsequence.h @@ -0,0 +1,173 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 + * Soeren Sandmann (sandmann@daimi.au.dk) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_SEQUENCE_H__ +#define __G_SEQUENCE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +typedef struct _GSequence GSequence; +typedef struct _GSequenceNode GSequenceIter; + +typedef gint (* GSequenceIterCompareFunc) (GSequenceIter *a, + GSequenceIter *b, + gpointer data); + + +/* GSequence */ +GLIB_AVAILABLE_IN_ALL +GSequence * g_sequence_new (GDestroyNotify data_destroy); +GLIB_AVAILABLE_IN_ALL +void g_sequence_free (GSequence *seq); +GLIB_AVAILABLE_IN_ALL +gint g_sequence_get_length (GSequence *seq); +GLIB_AVAILABLE_IN_ALL +void g_sequence_foreach (GSequence *seq, + GFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +void g_sequence_foreach_range (GSequenceIter *begin, + GSequenceIter *end, + GFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +void g_sequence_sort (GSequence *seq, + GCompareDataFunc cmp_func, + gpointer cmp_data); +GLIB_AVAILABLE_IN_ALL +void g_sequence_sort_iter (GSequence *seq, + GSequenceIterCompareFunc cmp_func, + gpointer cmp_data); +GLIB_AVAILABLE_IN_2_48 +gboolean g_sequence_is_empty (GSequence *seq); + + +/* Getting iters */ +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_get_begin_iter (GSequence *seq); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_get_end_iter (GSequence *seq); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_get_iter_at_pos (GSequence *seq, + gint pos); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_append (GSequence *seq, + gpointer data); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_prepend (GSequence *seq, + gpointer data); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_insert_before (GSequenceIter *iter, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_sequence_move (GSequenceIter *src, + GSequenceIter *dest); +GLIB_AVAILABLE_IN_ALL +void g_sequence_swap (GSequenceIter *a, + GSequenceIter *b); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_insert_sorted (GSequence *seq, + gpointer data, + GCompareDataFunc cmp_func, + gpointer cmp_data); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_insert_sorted_iter (GSequence *seq, + gpointer data, + GSequenceIterCompareFunc iter_cmp, + gpointer cmp_data); +GLIB_AVAILABLE_IN_ALL +void g_sequence_sort_changed (GSequenceIter *iter, + GCompareDataFunc cmp_func, + gpointer cmp_data); +GLIB_AVAILABLE_IN_ALL +void g_sequence_sort_changed_iter (GSequenceIter *iter, + GSequenceIterCompareFunc iter_cmp, + gpointer cmp_data); +GLIB_AVAILABLE_IN_ALL +void g_sequence_remove (GSequenceIter *iter); +GLIB_AVAILABLE_IN_ALL +void g_sequence_remove_range (GSequenceIter *begin, + GSequenceIter *end); +GLIB_AVAILABLE_IN_ALL +void g_sequence_move_range (GSequenceIter *dest, + GSequenceIter *begin, + GSequenceIter *end); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_search (GSequence *seq, + gpointer data, + GCompareDataFunc cmp_func, + gpointer cmp_data); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_search_iter (GSequence *seq, + gpointer data, + GSequenceIterCompareFunc iter_cmp, + gpointer cmp_data); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_lookup (GSequence *seq, + gpointer data, + GCompareDataFunc cmp_func, + gpointer cmp_data); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_lookup_iter (GSequence *seq, + gpointer data, + GSequenceIterCompareFunc iter_cmp, + gpointer cmp_data); + + +/* Dereferencing */ +GLIB_AVAILABLE_IN_ALL +gpointer g_sequence_get (GSequenceIter *iter); +GLIB_AVAILABLE_IN_ALL +void g_sequence_set (GSequenceIter *iter, + gpointer data); + +/* Operations on GSequenceIter * */ +GLIB_AVAILABLE_IN_ALL +gboolean g_sequence_iter_is_begin (GSequenceIter *iter); +GLIB_AVAILABLE_IN_ALL +gboolean g_sequence_iter_is_end (GSequenceIter *iter); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_iter_next (GSequenceIter *iter); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_iter_prev (GSequenceIter *iter); +GLIB_AVAILABLE_IN_ALL +gint g_sequence_iter_get_position (GSequenceIter *iter); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_iter_move (GSequenceIter *iter, + gint delta); +GLIB_AVAILABLE_IN_ALL +GSequence * g_sequence_iter_get_sequence (GSequenceIter *iter); + + +/* Search */ +GLIB_AVAILABLE_IN_ALL +gint g_sequence_iter_compare (GSequenceIter *a, + GSequenceIter *b); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_range_get_midpoint (GSequenceIter *begin, + GSequenceIter *end); + +G_END_DECLS + +#endif /* __G_SEQUENCE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gshell.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gshell.h new file mode 100755 index 00000000..798dd780 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gshell.h @@ -0,0 +1,57 @@ +/* gshell.h - Shell-related utilities + * + * Copyright 2000 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_SHELL_H__ +#define __G_SHELL_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gerror.h> + +G_BEGIN_DECLS + +#define G_SHELL_ERROR g_shell_error_quark () + +typedef enum +{ + /* mismatched or otherwise mangled quoting */ + G_SHELL_ERROR_BAD_QUOTING, + /* string to be parsed was empty */ + G_SHELL_ERROR_EMPTY_STRING, + G_SHELL_ERROR_FAILED +} GShellError; + +GLIB_AVAILABLE_IN_ALL +GQuark g_shell_error_quark (void); + +GLIB_AVAILABLE_IN_ALL +gchar* g_shell_quote (const gchar *unquoted_string); +GLIB_AVAILABLE_IN_ALL +gchar* g_shell_unquote (const gchar *quoted_string, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_shell_parse_argv (const gchar *command_line, + gint *argcp, + gchar ***argvp, + GError **error); + +G_END_DECLS + +#endif /* __G_SHELL_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gslice.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gslice.h new file mode 100755 index 00000000..80762761 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gslice.h @@ -0,0 +1,99 @@ +/* GLIB sliced memory - fast threaded memory chunk allocator + * Copyright (C) 2005 Tim Janik + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_SLICE_H__ +#define __G_SLICE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +/* slices - fast allocation/release of small memory blocks + */ +GLIB_AVAILABLE_IN_ALL +gpointer g_slice_alloc (gsize block_size) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_ALL +gpointer g_slice_alloc0 (gsize block_size) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_ALL +gpointer g_slice_copy (gsize block_size, + gconstpointer mem_block) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_ALL +void g_slice_free1 (gsize block_size, + gpointer mem_block); +GLIB_AVAILABLE_IN_ALL +void g_slice_free_chain_with_offset (gsize block_size, + gpointer mem_chain, + gsize next_offset); +#define g_slice_new(type) ((type*) g_slice_alloc (sizeof (type))) +#define g_slice_new0(type) ((type*) g_slice_alloc0 (sizeof (type))) +/* MemoryBlockType * + * g_slice_dup (MemoryBlockType, + * MemoryBlockType *mem_block); + * g_slice_free (MemoryBlockType, + * MemoryBlockType *mem_block); + * g_slice_free_chain (MemoryBlockType, + * MemoryBlockType *first_chain_block, + * memory_block_next_field); + * pseudo prototypes for the macro + * definitions following below. + */ + +/* we go through extra hoops to ensure type safety */ +#define g_slice_dup(type, mem) \ + (1 ? (type*) g_slice_copy (sizeof (type), (mem)) \ + : ((void) ((type*) 0 == (mem)), (type*) 0)) +#define g_slice_free(type, mem) \ +G_STMT_START { \ + if (1) g_slice_free1 (sizeof (type), (mem)); \ + else (void) ((type*) 0 == (mem)); \ +} G_STMT_END +#define g_slice_free_chain(type, mem_chain, next) \ +G_STMT_START { \ + if (1) g_slice_free_chain_with_offset (sizeof (type), \ + (mem_chain), G_STRUCT_OFFSET (type, next)); \ + else (void) ((type*) 0 == (mem_chain)); \ +} G_STMT_END + +/* --- internal debugging API --- */ +typedef enum { + G_SLICE_CONFIG_ALWAYS_MALLOC = 1, + G_SLICE_CONFIG_BYPASS_MAGAZINES, + G_SLICE_CONFIG_WORKING_SET_MSECS, + G_SLICE_CONFIG_COLOR_INCREMENT, + G_SLICE_CONFIG_CHUNK_SIZES, + G_SLICE_CONFIG_CONTENTION_COUNTER +} GSliceConfig; + +GLIB_DEPRECATED_IN_2_34 +void g_slice_set_config (GSliceConfig ckey, gint64 value); +GLIB_DEPRECATED_IN_2_34 +gint64 g_slice_get_config (GSliceConfig ckey); +GLIB_DEPRECATED_IN_2_34 +gint64* g_slice_get_config_state (GSliceConfig ckey, gint64 address, guint *n_values); + +#ifdef G_ENABLE_DEBUG +GLIB_AVAILABLE_IN_ALL +void g_slice_debug_tree_statistics (void); +#endif + +G_END_DECLS + +#endif /* __G_SLICE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gslist.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gslist.h new file mode 100755 index 00000000..2704ef7d --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gslist.h @@ -0,0 +1,143 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_SLIST_H__ +#define __G_SLIST_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gmem.h> +#include <glib/gnode.h> + +G_BEGIN_DECLS + +typedef struct _GSList GSList; + +struct _GSList +{ + gpointer data; + GSList *next; +}; + +/* Singly linked lists + */ +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_alloc (void) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +void g_slist_free (GSList *list); +GLIB_AVAILABLE_IN_ALL +void g_slist_free_1 (GSList *list); +#define g_slist_free1 g_slist_free_1 +GLIB_AVAILABLE_IN_ALL +void g_slist_free_full (GSList *list, + GDestroyNotify free_func); +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_append (GSList *list, + gpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_prepend (GSList *list, + gpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_insert (GSList *list, + gpointer data, + gint position) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_insert_sorted (GSList *list, + gpointer data, + GCompareFunc func) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_insert_sorted_with_data (GSList *list, + gpointer data, + GCompareDataFunc func, + gpointer user_data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_insert_before (GSList *slist, + GSList *sibling, + gpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_concat (GSList *list1, + GSList *list2) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_remove (GSList *list, + gconstpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_remove_all (GSList *list, + gconstpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_remove_link (GSList *list, + GSList *link_) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_delete_link (GSList *list, + GSList *link_) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_reverse (GSList *list) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_copy (GSList *list) G_GNUC_WARN_UNUSED_RESULT; + +GLIB_AVAILABLE_IN_2_34 +GSList* g_slist_copy_deep (GSList *list, + GCopyFunc func, + gpointer user_data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_nth (GSList *list, + guint n); +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_find (GSList *list, + gconstpointer data); +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_find_custom (GSList *list, + gconstpointer data, + GCompareFunc func); +GLIB_AVAILABLE_IN_ALL +gint g_slist_position (GSList *list, + GSList *llink); +GLIB_AVAILABLE_IN_ALL +gint g_slist_index (GSList *list, + gconstpointer data); +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_last (GSList *list); +GLIB_AVAILABLE_IN_ALL +guint g_slist_length (GSList *list); +GLIB_AVAILABLE_IN_ALL +void g_slist_foreach (GSList *list, + GFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_sort (GSList *list, + GCompareFunc compare_func) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_sort_with_data (GSList *list, + GCompareDataFunc compare_func, + gpointer user_data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +gpointer g_slist_nth_data (GSList *list, + guint n); + +#define g_slist_next(slist) ((slist) ? (((GSList *)(slist))->next) : NULL) + +G_END_DECLS + +#endif /* __G_SLIST_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gspawn.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gspawn.h new file mode 100755 index 00000000..055743ea --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gspawn.h @@ -0,0 +1,254 @@ +/* gspawn.h - Process launching + * + * Copyright 2000 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_SPAWN_H__ +#define __G_SPAWN_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gerror.h> + +G_BEGIN_DECLS + + +/* I'm not sure I remember our proposed naming convention here. */ +/** + * G_SPAWN_ERROR: + * + * Error domain for spawning processes. Errors in this domain will + * be from the #GSpawnError enumeration. See #GError for information on + * error domains. + */ +#define G_SPAWN_ERROR g_spawn_error_quark () + +/** + * GSpawnError: + * @G_SPAWN_ERROR_FORK: Fork failed due to lack of memory. + * @G_SPAWN_ERROR_READ: Read or select on pipes failed. + * @G_SPAWN_ERROR_CHDIR: Changing to working directory failed. + * @G_SPAWN_ERROR_ACCES: execv() returned `EACCES` + * @G_SPAWN_ERROR_PERM: execv() returned `EPERM` + * @G_SPAWN_ERROR_TOO_BIG: execv() returned `E2BIG` + * @G_SPAWN_ERROR_2BIG: deprecated alias for %G_SPAWN_ERROR_TOO_BIG + * @G_SPAWN_ERROR_NOEXEC: execv() returned `ENOEXEC` + * @G_SPAWN_ERROR_NAMETOOLONG: execv() returned `ENAMETOOLONG` + * @G_SPAWN_ERROR_NOENT: execv() returned `ENOENT` + * @G_SPAWN_ERROR_NOMEM: execv() returned `ENOMEM` + * @G_SPAWN_ERROR_NOTDIR: execv() returned `ENOTDIR` + * @G_SPAWN_ERROR_LOOP: execv() returned `ELOOP` + * @G_SPAWN_ERROR_TXTBUSY: execv() returned `ETXTBUSY` + * @G_SPAWN_ERROR_IO: execv() returned `EIO` + * @G_SPAWN_ERROR_NFILE: execv() returned `ENFILE` + * @G_SPAWN_ERROR_MFILE: execv() returned `EMFILE` + * @G_SPAWN_ERROR_INVAL: execv() returned `EINVAL` + * @G_SPAWN_ERROR_ISDIR: execv() returned `EISDIR` + * @G_SPAWN_ERROR_LIBBAD: execv() returned `ELIBBAD` + * @G_SPAWN_ERROR_FAILED: Some other fatal failure, + * `error->message` should explain. + * + * Error codes returned by spawning processes. + */ +typedef enum +{ + G_SPAWN_ERROR_FORK, /* fork failed due to lack of memory */ + G_SPAWN_ERROR_READ, /* read or select on pipes failed */ + G_SPAWN_ERROR_CHDIR, /* changing to working dir failed */ + G_SPAWN_ERROR_ACCES, /* execv() returned EACCES */ + G_SPAWN_ERROR_PERM, /* execv() returned EPERM */ + G_SPAWN_ERROR_TOO_BIG,/* execv() returned E2BIG */ +#ifndef G_DISABLE_DEPRECATED + G_SPAWN_ERROR_2BIG = G_SPAWN_ERROR_TOO_BIG, +#endif + G_SPAWN_ERROR_NOEXEC, /* execv() returned ENOEXEC */ + G_SPAWN_ERROR_NAMETOOLONG, /* "" "" ENAMETOOLONG */ + G_SPAWN_ERROR_NOENT, /* "" "" ENOENT */ + G_SPAWN_ERROR_NOMEM, /* "" "" ENOMEM */ + G_SPAWN_ERROR_NOTDIR, /* "" "" ENOTDIR */ + G_SPAWN_ERROR_LOOP, /* "" "" ELOOP */ + G_SPAWN_ERROR_TXTBUSY, /* "" "" ETXTBUSY */ + G_SPAWN_ERROR_IO, /* "" "" EIO */ + G_SPAWN_ERROR_NFILE, /* "" "" ENFILE */ + G_SPAWN_ERROR_MFILE, /* "" "" EMFLE */ + G_SPAWN_ERROR_INVAL, /* "" "" EINVAL */ + G_SPAWN_ERROR_ISDIR, /* "" "" EISDIR */ + G_SPAWN_ERROR_LIBBAD, /* "" "" ELIBBAD */ + G_SPAWN_ERROR_FAILED /* other fatal failure, error->message + * should explain + */ +} GSpawnError; + +/** + * G_SPAWN_EXIT_ERROR: + * + * Error domain used by g_spawn_check_exit_status(). The code + * will be the program exit code. + */ +#define G_SPAWN_EXIT_ERROR g_spawn_exit_error_quark () + +/** + * GSpawnChildSetupFunc: + * @user_data: (closure): user data to pass to the function. + * + * Specifies the type of the setup function passed to g_spawn_async(), + * g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very + * limited ways, be used to affect the child's execution. + * + * On POSIX platforms, the function is called in the child after GLib + * has performed all the setup it plans to perform, but before calling + * exec(). Actions taken in this function will only affect the child, + * not the parent. + * + * On Windows, the function is called in the parent. Its usefulness on + * Windows is thus questionable. In many cases executing the child setup + * function in the parent can have ill effects, and you should be very + * careful when porting software to Windows that uses child setup + * functions. + * + * However, even on POSIX, you are extremely limited in what you can + * safely do from a #GSpawnChildSetupFunc, because any mutexes that were + * held by other threads in the parent process at the time of the fork() + * will still be locked in the child process, and they will never be + * unlocked (since the threads that held them don't exist in the child). + * POSIX allows only async-signal-safe functions (see signal(7)) to be + * called in the child between fork() and exec(), which drastically limits + * the usefulness of child setup functions. + * + * In particular, it is not safe to call any function which may + * call malloc(), which includes POSIX functions such as setenv(). + * If you need to set up the child environment differently from + * the parent, you should use g_get_environ(), g_environ_setenv(), + * and g_environ_unsetenv(), and then pass the complete environment + * list to the `g_spawn...` function. + */ +typedef void (* GSpawnChildSetupFunc) (gpointer user_data); + +/** + * GSpawnFlags: + * @G_SPAWN_DEFAULT: no flags, default behaviour + * @G_SPAWN_LEAVE_DESCRIPTORS_OPEN: the parent's open file descriptors will + * be inherited by the child; otherwise all descriptors except stdin, + * stdout and stderr will be closed before calling exec() in the child. + * @G_SPAWN_DO_NOT_REAP_CHILD: the child will not be automatically reaped; + * you must use g_child_watch_add() yourself (or call waitpid() or handle + * `SIGCHLD` yourself), or the child will become a zombie. + * @G_SPAWN_SEARCH_PATH: `argv[0]` need not be an absolute path, it will be + * looked for in the user's `PATH`. + * @G_SPAWN_STDOUT_TO_DEV_NULL: the child's standard output will be discarded, + * instead of going to the same location as the parent's standard output. + * @G_SPAWN_STDERR_TO_DEV_NULL: the child's standard error will be discarded. + * @G_SPAWN_CHILD_INHERITS_STDIN: the child will inherit the parent's standard + * input (by default, the child's standard input is attached to `/dev/null`). + * @G_SPAWN_FILE_AND_ARGV_ZERO: the first element of `argv` is the file to + * execute, while the remaining elements are the actual argument vector + * to pass to the file. Normally g_spawn_async_with_pipes() uses `argv[0]` + * as the file to execute, and passes all of `argv` to the child. + * @G_SPAWN_SEARCH_PATH_FROM_ENVP: if `argv[0]` is not an abolute path, + * it will be looked for in the `PATH` from the passed child environment. + * Since: 2.34 + * @G_SPAWN_CLOEXEC_PIPES: create all pipes with the `O_CLOEXEC` flag set. + * Since: 2.40 + * + * Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes(). + */ +typedef enum +{ + G_SPAWN_DEFAULT = 0, + G_SPAWN_LEAVE_DESCRIPTORS_OPEN = 1 << 0, + G_SPAWN_DO_NOT_REAP_CHILD = 1 << 1, + /* look for argv[0] in the path i.e. use execvp() */ + G_SPAWN_SEARCH_PATH = 1 << 2, + /* Dump output to /dev/null */ + G_SPAWN_STDOUT_TO_DEV_NULL = 1 << 3, + G_SPAWN_STDERR_TO_DEV_NULL = 1 << 4, + G_SPAWN_CHILD_INHERITS_STDIN = 1 << 5, + G_SPAWN_FILE_AND_ARGV_ZERO = 1 << 6, + G_SPAWN_SEARCH_PATH_FROM_ENVP = 1 << 7, + G_SPAWN_CLOEXEC_PIPES = 1 << 8 +} GSpawnFlags; + +GLIB_AVAILABLE_IN_ALL +GQuark g_spawn_error_quark (void); +GLIB_AVAILABLE_IN_ALL +GQuark g_spawn_exit_error_quark (void); + +GLIB_AVAILABLE_IN_ALL +gboolean g_spawn_async (const gchar *working_directory, + gchar **argv, + gchar **envp, + GSpawnFlags flags, + GSpawnChildSetupFunc child_setup, + gpointer user_data, + GPid *child_pid, + GError **error); + + +/* Opens pipes for non-NULL standard_output, standard_input, standard_error, + * and returns the parent's end of the pipes. + */ +GLIB_AVAILABLE_IN_ALL +gboolean g_spawn_async_with_pipes (const gchar *working_directory, + gchar **argv, + gchar **envp, + GSpawnFlags flags, + GSpawnChildSetupFunc child_setup, + gpointer user_data, + GPid *child_pid, + gint *standard_input, + gint *standard_output, + gint *standard_error, + GError **error); + + +/* If standard_output or standard_error are non-NULL, the full + * standard output or error of the command will be placed there. + */ + +GLIB_AVAILABLE_IN_ALL +gboolean g_spawn_sync (const gchar *working_directory, + gchar **argv, + gchar **envp, + GSpawnFlags flags, + GSpawnChildSetupFunc child_setup, + gpointer user_data, + gchar **standard_output, + gchar **standard_error, + gint *exit_status, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_spawn_command_line_sync (const gchar *command_line, + gchar **standard_output, + gchar **standard_error, + gint *exit_status, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_spawn_command_line_async (const gchar *command_line, + GError **error); + +GLIB_AVAILABLE_IN_2_34 +gboolean g_spawn_check_exit_status (gint exit_status, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_spawn_close_pid (GPid pid); + +G_END_DECLS + +#endif /* __G_SPAWN_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gstdio.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gstdio.h new file mode 100755 index 00000000..15091b3e --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gstdio.h @@ -0,0 +1,170 @@ +/* gstdio.h - GFilename wrappers for C library functions + * + * Copyright 2004 Tor Lillqvist + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_STDIO_H__ +#define __G_STDIO_H__ + +#include <glib/gprintf.h> + +#include <sys/stat.h> + +G_BEGIN_DECLS + +#if (defined (__MINGW64_VERSION_MAJOR) || defined (_MSC_VER)) && !defined(_WIN64) + +/* Make it clear that we mean the struct with 32-bit st_size and + * 32-bit st_*time fields as that is how the 32-bit GLib DLL normally + * has been compiled. If you get a compiler warning when calling + * g_stat(), do take it seriously and make sure that the type of + * struct stat the code in GLib fills in matches the struct the type + * of struct stat you pass to g_stat(). To avoid hassle, to get file + * attributes just use the GIO API instead which doesn't use struct + * stat. + * + * Sure, it would be nicer to use a struct with 64-bit st_size and + * 64-bit st_*time fields, but changing that now would break ABI. And + * in MinGW, a plain "struct stat" is the one with 32-bit st_size and + * st_*time fields. + */ + +typedef struct _stat32 GStatBuf; + +#else + +typedef struct stat GStatBuf; + +#endif + +#if defined(G_OS_UNIX) && !defined(G_STDIO_NO_WRAP_ON_UNIX) + +/* Just pass on to the system functions, so there's no potential for data + * format mismatches, especially with large file interfaces. + * A few functions can't be handled in this way, since they are not defined + * in a portable system header that we could include here. + */ + +#ifndef __GTK_DOC_IGNORE__ +#define g_chmod chmod +#define g_open open +#define g_creat creat +#define g_rename rename +#define g_mkdir mkdir +#define g_stat stat +#define g_lstat lstat +#define g_remove remove +#define g_fopen fopen +#define g_freopen freopen +#define g_utime utime +#endif + +GLIB_AVAILABLE_IN_ALL +int g_access (const gchar *filename, + int mode); + +GLIB_AVAILABLE_IN_ALL +int g_chdir (const gchar *path); + +GLIB_AVAILABLE_IN_ALL +int g_unlink (const gchar *filename); + +GLIB_AVAILABLE_IN_ALL +int g_rmdir (const gchar *filename); + +#else /* ! G_OS_UNIX */ + +/* Wrappers for C library functions that take pathname arguments. On + * Unix, the pathname is a file name as it literally is in the file + * system. On well-maintained systems with consistent users who know + * what they are doing and no exchange of files with others this would + * be a well-defined encoding, preferably UTF-8. On Windows, the + * pathname is always in UTF-8, even if that is not the on-disk + * encoding, and not the encoding accepted by the C library or Win32 + * API. + */ + +GLIB_AVAILABLE_IN_ALL +int g_access (const gchar *filename, + int mode); + +GLIB_AVAILABLE_IN_ALL +int g_chmod (const gchar *filename, + int mode); + +GLIB_AVAILABLE_IN_ALL +int g_open (const gchar *filename, + int flags, + int mode); + +GLIB_AVAILABLE_IN_ALL +int g_creat (const gchar *filename, + int mode); + +GLIB_AVAILABLE_IN_ALL +int g_rename (const gchar *oldfilename, + const gchar *newfilename); + +GLIB_AVAILABLE_IN_ALL +int g_mkdir (const gchar *filename, + int mode); + +GLIB_AVAILABLE_IN_ALL +int g_chdir (const gchar *path); + +GLIB_AVAILABLE_IN_ALL +int g_stat (const gchar *filename, + GStatBuf *buf); + +GLIB_AVAILABLE_IN_ALL +int g_lstat (const gchar *filename, + GStatBuf *buf); + +GLIB_AVAILABLE_IN_ALL +int g_unlink (const gchar *filename); + +GLIB_AVAILABLE_IN_ALL +int g_remove (const gchar *filename); + +GLIB_AVAILABLE_IN_ALL +int g_rmdir (const gchar *filename); + +GLIB_AVAILABLE_IN_ALL +FILE *g_fopen (const gchar *filename, + const gchar *mode); + +GLIB_AVAILABLE_IN_ALL +FILE *g_freopen (const gchar *filename, + const gchar *mode, + FILE *stream); + +struct utimbuf; /* Don't need the real definition of struct utimbuf when just + * including this header. + */ + +GLIB_AVAILABLE_IN_ALL +int g_utime (const gchar *filename, + struct utimbuf *utb); + +#endif /* G_OS_UNIX */ + +GLIB_AVAILABLE_IN_2_36 +gboolean g_close (gint fd, + GError **error); + +G_END_DECLS + +#endif /* __G_STDIO_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gstrfuncs.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gstrfuncs.h new file mode 100755 index 00000000..d09de568 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gstrfuncs.h @@ -0,0 +1,358 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_STRFUNCS_H__ +#define __G_STRFUNCS_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <stdarg.h> +#include <glib/gmacros.h> +#include <glib/gtypes.h> +#include <glib/gerror.h> + +G_BEGIN_DECLS + +/* Functions like the ones in <ctype.h> that are not affected by locale. */ +typedef enum { + G_ASCII_ALNUM = 1 << 0, + G_ASCII_ALPHA = 1 << 1, + G_ASCII_CNTRL = 1 << 2, + G_ASCII_DIGIT = 1 << 3, + G_ASCII_GRAPH = 1 << 4, + G_ASCII_LOWER = 1 << 5, + G_ASCII_PRINT = 1 << 6, + G_ASCII_PUNCT = 1 << 7, + G_ASCII_SPACE = 1 << 8, + G_ASCII_UPPER = 1 << 9, + G_ASCII_XDIGIT = 1 << 10 +} GAsciiType; + +GLIB_VAR const guint16 * const g_ascii_table; + +#define g_ascii_isalnum(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_ALNUM) != 0) + +#define g_ascii_isalpha(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_ALPHA) != 0) + +#define g_ascii_iscntrl(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_CNTRL) != 0) + +#define g_ascii_isdigit(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_DIGIT) != 0) + +#define g_ascii_isgraph(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_GRAPH) != 0) + +#define g_ascii_islower(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_LOWER) != 0) + +#define g_ascii_isprint(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_PRINT) != 0) + +#define g_ascii_ispunct(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_PUNCT) != 0) + +#define g_ascii_isspace(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_SPACE) != 0) + +#define g_ascii_isupper(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_UPPER) != 0) + +#define g_ascii_isxdigit(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_XDIGIT) != 0) + +GLIB_AVAILABLE_IN_ALL +gchar g_ascii_tolower (gchar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gchar g_ascii_toupper (gchar c) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +gint g_ascii_digit_value (gchar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gint g_ascii_xdigit_value (gchar c) G_GNUC_CONST; + +/* String utility functions that modify a string argument or + * return a constant string that must not be freed. + */ +#define G_STR_DELIMITERS "_-|> <." +GLIB_AVAILABLE_IN_ALL +gchar* g_strdelimit (gchar *string, + const gchar *delimiters, + gchar new_delimiter); +GLIB_AVAILABLE_IN_ALL +gchar* g_strcanon (gchar *string, + const gchar *valid_chars, + gchar substitutor); +GLIB_AVAILABLE_IN_ALL +const gchar * g_strerror (gint errnum) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +const gchar * g_strsignal (gint signum) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gchar * g_strreverse (gchar *string); +GLIB_AVAILABLE_IN_ALL +gsize g_strlcpy (gchar *dest, + const gchar *src, + gsize dest_size); +GLIB_AVAILABLE_IN_ALL +gsize g_strlcat (gchar *dest, + const gchar *src, + gsize dest_size); +GLIB_AVAILABLE_IN_ALL +gchar * g_strstr_len (const gchar *haystack, + gssize haystack_len, + const gchar *needle); +GLIB_AVAILABLE_IN_ALL +gchar * g_strrstr (const gchar *haystack, + const gchar *needle); +GLIB_AVAILABLE_IN_ALL +gchar * g_strrstr_len (const gchar *haystack, + gssize haystack_len, + const gchar *needle); + +GLIB_AVAILABLE_IN_ALL +gboolean g_str_has_suffix (const gchar *str, + const gchar *suffix); +GLIB_AVAILABLE_IN_ALL +gboolean g_str_has_prefix (const gchar *str, + const gchar *prefix); + +/* String to/from double conversion functions */ + +GLIB_AVAILABLE_IN_ALL +gdouble g_strtod (const gchar *nptr, + gchar **endptr); +GLIB_AVAILABLE_IN_ALL +gdouble g_ascii_strtod (const gchar *nptr, + gchar **endptr); +GLIB_AVAILABLE_IN_ALL +guint64 g_ascii_strtoull (const gchar *nptr, + gchar **endptr, + guint base); +GLIB_AVAILABLE_IN_ALL +gint64 g_ascii_strtoll (const gchar *nptr, + gchar **endptr, + guint base); +/* 29 bytes should enough for all possible values that + * g_ascii_dtostr can produce. + * Then add 10 for good measure */ +#define G_ASCII_DTOSTR_BUF_SIZE (29 + 10) +GLIB_AVAILABLE_IN_ALL +gchar * g_ascii_dtostr (gchar *buffer, + gint buf_len, + gdouble d); +GLIB_AVAILABLE_IN_ALL +gchar * g_ascii_formatd (gchar *buffer, + gint buf_len, + const gchar *format, + gdouble d); + +/* removes leading spaces */ +GLIB_AVAILABLE_IN_ALL +gchar* g_strchug (gchar *string); +/* removes trailing spaces */ +GLIB_AVAILABLE_IN_ALL +gchar* g_strchomp (gchar *string); +/* removes leading & trailing spaces */ +#define g_strstrip( string ) g_strchomp (g_strchug (string)) + +GLIB_AVAILABLE_IN_ALL +gint g_ascii_strcasecmp (const gchar *s1, + const gchar *s2); +GLIB_AVAILABLE_IN_ALL +gint g_ascii_strncasecmp (const gchar *s1, + const gchar *s2, + gsize n); +GLIB_AVAILABLE_IN_ALL +gchar* g_ascii_strdown (const gchar *str, + gssize len) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_ascii_strup (const gchar *str, + gssize len) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_2_40 +gboolean g_str_is_ascii (const gchar *str); + +GLIB_DEPRECATED +gint g_strcasecmp (const gchar *s1, + const gchar *s2); +GLIB_DEPRECATED +gint g_strncasecmp (const gchar *s1, + const gchar *s2, + guint n); +GLIB_DEPRECATED +gchar* g_strdown (gchar *string); +GLIB_DEPRECATED +gchar* g_strup (gchar *string); + + +/* String utility functions that return a newly allocated string which + * ought to be freed with g_free from the caller at some point. + */ +GLIB_AVAILABLE_IN_ALL +gchar* g_strdup (const gchar *str) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_strdup_printf (const gchar *format, + ...) G_GNUC_PRINTF (1, 2) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_strdup_vprintf (const gchar *format, + va_list args) G_GNUC_PRINTF(1, 0) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_strndup (const gchar *str, + gsize n) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_strnfill (gsize length, + gchar fill_char) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_strconcat (const gchar *string1, + ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED; +GLIB_AVAILABLE_IN_ALL +gchar* g_strjoin (const gchar *separator, + ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED; + +/* Make a copy of a string interpreting C string -style escape + * sequences. Inverse of g_strescape. The recognized sequences are \b + * \f \n \r \t \\ \" and the octal format. + */ +GLIB_AVAILABLE_IN_ALL +gchar* g_strcompress (const gchar *source) G_GNUC_MALLOC; + +/* Copy a string escaping nonprintable characters like in C strings. + * Inverse of g_strcompress. The exceptions parameter, if non-NULL, points + * to a string containing characters that are not to be escaped. + * + * Deprecated API: gchar* g_strescape (const gchar *source); + * Luckily this function wasn't used much, using NULL as second parameter + * provides mostly identical semantics. + */ +GLIB_AVAILABLE_IN_ALL +gchar* g_strescape (const gchar *source, + const gchar *exceptions) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gpointer g_memdup (gconstpointer mem, + guint byte_size) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(2); + +/* NULL terminated string arrays. + * g_strsplit(), g_strsplit_set() split up string into max_tokens tokens + * at delim and return a newly allocated string array. + * g_strjoinv() concatenates all of str_array's strings, sliding in an + * optional separator, the returned string is newly allocated. + * g_strfreev() frees the array itself and all of its strings. + * g_strdupv() copies a NULL-terminated array of strings + * g_strv_length() returns the length of a NULL-terminated array of strings + */ +typedef gchar** GStrv; +GLIB_AVAILABLE_IN_ALL +gchar** g_strsplit (const gchar *string, + const gchar *delimiter, + gint max_tokens) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar ** g_strsplit_set (const gchar *string, + const gchar *delimiters, + gint max_tokens) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_strjoinv (const gchar *separator, + gchar **str_array) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_strfreev (gchar **str_array); +GLIB_AVAILABLE_IN_ALL +gchar** g_strdupv (gchar **str_array) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +guint g_strv_length (gchar **str_array); + +GLIB_AVAILABLE_IN_ALL +gchar* g_stpcpy (gchar *dest, + const char *src); + +GLIB_AVAILABLE_IN_2_40 +gchar * g_str_to_ascii (const gchar *str, + const gchar *from_locale); + +GLIB_AVAILABLE_IN_2_40 +gchar ** g_str_tokenize_and_fold (const gchar *string, + const gchar *translit_locale, + gchar ***ascii_alternates); + +GLIB_AVAILABLE_IN_2_40 +gboolean g_str_match_string (const gchar *search_term, + const gchar *potential_hit, + gboolean accept_alternates); + +GLIB_AVAILABLE_IN_2_44 +gboolean g_strv_contains (const gchar * const *strv, + const gchar *str); + +/* Convenience ASCII string to number API */ + +/** + * GNumberParserError: + * @G_NUMBER_PARSER_ERROR_INVALID: String was not a valid number. + * @G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS: String was a number, but out of bounds. + * + * Error codes returned by functions converting a string to a number. + * + * Since: 2.54 + */ +typedef enum + { + G_NUMBER_PARSER_ERROR_INVALID, + G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS, + } GNumberParserError; + +/** + * G_NUMBER_PARSER_ERROR: + * + * Domain for errors returned by functions converting a string to a + * number. + * + * Since: 2.54 + */ +#define G_NUMBER_PARSER_ERROR (g_number_parser_error_quark ()) + +GLIB_AVAILABLE_IN_2_54 +GQuark g_number_parser_error_quark (void); + +GLIB_AVAILABLE_IN_2_54 +gboolean g_ascii_string_to_signed (const gchar *str, + guint base, + gint64 min, + gint64 max, + gint64 *out_num, + GError **error); + +GLIB_AVAILABLE_IN_2_54 +gboolean g_ascii_string_to_unsigned (const gchar *str, + guint base, + guint64 min, + guint64 max, + guint64 *out_num, + GError **error); + +G_END_DECLS + +#endif /* __G_STRFUNCS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gstring.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gstring.h new file mode 100755 index 00000000..77951b04 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gstring.h @@ -0,0 +1,189 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_STRING_H__ +#define __G_STRING_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> +#include <glib/gunicode.h> +#include <glib/gbytes.h> +#include <glib/gutils.h> /* for G_CAN_INLINE */ + +G_BEGIN_DECLS + +typedef struct _GString GString; + +struct _GString +{ + gchar *str; + gsize len; + gsize allocated_len; +}; + +GLIB_AVAILABLE_IN_ALL +GString* g_string_new (const gchar *init); +GLIB_AVAILABLE_IN_ALL +GString* g_string_new_len (const gchar *init, + gssize len); +GLIB_AVAILABLE_IN_ALL +GString* g_string_sized_new (gsize dfl_size); +GLIB_AVAILABLE_IN_ALL +gchar* g_string_free (GString *string, + gboolean free_segment); +GLIB_AVAILABLE_IN_2_34 +GBytes* g_string_free_to_bytes (GString *string); +GLIB_AVAILABLE_IN_ALL +gboolean g_string_equal (const GString *v, + const GString *v2); +GLIB_AVAILABLE_IN_ALL +guint g_string_hash (const GString *str); +GLIB_AVAILABLE_IN_ALL +GString* g_string_assign (GString *string, + const gchar *rval); +GLIB_AVAILABLE_IN_ALL +GString* g_string_truncate (GString *string, + gsize len); +GLIB_AVAILABLE_IN_ALL +GString* g_string_set_size (GString *string, + gsize len); +GLIB_AVAILABLE_IN_ALL +GString* g_string_insert_len (GString *string, + gssize pos, + const gchar *val, + gssize len); +GLIB_AVAILABLE_IN_ALL +GString* g_string_append (GString *string, + const gchar *val); +GLIB_AVAILABLE_IN_ALL +GString* g_string_append_len (GString *string, + const gchar *val, + gssize len); +GLIB_AVAILABLE_IN_ALL +GString* g_string_append_c (GString *string, + gchar c); +GLIB_AVAILABLE_IN_ALL +GString* g_string_append_unichar (GString *string, + gunichar wc); +GLIB_AVAILABLE_IN_ALL +GString* g_string_prepend (GString *string, + const gchar *val); +GLIB_AVAILABLE_IN_ALL +GString* g_string_prepend_c (GString *string, + gchar c); +GLIB_AVAILABLE_IN_ALL +GString* g_string_prepend_unichar (GString *string, + gunichar wc); +GLIB_AVAILABLE_IN_ALL +GString* g_string_prepend_len (GString *string, + const gchar *val, + gssize len); +GLIB_AVAILABLE_IN_ALL +GString* g_string_insert (GString *string, + gssize pos, + const gchar *val); +GLIB_AVAILABLE_IN_ALL +GString* g_string_insert_c (GString *string, + gssize pos, + gchar c); +GLIB_AVAILABLE_IN_ALL +GString* g_string_insert_unichar (GString *string, + gssize pos, + gunichar wc); +GLIB_AVAILABLE_IN_ALL +GString* g_string_overwrite (GString *string, + gsize pos, + const gchar *val); +GLIB_AVAILABLE_IN_ALL +GString* g_string_overwrite_len (GString *string, + gsize pos, + const gchar *val, + gssize len); +GLIB_AVAILABLE_IN_ALL +GString* g_string_erase (GString *string, + gssize pos, + gssize len); +GLIB_AVAILABLE_IN_ALL +GString* g_string_ascii_down (GString *string); +GLIB_AVAILABLE_IN_ALL +GString* g_string_ascii_up (GString *string); +GLIB_AVAILABLE_IN_ALL +void g_string_vprintf (GString *string, + const gchar *format, + va_list args) + G_GNUC_PRINTF(2, 0); +GLIB_AVAILABLE_IN_ALL +void g_string_printf (GString *string, + const gchar *format, + ...) G_GNUC_PRINTF (2, 3); +GLIB_AVAILABLE_IN_ALL +void g_string_append_vprintf (GString *string, + const gchar *format, + va_list args) + G_GNUC_PRINTF(2, 0); +GLIB_AVAILABLE_IN_ALL +void g_string_append_printf (GString *string, + const gchar *format, + ...) G_GNUC_PRINTF (2, 3); +GLIB_AVAILABLE_IN_ALL +GString* g_string_append_uri_escaped (GString *string, + const gchar *unescaped, + const gchar *reserved_chars_allowed, + gboolean allow_utf8); + +/* -- optimize g_strig_append_c --- */ +#ifdef G_CAN_INLINE +static inline GString* +g_string_append_c_inline (GString *gstring, + gchar c) +{ + if (gstring->len + 1 < gstring->allocated_len) + { + gstring->str[gstring->len++] = c; + gstring->str[gstring->len] = 0; + } + else + g_string_insert_c (gstring, -1, c); + return gstring; +} +#define g_string_append_c(gstr,c) g_string_append_c_inline (gstr, c) +#endif /* G_CAN_INLINE */ + + +GLIB_DEPRECATED +GString *g_string_down (GString *string); +GLIB_DEPRECATED +GString *g_string_up (GString *string); + +#ifndef G_DISABLE_DEPRECATED +#define g_string_sprintf g_string_printf +#define g_string_sprintfa g_string_append_printf +#endif + +G_END_DECLS + +#endif /* __G_STRING_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gstringchunk.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gstringchunk.h new file mode 100755 index 00000000..8d445e34 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gstringchunk.h @@ -0,0 +1,57 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_STRINGCHUNK_H__ +#define __G_STRINGCHUNK_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +typedef struct _GStringChunk GStringChunk; + +GLIB_AVAILABLE_IN_ALL +GStringChunk* g_string_chunk_new (gsize size); +GLIB_AVAILABLE_IN_ALL +void g_string_chunk_free (GStringChunk *chunk); +GLIB_AVAILABLE_IN_ALL +void g_string_chunk_clear (GStringChunk *chunk); +GLIB_AVAILABLE_IN_ALL +gchar* g_string_chunk_insert (GStringChunk *chunk, + const gchar *string); +GLIB_AVAILABLE_IN_ALL +gchar* g_string_chunk_insert_len (GStringChunk *chunk, + const gchar *string, + gssize len); +GLIB_AVAILABLE_IN_ALL +gchar* g_string_chunk_insert_const (GStringChunk *chunk, + const gchar *string); + +G_END_DECLS + +#endif /* __G_STRING_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gtestutils.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gtestutils.h new file mode 100755 index 00000000..1d05b97f --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gtestutils.h @@ -0,0 +1,461 @@ +/* GLib testing utilities + * Copyright (C) 2007 Imendio AB + * Authors: Tim Janik + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_TEST_UTILS_H__ +#define __G_TEST_UTILS_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gmessages.h> +#include <glib/gstring.h> +#include <glib/gerror.h> +#include <glib/gslist.h> +#include <string.h> + +G_BEGIN_DECLS + +typedef struct GTestCase GTestCase; +typedef struct GTestSuite GTestSuite; +typedef void (*GTestFunc) (void); +typedef void (*GTestDataFunc) (gconstpointer user_data); +typedef void (*GTestFixtureFunc) (gpointer fixture, + gconstpointer user_data); + +/* assertion API */ +#define g_assert_cmpstr(s1, cmp, s2) G_STMT_START { \ + const char *__s1 = (s1), *__s2 = (s2); \ + if (g_strcmp0 (__s1, __s2) cmp 0) ; else \ + g_assertion_message_cmpstr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #s1 " " #cmp " " #s2, __s1, #cmp, __s2); \ + } G_STMT_END +#define g_assert_cmpint(n1, cmp, n2) G_STMT_START { \ + gint64 __n1 = (n1), __n2 = (n2); \ + if (__n1 cmp __n2) ; else \ + g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #n1 " " #cmp " " #n2, (long double) __n1, #cmp, (long double) __n2, 'i'); \ + } G_STMT_END +#define g_assert_cmpuint(n1, cmp, n2) G_STMT_START { \ + guint64 __n1 = (n1), __n2 = (n2); \ + if (__n1 cmp __n2) ; else \ + g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #n1 " " #cmp " " #n2, (long double) __n1, #cmp, (long double) __n2, 'i'); \ + } G_STMT_END +#define g_assert_cmphex(n1, cmp, n2) G_STMT_START {\ + guint64 __n1 = (n1), __n2 = (n2); \ + if (__n1 cmp __n2) ; else \ + g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #n1 " " #cmp " " #n2, (long double) __n1, #cmp, (long double) __n2, 'x'); \ + } G_STMT_END +#define g_assert_cmpfloat(n1,cmp,n2) G_STMT_START { \ + long double __n1 = (n1), __n2 = (n2); \ + if (__n1 cmp __n2) ; else \ + g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #n1 " " #cmp " " #n2, (long double) __n1, #cmp, (long double) __n2, 'f'); \ + } G_STMT_END +#define g_assert_cmpmem(m1, l1, m2, l2) G_STMT_START {\ + gconstpointer __m1 = m1, __m2 = m2; \ + int __l1 = l1, __l2 = l2; \ + if (__l1 != __l2) \ + g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #l1 " (len(" #m1 ")) == " #l2 " (len(" #m2 "))", \ + (long double) __l1, "==", (long double) __l2, 'i'); \ + else if (__l1 != 0 && memcmp (__m1, __m2, __l1) != 0) \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "assertion failed (" #m1 " == " #m2 ")"); \ + } G_STMT_END +#define g_assert_no_error(err) G_STMT_START { \ + if (err) \ + g_assertion_message_error (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #err, err, 0, 0); \ + } G_STMT_END +#define g_assert_error(err, dom, c) G_STMT_START { \ + if (!err || (err)->domain != dom || (err)->code != c) \ + g_assertion_message_error (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #err, err, dom, c); \ + } G_STMT_END +#define g_assert_true(expr) G_STMT_START { \ + if G_LIKELY (expr) ; else \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "'" #expr "' should be TRUE"); \ + } G_STMT_END +#define g_assert_false(expr) G_STMT_START { \ + if G_LIKELY (!(expr)) ; else \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "'" #expr "' should be FALSE"); \ + } G_STMT_END +#define g_assert_null(expr) G_STMT_START { if G_LIKELY ((expr) == NULL) ; else \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "'" #expr "' should be NULL"); \ + } G_STMT_END +#define g_assert_nonnull(expr) G_STMT_START { \ + if G_LIKELY ((expr) != NULL) ; else \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "'" #expr "' should not be NULL"); \ + } G_STMT_END +#ifdef G_DISABLE_ASSERT +#define g_assert_not_reached() G_STMT_START { (void) 0; } G_STMT_END +#define g_assert(expr) G_STMT_START { (void) 0; } G_STMT_END +#else /* !G_DISABLE_ASSERT */ +#define g_assert_not_reached() G_STMT_START { g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, NULL); } G_STMT_END +#define g_assert(expr) G_STMT_START { \ + if G_LIKELY (expr) ; else \ + g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #expr); \ + } G_STMT_END +#endif /* !G_DISABLE_ASSERT */ + +GLIB_AVAILABLE_IN_ALL +int g_strcmp0 (const char *str1, + const char *str2); + +/* report performance results */ +GLIB_AVAILABLE_IN_ALL +void g_test_minimized_result (double minimized_quantity, + const char *format, + ...) G_GNUC_PRINTF (2, 3); +GLIB_AVAILABLE_IN_ALL +void g_test_maximized_result (double maximized_quantity, + const char *format, + ...) G_GNUC_PRINTF (2, 3); + +/* initialize testing framework */ +GLIB_AVAILABLE_IN_ALL +void g_test_init (int *argc, + char ***argv, + ...) G_GNUC_NULL_TERMINATED; +/* query testing framework config */ +#define g_test_initialized() (g_test_config_vars->test_initialized) +#define g_test_quick() (g_test_config_vars->test_quick) +#define g_test_slow() (!g_test_config_vars->test_quick) +#define g_test_thorough() (!g_test_config_vars->test_quick) +#define g_test_perf() (g_test_config_vars->test_perf) +#define g_test_verbose() (g_test_config_vars->test_verbose) +#define g_test_quiet() (g_test_config_vars->test_quiet) +#define g_test_undefined() (g_test_config_vars->test_undefined) +GLIB_AVAILABLE_IN_2_38 +gboolean g_test_subprocess (void); + +/* run all tests under toplevel suite (path: /) */ +GLIB_AVAILABLE_IN_ALL +int g_test_run (void); +/* hook up a test functions under test path */ +GLIB_AVAILABLE_IN_ALL +void g_test_add_func (const char *testpath, + GTestFunc test_func); + +GLIB_AVAILABLE_IN_ALL +void g_test_add_data_func (const char *testpath, + gconstpointer test_data, + GTestDataFunc test_func); + +GLIB_AVAILABLE_IN_2_34 +void g_test_add_data_func_full (const char *testpath, + gpointer test_data, + GTestDataFunc test_func, + GDestroyNotify data_free_func); + +/* tell about failure */ +GLIB_AVAILABLE_IN_2_30 +void g_test_fail (void); +GLIB_AVAILABLE_IN_2_38 +void g_test_incomplete (const gchar *msg); +GLIB_AVAILABLE_IN_2_38 +void g_test_skip (const gchar *msg); +GLIB_AVAILABLE_IN_2_38 +gboolean g_test_failed (void); +GLIB_AVAILABLE_IN_2_38 +void g_test_set_nonfatal_assertions (void); + +/* hook up a test with fixture under test path */ +#define g_test_add(testpath, Fixture, tdata, fsetup, ftest, fteardown) \ + G_STMT_START { \ + void (*add_vtable) (const char*, \ + gsize, \ + gconstpointer, \ + void (*) (Fixture*, gconstpointer), \ + void (*) (Fixture*, gconstpointer), \ + void (*) (Fixture*, gconstpointer)) = (void (*) (const gchar *, gsize, gconstpointer, void (*) (Fixture*, gconstpointer), void (*) (Fixture*, gconstpointer), void (*) (Fixture*, gconstpointer))) g_test_add_vtable; \ + add_vtable \ + (testpath, sizeof (Fixture), tdata, fsetup, ftest, fteardown); \ + } G_STMT_END + +/* add test messages to the test report */ +GLIB_AVAILABLE_IN_ALL +void g_test_message (const char *format, + ...) G_GNUC_PRINTF (1, 2); +GLIB_AVAILABLE_IN_ALL +void g_test_bug_base (const char *uri_pattern); +GLIB_AVAILABLE_IN_ALL +void g_test_bug (const char *bug_uri_snippet); +/* measure test timings */ +GLIB_AVAILABLE_IN_ALL +void g_test_timer_start (void); +GLIB_AVAILABLE_IN_ALL +double g_test_timer_elapsed (void); /* elapsed seconds */ +GLIB_AVAILABLE_IN_ALL +double g_test_timer_last (void); /* repeat last elapsed() result */ + +/* automatically g_free or g_object_unref upon teardown */ +GLIB_AVAILABLE_IN_ALL +void g_test_queue_free (gpointer gfree_pointer); +GLIB_AVAILABLE_IN_ALL +void g_test_queue_destroy (GDestroyNotify destroy_func, + gpointer destroy_data); +#define g_test_queue_unref(gobject) g_test_queue_destroy (g_object_unref, gobject) + +typedef enum { + G_TEST_TRAP_SILENCE_STDOUT = 1 << 7, + G_TEST_TRAP_SILENCE_STDERR = 1 << 8, + G_TEST_TRAP_INHERIT_STDIN = 1 << 9 +} GTestTrapFlags; + +GLIB_DEPRECATED_IN_2_38_FOR (g_test_trap_subprocess) +gboolean g_test_trap_fork (guint64 usec_timeout, + GTestTrapFlags test_trap_flags); + +typedef enum { + G_TEST_SUBPROCESS_INHERIT_STDIN = 1 << 0, + G_TEST_SUBPROCESS_INHERIT_STDOUT = 1 << 1, + G_TEST_SUBPROCESS_INHERIT_STDERR = 1 << 2 +} GTestSubprocessFlags; + +GLIB_AVAILABLE_IN_2_38 +void g_test_trap_subprocess (const char *test_path, + guint64 usec_timeout, + GTestSubprocessFlags test_flags); + +GLIB_AVAILABLE_IN_ALL +gboolean g_test_trap_has_passed (void); +GLIB_AVAILABLE_IN_ALL +gboolean g_test_trap_reached_timeout (void); +#define g_test_trap_assert_passed() g_test_trap_assertions (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 0, 0) +#define g_test_trap_assert_failed() g_test_trap_assertions (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 1, 0) +#define g_test_trap_assert_stdout(soutpattern) g_test_trap_assertions (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 2, soutpattern) +#define g_test_trap_assert_stdout_unmatched(soutpattern) g_test_trap_assertions (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 3, soutpattern) +#define g_test_trap_assert_stderr(serrpattern) g_test_trap_assertions (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 4, serrpattern) +#define g_test_trap_assert_stderr_unmatched(serrpattern) g_test_trap_assertions (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 5, serrpattern) + +/* provide seed-able random numbers for tests */ +#define g_test_rand_bit() (0 != (g_test_rand_int() & (1 << 15))) +GLIB_AVAILABLE_IN_ALL +gint32 g_test_rand_int (void); +GLIB_AVAILABLE_IN_ALL +gint32 g_test_rand_int_range (gint32 begin, + gint32 end); +GLIB_AVAILABLE_IN_ALL +double g_test_rand_double (void); +GLIB_AVAILABLE_IN_ALL +double g_test_rand_double_range (double range_start, + double range_end); + +/* + * semi-internal API: non-documented symbols with stable ABI. You + * should use the non-internal helper macros instead. However, for + * compatibility reason, you may use this semi-internal API. + */ +GLIB_AVAILABLE_IN_ALL +GTestCase* g_test_create_case (const char *test_name, + gsize data_size, + gconstpointer test_data, + GTestFixtureFunc data_setup, + GTestFixtureFunc data_test, + GTestFixtureFunc data_teardown); +GLIB_AVAILABLE_IN_ALL +GTestSuite* g_test_create_suite (const char *suite_name); +GLIB_AVAILABLE_IN_ALL +GTestSuite* g_test_get_root (void); +GLIB_AVAILABLE_IN_ALL +void g_test_suite_add (GTestSuite *suite, + GTestCase *test_case); +GLIB_AVAILABLE_IN_ALL +void g_test_suite_add_suite (GTestSuite *suite, + GTestSuite *nestedsuite); +GLIB_AVAILABLE_IN_ALL +int g_test_run_suite (GTestSuite *suite); + +GLIB_AVAILABLE_IN_ALL +void g_test_trap_assertions (const char *domain, + const char *file, + int line, + const char *func, + guint64 assertion_flags, /* 0-pass, 1-fail, 2-outpattern, 4-errpattern */ + const char *pattern); +GLIB_AVAILABLE_IN_ALL +void g_assertion_message (const char *domain, + const char *file, + int line, + const char *func, + const char *message); +GLIB_AVAILABLE_IN_ALL +void g_assertion_message_expr (const char *domain, + const char *file, + int line, + const char *func, + const char *expr) G_GNUC_NORETURN; +GLIB_AVAILABLE_IN_ALL +void g_assertion_message_cmpstr (const char *domain, + const char *file, + int line, + const char *func, + const char *expr, + const char *arg1, + const char *cmp, + const char *arg2); +GLIB_AVAILABLE_IN_ALL +void g_assertion_message_cmpnum (const char *domain, + const char *file, + int line, + const char *func, + const char *expr, + long double arg1, + const char *cmp, + long double arg2, + char numtype); +GLIB_AVAILABLE_IN_ALL +void g_assertion_message_error (const char *domain, + const char *file, + int line, + const char *func, + const char *expr, + const GError *error, + GQuark error_domain, + int error_code); +GLIB_AVAILABLE_IN_ALL +void g_test_add_vtable (const char *testpath, + gsize data_size, + gconstpointer test_data, + GTestFixtureFunc data_setup, + GTestFixtureFunc data_test, + GTestFixtureFunc data_teardown); +typedef struct { + gboolean test_initialized; + gboolean test_quick; /* disable thorough tests */ + gboolean test_perf; /* run performance tests */ + gboolean test_verbose; /* extra info */ + gboolean test_quiet; /* reduce output */ + gboolean test_undefined; /* run tests that are meant to assert */ +} GTestConfig; +GLIB_VAR const GTestConfig * const g_test_config_vars; + +/* internal logging API */ +typedef enum { + G_TEST_RUN_SUCCESS, + G_TEST_RUN_SKIPPED, + G_TEST_RUN_FAILURE, + G_TEST_RUN_INCOMPLETE +} GTestResult; + +typedef enum { + G_TEST_LOG_NONE, + G_TEST_LOG_ERROR, /* s:msg */ + G_TEST_LOG_START_BINARY, /* s:binaryname s:seed */ + G_TEST_LOG_LIST_CASE, /* s:testpath */ + G_TEST_LOG_SKIP_CASE, /* s:testpath */ + G_TEST_LOG_START_CASE, /* s:testpath */ + G_TEST_LOG_STOP_CASE, /* d:status d:nforks d:elapsed */ + G_TEST_LOG_MIN_RESULT, /* s:blurb d:result */ + G_TEST_LOG_MAX_RESULT, /* s:blurb d:result */ + G_TEST_LOG_MESSAGE, /* s:blurb */ + G_TEST_LOG_START_SUITE, + G_TEST_LOG_STOP_SUITE +} GTestLogType; + +typedef struct { + GTestLogType log_type; + guint n_strings; + gchar **strings; /* NULL terminated */ + guint n_nums; + long double *nums; +} GTestLogMsg; +typedef struct { + /*< private >*/ + GString *data; + GSList *msgs; +} GTestLogBuffer; + +GLIB_AVAILABLE_IN_ALL +const char* g_test_log_type_name (GTestLogType log_type); +GLIB_AVAILABLE_IN_ALL +GTestLogBuffer* g_test_log_buffer_new (void); +GLIB_AVAILABLE_IN_ALL +void g_test_log_buffer_free (GTestLogBuffer *tbuffer); +GLIB_AVAILABLE_IN_ALL +void g_test_log_buffer_push (GTestLogBuffer *tbuffer, + guint n_bytes, + const guint8 *bytes); +GLIB_AVAILABLE_IN_ALL +GTestLogMsg* g_test_log_buffer_pop (GTestLogBuffer *tbuffer); +GLIB_AVAILABLE_IN_ALL +void g_test_log_msg_free (GTestLogMsg *tmsg); + +/** + * GTestLogFatalFunc: + * @log_domain: the log domain of the message + * @log_level: the log level of the message (including the fatal and recursion flags) + * @message: the message to process + * @user_data: user data, set in g_test_log_set_fatal_handler() + * + * Specifies the prototype of fatal log handler functions. + * + * Returns: %TRUE if the program should abort, %FALSE otherwise + * + * Since: 2.22 + */ +typedef gboolean (*GTestLogFatalFunc) (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +void +g_test_log_set_fatal_handler (GTestLogFatalFunc log_func, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_34 +void g_test_expect_message (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *pattern); +GLIB_AVAILABLE_IN_2_34 +void g_test_assert_expected_messages_internal (const char *domain, + const char *file, + int line, + const char *func); + +typedef enum +{ + G_TEST_DIST, + G_TEST_BUILT +} GTestFileType; + +GLIB_AVAILABLE_IN_2_38 +gchar * g_test_build_filename (GTestFileType file_type, + const gchar *first_path, + ...) G_GNUC_NULL_TERMINATED; +GLIB_AVAILABLE_IN_2_38 +const gchar *g_test_get_dir (GTestFileType file_type); +GLIB_AVAILABLE_IN_2_38 +const gchar *g_test_get_filename (GTestFileType file_type, + const gchar *first_path, + ...) G_GNUC_NULL_TERMINATED; + +#define g_test_assert_expected_messages() g_test_assert_expected_messages_internal (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC) + +G_END_DECLS + +#endif /* __G_TEST_UTILS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gthread.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gthread.h new file mode 100755 index 00000000..3d765c2c --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gthread.h @@ -0,0 +1,341 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_THREAD_H__ +#define __G_THREAD_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gatomic.h> +#include <glib/gerror.h> +#include <glib/gutils.h> + +G_BEGIN_DECLS + +#define G_THREAD_ERROR g_thread_error_quark () +GLIB_AVAILABLE_IN_ALL +GQuark g_thread_error_quark (void); + +typedef enum +{ + G_THREAD_ERROR_AGAIN /* Resource temporarily unavailable */ +} GThreadError; + +typedef gpointer (*GThreadFunc) (gpointer data); + +typedef struct _GThread GThread; + +typedef union _GMutex GMutex; +typedef struct _GRecMutex GRecMutex; +typedef struct _GRWLock GRWLock; +typedef struct _GCond GCond; +typedef struct _GPrivate GPrivate; +typedef struct _GOnce GOnce; + +union _GMutex +{ + /*< private >*/ + gpointer p; + guint i[2]; +}; + +struct _GRWLock +{ + /*< private >*/ + gpointer p; + guint i[2]; +}; + +struct _GCond +{ + /*< private >*/ + gpointer p; + guint i[2]; +}; + +struct _GRecMutex +{ + /*< private >*/ + gpointer p; + guint i[2]; +}; + +#define G_PRIVATE_INIT(notify) { NULL, (notify), { NULL, NULL } } +struct _GPrivate +{ + /*< private >*/ + gpointer p; + GDestroyNotify notify; + gpointer future[2]; +}; + +typedef enum +{ + G_ONCE_STATUS_NOTCALLED, + G_ONCE_STATUS_PROGRESS, + G_ONCE_STATUS_READY +} GOnceStatus; + +#define G_ONCE_INIT { G_ONCE_STATUS_NOTCALLED, NULL } +struct _GOnce +{ + volatile GOnceStatus status; + volatile gpointer retval; +}; + +#define G_LOCK_NAME(name) g__ ## name ## _lock +#define G_LOCK_DEFINE_STATIC(name) static G_LOCK_DEFINE (name) +#define G_LOCK_DEFINE(name) GMutex G_LOCK_NAME (name) +#define G_LOCK_EXTERN(name) extern GMutex G_LOCK_NAME (name) + +#ifdef G_DEBUG_LOCKS +# define G_LOCK(name) G_STMT_START{ \ + g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ + "file %s: line %d (%s): locking: %s ", \ + __FILE__, __LINE__, G_STRFUNC, \ + #name); \ + g_mutex_lock (&G_LOCK_NAME (name)); \ + }G_STMT_END +# define G_UNLOCK(name) G_STMT_START{ \ + g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ + "file %s: line %d (%s): unlocking: %s ", \ + __FILE__, __LINE__, G_STRFUNC, \ + #name); \ + g_mutex_unlock (&G_LOCK_NAME (name)); \ + }G_STMT_END +# define G_TRYLOCK(name) \ + (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ + "file %s: line %d (%s): try locking: %s ", \ + __FILE__, __LINE__, G_STRFUNC, \ + #name), g_mutex_trylock (&G_LOCK_NAME (name))) +#else /* !G_DEBUG_LOCKS */ +# define G_LOCK(name) g_mutex_lock (&G_LOCK_NAME (name)) +# define G_UNLOCK(name) g_mutex_unlock (&G_LOCK_NAME (name)) +# define G_TRYLOCK(name) g_mutex_trylock (&G_LOCK_NAME (name)) +#endif /* !G_DEBUG_LOCKS */ + +GLIB_AVAILABLE_IN_2_32 +GThread * g_thread_ref (GThread *thread); +GLIB_AVAILABLE_IN_2_32 +void g_thread_unref (GThread *thread); +GLIB_AVAILABLE_IN_2_32 +GThread * g_thread_new (const gchar *name, + GThreadFunc func, + gpointer data); +GLIB_AVAILABLE_IN_2_32 +GThread * g_thread_try_new (const gchar *name, + GThreadFunc func, + gpointer data, + GError **error); +GLIB_AVAILABLE_IN_ALL +GThread * g_thread_self (void); +GLIB_AVAILABLE_IN_ALL +void g_thread_exit (gpointer retval); +GLIB_AVAILABLE_IN_ALL +gpointer g_thread_join (GThread *thread); +GLIB_AVAILABLE_IN_ALL +void g_thread_yield (void); + + +GLIB_AVAILABLE_IN_2_32 +void g_mutex_init (GMutex *mutex); +GLIB_AVAILABLE_IN_2_32 +void g_mutex_clear (GMutex *mutex); +GLIB_AVAILABLE_IN_ALL +void g_mutex_lock (GMutex *mutex); +GLIB_AVAILABLE_IN_ALL +gboolean g_mutex_trylock (GMutex *mutex); +GLIB_AVAILABLE_IN_ALL +void g_mutex_unlock (GMutex *mutex); + +GLIB_AVAILABLE_IN_2_32 +void g_rw_lock_init (GRWLock *rw_lock); +GLIB_AVAILABLE_IN_2_32 +void g_rw_lock_clear (GRWLock *rw_lock); +GLIB_AVAILABLE_IN_2_32 +void g_rw_lock_writer_lock (GRWLock *rw_lock); +GLIB_AVAILABLE_IN_2_32 +gboolean g_rw_lock_writer_trylock (GRWLock *rw_lock); +GLIB_AVAILABLE_IN_2_32 +void g_rw_lock_writer_unlock (GRWLock *rw_lock); +GLIB_AVAILABLE_IN_2_32 +void g_rw_lock_reader_lock (GRWLock *rw_lock); +GLIB_AVAILABLE_IN_2_32 +gboolean g_rw_lock_reader_trylock (GRWLock *rw_lock); +GLIB_AVAILABLE_IN_2_32 +void g_rw_lock_reader_unlock (GRWLock *rw_lock); + +GLIB_AVAILABLE_IN_2_32 +void g_rec_mutex_init (GRecMutex *rec_mutex); +GLIB_AVAILABLE_IN_2_32 +void g_rec_mutex_clear (GRecMutex *rec_mutex); +GLIB_AVAILABLE_IN_2_32 +void g_rec_mutex_lock (GRecMutex *rec_mutex); +GLIB_AVAILABLE_IN_2_32 +gboolean g_rec_mutex_trylock (GRecMutex *rec_mutex); +GLIB_AVAILABLE_IN_2_32 +void g_rec_mutex_unlock (GRecMutex *rec_mutex); + +GLIB_AVAILABLE_IN_2_32 +void g_cond_init (GCond *cond); +GLIB_AVAILABLE_IN_2_32 +void g_cond_clear (GCond *cond); +GLIB_AVAILABLE_IN_ALL +void g_cond_wait (GCond *cond, + GMutex *mutex); +GLIB_AVAILABLE_IN_ALL +void g_cond_signal (GCond *cond); +GLIB_AVAILABLE_IN_ALL +void g_cond_broadcast (GCond *cond); +GLIB_AVAILABLE_IN_2_32 +gboolean g_cond_wait_until (GCond *cond, + GMutex *mutex, + gint64 end_time); + +GLIB_AVAILABLE_IN_ALL +gpointer g_private_get (GPrivate *key); +GLIB_AVAILABLE_IN_ALL +void g_private_set (GPrivate *key, + gpointer value); +GLIB_AVAILABLE_IN_2_32 +void g_private_replace (GPrivate *key, + gpointer value); + +GLIB_AVAILABLE_IN_ALL +gpointer g_once_impl (GOnce *once, + GThreadFunc func, + gpointer arg); +GLIB_AVAILABLE_IN_ALL +gboolean g_once_init_enter (volatile void *location); +GLIB_AVAILABLE_IN_ALL +void g_once_init_leave (volatile void *location, + gsize result); + +#ifdef G_ATOMIC_OP_MEMORY_BARRIER_NEEDED +# define g_once(once, func, arg) g_once_impl ((once), (func), (arg)) +#else /* !G_ATOMIC_OP_MEMORY_BARRIER_NEEDED*/ +# define g_once(once, func, arg) \ + (((once)->status == G_ONCE_STATUS_READY) ? \ + (once)->retval : \ + g_once_impl ((once), (func), (arg))) +#endif /* G_ATOMIC_OP_MEMORY_BARRIER_NEEDED */ + +#ifdef __GNUC__ +# define g_once_init_enter(location) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(location) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(location) : 0); \ + (!g_atomic_pointer_get (location) && \ + g_once_init_enter (location)); \ + })) +# define g_once_init_leave(location, result) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(location) == sizeof (gpointer)); \ + (void) (0 ? *(location) = (result) : 0); \ + g_once_init_leave ((location), (gsize) (result)); \ + })) +#else +# define g_once_init_enter(location) \ + (g_once_init_enter((location))) +# define g_once_init_leave(location, result) \ + (g_once_init_leave((location), (gsize) (result))) +#endif + +GLIB_AVAILABLE_IN_2_36 +guint g_get_num_processors (void); + +/** + * GMutexLocker: + * + * Opaque type. See g_mutex_locker_new() for details. + * Since: 2.44 + */ +typedef void GMutexLocker; + +/** + * g_mutex_locker_new: + * @mutex: a mutex to lock + * + * Lock @mutex and return a new #GMutexLocker. Unlock with + * g_mutex_locker_free(). Using g_mutex_unlock() on @mutex + * while a #GMutexLocker exists can lead to undefined behaviour. + * + * This is intended to be used with g_autoptr(). Note that g_autoptr() + * is only available when using GCC or clang, so the following example + * will only work with those compilers: + * |[ + * typedef struct + * { + * ... + * GMutex mutex; + * ... + * } MyObject; + * + * static void + * my_object_do_stuff (MyObject *self) + * { + * g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&self->mutex); + * + * // Code with mutex locked here + * + * if (cond) + * // No need to unlock + * return; + * + * // Optionally early unlock + * g_clear_pointer (&locker, g_mutex_locker_free); + * + * // Code with mutex unlocked here + * } + * ]| + * + * Returns: a #GMutexLocker + * Since: 2.44 + */ +static inline GMutexLocker * +g_mutex_locker_new (GMutex *mutex) +{ + g_mutex_lock (mutex); + return (GMutexLocker *) mutex; +} + +/** + * g_mutex_locker_free: + * @locker: a GMutexLocker + * + * Unlock @locker's mutex. See g_mutex_locker_new() for details. + * + * Since: 2.44 + */ +static inline void +g_mutex_locker_free (GMutexLocker *locker) +{ + g_mutex_unlock ((GMutex *) locker); +} + +G_END_DECLS + +#endif /* __G_THREAD_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gthreadpool.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gthreadpool.h new file mode 100755 index 00000000..11c3d1d1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gthreadpool.h @@ -0,0 +1,96 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_THREADPOOL_H__ +#define __G_THREADPOOL_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gthread.h> + +G_BEGIN_DECLS + +typedef struct _GThreadPool GThreadPool; + +/* Thread Pools + */ + +struct _GThreadPool +{ + GFunc func; + gpointer user_data; + gboolean exclusive; +}; + +GLIB_AVAILABLE_IN_ALL +GThreadPool * g_thread_pool_new (GFunc func, + gpointer user_data, + gint max_threads, + gboolean exclusive, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_thread_pool_free (GThreadPool *pool, + gboolean immediate, + gboolean wait_); +GLIB_AVAILABLE_IN_ALL +gboolean g_thread_pool_push (GThreadPool *pool, + gpointer data, + GError **error); +GLIB_AVAILABLE_IN_ALL +guint g_thread_pool_unprocessed (GThreadPool *pool); +GLIB_AVAILABLE_IN_ALL +void g_thread_pool_set_sort_function (GThreadPool *pool, + GCompareDataFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_2_46 +gboolean g_thread_pool_move_to_front (GThreadPool *pool, + gpointer data); + +GLIB_AVAILABLE_IN_ALL +gboolean g_thread_pool_set_max_threads (GThreadPool *pool, + gint max_threads, + GError **error); +GLIB_AVAILABLE_IN_ALL +gint g_thread_pool_get_max_threads (GThreadPool *pool); +GLIB_AVAILABLE_IN_ALL +guint g_thread_pool_get_num_threads (GThreadPool *pool); + +GLIB_AVAILABLE_IN_ALL +void g_thread_pool_set_max_unused_threads (gint max_threads); +GLIB_AVAILABLE_IN_ALL +gint g_thread_pool_get_max_unused_threads (void); +GLIB_AVAILABLE_IN_ALL +guint g_thread_pool_get_num_unused_threads (void); +GLIB_AVAILABLE_IN_ALL +void g_thread_pool_stop_unused_threads (void); +GLIB_AVAILABLE_IN_ALL +void g_thread_pool_set_max_idle_time (guint interval); +GLIB_AVAILABLE_IN_ALL +guint g_thread_pool_get_max_idle_time (void); + +G_END_DECLS + +#endif /* __G_THREADPOOL_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gtimer.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gtimer.h new file mode 100755 index 00000000..5699b696 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gtimer.h @@ -0,0 +1,74 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_TIMER_H__ +#define __G_TIMER_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +/* Timer + */ + +/* microseconds per second */ +typedef struct _GTimer GTimer; + +#define G_USEC_PER_SEC 1000000 + +GLIB_AVAILABLE_IN_ALL +GTimer* g_timer_new (void); +GLIB_AVAILABLE_IN_ALL +void g_timer_destroy (GTimer *timer); +GLIB_AVAILABLE_IN_ALL +void g_timer_start (GTimer *timer); +GLIB_AVAILABLE_IN_ALL +void g_timer_stop (GTimer *timer); +GLIB_AVAILABLE_IN_ALL +void g_timer_reset (GTimer *timer); +GLIB_AVAILABLE_IN_ALL +void g_timer_continue (GTimer *timer); +GLIB_AVAILABLE_IN_ALL +gdouble g_timer_elapsed (GTimer *timer, + gulong *microseconds); + +GLIB_AVAILABLE_IN_ALL +void g_usleep (gulong microseconds); + +GLIB_AVAILABLE_IN_ALL +void g_time_val_add (GTimeVal *time_, + glong microseconds); +GLIB_AVAILABLE_IN_ALL +gboolean g_time_val_from_iso8601 (const gchar *iso_date, + GTimeVal *time_); +GLIB_AVAILABLE_IN_ALL +gchar* g_time_val_to_iso8601 (GTimeVal *time_) G_GNUC_MALLOC; + +G_END_DECLS + +#endif /* __G_TIMER_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gtimezone.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gtimezone.h new file mode 100755 index 00000000..dc29bd76 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gtimezone.h @@ -0,0 +1,89 @@ +/* + * Copyright © 2010 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_TIME_ZONE_H__ +#define __G_TIME_ZONE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +typedef struct _GTimeZone GTimeZone; + +/** + * GTimeType: + * @G_TIME_TYPE_STANDARD: the time is in local standard time + * @G_TIME_TYPE_DAYLIGHT: the time is in local daylight time + * @G_TIME_TYPE_UNIVERSAL: the time is in UTC + * + * Disambiguates a given time in two ways. + * + * First, specifies if the given time is in universal or local time. + * + * Second, if the time is in local time, specifies if it is local + * standard time or local daylight time. This is important for the case + * where the same local time occurs twice (during daylight savings time + * transitions, for example). + */ +typedef enum +{ + G_TIME_TYPE_STANDARD, + G_TIME_TYPE_DAYLIGHT, + G_TIME_TYPE_UNIVERSAL +} GTimeType; + +GLIB_AVAILABLE_IN_ALL +GTimeZone * g_time_zone_new (const gchar *identifier); +GLIB_AVAILABLE_IN_ALL +GTimeZone * g_time_zone_new_utc (void); +GLIB_AVAILABLE_IN_ALL +GTimeZone * g_time_zone_new_local (void); + +GLIB_AVAILABLE_IN_ALL +GTimeZone * g_time_zone_ref (GTimeZone *tz); +GLIB_AVAILABLE_IN_ALL +void g_time_zone_unref (GTimeZone *tz); + +GLIB_AVAILABLE_IN_ALL +gint g_time_zone_find_interval (GTimeZone *tz, + GTimeType type, + gint64 time_); + +GLIB_AVAILABLE_IN_ALL +gint g_time_zone_adjust_time (GTimeZone *tz, + GTimeType type, + gint64 *time_); + +GLIB_AVAILABLE_IN_ALL +const gchar * g_time_zone_get_abbreviation (GTimeZone *tz, + gint interval); +GLIB_AVAILABLE_IN_ALL +gint32 g_time_zone_get_offset (GTimeZone *tz, + gint interval); +GLIB_AVAILABLE_IN_ALL +gboolean g_time_zone_is_dst (GTimeZone *tz, + gint interval); + +G_END_DECLS + +#endif /* __G_TIME_ZONE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gtrashstack.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gtrashstack.h new file mode 100755 index 00000000..44b3c6c1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gtrashstack.h @@ -0,0 +1,54 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_TRASH_STACK_H__ +#define __G_TRASH_STACK_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gutils.h> + +G_BEGIN_DECLS + +typedef struct _GTrashStack GTrashStack; +struct _GTrashStack +{ + GTrashStack *next; +}; + +GLIB_DEPRECATED_IN_2_48 +void g_trash_stack_push (GTrashStack **stack_p, + gpointer data_p); +GLIB_DEPRECATED_IN_2_48 +gpointer g_trash_stack_pop (GTrashStack **stack_p); +GLIB_DEPRECATED_IN_2_48 +gpointer g_trash_stack_peek (GTrashStack **stack_p); +GLIB_DEPRECATED_IN_2_48 +guint g_trash_stack_height (GTrashStack **stack_p); + +G_END_DECLS + +#endif /* __G_TRASH_STACK_H_ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gtree.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gtree.h new file mode 100755 index 00000000..ceb148d6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gtree.h @@ -0,0 +1,104 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_TREE_H__ +#define __G_TREE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gnode.h> + +G_BEGIN_DECLS + +typedef struct _GTree GTree; + +typedef gboolean (*GTraverseFunc) (gpointer key, + gpointer value, + gpointer data); + +/* Balanced binary trees + */ +GLIB_AVAILABLE_IN_ALL +GTree* g_tree_new (GCompareFunc key_compare_func); +GLIB_AVAILABLE_IN_ALL +GTree* g_tree_new_with_data (GCompareDataFunc key_compare_func, + gpointer key_compare_data); +GLIB_AVAILABLE_IN_ALL +GTree* g_tree_new_full (GCompareDataFunc key_compare_func, + gpointer key_compare_data, + GDestroyNotify key_destroy_func, + GDestroyNotify value_destroy_func); +GLIB_AVAILABLE_IN_ALL +GTree* g_tree_ref (GTree *tree); +GLIB_AVAILABLE_IN_ALL +void g_tree_unref (GTree *tree); +GLIB_AVAILABLE_IN_ALL +void g_tree_destroy (GTree *tree); +GLIB_AVAILABLE_IN_ALL +void g_tree_insert (GTree *tree, + gpointer key, + gpointer value); +GLIB_AVAILABLE_IN_ALL +void g_tree_replace (GTree *tree, + gpointer key, + gpointer value); +GLIB_AVAILABLE_IN_ALL +gboolean g_tree_remove (GTree *tree, + gconstpointer key); +GLIB_AVAILABLE_IN_ALL +gboolean g_tree_steal (GTree *tree, + gconstpointer key); +GLIB_AVAILABLE_IN_ALL +gpointer g_tree_lookup (GTree *tree, + gconstpointer key); +GLIB_AVAILABLE_IN_ALL +gboolean g_tree_lookup_extended (GTree *tree, + gconstpointer lookup_key, + gpointer *orig_key, + gpointer *value); +GLIB_AVAILABLE_IN_ALL +void g_tree_foreach (GTree *tree, + GTraverseFunc func, + gpointer user_data); + +GLIB_DEPRECATED +void g_tree_traverse (GTree *tree, + GTraverseFunc traverse_func, + GTraverseType traverse_type, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +gpointer g_tree_search (GTree *tree, + GCompareFunc search_func, + gconstpointer user_data); +GLIB_AVAILABLE_IN_ALL +gint g_tree_height (GTree *tree); +GLIB_AVAILABLE_IN_ALL +gint g_tree_nnodes (GTree *tree); + +G_END_DECLS + +#endif /* __G_TREE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gtypes.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gtypes.h new file mode 100755 index 00000000..047ac622 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gtypes.h @@ -0,0 +1,538 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_TYPES_H__ +#define __G_TYPES_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glibconfig.h> +#include <glib/gmacros.h> +#include <glib/gversionmacros.h> +#include <time.h> + +G_BEGIN_DECLS + +/* Provide type definitions for commonly used types. + * These are useful because a "gint8" can be adjusted + * to be 1 byte (8 bits) on all platforms. Similarly and + * more importantly, "gint32" can be adjusted to be + * 4 bytes (32 bits) on all platforms. + */ + +typedef char gchar; +typedef short gshort; +typedef long glong; +typedef int gint; +typedef gint gboolean; + +typedef unsigned char guchar; +typedef unsigned short gushort; +typedef unsigned long gulong; +typedef unsigned int guint; + +typedef float gfloat; +typedef double gdouble; + +/* Define min and max constants for the fixed size numerical types */ +#define G_MININT8 ((gint8) -0x80) +#define G_MAXINT8 ((gint8) 0x7f) +#define G_MAXUINT8 ((guint8) 0xff) + +#define G_MININT16 ((gint16) -0x8000) +#define G_MAXINT16 ((gint16) 0x7fff) +#define G_MAXUINT16 ((guint16) 0xffff) + +#define G_MININT32 ((gint32) -0x80000000) +#define G_MAXINT32 ((gint32) 0x7fffffff) +#define G_MAXUINT32 ((guint32) 0xffffffff) + +#define G_MININT64 ((gint64) G_GINT64_CONSTANT(-0x8000000000000000)) +#define G_MAXINT64 G_GINT64_CONSTANT(0x7fffffffffffffff) +#define G_MAXUINT64 G_GUINT64_CONSTANT(0xffffffffffffffff) + +typedef void* gpointer; +typedef const void *gconstpointer; + +typedef gint (*GCompareFunc) (gconstpointer a, + gconstpointer b); +typedef gint (*GCompareDataFunc) (gconstpointer a, + gconstpointer b, + gpointer user_data); +typedef gboolean (*GEqualFunc) (gconstpointer a, + gconstpointer b); +typedef void (*GDestroyNotify) (gpointer data); +typedef void (*GFunc) (gpointer data, + gpointer user_data); +typedef guint (*GHashFunc) (gconstpointer key); +typedef void (*GHFunc) (gpointer key, + gpointer value, + gpointer user_data); + +/** + * GFreeFunc: + * @data: a data pointer + * + * Declares a type of function which takes an arbitrary + * data pointer argument and has no return value. It is + * not currently used in GLib or GTK+. + */ +typedef void (*GFreeFunc) (gpointer data); + +/** + * GTranslateFunc: + * @str: the untranslated string + * @data: user data specified when installing the function, e.g. + * in g_option_group_set_translate_func() + * + * The type of functions which are used to translate user-visible + * strings, for <option>--help</option> output. + * + * Returns: a translation of the string for the current locale. + * The returned string is owned by GLib and must not be freed. + */ +typedef const gchar * (*GTranslateFunc) (const gchar *str, + gpointer data); + + +/* Define some mathematical constants that aren't available + * symbolically in some strict ISO C implementations. + * + * Note that the large number of digits used in these definitions + * doesn't imply that GLib or current computers in general would be + * able to handle floating point numbers with an accuracy like this. + * It's mostly an exercise in futility and future proofing. For + * extended precision floating point support, look somewhere else + * than GLib. + */ +#define G_E 2.7182818284590452353602874713526624977572470937000 +#define G_LN2 0.69314718055994530941723212145817656807550013436026 +#define G_LN10 2.3025850929940456840179914546843642076011014886288 +#define G_PI 3.1415926535897932384626433832795028841971693993751 +#define G_PI_2 1.5707963267948966192313216916397514420985846996876 +#define G_PI_4 0.78539816339744830961566084581987572104929234984378 +#define G_SQRT2 1.4142135623730950488016887242096980785696718753769 + +/* Portable endian checks and conversions + * + * glibconfig.h defines G_BYTE_ORDER which expands to one of + * the below macros. + */ +#define G_LITTLE_ENDIAN 1234 +#define G_BIG_ENDIAN 4321 +#define G_PDP_ENDIAN 3412 /* unused, need specific PDP check */ + + +/* Basic bit swapping functions + */ +#define GUINT16_SWAP_LE_BE_CONSTANT(val) ((guint16) ( \ + (guint16) ((guint16) (val) >> 8) | \ + (guint16) ((guint16) (val) << 8))) + +#define GUINT32_SWAP_LE_BE_CONSTANT(val) ((guint32) ( \ + (((guint32) (val) & (guint32) 0x000000ffU) << 24) | \ + (((guint32) (val) & (guint32) 0x0000ff00U) << 8) | \ + (((guint32) (val) & (guint32) 0x00ff0000U) >> 8) | \ + (((guint32) (val) & (guint32) 0xff000000U) >> 24))) + +#define GUINT64_SWAP_LE_BE_CONSTANT(val) ((guint64) ( \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT (0x00000000000000ffU)) << 56) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT (0x000000000000ff00U)) << 40) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT (0x0000000000ff0000U)) << 24) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT (0x00000000ff000000U)) << 8) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT (0x000000ff00000000U)) >> 8) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT (0x0000ff0000000000U)) >> 24) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT (0x00ff000000000000U)) >> 40) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT (0xff00000000000000U)) >> 56))) + +/* Arch specific stuff for speed + */ +#if defined (__GNUC__) && (__GNUC__ >= 2) && defined (__OPTIMIZE__) + +# if __GNUC__ >= 4 && defined (__GNUC_MINOR__) && __GNUC_MINOR__ >= 3 +# define GUINT32_SWAP_LE_BE(val) ((guint32) __builtin_bswap32 ((guint32) (val))) +# define GUINT64_SWAP_LE_BE(val) ((guint64) __builtin_bswap64 ((guint64) (val))) +# endif + +# if defined (__i386__) +# define GUINT16_SWAP_LE_BE_IA32(val) \ + (G_GNUC_EXTENSION \ + ({ guint16 __v, __x = ((guint16) (val)); \ + if (__builtin_constant_p (__x)) \ + __v = GUINT16_SWAP_LE_BE_CONSTANT (__x); \ + else \ + __asm__ ("rorw $8, %w0" \ + : "=r" (__v) \ + : "0" (__x) \ + : "cc"); \ + __v; })) +# if !defined (__i486__) && !defined (__i586__) \ + && !defined (__pentium__) && !defined (__i686__) \ + && !defined (__pentiumpro__) && !defined (__pentium4__) +# define GUINT32_SWAP_LE_BE_IA32(val) \ + (G_GNUC_EXTENSION \ + ({ guint32 __v, __x = ((guint32) (val)); \ + if (__builtin_constant_p (__x)) \ + __v = GUINT32_SWAP_LE_BE_CONSTANT (__x); \ + else \ + __asm__ ("rorw $8, %w0\n\t" \ + "rorl $16, %0\n\t" \ + "rorw $8, %w0" \ + : "=r" (__v) \ + : "0" (__x) \ + : "cc"); \ + __v; })) +# else /* 486 and higher has bswap */ +# define GUINT32_SWAP_LE_BE_IA32(val) \ + (G_GNUC_EXTENSION \ + ({ guint32 __v, __x = ((guint32) (val)); \ + if (__builtin_constant_p (__x)) \ + __v = GUINT32_SWAP_LE_BE_CONSTANT (__x); \ + else \ + __asm__ ("bswap %0" \ + : "=r" (__v) \ + : "0" (__x)); \ + __v; })) +# endif /* processor specific 32-bit stuff */ +# define GUINT64_SWAP_LE_BE_IA32(val) \ + (G_GNUC_EXTENSION \ + ({ union { guint64 __ll; \ + guint32 __l[2]; } __w, __r; \ + __w.__ll = ((guint64) (val)); \ + if (__builtin_constant_p (__w.__ll)) \ + __r.__ll = GUINT64_SWAP_LE_BE_CONSTANT (__w.__ll); \ + else \ + { \ + __r.__l[0] = GUINT32_SWAP_LE_BE (__w.__l[1]); \ + __r.__l[1] = GUINT32_SWAP_LE_BE (__w.__l[0]); \ + } \ + __r.__ll; })) + /* Possibly just use the constant version and let gcc figure it out? */ +# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA32 (val)) +# ifndef GUINT32_SWAP_LE_BE +# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_IA32 (val)) +# endif +# ifndef GUINT64_SWAP_LE_BE +# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_IA32 (val)) +# endif +# elif defined (__ia64__) +# define GUINT16_SWAP_LE_BE_IA64(val) \ + (G_GNUC_EXTENSION \ + ({ guint16 __v, __x = ((guint16) (val)); \ + if (__builtin_constant_p (__x)) \ + __v = GUINT16_SWAP_LE_BE_CONSTANT (__x); \ + else \ + __asm__ __volatile__ ("shl %0 = %1, 48 ;;" \ + "mux1 %0 = %0, @rev ;;" \ + : "=r" (__v) \ + : "r" (__x)); \ + __v; })) +# define GUINT32_SWAP_LE_BE_IA64(val) \ + (G_GNUC_EXTENSION \ + ({ guint32 __v, __x = ((guint32) (val)); \ + if (__builtin_constant_p (__x)) \ + __v = GUINT32_SWAP_LE_BE_CONSTANT (__x); \ + else \ + __asm__ __volatile__ ("shl %0 = %1, 32 ;;" \ + "mux1 %0 = %0, @rev ;;" \ + : "=r" (__v) \ + : "r" (__x)); \ + __v; })) +# define GUINT64_SWAP_LE_BE_IA64(val) \ + (G_GNUC_EXTENSION \ + ({ guint64 __v, __x = ((guint64) (val)); \ + if (__builtin_constant_p (__x)) \ + __v = GUINT64_SWAP_LE_BE_CONSTANT (__x); \ + else \ + __asm__ __volatile__ ("mux1 %0 = %1, @rev ;;" \ + : "=r" (__v) \ + : "r" (__x)); \ + __v; })) +# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA64 (val)) +# ifndef GUINT32_SWAP_LE_BE +# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_IA64 (val)) +# endif +# ifndef GUINT64_SWAP_LE_BE +# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_IA64 (val)) +# endif +# elif defined (__x86_64__) +# define GUINT32_SWAP_LE_BE_X86_64(val) \ + (G_GNUC_EXTENSION \ + ({ guint32 __v, __x = ((guint32) (val)); \ + if (__builtin_constant_p (__x)) \ + __v = GUINT32_SWAP_LE_BE_CONSTANT (__x); \ + else \ + __asm__ ("bswapl %0" \ + : "=r" (__v) \ + : "0" (__x)); \ + __v; })) +# define GUINT64_SWAP_LE_BE_X86_64(val) \ + (G_GNUC_EXTENSION \ + ({ guint64 __v, __x = ((guint64) (val)); \ + if (__builtin_constant_p (__x)) \ + __v = GUINT64_SWAP_LE_BE_CONSTANT (__x); \ + else \ + __asm__ ("bswapq %0" \ + : "=r" (__v) \ + : "0" (__x)); \ + __v; })) + /* gcc seems to figure out optimal code for this on its own */ +# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_CONSTANT (val)) +# ifndef GUINT32_SWAP_LE_BE +# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_X86_64 (val)) +# endif +# ifndef GUINT64_SWAP_LE_BE +# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_X86_64 (val)) +# endif +# else /* generic gcc */ +# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_CONSTANT (val)) +# ifndef GUINT32_SWAP_LE_BE +# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_CONSTANT (val)) +# endif +# ifndef GUINT64_SWAP_LE_BE +# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_CONSTANT (val)) +# endif +# endif +#else /* generic */ +# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_CONSTANT (val)) +# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_CONSTANT (val)) +# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_CONSTANT (val)) +#endif /* generic */ + +#define GUINT16_SWAP_LE_PDP(val) ((guint16) (val)) +#define GUINT16_SWAP_BE_PDP(val) (GUINT16_SWAP_LE_BE (val)) +#define GUINT32_SWAP_LE_PDP(val) ((guint32) ( \ + (((guint32) (val) & (guint32) 0x0000ffffU) << 16) | \ + (((guint32) (val) & (guint32) 0xffff0000U) >> 16))) +#define GUINT32_SWAP_BE_PDP(val) ((guint32) ( \ + (((guint32) (val) & (guint32) 0x00ff00ffU) << 8) | \ + (((guint32) (val) & (guint32) 0xff00ff00U) >> 8))) + +/* The G*_TO_?E() macros are defined in glibconfig.h. + * The transformation is symmetric, so the FROM just maps to the TO. + */ +#define GINT16_FROM_LE(val) (GINT16_TO_LE (val)) +#define GUINT16_FROM_LE(val) (GUINT16_TO_LE (val)) +#define GINT16_FROM_BE(val) (GINT16_TO_BE (val)) +#define GUINT16_FROM_BE(val) (GUINT16_TO_BE (val)) +#define GINT32_FROM_LE(val) (GINT32_TO_LE (val)) +#define GUINT32_FROM_LE(val) (GUINT32_TO_LE (val)) +#define GINT32_FROM_BE(val) (GINT32_TO_BE (val)) +#define GUINT32_FROM_BE(val) (GUINT32_TO_BE (val)) + +#define GINT64_FROM_LE(val) (GINT64_TO_LE (val)) +#define GUINT64_FROM_LE(val) (GUINT64_TO_LE (val)) +#define GINT64_FROM_BE(val) (GINT64_TO_BE (val)) +#define GUINT64_FROM_BE(val) (GUINT64_TO_BE (val)) + +#define GLONG_FROM_LE(val) (GLONG_TO_LE (val)) +#define GULONG_FROM_LE(val) (GULONG_TO_LE (val)) +#define GLONG_FROM_BE(val) (GLONG_TO_BE (val)) +#define GULONG_FROM_BE(val) (GULONG_TO_BE (val)) + +#define GINT_FROM_LE(val) (GINT_TO_LE (val)) +#define GUINT_FROM_LE(val) (GUINT_TO_LE (val)) +#define GINT_FROM_BE(val) (GINT_TO_BE (val)) +#define GUINT_FROM_BE(val) (GUINT_TO_BE (val)) + +#define GSIZE_FROM_LE(val) (GSIZE_TO_LE (val)) +#define GSSIZE_FROM_LE(val) (GSSIZE_TO_LE (val)) +#define GSIZE_FROM_BE(val) (GSIZE_TO_BE (val)) +#define GSSIZE_FROM_BE(val) (GSSIZE_TO_BE (val)) + +/* Portable versions of host-network order stuff + */ +#define g_ntohl(val) (GUINT32_FROM_BE (val)) +#define g_ntohs(val) (GUINT16_FROM_BE (val)) +#define g_htonl(val) (GUINT32_TO_BE (val)) +#define g_htons(val) (GUINT16_TO_BE (val)) + +/* Overflow-checked unsigned integer arithmetic + */ +#ifndef _GLIB_TEST_OVERFLOW_FALLBACK +/* https://bugzilla.gnome.org/show_bug.cgi?id=769104 */ +#if __GNUC__ >= 5 && !defined(__INTEL_COMPILER) +#define _GLIB_HAVE_BUILTIN_OVERFLOW_CHECKS +#elif __has_builtin(__builtin_uadd_overflow) +#define _GLIB_HAVE_BUILTIN_OVERFLOW_CHECKS +#endif +#endif + +#define g_uint_checked_add(dest, a, b) \ + _GLIB_CHECKED_ADD_U32(dest, a, b) +#define g_uint_checked_mul(dest, a, b) \ + _GLIB_CHECKED_MUL_U32(dest, a, b) + +#define g_uint64_checked_add(dest, a, b) \ + _GLIB_CHECKED_ADD_U64(dest, a, b) +#define g_uint64_checked_mul(dest, a, b) \ + _GLIB_CHECKED_MUL_U64(dest, a, b) + +#if GLIB_SIZEOF_SIZE_T == 8 +#define g_size_checked_add(dest, a, b) \ + _GLIB_CHECKED_ADD_U64(dest, a, b) +#define g_size_checked_mul(dest, a, b) \ + _GLIB_CHECKED_MUL_U64(dest, a, b) +#else +#define g_size_checked_add(dest, a, b) \ + _GLIB_CHECKED_ADD_U32(dest, a, b) +#define g_size_checked_mul(dest, a, b) \ + _GLIB_CHECKED_MUL_U32(dest, a, b) +#endif + +/* The names of the following inlines are private. Use the macro + * definitions above. + */ +#ifdef _GLIB_HAVE_BUILTIN_OVERFLOW_CHECKS +static inline gboolean _GLIB_CHECKED_ADD_U32 (guint32 *dest, guint32 a, guint32 b) { + return !__builtin_uadd_overflow(a, b, dest); } +static inline gboolean _GLIB_CHECKED_MUL_U32 (guint32 *dest, guint32 a, guint32 b) { + return !__builtin_umul_overflow(a, b, dest); } +static inline gboolean _GLIB_CHECKED_ADD_U64 (guint64 *dest, guint64 a, guint64 b) { + G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64)); + return !__builtin_uaddll_overflow(a, b, (unsigned long long *) dest); } +static inline gboolean _GLIB_CHECKED_MUL_U64 (guint64 *dest, guint64 a, guint64 b) { + return !__builtin_umulll_overflow(a, b, (unsigned long long *) dest); } +#else +static inline gboolean _GLIB_CHECKED_ADD_U32 (guint32 *dest, guint32 a, guint32 b) { + *dest = a + b; return *dest >= a; } +static inline gboolean _GLIB_CHECKED_MUL_U32 (guint32 *dest, guint32 a, guint32 b) { + *dest = a * b; return !a || *dest / a == b; } +static inline gboolean _GLIB_CHECKED_ADD_U64 (guint64 *dest, guint64 a, guint64 b) { + *dest = a + b; return *dest >= a; } +static inline gboolean _GLIB_CHECKED_MUL_U64 (guint64 *dest, guint64 a, guint64 b) { + *dest = a * b; return !a || *dest / a == b; } +#endif + +/* IEEE Standard 754 Single Precision Storage Format (gfloat): + * + * 31 30 23 22 0 + * +--------+---------------+---------------+ + * | s 1bit | e[30:23] 8bit | f[22:0] 23bit | + * +--------+---------------+---------------+ + * B0------------------->B1------->B2-->B3--> + * + * IEEE Standard 754 Double Precision Storage Format (gdouble): + * + * 63 62 52 51 32 31 0 + * +--------+----------------+----------------+ +---------------+ + * | s 1bit | e[62:52] 11bit | f[51:32] 20bit | | f[31:0] 32bit | + * +--------+----------------+----------------+ +---------------+ + * B0--------------->B1---------->B2--->B3----> B4->B5->B6->B7-> + */ +/* subtract from biased_exponent to form base2 exponent (normal numbers) */ +typedef union _GDoubleIEEE754 GDoubleIEEE754; +typedef union _GFloatIEEE754 GFloatIEEE754; +#define G_IEEE754_FLOAT_BIAS (127) +#define G_IEEE754_DOUBLE_BIAS (1023) +/* multiply with base2 exponent to get base10 exponent (normal numbers) */ +#define G_LOG_2_BASE_10 (0.30102999566398119521) +#if G_BYTE_ORDER == G_LITTLE_ENDIAN +union _GFloatIEEE754 +{ + gfloat v_float; + struct { + guint mantissa : 23; + guint biased_exponent : 8; + guint sign : 1; + } mpn; +}; +union _GDoubleIEEE754 +{ + gdouble v_double; + struct { + guint mantissa_low : 32; + guint mantissa_high : 20; + guint biased_exponent : 11; + guint sign : 1; + } mpn; +}; +#elif G_BYTE_ORDER == G_BIG_ENDIAN +union _GFloatIEEE754 +{ + gfloat v_float; + struct { + guint sign : 1; + guint biased_exponent : 8; + guint mantissa : 23; + } mpn; +}; +union _GDoubleIEEE754 +{ + gdouble v_double; + struct { + guint sign : 1; + guint biased_exponent : 11; + guint mantissa_high : 20; + guint mantissa_low : 32; + } mpn; +}; +#else /* !G_LITTLE_ENDIAN && !G_BIG_ENDIAN */ +#error unknown ENDIAN type +#endif /* !G_LITTLE_ENDIAN && !G_BIG_ENDIAN */ + +typedef struct _GTimeVal GTimeVal; + +struct _GTimeVal +{ + glong tv_sec; + glong tv_usec; +}; + +G_END_DECLS + +/* We prefix variable declarations so they can + * properly get exported in Windows DLLs. + */ +#ifndef GLIB_VAR +# ifdef G_PLATFORM_WIN32 +# ifdef GLIB_STATIC_COMPILATION +# define GLIB_VAR extern +# else /* !GLIB_STATIC_COMPILATION */ +# ifdef GLIB_COMPILATION +# ifdef DLL_EXPORT +# define GLIB_VAR __declspec(dllexport) +# else /* !DLL_EXPORT */ +# define GLIB_VAR extern +# endif /* !DLL_EXPORT */ +# else /* !GLIB_COMPILATION */ +# define GLIB_VAR extern __declspec(dllimport) +# endif /* !GLIB_COMPILATION */ +# endif /* !GLIB_STATIC_COMPILATION */ +# else /* !G_PLATFORM_WIN32 */ +# define GLIB_VAR _GLIB_EXTERN +# endif /* !G_PLATFORM_WIN32 */ +#endif /* GLIB_VAR */ + +#endif /* __G_TYPES_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gunicode.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gunicode.h new file mode 100755 index 00000000..e6934d2b --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gunicode.h @@ -0,0 +1,901 @@ +/* gunicode.h - Unicode manipulation functions + * + * Copyright (C) 1999, 2000 Tom Tromey + * Copyright 2000, 2005 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __G_UNICODE_H__ +#define __G_UNICODE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gerror.h> +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +/** + * gunichar: + * + * A type which can hold any UTF-32 or UCS-4 character code, + * also known as a Unicode code point. + * + * If you want to produce the UTF-8 representation of a #gunichar, + * use g_ucs4_to_utf8(). See also g_utf8_to_ucs4() for the reverse + * process. + * + * To print/scan values of this type as integer, use + * %G_GINT32_MODIFIER and/or %G_GUINT32_FORMAT. + * + * The notation to express a Unicode code point in running text is + * as a hexadecimal number with four to six digits and uppercase + * letters, prefixed by the string "U+". Leading zeros are omitted, + * unless the code point would have fewer than four hexadecimal digits. + * For example, "U+0041 LATIN CAPITAL LETTER A". To print a code point + * in the U+-notation, use the format string "U+\%04"G_GINT32_FORMAT"X". + * To scan, use the format string "U+\%06"G_GINT32_FORMAT"X". + * + * |[ + * gunichar c; + * sscanf ("U+0041", "U+%06"G_GINT32_FORMAT"X", &c) + * g_print ("Read U+%04"G_GINT32_FORMAT"X", c); + * ]| + */ +typedef guint32 gunichar; + +/** + * gunichar2: + * + * A type which can hold any UTF-16 code + * point<footnote id="utf16_surrogate_pairs">UTF-16 also has so called + * <firstterm>surrogate pairs</firstterm> to encode characters beyond + * the BMP as pairs of 16bit numbers. Surrogate pairs cannot be stored + * in a single gunichar2 field, but all GLib functions accepting gunichar2 + * arrays will correctly interpret surrogate pairs.</footnote>. + * + * To print/scan values of this type to/from text you need to convert + * to/from UTF-8, using g_utf16_to_utf8()/g_utf8_to_utf16(). + * + * To print/scan values of this type as integer, use + * %G_GINT16_MODIFIER and/or %G_GUINT16_FORMAT. + */ +typedef guint16 gunichar2; + +/** + * GUnicodeType: + * @G_UNICODE_CONTROL: General category "Other, Control" (Cc) + * @G_UNICODE_FORMAT: General category "Other, Format" (Cf) + * @G_UNICODE_UNASSIGNED: General category "Other, Not Assigned" (Cn) + * @G_UNICODE_PRIVATE_USE: General category "Other, Private Use" (Co) + * @G_UNICODE_SURROGATE: General category "Other, Surrogate" (Cs) + * @G_UNICODE_LOWERCASE_LETTER: General category "Letter, Lowercase" (Ll) + * @G_UNICODE_MODIFIER_LETTER: General category "Letter, Modifier" (Lm) + * @G_UNICODE_OTHER_LETTER: General category "Letter, Other" (Lo) + * @G_UNICODE_TITLECASE_LETTER: General category "Letter, Titlecase" (Lt) + * @G_UNICODE_UPPERCASE_LETTER: General category "Letter, Uppercase" (Lu) + * @G_UNICODE_SPACING_MARK: General category "Mark, Spacing" (Mc) + * @G_UNICODE_ENCLOSING_MARK: General category "Mark, Enclosing" (Me) + * @G_UNICODE_NON_SPACING_MARK: General category "Mark, Nonspacing" (Mn) + * @G_UNICODE_DECIMAL_NUMBER: General category "Number, Decimal Digit" (Nd) + * @G_UNICODE_LETTER_NUMBER: General category "Number, Letter" (Nl) + * @G_UNICODE_OTHER_NUMBER: General category "Number, Other" (No) + * @G_UNICODE_CONNECT_PUNCTUATION: General category "Punctuation, Connector" (Pc) + * @G_UNICODE_DASH_PUNCTUATION: General category "Punctuation, Dash" (Pd) + * @G_UNICODE_CLOSE_PUNCTUATION: General category "Punctuation, Close" (Pe) + * @G_UNICODE_FINAL_PUNCTUATION: General category "Punctuation, Final quote" (Pf) + * @G_UNICODE_INITIAL_PUNCTUATION: General category "Punctuation, Initial quote" (Pi) + * @G_UNICODE_OTHER_PUNCTUATION: General category "Punctuation, Other" (Po) + * @G_UNICODE_OPEN_PUNCTUATION: General category "Punctuation, Open" (Ps) + * @G_UNICODE_CURRENCY_SYMBOL: General category "Symbol, Currency" (Sc) + * @G_UNICODE_MODIFIER_SYMBOL: General category "Symbol, Modifier" (Sk) + * @G_UNICODE_MATH_SYMBOL: General category "Symbol, Math" (Sm) + * @G_UNICODE_OTHER_SYMBOL: General category "Symbol, Other" (So) + * @G_UNICODE_LINE_SEPARATOR: General category "Separator, Line" (Zl) + * @G_UNICODE_PARAGRAPH_SEPARATOR: General category "Separator, Paragraph" (Zp) + * @G_UNICODE_SPACE_SEPARATOR: General category "Separator, Space" (Zs) + * + * These are the possible character classifications from the + * Unicode specification. + * See [Unicode Character Database](http://www.unicode.org/reports/tr44/#General_Category_Values). + */ +typedef enum +{ + G_UNICODE_CONTROL, + G_UNICODE_FORMAT, + G_UNICODE_UNASSIGNED, + G_UNICODE_PRIVATE_USE, + G_UNICODE_SURROGATE, + G_UNICODE_LOWERCASE_LETTER, + G_UNICODE_MODIFIER_LETTER, + G_UNICODE_OTHER_LETTER, + G_UNICODE_TITLECASE_LETTER, + G_UNICODE_UPPERCASE_LETTER, + G_UNICODE_SPACING_MARK, + G_UNICODE_ENCLOSING_MARK, + G_UNICODE_NON_SPACING_MARK, + G_UNICODE_DECIMAL_NUMBER, + G_UNICODE_LETTER_NUMBER, + G_UNICODE_OTHER_NUMBER, + G_UNICODE_CONNECT_PUNCTUATION, + G_UNICODE_DASH_PUNCTUATION, + G_UNICODE_CLOSE_PUNCTUATION, + G_UNICODE_FINAL_PUNCTUATION, + G_UNICODE_INITIAL_PUNCTUATION, + G_UNICODE_OTHER_PUNCTUATION, + G_UNICODE_OPEN_PUNCTUATION, + G_UNICODE_CURRENCY_SYMBOL, + G_UNICODE_MODIFIER_SYMBOL, + G_UNICODE_MATH_SYMBOL, + G_UNICODE_OTHER_SYMBOL, + G_UNICODE_LINE_SEPARATOR, + G_UNICODE_PARAGRAPH_SEPARATOR, + G_UNICODE_SPACE_SEPARATOR +} GUnicodeType; + +/** + * G_UNICODE_COMBINING_MARK: + * + * Older name for %G_UNICODE_SPACING_MARK. + * + * Deprecated: 2.30: Use %G_UNICODE_SPACING_MARK. + */ +#ifndef G_DISABLE_DEPRECATED +#define G_UNICODE_COMBINING_MARK G_UNICODE_SPACING_MARK +#endif + +/** + * GUnicodeBreakType: + * @G_UNICODE_BREAK_MANDATORY: Mandatory Break (BK) + * @G_UNICODE_BREAK_CARRIAGE_RETURN: Carriage Return (CR) + * @G_UNICODE_BREAK_LINE_FEED: Line Feed (LF) + * @G_UNICODE_BREAK_COMBINING_MARK: Attached Characters and Combining Marks (CM) + * @G_UNICODE_BREAK_SURROGATE: Surrogates (SG) + * @G_UNICODE_BREAK_ZERO_WIDTH_SPACE: Zero Width Space (ZW) + * @G_UNICODE_BREAK_INSEPARABLE: Inseparable (IN) + * @G_UNICODE_BREAK_NON_BREAKING_GLUE: Non-breaking ("Glue") (GL) + * @G_UNICODE_BREAK_CONTINGENT: Contingent Break Opportunity (CB) + * @G_UNICODE_BREAK_SPACE: Space (SP) + * @G_UNICODE_BREAK_AFTER: Break Opportunity After (BA) + * @G_UNICODE_BREAK_BEFORE: Break Opportunity Before (BB) + * @G_UNICODE_BREAK_BEFORE_AND_AFTER: Break Opportunity Before and After (B2) + * @G_UNICODE_BREAK_HYPHEN: Hyphen (HY) + * @G_UNICODE_BREAK_NON_STARTER: Nonstarter (NS) + * @G_UNICODE_BREAK_OPEN_PUNCTUATION: Opening Punctuation (OP) + * @G_UNICODE_BREAK_CLOSE_PUNCTUATION: Closing Punctuation (CL) + * @G_UNICODE_BREAK_QUOTATION: Ambiguous Quotation (QU) + * @G_UNICODE_BREAK_EXCLAMATION: Exclamation/Interrogation (EX) + * @G_UNICODE_BREAK_IDEOGRAPHIC: Ideographic (ID) + * @G_UNICODE_BREAK_NUMERIC: Numeric (NU) + * @G_UNICODE_BREAK_INFIX_SEPARATOR: Infix Separator (Numeric) (IS) + * @G_UNICODE_BREAK_SYMBOL: Symbols Allowing Break After (SY) + * @G_UNICODE_BREAK_ALPHABETIC: Ordinary Alphabetic and Symbol Characters (AL) + * @G_UNICODE_BREAK_PREFIX: Prefix (Numeric) (PR) + * @G_UNICODE_BREAK_POSTFIX: Postfix (Numeric) (PO) + * @G_UNICODE_BREAK_COMPLEX_CONTEXT: Complex Content Dependent (South East Asian) (SA) + * @G_UNICODE_BREAK_AMBIGUOUS: Ambiguous (Alphabetic or Ideographic) (AI) + * @G_UNICODE_BREAK_UNKNOWN: Unknown (XX) + * @G_UNICODE_BREAK_NEXT_LINE: Next Line (NL) + * @G_UNICODE_BREAK_WORD_JOINER: Word Joiner (WJ) + * @G_UNICODE_BREAK_HANGUL_L_JAMO: Hangul L Jamo (JL) + * @G_UNICODE_BREAK_HANGUL_V_JAMO: Hangul V Jamo (JV) + * @G_UNICODE_BREAK_HANGUL_T_JAMO: Hangul T Jamo (JT) + * @G_UNICODE_BREAK_HANGUL_LV_SYLLABLE: Hangul LV Syllable (H2) + * @G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE: Hangul LVT Syllable (H3) + * @G_UNICODE_BREAK_CLOSE_PARANTHESIS: Closing Parenthesis (CP). Since 2.28 + * @G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER: Conditional Japanese Starter (CJ). Since: 2.32 + * @G_UNICODE_BREAK_HEBREW_LETTER: Hebrew Letter (HL). Since: 2.32 + * @G_UNICODE_BREAK_REGIONAL_INDICATOR: Regional Indicator (RI). Since: 2.36 + * @G_UNICODE_BREAK_EMOJI_BASE: Emoji Base (EB). Since: 2.50 + * @G_UNICODE_BREAK_EMOJI_MODIFIER: Emoji Modifier (EM). Since: 2.50 + * @G_UNICODE_BREAK_ZERO_WIDTH_JOINER: Zero Width Joiner (ZWJ). Since: 2.50 + * + * These are the possible line break classifications. + * + * Since new unicode versions may add new types here, applications should be ready + * to handle unknown values. They may be regarded as %G_UNICODE_BREAK_UNKNOWN. + * + * See [Unicode Line Breaking Algorithm](http://www.unicode.org/unicode/reports/tr14/). + */ +typedef enum +{ + G_UNICODE_BREAK_MANDATORY, + G_UNICODE_BREAK_CARRIAGE_RETURN, + G_UNICODE_BREAK_LINE_FEED, + G_UNICODE_BREAK_COMBINING_MARK, + G_UNICODE_BREAK_SURROGATE, + G_UNICODE_BREAK_ZERO_WIDTH_SPACE, + G_UNICODE_BREAK_INSEPARABLE, + G_UNICODE_BREAK_NON_BREAKING_GLUE, + G_UNICODE_BREAK_CONTINGENT, + G_UNICODE_BREAK_SPACE, + G_UNICODE_BREAK_AFTER, + G_UNICODE_BREAK_BEFORE, + G_UNICODE_BREAK_BEFORE_AND_AFTER, + G_UNICODE_BREAK_HYPHEN, + G_UNICODE_BREAK_NON_STARTER, + G_UNICODE_BREAK_OPEN_PUNCTUATION, + G_UNICODE_BREAK_CLOSE_PUNCTUATION, + G_UNICODE_BREAK_QUOTATION, + G_UNICODE_BREAK_EXCLAMATION, + G_UNICODE_BREAK_IDEOGRAPHIC, + G_UNICODE_BREAK_NUMERIC, + G_UNICODE_BREAK_INFIX_SEPARATOR, + G_UNICODE_BREAK_SYMBOL, + G_UNICODE_BREAK_ALPHABETIC, + G_UNICODE_BREAK_PREFIX, + G_UNICODE_BREAK_POSTFIX, + G_UNICODE_BREAK_COMPLEX_CONTEXT, + G_UNICODE_BREAK_AMBIGUOUS, + G_UNICODE_BREAK_UNKNOWN, + G_UNICODE_BREAK_NEXT_LINE, + G_UNICODE_BREAK_WORD_JOINER, + G_UNICODE_BREAK_HANGUL_L_JAMO, + G_UNICODE_BREAK_HANGUL_V_JAMO, + G_UNICODE_BREAK_HANGUL_T_JAMO, + G_UNICODE_BREAK_HANGUL_LV_SYLLABLE, + G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE, + G_UNICODE_BREAK_CLOSE_PARANTHESIS, + G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER, + G_UNICODE_BREAK_HEBREW_LETTER, + G_UNICODE_BREAK_REGIONAL_INDICATOR, + G_UNICODE_BREAK_EMOJI_BASE, + G_UNICODE_BREAK_EMOJI_MODIFIER, + G_UNICODE_BREAK_ZERO_WIDTH_JOINER +} GUnicodeBreakType; + +/** + * GUnicodeScript: + * @G_UNICODE_SCRIPT_INVALID_CODE: + * a value never returned from g_unichar_get_script() + * @G_UNICODE_SCRIPT_COMMON: a character used by multiple different scripts + * @G_UNICODE_SCRIPT_INHERITED: a mark glyph that takes its script from the + * base glyph to which it is attached + * @G_UNICODE_SCRIPT_ARABIC: Arabic + * @G_UNICODE_SCRIPT_ARMENIAN: Armenian + * @G_UNICODE_SCRIPT_BENGALI: Bengali + * @G_UNICODE_SCRIPT_BOPOMOFO: Bopomofo + * @G_UNICODE_SCRIPT_CHEROKEE: Cherokee + * @G_UNICODE_SCRIPT_COPTIC: Coptic + * @G_UNICODE_SCRIPT_CYRILLIC: Cyrillic + * @G_UNICODE_SCRIPT_DESERET: Deseret + * @G_UNICODE_SCRIPT_DEVANAGARI: Devanagari + * @G_UNICODE_SCRIPT_ETHIOPIC: Ethiopic + * @G_UNICODE_SCRIPT_GEORGIAN: Georgian + * @G_UNICODE_SCRIPT_GOTHIC: Gothic + * @G_UNICODE_SCRIPT_GREEK: Greek + * @G_UNICODE_SCRIPT_GUJARATI: Gujarati + * @G_UNICODE_SCRIPT_GURMUKHI: Gurmukhi + * @G_UNICODE_SCRIPT_HAN: Han + * @G_UNICODE_SCRIPT_HANGUL: Hangul + * @G_UNICODE_SCRIPT_HEBREW: Hebrew + * @G_UNICODE_SCRIPT_HIRAGANA: Hiragana + * @G_UNICODE_SCRIPT_KANNADA: Kannada + * @G_UNICODE_SCRIPT_KATAKANA: Katakana + * @G_UNICODE_SCRIPT_KHMER: Khmer + * @G_UNICODE_SCRIPT_LAO: Lao + * @G_UNICODE_SCRIPT_LATIN: Latin + * @G_UNICODE_SCRIPT_MALAYALAM: Malayalam + * @G_UNICODE_SCRIPT_MONGOLIAN: Mongolian + * @G_UNICODE_SCRIPT_MYANMAR: Myanmar + * @G_UNICODE_SCRIPT_OGHAM: Ogham + * @G_UNICODE_SCRIPT_OLD_ITALIC: Old Italic + * @G_UNICODE_SCRIPT_ORIYA: Oriya + * @G_UNICODE_SCRIPT_RUNIC: Runic + * @G_UNICODE_SCRIPT_SINHALA: Sinhala + * @G_UNICODE_SCRIPT_SYRIAC: Syriac + * @G_UNICODE_SCRIPT_TAMIL: Tamil + * @G_UNICODE_SCRIPT_TELUGU: Telugu + * @G_UNICODE_SCRIPT_THAANA: Thaana + * @G_UNICODE_SCRIPT_THAI: Thai + * @G_UNICODE_SCRIPT_TIBETAN: Tibetan + * @G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL: + * Canadian Aboriginal + * @G_UNICODE_SCRIPT_YI: Yi + * @G_UNICODE_SCRIPT_TAGALOG: Tagalog + * @G_UNICODE_SCRIPT_HANUNOO: Hanunoo + * @G_UNICODE_SCRIPT_BUHID: Buhid + * @G_UNICODE_SCRIPT_TAGBANWA: Tagbanwa + * @G_UNICODE_SCRIPT_BRAILLE: Braille + * @G_UNICODE_SCRIPT_CYPRIOT: Cypriot + * @G_UNICODE_SCRIPT_LIMBU: Limbu + * @G_UNICODE_SCRIPT_OSMANYA: Osmanya + * @G_UNICODE_SCRIPT_SHAVIAN: Shavian + * @G_UNICODE_SCRIPT_LINEAR_B: Linear B + * @G_UNICODE_SCRIPT_TAI_LE: Tai Le + * @G_UNICODE_SCRIPT_UGARITIC: Ugaritic + * @G_UNICODE_SCRIPT_NEW_TAI_LUE: + * New Tai Lue + * @G_UNICODE_SCRIPT_BUGINESE: Buginese + * @G_UNICODE_SCRIPT_GLAGOLITIC: Glagolitic + * @G_UNICODE_SCRIPT_TIFINAGH: Tifinagh + * @G_UNICODE_SCRIPT_SYLOTI_NAGRI: + * Syloti Nagri + * @G_UNICODE_SCRIPT_OLD_PERSIAN: + * Old Persian + * @G_UNICODE_SCRIPT_KHAROSHTHI: Kharoshthi + * @G_UNICODE_SCRIPT_UNKNOWN: an unassigned code point + * @G_UNICODE_SCRIPT_BALINESE: Balinese + * @G_UNICODE_SCRIPT_CUNEIFORM: Cuneiform + * @G_UNICODE_SCRIPT_PHOENICIAN: Phoenician + * @G_UNICODE_SCRIPT_PHAGS_PA: Phags-pa + * @G_UNICODE_SCRIPT_NKO: N'Ko + * @G_UNICODE_SCRIPT_KAYAH_LI: Kayah Li. Since 2.16.3 + * @G_UNICODE_SCRIPT_LEPCHA: Lepcha. Since 2.16.3 + * @G_UNICODE_SCRIPT_REJANG: Rejang. Since 2.16.3 + * @G_UNICODE_SCRIPT_SUNDANESE: Sundanese. Since 2.16.3 + * @G_UNICODE_SCRIPT_SAURASHTRA: Saurashtra. Since 2.16.3 + * @G_UNICODE_SCRIPT_CHAM: Cham. Since 2.16.3 + * @G_UNICODE_SCRIPT_OL_CHIKI: Ol Chiki. Since 2.16.3 + * @G_UNICODE_SCRIPT_VAI: Vai. Since 2.16.3 + * @G_UNICODE_SCRIPT_CARIAN: Carian. Since 2.16.3 + * @G_UNICODE_SCRIPT_LYCIAN: Lycian. Since 2.16.3 + * @G_UNICODE_SCRIPT_LYDIAN: Lydian. Since 2.16.3 + * @G_UNICODE_SCRIPT_AVESTAN: Avestan. Since 2.26 + * @G_UNICODE_SCRIPT_BAMUM: Bamum. Since 2.26 + * @G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS: + * Egyptian Hieroglpyhs. Since 2.26 + * @G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC: + * Imperial Aramaic. Since 2.26 + * @G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI: + * Inscriptional Pahlavi. Since 2.26 + * @G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN: + * Inscriptional Parthian. Since 2.26 + * @G_UNICODE_SCRIPT_JAVANESE: Javanese. Since 2.26 + * @G_UNICODE_SCRIPT_KAITHI: Kaithi. Since 2.26 + * @G_UNICODE_SCRIPT_LISU: Lisu. Since 2.26 + * @G_UNICODE_SCRIPT_MEETEI_MAYEK: + * Meetei Mayek. Since 2.26 + * @G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN: + * Old South Arabian. Since 2.26 + * @G_UNICODE_SCRIPT_OLD_TURKIC: Old Turkic. Since 2.28 + * @G_UNICODE_SCRIPT_SAMARITAN: Samaritan. Since 2.26 + * @G_UNICODE_SCRIPT_TAI_THAM: Tai Tham. Since 2.26 + * @G_UNICODE_SCRIPT_TAI_VIET: Tai Viet. Since 2.26 + * @G_UNICODE_SCRIPT_BATAK: Batak. Since 2.28 + * @G_UNICODE_SCRIPT_BRAHMI: Brahmi. Since 2.28 + * @G_UNICODE_SCRIPT_MANDAIC: Mandaic. Since 2.28 + * @G_UNICODE_SCRIPT_CHAKMA: Chakma. Since: 2.32 + * @G_UNICODE_SCRIPT_MEROITIC_CURSIVE: Meroitic Cursive. Since: 2.32 + * @G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS: Meroitic Hieroglyphs. Since: 2.32 + * @G_UNICODE_SCRIPT_MIAO: Miao. Since: 2.32 + * @G_UNICODE_SCRIPT_SHARADA: Sharada. Since: 2.32 + * @G_UNICODE_SCRIPT_SORA_SOMPENG: Sora Sompeng. Since: 2.32 + * @G_UNICODE_SCRIPT_TAKRI: Takri. Since: 2.32 + * @G_UNICODE_SCRIPT_BASSA_VAH: Bassa. Since: 2.42 + * @G_UNICODE_SCRIPT_CAUCASIAN_ALBANIAN: Caucasian Albanian. Since: 2.42 + * @G_UNICODE_SCRIPT_DUPLOYAN: Duployan. Since: 2.42 + * @G_UNICODE_SCRIPT_ELBASAN: Elbasan. Since: 2.42 + * @G_UNICODE_SCRIPT_GRANTHA: Grantha. Since: 2.42 + * @G_UNICODE_SCRIPT_KHOJKI: Kjohki. Since: 2.42 + * @G_UNICODE_SCRIPT_KHUDAWADI: Khudawadi, Sindhi. Since: 2.42 + * @G_UNICODE_SCRIPT_LINEAR_A: Linear A. Since: 2.42 + * @G_UNICODE_SCRIPT_MAHAJANI: Mahajani. Since: 2.42 + * @G_UNICODE_SCRIPT_MANICHAEAN: Manichaean. Since: 2.42 + * @G_UNICODE_SCRIPT_MENDE_KIKAKUI: Mende Kikakui. Since: 2.42 + * @G_UNICODE_SCRIPT_MODI: Modi. Since: 2.42 + * @G_UNICODE_SCRIPT_MRO: Mro. Since: 2.42 + * @G_UNICODE_SCRIPT_NABATAEAN: Nabataean. Since: 2.42 + * @G_UNICODE_SCRIPT_OLD_NORTH_ARABIAN: Old North Arabian. Since: 2.42 + * @G_UNICODE_SCRIPT_OLD_PERMIC: Old Permic. Since: 2.42 + * @G_UNICODE_SCRIPT_PAHAWH_HMONG: Pahawh Hmong. Since: 2.42 + * @G_UNICODE_SCRIPT_PALMYRENE: Palmyrene. Since: 2.42 + * @G_UNICODE_SCRIPT_PAU_CIN_HAU: Pau Cin Hau. Since: 2.42 + * @G_UNICODE_SCRIPT_PSALTER_PAHLAVI: Psalter Pahlavi. Since: 2.42 + * @G_UNICODE_SCRIPT_SIDDHAM: Siddham. Since: 2.42 + * @G_UNICODE_SCRIPT_TIRHUTA: Tirhuta. Since: 2.42 + * @G_UNICODE_SCRIPT_WARANG_CITI: Warang Citi. Since: 2.42 + * @G_UNICODE_SCRIPT_AHOM: Ahom. Since: 2.48 + * @G_UNICODE_SCRIPT_ANATOLIAN_HIEROGLYPHS: Anatolian Hieroglyphs. Since: 2.48 + * @G_UNICODE_SCRIPT_HATRAN: Hatran. Since: 2.48 + * @G_UNICODE_SCRIPT_MULTANI: Multani. Since: 2.48 + * @G_UNICODE_SCRIPT_OLD_HUNGARIAN: Old Hungarian. Since: 2.48 + * @G_UNICODE_SCRIPT_SIGNWRITING: Signwriting. Since: 2.48 + * @G_UNICODE_SCRIPT_ADLAM: Adlam. Since: 2.50 + * @G_UNICODE_SCRIPT_BHAIKSUKI: Bhaiksuki. Since: 2.50 + * @G_UNICODE_SCRIPT_MARCHEN: Marchen. Since: 2.50 + * @G_UNICODE_SCRIPT_NEWA: Newa. Since: 2.50 + * @G_UNICODE_SCRIPT_OSAGE: Osage. Since: 2.50 + * @G_UNICODE_SCRIPT_TANGUT: Tangut. Since: 2.50 + * @G_UNICODE_SCRIPT_MASARAM_GONDI: Masaram Gondi. Since: 2.54 + * @G_UNICODE_SCRIPT_NUSHU: Nushu. Since: 2.54 + * @G_UNICODE_SCRIPT_SOYOMBO: Soyombo. Since: 2.54 + * @G_UNICODE_SCRIPT_ZANABAZAR_SQUARE: Zanabazar Square. Since: 2.54 + * + * The #GUnicodeScript enumeration identifies different writing + * systems. The values correspond to the names as defined in the + * Unicode standard. The enumeration has been added in GLib 2.14, + * and is interchangeable with #PangoScript. + * + * Note that new types may be added in the future. Applications + * should be ready to handle unknown values. + * See [Unicode Standard Annex #24: Script names](http://www.unicode.org/reports/tr24/). + */ +typedef enum +{ /* ISO 15924 code */ + G_UNICODE_SCRIPT_INVALID_CODE = -1, + G_UNICODE_SCRIPT_COMMON = 0, /* Zyyy */ + G_UNICODE_SCRIPT_INHERITED, /* Zinh (Qaai) */ + G_UNICODE_SCRIPT_ARABIC, /* Arab */ + G_UNICODE_SCRIPT_ARMENIAN, /* Armn */ + G_UNICODE_SCRIPT_BENGALI, /* Beng */ + G_UNICODE_SCRIPT_BOPOMOFO, /* Bopo */ + G_UNICODE_SCRIPT_CHEROKEE, /* Cher */ + G_UNICODE_SCRIPT_COPTIC, /* Copt (Qaac) */ + G_UNICODE_SCRIPT_CYRILLIC, /* Cyrl (Cyrs) */ + G_UNICODE_SCRIPT_DESERET, /* Dsrt */ + G_UNICODE_SCRIPT_DEVANAGARI, /* Deva */ + G_UNICODE_SCRIPT_ETHIOPIC, /* Ethi */ + G_UNICODE_SCRIPT_GEORGIAN, /* Geor (Geon, Geoa) */ + G_UNICODE_SCRIPT_GOTHIC, /* Goth */ + G_UNICODE_SCRIPT_GREEK, /* Grek */ + G_UNICODE_SCRIPT_GUJARATI, /* Gujr */ + G_UNICODE_SCRIPT_GURMUKHI, /* Guru */ + G_UNICODE_SCRIPT_HAN, /* Hani */ + G_UNICODE_SCRIPT_HANGUL, /* Hang */ + G_UNICODE_SCRIPT_HEBREW, /* Hebr */ + G_UNICODE_SCRIPT_HIRAGANA, /* Hira */ + G_UNICODE_SCRIPT_KANNADA, /* Knda */ + G_UNICODE_SCRIPT_KATAKANA, /* Kana */ + G_UNICODE_SCRIPT_KHMER, /* Khmr */ + G_UNICODE_SCRIPT_LAO, /* Laoo */ + G_UNICODE_SCRIPT_LATIN, /* Latn (Latf, Latg) */ + G_UNICODE_SCRIPT_MALAYALAM, /* Mlym */ + G_UNICODE_SCRIPT_MONGOLIAN, /* Mong */ + G_UNICODE_SCRIPT_MYANMAR, /* Mymr */ + G_UNICODE_SCRIPT_OGHAM, /* Ogam */ + G_UNICODE_SCRIPT_OLD_ITALIC, /* Ital */ + G_UNICODE_SCRIPT_ORIYA, /* Orya */ + G_UNICODE_SCRIPT_RUNIC, /* Runr */ + G_UNICODE_SCRIPT_SINHALA, /* Sinh */ + G_UNICODE_SCRIPT_SYRIAC, /* Syrc (Syrj, Syrn, Syre) */ + G_UNICODE_SCRIPT_TAMIL, /* Taml */ + G_UNICODE_SCRIPT_TELUGU, /* Telu */ + G_UNICODE_SCRIPT_THAANA, /* Thaa */ + G_UNICODE_SCRIPT_THAI, /* Thai */ + G_UNICODE_SCRIPT_TIBETAN, /* Tibt */ + G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL, /* Cans */ + G_UNICODE_SCRIPT_YI, /* Yiii */ + G_UNICODE_SCRIPT_TAGALOG, /* Tglg */ + G_UNICODE_SCRIPT_HANUNOO, /* Hano */ + G_UNICODE_SCRIPT_BUHID, /* Buhd */ + G_UNICODE_SCRIPT_TAGBANWA, /* Tagb */ + + /* Unicode-4.0 additions */ + G_UNICODE_SCRIPT_BRAILLE, /* Brai */ + G_UNICODE_SCRIPT_CYPRIOT, /* Cprt */ + G_UNICODE_SCRIPT_LIMBU, /* Limb */ + G_UNICODE_SCRIPT_OSMANYA, /* Osma */ + G_UNICODE_SCRIPT_SHAVIAN, /* Shaw */ + G_UNICODE_SCRIPT_LINEAR_B, /* Linb */ + G_UNICODE_SCRIPT_TAI_LE, /* Tale */ + G_UNICODE_SCRIPT_UGARITIC, /* Ugar */ + + /* Unicode-4.1 additions */ + G_UNICODE_SCRIPT_NEW_TAI_LUE, /* Talu */ + G_UNICODE_SCRIPT_BUGINESE, /* Bugi */ + G_UNICODE_SCRIPT_GLAGOLITIC, /* Glag */ + G_UNICODE_SCRIPT_TIFINAGH, /* Tfng */ + G_UNICODE_SCRIPT_SYLOTI_NAGRI, /* Sylo */ + G_UNICODE_SCRIPT_OLD_PERSIAN, /* Xpeo */ + G_UNICODE_SCRIPT_KHAROSHTHI, /* Khar */ + + /* Unicode-5.0 additions */ + G_UNICODE_SCRIPT_UNKNOWN, /* Zzzz */ + G_UNICODE_SCRIPT_BALINESE, /* Bali */ + G_UNICODE_SCRIPT_CUNEIFORM, /* Xsux */ + G_UNICODE_SCRIPT_PHOENICIAN, /* Phnx */ + G_UNICODE_SCRIPT_PHAGS_PA, /* Phag */ + G_UNICODE_SCRIPT_NKO, /* Nkoo */ + + /* Unicode-5.1 additions */ + G_UNICODE_SCRIPT_KAYAH_LI, /* Kali */ + G_UNICODE_SCRIPT_LEPCHA, /* Lepc */ + G_UNICODE_SCRIPT_REJANG, /* Rjng */ + G_UNICODE_SCRIPT_SUNDANESE, /* Sund */ + G_UNICODE_SCRIPT_SAURASHTRA, /* Saur */ + G_UNICODE_SCRIPT_CHAM, /* Cham */ + G_UNICODE_SCRIPT_OL_CHIKI, /* Olck */ + G_UNICODE_SCRIPT_VAI, /* Vaii */ + G_UNICODE_SCRIPT_CARIAN, /* Cari */ + G_UNICODE_SCRIPT_LYCIAN, /* Lyci */ + G_UNICODE_SCRIPT_LYDIAN, /* Lydi */ + + /* Unicode-5.2 additions */ + G_UNICODE_SCRIPT_AVESTAN, /* Avst */ + G_UNICODE_SCRIPT_BAMUM, /* Bamu */ + G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS, /* Egyp */ + G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC, /* Armi */ + G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI, /* Phli */ + G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN, /* Prti */ + G_UNICODE_SCRIPT_JAVANESE, /* Java */ + G_UNICODE_SCRIPT_KAITHI, /* Kthi */ + G_UNICODE_SCRIPT_LISU, /* Lisu */ + G_UNICODE_SCRIPT_MEETEI_MAYEK, /* Mtei */ + G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN, /* Sarb */ + G_UNICODE_SCRIPT_OLD_TURKIC, /* Orkh */ + G_UNICODE_SCRIPT_SAMARITAN, /* Samr */ + G_UNICODE_SCRIPT_TAI_THAM, /* Lana */ + G_UNICODE_SCRIPT_TAI_VIET, /* Tavt */ + + /* Unicode-6.0 additions */ + G_UNICODE_SCRIPT_BATAK, /* Batk */ + G_UNICODE_SCRIPT_BRAHMI, /* Brah */ + G_UNICODE_SCRIPT_MANDAIC, /* Mand */ + + /* Unicode-6.1 additions */ + G_UNICODE_SCRIPT_CHAKMA, /* Cakm */ + G_UNICODE_SCRIPT_MEROITIC_CURSIVE, /* Merc */ + G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS, /* Mero */ + G_UNICODE_SCRIPT_MIAO, /* Plrd */ + G_UNICODE_SCRIPT_SHARADA, /* Shrd */ + G_UNICODE_SCRIPT_SORA_SOMPENG, /* Sora */ + G_UNICODE_SCRIPT_TAKRI, /* Takr */ + + /* Unicode 7.0 additions */ + G_UNICODE_SCRIPT_BASSA_VAH, /* Bass */ + G_UNICODE_SCRIPT_CAUCASIAN_ALBANIAN, /* Aghb */ + G_UNICODE_SCRIPT_DUPLOYAN, /* Dupl */ + G_UNICODE_SCRIPT_ELBASAN, /* Elba */ + G_UNICODE_SCRIPT_GRANTHA, /* Gran */ + G_UNICODE_SCRIPT_KHOJKI, /* Khoj */ + G_UNICODE_SCRIPT_KHUDAWADI, /* Sind */ + G_UNICODE_SCRIPT_LINEAR_A, /* Lina */ + G_UNICODE_SCRIPT_MAHAJANI, /* Mahj */ + G_UNICODE_SCRIPT_MANICHAEAN, /* Manu */ + G_UNICODE_SCRIPT_MENDE_KIKAKUI, /* Mend */ + G_UNICODE_SCRIPT_MODI, /* Modi */ + G_UNICODE_SCRIPT_MRO, /* Mroo */ + G_UNICODE_SCRIPT_NABATAEAN, /* Nbat */ + G_UNICODE_SCRIPT_OLD_NORTH_ARABIAN, /* Narb */ + G_UNICODE_SCRIPT_OLD_PERMIC, /* Perm */ + G_UNICODE_SCRIPT_PAHAWH_HMONG, /* Hmng */ + G_UNICODE_SCRIPT_PALMYRENE, /* Palm */ + G_UNICODE_SCRIPT_PAU_CIN_HAU, /* Pauc */ + G_UNICODE_SCRIPT_PSALTER_PAHLAVI, /* Phlp */ + G_UNICODE_SCRIPT_SIDDHAM, /* Sidd */ + G_UNICODE_SCRIPT_TIRHUTA, /* Tirh */ + G_UNICODE_SCRIPT_WARANG_CITI, /* Wara */ + + /* Unicode 8.0 additions */ + G_UNICODE_SCRIPT_AHOM, /* Ahom */ + G_UNICODE_SCRIPT_ANATOLIAN_HIEROGLYPHS, /* Hluw */ + G_UNICODE_SCRIPT_HATRAN, /* Hatr */ + G_UNICODE_SCRIPT_MULTANI, /* Mult */ + G_UNICODE_SCRIPT_OLD_HUNGARIAN, /* Hung */ + G_UNICODE_SCRIPT_SIGNWRITING, /* Sgnw */ + + /* Unicode 9.0 additions */ + G_UNICODE_SCRIPT_ADLAM, /* Adlm */ + G_UNICODE_SCRIPT_BHAIKSUKI, /* Bhks */ + G_UNICODE_SCRIPT_MARCHEN, /* Marc */ + G_UNICODE_SCRIPT_NEWA, /* Newa */ + G_UNICODE_SCRIPT_OSAGE, /* Osge */ + G_UNICODE_SCRIPT_TANGUT, /* Tang */ + + /* Unicode 10.0 additions */ + G_UNICODE_SCRIPT_MASARAM_GONDI, /* Gonm */ + G_UNICODE_SCRIPT_NUSHU, /* Nshu */ + G_UNICODE_SCRIPT_SOYOMBO, /* Soyo */ + G_UNICODE_SCRIPT_ZANABAZAR_SQUARE /* Zanb */ +} GUnicodeScript; + +GLIB_AVAILABLE_IN_ALL +guint32 g_unicode_script_to_iso15924 (GUnicodeScript script); +GLIB_AVAILABLE_IN_ALL +GUnicodeScript g_unicode_script_from_iso15924 (guint32 iso15924); + +/* These are all analogs of the <ctype.h> functions. + */ +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_isalnum (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_isalpha (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_iscntrl (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_isdigit (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_isgraph (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_islower (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_isprint (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_ispunct (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_isspace (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_isupper (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_isxdigit (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_istitle (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_isdefined (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_iswide (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_iswide_cjk(gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_iszerowidth(gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_ismark (gunichar c) G_GNUC_CONST; + +/* More <ctype.h> functions. These convert between the three cases. + * See the Unicode book to understand title case. */ +GLIB_AVAILABLE_IN_ALL +gunichar g_unichar_toupper (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gunichar g_unichar_tolower (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gunichar g_unichar_totitle (gunichar c) G_GNUC_CONST; + +/* If C is a digit (according to 'g_unichar_isdigit'), then return its + numeric value. Otherwise return -1. */ +GLIB_AVAILABLE_IN_ALL +gint g_unichar_digit_value (gunichar c) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +gint g_unichar_xdigit_value (gunichar c) G_GNUC_CONST; + +/* Return the Unicode character type of a given character. */ +GLIB_AVAILABLE_IN_ALL +GUnicodeType g_unichar_type (gunichar c) G_GNUC_CONST; + +/* Return the line break property for a given character */ +GLIB_AVAILABLE_IN_ALL +GUnicodeBreakType g_unichar_break_type (gunichar c) G_GNUC_CONST; + +/* Returns the combining class for a given character */ +GLIB_AVAILABLE_IN_ALL +gint g_unichar_combining_class (gunichar uc) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_get_mirror_char (gunichar ch, + gunichar *mirrored_ch); + +GLIB_AVAILABLE_IN_ALL +GUnicodeScript g_unichar_get_script (gunichar ch) G_GNUC_CONST; + +/* Validate a Unicode character */ +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_validate (gunichar ch) G_GNUC_CONST; + +/* Pairwise canonical compose/decompose */ +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_compose (gunichar a, + gunichar b, + gunichar *ch); +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_decompose (gunichar ch, + gunichar *a, + gunichar *b); + +GLIB_AVAILABLE_IN_ALL +gsize g_unichar_fully_decompose (gunichar ch, + gboolean compat, + gunichar *result, + gsize result_len); + +/** + * G_UNICHAR_MAX_DECOMPOSITION_LENGTH: + * + * The maximum length (in codepoints) of a compatibility or canonical + * decomposition of a single Unicode character. + * + * This is as defined by Unicode 6.1. + * + * Since: 2.32 + */ +#define G_UNICHAR_MAX_DECOMPOSITION_LENGTH 18 /* codepoints */ + +/* Compute canonical ordering of a string in-place. This rearranges + decomposed characters in the string according to their combining + classes. See the Unicode manual for more information. */ +GLIB_AVAILABLE_IN_ALL +void g_unicode_canonical_ordering (gunichar *string, + gsize len); + + +GLIB_DEPRECATED_IN_2_30 +gunichar *g_unicode_canonical_decomposition (gunichar ch, + gsize *result_len) G_GNUC_MALLOC; + +/* Array of skip-bytes-per-initial character. + */ +GLIB_VAR const gchar * const g_utf8_skip; + +/** + * g_utf8_next_char: + * @p: Pointer to the start of a valid UTF-8 character + * + * Skips to the next character in a UTF-8 string. The string must be + * valid; this macro is as fast as possible, and has no error-checking. + * You would use this macro to iterate over a string character by + * character. The macro returns the start of the next UTF-8 character. + * Before using this macro, use g_utf8_validate() to validate strings + * that may contain invalid UTF-8. + */ +#define g_utf8_next_char(p) (char *)((p) + g_utf8_skip[*(const guchar *)(p)]) + +GLIB_AVAILABLE_IN_ALL +gunichar g_utf8_get_char (const gchar *p) G_GNUC_PURE; +GLIB_AVAILABLE_IN_ALL +gunichar g_utf8_get_char_validated (const gchar *p, + gssize max_len) G_GNUC_PURE; + +GLIB_AVAILABLE_IN_ALL +gchar* g_utf8_offset_to_pointer (const gchar *str, + glong offset) G_GNUC_PURE; +GLIB_AVAILABLE_IN_ALL +glong g_utf8_pointer_to_offset (const gchar *str, + const gchar *pos) G_GNUC_PURE; +GLIB_AVAILABLE_IN_ALL +gchar* g_utf8_prev_char (const gchar *p) G_GNUC_PURE; +GLIB_AVAILABLE_IN_ALL +gchar* g_utf8_find_next_char (const gchar *p, + const gchar *end) G_GNUC_PURE; +GLIB_AVAILABLE_IN_ALL +gchar* g_utf8_find_prev_char (const gchar *str, + const gchar *p) G_GNUC_PURE; + +GLIB_AVAILABLE_IN_ALL +glong g_utf8_strlen (const gchar *p, + gssize max) G_GNUC_PURE; + +GLIB_AVAILABLE_IN_2_30 +gchar *g_utf8_substring (const gchar *str, + glong start_pos, + glong end_pos) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gchar *g_utf8_strncpy (gchar *dest, + const gchar *src, + gsize n); + +/* Find the UTF-8 character corresponding to ch, in string p. These + functions are equivalants to strchr and strrchr */ +GLIB_AVAILABLE_IN_ALL +gchar* g_utf8_strchr (const gchar *p, + gssize len, + gunichar c); +GLIB_AVAILABLE_IN_ALL +gchar* g_utf8_strrchr (const gchar *p, + gssize len, + gunichar c); +GLIB_AVAILABLE_IN_ALL +gchar* g_utf8_strreverse (const gchar *str, + gssize len); + +GLIB_AVAILABLE_IN_ALL +gunichar2 *g_utf8_to_utf16 (const gchar *str, + glong len, + glong *items_read, + glong *items_written, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gunichar * g_utf8_to_ucs4 (const gchar *str, + glong len, + glong *items_read, + glong *items_written, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gunichar * g_utf8_to_ucs4_fast (const gchar *str, + glong len, + glong *items_written) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gunichar * g_utf16_to_ucs4 (const gunichar2 *str, + glong len, + glong *items_read, + glong *items_written, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_utf16_to_utf8 (const gunichar2 *str, + glong len, + glong *items_read, + glong *items_written, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gunichar2 *g_ucs4_to_utf16 (const gunichar *str, + glong len, + glong *items_read, + glong *items_written, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_ucs4_to_utf8 (const gunichar *str, + glong len, + glong *items_read, + glong *items_written, + GError **error) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gint g_unichar_to_utf8 (gunichar c, + gchar *outbuf); + +GLIB_AVAILABLE_IN_ALL +gboolean g_utf8_validate (const gchar *str, + gssize max_len, + const gchar **end); + +GLIB_AVAILABLE_IN_ALL +gchar *g_utf8_strup (const gchar *str, + gssize len) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar *g_utf8_strdown (const gchar *str, + gssize len) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar *g_utf8_casefold (const gchar *str, + gssize len) G_GNUC_MALLOC; + +/** + * GNormalizeMode: + * @G_NORMALIZE_DEFAULT: standardize differences that do not affect the + * text content, such as the above-mentioned accent representation + * @G_NORMALIZE_NFD: another name for %G_NORMALIZE_DEFAULT + * @G_NORMALIZE_DEFAULT_COMPOSE: like %G_NORMALIZE_DEFAULT, but with + * composed forms rather than a maximally decomposed form + * @G_NORMALIZE_NFC: another name for %G_NORMALIZE_DEFAULT_COMPOSE + * @G_NORMALIZE_ALL: beyond %G_NORMALIZE_DEFAULT also standardize the + * "compatibility" characters in Unicode, such as SUPERSCRIPT THREE + * to the standard forms (in this case DIGIT THREE). Formatting + * information may be lost but for most text operations such + * characters should be considered the same + * @G_NORMALIZE_NFKD: another name for %G_NORMALIZE_ALL + * @G_NORMALIZE_ALL_COMPOSE: like %G_NORMALIZE_ALL, but with composed + * forms rather than a maximally decomposed form + * @G_NORMALIZE_NFKC: another name for %G_NORMALIZE_ALL_COMPOSE + * + * Defines how a Unicode string is transformed in a canonical + * form, standardizing such issues as whether a character with + * an accent is represented as a base character and combining + * accent or as a single precomposed character. Unicode strings + * should generally be normalized before comparing them. + */ +typedef enum { + G_NORMALIZE_DEFAULT, + G_NORMALIZE_NFD = G_NORMALIZE_DEFAULT, + G_NORMALIZE_DEFAULT_COMPOSE, + G_NORMALIZE_NFC = G_NORMALIZE_DEFAULT_COMPOSE, + G_NORMALIZE_ALL, + G_NORMALIZE_NFKD = G_NORMALIZE_ALL, + G_NORMALIZE_ALL_COMPOSE, + G_NORMALIZE_NFKC = G_NORMALIZE_ALL_COMPOSE +} GNormalizeMode; + +GLIB_AVAILABLE_IN_ALL +gchar *g_utf8_normalize (const gchar *str, + gssize len, + GNormalizeMode mode) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gint g_utf8_collate (const gchar *str1, + const gchar *str2) G_GNUC_PURE; +GLIB_AVAILABLE_IN_ALL +gchar *g_utf8_collate_key (const gchar *str, + gssize len) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar *g_utf8_collate_key_for_filename (const gchar *str, + gssize len) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_2_52 +gchar *g_utf8_make_valid (const gchar *str, + gssize len) G_GNUC_MALLOC; + +G_END_DECLS + +#endif /* __G_UNICODE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gurifuncs.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gurifuncs.h new file mode 100755 index 00000000..e59a43c8 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gurifuncs.h @@ -0,0 +1,83 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Alexander Larsson <alexl@redhat.com> + */ + +#ifndef __G_URI_FUNCS_H__ +#define __G_URI_FUNCS_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +/** + * G_URI_RESERVED_CHARS_GENERIC_DELIMITERS: + * + * Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@". + **/ +#define G_URI_RESERVED_CHARS_GENERIC_DELIMITERS ":/?#[]@" + +/** + * G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS: + * + * Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=". + **/ +#define G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS "!$&'()*+,;=" + +/** + * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT: + * + * Allowed characters in path elements. Includes "!$&'()*+,;=:@". + **/ +#define G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS ":@" + +/** + * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH: + * + * Allowed characters in a path. Includes "!$&'()*+,;=:@/". + **/ +#define G_URI_RESERVED_CHARS_ALLOWED_IN_PATH G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT "/" + +/** + * G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO: + * + * Allowed characters in userinfo as defined in RFC 3986. Includes "!$&'()*+,;=:". + **/ +#define G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS ":" + +GLIB_AVAILABLE_IN_ALL +char * g_uri_unescape_string (const char *escaped_string, + const char *illegal_characters); +GLIB_AVAILABLE_IN_ALL +char * g_uri_unescape_segment (const char *escaped_string, + const char *escaped_string_end, + const char *illegal_characters); +GLIB_AVAILABLE_IN_ALL +char * g_uri_parse_scheme (const char *uri); +GLIB_AVAILABLE_IN_ALL +char * g_uri_escape_string (const char *unescaped, + const char *reserved_chars_allowed, + gboolean allow_utf8); + +G_END_DECLS + +#endif /* __G_URI_FUNCS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gutils.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gutils.h new file mode 100755 index 00000000..52b6297d --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gutils.h @@ -0,0 +1,365 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_UTILS_H__ +#define __G_UTILS_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> +#include <stdarg.h> + +G_BEGIN_DECLS + +/* Define G_VA_COPY() to do the right thing for copying va_list variables. + * glibconfig.h may have already defined G_VA_COPY as va_copy or __va_copy. + */ +#if !defined (G_VA_COPY) +# if defined (__GNUC__) && defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32)) +# define G_VA_COPY(ap1, ap2) (*(ap1) = *(ap2)) +# elif defined (G_VA_COPY_AS_ARRAY) +# define G_VA_COPY(ap1, ap2) memmove ((ap1), (ap2), sizeof (va_list)) +# else /* va_list is a pointer */ +# define G_VA_COPY(ap1, ap2) ((ap1) = (ap2)) +# endif /* va_list is a pointer */ +#endif /* !G_VA_COPY */ + +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_user_name (void); +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_real_name (void); +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_home_dir (void); +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_tmp_dir (void); +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_host_name (void); +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_prgname (void); +GLIB_AVAILABLE_IN_ALL +void g_set_prgname (const gchar *prgname); +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_application_name (void); +GLIB_AVAILABLE_IN_ALL +void g_set_application_name (const gchar *application_name); + +GLIB_AVAILABLE_IN_ALL +void g_reload_user_special_dirs_cache (void); +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_user_data_dir (void); +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_user_config_dir (void); +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_user_cache_dir (void); +GLIB_AVAILABLE_IN_ALL +const gchar * const * g_get_system_data_dirs (void); + +#ifdef G_OS_WIN32 +/* This functions is not part of the public GLib API */ +GLIB_AVAILABLE_IN_ALL +const gchar * const * g_win32_get_system_data_dirs_for_module (void (*address_of_function)(void)); +#endif + +#if defined (G_OS_WIN32) && defined (G_CAN_INLINE) && !defined (__cplusplus) +/* This function is not part of the public GLib API either. Just call + * g_get_system_data_dirs() in your code, never mind that that is + * actually a macro and you will in fact call this inline function. + */ +static inline const gchar * const * +_g_win32_get_system_data_dirs (void) +{ + return g_win32_get_system_data_dirs_for_module ((void (*)(void)) &_g_win32_get_system_data_dirs); +} +#define g_get_system_data_dirs _g_win32_get_system_data_dirs +#endif + +GLIB_AVAILABLE_IN_ALL +const gchar * const * g_get_system_config_dirs (void); + +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_user_runtime_dir (void); + +/** + * GUserDirectory: + * @G_USER_DIRECTORY_DESKTOP: the user's Desktop directory + * @G_USER_DIRECTORY_DOCUMENTS: the user's Documents directory + * @G_USER_DIRECTORY_DOWNLOAD: the user's Downloads directory + * @G_USER_DIRECTORY_MUSIC: the user's Music directory + * @G_USER_DIRECTORY_PICTURES: the user's Pictures directory + * @G_USER_DIRECTORY_PUBLIC_SHARE: the user's shared directory + * @G_USER_DIRECTORY_TEMPLATES: the user's Templates directory + * @G_USER_DIRECTORY_VIDEOS: the user's Movies directory + * @G_USER_N_DIRECTORIES: the number of enum values + * + * These are logical ids for special directories which are defined + * depending on the platform used. You should use g_get_user_special_dir() + * to retrieve the full path associated to the logical id. + * + * The #GUserDirectory enumeration can be extended at later date. Not + * every platform has a directory for every logical id in this + * enumeration. + * + * Since: 2.14 + */ +typedef enum { + G_USER_DIRECTORY_DESKTOP, + G_USER_DIRECTORY_DOCUMENTS, + G_USER_DIRECTORY_DOWNLOAD, + G_USER_DIRECTORY_MUSIC, + G_USER_DIRECTORY_PICTURES, + G_USER_DIRECTORY_PUBLIC_SHARE, + G_USER_DIRECTORY_TEMPLATES, + G_USER_DIRECTORY_VIDEOS, + + G_USER_N_DIRECTORIES +} GUserDirectory; + +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_user_special_dir (GUserDirectory directory); + +/** + * GDebugKey: + * @key: the string + * @value: the flag + * + * Associates a string with a bit flag. + * Used in g_parse_debug_string(). + */ +typedef struct _GDebugKey GDebugKey; +struct _GDebugKey +{ + const gchar *key; + guint value; +}; + +/* Miscellaneous utility functions + */ +GLIB_AVAILABLE_IN_ALL +guint g_parse_debug_string (const gchar *string, + const GDebugKey *keys, + guint nkeys); + +GLIB_AVAILABLE_IN_ALL +gint g_snprintf (gchar *string, + gulong n, + gchar const *format, + ...) G_GNUC_PRINTF (3, 4); +GLIB_AVAILABLE_IN_ALL +gint g_vsnprintf (gchar *string, + gulong n, + gchar const *format, + va_list args) + G_GNUC_PRINTF(3, 0); + +GLIB_AVAILABLE_IN_ALL +void g_nullify_pointer (gpointer *nullify_location); + +typedef enum +{ + G_FORMAT_SIZE_DEFAULT = 0, + G_FORMAT_SIZE_LONG_FORMAT = 1 << 0, + G_FORMAT_SIZE_IEC_UNITS = 1 << 1, + G_FORMAT_SIZE_BITS = 1 << 2 +} GFormatSizeFlags; + +GLIB_AVAILABLE_IN_2_30 +gchar *g_format_size_full (guint64 size, + GFormatSizeFlags flags); +GLIB_AVAILABLE_IN_2_30 +gchar *g_format_size (guint64 size); + +GLIB_DEPRECATED_FOR(g_format_size) +gchar *g_format_size_for_display (goffset size); + +#ifndef G_DISABLE_DEPRECATED +/** + * GVoidFunc: + * + * Declares a type of function which takes no arguments + * and has no return value. It is used to specify the type + * function passed to g_atexit(). + */ +typedef void (*GVoidFunc) (void); +#define ATEXIT(proc) g_ATEXIT(proc) +GLIB_DEPRECATED +void g_atexit (GVoidFunc func); + +#ifdef G_OS_WIN32 +/* It's a bad idea to wrap atexit() on Windows. If the GLib DLL calls + * atexit(), the function will be called when the GLib DLL is detached + * from the program, which is not what the caller wants. The caller + * wants the function to be called when it *itself* exits (or is + * detached, in case the caller, too, is a DLL). + */ +#if (defined(__MINGW_H) && !defined(_STDLIB_H_)) || (defined(_MSC_VER) && !defined(_INC_STDLIB)) +int atexit (void (*)(void)); +#endif +#define g_atexit(func) atexit(func) +#endif + +#endif + + +/* Look for an executable in PATH, following execvp() rules */ +GLIB_AVAILABLE_IN_ALL +gchar* g_find_program_in_path (const gchar *program); + +/* Bit tests + * + * These are defined in a convoluted way because we want the compiler to + * be able to inline the code for performance reasons, but for + * historical reasons, we must continue to provide non-inline versions + * on our ABI. + * + * We define these as functions in gutils.c which are just implemented + * as calls to the _impl() versions in order to preserve the ABI. + */ + +#define g_bit_nth_lsf(mask, nth_bit) g_bit_nth_lsf_impl(mask, nth_bit) +#define g_bit_nth_msf(mask, nth_bit) g_bit_nth_msf_impl(mask, nth_bit) +#define g_bit_storage(number) g_bit_storage_impl(number) + +GLIB_AVAILABLE_IN_ALL +gint (g_bit_nth_lsf) (gulong mask, + gint nth_bit); +GLIB_AVAILABLE_IN_ALL +gint (g_bit_nth_msf) (gulong mask, + gint nth_bit); +GLIB_AVAILABLE_IN_ALL +guint (g_bit_storage) (gulong number); + +static inline gint +g_bit_nth_lsf_impl (gulong mask, + gint nth_bit) +{ + if (G_UNLIKELY (nth_bit < -1)) + nth_bit = -1; + while (nth_bit < ((GLIB_SIZEOF_LONG * 8) - 1)) + { + nth_bit++; + if (mask & (1UL << nth_bit)) + return nth_bit; + } + return -1; +} + +static inline gint +g_bit_nth_msf_impl (gulong mask, + gint nth_bit) +{ + if (nth_bit < 0 || G_UNLIKELY (nth_bit > GLIB_SIZEOF_LONG * 8)) + nth_bit = GLIB_SIZEOF_LONG * 8; + while (nth_bit > 0) + { + nth_bit--; + if (mask & (1UL << nth_bit)) + return nth_bit; + } + return -1; +} + +static inline guint +g_bit_storage_impl (gulong number) +{ +#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__) + return G_LIKELY (number) ? + ((GLIB_SIZEOF_LONG * 8U - 1) ^ (guint) __builtin_clzl(number)) + 1 : 1; +#else + guint n_bits = 0; + + do + { + n_bits++; + number >>= 1; + } + while (number); + return n_bits; +#endif +} + +/* Crashes the program. */ +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_50 +#ifndef G_OS_WIN32 +# include <stdlib.h> +# define g_abort() abort () +#else +GLIB_AVAILABLE_IN_2_50 +void g_abort (void) G_GNUC_NORETURN G_ANALYZER_NORETURN; +#endif +#endif + +#ifndef G_DISABLE_DEPRECATED + +/* + * This macro is deprecated. This DllMain() is too complex. It is + * recommended to write an explicit minimal DLlMain() that just saves + * the handle to the DLL and then use that handle instead, for + * instance passing it to + * g_win32_get_package_installation_directory_of_module(). + * + * On Windows, this macro defines a DllMain function that stores the + * actual DLL name that the code being compiled will be included in. + * STATIC should be empty or 'static'. DLL_NAME is the name of the + * (pointer to the) char array where the DLL name will be stored. If + * this is used, you must also include <windows.h>. If you need a more complex + * DLL entry point function, you cannot use this. + * + * On non-Windows platforms, expands to nothing. + */ + +#ifndef G_PLATFORM_WIN32 +# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) +#else +# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) \ +static char *dll_name; \ + \ +BOOL WINAPI \ +DllMain (HINSTANCE hinstDLL, \ + DWORD fdwReason, \ + LPVOID lpvReserved) \ +{ \ + wchar_t wcbfr[1000]; \ + char *tem; \ + switch (fdwReason) \ + { \ + case DLL_PROCESS_ATTACH: \ + GetModuleFileNameW ((HMODULE) hinstDLL, wcbfr, G_N_ELEMENTS (wcbfr)); \ + tem = g_utf16_to_utf8 (wcbfr, -1, NULL, NULL, NULL); \ + dll_name = g_path_get_basename (tem); \ + g_free (tem); \ + break; \ + } \ + \ + return TRUE; \ +} + +#endif /* !G_DISABLE_DEPRECATED */ + +#endif /* G_PLATFORM_WIN32 */ + +G_END_DECLS + +#endif /* __G_UTILS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/guuid.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/guuid.h new file mode 100755 index 00000000..c653188a --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/guuid.h @@ -0,0 +1,42 @@ +/* guuid.h - UUID functions + * + * Copyright (C) 2013-2015, 2017 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * licence, or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA. + * + * Authors: Marc-André Lureau <marcandre.lureau@redhat.com> + */ + +#ifndef __G_UUID_H__ +#define __G_UUID_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_2_52 +gboolean g_uuid_string_is_valid (const gchar *str); + +GLIB_AVAILABLE_IN_2_52 +gchar * g_uuid_string_random (void); + +G_END_DECLS + +#endif /* __G_UUID_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gvariant.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gvariant.h new file mode 100755 index 00000000..3e139262 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gvariant.h @@ -0,0 +1,521 @@ +/* + * Copyright © 2007, 2008 Ryan Lortie + * Copyright © 2009, 2010 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_VARIANT_H__ +#define __G_VARIANT_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gvarianttype.h> +#include <glib/gstring.h> +#include <glib/gbytes.h> + +G_BEGIN_DECLS + +typedef struct _GVariant GVariant; + +typedef enum +{ + G_VARIANT_CLASS_BOOLEAN = 'b', + G_VARIANT_CLASS_BYTE = 'y', + G_VARIANT_CLASS_INT16 = 'n', + G_VARIANT_CLASS_UINT16 = 'q', + G_VARIANT_CLASS_INT32 = 'i', + G_VARIANT_CLASS_UINT32 = 'u', + G_VARIANT_CLASS_INT64 = 'x', + G_VARIANT_CLASS_UINT64 = 't', + G_VARIANT_CLASS_HANDLE = 'h', + G_VARIANT_CLASS_DOUBLE = 'd', + G_VARIANT_CLASS_STRING = 's', + G_VARIANT_CLASS_OBJECT_PATH = 'o', + G_VARIANT_CLASS_SIGNATURE = 'g', + G_VARIANT_CLASS_VARIANT = 'v', + G_VARIANT_CLASS_MAYBE = 'm', + G_VARIANT_CLASS_ARRAY = 'a', + G_VARIANT_CLASS_TUPLE = '(', + G_VARIANT_CLASS_DICT_ENTRY = '{' +} GVariantClass; + +GLIB_AVAILABLE_IN_ALL +void g_variant_unref (GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_ref (GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_ref_sink (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_is_floating (GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_take_ref (GVariant *value); + +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_variant_get_type (GVariant *value); +GLIB_AVAILABLE_IN_ALL +const gchar * g_variant_get_type_string (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_is_of_type (GVariant *value, + const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_is_container (GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariantClass g_variant_classify (GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_boolean (gboolean value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_byte (guchar value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_int16 (gint16 value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_uint16 (guint16 value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_int32 (gint32 value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_uint32 (guint32 value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_int64 (gint64 value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_uint64 (guint64 value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_handle (gint32 value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_double (gdouble value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_string (const gchar *string); +GLIB_AVAILABLE_IN_2_38 +GVariant * g_variant_new_take_string (gchar *string); +GLIB_AVAILABLE_IN_2_38 +GVariant * g_variant_new_printf (const gchar *format_string, + ...) G_GNUC_PRINTF (1, 2); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_object_path (const gchar *object_path); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_is_object_path (const gchar *string); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_signature (const gchar *signature); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_is_signature (const gchar *string); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_variant (GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_strv (const gchar * const *strv, + gssize length); +GLIB_AVAILABLE_IN_2_30 +GVariant * g_variant_new_objv (const gchar * const *strv, + gssize length); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_bytestring (const gchar *string); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_bytestring_array (const gchar * const *strv, + gssize length); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_fixed_array (const GVariantType *element_type, + gconstpointer elements, + gsize n_elements, + gsize element_size); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_get_boolean (GVariant *value); +GLIB_AVAILABLE_IN_ALL +guchar g_variant_get_byte (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gint16 g_variant_get_int16 (GVariant *value); +GLIB_AVAILABLE_IN_ALL +guint16 g_variant_get_uint16 (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gint32 g_variant_get_int32 (GVariant *value); +GLIB_AVAILABLE_IN_ALL +guint32 g_variant_get_uint32 (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gint64 g_variant_get_int64 (GVariant *value); +GLIB_AVAILABLE_IN_ALL +guint64 g_variant_get_uint64 (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gint32 g_variant_get_handle (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gdouble g_variant_get_double (GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_get_variant (GVariant *value); +GLIB_AVAILABLE_IN_ALL +const gchar * g_variant_get_string (GVariant *value, + gsize *length); +GLIB_AVAILABLE_IN_ALL +gchar * g_variant_dup_string (GVariant *value, + gsize *length); +GLIB_AVAILABLE_IN_ALL +const gchar ** g_variant_get_strv (GVariant *value, + gsize *length); +GLIB_AVAILABLE_IN_ALL +gchar ** g_variant_dup_strv (GVariant *value, + gsize *length); +GLIB_AVAILABLE_IN_2_30 +const gchar ** g_variant_get_objv (GVariant *value, + gsize *length); +GLIB_AVAILABLE_IN_ALL +gchar ** g_variant_dup_objv (GVariant *value, + gsize *length); +GLIB_AVAILABLE_IN_ALL +const gchar * g_variant_get_bytestring (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gchar * g_variant_dup_bytestring (GVariant *value, + gsize *length); +GLIB_AVAILABLE_IN_ALL +const gchar ** g_variant_get_bytestring_array (GVariant *value, + gsize *length); +GLIB_AVAILABLE_IN_ALL +gchar ** g_variant_dup_bytestring_array (GVariant *value, + gsize *length); + +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_maybe (const GVariantType *child_type, + GVariant *child); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_array (const GVariantType *child_type, + GVariant * const *children, + gsize n_children); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_tuple (GVariant * const *children, + gsize n_children); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_dict_entry (GVariant *key, + GVariant *value); + +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_get_maybe (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gsize g_variant_n_children (GVariant *value); +GLIB_AVAILABLE_IN_ALL +void g_variant_get_child (GVariant *value, + gsize index_, + const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_get_child_value (GVariant *value, + gsize index_); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_lookup (GVariant *dictionary, + const gchar *key, + const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_lookup_value (GVariant *dictionary, + const gchar *key, + const GVariantType *expected_type); +GLIB_AVAILABLE_IN_ALL +gconstpointer g_variant_get_fixed_array (GVariant *value, + gsize *n_elements, + gsize element_size); + +GLIB_AVAILABLE_IN_ALL +gsize g_variant_get_size (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gconstpointer g_variant_get_data (GVariant *value); +GLIB_AVAILABLE_IN_2_36 +GBytes * g_variant_get_data_as_bytes (GVariant *value); +GLIB_AVAILABLE_IN_ALL +void g_variant_store (GVariant *value, + gpointer data); + +GLIB_AVAILABLE_IN_ALL +gchar * g_variant_print (GVariant *value, + gboolean type_annotate); +GLIB_AVAILABLE_IN_ALL +GString * g_variant_print_string (GVariant *value, + GString *string, + gboolean type_annotate); + +GLIB_AVAILABLE_IN_ALL +guint g_variant_hash (gconstpointer value); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_equal (gconstpointer one, + gconstpointer two); + +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_get_normal_form (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_is_normal_form (GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_byteswap (GVariant *value); + +GLIB_AVAILABLE_IN_2_36 +GVariant * g_variant_new_from_bytes (const GVariantType *type, + GBytes *bytes, + gboolean trusted); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_from_data (const GVariantType *type, + gconstpointer data, + gsize size, + gboolean trusted, + GDestroyNotify notify, + gpointer user_data); + +typedef struct _GVariantIter GVariantIter; +struct _GVariantIter { + /*< private >*/ + gsize x[16]; +}; + +GLIB_AVAILABLE_IN_ALL +GVariantIter * g_variant_iter_new (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gsize g_variant_iter_init (GVariantIter *iter, + GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariantIter * g_variant_iter_copy (GVariantIter *iter); +GLIB_AVAILABLE_IN_ALL +gsize g_variant_iter_n_children (GVariantIter *iter); +GLIB_AVAILABLE_IN_ALL +void g_variant_iter_free (GVariantIter *iter); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_iter_next_value (GVariantIter *iter); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_iter_next (GVariantIter *iter, + const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_iter_loop (GVariantIter *iter, + const gchar *format_string, + ...); + + +typedef struct _GVariantBuilder GVariantBuilder; +struct _GVariantBuilder { + /*< private >*/ + union + { + struct { + gsize partial_magic; + const GVariantType *type; + gsize y[14]; + } s; + gsize x[16]; + } u; +}; + +typedef enum +{ + G_VARIANT_PARSE_ERROR_FAILED, + G_VARIANT_PARSE_ERROR_BASIC_TYPE_EXPECTED, + G_VARIANT_PARSE_ERROR_CANNOT_INFER_TYPE, + G_VARIANT_PARSE_ERROR_DEFINITE_TYPE_EXPECTED, + G_VARIANT_PARSE_ERROR_INPUT_NOT_AT_END, + G_VARIANT_PARSE_ERROR_INVALID_CHARACTER, + G_VARIANT_PARSE_ERROR_INVALID_FORMAT_STRING, + G_VARIANT_PARSE_ERROR_INVALID_OBJECT_PATH, + G_VARIANT_PARSE_ERROR_INVALID_SIGNATURE, + G_VARIANT_PARSE_ERROR_INVALID_TYPE_STRING, + G_VARIANT_PARSE_ERROR_NO_COMMON_TYPE, + G_VARIANT_PARSE_ERROR_NUMBER_OUT_OF_RANGE, + G_VARIANT_PARSE_ERROR_NUMBER_TOO_BIG, + G_VARIANT_PARSE_ERROR_TYPE_ERROR, + G_VARIANT_PARSE_ERROR_UNEXPECTED_TOKEN, + G_VARIANT_PARSE_ERROR_UNKNOWN_KEYWORD, + G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT, + G_VARIANT_PARSE_ERROR_VALUE_EXPECTED +} GVariantParseError; +#define G_VARIANT_PARSE_ERROR (g_variant_parse_error_quark ()) + +GLIB_DEPRECATED_IN_2_38_FOR(g_variant_parse_error_quark) +GQuark g_variant_parser_get_error_quark (void); + +GLIB_AVAILABLE_IN_ALL +GQuark g_variant_parse_error_quark (void); + +/** + * G_VARIANT_BUILDER_INIT: + * @variant_type: a const GVariantType* + * + * A stack-allocated #GVariantBuilder must be initialized if it is + * used together with g_auto() to avoid warnings or crashes if + * function returns before g_variant_builder_init() is called on the + * builder. This macro can be used as initializer instead of an + * explicit zeroing a variable when declaring it and a following + * g_variant_builder_init(), but it cannot be assigned to a variable. + * + * The passed @variant_type should be a static GVariantType to avoid + * lifetime issues, as copying the @variant_type does not happen in + * the G_VARIANT_BUILDER_INIT() call, but rather in functions that + * make sure that #GVariantBuilder is valid. + * + * |[ + * g_auto(GVariantBuilder) builder = G_VARIANT_BUILDER_INIT (G_VARIANT_TYPE_BYTESTRING); + * ]| + * + * Since: 2.50 + */ +#define G_VARIANT_BUILDER_INIT(variant_type) { { { 2942751021u, variant_type, { 0, } } } } + +GLIB_AVAILABLE_IN_ALL +GVariantBuilder * g_variant_builder_new (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +void g_variant_builder_unref (GVariantBuilder *builder); +GLIB_AVAILABLE_IN_ALL +GVariantBuilder * g_variant_builder_ref (GVariantBuilder *builder); +GLIB_AVAILABLE_IN_ALL +void g_variant_builder_init (GVariantBuilder *builder, + const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_builder_end (GVariantBuilder *builder); +GLIB_AVAILABLE_IN_ALL +void g_variant_builder_clear (GVariantBuilder *builder); +GLIB_AVAILABLE_IN_ALL +void g_variant_builder_open (GVariantBuilder *builder, + const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +void g_variant_builder_close (GVariantBuilder *builder); +GLIB_AVAILABLE_IN_ALL +void g_variant_builder_add_value (GVariantBuilder *builder, + GVariant *value); +GLIB_AVAILABLE_IN_ALL +void g_variant_builder_add (GVariantBuilder *builder, + const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_ALL +void g_variant_builder_add_parsed (GVariantBuilder *builder, + const gchar *format, + ...); + +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new (const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_ALL +void g_variant_get (GVariant *value, + const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_va (const gchar *format_string, + const gchar **endptr, + va_list *app); +GLIB_AVAILABLE_IN_ALL +void g_variant_get_va (GVariant *value, + const gchar *format_string, + const gchar **endptr, + va_list *app); +GLIB_AVAILABLE_IN_2_34 +gboolean g_variant_check_format_string (GVariant *value, + const gchar *format_string, + gboolean copy_only); + +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_parse (const GVariantType *type, + const gchar *text, + const gchar *limit, + const gchar **endptr, + GError **error); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_parsed (const gchar *format, + ...); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_parsed_va (const gchar *format, + va_list *app); + +GLIB_AVAILABLE_IN_2_40 +gchar * g_variant_parse_error_print_context (GError *error, + const gchar *source_str); + +GLIB_AVAILABLE_IN_ALL +gint g_variant_compare (gconstpointer one, + gconstpointer two); + +typedef struct _GVariantDict GVariantDict; +struct _GVariantDict { + /*< private >*/ + union + { + struct { + GVariant *asv; + gsize partial_magic; + gsize y[14]; + } s; + gsize x[16]; + } u; +}; + +/** + * G_VARIANT_DICT_INIT: + * @asv: (nullable): a GVariant* + * + * A stack-allocated #GVariantDict must be initialized if it is used + * together with g_auto() to avoid warnings or crashes if function + * returns before g_variant_dict_init() is called on the builder. + * This macro can be used as initializer instead of an explicit + * zeroing a variable when declaring it and a following + * g_variant_dict_init(), but it cannot be assigned to a variable. + * + * The passed @asv has to live long enough for #GVariantDict to gather + * the entries from, as the gathering does not happen in the + * G_VARIANT_DICT_INIT() call, but rather in functions that make sure + * that #GVariantDict is valid. In context where the initialization + * value has to be a constant expression, the only possible value of + * @asv is %NULL. It is still possible to call g_variant_dict_init() + * safely with a different @asv right after the variable was + * initialized with G_VARIANT_DICT_INIT(). + * + * |[ + * g_autoptr(GVariant) variant = get_asv_variant (); + * g_auto(GVariantDict) dict = G_VARIANT_DICT_INIT (variant); + * ]| + * + * Since: 2.50 + */ +#define G_VARIANT_DICT_INIT(asv) { { { asv, 3488698669u, { 0, } } } } + +GLIB_AVAILABLE_IN_2_40 +GVariantDict * g_variant_dict_new (GVariant *from_asv); + +GLIB_AVAILABLE_IN_2_40 +void g_variant_dict_init (GVariantDict *dict, + GVariant *from_asv); + +GLIB_AVAILABLE_IN_2_40 +gboolean g_variant_dict_lookup (GVariantDict *dict, + const gchar *key, + const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_2_40 +GVariant * g_variant_dict_lookup_value (GVariantDict *dict, + const gchar *key, + const GVariantType *expected_type); +GLIB_AVAILABLE_IN_2_40 +gboolean g_variant_dict_contains (GVariantDict *dict, + const gchar *key); +GLIB_AVAILABLE_IN_2_40 +void g_variant_dict_insert (GVariantDict *dict, + const gchar *key, + const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_2_40 +void g_variant_dict_insert_value (GVariantDict *dict, + const gchar *key, + GVariant *value); +GLIB_AVAILABLE_IN_2_40 +gboolean g_variant_dict_remove (GVariantDict *dict, + const gchar *key); +GLIB_AVAILABLE_IN_2_40 +void g_variant_dict_clear (GVariantDict *dict); +GLIB_AVAILABLE_IN_2_40 +GVariant * g_variant_dict_end (GVariantDict *dict); +GLIB_AVAILABLE_IN_2_40 +GVariantDict * g_variant_dict_ref (GVariantDict *dict); +GLIB_AVAILABLE_IN_2_40 +void g_variant_dict_unref (GVariantDict *dict); + +G_END_DECLS + +#endif /* __G_VARIANT_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gvarianttype.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gvarianttype.h new file mode 100755 index 00000000..6bb5e07b --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gvarianttype.h @@ -0,0 +1,380 @@ +/* + * Copyright © 2007, 2008 Ryan Lortie + * Copyright © 2009, 2010 Codethink Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_VARIANT_TYPE_H__ +#define __G_VARIANT_TYPE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +/** + * GVariantType: + * + * A type in the GVariant type system. + * + * Two types may not be compared by value; use g_variant_type_equal() or + * g_variant_type_is_subtype_of(). May be copied using + * g_variant_type_copy() and freed using g_variant_type_free(). + **/ +typedef struct _GVariantType GVariantType; + +/** + * G_VARIANT_TYPE_BOOLEAN: + * + * The type of a value that can be either %TRUE or %FALSE. + **/ +#define G_VARIANT_TYPE_BOOLEAN ((const GVariantType *) "b") + +/** + * G_VARIANT_TYPE_BYTE: + * + * The type of an integer value that can range from 0 to 255. + **/ +#define G_VARIANT_TYPE_BYTE ((const GVariantType *) "y") + +/** + * G_VARIANT_TYPE_INT16: + * + * The type of an integer value that can range from -32768 to 32767. + **/ +#define G_VARIANT_TYPE_INT16 ((const GVariantType *) "n") + +/** + * G_VARIANT_TYPE_UINT16: + * + * The type of an integer value that can range from 0 to 65535. + * There were about this many people living in Toronto in the 1870s. + **/ +#define G_VARIANT_TYPE_UINT16 ((const GVariantType *) "q") + +/** + * G_VARIANT_TYPE_INT32: + * + * The type of an integer value that can range from -2147483648 to + * 2147483647. + **/ +#define G_VARIANT_TYPE_INT32 ((const GVariantType *) "i") + +/** + * G_VARIANT_TYPE_UINT32: + * + * The type of an integer value that can range from 0 to 4294967295. + * That's one number for everyone who was around in the late 1970s. + **/ +#define G_VARIANT_TYPE_UINT32 ((const GVariantType *) "u") + +/** + * G_VARIANT_TYPE_INT64: + * + * The type of an integer value that can range from + * -9223372036854775808 to 9223372036854775807. + **/ +#define G_VARIANT_TYPE_INT64 ((const GVariantType *) "x") + +/** + * G_VARIANT_TYPE_UINT64: + * + * The type of an integer value that can range from 0 + * to 18446744073709551615 (inclusive). That's a really big number, + * but a Rubik's cube can have a bit more than twice as many possible + * positions. + **/ +#define G_VARIANT_TYPE_UINT64 ((const GVariantType *) "t") + +/** + * G_VARIANT_TYPE_DOUBLE: + * + * The type of a double precision IEEE754 floating point number. + * These guys go up to about 1.80e308 (plus and minus) but miss out on + * some numbers in between. In any case, that's far greater than the + * estimated number of fundamental particles in the observable + * universe. + **/ +#define G_VARIANT_TYPE_DOUBLE ((const GVariantType *) "d") + +/** + * G_VARIANT_TYPE_STRING: + * + * The type of a string. "" is a string. %NULL is not a string. + **/ +#define G_VARIANT_TYPE_STRING ((const GVariantType *) "s") + +/** + * G_VARIANT_TYPE_OBJECT_PATH: + * + * The type of a D-Bus object reference. These are strings of a + * specific format used to identify objects at a given destination on + * the bus. + * + * If you are not interacting with D-Bus, then there is no reason to make + * use of this type. If you are, then the D-Bus specification contains a + * precise description of valid object paths. + **/ +#define G_VARIANT_TYPE_OBJECT_PATH ((const GVariantType *) "o") + +/** + * G_VARIANT_TYPE_SIGNATURE: + * + * The type of a D-Bus type signature. These are strings of a specific + * format used as type signatures for D-Bus methods and messages. + * + * If you are not interacting with D-Bus, then there is no reason to make + * use of this type. If you are, then the D-Bus specification contains a + * precise description of valid signature strings. + **/ +#define G_VARIANT_TYPE_SIGNATURE ((const GVariantType *) "g") + +/** + * G_VARIANT_TYPE_VARIANT: + * + * The type of a box that contains any other value (including another + * variant). + **/ +#define G_VARIANT_TYPE_VARIANT ((const GVariantType *) "v") + +/** + * G_VARIANT_TYPE_HANDLE: + * + * The type of a 32bit signed integer value, that by convention, is used + * as an index into an array of file descriptors that are sent alongside + * a D-Bus message. + * + * If you are not interacting with D-Bus, then there is no reason to make + * use of this type. + **/ +#define G_VARIANT_TYPE_HANDLE ((const GVariantType *) "h") + +/** + * G_VARIANT_TYPE_UNIT: + * + * The empty tuple type. Has only one instance. Known also as "triv" + * or "void". + **/ +#define G_VARIANT_TYPE_UNIT ((const GVariantType *) "()") + +/** + * G_VARIANT_TYPE_ANY: + * + * An indefinite type that is a supertype of every type (including + * itself). + **/ +#define G_VARIANT_TYPE_ANY ((const GVariantType *) "*") + +/** + * G_VARIANT_TYPE_BASIC: + * + * An indefinite type that is a supertype of every basic (ie: + * non-container) type. + **/ +#define G_VARIANT_TYPE_BASIC ((const GVariantType *) "?") + +/** + * G_VARIANT_TYPE_MAYBE: + * + * An indefinite type that is a supertype of every maybe type. + **/ +#define G_VARIANT_TYPE_MAYBE ((const GVariantType *) "m*") + +/** + * G_VARIANT_TYPE_ARRAY: + * + * An indefinite type that is a supertype of every array type. + **/ +#define G_VARIANT_TYPE_ARRAY ((const GVariantType *) "a*") + +/** + * G_VARIANT_TYPE_TUPLE: + * + * An indefinite type that is a supertype of every tuple type, + * regardless of the number of items in the tuple. + **/ +#define G_VARIANT_TYPE_TUPLE ((const GVariantType *) "r") + +/** + * G_VARIANT_TYPE_DICT_ENTRY: + * + * An indefinite type that is a supertype of every dictionary entry + * type. + **/ +#define G_VARIANT_TYPE_DICT_ENTRY ((const GVariantType *) "{?*}") + +/** + * G_VARIANT_TYPE_DICTIONARY: + * + * An indefinite type that is a supertype of every dictionary type -- + * that is, any array type that has an element type equal to any + * dictionary entry type. + **/ +#define G_VARIANT_TYPE_DICTIONARY ((const GVariantType *) "a{?*}") + +/** + * G_VARIANT_TYPE_STRING_ARRAY: + * + * The type of an array of strings. + **/ +#define G_VARIANT_TYPE_STRING_ARRAY ((const GVariantType *) "as") + +/** + * G_VARIANT_TYPE_OBJECT_PATH_ARRAY: + * + * The type of an array of object paths. + **/ +#define G_VARIANT_TYPE_OBJECT_PATH_ARRAY ((const GVariantType *) "ao") + +/** + * G_VARIANT_TYPE_BYTESTRING: + * + * The type of an array of bytes. This type is commonly used to pass + * around strings that may not be valid utf8. In that case, the + * convention is that the nul terminator character should be included as + * the last character in the array. + **/ +#define G_VARIANT_TYPE_BYTESTRING ((const GVariantType *) "ay") + +/** + * G_VARIANT_TYPE_BYTESTRING_ARRAY: + * + * The type of an array of byte strings (an array of arrays of bytes). + **/ +#define G_VARIANT_TYPE_BYTESTRING_ARRAY ((const GVariantType *) "aay") + +/** + * G_VARIANT_TYPE_VARDICT: + * + * The type of a dictionary mapping strings to variants (the ubiquitous + * "a{sv}" type). + * + * Since: 2.30 + **/ +#define G_VARIANT_TYPE_VARDICT ((const GVariantType *) "a{sv}") + + +/** + * G_VARIANT_TYPE: + * @type_string: a well-formed #GVariantType type string + * + * Converts a string to a const #GVariantType. Depending on the + * current debugging level, this function may perform a runtime check + * to ensure that @string is a valid GVariant type string. + * + * It is always a programmer error to use this macro with an invalid + * type string. If in doubt, use g_variant_type_string_is_valid() to + * check if the string is valid. + * + * Since 2.24 + **/ +#ifndef G_DISABLE_CHECKS +# define G_VARIANT_TYPE(type_string) (g_variant_type_checked_ ((type_string))) +#else +# define G_VARIANT_TYPE(type_string) ((const GVariantType *) (type_string)) +#endif + +/* type string checking */ +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_string_is_valid (const gchar *type_string); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_string_scan (const gchar *string, + const gchar *limit, + const gchar **endptr); + +/* create/destroy */ +GLIB_AVAILABLE_IN_ALL +void g_variant_type_free (GVariantType *type); +GLIB_AVAILABLE_IN_ALL +GVariantType * g_variant_type_copy (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +GVariantType * g_variant_type_new (const gchar *type_string); + +/* getters */ +GLIB_AVAILABLE_IN_ALL +gsize g_variant_type_get_string_length (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +const gchar * g_variant_type_peek_string (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gchar * g_variant_type_dup_string (const GVariantType *type); + +/* classification */ +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_is_definite (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_is_container (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_is_basic (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_is_maybe (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_is_array (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_is_tuple (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_is_dict_entry (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_is_variant (const GVariantType *type); + +/* for hash tables */ +GLIB_AVAILABLE_IN_ALL +guint g_variant_type_hash (gconstpointer type); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_equal (gconstpointer type1, + gconstpointer type2); + +/* subtypes */ +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_is_subtype_of (const GVariantType *type, + const GVariantType *supertype); + +/* type iterator interface */ +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_variant_type_element (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_variant_type_first (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_variant_type_next (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gsize g_variant_type_n_items (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_variant_type_key (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_variant_type_value (const GVariantType *type); + +/* constructors */ +GLIB_AVAILABLE_IN_ALL +GVariantType * g_variant_type_new_array (const GVariantType *element); +GLIB_AVAILABLE_IN_ALL +GVariantType * g_variant_type_new_maybe (const GVariantType *element); +GLIB_AVAILABLE_IN_ALL +GVariantType * g_variant_type_new_tuple (const GVariantType * const *items, + gint length); +GLIB_AVAILABLE_IN_ALL +GVariantType * g_variant_type_new_dict_entry (const GVariantType *key, + const GVariantType *value); + +/*< private >*/ +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_variant_type_checked_ (const gchar *); + +G_END_DECLS + +#endif /* __G_VARIANT_TYPE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gversion.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gversion.h new file mode 100755 index 00000000..68343f72 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gversion.h @@ -0,0 +1,55 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_VERSION_H__ +#define __G_VERSION_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +GLIB_VAR const guint glib_major_version; +GLIB_VAR const guint glib_minor_version; +GLIB_VAR const guint glib_micro_version; +GLIB_VAR const guint glib_interface_age; +GLIB_VAR const guint glib_binary_age; + +GLIB_AVAILABLE_IN_ALL +const gchar * glib_check_version (guint required_major, + guint required_minor, + guint required_micro); + +#define GLIB_CHECK_VERSION(major,minor,micro) \ + (GLIB_MAJOR_VERSION > (major) || \ + (GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION > (minor)) || \ + (GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION == (minor) && \ + GLIB_MICRO_VERSION >= (micro))) + +G_END_DECLS + +#endif /* __G_VERSION_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gversionmacros.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gversionmacros.h new file mode 100755 index 00000000..df6585c2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gversionmacros.h @@ -0,0 +1,513 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_VERSION_MACROS_H__ +#define __G_VERSION_MACROS_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +/* Version boundaries checks */ + +#define G_ENCODE_VERSION(major,minor) ((major) << 16 | (minor) << 8) + +/* XXX: Every new stable minor release bump should add a macro here */ + +/** + * GLIB_VERSION_2_26: + * + * A macro that evaluates to the 2.26 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.32 + */ +#define GLIB_VERSION_2_26 (G_ENCODE_VERSION (2, 26)) + +/** + * GLIB_VERSION_2_28: + * + * A macro that evaluates to the 2.28 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.32 + */ +#define GLIB_VERSION_2_28 (G_ENCODE_VERSION (2, 28)) + +/** + * GLIB_VERSION_2_30: + * + * A macro that evaluates to the 2.30 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.32 + */ +#define GLIB_VERSION_2_30 (G_ENCODE_VERSION (2, 30)) + +/** + * GLIB_VERSION_2_32: + * + * A macro that evaluates to the 2.32 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.32 + */ +#define GLIB_VERSION_2_32 (G_ENCODE_VERSION (2, 32)) + +/** + * GLIB_VERSION_2_34: + * + * A macro that evaluates to the 2.34 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.34 + */ +#define GLIB_VERSION_2_34 (G_ENCODE_VERSION (2, 34)) + +/** + * GLIB_VERSION_2_36: + * + * A macro that evaluates to the 2.36 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GLIB_VERSION_2_36 (G_ENCODE_VERSION (2, 36)) + +/** + * GLIB_VERSION_2_38: + * + * A macro that evaluates to the 2.38 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.38 + */ +#define GLIB_VERSION_2_38 (G_ENCODE_VERSION (2, 38)) + +/** + * GLIB_VERSION_2_40: + * + * A macro that evaluates to the 2.40 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.40 + */ +#define GLIB_VERSION_2_40 (G_ENCODE_VERSION (2, 40)) + +/** + * GLIB_VERSION_2_42: + * + * A macro that evaluates to the 2.42 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.42 + */ +#define GLIB_VERSION_2_42 (G_ENCODE_VERSION (2, 42)) + +/** + * GLIB_VERSION_2_44: + * + * A macro that evaluates to the 2.44 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.44 + */ +#define GLIB_VERSION_2_44 (G_ENCODE_VERSION (2, 44)) + +/** + * GLIB_VERSION_2_46: + * + * A macro that evaluates to the 2.46 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.46 + */ +#define GLIB_VERSION_2_46 (G_ENCODE_VERSION (2, 46)) + +/** + * GLIB_VERSION_2_48: + * + * A macro that evaluates to the 2.48 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.48 + */ +#define GLIB_VERSION_2_48 (G_ENCODE_VERSION (2, 48)) + +/** + * GLIB_VERSION_2_50: + * + * A macro that evaluates to the 2.50 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.50 + */ +#define GLIB_VERSION_2_50 (G_ENCODE_VERSION (2, 50)) + +/** + * GLIB_VERSION_2_52: + * + * A macro that evaluates to the 2.52 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.52 + */ +#define GLIB_VERSION_2_52 (G_ENCODE_VERSION (2, 52)) + +/** + * GLIB_VERSION_2_54: + * + * A macro that evaluates to the 2.54 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.54 + */ +#define GLIB_VERSION_2_54 (G_ENCODE_VERSION (2, 54)) + +/** + * GLIB_VERSION_2_56: + * + * A macro that evaluates to the 2.56 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.56 + */ +#define GLIB_VERSION_2_56 (G_ENCODE_VERSION (2, 56)) + +/* evaluates to the current stable version; for development cycles, + * this means the next stable target + */ +#if (GLIB_MINOR_VERSION % 2) +#define GLIB_VERSION_CUR_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION + 1)) +#else +#define GLIB_VERSION_CUR_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION)) +#endif + +/* evaluates to the previous stable version */ +#if (GLIB_MINOR_VERSION % 2) +#define GLIB_VERSION_PREV_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION - 1)) +#else +#define GLIB_VERSION_PREV_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION - 2)) +#endif + +/** + * GLIB_VERSION_MIN_REQUIRED: + * + * A macro that should be defined by the user prior to including + * the glib.h header. + * The definition should be one of the predefined GLib version + * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,... + * + * This macro defines the earliest version of GLib that the package is + * required to be able to compile against. + * + * If the compiler is configured to warn about the use of deprecated + * functions, then using functions that were deprecated in version + * %GLIB_VERSION_MIN_REQUIRED or earlier will cause warnings (but + * using functions deprecated in later releases will not). + * + * Since: 2.32 + */ +/* If the package sets GLIB_VERSION_MIN_REQUIRED to some future + * GLIB_VERSION_X_Y value that we don't know about, it will compare as + * 0 in preprocessor tests. + */ +#ifndef GLIB_VERSION_MIN_REQUIRED +# define GLIB_VERSION_MIN_REQUIRED (GLIB_VERSION_CUR_STABLE) +#elif GLIB_VERSION_MIN_REQUIRED == 0 +# undef GLIB_VERSION_MIN_REQUIRED +# define GLIB_VERSION_MIN_REQUIRED (GLIB_VERSION_CUR_STABLE + 2) +#endif + +/** + * GLIB_VERSION_MAX_ALLOWED: + * + * A macro that should be defined by the user prior to including + * the glib.h header. + * The definition should be one of the predefined GLib version + * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,... + * + * This macro defines the latest version of the GLib API that the + * package is allowed to make use of. + * + * If the compiler is configured to warn about the use of deprecated + * functions, then using functions added after version + * %GLIB_VERSION_MAX_ALLOWED will cause warnings. + * + * Unless you are using GLIB_CHECK_VERSION() or the like to compile + * different code depending on the GLib version, then this should be + * set to the same value as %GLIB_VERSION_MIN_REQUIRED. + * + * Since: 2.32 + */ +#if !defined (GLIB_VERSION_MAX_ALLOWED) || (GLIB_VERSION_MAX_ALLOWED == 0) +# undef GLIB_VERSION_MAX_ALLOWED +# define GLIB_VERSION_MAX_ALLOWED (GLIB_VERSION_CUR_STABLE) +#endif + +/* sanity checks */ +#if GLIB_VERSION_MIN_REQUIRED > GLIB_VERSION_CUR_STABLE +#error "GLIB_VERSION_MIN_REQUIRED must be <= GLIB_VERSION_CUR_STABLE" +#endif +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_MIN_REQUIRED +#error "GLIB_VERSION_MAX_ALLOWED must be >= GLIB_VERSION_MIN_REQUIRED" +#endif +#if GLIB_VERSION_MIN_REQUIRED < GLIB_VERSION_2_26 +#error "GLIB_VERSION_MIN_REQUIRED must be >= GLIB_VERSION_2_26" +#endif + +/* These macros are used to mark deprecated functions in GLib headers, + * and thus have to be exposed in installed headers. But please + * do *not* use them in other projects. Instead, use G_DEPRECATED + * or define your own wrappers around it. + */ +#define GLIB_AVAILABLE_IN_ALL _GLIB_EXTERN + +/* XXX: Every new stable minor release should add a set of macros here */ + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_26 +# define GLIB_DEPRECATED_IN_2_26 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_26_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_26 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_26_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_26 +# define GLIB_AVAILABLE_IN_2_26 GLIB_UNAVAILABLE(2, 26) +#else +# define GLIB_AVAILABLE_IN_2_26 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_28 +# define GLIB_DEPRECATED_IN_2_28 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_28_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_28 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_28_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_28 +# define GLIB_AVAILABLE_IN_2_28 GLIB_UNAVAILABLE(2, 28) +#else +# define GLIB_AVAILABLE_IN_2_28 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_30 +# define GLIB_DEPRECATED_IN_2_30 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_30_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_30 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_30_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_30 +# define GLIB_AVAILABLE_IN_2_30 GLIB_UNAVAILABLE(2, 30) +#else +# define GLIB_AVAILABLE_IN_2_30 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_32 +# define GLIB_DEPRECATED_IN_2_32 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_32_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_32 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_32_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_32 +# define GLIB_AVAILABLE_IN_2_32 GLIB_UNAVAILABLE(2, 32) +#else +# define GLIB_AVAILABLE_IN_2_32 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_34 +# define GLIB_DEPRECATED_IN_2_34 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_34_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_34 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_34_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_34 +# define GLIB_AVAILABLE_IN_2_34 GLIB_UNAVAILABLE(2, 34) +#else +# define GLIB_AVAILABLE_IN_2_34 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_36 +# define GLIB_DEPRECATED_IN_2_36 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_36_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_36 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_36_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_36 +# define GLIB_AVAILABLE_IN_2_36 GLIB_UNAVAILABLE(2, 36) +#else +# define GLIB_AVAILABLE_IN_2_36 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_38 +# define GLIB_DEPRECATED_IN_2_38 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_38_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_38 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_38_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 +# define GLIB_AVAILABLE_IN_2_38 GLIB_UNAVAILABLE(2, 38) +#else +# define GLIB_AVAILABLE_IN_2_38 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_40 +# define GLIB_DEPRECATED_IN_2_40 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_40_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_40 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_40_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_40 +# define GLIB_AVAILABLE_IN_2_40 GLIB_UNAVAILABLE(2, 40) +#else +# define GLIB_AVAILABLE_IN_2_40 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_42 +# define GLIB_DEPRECATED_IN_2_42 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_42_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_42 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_42_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_42 +# define GLIB_AVAILABLE_IN_2_42 GLIB_UNAVAILABLE(2, 42) +#else +# define GLIB_AVAILABLE_IN_2_42 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_44 +# define GLIB_DEPRECATED_IN_2_44 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_44_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_44 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_44_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_44 +# define GLIB_AVAILABLE_IN_2_44 GLIB_UNAVAILABLE(2, 44) +#else +# define GLIB_AVAILABLE_IN_2_44 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_46 +# define GLIB_DEPRECATED_IN_2_46 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_46_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_46 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_46_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_46 +# define GLIB_AVAILABLE_IN_2_46 GLIB_UNAVAILABLE(2, 46) +#else +# define GLIB_AVAILABLE_IN_2_46 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_48 +# define GLIB_DEPRECATED_IN_2_48 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_48_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_48 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_48_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_48 +# define GLIB_AVAILABLE_IN_2_48 GLIB_UNAVAILABLE(2, 48) +#else +# define GLIB_AVAILABLE_IN_2_48 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_50 +# define GLIB_DEPRECATED_IN_2_50 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_50_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_50 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_50_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_50 +# define GLIB_AVAILABLE_IN_2_50 GLIB_UNAVAILABLE(2, 50) +#else +# define GLIB_AVAILABLE_IN_2_50 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_52 +# define GLIB_DEPRECATED_IN_2_52 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_52_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_52 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_52_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_52 +# define GLIB_AVAILABLE_IN_2_52 GLIB_UNAVAILABLE(2, 52) +#else +# define GLIB_AVAILABLE_IN_2_52 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_54 +# define GLIB_DEPRECATED_IN_2_54 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_54_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_54 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_54_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_54 +# define GLIB_AVAILABLE_IN_2_54 GLIB_UNAVAILABLE(2, 54) +#else +# define GLIB_AVAILABLE_IN_2_54 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_56 +# define GLIB_DEPRECATED_IN_2_56 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_56_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_56 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_56_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_56 +# define GLIB_AVAILABLE_IN_2_56 GLIB_UNAVAILABLE(2, 56) +#else +# define GLIB_AVAILABLE_IN_2_56 _GLIB_EXTERN +#endif + +#endif /* __G_VERSION_MACROS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gwin32.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gwin32.h new file mode 100755 index 00000000..6696afa9 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/glib/gwin32.h @@ -0,0 +1,140 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_WIN32_H__ +#define __G_WIN32_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only <glib.h> can be included directly." +#endif + +#include <glib/gtypes.h> + +#ifdef G_PLATFORM_WIN32 + +G_BEGIN_DECLS + +#ifndef MAXPATHLEN +#define MAXPATHLEN 1024 +#endif + +#ifdef G_OS_WIN32 + +/* + * To get prototypes for the following POSIXish functions, you have to + * include the indicated non-POSIX headers. The functions are defined + * in OLDNAMES.LIB (MSVC) or -lmoldname-msvc (mingw32). But note that + * for POSIX functions that take or return file names in the system + * codepage, in many cases you would want to use the GLib wrappers in + * gstdio.h and UTF-8 instead. + * + * getcwd: <direct.h> (MSVC), <io.h> (mingw32) + * getpid: <process.h> + * access: <io.h> + * unlink: <stdio.h> or <io.h> + * open, read, write, lseek, close: <io.h> + * rmdir: <io.h> + * pipe: <io.h> (actually, _pipe()) + */ + +/* For some POSIX functions that are not provided by the MS runtime, + * we provide emulation functions in glib, which are prefixed with + * g_win32_. Or that was the idea at some time, but there is just one + * of those: + */ +GLIB_AVAILABLE_IN_ALL +gint g_win32_ftruncate (gint f, + guint size); +#endif /* G_OS_WIN32 */ + +/* The MS setlocale uses locale names of the form "English_United + * States.1252" etc. We want the Unixish standard form "en", "zh_TW" + * etc. This function gets the current thread locale from Windows and + * returns it as a string of the above form for use in forming file + * names etc. The returned string should be deallocated with g_free(). + */ +GLIB_AVAILABLE_IN_ALL +gchar* g_win32_getlocale (void); + +/* Translate a Win32 error code (as returned by GetLastError()) into + * the corresponding message. The returned string should be deallocated + * with g_free(). + */ +GLIB_AVAILABLE_IN_ALL +gchar* g_win32_error_message (gint error); + +GLIB_DEPRECATED +gchar* g_win32_get_package_installation_directory (const gchar *package, + const gchar *dll_name); + +GLIB_DEPRECATED +gchar* g_win32_get_package_installation_subdirectory (const gchar *package, + const gchar *dll_name, + const gchar *subdir); + +GLIB_AVAILABLE_IN_ALL +gchar* g_win32_get_package_installation_directory_of_module (gpointer hmodule); + +GLIB_DEPRECATED_IN_2_44_FOR(g_win32_check_windows_version) +guint g_win32_get_windows_version (void); + +GLIB_AVAILABLE_IN_ALL +gchar* g_win32_locale_filename_from_utf8 (const gchar *utf8filename); + +GLIB_AVAILABLE_IN_2_40 +gchar ** g_win32_get_command_line (void); + +/* As of GLib 2.14 we only support NT-based Windows */ +#define G_WIN32_IS_NT_BASED() TRUE +#define G_WIN32_HAVE_WIDECHAR_API() TRUE + +/** + * GWin32OSType: + * @G_WIN32_OS_ANY: The running system can be a workstation or a server edition of + * Windows. The type of the running system is therefore not checked. + * @G_WIN32_OS_WORKSTATION: The running system is a workstation edition of Windows, + * such as Windows 7 Professional. + * @G_WIN32_OS_SERVER: The running system is a server edition of Windows, such as + * Windows Server 2008 R2. + * + * Type of Windows edition to check for at run-time. + **/ +typedef enum +{ + G_WIN32_OS_ANY, + G_WIN32_OS_WORKSTATION, + G_WIN32_OS_SERVER, +} GWin32OSType; + +GLIB_AVAILABLE_IN_2_44 +gboolean g_win32_check_windows_version (const gint major, + const gint minor, + const gint spver, + const GWin32OSType os_type); + +G_END_DECLS + +#endif /* G_PLATFORM_WIN32 */ + +#endif /* __G_WIN32_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gmodule.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gmodule.h new file mode 100755 index 00000000..8982f595 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gmodule.h @@ -0,0 +1,117 @@ +/* GMODULE - GLIB wrapper code for dynamic module loading + * Copyright (C) 1998 Tim Janik + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __GMODULE_H__ +#define __GMODULE_H__ + +#include <glib.h> + +G_BEGIN_DECLS + +/* exporting and importing functions, this is special cased + * to feature Windows dll stubs. + */ +#define G_MODULE_IMPORT extern +#ifdef G_PLATFORM_WIN32 +# define G_MODULE_EXPORT __declspec(dllexport) +#elif __GNUC__ >= 4 +# define G_MODULE_EXPORT __attribute__((visibility("default"))) +#else /* !G_PLATFORM_WIN32 && __GNUC__ < 4 */ +# define G_MODULE_EXPORT +#endif /* !G_PLATFORM_WIN32 */ + +/** + * GModuleFlags: + * @G_MODULE_BIND_LAZY: specifies that symbols are only resolved when + * needed. The default action is to bind all symbols when the module + * is loaded. + * @G_MODULE_BIND_LOCAL: specifies that symbols in the module should + * not be added to the global name space. The default action on most + * platforms is to place symbols in the module in the global name space, + * which may cause conflicts with existing symbols. + * @G_MODULE_BIND_MASK: mask for all flags. + * + * Flags passed to g_module_open(). + * Note that these flags are not supported on all platforms. + */ +typedef enum +{ + G_MODULE_BIND_LAZY = 1 << 0, + G_MODULE_BIND_LOCAL = 1 << 1, + G_MODULE_BIND_MASK = 0x03 +} GModuleFlags; + +typedef struct _GModule GModule; +typedef const gchar* (*GModuleCheckInit) (GModule *module); +typedef void (*GModuleUnload) (GModule *module); + +/* return TRUE if dynamic module loading is supported */ +GLIB_AVAILABLE_IN_ALL +gboolean g_module_supported (void) G_GNUC_CONST; + +/* open a module 'file_name' and return handle, which is NULL on error */ +GLIB_AVAILABLE_IN_ALL +GModule* g_module_open (const gchar *file_name, + GModuleFlags flags); + +/* close a previously opened module, returns TRUE on success */ +GLIB_AVAILABLE_IN_ALL +gboolean g_module_close (GModule *module); + +/* make a module resident so g_module_close on it will be ignored */ +GLIB_AVAILABLE_IN_ALL +void g_module_make_resident (GModule *module); + +/* query the last module error as a string */ +GLIB_AVAILABLE_IN_ALL +const gchar * g_module_error (void); + +/* retrieve a symbol pointer from 'module', returns TRUE on success */ +GLIB_AVAILABLE_IN_ALL +gboolean g_module_symbol (GModule *module, + const gchar *symbol_name, + gpointer *symbol); + +/* retrieve the file name from an existing module */ +GLIB_AVAILABLE_IN_ALL +const gchar * g_module_name (GModule *module); + +/* Build the actual file name containing a module. 'directory' is the + * directory where the module file is supposed to be, or NULL or empty + * in which case it should either be in the current directory or, on + * some operating systems, in some standard place, for instance on the + * PATH. Hence, to be absoultely sure to get the correct module, + * always pass in a directory. The file name consists of the directory, + * if supplied, and 'module_name' suitably decorated according to + * the operating system's conventions (for instance lib*.so or *.dll). + * + * No checks are made that the file exists, or is of correct type. + */ +GLIB_AVAILABLE_IN_ALL +gchar* g_module_build_path (const gchar *directory, + const gchar *module_name); + +G_END_DECLS + +#endif /* __GMODULE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gbinding.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gbinding.h new file mode 100755 index 00000000..b4eb233b --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gbinding.h @@ -0,0 +1,149 @@ +/* gbinding.h: Binding for object properties + * + * Copyright (C) 2010 Intel Corp. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Emmanuele Bassi <ebassi@linux.intel.com> + */ + +#ifndef __G_BINDING_H__ +#define __G_BINDING_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only <glib-object.h> can be included directly." +#endif + +#include <glib.h> +#include <gobject/gobject.h> + +G_BEGIN_DECLS + +#define G_TYPE_BINDING_FLAGS (g_binding_flags_get_type ()) + +#define G_TYPE_BINDING (g_binding_get_type ()) +#define G_BINDING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_BINDING, GBinding)) +#define G_IS_BINDING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_BINDING)) + +/** + * GBinding: + * + * GBinding is an opaque structure whose members + * cannot be accessed directly. + * + * Since: 2.26 + */ +typedef struct _GBinding GBinding; + +/** + * GBindingTransformFunc: + * @binding: a #GBinding + * @from_value: the #GValue containing the value to transform + * @to_value: the #GValue in which to store the transformed value + * @user_data: data passed to the transform function + * + * A function to be called to transform @from_value to @to_value. If + * this is the @transform_to function of a binding, then @from_value + * is the @source_property on the @source object, and @to_value is the + * @target_property on the @target object. If this is the + * @transform_from function of a %G_BINDING_BIDIRECTIONAL binding, + * then those roles are reversed. + * + * Returns: %TRUE if the transformation was successful, and %FALSE + * otherwise + * + * Since: 2.26 + */ +typedef gboolean (* GBindingTransformFunc) (GBinding *binding, + const GValue *from_value, + GValue *to_value, + gpointer user_data); + +/** + * GBindingFlags: + * @G_BINDING_DEFAULT: The default binding; if the source property + * changes, the target property is updated with its value. + * @G_BINDING_BIDIRECTIONAL: Bidirectional binding; if either the + * property of the source or the property of the target changes, + * the other is updated. + * @G_BINDING_SYNC_CREATE: Synchronize the values of the source and + * target properties when creating the binding; the direction of + * the synchronization is always from the source to the target. + * @G_BINDING_INVERT_BOOLEAN: If the two properties being bound are + * booleans, setting one to %TRUE will result in the other being + * set to %FALSE and vice versa. This flag will only work for + * boolean properties, and cannot be used when passing custom + * transformation functions to g_object_bind_property_full(). + * + * Flags to be passed to g_object_bind_property() or + * g_object_bind_property_full(). + * + * This enumeration can be extended at later date. + * + * Since: 2.26 + */ +typedef enum { /*< prefix=G_BINDING >*/ + G_BINDING_DEFAULT = 0, + + G_BINDING_BIDIRECTIONAL = 1 << 0, + G_BINDING_SYNC_CREATE = 1 << 1, + G_BINDING_INVERT_BOOLEAN = 1 << 2 +} GBindingFlags; + +GLIB_AVAILABLE_IN_ALL +GType g_binding_flags_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_binding_get_type (void) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GBindingFlags g_binding_get_flags (GBinding *binding); +GLIB_AVAILABLE_IN_ALL +GObject * g_binding_get_source (GBinding *binding); +GLIB_AVAILABLE_IN_ALL +GObject * g_binding_get_target (GBinding *binding); +GLIB_AVAILABLE_IN_ALL +const gchar * g_binding_get_source_property (GBinding *binding); +GLIB_AVAILABLE_IN_ALL +const gchar * g_binding_get_target_property (GBinding *binding); +GLIB_AVAILABLE_IN_2_38 +void g_binding_unbind (GBinding *binding); + +GLIB_AVAILABLE_IN_ALL +GBinding *g_object_bind_property (gpointer source, + const gchar *source_property, + gpointer target, + const gchar *target_property, + GBindingFlags flags); +GLIB_AVAILABLE_IN_ALL +GBinding *g_object_bind_property_full (gpointer source, + const gchar *source_property, + gpointer target, + const gchar *target_property, + GBindingFlags flags, + GBindingTransformFunc transform_to, + GBindingTransformFunc transform_from, + gpointer user_data, + GDestroyNotify notify); +GLIB_AVAILABLE_IN_ALL +GBinding *g_object_bind_property_with_closures (gpointer source, + const gchar *source_property, + gpointer target, + const gchar *target_property, + GBindingFlags flags, + GClosure *transform_to, + GClosure *transform_from); + +G_END_DECLS + +#endif /* __G_BINDING_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gboxed.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gboxed.h new file mode 100755 index 00000000..bcaf0b01 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gboxed.h @@ -0,0 +1,122 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 2000-2001 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ +#ifndef __G_BOXED_H__ +#define __G_BOXED_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only <glib-object.h> can be included directly." +#endif + +#include <gobject/gtype.h> + +#ifndef __GI_SCANNER__ +#include <gobject/glib-types.h> +#endif + +G_BEGIN_DECLS + +/* --- type macros --- */ +#define G_TYPE_IS_BOXED(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_BOXED) +/** + * G_VALUE_HOLDS_BOXED: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values derived + * from type %G_TYPE_BOXED. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_BOXED(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOXED)) + + +/* --- typedefs --- */ +/** + * GBoxedCopyFunc: + * @boxed: (not nullable): The boxed structure to be copied. + * + * This function is provided by the user and should produce a copy + * of the passed in boxed structure. + * + * Returns: (not nullable): The newly created copy of the boxed structure. + */ +typedef gpointer (*GBoxedCopyFunc) (gpointer boxed); + +/** + * GBoxedFreeFunc: + * @boxed: (not nullable): The boxed structure to be freed. + * + * This function is provided by the user and should free the boxed + * structure passed. + */ +typedef void (*GBoxedFreeFunc) (gpointer boxed); + + +/* --- prototypes --- */ +GLIB_AVAILABLE_IN_ALL +gpointer g_boxed_copy (GType boxed_type, + gconstpointer src_boxed); +GLIB_AVAILABLE_IN_ALL +void g_boxed_free (GType boxed_type, + gpointer boxed); +GLIB_AVAILABLE_IN_ALL +void g_value_set_boxed (GValue *value, + gconstpointer v_boxed); +GLIB_AVAILABLE_IN_ALL +void g_value_set_static_boxed (GValue *value, + gconstpointer v_boxed); +GLIB_AVAILABLE_IN_ALL +void g_value_take_boxed (GValue *value, + gconstpointer v_boxed); +GLIB_DEPRECATED_FOR(g_value_take_boxed) +void g_value_set_boxed_take_ownership (GValue *value, + gconstpointer v_boxed); +GLIB_AVAILABLE_IN_ALL +gpointer g_value_get_boxed (const GValue *value); +GLIB_AVAILABLE_IN_ALL +gpointer g_value_dup_boxed (const GValue *value); + + +/* --- convenience --- */ +GLIB_AVAILABLE_IN_ALL +GType g_boxed_type_register_static (const gchar *name, + GBoxedCopyFunc boxed_copy, + GBoxedFreeFunc boxed_free); + +/* --- GObject boxed types --- */ +/** + * G_TYPE_CLOSURE: + * + * The #GType for #GClosure. + */ +#define G_TYPE_CLOSURE (g_closure_get_type ()) + +/** + * G_TYPE_VALUE: + * + * The type ID of the "GValue" type which is a boxed type, + * used to pass around pointers to GValues. + */ +#define G_TYPE_VALUE (g_value_get_type ()) + +GLIB_AVAILABLE_IN_ALL +GType g_closure_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_value_get_type (void) G_GNUC_CONST; + +G_END_DECLS + +#endif /* __G_BOXED_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gclosure.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gclosure.h new file mode 100755 index 00000000..393348c7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gclosure.h @@ -0,0 +1,317 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 2000-2001 Red Hat, Inc. + * Copyright (C) 2005 Imendio AB + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ +#ifndef __G_CLOSURE_H__ +#define __G_CLOSURE_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only <glib-object.h> can be included directly." +#endif + +#include <gobject/gtype.h> + +G_BEGIN_DECLS + +/* --- defines --- */ +/** + * G_CLOSURE_NEEDS_MARSHAL: + * @closure: a #GClosure + * + * Check if the closure still needs a marshaller. See g_closure_set_marshal(). + * + * Returns: %TRUE if a #GClosureMarshal marshaller has not yet been set on + * @closure. + */ +#define G_CLOSURE_NEEDS_MARSHAL(closure) (((GClosure*) (closure))->marshal == NULL) +/** + * G_CLOSURE_N_NOTIFIERS: + * @cl: a #GClosure + * + * Get the total number of notifiers connected with the closure @cl. + * The count includes the meta marshaller, the finalize and invalidate notifiers + * and the marshal guards. Note that each guard counts as two notifiers. + * See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(), + * g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards(). + * + * Returns: number of notifiers + */ +#define G_CLOSURE_N_NOTIFIERS(cl) (((cl)->n_guards << 1L) + \ + (cl)->n_fnotifiers + (cl)->n_inotifiers) +/** + * G_CCLOSURE_SWAP_DATA: + * @cclosure: a #GCClosure + * + * Checks whether the user data of the #GCClosure should be passed as the + * first parameter to the callback. See g_cclosure_new_swap(). + * + * Returns: %TRUE if data has to be swapped. + */ +#define G_CCLOSURE_SWAP_DATA(cclosure) (((GClosure*) (cclosure))->derivative_flag) +/** + * G_CALLBACK: + * @f: a function pointer. + * + * Cast a function pointer to a #GCallback. + */ +#define G_CALLBACK(f) ((GCallback) (f)) + + +/* -- typedefs --- */ +typedef struct _GClosure GClosure; +typedef struct _GClosureNotifyData GClosureNotifyData; + +/** + * GCallback: + * + * The type used for callback functions in structure definitions and function + * signatures. This doesn't mean that all callback functions must take no + * parameters and return void. The required signature of a callback function + * is determined by the context in which is used (e.g. the signal to which it + * is connected). Use G_CALLBACK() to cast the callback function to a #GCallback. + */ +typedef void (*GCallback) (void); +/** + * GClosureNotify: + * @data: data specified when registering the notification callback + * @closure: the #GClosure on which the notification is emitted + * + * The type used for the various notification callbacks which can be registered + * on closures. + */ +typedef void (*GClosureNotify) (gpointer data, + GClosure *closure); +/** + * GClosureMarshal: + * @closure: the #GClosure to which the marshaller belongs + * @return_value: (nullable): a #GValue to store the return + * value. May be %NULL if the callback of @closure doesn't return a + * value. + * @n_param_values: the length of the @param_values array + * @param_values: (array length=n_param_values): an array of + * #GValues holding the arguments on which to invoke the + * callback of @closure + * @invocation_hint: (nullable): the invocation hint given as the + * last argument to g_closure_invoke() + * @marshal_data: (nullable): additional data specified when + * registering the marshaller, see g_closure_set_marshal() and + * g_closure_set_meta_marshal() + * + * The type used for marshaller functions. + */ +typedef void (*GClosureMarshal) (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + +/** + * GVaClosureMarshal: + * @closure: the #GClosure to which the marshaller belongs + * @return_value: (nullable): a #GValue to store the return + * value. May be %NULL if the callback of @closure doesn't return a + * value. + * @instance: (type GObject.TypeInstance): the instance on which the closure is + * invoked. + * @args: va_list of arguments to be passed to the closure. + * @marshal_data: (nullable): additional data specified when + * registering the marshaller, see g_closure_set_marshal() and + * g_closure_set_meta_marshal() + * @n_params: the length of the @param_types array + * @param_types: (array length=n_params): the #GType of each argument from + * @args. + * + * This is the signature of va_list marshaller functions, an optional + * marshaller that can be used in some situations to avoid + * marshalling the signal argument into GValues. + */ +typedef void (* GVaClosureMarshal) (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/** + * GCClosure: + * @closure: the #GClosure + * @callback: the callback function + * + * A #GCClosure is a specialization of #GClosure for C function callbacks. + */ +typedef struct _GCClosure GCClosure; + + +/* --- structures --- */ +struct _GClosureNotifyData +{ + gpointer data; + GClosureNotify notify; +}; +/** + * GClosure: + * @in_marshal: Indicates whether the closure is currently being invoked with + * g_closure_invoke() + * @is_invalid: Indicates whether the closure has been invalidated by + * g_closure_invalidate() + * + * A #GClosure represents a callback supplied by the programmer. + */ +struct _GClosure +{ + /*< private >*/ + volatile guint ref_count : 15; + /* meta_marshal is not used anymore but must be zero for historical reasons + as it was exposed in the G_CLOSURE_N_NOTIFIERS macro */ + volatile guint meta_marshal_nouse : 1; + volatile guint n_guards : 1; + volatile guint n_fnotifiers : 2; /* finalization notifiers */ + volatile guint n_inotifiers : 8; /* invalidation notifiers */ + volatile guint in_inotify : 1; + volatile guint floating : 1; + /*< protected >*/ + volatile guint derivative_flag : 1; + /*< public >*/ + volatile guint in_marshal : 1; + volatile guint is_invalid : 1; + + /*< private >*/ void (*marshal) (GClosure *closure, + GValue /*out*/ *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + /*< protected >*/ gpointer data; + + /*< private >*/ GClosureNotifyData *notifiers; + + /* invariants/constrains: + * - ->marshal and ->data are _invalid_ as soon as ->is_invalid==TRUE + * - invocation of all inotifiers occours prior to fnotifiers + * - order of inotifiers is random + * inotifiers may _not_ free/invalidate parameter values (e.g. ->data) + * - order of fnotifiers is random + * - each notifier may only be removed before or during its invocation + * - reference counting may only happen prior to fnotify invocation + * (in that sense, fnotifiers are really finalization handlers) + */ +}; +/* closure for C function calls, callback() is the user function + */ +struct _GCClosure +{ + GClosure closure; + gpointer callback; +}; + + +/* --- prototypes --- */ +GLIB_AVAILABLE_IN_ALL +GClosure* g_cclosure_new (GCallback callback_func, + gpointer user_data, + GClosureNotify destroy_data); +GLIB_AVAILABLE_IN_ALL +GClosure* g_cclosure_new_swap (GCallback callback_func, + gpointer user_data, + GClosureNotify destroy_data); +GLIB_AVAILABLE_IN_ALL +GClosure* g_signal_type_cclosure_new (GType itype, + guint struct_offset); + + +/* --- prototypes --- */ +GLIB_AVAILABLE_IN_ALL +GClosure* g_closure_ref (GClosure *closure); +GLIB_AVAILABLE_IN_ALL +void g_closure_sink (GClosure *closure); +GLIB_AVAILABLE_IN_ALL +void g_closure_unref (GClosure *closure); +/* intimidating */ +GLIB_AVAILABLE_IN_ALL +GClosure* g_closure_new_simple (guint sizeof_closure, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_closure_add_finalize_notifier (GClosure *closure, + gpointer notify_data, + GClosureNotify notify_func); +GLIB_AVAILABLE_IN_ALL +void g_closure_remove_finalize_notifier (GClosure *closure, + gpointer notify_data, + GClosureNotify notify_func); +GLIB_AVAILABLE_IN_ALL +void g_closure_add_invalidate_notifier (GClosure *closure, + gpointer notify_data, + GClosureNotify notify_func); +GLIB_AVAILABLE_IN_ALL +void g_closure_remove_invalidate_notifier (GClosure *closure, + gpointer notify_data, + GClosureNotify notify_func); +GLIB_AVAILABLE_IN_ALL +void g_closure_add_marshal_guards (GClosure *closure, + gpointer pre_marshal_data, + GClosureNotify pre_marshal_notify, + gpointer post_marshal_data, + GClosureNotify post_marshal_notify); +GLIB_AVAILABLE_IN_ALL +void g_closure_set_marshal (GClosure *closure, + GClosureMarshal marshal); +GLIB_AVAILABLE_IN_ALL +void g_closure_set_meta_marshal (GClosure *closure, + gpointer marshal_data, + GClosureMarshal meta_marshal); +GLIB_AVAILABLE_IN_ALL +void g_closure_invalidate (GClosure *closure); +GLIB_AVAILABLE_IN_ALL +void g_closure_invoke (GClosure *closure, + GValue /*out*/ *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint); + +/* FIXME: + OK: data_object::destroy -> closure_invalidate(); + MIS: closure_invalidate() -> disconnect(closure); + MIS: disconnect(closure) -> (unlink) closure_unref(); + OK: closure_finalize() -> g_free (data_string); + + random remarks: + - need marshaller repo with decent aliasing to base types + - provide marshaller collection, virtually covering anything out there +*/ + +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_generic (GClosure *closure, + GValue *return_gvalue, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_generic_va (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args_list, + gpointer marshal_data, + int n_params, + GType *param_types); + + +G_END_DECLS + +#endif /* __G_CLOSURE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/genums.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/genums.h new file mode 100755 index 00000000..c66ce45c --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/genums.h @@ -0,0 +1,279 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1998-1999, 2000-2001 Tim Janik and Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ +#ifndef __G_ENUMS_H__ +#define __G_ENUMS_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only <glib-object.h> can be included directly." +#endif + +#include <gobject/gtype.h> + +G_BEGIN_DECLS + +/* --- type macros --- */ +/** + * G_TYPE_IS_ENUM: + * @type: a #GType ID. + * + * Checks whether @type "is a" %G_TYPE_ENUM. + * + * Returns: %TRUE if @type "is a" %G_TYPE_ENUM. + */ +#define G_TYPE_IS_ENUM(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_ENUM) +/** + * G_ENUM_CLASS: + * @class: a valid #GEnumClass + * + * Casts a derived #GEnumClass structure into a #GEnumClass structure. + */ +#define G_ENUM_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_ENUM, GEnumClass)) +/** + * G_IS_ENUM_CLASS: + * @class: a #GEnumClass + * + * Checks whether @class "is a" valid #GEnumClass structure of type %G_TYPE_ENUM + * or derived. + */ +#define G_IS_ENUM_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_ENUM)) +/** + * G_ENUM_CLASS_TYPE: + * @class: a #GEnumClass + * + * Get the type identifier from a given #GEnumClass structure. + * + * Returns: the #GType + */ +#define G_ENUM_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class)) +/** + * G_ENUM_CLASS_TYPE_NAME: + * @class: a #GEnumClass + * + * Get the static type name from a given #GEnumClass structure. + * + * Returns: the type name. + */ +#define G_ENUM_CLASS_TYPE_NAME(class) (g_type_name (G_ENUM_CLASS_TYPE (class))) + + +/** + * G_TYPE_IS_FLAGS: + * @type: a #GType ID. + * + * Checks whether @type "is a" %G_TYPE_FLAGS. + * + * Returns: %TRUE if @type "is a" %G_TYPE_FLAGS. + */ +#define G_TYPE_IS_FLAGS(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_FLAGS) +/** + * G_FLAGS_CLASS: + * @class: a valid #GFlagsClass + * + * Casts a derived #GFlagsClass structure into a #GFlagsClass structure. + */ +#define G_FLAGS_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_FLAGS, GFlagsClass)) +/** + * G_IS_FLAGS_CLASS: + * @class: a #GFlagsClass + * + * Checks whether @class "is a" valid #GFlagsClass structure of type %G_TYPE_FLAGS + * or derived. + */ +#define G_IS_FLAGS_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_FLAGS)) +/** + * G_FLAGS_CLASS_TYPE: + * @class: a #GFlagsClass + * + * Get the type identifier from a given #GFlagsClass structure. + * + * Returns: the #GType + */ +#define G_FLAGS_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class)) +/** + * G_FLAGS_CLASS_TYPE_NAME: + * @class: a #GFlagsClass + * + * Get the static type name from a given #GFlagsClass structure. + * + * Returns: the type name. + */ +#define G_FLAGS_CLASS_TYPE_NAME(class) (g_type_name (G_FLAGS_CLASS_TYPE (class))) + + +/** + * G_VALUE_HOLDS_ENUM: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values derived from type %G_TYPE_ENUM. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_ENUM(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_ENUM)) +/** + * G_VALUE_HOLDS_FLAGS: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values derived from type %G_TYPE_FLAGS. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_FLAGS(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_FLAGS)) + + +/* --- enum/flag values & classes --- */ +typedef struct _GEnumClass GEnumClass; +typedef struct _GFlagsClass GFlagsClass; +typedef struct _GEnumValue GEnumValue; +typedef struct _GFlagsValue GFlagsValue; + +/** + * GEnumClass: + * @g_type_class: the parent class + * @minimum: the smallest possible value. + * @maximum: the largest possible value. + * @n_values: the number of possible values. + * @values: an array of #GEnumValue structs describing the + * individual values. + * + * The class of an enumeration type holds information about its + * possible values. + */ +struct _GEnumClass +{ + GTypeClass g_type_class; + + /*< public >*/ + gint minimum; + gint maximum; + guint n_values; + GEnumValue *values; +}; +/** + * GFlagsClass: + * @g_type_class: the parent class + * @mask: a mask covering all possible values. + * @n_values: the number of possible values. + * @values: an array of #GFlagsValue structs describing the + * individual values. + * + * The class of a flags type holds information about its + * possible values. + */ +struct _GFlagsClass +{ + GTypeClass g_type_class; + + /*< public >*/ + guint mask; + guint n_values; + GFlagsValue *values; +}; +/** + * GEnumValue: + * @value: the enum value + * @value_name: the name of the value + * @value_nick: the nickname of the value + * + * A structure which contains a single enum value, its name, and its + * nickname. + */ +struct _GEnumValue +{ + gint value; + const gchar *value_name; + const gchar *value_nick; +}; +/** + * GFlagsValue: + * @value: the flags value + * @value_name: the name of the value + * @value_nick: the nickname of the value + * + * A structure which contains a single flags value, its name, and its + * nickname. + */ +struct _GFlagsValue +{ + guint value; + const gchar *value_name; + const gchar *value_nick; +}; + + +/* --- prototypes --- */ +GLIB_AVAILABLE_IN_ALL +GEnumValue* g_enum_get_value (GEnumClass *enum_class, + gint value); +GLIB_AVAILABLE_IN_ALL +GEnumValue* g_enum_get_value_by_name (GEnumClass *enum_class, + const gchar *name); +GLIB_AVAILABLE_IN_ALL +GEnumValue* g_enum_get_value_by_nick (GEnumClass *enum_class, + const gchar *nick); +GLIB_AVAILABLE_IN_ALL +GFlagsValue* g_flags_get_first_value (GFlagsClass *flags_class, + guint value); +GLIB_AVAILABLE_IN_ALL +GFlagsValue* g_flags_get_value_by_name (GFlagsClass *flags_class, + const gchar *name); +GLIB_AVAILABLE_IN_ALL +GFlagsValue* g_flags_get_value_by_nick (GFlagsClass *flags_class, + const gchar *nick); +GLIB_AVAILABLE_IN_2_54 +gchar *g_enum_to_string (GType g_enum_type, + gint value); +GLIB_AVAILABLE_IN_2_54 +gchar *g_flags_to_string (GType flags_type, + guint value); +GLIB_AVAILABLE_IN_ALL +void g_value_set_enum (GValue *value, + gint v_enum); +GLIB_AVAILABLE_IN_ALL +gint g_value_get_enum (const GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_value_set_flags (GValue *value, + guint v_flags); +GLIB_AVAILABLE_IN_ALL +guint g_value_get_flags (const GValue *value); + + + +/* --- registration functions --- */ +/* const_static_values is a NULL terminated array of enum/flags + * values that is taken over! + */ +GLIB_AVAILABLE_IN_ALL +GType g_enum_register_static (const gchar *name, + const GEnumValue *const_static_values); +GLIB_AVAILABLE_IN_ALL +GType g_flags_register_static (const gchar *name, + const GFlagsValue *const_static_values); +/* functions to complete the type information + * for enums/flags implemented by plugins + */ +GLIB_AVAILABLE_IN_ALL +void g_enum_complete_type_info (GType g_enum_type, + GTypeInfo *info, + const GEnumValue *const_values); +GLIB_AVAILABLE_IN_ALL +void g_flags_complete_type_info (GType g_flags_type, + GTypeInfo *info, + const GFlagsValue *const_values); + +G_END_DECLS + +#endif /* __G_ENUMS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/glib-types.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/glib-types.h new file mode 100755 index 00000000..78a199d1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/glib-types.h @@ -0,0 +1,362 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 2000-2001 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ +#ifndef __GLIB_TYPES_H__ +#define __GLIB_TYPES_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) && !defined(GLIB_COMPILATION) +#error "Only <glib-object.h> can be included directly." +#endif + +#include <glib.h> + +G_BEGIN_DECLS + +/* A hack necesssary to preprocess this file with g-ir-scanner */ +#ifdef __GI_SCANNER__ +typedef gsize GType; +#endif + +/* --- GLib boxed types --- */ +/** + * G_TYPE_DATE: + * + * The #GType for #GDate. + */ +#define G_TYPE_DATE (g_date_get_type ()) + +/** + * G_TYPE_STRV: + * + * The #GType for a boxed type holding a %NULL-terminated array of strings. + * + * The code fragments in the following example show the use of a property of + * type #G_TYPE_STRV with g_object_class_install_property(), g_object_set() + * and g_object_get(). + * + * |[ + * g_object_class_install_property (object_class, + * PROP_AUTHORS, + * g_param_spec_boxed ("authors", + * _("Authors"), + * _("List of authors"), + * G_TYPE_STRV, + * G_PARAM_READWRITE)); + * + * gchar *authors[] = { "Owen", "Tim", NULL }; + * g_object_set (obj, "authors", authors, NULL); + * + * gchar *writers[]; + * g_object_get (obj, "authors", &writers, NULL); + * /* do something with writers */ + * g_strfreev (writers); + * ]| + * + * Since: 2.4 + */ +#define G_TYPE_STRV (g_strv_get_type ()) + +/** + * G_TYPE_GSTRING: + * + * The #GType for #GString. + */ +#define G_TYPE_GSTRING (g_gstring_get_type ()) + +/** + * G_TYPE_HASH_TABLE: + * + * The #GType for a boxed type holding a #GHashTable reference. + * + * Since: 2.10 + */ +#define G_TYPE_HASH_TABLE (g_hash_table_get_type ()) + +/** + * G_TYPE_REGEX: + * + * The #GType for a boxed type holding a #GRegex reference. + * + * Since: 2.14 + */ +#define G_TYPE_REGEX (g_regex_get_type ()) + +/** + * G_TYPE_MATCH_INFO: + * + * The #GType for a boxed type holding a #GMatchInfo reference. + * + * Since: 2.30 + */ +#define G_TYPE_MATCH_INFO (g_match_info_get_type ()) + +/** + * G_TYPE_ARRAY: + * + * The #GType for a boxed type holding a #GArray reference. + * + * Since: 2.22 + */ +#define G_TYPE_ARRAY (g_array_get_type ()) + +/** + * G_TYPE_BYTE_ARRAY: + * + * The #GType for a boxed type holding a #GByteArray reference. + * + * Since: 2.22 + */ +#define G_TYPE_BYTE_ARRAY (g_byte_array_get_type ()) + +/** + * G_TYPE_PTR_ARRAY: + * + * The #GType for a boxed type holding a #GPtrArray reference. + * + * Since: 2.22 + */ +#define G_TYPE_PTR_ARRAY (g_ptr_array_get_type ()) + +/** + * G_TYPE_BYTES: + * + * The #GType for #GBytes. + * + * Since: 2.32 + */ +#define G_TYPE_BYTES (g_bytes_get_type ()) + +/** + * G_TYPE_VARIANT_TYPE: + * + * The #GType for a boxed type holding a #GVariantType. + * + * Since: 2.24 + */ +#define G_TYPE_VARIANT_TYPE (g_variant_type_get_gtype ()) + +/** + * G_TYPE_ERROR: + * + * The #GType for a boxed type holding a #GError. + * + * Since: 2.26 + */ +#define G_TYPE_ERROR (g_error_get_type ()) + +/** + * G_TYPE_DATE_TIME: + * + * The #GType for a boxed type holding a #GDateTime. + * + * Since: 2.26 + */ +#define G_TYPE_DATE_TIME (g_date_time_get_type ()) + +/** + * G_TYPE_TIME_ZONE: + * + * The #GType for a boxed type holding a #GTimeZone. + * + * Since: 2.34 + */ +#define G_TYPE_TIME_ZONE (g_time_zone_get_type ()) + +/** + * G_TYPE_IO_CHANNEL: + * + * The #GType for #GIOChannel. + */ +#define G_TYPE_IO_CHANNEL (g_io_channel_get_type ()) + +/** + * G_TYPE_IO_CONDITION: + * + * The #GType for #GIOCondition. + */ +#define G_TYPE_IO_CONDITION (g_io_condition_get_type ()) + +/** + * G_TYPE_VARIANT_BUILDER: + * + * The #GType for a boxed type holding a #GVariantBuilder. + * + * Since: 2.30 + */ +#define G_TYPE_VARIANT_BUILDER (g_variant_builder_get_type ()) + +/** + * G_TYPE_VARIANT_DICT: + * + * The #GType for a boxed type holding a #GVariantDict. + * + * Since: 2.40 + */ +#define G_TYPE_VARIANT_DICT (g_variant_dict_get_type ()) + +/** + * G_TYPE_MAIN_LOOP: + * + * The #GType for a boxed type holding a #GMainLoop. + * + * Since: 2.30 + */ +#define G_TYPE_MAIN_LOOP (g_main_loop_get_type ()) + +/** + * G_TYPE_MAIN_CONTEXT: + * + * The #GType for a boxed type holding a #GMainContext. + * + * Since: 2.30 + */ +#define G_TYPE_MAIN_CONTEXT (g_main_context_get_type ()) + +/** + * G_TYPE_SOURCE: + * + * The #GType for a boxed type holding a #GSource. + * + * Since: 2.30 + */ +#define G_TYPE_SOURCE (g_source_get_type ()) + +/** + * G_TYPE_POLLFD: + * + * The #GType for a boxed type holding a #GPollFD. + * + * Since: 2.36 + */ +#define G_TYPE_POLLFD (g_pollfd_get_type ()) + +/** + * G_TYPE_MARKUP_PARSE_CONTEXT: + * + * The #GType for a boxed type holding a #GMarkupParseContext. + * + * Since: 2.36 + */ +#define G_TYPE_MARKUP_PARSE_CONTEXT (g_markup_parse_context_get_type ()) + +/** + * G_TYPE_KEY_FILE: + * + * The #GType for a boxed type holding a #GKeyFile. + * + * Since: 2.32 + */ +#define G_TYPE_KEY_FILE (g_key_file_get_type ()) + +/** + * G_TYPE_MAPPED_FILE: + * + * The #GType for a boxed type holding a #GMappedFile. + * + * Since: 2.40 + */ +#define G_TYPE_MAPPED_FILE (g_mapped_file_get_type ()) + +/** + * G_TYPE_THREAD: + * + * The #GType for a boxed type holding a #GThread. + * + * Since: 2.36 + */ +#define G_TYPE_THREAD (g_thread_get_type ()) + +/** + * G_TYPE_CHECKSUM: + * + * The #GType for a boxed type holding a #GChecksum. + * + * Since: 2.36 + */ +#define G_TYPE_CHECKSUM (g_checksum_get_type ()) + +/** + * G_TYPE_OPTION_GROUP: + * + * The #GType for a boxed type holding a #GOptionGroup. + * + * Since: 2.44 + */ +#define G_TYPE_OPTION_GROUP (g_option_group_get_type ()) + +GLIB_AVAILABLE_IN_ALL +GType g_date_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_strv_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_gstring_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_hash_table_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_array_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_byte_array_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_ptr_array_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_bytes_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_variant_type_get_gtype (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_regex_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_2_30 +GType g_match_info_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_error_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_date_time_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_time_zone_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_io_channel_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_io_condition_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_variant_builder_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_2_40 +GType g_variant_dict_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +GType g_key_file_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_2_30 +GType g_main_loop_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_2_30 +GType g_main_context_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_2_30 +GType g_source_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_2_36 +GType g_pollfd_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_2_36 +GType g_thread_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_2_36 +GType g_checksum_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_2_36 +GType g_markup_parse_context_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_2_40 +GType g_mapped_file_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_2_44 +GType g_option_group_get_type (void) G_GNUC_CONST; + +GLIB_DEPRECATED_FOR('G_TYPE_VARIANT') +GType g_variant_get_gtype (void) G_GNUC_CONST; + +G_END_DECLS + +#endif /* __GLIB_TYPES_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gmarshal.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gmarshal.h new file mode 100755 index 00000000..d4fd76a1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gmarshal.h @@ -0,0 +1,385 @@ +/* Note: This file is no longer generated. See the comment in gmarshal.list */ +#ifndef __G_MARSHAL_H__ +#define __G_MARSHAL_H__ + +G_BEGIN_DECLS + +/* VOID:VOID (./gmarshal.list:6) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__VOID (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__VOIDv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:BOOLEAN (./gmarshal.list:7) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__BOOLEAN (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__BOOLEANv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:CHAR (./gmarshal.list:8) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__CHAR (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__CHARv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:UCHAR (./gmarshal.list:9) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__UCHAR (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__UCHARv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:INT (./gmarshal.list:10) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__INT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__INTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:UINT (./gmarshal.list:11) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__UINTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:LONG (./gmarshal.list:12) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__LONG (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__LONGv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:ULONG (./gmarshal.list:13) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__ULONG (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__ULONGv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:ENUM (./gmarshal.list:14) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__ENUM (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__ENUMv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:FLAGS (./gmarshal.list:15) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__FLAGS (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__FLAGSv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:FLOAT (./gmarshal.list:16) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__FLOAT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__FLOATv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:DOUBLE (./gmarshal.list:17) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__DOUBLE (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__DOUBLEv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:STRING (./gmarshal.list:18) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__STRING (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__STRINGv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:PARAM (./gmarshal.list:19) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__PARAM (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__PARAMv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:BOXED (./gmarshal.list:20) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__BOXEDv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:POINTER (./gmarshal.list:21) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__POINTERv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:OBJECT (./gmarshal.list:22) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__OBJECT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__OBJECTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:VARIANT (./gmarshal.list:23) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__VARIANT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__VARIANTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:UINT,POINTER (./gmarshal.list:26) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__UINT_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__UINT_POINTERv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* BOOL:FLAGS (./gmarshal.list:27) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_BOOLEAN__FLAGS (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_BOOLEAN__FLAGSv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); +#define g_cclosure_marshal_BOOL__FLAGS g_cclosure_marshal_BOOLEAN__FLAGS + +/* STRING:OBJECT,POINTER (./gmarshal.list:28) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_STRING__OBJECT_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_STRING__OBJECT_POINTERv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* BOOL:BOXED,BOXED (./gmarshal.list:29) */ +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_BOOLEAN__BOXED_BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); +#define g_cclosure_marshal_BOOL__BOXED_BOXED g_cclosure_marshal_BOOLEAN__BOXED_BOXED + +G_END_DECLS + +#endif /* __G_MARSHAL_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gobject-autocleanups.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gobject-autocleanups.h new file mode 100755 index 00000000..8aeda2eb --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gobject-autocleanups.h @@ -0,0 +1,27 @@ +/* + * Copyright © 2015 Canonical Limited + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Ryan Lortie <desrt@desrt.ca> + */ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only <glib-object.h> can be included directly." +#endif + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GClosure, g_closure_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GObject, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitiallyUnowned, g_object_unref) +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GValue, g_value_unset) diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gobject.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gobject.h new file mode 100755 index 00000000..9830663c --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gobject.h @@ -0,0 +1,861 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1998-1999, 2000-2001 Tim Janik and Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ +#ifndef __G_OBJECT_H__ +#define __G_OBJECT_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only <glib-object.h> can be included directly." +#endif + +#include <gobject/gtype.h> +#include <gobject/gvalue.h> +#include <gobject/gparam.h> +#include <gobject/gclosure.h> +#include <gobject/gsignal.h> +#include <gobject/gboxed.h> + +G_BEGIN_DECLS + +/* --- type macros --- */ +/** + * G_TYPE_IS_OBJECT: + * @type: Type id to check + * + * Check if the passed in type id is a %G_TYPE_OBJECT or derived from it. + * + * Returns: %FALSE or %TRUE, indicating whether @type is a %G_TYPE_OBJECT. + */ +#define G_TYPE_IS_OBJECT(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_OBJECT) +/** + * G_OBJECT: + * @object: Object which is subject to casting. + * + * Casts a #GObject or derived pointer into a (GObject*) pointer. + * Depending on the current debugging level, this function may invoke + * certain runtime checks to identify invalid casts. + */ +#define G_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_OBJECT, GObject)) +/** + * G_OBJECT_CLASS: + * @class: a valid #GObjectClass + * + * Casts a derived #GObjectClass structure into a #GObjectClass structure. + */ +#define G_OBJECT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_OBJECT, GObjectClass)) +/** + * G_IS_OBJECT: + * @object: Instance to check for being a %G_TYPE_OBJECT. + * + * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_OBJECT. + */ +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_42 +#define G_IS_OBJECT(object) (G_TYPE_CHECK_INSTANCE_FUNDAMENTAL_TYPE ((object), G_TYPE_OBJECT)) +#else +#define G_IS_OBJECT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_OBJECT)) +#endif +/** + * G_IS_OBJECT_CLASS: + * @class: a #GObjectClass + * + * Checks whether @class "is a" valid #GObjectClass structure of type + * %G_TYPE_OBJECT or derived. + */ +#define G_IS_OBJECT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_OBJECT)) +/** + * G_OBJECT_GET_CLASS: + * @object: a #GObject instance. + * + * Get the class structure associated to a #GObject instance. + * + * Returns: pointer to object class structure. + */ +#define G_OBJECT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), G_TYPE_OBJECT, GObjectClass)) +/** + * G_OBJECT_TYPE: + * @object: Object to return the type id for. + * + * Get the type id of an object. + * + * Returns: Type id of @object. + */ +#define G_OBJECT_TYPE(object) (G_TYPE_FROM_INSTANCE (object)) +/** + * G_OBJECT_TYPE_NAME: + * @object: Object to return the type name for. + * + * Get the name of an object's type. + * + * Returns: Type name of @object. The string is owned by the type system and + * should not be freed. + */ +#define G_OBJECT_TYPE_NAME(object) (g_type_name (G_OBJECT_TYPE (object))) +/** + * G_OBJECT_CLASS_TYPE: + * @class: a valid #GObjectClass + * + * Get the type id of a class structure. + * + * Returns: Type id of @class. + */ +#define G_OBJECT_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class)) +/** + * G_OBJECT_CLASS_NAME: + * @class: a valid #GObjectClass + * + * Return the name of a class structure's type. + * + * Returns: Type name of @class. The string is owned by the type system and + * should not be freed. + */ +#define G_OBJECT_CLASS_NAME(class) (g_type_name (G_OBJECT_CLASS_TYPE (class))) +/** + * G_VALUE_HOLDS_OBJECT: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values derived from type %G_TYPE_OBJECT. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_OBJECT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_OBJECT)) + +/* --- type macros --- */ +/** + * G_TYPE_INITIALLY_UNOWNED: + * + * The type for #GInitiallyUnowned. + */ +#define G_TYPE_INITIALLY_UNOWNED (g_initially_unowned_get_type()) +/** + * G_INITIALLY_UNOWNED: + * @object: Object which is subject to casting. + * + * Casts a #GInitiallyUnowned or derived pointer into a (GInitiallyUnowned*) + * pointer. Depending on the current debugging level, this function may invoke + * certain runtime checks to identify invalid casts. + */ +#define G_INITIALLY_UNOWNED(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_INITIALLY_UNOWNED, GInitiallyUnowned)) +/** + * G_INITIALLY_UNOWNED_CLASS: + * @class: a valid #GInitiallyUnownedClass + * + * Casts a derived #GInitiallyUnownedClass structure into a + * #GInitiallyUnownedClass structure. + */ +#define G_INITIALLY_UNOWNED_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_INITIALLY_UNOWNED, GInitiallyUnownedClass)) +/** + * G_IS_INITIALLY_UNOWNED: + * @object: Instance to check for being a %G_TYPE_INITIALLY_UNOWNED. + * + * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_INITIALLY_UNOWNED. + */ +#define G_IS_INITIALLY_UNOWNED(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_INITIALLY_UNOWNED)) +/** + * G_IS_INITIALLY_UNOWNED_CLASS: + * @class: a #GInitiallyUnownedClass + * + * Checks whether @class "is a" valid #GInitiallyUnownedClass structure of type + * %G_TYPE_INITIALLY_UNOWNED or derived. + */ +#define G_IS_INITIALLY_UNOWNED_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_INITIALLY_UNOWNED)) +/** + * G_INITIALLY_UNOWNED_GET_CLASS: + * @object: a #GInitiallyUnowned instance. + * + * Get the class structure associated to a #GInitiallyUnowned instance. + * + * Returns: pointer to object class structure. + */ +#define G_INITIALLY_UNOWNED_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), G_TYPE_INITIALLY_UNOWNED, GInitiallyUnownedClass)) +/* GInitiallyUnowned ia a GObject with initially floating reference count */ + + +/* --- typedefs & structures --- */ +typedef struct _GObject GObject; +typedef struct _GObjectClass GObjectClass; +typedef struct _GObject GInitiallyUnowned; +typedef struct _GObjectClass GInitiallyUnownedClass; +typedef struct _GObjectConstructParam GObjectConstructParam; +/** + * GObjectGetPropertyFunc: + * @object: a #GObject + * @property_id: the numeric id under which the property was registered with + * g_object_class_install_property(). + * @value: a #GValue to return the property value in + * @pspec: the #GParamSpec describing the property + * + * The type of the @get_property function of #GObjectClass. + */ +typedef void (*GObjectGetPropertyFunc) (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec); +/** + * GObjectSetPropertyFunc: + * @object: a #GObject + * @property_id: the numeric id under which the property was registered with + * g_object_class_install_property(). + * @value: the new value for the property + * @pspec: the #GParamSpec describing the property + * + * The type of the @set_property function of #GObjectClass. + */ +typedef void (*GObjectSetPropertyFunc) (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec); +/** + * GObjectFinalizeFunc: + * @object: the #GObject being finalized + * + * The type of the @finalize function of #GObjectClass. + */ +typedef void (*GObjectFinalizeFunc) (GObject *object); +/** + * GWeakNotify: + * @data: data that was provided when the weak reference was established + * @where_the_object_was: the object being finalized + * + * A #GWeakNotify function can be added to an object as a callback that gets + * triggered when the object is finalized. Since the object is already being + * finalized when the #GWeakNotify is called, there's not much you could do + * with the object, apart from e.g. using its address as hash-index or the like. + */ +typedef void (*GWeakNotify) (gpointer data, + GObject *where_the_object_was); +/** + * GObject: + * + * All the fields in the GObject structure are private + * to the #GObject implementation and should never be accessed directly. + */ +struct _GObject +{ + GTypeInstance g_type_instance; + + /*< private >*/ + volatile guint ref_count; + GData *qdata; +}; +/** + * GObjectClass: + * @g_type_class: the parent class + * @constructor: the @constructor function is called by g_object_new () to + * complete the object initialization after all the construction properties are + * set. The first thing a @constructor implementation must do is chain up to the + * @constructor of the parent class. Overriding @constructor should be rarely + * needed, e.g. to handle construct properties, or to implement singletons. + * @set_property: the generic setter for all properties of this type. Should be + * overridden for every type with properties. If implementations of + * @set_property don't emit property change notification explicitly, this will + * be done implicitly by the type system. However, if the notify signal is + * emitted explicitly, the type system will not emit it a second time. + * @get_property: the generic getter for all properties of this type. Should be + * overridden for every type with properties. + * @dispose: the @dispose function is supposed to drop all references to other + * objects, but keep the instance otherwise intact, so that client method + * invocations still work. It may be run multiple times (due to reference + * loops). Before returning, @dispose should chain up to the @dispose method + * of the parent class. + * @finalize: instance finalization function, should finish the finalization of + * the instance begun in @dispose and chain up to the @finalize method of the + * parent class. + * @dispatch_properties_changed: emits property change notification for a bunch + * of properties. Overriding @dispatch_properties_changed should be rarely + * needed. + * @notify: the class closure for the notify signal + * @constructed: the @constructed function is called by g_object_new() as the + * final step of the object creation process. At the point of the call, all + * construction properties have been set on the object. The purpose of this + * call is to allow for object initialisation steps that can only be performed + * after construction properties have been set. @constructed implementors + * should chain up to the @constructed call of their parent class to allow it + * to complete its initialisation. + * + * The class structure for the GObject type. + * + * |[<!-- language="C" --> + * // Example of implementing a singleton using a constructor. + * static MySingleton *the_singleton = NULL; + * + * static GObject* + * my_singleton_constructor (GType type, + * guint n_construct_params, + * GObjectConstructParam *construct_params) + * { + * GObject *object; + * + * if (!the_singleton) + * { + * object = G_OBJECT_CLASS (parent_class)->constructor (type, + * n_construct_params, + * construct_params); + * the_singleton = MY_SINGLETON (object); + * } + * else + * object = g_object_ref (G_OBJECT (the_singleton)); + * + * return object; + * } + * ]| + */ +struct _GObjectClass +{ + GTypeClass g_type_class; + + /*< private >*/ + GSList *construct_properties; + + /*< public >*/ + /* seldom overidden */ + GObject* (*constructor) (GType type, + guint n_construct_properties, + GObjectConstructParam *construct_properties); + /* overridable methods */ + void (*set_property) (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec); + void (*get_property) (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec); + void (*dispose) (GObject *object); + void (*finalize) (GObject *object); + /* seldom overidden */ + void (*dispatch_properties_changed) (GObject *object, + guint n_pspecs, + GParamSpec **pspecs); + /* signals */ + void (*notify) (GObject *object, + GParamSpec *pspec); + + /* called when done constructing */ + void (*constructed) (GObject *object); + + /*< private >*/ + gsize flags; + + /* padding */ + gpointer pdummy[6]; +}; +/** + * GObjectConstructParam: + * @pspec: the #GParamSpec of the construct parameter + * @value: the value to set the parameter to + * + * The GObjectConstructParam struct is an auxiliary + * structure used to hand #GParamSpec/#GValue pairs to the @constructor of + * a #GObjectClass. + */ +struct _GObjectConstructParam +{ + GParamSpec *pspec; + GValue *value; +}; + +/** + * GInitiallyUnowned: + * + * All the fields in the GInitiallyUnowned structure + * are private to the #GInitiallyUnowned implementation and should never be + * accessed directly. + */ +/** + * GInitiallyUnownedClass: + * + * The class structure for the GInitiallyUnowned type. + */ + + +/* --- prototypes --- */ +GLIB_AVAILABLE_IN_ALL +GType g_initially_unowned_get_type (void); +GLIB_AVAILABLE_IN_ALL +void g_object_class_install_property (GObjectClass *oclass, + guint property_id, + GParamSpec *pspec); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_object_class_find_property (GObjectClass *oclass, + const gchar *property_name); +GLIB_AVAILABLE_IN_ALL +GParamSpec**g_object_class_list_properties (GObjectClass *oclass, + guint *n_properties); +GLIB_AVAILABLE_IN_ALL +void g_object_class_override_property (GObjectClass *oclass, + guint property_id, + const gchar *name); +GLIB_AVAILABLE_IN_ALL +void g_object_class_install_properties (GObjectClass *oclass, + guint n_pspecs, + GParamSpec **pspecs); + +GLIB_AVAILABLE_IN_ALL +void g_object_interface_install_property (gpointer g_iface, + GParamSpec *pspec); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_object_interface_find_property (gpointer g_iface, + const gchar *property_name); +GLIB_AVAILABLE_IN_ALL +GParamSpec**g_object_interface_list_properties (gpointer g_iface, + guint *n_properties_p); + +GLIB_AVAILABLE_IN_ALL +GType g_object_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gpointer g_object_new (GType object_type, + const gchar *first_property_name, + ...); +GLIB_AVAILABLE_IN_2_54 +GObject* g_object_new_with_properties (GType object_type, + guint n_properties, + const char *names[], + const GValue values[]); +GLIB_DEPRECATED_IN_2_54_FOR(g_object_new_with_properties) +gpointer g_object_newv (GType object_type, + guint n_parameters, + GParameter *parameters); +GLIB_AVAILABLE_IN_ALL +GObject* g_object_new_valist (GType object_type, + const gchar *first_property_name, + va_list var_args); +GLIB_AVAILABLE_IN_ALL +void g_object_set (gpointer object, + const gchar *first_property_name, + ...) G_GNUC_NULL_TERMINATED; +GLIB_AVAILABLE_IN_ALL +void g_object_get (gpointer object, + const gchar *first_property_name, + ...) G_GNUC_NULL_TERMINATED; +GLIB_AVAILABLE_IN_ALL +gpointer g_object_connect (gpointer object, + const gchar *signal_spec, + ...) G_GNUC_NULL_TERMINATED; +GLIB_AVAILABLE_IN_ALL +void g_object_disconnect (gpointer object, + const gchar *signal_spec, + ...) G_GNUC_NULL_TERMINATED; +GLIB_AVAILABLE_IN_2_54 +void g_object_setv (GObject *object, + guint n_properties, + const gchar *names[], + const GValue values[]); +GLIB_AVAILABLE_IN_ALL +void g_object_set_valist (GObject *object, + const gchar *first_property_name, + va_list var_args); +GLIB_AVAILABLE_IN_2_54 +void g_object_getv (GObject *object, + guint n_properties, + const gchar *names[], + GValue values[]); +GLIB_AVAILABLE_IN_ALL +void g_object_get_valist (GObject *object, + const gchar *first_property_name, + va_list var_args); +GLIB_AVAILABLE_IN_ALL +void g_object_set_property (GObject *object, + const gchar *property_name, + const GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_object_get_property (GObject *object, + const gchar *property_name, + GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_object_freeze_notify (GObject *object); +GLIB_AVAILABLE_IN_ALL +void g_object_notify (GObject *object, + const gchar *property_name); +GLIB_AVAILABLE_IN_ALL +void g_object_notify_by_pspec (GObject *object, + GParamSpec *pspec); +GLIB_AVAILABLE_IN_ALL +void g_object_thaw_notify (GObject *object); +GLIB_AVAILABLE_IN_ALL +gboolean g_object_is_floating (gpointer object); +GLIB_AVAILABLE_IN_ALL +gpointer g_object_ref_sink (gpointer object); +GLIB_AVAILABLE_IN_ALL +gpointer g_object_ref (gpointer object); +GLIB_AVAILABLE_IN_ALL +void g_object_unref (gpointer object); +GLIB_AVAILABLE_IN_ALL +void g_object_weak_ref (GObject *object, + GWeakNotify notify, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_object_weak_unref (GObject *object, + GWeakNotify notify, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_object_add_weak_pointer (GObject *object, + gpointer *weak_pointer_location); +GLIB_AVAILABLE_IN_ALL +void g_object_remove_weak_pointer (GObject *object, + gpointer *weak_pointer_location); + +#if defined(__GNUC__) && !defined(__cplusplus) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_56 +/* Make reference APIs type safe with macros */ +#define g_object_ref(Obj) ((__typeof__(Obj)) (g_object_ref) (Obj)) +#define g_object_ref_sink(Obj) ((__typeof__(Obj)) (g_object_ref_sink) (Obj)) +#endif + +/** + * GToggleNotify: + * @data: Callback data passed to g_object_add_toggle_ref() + * @object: The object on which g_object_add_toggle_ref() was called. + * @is_last_ref: %TRUE if the toggle reference is now the + * last reference to the object. %FALSE if the toggle + * reference was the last reference and there are now other + * references. + * + * A callback function used for notification when the state + * of a toggle reference changes. See g_object_add_toggle_ref(). + */ +typedef void (*GToggleNotify) (gpointer data, + GObject *object, + gboolean is_last_ref); + +GLIB_AVAILABLE_IN_ALL +void g_object_add_toggle_ref (GObject *object, + GToggleNotify notify, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_object_remove_toggle_ref (GObject *object, + GToggleNotify notify, + gpointer data); + +GLIB_AVAILABLE_IN_ALL +gpointer g_object_get_qdata (GObject *object, + GQuark quark); +GLIB_AVAILABLE_IN_ALL +void g_object_set_qdata (GObject *object, + GQuark quark, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_object_set_qdata_full (GObject *object, + GQuark quark, + gpointer data, + GDestroyNotify destroy); +GLIB_AVAILABLE_IN_ALL +gpointer g_object_steal_qdata (GObject *object, + GQuark quark); + +GLIB_AVAILABLE_IN_2_34 +gpointer g_object_dup_qdata (GObject *object, + GQuark quark, + GDuplicateFunc dup_func, + gpointer user_data); +GLIB_AVAILABLE_IN_2_34 +gboolean g_object_replace_qdata (GObject *object, + GQuark quark, + gpointer oldval, + gpointer newval, + GDestroyNotify destroy, + GDestroyNotify *old_destroy); + +GLIB_AVAILABLE_IN_ALL +gpointer g_object_get_data (GObject *object, + const gchar *key); +GLIB_AVAILABLE_IN_ALL +void g_object_set_data (GObject *object, + const gchar *key, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_object_set_data_full (GObject *object, + const gchar *key, + gpointer data, + GDestroyNotify destroy); +GLIB_AVAILABLE_IN_ALL +gpointer g_object_steal_data (GObject *object, + const gchar *key); + +GLIB_AVAILABLE_IN_2_34 +gpointer g_object_dup_data (GObject *object, + const gchar *key, + GDuplicateFunc dup_func, + gpointer user_data); +GLIB_AVAILABLE_IN_2_34 +gboolean g_object_replace_data (GObject *object, + const gchar *key, + gpointer oldval, + gpointer newval, + GDestroyNotify destroy, + GDestroyNotify *old_destroy); + + +GLIB_AVAILABLE_IN_ALL +void g_object_watch_closure (GObject *object, + GClosure *closure); +GLIB_AVAILABLE_IN_ALL +GClosure* g_cclosure_new_object (GCallback callback_func, + GObject *object); +GLIB_AVAILABLE_IN_ALL +GClosure* g_cclosure_new_object_swap (GCallback callback_func, + GObject *object); +GLIB_AVAILABLE_IN_ALL +GClosure* g_closure_new_object (guint sizeof_closure, + GObject *object); +GLIB_AVAILABLE_IN_ALL +void g_value_set_object (GValue *value, + gpointer v_object); +GLIB_AVAILABLE_IN_ALL +gpointer g_value_get_object (const GValue *value); +GLIB_AVAILABLE_IN_ALL +gpointer g_value_dup_object (const GValue *value); +GLIB_AVAILABLE_IN_ALL +gulong g_signal_connect_object (gpointer instance, + const gchar *detailed_signal, + GCallback c_handler, + gpointer gobject, + GConnectFlags connect_flags); + +/*< protected >*/ +GLIB_AVAILABLE_IN_ALL +void g_object_force_floating (GObject *object); +GLIB_AVAILABLE_IN_ALL +void g_object_run_dispose (GObject *object); + + +GLIB_AVAILABLE_IN_ALL +void g_value_take_object (GValue *value, + gpointer v_object); +GLIB_DEPRECATED_FOR(g_value_take_object) +void g_value_set_object_take_ownership (GValue *value, + gpointer v_object); + +GLIB_DEPRECATED +gsize g_object_compat_control (gsize what, + gpointer data); + +/* --- implementation macros --- */ +#define G_OBJECT_WARN_INVALID_PSPEC(object, pname, property_id, pspec) \ +G_STMT_START { \ + GObject *_glib__object = (GObject*) (object); \ + GParamSpec *_glib__pspec = (GParamSpec*) (pspec); \ + guint _glib__property_id = (property_id); \ + g_warning ("%s:%d: invalid %s id %u for \"%s\" of type '%s' in '%s'", \ + __FILE__, __LINE__, \ + (pname), \ + _glib__property_id, \ + _glib__pspec->name, \ + g_type_name (G_PARAM_SPEC_TYPE (_glib__pspec)), \ + G_OBJECT_TYPE_NAME (_glib__object)); \ +} G_STMT_END +/** + * G_OBJECT_WARN_INVALID_PROPERTY_ID: + * @object: the #GObject on which set_property() or get_property() was called + * @property_id: the numeric id of the property + * @pspec: the #GParamSpec of the property + * + * This macro should be used to emit a standard warning about unexpected + * properties in set_property() and get_property() implementations. + */ +#define G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec) \ + G_OBJECT_WARN_INVALID_PSPEC ((object), "property", (property_id), (pspec)) + +GLIB_AVAILABLE_IN_ALL +void g_clear_object (volatile GObject **object_ptr); +#define g_clear_object(object_ptr) g_clear_pointer ((object_ptr), g_object_unref) + +/** + * g_set_object: (skip) + * @object_ptr: a pointer to a #GObject reference + * @new_object: (nullable) (transfer none): a pointer to the new #GObject to + * assign to it, or %NULL to clear the pointer + * + * Updates a #GObject pointer to refer to @new_object. It increments the + * reference count of @new_object (if non-%NULL), decrements the reference + * count of the current value of @object_ptr (if non-%NULL), and assigns + * @new_object to @object_ptr. The assignment is not atomic. + * + * @object_ptr must not be %NULL. + * + * A macro is also included that allows this function to be used without + * pointer casts. The function itself is static inline, so its address may vary + * between compilation units. + * + * One convenient usage of this function is in implementing property setters: + * |[ + * void + * foo_set_bar (Foo *foo, + * Bar *new_bar) + * { + * g_return_if_fail (IS_FOO (foo)); + * g_return_if_fail (new_bar == NULL || IS_BAR (new_bar)); + * + * if (g_set_object (&foo->bar, new_bar)) + * g_object_notify (foo, "bar"); + * } + * ]| + * + * Returns: %TRUE if the value of @object_ptr changed, %FALSE otherwise + * + * Since: 2.44 + */ +static inline gboolean +(g_set_object) (GObject **object_ptr, + GObject *new_object) +{ + GObject *old_object = *object_ptr; + + /* rely on g_object_[un]ref() to check the pointers are actually GObjects; + * elide a (object_ptr != NULL) check because most of the time we will be + * operating on struct members with a constant offset, so a NULL check would + * not catch bugs + */ + + if (old_object == new_object) + return FALSE; + + if (new_object != NULL) + g_object_ref (new_object); + + *object_ptr = new_object; + + if (old_object != NULL) + g_object_unref (old_object); + + return TRUE; +} + +#define g_set_object(object_ptr, new_object) \ + (/* Check types match. */ \ + 0 ? *(object_ptr) = (new_object), FALSE : \ + (g_set_object) ((GObject **) (object_ptr), (GObject *) (new_object)) \ + ) + +/** + * g_clear_weak_pointer: (skip) + * @weak_pointer_location: The memory address of a pointer + * + * Clears a weak reference to a #GObject. + * + * @weak_pointer_location must not be %NULL. + * + * If the weak reference is %NULL then this function does nothing. + * Otherwise, the weak reference to the object is removed for that location + * and the pointer is set to %NULL. + * + * A macro is also included that allows this function to be used without + * pointer casts. The function itself is static inline, so its address may vary + * between compilation units. + * + * Since: 2.56 + */ +static inline void +(g_clear_weak_pointer) (gpointer *weak_pointer_location) +{ + GObject *object = (GObject *) *weak_pointer_location; + + if (object != NULL) + { + g_object_remove_weak_pointer (object, weak_pointer_location); + *weak_pointer_location = NULL; + } +} + +#define g_clear_weak_pointer(weak_pointer_location) \ + (/* Check types match. */ \ + (g_clear_weak_pointer) ((gpointer *) (weak_pointer_location)) \ + ) + +/** + * g_set_weak_pointer: (skip) + * @weak_pointer_location: the memory address of a pointer + * @new_object: (nullable) (transfer none): a pointer to the new #GObject to + * assign to it, or %NULL to clear the pointer + * + * Updates a pointer to weakly refer to @new_object. It assigns @new_object + * to @weak_pointer_location and ensures that @weak_pointer_location will + * automaticaly be set to %NULL if @new_object gets destroyed. The assignment + * is not atomic. The weak reference is not thread-safe, see + * g_object_add_weak_pointer() for details. + * + * @weak_pointer_location must not be %NULL. + * + * A macro is also included that allows this function to be used without + * pointer casts. The function itself is static inline, so its address may vary + * between compilation units. + * + * One convenient usage of this function is in implementing property setters: + * |[ + * void + * foo_set_bar (Foo *foo, + * Bar *new_bar) + * { + * g_return_if_fail (IS_FOO (foo)); + * g_return_if_fail (new_bar == NULL || IS_BAR (new_bar)); + * + * if (g_set_weak_pointer (&foo->bar, new_bar)) + * g_object_notify (foo, "bar"); + * } + * ]| + * + * Returns: %TRUE if the value of @weak_pointer_location changed, %FALSE otherwise + * + * Since: 2.56 + */ +static inline gboolean +(g_set_weak_pointer) (gpointer *weak_pointer_location, + GObject *new_object) +{ + GObject *old_object = (GObject *) *weak_pointer_location; + + /* elide a (weak_pointer_location != NULL) check because most of the time we + * will be operating on struct members with a constant offset, so a NULL + * check would not catch bugs + */ + + if (old_object == new_object) + return FALSE; + + if (old_object != NULL) + g_object_remove_weak_pointer (old_object, weak_pointer_location); + + *weak_pointer_location = new_object; + + if (new_object != NULL) + g_object_add_weak_pointer (new_object, weak_pointer_location); + + return TRUE; +} + +#define g_set_weak_pointer(weak_pointer_location, new_object) \ + (/* Check types match. */ \ + 0 ? *(weak_pointer_location) = (new_object), FALSE : \ + (g_set_weak_pointer) ((gpointer *) (weak_pointer_location), (GObject *) (new_object)) \ + ) + +typedef struct { + /*<private>*/ + union { gpointer p; } priv; +} GWeakRef; + +GLIB_AVAILABLE_IN_ALL +void g_weak_ref_init (GWeakRef *weak_ref, + gpointer object); +GLIB_AVAILABLE_IN_ALL +void g_weak_ref_clear (GWeakRef *weak_ref); +GLIB_AVAILABLE_IN_ALL +gpointer g_weak_ref_get (GWeakRef *weak_ref); +GLIB_AVAILABLE_IN_ALL +void g_weak_ref_set (GWeakRef *weak_ref, + gpointer object); + +G_END_DECLS + +#endif /* __G_OBJECT_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gparam.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gparam.h new file mode 100755 index 00000000..535b9803 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gparam.h @@ -0,0 +1,454 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1997-1999, 2000-2001 Tim Janik and Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * gparam.h: GParamSpec base class implementation + */ +#ifndef __G_PARAM_H__ +#define __G_PARAM_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only <glib-object.h> can be included directly." +#endif + +#include <gobject/gvalue.h> + +G_BEGIN_DECLS + +/* --- standard type macros --- */ +/** + * G_TYPE_IS_PARAM: + * @type: a #GType ID + * + * Checks whether @type "is a" %G_TYPE_PARAM. + */ +#define G_TYPE_IS_PARAM(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_PARAM) +/** + * G_PARAM_SPEC: + * @pspec: a valid #GParamSpec + * + * Casts a derived #GParamSpec object (e.g. of type #GParamSpecInt) into + * a #GParamSpec object. + */ +#define G_PARAM_SPEC(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM, GParamSpec)) +/** + * G_IS_PARAM_SPEC: + * @pspec: a #GParamSpec + * + * Checks whether @pspec "is a" valid #GParamSpec structure of type %G_TYPE_PARAM + * or derived. + */ +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_42 +#define G_IS_PARAM_SPEC(pspec) (G_TYPE_CHECK_INSTANCE_FUNDAMENTAL_TYPE ((pspec), G_TYPE_PARAM)) +#else +#define G_IS_PARAM_SPEC(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM)) +#endif +/** + * G_PARAM_SPEC_CLASS: + * @pclass: a valid #GParamSpecClass + * + * Casts a derived #GParamSpecClass structure into a #GParamSpecClass structure. + */ +#define G_PARAM_SPEC_CLASS(pclass) (G_TYPE_CHECK_CLASS_CAST ((pclass), G_TYPE_PARAM, GParamSpecClass)) +/** + * G_IS_PARAM_SPEC_CLASS: + * @pclass: a #GParamSpecClass + * + * Checks whether @pclass "is a" valid #GParamSpecClass structure of type + * %G_TYPE_PARAM or derived. + */ +#define G_IS_PARAM_SPEC_CLASS(pclass) (G_TYPE_CHECK_CLASS_TYPE ((pclass), G_TYPE_PARAM)) +/** + * G_PARAM_SPEC_GET_CLASS: + * @pspec: a valid #GParamSpec + * + * Retrieves the #GParamSpecClass of a #GParamSpec. + */ +#define G_PARAM_SPEC_GET_CLASS(pspec) (G_TYPE_INSTANCE_GET_CLASS ((pspec), G_TYPE_PARAM, GParamSpecClass)) + + +/* --- convenience macros --- */ +/** + * G_PARAM_SPEC_TYPE: + * @pspec: a valid #GParamSpec + * + * Retrieves the #GType of this @pspec. + */ +#define G_PARAM_SPEC_TYPE(pspec) (G_TYPE_FROM_INSTANCE (pspec)) +/** + * G_PARAM_SPEC_TYPE_NAME: + * @pspec: a valid #GParamSpec + * + * Retrieves the #GType name of this @pspec. + */ +#define G_PARAM_SPEC_TYPE_NAME(pspec) (g_type_name (G_PARAM_SPEC_TYPE (pspec))) +/** + * G_PARAM_SPEC_VALUE_TYPE: + * @pspec: a valid #GParamSpec + * + * Retrieves the #GType to initialize a #GValue for this parameter. + */ +#define G_PARAM_SPEC_VALUE_TYPE(pspec) (G_PARAM_SPEC (pspec)->value_type) +/** + * G_VALUE_HOLDS_PARAM: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values derived from type %G_TYPE_PARAM. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_PARAM(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_PARAM)) + + +/* --- flags --- */ +/** + * GParamFlags: + * @G_PARAM_READABLE: the parameter is readable + * @G_PARAM_WRITABLE: the parameter is writable + * @G_PARAM_READWRITE: alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE + * @G_PARAM_CONSTRUCT: the parameter will be set upon object construction + * @G_PARAM_CONSTRUCT_ONLY: the parameter can only be set upon object construction + * @G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert()) + * strict validation is not required + * @G_PARAM_STATIC_NAME: the string used as name when constructing the + * parameter is guaranteed to remain valid and + * unmodified for the lifetime of the parameter. + * Since 2.8 + * @G_PARAM_STATIC_NICK: the string used as nick when constructing the + * parameter is guaranteed to remain valid and + * unmmodified for the lifetime of the parameter. + * Since 2.8 + * @G_PARAM_STATIC_BLURB: the string used as blurb when constructing the + * parameter is guaranteed to remain valid and + * unmodified for the lifetime of the parameter. + * Since 2.8 + * @G_PARAM_EXPLICIT_NOTIFY: calls to g_object_set_property() for this + * property will not automatically result in a "notify" signal being + * emitted: the implementation must call g_object_notify() themselves + * in case the property actually changes. Since: 2.42. + * @G_PARAM_PRIVATE: internal + * @G_PARAM_DEPRECATED: the parameter is deprecated and will be removed + * in a future version. A warning will be generated if it is used + * while running with G_ENABLE_DIAGNOSTIC=1. + * Since 2.26 + * + * Through the #GParamFlags flag values, certain aspects of parameters + * can be configured. See also #G_PARAM_STATIC_STRINGS. + */ +typedef enum +{ + G_PARAM_READABLE = 1 << 0, + G_PARAM_WRITABLE = 1 << 1, + G_PARAM_READWRITE = (G_PARAM_READABLE | G_PARAM_WRITABLE), + G_PARAM_CONSTRUCT = 1 << 2, + G_PARAM_CONSTRUCT_ONLY = 1 << 3, + G_PARAM_LAX_VALIDATION = 1 << 4, + G_PARAM_STATIC_NAME = 1 << 5, +#ifndef G_DISABLE_DEPRECATED + G_PARAM_PRIVATE = G_PARAM_STATIC_NAME, +#endif + G_PARAM_STATIC_NICK = 1 << 6, + G_PARAM_STATIC_BLURB = 1 << 7, + /* User defined flags go here */ + G_PARAM_EXPLICIT_NOTIFY = 1 << 30, + /* Avoid warning with -Wpedantic for gcc6 */ + G_PARAM_DEPRECATED = (gint)(1u << 31) +} GParamFlags; + +/** + * G_PARAM_STATIC_STRINGS: + * + * #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB. + * + * Since 2.13.0 + */ +#define G_PARAM_STATIC_STRINGS (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB) +/* bits in the range 0xffffff00 are reserved for 3rd party usage */ +/** + * G_PARAM_MASK: + * + * Mask containing the bits of #GParamSpec.flags which are reserved for GLib. + */ +#define G_PARAM_MASK (0x000000ff) +/** + * G_PARAM_USER_SHIFT: + * + * Minimum shift count to be used for user defined flags, to be stored in + * #GParamSpec.flags. The maximum allowed is 10. + */ +#define G_PARAM_USER_SHIFT (8) + +/* --- typedefs & structures --- */ +typedef struct _GParamSpec GParamSpec; +typedef struct _GParamSpecClass GParamSpecClass; +typedef struct _GParameter GParameter; +typedef struct _GParamSpecPool GParamSpecPool; +/** + * GParamSpec: (ref-func g_param_spec_ref_sink) (unref-func g_param_spec_uref) (set-value-func g_value_set_param) (get-value-func g_value_get_param) + * @g_type_instance: private #GTypeInstance portion + * @name: name of this parameter: always an interned string + * @flags: #GParamFlags flags for this parameter + * @value_type: the #GValue type for this parameter + * @owner_type: #GType type that uses (introduces) this parameter + * + * All other fields of the GParamSpec struct are private and + * should not be used directly. + */ +struct _GParamSpec +{ + GTypeInstance g_type_instance; + + const gchar *name; /* interned string */ + GParamFlags flags; + GType value_type; + GType owner_type; /* class or interface using this property */ + + /*< private >*/ + gchar *_nick; + gchar *_blurb; + GData *qdata; + guint ref_count; + guint param_id; /* sort-criteria */ +}; +/** + * GParamSpecClass: + * @g_type_class: the parent class + * @value_type: the #GValue type for this parameter + * @finalize: The instance finalization function (optional), should chain + * up to the finalize method of the parent class. + * @value_set_default: Resets a @value to the default value for this type + * (recommended, the default is g_value_reset()), see + * g_param_value_set_default(). + * @value_validate: Ensures that the contents of @value comply with the + * specifications set out by this type (optional), see + * g_param_value_validate(). + * @values_cmp: Compares @value1 with @value2 according to this type + * (recommended, the default is memcmp()), see g_param_values_cmp(). + * + * The class structure for the GParamSpec type. + * Normally, GParamSpec classes are filled by + * g_param_type_register_static(). + */ +struct _GParamSpecClass +{ + GTypeClass g_type_class; + + GType value_type; + + void (*finalize) (GParamSpec *pspec); + + /* GParam methods */ + void (*value_set_default) (GParamSpec *pspec, + GValue *value); + gboolean (*value_validate) (GParamSpec *pspec, + GValue *value); + gint (*values_cmp) (GParamSpec *pspec, + const GValue *value1, + const GValue *value2); + /*< private >*/ + gpointer dummy[4]; +}; +/** + * GParameter: + * @name: the parameter name + * @value: the parameter value + * + * The GParameter struct is an auxiliary structure used + * to hand parameter name/value pairs to g_object_newv(). + * + * Deprecated: 2.54: This type is not introspectable. + */ +struct _GParameter /* auxiliary structure for _setv() variants */ +{ + const gchar *name; + GValue value; +}; + + +/* --- prototypes --- */ +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_ref (GParamSpec *pspec); +GLIB_AVAILABLE_IN_ALL +void g_param_spec_unref (GParamSpec *pspec); +GLIB_AVAILABLE_IN_ALL +void g_param_spec_sink (GParamSpec *pspec); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_ref_sink (GParamSpec *pspec); +GLIB_AVAILABLE_IN_ALL +gpointer g_param_spec_get_qdata (GParamSpec *pspec, + GQuark quark); +GLIB_AVAILABLE_IN_ALL +void g_param_spec_set_qdata (GParamSpec *pspec, + GQuark quark, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_param_spec_set_qdata_full (GParamSpec *pspec, + GQuark quark, + gpointer data, + GDestroyNotify destroy); +GLIB_AVAILABLE_IN_ALL +gpointer g_param_spec_steal_qdata (GParamSpec *pspec, + GQuark quark); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_get_redirect_target (GParamSpec *pspec); + +GLIB_AVAILABLE_IN_ALL +void g_param_value_set_default (GParamSpec *pspec, + GValue *value); +GLIB_AVAILABLE_IN_ALL +gboolean g_param_value_defaults (GParamSpec *pspec, + GValue *value); +GLIB_AVAILABLE_IN_ALL +gboolean g_param_value_validate (GParamSpec *pspec, + GValue *value); +GLIB_AVAILABLE_IN_ALL +gboolean g_param_value_convert (GParamSpec *pspec, + const GValue *src_value, + GValue *dest_value, + gboolean strict_validation); +GLIB_AVAILABLE_IN_ALL +gint g_param_values_cmp (GParamSpec *pspec, + const GValue *value1, + const GValue *value2); +GLIB_AVAILABLE_IN_ALL +const gchar * g_param_spec_get_name (GParamSpec *pspec); +GLIB_AVAILABLE_IN_ALL +const gchar * g_param_spec_get_nick (GParamSpec *pspec); +GLIB_AVAILABLE_IN_ALL +const gchar * g_param_spec_get_blurb (GParamSpec *pspec); +GLIB_AVAILABLE_IN_ALL +void g_value_set_param (GValue *value, + GParamSpec *param); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_value_get_param (const GValue *value); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_value_dup_param (const GValue *value); + + +GLIB_AVAILABLE_IN_ALL +void g_value_take_param (GValue *value, + GParamSpec *param); +GLIB_DEPRECATED_FOR(g_value_take_param) +void g_value_set_param_take_ownership (GValue *value, + GParamSpec *param); +GLIB_AVAILABLE_IN_2_36 +const GValue * g_param_spec_get_default_value (GParamSpec *pspec); + +GLIB_AVAILABLE_IN_2_46 +GQuark g_param_spec_get_name_quark (GParamSpec *pspec); + +/* --- convenience functions --- */ +typedef struct _GParamSpecTypeInfo GParamSpecTypeInfo; +/** + * GParamSpecTypeInfo: + * @instance_size: Size of the instance (object) structure. + * @n_preallocs: Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the [slice allocator][glib-Memory-Slices] now. + * @instance_init: Location of the instance initialization function (optional). + * @value_type: The #GType of values conforming to this #GParamSpec + * @finalize: The instance finalization function (optional). + * @value_set_default: Resets a @value to the default value for @pspec + * (recommended, the default is g_value_reset()), see + * g_param_value_set_default(). + * @value_validate: Ensures that the contents of @value comply with the + * specifications set out by @pspec (optional), see + * g_param_value_validate(). + * @values_cmp: Compares @value1 with @value2 according to @pspec + * (recommended, the default is memcmp()), see g_param_values_cmp(). + * + * This structure is used to provide the type system with the information + * required to initialize and destruct (finalize) a parameter's class and + * instances thereof. + * The initialized structure is passed to the g_param_type_register_static() + * The type system will perform a deep copy of this structure, so its memory + * does not need to be persistent across invocation of + * g_param_type_register_static(). + */ +struct _GParamSpecTypeInfo +{ + /* type system portion */ + guint16 instance_size; /* obligatory */ + guint16 n_preallocs; /* optional */ + void (*instance_init) (GParamSpec *pspec); /* optional */ + + /* class portion */ + GType value_type; /* obligatory */ + void (*finalize) (GParamSpec *pspec); /* optional */ + void (*value_set_default) (GParamSpec *pspec, /* recommended */ + GValue *value); + gboolean (*value_validate) (GParamSpec *pspec, /* optional */ + GValue *value); + gint (*values_cmp) (GParamSpec *pspec, /* recommended */ + const GValue *value1, + const GValue *value2); +}; +GLIB_AVAILABLE_IN_ALL +GType g_param_type_register_static (const gchar *name, + const GParamSpecTypeInfo *pspec_info); + +/* For registering builting types */ +GType _g_param_type_register_static_constant (const gchar *name, + const GParamSpecTypeInfo *pspec_info, + GType opt_type); + + +/* --- protected --- */ +GLIB_AVAILABLE_IN_ALL +gpointer g_param_spec_internal (GType param_type, + const gchar *name, + const gchar *nick, + const gchar *blurb, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpecPool* g_param_spec_pool_new (gboolean type_prefixing); +GLIB_AVAILABLE_IN_ALL +void g_param_spec_pool_insert (GParamSpecPool *pool, + GParamSpec *pspec, + GType owner_type); +GLIB_AVAILABLE_IN_ALL +void g_param_spec_pool_remove (GParamSpecPool *pool, + GParamSpec *pspec); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_pool_lookup (GParamSpecPool *pool, + const gchar *param_name, + GType owner_type, + gboolean walk_ancestors); +GLIB_AVAILABLE_IN_ALL +GList* g_param_spec_pool_list_owned (GParamSpecPool *pool, + GType owner_type); +GLIB_AVAILABLE_IN_ALL +GParamSpec** g_param_spec_pool_list (GParamSpecPool *pool, + GType owner_type, + guint *n_pspecs_p); + + +/* contracts: + * + * gboolean value_validate (GParamSpec *pspec, + * GValue *value): + * modify value contents in the least destructive way, so + * that it complies with pspec's requirements (i.e. + * according to minimum/maximum ranges etc...). return + * whether modification was necessary. + * + * gint values_cmp (GParamSpec *pspec, + * const GValue *value1, + * const GValue *value2): + * return value1 - value2, i.e. (-1) if value1 < value2, + * (+1) if value1 > value2, and (0) otherwise (equality) + */ + +G_END_DECLS + +#endif /* __G_PARAM_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gparamspecs.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gparamspecs.h new file mode 100755 index 00000000..e2bb6213 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gparamspecs.h @@ -0,0 +1,1164 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1997-1999, 2000-2001 Tim Janik and Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * gparamspecs.h: GLib default param specs + */ +#ifndef __G_PARAMSPECS_H__ +#define __G_PARAMSPECS_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only <glib-object.h> can be included directly." +#endif + +#include <gobject/gvalue.h> +#include <gobject/genums.h> +#include <gobject/gboxed.h> +#include <gobject/gobject.h> + +G_BEGIN_DECLS + +/* --- type macros --- */ +/** + * G_TYPE_PARAM_CHAR: + * + * The #GType of #GParamSpecChar. + */ +#define G_TYPE_PARAM_CHAR (g_param_spec_types[0]) +/** + * G_IS_PARAM_SPEC_CHAR: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_CHAR)) +/** + * G_PARAM_SPEC_CHAR: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecChar. + */ +#define G_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_CHAR, GParamSpecChar)) + +/** + * G_TYPE_PARAM_UCHAR: + * + * The #GType of #GParamSpecUChar. + */ +#define G_TYPE_PARAM_UCHAR (g_param_spec_types[1]) +/** + * G_IS_PARAM_SPEC_UCHAR: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UCHAR)) +/** + * G_PARAM_SPEC_UCHAR: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecUChar. + */ +#define G_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UCHAR, GParamSpecUChar)) + +/** + * G_TYPE_PARAM_BOOLEAN: + * + * The #GType of #GParamSpecBoolean. + */ +#define G_TYPE_PARAM_BOOLEAN (g_param_spec_types[2]) +/** + * G_IS_PARAM_SPEC_BOOLEAN: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOOLEAN)) +/** + * G_PARAM_SPEC_BOOLEAN: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecBoolean. + */ +#define G_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOOLEAN, GParamSpecBoolean)) + +/** + * G_TYPE_PARAM_INT: + * + * The #GType of #GParamSpecInt. + */ +#define G_TYPE_PARAM_INT (g_param_spec_types[3]) +/** + * G_IS_PARAM_SPEC_INT: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT)) +/** + * G_PARAM_SPEC_INT: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecInt. + */ +#define G_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT, GParamSpecInt)) + +/** + * G_TYPE_PARAM_UINT: + * + * The #GType of #GParamSpecUInt. + */ +#define G_TYPE_PARAM_UINT (g_param_spec_types[4]) +/** + * G_IS_PARAM_SPEC_UINT: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT)) +/** + * G_PARAM_SPEC_UINT: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecUInt. + */ +#define G_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT, GParamSpecUInt)) + +/** + * G_TYPE_PARAM_LONG: + * + * The #GType of #GParamSpecLong. + */ +#define G_TYPE_PARAM_LONG (g_param_spec_types[5]) +/** + * G_IS_PARAM_SPEC_LONG: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_LONG)) +/** + * G_PARAM_SPEC_LONG: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecLong. + */ +#define G_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_LONG, GParamSpecLong)) + +/** + * G_TYPE_PARAM_ULONG: + * + * The #GType of #GParamSpecULong. + */ +#define G_TYPE_PARAM_ULONG (g_param_spec_types[6]) +/** + * G_IS_PARAM_SPEC_ULONG: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ULONG)) +/** + * G_PARAM_SPEC_ULONG: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecULong. + */ +#define G_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ULONG, GParamSpecULong)) + +/** + * G_TYPE_PARAM_INT64: + * + * The #GType of #GParamSpecInt64. + */ +#define G_TYPE_PARAM_INT64 (g_param_spec_types[7]) +/** + * G_IS_PARAM_SPEC_INT64: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT64)) +/** + * G_PARAM_SPEC_INT64: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecInt64. + */ +#define G_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT64, GParamSpecInt64)) + +/** + * G_TYPE_PARAM_UINT64: + * + * The #GType of #GParamSpecUInt64. + */ +#define G_TYPE_PARAM_UINT64 (g_param_spec_types[8]) +/** + * G_IS_PARAM_SPEC_UINT64: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT64)) +/** + * G_PARAM_SPEC_UINT64: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecUInt64. + */ +#define G_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT64, GParamSpecUInt64)) + +/** + * G_TYPE_PARAM_UNICHAR: + * + * The #GType of #GParamSpecUnichar. + */ +#define G_TYPE_PARAM_UNICHAR (g_param_spec_types[9]) +/** + * G_PARAM_SPEC_UNICHAR: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecUnichar. + */ +#define G_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UNICHAR, GParamSpecUnichar)) +/** + * G_IS_PARAM_SPEC_UNICHAR: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UNICHAR)) + +/** + * G_TYPE_PARAM_ENUM: + * + * The #GType of #GParamSpecEnum. + */ +#define G_TYPE_PARAM_ENUM (g_param_spec_types[10]) +/** + * G_IS_PARAM_SPEC_ENUM: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ENUM)) +/** + * G_PARAM_SPEC_ENUM: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecEnum. + */ +#define G_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ENUM, GParamSpecEnum)) + +/** + * G_TYPE_PARAM_FLAGS: + * + * The #GType of #GParamSpecFlags. + */ +#define G_TYPE_PARAM_FLAGS (g_param_spec_types[11]) +/** + * G_IS_PARAM_SPEC_FLAGS: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLAGS)) +/** + * G_PARAM_SPEC_FLAGS: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecFlags. + */ +#define G_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLAGS, GParamSpecFlags)) + +/** + * G_TYPE_PARAM_FLOAT: + * + * The #GType of #GParamSpecFloat. + */ +#define G_TYPE_PARAM_FLOAT (g_param_spec_types[12]) +/** + * G_IS_PARAM_SPEC_FLOAT: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLOAT)) +/** + * G_PARAM_SPEC_FLOAT: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecFloat. + */ +#define G_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLOAT, GParamSpecFloat)) + +/** + * G_TYPE_PARAM_DOUBLE: + * + * The #GType of #GParamSpecDouble. + */ +#define G_TYPE_PARAM_DOUBLE (g_param_spec_types[13]) +/** + * G_IS_PARAM_SPEC_DOUBLE: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_DOUBLE)) +/** + * G_PARAM_SPEC_DOUBLE: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecDouble. + */ +#define G_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_DOUBLE, GParamSpecDouble)) + +/** + * G_TYPE_PARAM_STRING: + * + * The #GType of #GParamSpecString. + */ +#define G_TYPE_PARAM_STRING (g_param_spec_types[14]) +/** + * G_IS_PARAM_SPEC_STRING: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_STRING)) +/** + * G_PARAM_SPEC_STRING: + * @pspec: a valid #GParamSpec instance + * + * Casts a #GParamSpec instance into a #GParamSpecString. + */ +#define G_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_STRING, GParamSpecString)) + +/** + * G_TYPE_PARAM_PARAM: + * + * The #GType of #GParamSpecParam. + */ +#define G_TYPE_PARAM_PARAM (g_param_spec_types[15]) +/** + * G_IS_PARAM_SPEC_PARAM: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_PARAM)) +/** + * G_PARAM_SPEC_PARAM: + * @pspec: a valid #GParamSpec instance + * + * Casts a #GParamSpec instance into a #GParamSpecParam. + */ +#define G_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_PARAM, GParamSpecParam)) + +/** + * G_TYPE_PARAM_BOXED: + * + * The #GType of #GParamSpecBoxed. + */ +#define G_TYPE_PARAM_BOXED (g_param_spec_types[16]) +/** + * G_IS_PARAM_SPEC_BOXED: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOXED)) +/** + * G_PARAM_SPEC_BOXED: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecBoxed. + */ +#define G_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOXED, GParamSpecBoxed)) + +/** + * G_TYPE_PARAM_POINTER: + * + * The #GType of #GParamSpecPointer. + */ +#define G_TYPE_PARAM_POINTER (g_param_spec_types[17]) +/** + * G_IS_PARAM_SPEC_POINTER: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_POINTER)) +/** + * G_PARAM_SPEC_POINTER: + * @pspec: a valid #GParamSpec instance + * + * Casts a #GParamSpec instance into a #GParamSpecPointer. + */ +#define G_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_POINTER, GParamSpecPointer)) + +/** + * G_TYPE_PARAM_VALUE_ARRAY: + * + * The #GType of #GParamSpecValueArray. + * + * Deprecated: 2.32: Use #GArray instead of #GValueArray + */ +#define G_TYPE_PARAM_VALUE_ARRAY (g_param_spec_types[18]) +/** + * G_IS_PARAM_SPEC_VALUE_ARRAY: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY. + * + * Returns: %TRUE on success. + * + * Deprecated: 2.32: Use #GArray instead of #GValueArray + */ +#define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY)) +/** + * G_PARAM_SPEC_VALUE_ARRAY: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecValueArray. + * + * Deprecated: 2.32: Use #GArray instead of #GValueArray + */ +#define G_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray)) + +/** + * G_TYPE_PARAM_OBJECT: + * + * The #GType of #GParamSpecObject. + */ +#define G_TYPE_PARAM_OBJECT (g_param_spec_types[19]) +/** + * G_IS_PARAM_SPEC_OBJECT: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OBJECT)) +/** + * G_PARAM_SPEC_OBJECT: + * @pspec: a valid #GParamSpec instance + * + * Casts a #GParamSpec instance into a #GParamSpecObject. + */ +#define G_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OBJECT, GParamSpecObject)) + +/** + * G_TYPE_PARAM_OVERRIDE: + * + * The #GType of #GParamSpecOverride. + * + * Since: 2.4 + */ +#define G_TYPE_PARAM_OVERRIDE (g_param_spec_types[20]) +/** + * G_IS_PARAM_SPEC_OVERRIDE: + * @pspec: a #GParamSpec + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE. + * + * Since: 2.4 + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OVERRIDE)) +/** + * G_PARAM_SPEC_OVERRIDE: + * @pspec: a #GParamSpec + * + * Casts a #GParamSpec into a #GParamSpecOverride. + * + * Since: 2.4 + */ +#define G_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OVERRIDE, GParamSpecOverride)) + +/** + * G_TYPE_PARAM_GTYPE: + * + * The #GType of #GParamSpecGType. + * + * Since: 2.10 + */ +#define G_TYPE_PARAM_GTYPE (g_param_spec_types[21]) +/** + * G_IS_PARAM_SPEC_GTYPE: + * @pspec: a #GParamSpec + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE. + * + * Since: 2.10 + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_GTYPE)) +/** + * G_PARAM_SPEC_GTYPE: + * @pspec: a #GParamSpec + * + * Casts a #GParamSpec into a #GParamSpecGType. + * + * Since: 2.10 + */ +#define G_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_GTYPE, GParamSpecGType)) + +/** + * G_TYPE_PARAM_VARIANT: + * + * The #GType of #GParamSpecVariant. + * + * Since: 2.26 + */ +#define G_TYPE_PARAM_VARIANT (g_param_spec_types[22]) +/** + * G_IS_PARAM_SPEC_VARIANT: + * @pspec: a #GParamSpec + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT. + * + * Returns: %TRUE on success + * + * Since: 2.26 + */ +#define G_IS_PARAM_SPEC_VARIANT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VARIANT)) +/** + * G_PARAM_SPEC_VARIANT: + * @pspec: a #GParamSpec + * + * Casts a #GParamSpec into a #GParamSpecVariant. + * + * Since: 2.26 + */ +#define G_PARAM_SPEC_VARIANT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VARIANT, GParamSpecVariant)) + +/* --- typedefs & structures --- */ +typedef struct _GParamSpecChar GParamSpecChar; +typedef struct _GParamSpecUChar GParamSpecUChar; +typedef struct _GParamSpecBoolean GParamSpecBoolean; +typedef struct _GParamSpecInt GParamSpecInt; +typedef struct _GParamSpecUInt GParamSpecUInt; +typedef struct _GParamSpecLong GParamSpecLong; +typedef struct _GParamSpecULong GParamSpecULong; +typedef struct _GParamSpecInt64 GParamSpecInt64; +typedef struct _GParamSpecUInt64 GParamSpecUInt64; +typedef struct _GParamSpecUnichar GParamSpecUnichar; +typedef struct _GParamSpecEnum GParamSpecEnum; +typedef struct _GParamSpecFlags GParamSpecFlags; +typedef struct _GParamSpecFloat GParamSpecFloat; +typedef struct _GParamSpecDouble GParamSpecDouble; +typedef struct _GParamSpecString GParamSpecString; +typedef struct _GParamSpecParam GParamSpecParam; +typedef struct _GParamSpecBoxed GParamSpecBoxed; +typedef struct _GParamSpecPointer GParamSpecPointer; +typedef struct _GParamSpecValueArray GParamSpecValueArray; +typedef struct _GParamSpecObject GParamSpecObject; +typedef struct _GParamSpecOverride GParamSpecOverride; +typedef struct _GParamSpecGType GParamSpecGType; +typedef struct _GParamSpecVariant GParamSpecVariant; + +/** + * GParamSpecChar: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for character properties. + */ +struct _GParamSpecChar +{ + GParamSpec parent_instance; + + gint8 minimum; + gint8 maximum; + gint8 default_value; +}; +/** + * GParamSpecUChar: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for unsigned character properties. + */ +struct _GParamSpecUChar +{ + GParamSpec parent_instance; + + guint8 minimum; + guint8 maximum; + guint8 default_value; +}; +/** + * GParamSpecBoolean: + * @parent_instance: private #GParamSpec portion + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for boolean properties. + */ +struct _GParamSpecBoolean +{ + GParamSpec parent_instance; + + gboolean default_value; +}; +/** + * GParamSpecInt: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for integer properties. + */ +struct _GParamSpecInt +{ + GParamSpec parent_instance; + + gint minimum; + gint maximum; + gint default_value; +}; +/** + * GParamSpecUInt: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for unsigned integer properties. + */ +struct _GParamSpecUInt +{ + GParamSpec parent_instance; + + guint minimum; + guint maximum; + guint default_value; +}; +/** + * GParamSpecLong: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for long integer properties. + */ +struct _GParamSpecLong +{ + GParamSpec parent_instance; + + glong minimum; + glong maximum; + glong default_value; +}; +/** + * GParamSpecULong: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties. + */ +struct _GParamSpecULong +{ + GParamSpec parent_instance; + + gulong minimum; + gulong maximum; + gulong default_value; +}; +/** + * GParamSpecInt64: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for 64bit integer properties. + */ +struct _GParamSpecInt64 +{ + GParamSpec parent_instance; + + gint64 minimum; + gint64 maximum; + gint64 default_value; +}; +/** + * GParamSpecUInt64: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties. + */ +struct _GParamSpecUInt64 +{ + GParamSpec parent_instance; + + guint64 minimum; + guint64 maximum; + guint64 default_value; +}; +/** + * GParamSpecUnichar: + * @parent_instance: private #GParamSpec portion + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties. + */ +struct _GParamSpecUnichar +{ + GParamSpec parent_instance; + + gunichar default_value; +}; +/** + * GParamSpecEnum: + * @parent_instance: private #GParamSpec portion + * @enum_class: the #GEnumClass for the enum + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for enum + * properties. + */ +struct _GParamSpecEnum +{ + GParamSpec parent_instance; + + GEnumClass *enum_class; + gint default_value; +}; +/** + * GParamSpecFlags: + * @parent_instance: private #GParamSpec portion + * @flags_class: the #GFlagsClass for the flags + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for flags + * properties. + */ +struct _GParamSpecFlags +{ + GParamSpec parent_instance; + + GFlagsClass *flags_class; + guint default_value; +}; +/** + * GParamSpecFloat: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * @epsilon: values closer than @epsilon will be considered identical + * by g_param_values_cmp(); the default value is 1e-30. + * + * A #GParamSpec derived structure that contains the meta data for float properties. + */ +struct _GParamSpecFloat +{ + GParamSpec parent_instance; + + gfloat minimum; + gfloat maximum; + gfloat default_value; + gfloat epsilon; +}; +/** + * GParamSpecDouble: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * @epsilon: values closer than @epsilon will be considered identical + * by g_param_values_cmp(); the default value is 1e-90. + * + * A #GParamSpec derived structure that contains the meta data for double properties. + */ +struct _GParamSpecDouble +{ + GParamSpec parent_instance; + + gdouble minimum; + gdouble maximum; + gdouble default_value; + gdouble epsilon; +}; +/** + * GParamSpecString: + * @parent_instance: private #GParamSpec portion + * @default_value: default value for the property specified + * @cset_first: a string containing the allowed values for the first byte + * @cset_nth: a string containing the allowed values for the subsequent bytes + * @substitutor: the replacement byte for bytes which don't match @cset_first or @cset_nth. + * @null_fold_if_empty: replace empty string by %NULL + * @ensure_non_null: replace %NULL strings by an empty string + * + * A #GParamSpec derived structure that contains the meta data for string + * properties. + */ +struct _GParamSpecString +{ + GParamSpec parent_instance; + + gchar *default_value; + gchar *cset_first; + gchar *cset_nth; + gchar substitutor; + guint null_fold_if_empty : 1; + guint ensure_non_null : 1; +}; +/** + * GParamSpecParam: + * @parent_instance: private #GParamSpec portion + * + * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM + * properties. + */ +struct _GParamSpecParam +{ + GParamSpec parent_instance; +}; +/** + * GParamSpecBoxed: + * @parent_instance: private #GParamSpec portion + * + * A #GParamSpec derived structure that contains the meta data for boxed properties. + */ +struct _GParamSpecBoxed +{ + GParamSpec parent_instance; +}; +/** + * GParamSpecPointer: + * @parent_instance: private #GParamSpec portion + * + * A #GParamSpec derived structure that contains the meta data for pointer properties. + */ +struct _GParamSpecPointer +{ + GParamSpec parent_instance; +}; +/** + * GParamSpecValueArray: + * @parent_instance: private #GParamSpec portion + * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL + * @fixed_n_elements: if greater than 0, arrays of this property will always have this many elements + * + * A #GParamSpec derived structure that contains the meta data for #GValueArray properties. + */ +struct _GParamSpecValueArray +{ + GParamSpec parent_instance; + GParamSpec *element_spec; + guint fixed_n_elements; +}; +/** + * GParamSpecObject: + * @parent_instance: private #GParamSpec portion + * + * A #GParamSpec derived structure that contains the meta data for object properties. + */ +struct _GParamSpecObject +{ + GParamSpec parent_instance; +}; +/** + * GParamSpecOverride: + * + * This is a type of #GParamSpec type that simply redirects operations to + * another paramspec. All operations other than getting or + * setting the value are redirected, including accessing the nick and + * blurb, validating a value, and so forth. See + * g_param_spec_get_redirect_target() for retrieving the overidden + * property. #GParamSpecOverride is used in implementing + * g_object_class_override_property(), and will not be directly useful + * unless you are implementing a new base type similar to GObject. + * + * Since: 2.4 + */ +struct _GParamSpecOverride +{ + /*< private >*/ + GParamSpec parent_instance; + GParamSpec *overridden; +}; +/** + * GParamSpecGType: + * @parent_instance: private #GParamSpec portion + * @is_a_type: a #GType whose subtypes can occur as values + * + * A #GParamSpec derived structure that contains the meta data for #GType properties. + * + * Since: 2.10 + */ +struct _GParamSpecGType +{ + GParamSpec parent_instance; + GType is_a_type; +}; +/** + * GParamSpecVariant: + * @parent_instance: private #GParamSpec portion + * @type: a #GVariantType, or %NULL + * @default_value: a #GVariant, or %NULL + * + * A #GParamSpec derived structure that contains the meta data for #GVariant properties. + * + * Since: 2.26 + */ +struct _GParamSpecVariant +{ + GParamSpec parent_instance; + GVariantType *type; + GVariant *default_value; + + /*< private >*/ + gpointer padding[4]; +}; + +/* --- GParamSpec prototypes --- */ +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_char (const gchar *name, + const gchar *nick, + const gchar *blurb, + gint8 minimum, + gint8 maximum, + gint8 default_value, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_uchar (const gchar *name, + const gchar *nick, + const gchar *blurb, + guint8 minimum, + guint8 maximum, + guint8 default_value, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_boolean (const gchar *name, + const gchar *nick, + const gchar *blurb, + gboolean default_value, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_int (const gchar *name, + const gchar *nick, + const gchar *blurb, + gint minimum, + gint maximum, + gint default_value, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_uint (const gchar *name, + const gchar *nick, + const gchar *blurb, + guint minimum, + guint maximum, + guint default_value, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_long (const gchar *name, + const gchar *nick, + const gchar *blurb, + glong minimum, + glong maximum, + glong default_value, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_ulong (const gchar *name, + const gchar *nick, + const gchar *blurb, + gulong minimum, + gulong maximum, + gulong default_value, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_int64 (const gchar *name, + const gchar *nick, + const gchar *blurb, + gint64 minimum, + gint64 maximum, + gint64 default_value, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_uint64 (const gchar *name, + const gchar *nick, + const gchar *blurb, + guint64 minimum, + guint64 maximum, + guint64 default_value, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_unichar (const gchar *name, + const gchar *nick, + const gchar *blurb, + gunichar default_value, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_enum (const gchar *name, + const gchar *nick, + const gchar *blurb, + GType enum_type, + gint default_value, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_flags (const gchar *name, + const gchar *nick, + const gchar *blurb, + GType flags_type, + guint default_value, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_float (const gchar *name, + const gchar *nick, + const gchar *blurb, + gfloat minimum, + gfloat maximum, + gfloat default_value, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_double (const gchar *name, + const gchar *nick, + const gchar *blurb, + gdouble minimum, + gdouble maximum, + gdouble default_value, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_string (const gchar *name, + const gchar *nick, + const gchar *blurb, + const gchar *default_value, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_param (const gchar *name, + const gchar *nick, + const gchar *blurb, + GType param_type, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_boxed (const gchar *name, + const gchar *nick, + const gchar *blurb, + GType boxed_type, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_pointer (const gchar *name, + const gchar *nick, + const gchar *blurb, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_value_array (const gchar *name, + const gchar *nick, + const gchar *blurb, + GParamSpec *element_spec, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_object (const gchar *name, + const gchar *nick, + const gchar *blurb, + GType object_type, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_override (const gchar *name, + GParamSpec *overridden); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_gtype (const gchar *name, + const gchar *nick, + const gchar *blurb, + GType is_a_type, + GParamFlags flags); +GLIB_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_variant (const gchar *name, + const gchar *nick, + const gchar *blurb, + const GVariantType *type, + GVariant *default_value, + GParamFlags flags); + +/* --- internal --- */ +/* We prefix variable declarations so they can + * properly get exported in windows dlls. + */ +#ifndef GOBJECT_VAR +# ifdef G_PLATFORM_WIN32 +# ifdef GOBJECT_STATIC_COMPILATION +# define GOBJECT_VAR extern +# else /* !GOBJECT_STATIC_COMPILATION */ +# ifdef GOBJECT_COMPILATION +# ifdef DLL_EXPORT +# define GOBJECT_VAR __declspec(dllexport) +# else /* !DLL_EXPORT */ +# define GOBJECT_VAR extern +# endif /* !DLL_EXPORT */ +# else /* !GOBJECT_COMPILATION */ +# define GOBJECT_VAR extern __declspec(dllimport) +# endif /* !GOBJECT_COMPILATION */ +# endif /* !GOBJECT_STATIC_COMPILATION */ +# else /* !G_PLATFORM_WIN32 */ +# define GOBJECT_VAR _GLIB_EXTERN +# endif /* !G_PLATFORM_WIN32 */ +#endif /* GOBJECT_VAR */ + +GOBJECT_VAR GType *g_param_spec_types; + +G_END_DECLS + +#endif /* __G_PARAMSPECS_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gsignal.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gsignal.h new file mode 100755 index 00000000..97f84794 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gsignal.h @@ -0,0 +1,607 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 2000-2001 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ +#ifndef __G_SIGNAL_H__ +#define __G_SIGNAL_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only <glib-object.h> can be included directly." +#endif + +#include <gobject/gclosure.h> +#include <gobject/gvalue.h> +#include <gobject/gparam.h> +#include <gobject/gmarshal.h> + +G_BEGIN_DECLS + +/* --- typedefs --- */ +typedef struct _GSignalQuery GSignalQuery; +typedef struct _GSignalInvocationHint GSignalInvocationHint; +/** + * GSignalCMarshaller: + * + * This is the signature of marshaller functions, required to marshall + * arrays of parameter values to signal emissions into C language callback + * invocations. It is merely an alias to #GClosureMarshal since the #GClosure + * mechanism takes over responsibility of actual function invocation for the + * signal system. + */ +typedef GClosureMarshal GSignalCMarshaller; +/** + * GSignalCVaMarshaller: + * + * This is the signature of va_list marshaller functions, an optional + * marshaller that can be used in some situations to avoid + * marshalling the signal argument into GValues. + */ +typedef GVaClosureMarshal GSignalCVaMarshaller; +/** + * GSignalEmissionHook: + * @ihint: Signal invocation hint, see #GSignalInvocationHint. + * @n_param_values: the number of parameters to the function, including + * the instance on which the signal was emitted. + * @param_values: (array length=n_param_values): the instance on which + * the signal was emitted, followed by the parameters of the emission. + * @data: user data associated with the hook. + * + * A simple function pointer to get invoked when the signal is emitted. This + * allows you to tie a hook to the signal type, so that it will trap all + * emissions of that signal, from any object. + * + * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag. + * + * Returns: whether it wants to stay connected. If it returns %FALSE, the signal + * hook is disconnected (and destroyed). + */ +typedef gboolean (*GSignalEmissionHook) (GSignalInvocationHint *ihint, + guint n_param_values, + const GValue *param_values, + gpointer data); +/** + * GSignalAccumulator: + * @ihint: Signal invocation hint, see #GSignalInvocationHint. + * @return_accu: Accumulator to collect callback return values in, this + * is the return value of the current signal emission. + * @handler_return: A #GValue holding the return value of the signal handler. + * @data: Callback data that was specified when creating the signal. + * + * The signal accumulator is a special callback function that can be used + * to collect return values of the various callbacks that are called + * during a signal emission. The signal accumulator is specified at signal + * creation time, if it is left %NULL, no accumulation of callback return + * values is performed. The return value of signal emissions is then the + * value returned by the last callback. + * + * Returns: The accumulator function returns whether the signal emission + * should be aborted. Returning %FALSE means to abort the + * current emission and %TRUE is returned for continuation. + */ +typedef gboolean (*GSignalAccumulator) (GSignalInvocationHint *ihint, + GValue *return_accu, + const GValue *handler_return, + gpointer data); + + +/* --- run, match and connect types --- */ +/** + * GSignalFlags: + * @G_SIGNAL_RUN_FIRST: Invoke the object method handler in the first emission stage. + * @G_SIGNAL_RUN_LAST: Invoke the object method handler in the third emission stage. + * @G_SIGNAL_RUN_CLEANUP: Invoke the object method handler in the last emission stage. + * @G_SIGNAL_NO_RECURSE: Signals being emitted for an object while currently being in + * emission for this very object will not be emitted recursively, + * but instead cause the first emission to be restarted. + * @G_SIGNAL_DETAILED: This signal supports "::detail" appendices to the signal name + * upon handler connections and emissions. + * @G_SIGNAL_ACTION: Action signals are signals that may freely be emitted on alive + * objects from user code via g_signal_emit() and friends, without + * the need of being embedded into extra code that performs pre or + * post emission adjustments on the object. They can also be thought + * of as object methods which can be called generically by + * third-party code. + * @G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal. + * @G_SIGNAL_MUST_COLLECT: Varargs signal emission will always collect the + * arguments, even if there are no signal handlers connected. Since 2.30. + * @G_SIGNAL_DEPRECATED: The signal is deprecated and will be removed + * in a future version. A warning will be generated if it is connected while + * running with G_ENABLE_DIAGNOSTIC=1. Since 2.32. + * + * The signal flags are used to specify a signal's behaviour, the overall + * signal description outlines how especially the RUN flags control the + * stages of a signal emission. + */ +typedef enum +{ + G_SIGNAL_RUN_FIRST = 1 << 0, + G_SIGNAL_RUN_LAST = 1 << 1, + G_SIGNAL_RUN_CLEANUP = 1 << 2, + G_SIGNAL_NO_RECURSE = 1 << 3, + G_SIGNAL_DETAILED = 1 << 4, + G_SIGNAL_ACTION = 1 << 5, + G_SIGNAL_NO_HOOKS = 1 << 6, + G_SIGNAL_MUST_COLLECT = 1 << 7, + G_SIGNAL_DEPRECATED = 1 << 8 +} GSignalFlags; +/** + * G_SIGNAL_FLAGS_MASK: + * + * A mask for all #GSignalFlags bits. + */ +#define G_SIGNAL_FLAGS_MASK 0x1ff +/** + * GConnectFlags: + * @G_CONNECT_AFTER: whether the handler should be called before or after the + * default handler of the signal. + * @G_CONNECT_SWAPPED: whether the instance and data should be swapped when + * calling the handler; see g_signal_connect_swapped() for an example. + * + * The connection flags are used to specify the behaviour of a signal's + * connection. + */ +typedef enum +{ + G_CONNECT_AFTER = 1 << 0, + G_CONNECT_SWAPPED = 1 << 1 +} GConnectFlags; +/** + * GSignalMatchType: + * @G_SIGNAL_MATCH_ID: The signal id must be equal. + * @G_SIGNAL_MATCH_DETAIL: The signal detail be equal. + * @G_SIGNAL_MATCH_CLOSURE: The closure must be the same. + * @G_SIGNAL_MATCH_FUNC: The C closure callback must be the same. + * @G_SIGNAL_MATCH_DATA: The closure data must be the same. + * @G_SIGNAL_MATCH_UNBLOCKED: Only unblocked signals may matched. + * + * The match types specify what g_signal_handlers_block_matched(), + * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched() + * match signals by. + */ +typedef enum +{ + G_SIGNAL_MATCH_ID = 1 << 0, + G_SIGNAL_MATCH_DETAIL = 1 << 1, + G_SIGNAL_MATCH_CLOSURE = 1 << 2, + G_SIGNAL_MATCH_FUNC = 1 << 3, + G_SIGNAL_MATCH_DATA = 1 << 4, + G_SIGNAL_MATCH_UNBLOCKED = 1 << 5 +} GSignalMatchType; +/** + * G_SIGNAL_MATCH_MASK: + * + * A mask for all #GSignalMatchType bits. + */ +#define G_SIGNAL_MATCH_MASK 0x3f +/** + * G_SIGNAL_TYPE_STATIC_SCOPE: + * + * This macro flags signal argument types for which the signal system may + * assume that instances thereof remain persistent across all signal emissions + * they are used in. This is only useful for non ref-counted, value-copy types. + * + * To flag a signal argument in this way, add `| G_SIGNAL_TYPE_STATIC_SCOPE` + * to the corresponding argument of g_signal_new(). + * |[ + * g_signal_new ("size_request", + * G_TYPE_FROM_CLASS (gobject_class), + * G_SIGNAL_RUN_FIRST, + * G_STRUCT_OFFSET (GtkWidgetClass, size_request), + * NULL, NULL, + * _gtk_marshal_VOID__BOXED, + * G_TYPE_NONE, 1, + * GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE); + * ]| + */ +#define G_SIGNAL_TYPE_STATIC_SCOPE (G_TYPE_FLAG_RESERVED_ID_BIT) + + +/* --- signal information --- */ +/** + * GSignalInvocationHint: + * @signal_id: The signal id of the signal invoking the callback + * @detail: The detail passed on for this emission + * @run_type: The stage the signal emission is currently in, this + * field will contain one of %G_SIGNAL_RUN_FIRST, + * %G_SIGNAL_RUN_LAST or %G_SIGNAL_RUN_CLEANUP. + * + * The #GSignalInvocationHint structure is used to pass on additional information + * to callbacks during a signal emission. + */ +struct _GSignalInvocationHint +{ + guint signal_id; + GQuark detail; + GSignalFlags run_type; +}; +/** + * GSignalQuery: + * @signal_id: The signal id of the signal being queried, or 0 if the + * signal to be queried was unknown. + * @signal_name: The signal name. + * @itype: The interface/instance type that this signal can be emitted for. + * @signal_flags: The signal flags as passed in to g_signal_new(). + * @return_type: The return type for user callbacks. + * @n_params: The number of parameters that user callbacks take. + * @param_types: (array length=n_params): The individual parameter types for + * user callbacks, note that the effective callback signature is: + * |[<!-- language="C" --> + * @return_type callback (#gpointer data1, + * [param_types param_names,] + * gpointer data2); + * ]| + * + * A structure holding in-depth information for a specific signal. It is + * filled in by the g_signal_query() function. + */ +struct _GSignalQuery +{ + guint signal_id; + const gchar *signal_name; + GType itype; + GSignalFlags signal_flags; + GType return_type; /* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag */ + guint n_params; + const GType *param_types; /* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag */ +}; + + +/* --- signals --- */ +GLIB_AVAILABLE_IN_ALL +guint g_signal_newv (const gchar *signal_name, + GType itype, + GSignalFlags signal_flags, + GClosure *class_closure, + GSignalAccumulator accumulator, + gpointer accu_data, + GSignalCMarshaller c_marshaller, + GType return_type, + guint n_params, + GType *param_types); +GLIB_AVAILABLE_IN_ALL +guint g_signal_new_valist (const gchar *signal_name, + GType itype, + GSignalFlags signal_flags, + GClosure *class_closure, + GSignalAccumulator accumulator, + gpointer accu_data, + GSignalCMarshaller c_marshaller, + GType return_type, + guint n_params, + va_list args); +GLIB_AVAILABLE_IN_ALL +guint g_signal_new (const gchar *signal_name, + GType itype, + GSignalFlags signal_flags, + guint class_offset, + GSignalAccumulator accumulator, + gpointer accu_data, + GSignalCMarshaller c_marshaller, + GType return_type, + guint n_params, + ...); +GLIB_AVAILABLE_IN_ALL +guint g_signal_new_class_handler (const gchar *signal_name, + GType itype, + GSignalFlags signal_flags, + GCallback class_handler, + GSignalAccumulator accumulator, + gpointer accu_data, + GSignalCMarshaller c_marshaller, + GType return_type, + guint n_params, + ...); +GLIB_AVAILABLE_IN_ALL +void g_signal_set_va_marshaller (guint signal_id, + GType instance_type, + GSignalCVaMarshaller va_marshaller); + +GLIB_AVAILABLE_IN_ALL +void g_signal_emitv (const GValue *instance_and_params, + guint signal_id, + GQuark detail, + GValue *return_value); +GLIB_AVAILABLE_IN_ALL +void g_signal_emit_valist (gpointer instance, + guint signal_id, + GQuark detail, + va_list var_args); +GLIB_AVAILABLE_IN_ALL +void g_signal_emit (gpointer instance, + guint signal_id, + GQuark detail, + ...); +GLIB_AVAILABLE_IN_ALL +void g_signal_emit_by_name (gpointer instance, + const gchar *detailed_signal, + ...); +GLIB_AVAILABLE_IN_ALL +guint g_signal_lookup (const gchar *name, + GType itype); +GLIB_AVAILABLE_IN_ALL +const gchar * g_signal_name (guint signal_id); +GLIB_AVAILABLE_IN_ALL +void g_signal_query (guint signal_id, + GSignalQuery *query); +GLIB_AVAILABLE_IN_ALL +guint* g_signal_list_ids (GType itype, + guint *n_ids); +GLIB_AVAILABLE_IN_ALL +gboolean g_signal_parse_name (const gchar *detailed_signal, + GType itype, + guint *signal_id_p, + GQuark *detail_p, + gboolean force_detail_quark); +GLIB_AVAILABLE_IN_ALL +GSignalInvocationHint* g_signal_get_invocation_hint (gpointer instance); + + +/* --- signal emissions --- */ +GLIB_AVAILABLE_IN_ALL +void g_signal_stop_emission (gpointer instance, + guint signal_id, + GQuark detail); +GLIB_AVAILABLE_IN_ALL +void g_signal_stop_emission_by_name (gpointer instance, + const gchar *detailed_signal); +GLIB_AVAILABLE_IN_ALL +gulong g_signal_add_emission_hook (guint signal_id, + GQuark detail, + GSignalEmissionHook hook_func, + gpointer hook_data, + GDestroyNotify data_destroy); +GLIB_AVAILABLE_IN_ALL +void g_signal_remove_emission_hook (guint signal_id, + gulong hook_id); + + +/* --- signal handlers --- */ +GLIB_AVAILABLE_IN_ALL +gboolean g_signal_has_handler_pending (gpointer instance, + guint signal_id, + GQuark detail, + gboolean may_be_blocked); +GLIB_AVAILABLE_IN_ALL +gulong g_signal_connect_closure_by_id (gpointer instance, + guint signal_id, + GQuark detail, + GClosure *closure, + gboolean after); +GLIB_AVAILABLE_IN_ALL +gulong g_signal_connect_closure (gpointer instance, + const gchar *detailed_signal, + GClosure *closure, + gboolean after); +GLIB_AVAILABLE_IN_ALL +gulong g_signal_connect_data (gpointer instance, + const gchar *detailed_signal, + GCallback c_handler, + gpointer data, + GClosureNotify destroy_data, + GConnectFlags connect_flags); +GLIB_AVAILABLE_IN_ALL +void g_signal_handler_block (gpointer instance, + gulong handler_id); +GLIB_AVAILABLE_IN_ALL +void g_signal_handler_unblock (gpointer instance, + gulong handler_id); +GLIB_AVAILABLE_IN_ALL +void g_signal_handler_disconnect (gpointer instance, + gulong handler_id); +GLIB_AVAILABLE_IN_ALL +gboolean g_signal_handler_is_connected (gpointer instance, + gulong handler_id); +GLIB_AVAILABLE_IN_ALL +gulong g_signal_handler_find (gpointer instance, + GSignalMatchType mask, + guint signal_id, + GQuark detail, + GClosure *closure, + gpointer func, + gpointer data); +GLIB_AVAILABLE_IN_ALL +guint g_signal_handlers_block_matched (gpointer instance, + GSignalMatchType mask, + guint signal_id, + GQuark detail, + GClosure *closure, + gpointer func, + gpointer data); +GLIB_AVAILABLE_IN_ALL +guint g_signal_handlers_unblock_matched (gpointer instance, + GSignalMatchType mask, + guint signal_id, + GQuark detail, + GClosure *closure, + gpointer func, + gpointer data); +GLIB_AVAILABLE_IN_ALL +guint g_signal_handlers_disconnect_matched (gpointer instance, + GSignalMatchType mask, + guint signal_id, + GQuark detail, + GClosure *closure, + gpointer func, + gpointer data); + + +/* --- overriding and chaining --- */ +GLIB_AVAILABLE_IN_ALL +void g_signal_override_class_closure (guint signal_id, + GType instance_type, + GClosure *class_closure); +GLIB_AVAILABLE_IN_ALL +void g_signal_override_class_handler (const gchar *signal_name, + GType instance_type, + GCallback class_handler); +GLIB_AVAILABLE_IN_ALL +void g_signal_chain_from_overridden (const GValue *instance_and_params, + GValue *return_value); +GLIB_AVAILABLE_IN_ALL +void g_signal_chain_from_overridden_handler (gpointer instance, + ...); + + +/* --- convenience --- */ +/** + * g_signal_connect: + * @instance: the instance to connect to. + * @detailed_signal: a string of the form "signal-name::detail". + * @c_handler: the #GCallback to connect. + * @data: data to pass to @c_handler calls. + * + * Connects a #GCallback function to a signal for a particular object. + * + * The handler will be called before the default handler of the signal. + * + * See [memory management of signal handlers][signal-memory-management] for + * details on how to handle the return value and memory management of @data. + * + * Returns: the handler ID, of type #gulong (always greater than 0 for successful connections) + */ +#define g_signal_connect(instance, detailed_signal, c_handler, data) \ + g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, (GConnectFlags) 0) +/** + * g_signal_connect_after: + * @instance: the instance to connect to. + * @detailed_signal: a string of the form "signal-name::detail". + * @c_handler: the #GCallback to connect. + * @data: data to pass to @c_handler calls. + * + * Connects a #GCallback function to a signal for a particular object. + * + * The handler will be called after the default handler of the signal. + * + * Returns: the handler ID, of type #gulong (always greater than 0 for successful connections) + */ +#define g_signal_connect_after(instance, detailed_signal, c_handler, data) \ + g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, G_CONNECT_AFTER) +/** + * g_signal_connect_swapped: + * @instance: the instance to connect to. + * @detailed_signal: a string of the form "signal-name::detail". + * @c_handler: the #GCallback to connect. + * @data: data to pass to @c_handler calls. + * + * Connects a #GCallback function to a signal for a particular object. + * + * The instance on which the signal is emitted and @data will be swapped when + * calling the handler. This is useful when calling pre-existing functions to + * operate purely on the @data, rather than the @instance: swapping the + * parameters avoids the need to write a wrapper function. + * + * For example, this allows the shorter code: + * |[<!-- language="C" --> + * g_signal_connect_swapped (button, "clicked", + * (GCallback) gtk_widget_hide, other_widget); + * ]| + * + * Rather than the cumbersome: + * |[<!-- language="C" --> + * static void + * button_clicked_cb (GtkButton *button, GtkWidget *other_widget) + * { + * gtk_widget_hide (other_widget); + * } + * + * ... + * + * g_signal_connect (button, "clicked", + * (GCallback) button_clicked_cb, other_widget); + * ]| + * + * Returns: the handler ID, of type #gulong (always greater than 0 for successful connections) + */ +#define g_signal_connect_swapped(instance, detailed_signal, c_handler, data) \ + g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, G_CONNECT_SWAPPED) +/** + * g_signal_handlers_disconnect_by_func: + * @instance: The instance to remove handlers from. + * @func: The C closure callback of the handlers (useless for non-C closures). + * @data: The closure data of the handlers' closures. + * + * Disconnects all handlers on an instance that match @func and @data. + * + * Returns: The number of handlers that matched. + */ +#define g_signal_handlers_disconnect_by_func(instance, func, data) \ + g_signal_handlers_disconnect_matched ((instance), \ + (GSignalMatchType) (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), \ + 0, 0, NULL, (func), (data)) + +/** + * g_signal_handlers_disconnect_by_data: + * @instance: The instance to remove handlers from + * @data: the closure data of the handlers' closures + * + * Disconnects all handlers on an instance that match @data. + * + * Returns: The number of handlers that matched. + * + * Since: 2.32 + */ +#define g_signal_handlers_disconnect_by_data(instance, data) \ + g_signal_handlers_disconnect_matched ((instance), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, (data)) + +/** + * g_signal_handlers_block_by_func: + * @instance: The instance to block handlers from. + * @func: The C closure callback of the handlers (useless for non-C closures). + * @data: The closure data of the handlers' closures. + * + * Blocks all handlers on an instance that match @func and @data. + * + * Returns: The number of handlers that matched. + */ +#define g_signal_handlers_block_by_func(instance, func, data) \ + g_signal_handlers_block_matched ((instance), \ + (GSignalMatchType) (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), \ + 0, 0, NULL, (func), (data)) +/** + * g_signal_handlers_unblock_by_func: + * @instance: The instance to unblock handlers from. + * @func: The C closure callback of the handlers (useless for non-C closures). + * @data: The closure data of the handlers' closures. + * + * Unblocks all handlers on an instance that match @func and @data. + * + * Returns: The number of handlers that matched. + */ +#define g_signal_handlers_unblock_by_func(instance, func, data) \ + g_signal_handlers_unblock_matched ((instance), \ + (GSignalMatchType) (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), \ + 0, 0, NULL, (func), (data)) + + +GLIB_AVAILABLE_IN_ALL +gboolean g_signal_accumulator_true_handled (GSignalInvocationHint *ihint, + GValue *return_accu, + const GValue *handler_return, + gpointer dummy); + +GLIB_AVAILABLE_IN_ALL +gboolean g_signal_accumulator_first_wins (GSignalInvocationHint *ihint, + GValue *return_accu, + const GValue *handler_return, + gpointer dummy); + +/*< private >*/ +GLIB_AVAILABLE_IN_ALL +void g_signal_handlers_destroy (gpointer instance); +void _g_signals_destroy (GType itype); + +G_END_DECLS + +#endif /* __G_SIGNAL_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gsourceclosure.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gsourceclosure.h new file mode 100755 index 00000000..48476770 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gsourceclosure.h @@ -0,0 +1,38 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 2001 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ +#ifndef __G_SOURCECLOSURE_H__ +#define __G_SOURCECLOSURE_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only <glib-object.h> can be included directly." +#endif + +#include <gobject/gclosure.h> +#include <gobject/glib-types.h> + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +void g_source_set_closure (GSource *source, + GClosure *closure); + +GLIB_AVAILABLE_IN_ALL +void g_source_set_dummy_callback (GSource *source); + +G_END_DECLS + +#endif /* __G_SOURCECLOSURE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gtype.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gtype.h new file mode 100755 index 00000000..375dfa21 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gtype.h @@ -0,0 +1,2281 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1998-1999, 2000-2001 Tim Janik and Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ +#ifndef __G_TYPE_H__ +#define __G_TYPE_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only <glib-object.h> can be included directly." +#endif + +#include <glib.h> + +G_BEGIN_DECLS + +/* Basic Type Macros + */ +/** + * G_TYPE_FUNDAMENTAL: + * @type: A #GType value. + * + * The fundamental type which is the ancestor of @type. + * Fundamental types are types that serve as ultimate bases for the derived types, + * thus they are the roots of distinct inheritance hierarchies. + */ +#define G_TYPE_FUNDAMENTAL(type) (g_type_fundamental (type)) +/** + * G_TYPE_FUNDAMENTAL_MAX: + * + * An integer constant that represents the number of identifiers reserved + * for types that are assigned at compile-time. + */ +#define G_TYPE_FUNDAMENTAL_MAX (255 << G_TYPE_FUNDAMENTAL_SHIFT) + +/* Constant fundamental types, + */ +/** + * G_TYPE_INVALID: + * + * An invalid #GType used as error return value in some functions which return + * a #GType. + */ +#define G_TYPE_INVALID G_TYPE_MAKE_FUNDAMENTAL (0) +/** + * G_TYPE_NONE: + * + * A fundamental type which is used as a replacement for the C + * void return type. + */ +#define G_TYPE_NONE G_TYPE_MAKE_FUNDAMENTAL (1) +/** + * G_TYPE_INTERFACE: + * + * The fundamental type from which all interfaces are derived. + */ +#define G_TYPE_INTERFACE G_TYPE_MAKE_FUNDAMENTAL (2) +/** + * G_TYPE_CHAR: + * + * The fundamental type corresponding to #gchar. + * The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer. + * This may or may not be the same type a the C type "gchar". + */ +#define G_TYPE_CHAR G_TYPE_MAKE_FUNDAMENTAL (3) +/** + * G_TYPE_UCHAR: + * + * The fundamental type corresponding to #guchar. + */ +#define G_TYPE_UCHAR G_TYPE_MAKE_FUNDAMENTAL (4) +/** + * G_TYPE_BOOLEAN: + * + * The fundamental type corresponding to #gboolean. + */ +#define G_TYPE_BOOLEAN G_TYPE_MAKE_FUNDAMENTAL (5) +/** + * G_TYPE_INT: + * + * The fundamental type corresponding to #gint. + */ +#define G_TYPE_INT G_TYPE_MAKE_FUNDAMENTAL (6) +/** + * G_TYPE_UINT: + * + * The fundamental type corresponding to #guint. + */ +#define G_TYPE_UINT G_TYPE_MAKE_FUNDAMENTAL (7) +/** + * G_TYPE_LONG: + * + * The fundamental type corresponding to #glong. + */ +#define G_TYPE_LONG G_TYPE_MAKE_FUNDAMENTAL (8) +/** + * G_TYPE_ULONG: + * + * The fundamental type corresponding to #gulong. + */ +#define G_TYPE_ULONG G_TYPE_MAKE_FUNDAMENTAL (9) +/** + * G_TYPE_INT64: + * + * The fundamental type corresponding to #gint64. + */ +#define G_TYPE_INT64 G_TYPE_MAKE_FUNDAMENTAL (10) +/** + * G_TYPE_UINT64: + * + * The fundamental type corresponding to #guint64. + */ +#define G_TYPE_UINT64 G_TYPE_MAKE_FUNDAMENTAL (11) +/** + * G_TYPE_ENUM: + * + * The fundamental type from which all enumeration types are derived. + */ +#define G_TYPE_ENUM G_TYPE_MAKE_FUNDAMENTAL (12) +/** + * G_TYPE_FLAGS: + * + * The fundamental type from which all flags types are derived. + */ +#define G_TYPE_FLAGS G_TYPE_MAKE_FUNDAMENTAL (13) +/** + * G_TYPE_FLOAT: + * + * The fundamental type corresponding to #gfloat. + */ +#define G_TYPE_FLOAT G_TYPE_MAKE_FUNDAMENTAL (14) +/** + * G_TYPE_DOUBLE: + * + * The fundamental type corresponding to #gdouble. + */ +#define G_TYPE_DOUBLE G_TYPE_MAKE_FUNDAMENTAL (15) +/** + * G_TYPE_STRING: + * + * The fundamental type corresponding to nul-terminated C strings. + */ +#define G_TYPE_STRING G_TYPE_MAKE_FUNDAMENTAL (16) +/** + * G_TYPE_POINTER: + * + * The fundamental type corresponding to #gpointer. + */ +#define G_TYPE_POINTER G_TYPE_MAKE_FUNDAMENTAL (17) +/** + * G_TYPE_BOXED: + * + * The fundamental type from which all boxed types are derived. + */ +#define G_TYPE_BOXED G_TYPE_MAKE_FUNDAMENTAL (18) +/** + * G_TYPE_PARAM: + * + * The fundamental type from which all #GParamSpec types are derived. + */ +#define G_TYPE_PARAM G_TYPE_MAKE_FUNDAMENTAL (19) +/** + * G_TYPE_OBJECT: + * + * The fundamental type for #GObject. + */ +#define G_TYPE_OBJECT G_TYPE_MAKE_FUNDAMENTAL (20) +/** + * G_TYPE_VARIANT: + * + * The fundamental type corresponding to #GVariant. + * + * All floating #GVariant instances passed through the #GType system are + * consumed. + * + * Note that callbacks in closures, and signal handlers + * for signals of return type %G_TYPE_VARIANT, must never return floating + * variants. + * + * Note: GLib 2.24 did include a boxed type with this name. It was replaced + * with this fundamental type in 2.26. + * + * Since: 2.26 + */ +#define G_TYPE_VARIANT G_TYPE_MAKE_FUNDAMENTAL (21) + + +/* Reserved fundamental type numbers to create new fundamental + * type IDs with G_TYPE_MAKE_FUNDAMENTAL(). + * Send email to gtk-devel-list@gnome.org for reservations. + */ +/** + * G_TYPE_FUNDAMENTAL_SHIFT: + * + * Shift value used in converting numbers to type IDs. + */ +#define G_TYPE_FUNDAMENTAL_SHIFT (2) +/** + * G_TYPE_MAKE_FUNDAMENTAL: + * @x: the fundamental type number. + * + * Get the type ID for the fundamental type number @x. + * Use g_type_fundamental_next() instead of this macro to create new fundamental + * types. + * + * Returns: the GType + */ +#define G_TYPE_MAKE_FUNDAMENTAL(x) ((GType) ((x) << G_TYPE_FUNDAMENTAL_SHIFT)) +/** + * G_TYPE_RESERVED_GLIB_FIRST: + * + * First fundamental type number to create a new fundamental type id with + * G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib. + */ +#define G_TYPE_RESERVED_GLIB_FIRST (22) +/** + * G_TYPE_RESERVED_GLIB_LAST: + * + * Last fundamental type number reserved for GLib. + */ +#define G_TYPE_RESERVED_GLIB_LAST (31) +/** + * G_TYPE_RESERVED_BSE_FIRST: + * + * First fundamental type number to create a new fundamental type id with + * G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE. + */ +#define G_TYPE_RESERVED_BSE_FIRST (32) +/** + * G_TYPE_RESERVED_BSE_LAST: + * + * Last fundamental type number reserved for BSE. + */ +#define G_TYPE_RESERVED_BSE_LAST (48) +/** + * G_TYPE_RESERVED_USER_FIRST: + * + * First available fundamental type number to create new fundamental + * type id with G_TYPE_MAKE_FUNDAMENTAL(). + */ +#define G_TYPE_RESERVED_USER_FIRST (49) + + +/* Type Checking Macros + */ +/** + * G_TYPE_IS_FUNDAMENTAL: + * @type: A #GType value + * + * Checks if @type is a fundamental type. + * + * Returns: %TRUE on success + */ +#define G_TYPE_IS_FUNDAMENTAL(type) ((type) <= G_TYPE_FUNDAMENTAL_MAX) +/** + * G_TYPE_IS_DERIVED: + * @type: A #GType value + * + * Checks if @type is derived (or in object-oriented terminology: + * inherited) from another type (this holds true for all non-fundamental + * types). + * + * Returns: %TRUE on success + */ +#define G_TYPE_IS_DERIVED(type) ((type) > G_TYPE_FUNDAMENTAL_MAX) +/** + * G_TYPE_IS_INTERFACE: + * @type: A #GType value + * + * Checks if @type is an interface type. + * An interface type provides a pure API, the implementation + * of which is provided by another type (which is then said to conform + * to the interface). GLib interfaces are somewhat analogous to Java + * interfaces and C++ classes containing only pure virtual functions, + * with the difference that GType interfaces are not derivable (but see + * g_type_interface_add_prerequisite() for an alternative). + * + * Returns: %TRUE on success + */ +#define G_TYPE_IS_INTERFACE(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_INTERFACE) +/** + * G_TYPE_IS_CLASSED: + * @type: A #GType value + * + * Checks if @type is a classed type. + * + * Returns: %TRUE on success + */ +#define G_TYPE_IS_CLASSED(type) (g_type_test_flags ((type), G_TYPE_FLAG_CLASSED)) +/** + * G_TYPE_IS_INSTANTIATABLE: + * @type: A #GType value + * + * Checks if @type can be instantiated. Instantiation is the + * process of creating an instance (object) of this type. + * + * Returns: %TRUE on success + */ +#define G_TYPE_IS_INSTANTIATABLE(type) (g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)) +/** + * G_TYPE_IS_DERIVABLE: + * @type: A #GType value + * + * Checks if @type is a derivable type. A derivable type can + * be used as the base class of a flat (single-level) class hierarchy. + * + * Returns: %TRUE on success + */ +#define G_TYPE_IS_DERIVABLE(type) (g_type_test_flags ((type), G_TYPE_FLAG_DERIVABLE)) +/** + * G_TYPE_IS_DEEP_DERIVABLE: + * @type: A #GType value + * + * Checks if @type is a deep derivable type. A deep derivable type + * can be used as the base class of a deep (multi-level) class hierarchy. + * + * Returns: %TRUE on success + */ +#define G_TYPE_IS_DEEP_DERIVABLE(type) (g_type_test_flags ((type), G_TYPE_FLAG_DEEP_DERIVABLE)) +/** + * G_TYPE_IS_ABSTRACT: + * @type: A #GType value + * + * Checks if @type is an abstract type. An abstract type cannot be + * instantiated and is normally used as an abstract base class for + * derived classes. + * + * Returns: %TRUE on success + */ +#define G_TYPE_IS_ABSTRACT(type) (g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)) +/** + * G_TYPE_IS_VALUE_ABSTRACT: + * @type: A #GType value + * + * Checks if @type is an abstract value type. An abstract value type introduces + * a value table, but can't be used for g_value_init() and is normally used as + * an abstract base type for derived value types. + * + * Returns: %TRUE on success + */ +#define G_TYPE_IS_VALUE_ABSTRACT(type) (g_type_test_flags ((type), G_TYPE_FLAG_VALUE_ABSTRACT)) +/** + * G_TYPE_IS_VALUE_TYPE: + * @type: A #GType value + * + * Checks if @type is a value type and can be used with g_value_init(). + * + * Returns: %TRUE on success + */ +#define G_TYPE_IS_VALUE_TYPE(type) (g_type_check_is_value_type (type)) +/** + * G_TYPE_HAS_VALUE_TABLE: + * @type: A #GType value + * + * Checks if @type has a #GTypeValueTable. + * + * Returns: %TRUE on success + */ +#define G_TYPE_HAS_VALUE_TABLE(type) (g_type_value_table_peek (type) != NULL) + + +/* Typedefs + */ +/** + * GType: + * + * A numerical value which represents the unique identifier of a registered + * type. + */ +#if GLIB_SIZEOF_SIZE_T != GLIB_SIZEOF_LONG || !defined __cplusplus +typedef gsize GType; +#else /* for historic reasons, C++ links against gulong GTypes */ +typedef gulong GType; +#endif +typedef struct _GValue GValue; +typedef union _GTypeCValue GTypeCValue; +typedef struct _GTypePlugin GTypePlugin; +typedef struct _GTypeClass GTypeClass; +typedef struct _GTypeInterface GTypeInterface; +typedef struct _GTypeInstance GTypeInstance; +typedef struct _GTypeInfo GTypeInfo; +typedef struct _GTypeFundamentalInfo GTypeFundamentalInfo; +typedef struct _GInterfaceInfo GInterfaceInfo; +typedef struct _GTypeValueTable GTypeValueTable; +typedef struct _GTypeQuery GTypeQuery; + + +/* Basic Type Structures + */ +/** + * GTypeClass: + * + * An opaque structure used as the base of all classes. + */ +struct _GTypeClass +{ + /*< private >*/ + GType g_type; +}; +/** + * GTypeInstance: + * + * An opaque structure used as the base of all type instances. + */ +struct _GTypeInstance +{ + /*< private >*/ + GTypeClass *g_class; +}; +/** + * GTypeInterface: + * + * An opaque structure used as the base of all interface types. + */ +struct _GTypeInterface +{ + /*< private >*/ + GType g_type; /* iface type */ + GType g_instance_type; +}; +/** + * GTypeQuery: + * @type: the #GType value of the type + * @type_name: the name of the type + * @class_size: the size of the class structure + * @instance_size: the size of the instance structure + * + * A structure holding information for a specific type. + * It is filled in by the g_type_query() function. + */ +struct _GTypeQuery +{ + GType type; + const gchar *type_name; + guint class_size; + guint instance_size; +}; + + +/* Casts, checks and accessors for structured types + * usage of these macros is reserved to type implementations only + */ +/*< protected >*/ +/** + * G_TYPE_CHECK_INSTANCE: + * @instance: Location of a #GTypeInstance structure + * + * Checks if @instance is a valid #GTypeInstance structure, + * otherwise issues a warning and returns %FALSE. %NULL is not a valid + * #GTypeInstance. + * + * This macro should only be used in type implementations. + * + * Returns: %TRUE on success + */ +#define G_TYPE_CHECK_INSTANCE(instance) (_G_TYPE_CHI ((GTypeInstance*) (instance))) +/** + * G_TYPE_CHECK_INSTANCE_CAST: + * @instance: (nullable): Location of a #GTypeInstance structure + * @g_type: The type to be returned + * @c_type: The corresponding C type of @g_type + * + * Checks that @instance is an instance of the type identified by @g_type + * and issues a warning if this is not the case. Returns @instance casted + * to a pointer to @c_type. + * + * No warning will be issued if @instance is %NULL, and %NULL will be returned. + * + * This macro should only be used in type implementations. + */ +#define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type)) +/** + * G_TYPE_CHECK_INSTANCE_TYPE: + * @instance: (nullable): Location of a #GTypeInstance structure. + * @g_type: The type to be checked + * + * Checks if @instance is an instance of the type identified by @g_type. If + * @instance is %NULL, %FALSE will be returned. + * + * This macro should only be used in type implementations. + * + * Returns: %TRUE on success + */ +#define G_TYPE_CHECK_INSTANCE_TYPE(instance, g_type) (_G_TYPE_CIT ((instance), (g_type))) +/** + * G_TYPE_CHECK_INSTANCE_FUNDAMENTAL_TYPE: + * @instance: (nullable): Location of a #GTypeInstance structure. + * @g_type: The fundamental type to be checked + * + * Checks if @instance is an instance of the fundamental type identified by @g_type. + * If @instance is %NULL, %FALSE will be returned. + * + * This macro should only be used in type implementations. + * + * Returns: %TRUE on success + */ +#define G_TYPE_CHECK_INSTANCE_FUNDAMENTAL_TYPE(instance, g_type) (_G_TYPE_CIFT ((instance), (g_type))) +/** + * G_TYPE_INSTANCE_GET_CLASS: + * @instance: Location of the #GTypeInstance structure + * @g_type: The #GType of the class to be returned + * @c_type: The C type of the class structure + * + * Get the class structure of a given @instance, casted + * to a specified ancestor type @g_type of the instance. + * + * Note that while calling a GInstanceInitFunc(), the class pointer + * gets modified, so it might not always return the expected pointer. + * + * This macro should only be used in type implementations. + * + * Returns: a pointer to the class structure + */ +#define G_TYPE_INSTANCE_GET_CLASS(instance, g_type, c_type) (_G_TYPE_IGC ((instance), (g_type), c_type)) +/** + * G_TYPE_INSTANCE_GET_INTERFACE: + * @instance: Location of the #GTypeInstance structure + * @g_type: The #GType of the interface to be returned + * @c_type: The C type of the interface structure + * + * Get the interface structure for interface @g_type of a given @instance. + * + * This macro should only be used in type implementations. + * + * Returns: a pointer to the interface structure + */ +#define G_TYPE_INSTANCE_GET_INTERFACE(instance, g_type, c_type) (_G_TYPE_IGI ((instance), (g_type), c_type)) +/** + * G_TYPE_CHECK_CLASS_CAST: + * @g_class: Location of a #GTypeClass structure + * @g_type: The type to be returned + * @c_type: The corresponding C type of class structure of @g_type + * + * Checks that @g_class is a class structure of the type identified by @g_type + * and issues a warning if this is not the case. Returns @g_class casted + * to a pointer to @c_type. %NULL is not a valid class structure. + * + * This macro should only be used in type implementations. + */ +#define G_TYPE_CHECK_CLASS_CAST(g_class, g_type, c_type) (_G_TYPE_CCC ((g_class), (g_type), c_type)) +/** + * G_TYPE_CHECK_CLASS_TYPE: + * @g_class: (nullable): Location of a #GTypeClass structure + * @g_type: The type to be checked + * + * Checks if @g_class is a class structure of the type identified by + * @g_type. If @g_class is %NULL, %FALSE will be returned. + * + * This macro should only be used in type implementations. + * + * Returns: %TRUE on success + */ +#define G_TYPE_CHECK_CLASS_TYPE(g_class, g_type) (_G_TYPE_CCT ((g_class), (g_type))) +/** + * G_TYPE_CHECK_VALUE: + * @value: a #GValue + * + * Checks if @value has been initialized to hold values + * of a value type. + * + * This macro should only be used in type implementations. + * + * Returns: %TRUE on success + */ +#define G_TYPE_CHECK_VALUE(value) (_G_TYPE_CHV ((value))) +/** + * G_TYPE_CHECK_VALUE_TYPE: + * @value: a #GValue + * @g_type: The type to be checked + * + * Checks if @value has been initialized to hold values + * of type @g_type. + * + * This macro should only be used in type implementations. + * + * Returns: %TRUE on success + */ +#define G_TYPE_CHECK_VALUE_TYPE(value, g_type) (_G_TYPE_CVH ((value), (g_type))) +/** + * G_TYPE_FROM_INSTANCE: + * @instance: Location of a valid #GTypeInstance structure + * + * Get the type identifier from a given @instance structure. + * + * This macro should only be used in type implementations. + * + * Returns: the #GType + */ +#define G_TYPE_FROM_INSTANCE(instance) (G_TYPE_FROM_CLASS (((GTypeInstance*) (instance))->g_class)) +/** + * G_TYPE_FROM_CLASS: + * @g_class: Location of a valid #GTypeClass structure + * + * Get the type identifier from a given @class structure. + * + * This macro should only be used in type implementations. + * + * Returns: the #GType + */ +#define G_TYPE_FROM_CLASS(g_class) (((GTypeClass*) (g_class))->g_type) +/** + * G_TYPE_FROM_INTERFACE: + * @g_iface: Location of a valid #GTypeInterface structure + * + * Get the type identifier from a given @interface structure. + * + * This macro should only be used in type implementations. + * + * Returns: the #GType + */ +#define G_TYPE_FROM_INTERFACE(g_iface) (((GTypeInterface*) (g_iface))->g_type) + +/** + * G_TYPE_INSTANCE_GET_PRIVATE: + * @instance: the instance of a type deriving from @private_type + * @g_type: the type identifying which private data to retrieve + * @c_type: The C type for the private structure + * + * Gets the private structure for a particular type. + * The private structure must have been registered in the + * class_init function with g_type_class_add_private(). + * + * This macro should only be used in type implementations. + * + * Since: 2.4 + * Returns: (not nullable): a pointer to the private data structure + */ +#define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type) ((c_type*) g_type_instance_get_private ((GTypeInstance*) (instance), (g_type))) + +/** + * G_TYPE_CLASS_GET_PRIVATE: + * @klass: the class of a type deriving from @private_type + * @g_type: the type identifying which private data to retrieve + * @c_type: The C type for the private structure + * + * Gets the private class structure for a particular type. + * The private structure must have been registered in the + * get_type() function with g_type_add_class_private(). + * + * This macro should only be used in type implementations. + * + * Since: 2.24 + * Returns: (not nullable): a pointer to the private data structure + */ +#define G_TYPE_CLASS_GET_PRIVATE(klass, g_type, c_type) ((c_type*) g_type_class_get_private ((GTypeClass*) (klass), (g_type))) + +/** + * GTypeDebugFlags: + * @G_TYPE_DEBUG_NONE: Print no messages + * @G_TYPE_DEBUG_OBJECTS: Print messages about object bookkeeping + * @G_TYPE_DEBUG_SIGNALS: Print messages about signal emissions + * @G_TYPE_DEBUG_MASK: Mask covering all debug flags + * @G_TYPE_DEBUG_INSTANCE_COUNT: Keep a count of instances of each type + * + * These flags used to be passed to g_type_init_with_debug_flags() which + * is now deprecated. + * + * If you need to enable debugging features, use the GOBJECT_DEBUG + * environment variable. + * + * Deprecated: 2.36: g_type_init() is now done automatically + */ +typedef enum /*< skip >*/ +{ + G_TYPE_DEBUG_NONE = 0, + G_TYPE_DEBUG_OBJECTS = 1 << 0, + G_TYPE_DEBUG_SIGNALS = 1 << 1, + G_TYPE_DEBUG_INSTANCE_COUNT = 1 << 2, + G_TYPE_DEBUG_MASK = 0x07 +} GTypeDebugFlags; + + +/* --- prototypes --- */ +GLIB_DEPRECATED_IN_2_36 +void g_type_init (void); +GLIB_DEPRECATED_IN_2_36 +void g_type_init_with_debug_flags (GTypeDebugFlags debug_flags); +GLIB_AVAILABLE_IN_ALL +const gchar * g_type_name (GType type); +GLIB_AVAILABLE_IN_ALL +GQuark g_type_qname (GType type); +GLIB_AVAILABLE_IN_ALL +GType g_type_from_name (const gchar *name); +GLIB_AVAILABLE_IN_ALL +GType g_type_parent (GType type); +GLIB_AVAILABLE_IN_ALL +guint g_type_depth (GType type); +GLIB_AVAILABLE_IN_ALL +GType g_type_next_base (GType leaf_type, + GType root_type); +GLIB_AVAILABLE_IN_ALL +gboolean g_type_is_a (GType type, + GType is_a_type); +GLIB_AVAILABLE_IN_ALL +gpointer g_type_class_ref (GType type); +GLIB_AVAILABLE_IN_ALL +gpointer g_type_class_peek (GType type); +GLIB_AVAILABLE_IN_ALL +gpointer g_type_class_peek_static (GType type); +GLIB_AVAILABLE_IN_ALL +void g_type_class_unref (gpointer g_class); +GLIB_AVAILABLE_IN_ALL +gpointer g_type_class_peek_parent (gpointer g_class); +GLIB_AVAILABLE_IN_ALL +gpointer g_type_interface_peek (gpointer instance_class, + GType iface_type); +GLIB_AVAILABLE_IN_ALL +gpointer g_type_interface_peek_parent (gpointer g_iface); + +GLIB_AVAILABLE_IN_ALL +gpointer g_type_default_interface_ref (GType g_type); +GLIB_AVAILABLE_IN_ALL +gpointer g_type_default_interface_peek (GType g_type); +GLIB_AVAILABLE_IN_ALL +void g_type_default_interface_unref (gpointer g_iface); + +/* g_free() the returned arrays */ +GLIB_AVAILABLE_IN_ALL +GType* g_type_children (GType type, + guint *n_children); +GLIB_AVAILABLE_IN_ALL +GType* g_type_interfaces (GType type, + guint *n_interfaces); + +/* per-type _static_ data */ +GLIB_AVAILABLE_IN_ALL +void g_type_set_qdata (GType type, + GQuark quark, + gpointer data); +GLIB_AVAILABLE_IN_ALL +gpointer g_type_get_qdata (GType type, + GQuark quark); +GLIB_AVAILABLE_IN_ALL +void g_type_query (GType type, + GTypeQuery *query); + +GLIB_AVAILABLE_IN_2_44 +int g_type_get_instance_count (GType type); + +/* --- type registration --- */ +/** + * GBaseInitFunc: + * @g_class: (type GObject.TypeClass): The #GTypeClass structure to initialize + * + * A callback function used by the type system to do base initialization + * of the class structures of derived types. It is called as part of the + * initialization process of all derived classes and should reallocate + * or reset all dynamic class members copied over from the parent class. + * For example, class members (such as strings) that are not sufficiently + * handled by a plain memory copy of the parent class into the derived class + * have to be altered. See GClassInitFunc() for a discussion of the class + * initialization process. + */ +typedef void (*GBaseInitFunc) (gpointer g_class); +/** + * GBaseFinalizeFunc: + * @g_class: (type GObject.TypeClass): The #GTypeClass structure to finalize + * + * A callback function used by the type system to finalize those portions + * of a derived types class structure that were setup from the corresponding + * GBaseInitFunc() function. Class finalization basically works the inverse + * way in which class initialization is performed. + * See GClassInitFunc() for a discussion of the class initialization process. + */ +typedef void (*GBaseFinalizeFunc) (gpointer g_class); +/** + * GClassInitFunc: + * @g_class: (type GObject.TypeClass): The #GTypeClass structure to initialize. + * @class_data: The @class_data member supplied via the #GTypeInfo structure. + * + * A callback function used by the type system to initialize the class + * of a specific type. This function should initialize all static class + * members. + * + * The initialization process of a class involves: + * + * - Copying common members from the parent class over to the + * derived class structure. + * - Zero initialization of the remaining members not copied + * over from the parent class. + * - Invocation of the GBaseInitFunc() initializers of all parent + * types and the class' type. + * - Invocation of the class' GClassInitFunc() initializer. + * + * Since derived classes are partially initialized through a memory copy + * of the parent class, the general rule is that GBaseInitFunc() and + * GBaseFinalizeFunc() should take care of necessary reinitialization + * and release of those class members that were introduced by the type + * that specified these GBaseInitFunc()/GBaseFinalizeFunc(). + * GClassInitFunc() should only care about initializing static + * class members, while dynamic class members (such as allocated strings + * or reference counted resources) are better handled by a GBaseInitFunc() + * for this type, so proper initialization of the dynamic class members + * is performed for class initialization of derived types as well. + * + * An example may help to correspond the intend of the different class + * initializers: + * + * |[<!-- language="C" --> + * typedef struct { + * GObjectClass parent_class; + * gint static_integer; + * gchar *dynamic_string; + * } TypeAClass; + * static void + * type_a_base_class_init (TypeAClass *class) + * { + * class->dynamic_string = g_strdup ("some string"); + * } + * static void + * type_a_base_class_finalize (TypeAClass *class) + * { + * g_free (class->dynamic_string); + * } + * static void + * type_a_class_init (TypeAClass *class) + * { + * class->static_integer = 42; + * } + * + * typedef struct { + * TypeAClass parent_class; + * gfloat static_float; + * GString *dynamic_gstring; + * } TypeBClass; + * static void + * type_b_base_class_init (TypeBClass *class) + * { + * class->dynamic_gstring = g_string_new ("some other string"); + * } + * static void + * type_b_base_class_finalize (TypeBClass *class) + * { + * g_string_free (class->dynamic_gstring); + * } + * static void + * type_b_class_init (TypeBClass *class) + * { + * class->static_float = 3.14159265358979323846; + * } + * ]| + * Initialization of TypeBClass will first cause initialization of + * TypeAClass (derived classes reference their parent classes, see + * g_type_class_ref() on this). + * + * Initialization of TypeAClass roughly involves zero-initializing its fields, + * then calling its GBaseInitFunc() type_a_base_class_init() to allocate + * its dynamic members (dynamic_string), and finally calling its GClassInitFunc() + * type_a_class_init() to initialize its static members (static_integer). + * The first step in the initialization process of TypeBClass is then + * a plain memory copy of the contents of TypeAClass into TypeBClass and + * zero-initialization of the remaining fields in TypeBClass. + * The dynamic members of TypeAClass within TypeBClass now need + * reinitialization which is performed by calling type_a_base_class_init() + * with an argument of TypeBClass. + * + * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init() + * is called to allocate the dynamic members of TypeBClass (dynamic_gstring), + * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(), + * is called to complete the initialization process with the static members + * (static_float). + * + * Corresponding finalization counter parts to the GBaseInitFunc() functions + * have to be provided to release allocated resources at class finalization + * time. + */ +typedef void (*GClassInitFunc) (gpointer g_class, + gpointer class_data); +/** + * GClassFinalizeFunc: + * @g_class: (type GObject.TypeClass): The #GTypeClass structure to finalize + * @class_data: The @class_data member supplied via the #GTypeInfo structure + * + * A callback function used by the type system to finalize a class. + * This function is rarely needed, as dynamically allocated class resources + * should be handled by GBaseInitFunc() and GBaseFinalizeFunc(). + * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo + * structure of a static type is invalid, because classes of static types + * will never be finalized (they are artificially kept alive when their + * reference count drops to zero). + */ +typedef void (*GClassFinalizeFunc) (gpointer g_class, + gpointer class_data); +/** + * GInstanceInitFunc: + * @instance: The instance to initialize + * @g_class: (type GObject.TypeClass): The class of the type the instance is + * created for + * + * A callback function used by the type system to initialize a new + * instance of a type. This function initializes all instance members and + * allocates any resources required by it. + * + * Initialization of a derived instance involves calling all its parent + * types instance initializers, so the class member of the instance + * is altered during its initialization to always point to the class that + * belongs to the type the current initializer was introduced for. + * + * The extended members of @instance are guaranteed to have been filled with + * zeros before this function is called. + */ +typedef void (*GInstanceInitFunc) (GTypeInstance *instance, + gpointer g_class); +/** + * GInterfaceInitFunc: + * @g_iface: (type GObject.TypeInterface): The interface structure to initialize + * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure + * + * A callback function used by the type system to initialize a new + * interface. This function should initialize all internal data and + * allocate any resources required by the interface. + * + * The members of @iface_data are guaranteed to have been filled with + * zeros before this function is called. + */ +typedef void (*GInterfaceInitFunc) (gpointer g_iface, + gpointer iface_data); +/** + * GInterfaceFinalizeFunc: + * @g_iface: (type GObject.TypeInterface): The interface structure to finalize + * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure + * + * A callback function used by the type system to finalize an interface. + * This function should destroy any internal data and release any resources + * allocated by the corresponding GInterfaceInitFunc() function. + */ +typedef void (*GInterfaceFinalizeFunc) (gpointer g_iface, + gpointer iface_data); +/** + * GTypeClassCacheFunc: + * @cache_data: data that was given to the g_type_add_class_cache_func() call + * @g_class: (type GObject.TypeClass): The #GTypeClass structure which is + * unreferenced + * + * A callback function which is called when the reference count of a class + * drops to zero. It may use g_type_class_ref() to prevent the class from + * being freed. You should not call g_type_class_unref() from a + * #GTypeClassCacheFunc function to prevent infinite recursion, use + * g_type_class_unref_uncached() instead. + * + * The functions have to check the class id passed in to figure + * whether they actually want to cache the class of this type, since all + * classes are routed through the same #GTypeClassCacheFunc chain. + * + * Returns: %TRUE to stop further #GTypeClassCacheFuncs from being + * called, %FALSE to continue + */ +typedef gboolean (*GTypeClassCacheFunc) (gpointer cache_data, + GTypeClass *g_class); +/** + * GTypeInterfaceCheckFunc: + * @check_data: data passed to g_type_add_interface_check() + * @g_iface: (type GObject.TypeInterface): the interface that has been + * initialized + * + * A callback called after an interface vtable is initialized. + * See g_type_add_interface_check(). + * + * Since: 2.4 + */ +typedef void (*GTypeInterfaceCheckFunc) (gpointer check_data, + gpointer g_iface); +/** + * GTypeFundamentalFlags: + * @G_TYPE_FLAG_CLASSED: Indicates a classed type + * @G_TYPE_FLAG_INSTANTIATABLE: Indicates an instantiable type (implies classed) + * @G_TYPE_FLAG_DERIVABLE: Indicates a flat derivable type + * @G_TYPE_FLAG_DEEP_DERIVABLE: Indicates a deep derivable type (implies derivable) + * + * Bit masks used to check or determine specific characteristics of a + * fundamental type. + */ +typedef enum /*< skip >*/ +{ + G_TYPE_FLAG_CLASSED = (1 << 0), + G_TYPE_FLAG_INSTANTIATABLE = (1 << 1), + G_TYPE_FLAG_DERIVABLE = (1 << 2), + G_TYPE_FLAG_DEEP_DERIVABLE = (1 << 3) +} GTypeFundamentalFlags; +/** + * GTypeFlags: + * @G_TYPE_FLAG_ABSTRACT: Indicates an abstract type. No instances can be + * created for an abstract type + * @G_TYPE_FLAG_VALUE_ABSTRACT: Indicates an abstract value type, i.e. a type + * that introduces a value table, but can't be used for + * g_value_init() + * + * Bit masks used to check or determine characteristics of a type. + */ +typedef enum /*< skip >*/ +{ + G_TYPE_FLAG_ABSTRACT = (1 << 4), + G_TYPE_FLAG_VALUE_ABSTRACT = (1 << 5) +} GTypeFlags; +/** + * GTypeInfo: + * @class_size: Size of the class structure (required for interface, classed and instantiatable types) + * @base_init: Location of the base initialization function (optional) + * @base_finalize: Location of the base finalization function (optional) + * @class_init: Location of the class initialization function for + * classed and instantiatable types. Location of the default vtable + * inititalization function for interface types. (optional) This function + * is used both to fill in virtual functions in the class or default vtable, + * and to do type-specific setup such as registering signals and object + * properties. + * @class_finalize: Location of the class finalization function for + * classed and instantiatable types. Location of the default vtable + * finalization function for interface types. (optional) + * @class_data: User-supplied data passed to the class init/finalize functions + * @instance_size: Size of the instance (object) structure (required for instantiatable types only) + * @n_preallocs: Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the [slice allocator][glib-Memory-Slices] now. + * @instance_init: Location of the instance initialization function (optional, for instantiatable types only) + * @value_table: A #GTypeValueTable function table for generic handling of GValues + * of this type (usually only useful for fundamental types) + * + * This structure is used to provide the type system with the information + * required to initialize and destruct (finalize) a type's class and + * its instances. + * + * The initialized structure is passed to the g_type_register_static() function + * (or is copied into the provided #GTypeInfo structure in the + * g_type_plugin_complete_type_info()). The type system will perform a deep + * copy of this structure, so its memory does not need to be persistent + * across invocation of g_type_register_static(). + */ +struct _GTypeInfo +{ + /* interface types, classed types, instantiated types */ + guint16 class_size; + + GBaseInitFunc base_init; + GBaseFinalizeFunc base_finalize; + + /* interface types, classed types, instantiated types */ + GClassInitFunc class_init; + GClassFinalizeFunc class_finalize; + gconstpointer class_data; + + /* instantiated types */ + guint16 instance_size; + guint16 n_preallocs; + GInstanceInitFunc instance_init; + + /* value handling */ + const GTypeValueTable *value_table; +}; +/** + * GTypeFundamentalInfo: + * @type_flags: #GTypeFundamentalFlags describing the characteristics of the fundamental type + * + * A structure that provides information to the type system which is + * used specifically for managing fundamental types. + */ +struct _GTypeFundamentalInfo +{ + GTypeFundamentalFlags type_flags; +}; +/** + * GInterfaceInfo: + * @interface_init: location of the interface initialization function + * @interface_finalize: location of the interface finalization function + * @interface_data: user-supplied data passed to the interface init/finalize functions + * + * A structure that provides information to the type system which is + * used specifically for managing interface types. + */ +struct _GInterfaceInfo +{ + GInterfaceInitFunc interface_init; + GInterfaceFinalizeFunc interface_finalize; + gpointer interface_data; +}; +/** + * GTypeValueTable: + * @value_init: Default initialize @values contents by poking values + * directly into the value->data array. The data array of + * the #GValue passed into this function was zero-filled + * with `memset()`, so no care has to be taken to free any + * old contents. E.g. for the implementation of a string + * value that may never be %NULL, the implementation might + * look like: + * |[<!-- language="C" --> + * value->data[0].v_pointer = g_strdup (""); + * ]| + * @value_free: Free any old contents that might be left in the + * data array of the passed in @value. No resources may + * remain allocated through the #GValue contents after + * this function returns. E.g. for our above string type: + * |[<!-- language="C" --> + * // only free strings without a specific flag for static storage + * if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS)) + * g_free (value->data[0].v_pointer); + * ]| + * @value_copy: @dest_value is a #GValue with zero-filled data section + * and @src_value is a properly setup #GValue of same or + * derived type. + * The purpose of this function is to copy the contents of + * @src_value into @dest_value in a way, that even after + * @src_value has been freed, the contents of @dest_value + * remain valid. String type example: + * |[<!-- language="C" --> + * dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer); + * ]| + * @value_peek_pointer: If the value contents fit into a pointer, such as objects + * or strings, return this pointer, so the caller can peek at + * the current contents. To extend on our above string example: + * |[<!-- language="C" --> + * return value->data[0].v_pointer; + * ]| + * @collect_format: A string format describing how to collect the contents of + * this value bit-by-bit. Each character in the format represents + * an argument to be collected, and the characters themselves indicate + * the type of the argument. Currently supported arguments are: + * - 'i' - Integers. passed as collect_values[].v_int. + * - 'l' - Longs. passed as collect_values[].v_long. + * - 'd' - Doubles. passed as collect_values[].v_double. + * - 'p' - Pointers. passed as collect_values[].v_pointer. + * It should be noted that for variable argument list construction, + * ANSI C promotes every type smaller than an integer to an int, and + * floats to doubles. So for collection of short int or char, 'i' + * needs to be used, and for collection of floats 'd'. + * @collect_value: The collect_value() function is responsible for converting the + * values collected from a variable argument list into contents + * suitable for storage in a GValue. This function should setup + * @value similar to value_init(); e.g. for a string value that + * does not allow %NULL pointers, it needs to either spew an error, + * or do an implicit conversion by storing an empty string. + * The @value passed in to this function has a zero-filled data + * array, so just like for value_init() it is guaranteed to not + * contain any old contents that might need freeing. + * @n_collect_values is exactly the string length of @collect_format, + * and @collect_values is an array of unions #GTypeCValue with + * length @n_collect_values, containing the collected values + * according to @collect_format. + * @collect_flags is an argument provided as a hint by the caller. + * It may contain the flag %G_VALUE_NOCOPY_CONTENTS indicating, + * that the collected value contents may be considered "static" + * for the duration of the @value lifetime. + * Thus an extra copy of the contents stored in @collect_values is + * not required for assignment to @value. + * For our above string example, we continue with: + * |[<!-- language="C" --> + * if (!collect_values[0].v_pointer) + * value->data[0].v_pointer = g_strdup (""); + * else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) + * { + * value->data[0].v_pointer = collect_values[0].v_pointer; + * // keep a flag for the value_free() implementation to not free this string + * value->data[1].v_uint = G_VALUE_NOCOPY_CONTENTS; + * } + * else + * value->data[0].v_pointer = g_strdup (collect_values[0].v_pointer); + * return NULL; + * ]| + * It should be noted, that it is generally a bad idea to follow the + * #G_VALUE_NOCOPY_CONTENTS hint for reference counted types. Due to + * reentrancy requirements and reference count assertions performed + * by the signal emission code, reference counts should always be + * incremented for reference counted contents stored in the value->data + * array. To deviate from our string example for a moment, and taking + * a look at an exemplary implementation for collect_value() of + * #GObject: + * |[<!-- language="C" --> + * if (collect_values[0].v_pointer) + * { + * GObject *object = G_OBJECT (collect_values[0].v_pointer); + * // never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types + * value->data[0].v_pointer = g_object_ref (object); + * return NULL; + * } + * else + * return g_strdup_printf ("Object passed as invalid NULL pointer"); + * } + * ]| + * The reference count for valid objects is always incremented, + * regardless of @collect_flags. For invalid objects, the example + * returns a newly allocated string without altering @value. + * Upon success, collect_value() needs to return %NULL. If, however, + * an error condition occurred, collect_value() may spew an + * error by returning a newly allocated non-%NULL string, giving + * a suitable description of the error condition. + * The calling code makes no assumptions about the @value + * contents being valid upon error returns, @value + * is simply thrown away without further freeing. As such, it is + * a good idea to not allocate #GValue contents, prior to returning + * an error, however, collect_values() is not obliged to return + * a correctly setup @value for error returns, simply because + * any non-%NULL return is considered a fatal condition so further + * program behaviour is undefined. + * @lcopy_format: Format description of the arguments to collect for @lcopy_value, + * analogous to @collect_format. Usually, @lcopy_format string consists + * only of 'p's to provide lcopy_value() with pointers to storage locations. + * @lcopy_value: This function is responsible for storing the @value contents into + * arguments passed through a variable argument list which got + * collected into @collect_values according to @lcopy_format. + * @n_collect_values equals the string length of @lcopy_format, + * and @collect_flags may contain %G_VALUE_NOCOPY_CONTENTS. + * In contrast to collect_value(), lcopy_value() is obliged to + * always properly support %G_VALUE_NOCOPY_CONTENTS. + * Similar to collect_value() the function may prematurely abort + * by returning a newly allocated string describing an error condition. + * To complete the string example: + * |[<!-- language="C" --> + * gchar **string_p = collect_values[0].v_pointer; + * if (!string_p) + * return g_strdup_printf ("string location passed as NULL"); + * if (collect_flags & G_VALUE_NOCOPY_CONTENTS) + * *string_p = value->data[0].v_pointer; + * else + * *string_p = g_strdup (value->data[0].v_pointer); + * ]| + * And an illustrative version of lcopy_value() for + * reference-counted types: + * |[<!-- language="C" --> + * GObject **object_p = collect_values[0].v_pointer; + * if (!object_p) + * return g_strdup_printf ("object location passed as NULL"); + * if (!value->data[0].v_pointer) + * *object_p = NULL; + * else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) // always honour + * *object_p = value->data[0].v_pointer; + * else + * *object_p = g_object_ref (value->data[0].v_pointer); + * return NULL; + * ]| + * + * The #GTypeValueTable provides the functions required by the #GValue + * implementation, to serve as a container for values of a type. + */ + +struct _GTypeValueTable +{ + void (*value_init) (GValue *value); + void (*value_free) (GValue *value); + void (*value_copy) (const GValue *src_value, + GValue *dest_value); + /* varargs functionality (optional) */ + gpointer (*value_peek_pointer) (const GValue *value); + const gchar *collect_format; + gchar* (*collect_value) (GValue *value, + guint n_collect_values, + GTypeCValue *collect_values, + guint collect_flags); + const gchar *lcopy_format; + gchar* (*lcopy_value) (const GValue *value, + guint n_collect_values, + GTypeCValue *collect_values, + guint collect_flags); +}; +GLIB_AVAILABLE_IN_ALL +GType g_type_register_static (GType parent_type, + const gchar *type_name, + const GTypeInfo *info, + GTypeFlags flags); +GLIB_AVAILABLE_IN_ALL +GType g_type_register_static_simple (GType parent_type, + const gchar *type_name, + guint class_size, + GClassInitFunc class_init, + guint instance_size, + GInstanceInitFunc instance_init, + GTypeFlags flags); + +GLIB_AVAILABLE_IN_ALL +GType g_type_register_dynamic (GType parent_type, + const gchar *type_name, + GTypePlugin *plugin, + GTypeFlags flags); +GLIB_AVAILABLE_IN_ALL +GType g_type_register_fundamental (GType type_id, + const gchar *type_name, + const GTypeInfo *info, + const GTypeFundamentalInfo *finfo, + GTypeFlags flags); +GLIB_AVAILABLE_IN_ALL +void g_type_add_interface_static (GType instance_type, + GType interface_type, + const GInterfaceInfo *info); +GLIB_AVAILABLE_IN_ALL +void g_type_add_interface_dynamic (GType instance_type, + GType interface_type, + GTypePlugin *plugin); +GLIB_AVAILABLE_IN_ALL +void g_type_interface_add_prerequisite (GType interface_type, + GType prerequisite_type); +GLIB_AVAILABLE_IN_ALL +GType*g_type_interface_prerequisites (GType interface_type, + guint *n_prerequisites); +GLIB_AVAILABLE_IN_ALL +void g_type_class_add_private (gpointer g_class, + gsize private_size); +GLIB_AVAILABLE_IN_2_38 +gint g_type_add_instance_private (GType class_type, + gsize private_size); +GLIB_AVAILABLE_IN_ALL +gpointer g_type_instance_get_private (GTypeInstance *instance, + GType private_type); +GLIB_AVAILABLE_IN_2_38 +void g_type_class_adjust_private_offset (gpointer g_class, + gint *private_size_or_offset); + +GLIB_AVAILABLE_IN_ALL +void g_type_add_class_private (GType class_type, + gsize private_size); +GLIB_AVAILABLE_IN_ALL +gpointer g_type_class_get_private (GTypeClass *klass, + GType private_type); +GLIB_AVAILABLE_IN_2_38 +gint g_type_class_get_instance_private_offset (gpointer g_class); + +GLIB_AVAILABLE_IN_2_34 +void g_type_ensure (GType type); +GLIB_AVAILABLE_IN_2_36 +guint g_type_get_type_registration_serial (void); + + +/* --- GType boilerplate --- */ +/** + * G_DECLARE_FINAL_TYPE: + * @ModuleObjName: The name of the new type, in camel case (like GtkWidget) + * @module_obj_name: The name of the new type in lowercase, with words + * separated by '_' (like 'gtk_widget') + * @MODULE: The name of the module, in all caps (like 'GTK') + * @OBJ_NAME: The bare name of the type, in all caps (like 'WIDGET') + * @ParentName: the name of the parent type, in camel case (like GtkWidget) + * + * A convenience macro for emitting the usual declarations in the header file for a type which is not (at the + * present time) intended to be subclassed. + * + * You might use it in a header as follows: + * + * |[ + * #ifndef _myapp_window_h_ + * #define _myapp_window_h_ + * + * #include <gtk/gtk.h> + * + * #define MY_APP_TYPE_WINDOW my_app_window_get_type () + * G_DECLARE_FINAL_TYPE (MyAppWindow, my_app_window, MY_APP, WINDOW, GtkWindow) + * + * MyAppWindow * my_app_window_new (void); + * + * ... + * + * #endif + * ]| + * + * This results in the following things happening: + * + * - the usual my_app_window_get_type() function is declared with a return type of #GType + * + * - the MyAppWindow types is defined as a typedef of struct _MyAppWindow. The struct itself is not + * defined and should be defined from the .c file before G_DEFINE_TYPE() is used. + * + * - the MY_APP_WINDOW() cast is emitted as static inline function along with the MY_APP_IS_WINDOW() type + * checking function + * + * - the MyAppWindowClass type is defined as a struct containing GtkWindowClass. This is done for the + * convenience of the person defining the type and should not be considered to be part of the ABI. In + * particular, without a firm declaration of the instance structure, it is not possible to subclass the type + * and therefore the fact that the size of the class structure is exposed is not a concern and it can be + * freely changed at any point in the future. + * + * - g_autoptr() support being added for your type, based on the type of your parent class + * + * You can only use this function if your parent type also supports g_autoptr(). + * + * Because the type macro (MY_APP_TYPE_WINDOW in the above example) is not a callable, you must continue to + * manually define this as a macro for yourself. + * + * The declaration of the _get_type() function is the first thing emitted by the macro. This allows this macro + * to be used in the usual way with export control and API versioning macros. + * + * If you want to declare your own class structure, use G_DECLARE_DERIVABLE_TYPE(). + * + * If you are writing a library, it is important to note that it is possible to convert a type from using + * G_DECLARE_FINAL_TYPE() to G_DECLARE_DERIVABLE_TYPE() without breaking API or ABI. As a precaution, you + * should therefore use G_DECLARE_FINAL_TYPE() until you are sure that it makes sense for your class to be + * subclassed. Once a class structure has been exposed it is not possible to change its size or remove or + * reorder items without breaking the API and/or ABI. + * + * Since: 2.44 + **/ +#define G_DECLARE_FINAL_TYPE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName) \ + GType module_obj_name##_get_type (void); \ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + typedef struct _##ModuleObjName ModuleObjName; \ + typedef struct { ParentName##Class parent_class; } ModuleObjName##Class; \ + \ + _GLIB_DEFINE_AUTOPTR_CHAINUP (ModuleObjName, ParentName) \ + \ + static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) { \ + return G_TYPE_CHECK_INSTANCE_CAST (ptr, module_obj_name##_get_type (), ModuleObjName); } \ + static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) { \ + return G_TYPE_CHECK_INSTANCE_TYPE (ptr, module_obj_name##_get_type ()); } \ + G_GNUC_END_IGNORE_DEPRECATIONS + +/** + * G_DECLARE_DERIVABLE_TYPE: + * @ModuleObjName: The name of the new type, in camel case (like GtkWidget) + * @module_obj_name: The name of the new type in lowercase, with words + * separated by '_' (like 'gtk_widget') + * @MODULE: The name of the module, in all caps (like 'GTK') + * @OBJ_NAME: The bare name of the type, in all caps (like 'WIDGET') + * @ParentName: the name of the parent type, in camel case (like GtkWidget) + * + * A convenience macro for emitting the usual declarations in the header file for a type which will is intended + * to be subclassed. + * + * You might use it in a header as follows: + * + * |[ + * #ifndef _gtk_frobber_h_ + * #define _gtk_frobber_h_ + * + * #define GTK_TYPE_FROBBER gtk_frobber_get_type () + * GDK_AVAILABLE_IN_3_12 + * G_DECLARE_DERIVABLE_TYPE (GtkFrobber, gtk_frobber, GTK, FROBBER, GtkWidget) + * + * struct _GtkFrobberClass + * { + * GtkWidgetClass parent_class; + * + * void (* handle_frob) (GtkFrobber *frobber, + * guint n_frobs); + * + * gpointer padding[12]; + * }; + * + * GtkWidget * gtk_frobber_new (void); + * + * ... + * + * #endif + * ]| + * + * This results in the following things happening: + * + * - the usual gtk_frobber_get_type() function is declared with a return type of #GType + * + * - the GtkFrobber struct is created with GtkWidget as the first and only item. You are expected to use + * a private structure from your .c file to store your instance variables. + * + * - the GtkFrobberClass type is defined as a typedef to struct _GtkFrobberClass, which is left undefined. + * You should do this from the header file directly after you use the macro. + * + * - the GTK_FROBBER() and GTK_FROBBER_CLASS() casts are emitted as static inline functions along with + * the GTK_IS_FROBBER() and GTK_IS_FROBBER_CLASS() type checking functions and GTK_FROBBER_GET_CLASS() + * function. + * + * - g_autoptr() support being added for your type, based on the type of your parent class + * + * You can only use this function if your parent type also supports g_autoptr(). + * + * Because the type macro (GTK_TYPE_FROBBER in the above example) is not a callable, you must continue to + * manually define this as a macro for yourself. + * + * The declaration of the _get_type() function is the first thing emitted by the macro. This allows this macro + * to be used in the usual way with export control and API versioning macros. + * + * If you are writing a library, it is important to note that it is possible to convert a type from using + * G_DECLARE_FINAL_TYPE() to G_DECLARE_DERIVABLE_TYPE() without breaking API or ABI. As a precaution, you + * should therefore use G_DECLARE_FINAL_TYPE() until you are sure that it makes sense for your class to be + * subclassed. Once a class structure has been exposed it is not possible to change its size or remove or + * reorder items without breaking the API and/or ABI. If you want to declare your own class structure, use + * G_DECLARE_DERIVABLE_TYPE(). If you want to declare a class without exposing the class or instance + * structures, use G_DECLARE_FINAL_TYPE(). + * + * If you must use G_DECLARE_DERIVABLE_TYPE() you should be sure to include some padding at the bottom of your + * class structure to leave space for the addition of future virtual functions. + * + * Since: 2.44 + **/ +#define G_DECLARE_DERIVABLE_TYPE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName) \ + GType module_obj_name##_get_type (void); \ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + typedef struct _##ModuleObjName ModuleObjName; \ + typedef struct _##ModuleObjName##Class ModuleObjName##Class; \ + struct _##ModuleObjName { ParentName parent_instance; }; \ + \ + _GLIB_DEFINE_AUTOPTR_CHAINUP (ModuleObjName, ParentName) \ + \ + static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) { \ + return G_TYPE_CHECK_INSTANCE_CAST (ptr, module_obj_name##_get_type (), ModuleObjName); } \ + static inline ModuleObjName##Class * MODULE##_##OBJ_NAME##_CLASS (gpointer ptr) { \ + return G_TYPE_CHECK_CLASS_CAST (ptr, module_obj_name##_get_type (), ModuleObjName##Class); } \ + static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) { \ + return G_TYPE_CHECK_INSTANCE_TYPE (ptr, module_obj_name##_get_type ()); } \ + static inline gboolean MODULE##_IS_##OBJ_NAME##_CLASS (gpointer ptr) { \ + return G_TYPE_CHECK_CLASS_TYPE (ptr, module_obj_name##_get_type ()); } \ + static inline ModuleObjName##Class * MODULE##_##OBJ_NAME##_GET_CLASS (gpointer ptr) { \ + return G_TYPE_INSTANCE_GET_CLASS (ptr, module_obj_name##_get_type (), ModuleObjName##Class); } \ + G_GNUC_END_IGNORE_DEPRECATIONS + +/** + * G_DECLARE_INTERFACE: + * @ModuleObjName: The name of the new type, in camel case (like GtkWidget) + * @module_obj_name: The name of the new type in lowercase, with words + * separated by '_' (like 'gtk_widget') + * @MODULE: The name of the module, in all caps (like 'GTK') + * @OBJ_NAME: The bare name of the type, in all caps (like 'WIDGET') + * @PrerequisiteName: the name of the prerequisite type, in camel case (like GtkWidget) + * + * A convenience macro for emitting the usual declarations in the header file for a GInterface type. + * + * You might use it in a header as follows: + * + * |[ + * #ifndef _my_model_h_ + * #define _my_model_h_ + * + * #define MY_TYPE_MODEL my_model_get_type () + * GDK_AVAILABLE_IN_3_12 + * G_DECLARE_INTERFACE (MyModel, my_model, MY, MODEL, GObject) + * + * struct _MyModelInterface + * { + * GTypeInterface g_iface; + * + * gpointer (* get_item) (MyModel *model); + * }; + * + * gpointer my_model_get_item (MyModel *model); + * + * ... + * + * #endif + * ]| + * + * This results in the following things happening: + * + * - the usual my_model_get_type() function is declared with a return type of #GType + * + * - the MyModelInterface type is defined as a typedef to struct _MyModelInterface, + * which is left undefined. You should do this from the header file directly after + * you use the macro. + * + * - the MY_MODEL() cast is emitted as static inline functions along with + * the MY_IS_MODEL() type checking function and MY_MODEL_GET_IFACE() function. + * + * - g_autoptr() support being added for your type, based on your prerequisite type. + * + * You can only use this function if your prerequisite type also supports g_autoptr(). + * + * Because the type macro (MY_TYPE_MODEL in the above example) is not a callable, you must continue to + * manually define this as a macro for yourself. + * + * The declaration of the _get_type() function is the first thing emitted by the macro. This allows this macro + * to be used in the usual way with export control and API versioning macros. + * + * Since: 2.44 + **/ +#define G_DECLARE_INTERFACE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, PrerequisiteName) \ + GType module_obj_name##_get_type (void); \ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + typedef struct _##ModuleObjName ModuleObjName; \ + typedef struct _##ModuleObjName##Interface ModuleObjName##Interface; \ + \ + _GLIB_DEFINE_AUTOPTR_CHAINUP (ModuleObjName, PrerequisiteName) \ + \ + static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) { \ + return G_TYPE_CHECK_INSTANCE_CAST (ptr, module_obj_name##_get_type (), ModuleObjName); } \ + static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) { \ + return G_TYPE_CHECK_INSTANCE_TYPE (ptr, module_obj_name##_get_type ()); } \ + static inline ModuleObjName##Interface * MODULE##_##OBJ_NAME##_GET_IFACE (gpointer ptr) { \ + return G_TYPE_INSTANCE_GET_INTERFACE (ptr, module_obj_name##_get_type (), ModuleObjName##Interface); } \ + G_GNUC_END_IGNORE_DEPRECATIONS + +/** + * G_DEFINE_TYPE: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type, in lowercase, with words + * separated by '_'. + * @T_P: The #GType of the parent type. + * + * A convenience macro for type implementations, which declares a class + * initialization function, an instance initialization function (see #GTypeInfo + * for information about these) and a static variable named `t_n_parent_class` + * pointing to the parent class. Furthermore, it defines a *_get_type() function. + * See G_DEFINE_TYPE_EXTENDED() for an example. + * + * Since: 2.4 + */ +#define G_DEFINE_TYPE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {}) +/** + * G_DEFINE_TYPE_WITH_CODE: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type in lowercase, with words separated by '_'. + * @T_P: The #GType of the parent type. + * @_C_: Custom code that gets inserted in the *_get_type() function. + * + * A convenience macro for type implementations. + * Similar to G_DEFINE_TYPE(), but allows you to insert custom code into the + * *_get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE(). + * See G_DEFINE_TYPE_EXTENDED() for an example. + * + * Since: 2.4 + */ +#define G_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 0) {_C_;} _G_DEFINE_TYPE_EXTENDED_END() +/** + * G_DEFINE_TYPE_WITH_PRIVATE: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type, in lowercase, with words + * separated by '_'. + * @T_P: The #GType of the parent type. + * + * A convenience macro for type implementations, which declares a class + * initialization function, an instance initialization function (see #GTypeInfo + * for information about these), a static variable named `t_n_parent_class` + * pointing to the parent class, and adds private instance data to the type. + * Furthermore, it defines a *_get_type() function. See G_DEFINE_TYPE_EXTENDED() + * for an example. + * + * Note that private structs added with this macros must have a struct + * name of the form @TN Private. + * + * Since: 2.38 + */ +#define G_DEFINE_TYPE_WITH_PRIVATE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, G_ADD_PRIVATE (TN)) +/** + * G_DEFINE_ABSTRACT_TYPE: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type, in lowercase, with words + * separated by '_'. + * @T_P: The #GType of the parent type. + * + * A convenience macro for type implementations. + * Similar to G_DEFINE_TYPE(), but defines an abstract type. + * See G_DEFINE_TYPE_EXTENDED() for an example. + * + * Since: 2.4 + */ +#define G_DEFINE_ABSTRACT_TYPE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, {}) +/** + * G_DEFINE_ABSTRACT_TYPE_WITH_CODE: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type, in lowercase, with words + * separated by '_'. + * @T_P: The #GType of the parent type. + * @_C_: Custom code that gets inserted in the @type_name_get_type() function. + * + * A convenience macro for type implementations. + * Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and + * allows you to insert custom code into the *_get_type() function, e.g. + * interface implementations via G_IMPLEMENT_INTERFACE(). + * See G_DEFINE_TYPE_EXTENDED() for an example. + * + * Since: 2.4 + */ +#define G_DEFINE_ABSTRACT_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT) {_C_;} _G_DEFINE_TYPE_EXTENDED_END() +/** + * G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type, in lowercase, with words + * separated by '_'. + * @T_P: The #GType of the parent type. + * + * Similar to G_DEFINE_TYPE_WITH_PRIVATE(), but defines an abstract type. + * See G_DEFINE_TYPE_EXTENDED() for an example. + * + * Since: 2.38 + */ +#define G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, G_ADD_PRIVATE (TN)) +/** + * G_DEFINE_TYPE_EXTENDED: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type, in lowercase, with words + * separated by '_'. + * @T_P: The #GType of the parent type. + * @_f_: #GTypeFlags to pass to g_type_register_static() + * @_C_: Custom code that gets inserted in the *_get_type() function. + * + * The most general convenience macro for type implementations, on which + * G_DEFINE_TYPE(), etc are based. + * + * |[<!-- language="C" --> + * G_DEFINE_TYPE_EXTENDED (GtkGadget, + * gtk_gadget, + * GTK_TYPE_WIDGET, + * 0, + * G_IMPLEMENT_INTERFACE (TYPE_GIZMO, + * gtk_gadget_gizmo_init)); + * ]| + * expands to + * |[<!-- language="C" --> + * static void gtk_gadget_init (GtkGadget *self); + * static void gtk_gadget_class_init (GtkGadgetClass *klass); + * static gpointer gtk_gadget_parent_class = NULL; + * static void gtk_gadget_class_intern_init (gpointer klass) + * { + * gtk_gadget_parent_class = g_type_class_peek_parent (klass); + * gtk_gadget_class_init ((GtkGadgetClass*) klass); + * } + * + * GType + * gtk_gadget_get_type (void) + * { + * static volatile gsize g_define_type_id__volatile = 0; + * if (g_once_init_enter (&g_define_type_id__volatile)) + * { + * GType g_define_type_id = + * g_type_register_static_simple (GTK_TYPE_WIDGET, + * g_intern_static_string ("GtkGadget"), + * sizeof (GtkGadgetClass), + * (GClassInitFunc) gtk_gadget_class_intern_init, + * sizeof (GtkGadget), + * (GInstanceInitFunc) gtk_gadget_init, + * 0); + * { + * const GInterfaceInfo g_implement_interface_info = { + * (GInterfaceInitFunc) gtk_gadget_gizmo_init + * }; + * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info); + * } + * g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + * } + * return g_define_type_id__volatile; + * } + * ]| + * The only pieces which have to be manually provided are the definitions of + * the instance and class structure and the definitions of the instance and + * class init functions. + * + * Since: 2.4 + */ +#define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;} _G_DEFINE_TYPE_EXTENDED_END() + +/** + * G_DEFINE_INTERFACE: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type, in lowercase, with words separated by '_'. + * @T_P: The #GType of the prerequisite type for the interface, or 0 + * (%G_TYPE_INVALID) for no prerequisite type. + * + * A convenience macro for #GTypeInterface definitions, which declares + * a default vtable initialization function and defines a *_get_type() + * function. + * + * The macro expects the interface initialization function to have the + * name `t_n ## _default_init`, and the interface structure to have the + * name `TN ## Interface`. + * + * Since: 2.24 + */ +#define G_DEFINE_INTERFACE(TN, t_n, T_P) G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, ;) + +/** + * G_DEFINE_INTERFACE_WITH_CODE: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type, in lowercase, with words separated by '_'. + * @T_P: The #GType of the prerequisite type for the interface, or 0 + * (%G_TYPE_INVALID) for no prerequisite type. + * @_C_: Custom code that gets inserted in the *_get_type() function. + * + * A convenience macro for #GTypeInterface definitions. Similar to + * G_DEFINE_INTERFACE(), but allows you to insert custom code into the + * *_get_type() function, e.g. additional interface implementations + * via G_IMPLEMENT_INTERFACE(), or additional prerequisite types. See + * G_DEFINE_TYPE_EXTENDED() for a similar example using + * G_DEFINE_TYPE_WITH_CODE(). + * + * Since: 2.24 + */ +#define G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_INTERFACE_EXTENDED_BEGIN(TN, t_n, T_P) {_C_;} _G_DEFINE_INTERFACE_EXTENDED_END() + +/** + * G_IMPLEMENT_INTERFACE: + * @TYPE_IFACE: The #GType of the interface to add + * @iface_init: The interface init function + * + * A convenience macro to ease interface addition in the `_C_` section + * of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE(). + * See G_DEFINE_TYPE_EXTENDED() for an example. + * + * Note that this macro can only be used together with the G_DEFINE_TYPE_* + * macros, since it depends on variable names from those macros. + * + * Since: 2.4 + */ +#define G_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init) { \ + const GInterfaceInfo g_implement_interface_info = { \ + (GInterfaceInitFunc)(void (*)(void)) iface_init, NULL, NULL \ + }; \ + g_type_add_interface_static (g_define_type_id, TYPE_IFACE, &g_implement_interface_info); \ +} + +/** + * G_ADD_PRIVATE: + * @TypeName: the name of the type in CamelCase + * + * A convenience macro to ease adding private data to instances of a new type + * in the @_C_ section of G_DEFINE_TYPE_WITH_CODE() or + * G_DEFINE_ABSTRACT_TYPE_WITH_CODE(). + * + * For instance: + * + * |[<!-- language="C" --> + * typedef struct _MyObject MyObject; + * typedef struct _MyObjectClass MyObjectClass; + * + * typedef struct { + * gint foo; + * gint bar; + * } MyObjectPrivate; + * + * G_DEFINE_TYPE_WITH_CODE (MyObject, my_object, G_TYPE_OBJECT, + * G_ADD_PRIVATE (MyObject)) + * ]| + * + * Will add MyObjectPrivate as the private data to any instance of the MyObject + * type. + * + * G_DEFINE_TYPE_* macros will automatically create a private function + * based on the arguments to this macro, which can be used to safely + * retrieve the private data from an instance of the type; for instance: + * + * |[<!-- language="C" --> + * gint + * my_object_get_foo (MyObject *obj) + * { + * MyObjectPrivate *priv = my_object_get_instance_private (obj); + * + * g_return_val_if_fail (MY_IS_OBJECT (obj), 0); + * + * return priv->foo; + * } + * + * void + * my_object_set_bar (MyObject *obj, + * gint bar) + * { + * MyObjectPrivate *priv = my_object_get_instance_private (obj); + * + * g_return_if_fail (MY_IS_OBJECT (obj)); + * + * if (priv->bar != bar) + * priv->bar = bar; + * } + * ]| + * + * Note that this macro can only be used together with the G_DEFINE_TYPE_* + * macros, since it depends on variable names from those macros. + * + * Also note that private structs added with these macros must have a struct + * name of the form `TypeNamePrivate`. + * + * It is safe to call _get_instance_private on %NULL or invalid object since + * it's only adding an offset to the instance pointer. In that case the returned + * pointer must not be dereferenced. + * + * Since: 2.38 + */ +#define G_ADD_PRIVATE(TypeName) { \ + TypeName##_private_offset = \ + g_type_add_instance_private (g_define_type_id, sizeof (TypeName##Private)); \ +} + +/** + * G_PRIVATE_OFFSET: + * @TypeName: the name of the type in CamelCase + * @field: the name of the field in the private data structure + * + * Evaluates to the offset of the @field inside the instance private data + * structure for @TypeName. + * + * Note that this macro can only be used together with the G_DEFINE_TYPE_* + * and G_ADD_PRIVATE() macros, since it depends on variable names from + * those macros. + * + * Since: 2.38 + */ +#define G_PRIVATE_OFFSET(TypeName, field) \ + (TypeName##_private_offset + (G_STRUCT_OFFSET (TypeName##Private, field))) + +/** + * G_PRIVATE_FIELD_P: + * @TypeName: the name of the type in CamelCase + * @inst: the instance of @TypeName you wish to access + * @field_name: the name of the field in the private data structure + * + * Evaluates to a pointer to the @field_name inside the @inst private data + * structure for @TypeName. + * + * Note that this macro can only be used together with the G_DEFINE_TYPE_* + * and G_ADD_PRIVATE() macros, since it depends on variable names from + * those macros. + * + * Since: 2.38 + */ +#define G_PRIVATE_FIELD_P(TypeName, inst, field_name) \ + G_STRUCT_MEMBER_P (inst, G_PRIVATE_OFFSET (TypeName, field_name)) + +/** + * G_PRIVATE_FIELD: + * @TypeName: the name of the type in CamelCase + * @inst: the instance of @TypeName you wish to access + * @field_type: the type of the field in the private data structure + * @field_name: the name of the field in the private data structure + * + * Evaluates to the @field_name inside the @inst private data + * structure for @TypeName. + * + * Note that this macro can only be used together with the G_DEFINE_TYPE_* + * and G_ADD_PRIVATE() macros, since it depends on variable names from + * those macros. + * + * Since: 2.38 + */ +#define G_PRIVATE_FIELD(TypeName, inst, field_type, field_name) \ + G_STRUCT_MEMBER (field_type, inst, G_PRIVATE_OFFSET (TypeName, field_name)) + +/* we need to have this macro under conditional expansion, as it references + * a function that has been added in 2.38. see bug: + * https://bugzilla.gnome.org/show_bug.cgi?id=703191 + */ +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 +#define _G_DEFINE_TYPE_EXTENDED_CLASS_INIT(TypeName, type_name) \ +static void type_name##_class_intern_init (gpointer klass) \ +{ \ + type_name##_parent_class = g_type_class_peek_parent (klass); \ + if (TypeName##_private_offset != 0) \ + g_type_class_adjust_private_offset (klass, &TypeName##_private_offset); \ + type_name##_class_init ((TypeName##Class*) klass); \ +} + +#else +#define _G_DEFINE_TYPE_EXTENDED_CLASS_INIT(TypeName, type_name) \ +static void type_name##_class_intern_init (gpointer klass) \ +{ \ + type_name##_parent_class = g_type_class_peek_parent (klass); \ + type_name##_class_init ((TypeName##Class*) klass); \ +} +#endif /* GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 */ + +/* Added for _G_DEFINE_TYPE_EXTENDED_WITH_PRELUDE */ +#define _G_DEFINE_TYPE_EXTENDED_BEGIN_PRE(TypeName, type_name, TYPE_PARENT) \ +\ +static void type_name##_init (TypeName *self); \ +static void type_name##_class_init (TypeName##Class *klass); \ +static gpointer type_name##_parent_class = NULL; \ +static gint TypeName##_private_offset; \ +\ +_G_DEFINE_TYPE_EXTENDED_CLASS_INIT(TypeName, type_name) \ +\ +G_GNUC_UNUSED \ +static inline gpointer \ +type_name##_get_instance_private (TypeName *self) \ +{ \ + return (G_STRUCT_MEMBER_P (self, TypeName##_private_offset)); \ +} \ +\ +GType \ +type_name##_get_type (void) \ +{ \ + static volatile gsize g_define_type_id__volatile = 0; + /* Prelude goes here */ + +/* Added for _G_DEFINE_TYPE_EXTENDED_WITH_PRELUDE */ +#define _G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER(TypeName, type_name, TYPE_PARENT, flags) \ + if (g_once_init_enter (&g_define_type_id__volatile)) \ + { \ + GType g_define_type_id = \ + g_type_register_static_simple (TYPE_PARENT, \ + g_intern_static_string (#TypeName), \ + sizeof (TypeName##Class), \ + (GClassInitFunc)(void (*)(void)) type_name##_class_intern_init, \ + sizeof (TypeName), \ + (GInstanceInitFunc)(void (*)(void)) type_name##_init, \ + (GTypeFlags) flags); \ + { /* custom code follows */ +#define _G_DEFINE_TYPE_EXTENDED_END() \ + /* following custom code */ \ + } \ + g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \ + } \ + return g_define_type_id__volatile; \ +} /* closes type_name##_get_type() */ + +/* This was defined before we had G_DEFINE_TYPE_WITH_CODE_AND_PRELUDE, it's simplest + * to keep it. + */ +#define _G_DEFINE_TYPE_EXTENDED_BEGIN(TypeName, type_name, TYPE_PARENT, flags) \ + _G_DEFINE_TYPE_EXTENDED_BEGIN_PRE(TypeName, type_name, TYPE_PARENT) \ + _G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER(TypeName, type_name, TYPE_PARENT, flags) \ + +#define _G_DEFINE_INTERFACE_EXTENDED_BEGIN(TypeName, type_name, TYPE_PREREQ) \ +\ +static void type_name##_default_init (TypeName##Interface *klass); \ +\ +GType \ +type_name##_get_type (void) \ +{ \ + static volatile gsize g_define_type_id__volatile = 0; \ + if (g_once_init_enter (&g_define_type_id__volatile)) \ + { \ + GType g_define_type_id = \ + g_type_register_static_simple (G_TYPE_INTERFACE, \ + g_intern_static_string (#TypeName), \ + sizeof (TypeName##Interface), \ + (GClassInitFunc)(void (*)(void)) type_name##_default_init, \ + 0, \ + (GInstanceInitFunc)NULL, \ + (GTypeFlags) 0); \ + if (TYPE_PREREQ) \ + g_type_interface_add_prerequisite (g_define_type_id, TYPE_PREREQ); \ + { /* custom code follows */ +#define _G_DEFINE_INTERFACE_EXTENDED_END() \ + /* following custom code */ \ + } \ + g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \ + } \ + return g_define_type_id__volatile; \ +} /* closes type_name##_get_type() */ + +/** + * G_DEFINE_BOXED_TYPE: + * @TypeName: The name of the new type, in Camel case + * @type_name: The name of the new type, in lowercase, with words + * separated by '_' + * @copy_func: the #GBoxedCopyFunc for the new type + * @free_func: the #GBoxedFreeFunc for the new type + * + * A convenience macro for boxed type implementations, which defines a + * type_name_get_type() function registering the boxed type. + * + * Since: 2.26 + */ +#define G_DEFINE_BOXED_TYPE(TypeName, type_name, copy_func, free_func) G_DEFINE_BOXED_TYPE_WITH_CODE (TypeName, type_name, copy_func, free_func, {}) +/** + * G_DEFINE_BOXED_TYPE_WITH_CODE: + * @TypeName: The name of the new type, in Camel case + * @type_name: The name of the new type, in lowercase, with words + * separated by '_' + * @copy_func: the #GBoxedCopyFunc for the new type + * @free_func: the #GBoxedFreeFunc for the new type + * @_C_: Custom code that gets inserted in the *_get_type() function + * + * A convenience macro for boxed type implementations. + * Similar to G_DEFINE_BOXED_TYPE(), but allows to insert custom code into the + * type_name_get_type() function, e.g. to register value transformations with + * g_value_register_transform_func(), for instance: + * + * |[<!-- language="C" --> + * G_DEFINE_BOXED_TYPE_WITH_CODE (GdkRectangle, gdk_rectangle, + * gdk_rectangle_copy, + * gdk_rectangle_free, + * register_rectangle_transform_funcs (g_define_type_id)) + * ]| + * + * Similarly to the %G_DEFINE_TYPE family of macros, the #GType of the newly + * defined boxed type is exposed in the `g_define_type_id` variable. + * + * Since: 2.26 + */ +#define G_DEFINE_BOXED_TYPE_WITH_CODE(TypeName, type_name, copy_func, free_func, _C_) _G_DEFINE_BOXED_TYPE_BEGIN (TypeName, type_name, copy_func, free_func) {_C_;} _G_DEFINE_TYPE_EXTENDED_END() + +/* Only use this in non-C++ on GCC >= 2.7, except for Darwin/ppc64. + * See https://bugzilla.gnome.org/show_bug.cgi?id=647145 + */ +#if !defined (__cplusplus) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) && !(defined (__APPLE__) && defined (__ppc64__)) +#define _G_DEFINE_BOXED_TYPE_BEGIN(TypeName, type_name, copy_func, free_func) \ +GType \ +type_name##_get_type (void) \ +{ \ + static volatile gsize g_define_type_id__volatile = 0; \ + if (g_once_init_enter (&g_define_type_id__volatile)) \ + { \ + GType (* _g_register_boxed) \ + (const gchar *, \ + union \ + { \ + TypeName * (*do_copy_type) (TypeName *); \ + TypeName * (*do_const_copy_type) (const TypeName *); \ + GBoxedCopyFunc do_copy_boxed; \ + } __attribute__((__transparent_union__)), \ + union \ + { \ + void (* do_free_type) (TypeName *); \ + GBoxedFreeFunc do_free_boxed; \ + } __attribute__((__transparent_union__)) \ + ) = g_boxed_type_register_static; \ + GType g_define_type_id = \ + _g_register_boxed (g_intern_static_string (#TypeName), copy_func, free_func); \ + { /* custom code follows */ +#else +#define _G_DEFINE_BOXED_TYPE_BEGIN(TypeName, type_name, copy_func, free_func) \ +GType \ +type_name##_get_type (void) \ +{ \ + static volatile gsize g_define_type_id__volatile = 0; \ + if (g_once_init_enter (&g_define_type_id__volatile)) \ + { \ + GType g_define_type_id = \ + g_boxed_type_register_static (g_intern_static_string (#TypeName), \ + (GBoxedCopyFunc) copy_func, \ + (GBoxedFreeFunc) free_func); \ + { /* custom code follows */ +#endif /* __GNUC__ */ + +/** + * G_DEFINE_POINTER_TYPE: + * @TypeName: The name of the new type, in Camel case + * @type_name: The name of the new type, in lowercase, with words + * separated by '_' + * + * A convenience macro for pointer type implementations, which defines a + * type_name_get_type() function registering the pointer type. + * + * Since: 2.26 + */ +#define G_DEFINE_POINTER_TYPE(TypeName, type_name) G_DEFINE_POINTER_TYPE_WITH_CODE (TypeName, type_name, {}) +/** + * G_DEFINE_POINTER_TYPE_WITH_CODE: + * @TypeName: The name of the new type, in Camel case + * @type_name: The name of the new type, in lowercase, with words + * separated by '_' + * @_C_: Custom code that gets inserted in the *_get_type() function + * + * A convenience macro for pointer type implementations. + * Similar to G_DEFINE_POINTER_TYPE(), but allows to insert + * custom code into the type_name_get_type() function. + * + * Since: 2.26 + */ +#define G_DEFINE_POINTER_TYPE_WITH_CODE(TypeName, type_name, _C_) _G_DEFINE_POINTER_TYPE_BEGIN (TypeName, type_name) {_C_;} _G_DEFINE_TYPE_EXTENDED_END() + +#define _G_DEFINE_POINTER_TYPE_BEGIN(TypeName, type_name) \ +GType \ +type_name##_get_type (void) \ +{ \ + static volatile gsize g_define_type_id__volatile = 0; \ + if (g_once_init_enter (&g_define_type_id__volatile)) \ + { \ + GType g_define_type_id = \ + g_pointer_type_register_static (g_intern_static_string (#TypeName)); \ + { /* custom code follows */ + +/* --- protected (for fundamental type implementations) --- */ +GLIB_AVAILABLE_IN_ALL +GTypePlugin* g_type_get_plugin (GType type); +GLIB_AVAILABLE_IN_ALL +GTypePlugin* g_type_interface_get_plugin (GType instance_type, + GType interface_type); +GLIB_AVAILABLE_IN_ALL +GType g_type_fundamental_next (void); +GLIB_AVAILABLE_IN_ALL +GType g_type_fundamental (GType type_id); +GLIB_AVAILABLE_IN_ALL +GTypeInstance* g_type_create_instance (GType type); +GLIB_AVAILABLE_IN_ALL +void g_type_free_instance (GTypeInstance *instance); + +GLIB_AVAILABLE_IN_ALL +void g_type_add_class_cache_func (gpointer cache_data, + GTypeClassCacheFunc cache_func); +GLIB_AVAILABLE_IN_ALL +void g_type_remove_class_cache_func (gpointer cache_data, + GTypeClassCacheFunc cache_func); +GLIB_AVAILABLE_IN_ALL +void g_type_class_unref_uncached (gpointer g_class); + +GLIB_AVAILABLE_IN_ALL +void g_type_add_interface_check (gpointer check_data, + GTypeInterfaceCheckFunc check_func); +GLIB_AVAILABLE_IN_ALL +void g_type_remove_interface_check (gpointer check_data, + GTypeInterfaceCheckFunc check_func); + +GLIB_AVAILABLE_IN_ALL +GTypeValueTable* g_type_value_table_peek (GType type); + + +/*< private >*/ +GLIB_AVAILABLE_IN_ALL +gboolean g_type_check_instance (GTypeInstance *instance) G_GNUC_PURE; +GLIB_AVAILABLE_IN_ALL +GTypeInstance* g_type_check_instance_cast (GTypeInstance *instance, + GType iface_type); +GLIB_AVAILABLE_IN_ALL +gboolean g_type_check_instance_is_a (GTypeInstance *instance, + GType iface_type) G_GNUC_PURE; +GLIB_AVAILABLE_IN_2_42 +gboolean g_type_check_instance_is_fundamentally_a (GTypeInstance *instance, + GType fundamental_type) G_GNUC_PURE; +GLIB_AVAILABLE_IN_ALL +GTypeClass* g_type_check_class_cast (GTypeClass *g_class, + GType is_a_type); +GLIB_AVAILABLE_IN_ALL +gboolean g_type_check_class_is_a (GTypeClass *g_class, + GType is_a_type) G_GNUC_PURE; +GLIB_AVAILABLE_IN_ALL +gboolean g_type_check_is_value_type (GType type) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_type_check_value (const GValue *value) G_GNUC_PURE; +GLIB_AVAILABLE_IN_ALL +gboolean g_type_check_value_holds (const GValue *value, + GType type) G_GNUC_PURE; +GLIB_AVAILABLE_IN_ALL +gboolean g_type_test_flags (GType type, + guint flags) G_GNUC_CONST; + + +/* --- debugging functions --- */ +GLIB_AVAILABLE_IN_ALL +const gchar * g_type_name_from_instance (GTypeInstance *instance); +GLIB_AVAILABLE_IN_ALL +const gchar * g_type_name_from_class (GTypeClass *g_class); + + +/* --- implementation bits --- */ +#ifndef G_DISABLE_CAST_CHECKS +# define _G_TYPE_CIC(ip, gt, ct) \ + ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt)) +# define _G_TYPE_CCC(cp, gt, ct) \ + ((ct*) g_type_check_class_cast ((GTypeClass*) cp, gt)) +#else /* G_DISABLE_CAST_CHECKS */ +# define _G_TYPE_CIC(ip, gt, ct) ((ct*) ip) +# define _G_TYPE_CCC(cp, gt, ct) ((ct*) cp) +#endif /* G_DISABLE_CAST_CHECKS */ +#define _G_TYPE_CHI(ip) (g_type_check_instance ((GTypeInstance*) ip)) +#define _G_TYPE_CHV(vl) (g_type_check_value ((GValue*) vl)) +#define _G_TYPE_IGC(ip, gt, ct) ((ct*) (((GTypeInstance*) ip)->g_class)) +#define _G_TYPE_IGI(ip, gt, ct) ((ct*) g_type_interface_peek (((GTypeInstance*) ip)->g_class, gt)) +#define _G_TYPE_CIFT(ip, ft) (g_type_check_instance_is_fundamentally_a ((GTypeInstance*) ip, ft)) +#ifdef __GNUC__ +# define _G_TYPE_CIT(ip, gt) (G_GNUC_EXTENSION ({ \ + GTypeInstance *__inst = (GTypeInstance*) ip; GType __t = gt; gboolean __r; \ + if (!__inst) \ + __r = FALSE; \ + else if (__inst->g_class && __inst->g_class->g_type == __t) \ + __r = TRUE; \ + else \ + __r = g_type_check_instance_is_a (__inst, __t); \ + __r; \ +})) +# define _G_TYPE_CCT(cp, gt) (G_GNUC_EXTENSION ({ \ + GTypeClass *__class = (GTypeClass*) cp; GType __t = gt; gboolean __r; \ + if (!__class) \ + __r = FALSE; \ + else if (__class->g_type == __t) \ + __r = TRUE; \ + else \ + __r = g_type_check_class_is_a (__class, __t); \ + __r; \ +})) +# define _G_TYPE_CVH(vl, gt) (G_GNUC_EXTENSION ({ \ + const GValue *__val = (const GValue*) vl; GType __t = gt; gboolean __r; \ + if (!__val) \ + __r = FALSE; \ + else if (__val->g_type == __t) \ + __r = TRUE; \ + else \ + __r = g_type_check_value_holds (__val, __t); \ + __r; \ +})) +#else /* !__GNUC__ */ +# define _G_TYPE_CIT(ip, gt) (g_type_check_instance_is_a ((GTypeInstance*) ip, gt)) +# define _G_TYPE_CCT(cp, gt) (g_type_check_class_is_a ((GTypeClass*) cp, gt)) +# define _G_TYPE_CVH(vl, gt) (g_type_check_value_holds ((const GValue*) vl, gt)) +#endif /* !__GNUC__ */ +/** + * G_TYPE_FLAG_RESERVED_ID_BIT: + * + * A bit in the type number that's supposed to be left untouched. + */ +#define G_TYPE_FLAG_RESERVED_ID_BIT ((GType) (1 << 0)) + +G_END_DECLS + +#endif /* __G_TYPE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gtypemodule.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gtypemodule.h new file mode 100755 index 00000000..deeadcdd --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gtypemodule.h @@ -0,0 +1,295 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 2000 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ +#ifndef __G_TYPE_MODULE_H__ +#define __G_TYPE_MODULE_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only <glib-object.h> can be included directly." +#endif + +#include <gobject/gobject.h> +#include <gobject/genums.h> + +G_BEGIN_DECLS + +typedef struct _GTypeModule GTypeModule; +typedef struct _GTypeModuleClass GTypeModuleClass; + +#define G_TYPE_TYPE_MODULE (g_type_module_get_type ()) +#define G_TYPE_MODULE(module) (G_TYPE_CHECK_INSTANCE_CAST ((module), G_TYPE_TYPE_MODULE, GTypeModule)) +#define G_TYPE_MODULE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_TYPE_MODULE, GTypeModuleClass)) +#define G_IS_TYPE_MODULE(module) (G_TYPE_CHECK_INSTANCE_TYPE ((module), G_TYPE_TYPE_MODULE)) +#define G_IS_TYPE_MODULE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_TYPE_MODULE)) +#define G_TYPE_MODULE_GET_CLASS(module) (G_TYPE_INSTANCE_GET_CLASS ((module), G_TYPE_TYPE_MODULE, GTypeModuleClass)) + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTypeModule, g_object_unref) + +/** + * GTypeModule: + * @name: the name of the module + * + * The members of the GTypeModule structure should not + * be accessed directly, except for the @name field. + */ +struct _GTypeModule +{ + GObject parent_instance; + + guint use_count; + GSList *type_infos; + GSList *interface_infos; + + /*< public >*/ + gchar *name; +}; + +/** + * GTypeModuleClass: + * @parent_class: the parent class + * @load: loads the module and registers one or more types using + * g_type_module_register_type(). + * @unload: unloads the module + * + * In order to implement dynamic loading of types based on #GTypeModule, + * the @load and @unload functions in #GTypeModuleClass must be implemented. + */ +struct _GTypeModuleClass +{ + GObjectClass parent_class; + + /*< public >*/ + gboolean (* load) (GTypeModule *module); + void (* unload) (GTypeModule *module); + + /*< private >*/ + /* Padding for future expansion */ + void (*reserved1) (void); + void (*reserved2) (void); + void (*reserved3) (void); + void (*reserved4) (void); +}; + +/** + * G_DEFINE_DYNAMIC_TYPE: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type, in lowercase, with words + * separated by '_'. + * @T_P: The #GType of the parent type. + * + * A convenience macro for dynamic type implementations, which declares a + * class initialization function, an instance initialization function (see + * #GTypeInfo for information about these) and a static variable named + * `t_n`_parent_class pointing to the parent class. Furthermore, + * it defines a `*_get_type()` and a static `*_register_type()` functions + * for use in your `module_init()`. + * + * See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example. + * + * Since: 2.14 + */ +#define G_DEFINE_DYNAMIC_TYPE(TN, t_n, T_P) G_DEFINE_DYNAMIC_TYPE_EXTENDED (TN, t_n, T_P, 0, {}) +/** + * G_DEFINE_DYNAMIC_TYPE_EXTENDED: + * @TypeName: The name of the new type, in Camel case. + * @type_name: The name of the new type, in lowercase, with words + * separated by '_'. + * @TYPE_PARENT: The #GType of the parent type. + * @flags: #GTypeFlags to pass to g_type_module_register_type() + * @CODE: Custom code that gets inserted in the *_get_type() function. + * + * A more general version of G_DEFINE_DYNAMIC_TYPE() which + * allows to specify #GTypeFlags and custom code. + * + * |[ + * G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget, + * gtk_gadget, + * GTK_TYPE_THING, + * 0, + * G_IMPLEMENT_INTERFACE_DYNAMIC (TYPE_GIZMO, + * gtk_gadget_gizmo_init)); + * ]| + * expands to + * |[ + * static void gtk_gadget_init (GtkGadget *self); + * static void gtk_gadget_class_init (GtkGadgetClass *klass); + * static void gtk_gadget_class_finalize (GtkGadgetClass *klass); + * + * static gpointer gtk_gadget_parent_class = NULL; + * static GType gtk_gadget_type_id = 0; + * + * static void gtk_gadget_class_intern_init (gpointer klass) + * { + * gtk_gadget_parent_class = g_type_class_peek_parent (klass); + * gtk_gadget_class_init ((GtkGadgetClass*) klass); + * } + * + * GType + * gtk_gadget_get_type (void) + * { + * return gtk_gadget_type_id; + * } + * + * static void + * gtk_gadget_register_type (GTypeModule *type_module) + * { + * const GTypeInfo g_define_type_info = { + * sizeof (GtkGadgetClass), + * (GBaseInitFunc) NULL, + * (GBaseFinalizeFunc) NULL, + * (GClassInitFunc) gtk_gadget_class_intern_init, + * (GClassFinalizeFunc) gtk_gadget_class_finalize, + * NULL, // class_data + * sizeof (GtkGadget), + * 0, // n_preallocs + * (GInstanceInitFunc) gtk_gadget_init, + * NULL // value_table + * }; + * gtk_gadget_type_id = g_type_module_register_type (type_module, + * GTK_TYPE_THING, + * "GtkGadget", + * &g_define_type_info, + * (GTypeFlags) flags); + * { + * const GInterfaceInfo g_implement_interface_info = { + * (GInterfaceInitFunc) gtk_gadget_gizmo_init + * }; + * g_type_module_add_interface (type_module, g_define_type_id, TYPE_GIZMO, &g_implement_interface_info); + * } + * } + * ]| + * + * Since: 2.14 + */ +#define G_DEFINE_DYNAMIC_TYPE_EXTENDED(TypeName, type_name, TYPE_PARENT, flags, CODE) \ +static void type_name##_init (TypeName *self); \ +static void type_name##_class_init (TypeName##Class *klass); \ +static void type_name##_class_finalize (TypeName##Class *klass); \ +static gpointer type_name##_parent_class = NULL; \ +static GType type_name##_type_id = 0; \ +static gint TypeName##_private_offset; \ +\ +_G_DEFINE_TYPE_EXTENDED_CLASS_INIT(TypeName, type_name) \ +\ +G_GNUC_UNUSED \ +static inline gpointer \ +type_name##_get_instance_private (TypeName *self) \ +{ \ + return (G_STRUCT_MEMBER_P (self, TypeName##_private_offset)); \ +} \ +\ +GType \ +type_name##_get_type (void) \ +{ \ + return type_name##_type_id; \ +} \ +static void \ +type_name##_register_type (GTypeModule *type_module) \ +{ \ + GType g_define_type_id G_GNUC_UNUSED; \ + const GTypeInfo g_define_type_info = { \ + sizeof (TypeName##Class), \ + (GBaseInitFunc) NULL, \ + (GBaseFinalizeFunc) NULL, \ + (GClassInitFunc) type_name##_class_intern_init, \ + (GClassFinalizeFunc) type_name##_class_finalize, \ + NULL, /* class_data */ \ + sizeof (TypeName), \ + 0, /* n_preallocs */ \ + (GInstanceInitFunc) type_name##_init, \ + NULL /* value_table */ \ + }; \ + type_name##_type_id = g_type_module_register_type (type_module, \ + TYPE_PARENT, \ + #TypeName, \ + &g_define_type_info, \ + (GTypeFlags) flags); \ + g_define_type_id = type_name##_type_id; \ + { CODE ; } \ +} + +/** + * G_IMPLEMENT_INTERFACE_DYNAMIC: + * @TYPE_IFACE: The #GType of the interface to add + * @iface_init: The interface init function + * + * A convenience macro to ease interface addition in the @_C_ section + * of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See G_DEFINE_DYNAMIC_TYPE_EXTENDED() + * for an example. + * + * Note that this macro can only be used together with the + * G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable + * names from that macro. + * + * Since: 2.24 + */ +#define G_IMPLEMENT_INTERFACE_DYNAMIC(TYPE_IFACE, iface_init) { \ + const GInterfaceInfo g_implement_interface_info = { \ + (GInterfaceInitFunc) iface_init, NULL, NULL \ + }; \ + g_type_module_add_interface (type_module, g_define_type_id, TYPE_IFACE, &g_implement_interface_info); \ +} + +/** + * G_ADD_PRIVATE_DYNAMIC: + * @TypeName: the name of the type in CamelCase + * + * A convenience macro to ease adding private data to instances of a new dynamic + * type in the @_C_ section of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See + * G_ADD_PRIVATE() for details, it is similar but for static types. + * + * Note that this macro can only be used together with the + * G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable + * names from that macro. + * + * Since: 2.38 + */ +#define G_ADD_PRIVATE_DYNAMIC(TypeName) { \ + TypeName##_private_offset = sizeof (TypeName##Private); \ +} + +GLIB_AVAILABLE_IN_ALL +GType g_type_module_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_type_module_use (GTypeModule *module); +GLIB_AVAILABLE_IN_ALL +void g_type_module_unuse (GTypeModule *module); +GLIB_AVAILABLE_IN_ALL +void g_type_module_set_name (GTypeModule *module, + const gchar *name); +GLIB_AVAILABLE_IN_ALL +GType g_type_module_register_type (GTypeModule *module, + GType parent_type, + const gchar *type_name, + const GTypeInfo *type_info, + GTypeFlags flags); +GLIB_AVAILABLE_IN_ALL +void g_type_module_add_interface (GTypeModule *module, + GType instance_type, + GType interface_type, + const GInterfaceInfo *interface_info); +GLIB_AVAILABLE_IN_ALL +GType g_type_module_register_enum (GTypeModule *module, + const gchar *name, + const GEnumValue *const_static_values); +GLIB_AVAILABLE_IN_ALL +GType g_type_module_register_flags (GTypeModule *module, + const gchar *name, + const GFlagsValue *const_static_values); + +G_END_DECLS + +#endif /* __G_TYPE_MODULE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gtypeplugin.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gtypeplugin.h new file mode 100755 index 00000000..482f55ca --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gtypeplugin.h @@ -0,0 +1,134 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 2000 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ +#ifndef __G_TYPE_PLUGIN_H__ +#define __G_TYPE_PLUGIN_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only <glib-object.h> can be included directly." +#endif + +#include <gobject/gtype.h> + +G_BEGIN_DECLS + +/* --- type macros --- */ +#define G_TYPE_TYPE_PLUGIN (g_type_plugin_get_type ()) +#define G_TYPE_PLUGIN(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TYPE_PLUGIN, GTypePlugin)) +#define G_TYPE_PLUGIN_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), G_TYPE_TYPE_PLUGIN, GTypePluginClass)) +#define G_IS_TYPE_PLUGIN(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TYPE_PLUGIN)) +#define G_IS_TYPE_PLUGIN_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), G_TYPE_TYPE_PLUGIN)) +#define G_TYPE_PLUGIN_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_TYPE_PLUGIN, GTypePluginClass)) + + +/* --- typedefs & structures --- */ +typedef struct _GTypePluginClass GTypePluginClass; +/** + * GTypePluginUse: + * @plugin: the #GTypePlugin whose use count should be increased + * + * The type of the @use_plugin function of #GTypePluginClass, which gets called + * to increase the use count of @plugin. + */ +typedef void (*GTypePluginUse) (GTypePlugin *plugin); +/** + * GTypePluginUnuse: + * @plugin: the #GTypePlugin whose use count should be decreased + * + * The type of the @unuse_plugin function of #GTypePluginClass. + */ +typedef void (*GTypePluginUnuse) (GTypePlugin *plugin); +/** + * GTypePluginCompleteTypeInfo: + * @plugin: the #GTypePlugin + * @g_type: the #GType whose info is completed + * @info: the #GTypeInfo struct to fill in + * @value_table: the #GTypeValueTable to fill in + * + * The type of the @complete_type_info function of #GTypePluginClass. + */ +typedef void (*GTypePluginCompleteTypeInfo) (GTypePlugin *plugin, + GType g_type, + GTypeInfo *info, + GTypeValueTable *value_table); +/** + * GTypePluginCompleteInterfaceInfo: + * @plugin: the #GTypePlugin + * @instance_type: the #GType of an instantiable type to which the interface + * is added + * @interface_type: the #GType of the interface whose info is completed + * @info: the #GInterfaceInfo to fill in + * + * The type of the @complete_interface_info function of #GTypePluginClass. + */ +typedef void (*GTypePluginCompleteInterfaceInfo) (GTypePlugin *plugin, + GType instance_type, + GType interface_type, + GInterfaceInfo *info); +/** + * GTypePlugin: + * + * The GTypePlugin typedef is used as a placeholder + * for objects that implement the GTypePlugin interface. + */ +/** + * GTypePluginClass: + * @use_plugin: Increases the use count of the plugin. + * @unuse_plugin: Decreases the use count of the plugin. + * @complete_type_info: Fills in the #GTypeInfo and + * #GTypeValueTable structs for the type. The structs are initialized + * with `memset(s, 0, sizeof (s))` before calling this function. + * @complete_interface_info: Fills in missing parts of the #GInterfaceInfo + * for the interface. The structs is initialized with + * `memset(s, 0, sizeof (s))` before calling this function. + * + * The #GTypePlugin interface is used by the type system in order to handle + * the lifecycle of dynamically loaded types. + */ +struct _GTypePluginClass +{ + /*< private >*/ + GTypeInterface base_iface; + + /*< public >*/ + GTypePluginUse use_plugin; + GTypePluginUnuse unuse_plugin; + GTypePluginCompleteTypeInfo complete_type_info; + GTypePluginCompleteInterfaceInfo complete_interface_info; +}; + + +/* --- prototypes --- */ +GLIB_AVAILABLE_IN_ALL +GType g_type_plugin_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +void g_type_plugin_use (GTypePlugin *plugin); +GLIB_AVAILABLE_IN_ALL +void g_type_plugin_unuse (GTypePlugin *plugin); +GLIB_AVAILABLE_IN_ALL +void g_type_plugin_complete_type_info (GTypePlugin *plugin, + GType g_type, + GTypeInfo *info, + GTypeValueTable *value_table); +GLIB_AVAILABLE_IN_ALL +void g_type_plugin_complete_interface_info (GTypePlugin *plugin, + GType instance_type, + GType interface_type, + GInterfaceInfo *info); + +G_END_DECLS + +#endif /* __G_TYPE_PLUGIN_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gvalue.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gvalue.h new file mode 100755 index 00000000..9d8f0348 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gvalue.h @@ -0,0 +1,196 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1997-1999, 2000-2001 Tim Janik and Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * gvalue.h: generic GValue functions + */ +#ifndef __G_VALUE_H__ +#define __G_VALUE_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only <glib-object.h> can be included directly." +#endif + +#include <gobject/gtype.h> + +G_BEGIN_DECLS + +/* --- type macros --- */ +/** + * G_TYPE_IS_VALUE: + * @type: A #GType value. + * + * Checks whether the passed in type ID can be used for g_value_init(). + * That is, this macro checks whether this type provides an implementation + * of the #GTypeValueTable functions required for a type to create a #GValue of. + * + * Returns: Whether @type is suitable as a #GValue type. + */ +#define G_TYPE_IS_VALUE(type) (g_type_check_is_value_type (type)) +/** + * G_IS_VALUE: + * @value: A #GValue structure. + * + * Checks if @value is a valid and initialized #GValue structure. + * + * Returns: %TRUE on success. + */ +#define G_IS_VALUE(value) (G_TYPE_CHECK_VALUE (value)) +/** + * G_VALUE_TYPE: + * @value: A #GValue structure. + * + * Get the type identifier of @value. + * + * Returns: the #GType. + */ +#define G_VALUE_TYPE(value) (((GValue*) (value))->g_type) +/** + * G_VALUE_TYPE_NAME: + * @value: A #GValue structure. + * + * Gets the type name of @value. + * + * Returns: the type name. + */ +#define G_VALUE_TYPE_NAME(value) (g_type_name (G_VALUE_TYPE (value))) +/** + * G_VALUE_HOLDS: + * @value: A #GValue structure. + * @type: A #GType value. + * + * Checks if @value holds (or contains) a value of @type. + * This macro will also check for @value != %NULL and issue a + * warning if the check fails. + * + * Returns: %TRUE if @value holds the @type. + */ +#define G_VALUE_HOLDS(value,type) (G_TYPE_CHECK_VALUE_TYPE ((value), (type))) + + +/* --- typedefs & structures --- */ +/** + * GValueTransform: + * @src_value: Source value. + * @dest_value: Target value. + * + * The type of value transformation functions which can be registered with + * g_value_register_transform_func(). + * + * @dest_value will be initialized to the correct destination type. + */ +typedef void (*GValueTransform) (const GValue *src_value, + GValue *dest_value); +/** + * GValue: + * + * An opaque structure used to hold different types of values. + * The data within the structure has protected scope: it is accessible only + * to functions within a #GTypeValueTable structure, or implementations of + * the g_value_*() API. That is, code portions which implement new fundamental + * types. + * #GValue users cannot make any assumptions about how data is stored + * within the 2 element @data union, and the @g_type member should + * only be accessed through the G_VALUE_TYPE() macro. + */ +struct _GValue +{ + /*< private >*/ + GType g_type; + + /* public for GTypeValueTable methods */ + union { + gint v_int; + guint v_uint; + glong v_long; + gulong v_ulong; + gint64 v_int64; + guint64 v_uint64; + gfloat v_float; + gdouble v_double; + gpointer v_pointer; + } data[2]; +}; + + +/* --- prototypes --- */ +GLIB_AVAILABLE_IN_ALL +GValue* g_value_init (GValue *value, + GType g_type); +GLIB_AVAILABLE_IN_ALL +void g_value_copy (const GValue *src_value, + GValue *dest_value); +GLIB_AVAILABLE_IN_ALL +GValue* g_value_reset (GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_value_unset (GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_value_set_instance (GValue *value, + gpointer instance); +GLIB_AVAILABLE_IN_2_42 +void g_value_init_from_instance (GValue *value, + gpointer instance); + + +/* --- private --- */ +GLIB_AVAILABLE_IN_ALL +gboolean g_value_fits_pointer (const GValue *value); +GLIB_AVAILABLE_IN_ALL +gpointer g_value_peek_pointer (const GValue *value); + + +/* --- implementation details --- */ +GLIB_AVAILABLE_IN_ALL +gboolean g_value_type_compatible (GType src_type, + GType dest_type); +GLIB_AVAILABLE_IN_ALL +gboolean g_value_type_transformable (GType src_type, + GType dest_type); +GLIB_AVAILABLE_IN_ALL +gboolean g_value_transform (const GValue *src_value, + GValue *dest_value); +GLIB_AVAILABLE_IN_ALL +void g_value_register_transform_func (GType src_type, + GType dest_type, + GValueTransform transform_func); + +/** + * G_VALUE_NOCOPY_CONTENTS: + * + * If passed to G_VALUE_COLLECT(), allocated data won't be copied + * but used verbatim. This does not affect ref-counted types like + * objects. + */ +#define G_VALUE_NOCOPY_CONTENTS (1 << 27) + +/** + * G_VALUE_INIT: + * + * A #GValue must be initialized before it can be used. This macro can + * be used as initializer instead of an explicit `{ 0 }` when declaring + * a variable, but it cannot be assigned to a variable. + * + * |[ + * GValue value = G_VALUE_INIT; + * ]| + * + * Since: 2.30 + */ +#define G_VALUE_INIT { 0, { { 0 } } } + + +G_END_DECLS + +#endif /* __G_VALUE_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gvaluearray.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gvaluearray.h new file mode 100755 index 00000000..d8b6bb55 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gvaluearray.h @@ -0,0 +1,104 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 2001 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * gvaluearray.h: GLib array type holding GValues + */ +#ifndef __G_VALUE_ARRAY_H__ +#define __G_VALUE_ARRAY_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only <glib-object.h> can be included directly." +#endif + +#include <gobject/gvalue.h> + +G_BEGIN_DECLS + +/** + * G_TYPE_VALUE_ARRAY: + * + * The type ID of the "GValueArray" type which is a boxed type, + * used to pass around pointers to GValueArrays. + * + * Deprecated: 2.32: Use #GArray instead of #GValueArray + */ +#define G_TYPE_VALUE_ARRAY (g_value_array_get_type ()) + +/* --- typedefs & structs --- */ +typedef struct _GValueArray GValueArray; +/** + * GValueArray: + * @n_values: number of values contained in the array + * @values: array of values + * + * A #GValueArray contains an array of #GValue elements. + */ +struct _GValueArray +{ + guint n_values; + GValue *values; + + /*< private >*/ + guint n_prealloced; +}; + +/* --- prototypes --- */ +GLIB_DEPRECATED_IN_2_32_FOR(GArray) +GType g_value_array_get_type (void) G_GNUC_CONST; + +GLIB_DEPRECATED_IN_2_32_FOR(GArray) +GValue* g_value_array_get_nth (GValueArray *value_array, + guint index_); + +GLIB_DEPRECATED_IN_2_32_FOR(GArray) +GValueArray* g_value_array_new (guint n_prealloced); + +GLIB_DEPRECATED_IN_2_32_FOR(GArray) +void g_value_array_free (GValueArray *value_array); + +GLIB_DEPRECATED_IN_2_32_FOR(GArray) +GValueArray* g_value_array_copy (const GValueArray *value_array); + +GLIB_DEPRECATED_IN_2_32_FOR(GArray) +GValueArray* g_value_array_prepend (GValueArray *value_array, + const GValue *value); + +GLIB_DEPRECATED_IN_2_32_FOR(GArray) +GValueArray* g_value_array_append (GValueArray *value_array, + const GValue *value); + +GLIB_DEPRECATED_IN_2_32_FOR(GArray) +GValueArray* g_value_array_insert (GValueArray *value_array, + guint index_, + const GValue *value); + +GLIB_DEPRECATED_IN_2_32_FOR(GArray) +GValueArray* g_value_array_remove (GValueArray *value_array, + guint index_); + +GLIB_DEPRECATED_IN_2_32_FOR(GArray) +GValueArray* g_value_array_sort (GValueArray *value_array, + GCompareFunc compare_func); + +GLIB_DEPRECATED_IN_2_32_FOR(GArray) +GValueArray* g_value_array_sort_with_data (GValueArray *value_array, + GCompareDataFunc compare_func, + gpointer user_data); + + +G_END_DECLS + +#endif /* __G_VALUE_ARRAY_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gvaluecollector.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gvaluecollector.h new file mode 100755 index 00000000..f5885884 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gvaluecollector.h @@ -0,0 +1,261 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1998-1999, 2000-2001 Tim Janik and Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * gvaluecollector.h: GValue varargs stubs + */ +/** + * SECTION:value_collection + * @Short_description: Converting varargs to generic values + * @Title: Varargs Value Collection + * + * The macros in this section provide the varargs parsing support needed + * in variadic GObject functions such as g_object_new() or g_object_set(). + * They currently support the collection of integral types, floating point + * types and pointers. + */ +#ifndef __G_VALUE_COLLECTOR_H__ +#define __G_VALUE_COLLECTOR_H__ + +#include <glib-object.h> + +G_BEGIN_DECLS + +/* we may want to add aggregate types here some day, if requested + * by users. the basic C types are covered already, everything + * smaller than an int is promoted to an integer and floats are + * always promoted to doubles for varargs call constructions. + */ +enum /*< skip >*/ +{ + G_VALUE_COLLECT_INT = 'i', + G_VALUE_COLLECT_LONG = 'l', + G_VALUE_COLLECT_INT64 = 'q', + G_VALUE_COLLECT_DOUBLE = 'd', + G_VALUE_COLLECT_POINTER = 'p' +}; + + +/* vararg union holding actual values collected + */ +/** + * GTypeCValue: + * @v_int: the field for holding integer values + * @v_long: the field for holding long integer values + * @v_int64: the field for holding 64 bit integer values + * @v_double: the field for holding floating point values + * @v_pointer: the field for holding pointers + * + * A union holding one collected value. + */ +union _GTypeCValue +{ + gint v_int; + glong v_long; + gint64 v_int64; + gdouble v_double; + gpointer v_pointer; +}; + +/** + * G_VALUE_COLLECT_INIT: + * @value: a #GValue return location. @value must contain only 0 bytes. + * @_value_type: the #GType to use for @value. + * @var_args: the va_list variable; it may be evaluated multiple times + * @flags: flags which are passed on to the collect_value() function of + * the #GTypeValueTable of @value. + * @__error: a #gchar** variable that will be modified to hold a g_new() + * allocated error messages if something fails + * + * Collects a variable argument value from a va_list. We have to + * implement the varargs collection as a macro, because on some systems + * va_list variables cannot be passed by reference. + * + * Since: 2.24 + */ +#define G_VALUE_COLLECT_INIT(value, _value_type, var_args, flags, __error) \ +G_STMT_START { \ + GValue *_val = (value); \ + guint _flags = (flags); \ + GTypeValueTable *_vtab = g_type_value_table_peek (_value_type); \ + const gchar *_collect_format = _vtab->collect_format; \ + GTypeCValue _cvalues[G_VALUE_COLLECT_FORMAT_MAX_LENGTH] = { { 0, }, }; \ + guint _n_values = 0; \ + \ + _val->g_type = _value_type; /* value_meminit() from gvalue.c */ \ + while (*_collect_format) \ + { \ + GTypeCValue *_cvalue = _cvalues + _n_values++; \ + \ + switch (*_collect_format++) \ + { \ + case G_VALUE_COLLECT_INT: \ + _cvalue->v_int = va_arg ((var_args), gint); \ + break; \ + case G_VALUE_COLLECT_LONG: \ + _cvalue->v_long = va_arg ((var_args), glong); \ + break; \ + case G_VALUE_COLLECT_INT64: \ + _cvalue->v_int64 = va_arg ((var_args), gint64); \ + break; \ + case G_VALUE_COLLECT_DOUBLE: \ + _cvalue->v_double = va_arg ((var_args), gdouble); \ + break; \ + case G_VALUE_COLLECT_POINTER: \ + _cvalue->v_pointer = va_arg ((var_args), gpointer); \ + break; \ + default: \ + g_assert_not_reached (); \ + } \ + } \ + *(__error) = _vtab->collect_value (_val, \ + _n_values, \ + _cvalues, \ + _flags); \ +} G_STMT_END + +/** + * G_VALUE_COLLECT: + * @value: a #GValue return location. @value is supposed to be initialized + * according to the value type to be collected + * @var_args: the va_list variable; it may be evaluated multiple times + * @flags: flags which are passed on to the collect_value() function of + * the #GTypeValueTable of @value. + * @__error: a #gchar** variable that will be modified to hold a g_new() + * allocated error messages if something fails + * + * Collects a variable argument value from a va_list. We have to + * implement the varargs collection as a macro, because on some systems + * va_list variables cannot be passed by reference. + * + * Note: If you are creating the @value argument just before calling this macro, + * you should use the #G_VALUE_COLLECT_INIT variant and pass the unitialized + * #GValue. That variant is faster than #G_VALUE_COLLECT. + */ +#define G_VALUE_COLLECT(value, var_args, flags, __error) G_STMT_START { \ + GValue *_value = (value); \ + GType _value_type = G_VALUE_TYPE (_value); \ + GTypeValueTable *_vtable = g_type_value_table_peek (_value_type); \ + \ + if (_vtable->value_free) \ + _vtable->value_free (_value); \ + memset (_value->data, 0, sizeof (_value->data)); \ + \ + G_VALUE_COLLECT_INIT(value, _value_type, var_args, flags, __error); \ +} G_STMT_END + +/** + * G_VALUE_COLLECT_SKIP: + * @_value_type: the #GType of the value to skip + * @var_args: the va_list variable; it may be evaluated multiple times + * + * Skip an argument of type @_value_type from @var_args. + */ +#define G_VALUE_COLLECT_SKIP(_value_type, var_args) \ +G_STMT_START { \ + GTypeValueTable *_vtable = g_type_value_table_peek (_value_type); \ + const gchar *_collect_format = _vtable->collect_format; \ + \ + while (*_collect_format) \ + { \ + switch (*_collect_format++) \ + { \ + case G_VALUE_COLLECT_INT: \ + va_arg ((var_args), gint); \ + break; \ + case G_VALUE_COLLECT_LONG: \ + va_arg ((var_args), glong); \ + break; \ + case G_VALUE_COLLECT_INT64: \ + va_arg ((var_args), gint64); \ + break; \ + case G_VALUE_COLLECT_DOUBLE: \ + va_arg ((var_args), gdouble); \ + break; \ + case G_VALUE_COLLECT_POINTER: \ + va_arg ((var_args), gpointer); \ + break; \ + default: \ + g_assert_not_reached (); \ + } \ + } \ +} G_STMT_END + +/** + * G_VALUE_LCOPY: + * @value: a #GValue return location. @value is supposed to be initialized + * according to the value type to be collected + * @var_args: the va_list variable; it may be evaluated multiple times + * @flags: flags which are passed on to the lcopy_value() function of + * the #GTypeValueTable of @value. + * @__error: a #gchar** variable that will be modified to hold a g_new() + * allocated error messages if something fails + * + * Collects a value's variable argument locations from a va_list. Usage is + * analogous to G_VALUE_COLLECT(). + */ +#define G_VALUE_LCOPY(value, var_args, flags, __error) \ +G_STMT_START { \ + const GValue *_value = (value); \ + guint _flags = (flags); \ + GType _value_type = G_VALUE_TYPE (_value); \ + GTypeValueTable *_vtable = g_type_value_table_peek (_value_type); \ + const gchar *_lcopy_format = _vtable->lcopy_format; \ + GTypeCValue _cvalues[G_VALUE_COLLECT_FORMAT_MAX_LENGTH] = { { 0, }, }; \ + guint _n_values = 0; \ + \ + while (*_lcopy_format) \ + { \ + GTypeCValue *_cvalue = _cvalues + _n_values++; \ + \ + switch (*_lcopy_format++) \ + { \ + case G_VALUE_COLLECT_INT: \ + _cvalue->v_int = va_arg ((var_args), gint); \ + break; \ + case G_VALUE_COLLECT_LONG: \ + _cvalue->v_long = va_arg ((var_args), glong); \ + break; \ + case G_VALUE_COLLECT_INT64: \ + _cvalue->v_int64 = va_arg ((var_args), gint64); \ + break; \ + case G_VALUE_COLLECT_DOUBLE: \ + _cvalue->v_double = va_arg ((var_args), gdouble); \ + break; \ + case G_VALUE_COLLECT_POINTER: \ + _cvalue->v_pointer = va_arg ((var_args), gpointer); \ + break; \ + default: \ + g_assert_not_reached (); \ + } \ + } \ + *(__error) = _vtable->lcopy_value (_value, \ + _n_values, \ + _cvalues, \ + _flags); \ +} G_STMT_END + + +/** + * G_VALUE_COLLECT_FORMAT_MAX_LENGTH: + * + * The maximal number of #GTypeCValues which can be collected for a + * single #GValue. + */ +#define G_VALUE_COLLECT_FORMAT_MAX_LENGTH (8) + +G_END_DECLS + +#endif /* __G_VALUE_COLLECTOR_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gvaluetypes.h b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gvaluetypes.h new file mode 100755 index 00000000..92744353 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/include/glib-2.0/gobject/gvaluetypes.h @@ -0,0 +1,300 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1997-1999, 2000-2001 Tim Janik and Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * gvaluetypes.h: GLib default values + */ +#ifndef __G_VALUETYPES_H__ +#define __G_VALUETYPES_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only <glib-object.h> can be included directly." +#endif + +#include <gobject/gvalue.h> + +G_BEGIN_DECLS + +/* --- type macros --- */ +/** + * G_VALUE_HOLDS_CHAR: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_CHAR. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_CHAR(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_CHAR)) +/** + * G_VALUE_HOLDS_UCHAR: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_UCHAR. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_UCHAR(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UCHAR)) +/** + * G_VALUE_HOLDS_BOOLEAN: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_BOOLEAN. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_BOOLEAN(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOOLEAN)) +/** + * G_VALUE_HOLDS_INT: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_INT. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_INT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_INT)) +/** + * G_VALUE_HOLDS_UINT: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_UINT. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_UINT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UINT)) +/** + * G_VALUE_HOLDS_LONG: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_LONG. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_LONG(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_LONG)) +/** + * G_VALUE_HOLDS_ULONG: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_ULONG. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_ULONG(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_ULONG)) +/** + * G_VALUE_HOLDS_INT64: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_INT64. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_INT64(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_INT64)) +/** + * G_VALUE_HOLDS_UINT64: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_UINT64. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_UINT64(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UINT64)) +/** + * G_VALUE_HOLDS_FLOAT: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_FLOAT. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_FLOAT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_FLOAT)) +/** + * G_VALUE_HOLDS_DOUBLE: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_DOUBLE. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_DOUBLE(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_DOUBLE)) +/** + * G_VALUE_HOLDS_STRING: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_STRING. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_STRING(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_STRING)) +/** + * G_VALUE_HOLDS_POINTER: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_POINTER. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_POINTER(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_POINTER)) +/** + * G_TYPE_GTYPE: + * + * The type for #GType. + */ +#define G_TYPE_GTYPE (g_gtype_get_type()) +/** + * G_VALUE_HOLDS_GTYPE: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_GTYPE. + * + * Since: 2.12 + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_GTYPE(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_GTYPE)) +/** + * G_VALUE_HOLDS_VARIANT: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_VARIANT. + * + * Returns: %TRUE on success. + * + * Since: 2.26 + */ +#define G_VALUE_HOLDS_VARIANT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_VARIANT)) + + +/* --- prototypes --- */ +GLIB_DEPRECATED_IN_2_32_FOR(g_value_set_schar) +void g_value_set_char (GValue *value, + gchar v_char); +GLIB_DEPRECATED_IN_2_32_FOR(g_value_get_schar) +gchar g_value_get_char (const GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_value_set_schar (GValue *value, + gint8 v_char); +GLIB_AVAILABLE_IN_ALL +gint8 g_value_get_schar (const GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_value_set_uchar (GValue *value, + guchar v_uchar); +GLIB_AVAILABLE_IN_ALL +guchar g_value_get_uchar (const GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_value_set_boolean (GValue *value, + gboolean v_boolean); +GLIB_AVAILABLE_IN_ALL +gboolean g_value_get_boolean (const GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_value_set_int (GValue *value, + gint v_int); +GLIB_AVAILABLE_IN_ALL +gint g_value_get_int (const GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_value_set_uint (GValue *value, + guint v_uint); +GLIB_AVAILABLE_IN_ALL +guint g_value_get_uint (const GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_value_set_long (GValue *value, + glong v_long); +GLIB_AVAILABLE_IN_ALL +glong g_value_get_long (const GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_value_set_ulong (GValue *value, + gulong v_ulong); +GLIB_AVAILABLE_IN_ALL +gulong g_value_get_ulong (const GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_value_set_int64 (GValue *value, + gint64 v_int64); +GLIB_AVAILABLE_IN_ALL +gint64 g_value_get_int64 (const GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_value_set_uint64 (GValue *value, + guint64 v_uint64); +GLIB_AVAILABLE_IN_ALL +guint64 g_value_get_uint64 (const GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_value_set_float (GValue *value, + gfloat v_float); +GLIB_AVAILABLE_IN_ALL +gfloat g_value_get_float (const GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_value_set_double (GValue *value, + gdouble v_double); +GLIB_AVAILABLE_IN_ALL +gdouble g_value_get_double (const GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_value_set_string (GValue *value, + const gchar *v_string); +GLIB_AVAILABLE_IN_ALL +void g_value_set_static_string (GValue *value, + const gchar *v_string); +GLIB_AVAILABLE_IN_ALL +const gchar * g_value_get_string (const GValue *value); +GLIB_AVAILABLE_IN_ALL +gchar* g_value_dup_string (const GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_value_set_pointer (GValue *value, + gpointer v_pointer); +GLIB_AVAILABLE_IN_ALL +gpointer g_value_get_pointer (const GValue *value); +GLIB_AVAILABLE_IN_ALL +GType g_gtype_get_type (void); +GLIB_AVAILABLE_IN_ALL +void g_value_set_gtype (GValue *value, + GType v_gtype); +GLIB_AVAILABLE_IN_ALL +GType g_value_get_gtype (const GValue *value); +GLIB_AVAILABLE_IN_ALL +void g_value_set_variant (GValue *value, + GVariant *variant); +GLIB_AVAILABLE_IN_ALL +void g_value_take_variant (GValue *value, + GVariant *variant); +GLIB_AVAILABLE_IN_ALL +GVariant* g_value_get_variant (const GValue *value); +GLIB_AVAILABLE_IN_ALL +GVariant* g_value_dup_variant (const GValue *value); + + +/* Convenience for registering new pointer types */ +GLIB_AVAILABLE_IN_ALL +GType g_pointer_type_register_static (const gchar *name); + +/* debugging aid, describe value contents as string */ +GLIB_AVAILABLE_IN_ALL +gchar* g_strdup_value_contents (const GValue *value); + + +GLIB_AVAILABLE_IN_ALL +void g_value_take_string (GValue *value, + gchar *v_string); +GLIB_DEPRECATED_FOR(g_value_take_string) +void g_value_set_string_take_ownership (GValue *value, + gchar *v_string); + + +/* humpf, need a C representable type name for G_TYPE_STRING */ +/** + * gchararray: + * + * A C representable type name for #G_TYPE_STRING. + */ +typedef gchar* gchararray; + + +G_END_DECLS + +#endif /* __G_VALUETYPES_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/lib/glib-2.0/include/glibconfig.h b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/glib-2.0/include/glibconfig.h new file mode 100755 index 00000000..0ec31b11 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/glib-2.0/include/glibconfig.h @@ -0,0 +1,200 @@ +/* glibconfig.h + * + * This is a generated file. Please modify 'configure.ac' + */ + +#ifndef __GLIBCONFIG_H__ +#define __GLIBCONFIG_H__ + +#include <glib/gmacros.h> + +#include <limits.h> +#include <float.h> +#define GLIB_HAVE_ALLOCA_H + +/* Specifies that GLib's g_print*() functions wrap the + * system printf functions. This is useful to know, for example, + * when using glibc's register_printf_function(). + */ +#define GLIB_USING_SYSTEM_PRINTF + +G_BEGIN_DECLS + +#define G_MINFLOAT FLT_MIN +#define G_MAXFLOAT FLT_MAX +#define G_MINDOUBLE DBL_MIN +#define G_MAXDOUBLE DBL_MAX +#define G_MINSHORT SHRT_MIN +#define G_MAXSHORT SHRT_MAX +#define G_MAXUSHORT USHRT_MAX +#define G_MININT INT_MIN +#define G_MAXINT INT_MAX +#define G_MAXUINT UINT_MAX +#define G_MINLONG LONG_MIN +#define G_MAXLONG LONG_MAX +#define G_MAXULONG ULONG_MAX + +typedef signed char gint8; +typedef unsigned char guint8; +typedef signed short gint16; +typedef unsigned short guint16; +#define G_GINT16_MODIFIER "h" +#define G_GINT16_FORMAT "hi" +#define G_GUINT16_FORMAT "hu" +typedef signed int gint32; +typedef unsigned int guint32; +#define G_GINT32_MODIFIER "" +#define G_GINT32_FORMAT "i" +#define G_GUINT32_FORMAT "u" +#define G_HAVE_GINT64 1 /* deprecated, always true */ + +typedef signed long gint64; +typedef unsigned long guint64; + +#define G_GINT64_CONSTANT(val) (val##L) +#define G_GUINT64_CONSTANT(val) (val##UL) +#define G_GINT64_MODIFIER "l" +#define G_GINT64_FORMAT "li" +#define G_GUINT64_FORMAT "lu" + +#define GLIB_SIZEOF_VOID_P 8 +#define GLIB_SIZEOF_LONG 8 +#define GLIB_SIZEOF_SIZE_T 8 +#define GLIB_SIZEOF_SSIZE_T 8 + +typedef signed long gssize; +typedef unsigned long gsize; +#define G_GSIZE_MODIFIER "l" +#define G_GSSIZE_MODIFIER "l" +#define G_GSIZE_FORMAT "lu" +#define G_GSSIZE_FORMAT "li" + +#define G_MAXSIZE G_MAXULONG +#define G_MINSSIZE G_MINLONG +#define G_MAXSSIZE G_MAXLONG + +typedef gint64 goffset; +#define G_MINOFFSET G_MININT64 +#define G_MAXOFFSET G_MAXINT64 + +#define G_GOFFSET_MODIFIER G_GINT64_MODIFIER +#define G_GOFFSET_FORMAT G_GINT64_FORMAT +#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val) + +#define G_POLLFD_FORMAT "%d" + + +#define GPOINTER_TO_INT(p) ((gint) (glong) (p)) +#define GPOINTER_TO_UINT(p) ((guint) (gulong) (p)) + +#define GINT_TO_POINTER(i) ((gpointer) (glong) (i)) +#define GUINT_TO_POINTER(u) ((gpointer) (gulong) (u)) + +typedef signed long gintptr; +typedef unsigned long guintptr; + +#define G_GINTPTR_MODIFIER "l" +#define G_GINTPTR_FORMAT "li" +#define G_GUINTPTR_FORMAT "lu" +#ifndef G_DISABLE_DEPRECATED +#define g_ATEXIT(proc) (atexit (proc)) +#define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END +#endif + +#define GLIB_MAJOR_VERSION 2 +#define GLIB_MINOR_VERSION 56 +#define GLIB_MICRO_VERSION 1 + +#define G_OS_UNIX + + +#define G_VA_COPY va_copy +#define G_VA_COPY_AS_ARRAY 1 + +#ifndef __cplusplus +# define G_HAVE_ISO_VARARGS 1 +#endif +#ifdef __cplusplus +# define G_HAVE_ISO_VARARGS 1 +#endif + +/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi + * is passed ISO vararg support is turned off, and there is no work + * around to turn it on, so we unconditionally turn it off. + */ +#if __GNUC__ == 2 && __GNUC_MINOR__ == 95 +# undef G_HAVE_ISO_VARARGS +#endif + +#define G_HAVE_GNUC_VARARGS 1 +#define G_HAVE_GROWING_STACK 0 + +#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) +#define G_GNUC_INTERNAL __attribute__((visibility("hidden"))) +#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) +#define G_GNUC_INTERNAL __hidden +#elif defined (__GNUC__) && defined (G_HAVE_GNUC_VISIBILITY) +#define G_GNUC_INTERNAL __attribute__((visibility("hidden"))) +#else +#define G_GNUC_INTERNAL +#endif + +#define G_THREADS_ENABLED +#define G_THREADS_IMPL_POSIX + +#define G_ATOMIC_LOCK_FREE + +#define GINT16_TO_LE(val) ((gint16) (val)) +#define GUINT16_TO_LE(val) ((guint16) (val)) +#define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val)) +#define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val)) +#define GINT32_TO_LE(val) ((gint32) (val)) +#define GUINT32_TO_LE(val) ((guint32) (val)) +#define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val)) +#define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val)) +#define GINT64_TO_LE(val) ((gint64) (val)) +#define GUINT64_TO_LE(val) ((guint64) (val)) +#define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val)) +#define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val)) +#define GLONG_TO_LE(val) ((glong) GINT64_TO_LE (val)) +#define GULONG_TO_LE(val) ((gulong) GUINT64_TO_LE (val)) +#define GLONG_TO_BE(val) ((glong) GINT64_TO_BE (val)) +#define GULONG_TO_BE(val) ((gulong) GUINT64_TO_BE (val)) +#define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val)) +#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val)) +#define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val)) +#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val)) +#define GSIZE_TO_LE(val) ((gsize) GUINT64_TO_LE (val)) +#define GSSIZE_TO_LE(val) ((gssize) GINT64_TO_LE (val)) +#define GSIZE_TO_BE(val) ((gsize) GUINT64_TO_BE (val)) +#define GSSIZE_TO_BE(val) ((gssize) GINT64_TO_BE (val)) +#define G_BYTE_ORDER G_LITTLE_ENDIAN + +#define GLIB_SYSDEF_POLLIN =1 +#define GLIB_SYSDEF_POLLOUT =4 +#define GLIB_SYSDEF_POLLPRI =2 +#define GLIB_SYSDEF_POLLHUP =16 +#define GLIB_SYSDEF_POLLERR =8 +#define GLIB_SYSDEF_POLLNVAL =32 + +#define G_MODULE_SUFFIX "so" + +typedef int GPid; +#define G_PID_FORMAT "i" + +#define GLIB_SYSDEF_AF_UNIX 1 +#define GLIB_SYSDEF_AF_INET 2 +#define GLIB_SYSDEF_AF_INET6 30 + +#define GLIB_SYSDEF_MSG_OOB 1 +#define GLIB_SYSDEF_MSG_PEEK 2 +#define GLIB_SYSDEF_MSG_DONTROUTE 4 + +#define G_DIR_SEPARATOR '/' +#define G_DIR_SEPARATOR_S "/" +#define G_SEARCHPATH_SEPARATOR ':' +#define G_SEARCHPATH_SEPARATOR_S ":" + +G_END_DECLS + +#endif /* __GLIBCONFIG_H__ */ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgio-2.0.0.dylib b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgio-2.0.0.dylib new file mode 100755 index 00000000..4553fe9a Binary files /dev/null and b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgio-2.0.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgio-2.0.dylib b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgio-2.0.dylib new file mode 120000 index 00000000..2d0df1e2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgio-2.0.dylib @@ -0,0 +1 @@ +libgio-2.0.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libglib-2.0.0.dylib b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libglib-2.0.0.dylib new file mode 100755 index 00000000..bbd94e6c Binary files /dev/null and b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libglib-2.0.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libglib-2.0.dylib b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libglib-2.0.dylib new file mode 120000 index 00000000..5310dca0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libglib-2.0.dylib @@ -0,0 +1 @@ +libglib-2.0.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgmodule-2.0.0.dylib b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgmodule-2.0.0.dylib new file mode 100755 index 00000000..1c4e9009 Binary files /dev/null and b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgmodule-2.0.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgmodule-2.0.dylib b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgmodule-2.0.dylib new file mode 120000 index 00000000..0351c5c7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgmodule-2.0.dylib @@ -0,0 +1 @@ +libgmodule-2.0.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgobject-2.0.0.dylib b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgobject-2.0.0.dylib new file mode 100755 index 00000000..31e72511 Binary files /dev/null and b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgobject-2.0.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgobject-2.0.dylib b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgobject-2.0.dylib new file mode 120000 index 00000000..6b8a625e --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgobject-2.0.dylib @@ -0,0 +1 @@ +libgobject-2.0.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgthread-2.0.0.dylib b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgthread-2.0.0.dylib new file mode 100755 index 00000000..47dc66ac Binary files /dev/null and b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgthread-2.0.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgthread-2.0.dylib b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgthread-2.0.dylib new file mode 120000 index 00000000..92073094 --- /dev/null +++ b/frameworks/cairosvg/dependencies/glib/2.56.1/lib/libgthread-2.0.dylib @@ -0,0 +1 @@ +libgthread-2.0.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/graphite2/1.3.11/include/graphite2/Font.h b/frameworks/cairosvg/dependencies/graphite2/1.3.11/include/graphite2/Font.h new file mode 100644 index 00000000..efe2af9f --- /dev/null +++ b/frameworks/cairosvg/dependencies/graphite2/1.3.11/include/graphite2/Font.h @@ -0,0 +1,388 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + + Alternatively, the contents of this file may be used under the terms + of the Mozilla Public License (http://mozilla.org/MPL) or the GNU + General Public License, as published by the Free Software Foundation, + either version 2 of the License or (at your option) any later version. +*/ +#pragma once + +#include "graphite2/Types.h" + +#define GR2_VERSION_MAJOR 1 +#define GR2_VERSION_MINOR 3 +#define GR2_VERSION_BUGFIX 11 + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef struct gr_face gr_face; +typedef struct gr_font gr_font; +typedef struct gr_feature_ref gr_feature_ref; +typedef struct gr_feature_val gr_feature_val; + +/** +* Returns version information on this engine +*/ +GR2_API void gr_engine_version(int *nMajor, int *nMinor, int *nBugFix); + +/** +* The Face Options allow the application to require that certain tables are +* read during face construction. This may be of concern if the appFaceHandle +* used in the gr_get_table_fn may change. +* The values can be combined +*/ +enum gr_face_options { + /** No preload, no cmap caching, fail if the graphite tables are invalid */ + gr_face_default = 0, + /** Dumb rendering will be enabled if the graphite tables are invalid */ + gr_face_dumbRendering = 1, + /** preload glyphs at construction time */ + gr_face_preloadGlyphs = 2, + /** Cache the lookup from code point to glyph ID at construction time */ + gr_face_cacheCmap = 4, + /** Preload everything */ + gr_face_preloadAll = gr_face_preloadGlyphs | gr_face_cacheCmap +}; + +/** Holds information about a particular Graphite silf table that has been loaded */ +struct gr_faceinfo { + gr_uint16 extra_ascent; /**< The extra_ascent in the GDL, in design units */ + gr_uint16 extra_descent; /**< The extra_descent in the GDL, in design units */ + gr_uint16 upem; /**< The design units for the font */ + enum gr_space_contextuals { + gr_space_unknown = 0, /**< no information is known. */ + gr_space_none = 1, /**< the space character never occurs in any rules. */ + gr_space_left_only = 2, /**< the space character only occurs as the first element in a rule. */ + gr_space_right_only = 3, /**< the space character only occurs as the last element in a rule. */ + gr_space_either_only = 4, /**< the space character only occurs as the only element in a rule. */ + gr_space_both = 5, /**< the space character may occur as the first or last element of a rule. */ + gr_space_cross = 6 /**< the space character occurs in a rule not as a first or last element. */ + } space_contextuals; + unsigned int has_bidi_pass : 1; /**< the table specifies that a bidirectional pass should run */ + unsigned int line_ends : 1; /**< there are line end contextuals somewhere */ + unsigned int justifies : 1; /**< there are .justify properties set somewhere on some glyphs */ +}; + +typedef struct gr_faceinfo gr_faceinfo; + +/** type describing function to retrieve font table information + * + * @return a pointer to the table in memory. The pointed to memory must exist as + * long as the gr_face which makes the call. + * @param appFaceHandle is the unique information passed to gr_make_face() + * @param name is a 32bit tag to the table name. + * @param len returned by this function to say how long the table is in memory. + */ +typedef const void *(*gr_get_table_fn)(const void* appFaceHandle, unsigned int name, size_t *len); + +/** type describing function to release any resources allocated by the above get_table table function + * + * @param appFaceHandle is the unique information passed to gr_make_face() + * @param pointer to table memory returned by get_table. + */ +typedef void (*gr_release_table_fn)(const void* appFaceHandle, const void *table_buffer); + +/** struct housing function pointers to manage font table buffers for the graphite engine. */ +struct gr_face_ops +{ + /** size in bytes of this structure */ + size_t size; + /** a pointer to a function to request a table from the client. */ + gr_get_table_fn get_table; + /** is a pointer to a function to notify the client the a table can be released. + * This can be NULL to signify that the client does not wish to do any release handling. */ + gr_release_table_fn release_table; +}; +typedef struct gr_face_ops gr_face_ops; + +/** Create a gr_face object given application information and a table functions. + * + * @return gr_face or NULL if the font fails to load for some reason. + * @param appFaceHandle This is application specific information that is passed + * to the getTable function. The appFaceHandle must stay + * alive as long as the gr_face is alive. + * @param face_ops Pointer to face specific callback structure for table + * management. Must stay alive for the duration of the + * call only. + * @param faceOptions Bitfield describing various options. See enum gr_face_options for details. + */ +GR2_API gr_face* gr_make_face_with_ops(const void* appFaceHandle/*non-NULL*/, const gr_face_ops *face_ops, unsigned int faceOptions); + +/** Create a gr_face object given application information and a getTable function. This function is deprecated as of v1.2.0 in + * favour of gr_make_face_with_ops. + * + * @return gr_face or NULL if the font fails to load for some reason. + * @param appFaceHandle This is application specific information that is passed + * to the getTable function. The appFaceHandle must stay + * alive as long as the gr_face is alive. + * @param getTable Callback function to get table data. + * @param faceOptions Bitfield describing various options. See enum gr_face_options for details. + */ +GR2_API gr_face* gr_make_face(const void* appFaceHandle/*non-NULL*/, gr_get_table_fn getTable, unsigned int faceOptions); + +//#ifndef GRAPHITE2_NSEGCACHE +/** Create a gr_face object given application information, with subsegmental caching support + * + * @return gr_face or NULL if the font fails to load. + * @param appFaceHandle is a pointer to application specific information that is passed to getTable. + * This may not be NULL and must stay alive as long as the gr_face is alive. + * @param face_ops Pointer to face specific callback structure for table management. Must stay + * alive for the duration of the call only. + * @param segCacheMaxSize How large the segment cache is. + * @param faceOptions Bitfield of values from enum gr_face_options + */ +GR2_API gr_face* gr_make_face_with_seg_cache_and_ops(const void* appFaceHandle, const gr_face_ops *face_ops, unsigned int segCacheMaxSize, unsigned int faceOptions); + +/** Create a gr_face object given application information, with subsegmental caching support. + * This function is deprecated as of v1.2.0 in favour of gr_make_face_with_seg_cache_and_ops. + * + * @return gr_face or NULL if the font fails to load. + * @param appFaceHandle is a pointer to application specific information that is passed to getTable. + * This may not be NULL and must stay alive as long as the gr_face is alive. + * @param getTable The function graphite calls to access font table data + * @param segCacheMaxSize How large the segment cache is. + * @param faceOptions Bitfield of values from enum gr_face_options + */ +GR2_API gr_face* gr_make_face_with_seg_cache(const void* appFaceHandle, gr_get_table_fn getTable, unsigned int segCacheMaxSize, unsigned int faceOptions); +//#endif + +/** Convert a tag in a string into a gr_uint32 + * + * @return gr_uint32 tag, zero padded + * @param str a nul terminated string of which at most the first 4 characters are read + */ +GR2_API gr_uint32 gr_str_to_tag(const char *str); + +/** Convert a gr_uint32 tag into a string + * + * @param tag contains the tag to convert + * @param str is a pointer to a char array of at least size 4 bytes. The first 4 bytes of this array + * will be overwritten by this function. No nul is appended. + */ +GR2_API void gr_tag_to_str(gr_uint32 tag, char *str); + +/** Get feature values for a given language or default + * + * @return a copy of the default feature values for a given language. The application must call + * gr_featureval_destroy() to free this object when done. + * @param pFace The font face to get feature values from + * @param langname The language tag to get feature values for. If there is no such language or + * langname is 0, the default feature values for the font are returned. + * langname is right 0 padded and assumes lowercase. Thus the en langauge + * would be 0x656E0000. Langname may also be space padded, thus 0x656E2020. + */ +GR2_API gr_feature_val* gr_face_featureval_for_lang(const gr_face* pFace, gr_uint32 langname); + +/** Get feature reference for a given feature id from a face + * + * @return a feature reference corresponding to the given id. This data is part of the gr_face and + * will be freed when the face is destroyed. + * @param pFace Font face to get information on. + * @param featId Feature id tag to get reference to. + */ +GR2_API const gr_feature_ref* gr_face_find_fref(const gr_face* pFace, gr_uint32 featId); + +/** Returns number of feature references in a face **/ +GR2_API gr_uint16 gr_face_n_fref(const gr_face* pFace); + +/** Returns feature reference at given index in face **/ +GR2_API const gr_feature_ref* gr_face_fref(const gr_face* pFace, gr_uint16 i); + +/** Return number of languages the face knows about **/ +GR2_API unsigned short gr_face_n_languages(const gr_face* pFace); + +/** Returns a language id corresponding to a language of given index in the face **/ +GR2_API gr_uint32 gr_face_lang_by_index(const gr_face* pFace, gr_uint16 i); + +/** Destroy the given face and free its memory **/ +GR2_API void gr_face_destroy(gr_face *face); + +/** Returns the number of glyphs in the face **/ +GR2_API unsigned short gr_face_n_glyphs(const gr_face* pFace); + +/** Returns a faceinfo for the face and script **/ +GR2_API const gr_faceinfo *gr_face_info(const gr_face *pFace, gr_uint32 script); + +/** Returns whether the font supports a given Unicode character + * + * @return true if the character is supported. + * @param pFace face to test within + * @param usv Unicode Scalar Value of character to test + * @param script Tag of script for selecting which set of pseudo glyphs to test. May be NULL. + */ +GR2_API int gr_face_is_char_supported(const gr_face *pFace, gr_uint32 usv, gr_uint32 script); + +#ifndef GRAPHITE2_NFILEFACE +/** Create gr_face from a font file + * + * @return gr_face that accesses a font file directly. Returns NULL on failure. + * @param filename Full path and filename to font file + * @param faceOptions Bitfile from enum gr_face_options to control face options. + */ +GR2_API gr_face* gr_make_file_face(const char *filename, unsigned int faceOptions); + +//#ifndef GRAPHITE2_NSEGCACHE +/** Create gr_face from a font file, with subsegment caching support. + * + * @return gr_face that accesses a font file directly. Returns NULL on failure. + * @param filename Full path and filename to font file + * @param segCacheMaxSize Specifies how big to make the cache in segments. + * @param faceOptions Bitfield from enum gr_face_options to control face options. + */ +GR2_API gr_face* gr_make_file_face_with_seg_cache(const char *filename, unsigned int segCacheMaxSize, unsigned int faceOptions); +//#endif +#endif // !GRAPHITE2_NFILEFACE + +/** Create a font from a face + * + * @return gr_font Call font_destroy to free this font + * @param ppm Resolution of the font in pixels per em + * @param face Face this font corresponds to. This must stay alive as long as the font is alive. + */ +GR2_API gr_font* gr_make_font(float ppm, const gr_face *face); + +/** query function to find the hinted advance of a glyph + * + * @param appFontHandle is the unique information passed to gr_make_font_with_advance() + * @param glyphid is the glyph to retireve the hinted advance for. + */ +typedef float (*gr_advance_fn)(const void* appFontHandle, gr_uint16 glyphid); + +/** struct housing function pointers to manage font hinted metrics for the + * graphite engine. */ +struct gr_font_ops +{ + /** size of the structure in bytes to allow for future extensibility */ + size_t size; + /** a pointer to a function to retrieve the hinted + * advance width of a glyph which the font cannot + * provide without client assistance. This can be + * NULL to signify no horizontal hinted metrics are necessary. */ + gr_advance_fn glyph_advance_x; + /** a pointer to a function to retrieve the hinted + * advance height of a glyph which the font cannot + * provide without client assistance. This can be + * NULL to signify no horizontal hinted metrics are necessary. */ + gr_advance_fn glyph_advance_y; +}; +typedef struct gr_font_ops gr_font_ops; + +/** Creates a font with hinted advance width query functions + * + * @return gr_font to be destroyed via font_destroy + * @param ppm size of font in pixels per em + * @param appFontHandle font specific information that must stay alive as long + * as the font does + * @param font_ops pointer font specific callback structure for hinted metrics. + * Need only stay alive for the duration of the call. + * @param face the face this font corresponds to. Must stay alive as long as + * the font does. + */ +GR2_API gr_font* gr_make_font_with_ops(float ppm, const void* appFontHandle, const gr_font_ops * font_ops, const gr_face *face); + +/** Creates a font with hinted advance width query function. + * This function is deprecated. Use gr_make_font_with_ops instead. + * + * @return gr_font to be destroyed via font_destroy + * @param ppm size of font in pixels per em + * @param appFontHandle font specific information that must stay alive as long + * as the font does + * @param getAdvance callback function reference that returns horizontal advance in pixels for a glyph. + * @param face the face this font corresponds to. Must stay alive as long as + * the font does. + */ +GR2_API gr_font* gr_make_font_with_advance_fn(float ppm, const void* appFontHandle, gr_advance_fn getAdvance, const gr_face *face); + +/** Free a font **/ +GR2_API void gr_font_destroy(gr_font *font); + +/** get a feature value + * + * @return value of specific feature or 0 if any problems. + * @param pfeatureref gr_feature_ref to the feature + * @param feats gr_feature_val containing all the values + */ +GR2_API gr_uint16 gr_fref_feature_value(const gr_feature_ref* pfeatureref, const gr_feature_val* feats); + +/** set a feature value + * + * @return false if there were any problems (value out of range, etc.) + * @param pfeatureref gr_feature_ref to the feature + * @param val value to set the feature to + * @param pDest the gr_feature_val containing all the values for all the features + */ +GR2_API int gr_fref_set_feature_value(const gr_feature_ref* pfeatureref, gr_uint16 val, gr_feature_val* pDest); + +/** Returns the id tag for a gr_feature_ref **/ +GR2_API gr_uint32 gr_fref_id(const gr_feature_ref* pfeatureref); + +/** Returns number of values a feature may take, given a gr_feature_ref **/ +GR2_API gr_uint16 gr_fref_n_values(const gr_feature_ref* pfeatureref); + +/** Returns the value associated with a particular value in a feature + * + * @return value + * @param pfeatureref gr_feature_ref of the feature of interest + * @param settingno Index up to the return value of gr_fref_n_values() of the value + */ +GR2_API gr_int16 gr_fref_value(const gr_feature_ref* pfeatureref, gr_uint16 settingno); + +/** Returns a string of the UI name of a feature + * + * @return string of the UI name, in the encoding form requested. Call gr_label_destroy() after use. + * @param pfeatureref gr_feature_ref of the feature + * @param langId This is a pointer since the face may not support a string in the requested + * language. The actual language of the string is returned in langId + * @param utf Encoding form for the string + * @param length Used to return the length of the string returned in bytes. + */ +GR2_API void* gr_fref_label(const gr_feature_ref* pfeatureref, gr_uint16 *langId, enum gr_encform utf, gr_uint32 *length); + +/** Return a UI string for a possible value of a feature + * + * @return string of the UI name, in the encoding form requested. nul terminated. Call gr_label_destroy() + * after use. + * @param pfeatureref gr_feature_ref of the feature + * @param settingno Value setting index + * @param langId This is a pointer to the requested language. The requested language id is + * replaced by the actual language id of the string returned. + * @param utf Encoding form for the string + * @param length Returns the length of the string returned in bytes. + */ +GR2_API void* gr_fref_value_label(const gr_feature_ref* pfeatureref, gr_uint16 settingno/*rather than a value*/, gr_uint16 *langId, enum gr_encform utf, gr_uint32 *length); + +/** Destroy a previously returned label string **/ +GR2_API void gr_label_destroy(void * label); + +/** Copies a gr_feature_val **/ +GR2_API gr_feature_val* gr_featureval_clone(const gr_feature_val* pfeatures); + +/** Destroys a gr_feature_val **/ +GR2_API void gr_featureval_destroy(gr_feature_val *pfeatures); + +#ifdef __cplusplus +} +#endif + diff --git a/frameworks/cairosvg/dependencies/graphite2/1.3.11/include/graphite2/Log.h b/frameworks/cairosvg/dependencies/graphite2/1.3.11/include/graphite2/Log.h new file mode 100644 index 00000000..d1c6f0fe --- /dev/null +++ b/frameworks/cairosvg/dependencies/graphite2/1.3.11/include/graphite2/Log.h @@ -0,0 +1,85 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + + Alternatively, the contents of this file may be used under the terms + of the Mozilla Public License (http://mozilla.org/MPL) or the GNU + General Public License, as published by the Free Software Foundation, + either version 2 of the License or (at your option) any later version. +*/ +#pragma once + +#include <graphite2/Types.h> +#include <graphite2/Font.h> +#include <stdio.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +/** deprecated mechanism that doesn't do anything now. */ +typedef enum { + GRLOG_NONE = 0x0, + GRLOG_FACE = 0x01, + GRLOG_SEGMENT = 0x02, + GRLOG_PASS = 0x04, + GRLOG_CACHE = 0x08, + + GRLOG_OPCODE = 0x80, + GRLOG_ALL = 0xFF +} GrLogMask; + +/** Start logging all segment creation and updates on the provided face. This + * is logged to a JSON file, see "Segment JSON Schema.txt" for a precise + * definition of the file + * + * @return true if the file was successfully created and logging is correctly + * initialised. + * @param face the gr_face whose segments you want to log to the given file + * @param log_path a utf8 encoded file name and path to log to. + */ +GR2_API bool gr_start_logging(gr_face * face, const char *log_path); + + +/** Stop logging on the given face. This will close the log file created by + * gr_start_logging. + * + * @param face the gr_face whose segments you want to stop logging + */ +GR2_API void gr_stop_logging(gr_face * face); + +/** Start logging to a FILE object. + * This function is deprecated as of 1.2.0, use the _face versions instead. + * + * @return True on success + * @param logfile FILE reference to output logging to + * @param mask What aspects of logging to report (ignored) + */ +GR2_API bool graphite_start_logging(FILE * logFile, GrLogMask mask); //may not do anthing if disabled in the implementation of the engine. + +/** Stop logging to a FILE object. + * This function is deprecated as of 1.2.0, use the _face versions instead. + */ +GR2_API void graphite_stop_logging(); + +#ifdef __cplusplus +} +#endif diff --git a/frameworks/cairosvg/dependencies/graphite2/1.3.11/include/graphite2/Segment.h b/frameworks/cairosvg/dependencies/graphite2/1.3.11/include/graphite2/Segment.h new file mode 100644 index 00000000..0c3c49a3 --- /dev/null +++ b/frameworks/cairosvg/dependencies/graphite2/1.3.11/include/graphite2/Segment.h @@ -0,0 +1,461 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + + Alternatively, the contents of this file may be used under the terms + of the Mozilla Public License (http://mozilla.org/MPL) or the GNU + General Public License, as published by the Free Software Foundation, + either version 2 of the License or (at your option) any later version. +*/ +#pragma once + +#include "graphite2/Types.h" +#include "graphite2/Font.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +enum gr_break_weight { + gr_breakNone = 0, + /* after break weights */ + gr_breakWhitespace = 10, + gr_breakWord = 15, + gr_breakIntra = 20, + gr_breakLetter = 30, + gr_breakClip = 40, + /* before break weights */ + gr_breakBeforeWhitespace = -10, + gr_breakBeforeWord = -15, + gr_breakBeforeIntra = -20, + gr_breakBeforeLetter = -30, + gr_breakBeforeClip = -40 +}; + +enum gr_justFlags { + /// Indicates that this segment is a complete line + gr_justCompleteLine = 0, + /// Indicates that the start of the slot list is not at the start of a line + gr_justStartInline = 1, + /// Indicates that the end of the slot list is not at the end of a line + gr_justEndInline = 2 +}; + +/** Used for looking up slot attributes. Most are already available in other functions **/ +enum gr_attrCode { + /// adjusted glyph advance in x direction in design units + gr_slatAdvX = 0, + /// adjusted glyph advance in y direction (usually 0) in design units + gr_slatAdvY, + /// returns 0. Deprecated. + gr_slatAttTo, + /// This slot attaches to its parent at the given design units in the x direction + gr_slatAttX, + /// This slot attaches to its parent at the given design units in the y direction + gr_slatAttY, + /// This slot attaches to its parent at the given glyph point (not implemented) + gr_slatAttGpt, + /// x-direction adjustment from the given glyph point (not implemented) + gr_slatAttXOff, + /// y-direction adjustment from the given glyph point (not implemented) + gr_slatAttYOff, + /// Where on this glyph should align with the attachment point on the parent glyph in the x-direction. + gr_slatAttWithX, + /// Where on this glyph should align with the attachment point on the parent glyph in the y-direction + gr_slatAttWithY, + /// Which glyph point on this glyph should align with the attachment point on the parent glyph (not implemented). + gr_slatWithGpt, + /// Adjustment to gr_slatWithGpt in x-direction (not implemented) + gr_slatAttWithXOff, + /// Adjustment to gr_slatWithGpt in y-direction (not implemented) + gr_slatAttWithYOff, + /// Attach at given nesting level (not implemented) + gr_slatAttLevel, + /// Line break breakweight for this glyph + gr_slatBreak, + /// Ligature component reference (not implemented) + gr_slatCompRef, + /// bidi directionality of this glyph (not implemented) + gr_slatDir, + /// Whether insertion is allowed before this glyph + gr_slatInsert, + /// Final positioned position of this glyph relative to its parent in x-direction in pixels + gr_slatPosX, + /// Final positioned position of this glyph relative to its parent in y-direction in pixels + gr_slatPosY, + /// Amount to shift glyph by in x-direction design units + gr_slatShiftX, + /// Amount to shift glyph by in y-direction design units + gr_slatShiftY, + /// attribute user1 + gr_slatUserDefnV1, + /// not implemented + gr_slatMeasureSol, + /// not implemented + gr_slatMeasureEol, + /// Amount this slot can stretch (not implemented) + gr_slatJStretch, + /// Amount this slot can shrink (not implemented) + gr_slatJShrink, + /// Granularity by which this slot can stretch or shrink (not implemented) + gr_slatJStep, + /// Justification weight for this glyph (not implemented) + gr_slatJWeight, + /// Amount this slot mush shrink or stretch in design units + gr_slatJWidth = 29, + /// SubSegment split point + gr_slatSegSplit = gr_slatJStretch + 29, + /// User defined attribute, see subattr for user attr number + gr_slatUserDefn, + /// Bidi level + gr_slatBidiLevel = 56, + /// Collision flags + gr_slatColFlags, + /// Collision constraint rectangle left (bl.x) + gr_slatColLimitblx, + /// Collision constraint rectangle lower (bl.y) + gr_slatColLimitbly, + /// Collision constraint rectangle right (tr.x) + gr_slatColLimittrx, + /// Collision constraint rectangle upper (tr.y) + gr_slatColLimittry, + /// Collision shift x + gr_slatColShiftx, + /// Collision shift y + gr_slatColShifty, + /// Collision margin + gr_slatColMargin, + /// Margin cost weight + gr_slatColMarginWt, + // Additional glyph that excludes movement near this one: + gr_slatColExclGlyph, + gr_slatColExclOffx, + gr_slatColExclOffy, + // Collision sequence enforcing attributes: + gr_slatSeqClass, + gr_slatSeqProxClass, + gr_slatSeqOrder, + gr_slatSeqAboveXoff, + gr_slatSeqAboveWt, + gr_slatSeqBelowXlim, + gr_slatSeqBelowWt, + gr_slatSeqValignHt, + gr_slatSeqValignWt, + + /// not implemented + gr_slatMax, + /// not implemented + gr_slatNoEffect = gr_slatMax + 1 +}; + +enum gr_bidirtl { + /// Underlying paragraph direction is RTL + gr_rtl = 1, + /// Set this to not run the bidi pass internally, even if the font asks for it. + /// This presumes that the segment is in a single direction. Most of the time + /// this bit should be set unless you know you are passing full paragraphs of text. + gr_nobidi = 2, + /// Disable auto mirroring for rtl text + gr_nomirror = 4 +}; + +typedef struct gr_char_info gr_char_info; +typedef struct gr_segment gr_segment; +typedef struct gr_slot gr_slot; + +/** Returns Unicode character for a charinfo. + * + * @param p Pointer to charinfo to return information on. + */ +GR2_API unsigned int gr_cinfo_unicode_char(const gr_char_info* p/*not NULL*/); + +/** Returns breakweight for a charinfo. + * + * @return Breakweight is a number between -50 and 50 indicating the cost of a + * break before or after this character. If the value < 0, the absolute value + * is this character's contribution to the overall breakweight before it. If the value + * > 0, then the value is this character's contribution to the overall breakweight after it. + * The overall breakweight between two characters is the maximum of the breakweight + * contributions from the characters either side of it. If a character makes no + * contribution to the breakweight on one side of it, the contribution is considered + * to be 0. + * @param p Pointer to charinfo to return information on. + */ +GR2_API int gr_cinfo_break_weight(const gr_char_info* p/*not NULL*/); + +/** Returns the slot index that after this character is after in the slot stream + * + * In effect each character is associated with a set of slots and this returns + * the index of the last slot in the segment this character is associated with. + * + * @return after slot index between 0 and gr_seg_n_slots() + * @param p Pointer to charinfo to return information on. + */ +GR2_API int gr_cinfo_after(const gr_char_info* p/*not NULL*/); + +/** Returns the slot index that before this character is before in the slot stream + * + * In effect each character is associated with a set of slots and this returns + * the index of the first slot in the segment this character is associated with. + * + * @return before slot index between 0 and gr_seg_n_slots() + * @param p Pointer to charinfo to return information on. + */ +GR2_API int gr_cinfo_before(const gr_char_info* p/*not NULL*/); + +/** Returns the code unit index of this character in the input string + * + * @return code unit index between 0 and the end of the string + * @param p Pointer to charinfo to return information on. + */ +GR2_API size_t gr_cinfo_base(const gr_char_info* p/*not NULL*/); + +/** Returns the number of unicode characters in a string. + * + * @return number of characters in the string + * @param enc Specifies the type of data in the string: utf8, utf16, utf32 + * @param buffer_begin The start of the string + * @param buffer_end Measure up to the first nul or when end is reached, whichever is earliest. + * This parameter may be NULL. + * @param pError If there is a structural fault in the string, the location is returned + * in this variable. If no error occurs, pError will contain NULL. NULL + * may be passed for pError if no such information is required. + */ +GR2_API size_t gr_count_unicode_characters(enum gr_encform enc, const void* buffer_begin, const void* buffer_end, const void** pError); + +/** Creates and returns a segment. + * + * @return a segment that needs seg_destroy called on it. May return NULL if bad problems + * in segment processing. + * @param font Gives the size of the font in pixels per em for final positioning. If + * NULL, positions are returned in design units, i.e. at a ppm of the upem + * of the face. + * @param face The face containing all the non-size dependent information. + * @param script This is a tag containing a script identifier that is used to choose + * which graphite table within the font to use. Maybe 0. Tag may be 4 chars + * NULL padded in LSBs or space padded in LSBs. + * @param pFeats Pointer to a feature values to be used for the segment. Only one + * feature values may be used for a segment. If NULL the default features + * for the font will be used. + * @param enc Specifies what encoding form the string is in (utf8, utf16, utf32) + * @param pStart Start of the string + * @param nChars Number of unicode characters to process in the string. The string will + * be processed either up to the first NULL or until nChars have been + * processed. nChars is also used to initialise the internal memory + * allocations of the segment. So it is wise not to make nChars too much + * greater than the actual number of characters being processed. + * @param dir Specifies whether the segment is processed right to left (1) or left to + * right (0) and whether to run the internal bidi pass, if a font requests it. + * See enum gr_bidirtl for details. + */ +GR2_API gr_segment* gr_make_seg(const gr_font* font, const gr_face* face, gr_uint32 script, const gr_feature_val* pFeats, enum gr_encform enc, const void* pStart, size_t nChars, int dir); + +/** Destroys a segment, freeing the memory. + * + * @param p The segment to destroy + */ +GR2_API void gr_seg_destroy(gr_segment* p); + +/** Returns the advance for the whole segment. + * + * Returns the width of the segment up to the next glyph origin after the segment + */ +GR2_API float gr_seg_advance_X(const gr_segment* pSeg/*not NULL*/); + +/** Returns the height advance for the segment. **/ +GR2_API float gr_seg_advance_Y(const gr_segment* pSeg/*not NULL*/); + +/** Returns the number of gr_char_infos in the segment. **/ +GR2_API unsigned int gr_seg_n_cinfo(const gr_segment* pSeg/*not NULL*/); + +/** Returns a gr_char_info at a given index in the segment. **/ +GR2_API const gr_char_info* gr_seg_cinfo(const gr_segment* pSeg/*not NULL*/, unsigned int index/*must be <number_of_CharInfo*/); + +/** Returns the number of glyph gr_slots in the segment. **/ +GR2_API unsigned int gr_seg_n_slots(const gr_segment* pSeg/*not NULL*/); //one slot per glyph + +/** Returns the first gr_slot in the segment. + * + * The first slot in a segment has a gr_slot_prev_in_segment() of NULL. Slots are owned + * by their segment and are destroyed along with the segment. + */ +GR2_API const gr_slot* gr_seg_first_slot(gr_segment* pSeg/*not NULL*/); //may give a base slot or a slot which is attached to another + +/** Returns the last gr_slot in the segment. + * + * The last slot in a segment has a gr_slot_next_in_segment() of NULL + */ +GR2_API const gr_slot* gr_seg_last_slot(gr_segment* pSeg/*not NULL*/); //may give a base slot or a slot which is attached to another + +/** Justifies a linked list of slots for a line to a given width + * + * Passed a pointer to the start of a linked list of slots corresponding to a line, as + * set up by gr_slot_linebreak_before, this function will position the glyphs in the line + * to take up the given width. It is possible to specify a subrange within the line to process. + * This allows skipping of line initial or final whitespace, for example. While this will ensure + * that the subrange fits width, the line will still be positioned with the first glyph of the + * line at 0. So the resulting positions may be beyond width. + * + * @return float The resulting width of the range of slots justified. + * @param pSeg Pointer to the segment + * @param pStart Pointer to the start of the line linked list (including skipped characters) + * @param pFont Font to use for positioning + * @param width Width in pixels in which to fit the line. If < 0. don't adjust natural width, just run justification passes + * to handle line end contextuals, if there are any. + * @param flags Indicates line ending types. Default is linked list is a full line + * @param pFirst If not NULL, the first slot in the list to be considered part of the line (so can skip) + * @param pLast If not NULL, the last slot to process in the line (allow say trailing whitespace to be skipped) + */ +GR2_API float gr_seg_justify(gr_segment* pSeg/*not NULL*/, const gr_slot* pStart/*not NULL*/, const gr_font *pFont, double width, enum gr_justFlags flags, const gr_slot* pFirst, const gr_slot* pLast); + +/** Returns the next slot along in the segment. + * + * Slots are held in a linked list. This returns the next in the linked list. The slot + * may or may not be attached to another slot. Returns NULL at the end of the segment. + */ +GR2_API const gr_slot* gr_slot_next_in_segment(const gr_slot* p); + +/** Returns the previous slot along in the segment. + * + * Slots are held in a doubly linked list. This returns the previos slot in the linked + * list. This slot may or may not be attached to it. Returns NULL at the start of the + * segment. + */ +GR2_API const gr_slot* gr_slot_prev_in_segment(const gr_slot* p); + +/** Returns the attachment parent slot of this slot. + * + * Attached slots form a tree. This returns the parent of this slot in that tree. A + * base glyph which is not attached to another glyph, always returns NULL. + */ +GR2_API const gr_slot* gr_slot_attached_to(const gr_slot* p); + +/** Returns the first slot attached to this slot. + * + * Attached slots form a singly linked list from the parent. This returns the first + * slot in that list. Note that this is a reference to another slot that is also in + * the main segment doubly linked list. + * + * if gr_slot_first_attachment(p) != NULL then gr_slot_attached_to(gr_slot_first_attachment(p)) == p. + */ +GR2_API const gr_slot* gr_slot_first_attachment(const gr_slot* p); + +/** Returns the next slot attached to our attachment parent. + * + * This returns the next slot in the singly linked list of slots attached to this + * slot's parent. If there are no more such slots, NULL is returned. If there is + * no parent, i.e. the passed slot is a cluster base, then the next cluster base + * in graphical order (ltr, even for rtl text) is returned. + * + * if gr_slot_next_sibling_attachment(p) != NULL then gr_slot_attached_to(gr_slot_next_sibling_attachment(p)) == gr_slot_attached_to(p). + */ +GR2_API const gr_slot* gr_slot_next_sibling_attachment(const gr_slot* p); + + +/** Returns glyph id of the slot + * + * Each slot has a glyphid which is rendered at the position given by the slot. This + * glyphid is the real glyph to be rendered and never a pseudo glyph. + */ +GR2_API unsigned short gr_slot_gid(const gr_slot* p); + +/** Returns X offset of glyph from start of segment **/ +GR2_API float gr_slot_origin_X(const gr_slot* p); + +/** Returns Y offset of glyph from start of segment **/ +GR2_API float gr_slot_origin_Y(const gr_slot* p); + +/** Returns the glyph advance for this glyph as adjusted for kerning + * + * @param p Slot to give results for + * @param face gr_face of the glyphs. May be NULL if unhinted advances used + * @param font gr_font to scale for pixel results. If NULL returns design + * units advance. If not NULL then returns pixel advance based + * on hinted or scaled glyph advances in the font. face must be + * passed for hinted advances to be used. + */ +GR2_API float gr_slot_advance_X(const gr_slot* p, const gr_face* face, const gr_font *font); + +/** Returns the vertical advance for the glyph in the slot adjusted for kerning + * + * Returns design units unless font is not NULL in which case the pixel value + * is returned scaled for the given font + */ +GR2_API float gr_slot_advance_Y(const gr_slot* p, const gr_face* face, const gr_font *font); + +/** Returns the gr_char_info index before us + * + * Returns the index of the gr_char_info that a cursor before this slot, would put + * an underlying cursor before. This may also be interpretted as each slot holding + * a set of char_infos that it is associated with and this function returning the + * index of the char_info with lowest index, from this set. + */ +GR2_API int gr_slot_before(const gr_slot* p/*not NULL*/); + +/** Returns the gr_char_info index after us + * + * Returns the index of the gr_char_info that a cursor after this slot would put an + * underlying cursor after. This may also be interpretted as each slot holding a set + * of char_infos that it is associated with and this function returning the index of + * the char_info with the highest index, from this set. + */ +GR2_API int gr_slot_after(const gr_slot* p/*not NULL*/); + +/** Returns the index of this slot in the segment + * + * Returns the index given to this slot during final positioning. This corresponds + * to the value returned br gr_cinfo_before() and gr_cinfo_after() + */ +GR2_API unsigned int gr_slot_index(const gr_slot* p/*not NULL*/); + +/** Return a slot attribute value + * + * Given a slot and an attribute along with a possible subattribute, return the + * corresponding value in the slot. See enum gr_attrCode for details of each attribute. + */ +GR2_API int gr_slot_attr(const gr_slot* p/*not NULL*/, const gr_segment* pSeg/*not NULL*/, enum gr_attrCode index, gr_uint8 subindex); //tbd - do we need to expose this? + +/** Returns whether text may be inserted before this glyph. + * + * This indicates whether a cursor can be put before this slot. It applies to + * base glyphs that have no parent as well as attached glyphs that have the + * .insert attribute explicitly set to true. This is the primary mechanism + * for identifying contiguous sequences of base plus diacritics. + */ +GR2_API int gr_slot_can_insert_before(const gr_slot* p); + +/** Returns the original gr_char_info index this slot refers to. + * + * Each Slot has a gr_char_info that it originates from. This is that gr_char_info. + * The index is passed to gr_seg_cinfo(). This information is useful for testing. + */ +GR2_API int gr_slot_original(const gr_slot* p/*not NULL*/); + +/** Breaks a segment into lines. + * + * Breaks the slot linked list at the given point in the linked list. It is up + * to the application to keep track of the first slot on each line. + */ +GR2_API void gr_slot_linebreak_before(gr_slot *p/*not NULL*/); + +#ifdef __cplusplus +} +#endif diff --git a/frameworks/cairosvg/dependencies/graphite2/1.3.11/include/graphite2/Types.h b/frameworks/cairosvg/dependencies/graphite2/1.3.11/include/graphite2/Types.h new file mode 100644 index 00000000..e8e45c1f --- /dev/null +++ b/frameworks/cairosvg/dependencies/graphite2/1.3.11/include/graphite2/Types.h @@ -0,0 +1,72 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + + Alternatively, the contents of this file may be used under the terms + of the Mozilla Public License (http://mozilla.org/MPL) or the GNU + General Public License, as published by the Free Software Foundation, + either version 2 of the License or (at your option) any later version. +*/ +#pragma once + +#include <stddef.h> + +typedef unsigned char gr_uint8; +typedef gr_uint8 gr_byte; +typedef signed char gr_int8; +typedef unsigned short gr_uint16; +typedef short gr_int16; +typedef unsigned int gr_uint32; +typedef int gr_int32; + +enum gr_encform { + gr_utf8 = 1/*sizeof(uint8)*/, gr_utf16 = 2/*sizeof(uint16)*/, gr_utf32 = 4/*sizeof(uint32)*/ +}; + +// Definitions for library publicly exported symbols +#if defined _WIN32 || defined __CYGWIN__ + #if defined GRAPHITE2_STATIC + #define GR2_API + #elif defined GRAPHITE2_EXPORTING + #if defined __GNUC__ + #define GR2_API __attribute__((dllexport)) + #else + #define GR2_API __declspec(dllexport) + #endif + #else + #if defined __GNUC__ + #define GR2_API __attribute__((dllimport)) + #else + #define GR2_API __declspec(dllimport) + #endif + #endif + #define GR2_LOCAL +#elif __GNUC__ >= 4 + #if defined GRAPHITE2_STATIC + #define GR2_API __attribute__ ((visibility("hidden"))) + #else + #define GR2_API __attribute__ ((visibility("default"))) + #endif + #define GR2_LOCAL __attribute__ ((visibility("hidden"))) +#else + #define GR2_API + #define GR2_LOCAL +#endif + diff --git a/frameworks/cairosvg/dependencies/graphite2/1.3.11/lib/libgraphite2.3.0.1.dylib b/frameworks/cairosvg/dependencies/graphite2/1.3.11/lib/libgraphite2.3.0.1.dylib new file mode 100644 index 00000000..0ffe57ee Binary files /dev/null and b/frameworks/cairosvg/dependencies/graphite2/1.3.11/lib/libgraphite2.3.0.1.dylib differ diff --git a/frameworks/cairosvg/dependencies/graphite2/1.3.11/lib/libgraphite2.3.dylib b/frameworks/cairosvg/dependencies/graphite2/1.3.11/lib/libgraphite2.3.dylib new file mode 120000 index 00000000..1481cdaa --- /dev/null +++ b/frameworks/cairosvg/dependencies/graphite2/1.3.11/lib/libgraphite2.3.dylib @@ -0,0 +1 @@ +libgraphite2.3.0.1.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/graphite2/1.3.11/lib/libgraphite2.dylib b/frameworks/cairosvg/dependencies/graphite2/1.3.11/lib/libgraphite2.dylib new file mode 120000 index 00000000..ff2aaddf --- /dev/null +++ b/frameworks/cairosvg/dependencies/graphite2/1.3.11/lib/libgraphite2.dylib @@ -0,0 +1 @@ +libgraphite2.3.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-blob.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-blob.h new file mode 100755 index 00000000..ef3fc98c --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-blob.h @@ -0,0 +1,126 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_BLOB_H +#define HB_BLOB_H + +#include "hb-common.h" + +HB_BEGIN_DECLS + + +/* + * Note re various memory-modes: + * + * - In no case shall the HarfBuzz client modify memory + * that is passed to HarfBuzz in a blob. If there is + * any such possibility, MODE_DUPLICATE should be used + * such that HarfBuzz makes a copy immediately, + * + * - Use MODE_READONLY otherse, unless you really really + * really know what you are doing, + * + * - MODE_WRITABLE is appropriate if you really made a + * copy of data solely for the purpose of passing to + * HarfBuzz and doing that just once (no reuse!), + * + * - If the font is mmap()ed, it's ok to use + * READONLY_MAY_MAKE_WRITABLE, however, using that mode + * correctly is very tricky. Use MODE_READONLY instead. + */ +typedef enum { + HB_MEMORY_MODE_DUPLICATE, + HB_MEMORY_MODE_READONLY, + HB_MEMORY_MODE_WRITABLE, + HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE +} hb_memory_mode_t; + +typedef struct hb_blob_t hb_blob_t; + +HB_EXTERN hb_blob_t * +hb_blob_create (const char *data, + unsigned int length, + hb_memory_mode_t mode, + void *user_data, + hb_destroy_func_t destroy); + +/* Always creates with MEMORY_MODE_READONLY. + * Even if the parent blob is writable, we don't + * want the user of the sub-blob to be able to + * modify the parent data as that data may be + * shared among multiple sub-blobs. + */ +HB_EXTERN hb_blob_t * +hb_blob_create_sub_blob (hb_blob_t *parent, + unsigned int offset, + unsigned int length); + +HB_EXTERN hb_blob_t * +hb_blob_get_empty (void); + +HB_EXTERN hb_blob_t * +hb_blob_reference (hb_blob_t *blob); + +HB_EXTERN void +hb_blob_destroy (hb_blob_t *blob); + +HB_EXTERN hb_bool_t +hb_blob_set_user_data (hb_blob_t *blob, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +HB_EXTERN void * +hb_blob_get_user_data (hb_blob_t *blob, + hb_user_data_key_t *key); + + +HB_EXTERN void +hb_blob_make_immutable (hb_blob_t *blob); + +HB_EXTERN hb_bool_t +hb_blob_is_immutable (hb_blob_t *blob); + + +HB_EXTERN unsigned int +hb_blob_get_length (hb_blob_t *blob); + +HB_EXTERN const char * +hb_blob_get_data (hb_blob_t *blob, unsigned int *length); + +HB_EXTERN char * +hb_blob_get_data_writable (hb_blob_t *blob, unsigned int *length); + + +HB_END_DECLS + +#endif /* HB_BLOB_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-buffer.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-buffer.h new file mode 100755 index 00000000..a8a4b84e --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-buffer.h @@ -0,0 +1,531 @@ +/* + * Copyright © 1998-2004 David Turner and Werner Lemberg + * Copyright © 2004,2007,2009 Red Hat, Inc. + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Owen Taylor, Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_BUFFER_H +#define HB_BUFFER_H + +#include "hb-common.h" +#include "hb-unicode.h" +#include "hb-font.h" + +HB_BEGIN_DECLS + +/** + * hb_glyph_info_t: + * @codepoint: either a Unicode code point (before shaping) or a glyph index + * (after shaping). + * @mask: + * @cluster: the index of the character in the original text that corresponds + * to this #hb_glyph_info_t, or whatever the client passes to + * hb_buffer_add(). More than one #hb_glyph_info_t can have the same + * @cluster value, if they resulted from the same character (e.g. one + * to many glyph substitution), and when more than one character gets + * merged in the same glyph (e.g. many to one glyph substitution) the + * #hb_glyph_info_t will have the smallest cluster value of them. + * By default some characters are merged into the same cluster + * (e.g. combining marks have the same cluster as their bases) + * even if they are separate glyphs, hb_buffer_set_cluster_level() + * allow selecting more fine-grained cluster handling. + * + * The #hb_glyph_info_t is the structure that holds information about the + * glyphs and their relation to input text. + * + */ +typedef struct hb_glyph_info_t { + hb_codepoint_t codepoint; + hb_mask_t mask; /* Holds hb_glyph_flags_t after hb_shape(), plus other things. */ + uint32_t cluster; + + /*< private >*/ + hb_var_int_t var1; + hb_var_int_t var2; +} hb_glyph_info_t; + +typedef enum { /*< flags >*/ + HB_GLYPH_FLAG_UNSAFE_TO_BREAK = 0x00000001, + + HB_GLYPH_FLAG_DEFINED = 0x00000001 /* OR of all defined flags */ +} hb_glyph_flags_t; + +HB_EXTERN hb_glyph_flags_t +hb_glyph_info_get_glyph_flags (const hb_glyph_info_t *info); + +#define hb_glyph_info_get_glyph_flags(info) \ + ((hb_glyph_flags_t) ((unsigned int) (info)->mask & HB_GLYPH_FLAG_DEFINED)) + + +/** + * hb_glyph_position_t: + * @x_advance: how much the line advances after drawing this glyph when setting + * text in horizontal direction. + * @y_advance: how much the line advances after drawing this glyph when setting + * text in vertical direction. + * @x_offset: how much the glyph moves on the X-axis before drawing it, this + * should not affect how much the line advances. + * @y_offset: how much the glyph moves on the Y-axis before drawing it, this + * should not affect how much the line advances. + * + * The #hb_glyph_position_t is the structure that holds the positions of the + * glyph in both horizontal and vertical directions. All positions in + * #hb_glyph_position_t are relative to the current point. + * + */ +typedef struct hb_glyph_position_t { + hb_position_t x_advance; + hb_position_t y_advance; + hb_position_t x_offset; + hb_position_t y_offset; + + /*< private >*/ + hb_var_int_t var; +} hb_glyph_position_t; + +/** + * hb_segment_properties_t: + * @direction: the #hb_direction_t of the buffer, see hb_buffer_set_direction(). + * @script: the #hb_script_t of the buffer, see hb_buffer_set_script(). + * @language: the #hb_language_t of the buffer, see hb_buffer_set_language(). + * + * The structure that holds various text properties of an #hb_buffer_t. Can be + * set and retrieved using hb_buffer_set_segment_properties() and + * hb_buffer_get_segment_properties(), respectively. + */ +typedef struct hb_segment_properties_t { + hb_direction_t direction; + hb_script_t script; + hb_language_t language; + /*< private >*/ + void *reserved1; + void *reserved2; +} hb_segment_properties_t; + +#define HB_SEGMENT_PROPERTIES_DEFAULT {HB_DIRECTION_INVALID, \ + HB_SCRIPT_INVALID, \ + HB_LANGUAGE_INVALID, \ + (void *) 0, \ + (void *) 0} + +HB_EXTERN hb_bool_t +hb_segment_properties_equal (const hb_segment_properties_t *a, + const hb_segment_properties_t *b); + +HB_EXTERN unsigned int +hb_segment_properties_hash (const hb_segment_properties_t *p); + + + +/** + * hb_buffer_t: + * + * The main structure holding the input text and its properties before shaping, + * and output glyphs and their information after shaping. + */ + +typedef struct hb_buffer_t hb_buffer_t; + +HB_EXTERN hb_buffer_t * +hb_buffer_create (void); + +HB_EXTERN hb_buffer_t * +hb_buffer_get_empty (void); + +HB_EXTERN hb_buffer_t * +hb_buffer_reference (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_destroy (hb_buffer_t *buffer); + +HB_EXTERN hb_bool_t +hb_buffer_set_user_data (hb_buffer_t *buffer, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + +HB_EXTERN void * +hb_buffer_get_user_data (hb_buffer_t *buffer, + hb_user_data_key_t *key); + + +/** + * hb_buffer_content_type_t: + * @HB_BUFFER_CONTENT_TYPE_INVALID: Initial value for new buffer. + * @HB_BUFFER_CONTENT_TYPE_UNICODE: The buffer contains input characters (before shaping). + * @HB_BUFFER_CONTENT_TYPE_GLYPHS: The buffer contains output glyphs (after shaping). + */ +typedef enum { + HB_BUFFER_CONTENT_TYPE_INVALID = 0, + HB_BUFFER_CONTENT_TYPE_UNICODE, + HB_BUFFER_CONTENT_TYPE_GLYPHS +} hb_buffer_content_type_t; + +HB_EXTERN void +hb_buffer_set_content_type (hb_buffer_t *buffer, + hb_buffer_content_type_t content_type); + +HB_EXTERN hb_buffer_content_type_t +hb_buffer_get_content_type (hb_buffer_t *buffer); + + +HB_EXTERN void +hb_buffer_set_unicode_funcs (hb_buffer_t *buffer, + hb_unicode_funcs_t *unicode_funcs); + +HB_EXTERN hb_unicode_funcs_t * +hb_buffer_get_unicode_funcs (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_set_direction (hb_buffer_t *buffer, + hb_direction_t direction); + +HB_EXTERN hb_direction_t +hb_buffer_get_direction (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_set_script (hb_buffer_t *buffer, + hb_script_t script); + +HB_EXTERN hb_script_t +hb_buffer_get_script (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_set_language (hb_buffer_t *buffer, + hb_language_t language); + + +HB_EXTERN hb_language_t +hb_buffer_get_language (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_set_segment_properties (hb_buffer_t *buffer, + const hb_segment_properties_t *props); + +HB_EXTERN void +hb_buffer_get_segment_properties (hb_buffer_t *buffer, + hb_segment_properties_t *props); + +HB_EXTERN void +hb_buffer_guess_segment_properties (hb_buffer_t *buffer); + + +/** + * hb_buffer_flags_t: + * @HB_BUFFER_FLAG_DEFAULT: the default buffer flag. + * @HB_BUFFER_FLAG_BOT: flag indicating that special handling of the beginning + * of text paragraph can be applied to this buffer. Should usually + * be set, unless you are passing to the buffer only part + * of the text without the full context. + * @HB_BUFFER_FLAG_EOT: flag indicating that special handling of the end of text + * paragraph can be applied to this buffer, similar to + * @HB_BUFFER_FLAG_EOT. + * @HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES: + * flag indication that character with Default_Ignorable + * Unicode property should use the corresponding glyph + * from the font, instead of hiding them (currently done + * by replacing them with the space glyph and zeroing the + * advance width.) + * + * Since: 0.9.20 + */ +typedef enum { /*< flags >*/ + HB_BUFFER_FLAG_DEFAULT = 0x00000000u, + HB_BUFFER_FLAG_BOT = 0x00000001u, /* Beginning-of-text */ + HB_BUFFER_FLAG_EOT = 0x00000002u, /* End-of-text */ + HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES = 0x00000004u +} hb_buffer_flags_t; + +HB_EXTERN void +hb_buffer_set_flags (hb_buffer_t *buffer, + hb_buffer_flags_t flags); + +HB_EXTERN hb_buffer_flags_t +hb_buffer_get_flags (hb_buffer_t *buffer); + +/* + * Since: 0.9.42 + */ +typedef enum { + HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES = 0, + HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS = 1, + HB_BUFFER_CLUSTER_LEVEL_CHARACTERS = 2, + HB_BUFFER_CLUSTER_LEVEL_DEFAULT = HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES +} hb_buffer_cluster_level_t; + +HB_EXTERN void +hb_buffer_set_cluster_level (hb_buffer_t *buffer, + hb_buffer_cluster_level_t cluster_level); + +HB_EXTERN hb_buffer_cluster_level_t +hb_buffer_get_cluster_level (hb_buffer_t *buffer); + +/** + * HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT: + * + * The default code point for replacing invalid characters in a given encoding. + * Set to U+FFFD REPLACEMENT CHARACTER. + * + * Since: 0.9.31 + */ +#define HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT 0xFFFDu + +HB_EXTERN void +hb_buffer_set_replacement_codepoint (hb_buffer_t *buffer, + hb_codepoint_t replacement); + +HB_EXTERN hb_codepoint_t +hb_buffer_get_replacement_codepoint (hb_buffer_t *buffer); + + +HB_EXTERN void +hb_buffer_reset (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_clear_contents (hb_buffer_t *buffer); + +HB_EXTERN hb_bool_t +hb_buffer_pre_allocate (hb_buffer_t *buffer, + unsigned int size); + + +HB_EXTERN hb_bool_t +hb_buffer_allocation_successful (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_reverse (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_reverse_range (hb_buffer_t *buffer, + unsigned int start, unsigned int end); + +HB_EXTERN void +hb_buffer_reverse_clusters (hb_buffer_t *buffer); + + +/* Filling the buffer in */ + +HB_EXTERN void +hb_buffer_add (hb_buffer_t *buffer, + hb_codepoint_t codepoint, + unsigned int cluster); + +HB_EXTERN void +hb_buffer_add_utf8 (hb_buffer_t *buffer, + const char *text, + int text_length, + unsigned int item_offset, + int item_length); + +HB_EXTERN void +hb_buffer_add_utf16 (hb_buffer_t *buffer, + const uint16_t *text, + int text_length, + unsigned int item_offset, + int item_length); + +HB_EXTERN void +hb_buffer_add_utf32 (hb_buffer_t *buffer, + const uint32_t *text, + int text_length, + unsigned int item_offset, + int item_length); + +HB_EXTERN void +hb_buffer_add_latin1 (hb_buffer_t *buffer, + const uint8_t *text, + int text_length, + unsigned int item_offset, + int item_length); + +HB_EXTERN void +hb_buffer_add_codepoints (hb_buffer_t *buffer, + const hb_codepoint_t *text, + int text_length, + unsigned int item_offset, + int item_length); + +HB_EXTERN void +hb_buffer_append (hb_buffer_t *buffer, + hb_buffer_t *source, + unsigned int start, + unsigned int end); + +HB_EXTERN hb_bool_t +hb_buffer_set_length (hb_buffer_t *buffer, + unsigned int length); + +HB_EXTERN unsigned int +hb_buffer_get_length (hb_buffer_t *buffer); + +/* Getting glyphs out of the buffer */ + +HB_EXTERN hb_glyph_info_t * +hb_buffer_get_glyph_infos (hb_buffer_t *buffer, + unsigned int *length); + +HB_EXTERN hb_glyph_position_t * +hb_buffer_get_glyph_positions (hb_buffer_t *buffer, + unsigned int *length); + + +HB_EXTERN void +hb_buffer_normalize_glyphs (hb_buffer_t *buffer); + + +/* + * Serialize + */ + +/** + * hb_buffer_serialize_flags_t: + * @HB_BUFFER_SERIALIZE_FLAG_DEFAULT: serialize glyph names, clusters and positions. + * @HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS: do not serialize glyph cluster. + * @HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS: do not serialize glyph position information. + * @HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES: do no serialize glyph name. + * @HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS: serialize glyph extents. + * + * Flags that control what glyph information are serialized in hb_buffer_serialize_glyphs(). + * + * Since: 0.9.20 + */ +typedef enum { /*< flags >*/ + HB_BUFFER_SERIALIZE_FLAG_DEFAULT = 0x00000000u, + HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS = 0x00000001u, + HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS = 0x00000002u, + HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES = 0x00000004u, + HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS = 0x00000008u, + HB_BUFFER_SERIALIZE_FLAG_GLYPH_FLAGS = 0x00000010u +} hb_buffer_serialize_flags_t; + +/** + * hb_buffer_serialize_format_t: + * @HB_BUFFER_SERIALIZE_FORMAT_TEXT: a human-readable, plain text format. + * @HB_BUFFER_SERIALIZE_FORMAT_JSON: a machine-readable JSON format. + * @HB_BUFFER_SERIALIZE_FORMAT_INVALID: invalid format. + * + * The buffer serialization and de-serialization format used in + * hb_buffer_serialize_glyphs() and hb_buffer_deserialize_glyphs(). + * + * Since: 0.9.2 + */ +typedef enum { + HB_BUFFER_SERIALIZE_FORMAT_TEXT = HB_TAG('T','E','X','T'), + HB_BUFFER_SERIALIZE_FORMAT_JSON = HB_TAG('J','S','O','N'), + HB_BUFFER_SERIALIZE_FORMAT_INVALID = HB_TAG_NONE +} hb_buffer_serialize_format_t; + +HB_EXTERN hb_buffer_serialize_format_t +hb_buffer_serialize_format_from_string (const char *str, int len); + +HB_EXTERN const char * +hb_buffer_serialize_format_to_string (hb_buffer_serialize_format_t format); + +HB_EXTERN const char ** +hb_buffer_serialize_list_formats (void); + +HB_EXTERN unsigned int +hb_buffer_serialize_glyphs (hb_buffer_t *buffer, + unsigned int start, + unsigned int end, + char *buf, + unsigned int buf_size, + unsigned int *buf_consumed, + hb_font_t *font, + hb_buffer_serialize_format_t format, + hb_buffer_serialize_flags_t flags); + +HB_EXTERN hb_bool_t +hb_buffer_deserialize_glyphs (hb_buffer_t *buffer, + const char *buf, + int buf_len, + const char **end_ptr, + hb_font_t *font, + hb_buffer_serialize_format_t format); + + +/* + * Compare buffers + */ + +typedef enum { /*< flags >*/ + HB_BUFFER_DIFF_FLAG_EQUAL = 0x0000, + + /* Buffers with different content_type cannot be meaningfully compared + * in any further detail. */ + HB_BUFFER_DIFF_FLAG_CONTENT_TYPE_MISMATCH = 0x0001, + + /* For buffers with differing length, the per-glyph comparison is not + * attempted, though we do still scan reference for dottedcircle / .notdef + * glyphs. */ + HB_BUFFER_DIFF_FLAG_LENGTH_MISMATCH = 0x0002, + + /* We want to know if dottedcircle / .notdef glyphs are present in the + * reference, as we may not care so much about other differences in this + * case. */ + HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT = 0x0004, + HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT = 0x0008, + + /* If the buffers have the same length, we compare them glyph-by-glyph + * and report which aspect(s) of the glyph info/position are different. */ + HB_BUFFER_DIFF_FLAG_CODEPOINT_MISMATCH = 0x0010, + HB_BUFFER_DIFF_FLAG_CLUSTER_MISMATCH = 0x0020, + HB_BUFFER_DIFF_FLAG_GLYPH_FLAGS_MISMATCH = 0x0040, + HB_BUFFER_DIFF_FLAG_POSITION_MISMATCH = 0x0080 + +} hb_buffer_diff_flags_t; + +/* Compare the contents of two buffers, report types of differences. */ +HB_EXTERN hb_buffer_diff_flags_t +hb_buffer_diff (hb_buffer_t *buffer, + hb_buffer_t *reference, + hb_codepoint_t dottedcircle_glyph, + unsigned int position_fuzz); + + +/* + * Debugging. + */ + +typedef hb_bool_t (*hb_buffer_message_func_t) (hb_buffer_t *buffer, + hb_font_t *font, + const char *message, + void *user_data); + +HB_EXTERN void +hb_buffer_set_message_func (hb_buffer_t *buffer, + hb_buffer_message_func_t func, + void *user_data, hb_destroy_func_t destroy); + + +HB_END_DECLS + +#endif /* HB_BUFFER_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-common.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-common.h new file mode 100755 index 00000000..26200ce1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-common.h @@ -0,0 +1,397 @@ +/* + * Copyright © 2007,2008,2009 Red Hat, Inc. + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_COMMON_H +#define HB_COMMON_H + +#ifndef HB_BEGIN_DECLS +# ifdef __cplusplus +# define HB_BEGIN_DECLS extern "C" { +# define HB_END_DECLS } +# else /* !__cplusplus */ +# define HB_BEGIN_DECLS +# define HB_END_DECLS +# endif /* !__cplusplus */ +#endif + +#if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || \ + defined (_sgi) || defined (__sun) || defined (sun) || \ + defined (__digital__) || defined (__HP_cc) +# include <inttypes.h> +#elif defined (_AIX) +# include <sys/inttypes.h> +#else +# include <stdint.h> +#endif + +HB_BEGIN_DECLS + + +typedef int hb_bool_t; + +typedef uint32_t hb_codepoint_t; +typedef int32_t hb_position_t; +typedef uint32_t hb_mask_t; + +typedef union _hb_var_int_t { + uint32_t u32; + int32_t i32; + uint16_t u16[2]; + int16_t i16[2]; + uint8_t u8[4]; + int8_t i8[4]; +} hb_var_int_t; + + +/* hb_tag_t */ + +typedef uint32_t hb_tag_t; + +#define HB_TAG(c1,c2,c3,c4) ((hb_tag_t)((((uint8_t)(c1))<<24)|(((uint8_t)(c2))<<16)|(((uint8_t)(c3))<<8)|((uint8_t)(c4)))) +#define HB_UNTAG(tag) ((uint8_t)((tag)>>24)), ((uint8_t)((tag)>>16)), ((uint8_t)((tag)>>8)), ((uint8_t)(tag)) + +#define HB_TAG_NONE HB_TAG(0,0,0,0) +#define HB_TAG_MAX HB_TAG(0xff,0xff,0xff,0xff) +#define HB_TAG_MAX_SIGNED HB_TAG(0x7f,0xff,0xff,0xff) + +/* len=-1 means str is NUL-terminated. */ +HB_EXTERN hb_tag_t +hb_tag_from_string (const char *str, int len); + +/* buf should have 4 bytes. */ +HB_EXTERN void +hb_tag_to_string (hb_tag_t tag, char *buf); + + +/** + * hb_direction_t: + * @HB_DIRECTION_INVALID: Initial, unset direction. + * @HB_DIRECTION_LTR: Text is set horizontally from left to right. + * @HB_DIRECTION_RTL: Text is set horizontally from right to left. + * @HB_DIRECTION_TTB: Text is set vertically from top to bottom. + * @HB_DIRECTION_BTT: Text is set vertically from bottom to top. + */ +typedef enum { + HB_DIRECTION_INVALID = 0, + HB_DIRECTION_LTR = 4, + HB_DIRECTION_RTL, + HB_DIRECTION_TTB, + HB_DIRECTION_BTT +} hb_direction_t; + +/* len=-1 means str is NUL-terminated */ +HB_EXTERN hb_direction_t +hb_direction_from_string (const char *str, int len); + +HB_EXTERN const char * +hb_direction_to_string (hb_direction_t direction); + +#define HB_DIRECTION_IS_VALID(dir) ((((unsigned int) (dir)) & ~3U) == 4) +/* Direction must be valid for the following */ +#define HB_DIRECTION_IS_HORIZONTAL(dir) ((((unsigned int) (dir)) & ~1U) == 4) +#define HB_DIRECTION_IS_VERTICAL(dir) ((((unsigned int) (dir)) & ~1U) == 6) +#define HB_DIRECTION_IS_FORWARD(dir) ((((unsigned int) (dir)) & ~2U) == 4) +#define HB_DIRECTION_IS_BACKWARD(dir) ((((unsigned int) (dir)) & ~2U) == 5) +#define HB_DIRECTION_REVERSE(dir) ((hb_direction_t) (((unsigned int) (dir)) ^ 1)) + + +/* hb_language_t */ + +typedef const struct hb_language_impl_t *hb_language_t; + +HB_EXTERN hb_language_t +hb_language_from_string (const char *str, int len); + +HB_EXTERN const char * +hb_language_to_string (hb_language_t language); + +#define HB_LANGUAGE_INVALID ((hb_language_t) 0) + +HB_EXTERN hb_language_t +hb_language_get_default (void); + + +/* hb_script_t */ + +/* http://unicode.org/iso15924/ */ +/* http://goo.gl/x9ilM */ +/* Unicode Character Database property: Script (sc) */ +typedef enum +{ + /*1.1*/ HB_SCRIPT_COMMON = HB_TAG ('Z','y','y','y'), + /*1.1*/ HB_SCRIPT_INHERITED = HB_TAG ('Z','i','n','h'), + /*5.0*/ HB_SCRIPT_UNKNOWN = HB_TAG ('Z','z','z','z'), + + /*1.1*/ HB_SCRIPT_ARABIC = HB_TAG ('A','r','a','b'), + /*1.1*/ HB_SCRIPT_ARMENIAN = HB_TAG ('A','r','m','n'), + /*1.1*/ HB_SCRIPT_BENGALI = HB_TAG ('B','e','n','g'), + /*1.1*/ HB_SCRIPT_CYRILLIC = HB_TAG ('C','y','r','l'), + /*1.1*/ HB_SCRIPT_DEVANAGARI = HB_TAG ('D','e','v','a'), + /*1.1*/ HB_SCRIPT_GEORGIAN = HB_TAG ('G','e','o','r'), + /*1.1*/ HB_SCRIPT_GREEK = HB_TAG ('G','r','e','k'), + /*1.1*/ HB_SCRIPT_GUJARATI = HB_TAG ('G','u','j','r'), + /*1.1*/ HB_SCRIPT_GURMUKHI = HB_TAG ('G','u','r','u'), + /*1.1*/ HB_SCRIPT_HANGUL = HB_TAG ('H','a','n','g'), + /*1.1*/ HB_SCRIPT_HAN = HB_TAG ('H','a','n','i'), + /*1.1*/ HB_SCRIPT_HEBREW = HB_TAG ('H','e','b','r'), + /*1.1*/ HB_SCRIPT_HIRAGANA = HB_TAG ('H','i','r','a'), + /*1.1*/ HB_SCRIPT_KANNADA = HB_TAG ('K','n','d','a'), + /*1.1*/ HB_SCRIPT_KATAKANA = HB_TAG ('K','a','n','a'), + /*1.1*/ HB_SCRIPT_LAO = HB_TAG ('L','a','o','o'), + /*1.1*/ HB_SCRIPT_LATIN = HB_TAG ('L','a','t','n'), + /*1.1*/ HB_SCRIPT_MALAYALAM = HB_TAG ('M','l','y','m'), + /*1.1*/ HB_SCRIPT_ORIYA = HB_TAG ('O','r','y','a'), + /*1.1*/ HB_SCRIPT_TAMIL = HB_TAG ('T','a','m','l'), + /*1.1*/ HB_SCRIPT_TELUGU = HB_TAG ('T','e','l','u'), + /*1.1*/ HB_SCRIPT_THAI = HB_TAG ('T','h','a','i'), + + /*2.0*/ HB_SCRIPT_TIBETAN = HB_TAG ('T','i','b','t'), + + /*3.0*/ HB_SCRIPT_BOPOMOFO = HB_TAG ('B','o','p','o'), + /*3.0*/ HB_SCRIPT_BRAILLE = HB_TAG ('B','r','a','i'), + /*3.0*/ HB_SCRIPT_CANADIAN_SYLLABICS = HB_TAG ('C','a','n','s'), + /*3.0*/ HB_SCRIPT_CHEROKEE = HB_TAG ('C','h','e','r'), + /*3.0*/ HB_SCRIPT_ETHIOPIC = HB_TAG ('E','t','h','i'), + /*3.0*/ HB_SCRIPT_KHMER = HB_TAG ('K','h','m','r'), + /*3.0*/ HB_SCRIPT_MONGOLIAN = HB_TAG ('M','o','n','g'), + /*3.0*/ HB_SCRIPT_MYANMAR = HB_TAG ('M','y','m','r'), + /*3.0*/ HB_SCRIPT_OGHAM = HB_TAG ('O','g','a','m'), + /*3.0*/ HB_SCRIPT_RUNIC = HB_TAG ('R','u','n','r'), + /*3.0*/ HB_SCRIPT_SINHALA = HB_TAG ('S','i','n','h'), + /*3.0*/ HB_SCRIPT_SYRIAC = HB_TAG ('S','y','r','c'), + /*3.0*/ HB_SCRIPT_THAANA = HB_TAG ('T','h','a','a'), + /*3.0*/ HB_SCRIPT_YI = HB_TAG ('Y','i','i','i'), + + /*3.1*/ HB_SCRIPT_DESERET = HB_TAG ('D','s','r','t'), + /*3.1*/ HB_SCRIPT_GOTHIC = HB_TAG ('G','o','t','h'), + /*3.1*/ HB_SCRIPT_OLD_ITALIC = HB_TAG ('I','t','a','l'), + + /*3.2*/ HB_SCRIPT_BUHID = HB_TAG ('B','u','h','d'), + /*3.2*/ HB_SCRIPT_HANUNOO = HB_TAG ('H','a','n','o'), + /*3.2*/ HB_SCRIPT_TAGALOG = HB_TAG ('T','g','l','g'), + /*3.2*/ HB_SCRIPT_TAGBANWA = HB_TAG ('T','a','g','b'), + + /*4.0*/ HB_SCRIPT_CYPRIOT = HB_TAG ('C','p','r','t'), + /*4.0*/ HB_SCRIPT_LIMBU = HB_TAG ('L','i','m','b'), + /*4.0*/ HB_SCRIPT_LINEAR_B = HB_TAG ('L','i','n','b'), + /*4.0*/ HB_SCRIPT_OSMANYA = HB_TAG ('O','s','m','a'), + /*4.0*/ HB_SCRIPT_SHAVIAN = HB_TAG ('S','h','a','w'), + /*4.0*/ HB_SCRIPT_TAI_LE = HB_TAG ('T','a','l','e'), + /*4.0*/ HB_SCRIPT_UGARITIC = HB_TAG ('U','g','a','r'), + + /*4.1*/ HB_SCRIPT_BUGINESE = HB_TAG ('B','u','g','i'), + /*4.1*/ HB_SCRIPT_COPTIC = HB_TAG ('C','o','p','t'), + /*4.1*/ HB_SCRIPT_GLAGOLITIC = HB_TAG ('G','l','a','g'), + /*4.1*/ HB_SCRIPT_KHAROSHTHI = HB_TAG ('K','h','a','r'), + /*4.1*/ HB_SCRIPT_NEW_TAI_LUE = HB_TAG ('T','a','l','u'), + /*4.1*/ HB_SCRIPT_OLD_PERSIAN = HB_TAG ('X','p','e','o'), + /*4.1*/ HB_SCRIPT_SYLOTI_NAGRI = HB_TAG ('S','y','l','o'), + /*4.1*/ HB_SCRIPT_TIFINAGH = HB_TAG ('T','f','n','g'), + + /*5.0*/ HB_SCRIPT_BALINESE = HB_TAG ('B','a','l','i'), + /*5.0*/ HB_SCRIPT_CUNEIFORM = HB_TAG ('X','s','u','x'), + /*5.0*/ HB_SCRIPT_NKO = HB_TAG ('N','k','o','o'), + /*5.0*/ HB_SCRIPT_PHAGS_PA = HB_TAG ('P','h','a','g'), + /*5.0*/ HB_SCRIPT_PHOENICIAN = HB_TAG ('P','h','n','x'), + + /*5.1*/ HB_SCRIPT_CARIAN = HB_TAG ('C','a','r','i'), + /*5.1*/ HB_SCRIPT_CHAM = HB_TAG ('C','h','a','m'), + /*5.1*/ HB_SCRIPT_KAYAH_LI = HB_TAG ('K','a','l','i'), + /*5.1*/ HB_SCRIPT_LEPCHA = HB_TAG ('L','e','p','c'), + /*5.1*/ HB_SCRIPT_LYCIAN = HB_TAG ('L','y','c','i'), + /*5.1*/ HB_SCRIPT_LYDIAN = HB_TAG ('L','y','d','i'), + /*5.1*/ HB_SCRIPT_OL_CHIKI = HB_TAG ('O','l','c','k'), + /*5.1*/ HB_SCRIPT_REJANG = HB_TAG ('R','j','n','g'), + /*5.1*/ HB_SCRIPT_SAURASHTRA = HB_TAG ('S','a','u','r'), + /*5.1*/ HB_SCRIPT_SUNDANESE = HB_TAG ('S','u','n','d'), + /*5.1*/ HB_SCRIPT_VAI = HB_TAG ('V','a','i','i'), + + /*5.2*/ HB_SCRIPT_AVESTAN = HB_TAG ('A','v','s','t'), + /*5.2*/ HB_SCRIPT_BAMUM = HB_TAG ('B','a','m','u'), + /*5.2*/ HB_SCRIPT_EGYPTIAN_HIEROGLYPHS = HB_TAG ('E','g','y','p'), + /*5.2*/ HB_SCRIPT_IMPERIAL_ARAMAIC = HB_TAG ('A','r','m','i'), + /*5.2*/ HB_SCRIPT_INSCRIPTIONAL_PAHLAVI = HB_TAG ('P','h','l','i'), + /*5.2*/ HB_SCRIPT_INSCRIPTIONAL_PARTHIAN = HB_TAG ('P','r','t','i'), + /*5.2*/ HB_SCRIPT_JAVANESE = HB_TAG ('J','a','v','a'), + /*5.2*/ HB_SCRIPT_KAITHI = HB_TAG ('K','t','h','i'), + /*5.2*/ HB_SCRIPT_LISU = HB_TAG ('L','i','s','u'), + /*5.2*/ HB_SCRIPT_MEETEI_MAYEK = HB_TAG ('M','t','e','i'), + /*5.2*/ HB_SCRIPT_OLD_SOUTH_ARABIAN = HB_TAG ('S','a','r','b'), + /*5.2*/ HB_SCRIPT_OLD_TURKIC = HB_TAG ('O','r','k','h'), + /*5.2*/ HB_SCRIPT_SAMARITAN = HB_TAG ('S','a','m','r'), + /*5.2*/ HB_SCRIPT_TAI_THAM = HB_TAG ('L','a','n','a'), + /*5.2*/ HB_SCRIPT_TAI_VIET = HB_TAG ('T','a','v','t'), + + /*6.0*/ HB_SCRIPT_BATAK = HB_TAG ('B','a','t','k'), + /*6.0*/ HB_SCRIPT_BRAHMI = HB_TAG ('B','r','a','h'), + /*6.0*/ HB_SCRIPT_MANDAIC = HB_TAG ('M','a','n','d'), + + /*6.1*/ HB_SCRIPT_CHAKMA = HB_TAG ('C','a','k','m'), + /*6.1*/ HB_SCRIPT_MEROITIC_CURSIVE = HB_TAG ('M','e','r','c'), + /*6.1*/ HB_SCRIPT_MEROITIC_HIEROGLYPHS = HB_TAG ('M','e','r','o'), + /*6.1*/ HB_SCRIPT_MIAO = HB_TAG ('P','l','r','d'), + /*6.1*/ HB_SCRIPT_SHARADA = HB_TAG ('S','h','r','d'), + /*6.1*/ HB_SCRIPT_SORA_SOMPENG = HB_TAG ('S','o','r','a'), + /*6.1*/ HB_SCRIPT_TAKRI = HB_TAG ('T','a','k','r'), + + /* + * Since: 0.9.30 + */ + /*7.0*/ HB_SCRIPT_BASSA_VAH = HB_TAG ('B','a','s','s'), + /*7.0*/ HB_SCRIPT_CAUCASIAN_ALBANIAN = HB_TAG ('A','g','h','b'), + /*7.0*/ HB_SCRIPT_DUPLOYAN = HB_TAG ('D','u','p','l'), + /*7.0*/ HB_SCRIPT_ELBASAN = HB_TAG ('E','l','b','a'), + /*7.0*/ HB_SCRIPT_GRANTHA = HB_TAG ('G','r','a','n'), + /*7.0*/ HB_SCRIPT_KHOJKI = HB_TAG ('K','h','o','j'), + /*7.0*/ HB_SCRIPT_KHUDAWADI = HB_TAG ('S','i','n','d'), + /*7.0*/ HB_SCRIPT_LINEAR_A = HB_TAG ('L','i','n','a'), + /*7.0*/ HB_SCRIPT_MAHAJANI = HB_TAG ('M','a','h','j'), + /*7.0*/ HB_SCRIPT_MANICHAEAN = HB_TAG ('M','a','n','i'), + /*7.0*/ HB_SCRIPT_MENDE_KIKAKUI = HB_TAG ('M','e','n','d'), + /*7.0*/ HB_SCRIPT_MODI = HB_TAG ('M','o','d','i'), + /*7.0*/ HB_SCRIPT_MRO = HB_TAG ('M','r','o','o'), + /*7.0*/ HB_SCRIPT_NABATAEAN = HB_TAG ('N','b','a','t'), + /*7.0*/ HB_SCRIPT_OLD_NORTH_ARABIAN = HB_TAG ('N','a','r','b'), + /*7.0*/ HB_SCRIPT_OLD_PERMIC = HB_TAG ('P','e','r','m'), + /*7.0*/ HB_SCRIPT_PAHAWH_HMONG = HB_TAG ('H','m','n','g'), + /*7.0*/ HB_SCRIPT_PALMYRENE = HB_TAG ('P','a','l','m'), + /*7.0*/ HB_SCRIPT_PAU_CIN_HAU = HB_TAG ('P','a','u','c'), + /*7.0*/ HB_SCRIPT_PSALTER_PAHLAVI = HB_TAG ('P','h','l','p'), + /*7.0*/ HB_SCRIPT_SIDDHAM = HB_TAG ('S','i','d','d'), + /*7.0*/ HB_SCRIPT_TIRHUTA = HB_TAG ('T','i','r','h'), + /*7.0*/ HB_SCRIPT_WARANG_CITI = HB_TAG ('W','a','r','a'), + + /*8.0*/ HB_SCRIPT_AHOM = HB_TAG ('A','h','o','m'), + /*8.0*/ HB_SCRIPT_ANATOLIAN_HIEROGLYPHS = HB_TAG ('H','l','u','w'), + /*8.0*/ HB_SCRIPT_HATRAN = HB_TAG ('H','a','t','r'), + /*8.0*/ HB_SCRIPT_MULTANI = HB_TAG ('M','u','l','t'), + /*8.0*/ HB_SCRIPT_OLD_HUNGARIAN = HB_TAG ('H','u','n','g'), + /*8.0*/ HB_SCRIPT_SIGNWRITING = HB_TAG ('S','g','n','w'), + + /* + * Since 1.3.0 + */ + /*9.0*/ HB_SCRIPT_ADLAM = HB_TAG ('A','d','l','m'), + /*9.0*/ HB_SCRIPT_BHAIKSUKI = HB_TAG ('B','h','k','s'), + /*9.0*/ HB_SCRIPT_MARCHEN = HB_TAG ('M','a','r','c'), + /*9.0*/ HB_SCRIPT_OSAGE = HB_TAG ('O','s','g','e'), + /*9.0*/ HB_SCRIPT_TANGUT = HB_TAG ('T','a','n','g'), + /*9.0*/ HB_SCRIPT_NEWA = HB_TAG ('N','e','w','a'), + + /* + * Since 1.6.0 + */ + /*10.0*/HB_SCRIPT_MASARAM_GONDI = HB_TAG ('G','o','n','m'), + /*10.0*/HB_SCRIPT_NUSHU = HB_TAG ('N','s','h','u'), + /*10.0*/HB_SCRIPT_SOYOMBO = HB_TAG ('S','o','y','o'), + /*10.0*/HB_SCRIPT_ZANABAZAR_SQUARE = HB_TAG ('Z','a','n','b'), + + /* No script set. */ + HB_SCRIPT_INVALID = HB_TAG_NONE, + + /* Dummy values to ensure any hb_tag_t value can be passed/stored as hb_script_t + * without risking undefined behavior. Include both a signed and unsigned max, + * since technically enums are int, and indeed, hb_script_t ends up being signed. + * See this thread for technicalities: + * + * http://lists.freedesktop.org/archives/harfbuzz/2014-March/004150.html + */ + _HB_SCRIPT_MAX_VALUE = HB_TAG_MAX, /*< skip >*/ + _HB_SCRIPT_MAX_VALUE_SIGNED = HB_TAG_MAX_SIGNED /*< skip >*/ + +} hb_script_t; + + +/* Script functions */ + +HB_EXTERN hb_script_t +hb_script_from_iso15924_tag (hb_tag_t tag); + +HB_EXTERN hb_script_t +hb_script_from_string (const char *str, int len); + +HB_EXTERN hb_tag_t +hb_script_to_iso15924_tag (hb_script_t script); + +HB_EXTERN hb_direction_t +hb_script_get_horizontal_direction (hb_script_t script); + + +/* User data */ + +typedef struct hb_user_data_key_t { + /*< private >*/ + char unused; +} hb_user_data_key_t; + +typedef void (*hb_destroy_func_t) (void *user_data); + + +/* Font features and variations. */ + +typedef struct hb_feature_t { + hb_tag_t tag; + uint32_t value; + unsigned int start; + unsigned int end; +} hb_feature_t; + +HB_EXTERN hb_bool_t +hb_feature_from_string (const char *str, int len, + hb_feature_t *feature); + +HB_EXTERN void +hb_feature_to_string (hb_feature_t *feature, + char *buf, unsigned int size); + +/** + * hb_variation_t: + * + * Since: 1.4.2 + */ +typedef struct hb_variation_t { + hb_tag_t tag; + float value; +} hb_variation_t; + +HB_EXTERN hb_bool_t +hb_variation_from_string (const char *str, int len, + hb_variation_t *variation); + +HB_EXTERN void +hb_variation_to_string (hb_variation_t *variation, + char *buf, unsigned int size); + + +HB_END_DECLS + +#endif /* HB_COMMON_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-coretext.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-coretext.h new file mode 100755 index 00000000..4b0a6f01 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-coretext.h @@ -0,0 +1,64 @@ +/* + * Copyright © 2012 Mozilla Foundation. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Mozilla Author(s): Jonathan Kew + */ + +#ifndef HB_CORETEXT_H +#define HB_CORETEXT_H + +#include "hb.h" + +#include <TargetConditionals.h> +#if TARGET_OS_IPHONE +# include <CoreText/CoreText.h> +# include <CoreGraphics/CoreGraphics.h> +#else +# include <ApplicationServices/ApplicationServices.h> +#endif + +HB_BEGIN_DECLS + + +#define HB_CORETEXT_TAG_MORT HB_TAG('m','o','r','t') +#define HB_CORETEXT_TAG_MORX HB_TAG('m','o','r','x') +#define HB_CORETEXT_TAG_KERX HB_TAG('k','e','r','x') + + +HB_EXTERN hb_face_t * +hb_coretext_face_create (CGFontRef cg_font); + +HB_EXTERN hb_font_t * +hb_coretext_font_create (CTFontRef ct_font); + + +HB_EXTERN CGFontRef +hb_coretext_face_get_cg_font (hb_face_t *face); + +HB_EXTERN CTFontRef +hb_coretext_font_get_ct_font (hb_font_t *font); + + +HB_END_DECLS + +#endif /* HB_CORETEXT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-deprecated.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-deprecated.h new file mode 100755 index 00000000..eac7efb4 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-deprecated.h @@ -0,0 +1,65 @@ +/* + * Copyright © 2013 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_DEPRECATED_H +#define HB_DEPRECATED_H + +#include "hb-common.h" +#include "hb-unicode.h" +#include "hb-font.h" +#include "hb-set.h" + +HB_BEGIN_DECLS + +#ifndef HB_DISABLE_DEPRECATED + +#define HB_SCRIPT_CANADIAN_ABORIGINAL HB_SCRIPT_CANADIAN_SYLLABICS + +#define HB_BUFFER_FLAGS_DEFAULT HB_BUFFER_FLAG_DEFAULT +#define HB_BUFFER_SERIALIZE_FLAGS_DEFAULT HB_BUFFER_SERIALIZE_FLAG_DEFAULT + +typedef hb_bool_t (*hb_font_get_glyph_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t unicode, hb_codepoint_t variation_selector, + hb_codepoint_t *glyph, + void *user_data); + +HB_EXTERN void +hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_func_t func, + void *user_data, hb_destroy_func_t destroy); + +HB_EXTERN void +hb_set_invert (hb_set_t *set); + +#endif + +HB_END_DECLS + +#endif /* HB_DEPRECATED_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-face.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-face.h new file mode 100755 index 00000000..9842d52b --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-face.h @@ -0,0 +1,122 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_FACE_H +#define HB_FACE_H + +#include "hb-common.h" +#include "hb-blob.h" + +HB_BEGIN_DECLS + + +/* + * hb_face_t + */ + +typedef struct hb_face_t hb_face_t; + +HB_EXTERN hb_face_t * +hb_face_create (hb_blob_t *blob, + unsigned int index); + +typedef hb_blob_t * (*hb_reference_table_func_t) (hb_face_t *face, hb_tag_t tag, void *user_data); + +/* calls destroy() when not needing user_data anymore */ +HB_EXTERN hb_face_t * +hb_face_create_for_tables (hb_reference_table_func_t reference_table_func, + void *user_data, + hb_destroy_func_t destroy); + +HB_EXTERN hb_face_t * +hb_face_get_empty (void); + +HB_EXTERN hb_face_t * +hb_face_reference (hb_face_t *face); + +HB_EXTERN void +hb_face_destroy (hb_face_t *face); + +HB_EXTERN hb_bool_t +hb_face_set_user_data (hb_face_t *face, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +HB_EXTERN void * +hb_face_get_user_data (hb_face_t *face, + hb_user_data_key_t *key); + +HB_EXTERN void +hb_face_make_immutable (hb_face_t *face); + +HB_EXTERN hb_bool_t +hb_face_is_immutable (hb_face_t *face); + + +HB_EXTERN hb_blob_t * +hb_face_reference_table (hb_face_t *face, + hb_tag_t tag); + +HB_EXTERN hb_blob_t * +hb_face_reference_blob (hb_face_t *face); + +HB_EXTERN void +hb_face_set_index (hb_face_t *face, + unsigned int index); + +HB_EXTERN unsigned int +hb_face_get_index (hb_face_t *face); + +HB_EXTERN void +hb_face_set_upem (hb_face_t *face, + unsigned int upem); + +HB_EXTERN unsigned int +hb_face_get_upem (hb_face_t *face); + +HB_EXTERN void +hb_face_set_glyph_count (hb_face_t *face, + unsigned int glyph_count); + +HB_EXTERN unsigned int +hb_face_get_glyph_count (hb_face_t *face); + +HB_EXTERN unsigned int +hb_face_get_table_tags (hb_face_t *face, + unsigned int start_offset, + unsigned int *table_count, /* IN/OUT */ + hb_tag_t *table_tags /* OUT */); + +HB_END_DECLS + +#endif /* HB_FACE_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-font.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-font.h new file mode 100755 index 00000000..540cdcab --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-font.h @@ -0,0 +1,641 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_FONT_H +#define HB_FONT_H + +#include "hb-common.h" +#include "hb-face.h" + +HB_BEGIN_DECLS + + +typedef struct hb_font_t hb_font_t; + + +/* + * hb_font_funcs_t + */ + +typedef struct hb_font_funcs_t hb_font_funcs_t; + +HB_EXTERN hb_font_funcs_t * +hb_font_funcs_create (void); + +HB_EXTERN hb_font_funcs_t * +hb_font_funcs_get_empty (void); + +HB_EXTERN hb_font_funcs_t * +hb_font_funcs_reference (hb_font_funcs_t *ffuncs); + +HB_EXTERN void +hb_font_funcs_destroy (hb_font_funcs_t *ffuncs); + +HB_EXTERN hb_bool_t +hb_font_funcs_set_user_data (hb_font_funcs_t *ffuncs, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +HB_EXTERN void * +hb_font_funcs_get_user_data (hb_font_funcs_t *ffuncs, + hb_user_data_key_t *key); + + +HB_EXTERN void +hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs); + +HB_EXTERN hb_bool_t +hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs); + + +/* font and glyph extents */ + +/* Note that typically ascender is positive and descender negative in coordinate systems that grow up. */ +typedef struct hb_font_extents_t +{ + hb_position_t ascender; /* typographic ascender. */ + hb_position_t descender; /* typographic descender. */ + hb_position_t line_gap; /* suggested line spacing gap. */ + /*< private >*/ + hb_position_t reserved9; + hb_position_t reserved8; + hb_position_t reserved7; + hb_position_t reserved6; + hb_position_t reserved5; + hb_position_t reserved4; + hb_position_t reserved3; + hb_position_t reserved2; + hb_position_t reserved1; +} hb_font_extents_t; + +/* Note that height is negative in coordinate systems that grow up. */ +typedef struct hb_glyph_extents_t +{ + hb_position_t x_bearing; /* left side of glyph from origin. */ + hb_position_t y_bearing; /* top side of glyph from origin. */ + hb_position_t width; /* distance from left to right side. */ + hb_position_t height; /* distance from top to bottom side. */ +} hb_glyph_extents_t; + +/* func types */ + +typedef hb_bool_t (*hb_font_get_font_extents_func_t) (hb_font_t *font, void *font_data, + hb_font_extents_t *metrics, + void *user_data); +typedef hb_font_get_font_extents_func_t hb_font_get_font_h_extents_func_t; +typedef hb_font_get_font_extents_func_t hb_font_get_font_v_extents_func_t; + + +typedef hb_bool_t (*hb_font_get_nominal_glyph_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t unicode, + hb_codepoint_t *glyph, + void *user_data); +typedef hb_bool_t (*hb_font_get_variation_glyph_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t unicode, hb_codepoint_t variation_selector, + hb_codepoint_t *glyph, + void *user_data); + + +typedef hb_position_t (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, + void *user_data); +typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_h_advance_func_t; +typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_v_advance_func_t; + +typedef hb_bool_t (*hb_font_get_glyph_origin_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y, + void *user_data); +typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_h_origin_func_t; +typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_v_origin_func_t; + +typedef hb_position_t (*hb_font_get_glyph_kerning_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, + void *user_data); +typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_h_kerning_func_t; +typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_v_kerning_func_t; + + +typedef hb_bool_t (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, + hb_glyph_extents_t *extents, + void *user_data); +typedef hb_bool_t (*hb_font_get_glyph_contour_point_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, unsigned int point_index, + hb_position_t *x, hb_position_t *y, + void *user_data); + + +typedef hb_bool_t (*hb_font_get_glyph_name_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, + char *name, unsigned int size, + void *user_data); +typedef hb_bool_t (*hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void *font_data, + const char *name, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph, + void *user_data); + + +/* func setters */ + +/** + * hb_font_funcs_set_font_h_extents_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.1.2 + **/ +HB_EXTERN void +hb_font_funcs_set_font_h_extents_func (hb_font_funcs_t *ffuncs, + hb_font_get_font_h_extents_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_font_v_extents_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.1.2 + **/ +HB_EXTERN void +hb_font_funcs_set_font_v_extents_func (hb_font_funcs_t *ffuncs, + hb_font_get_font_v_extents_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_nominal_glyph_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.2.3 + **/ +HB_EXTERN void +hb_font_funcs_set_nominal_glyph_func (hb_font_funcs_t *ffuncs, + hb_font_get_nominal_glyph_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_variation_glyph_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.2.3 + **/ +HB_EXTERN void +hb_font_funcs_set_variation_glyph_func (hb_font_funcs_t *ffuncs, + hb_font_get_variation_glyph_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_h_advance_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_h_advance_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_v_advance_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_v_advance_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_h_origin_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_h_origin_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_v_origin_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_v_origin_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_h_kerning_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_h_kerning_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_v_kerning_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_v_kerning_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_extents_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_extents_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_contour_point_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_contour_point_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_name_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_name_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_name_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_from_name_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_from_name_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/* func dispatch */ + +HB_EXTERN hb_bool_t +hb_font_get_h_extents (hb_font_t *font, + hb_font_extents_t *extents); +HB_EXTERN hb_bool_t +hb_font_get_v_extents (hb_font_t *font, + hb_font_extents_t *extents); + +HB_EXTERN hb_bool_t +hb_font_get_nominal_glyph (hb_font_t *font, + hb_codepoint_t unicode, + hb_codepoint_t *glyph); +HB_EXTERN hb_bool_t +hb_font_get_variation_glyph (hb_font_t *font, + hb_codepoint_t unicode, hb_codepoint_t variation_selector, + hb_codepoint_t *glyph); + +HB_EXTERN hb_position_t +hb_font_get_glyph_h_advance (hb_font_t *font, + hb_codepoint_t glyph); +HB_EXTERN hb_position_t +hb_font_get_glyph_v_advance (hb_font_t *font, + hb_codepoint_t glyph); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_h_origin (hb_font_t *font, + hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y); +HB_EXTERN hb_bool_t +hb_font_get_glyph_v_origin (hb_font_t *font, + hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y); + +HB_EXTERN hb_position_t +hb_font_get_glyph_h_kerning (hb_font_t *font, + hb_codepoint_t left_glyph, hb_codepoint_t right_glyph); +HB_EXTERN hb_position_t +hb_font_get_glyph_v_kerning (hb_font_t *font, + hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_extents (hb_font_t *font, + hb_codepoint_t glyph, + hb_glyph_extents_t *extents); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_contour_point (hb_font_t *font, + hb_codepoint_t glyph, unsigned int point_index, + hb_position_t *x, hb_position_t *y); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_name (hb_font_t *font, + hb_codepoint_t glyph, + char *name, unsigned int size); +HB_EXTERN hb_bool_t +hb_font_get_glyph_from_name (hb_font_t *font, + const char *name, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph); + + +/* high-level funcs, with fallback */ + +/* Calls either hb_font_get_nominal_glyph() if variation_selector is 0, + * otherwise callse hb_font_get_variation_glyph(). */ +HB_EXTERN hb_bool_t +hb_font_get_glyph (hb_font_t *font, + hb_codepoint_t unicode, hb_codepoint_t variation_selector, + hb_codepoint_t *glyph); + +HB_EXTERN void +hb_font_get_extents_for_direction (hb_font_t *font, + hb_direction_t direction, + hb_font_extents_t *extents); +HB_EXTERN void +hb_font_get_glyph_advance_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); +HB_EXTERN void +hb_font_get_glyph_origin_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); +HB_EXTERN void +hb_font_add_glyph_origin_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); +HB_EXTERN void +hb_font_subtract_glyph_origin_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); + +HB_EXTERN void +hb_font_get_glyph_kerning_for_direction (hb_font_t *font, + hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_extents_for_origin (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_glyph_extents_t *extents); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_contour_point_for_origin (hb_font_t *font, + hb_codepoint_t glyph, unsigned int point_index, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); + +/* Generates gidDDD if glyph has no name. */ +HB_EXTERN void +hb_font_glyph_to_string (hb_font_t *font, + hb_codepoint_t glyph, + char *s, unsigned int size); +/* Parses gidDDD and uniUUUU strings automatically. */ +HB_EXTERN hb_bool_t +hb_font_glyph_from_string (hb_font_t *font, + const char *s, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph); + + +/* + * hb_font_t + */ + +/* Fonts are very light-weight objects */ + +HB_EXTERN hb_font_t * +hb_font_create (hb_face_t *face); + +HB_EXTERN hb_font_t * +hb_font_create_sub_font (hb_font_t *parent); + +HB_EXTERN hb_font_t * +hb_font_get_empty (void); + +HB_EXTERN hb_font_t * +hb_font_reference (hb_font_t *font); + +HB_EXTERN void +hb_font_destroy (hb_font_t *font); + +HB_EXTERN hb_bool_t +hb_font_set_user_data (hb_font_t *font, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +HB_EXTERN void * +hb_font_get_user_data (hb_font_t *font, + hb_user_data_key_t *key); + +HB_EXTERN void +hb_font_make_immutable (hb_font_t *font); + +HB_EXTERN hb_bool_t +hb_font_is_immutable (hb_font_t *font); + +HB_EXTERN void +hb_font_set_parent (hb_font_t *font, + hb_font_t *parent); + +HB_EXTERN hb_font_t * +hb_font_get_parent (hb_font_t *font); + +HB_EXTERN void +hb_font_set_face (hb_font_t *font, + hb_face_t *face); + +HB_EXTERN hb_face_t * +hb_font_get_face (hb_font_t *font); + + +HB_EXTERN void +hb_font_set_funcs (hb_font_t *font, + hb_font_funcs_t *klass, + void *font_data, + hb_destroy_func_t destroy); + +/* Be *very* careful with this function! */ +HB_EXTERN void +hb_font_set_funcs_data (hb_font_t *font, + void *font_data, + hb_destroy_func_t destroy); + + +HB_EXTERN void +hb_font_set_scale (hb_font_t *font, + int x_scale, + int y_scale); + +HB_EXTERN void +hb_font_get_scale (hb_font_t *font, + int *x_scale, + int *y_scale); + +/* + * A zero value means "no hinting in that direction" + */ +HB_EXTERN void +hb_font_set_ppem (hb_font_t *font, + unsigned int x_ppem, + unsigned int y_ppem); + +HB_EXTERN void +hb_font_get_ppem (hb_font_t *font, + unsigned int *x_ppem, + unsigned int *y_ppem); + +/* + * Point size per EM. Used for optical-sizing in CoreText. + * A value of zero means "not set". + */ +HB_EXTERN void +hb_font_set_ptem (hb_font_t *font, float ptem); + +HB_EXTERN float +hb_font_get_ptem (hb_font_t *font); + +HB_EXTERN void +hb_font_set_variations (hb_font_t *font, + const hb_variation_t *variations, + unsigned int variations_length); + +HB_EXTERN void +hb_font_set_var_coords_design (hb_font_t *font, + const float *coords, + unsigned int coords_length); + +HB_EXTERN void +hb_font_set_var_coords_normalized (hb_font_t *font, + const int *coords, /* 2.14 normalized */ + unsigned int coords_length); + +HB_EXTERN const int * +hb_font_get_var_coords_normalized (hb_font_t *font, + unsigned int *length); + +HB_END_DECLS + +#endif /* HB_FONT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ft.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ft.h new file mode 100755 index 00000000..94013eeb --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ft.h @@ -0,0 +1,132 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2015 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_FT_H +#define HB_FT_H + +#include "hb.h" + +#include <ft2build.h> +#include FT_FREETYPE_H + +HB_BEGIN_DECLS + +/* + * Note: FreeType is not thread-safe. + * Hence, these functions are not either. + */ + +/* + * hb-face from ft-face. + */ + +/* This one creates a new hb-face for given ft-face. + * When the returned hb-face is destroyed, the destroy + * callback is called (if not NULL), with the ft-face passed + * to it. + * + * The client is responsible to make sure that ft-face is + * destroyed after hb-face is destroyed. + * + * Most often you don't want this function. You should use either + * hb_ft_face_create_cached(), or hb_ft_face_create_referenced(). + * In particular, if you are going to pass NULL as destroy, you + * probably should use (the more recent) hb_ft_face_create_referenced() + * instead. + */ +HB_EXTERN hb_face_t * +hb_ft_face_create (FT_Face ft_face, + hb_destroy_func_t destroy); + +/* This version is like hb_ft_face_create(), except that it caches + * the hb-face using the generic pointer of the ft-face. This means + * that subsequent calls to this function with the same ft-face will + * return the same hb-face (correctly referenced). + * + * Client is still responsible for making sure that ft-face is destroyed + * after hb-face is. + */ +HB_EXTERN hb_face_t * +hb_ft_face_create_cached (FT_Face ft_face); + +/* This version is like hb_ft_face_create(), except that it calls + * FT_Reference_Face() on ft-face, as such keeping ft-face alive + * as long as the hb-face is. + * + * This is the most convenient version to use. Use it unless you have + * very good reasons not to. + */ +HB_EXTERN hb_face_t * +hb_ft_face_create_referenced (FT_Face ft_face); + + +/* + * hb-font from ft-face. + */ + +/* + * Note: + * + * Set face size on ft-face before creating hb-font from it. + * Otherwise hb-ft would NOT pick up the font size correctly. + */ + +/* See notes on hb_ft_face_create(). Same issues re lifecycle-management + * apply here. Use hb_ft_font_create_referenced() if you can. */ +HB_EXTERN hb_font_t * +hb_ft_font_create (FT_Face ft_face, + hb_destroy_func_t destroy); + +/* See notes on hb_ft_face_create_referenced() re lifecycle-management + * issues. */ +HB_EXTERN hb_font_t * +hb_ft_font_create_referenced (FT_Face ft_face); + +HB_EXTERN FT_Face +hb_ft_font_get_face (hb_font_t *font); + +HB_EXTERN void +hb_ft_font_set_load_flags (hb_font_t *font, int load_flags); + +HB_EXTERN int +hb_ft_font_get_load_flags (hb_font_t *font); + +/* Call when size or variations settings on underlying FT_Face change. */ +HB_EXTERN void +hb_ft_font_changed (hb_font_t *font); + +/* Makes an hb_font_t use FreeType internally to implement font functions. + * Note: this internally creates an FT_Face. Use it when you create your + * hb_face_t using hb_face_create(). */ +HB_EXTERN void +hb_ft_font_set_funcs (hb_font_t *font); + + +HB_END_DECLS + +#endif /* HB_FT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-glib.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-glib.h new file mode 100755 index 00000000..5f04183b --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-glib.h @@ -0,0 +1,56 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_GLIB_H +#define HB_GLIB_H + +#include "hb.h" + +#include <glib.h> + +HB_BEGIN_DECLS + + +HB_EXTERN hb_script_t +hb_glib_script_to_script (GUnicodeScript script); + +HB_EXTERN GUnicodeScript +hb_glib_script_from_script (hb_script_t script); + + +HB_EXTERN hb_unicode_funcs_t * +hb_glib_get_unicode_funcs (void); + +#if GLIB_CHECK_VERSION(2,31,10) +HB_EXTERN hb_blob_t * +hb_glib_blob_create (GBytes *gbytes); +#endif + +HB_END_DECLS + +#endif /* HB_GLIB_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-gobject-enums.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-gobject-enums.h new file mode 100755 index 00000000..dc4f18f1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-gobject-enums.h @@ -0,0 +1,80 @@ + +/* Generated data (by glib-mkenums) */ + +/* + * Copyright © 2013 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_GOBJECT_H_IN +#error "Include <hb-gobject.h> instead." +#endif + +#ifndef HB_GOBJECT_ENUMS_H +#define HB_GOBJECT_ENUMS_H + +#include "hb.h" + +#include <glib-object.h> + +HB_BEGIN_DECLS +HB_EXTERN GType hb_gobject_memory_mode_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_MEMORY_MODE (hb_gobject_memory_mode_get_type ()) +HB_EXTERN GType hb_gobject_glyph_flags_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_GLYPH_FLAGS (hb_gobject_glyph_flags_get_type ()) +HB_EXTERN GType hb_gobject_buffer_content_type_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_BUFFER_CONTENT_TYPE (hb_gobject_buffer_content_type_get_type ()) +HB_EXTERN GType hb_gobject_buffer_flags_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_BUFFER_FLAGS (hb_gobject_buffer_flags_get_type ()) +HB_EXTERN GType hb_gobject_buffer_cluster_level_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_BUFFER_CLUSTER_LEVEL (hb_gobject_buffer_cluster_level_get_type ()) +HB_EXTERN GType hb_gobject_buffer_serialize_flags_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_BUFFER_SERIALIZE_FLAGS (hb_gobject_buffer_serialize_flags_get_type ()) +HB_EXTERN GType hb_gobject_buffer_serialize_format_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_BUFFER_SERIALIZE_FORMAT (hb_gobject_buffer_serialize_format_get_type ()) +HB_EXTERN GType hb_gobject_buffer_diff_flags_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_BUFFER_DIFF_FLAGS (hb_gobject_buffer_diff_flags_get_type ()) +HB_EXTERN GType hb_gobject_direction_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_DIRECTION (hb_gobject_direction_get_type ()) +HB_EXTERN GType hb_gobject_script_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_SCRIPT (hb_gobject_script_get_type ()) +HB_EXTERN GType hb_gobject_unicode_general_category_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_UNICODE_GENERAL_CATEGORY (hb_gobject_unicode_general_category_get_type ()) +HB_EXTERN GType hb_gobject_unicode_combining_class_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_UNICODE_COMBINING_CLASS (hb_gobject_unicode_combining_class_get_type ()) +HB_EXTERN GType hb_gobject_ot_layout_glyph_class_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_OT_LAYOUT_GLYPH_CLASS (hb_gobject_ot_layout_glyph_class_get_type ()) +HB_EXTERN GType hb_gobject_ot_math_constant_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_OT_MATH_CONSTANT (hb_gobject_ot_math_constant_get_type ()) +HB_EXTERN GType hb_gobject_ot_math_kern_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_OT_MATH_KERN (hb_gobject_ot_math_kern_get_type ()) +HB_EXTERN GType hb_gobject_ot_math_glyph_part_flags_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_OT_MATH_GLYPH_PART_FLAGS (hb_gobject_ot_math_glyph_part_flags_get_type ()) + +HB_END_DECLS + +#endif /* HB_GOBJECT_ENUMS_H */ + +/* Generated data ends here */ + diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-gobject-structs.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-gobject-structs.h new file mode 100755 index 00000000..1c303219 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-gobject-structs.h @@ -0,0 +1,117 @@ +/* + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_GOBJECT_H_IN +#error "Include <hb-gobject.h> instead." +#endif + +#ifndef HB_GOBJECT_STRUCTS_H +#define HB_GOBJECT_STRUCTS_H + +#include "hb.h" + +#include <glib-object.h> + +HB_BEGIN_DECLS + + +/* Object types */ + +/** + * hb_gobject_blob_get_type: + * + * Since: 0.9.2 + **/ +HB_EXTERN GType hb_gobject_blob_get_type (void); +#define HB_GOBJECT_TYPE_BLOB (hb_gobject_blob_get_type ()) + +/** + * hb_gobject_buffer_get_type: + * + * Since: 0.9.2 + **/ +HB_EXTERN GType hb_gobject_buffer_get_type (void); +#define HB_GOBJECT_TYPE_BUFFER (hb_gobject_buffer_get_type ()) + +/** + * hb_gobject_face_get_type: + * + * Since: 0.9.2 + **/ +HB_EXTERN GType hb_gobject_face_get_type (void); +#define HB_GOBJECT_TYPE_FACE (hb_gobject_face_get_type ()) + +/** + * hb_gobject_font_get_type: + * + * Since: 0.9.2 + **/ +HB_EXTERN GType hb_gobject_font_get_type (void); +#define HB_GOBJECT_TYPE_FONT (hb_gobject_font_get_type ()) + +/** + * hb_gobject_font_funcs_get_type: + * + * Since: 0.9.2 + **/ +HB_EXTERN GType hb_gobject_font_funcs_get_type (void); +#define HB_GOBJECT_TYPE_FONT_FUNCS (hb_gobject_font_funcs_get_type ()) + +HB_EXTERN GType hb_gobject_set_get_type (void); +#define HB_GOBJECT_TYPE_SET (hb_gobject_set_get_type ()) + +HB_EXTERN GType hb_gobject_shape_plan_get_type (void); +#define HB_GOBJECT_TYPE_SHAPE_PLAN (hb_gobject_shape_plan_get_type ()) + +/** + * hb_gobject_unicode_funcs_get_type: + * + * Since: 0.9.2 + **/ +HB_EXTERN GType hb_gobject_unicode_funcs_get_type (void); +#define HB_GOBJECT_TYPE_UNICODE_FUNCS (hb_gobject_unicode_funcs_get_type ()) + +/* Value types */ + +HB_EXTERN GType hb_gobject_feature_get_type (void); +#define HB_GOBJECT_TYPE_FEATURE (hb_gobject_feature_get_type ()) + +HB_EXTERN GType hb_gobject_glyph_info_get_type (void); +#define HB_GOBJECT_TYPE_GLYPH_INFO (hb_gobject_glyph_info_get_type ()) + +HB_EXTERN GType hb_gobject_glyph_position_get_type (void); +#define HB_GOBJECT_TYPE_GLYPH_POSITION (hb_gobject_glyph_position_get_type ()) + +HB_EXTERN GType hb_gobject_segment_properties_get_type (void); +#define HB_GOBJECT_TYPE_SEGMENT_PROPERTIES (hb_gobject_segment_properties_get_type ()) + +HB_EXTERN GType hb_gobject_user_data_key_get_type (void); +#define HB_GOBJECT_TYPE_USER_DATA_KEY (hb_gobject_user_data_key_get_type ()) + + +HB_END_DECLS + +#endif /* HB_GOBJECT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-gobject.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-gobject.h new file mode 100755 index 00000000..ea1bd25d --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-gobject.h @@ -0,0 +1,40 @@ +/* + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_GOBJECT_H +#define HB_GOBJECT_H +#define HB_GOBJECT_H_IN + +#include "hb.h" + +#include "hb-gobject-enums.h" +#include "hb-gobject-structs.h" + +HB_BEGIN_DECLS +HB_END_DECLS + +#undef HB_GOBJECT_H_IN +#endif /* HB_GOBJECT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-graphite2.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-graphite2.h new file mode 100755 index 00000000..82b1e64c --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-graphite2.h @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2011 Martin Hosken + * Copyright (C) 2011 SIL International + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + */ + +#ifndef HB_GRAPHITE2_H +#define HB_GRAPHITE2_H + +#include "hb.h" + +#include <graphite2/Font.h> + +HB_BEGIN_DECLS + + +#define HB_GRAPHITE2_TAG_SILF HB_TAG('S','i','l','f') + + +HB_EXTERN gr_face * +hb_graphite2_face_get_gr_face (hb_face_t *face); + +#ifndef HB_DISABLE_DEPRECATED + +HB_EXTERN gr_font * +hb_graphite2_font_get_gr_font (hb_font_t *font); + +#endif + + +HB_END_DECLS + +#endif /* HB_GRAPHITE2_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-icu.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-icu.h new file mode 100755 index 00000000..2db6a7b6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-icu.h @@ -0,0 +1,52 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_ICU_H +#define HB_ICU_H + +#include "hb.h" + +#include <unicode/uscript.h> + +HB_BEGIN_DECLS + + +HB_EXTERN hb_script_t +hb_icu_script_to_script (UScriptCode script); + +HB_EXTERN UScriptCode +hb_icu_script_from_script (hb_script_t script); + + +HB_EXTERN hb_unicode_funcs_t * +hb_icu_get_unicode_funcs (void); + + +HB_END_DECLS + +#endif /* HB_ICU_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot-font.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot-font.h new file mode 100755 index 00000000..80eaa54b --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot-font.h @@ -0,0 +1,45 @@ +/* + * Copyright © 2014 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod, Roozbeh Pournader + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_FONT_H +#define HB_OT_FONT_H + +#include "hb.h" + +HB_BEGIN_DECLS + + +HB_EXTERN void +hb_ot_font_set_funcs (hb_font_t *font); + + +HB_END_DECLS + +#endif /* HB_OT_FONT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot-layout.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot-layout.h new file mode 100755 index 00000000..9861f0fc --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot-layout.h @@ -0,0 +1,321 @@ +/* + * Copyright © 2007,2008,2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_LAYOUT_H +#define HB_OT_LAYOUT_H + +#include "hb.h" + +#include "hb-ot-tag.h" + +HB_BEGIN_DECLS + + +#define HB_OT_TAG_GDEF HB_TAG('G','D','E','F') +#define HB_OT_TAG_GSUB HB_TAG('G','S','U','B') +#define HB_OT_TAG_GPOS HB_TAG('G','P','O','S') +#define HB_OT_TAG_JSTF HB_TAG('J','S','T','F') + + +/* + * GDEF + */ + +HB_EXTERN hb_bool_t +hb_ot_layout_has_glyph_classes (hb_face_t *face); + +typedef enum { + HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED = 0, + HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH = 1, + HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE = 2, + HB_OT_LAYOUT_GLYPH_CLASS_MARK = 3, + HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT = 4 +} hb_ot_layout_glyph_class_t; + +HB_EXTERN hb_ot_layout_glyph_class_t +hb_ot_layout_get_glyph_class (hb_face_t *face, + hb_codepoint_t glyph); + +HB_EXTERN void +hb_ot_layout_get_glyphs_in_class (hb_face_t *face, + hb_ot_layout_glyph_class_t klass, + hb_set_t *glyphs /* OUT */); + + +/* Not that useful. Provides list of attach points for a glyph that a + * client may want to cache */ +HB_EXTERN unsigned int +hb_ot_layout_get_attach_points (hb_face_t *face, + hb_codepoint_t glyph, + unsigned int start_offset, + unsigned int *point_count /* IN/OUT */, + unsigned int *point_array /* OUT */); + +/* Ligature caret positions */ +HB_EXTERN unsigned int +hb_ot_layout_get_ligature_carets (hb_font_t *font, + hb_direction_t direction, + hb_codepoint_t glyph, + unsigned int start_offset, + unsigned int *caret_count /* IN/OUT */, + hb_position_t *caret_array /* OUT */); + + +/* + * GSUB/GPOS feature query and enumeration interface + */ + +#define HB_OT_LAYOUT_NO_SCRIPT_INDEX 0xFFFFu +#define HB_OT_LAYOUT_NO_FEATURE_INDEX 0xFFFFu +#define HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX 0xFFFFu +#define HB_OT_LAYOUT_NO_VARIATIONS_INDEX 0xFFFFFFFFu + +HB_EXTERN unsigned int +hb_ot_layout_table_get_script_tags (hb_face_t *face, + hb_tag_t table_tag, + unsigned int start_offset, + unsigned int *script_count /* IN/OUT */, + hb_tag_t *script_tags /* OUT */); + +HB_EXTERN hb_bool_t +hb_ot_layout_table_find_script (hb_face_t *face, + hb_tag_t table_tag, + hb_tag_t script_tag, + unsigned int *script_index); + +/* Like find_script, but takes zero-terminated array of scripts to test */ +HB_EXTERN hb_bool_t +hb_ot_layout_table_choose_script (hb_face_t *face, + hb_tag_t table_tag, + const hb_tag_t *script_tags, + unsigned int *script_index, + hb_tag_t *chosen_script); + +HB_EXTERN unsigned int +hb_ot_layout_table_get_feature_tags (hb_face_t *face, + hb_tag_t table_tag, + unsigned int start_offset, + unsigned int *feature_count /* IN/OUT */, + hb_tag_t *feature_tags /* OUT */); + +HB_EXTERN unsigned int +hb_ot_layout_script_get_language_tags (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int start_offset, + unsigned int *language_count /* IN/OUT */, + hb_tag_t *language_tags /* OUT */); + +HB_EXTERN hb_bool_t +hb_ot_layout_script_find_language (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + hb_tag_t language_tag, + unsigned int *language_index); + +HB_EXTERN hb_bool_t +hb_ot_layout_language_get_required_feature_index (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + unsigned int *feature_index); + +HB_EXTERN hb_bool_t +hb_ot_layout_language_get_required_feature (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + unsigned int *feature_index, + hb_tag_t *feature_tag); + +HB_EXTERN unsigned int +hb_ot_layout_language_get_feature_indexes (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + unsigned int start_offset, + unsigned int *feature_count /* IN/OUT */, + unsigned int *feature_indexes /* OUT */); + +HB_EXTERN unsigned int +hb_ot_layout_language_get_feature_tags (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + unsigned int start_offset, + unsigned int *feature_count /* IN/OUT */, + hb_tag_t *feature_tags /* OUT */); + +HB_EXTERN hb_bool_t +hb_ot_layout_language_find_feature (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + hb_tag_t feature_tag, + unsigned int *feature_index); + +HB_EXTERN unsigned int +hb_ot_layout_feature_get_lookups (hb_face_t *face, + hb_tag_t table_tag, + unsigned int feature_index, + unsigned int start_offset, + unsigned int *lookup_count /* IN/OUT */, + unsigned int *lookup_indexes /* OUT */); + +HB_EXTERN unsigned int +hb_ot_layout_table_get_lookup_count (hb_face_t *face, + hb_tag_t table_tag); + + +HB_EXTERN void +hb_ot_layout_collect_lookups (hb_face_t *face, + hb_tag_t table_tag, + const hb_tag_t *scripts, + const hb_tag_t *languages, + const hb_tag_t *features, + hb_set_t *lookup_indexes /* OUT */); + +HB_EXTERN void +hb_ot_layout_lookup_collect_glyphs (hb_face_t *face, + hb_tag_t table_tag, + unsigned int lookup_index, + hb_set_t *glyphs_before, /* OUT. May be NULL */ + hb_set_t *glyphs_input, /* OUT. May be NULL */ + hb_set_t *glyphs_after, /* OUT. May be NULL */ + hb_set_t *glyphs_output /* OUT. May be NULL */); + +#ifdef HB_NOT_IMPLEMENTED +typedef struct +{ + const hb_codepoint_t *before, + unsigned int before_length, + const hb_codepoint_t *input, + unsigned int input_length, + const hb_codepoint_t *after, + unsigned int after_length, +} hb_ot_layout_glyph_sequence_t; + +typedef hb_bool_t +(*hb_ot_layout_glyph_sequence_func_t) (hb_font_t *font, + hb_tag_t table_tag, + unsigned int lookup_index, + const hb_ot_layout_glyph_sequence_t *sequence, + void *user_data); + +HB_EXTERN void +Xhb_ot_layout_lookup_enumerate_sequences (hb_face_t *face, + hb_tag_t table_tag, + unsigned int lookup_index, + hb_ot_layout_glyph_sequence_func_t callback, + void *user_data); +#endif + +/* Variations support */ + +HB_EXTERN hb_bool_t +hb_ot_layout_table_find_feature_variations (hb_face_t *face, + hb_tag_t table_tag, + const int *coords, + unsigned int num_coords, + unsigned int *variations_index /* out */); + +HB_EXTERN unsigned int +hb_ot_layout_feature_with_variations_get_lookups (hb_face_t *face, + hb_tag_t table_tag, + unsigned int feature_index, + unsigned int variations_index, + unsigned int start_offset, + unsigned int *lookup_count /* IN/OUT */, + unsigned int *lookup_indexes /* OUT */); + + +/* + * GSUB + */ + +HB_EXTERN hb_bool_t +hb_ot_layout_has_substitution (hb_face_t *face); + +HB_EXTERN hb_bool_t +hb_ot_layout_lookup_would_substitute (hb_face_t *face, + unsigned int lookup_index, + const hb_codepoint_t *glyphs, + unsigned int glyphs_length, + hb_bool_t zero_context); + +HB_EXTERN void +hb_ot_layout_lookup_substitute_closure (hb_face_t *face, + unsigned int lookup_index, + hb_set_t *glyphs + /*TODO , hb_bool_t inclusive */); + +#ifdef HB_NOT_IMPLEMENTED +/* Note: You better have GDEF when using this API, or marks won't do much. */ +HB_EXTERN hb_bool_t +Xhb_ot_layout_lookup_substitute (hb_font_t *font, + unsigned int lookup_index, + const hb_ot_layout_glyph_sequence_t *sequence, + unsigned int out_size, + hb_codepoint_t *glyphs_out, /* OUT */ + unsigned int *clusters_out, /* OUT */ + unsigned int *out_length /* OUT */); +#endif + + +/* + * GPOS + */ + +HB_EXTERN hb_bool_t +hb_ot_layout_has_positioning (hb_face_t *face); + +#ifdef HB_NOT_IMPLEMENTED +/* Note: You better have GDEF when using this API, or marks won't do much. */ +HB_EXTERN hb_bool_t +Xhb_ot_layout_lookup_position (hb_font_t *font, + unsigned int lookup_index, + const hb_ot_layout_glyph_sequence_t *sequence, + hb_glyph_position_t *positions /* IN / OUT */); +#endif + +/* Optical 'size' feature info. Returns true if found. + * http://www.microsoft.com/typography/otspec/features_pt.htm#size */ +HB_EXTERN hb_bool_t +hb_ot_layout_get_size_params (hb_face_t *face, + unsigned int *design_size, /* OUT. May be NULL */ + unsigned int *subfamily_id, /* OUT. May be NULL */ + unsigned int *subfamily_name_id, /* OUT. May be NULL */ + unsigned int *range_start, /* OUT. May be NULL */ + unsigned int *range_end /* OUT. May be NULL */); + + +HB_END_DECLS + +#endif /* HB_OT_LAYOUT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot-math.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot-math.h new file mode 100755 index 00000000..521a5ca0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot-math.h @@ -0,0 +1,209 @@ +/* + * Copyright © 2016 Igalia S.L. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Igalia Author(s): FrĂ©dĂ©ric Wang + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_MATH_H +#define HB_OT_MATH_H + +#include "hb.h" + +HB_BEGIN_DECLS + + +/* + * MATH + */ + +#define HB_OT_TAG_MATH HB_TAG('M','A','T','H') + +/* Use with hb_buffer_set_script() for math shaping. */ +#define HB_OT_MATH_SCRIPT HB_TAG('m','a','t','h') + +/* Types */ + +/** + * hb_ot_math_constant_t: + * + * Since: 1.3.3 + */ +typedef enum { + HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN = 0, + HB_OT_MATH_CONSTANT_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN = 1, + HB_OT_MATH_CONSTANT_DELIMITED_SUB_FORMULA_MIN_HEIGHT = 2, + HB_OT_MATH_CONSTANT_DISPLAY_OPERATOR_MIN_HEIGHT = 3, + HB_OT_MATH_CONSTANT_MATH_LEADING = 4, + HB_OT_MATH_CONSTANT_AXIS_HEIGHT = 5, + HB_OT_MATH_CONSTANT_ACCENT_BASE_HEIGHT = 6, + HB_OT_MATH_CONSTANT_FLATTENED_ACCENT_BASE_HEIGHT = 7, + HB_OT_MATH_CONSTANT_SUBSCRIPT_SHIFT_DOWN = 8, + HB_OT_MATH_CONSTANT_SUBSCRIPT_TOP_MAX = 9, + HB_OT_MATH_CONSTANT_SUBSCRIPT_BASELINE_DROP_MIN = 10, + HB_OT_MATH_CONSTANT_SUPERSCRIPT_SHIFT_UP = 11, + HB_OT_MATH_CONSTANT_SUPERSCRIPT_SHIFT_UP_CRAMPED = 12, + HB_OT_MATH_CONSTANT_SUPERSCRIPT_BOTTOM_MIN = 13, + HB_OT_MATH_CONSTANT_SUPERSCRIPT_BASELINE_DROP_MAX = 14, + HB_OT_MATH_CONSTANT_SUB_SUPERSCRIPT_GAP_MIN = 15, + HB_OT_MATH_CONSTANT_SUPERSCRIPT_BOTTOM_MAX_WITH_SUBSCRIPT = 16, + HB_OT_MATH_CONSTANT_SPACE_AFTER_SCRIPT = 17, + HB_OT_MATH_CONSTANT_UPPER_LIMIT_GAP_MIN = 18, + HB_OT_MATH_CONSTANT_UPPER_LIMIT_BASELINE_RISE_MIN = 19, + HB_OT_MATH_CONSTANT_LOWER_LIMIT_GAP_MIN = 20, + HB_OT_MATH_CONSTANT_LOWER_LIMIT_BASELINE_DROP_MIN = 21, + HB_OT_MATH_CONSTANT_STACK_TOP_SHIFT_UP = 22, + HB_OT_MATH_CONSTANT_STACK_TOP_DISPLAY_STYLE_SHIFT_UP = 23, + HB_OT_MATH_CONSTANT_STACK_BOTTOM_SHIFT_DOWN = 24, + HB_OT_MATH_CONSTANT_STACK_BOTTOM_DISPLAY_STYLE_SHIFT_DOWN = 25, + HB_OT_MATH_CONSTANT_STACK_GAP_MIN = 26, + HB_OT_MATH_CONSTANT_STACK_DISPLAY_STYLE_GAP_MIN = 27, + HB_OT_MATH_CONSTANT_STRETCH_STACK_TOP_SHIFT_UP = 28, + HB_OT_MATH_CONSTANT_STRETCH_STACK_BOTTOM_SHIFT_DOWN = 29, + HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_ABOVE_MIN = 30, + HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_BELOW_MIN = 31, + HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_SHIFT_UP = 32, + HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_DISPLAY_STYLE_SHIFT_UP = 33, + HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_SHIFT_DOWN = 34, + HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_DISPLAY_STYLE_SHIFT_DOWN = 35, + HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_GAP_MIN = 36, + HB_OT_MATH_CONSTANT_FRACTION_NUM_DISPLAY_STYLE_GAP_MIN = 37, + HB_OT_MATH_CONSTANT_FRACTION_RULE_THICKNESS = 38, + HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_GAP_MIN = 39, + HB_OT_MATH_CONSTANT_FRACTION_DENOM_DISPLAY_STYLE_GAP_MIN = 40, + HB_OT_MATH_CONSTANT_SKEWED_FRACTION_HORIZONTAL_GAP = 41, + HB_OT_MATH_CONSTANT_SKEWED_FRACTION_VERTICAL_GAP = 42, + HB_OT_MATH_CONSTANT_OVERBAR_VERTICAL_GAP = 43, + HB_OT_MATH_CONSTANT_OVERBAR_RULE_THICKNESS = 44, + HB_OT_MATH_CONSTANT_OVERBAR_EXTRA_ASCENDER = 45, + HB_OT_MATH_CONSTANT_UNDERBAR_VERTICAL_GAP = 46, + HB_OT_MATH_CONSTANT_UNDERBAR_RULE_THICKNESS = 47, + HB_OT_MATH_CONSTANT_UNDERBAR_EXTRA_DESCENDER = 48, + HB_OT_MATH_CONSTANT_RADICAL_VERTICAL_GAP = 49, + HB_OT_MATH_CONSTANT_RADICAL_DISPLAY_STYLE_VERTICAL_GAP = 50, + HB_OT_MATH_CONSTANT_RADICAL_RULE_THICKNESS = 51, + HB_OT_MATH_CONSTANT_RADICAL_EXTRA_ASCENDER = 52, + HB_OT_MATH_CONSTANT_RADICAL_KERN_BEFORE_DEGREE = 53, + HB_OT_MATH_CONSTANT_RADICAL_KERN_AFTER_DEGREE = 54, + HB_OT_MATH_CONSTANT_RADICAL_DEGREE_BOTTOM_RAISE_PERCENT = 55 +} hb_ot_math_constant_t; + +/** + * hb_ot_math_kern_t: + * + * Since: 1.3.3 + */ +typedef enum { + HB_OT_MATH_KERN_TOP_RIGHT = 0, + HB_OT_MATH_KERN_TOP_LEFT = 1, + HB_OT_MATH_KERN_BOTTOM_RIGHT = 2, + HB_OT_MATH_KERN_BOTTOM_LEFT = 3 +} hb_ot_math_kern_t; + +/** + * hb_ot_math_glyph_variant_t: + * + * Since: 1.3.3 + */ +typedef struct hb_ot_math_glyph_variant_t { + hb_codepoint_t glyph; + hb_position_t advance; +} hb_ot_math_glyph_variant_t; + +/** + * hb_ot_math_glyph_part_flags_t: + * + * Since: 1.3.3 + */ +typedef enum { /*< flags >*/ + HB_MATH_GLYPH_PART_FLAG_EXTENDER = 0x00000001u /* Extender glyph */ +} hb_ot_math_glyph_part_flags_t; + +/** + * hb_ot_math_glyph_part_t: + * + * Since: 1.3.3 + */ +typedef struct hb_ot_math_glyph_part_t { + hb_codepoint_t glyph; + hb_position_t start_connector_length; + hb_position_t end_connector_length; + hb_position_t full_advance; + hb_ot_math_glyph_part_flags_t flags; +} hb_ot_math_glyph_part_t; + +/* Methods */ + +HB_EXTERN hb_bool_t +hb_ot_math_has_data (hb_face_t *face); + +HB_EXTERN hb_position_t +hb_ot_math_get_constant (hb_font_t *font, + hb_ot_math_constant_t constant); + +HB_EXTERN hb_position_t +hb_ot_math_get_glyph_italics_correction (hb_font_t *font, + hb_codepoint_t glyph); + +HB_EXTERN hb_position_t +hb_ot_math_get_glyph_top_accent_attachment (hb_font_t *font, + hb_codepoint_t glyph); + +HB_EXTERN hb_bool_t +hb_ot_math_is_glyph_extended_shape (hb_face_t *face, + hb_codepoint_t glyph); + +HB_EXTERN hb_position_t +hb_ot_math_get_glyph_kerning (hb_font_t *font, + hb_codepoint_t glyph, + hb_ot_math_kern_t kern, + hb_position_t correction_height); + +HB_EXTERN unsigned int +hb_ot_math_get_glyph_variants (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + unsigned int start_offset, + unsigned int *variants_count, /* IN/OUT */ + hb_ot_math_glyph_variant_t *variants /* OUT */); + +HB_EXTERN hb_position_t +hb_ot_math_get_min_connector_overlap (hb_font_t *font, + hb_direction_t direction); + +HB_EXTERN unsigned int +hb_ot_math_get_glyph_assembly (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + unsigned int start_offset, + unsigned int *parts_count, /* IN/OUT */ + hb_ot_math_glyph_part_t *parts, /* OUT */ + hb_position_t *italics_correction /* OUT */); + + +HB_END_DECLS + +#endif /* HB_OT_MATH_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot-shape.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot-shape.h new file mode 100755 index 00000000..7b1bcc06 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot-shape.h @@ -0,0 +1,53 @@ +/* + * Copyright © 2013 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_SHAPE_H +#define HB_OT_SHAPE_H + +#include "hb.h" + +HB_BEGIN_DECLS + +/* TODO port to shape-plan / set. */ +HB_EXTERN void +hb_ot_shape_glyphs_closure (hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features, + hb_set_t *glyphs); + +HB_EXTERN void +hb_ot_shape_plan_collect_lookups (hb_shape_plan_t *shape_plan, + hb_tag_t table_tag, + hb_set_t *lookup_indexes /* OUT */); + +HB_END_DECLS + +#endif /* HB_OT_SHAPE_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot-tag.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot-tag.h new file mode 100755 index 00000000..54fb747f --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot-tag.h @@ -0,0 +1,59 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_TAG_H +#define HB_OT_TAG_H + +#include "hb.h" + +HB_BEGIN_DECLS + + +#define HB_OT_TAG_DEFAULT_SCRIPT HB_TAG ('D', 'F', 'L', 'T') +#define HB_OT_TAG_DEFAULT_LANGUAGE HB_TAG ('d', 'f', 'l', 't') + +HB_EXTERN void +hb_ot_tags_from_script (hb_script_t script, + hb_tag_t *script_tag_1, + hb_tag_t *script_tag_2); + +HB_EXTERN hb_script_t +hb_ot_tag_to_script (hb_tag_t tag); + +HB_EXTERN hb_tag_t +hb_ot_tag_from_language (hb_language_t language); + +HB_EXTERN hb_language_t +hb_ot_tag_to_language (hb_tag_t tag); + + +HB_END_DECLS + +#endif /* HB_OT_TAG_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot-var.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot-var.h new file mode 100755 index 00000000..a2c0c5f2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot-var.h @@ -0,0 +1,105 @@ +/* + * Copyright © 2017 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_VAR_H +#define HB_OT_VAR_H + +#include "hb.h" + +HB_BEGIN_DECLS + + +#define HB_OT_TAG_VAR_AXIS_ITALIC HB_TAG('i','t','a','l') +#define HB_OT_TAG_VAR_AXIS_OPTICAL_SIZE HB_TAG('o','p','s','z') +#define HB_OT_TAG_VAR_AXIS_SLANT HB_TAG('s','l','n','t') +#define HB_OT_TAG_VAR_AXIS_WIDTH HB_TAG('w','d','t','h') +#define HB_OT_TAG_VAR_AXIS_WEIGHT HB_TAG('w','g','h','t') + + +/* + * fvar / avar + */ + +/** + * hb_ot_var_axis_t: + * + * Since: 1.4.2 + */ +typedef struct hb_ot_var_axis_t { + hb_tag_t tag; + unsigned int name_id; + float min_value; + float default_value; + float max_value; +} hb_ot_var_axis_t; + +HB_EXTERN hb_bool_t +hb_ot_var_has_data (hb_face_t *face); + +/** + * HB_OT_VAR_NO_AXIS_INDEX: + * + * Since: 1.4.2 + */ +#define HB_OT_VAR_NO_AXIS_INDEX 0xFFFFFFFFu + +HB_EXTERN unsigned int +hb_ot_var_get_axis_count (hb_face_t *face); + +HB_EXTERN unsigned int +hb_ot_var_get_axes (hb_face_t *face, + unsigned int start_offset, + unsigned int *axes_count /* IN/OUT */, + hb_ot_var_axis_t *axes_array /* OUT */); + +HB_EXTERN hb_bool_t +hb_ot_var_find_axis (hb_face_t *face, + hb_tag_t axis_tag, + unsigned int *axis_index, + hb_ot_var_axis_t *axis_info); + + +HB_EXTERN void +hb_ot_var_normalize_variations (hb_face_t *face, + const hb_variation_t *variations, /* IN */ + unsigned int variations_length, + int *coords, /* OUT */ + unsigned int coords_length); + +HB_EXTERN void +hb_ot_var_normalize_coords (hb_face_t *face, + unsigned int coords_length, + const float *design_coords, /* IN */ + int *normalized_coords /* OUT */); + + +HB_END_DECLS + +#endif /* HB_OT_VAR_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot.h new file mode 100755 index 00000000..2120a3ef --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-ot.h @@ -0,0 +1,45 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_H +#define HB_OT_H +#define HB_OT_H_IN + +#include "hb.h" + +#include "hb-ot-font.h" +#include "hb-ot-layout.h" +#include "hb-ot-math.h" +#include "hb-ot-tag.h" +#include "hb-ot-shape.h" +#include "hb-ot-var.h" + +HB_BEGIN_DECLS + +HB_END_DECLS + +#undef HB_OT_H_IN +#endif /* HB_OT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-set.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-set.h new file mode 100755 index 00000000..2ce40607 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-set.h @@ -0,0 +1,154 @@ +/* + * Copyright © 2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_SET_H +#define HB_SET_H + +#include "hb-common.h" + +HB_BEGIN_DECLS + + +/* + * Since: 0.9.21 + */ +#define HB_SET_VALUE_INVALID ((hb_codepoint_t) -1) + +typedef struct hb_set_t hb_set_t; + + +HB_EXTERN hb_set_t * +hb_set_create (void); + +HB_EXTERN hb_set_t * +hb_set_get_empty (void); + +HB_EXTERN hb_set_t * +hb_set_reference (hb_set_t *set); + +HB_EXTERN void +hb_set_destroy (hb_set_t *set); + +HB_EXTERN hb_bool_t +hb_set_set_user_data (hb_set_t *set, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + +HB_EXTERN void * +hb_set_get_user_data (hb_set_t *set, + hb_user_data_key_t *key); + + +/* Returns false if allocation has failed before */ +HB_EXTERN hb_bool_t +hb_set_allocation_successful (const hb_set_t *set); + +HB_EXTERN void +hb_set_clear (hb_set_t *set); + +HB_EXTERN hb_bool_t +hb_set_is_empty (const hb_set_t *set); + +HB_EXTERN hb_bool_t +hb_set_has (const hb_set_t *set, + hb_codepoint_t codepoint); + +/* Right now limited to 16-bit integers. Eventually will do full codepoint range, sans -1 + * which we will use as a sentinel. */ +HB_EXTERN void +hb_set_add (hb_set_t *set, + hb_codepoint_t codepoint); + +HB_EXTERN void +hb_set_add_range (hb_set_t *set, + hb_codepoint_t first, + hb_codepoint_t last); + +HB_EXTERN void +hb_set_del (hb_set_t *set, + hb_codepoint_t codepoint); + +HB_EXTERN void +hb_set_del_range (hb_set_t *set, + hb_codepoint_t first, + hb_codepoint_t last); + +HB_EXTERN hb_bool_t +hb_set_is_equal (const hb_set_t *set, + const hb_set_t *other); + +HB_EXTERN void +hb_set_set (hb_set_t *set, + const hb_set_t *other); + +HB_EXTERN void +hb_set_union (hb_set_t *set, + const hb_set_t *other); + +HB_EXTERN void +hb_set_intersect (hb_set_t *set, + const hb_set_t *other); + +HB_EXTERN void +hb_set_subtract (hb_set_t *set, + const hb_set_t *other); + +HB_EXTERN void +hb_set_symmetric_difference (hb_set_t *set, + const hb_set_t *other); + +HB_EXTERN unsigned int +hb_set_get_population (const hb_set_t *set); + +/* Returns -1 if set empty. */ +HB_EXTERN hb_codepoint_t +hb_set_get_min (const hb_set_t *set); + +/* Returns -1 if set empty. */ +HB_EXTERN hb_codepoint_t +hb_set_get_max (const hb_set_t *set); + +/* Pass -1 in to get started. */ +HB_EXTERN hb_bool_t +hb_set_next (const hb_set_t *set, + hb_codepoint_t *codepoint); + +/* Pass -1 for first and last to get started. */ +HB_EXTERN hb_bool_t +hb_set_next_range (const hb_set_t *set, + hb_codepoint_t *first, + hb_codepoint_t *last); + + +HB_END_DECLS + +#endif /* HB_SET_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-shape-plan.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-shape-plan.h new file mode 100755 index 00000000..b62ae7ca --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-shape-plan.h @@ -0,0 +1,108 @@ +/* + * Copyright © 2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_SHAPE_PLAN_H +#define HB_SHAPE_PLAN_H + +#include "hb-common.h" +#include "hb-font.h" + +HB_BEGIN_DECLS + +typedef struct hb_shape_plan_t hb_shape_plan_t; + +HB_EXTERN hb_shape_plan_t * +hb_shape_plan_create (hb_face_t *face, + const hb_segment_properties_t *props, + const hb_feature_t *user_features, + unsigned int num_user_features, + const char * const *shaper_list); + +HB_EXTERN hb_shape_plan_t * +hb_shape_plan_create_cached (hb_face_t *face, + const hb_segment_properties_t *props, + const hb_feature_t *user_features, + unsigned int num_user_features, + const char * const *shaper_list); + +HB_EXTERN hb_shape_plan_t * +hb_shape_plan_create2 (hb_face_t *face, + const hb_segment_properties_t *props, + const hb_feature_t *user_features, + unsigned int num_user_features, + const int *coords, + unsigned int num_coords, + const char * const *shaper_list); + +HB_EXTERN hb_shape_plan_t * +hb_shape_plan_create_cached2 (hb_face_t *face, + const hb_segment_properties_t *props, + const hb_feature_t *user_features, + unsigned int num_user_features, + const int *coords, + unsigned int num_coords, + const char * const *shaper_list); + + +HB_EXTERN hb_shape_plan_t * +hb_shape_plan_get_empty (void); + +HB_EXTERN hb_shape_plan_t * +hb_shape_plan_reference (hb_shape_plan_t *shape_plan); + +HB_EXTERN void +hb_shape_plan_destroy (hb_shape_plan_t *shape_plan); + +HB_EXTERN hb_bool_t +hb_shape_plan_set_user_data (hb_shape_plan_t *shape_plan, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + +HB_EXTERN void * +hb_shape_plan_get_user_data (hb_shape_plan_t *shape_plan, + hb_user_data_key_t *key); + + +HB_EXTERN hb_bool_t +hb_shape_plan_execute (hb_shape_plan_t *shape_plan, + hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features); + +HB_EXTERN const char * +hb_shape_plan_get_shaper (hb_shape_plan_t *shape_plan); + + +HB_END_DECLS + +#endif /* HB_SHAPE_PLAN_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-shape.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-shape.h new file mode 100755 index 00000000..39507ff7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-shape.h @@ -0,0 +1,62 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_SHAPE_H +#define HB_SHAPE_H + +#include "hb-common.h" +#include "hb-buffer.h" +#include "hb-font.h" + +HB_BEGIN_DECLS + + +HB_EXTERN void +hb_shape (hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features); + +HB_EXTERN hb_bool_t +hb_shape_full (hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features, + const char * const *shaper_list); + +HB_EXTERN const char ** +hb_shape_list_shapers (void); + + +HB_END_DECLS + +#endif /* HB_SHAPE_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-unicode.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-unicode.h new file mode 100755 index 00000000..2657f481 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-unicode.h @@ -0,0 +1,471 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2011 Codethink Limited + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Codethink Author(s): Ryan Lortie + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_UNICODE_H +#define HB_UNICODE_H + +#include "hb-common.h" + +HB_BEGIN_DECLS + + +/* hb_unicode_general_category_t */ + +/* Unicode Character Database property: General_Category (gc) */ +typedef enum +{ + HB_UNICODE_GENERAL_CATEGORY_CONTROL, /* Cc */ + HB_UNICODE_GENERAL_CATEGORY_FORMAT, /* Cf */ + HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED, /* Cn */ + HB_UNICODE_GENERAL_CATEGORY_PRIVATE_USE, /* Co */ + HB_UNICODE_GENERAL_CATEGORY_SURROGATE, /* Cs */ + HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER, /* Ll */ + HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER, /* Lm */ + HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER, /* Lo */ + HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER, /* Lt */ + HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER, /* Lu */ + HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK, /* Mc */ + HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK, /* Me */ + HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK, /* Mn */ + HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER, /* Nd */ + HB_UNICODE_GENERAL_CATEGORY_LETTER_NUMBER, /* Nl */ + HB_UNICODE_GENERAL_CATEGORY_OTHER_NUMBER, /* No */ + HB_UNICODE_GENERAL_CATEGORY_CONNECT_PUNCTUATION, /* Pc */ + HB_UNICODE_GENERAL_CATEGORY_DASH_PUNCTUATION, /* Pd */ + HB_UNICODE_GENERAL_CATEGORY_CLOSE_PUNCTUATION, /* Pe */ + HB_UNICODE_GENERAL_CATEGORY_FINAL_PUNCTUATION, /* Pf */ + HB_UNICODE_GENERAL_CATEGORY_INITIAL_PUNCTUATION, /* Pi */ + HB_UNICODE_GENERAL_CATEGORY_OTHER_PUNCTUATION, /* Po */ + HB_UNICODE_GENERAL_CATEGORY_OPEN_PUNCTUATION, /* Ps */ + HB_UNICODE_GENERAL_CATEGORY_CURRENCY_SYMBOL, /* Sc */ + HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL, /* Sk */ + HB_UNICODE_GENERAL_CATEGORY_MATH_SYMBOL, /* Sm */ + HB_UNICODE_GENERAL_CATEGORY_OTHER_SYMBOL, /* So */ + HB_UNICODE_GENERAL_CATEGORY_LINE_SEPARATOR, /* Zl */ + HB_UNICODE_GENERAL_CATEGORY_PARAGRAPH_SEPARATOR, /* Zp */ + HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR /* Zs */ +} hb_unicode_general_category_t; + +/* hb_unicode_combining_class_t */ + +/* Note: newer versions of Unicode may add new values. Clients should be ready to handle + * any value in the 0..254 range being returned from hb_unicode_combining_class(). + */ + +/* Unicode Character Database property: Canonical_Combining_Class (ccc) */ +typedef enum +{ + HB_UNICODE_COMBINING_CLASS_NOT_REORDERED = 0, + HB_UNICODE_COMBINING_CLASS_OVERLAY = 1, + HB_UNICODE_COMBINING_CLASS_NUKTA = 7, + HB_UNICODE_COMBINING_CLASS_KANA_VOICING = 8, + HB_UNICODE_COMBINING_CLASS_VIRAMA = 9, + + /* Hebrew */ + HB_UNICODE_COMBINING_CLASS_CCC10 = 10, + HB_UNICODE_COMBINING_CLASS_CCC11 = 11, + HB_UNICODE_COMBINING_CLASS_CCC12 = 12, + HB_UNICODE_COMBINING_CLASS_CCC13 = 13, + HB_UNICODE_COMBINING_CLASS_CCC14 = 14, + HB_UNICODE_COMBINING_CLASS_CCC15 = 15, + HB_UNICODE_COMBINING_CLASS_CCC16 = 16, + HB_UNICODE_COMBINING_CLASS_CCC17 = 17, + HB_UNICODE_COMBINING_CLASS_CCC18 = 18, + HB_UNICODE_COMBINING_CLASS_CCC19 = 19, + HB_UNICODE_COMBINING_CLASS_CCC20 = 20, + HB_UNICODE_COMBINING_CLASS_CCC21 = 21, + HB_UNICODE_COMBINING_CLASS_CCC22 = 22, + HB_UNICODE_COMBINING_CLASS_CCC23 = 23, + HB_UNICODE_COMBINING_CLASS_CCC24 = 24, + HB_UNICODE_COMBINING_CLASS_CCC25 = 25, + HB_UNICODE_COMBINING_CLASS_CCC26 = 26, + + /* Arabic */ + HB_UNICODE_COMBINING_CLASS_CCC27 = 27, + HB_UNICODE_COMBINING_CLASS_CCC28 = 28, + HB_UNICODE_COMBINING_CLASS_CCC29 = 29, + HB_UNICODE_COMBINING_CLASS_CCC30 = 30, + HB_UNICODE_COMBINING_CLASS_CCC31 = 31, + HB_UNICODE_COMBINING_CLASS_CCC32 = 32, + HB_UNICODE_COMBINING_CLASS_CCC33 = 33, + HB_UNICODE_COMBINING_CLASS_CCC34 = 34, + HB_UNICODE_COMBINING_CLASS_CCC35 = 35, + + /* Syriac */ + HB_UNICODE_COMBINING_CLASS_CCC36 = 36, + + /* Telugu */ + HB_UNICODE_COMBINING_CLASS_CCC84 = 84, + HB_UNICODE_COMBINING_CLASS_CCC91 = 91, + + /* Thai */ + HB_UNICODE_COMBINING_CLASS_CCC103 = 103, + HB_UNICODE_COMBINING_CLASS_CCC107 = 107, + + /* Lao */ + HB_UNICODE_COMBINING_CLASS_CCC118 = 118, + HB_UNICODE_COMBINING_CLASS_CCC122 = 122, + + /* Tibetan */ + HB_UNICODE_COMBINING_CLASS_CCC129 = 129, + HB_UNICODE_COMBINING_CLASS_CCC130 = 130, + HB_UNICODE_COMBINING_CLASS_CCC133 = 132, + + + HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW_LEFT = 200, + HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW = 202, + HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE = 214, + HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE_RIGHT = 216, + HB_UNICODE_COMBINING_CLASS_BELOW_LEFT = 218, + HB_UNICODE_COMBINING_CLASS_BELOW = 220, + HB_UNICODE_COMBINING_CLASS_BELOW_RIGHT = 222, + HB_UNICODE_COMBINING_CLASS_LEFT = 224, + HB_UNICODE_COMBINING_CLASS_RIGHT = 226, + HB_UNICODE_COMBINING_CLASS_ABOVE_LEFT = 228, + HB_UNICODE_COMBINING_CLASS_ABOVE = 230, + HB_UNICODE_COMBINING_CLASS_ABOVE_RIGHT = 232, + HB_UNICODE_COMBINING_CLASS_DOUBLE_BELOW = 233, + HB_UNICODE_COMBINING_CLASS_DOUBLE_ABOVE = 234, + + HB_UNICODE_COMBINING_CLASS_IOTA_SUBSCRIPT = 240, + + HB_UNICODE_COMBINING_CLASS_INVALID = 255 +} hb_unicode_combining_class_t; + + +/* + * hb_unicode_funcs_t + */ + +typedef struct hb_unicode_funcs_t hb_unicode_funcs_t; + + +/* + * just give me the best implementation you've got there. + */ +HB_EXTERN hb_unicode_funcs_t * +hb_unicode_funcs_get_default (void); + + +HB_EXTERN hb_unicode_funcs_t * +hb_unicode_funcs_create (hb_unicode_funcs_t *parent); + +HB_EXTERN hb_unicode_funcs_t * +hb_unicode_funcs_get_empty (void); + +HB_EXTERN hb_unicode_funcs_t * +hb_unicode_funcs_reference (hb_unicode_funcs_t *ufuncs); + +HB_EXTERN void +hb_unicode_funcs_destroy (hb_unicode_funcs_t *ufuncs); + +HB_EXTERN hb_bool_t +hb_unicode_funcs_set_user_data (hb_unicode_funcs_t *ufuncs, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +HB_EXTERN void * +hb_unicode_funcs_get_user_data (hb_unicode_funcs_t *ufuncs, + hb_user_data_key_t *key); + + +HB_EXTERN void +hb_unicode_funcs_make_immutable (hb_unicode_funcs_t *ufuncs); + +HB_EXTERN hb_bool_t +hb_unicode_funcs_is_immutable (hb_unicode_funcs_t *ufuncs); + +HB_EXTERN hb_unicode_funcs_t * +hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs); + + +/* + * funcs + */ + +/* typedefs */ + +typedef hb_unicode_combining_class_t (*hb_unicode_combining_class_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode, + void *user_data); +typedef unsigned int (*hb_unicode_eastasian_width_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode, + void *user_data); +typedef hb_unicode_general_category_t (*hb_unicode_general_category_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode, + void *user_data); +typedef hb_codepoint_t (*hb_unicode_mirroring_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode, + void *user_data); +typedef hb_script_t (*hb_unicode_script_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode, + void *user_data); + +typedef hb_bool_t (*hb_unicode_compose_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t a, + hb_codepoint_t b, + hb_codepoint_t *ab, + void *user_data); +typedef hb_bool_t (*hb_unicode_decompose_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t ab, + hb_codepoint_t *a, + hb_codepoint_t *b, + void *user_data); + +/** + * hb_unicode_decompose_compatibility_func_t: + * @ufuncs: a Unicode function structure + * @u: codepoint to decompose + * @decomposed: address of codepoint array (of length %HB_UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into + * @user_data: user data pointer as passed to hb_unicode_funcs_set_decompose_compatibility_func() + * + * Fully decompose @u to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to @decomposed. + * The complete length of the decomposition will be returned. + * + * If @u has no compatibility decomposition, zero should be returned. + * + * The Unicode standard guarantees that a buffer of length %HB_UNICODE_MAX_DECOMPOSITION_LEN codepoints will always be sufficient for any + * compatibility decomposition plus an terminating value of 0. Consequently, @decompose must be allocated by the caller to be at least this length. Implementations + * of this function type must ensure that they do not write past the provided array. + * + * Return value: number of codepoints in the full compatibility decomposition of @u, or 0 if no decomposition available. + */ +typedef unsigned int (*hb_unicode_decompose_compatibility_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t u, + hb_codepoint_t *decomposed, + void *user_data); + +/* See Unicode 6.1 for details on the maximum decomposition length. */ +#define HB_UNICODE_MAX_DECOMPOSITION_LEN (18+1) /* codepoints */ + +/* setters */ + +/** + * hb_unicode_funcs_set_combining_class_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_combining_class_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_eastasian_width_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_eastasian_width_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_general_category_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_general_category_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_general_category_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_mirroring_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_mirroring_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_mirroring_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_script_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_script_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_script_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_compose_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_compose_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_compose_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_decompose_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_decompose_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_decompose_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_decompose_compatibility_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_decompose_compatibility_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_decompose_compatibility_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/* accessors */ + +/** + * hb_unicode_combining_class: + * + * Since: 0.9.2 + **/ +HB_EXTERN hb_unicode_combining_class_t +hb_unicode_combining_class (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +/** + * hb_unicode_eastasian_width: + * + * Since: 0.9.2 + **/ +HB_EXTERN unsigned int +hb_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +/** + * hb_unicode_general_category: + * + * Since: 0.9.2 + **/ +HB_EXTERN hb_unicode_general_category_t +hb_unicode_general_category (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +/** + * hb_unicode_mirroring: + * + * Since: 0.9.2 + **/ +HB_EXTERN hb_codepoint_t +hb_unicode_mirroring (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +/** + * hb_unicode_script: + * + * Since: 0.9.2 + **/ +HB_EXTERN hb_script_t +hb_unicode_script (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +HB_EXTERN hb_bool_t +hb_unicode_compose (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t a, + hb_codepoint_t b, + hb_codepoint_t *ab); + +HB_EXTERN hb_bool_t +hb_unicode_decompose (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t ab, + hb_codepoint_t *a, + hb_codepoint_t *b); + +HB_EXTERN unsigned int +hb_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t u, + hb_codepoint_t *decomposed); + +HB_END_DECLS + +#endif /* HB_UNICODE_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-version.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-version.h new file mode 100755 index 00000000..fc81b66b --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb-version.h @@ -0,0 +1,66 @@ +/* + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_VERSION_H +#define HB_VERSION_H + +#include "hb-common.h" + +HB_BEGIN_DECLS + + +#define HB_VERSION_MAJOR 1 +#define HB_VERSION_MINOR 7 +#define HB_VERSION_MICRO 4 + +#define HB_VERSION_STRING "1.7.4" + +#define HB_VERSION_ATLEAST(major,minor,micro) \ + ((major)*10000+(minor)*100+(micro) <= \ + HB_VERSION_MAJOR*10000+HB_VERSION_MINOR*100+HB_VERSION_MICRO) + + +HB_EXTERN void +hb_version (unsigned int *major, + unsigned int *minor, + unsigned int *micro); + +HB_EXTERN const char * +hb_version_string (void); + +HB_EXTERN hb_bool_t +hb_version_atleast (unsigned int major, + unsigned int minor, + unsigned int micro); + + +HB_END_DECLS + +#endif /* HB_VERSION_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb.h new file mode 100755 index 00000000..7402034f --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/include/harfbuzz/hb.h @@ -0,0 +1,51 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_H +#define HB_H +#define HB_H_IN + +#ifndef HB_EXTERN +#define HB_EXTERN extern +#endif + +#include "hb-blob.h" +#include "hb-buffer.h" +#include "hb-common.h" +#include "hb-deprecated.h" +#include "hb-face.h" +#include "hb-font.h" +#include "hb-set.h" +#include "hb-shape.h" +#include "hb-shape-plan.h" +#include "hb-unicode.h" +#include "hb-version.h" + +HB_BEGIN_DECLS +HB_END_DECLS + +#undef HB_H_IN +#endif /* HB_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib/libharfbuzz-gobject.0.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib/libharfbuzz-gobject.0.dylib new file mode 100755 index 00000000..e48b324b Binary files /dev/null and b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib/libharfbuzz-gobject.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib/libharfbuzz-gobject.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib/libharfbuzz-gobject.dylib new file mode 120000 index 00000000..78c5b4be --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib/libharfbuzz-gobject.dylib @@ -0,0 +1 @@ +libharfbuzz-gobject.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib/libharfbuzz-icu.0.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib/libharfbuzz-icu.0.dylib new file mode 100755 index 00000000..9e5a7f20 Binary files /dev/null and b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib/libharfbuzz-icu.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib/libharfbuzz-icu.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib/libharfbuzz-icu.dylib new file mode 120000 index 00000000..b19944cc --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib/libharfbuzz-icu.dylib @@ -0,0 +1 @@ +libharfbuzz-icu.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib/libharfbuzz.0.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib/libharfbuzz.0.dylib new file mode 100755 index 00000000..1a9bf679 Binary files /dev/null and b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib/libharfbuzz.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib/libharfbuzz.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib/libharfbuzz.dylib new file mode 120000 index 00000000..fbfe2d23 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.4/lib/libharfbuzz.dylib @@ -0,0 +1 @@ +libharfbuzz.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-blob.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-blob.h new file mode 100755 index 00000000..53682d3e --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-blob.h @@ -0,0 +1,126 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_BLOB_H +#define HB_BLOB_H + +#include "hb-common.h" + +HB_BEGIN_DECLS + + +/* + * Note re various memory-modes: + * + * - In no case shall the HarfBuzz client modify memory + * that is passed to HarfBuzz in a blob. If there is + * any such possibility, MODE_DUPLICATE should be used + * such that HarfBuzz makes a copy immediately, + * + * - Use MODE_READONLY otherwise, unless you really really + * really know what you are doing, + * + * - MODE_WRITABLE is appropriate if you really made a + * copy of data solely for the purpose of passing to + * HarfBuzz and doing that just once (no reuse!), + * + * - If the font is mmap()ed, it's ok to use + * READONLY_MAY_MAKE_WRITABLE, however, using that mode + * correctly is very tricky. Use MODE_READONLY instead. + */ +typedef enum { + HB_MEMORY_MODE_DUPLICATE, + HB_MEMORY_MODE_READONLY, + HB_MEMORY_MODE_WRITABLE, + HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE +} hb_memory_mode_t; + +typedef struct hb_blob_t hb_blob_t; + +HB_EXTERN hb_blob_t * +hb_blob_create (const char *data, + unsigned int length, + hb_memory_mode_t mode, + void *user_data, + hb_destroy_func_t destroy); + +/* Always creates with MEMORY_MODE_READONLY. + * Even if the parent blob is writable, we don't + * want the user of the sub-blob to be able to + * modify the parent data as that data may be + * shared among multiple sub-blobs. + */ +HB_EXTERN hb_blob_t * +hb_blob_create_sub_blob (hb_blob_t *parent, + unsigned int offset, + unsigned int length); + +HB_EXTERN hb_blob_t * +hb_blob_get_empty (void); + +HB_EXTERN hb_blob_t * +hb_blob_reference (hb_blob_t *blob); + +HB_EXTERN void +hb_blob_destroy (hb_blob_t *blob); + +HB_EXTERN hb_bool_t +hb_blob_set_user_data (hb_blob_t *blob, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +HB_EXTERN void * +hb_blob_get_user_data (hb_blob_t *blob, + hb_user_data_key_t *key); + + +HB_EXTERN void +hb_blob_make_immutable (hb_blob_t *blob); + +HB_EXTERN hb_bool_t +hb_blob_is_immutable (hb_blob_t *blob); + + +HB_EXTERN unsigned int +hb_blob_get_length (hb_blob_t *blob); + +HB_EXTERN const char * +hb_blob_get_data (hb_blob_t *blob, unsigned int *length); + +HB_EXTERN char * +hb_blob_get_data_writable (hb_blob_t *blob, unsigned int *length); + + +HB_END_DECLS + +#endif /* HB_BLOB_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-buffer.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-buffer.h new file mode 100755 index 00000000..b2801ddf --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-buffer.h @@ -0,0 +1,544 @@ +/* + * Copyright © 1998-2004 David Turner and Werner Lemberg + * Copyright © 2004,2007,2009 Red Hat, Inc. + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Owen Taylor, Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_BUFFER_H +#define HB_BUFFER_H + +#include "hb-common.h" +#include "hb-unicode.h" +#include "hb-font.h" + +HB_BEGIN_DECLS + +/** + * hb_glyph_info_t: + * @codepoint: either a Unicode code point (before shaping) or a glyph index + * (after shaping). + * @mask: + * @cluster: the index of the character in the original text that corresponds + * to this #hb_glyph_info_t, or whatever the client passes to + * hb_buffer_add(). More than one #hb_glyph_info_t can have the same + * @cluster value, if they resulted from the same character (e.g. one + * to many glyph substitution), and when more than one character gets + * merged in the same glyph (e.g. many to one glyph substitution) the + * #hb_glyph_info_t will have the smallest cluster value of them. + * By default some characters are merged into the same cluster + * (e.g. combining marks have the same cluster as their bases) + * even if they are separate glyphs, hb_buffer_set_cluster_level() + * allow selecting more fine-grained cluster handling. + * + * The #hb_glyph_info_t is the structure that holds information about the + * glyphs and their relation to input text. + * + */ +typedef struct hb_glyph_info_t { + hb_codepoint_t codepoint; + hb_mask_t mask; /* Holds hb_glyph_flags_t after hb_shape(), plus other things. */ + uint32_t cluster; + + /*< private >*/ + hb_var_int_t var1; + hb_var_int_t var2; +} hb_glyph_info_t; + +typedef enum { /*< flags >*/ + HB_GLYPH_FLAG_UNSAFE_TO_BREAK = 0x00000001, + + HB_GLYPH_FLAG_DEFINED = 0x00000001 /* OR of all defined flags */ +} hb_glyph_flags_t; + +HB_EXTERN hb_glyph_flags_t +hb_glyph_info_get_glyph_flags (const hb_glyph_info_t *info); + +#define hb_glyph_info_get_glyph_flags(info) \ + ((hb_glyph_flags_t) ((unsigned int) (info)->mask & HB_GLYPH_FLAG_DEFINED)) + + +/** + * hb_glyph_position_t: + * @x_advance: how much the line advances after drawing this glyph when setting + * text in horizontal direction. + * @y_advance: how much the line advances after drawing this glyph when setting + * text in vertical direction. + * @x_offset: how much the glyph moves on the X-axis before drawing it, this + * should not affect how much the line advances. + * @y_offset: how much the glyph moves on the Y-axis before drawing it, this + * should not affect how much the line advances. + * + * The #hb_glyph_position_t is the structure that holds the positions of the + * glyph in both horizontal and vertical directions. All positions in + * #hb_glyph_position_t are relative to the current point. + * + */ +typedef struct hb_glyph_position_t { + hb_position_t x_advance; + hb_position_t y_advance; + hb_position_t x_offset; + hb_position_t y_offset; + + /*< private >*/ + hb_var_int_t var; +} hb_glyph_position_t; + +/** + * hb_segment_properties_t: + * @direction: the #hb_direction_t of the buffer, see hb_buffer_set_direction(). + * @script: the #hb_script_t of the buffer, see hb_buffer_set_script(). + * @language: the #hb_language_t of the buffer, see hb_buffer_set_language(). + * + * The structure that holds various text properties of an #hb_buffer_t. Can be + * set and retrieved using hb_buffer_set_segment_properties() and + * hb_buffer_get_segment_properties(), respectively. + */ +typedef struct hb_segment_properties_t { + hb_direction_t direction; + hb_script_t script; + hb_language_t language; + /*< private >*/ + void *reserved1; + void *reserved2; +} hb_segment_properties_t; + +#define HB_SEGMENT_PROPERTIES_DEFAULT {HB_DIRECTION_INVALID, \ + HB_SCRIPT_INVALID, \ + HB_LANGUAGE_INVALID, \ + (void *) 0, \ + (void *) 0} + +HB_EXTERN hb_bool_t +hb_segment_properties_equal (const hb_segment_properties_t *a, + const hb_segment_properties_t *b); + +HB_EXTERN unsigned int +hb_segment_properties_hash (const hb_segment_properties_t *p); + + + +/** + * hb_buffer_t: + * + * The main structure holding the input text and its properties before shaping, + * and output glyphs and their information after shaping. + */ + +typedef struct hb_buffer_t hb_buffer_t; + +HB_EXTERN hb_buffer_t * +hb_buffer_create (void); + +HB_EXTERN hb_buffer_t * +hb_buffer_get_empty (void); + +HB_EXTERN hb_buffer_t * +hb_buffer_reference (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_destroy (hb_buffer_t *buffer); + +HB_EXTERN hb_bool_t +hb_buffer_set_user_data (hb_buffer_t *buffer, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + +HB_EXTERN void * +hb_buffer_get_user_data (hb_buffer_t *buffer, + hb_user_data_key_t *key); + + +/** + * hb_buffer_content_type_t: + * @HB_BUFFER_CONTENT_TYPE_INVALID: Initial value for new buffer. + * @HB_BUFFER_CONTENT_TYPE_UNICODE: The buffer contains input characters (before shaping). + * @HB_BUFFER_CONTENT_TYPE_GLYPHS: The buffer contains output glyphs (after shaping). + */ +typedef enum { + HB_BUFFER_CONTENT_TYPE_INVALID = 0, + HB_BUFFER_CONTENT_TYPE_UNICODE, + HB_BUFFER_CONTENT_TYPE_GLYPHS +} hb_buffer_content_type_t; + +HB_EXTERN void +hb_buffer_set_content_type (hb_buffer_t *buffer, + hb_buffer_content_type_t content_type); + +HB_EXTERN hb_buffer_content_type_t +hb_buffer_get_content_type (hb_buffer_t *buffer); + + +HB_EXTERN void +hb_buffer_set_unicode_funcs (hb_buffer_t *buffer, + hb_unicode_funcs_t *unicode_funcs); + +HB_EXTERN hb_unicode_funcs_t * +hb_buffer_get_unicode_funcs (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_set_direction (hb_buffer_t *buffer, + hb_direction_t direction); + +HB_EXTERN hb_direction_t +hb_buffer_get_direction (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_set_script (hb_buffer_t *buffer, + hb_script_t script); + +HB_EXTERN hb_script_t +hb_buffer_get_script (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_set_language (hb_buffer_t *buffer, + hb_language_t language); + + +HB_EXTERN hb_language_t +hb_buffer_get_language (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_set_segment_properties (hb_buffer_t *buffer, + const hb_segment_properties_t *props); + +HB_EXTERN void +hb_buffer_get_segment_properties (hb_buffer_t *buffer, + hb_segment_properties_t *props); + +HB_EXTERN void +hb_buffer_guess_segment_properties (hb_buffer_t *buffer); + + +/** + * hb_buffer_flags_t: + * @HB_BUFFER_FLAG_DEFAULT: the default buffer flag. + * @HB_BUFFER_FLAG_BOT: flag indicating that special handling of the beginning + * of text paragraph can be applied to this buffer. Should usually + * be set, unless you are passing to the buffer only part + * of the text without the full context. + * @HB_BUFFER_FLAG_EOT: flag indicating that special handling of the end of text + * paragraph can be applied to this buffer, similar to + * @HB_BUFFER_FLAG_BOT. + * @HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES: + * flag indication that character with Default_Ignorable + * Unicode property should use the corresponding glyph + * from the font, instead of hiding them (done by + * replacing them with the space glyph and zeroing the + * advance width.) This flag takes precedence over + * @HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES. + * @HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES: + * flag indication that character with Default_Ignorable + * Unicode property should be removed from glyph string + * instead of hiding them (done by replacing them with the + * space glyph and zeroing the advance width.) + * @HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES takes + * precedence over this flag. Since: 1.8.0 + * + * Since: 0.9.20 + */ +typedef enum { /*< flags >*/ + HB_BUFFER_FLAG_DEFAULT = 0x00000000u, + HB_BUFFER_FLAG_BOT = 0x00000001u, /* Beginning-of-text */ + HB_BUFFER_FLAG_EOT = 0x00000002u, /* End-of-text */ + HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES = 0x00000004u, + HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES = 0x00000008u +} hb_buffer_flags_t; + +HB_EXTERN void +hb_buffer_set_flags (hb_buffer_t *buffer, + hb_buffer_flags_t flags); + +HB_EXTERN hb_buffer_flags_t +hb_buffer_get_flags (hb_buffer_t *buffer); + +/* + * Since: 0.9.42 + */ +typedef enum { + HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES = 0, + HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS = 1, + HB_BUFFER_CLUSTER_LEVEL_CHARACTERS = 2, + HB_BUFFER_CLUSTER_LEVEL_DEFAULT = HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES +} hb_buffer_cluster_level_t; + +HB_EXTERN void +hb_buffer_set_cluster_level (hb_buffer_t *buffer, + hb_buffer_cluster_level_t cluster_level); + +HB_EXTERN hb_buffer_cluster_level_t +hb_buffer_get_cluster_level (hb_buffer_t *buffer); + +/** + * HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT: + * + * The default code point for replacing invalid characters in a given encoding. + * Set to U+FFFD REPLACEMENT CHARACTER. + * + * Since: 0.9.31 + */ +#define HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT 0xFFFDu + +HB_EXTERN void +hb_buffer_set_replacement_codepoint (hb_buffer_t *buffer, + hb_codepoint_t replacement); + +HB_EXTERN hb_codepoint_t +hb_buffer_get_replacement_codepoint (hb_buffer_t *buffer); + + +HB_EXTERN void +hb_buffer_reset (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_clear_contents (hb_buffer_t *buffer); + +HB_EXTERN hb_bool_t +hb_buffer_pre_allocate (hb_buffer_t *buffer, + unsigned int size); + + +HB_EXTERN hb_bool_t +hb_buffer_allocation_successful (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_reverse (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_reverse_range (hb_buffer_t *buffer, + unsigned int start, unsigned int end); + +HB_EXTERN void +hb_buffer_reverse_clusters (hb_buffer_t *buffer); + + +/* Filling the buffer in */ + +HB_EXTERN void +hb_buffer_add (hb_buffer_t *buffer, + hb_codepoint_t codepoint, + unsigned int cluster); + +HB_EXTERN void +hb_buffer_add_utf8 (hb_buffer_t *buffer, + const char *text, + int text_length, + unsigned int item_offset, + int item_length); + +HB_EXTERN void +hb_buffer_add_utf16 (hb_buffer_t *buffer, + const uint16_t *text, + int text_length, + unsigned int item_offset, + int item_length); + +HB_EXTERN void +hb_buffer_add_utf32 (hb_buffer_t *buffer, + const uint32_t *text, + int text_length, + unsigned int item_offset, + int item_length); + +HB_EXTERN void +hb_buffer_add_latin1 (hb_buffer_t *buffer, + const uint8_t *text, + int text_length, + unsigned int item_offset, + int item_length); + +HB_EXTERN void +hb_buffer_add_codepoints (hb_buffer_t *buffer, + const hb_codepoint_t *text, + int text_length, + unsigned int item_offset, + int item_length); + +HB_EXTERN void +hb_buffer_append (hb_buffer_t *buffer, + hb_buffer_t *source, + unsigned int start, + unsigned int end); + +HB_EXTERN hb_bool_t +hb_buffer_set_length (hb_buffer_t *buffer, + unsigned int length); + +HB_EXTERN unsigned int +hb_buffer_get_length (hb_buffer_t *buffer); + +/* Getting glyphs out of the buffer */ + +HB_EXTERN hb_glyph_info_t * +hb_buffer_get_glyph_infos (hb_buffer_t *buffer, + unsigned int *length); + +HB_EXTERN hb_glyph_position_t * +hb_buffer_get_glyph_positions (hb_buffer_t *buffer, + unsigned int *length); + + +HB_EXTERN void +hb_buffer_normalize_glyphs (hb_buffer_t *buffer); + + +/* + * Serialize + */ + +/** + * hb_buffer_serialize_flags_t: + * @HB_BUFFER_SERIALIZE_FLAG_DEFAULT: serialize glyph names, clusters and positions. + * @HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS: do not serialize glyph cluster. + * @HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS: do not serialize glyph position information. + * @HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES: do no serialize glyph name. + * @HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS: serialize glyph extents. + * @HB_BUFFER_SERIALIZE_FLAG_GLYPH_FLAGS: serialize glyph flags. Since: 1.5.0 + * @HB_BUFFER_SERIALIZE_FLAG_NO_ADVANCES: do not serialize glyph advances, + * glyph offsets will reflect absolute glyph positions. Since: 1.8.0 + * + * Flags that control what glyph information are serialized in hb_buffer_serialize_glyphs(). + * + * Since: 0.9.20 + */ +typedef enum { /*< flags >*/ + HB_BUFFER_SERIALIZE_FLAG_DEFAULT = 0x00000000u, + HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS = 0x00000001u, + HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS = 0x00000002u, + HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES = 0x00000004u, + HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS = 0x00000008u, + HB_BUFFER_SERIALIZE_FLAG_GLYPH_FLAGS = 0x00000010u, + HB_BUFFER_SERIALIZE_FLAG_NO_ADVANCES = 0x00000020u +} hb_buffer_serialize_flags_t; + +/** + * hb_buffer_serialize_format_t: + * @HB_BUFFER_SERIALIZE_FORMAT_TEXT: a human-readable, plain text format. + * @HB_BUFFER_SERIALIZE_FORMAT_JSON: a machine-readable JSON format. + * @HB_BUFFER_SERIALIZE_FORMAT_INVALID: invalid format. + * + * The buffer serialization and de-serialization format used in + * hb_buffer_serialize_glyphs() and hb_buffer_deserialize_glyphs(). + * + * Since: 0.9.2 + */ +typedef enum { + HB_BUFFER_SERIALIZE_FORMAT_TEXT = HB_TAG('T','E','X','T'), + HB_BUFFER_SERIALIZE_FORMAT_JSON = HB_TAG('J','S','O','N'), + HB_BUFFER_SERIALIZE_FORMAT_INVALID = HB_TAG_NONE +} hb_buffer_serialize_format_t; + +HB_EXTERN hb_buffer_serialize_format_t +hb_buffer_serialize_format_from_string (const char *str, int len); + +HB_EXTERN const char * +hb_buffer_serialize_format_to_string (hb_buffer_serialize_format_t format); + +HB_EXTERN const char ** +hb_buffer_serialize_list_formats (void); + +HB_EXTERN unsigned int +hb_buffer_serialize_glyphs (hb_buffer_t *buffer, + unsigned int start, + unsigned int end, + char *buf, + unsigned int buf_size, + unsigned int *buf_consumed, + hb_font_t *font, + hb_buffer_serialize_format_t format, + hb_buffer_serialize_flags_t flags); + +HB_EXTERN hb_bool_t +hb_buffer_deserialize_glyphs (hb_buffer_t *buffer, + const char *buf, + int buf_len, + const char **end_ptr, + hb_font_t *font, + hb_buffer_serialize_format_t format); + + +/* + * Compare buffers + */ + +typedef enum { /*< flags >*/ + HB_BUFFER_DIFF_FLAG_EQUAL = 0x0000, + + /* Buffers with different content_type cannot be meaningfully compared + * in any further detail. */ + HB_BUFFER_DIFF_FLAG_CONTENT_TYPE_MISMATCH = 0x0001, + + /* For buffers with differing length, the per-glyph comparison is not + * attempted, though we do still scan reference for dottedcircle / .notdef + * glyphs. */ + HB_BUFFER_DIFF_FLAG_LENGTH_MISMATCH = 0x0002, + + /* We want to know if dottedcircle / .notdef glyphs are present in the + * reference, as we may not care so much about other differences in this + * case. */ + HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT = 0x0004, + HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT = 0x0008, + + /* If the buffers have the same length, we compare them glyph-by-glyph + * and report which aspect(s) of the glyph info/position are different. */ + HB_BUFFER_DIFF_FLAG_CODEPOINT_MISMATCH = 0x0010, + HB_BUFFER_DIFF_FLAG_CLUSTER_MISMATCH = 0x0020, + HB_BUFFER_DIFF_FLAG_GLYPH_FLAGS_MISMATCH = 0x0040, + HB_BUFFER_DIFF_FLAG_POSITION_MISMATCH = 0x0080 + +} hb_buffer_diff_flags_t; + +/* Compare the contents of two buffers, report types of differences. */ +HB_EXTERN hb_buffer_diff_flags_t +hb_buffer_diff (hb_buffer_t *buffer, + hb_buffer_t *reference, + hb_codepoint_t dottedcircle_glyph, + unsigned int position_fuzz); + + +/* + * Debugging. + */ + +typedef hb_bool_t (*hb_buffer_message_func_t) (hb_buffer_t *buffer, + hb_font_t *font, + const char *message, + void *user_data); + +HB_EXTERN void +hb_buffer_set_message_func (hb_buffer_t *buffer, + hb_buffer_message_func_t func, + void *user_data, hb_destroy_func_t destroy); + + +HB_END_DECLS + +#endif /* HB_BUFFER_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-common.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-common.h new file mode 100755 index 00000000..26200ce1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-common.h @@ -0,0 +1,397 @@ +/* + * Copyright © 2007,2008,2009 Red Hat, Inc. + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_COMMON_H +#define HB_COMMON_H + +#ifndef HB_BEGIN_DECLS +# ifdef __cplusplus +# define HB_BEGIN_DECLS extern "C" { +# define HB_END_DECLS } +# else /* !__cplusplus */ +# define HB_BEGIN_DECLS +# define HB_END_DECLS +# endif /* !__cplusplus */ +#endif + +#if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || \ + defined (_sgi) || defined (__sun) || defined (sun) || \ + defined (__digital__) || defined (__HP_cc) +# include <inttypes.h> +#elif defined (_AIX) +# include <sys/inttypes.h> +#else +# include <stdint.h> +#endif + +HB_BEGIN_DECLS + + +typedef int hb_bool_t; + +typedef uint32_t hb_codepoint_t; +typedef int32_t hb_position_t; +typedef uint32_t hb_mask_t; + +typedef union _hb_var_int_t { + uint32_t u32; + int32_t i32; + uint16_t u16[2]; + int16_t i16[2]; + uint8_t u8[4]; + int8_t i8[4]; +} hb_var_int_t; + + +/* hb_tag_t */ + +typedef uint32_t hb_tag_t; + +#define HB_TAG(c1,c2,c3,c4) ((hb_tag_t)((((uint8_t)(c1))<<24)|(((uint8_t)(c2))<<16)|(((uint8_t)(c3))<<8)|((uint8_t)(c4)))) +#define HB_UNTAG(tag) ((uint8_t)((tag)>>24)), ((uint8_t)((tag)>>16)), ((uint8_t)((tag)>>8)), ((uint8_t)(tag)) + +#define HB_TAG_NONE HB_TAG(0,0,0,0) +#define HB_TAG_MAX HB_TAG(0xff,0xff,0xff,0xff) +#define HB_TAG_MAX_SIGNED HB_TAG(0x7f,0xff,0xff,0xff) + +/* len=-1 means str is NUL-terminated. */ +HB_EXTERN hb_tag_t +hb_tag_from_string (const char *str, int len); + +/* buf should have 4 bytes. */ +HB_EXTERN void +hb_tag_to_string (hb_tag_t tag, char *buf); + + +/** + * hb_direction_t: + * @HB_DIRECTION_INVALID: Initial, unset direction. + * @HB_DIRECTION_LTR: Text is set horizontally from left to right. + * @HB_DIRECTION_RTL: Text is set horizontally from right to left. + * @HB_DIRECTION_TTB: Text is set vertically from top to bottom. + * @HB_DIRECTION_BTT: Text is set vertically from bottom to top. + */ +typedef enum { + HB_DIRECTION_INVALID = 0, + HB_DIRECTION_LTR = 4, + HB_DIRECTION_RTL, + HB_DIRECTION_TTB, + HB_DIRECTION_BTT +} hb_direction_t; + +/* len=-1 means str is NUL-terminated */ +HB_EXTERN hb_direction_t +hb_direction_from_string (const char *str, int len); + +HB_EXTERN const char * +hb_direction_to_string (hb_direction_t direction); + +#define HB_DIRECTION_IS_VALID(dir) ((((unsigned int) (dir)) & ~3U) == 4) +/* Direction must be valid for the following */ +#define HB_DIRECTION_IS_HORIZONTAL(dir) ((((unsigned int) (dir)) & ~1U) == 4) +#define HB_DIRECTION_IS_VERTICAL(dir) ((((unsigned int) (dir)) & ~1U) == 6) +#define HB_DIRECTION_IS_FORWARD(dir) ((((unsigned int) (dir)) & ~2U) == 4) +#define HB_DIRECTION_IS_BACKWARD(dir) ((((unsigned int) (dir)) & ~2U) == 5) +#define HB_DIRECTION_REVERSE(dir) ((hb_direction_t) (((unsigned int) (dir)) ^ 1)) + + +/* hb_language_t */ + +typedef const struct hb_language_impl_t *hb_language_t; + +HB_EXTERN hb_language_t +hb_language_from_string (const char *str, int len); + +HB_EXTERN const char * +hb_language_to_string (hb_language_t language); + +#define HB_LANGUAGE_INVALID ((hb_language_t) 0) + +HB_EXTERN hb_language_t +hb_language_get_default (void); + + +/* hb_script_t */ + +/* http://unicode.org/iso15924/ */ +/* http://goo.gl/x9ilM */ +/* Unicode Character Database property: Script (sc) */ +typedef enum +{ + /*1.1*/ HB_SCRIPT_COMMON = HB_TAG ('Z','y','y','y'), + /*1.1*/ HB_SCRIPT_INHERITED = HB_TAG ('Z','i','n','h'), + /*5.0*/ HB_SCRIPT_UNKNOWN = HB_TAG ('Z','z','z','z'), + + /*1.1*/ HB_SCRIPT_ARABIC = HB_TAG ('A','r','a','b'), + /*1.1*/ HB_SCRIPT_ARMENIAN = HB_TAG ('A','r','m','n'), + /*1.1*/ HB_SCRIPT_BENGALI = HB_TAG ('B','e','n','g'), + /*1.1*/ HB_SCRIPT_CYRILLIC = HB_TAG ('C','y','r','l'), + /*1.1*/ HB_SCRIPT_DEVANAGARI = HB_TAG ('D','e','v','a'), + /*1.1*/ HB_SCRIPT_GEORGIAN = HB_TAG ('G','e','o','r'), + /*1.1*/ HB_SCRIPT_GREEK = HB_TAG ('G','r','e','k'), + /*1.1*/ HB_SCRIPT_GUJARATI = HB_TAG ('G','u','j','r'), + /*1.1*/ HB_SCRIPT_GURMUKHI = HB_TAG ('G','u','r','u'), + /*1.1*/ HB_SCRIPT_HANGUL = HB_TAG ('H','a','n','g'), + /*1.1*/ HB_SCRIPT_HAN = HB_TAG ('H','a','n','i'), + /*1.1*/ HB_SCRIPT_HEBREW = HB_TAG ('H','e','b','r'), + /*1.1*/ HB_SCRIPT_HIRAGANA = HB_TAG ('H','i','r','a'), + /*1.1*/ HB_SCRIPT_KANNADA = HB_TAG ('K','n','d','a'), + /*1.1*/ HB_SCRIPT_KATAKANA = HB_TAG ('K','a','n','a'), + /*1.1*/ HB_SCRIPT_LAO = HB_TAG ('L','a','o','o'), + /*1.1*/ HB_SCRIPT_LATIN = HB_TAG ('L','a','t','n'), + /*1.1*/ HB_SCRIPT_MALAYALAM = HB_TAG ('M','l','y','m'), + /*1.1*/ HB_SCRIPT_ORIYA = HB_TAG ('O','r','y','a'), + /*1.1*/ HB_SCRIPT_TAMIL = HB_TAG ('T','a','m','l'), + /*1.1*/ HB_SCRIPT_TELUGU = HB_TAG ('T','e','l','u'), + /*1.1*/ HB_SCRIPT_THAI = HB_TAG ('T','h','a','i'), + + /*2.0*/ HB_SCRIPT_TIBETAN = HB_TAG ('T','i','b','t'), + + /*3.0*/ HB_SCRIPT_BOPOMOFO = HB_TAG ('B','o','p','o'), + /*3.0*/ HB_SCRIPT_BRAILLE = HB_TAG ('B','r','a','i'), + /*3.0*/ HB_SCRIPT_CANADIAN_SYLLABICS = HB_TAG ('C','a','n','s'), + /*3.0*/ HB_SCRIPT_CHEROKEE = HB_TAG ('C','h','e','r'), + /*3.0*/ HB_SCRIPT_ETHIOPIC = HB_TAG ('E','t','h','i'), + /*3.0*/ HB_SCRIPT_KHMER = HB_TAG ('K','h','m','r'), + /*3.0*/ HB_SCRIPT_MONGOLIAN = HB_TAG ('M','o','n','g'), + /*3.0*/ HB_SCRIPT_MYANMAR = HB_TAG ('M','y','m','r'), + /*3.0*/ HB_SCRIPT_OGHAM = HB_TAG ('O','g','a','m'), + /*3.0*/ HB_SCRIPT_RUNIC = HB_TAG ('R','u','n','r'), + /*3.0*/ HB_SCRIPT_SINHALA = HB_TAG ('S','i','n','h'), + /*3.0*/ HB_SCRIPT_SYRIAC = HB_TAG ('S','y','r','c'), + /*3.0*/ HB_SCRIPT_THAANA = HB_TAG ('T','h','a','a'), + /*3.0*/ HB_SCRIPT_YI = HB_TAG ('Y','i','i','i'), + + /*3.1*/ HB_SCRIPT_DESERET = HB_TAG ('D','s','r','t'), + /*3.1*/ HB_SCRIPT_GOTHIC = HB_TAG ('G','o','t','h'), + /*3.1*/ HB_SCRIPT_OLD_ITALIC = HB_TAG ('I','t','a','l'), + + /*3.2*/ HB_SCRIPT_BUHID = HB_TAG ('B','u','h','d'), + /*3.2*/ HB_SCRIPT_HANUNOO = HB_TAG ('H','a','n','o'), + /*3.2*/ HB_SCRIPT_TAGALOG = HB_TAG ('T','g','l','g'), + /*3.2*/ HB_SCRIPT_TAGBANWA = HB_TAG ('T','a','g','b'), + + /*4.0*/ HB_SCRIPT_CYPRIOT = HB_TAG ('C','p','r','t'), + /*4.0*/ HB_SCRIPT_LIMBU = HB_TAG ('L','i','m','b'), + /*4.0*/ HB_SCRIPT_LINEAR_B = HB_TAG ('L','i','n','b'), + /*4.0*/ HB_SCRIPT_OSMANYA = HB_TAG ('O','s','m','a'), + /*4.0*/ HB_SCRIPT_SHAVIAN = HB_TAG ('S','h','a','w'), + /*4.0*/ HB_SCRIPT_TAI_LE = HB_TAG ('T','a','l','e'), + /*4.0*/ HB_SCRIPT_UGARITIC = HB_TAG ('U','g','a','r'), + + /*4.1*/ HB_SCRIPT_BUGINESE = HB_TAG ('B','u','g','i'), + /*4.1*/ HB_SCRIPT_COPTIC = HB_TAG ('C','o','p','t'), + /*4.1*/ HB_SCRIPT_GLAGOLITIC = HB_TAG ('G','l','a','g'), + /*4.1*/ HB_SCRIPT_KHAROSHTHI = HB_TAG ('K','h','a','r'), + /*4.1*/ HB_SCRIPT_NEW_TAI_LUE = HB_TAG ('T','a','l','u'), + /*4.1*/ HB_SCRIPT_OLD_PERSIAN = HB_TAG ('X','p','e','o'), + /*4.1*/ HB_SCRIPT_SYLOTI_NAGRI = HB_TAG ('S','y','l','o'), + /*4.1*/ HB_SCRIPT_TIFINAGH = HB_TAG ('T','f','n','g'), + + /*5.0*/ HB_SCRIPT_BALINESE = HB_TAG ('B','a','l','i'), + /*5.0*/ HB_SCRIPT_CUNEIFORM = HB_TAG ('X','s','u','x'), + /*5.0*/ HB_SCRIPT_NKO = HB_TAG ('N','k','o','o'), + /*5.0*/ HB_SCRIPT_PHAGS_PA = HB_TAG ('P','h','a','g'), + /*5.0*/ HB_SCRIPT_PHOENICIAN = HB_TAG ('P','h','n','x'), + + /*5.1*/ HB_SCRIPT_CARIAN = HB_TAG ('C','a','r','i'), + /*5.1*/ HB_SCRIPT_CHAM = HB_TAG ('C','h','a','m'), + /*5.1*/ HB_SCRIPT_KAYAH_LI = HB_TAG ('K','a','l','i'), + /*5.1*/ HB_SCRIPT_LEPCHA = HB_TAG ('L','e','p','c'), + /*5.1*/ HB_SCRIPT_LYCIAN = HB_TAG ('L','y','c','i'), + /*5.1*/ HB_SCRIPT_LYDIAN = HB_TAG ('L','y','d','i'), + /*5.1*/ HB_SCRIPT_OL_CHIKI = HB_TAG ('O','l','c','k'), + /*5.1*/ HB_SCRIPT_REJANG = HB_TAG ('R','j','n','g'), + /*5.1*/ HB_SCRIPT_SAURASHTRA = HB_TAG ('S','a','u','r'), + /*5.1*/ HB_SCRIPT_SUNDANESE = HB_TAG ('S','u','n','d'), + /*5.1*/ HB_SCRIPT_VAI = HB_TAG ('V','a','i','i'), + + /*5.2*/ HB_SCRIPT_AVESTAN = HB_TAG ('A','v','s','t'), + /*5.2*/ HB_SCRIPT_BAMUM = HB_TAG ('B','a','m','u'), + /*5.2*/ HB_SCRIPT_EGYPTIAN_HIEROGLYPHS = HB_TAG ('E','g','y','p'), + /*5.2*/ HB_SCRIPT_IMPERIAL_ARAMAIC = HB_TAG ('A','r','m','i'), + /*5.2*/ HB_SCRIPT_INSCRIPTIONAL_PAHLAVI = HB_TAG ('P','h','l','i'), + /*5.2*/ HB_SCRIPT_INSCRIPTIONAL_PARTHIAN = HB_TAG ('P','r','t','i'), + /*5.2*/ HB_SCRIPT_JAVANESE = HB_TAG ('J','a','v','a'), + /*5.2*/ HB_SCRIPT_KAITHI = HB_TAG ('K','t','h','i'), + /*5.2*/ HB_SCRIPT_LISU = HB_TAG ('L','i','s','u'), + /*5.2*/ HB_SCRIPT_MEETEI_MAYEK = HB_TAG ('M','t','e','i'), + /*5.2*/ HB_SCRIPT_OLD_SOUTH_ARABIAN = HB_TAG ('S','a','r','b'), + /*5.2*/ HB_SCRIPT_OLD_TURKIC = HB_TAG ('O','r','k','h'), + /*5.2*/ HB_SCRIPT_SAMARITAN = HB_TAG ('S','a','m','r'), + /*5.2*/ HB_SCRIPT_TAI_THAM = HB_TAG ('L','a','n','a'), + /*5.2*/ HB_SCRIPT_TAI_VIET = HB_TAG ('T','a','v','t'), + + /*6.0*/ HB_SCRIPT_BATAK = HB_TAG ('B','a','t','k'), + /*6.0*/ HB_SCRIPT_BRAHMI = HB_TAG ('B','r','a','h'), + /*6.0*/ HB_SCRIPT_MANDAIC = HB_TAG ('M','a','n','d'), + + /*6.1*/ HB_SCRIPT_CHAKMA = HB_TAG ('C','a','k','m'), + /*6.1*/ HB_SCRIPT_MEROITIC_CURSIVE = HB_TAG ('M','e','r','c'), + /*6.1*/ HB_SCRIPT_MEROITIC_HIEROGLYPHS = HB_TAG ('M','e','r','o'), + /*6.1*/ HB_SCRIPT_MIAO = HB_TAG ('P','l','r','d'), + /*6.1*/ HB_SCRIPT_SHARADA = HB_TAG ('S','h','r','d'), + /*6.1*/ HB_SCRIPT_SORA_SOMPENG = HB_TAG ('S','o','r','a'), + /*6.1*/ HB_SCRIPT_TAKRI = HB_TAG ('T','a','k','r'), + + /* + * Since: 0.9.30 + */ + /*7.0*/ HB_SCRIPT_BASSA_VAH = HB_TAG ('B','a','s','s'), + /*7.0*/ HB_SCRIPT_CAUCASIAN_ALBANIAN = HB_TAG ('A','g','h','b'), + /*7.0*/ HB_SCRIPT_DUPLOYAN = HB_TAG ('D','u','p','l'), + /*7.0*/ HB_SCRIPT_ELBASAN = HB_TAG ('E','l','b','a'), + /*7.0*/ HB_SCRIPT_GRANTHA = HB_TAG ('G','r','a','n'), + /*7.0*/ HB_SCRIPT_KHOJKI = HB_TAG ('K','h','o','j'), + /*7.0*/ HB_SCRIPT_KHUDAWADI = HB_TAG ('S','i','n','d'), + /*7.0*/ HB_SCRIPT_LINEAR_A = HB_TAG ('L','i','n','a'), + /*7.0*/ HB_SCRIPT_MAHAJANI = HB_TAG ('M','a','h','j'), + /*7.0*/ HB_SCRIPT_MANICHAEAN = HB_TAG ('M','a','n','i'), + /*7.0*/ HB_SCRIPT_MENDE_KIKAKUI = HB_TAG ('M','e','n','d'), + /*7.0*/ HB_SCRIPT_MODI = HB_TAG ('M','o','d','i'), + /*7.0*/ HB_SCRIPT_MRO = HB_TAG ('M','r','o','o'), + /*7.0*/ HB_SCRIPT_NABATAEAN = HB_TAG ('N','b','a','t'), + /*7.0*/ HB_SCRIPT_OLD_NORTH_ARABIAN = HB_TAG ('N','a','r','b'), + /*7.0*/ HB_SCRIPT_OLD_PERMIC = HB_TAG ('P','e','r','m'), + /*7.0*/ HB_SCRIPT_PAHAWH_HMONG = HB_TAG ('H','m','n','g'), + /*7.0*/ HB_SCRIPT_PALMYRENE = HB_TAG ('P','a','l','m'), + /*7.0*/ HB_SCRIPT_PAU_CIN_HAU = HB_TAG ('P','a','u','c'), + /*7.0*/ HB_SCRIPT_PSALTER_PAHLAVI = HB_TAG ('P','h','l','p'), + /*7.0*/ HB_SCRIPT_SIDDHAM = HB_TAG ('S','i','d','d'), + /*7.0*/ HB_SCRIPT_TIRHUTA = HB_TAG ('T','i','r','h'), + /*7.0*/ HB_SCRIPT_WARANG_CITI = HB_TAG ('W','a','r','a'), + + /*8.0*/ HB_SCRIPT_AHOM = HB_TAG ('A','h','o','m'), + /*8.0*/ HB_SCRIPT_ANATOLIAN_HIEROGLYPHS = HB_TAG ('H','l','u','w'), + /*8.0*/ HB_SCRIPT_HATRAN = HB_TAG ('H','a','t','r'), + /*8.0*/ HB_SCRIPT_MULTANI = HB_TAG ('M','u','l','t'), + /*8.0*/ HB_SCRIPT_OLD_HUNGARIAN = HB_TAG ('H','u','n','g'), + /*8.0*/ HB_SCRIPT_SIGNWRITING = HB_TAG ('S','g','n','w'), + + /* + * Since 1.3.0 + */ + /*9.0*/ HB_SCRIPT_ADLAM = HB_TAG ('A','d','l','m'), + /*9.0*/ HB_SCRIPT_BHAIKSUKI = HB_TAG ('B','h','k','s'), + /*9.0*/ HB_SCRIPT_MARCHEN = HB_TAG ('M','a','r','c'), + /*9.0*/ HB_SCRIPT_OSAGE = HB_TAG ('O','s','g','e'), + /*9.0*/ HB_SCRIPT_TANGUT = HB_TAG ('T','a','n','g'), + /*9.0*/ HB_SCRIPT_NEWA = HB_TAG ('N','e','w','a'), + + /* + * Since 1.6.0 + */ + /*10.0*/HB_SCRIPT_MASARAM_GONDI = HB_TAG ('G','o','n','m'), + /*10.0*/HB_SCRIPT_NUSHU = HB_TAG ('N','s','h','u'), + /*10.0*/HB_SCRIPT_SOYOMBO = HB_TAG ('S','o','y','o'), + /*10.0*/HB_SCRIPT_ZANABAZAR_SQUARE = HB_TAG ('Z','a','n','b'), + + /* No script set. */ + HB_SCRIPT_INVALID = HB_TAG_NONE, + + /* Dummy values to ensure any hb_tag_t value can be passed/stored as hb_script_t + * without risking undefined behavior. Include both a signed and unsigned max, + * since technically enums are int, and indeed, hb_script_t ends up being signed. + * See this thread for technicalities: + * + * http://lists.freedesktop.org/archives/harfbuzz/2014-March/004150.html + */ + _HB_SCRIPT_MAX_VALUE = HB_TAG_MAX, /*< skip >*/ + _HB_SCRIPT_MAX_VALUE_SIGNED = HB_TAG_MAX_SIGNED /*< skip >*/ + +} hb_script_t; + + +/* Script functions */ + +HB_EXTERN hb_script_t +hb_script_from_iso15924_tag (hb_tag_t tag); + +HB_EXTERN hb_script_t +hb_script_from_string (const char *str, int len); + +HB_EXTERN hb_tag_t +hb_script_to_iso15924_tag (hb_script_t script); + +HB_EXTERN hb_direction_t +hb_script_get_horizontal_direction (hb_script_t script); + + +/* User data */ + +typedef struct hb_user_data_key_t { + /*< private >*/ + char unused; +} hb_user_data_key_t; + +typedef void (*hb_destroy_func_t) (void *user_data); + + +/* Font features and variations. */ + +typedef struct hb_feature_t { + hb_tag_t tag; + uint32_t value; + unsigned int start; + unsigned int end; +} hb_feature_t; + +HB_EXTERN hb_bool_t +hb_feature_from_string (const char *str, int len, + hb_feature_t *feature); + +HB_EXTERN void +hb_feature_to_string (hb_feature_t *feature, + char *buf, unsigned int size); + +/** + * hb_variation_t: + * + * Since: 1.4.2 + */ +typedef struct hb_variation_t { + hb_tag_t tag; + float value; +} hb_variation_t; + +HB_EXTERN hb_bool_t +hb_variation_from_string (const char *str, int len, + hb_variation_t *variation); + +HB_EXTERN void +hb_variation_to_string (hb_variation_t *variation, + char *buf, unsigned int size); + + +HB_END_DECLS + +#endif /* HB_COMMON_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-coretext.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-coretext.h new file mode 100755 index 00000000..4b0a6f01 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-coretext.h @@ -0,0 +1,64 @@ +/* + * Copyright © 2012 Mozilla Foundation. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Mozilla Author(s): Jonathan Kew + */ + +#ifndef HB_CORETEXT_H +#define HB_CORETEXT_H + +#include "hb.h" + +#include <TargetConditionals.h> +#if TARGET_OS_IPHONE +# include <CoreText/CoreText.h> +# include <CoreGraphics/CoreGraphics.h> +#else +# include <ApplicationServices/ApplicationServices.h> +#endif + +HB_BEGIN_DECLS + + +#define HB_CORETEXT_TAG_MORT HB_TAG('m','o','r','t') +#define HB_CORETEXT_TAG_MORX HB_TAG('m','o','r','x') +#define HB_CORETEXT_TAG_KERX HB_TAG('k','e','r','x') + + +HB_EXTERN hb_face_t * +hb_coretext_face_create (CGFontRef cg_font); + +HB_EXTERN hb_font_t * +hb_coretext_font_create (CTFontRef ct_font); + + +HB_EXTERN CGFontRef +hb_coretext_face_get_cg_font (hb_face_t *face); + +HB_EXTERN CTFontRef +hb_coretext_font_get_ct_font (hb_font_t *font); + + +HB_END_DECLS + +#endif /* HB_CORETEXT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-deprecated.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-deprecated.h new file mode 100755 index 00000000..eac7efb4 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-deprecated.h @@ -0,0 +1,65 @@ +/* + * Copyright © 2013 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_DEPRECATED_H +#define HB_DEPRECATED_H + +#include "hb-common.h" +#include "hb-unicode.h" +#include "hb-font.h" +#include "hb-set.h" + +HB_BEGIN_DECLS + +#ifndef HB_DISABLE_DEPRECATED + +#define HB_SCRIPT_CANADIAN_ABORIGINAL HB_SCRIPT_CANADIAN_SYLLABICS + +#define HB_BUFFER_FLAGS_DEFAULT HB_BUFFER_FLAG_DEFAULT +#define HB_BUFFER_SERIALIZE_FLAGS_DEFAULT HB_BUFFER_SERIALIZE_FLAG_DEFAULT + +typedef hb_bool_t (*hb_font_get_glyph_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t unicode, hb_codepoint_t variation_selector, + hb_codepoint_t *glyph, + void *user_data); + +HB_EXTERN void +hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_func_t func, + void *user_data, hb_destroy_func_t destroy); + +HB_EXTERN void +hb_set_invert (hb_set_t *set); + +#endif + +HB_END_DECLS + +#endif /* HB_DEPRECATED_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-face.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-face.h new file mode 100755 index 00000000..9842d52b --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-face.h @@ -0,0 +1,122 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_FACE_H +#define HB_FACE_H + +#include "hb-common.h" +#include "hb-blob.h" + +HB_BEGIN_DECLS + + +/* + * hb_face_t + */ + +typedef struct hb_face_t hb_face_t; + +HB_EXTERN hb_face_t * +hb_face_create (hb_blob_t *blob, + unsigned int index); + +typedef hb_blob_t * (*hb_reference_table_func_t) (hb_face_t *face, hb_tag_t tag, void *user_data); + +/* calls destroy() when not needing user_data anymore */ +HB_EXTERN hb_face_t * +hb_face_create_for_tables (hb_reference_table_func_t reference_table_func, + void *user_data, + hb_destroy_func_t destroy); + +HB_EXTERN hb_face_t * +hb_face_get_empty (void); + +HB_EXTERN hb_face_t * +hb_face_reference (hb_face_t *face); + +HB_EXTERN void +hb_face_destroy (hb_face_t *face); + +HB_EXTERN hb_bool_t +hb_face_set_user_data (hb_face_t *face, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +HB_EXTERN void * +hb_face_get_user_data (hb_face_t *face, + hb_user_data_key_t *key); + +HB_EXTERN void +hb_face_make_immutable (hb_face_t *face); + +HB_EXTERN hb_bool_t +hb_face_is_immutable (hb_face_t *face); + + +HB_EXTERN hb_blob_t * +hb_face_reference_table (hb_face_t *face, + hb_tag_t tag); + +HB_EXTERN hb_blob_t * +hb_face_reference_blob (hb_face_t *face); + +HB_EXTERN void +hb_face_set_index (hb_face_t *face, + unsigned int index); + +HB_EXTERN unsigned int +hb_face_get_index (hb_face_t *face); + +HB_EXTERN void +hb_face_set_upem (hb_face_t *face, + unsigned int upem); + +HB_EXTERN unsigned int +hb_face_get_upem (hb_face_t *face); + +HB_EXTERN void +hb_face_set_glyph_count (hb_face_t *face, + unsigned int glyph_count); + +HB_EXTERN unsigned int +hb_face_get_glyph_count (hb_face_t *face); + +HB_EXTERN unsigned int +hb_face_get_table_tags (hb_face_t *face, + unsigned int start_offset, + unsigned int *table_count, /* IN/OUT */ + hb_tag_t *table_tags /* OUT */); + +HB_END_DECLS + +#endif /* HB_FACE_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-font.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-font.h new file mode 100755 index 00000000..c95b61d2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-font.h @@ -0,0 +1,641 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_FONT_H +#define HB_FONT_H + +#include "hb-common.h" +#include "hb-face.h" + +HB_BEGIN_DECLS + + +typedef struct hb_font_t hb_font_t; + + +/* + * hb_font_funcs_t + */ + +typedef struct hb_font_funcs_t hb_font_funcs_t; + +HB_EXTERN hb_font_funcs_t * +hb_font_funcs_create (void); + +HB_EXTERN hb_font_funcs_t * +hb_font_funcs_get_empty (void); + +HB_EXTERN hb_font_funcs_t * +hb_font_funcs_reference (hb_font_funcs_t *ffuncs); + +HB_EXTERN void +hb_font_funcs_destroy (hb_font_funcs_t *ffuncs); + +HB_EXTERN hb_bool_t +hb_font_funcs_set_user_data (hb_font_funcs_t *ffuncs, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +HB_EXTERN void * +hb_font_funcs_get_user_data (hb_font_funcs_t *ffuncs, + hb_user_data_key_t *key); + + +HB_EXTERN void +hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs); + +HB_EXTERN hb_bool_t +hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs); + + +/* font and glyph extents */ + +/* Note that typically ascender is positive and descender negative in coordinate systems that grow up. */ +typedef struct hb_font_extents_t +{ + hb_position_t ascender; /* typographic ascender. */ + hb_position_t descender; /* typographic descender. */ + hb_position_t line_gap; /* suggested line spacing gap. */ + /*< private >*/ + hb_position_t reserved9; + hb_position_t reserved8; + hb_position_t reserved7; + hb_position_t reserved6; + hb_position_t reserved5; + hb_position_t reserved4; + hb_position_t reserved3; + hb_position_t reserved2; + hb_position_t reserved1; +} hb_font_extents_t; + +/* Note that height is negative in coordinate systems that grow up. */ +typedef struct hb_glyph_extents_t +{ + hb_position_t x_bearing; /* left side of glyph from origin. */ + hb_position_t y_bearing; /* top side of glyph from origin. */ + hb_position_t width; /* distance from left to right side. */ + hb_position_t height; /* distance from top to bottom side. */ +} hb_glyph_extents_t; + +/* func types */ + +typedef hb_bool_t (*hb_font_get_font_extents_func_t) (hb_font_t *font, void *font_data, + hb_font_extents_t *metrics, + void *user_data); +typedef hb_font_get_font_extents_func_t hb_font_get_font_h_extents_func_t; +typedef hb_font_get_font_extents_func_t hb_font_get_font_v_extents_func_t; + + +typedef hb_bool_t (*hb_font_get_nominal_glyph_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t unicode, + hb_codepoint_t *glyph, + void *user_data); +typedef hb_bool_t (*hb_font_get_variation_glyph_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t unicode, hb_codepoint_t variation_selector, + hb_codepoint_t *glyph, + void *user_data); + + +typedef hb_position_t (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, + void *user_data); +typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_h_advance_func_t; +typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_v_advance_func_t; + +typedef hb_bool_t (*hb_font_get_glyph_origin_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y, + void *user_data); +typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_h_origin_func_t; +typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_v_origin_func_t; + +typedef hb_position_t (*hb_font_get_glyph_kerning_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, + void *user_data); +typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_h_kerning_func_t; +typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_v_kerning_func_t; + + +typedef hb_bool_t (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, + hb_glyph_extents_t *extents, + void *user_data); +typedef hb_bool_t (*hb_font_get_glyph_contour_point_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, unsigned int point_index, + hb_position_t *x, hb_position_t *y, + void *user_data); + + +typedef hb_bool_t (*hb_font_get_glyph_name_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, + char *name, unsigned int size, + void *user_data); +typedef hb_bool_t (*hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void *font_data, + const char *name, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph, + void *user_data); + + +/* func setters */ + +/** + * hb_font_funcs_set_font_h_extents_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.1.2 + **/ +HB_EXTERN void +hb_font_funcs_set_font_h_extents_func (hb_font_funcs_t *ffuncs, + hb_font_get_font_h_extents_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_font_v_extents_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.1.2 + **/ +HB_EXTERN void +hb_font_funcs_set_font_v_extents_func (hb_font_funcs_t *ffuncs, + hb_font_get_font_v_extents_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_nominal_glyph_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.2.3 + **/ +HB_EXTERN void +hb_font_funcs_set_nominal_glyph_func (hb_font_funcs_t *ffuncs, + hb_font_get_nominal_glyph_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_variation_glyph_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.2.3 + **/ +HB_EXTERN void +hb_font_funcs_set_variation_glyph_func (hb_font_funcs_t *ffuncs, + hb_font_get_variation_glyph_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_h_advance_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_h_advance_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_v_advance_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_v_advance_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_h_origin_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_h_origin_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_v_origin_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_v_origin_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_h_kerning_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_h_kerning_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_v_kerning_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_v_kerning_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_extents_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_extents_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_contour_point_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_contour_point_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_name_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_name_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_name_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_from_name_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_from_name_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/* func dispatch */ + +HB_EXTERN hb_bool_t +hb_font_get_h_extents (hb_font_t *font, + hb_font_extents_t *extents); +HB_EXTERN hb_bool_t +hb_font_get_v_extents (hb_font_t *font, + hb_font_extents_t *extents); + +HB_EXTERN hb_bool_t +hb_font_get_nominal_glyph (hb_font_t *font, + hb_codepoint_t unicode, + hb_codepoint_t *glyph); +HB_EXTERN hb_bool_t +hb_font_get_variation_glyph (hb_font_t *font, + hb_codepoint_t unicode, hb_codepoint_t variation_selector, + hb_codepoint_t *glyph); + +HB_EXTERN hb_position_t +hb_font_get_glyph_h_advance (hb_font_t *font, + hb_codepoint_t glyph); +HB_EXTERN hb_position_t +hb_font_get_glyph_v_advance (hb_font_t *font, + hb_codepoint_t glyph); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_h_origin (hb_font_t *font, + hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y); +HB_EXTERN hb_bool_t +hb_font_get_glyph_v_origin (hb_font_t *font, + hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y); + +HB_EXTERN hb_position_t +hb_font_get_glyph_h_kerning (hb_font_t *font, + hb_codepoint_t left_glyph, hb_codepoint_t right_glyph); +HB_EXTERN hb_position_t +hb_font_get_glyph_v_kerning (hb_font_t *font, + hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_extents (hb_font_t *font, + hb_codepoint_t glyph, + hb_glyph_extents_t *extents); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_contour_point (hb_font_t *font, + hb_codepoint_t glyph, unsigned int point_index, + hb_position_t *x, hb_position_t *y); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_name (hb_font_t *font, + hb_codepoint_t glyph, + char *name, unsigned int size); +HB_EXTERN hb_bool_t +hb_font_get_glyph_from_name (hb_font_t *font, + const char *name, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph); + + +/* high-level funcs, with fallback */ + +/* Calls either hb_font_get_nominal_glyph() if variation_selector is 0, + * otherwise calls hb_font_get_variation_glyph(). */ +HB_EXTERN hb_bool_t +hb_font_get_glyph (hb_font_t *font, + hb_codepoint_t unicode, hb_codepoint_t variation_selector, + hb_codepoint_t *glyph); + +HB_EXTERN void +hb_font_get_extents_for_direction (hb_font_t *font, + hb_direction_t direction, + hb_font_extents_t *extents); +HB_EXTERN void +hb_font_get_glyph_advance_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); +HB_EXTERN void +hb_font_get_glyph_origin_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); +HB_EXTERN void +hb_font_add_glyph_origin_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); +HB_EXTERN void +hb_font_subtract_glyph_origin_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); + +HB_EXTERN void +hb_font_get_glyph_kerning_for_direction (hb_font_t *font, + hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_extents_for_origin (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_glyph_extents_t *extents); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_contour_point_for_origin (hb_font_t *font, + hb_codepoint_t glyph, unsigned int point_index, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); + +/* Generates gidDDD if glyph has no name. */ +HB_EXTERN void +hb_font_glyph_to_string (hb_font_t *font, + hb_codepoint_t glyph, + char *s, unsigned int size); +/* Parses gidDDD and uniUUUU strings automatically. */ +HB_EXTERN hb_bool_t +hb_font_glyph_from_string (hb_font_t *font, + const char *s, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph); + + +/* + * hb_font_t + */ + +/* Fonts are very light-weight objects */ + +HB_EXTERN hb_font_t * +hb_font_create (hb_face_t *face); + +HB_EXTERN hb_font_t * +hb_font_create_sub_font (hb_font_t *parent); + +HB_EXTERN hb_font_t * +hb_font_get_empty (void); + +HB_EXTERN hb_font_t * +hb_font_reference (hb_font_t *font); + +HB_EXTERN void +hb_font_destroy (hb_font_t *font); + +HB_EXTERN hb_bool_t +hb_font_set_user_data (hb_font_t *font, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +HB_EXTERN void * +hb_font_get_user_data (hb_font_t *font, + hb_user_data_key_t *key); + +HB_EXTERN void +hb_font_make_immutable (hb_font_t *font); + +HB_EXTERN hb_bool_t +hb_font_is_immutable (hb_font_t *font); + +HB_EXTERN void +hb_font_set_parent (hb_font_t *font, + hb_font_t *parent); + +HB_EXTERN hb_font_t * +hb_font_get_parent (hb_font_t *font); + +HB_EXTERN void +hb_font_set_face (hb_font_t *font, + hb_face_t *face); + +HB_EXTERN hb_face_t * +hb_font_get_face (hb_font_t *font); + + +HB_EXTERN void +hb_font_set_funcs (hb_font_t *font, + hb_font_funcs_t *klass, + void *font_data, + hb_destroy_func_t destroy); + +/* Be *very* careful with this function! */ +HB_EXTERN void +hb_font_set_funcs_data (hb_font_t *font, + void *font_data, + hb_destroy_func_t destroy); + + +HB_EXTERN void +hb_font_set_scale (hb_font_t *font, + int x_scale, + int y_scale); + +HB_EXTERN void +hb_font_get_scale (hb_font_t *font, + int *x_scale, + int *y_scale); + +/* + * A zero value means "no hinting in that direction" + */ +HB_EXTERN void +hb_font_set_ppem (hb_font_t *font, + unsigned int x_ppem, + unsigned int y_ppem); + +HB_EXTERN void +hb_font_get_ppem (hb_font_t *font, + unsigned int *x_ppem, + unsigned int *y_ppem); + +/* + * Point size per EM. Used for optical-sizing in CoreText. + * A value of zero means "not set". + */ +HB_EXTERN void +hb_font_set_ptem (hb_font_t *font, float ptem); + +HB_EXTERN float +hb_font_get_ptem (hb_font_t *font); + +HB_EXTERN void +hb_font_set_variations (hb_font_t *font, + const hb_variation_t *variations, + unsigned int variations_length); + +HB_EXTERN void +hb_font_set_var_coords_design (hb_font_t *font, + const float *coords, + unsigned int coords_length); + +HB_EXTERN void +hb_font_set_var_coords_normalized (hb_font_t *font, + const int *coords, /* 2.14 normalized */ + unsigned int coords_length); + +HB_EXTERN const int * +hb_font_get_var_coords_normalized (hb_font_t *font, + unsigned int *length); + +HB_END_DECLS + +#endif /* HB_FONT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ft.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ft.h new file mode 100755 index 00000000..94013eeb --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ft.h @@ -0,0 +1,132 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2015 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_FT_H +#define HB_FT_H + +#include "hb.h" + +#include <ft2build.h> +#include FT_FREETYPE_H + +HB_BEGIN_DECLS + +/* + * Note: FreeType is not thread-safe. + * Hence, these functions are not either. + */ + +/* + * hb-face from ft-face. + */ + +/* This one creates a new hb-face for given ft-face. + * When the returned hb-face is destroyed, the destroy + * callback is called (if not NULL), with the ft-face passed + * to it. + * + * The client is responsible to make sure that ft-face is + * destroyed after hb-face is destroyed. + * + * Most often you don't want this function. You should use either + * hb_ft_face_create_cached(), or hb_ft_face_create_referenced(). + * In particular, if you are going to pass NULL as destroy, you + * probably should use (the more recent) hb_ft_face_create_referenced() + * instead. + */ +HB_EXTERN hb_face_t * +hb_ft_face_create (FT_Face ft_face, + hb_destroy_func_t destroy); + +/* This version is like hb_ft_face_create(), except that it caches + * the hb-face using the generic pointer of the ft-face. This means + * that subsequent calls to this function with the same ft-face will + * return the same hb-face (correctly referenced). + * + * Client is still responsible for making sure that ft-face is destroyed + * after hb-face is. + */ +HB_EXTERN hb_face_t * +hb_ft_face_create_cached (FT_Face ft_face); + +/* This version is like hb_ft_face_create(), except that it calls + * FT_Reference_Face() on ft-face, as such keeping ft-face alive + * as long as the hb-face is. + * + * This is the most convenient version to use. Use it unless you have + * very good reasons not to. + */ +HB_EXTERN hb_face_t * +hb_ft_face_create_referenced (FT_Face ft_face); + + +/* + * hb-font from ft-face. + */ + +/* + * Note: + * + * Set face size on ft-face before creating hb-font from it. + * Otherwise hb-ft would NOT pick up the font size correctly. + */ + +/* See notes on hb_ft_face_create(). Same issues re lifecycle-management + * apply here. Use hb_ft_font_create_referenced() if you can. */ +HB_EXTERN hb_font_t * +hb_ft_font_create (FT_Face ft_face, + hb_destroy_func_t destroy); + +/* See notes on hb_ft_face_create_referenced() re lifecycle-management + * issues. */ +HB_EXTERN hb_font_t * +hb_ft_font_create_referenced (FT_Face ft_face); + +HB_EXTERN FT_Face +hb_ft_font_get_face (hb_font_t *font); + +HB_EXTERN void +hb_ft_font_set_load_flags (hb_font_t *font, int load_flags); + +HB_EXTERN int +hb_ft_font_get_load_flags (hb_font_t *font); + +/* Call when size or variations settings on underlying FT_Face change. */ +HB_EXTERN void +hb_ft_font_changed (hb_font_t *font); + +/* Makes an hb_font_t use FreeType internally to implement font functions. + * Note: this internally creates an FT_Face. Use it when you create your + * hb_face_t using hb_face_create(). */ +HB_EXTERN void +hb_ft_font_set_funcs (hb_font_t *font); + + +HB_END_DECLS + +#endif /* HB_FT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-glib.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-glib.h new file mode 100755 index 00000000..5f04183b --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-glib.h @@ -0,0 +1,56 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_GLIB_H +#define HB_GLIB_H + +#include "hb.h" + +#include <glib.h> + +HB_BEGIN_DECLS + + +HB_EXTERN hb_script_t +hb_glib_script_to_script (GUnicodeScript script); + +HB_EXTERN GUnicodeScript +hb_glib_script_from_script (hb_script_t script); + + +HB_EXTERN hb_unicode_funcs_t * +hb_glib_get_unicode_funcs (void); + +#if GLIB_CHECK_VERSION(2,31,10) +HB_EXTERN hb_blob_t * +hb_glib_blob_create (GBytes *gbytes); +#endif + +HB_END_DECLS + +#endif /* HB_GLIB_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-gobject-enums.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-gobject-enums.h new file mode 100755 index 00000000..fa0b08b0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-gobject-enums.h @@ -0,0 +1,80 @@ + +/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */ + +/* + * Copyright © 2013 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_GOBJECT_H_IN +#error "Include <hb-gobject.h> instead." +#endif + +#ifndef HB_GOBJECT_ENUMS_H +#define HB_GOBJECT_ENUMS_H + +#include "hb.h" + +#include <glib-object.h> + +HB_BEGIN_DECLS +HB_EXTERN GType hb_gobject_memory_mode_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_MEMORY_MODE (hb_gobject_memory_mode_get_type ()) +HB_EXTERN GType hb_gobject_glyph_flags_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_GLYPH_FLAGS (hb_gobject_glyph_flags_get_type ()) +HB_EXTERN GType hb_gobject_buffer_content_type_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_BUFFER_CONTENT_TYPE (hb_gobject_buffer_content_type_get_type ()) +HB_EXTERN GType hb_gobject_buffer_flags_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_BUFFER_FLAGS (hb_gobject_buffer_flags_get_type ()) +HB_EXTERN GType hb_gobject_buffer_cluster_level_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_BUFFER_CLUSTER_LEVEL (hb_gobject_buffer_cluster_level_get_type ()) +HB_EXTERN GType hb_gobject_buffer_serialize_flags_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_BUFFER_SERIALIZE_FLAGS (hb_gobject_buffer_serialize_flags_get_type ()) +HB_EXTERN GType hb_gobject_buffer_serialize_format_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_BUFFER_SERIALIZE_FORMAT (hb_gobject_buffer_serialize_format_get_type ()) +HB_EXTERN GType hb_gobject_buffer_diff_flags_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_BUFFER_DIFF_FLAGS (hb_gobject_buffer_diff_flags_get_type ()) +HB_EXTERN GType hb_gobject_direction_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_DIRECTION (hb_gobject_direction_get_type ()) +HB_EXTERN GType hb_gobject_script_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_SCRIPT (hb_gobject_script_get_type ()) +HB_EXTERN GType hb_gobject_ot_layout_glyph_class_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_OT_LAYOUT_GLYPH_CLASS (hb_gobject_ot_layout_glyph_class_get_type ()) +HB_EXTERN GType hb_gobject_ot_math_constant_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_OT_MATH_CONSTANT (hb_gobject_ot_math_constant_get_type ()) +HB_EXTERN GType hb_gobject_ot_math_kern_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_OT_MATH_KERN (hb_gobject_ot_math_kern_get_type ()) +HB_EXTERN GType hb_gobject_ot_math_glyph_part_flags_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_OT_MATH_GLYPH_PART_FLAGS (hb_gobject_ot_math_glyph_part_flags_get_type ()) +HB_EXTERN GType hb_gobject_unicode_general_category_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_UNICODE_GENERAL_CATEGORY (hb_gobject_unicode_general_category_get_type ()) +HB_EXTERN GType hb_gobject_unicode_combining_class_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_UNICODE_COMBINING_CLASS (hb_gobject_unicode_combining_class_get_type ()) + +HB_END_DECLS + +#endif /* HB_GOBJECT_ENUMS_H */ + +/* Generated data ends here */ + diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-gobject-structs.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-gobject-structs.h new file mode 100755 index 00000000..1c303219 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-gobject-structs.h @@ -0,0 +1,117 @@ +/* + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_GOBJECT_H_IN +#error "Include <hb-gobject.h> instead." +#endif + +#ifndef HB_GOBJECT_STRUCTS_H +#define HB_GOBJECT_STRUCTS_H + +#include "hb.h" + +#include <glib-object.h> + +HB_BEGIN_DECLS + + +/* Object types */ + +/** + * hb_gobject_blob_get_type: + * + * Since: 0.9.2 + **/ +HB_EXTERN GType hb_gobject_blob_get_type (void); +#define HB_GOBJECT_TYPE_BLOB (hb_gobject_blob_get_type ()) + +/** + * hb_gobject_buffer_get_type: + * + * Since: 0.9.2 + **/ +HB_EXTERN GType hb_gobject_buffer_get_type (void); +#define HB_GOBJECT_TYPE_BUFFER (hb_gobject_buffer_get_type ()) + +/** + * hb_gobject_face_get_type: + * + * Since: 0.9.2 + **/ +HB_EXTERN GType hb_gobject_face_get_type (void); +#define HB_GOBJECT_TYPE_FACE (hb_gobject_face_get_type ()) + +/** + * hb_gobject_font_get_type: + * + * Since: 0.9.2 + **/ +HB_EXTERN GType hb_gobject_font_get_type (void); +#define HB_GOBJECT_TYPE_FONT (hb_gobject_font_get_type ()) + +/** + * hb_gobject_font_funcs_get_type: + * + * Since: 0.9.2 + **/ +HB_EXTERN GType hb_gobject_font_funcs_get_type (void); +#define HB_GOBJECT_TYPE_FONT_FUNCS (hb_gobject_font_funcs_get_type ()) + +HB_EXTERN GType hb_gobject_set_get_type (void); +#define HB_GOBJECT_TYPE_SET (hb_gobject_set_get_type ()) + +HB_EXTERN GType hb_gobject_shape_plan_get_type (void); +#define HB_GOBJECT_TYPE_SHAPE_PLAN (hb_gobject_shape_plan_get_type ()) + +/** + * hb_gobject_unicode_funcs_get_type: + * + * Since: 0.9.2 + **/ +HB_EXTERN GType hb_gobject_unicode_funcs_get_type (void); +#define HB_GOBJECT_TYPE_UNICODE_FUNCS (hb_gobject_unicode_funcs_get_type ()) + +/* Value types */ + +HB_EXTERN GType hb_gobject_feature_get_type (void); +#define HB_GOBJECT_TYPE_FEATURE (hb_gobject_feature_get_type ()) + +HB_EXTERN GType hb_gobject_glyph_info_get_type (void); +#define HB_GOBJECT_TYPE_GLYPH_INFO (hb_gobject_glyph_info_get_type ()) + +HB_EXTERN GType hb_gobject_glyph_position_get_type (void); +#define HB_GOBJECT_TYPE_GLYPH_POSITION (hb_gobject_glyph_position_get_type ()) + +HB_EXTERN GType hb_gobject_segment_properties_get_type (void); +#define HB_GOBJECT_TYPE_SEGMENT_PROPERTIES (hb_gobject_segment_properties_get_type ()) + +HB_EXTERN GType hb_gobject_user_data_key_get_type (void); +#define HB_GOBJECT_TYPE_USER_DATA_KEY (hb_gobject_user_data_key_get_type ()) + + +HB_END_DECLS + +#endif /* HB_GOBJECT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-gobject.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-gobject.h new file mode 100755 index 00000000..ea1bd25d --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-gobject.h @@ -0,0 +1,40 @@ +/* + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_GOBJECT_H +#define HB_GOBJECT_H +#define HB_GOBJECT_H_IN + +#include "hb.h" + +#include "hb-gobject-enums.h" +#include "hb-gobject-structs.h" + +HB_BEGIN_DECLS +HB_END_DECLS + +#undef HB_GOBJECT_H_IN +#endif /* HB_GOBJECT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-graphite2.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-graphite2.h new file mode 100755 index 00000000..82b1e64c --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-graphite2.h @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2011 Martin Hosken + * Copyright (C) 2011 SIL International + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + */ + +#ifndef HB_GRAPHITE2_H +#define HB_GRAPHITE2_H + +#include "hb.h" + +#include <graphite2/Font.h> + +HB_BEGIN_DECLS + + +#define HB_GRAPHITE2_TAG_SILF HB_TAG('S','i','l','f') + + +HB_EXTERN gr_face * +hb_graphite2_face_get_gr_face (hb_face_t *face); + +#ifndef HB_DISABLE_DEPRECATED + +HB_EXTERN gr_font * +hb_graphite2_font_get_gr_font (hb_font_t *font); + +#endif + + +HB_END_DECLS + +#endif /* HB_GRAPHITE2_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-icu.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-icu.h new file mode 100755 index 00000000..2db6a7b6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-icu.h @@ -0,0 +1,52 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_ICU_H +#define HB_ICU_H + +#include "hb.h" + +#include <unicode/uscript.h> + +HB_BEGIN_DECLS + + +HB_EXTERN hb_script_t +hb_icu_script_to_script (UScriptCode script); + +HB_EXTERN UScriptCode +hb_icu_script_from_script (hb_script_t script); + + +HB_EXTERN hb_unicode_funcs_t * +hb_icu_get_unicode_funcs (void); + + +HB_END_DECLS + +#endif /* HB_ICU_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot-font.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot-font.h new file mode 100755 index 00000000..80eaa54b --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot-font.h @@ -0,0 +1,45 @@ +/* + * Copyright © 2014 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod, Roozbeh Pournader + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_FONT_H +#define HB_OT_FONT_H + +#include "hb.h" + +HB_BEGIN_DECLS + + +HB_EXTERN void +hb_ot_font_set_funcs (hb_font_t *font); + + +HB_END_DECLS + +#endif /* HB_OT_FONT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot-layout.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot-layout.h new file mode 100755 index 00000000..9861f0fc --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot-layout.h @@ -0,0 +1,321 @@ +/* + * Copyright © 2007,2008,2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_LAYOUT_H +#define HB_OT_LAYOUT_H + +#include "hb.h" + +#include "hb-ot-tag.h" + +HB_BEGIN_DECLS + + +#define HB_OT_TAG_GDEF HB_TAG('G','D','E','F') +#define HB_OT_TAG_GSUB HB_TAG('G','S','U','B') +#define HB_OT_TAG_GPOS HB_TAG('G','P','O','S') +#define HB_OT_TAG_JSTF HB_TAG('J','S','T','F') + + +/* + * GDEF + */ + +HB_EXTERN hb_bool_t +hb_ot_layout_has_glyph_classes (hb_face_t *face); + +typedef enum { + HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED = 0, + HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH = 1, + HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE = 2, + HB_OT_LAYOUT_GLYPH_CLASS_MARK = 3, + HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT = 4 +} hb_ot_layout_glyph_class_t; + +HB_EXTERN hb_ot_layout_glyph_class_t +hb_ot_layout_get_glyph_class (hb_face_t *face, + hb_codepoint_t glyph); + +HB_EXTERN void +hb_ot_layout_get_glyphs_in_class (hb_face_t *face, + hb_ot_layout_glyph_class_t klass, + hb_set_t *glyphs /* OUT */); + + +/* Not that useful. Provides list of attach points for a glyph that a + * client may want to cache */ +HB_EXTERN unsigned int +hb_ot_layout_get_attach_points (hb_face_t *face, + hb_codepoint_t glyph, + unsigned int start_offset, + unsigned int *point_count /* IN/OUT */, + unsigned int *point_array /* OUT */); + +/* Ligature caret positions */ +HB_EXTERN unsigned int +hb_ot_layout_get_ligature_carets (hb_font_t *font, + hb_direction_t direction, + hb_codepoint_t glyph, + unsigned int start_offset, + unsigned int *caret_count /* IN/OUT */, + hb_position_t *caret_array /* OUT */); + + +/* + * GSUB/GPOS feature query and enumeration interface + */ + +#define HB_OT_LAYOUT_NO_SCRIPT_INDEX 0xFFFFu +#define HB_OT_LAYOUT_NO_FEATURE_INDEX 0xFFFFu +#define HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX 0xFFFFu +#define HB_OT_LAYOUT_NO_VARIATIONS_INDEX 0xFFFFFFFFu + +HB_EXTERN unsigned int +hb_ot_layout_table_get_script_tags (hb_face_t *face, + hb_tag_t table_tag, + unsigned int start_offset, + unsigned int *script_count /* IN/OUT */, + hb_tag_t *script_tags /* OUT */); + +HB_EXTERN hb_bool_t +hb_ot_layout_table_find_script (hb_face_t *face, + hb_tag_t table_tag, + hb_tag_t script_tag, + unsigned int *script_index); + +/* Like find_script, but takes zero-terminated array of scripts to test */ +HB_EXTERN hb_bool_t +hb_ot_layout_table_choose_script (hb_face_t *face, + hb_tag_t table_tag, + const hb_tag_t *script_tags, + unsigned int *script_index, + hb_tag_t *chosen_script); + +HB_EXTERN unsigned int +hb_ot_layout_table_get_feature_tags (hb_face_t *face, + hb_tag_t table_tag, + unsigned int start_offset, + unsigned int *feature_count /* IN/OUT */, + hb_tag_t *feature_tags /* OUT */); + +HB_EXTERN unsigned int +hb_ot_layout_script_get_language_tags (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int start_offset, + unsigned int *language_count /* IN/OUT */, + hb_tag_t *language_tags /* OUT */); + +HB_EXTERN hb_bool_t +hb_ot_layout_script_find_language (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + hb_tag_t language_tag, + unsigned int *language_index); + +HB_EXTERN hb_bool_t +hb_ot_layout_language_get_required_feature_index (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + unsigned int *feature_index); + +HB_EXTERN hb_bool_t +hb_ot_layout_language_get_required_feature (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + unsigned int *feature_index, + hb_tag_t *feature_tag); + +HB_EXTERN unsigned int +hb_ot_layout_language_get_feature_indexes (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + unsigned int start_offset, + unsigned int *feature_count /* IN/OUT */, + unsigned int *feature_indexes /* OUT */); + +HB_EXTERN unsigned int +hb_ot_layout_language_get_feature_tags (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + unsigned int start_offset, + unsigned int *feature_count /* IN/OUT */, + hb_tag_t *feature_tags /* OUT */); + +HB_EXTERN hb_bool_t +hb_ot_layout_language_find_feature (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + hb_tag_t feature_tag, + unsigned int *feature_index); + +HB_EXTERN unsigned int +hb_ot_layout_feature_get_lookups (hb_face_t *face, + hb_tag_t table_tag, + unsigned int feature_index, + unsigned int start_offset, + unsigned int *lookup_count /* IN/OUT */, + unsigned int *lookup_indexes /* OUT */); + +HB_EXTERN unsigned int +hb_ot_layout_table_get_lookup_count (hb_face_t *face, + hb_tag_t table_tag); + + +HB_EXTERN void +hb_ot_layout_collect_lookups (hb_face_t *face, + hb_tag_t table_tag, + const hb_tag_t *scripts, + const hb_tag_t *languages, + const hb_tag_t *features, + hb_set_t *lookup_indexes /* OUT */); + +HB_EXTERN void +hb_ot_layout_lookup_collect_glyphs (hb_face_t *face, + hb_tag_t table_tag, + unsigned int lookup_index, + hb_set_t *glyphs_before, /* OUT. May be NULL */ + hb_set_t *glyphs_input, /* OUT. May be NULL */ + hb_set_t *glyphs_after, /* OUT. May be NULL */ + hb_set_t *glyphs_output /* OUT. May be NULL */); + +#ifdef HB_NOT_IMPLEMENTED +typedef struct +{ + const hb_codepoint_t *before, + unsigned int before_length, + const hb_codepoint_t *input, + unsigned int input_length, + const hb_codepoint_t *after, + unsigned int after_length, +} hb_ot_layout_glyph_sequence_t; + +typedef hb_bool_t +(*hb_ot_layout_glyph_sequence_func_t) (hb_font_t *font, + hb_tag_t table_tag, + unsigned int lookup_index, + const hb_ot_layout_glyph_sequence_t *sequence, + void *user_data); + +HB_EXTERN void +Xhb_ot_layout_lookup_enumerate_sequences (hb_face_t *face, + hb_tag_t table_tag, + unsigned int lookup_index, + hb_ot_layout_glyph_sequence_func_t callback, + void *user_data); +#endif + +/* Variations support */ + +HB_EXTERN hb_bool_t +hb_ot_layout_table_find_feature_variations (hb_face_t *face, + hb_tag_t table_tag, + const int *coords, + unsigned int num_coords, + unsigned int *variations_index /* out */); + +HB_EXTERN unsigned int +hb_ot_layout_feature_with_variations_get_lookups (hb_face_t *face, + hb_tag_t table_tag, + unsigned int feature_index, + unsigned int variations_index, + unsigned int start_offset, + unsigned int *lookup_count /* IN/OUT */, + unsigned int *lookup_indexes /* OUT */); + + +/* + * GSUB + */ + +HB_EXTERN hb_bool_t +hb_ot_layout_has_substitution (hb_face_t *face); + +HB_EXTERN hb_bool_t +hb_ot_layout_lookup_would_substitute (hb_face_t *face, + unsigned int lookup_index, + const hb_codepoint_t *glyphs, + unsigned int glyphs_length, + hb_bool_t zero_context); + +HB_EXTERN void +hb_ot_layout_lookup_substitute_closure (hb_face_t *face, + unsigned int lookup_index, + hb_set_t *glyphs + /*TODO , hb_bool_t inclusive */); + +#ifdef HB_NOT_IMPLEMENTED +/* Note: You better have GDEF when using this API, or marks won't do much. */ +HB_EXTERN hb_bool_t +Xhb_ot_layout_lookup_substitute (hb_font_t *font, + unsigned int lookup_index, + const hb_ot_layout_glyph_sequence_t *sequence, + unsigned int out_size, + hb_codepoint_t *glyphs_out, /* OUT */ + unsigned int *clusters_out, /* OUT */ + unsigned int *out_length /* OUT */); +#endif + + +/* + * GPOS + */ + +HB_EXTERN hb_bool_t +hb_ot_layout_has_positioning (hb_face_t *face); + +#ifdef HB_NOT_IMPLEMENTED +/* Note: You better have GDEF when using this API, or marks won't do much. */ +HB_EXTERN hb_bool_t +Xhb_ot_layout_lookup_position (hb_font_t *font, + unsigned int lookup_index, + const hb_ot_layout_glyph_sequence_t *sequence, + hb_glyph_position_t *positions /* IN / OUT */); +#endif + +/* Optical 'size' feature info. Returns true if found. + * http://www.microsoft.com/typography/otspec/features_pt.htm#size */ +HB_EXTERN hb_bool_t +hb_ot_layout_get_size_params (hb_face_t *face, + unsigned int *design_size, /* OUT. May be NULL */ + unsigned int *subfamily_id, /* OUT. May be NULL */ + unsigned int *subfamily_name_id, /* OUT. May be NULL */ + unsigned int *range_start, /* OUT. May be NULL */ + unsigned int *range_end /* OUT. May be NULL */); + + +HB_END_DECLS + +#endif /* HB_OT_LAYOUT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot-math.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot-math.h new file mode 100755 index 00000000..521a5ca0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot-math.h @@ -0,0 +1,209 @@ +/* + * Copyright © 2016 Igalia S.L. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Igalia Author(s): FrĂ©dĂ©ric Wang + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_MATH_H +#define HB_OT_MATH_H + +#include "hb.h" + +HB_BEGIN_DECLS + + +/* + * MATH + */ + +#define HB_OT_TAG_MATH HB_TAG('M','A','T','H') + +/* Use with hb_buffer_set_script() for math shaping. */ +#define HB_OT_MATH_SCRIPT HB_TAG('m','a','t','h') + +/* Types */ + +/** + * hb_ot_math_constant_t: + * + * Since: 1.3.3 + */ +typedef enum { + HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN = 0, + HB_OT_MATH_CONSTANT_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN = 1, + HB_OT_MATH_CONSTANT_DELIMITED_SUB_FORMULA_MIN_HEIGHT = 2, + HB_OT_MATH_CONSTANT_DISPLAY_OPERATOR_MIN_HEIGHT = 3, + HB_OT_MATH_CONSTANT_MATH_LEADING = 4, + HB_OT_MATH_CONSTANT_AXIS_HEIGHT = 5, + HB_OT_MATH_CONSTANT_ACCENT_BASE_HEIGHT = 6, + HB_OT_MATH_CONSTANT_FLATTENED_ACCENT_BASE_HEIGHT = 7, + HB_OT_MATH_CONSTANT_SUBSCRIPT_SHIFT_DOWN = 8, + HB_OT_MATH_CONSTANT_SUBSCRIPT_TOP_MAX = 9, + HB_OT_MATH_CONSTANT_SUBSCRIPT_BASELINE_DROP_MIN = 10, + HB_OT_MATH_CONSTANT_SUPERSCRIPT_SHIFT_UP = 11, + HB_OT_MATH_CONSTANT_SUPERSCRIPT_SHIFT_UP_CRAMPED = 12, + HB_OT_MATH_CONSTANT_SUPERSCRIPT_BOTTOM_MIN = 13, + HB_OT_MATH_CONSTANT_SUPERSCRIPT_BASELINE_DROP_MAX = 14, + HB_OT_MATH_CONSTANT_SUB_SUPERSCRIPT_GAP_MIN = 15, + HB_OT_MATH_CONSTANT_SUPERSCRIPT_BOTTOM_MAX_WITH_SUBSCRIPT = 16, + HB_OT_MATH_CONSTANT_SPACE_AFTER_SCRIPT = 17, + HB_OT_MATH_CONSTANT_UPPER_LIMIT_GAP_MIN = 18, + HB_OT_MATH_CONSTANT_UPPER_LIMIT_BASELINE_RISE_MIN = 19, + HB_OT_MATH_CONSTANT_LOWER_LIMIT_GAP_MIN = 20, + HB_OT_MATH_CONSTANT_LOWER_LIMIT_BASELINE_DROP_MIN = 21, + HB_OT_MATH_CONSTANT_STACK_TOP_SHIFT_UP = 22, + HB_OT_MATH_CONSTANT_STACK_TOP_DISPLAY_STYLE_SHIFT_UP = 23, + HB_OT_MATH_CONSTANT_STACK_BOTTOM_SHIFT_DOWN = 24, + HB_OT_MATH_CONSTANT_STACK_BOTTOM_DISPLAY_STYLE_SHIFT_DOWN = 25, + HB_OT_MATH_CONSTANT_STACK_GAP_MIN = 26, + HB_OT_MATH_CONSTANT_STACK_DISPLAY_STYLE_GAP_MIN = 27, + HB_OT_MATH_CONSTANT_STRETCH_STACK_TOP_SHIFT_UP = 28, + HB_OT_MATH_CONSTANT_STRETCH_STACK_BOTTOM_SHIFT_DOWN = 29, + HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_ABOVE_MIN = 30, + HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_BELOW_MIN = 31, + HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_SHIFT_UP = 32, + HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_DISPLAY_STYLE_SHIFT_UP = 33, + HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_SHIFT_DOWN = 34, + HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_DISPLAY_STYLE_SHIFT_DOWN = 35, + HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_GAP_MIN = 36, + HB_OT_MATH_CONSTANT_FRACTION_NUM_DISPLAY_STYLE_GAP_MIN = 37, + HB_OT_MATH_CONSTANT_FRACTION_RULE_THICKNESS = 38, + HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_GAP_MIN = 39, + HB_OT_MATH_CONSTANT_FRACTION_DENOM_DISPLAY_STYLE_GAP_MIN = 40, + HB_OT_MATH_CONSTANT_SKEWED_FRACTION_HORIZONTAL_GAP = 41, + HB_OT_MATH_CONSTANT_SKEWED_FRACTION_VERTICAL_GAP = 42, + HB_OT_MATH_CONSTANT_OVERBAR_VERTICAL_GAP = 43, + HB_OT_MATH_CONSTANT_OVERBAR_RULE_THICKNESS = 44, + HB_OT_MATH_CONSTANT_OVERBAR_EXTRA_ASCENDER = 45, + HB_OT_MATH_CONSTANT_UNDERBAR_VERTICAL_GAP = 46, + HB_OT_MATH_CONSTANT_UNDERBAR_RULE_THICKNESS = 47, + HB_OT_MATH_CONSTANT_UNDERBAR_EXTRA_DESCENDER = 48, + HB_OT_MATH_CONSTANT_RADICAL_VERTICAL_GAP = 49, + HB_OT_MATH_CONSTANT_RADICAL_DISPLAY_STYLE_VERTICAL_GAP = 50, + HB_OT_MATH_CONSTANT_RADICAL_RULE_THICKNESS = 51, + HB_OT_MATH_CONSTANT_RADICAL_EXTRA_ASCENDER = 52, + HB_OT_MATH_CONSTANT_RADICAL_KERN_BEFORE_DEGREE = 53, + HB_OT_MATH_CONSTANT_RADICAL_KERN_AFTER_DEGREE = 54, + HB_OT_MATH_CONSTANT_RADICAL_DEGREE_BOTTOM_RAISE_PERCENT = 55 +} hb_ot_math_constant_t; + +/** + * hb_ot_math_kern_t: + * + * Since: 1.3.3 + */ +typedef enum { + HB_OT_MATH_KERN_TOP_RIGHT = 0, + HB_OT_MATH_KERN_TOP_LEFT = 1, + HB_OT_MATH_KERN_BOTTOM_RIGHT = 2, + HB_OT_MATH_KERN_BOTTOM_LEFT = 3 +} hb_ot_math_kern_t; + +/** + * hb_ot_math_glyph_variant_t: + * + * Since: 1.3.3 + */ +typedef struct hb_ot_math_glyph_variant_t { + hb_codepoint_t glyph; + hb_position_t advance; +} hb_ot_math_glyph_variant_t; + +/** + * hb_ot_math_glyph_part_flags_t: + * + * Since: 1.3.3 + */ +typedef enum { /*< flags >*/ + HB_MATH_GLYPH_PART_FLAG_EXTENDER = 0x00000001u /* Extender glyph */ +} hb_ot_math_glyph_part_flags_t; + +/** + * hb_ot_math_glyph_part_t: + * + * Since: 1.3.3 + */ +typedef struct hb_ot_math_glyph_part_t { + hb_codepoint_t glyph; + hb_position_t start_connector_length; + hb_position_t end_connector_length; + hb_position_t full_advance; + hb_ot_math_glyph_part_flags_t flags; +} hb_ot_math_glyph_part_t; + +/* Methods */ + +HB_EXTERN hb_bool_t +hb_ot_math_has_data (hb_face_t *face); + +HB_EXTERN hb_position_t +hb_ot_math_get_constant (hb_font_t *font, + hb_ot_math_constant_t constant); + +HB_EXTERN hb_position_t +hb_ot_math_get_glyph_italics_correction (hb_font_t *font, + hb_codepoint_t glyph); + +HB_EXTERN hb_position_t +hb_ot_math_get_glyph_top_accent_attachment (hb_font_t *font, + hb_codepoint_t glyph); + +HB_EXTERN hb_bool_t +hb_ot_math_is_glyph_extended_shape (hb_face_t *face, + hb_codepoint_t glyph); + +HB_EXTERN hb_position_t +hb_ot_math_get_glyph_kerning (hb_font_t *font, + hb_codepoint_t glyph, + hb_ot_math_kern_t kern, + hb_position_t correction_height); + +HB_EXTERN unsigned int +hb_ot_math_get_glyph_variants (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + unsigned int start_offset, + unsigned int *variants_count, /* IN/OUT */ + hb_ot_math_glyph_variant_t *variants /* OUT */); + +HB_EXTERN hb_position_t +hb_ot_math_get_min_connector_overlap (hb_font_t *font, + hb_direction_t direction); + +HB_EXTERN unsigned int +hb_ot_math_get_glyph_assembly (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + unsigned int start_offset, + unsigned int *parts_count, /* IN/OUT */ + hb_ot_math_glyph_part_t *parts, /* OUT */ + hb_position_t *italics_correction /* OUT */); + + +HB_END_DECLS + +#endif /* HB_OT_MATH_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot-shape.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot-shape.h new file mode 100755 index 00000000..7b1bcc06 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot-shape.h @@ -0,0 +1,53 @@ +/* + * Copyright © 2013 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_SHAPE_H +#define HB_OT_SHAPE_H + +#include "hb.h" + +HB_BEGIN_DECLS + +/* TODO port to shape-plan / set. */ +HB_EXTERN void +hb_ot_shape_glyphs_closure (hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features, + hb_set_t *glyphs); + +HB_EXTERN void +hb_ot_shape_plan_collect_lookups (hb_shape_plan_t *shape_plan, + hb_tag_t table_tag, + hb_set_t *lookup_indexes /* OUT */); + +HB_END_DECLS + +#endif /* HB_OT_SHAPE_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot-tag.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot-tag.h new file mode 100755 index 00000000..54fb747f --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot-tag.h @@ -0,0 +1,59 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_TAG_H +#define HB_OT_TAG_H + +#include "hb.h" + +HB_BEGIN_DECLS + + +#define HB_OT_TAG_DEFAULT_SCRIPT HB_TAG ('D', 'F', 'L', 'T') +#define HB_OT_TAG_DEFAULT_LANGUAGE HB_TAG ('d', 'f', 'l', 't') + +HB_EXTERN void +hb_ot_tags_from_script (hb_script_t script, + hb_tag_t *script_tag_1, + hb_tag_t *script_tag_2); + +HB_EXTERN hb_script_t +hb_ot_tag_to_script (hb_tag_t tag); + +HB_EXTERN hb_tag_t +hb_ot_tag_from_language (hb_language_t language); + +HB_EXTERN hb_language_t +hb_ot_tag_to_language (hb_tag_t tag); + + +HB_END_DECLS + +#endif /* HB_OT_TAG_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot-var.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot-var.h new file mode 100755 index 00000000..a2c0c5f2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot-var.h @@ -0,0 +1,105 @@ +/* + * Copyright © 2017 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_VAR_H +#define HB_OT_VAR_H + +#include "hb.h" + +HB_BEGIN_DECLS + + +#define HB_OT_TAG_VAR_AXIS_ITALIC HB_TAG('i','t','a','l') +#define HB_OT_TAG_VAR_AXIS_OPTICAL_SIZE HB_TAG('o','p','s','z') +#define HB_OT_TAG_VAR_AXIS_SLANT HB_TAG('s','l','n','t') +#define HB_OT_TAG_VAR_AXIS_WIDTH HB_TAG('w','d','t','h') +#define HB_OT_TAG_VAR_AXIS_WEIGHT HB_TAG('w','g','h','t') + + +/* + * fvar / avar + */ + +/** + * hb_ot_var_axis_t: + * + * Since: 1.4.2 + */ +typedef struct hb_ot_var_axis_t { + hb_tag_t tag; + unsigned int name_id; + float min_value; + float default_value; + float max_value; +} hb_ot_var_axis_t; + +HB_EXTERN hb_bool_t +hb_ot_var_has_data (hb_face_t *face); + +/** + * HB_OT_VAR_NO_AXIS_INDEX: + * + * Since: 1.4.2 + */ +#define HB_OT_VAR_NO_AXIS_INDEX 0xFFFFFFFFu + +HB_EXTERN unsigned int +hb_ot_var_get_axis_count (hb_face_t *face); + +HB_EXTERN unsigned int +hb_ot_var_get_axes (hb_face_t *face, + unsigned int start_offset, + unsigned int *axes_count /* IN/OUT */, + hb_ot_var_axis_t *axes_array /* OUT */); + +HB_EXTERN hb_bool_t +hb_ot_var_find_axis (hb_face_t *face, + hb_tag_t axis_tag, + unsigned int *axis_index, + hb_ot_var_axis_t *axis_info); + + +HB_EXTERN void +hb_ot_var_normalize_variations (hb_face_t *face, + const hb_variation_t *variations, /* IN */ + unsigned int variations_length, + int *coords, /* OUT */ + unsigned int coords_length); + +HB_EXTERN void +hb_ot_var_normalize_coords (hb_face_t *face, + unsigned int coords_length, + const float *design_coords, /* IN */ + int *normalized_coords /* OUT */); + + +HB_END_DECLS + +#endif /* HB_OT_VAR_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot.h new file mode 100755 index 00000000..2120a3ef --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-ot.h @@ -0,0 +1,45 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_H +#define HB_OT_H +#define HB_OT_H_IN + +#include "hb.h" + +#include "hb-ot-font.h" +#include "hb-ot-layout.h" +#include "hb-ot-math.h" +#include "hb-ot-tag.h" +#include "hb-ot-shape.h" +#include "hb-ot-var.h" + +HB_BEGIN_DECLS + +HB_END_DECLS + +#undef HB_OT_H_IN +#endif /* HB_OT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-set.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-set.h new file mode 100755 index 00000000..2ce40607 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-set.h @@ -0,0 +1,154 @@ +/* + * Copyright © 2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_SET_H +#define HB_SET_H + +#include "hb-common.h" + +HB_BEGIN_DECLS + + +/* + * Since: 0.9.21 + */ +#define HB_SET_VALUE_INVALID ((hb_codepoint_t) -1) + +typedef struct hb_set_t hb_set_t; + + +HB_EXTERN hb_set_t * +hb_set_create (void); + +HB_EXTERN hb_set_t * +hb_set_get_empty (void); + +HB_EXTERN hb_set_t * +hb_set_reference (hb_set_t *set); + +HB_EXTERN void +hb_set_destroy (hb_set_t *set); + +HB_EXTERN hb_bool_t +hb_set_set_user_data (hb_set_t *set, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + +HB_EXTERN void * +hb_set_get_user_data (hb_set_t *set, + hb_user_data_key_t *key); + + +/* Returns false if allocation has failed before */ +HB_EXTERN hb_bool_t +hb_set_allocation_successful (const hb_set_t *set); + +HB_EXTERN void +hb_set_clear (hb_set_t *set); + +HB_EXTERN hb_bool_t +hb_set_is_empty (const hb_set_t *set); + +HB_EXTERN hb_bool_t +hb_set_has (const hb_set_t *set, + hb_codepoint_t codepoint); + +/* Right now limited to 16-bit integers. Eventually will do full codepoint range, sans -1 + * which we will use as a sentinel. */ +HB_EXTERN void +hb_set_add (hb_set_t *set, + hb_codepoint_t codepoint); + +HB_EXTERN void +hb_set_add_range (hb_set_t *set, + hb_codepoint_t first, + hb_codepoint_t last); + +HB_EXTERN void +hb_set_del (hb_set_t *set, + hb_codepoint_t codepoint); + +HB_EXTERN void +hb_set_del_range (hb_set_t *set, + hb_codepoint_t first, + hb_codepoint_t last); + +HB_EXTERN hb_bool_t +hb_set_is_equal (const hb_set_t *set, + const hb_set_t *other); + +HB_EXTERN void +hb_set_set (hb_set_t *set, + const hb_set_t *other); + +HB_EXTERN void +hb_set_union (hb_set_t *set, + const hb_set_t *other); + +HB_EXTERN void +hb_set_intersect (hb_set_t *set, + const hb_set_t *other); + +HB_EXTERN void +hb_set_subtract (hb_set_t *set, + const hb_set_t *other); + +HB_EXTERN void +hb_set_symmetric_difference (hb_set_t *set, + const hb_set_t *other); + +HB_EXTERN unsigned int +hb_set_get_population (const hb_set_t *set); + +/* Returns -1 if set empty. */ +HB_EXTERN hb_codepoint_t +hb_set_get_min (const hb_set_t *set); + +/* Returns -1 if set empty. */ +HB_EXTERN hb_codepoint_t +hb_set_get_max (const hb_set_t *set); + +/* Pass -1 in to get started. */ +HB_EXTERN hb_bool_t +hb_set_next (const hb_set_t *set, + hb_codepoint_t *codepoint); + +/* Pass -1 for first and last to get started. */ +HB_EXTERN hb_bool_t +hb_set_next_range (const hb_set_t *set, + hb_codepoint_t *first, + hb_codepoint_t *last); + + +HB_END_DECLS + +#endif /* HB_SET_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-shape-plan.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-shape-plan.h new file mode 100755 index 00000000..b62ae7ca --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-shape-plan.h @@ -0,0 +1,108 @@ +/* + * Copyright © 2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_SHAPE_PLAN_H +#define HB_SHAPE_PLAN_H + +#include "hb-common.h" +#include "hb-font.h" + +HB_BEGIN_DECLS + +typedef struct hb_shape_plan_t hb_shape_plan_t; + +HB_EXTERN hb_shape_plan_t * +hb_shape_plan_create (hb_face_t *face, + const hb_segment_properties_t *props, + const hb_feature_t *user_features, + unsigned int num_user_features, + const char * const *shaper_list); + +HB_EXTERN hb_shape_plan_t * +hb_shape_plan_create_cached (hb_face_t *face, + const hb_segment_properties_t *props, + const hb_feature_t *user_features, + unsigned int num_user_features, + const char * const *shaper_list); + +HB_EXTERN hb_shape_plan_t * +hb_shape_plan_create2 (hb_face_t *face, + const hb_segment_properties_t *props, + const hb_feature_t *user_features, + unsigned int num_user_features, + const int *coords, + unsigned int num_coords, + const char * const *shaper_list); + +HB_EXTERN hb_shape_plan_t * +hb_shape_plan_create_cached2 (hb_face_t *face, + const hb_segment_properties_t *props, + const hb_feature_t *user_features, + unsigned int num_user_features, + const int *coords, + unsigned int num_coords, + const char * const *shaper_list); + + +HB_EXTERN hb_shape_plan_t * +hb_shape_plan_get_empty (void); + +HB_EXTERN hb_shape_plan_t * +hb_shape_plan_reference (hb_shape_plan_t *shape_plan); + +HB_EXTERN void +hb_shape_plan_destroy (hb_shape_plan_t *shape_plan); + +HB_EXTERN hb_bool_t +hb_shape_plan_set_user_data (hb_shape_plan_t *shape_plan, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + +HB_EXTERN void * +hb_shape_plan_get_user_data (hb_shape_plan_t *shape_plan, + hb_user_data_key_t *key); + + +HB_EXTERN hb_bool_t +hb_shape_plan_execute (hb_shape_plan_t *shape_plan, + hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features); + +HB_EXTERN const char * +hb_shape_plan_get_shaper (hb_shape_plan_t *shape_plan); + + +HB_END_DECLS + +#endif /* HB_SHAPE_PLAN_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-shape.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-shape.h new file mode 100755 index 00000000..39507ff7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-shape.h @@ -0,0 +1,62 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_SHAPE_H +#define HB_SHAPE_H + +#include "hb-common.h" +#include "hb-buffer.h" +#include "hb-font.h" + +HB_BEGIN_DECLS + + +HB_EXTERN void +hb_shape (hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features); + +HB_EXTERN hb_bool_t +hb_shape_full (hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features, + const char * const *shaper_list); + +HB_EXTERN const char ** +hb_shape_list_shapers (void); + + +HB_END_DECLS + +#endif /* HB_SHAPE_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-unicode.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-unicode.h new file mode 100755 index 00000000..2657f481 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-unicode.h @@ -0,0 +1,471 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2011 Codethink Limited + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Codethink Author(s): Ryan Lortie + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_UNICODE_H +#define HB_UNICODE_H + +#include "hb-common.h" + +HB_BEGIN_DECLS + + +/* hb_unicode_general_category_t */ + +/* Unicode Character Database property: General_Category (gc) */ +typedef enum +{ + HB_UNICODE_GENERAL_CATEGORY_CONTROL, /* Cc */ + HB_UNICODE_GENERAL_CATEGORY_FORMAT, /* Cf */ + HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED, /* Cn */ + HB_UNICODE_GENERAL_CATEGORY_PRIVATE_USE, /* Co */ + HB_UNICODE_GENERAL_CATEGORY_SURROGATE, /* Cs */ + HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER, /* Ll */ + HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER, /* Lm */ + HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER, /* Lo */ + HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER, /* Lt */ + HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER, /* Lu */ + HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK, /* Mc */ + HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK, /* Me */ + HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK, /* Mn */ + HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER, /* Nd */ + HB_UNICODE_GENERAL_CATEGORY_LETTER_NUMBER, /* Nl */ + HB_UNICODE_GENERAL_CATEGORY_OTHER_NUMBER, /* No */ + HB_UNICODE_GENERAL_CATEGORY_CONNECT_PUNCTUATION, /* Pc */ + HB_UNICODE_GENERAL_CATEGORY_DASH_PUNCTUATION, /* Pd */ + HB_UNICODE_GENERAL_CATEGORY_CLOSE_PUNCTUATION, /* Pe */ + HB_UNICODE_GENERAL_CATEGORY_FINAL_PUNCTUATION, /* Pf */ + HB_UNICODE_GENERAL_CATEGORY_INITIAL_PUNCTUATION, /* Pi */ + HB_UNICODE_GENERAL_CATEGORY_OTHER_PUNCTUATION, /* Po */ + HB_UNICODE_GENERAL_CATEGORY_OPEN_PUNCTUATION, /* Ps */ + HB_UNICODE_GENERAL_CATEGORY_CURRENCY_SYMBOL, /* Sc */ + HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL, /* Sk */ + HB_UNICODE_GENERAL_CATEGORY_MATH_SYMBOL, /* Sm */ + HB_UNICODE_GENERAL_CATEGORY_OTHER_SYMBOL, /* So */ + HB_UNICODE_GENERAL_CATEGORY_LINE_SEPARATOR, /* Zl */ + HB_UNICODE_GENERAL_CATEGORY_PARAGRAPH_SEPARATOR, /* Zp */ + HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR /* Zs */ +} hb_unicode_general_category_t; + +/* hb_unicode_combining_class_t */ + +/* Note: newer versions of Unicode may add new values. Clients should be ready to handle + * any value in the 0..254 range being returned from hb_unicode_combining_class(). + */ + +/* Unicode Character Database property: Canonical_Combining_Class (ccc) */ +typedef enum +{ + HB_UNICODE_COMBINING_CLASS_NOT_REORDERED = 0, + HB_UNICODE_COMBINING_CLASS_OVERLAY = 1, + HB_UNICODE_COMBINING_CLASS_NUKTA = 7, + HB_UNICODE_COMBINING_CLASS_KANA_VOICING = 8, + HB_UNICODE_COMBINING_CLASS_VIRAMA = 9, + + /* Hebrew */ + HB_UNICODE_COMBINING_CLASS_CCC10 = 10, + HB_UNICODE_COMBINING_CLASS_CCC11 = 11, + HB_UNICODE_COMBINING_CLASS_CCC12 = 12, + HB_UNICODE_COMBINING_CLASS_CCC13 = 13, + HB_UNICODE_COMBINING_CLASS_CCC14 = 14, + HB_UNICODE_COMBINING_CLASS_CCC15 = 15, + HB_UNICODE_COMBINING_CLASS_CCC16 = 16, + HB_UNICODE_COMBINING_CLASS_CCC17 = 17, + HB_UNICODE_COMBINING_CLASS_CCC18 = 18, + HB_UNICODE_COMBINING_CLASS_CCC19 = 19, + HB_UNICODE_COMBINING_CLASS_CCC20 = 20, + HB_UNICODE_COMBINING_CLASS_CCC21 = 21, + HB_UNICODE_COMBINING_CLASS_CCC22 = 22, + HB_UNICODE_COMBINING_CLASS_CCC23 = 23, + HB_UNICODE_COMBINING_CLASS_CCC24 = 24, + HB_UNICODE_COMBINING_CLASS_CCC25 = 25, + HB_UNICODE_COMBINING_CLASS_CCC26 = 26, + + /* Arabic */ + HB_UNICODE_COMBINING_CLASS_CCC27 = 27, + HB_UNICODE_COMBINING_CLASS_CCC28 = 28, + HB_UNICODE_COMBINING_CLASS_CCC29 = 29, + HB_UNICODE_COMBINING_CLASS_CCC30 = 30, + HB_UNICODE_COMBINING_CLASS_CCC31 = 31, + HB_UNICODE_COMBINING_CLASS_CCC32 = 32, + HB_UNICODE_COMBINING_CLASS_CCC33 = 33, + HB_UNICODE_COMBINING_CLASS_CCC34 = 34, + HB_UNICODE_COMBINING_CLASS_CCC35 = 35, + + /* Syriac */ + HB_UNICODE_COMBINING_CLASS_CCC36 = 36, + + /* Telugu */ + HB_UNICODE_COMBINING_CLASS_CCC84 = 84, + HB_UNICODE_COMBINING_CLASS_CCC91 = 91, + + /* Thai */ + HB_UNICODE_COMBINING_CLASS_CCC103 = 103, + HB_UNICODE_COMBINING_CLASS_CCC107 = 107, + + /* Lao */ + HB_UNICODE_COMBINING_CLASS_CCC118 = 118, + HB_UNICODE_COMBINING_CLASS_CCC122 = 122, + + /* Tibetan */ + HB_UNICODE_COMBINING_CLASS_CCC129 = 129, + HB_UNICODE_COMBINING_CLASS_CCC130 = 130, + HB_UNICODE_COMBINING_CLASS_CCC133 = 132, + + + HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW_LEFT = 200, + HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW = 202, + HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE = 214, + HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE_RIGHT = 216, + HB_UNICODE_COMBINING_CLASS_BELOW_LEFT = 218, + HB_UNICODE_COMBINING_CLASS_BELOW = 220, + HB_UNICODE_COMBINING_CLASS_BELOW_RIGHT = 222, + HB_UNICODE_COMBINING_CLASS_LEFT = 224, + HB_UNICODE_COMBINING_CLASS_RIGHT = 226, + HB_UNICODE_COMBINING_CLASS_ABOVE_LEFT = 228, + HB_UNICODE_COMBINING_CLASS_ABOVE = 230, + HB_UNICODE_COMBINING_CLASS_ABOVE_RIGHT = 232, + HB_UNICODE_COMBINING_CLASS_DOUBLE_BELOW = 233, + HB_UNICODE_COMBINING_CLASS_DOUBLE_ABOVE = 234, + + HB_UNICODE_COMBINING_CLASS_IOTA_SUBSCRIPT = 240, + + HB_UNICODE_COMBINING_CLASS_INVALID = 255 +} hb_unicode_combining_class_t; + + +/* + * hb_unicode_funcs_t + */ + +typedef struct hb_unicode_funcs_t hb_unicode_funcs_t; + + +/* + * just give me the best implementation you've got there. + */ +HB_EXTERN hb_unicode_funcs_t * +hb_unicode_funcs_get_default (void); + + +HB_EXTERN hb_unicode_funcs_t * +hb_unicode_funcs_create (hb_unicode_funcs_t *parent); + +HB_EXTERN hb_unicode_funcs_t * +hb_unicode_funcs_get_empty (void); + +HB_EXTERN hb_unicode_funcs_t * +hb_unicode_funcs_reference (hb_unicode_funcs_t *ufuncs); + +HB_EXTERN void +hb_unicode_funcs_destroy (hb_unicode_funcs_t *ufuncs); + +HB_EXTERN hb_bool_t +hb_unicode_funcs_set_user_data (hb_unicode_funcs_t *ufuncs, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +HB_EXTERN void * +hb_unicode_funcs_get_user_data (hb_unicode_funcs_t *ufuncs, + hb_user_data_key_t *key); + + +HB_EXTERN void +hb_unicode_funcs_make_immutable (hb_unicode_funcs_t *ufuncs); + +HB_EXTERN hb_bool_t +hb_unicode_funcs_is_immutable (hb_unicode_funcs_t *ufuncs); + +HB_EXTERN hb_unicode_funcs_t * +hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs); + + +/* + * funcs + */ + +/* typedefs */ + +typedef hb_unicode_combining_class_t (*hb_unicode_combining_class_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode, + void *user_data); +typedef unsigned int (*hb_unicode_eastasian_width_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode, + void *user_data); +typedef hb_unicode_general_category_t (*hb_unicode_general_category_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode, + void *user_data); +typedef hb_codepoint_t (*hb_unicode_mirroring_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode, + void *user_data); +typedef hb_script_t (*hb_unicode_script_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode, + void *user_data); + +typedef hb_bool_t (*hb_unicode_compose_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t a, + hb_codepoint_t b, + hb_codepoint_t *ab, + void *user_data); +typedef hb_bool_t (*hb_unicode_decompose_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t ab, + hb_codepoint_t *a, + hb_codepoint_t *b, + void *user_data); + +/** + * hb_unicode_decompose_compatibility_func_t: + * @ufuncs: a Unicode function structure + * @u: codepoint to decompose + * @decomposed: address of codepoint array (of length %HB_UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into + * @user_data: user data pointer as passed to hb_unicode_funcs_set_decompose_compatibility_func() + * + * Fully decompose @u to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to @decomposed. + * The complete length of the decomposition will be returned. + * + * If @u has no compatibility decomposition, zero should be returned. + * + * The Unicode standard guarantees that a buffer of length %HB_UNICODE_MAX_DECOMPOSITION_LEN codepoints will always be sufficient for any + * compatibility decomposition plus an terminating value of 0. Consequently, @decompose must be allocated by the caller to be at least this length. Implementations + * of this function type must ensure that they do not write past the provided array. + * + * Return value: number of codepoints in the full compatibility decomposition of @u, or 0 if no decomposition available. + */ +typedef unsigned int (*hb_unicode_decompose_compatibility_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t u, + hb_codepoint_t *decomposed, + void *user_data); + +/* See Unicode 6.1 for details on the maximum decomposition length. */ +#define HB_UNICODE_MAX_DECOMPOSITION_LEN (18+1) /* codepoints */ + +/* setters */ + +/** + * hb_unicode_funcs_set_combining_class_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_combining_class_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_eastasian_width_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_eastasian_width_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_general_category_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_general_category_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_general_category_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_mirroring_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_mirroring_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_mirroring_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_script_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_script_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_script_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_compose_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_compose_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_compose_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_decompose_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_decompose_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_decompose_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_decompose_compatibility_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_decompose_compatibility_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_decompose_compatibility_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/* accessors */ + +/** + * hb_unicode_combining_class: + * + * Since: 0.9.2 + **/ +HB_EXTERN hb_unicode_combining_class_t +hb_unicode_combining_class (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +/** + * hb_unicode_eastasian_width: + * + * Since: 0.9.2 + **/ +HB_EXTERN unsigned int +hb_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +/** + * hb_unicode_general_category: + * + * Since: 0.9.2 + **/ +HB_EXTERN hb_unicode_general_category_t +hb_unicode_general_category (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +/** + * hb_unicode_mirroring: + * + * Since: 0.9.2 + **/ +HB_EXTERN hb_codepoint_t +hb_unicode_mirroring (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +/** + * hb_unicode_script: + * + * Since: 0.9.2 + **/ +HB_EXTERN hb_script_t +hb_unicode_script (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +HB_EXTERN hb_bool_t +hb_unicode_compose (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t a, + hb_codepoint_t b, + hb_codepoint_t *ab); + +HB_EXTERN hb_bool_t +hb_unicode_decompose (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t ab, + hb_codepoint_t *a, + hb_codepoint_t *b); + +HB_EXTERN unsigned int +hb_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t u, + hb_codepoint_t *decomposed); + +HB_END_DECLS + +#endif /* HB_UNICODE_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-version.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-version.h new file mode 100755 index 00000000..f0f5a181 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb-version.h @@ -0,0 +1,66 @@ +/* + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_VERSION_H +#define HB_VERSION_H + +#include "hb-common.h" + +HB_BEGIN_DECLS + + +#define HB_VERSION_MAJOR 1 +#define HB_VERSION_MINOR 7 +#define HB_VERSION_MICRO 5 + +#define HB_VERSION_STRING "1.7.5" + +#define HB_VERSION_ATLEAST(major,minor,micro) \ + ((major)*10000+(minor)*100+(micro) <= \ + HB_VERSION_MAJOR*10000+HB_VERSION_MINOR*100+HB_VERSION_MICRO) + + +HB_EXTERN void +hb_version (unsigned int *major, + unsigned int *minor, + unsigned int *micro); + +HB_EXTERN const char * +hb_version_string (void); + +HB_EXTERN hb_bool_t +hb_version_atleast (unsigned int major, + unsigned int minor, + unsigned int micro); + + +HB_END_DECLS + +#endif /* HB_VERSION_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb.h new file mode 100755 index 00000000..7402034f --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/include/harfbuzz/hb.h @@ -0,0 +1,51 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_H +#define HB_H +#define HB_H_IN + +#ifndef HB_EXTERN +#define HB_EXTERN extern +#endif + +#include "hb-blob.h" +#include "hb-buffer.h" +#include "hb-common.h" +#include "hb-deprecated.h" +#include "hb-face.h" +#include "hb-font.h" +#include "hb-set.h" +#include "hb-shape.h" +#include "hb-shape-plan.h" +#include "hb-unicode.h" +#include "hb-version.h" + +HB_BEGIN_DECLS +HB_END_DECLS + +#undef HB_H_IN +#endif /* HB_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib/libharfbuzz-gobject.0.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib/libharfbuzz-gobject.0.dylib new file mode 100755 index 00000000..fca1853c Binary files /dev/null and b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib/libharfbuzz-gobject.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib/libharfbuzz-gobject.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib/libharfbuzz-gobject.dylib new file mode 120000 index 00000000..78c5b4be --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib/libharfbuzz-gobject.dylib @@ -0,0 +1 @@ +libharfbuzz-gobject.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib/libharfbuzz-icu.0.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib/libharfbuzz-icu.0.dylib new file mode 100755 index 00000000..d8e03dd8 Binary files /dev/null and b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib/libharfbuzz-icu.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib/libharfbuzz-icu.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib/libharfbuzz-icu.dylib new file mode 120000 index 00000000..b19944cc --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib/libharfbuzz-icu.dylib @@ -0,0 +1 @@ +libharfbuzz-icu.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib/libharfbuzz.0.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib/libharfbuzz.0.dylib new file mode 100755 index 00000000..fab64d7e Binary files /dev/null and b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib/libharfbuzz.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib/libharfbuzz.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib/libharfbuzz.dylib new file mode 120000 index 00000000..fbfe2d23 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.5/lib/libharfbuzz.dylib @@ -0,0 +1 @@ +libharfbuzz.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-blob.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-blob.h new file mode 100755 index 00000000..fd561f73 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-blob.h @@ -0,0 +1,129 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_BLOB_H +#define HB_BLOB_H + +#include "hb-common.h" + +HB_BEGIN_DECLS + + +/* + * Note re various memory-modes: + * + * - In no case shall the HarfBuzz client modify memory + * that is passed to HarfBuzz in a blob. If there is + * any such possibility, MODE_DUPLICATE should be used + * such that HarfBuzz makes a copy immediately, + * + * - Use MODE_READONLY otherwise, unless you really really + * really know what you are doing, + * + * - MODE_WRITABLE is appropriate if you really made a + * copy of data solely for the purpose of passing to + * HarfBuzz and doing that just once (no reuse!), + * + * - If the font is mmap()ed, it's ok to use + * READONLY_MAY_MAKE_WRITABLE, however, using that mode + * correctly is very tricky. Use MODE_READONLY instead. + */ +typedef enum { + HB_MEMORY_MODE_DUPLICATE, + HB_MEMORY_MODE_READONLY, + HB_MEMORY_MODE_WRITABLE, + HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE +} hb_memory_mode_t; + +typedef struct hb_blob_t hb_blob_t; + +HB_EXTERN hb_blob_t * +hb_blob_create (const char *data, + unsigned int length, + hb_memory_mode_t mode, + void *user_data, + hb_destroy_func_t destroy); + +/* Always creates with MEMORY_MODE_READONLY. + * Even if the parent blob is writable, we don't + * want the user of the sub-blob to be able to + * modify the parent data as that data may be + * shared among multiple sub-blobs. + */ +HB_EXTERN hb_blob_t * +hb_blob_create_sub_blob (hb_blob_t *parent, + unsigned int offset, + unsigned int length); + +HB_EXTERN hb_blob_t * +hb_blob_copy_writable_or_fail (hb_blob_t *blob); + +HB_EXTERN hb_blob_t * +hb_blob_get_empty (void); + +HB_EXTERN hb_blob_t * +hb_blob_reference (hb_blob_t *blob); + +HB_EXTERN void +hb_blob_destroy (hb_blob_t *blob); + +HB_EXTERN hb_bool_t +hb_blob_set_user_data (hb_blob_t *blob, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +HB_EXTERN void * +hb_blob_get_user_data (hb_blob_t *blob, + hb_user_data_key_t *key); + + +HB_EXTERN void +hb_blob_make_immutable (hb_blob_t *blob); + +HB_EXTERN hb_bool_t +hb_blob_is_immutable (hb_blob_t *blob); + + +HB_EXTERN unsigned int +hb_blob_get_length (hb_blob_t *blob); + +HB_EXTERN const char * +hb_blob_get_data (hb_blob_t *blob, unsigned int *length); + +HB_EXTERN char * +hb_blob_get_data_writable (hb_blob_t *blob, unsigned int *length); + + +HB_END_DECLS + +#endif /* HB_BLOB_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-buffer.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-buffer.h new file mode 100755 index 00000000..8a2d3e86 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-buffer.h @@ -0,0 +1,562 @@ +/* + * Copyright © 1998-2004 David Turner and Werner Lemberg + * Copyright © 2004,2007,2009 Red Hat, Inc. + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Owen Taylor, Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_BUFFER_H +#define HB_BUFFER_H + +#include "hb-common.h" +#include "hb-unicode.h" +#include "hb-font.h" + +HB_BEGIN_DECLS + +/** + * hb_glyph_info_t: + * @codepoint: either a Unicode code point (before shaping) or a glyph index + * (after shaping). + * @mask: + * @cluster: the index of the character in the original text that corresponds + * to this #hb_glyph_info_t, or whatever the client passes to + * hb_buffer_add(). More than one #hb_glyph_info_t can have the same + * @cluster value, if they resulted from the same character (e.g. one + * to many glyph substitution), and when more than one character gets + * merged in the same glyph (e.g. many to one glyph substitution) the + * #hb_glyph_info_t will have the smallest cluster value of them. + * By default some characters are merged into the same cluster + * (e.g. combining marks have the same cluster as their bases) + * even if they are separate glyphs, hb_buffer_set_cluster_level() + * allow selecting more fine-grained cluster handling. + * + * The #hb_glyph_info_t is the structure that holds information about the + * glyphs and their relation to input text. + * + */ +typedef struct hb_glyph_info_t { + hb_codepoint_t codepoint; + hb_mask_t mask; /* Holds hb_glyph_flags_t after hb_shape(), plus other things. */ + uint32_t cluster; + + /*< private >*/ + hb_var_int_t var1; + hb_var_int_t var2; +} hb_glyph_info_t; + +/** + * hb_glyph_flags_t: + * @HB_GLYPH_FLAG_UNSAFE_TO_BREAK: Indicates that if input text is broken at the + * beginning of the cluster this glyph is part of, + * then both sides need to be re-shaped, as the + * result might be different. On the flip side, + * it means that when this flag is not present, + * then it's safe to break the glyph-run at the + * beginning of this cluster, and the two sides + * represent the exact same result one would get + * if breaking input text at the beginning of + * this cluster and shaping the two sides + * separately. This can be used to optimize + * paragraph layout, by avoiding re-shaping + * of each line after line-breaking, or limiting + * the reshaping to a small piece around the + * breaking point only. + */ +typedef enum { /*< flags >*/ + HB_GLYPH_FLAG_UNSAFE_TO_BREAK = 0x00000001, + + HB_GLYPH_FLAG_DEFINED = 0x00000001 /* OR of all defined flags */ +} hb_glyph_flags_t; + +HB_EXTERN hb_glyph_flags_t +hb_glyph_info_get_glyph_flags (const hb_glyph_info_t *info); + +#define hb_glyph_info_get_glyph_flags(info) \ + ((hb_glyph_flags_t) ((unsigned int) (info)->mask & HB_GLYPH_FLAG_DEFINED)) + + +/** + * hb_glyph_position_t: + * @x_advance: how much the line advances after drawing this glyph when setting + * text in horizontal direction. + * @y_advance: how much the line advances after drawing this glyph when setting + * text in vertical direction. + * @x_offset: how much the glyph moves on the X-axis before drawing it, this + * should not affect how much the line advances. + * @y_offset: how much the glyph moves on the Y-axis before drawing it, this + * should not affect how much the line advances. + * + * The #hb_glyph_position_t is the structure that holds the positions of the + * glyph in both horizontal and vertical directions. All positions in + * #hb_glyph_position_t are relative to the current point. + * + */ +typedef struct hb_glyph_position_t { + hb_position_t x_advance; + hb_position_t y_advance; + hb_position_t x_offset; + hb_position_t y_offset; + + /*< private >*/ + hb_var_int_t var; +} hb_glyph_position_t; + +/** + * hb_segment_properties_t: + * @direction: the #hb_direction_t of the buffer, see hb_buffer_set_direction(). + * @script: the #hb_script_t of the buffer, see hb_buffer_set_script(). + * @language: the #hb_language_t of the buffer, see hb_buffer_set_language(). + * + * The structure that holds various text properties of an #hb_buffer_t. Can be + * set and retrieved using hb_buffer_set_segment_properties() and + * hb_buffer_get_segment_properties(), respectively. + */ +typedef struct hb_segment_properties_t { + hb_direction_t direction; + hb_script_t script; + hb_language_t language; + /*< private >*/ + void *reserved1; + void *reserved2; +} hb_segment_properties_t; + +#define HB_SEGMENT_PROPERTIES_DEFAULT {HB_DIRECTION_INVALID, \ + HB_SCRIPT_INVALID, \ + HB_LANGUAGE_INVALID, \ + (void *) 0, \ + (void *) 0} + +HB_EXTERN hb_bool_t +hb_segment_properties_equal (const hb_segment_properties_t *a, + const hb_segment_properties_t *b); + +HB_EXTERN unsigned int +hb_segment_properties_hash (const hb_segment_properties_t *p); + + + +/** + * hb_buffer_t: + * + * The main structure holding the input text and its properties before shaping, + * and output glyphs and their information after shaping. + */ + +typedef struct hb_buffer_t hb_buffer_t; + +HB_EXTERN hb_buffer_t * +hb_buffer_create (void); + +HB_EXTERN hb_buffer_t * +hb_buffer_get_empty (void); + +HB_EXTERN hb_buffer_t * +hb_buffer_reference (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_destroy (hb_buffer_t *buffer); + +HB_EXTERN hb_bool_t +hb_buffer_set_user_data (hb_buffer_t *buffer, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + +HB_EXTERN void * +hb_buffer_get_user_data (hb_buffer_t *buffer, + hb_user_data_key_t *key); + + +/** + * hb_buffer_content_type_t: + * @HB_BUFFER_CONTENT_TYPE_INVALID: Initial value for new buffer. + * @HB_BUFFER_CONTENT_TYPE_UNICODE: The buffer contains input characters (before shaping). + * @HB_BUFFER_CONTENT_TYPE_GLYPHS: The buffer contains output glyphs (after shaping). + */ +typedef enum { + HB_BUFFER_CONTENT_TYPE_INVALID = 0, + HB_BUFFER_CONTENT_TYPE_UNICODE, + HB_BUFFER_CONTENT_TYPE_GLYPHS +} hb_buffer_content_type_t; + +HB_EXTERN void +hb_buffer_set_content_type (hb_buffer_t *buffer, + hb_buffer_content_type_t content_type); + +HB_EXTERN hb_buffer_content_type_t +hb_buffer_get_content_type (hb_buffer_t *buffer); + + +HB_EXTERN void +hb_buffer_set_unicode_funcs (hb_buffer_t *buffer, + hb_unicode_funcs_t *unicode_funcs); + +HB_EXTERN hb_unicode_funcs_t * +hb_buffer_get_unicode_funcs (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_set_direction (hb_buffer_t *buffer, + hb_direction_t direction); + +HB_EXTERN hb_direction_t +hb_buffer_get_direction (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_set_script (hb_buffer_t *buffer, + hb_script_t script); + +HB_EXTERN hb_script_t +hb_buffer_get_script (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_set_language (hb_buffer_t *buffer, + hb_language_t language); + + +HB_EXTERN hb_language_t +hb_buffer_get_language (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_set_segment_properties (hb_buffer_t *buffer, + const hb_segment_properties_t *props); + +HB_EXTERN void +hb_buffer_get_segment_properties (hb_buffer_t *buffer, + hb_segment_properties_t *props); + +HB_EXTERN void +hb_buffer_guess_segment_properties (hb_buffer_t *buffer); + + +/** + * hb_buffer_flags_t: + * @HB_BUFFER_FLAG_DEFAULT: the default buffer flag. + * @HB_BUFFER_FLAG_BOT: flag indicating that special handling of the beginning + * of text paragraph can be applied to this buffer. Should usually + * be set, unless you are passing to the buffer only part + * of the text without the full context. + * @HB_BUFFER_FLAG_EOT: flag indicating that special handling of the end of text + * paragraph can be applied to this buffer, similar to + * @HB_BUFFER_FLAG_BOT. + * @HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES: + * flag indication that character with Default_Ignorable + * Unicode property should use the corresponding glyph + * from the font, instead of hiding them (done by + * replacing them with the space glyph and zeroing the + * advance width.) This flag takes precedence over + * @HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES. + * @HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES: + * flag indication that character with Default_Ignorable + * Unicode property should be removed from glyph string + * instead of hiding them (done by replacing them with the + * space glyph and zeroing the advance width.) + * @HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES takes + * precedence over this flag. Since: 1.8.0 + * + * Since: 0.9.20 + */ +typedef enum { /*< flags >*/ + HB_BUFFER_FLAG_DEFAULT = 0x00000000u, + HB_BUFFER_FLAG_BOT = 0x00000001u, /* Beginning-of-text */ + HB_BUFFER_FLAG_EOT = 0x00000002u, /* End-of-text */ + HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES = 0x00000004u, + HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES = 0x00000008u +} hb_buffer_flags_t; + +HB_EXTERN void +hb_buffer_set_flags (hb_buffer_t *buffer, + hb_buffer_flags_t flags); + +HB_EXTERN hb_buffer_flags_t +hb_buffer_get_flags (hb_buffer_t *buffer); + +/* + * Since: 0.9.42 + */ +typedef enum { + HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES = 0, + HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS = 1, + HB_BUFFER_CLUSTER_LEVEL_CHARACTERS = 2, + HB_BUFFER_CLUSTER_LEVEL_DEFAULT = HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES +} hb_buffer_cluster_level_t; + +HB_EXTERN void +hb_buffer_set_cluster_level (hb_buffer_t *buffer, + hb_buffer_cluster_level_t cluster_level); + +HB_EXTERN hb_buffer_cluster_level_t +hb_buffer_get_cluster_level (hb_buffer_t *buffer); + +/** + * HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT: + * + * The default code point for replacing invalid characters in a given encoding. + * Set to U+FFFD REPLACEMENT CHARACTER. + * + * Since: 0.9.31 + */ +#define HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT 0xFFFDu + +HB_EXTERN void +hb_buffer_set_replacement_codepoint (hb_buffer_t *buffer, + hb_codepoint_t replacement); + +HB_EXTERN hb_codepoint_t +hb_buffer_get_replacement_codepoint (hb_buffer_t *buffer); + + +HB_EXTERN void +hb_buffer_reset (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_clear_contents (hb_buffer_t *buffer); + +HB_EXTERN hb_bool_t +hb_buffer_pre_allocate (hb_buffer_t *buffer, + unsigned int size); + + +HB_EXTERN hb_bool_t +hb_buffer_allocation_successful (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_reverse (hb_buffer_t *buffer); + +HB_EXTERN void +hb_buffer_reverse_range (hb_buffer_t *buffer, + unsigned int start, unsigned int end); + +HB_EXTERN void +hb_buffer_reverse_clusters (hb_buffer_t *buffer); + + +/* Filling the buffer in */ + +HB_EXTERN void +hb_buffer_add (hb_buffer_t *buffer, + hb_codepoint_t codepoint, + unsigned int cluster); + +HB_EXTERN void +hb_buffer_add_utf8 (hb_buffer_t *buffer, + const char *text, + int text_length, + unsigned int item_offset, + int item_length); + +HB_EXTERN void +hb_buffer_add_utf16 (hb_buffer_t *buffer, + const uint16_t *text, + int text_length, + unsigned int item_offset, + int item_length); + +HB_EXTERN void +hb_buffer_add_utf32 (hb_buffer_t *buffer, + const uint32_t *text, + int text_length, + unsigned int item_offset, + int item_length); + +HB_EXTERN void +hb_buffer_add_latin1 (hb_buffer_t *buffer, + const uint8_t *text, + int text_length, + unsigned int item_offset, + int item_length); + +HB_EXTERN void +hb_buffer_add_codepoints (hb_buffer_t *buffer, + const hb_codepoint_t *text, + int text_length, + unsigned int item_offset, + int item_length); + +HB_EXTERN void +hb_buffer_append (hb_buffer_t *buffer, + hb_buffer_t *source, + unsigned int start, + unsigned int end); + +HB_EXTERN hb_bool_t +hb_buffer_set_length (hb_buffer_t *buffer, + unsigned int length); + +HB_EXTERN unsigned int +hb_buffer_get_length (hb_buffer_t *buffer); + +/* Getting glyphs out of the buffer */ + +HB_EXTERN hb_glyph_info_t * +hb_buffer_get_glyph_infos (hb_buffer_t *buffer, + unsigned int *length); + +HB_EXTERN hb_glyph_position_t * +hb_buffer_get_glyph_positions (hb_buffer_t *buffer, + unsigned int *length); + + +HB_EXTERN void +hb_buffer_normalize_glyphs (hb_buffer_t *buffer); + + +/* + * Serialize + */ + +/** + * hb_buffer_serialize_flags_t: + * @HB_BUFFER_SERIALIZE_FLAG_DEFAULT: serialize glyph names, clusters and positions. + * @HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS: do not serialize glyph cluster. + * @HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS: do not serialize glyph position information. + * @HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES: do no serialize glyph name. + * @HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS: serialize glyph extents. + * @HB_BUFFER_SERIALIZE_FLAG_GLYPH_FLAGS: serialize glyph flags. Since: 1.5.0 + * @HB_BUFFER_SERIALIZE_FLAG_NO_ADVANCES: do not serialize glyph advances, + * glyph offsets will reflect absolute glyph positions. Since: 1.8.0 + * + * Flags that control what glyph information are serialized in hb_buffer_serialize_glyphs(). + * + * Since: 0.9.20 + */ +typedef enum { /*< flags >*/ + HB_BUFFER_SERIALIZE_FLAG_DEFAULT = 0x00000000u, + HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS = 0x00000001u, + HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS = 0x00000002u, + HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES = 0x00000004u, + HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS = 0x00000008u, + HB_BUFFER_SERIALIZE_FLAG_GLYPH_FLAGS = 0x00000010u, + HB_BUFFER_SERIALIZE_FLAG_NO_ADVANCES = 0x00000020u +} hb_buffer_serialize_flags_t; + +/** + * hb_buffer_serialize_format_t: + * @HB_BUFFER_SERIALIZE_FORMAT_TEXT: a human-readable, plain text format. + * @HB_BUFFER_SERIALIZE_FORMAT_JSON: a machine-readable JSON format. + * @HB_BUFFER_SERIALIZE_FORMAT_INVALID: invalid format. + * + * The buffer serialization and de-serialization format used in + * hb_buffer_serialize_glyphs() and hb_buffer_deserialize_glyphs(). + * + * Since: 0.9.2 + */ +typedef enum { + HB_BUFFER_SERIALIZE_FORMAT_TEXT = HB_TAG('T','E','X','T'), + HB_BUFFER_SERIALIZE_FORMAT_JSON = HB_TAG('J','S','O','N'), + HB_BUFFER_SERIALIZE_FORMAT_INVALID = HB_TAG_NONE +} hb_buffer_serialize_format_t; + +HB_EXTERN hb_buffer_serialize_format_t +hb_buffer_serialize_format_from_string (const char *str, int len); + +HB_EXTERN const char * +hb_buffer_serialize_format_to_string (hb_buffer_serialize_format_t format); + +HB_EXTERN const char ** +hb_buffer_serialize_list_formats (void); + +HB_EXTERN unsigned int +hb_buffer_serialize_glyphs (hb_buffer_t *buffer, + unsigned int start, + unsigned int end, + char *buf, + unsigned int buf_size, + unsigned int *buf_consumed, + hb_font_t *font, + hb_buffer_serialize_format_t format, + hb_buffer_serialize_flags_t flags); + +HB_EXTERN hb_bool_t +hb_buffer_deserialize_glyphs (hb_buffer_t *buffer, + const char *buf, + int buf_len, + const char **end_ptr, + hb_font_t *font, + hb_buffer_serialize_format_t format); + + +/* + * Compare buffers + */ + +typedef enum { /*< flags >*/ + HB_BUFFER_DIFF_FLAG_EQUAL = 0x0000, + + /* Buffers with different content_type cannot be meaningfully compared + * in any further detail. */ + HB_BUFFER_DIFF_FLAG_CONTENT_TYPE_MISMATCH = 0x0001, + + /* For buffers with differing length, the per-glyph comparison is not + * attempted, though we do still scan reference for dottedcircle / .notdef + * glyphs. */ + HB_BUFFER_DIFF_FLAG_LENGTH_MISMATCH = 0x0002, + + /* We want to know if dottedcircle / .notdef glyphs are present in the + * reference, as we may not care so much about other differences in this + * case. */ + HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT = 0x0004, + HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT = 0x0008, + + /* If the buffers have the same length, we compare them glyph-by-glyph + * and report which aspect(s) of the glyph info/position are different. */ + HB_BUFFER_DIFF_FLAG_CODEPOINT_MISMATCH = 0x0010, + HB_BUFFER_DIFF_FLAG_CLUSTER_MISMATCH = 0x0020, + HB_BUFFER_DIFF_FLAG_GLYPH_FLAGS_MISMATCH = 0x0040, + HB_BUFFER_DIFF_FLAG_POSITION_MISMATCH = 0x0080 + +} hb_buffer_diff_flags_t; + +/* Compare the contents of two buffers, report types of differences. */ +HB_EXTERN hb_buffer_diff_flags_t +hb_buffer_diff (hb_buffer_t *buffer, + hb_buffer_t *reference, + hb_codepoint_t dottedcircle_glyph, + unsigned int position_fuzz); + + +/* + * Debugging. + */ + +typedef hb_bool_t (*hb_buffer_message_func_t) (hb_buffer_t *buffer, + hb_font_t *font, + const char *message, + void *user_data); + +HB_EXTERN void +hb_buffer_set_message_func (hb_buffer_t *buffer, + hb_buffer_message_func_t func, + void *user_data, hb_destroy_func_t destroy); + + +HB_END_DECLS + +#endif /* HB_BUFFER_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-common.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-common.h new file mode 100755 index 00000000..26200ce1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-common.h @@ -0,0 +1,397 @@ +/* + * Copyright © 2007,2008,2009 Red Hat, Inc. + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_COMMON_H +#define HB_COMMON_H + +#ifndef HB_BEGIN_DECLS +# ifdef __cplusplus +# define HB_BEGIN_DECLS extern "C" { +# define HB_END_DECLS } +# else /* !__cplusplus */ +# define HB_BEGIN_DECLS +# define HB_END_DECLS +# endif /* !__cplusplus */ +#endif + +#if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || \ + defined (_sgi) || defined (__sun) || defined (sun) || \ + defined (__digital__) || defined (__HP_cc) +# include <inttypes.h> +#elif defined (_AIX) +# include <sys/inttypes.h> +#else +# include <stdint.h> +#endif + +HB_BEGIN_DECLS + + +typedef int hb_bool_t; + +typedef uint32_t hb_codepoint_t; +typedef int32_t hb_position_t; +typedef uint32_t hb_mask_t; + +typedef union _hb_var_int_t { + uint32_t u32; + int32_t i32; + uint16_t u16[2]; + int16_t i16[2]; + uint8_t u8[4]; + int8_t i8[4]; +} hb_var_int_t; + + +/* hb_tag_t */ + +typedef uint32_t hb_tag_t; + +#define HB_TAG(c1,c2,c3,c4) ((hb_tag_t)((((uint8_t)(c1))<<24)|(((uint8_t)(c2))<<16)|(((uint8_t)(c3))<<8)|((uint8_t)(c4)))) +#define HB_UNTAG(tag) ((uint8_t)((tag)>>24)), ((uint8_t)((tag)>>16)), ((uint8_t)((tag)>>8)), ((uint8_t)(tag)) + +#define HB_TAG_NONE HB_TAG(0,0,0,0) +#define HB_TAG_MAX HB_TAG(0xff,0xff,0xff,0xff) +#define HB_TAG_MAX_SIGNED HB_TAG(0x7f,0xff,0xff,0xff) + +/* len=-1 means str is NUL-terminated. */ +HB_EXTERN hb_tag_t +hb_tag_from_string (const char *str, int len); + +/* buf should have 4 bytes. */ +HB_EXTERN void +hb_tag_to_string (hb_tag_t tag, char *buf); + + +/** + * hb_direction_t: + * @HB_DIRECTION_INVALID: Initial, unset direction. + * @HB_DIRECTION_LTR: Text is set horizontally from left to right. + * @HB_DIRECTION_RTL: Text is set horizontally from right to left. + * @HB_DIRECTION_TTB: Text is set vertically from top to bottom. + * @HB_DIRECTION_BTT: Text is set vertically from bottom to top. + */ +typedef enum { + HB_DIRECTION_INVALID = 0, + HB_DIRECTION_LTR = 4, + HB_DIRECTION_RTL, + HB_DIRECTION_TTB, + HB_DIRECTION_BTT +} hb_direction_t; + +/* len=-1 means str is NUL-terminated */ +HB_EXTERN hb_direction_t +hb_direction_from_string (const char *str, int len); + +HB_EXTERN const char * +hb_direction_to_string (hb_direction_t direction); + +#define HB_DIRECTION_IS_VALID(dir) ((((unsigned int) (dir)) & ~3U) == 4) +/* Direction must be valid for the following */ +#define HB_DIRECTION_IS_HORIZONTAL(dir) ((((unsigned int) (dir)) & ~1U) == 4) +#define HB_DIRECTION_IS_VERTICAL(dir) ((((unsigned int) (dir)) & ~1U) == 6) +#define HB_DIRECTION_IS_FORWARD(dir) ((((unsigned int) (dir)) & ~2U) == 4) +#define HB_DIRECTION_IS_BACKWARD(dir) ((((unsigned int) (dir)) & ~2U) == 5) +#define HB_DIRECTION_REVERSE(dir) ((hb_direction_t) (((unsigned int) (dir)) ^ 1)) + + +/* hb_language_t */ + +typedef const struct hb_language_impl_t *hb_language_t; + +HB_EXTERN hb_language_t +hb_language_from_string (const char *str, int len); + +HB_EXTERN const char * +hb_language_to_string (hb_language_t language); + +#define HB_LANGUAGE_INVALID ((hb_language_t) 0) + +HB_EXTERN hb_language_t +hb_language_get_default (void); + + +/* hb_script_t */ + +/* http://unicode.org/iso15924/ */ +/* http://goo.gl/x9ilM */ +/* Unicode Character Database property: Script (sc) */ +typedef enum +{ + /*1.1*/ HB_SCRIPT_COMMON = HB_TAG ('Z','y','y','y'), + /*1.1*/ HB_SCRIPT_INHERITED = HB_TAG ('Z','i','n','h'), + /*5.0*/ HB_SCRIPT_UNKNOWN = HB_TAG ('Z','z','z','z'), + + /*1.1*/ HB_SCRIPT_ARABIC = HB_TAG ('A','r','a','b'), + /*1.1*/ HB_SCRIPT_ARMENIAN = HB_TAG ('A','r','m','n'), + /*1.1*/ HB_SCRIPT_BENGALI = HB_TAG ('B','e','n','g'), + /*1.1*/ HB_SCRIPT_CYRILLIC = HB_TAG ('C','y','r','l'), + /*1.1*/ HB_SCRIPT_DEVANAGARI = HB_TAG ('D','e','v','a'), + /*1.1*/ HB_SCRIPT_GEORGIAN = HB_TAG ('G','e','o','r'), + /*1.1*/ HB_SCRIPT_GREEK = HB_TAG ('G','r','e','k'), + /*1.1*/ HB_SCRIPT_GUJARATI = HB_TAG ('G','u','j','r'), + /*1.1*/ HB_SCRIPT_GURMUKHI = HB_TAG ('G','u','r','u'), + /*1.1*/ HB_SCRIPT_HANGUL = HB_TAG ('H','a','n','g'), + /*1.1*/ HB_SCRIPT_HAN = HB_TAG ('H','a','n','i'), + /*1.1*/ HB_SCRIPT_HEBREW = HB_TAG ('H','e','b','r'), + /*1.1*/ HB_SCRIPT_HIRAGANA = HB_TAG ('H','i','r','a'), + /*1.1*/ HB_SCRIPT_KANNADA = HB_TAG ('K','n','d','a'), + /*1.1*/ HB_SCRIPT_KATAKANA = HB_TAG ('K','a','n','a'), + /*1.1*/ HB_SCRIPT_LAO = HB_TAG ('L','a','o','o'), + /*1.1*/ HB_SCRIPT_LATIN = HB_TAG ('L','a','t','n'), + /*1.1*/ HB_SCRIPT_MALAYALAM = HB_TAG ('M','l','y','m'), + /*1.1*/ HB_SCRIPT_ORIYA = HB_TAG ('O','r','y','a'), + /*1.1*/ HB_SCRIPT_TAMIL = HB_TAG ('T','a','m','l'), + /*1.1*/ HB_SCRIPT_TELUGU = HB_TAG ('T','e','l','u'), + /*1.1*/ HB_SCRIPT_THAI = HB_TAG ('T','h','a','i'), + + /*2.0*/ HB_SCRIPT_TIBETAN = HB_TAG ('T','i','b','t'), + + /*3.0*/ HB_SCRIPT_BOPOMOFO = HB_TAG ('B','o','p','o'), + /*3.0*/ HB_SCRIPT_BRAILLE = HB_TAG ('B','r','a','i'), + /*3.0*/ HB_SCRIPT_CANADIAN_SYLLABICS = HB_TAG ('C','a','n','s'), + /*3.0*/ HB_SCRIPT_CHEROKEE = HB_TAG ('C','h','e','r'), + /*3.0*/ HB_SCRIPT_ETHIOPIC = HB_TAG ('E','t','h','i'), + /*3.0*/ HB_SCRIPT_KHMER = HB_TAG ('K','h','m','r'), + /*3.0*/ HB_SCRIPT_MONGOLIAN = HB_TAG ('M','o','n','g'), + /*3.0*/ HB_SCRIPT_MYANMAR = HB_TAG ('M','y','m','r'), + /*3.0*/ HB_SCRIPT_OGHAM = HB_TAG ('O','g','a','m'), + /*3.0*/ HB_SCRIPT_RUNIC = HB_TAG ('R','u','n','r'), + /*3.0*/ HB_SCRIPT_SINHALA = HB_TAG ('S','i','n','h'), + /*3.0*/ HB_SCRIPT_SYRIAC = HB_TAG ('S','y','r','c'), + /*3.0*/ HB_SCRIPT_THAANA = HB_TAG ('T','h','a','a'), + /*3.0*/ HB_SCRIPT_YI = HB_TAG ('Y','i','i','i'), + + /*3.1*/ HB_SCRIPT_DESERET = HB_TAG ('D','s','r','t'), + /*3.1*/ HB_SCRIPT_GOTHIC = HB_TAG ('G','o','t','h'), + /*3.1*/ HB_SCRIPT_OLD_ITALIC = HB_TAG ('I','t','a','l'), + + /*3.2*/ HB_SCRIPT_BUHID = HB_TAG ('B','u','h','d'), + /*3.2*/ HB_SCRIPT_HANUNOO = HB_TAG ('H','a','n','o'), + /*3.2*/ HB_SCRIPT_TAGALOG = HB_TAG ('T','g','l','g'), + /*3.2*/ HB_SCRIPT_TAGBANWA = HB_TAG ('T','a','g','b'), + + /*4.0*/ HB_SCRIPT_CYPRIOT = HB_TAG ('C','p','r','t'), + /*4.0*/ HB_SCRIPT_LIMBU = HB_TAG ('L','i','m','b'), + /*4.0*/ HB_SCRIPT_LINEAR_B = HB_TAG ('L','i','n','b'), + /*4.0*/ HB_SCRIPT_OSMANYA = HB_TAG ('O','s','m','a'), + /*4.0*/ HB_SCRIPT_SHAVIAN = HB_TAG ('S','h','a','w'), + /*4.0*/ HB_SCRIPT_TAI_LE = HB_TAG ('T','a','l','e'), + /*4.0*/ HB_SCRIPT_UGARITIC = HB_TAG ('U','g','a','r'), + + /*4.1*/ HB_SCRIPT_BUGINESE = HB_TAG ('B','u','g','i'), + /*4.1*/ HB_SCRIPT_COPTIC = HB_TAG ('C','o','p','t'), + /*4.1*/ HB_SCRIPT_GLAGOLITIC = HB_TAG ('G','l','a','g'), + /*4.1*/ HB_SCRIPT_KHAROSHTHI = HB_TAG ('K','h','a','r'), + /*4.1*/ HB_SCRIPT_NEW_TAI_LUE = HB_TAG ('T','a','l','u'), + /*4.1*/ HB_SCRIPT_OLD_PERSIAN = HB_TAG ('X','p','e','o'), + /*4.1*/ HB_SCRIPT_SYLOTI_NAGRI = HB_TAG ('S','y','l','o'), + /*4.1*/ HB_SCRIPT_TIFINAGH = HB_TAG ('T','f','n','g'), + + /*5.0*/ HB_SCRIPT_BALINESE = HB_TAG ('B','a','l','i'), + /*5.0*/ HB_SCRIPT_CUNEIFORM = HB_TAG ('X','s','u','x'), + /*5.0*/ HB_SCRIPT_NKO = HB_TAG ('N','k','o','o'), + /*5.0*/ HB_SCRIPT_PHAGS_PA = HB_TAG ('P','h','a','g'), + /*5.0*/ HB_SCRIPT_PHOENICIAN = HB_TAG ('P','h','n','x'), + + /*5.1*/ HB_SCRIPT_CARIAN = HB_TAG ('C','a','r','i'), + /*5.1*/ HB_SCRIPT_CHAM = HB_TAG ('C','h','a','m'), + /*5.1*/ HB_SCRIPT_KAYAH_LI = HB_TAG ('K','a','l','i'), + /*5.1*/ HB_SCRIPT_LEPCHA = HB_TAG ('L','e','p','c'), + /*5.1*/ HB_SCRIPT_LYCIAN = HB_TAG ('L','y','c','i'), + /*5.1*/ HB_SCRIPT_LYDIAN = HB_TAG ('L','y','d','i'), + /*5.1*/ HB_SCRIPT_OL_CHIKI = HB_TAG ('O','l','c','k'), + /*5.1*/ HB_SCRIPT_REJANG = HB_TAG ('R','j','n','g'), + /*5.1*/ HB_SCRIPT_SAURASHTRA = HB_TAG ('S','a','u','r'), + /*5.1*/ HB_SCRIPT_SUNDANESE = HB_TAG ('S','u','n','d'), + /*5.1*/ HB_SCRIPT_VAI = HB_TAG ('V','a','i','i'), + + /*5.2*/ HB_SCRIPT_AVESTAN = HB_TAG ('A','v','s','t'), + /*5.2*/ HB_SCRIPT_BAMUM = HB_TAG ('B','a','m','u'), + /*5.2*/ HB_SCRIPT_EGYPTIAN_HIEROGLYPHS = HB_TAG ('E','g','y','p'), + /*5.2*/ HB_SCRIPT_IMPERIAL_ARAMAIC = HB_TAG ('A','r','m','i'), + /*5.2*/ HB_SCRIPT_INSCRIPTIONAL_PAHLAVI = HB_TAG ('P','h','l','i'), + /*5.2*/ HB_SCRIPT_INSCRIPTIONAL_PARTHIAN = HB_TAG ('P','r','t','i'), + /*5.2*/ HB_SCRIPT_JAVANESE = HB_TAG ('J','a','v','a'), + /*5.2*/ HB_SCRIPT_KAITHI = HB_TAG ('K','t','h','i'), + /*5.2*/ HB_SCRIPT_LISU = HB_TAG ('L','i','s','u'), + /*5.2*/ HB_SCRIPT_MEETEI_MAYEK = HB_TAG ('M','t','e','i'), + /*5.2*/ HB_SCRIPT_OLD_SOUTH_ARABIAN = HB_TAG ('S','a','r','b'), + /*5.2*/ HB_SCRIPT_OLD_TURKIC = HB_TAG ('O','r','k','h'), + /*5.2*/ HB_SCRIPT_SAMARITAN = HB_TAG ('S','a','m','r'), + /*5.2*/ HB_SCRIPT_TAI_THAM = HB_TAG ('L','a','n','a'), + /*5.2*/ HB_SCRIPT_TAI_VIET = HB_TAG ('T','a','v','t'), + + /*6.0*/ HB_SCRIPT_BATAK = HB_TAG ('B','a','t','k'), + /*6.0*/ HB_SCRIPT_BRAHMI = HB_TAG ('B','r','a','h'), + /*6.0*/ HB_SCRIPT_MANDAIC = HB_TAG ('M','a','n','d'), + + /*6.1*/ HB_SCRIPT_CHAKMA = HB_TAG ('C','a','k','m'), + /*6.1*/ HB_SCRIPT_MEROITIC_CURSIVE = HB_TAG ('M','e','r','c'), + /*6.1*/ HB_SCRIPT_MEROITIC_HIEROGLYPHS = HB_TAG ('M','e','r','o'), + /*6.1*/ HB_SCRIPT_MIAO = HB_TAG ('P','l','r','d'), + /*6.1*/ HB_SCRIPT_SHARADA = HB_TAG ('S','h','r','d'), + /*6.1*/ HB_SCRIPT_SORA_SOMPENG = HB_TAG ('S','o','r','a'), + /*6.1*/ HB_SCRIPT_TAKRI = HB_TAG ('T','a','k','r'), + + /* + * Since: 0.9.30 + */ + /*7.0*/ HB_SCRIPT_BASSA_VAH = HB_TAG ('B','a','s','s'), + /*7.0*/ HB_SCRIPT_CAUCASIAN_ALBANIAN = HB_TAG ('A','g','h','b'), + /*7.0*/ HB_SCRIPT_DUPLOYAN = HB_TAG ('D','u','p','l'), + /*7.0*/ HB_SCRIPT_ELBASAN = HB_TAG ('E','l','b','a'), + /*7.0*/ HB_SCRIPT_GRANTHA = HB_TAG ('G','r','a','n'), + /*7.0*/ HB_SCRIPT_KHOJKI = HB_TAG ('K','h','o','j'), + /*7.0*/ HB_SCRIPT_KHUDAWADI = HB_TAG ('S','i','n','d'), + /*7.0*/ HB_SCRIPT_LINEAR_A = HB_TAG ('L','i','n','a'), + /*7.0*/ HB_SCRIPT_MAHAJANI = HB_TAG ('M','a','h','j'), + /*7.0*/ HB_SCRIPT_MANICHAEAN = HB_TAG ('M','a','n','i'), + /*7.0*/ HB_SCRIPT_MENDE_KIKAKUI = HB_TAG ('M','e','n','d'), + /*7.0*/ HB_SCRIPT_MODI = HB_TAG ('M','o','d','i'), + /*7.0*/ HB_SCRIPT_MRO = HB_TAG ('M','r','o','o'), + /*7.0*/ HB_SCRIPT_NABATAEAN = HB_TAG ('N','b','a','t'), + /*7.0*/ HB_SCRIPT_OLD_NORTH_ARABIAN = HB_TAG ('N','a','r','b'), + /*7.0*/ HB_SCRIPT_OLD_PERMIC = HB_TAG ('P','e','r','m'), + /*7.0*/ HB_SCRIPT_PAHAWH_HMONG = HB_TAG ('H','m','n','g'), + /*7.0*/ HB_SCRIPT_PALMYRENE = HB_TAG ('P','a','l','m'), + /*7.0*/ HB_SCRIPT_PAU_CIN_HAU = HB_TAG ('P','a','u','c'), + /*7.0*/ HB_SCRIPT_PSALTER_PAHLAVI = HB_TAG ('P','h','l','p'), + /*7.0*/ HB_SCRIPT_SIDDHAM = HB_TAG ('S','i','d','d'), + /*7.0*/ HB_SCRIPT_TIRHUTA = HB_TAG ('T','i','r','h'), + /*7.0*/ HB_SCRIPT_WARANG_CITI = HB_TAG ('W','a','r','a'), + + /*8.0*/ HB_SCRIPT_AHOM = HB_TAG ('A','h','o','m'), + /*8.0*/ HB_SCRIPT_ANATOLIAN_HIEROGLYPHS = HB_TAG ('H','l','u','w'), + /*8.0*/ HB_SCRIPT_HATRAN = HB_TAG ('H','a','t','r'), + /*8.0*/ HB_SCRIPT_MULTANI = HB_TAG ('M','u','l','t'), + /*8.0*/ HB_SCRIPT_OLD_HUNGARIAN = HB_TAG ('H','u','n','g'), + /*8.0*/ HB_SCRIPT_SIGNWRITING = HB_TAG ('S','g','n','w'), + + /* + * Since 1.3.0 + */ + /*9.0*/ HB_SCRIPT_ADLAM = HB_TAG ('A','d','l','m'), + /*9.0*/ HB_SCRIPT_BHAIKSUKI = HB_TAG ('B','h','k','s'), + /*9.0*/ HB_SCRIPT_MARCHEN = HB_TAG ('M','a','r','c'), + /*9.0*/ HB_SCRIPT_OSAGE = HB_TAG ('O','s','g','e'), + /*9.0*/ HB_SCRIPT_TANGUT = HB_TAG ('T','a','n','g'), + /*9.0*/ HB_SCRIPT_NEWA = HB_TAG ('N','e','w','a'), + + /* + * Since 1.6.0 + */ + /*10.0*/HB_SCRIPT_MASARAM_GONDI = HB_TAG ('G','o','n','m'), + /*10.0*/HB_SCRIPT_NUSHU = HB_TAG ('N','s','h','u'), + /*10.0*/HB_SCRIPT_SOYOMBO = HB_TAG ('S','o','y','o'), + /*10.0*/HB_SCRIPT_ZANABAZAR_SQUARE = HB_TAG ('Z','a','n','b'), + + /* No script set. */ + HB_SCRIPT_INVALID = HB_TAG_NONE, + + /* Dummy values to ensure any hb_tag_t value can be passed/stored as hb_script_t + * without risking undefined behavior. Include both a signed and unsigned max, + * since technically enums are int, and indeed, hb_script_t ends up being signed. + * See this thread for technicalities: + * + * http://lists.freedesktop.org/archives/harfbuzz/2014-March/004150.html + */ + _HB_SCRIPT_MAX_VALUE = HB_TAG_MAX, /*< skip >*/ + _HB_SCRIPT_MAX_VALUE_SIGNED = HB_TAG_MAX_SIGNED /*< skip >*/ + +} hb_script_t; + + +/* Script functions */ + +HB_EXTERN hb_script_t +hb_script_from_iso15924_tag (hb_tag_t tag); + +HB_EXTERN hb_script_t +hb_script_from_string (const char *str, int len); + +HB_EXTERN hb_tag_t +hb_script_to_iso15924_tag (hb_script_t script); + +HB_EXTERN hb_direction_t +hb_script_get_horizontal_direction (hb_script_t script); + + +/* User data */ + +typedef struct hb_user_data_key_t { + /*< private >*/ + char unused; +} hb_user_data_key_t; + +typedef void (*hb_destroy_func_t) (void *user_data); + + +/* Font features and variations. */ + +typedef struct hb_feature_t { + hb_tag_t tag; + uint32_t value; + unsigned int start; + unsigned int end; +} hb_feature_t; + +HB_EXTERN hb_bool_t +hb_feature_from_string (const char *str, int len, + hb_feature_t *feature); + +HB_EXTERN void +hb_feature_to_string (hb_feature_t *feature, + char *buf, unsigned int size); + +/** + * hb_variation_t: + * + * Since: 1.4.2 + */ +typedef struct hb_variation_t { + hb_tag_t tag; + float value; +} hb_variation_t; + +HB_EXTERN hb_bool_t +hb_variation_from_string (const char *str, int len, + hb_variation_t *variation); + +HB_EXTERN void +hb_variation_to_string (hb_variation_t *variation, + char *buf, unsigned int size); + + +HB_END_DECLS + +#endif /* HB_COMMON_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-coretext.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-coretext.h new file mode 100755 index 00000000..4b0a6f01 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-coretext.h @@ -0,0 +1,64 @@ +/* + * Copyright © 2012 Mozilla Foundation. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Mozilla Author(s): Jonathan Kew + */ + +#ifndef HB_CORETEXT_H +#define HB_CORETEXT_H + +#include "hb.h" + +#include <TargetConditionals.h> +#if TARGET_OS_IPHONE +# include <CoreText/CoreText.h> +# include <CoreGraphics/CoreGraphics.h> +#else +# include <ApplicationServices/ApplicationServices.h> +#endif + +HB_BEGIN_DECLS + + +#define HB_CORETEXT_TAG_MORT HB_TAG('m','o','r','t') +#define HB_CORETEXT_TAG_MORX HB_TAG('m','o','r','x') +#define HB_CORETEXT_TAG_KERX HB_TAG('k','e','r','x') + + +HB_EXTERN hb_face_t * +hb_coretext_face_create (CGFontRef cg_font); + +HB_EXTERN hb_font_t * +hb_coretext_font_create (CTFontRef ct_font); + + +HB_EXTERN CGFontRef +hb_coretext_face_get_cg_font (hb_face_t *face); + +HB_EXTERN CTFontRef +hb_coretext_font_get_ct_font (hb_font_t *font); + + +HB_END_DECLS + +#endif /* HB_CORETEXT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-deprecated.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-deprecated.h new file mode 100755 index 00000000..eac7efb4 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-deprecated.h @@ -0,0 +1,65 @@ +/* + * Copyright © 2013 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_DEPRECATED_H +#define HB_DEPRECATED_H + +#include "hb-common.h" +#include "hb-unicode.h" +#include "hb-font.h" +#include "hb-set.h" + +HB_BEGIN_DECLS + +#ifndef HB_DISABLE_DEPRECATED + +#define HB_SCRIPT_CANADIAN_ABORIGINAL HB_SCRIPT_CANADIAN_SYLLABICS + +#define HB_BUFFER_FLAGS_DEFAULT HB_BUFFER_FLAG_DEFAULT +#define HB_BUFFER_SERIALIZE_FLAGS_DEFAULT HB_BUFFER_SERIALIZE_FLAG_DEFAULT + +typedef hb_bool_t (*hb_font_get_glyph_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t unicode, hb_codepoint_t variation_selector, + hb_codepoint_t *glyph, + void *user_data); + +HB_EXTERN void +hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_func_t func, + void *user_data, hb_destroy_func_t destroy); + +HB_EXTERN void +hb_set_invert (hb_set_t *set); + +#endif + +HB_END_DECLS + +#endif /* HB_DEPRECATED_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-face.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-face.h new file mode 100755 index 00000000..0ce8d046 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-face.h @@ -0,0 +1,121 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_FACE_H +#define HB_FACE_H + +#include "hb-common.h" +#include "hb-blob.h" + +HB_BEGIN_DECLS + + +/* + * hb_face_t + */ + +typedef struct hb_face_t hb_face_t; + +HB_EXTERN hb_face_t * +hb_face_create (hb_blob_t *blob, + unsigned int index); + +typedef hb_blob_t * (*hb_reference_table_func_t) (hb_face_t *face, hb_tag_t tag, void *user_data); + +/* calls destroy() when not needing user_data anymore */ +HB_EXTERN hb_face_t * +hb_face_create_for_tables (hb_reference_table_func_t reference_table_func, + void *user_data, + hb_destroy_func_t destroy); + +HB_EXTERN hb_face_t * +hb_face_get_empty (void); + +HB_EXTERN hb_face_t * +hb_face_reference (hb_face_t *face); + +HB_EXTERN void +hb_face_destroy (hb_face_t *face); + +HB_EXTERN hb_bool_t +hb_face_set_user_data (hb_face_t *face, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + +HB_EXTERN void * +hb_face_get_user_data (hb_face_t *face, + hb_user_data_key_t *key); + +HB_EXTERN void +hb_face_make_immutable (hb_face_t *face); + +HB_EXTERN hb_bool_t +hb_face_is_immutable (hb_face_t *face); + + +HB_EXTERN hb_blob_t * +hb_face_reference_table (hb_face_t *face, + hb_tag_t tag); + +HB_EXTERN hb_blob_t * +hb_face_reference_blob (hb_face_t *face); + +HB_EXTERN void +hb_face_set_index (hb_face_t *face, + unsigned int index); + +HB_EXTERN unsigned int +hb_face_get_index (hb_face_t *face); + +HB_EXTERN void +hb_face_set_upem (hb_face_t *face, + unsigned int upem); + +HB_EXTERN unsigned int +hb_face_get_upem (hb_face_t *face); + +HB_EXTERN void +hb_face_set_glyph_count (hb_face_t *face, + unsigned int glyph_count); + +HB_EXTERN unsigned int +hb_face_get_glyph_count (hb_face_t *face); + +HB_EXTERN unsigned int +hb_face_get_table_tags (hb_face_t *face, + unsigned int start_offset, + unsigned int *table_count, /* IN/OUT */ + hb_tag_t *table_tags /* OUT */); + +HB_END_DECLS + +#endif /* HB_FACE_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-font.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-font.h new file mode 100755 index 00000000..c95b61d2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-font.h @@ -0,0 +1,641 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_FONT_H +#define HB_FONT_H + +#include "hb-common.h" +#include "hb-face.h" + +HB_BEGIN_DECLS + + +typedef struct hb_font_t hb_font_t; + + +/* + * hb_font_funcs_t + */ + +typedef struct hb_font_funcs_t hb_font_funcs_t; + +HB_EXTERN hb_font_funcs_t * +hb_font_funcs_create (void); + +HB_EXTERN hb_font_funcs_t * +hb_font_funcs_get_empty (void); + +HB_EXTERN hb_font_funcs_t * +hb_font_funcs_reference (hb_font_funcs_t *ffuncs); + +HB_EXTERN void +hb_font_funcs_destroy (hb_font_funcs_t *ffuncs); + +HB_EXTERN hb_bool_t +hb_font_funcs_set_user_data (hb_font_funcs_t *ffuncs, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +HB_EXTERN void * +hb_font_funcs_get_user_data (hb_font_funcs_t *ffuncs, + hb_user_data_key_t *key); + + +HB_EXTERN void +hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs); + +HB_EXTERN hb_bool_t +hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs); + + +/* font and glyph extents */ + +/* Note that typically ascender is positive and descender negative in coordinate systems that grow up. */ +typedef struct hb_font_extents_t +{ + hb_position_t ascender; /* typographic ascender. */ + hb_position_t descender; /* typographic descender. */ + hb_position_t line_gap; /* suggested line spacing gap. */ + /*< private >*/ + hb_position_t reserved9; + hb_position_t reserved8; + hb_position_t reserved7; + hb_position_t reserved6; + hb_position_t reserved5; + hb_position_t reserved4; + hb_position_t reserved3; + hb_position_t reserved2; + hb_position_t reserved1; +} hb_font_extents_t; + +/* Note that height is negative in coordinate systems that grow up. */ +typedef struct hb_glyph_extents_t +{ + hb_position_t x_bearing; /* left side of glyph from origin. */ + hb_position_t y_bearing; /* top side of glyph from origin. */ + hb_position_t width; /* distance from left to right side. */ + hb_position_t height; /* distance from top to bottom side. */ +} hb_glyph_extents_t; + +/* func types */ + +typedef hb_bool_t (*hb_font_get_font_extents_func_t) (hb_font_t *font, void *font_data, + hb_font_extents_t *metrics, + void *user_data); +typedef hb_font_get_font_extents_func_t hb_font_get_font_h_extents_func_t; +typedef hb_font_get_font_extents_func_t hb_font_get_font_v_extents_func_t; + + +typedef hb_bool_t (*hb_font_get_nominal_glyph_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t unicode, + hb_codepoint_t *glyph, + void *user_data); +typedef hb_bool_t (*hb_font_get_variation_glyph_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t unicode, hb_codepoint_t variation_selector, + hb_codepoint_t *glyph, + void *user_data); + + +typedef hb_position_t (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, + void *user_data); +typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_h_advance_func_t; +typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_v_advance_func_t; + +typedef hb_bool_t (*hb_font_get_glyph_origin_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y, + void *user_data); +typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_h_origin_func_t; +typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_v_origin_func_t; + +typedef hb_position_t (*hb_font_get_glyph_kerning_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, + void *user_data); +typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_h_kerning_func_t; +typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_v_kerning_func_t; + + +typedef hb_bool_t (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, + hb_glyph_extents_t *extents, + void *user_data); +typedef hb_bool_t (*hb_font_get_glyph_contour_point_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, unsigned int point_index, + hb_position_t *x, hb_position_t *y, + void *user_data); + + +typedef hb_bool_t (*hb_font_get_glyph_name_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, + char *name, unsigned int size, + void *user_data); +typedef hb_bool_t (*hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void *font_data, + const char *name, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph, + void *user_data); + + +/* func setters */ + +/** + * hb_font_funcs_set_font_h_extents_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.1.2 + **/ +HB_EXTERN void +hb_font_funcs_set_font_h_extents_func (hb_font_funcs_t *ffuncs, + hb_font_get_font_h_extents_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_font_v_extents_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.1.2 + **/ +HB_EXTERN void +hb_font_funcs_set_font_v_extents_func (hb_font_funcs_t *ffuncs, + hb_font_get_font_v_extents_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_nominal_glyph_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.2.3 + **/ +HB_EXTERN void +hb_font_funcs_set_nominal_glyph_func (hb_font_funcs_t *ffuncs, + hb_font_get_nominal_glyph_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_variation_glyph_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.2.3 + **/ +HB_EXTERN void +hb_font_funcs_set_variation_glyph_func (hb_font_funcs_t *ffuncs, + hb_font_get_variation_glyph_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_h_advance_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_h_advance_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_v_advance_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_v_advance_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_h_origin_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_h_origin_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_v_origin_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_v_origin_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_h_kerning_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_h_kerning_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_v_kerning_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_v_kerning_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_extents_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_extents_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_contour_point_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_contour_point_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_name_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_name_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_name_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_from_name_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_from_name_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/* func dispatch */ + +HB_EXTERN hb_bool_t +hb_font_get_h_extents (hb_font_t *font, + hb_font_extents_t *extents); +HB_EXTERN hb_bool_t +hb_font_get_v_extents (hb_font_t *font, + hb_font_extents_t *extents); + +HB_EXTERN hb_bool_t +hb_font_get_nominal_glyph (hb_font_t *font, + hb_codepoint_t unicode, + hb_codepoint_t *glyph); +HB_EXTERN hb_bool_t +hb_font_get_variation_glyph (hb_font_t *font, + hb_codepoint_t unicode, hb_codepoint_t variation_selector, + hb_codepoint_t *glyph); + +HB_EXTERN hb_position_t +hb_font_get_glyph_h_advance (hb_font_t *font, + hb_codepoint_t glyph); +HB_EXTERN hb_position_t +hb_font_get_glyph_v_advance (hb_font_t *font, + hb_codepoint_t glyph); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_h_origin (hb_font_t *font, + hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y); +HB_EXTERN hb_bool_t +hb_font_get_glyph_v_origin (hb_font_t *font, + hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y); + +HB_EXTERN hb_position_t +hb_font_get_glyph_h_kerning (hb_font_t *font, + hb_codepoint_t left_glyph, hb_codepoint_t right_glyph); +HB_EXTERN hb_position_t +hb_font_get_glyph_v_kerning (hb_font_t *font, + hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_extents (hb_font_t *font, + hb_codepoint_t glyph, + hb_glyph_extents_t *extents); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_contour_point (hb_font_t *font, + hb_codepoint_t glyph, unsigned int point_index, + hb_position_t *x, hb_position_t *y); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_name (hb_font_t *font, + hb_codepoint_t glyph, + char *name, unsigned int size); +HB_EXTERN hb_bool_t +hb_font_get_glyph_from_name (hb_font_t *font, + const char *name, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph); + + +/* high-level funcs, with fallback */ + +/* Calls either hb_font_get_nominal_glyph() if variation_selector is 0, + * otherwise calls hb_font_get_variation_glyph(). */ +HB_EXTERN hb_bool_t +hb_font_get_glyph (hb_font_t *font, + hb_codepoint_t unicode, hb_codepoint_t variation_selector, + hb_codepoint_t *glyph); + +HB_EXTERN void +hb_font_get_extents_for_direction (hb_font_t *font, + hb_direction_t direction, + hb_font_extents_t *extents); +HB_EXTERN void +hb_font_get_glyph_advance_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); +HB_EXTERN void +hb_font_get_glyph_origin_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); +HB_EXTERN void +hb_font_add_glyph_origin_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); +HB_EXTERN void +hb_font_subtract_glyph_origin_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); + +HB_EXTERN void +hb_font_get_glyph_kerning_for_direction (hb_font_t *font, + hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_extents_for_origin (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_glyph_extents_t *extents); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_contour_point_for_origin (hb_font_t *font, + hb_codepoint_t glyph, unsigned int point_index, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); + +/* Generates gidDDD if glyph has no name. */ +HB_EXTERN void +hb_font_glyph_to_string (hb_font_t *font, + hb_codepoint_t glyph, + char *s, unsigned int size); +/* Parses gidDDD and uniUUUU strings automatically. */ +HB_EXTERN hb_bool_t +hb_font_glyph_from_string (hb_font_t *font, + const char *s, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph); + + +/* + * hb_font_t + */ + +/* Fonts are very light-weight objects */ + +HB_EXTERN hb_font_t * +hb_font_create (hb_face_t *face); + +HB_EXTERN hb_font_t * +hb_font_create_sub_font (hb_font_t *parent); + +HB_EXTERN hb_font_t * +hb_font_get_empty (void); + +HB_EXTERN hb_font_t * +hb_font_reference (hb_font_t *font); + +HB_EXTERN void +hb_font_destroy (hb_font_t *font); + +HB_EXTERN hb_bool_t +hb_font_set_user_data (hb_font_t *font, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +HB_EXTERN void * +hb_font_get_user_data (hb_font_t *font, + hb_user_data_key_t *key); + +HB_EXTERN void +hb_font_make_immutable (hb_font_t *font); + +HB_EXTERN hb_bool_t +hb_font_is_immutable (hb_font_t *font); + +HB_EXTERN void +hb_font_set_parent (hb_font_t *font, + hb_font_t *parent); + +HB_EXTERN hb_font_t * +hb_font_get_parent (hb_font_t *font); + +HB_EXTERN void +hb_font_set_face (hb_font_t *font, + hb_face_t *face); + +HB_EXTERN hb_face_t * +hb_font_get_face (hb_font_t *font); + + +HB_EXTERN void +hb_font_set_funcs (hb_font_t *font, + hb_font_funcs_t *klass, + void *font_data, + hb_destroy_func_t destroy); + +/* Be *very* careful with this function! */ +HB_EXTERN void +hb_font_set_funcs_data (hb_font_t *font, + void *font_data, + hb_destroy_func_t destroy); + + +HB_EXTERN void +hb_font_set_scale (hb_font_t *font, + int x_scale, + int y_scale); + +HB_EXTERN void +hb_font_get_scale (hb_font_t *font, + int *x_scale, + int *y_scale); + +/* + * A zero value means "no hinting in that direction" + */ +HB_EXTERN void +hb_font_set_ppem (hb_font_t *font, + unsigned int x_ppem, + unsigned int y_ppem); + +HB_EXTERN void +hb_font_get_ppem (hb_font_t *font, + unsigned int *x_ppem, + unsigned int *y_ppem); + +/* + * Point size per EM. Used for optical-sizing in CoreText. + * A value of zero means "not set". + */ +HB_EXTERN void +hb_font_set_ptem (hb_font_t *font, float ptem); + +HB_EXTERN float +hb_font_get_ptem (hb_font_t *font); + +HB_EXTERN void +hb_font_set_variations (hb_font_t *font, + const hb_variation_t *variations, + unsigned int variations_length); + +HB_EXTERN void +hb_font_set_var_coords_design (hb_font_t *font, + const float *coords, + unsigned int coords_length); + +HB_EXTERN void +hb_font_set_var_coords_normalized (hb_font_t *font, + const int *coords, /* 2.14 normalized */ + unsigned int coords_length); + +HB_EXTERN const int * +hb_font_get_var_coords_normalized (hb_font_t *font, + unsigned int *length); + +HB_END_DECLS + +#endif /* HB_FONT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ft.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ft.h new file mode 100755 index 00000000..94013eeb --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ft.h @@ -0,0 +1,132 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2015 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_FT_H +#define HB_FT_H + +#include "hb.h" + +#include <ft2build.h> +#include FT_FREETYPE_H + +HB_BEGIN_DECLS + +/* + * Note: FreeType is not thread-safe. + * Hence, these functions are not either. + */ + +/* + * hb-face from ft-face. + */ + +/* This one creates a new hb-face for given ft-face. + * When the returned hb-face is destroyed, the destroy + * callback is called (if not NULL), with the ft-face passed + * to it. + * + * The client is responsible to make sure that ft-face is + * destroyed after hb-face is destroyed. + * + * Most often you don't want this function. You should use either + * hb_ft_face_create_cached(), or hb_ft_face_create_referenced(). + * In particular, if you are going to pass NULL as destroy, you + * probably should use (the more recent) hb_ft_face_create_referenced() + * instead. + */ +HB_EXTERN hb_face_t * +hb_ft_face_create (FT_Face ft_face, + hb_destroy_func_t destroy); + +/* This version is like hb_ft_face_create(), except that it caches + * the hb-face using the generic pointer of the ft-face. This means + * that subsequent calls to this function with the same ft-face will + * return the same hb-face (correctly referenced). + * + * Client is still responsible for making sure that ft-face is destroyed + * after hb-face is. + */ +HB_EXTERN hb_face_t * +hb_ft_face_create_cached (FT_Face ft_face); + +/* This version is like hb_ft_face_create(), except that it calls + * FT_Reference_Face() on ft-face, as such keeping ft-face alive + * as long as the hb-face is. + * + * This is the most convenient version to use. Use it unless you have + * very good reasons not to. + */ +HB_EXTERN hb_face_t * +hb_ft_face_create_referenced (FT_Face ft_face); + + +/* + * hb-font from ft-face. + */ + +/* + * Note: + * + * Set face size on ft-face before creating hb-font from it. + * Otherwise hb-ft would NOT pick up the font size correctly. + */ + +/* See notes on hb_ft_face_create(). Same issues re lifecycle-management + * apply here. Use hb_ft_font_create_referenced() if you can. */ +HB_EXTERN hb_font_t * +hb_ft_font_create (FT_Face ft_face, + hb_destroy_func_t destroy); + +/* See notes on hb_ft_face_create_referenced() re lifecycle-management + * issues. */ +HB_EXTERN hb_font_t * +hb_ft_font_create_referenced (FT_Face ft_face); + +HB_EXTERN FT_Face +hb_ft_font_get_face (hb_font_t *font); + +HB_EXTERN void +hb_ft_font_set_load_flags (hb_font_t *font, int load_flags); + +HB_EXTERN int +hb_ft_font_get_load_flags (hb_font_t *font); + +/* Call when size or variations settings on underlying FT_Face change. */ +HB_EXTERN void +hb_ft_font_changed (hb_font_t *font); + +/* Makes an hb_font_t use FreeType internally to implement font functions. + * Note: this internally creates an FT_Face. Use it when you create your + * hb_face_t using hb_face_create(). */ +HB_EXTERN void +hb_ft_font_set_funcs (hb_font_t *font); + + +HB_END_DECLS + +#endif /* HB_FT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-glib.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-glib.h new file mode 100755 index 00000000..5f04183b --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-glib.h @@ -0,0 +1,56 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_GLIB_H +#define HB_GLIB_H + +#include "hb.h" + +#include <glib.h> + +HB_BEGIN_DECLS + + +HB_EXTERN hb_script_t +hb_glib_script_to_script (GUnicodeScript script); + +HB_EXTERN GUnicodeScript +hb_glib_script_from_script (hb_script_t script); + + +HB_EXTERN hb_unicode_funcs_t * +hb_glib_get_unicode_funcs (void); + +#if GLIB_CHECK_VERSION(2,31,10) +HB_EXTERN hb_blob_t * +hb_glib_blob_create (GBytes *gbytes); +#endif + +HB_END_DECLS + +#endif /* HB_GLIB_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-gobject-enums.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-gobject-enums.h new file mode 100755 index 00000000..c7ddf762 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-gobject-enums.h @@ -0,0 +1,96 @@ + +/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */ + +/* + * Copyright © 2013 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_GOBJECT_H_IN +#error "Include <hb-gobject.h> instead." +#endif + +#ifndef HB_GOBJECT_ENUMS_H +#define HB_GOBJECT_ENUMS_H + +#include "hb.h" + +#include <glib-object.h> + +HB_BEGIN_DECLS +HB_EXTERN GType +hb_gobject_memory_mode_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_MEMORY_MODE (hb_gobject_memory_mode_get_type ()) +HB_EXTERN GType +hb_gobject_glyph_flags_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_GLYPH_FLAGS (hb_gobject_glyph_flags_get_type ()) +HB_EXTERN GType +hb_gobject_buffer_content_type_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_BUFFER_CONTENT_TYPE (hb_gobject_buffer_content_type_get_type ()) +HB_EXTERN GType +hb_gobject_buffer_flags_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_BUFFER_FLAGS (hb_gobject_buffer_flags_get_type ()) +HB_EXTERN GType +hb_gobject_buffer_cluster_level_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_BUFFER_CLUSTER_LEVEL (hb_gobject_buffer_cluster_level_get_type ()) +HB_EXTERN GType +hb_gobject_buffer_serialize_flags_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_BUFFER_SERIALIZE_FLAGS (hb_gobject_buffer_serialize_flags_get_type ()) +HB_EXTERN GType +hb_gobject_buffer_serialize_format_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_BUFFER_SERIALIZE_FORMAT (hb_gobject_buffer_serialize_format_get_type ()) +HB_EXTERN GType +hb_gobject_buffer_diff_flags_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_BUFFER_DIFF_FLAGS (hb_gobject_buffer_diff_flags_get_type ()) +HB_EXTERN GType +hb_gobject_direction_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_DIRECTION (hb_gobject_direction_get_type ()) +HB_EXTERN GType +hb_gobject_script_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_SCRIPT (hb_gobject_script_get_type ()) +HB_EXTERN GType +hb_gobject_ot_layout_glyph_class_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_OT_LAYOUT_GLYPH_CLASS (hb_gobject_ot_layout_glyph_class_get_type ()) +HB_EXTERN GType +hb_gobject_ot_math_constant_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_OT_MATH_CONSTANT (hb_gobject_ot_math_constant_get_type ()) +HB_EXTERN GType +hb_gobject_ot_math_kern_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_OT_MATH_KERN (hb_gobject_ot_math_kern_get_type ()) +HB_EXTERN GType +hb_gobject_ot_math_glyph_part_flags_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_OT_MATH_GLYPH_PART_FLAGS (hb_gobject_ot_math_glyph_part_flags_get_type ()) +HB_EXTERN GType +hb_gobject_unicode_general_category_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_UNICODE_GENERAL_CATEGORY (hb_gobject_unicode_general_category_get_type ()) +HB_EXTERN GType +hb_gobject_unicode_combining_class_get_type (void) G_GNUC_CONST; +#define HB_GOBJECT_TYPE_UNICODE_COMBINING_CLASS (hb_gobject_unicode_combining_class_get_type ()) + +HB_END_DECLS + +#endif /* HB_GOBJECT_ENUMS_H */ + +/* Generated data ends here */ + diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-gobject-structs.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-gobject-structs.h new file mode 100755 index 00000000..302dc958 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-gobject-structs.h @@ -0,0 +1,138 @@ +/* + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_GOBJECT_H_IN +#error "Include <hb-gobject.h> instead." +#endif + +#ifndef HB_GOBJECT_STRUCTS_H +#define HB_GOBJECT_STRUCTS_H + +#include "hb.h" + +#include <glib-object.h> + +HB_BEGIN_DECLS + + +/* Object types */ + +/** + * hb_gobject_blob_get_type: + * + * Since: 0.9.2 + **/ +HB_EXTERN GType +hb_gobject_blob_get_type (void); +#define HB_GOBJECT_TYPE_BLOB (hb_gobject_blob_get_type ()) + +/** + * hb_gobject_buffer_get_type: + * + * Since: 0.9.2 + **/ +HB_EXTERN GType +hb_gobject_buffer_get_type (void); +#define HB_GOBJECT_TYPE_BUFFER (hb_gobject_buffer_get_type ()) + +/** + * hb_gobject_face_get_type: + * + * Since: 0.9.2 + **/ +HB_EXTERN GType +hb_gobject_face_get_type (void); +#define HB_GOBJECT_TYPE_FACE (hb_gobject_face_get_type ()) + +/** + * hb_gobject_font_get_type: + * + * Since: 0.9.2 + **/ +HB_EXTERN GType +hb_gobject_font_get_type (void); +#define HB_GOBJECT_TYPE_FONT (hb_gobject_font_get_type ()) + +/** + * hb_gobject_font_funcs_get_type: + * + * Since: 0.9.2 + **/ +HB_EXTERN GType +hb_gobject_font_funcs_get_type (void); +#define HB_GOBJECT_TYPE_FONT_FUNCS (hb_gobject_font_funcs_get_type ()) + +HB_EXTERN GType +hb_gobject_set_get_type (void); +#define HB_GOBJECT_TYPE_SET (hb_gobject_set_get_type ()) + +HB_EXTERN GType +hb_gobject_shape_plan_get_type (void); +#define HB_GOBJECT_TYPE_SHAPE_PLAN (hb_gobject_shape_plan_get_type ()) + +/** + * hb_gobject_unicode_funcs_get_type: + * + * Since: 0.9.2 + **/ +HB_EXTERN GType +hb_gobject_unicode_funcs_get_type (void); +#define HB_GOBJECT_TYPE_UNICODE_FUNCS (hb_gobject_unicode_funcs_get_type ()) + +/* Value types */ + +HB_EXTERN GType +hb_gobject_feature_get_type (void); +#define HB_GOBJECT_TYPE_FEATURE (hb_gobject_feature_get_type ()) + +HB_EXTERN GType +hb_gobject_glyph_info_get_type (void); +#define HB_GOBJECT_TYPE_GLYPH_INFO (hb_gobject_glyph_info_get_type ()) + +HB_EXTERN GType +hb_gobject_glyph_position_get_type (void); +#define HB_GOBJECT_TYPE_GLYPH_POSITION (hb_gobject_glyph_position_get_type ()) + +HB_EXTERN GType +hb_gobject_segment_properties_get_type (void); +#define HB_GOBJECT_TYPE_SEGMENT_PROPERTIES (hb_gobject_segment_properties_get_type ()) + +HB_EXTERN GType +hb_gobject_user_data_key_get_type (void); +#define HB_GOBJECT_TYPE_USER_DATA_KEY (hb_gobject_user_data_key_get_type ()) + +HB_EXTERN GType +hb_gobject_ot_math_glyph_variant_get_type (void); +#define HB_GOBJECT_TYPE_OT_MATH_GLYPH_VARIANT (hb_gobject_ot_math_glyph_variant_get_type ()) + +HB_EXTERN GType +hb_gobject_ot_math_glyph_part_get_type (void); +#define HB_GOBJECT_TYPE_OT_MATH_GLYPH_PART (hb_gobject_ot_math_glyph_part_get_type ()) + + +HB_END_DECLS + +#endif /* HB_GOBJECT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-gobject.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-gobject.h new file mode 100755 index 00000000..ea1bd25d --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-gobject.h @@ -0,0 +1,40 @@ +/* + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_GOBJECT_H +#define HB_GOBJECT_H +#define HB_GOBJECT_H_IN + +#include "hb.h" + +#include "hb-gobject-enums.h" +#include "hb-gobject-structs.h" + +HB_BEGIN_DECLS +HB_END_DECLS + +#undef HB_GOBJECT_H_IN +#endif /* HB_GOBJECT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-graphite2.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-graphite2.h new file mode 100755 index 00000000..82b1e64c --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-graphite2.h @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2011 Martin Hosken + * Copyright (C) 2011 SIL International + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + */ + +#ifndef HB_GRAPHITE2_H +#define HB_GRAPHITE2_H + +#include "hb.h" + +#include <graphite2/Font.h> + +HB_BEGIN_DECLS + + +#define HB_GRAPHITE2_TAG_SILF HB_TAG('S','i','l','f') + + +HB_EXTERN gr_face * +hb_graphite2_face_get_gr_face (hb_face_t *face); + +#ifndef HB_DISABLE_DEPRECATED + +HB_EXTERN gr_font * +hb_graphite2_font_get_gr_font (hb_font_t *font); + +#endif + + +HB_END_DECLS + +#endif /* HB_GRAPHITE2_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-icu.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-icu.h new file mode 100755 index 00000000..2db6a7b6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-icu.h @@ -0,0 +1,52 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_ICU_H +#define HB_ICU_H + +#include "hb.h" + +#include <unicode/uscript.h> + +HB_BEGIN_DECLS + + +HB_EXTERN hb_script_t +hb_icu_script_to_script (UScriptCode script); + +HB_EXTERN UScriptCode +hb_icu_script_from_script (hb_script_t script); + + +HB_EXTERN hb_unicode_funcs_t * +hb_icu_get_unicode_funcs (void); + + +HB_END_DECLS + +#endif /* HB_ICU_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot-font.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot-font.h new file mode 100755 index 00000000..80eaa54b --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot-font.h @@ -0,0 +1,45 @@ +/* + * Copyright © 2014 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod, Roozbeh Pournader + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_FONT_H +#define HB_OT_FONT_H + +#include "hb.h" + +HB_BEGIN_DECLS + + +HB_EXTERN void +hb_ot_font_set_funcs (hb_font_t *font); + + +HB_END_DECLS + +#endif /* HB_OT_FONT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot-layout.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot-layout.h new file mode 100755 index 00000000..85938ba1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot-layout.h @@ -0,0 +1,338 @@ +/* + * Copyright © 2007,2008,2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_LAYOUT_H +#define HB_OT_LAYOUT_H + +#include "hb.h" + +#include "hb-ot-tag.h" + +HB_BEGIN_DECLS + + +#define HB_OT_TAG_BASE HB_TAG('B','A','S','E') +#define HB_OT_TAG_GDEF HB_TAG('G','D','E','F') +#define HB_OT_TAG_GSUB HB_TAG('G','S','U','B') +#define HB_OT_TAG_GPOS HB_TAG('G','P','O','S') +#define HB_OT_TAG_JSTF HB_TAG('J','S','T','F') + + +/* + * GDEF + */ + +HB_EXTERN hb_bool_t +hb_ot_layout_has_glyph_classes (hb_face_t *face); + +typedef enum { + HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED = 0, + HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH = 1, + HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE = 2, + HB_OT_LAYOUT_GLYPH_CLASS_MARK = 3, + HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT = 4 +} hb_ot_layout_glyph_class_t; + +HB_EXTERN hb_ot_layout_glyph_class_t +hb_ot_layout_get_glyph_class (hb_face_t *face, + hb_codepoint_t glyph); + +HB_EXTERN void +hb_ot_layout_get_glyphs_in_class (hb_face_t *face, + hb_ot_layout_glyph_class_t klass, + hb_set_t *glyphs /* OUT */); + + +/* Not that useful. Provides list of attach points for a glyph that a + * client may want to cache */ +HB_EXTERN unsigned int +hb_ot_layout_get_attach_points (hb_face_t *face, + hb_codepoint_t glyph, + unsigned int start_offset, + unsigned int *point_count /* IN/OUT */, + unsigned int *point_array /* OUT */); + +/* Ligature caret positions */ +HB_EXTERN unsigned int +hb_ot_layout_get_ligature_carets (hb_font_t *font, + hb_direction_t direction, + hb_codepoint_t glyph, + unsigned int start_offset, + unsigned int *caret_count /* IN/OUT */, + hb_position_t *caret_array /* OUT */); + + +/* + * GSUB/GPOS feature query and enumeration interface + */ + +#define HB_OT_LAYOUT_NO_SCRIPT_INDEX 0xFFFFu +#define HB_OT_LAYOUT_NO_FEATURE_INDEX 0xFFFFu +#define HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX 0xFFFFu +#define HB_OT_LAYOUT_NO_VARIATIONS_INDEX 0xFFFFFFFFu + +HB_EXTERN unsigned int +hb_ot_layout_table_get_script_tags (hb_face_t *face, + hb_tag_t table_tag, + unsigned int start_offset, + unsigned int *script_count /* IN/OUT */, + hb_tag_t *script_tags /* OUT */); + +HB_EXTERN hb_bool_t +hb_ot_layout_table_find_script (hb_face_t *face, + hb_tag_t table_tag, + hb_tag_t script_tag, + unsigned int *script_index); + +/* Like find_script, but takes zero-terminated array of scripts to test */ +HB_EXTERN hb_bool_t +hb_ot_layout_table_choose_script (hb_face_t *face, + hb_tag_t table_tag, + const hb_tag_t *script_tags, + unsigned int *script_index, + hb_tag_t *chosen_script); + +HB_EXTERN unsigned int +hb_ot_layout_table_get_feature_tags (hb_face_t *face, + hb_tag_t table_tag, + unsigned int start_offset, + unsigned int *feature_count /* IN/OUT */, + hb_tag_t *feature_tags /* OUT */); + +HB_EXTERN unsigned int +hb_ot_layout_script_get_language_tags (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int start_offset, + unsigned int *language_count /* IN/OUT */, + hb_tag_t *language_tags /* OUT */); + +HB_EXTERN hb_bool_t +hb_ot_layout_script_find_language (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + hb_tag_t language_tag, + unsigned int *language_index); + +HB_EXTERN hb_bool_t +hb_ot_layout_language_get_required_feature_index (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + unsigned int *feature_index); + +HB_EXTERN hb_bool_t +hb_ot_layout_language_get_required_feature (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + unsigned int *feature_index, + hb_tag_t *feature_tag); + +HB_EXTERN unsigned int +hb_ot_layout_language_get_feature_indexes (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + unsigned int start_offset, + unsigned int *feature_count /* IN/OUT */, + unsigned int *feature_indexes /* OUT */); + +HB_EXTERN unsigned int +hb_ot_layout_language_get_feature_tags (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + unsigned int start_offset, + unsigned int *feature_count /* IN/OUT */, + hb_tag_t *feature_tags /* OUT */); + +HB_EXTERN hb_bool_t +hb_ot_layout_language_find_feature (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + hb_tag_t feature_tag, + unsigned int *feature_index); + +HB_EXTERN unsigned int +hb_ot_layout_feature_get_lookups (hb_face_t *face, + hb_tag_t table_tag, + unsigned int feature_index, + unsigned int start_offset, + unsigned int *lookup_count /* IN/OUT */, + unsigned int *lookup_indexes /* OUT */); + +HB_EXTERN unsigned int +hb_ot_layout_table_get_lookup_count (hb_face_t *face, + hb_tag_t table_tag); + + +HB_EXTERN void +hb_ot_layout_collect_lookups (hb_face_t *face, + hb_tag_t table_tag, + const hb_tag_t *scripts, + const hb_tag_t *languages, + const hb_tag_t *features, + hb_set_t *lookup_indexes /* OUT */); + +HB_EXTERN void +hb_ot_layout_lookup_collect_glyphs (hb_face_t *face, + hb_tag_t table_tag, + unsigned int lookup_index, + hb_set_t *glyphs_before, /* OUT. May be NULL */ + hb_set_t *glyphs_input, /* OUT. May be NULL */ + hb_set_t *glyphs_after, /* OUT. May be NULL */ + hb_set_t *glyphs_output /* OUT. May be NULL */); + +#ifdef HB_NOT_IMPLEMENTED +typedef struct +{ + const hb_codepoint_t *before, + unsigned int before_length, + const hb_codepoint_t *input, + unsigned int input_length, + const hb_codepoint_t *after, + unsigned int after_length, +} hb_ot_layout_glyph_sequence_t; + +typedef hb_bool_t +(*hb_ot_layout_glyph_sequence_func_t) (hb_font_t *font, + hb_tag_t table_tag, + unsigned int lookup_index, + const hb_ot_layout_glyph_sequence_t *sequence, + void *user_data); + +HB_EXTERN void +Xhb_ot_layout_lookup_enumerate_sequences (hb_face_t *face, + hb_tag_t table_tag, + unsigned int lookup_index, + hb_ot_layout_glyph_sequence_func_t callback, + void *user_data); +#endif + +/* Variations support */ + +HB_EXTERN hb_bool_t +hb_ot_layout_table_find_feature_variations (hb_face_t *face, + hb_tag_t table_tag, + const int *coords, + unsigned int num_coords, + unsigned int *variations_index /* out */); + +HB_EXTERN unsigned int +hb_ot_layout_feature_with_variations_get_lookups (hb_face_t *face, + hb_tag_t table_tag, + unsigned int feature_index, + unsigned int variations_index, + unsigned int start_offset, + unsigned int *lookup_count /* IN/OUT */, + unsigned int *lookup_indexes /* OUT */); + + +/* + * GSUB + */ + +HB_EXTERN hb_bool_t +hb_ot_layout_has_substitution (hb_face_t *face); + +HB_EXTERN hb_bool_t +hb_ot_layout_lookup_would_substitute (hb_face_t *face, + unsigned int lookup_index, + const hb_codepoint_t *glyphs, + unsigned int glyphs_length, + hb_bool_t zero_context); + +HB_EXTERN void +hb_ot_layout_lookup_substitute_closure (hb_face_t *face, + unsigned int lookup_index, + hb_set_t *glyphs + /*TODO , hb_bool_t inclusive */); + +#ifdef HB_NOT_IMPLEMENTED +/* Note: You better have GDEF when using this API, or marks won't do much. */ +HB_EXTERN hb_bool_t +Xhb_ot_layout_lookup_substitute (hb_font_t *font, + unsigned int lookup_index, + const hb_ot_layout_glyph_sequence_t *sequence, + unsigned int out_size, + hb_codepoint_t *glyphs_out, /* OUT */ + unsigned int *clusters_out, /* OUT */ + unsigned int *out_length /* OUT */); +#endif + + +/* + * GPOS + */ + +HB_EXTERN hb_bool_t +hb_ot_layout_has_positioning (hb_face_t *face); + +#ifdef HB_NOT_IMPLEMENTED +/* Note: You better have GDEF when using this API, or marks won't do much. */ +HB_EXTERN hb_bool_t +Xhb_ot_layout_lookup_position (hb_font_t *font, + unsigned int lookup_index, + const hb_ot_layout_glyph_sequence_t *sequence, + hb_glyph_position_t *positions /* IN / OUT */); +#endif + +/* Optical 'size' feature info. Returns true if found. + * http://www.microsoft.com/typography/otspec/features_pt.htm#size */ +HB_EXTERN hb_bool_t +hb_ot_layout_get_size_params (hb_face_t *face, + unsigned int *design_size, /* OUT. May be NULL */ + unsigned int *subfamily_id, /* OUT. May be NULL */ + unsigned int *subfamily_name_id, /* OUT. May be NULL */ + unsigned int *range_start, /* OUT. May be NULL */ + unsigned int *range_end /* OUT. May be NULL */); + + +/* + * BASE + */ +#if 0 + +#define HB_OT_TAG_BASE_HANG HB_TAG('h','a','n','g') +#define HB_OT_TAG_BASE_ICFB HB_TAG('i','c','f','b') +#define HB_OT_TAG_BASE_ICFT HB_TAG('i','c','f','t') +#define HB_OT_TAG_BASE_IDEO HB_TAG('i','d','e','o') +#define HB_OT_TAG_BASE_IDTB HB_TAG('i','d','t','b') +#define HB_OT_TAG_BASE_MATH HB_TAG('m','a','t','h') +#define HB_OT_TAG_BASE_ROMN HB_TAG('r','o','m','n') + +#endif + + +HB_END_DECLS + +#endif /* HB_OT_LAYOUT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot-math.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot-math.h new file mode 100755 index 00000000..521a5ca0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot-math.h @@ -0,0 +1,209 @@ +/* + * Copyright © 2016 Igalia S.L. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Igalia Author(s): FrĂ©dĂ©ric Wang + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_MATH_H +#define HB_OT_MATH_H + +#include "hb.h" + +HB_BEGIN_DECLS + + +/* + * MATH + */ + +#define HB_OT_TAG_MATH HB_TAG('M','A','T','H') + +/* Use with hb_buffer_set_script() for math shaping. */ +#define HB_OT_MATH_SCRIPT HB_TAG('m','a','t','h') + +/* Types */ + +/** + * hb_ot_math_constant_t: + * + * Since: 1.3.3 + */ +typedef enum { + HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN = 0, + HB_OT_MATH_CONSTANT_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN = 1, + HB_OT_MATH_CONSTANT_DELIMITED_SUB_FORMULA_MIN_HEIGHT = 2, + HB_OT_MATH_CONSTANT_DISPLAY_OPERATOR_MIN_HEIGHT = 3, + HB_OT_MATH_CONSTANT_MATH_LEADING = 4, + HB_OT_MATH_CONSTANT_AXIS_HEIGHT = 5, + HB_OT_MATH_CONSTANT_ACCENT_BASE_HEIGHT = 6, + HB_OT_MATH_CONSTANT_FLATTENED_ACCENT_BASE_HEIGHT = 7, + HB_OT_MATH_CONSTANT_SUBSCRIPT_SHIFT_DOWN = 8, + HB_OT_MATH_CONSTANT_SUBSCRIPT_TOP_MAX = 9, + HB_OT_MATH_CONSTANT_SUBSCRIPT_BASELINE_DROP_MIN = 10, + HB_OT_MATH_CONSTANT_SUPERSCRIPT_SHIFT_UP = 11, + HB_OT_MATH_CONSTANT_SUPERSCRIPT_SHIFT_UP_CRAMPED = 12, + HB_OT_MATH_CONSTANT_SUPERSCRIPT_BOTTOM_MIN = 13, + HB_OT_MATH_CONSTANT_SUPERSCRIPT_BASELINE_DROP_MAX = 14, + HB_OT_MATH_CONSTANT_SUB_SUPERSCRIPT_GAP_MIN = 15, + HB_OT_MATH_CONSTANT_SUPERSCRIPT_BOTTOM_MAX_WITH_SUBSCRIPT = 16, + HB_OT_MATH_CONSTANT_SPACE_AFTER_SCRIPT = 17, + HB_OT_MATH_CONSTANT_UPPER_LIMIT_GAP_MIN = 18, + HB_OT_MATH_CONSTANT_UPPER_LIMIT_BASELINE_RISE_MIN = 19, + HB_OT_MATH_CONSTANT_LOWER_LIMIT_GAP_MIN = 20, + HB_OT_MATH_CONSTANT_LOWER_LIMIT_BASELINE_DROP_MIN = 21, + HB_OT_MATH_CONSTANT_STACK_TOP_SHIFT_UP = 22, + HB_OT_MATH_CONSTANT_STACK_TOP_DISPLAY_STYLE_SHIFT_UP = 23, + HB_OT_MATH_CONSTANT_STACK_BOTTOM_SHIFT_DOWN = 24, + HB_OT_MATH_CONSTANT_STACK_BOTTOM_DISPLAY_STYLE_SHIFT_DOWN = 25, + HB_OT_MATH_CONSTANT_STACK_GAP_MIN = 26, + HB_OT_MATH_CONSTANT_STACK_DISPLAY_STYLE_GAP_MIN = 27, + HB_OT_MATH_CONSTANT_STRETCH_STACK_TOP_SHIFT_UP = 28, + HB_OT_MATH_CONSTANT_STRETCH_STACK_BOTTOM_SHIFT_DOWN = 29, + HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_ABOVE_MIN = 30, + HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_BELOW_MIN = 31, + HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_SHIFT_UP = 32, + HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_DISPLAY_STYLE_SHIFT_UP = 33, + HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_SHIFT_DOWN = 34, + HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_DISPLAY_STYLE_SHIFT_DOWN = 35, + HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_GAP_MIN = 36, + HB_OT_MATH_CONSTANT_FRACTION_NUM_DISPLAY_STYLE_GAP_MIN = 37, + HB_OT_MATH_CONSTANT_FRACTION_RULE_THICKNESS = 38, + HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_GAP_MIN = 39, + HB_OT_MATH_CONSTANT_FRACTION_DENOM_DISPLAY_STYLE_GAP_MIN = 40, + HB_OT_MATH_CONSTANT_SKEWED_FRACTION_HORIZONTAL_GAP = 41, + HB_OT_MATH_CONSTANT_SKEWED_FRACTION_VERTICAL_GAP = 42, + HB_OT_MATH_CONSTANT_OVERBAR_VERTICAL_GAP = 43, + HB_OT_MATH_CONSTANT_OVERBAR_RULE_THICKNESS = 44, + HB_OT_MATH_CONSTANT_OVERBAR_EXTRA_ASCENDER = 45, + HB_OT_MATH_CONSTANT_UNDERBAR_VERTICAL_GAP = 46, + HB_OT_MATH_CONSTANT_UNDERBAR_RULE_THICKNESS = 47, + HB_OT_MATH_CONSTANT_UNDERBAR_EXTRA_DESCENDER = 48, + HB_OT_MATH_CONSTANT_RADICAL_VERTICAL_GAP = 49, + HB_OT_MATH_CONSTANT_RADICAL_DISPLAY_STYLE_VERTICAL_GAP = 50, + HB_OT_MATH_CONSTANT_RADICAL_RULE_THICKNESS = 51, + HB_OT_MATH_CONSTANT_RADICAL_EXTRA_ASCENDER = 52, + HB_OT_MATH_CONSTANT_RADICAL_KERN_BEFORE_DEGREE = 53, + HB_OT_MATH_CONSTANT_RADICAL_KERN_AFTER_DEGREE = 54, + HB_OT_MATH_CONSTANT_RADICAL_DEGREE_BOTTOM_RAISE_PERCENT = 55 +} hb_ot_math_constant_t; + +/** + * hb_ot_math_kern_t: + * + * Since: 1.3.3 + */ +typedef enum { + HB_OT_MATH_KERN_TOP_RIGHT = 0, + HB_OT_MATH_KERN_TOP_LEFT = 1, + HB_OT_MATH_KERN_BOTTOM_RIGHT = 2, + HB_OT_MATH_KERN_BOTTOM_LEFT = 3 +} hb_ot_math_kern_t; + +/** + * hb_ot_math_glyph_variant_t: + * + * Since: 1.3.3 + */ +typedef struct hb_ot_math_glyph_variant_t { + hb_codepoint_t glyph; + hb_position_t advance; +} hb_ot_math_glyph_variant_t; + +/** + * hb_ot_math_glyph_part_flags_t: + * + * Since: 1.3.3 + */ +typedef enum { /*< flags >*/ + HB_MATH_GLYPH_PART_FLAG_EXTENDER = 0x00000001u /* Extender glyph */ +} hb_ot_math_glyph_part_flags_t; + +/** + * hb_ot_math_glyph_part_t: + * + * Since: 1.3.3 + */ +typedef struct hb_ot_math_glyph_part_t { + hb_codepoint_t glyph; + hb_position_t start_connector_length; + hb_position_t end_connector_length; + hb_position_t full_advance; + hb_ot_math_glyph_part_flags_t flags; +} hb_ot_math_glyph_part_t; + +/* Methods */ + +HB_EXTERN hb_bool_t +hb_ot_math_has_data (hb_face_t *face); + +HB_EXTERN hb_position_t +hb_ot_math_get_constant (hb_font_t *font, + hb_ot_math_constant_t constant); + +HB_EXTERN hb_position_t +hb_ot_math_get_glyph_italics_correction (hb_font_t *font, + hb_codepoint_t glyph); + +HB_EXTERN hb_position_t +hb_ot_math_get_glyph_top_accent_attachment (hb_font_t *font, + hb_codepoint_t glyph); + +HB_EXTERN hb_bool_t +hb_ot_math_is_glyph_extended_shape (hb_face_t *face, + hb_codepoint_t glyph); + +HB_EXTERN hb_position_t +hb_ot_math_get_glyph_kerning (hb_font_t *font, + hb_codepoint_t glyph, + hb_ot_math_kern_t kern, + hb_position_t correction_height); + +HB_EXTERN unsigned int +hb_ot_math_get_glyph_variants (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + unsigned int start_offset, + unsigned int *variants_count, /* IN/OUT */ + hb_ot_math_glyph_variant_t *variants /* OUT */); + +HB_EXTERN hb_position_t +hb_ot_math_get_min_connector_overlap (hb_font_t *font, + hb_direction_t direction); + +HB_EXTERN unsigned int +hb_ot_math_get_glyph_assembly (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + unsigned int start_offset, + unsigned int *parts_count, /* IN/OUT */ + hb_ot_math_glyph_part_t *parts, /* OUT */ + hb_position_t *italics_correction /* OUT */); + + +HB_END_DECLS + +#endif /* HB_OT_MATH_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot-shape.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot-shape.h new file mode 100755 index 00000000..7b1bcc06 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot-shape.h @@ -0,0 +1,53 @@ +/* + * Copyright © 2013 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_SHAPE_H +#define HB_OT_SHAPE_H + +#include "hb.h" + +HB_BEGIN_DECLS + +/* TODO port to shape-plan / set. */ +HB_EXTERN void +hb_ot_shape_glyphs_closure (hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features, + hb_set_t *glyphs); + +HB_EXTERN void +hb_ot_shape_plan_collect_lookups (hb_shape_plan_t *shape_plan, + hb_tag_t table_tag, + hb_set_t *lookup_indexes /* OUT */); + +HB_END_DECLS + +#endif /* HB_OT_SHAPE_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot-tag.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot-tag.h new file mode 100755 index 00000000..54fb747f --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot-tag.h @@ -0,0 +1,59 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_TAG_H +#define HB_OT_TAG_H + +#include "hb.h" + +HB_BEGIN_DECLS + + +#define HB_OT_TAG_DEFAULT_SCRIPT HB_TAG ('D', 'F', 'L', 'T') +#define HB_OT_TAG_DEFAULT_LANGUAGE HB_TAG ('d', 'f', 'l', 't') + +HB_EXTERN void +hb_ot_tags_from_script (hb_script_t script, + hb_tag_t *script_tag_1, + hb_tag_t *script_tag_2); + +HB_EXTERN hb_script_t +hb_ot_tag_to_script (hb_tag_t tag); + +HB_EXTERN hb_tag_t +hb_ot_tag_from_language (hb_language_t language); + +HB_EXTERN hb_language_t +hb_ot_tag_to_language (hb_tag_t tag); + + +HB_END_DECLS + +#endif /* HB_OT_TAG_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot-var.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot-var.h new file mode 100755 index 00000000..a2c0c5f2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot-var.h @@ -0,0 +1,105 @@ +/* + * Copyright © 2017 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_VAR_H +#define HB_OT_VAR_H + +#include "hb.h" + +HB_BEGIN_DECLS + + +#define HB_OT_TAG_VAR_AXIS_ITALIC HB_TAG('i','t','a','l') +#define HB_OT_TAG_VAR_AXIS_OPTICAL_SIZE HB_TAG('o','p','s','z') +#define HB_OT_TAG_VAR_AXIS_SLANT HB_TAG('s','l','n','t') +#define HB_OT_TAG_VAR_AXIS_WIDTH HB_TAG('w','d','t','h') +#define HB_OT_TAG_VAR_AXIS_WEIGHT HB_TAG('w','g','h','t') + + +/* + * fvar / avar + */ + +/** + * hb_ot_var_axis_t: + * + * Since: 1.4.2 + */ +typedef struct hb_ot_var_axis_t { + hb_tag_t tag; + unsigned int name_id; + float min_value; + float default_value; + float max_value; +} hb_ot_var_axis_t; + +HB_EXTERN hb_bool_t +hb_ot_var_has_data (hb_face_t *face); + +/** + * HB_OT_VAR_NO_AXIS_INDEX: + * + * Since: 1.4.2 + */ +#define HB_OT_VAR_NO_AXIS_INDEX 0xFFFFFFFFu + +HB_EXTERN unsigned int +hb_ot_var_get_axis_count (hb_face_t *face); + +HB_EXTERN unsigned int +hb_ot_var_get_axes (hb_face_t *face, + unsigned int start_offset, + unsigned int *axes_count /* IN/OUT */, + hb_ot_var_axis_t *axes_array /* OUT */); + +HB_EXTERN hb_bool_t +hb_ot_var_find_axis (hb_face_t *face, + hb_tag_t axis_tag, + unsigned int *axis_index, + hb_ot_var_axis_t *axis_info); + + +HB_EXTERN void +hb_ot_var_normalize_variations (hb_face_t *face, + const hb_variation_t *variations, /* IN */ + unsigned int variations_length, + int *coords, /* OUT */ + unsigned int coords_length); + +HB_EXTERN void +hb_ot_var_normalize_coords (hb_face_t *face, + unsigned int coords_length, + const float *design_coords, /* IN */ + int *normalized_coords /* OUT */); + + +HB_END_DECLS + +#endif /* HB_OT_VAR_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot.h new file mode 100755 index 00000000..2120a3ef --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-ot.h @@ -0,0 +1,45 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_H +#define HB_OT_H +#define HB_OT_H_IN + +#include "hb.h" + +#include "hb-ot-font.h" +#include "hb-ot-layout.h" +#include "hb-ot-math.h" +#include "hb-ot-tag.h" +#include "hb-ot-shape.h" +#include "hb-ot-var.h" + +HB_BEGIN_DECLS + +HB_END_DECLS + +#undef HB_OT_H_IN +#endif /* HB_OT_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-set.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-set.h new file mode 100755 index 00000000..b0f82f82 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-set.h @@ -0,0 +1,165 @@ +/* + * Copyright © 2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_SET_H +#define HB_SET_H + +#include "hb-common.h" + +HB_BEGIN_DECLS + + +/* + * Since: 0.9.21 + */ +#define HB_SET_VALUE_INVALID ((hb_codepoint_t) -1) + +typedef struct hb_set_t hb_set_t; + + +HB_EXTERN hb_set_t * +hb_set_create (void); + +HB_EXTERN hb_set_t * +hb_set_get_empty (void); + +HB_EXTERN hb_set_t * +hb_set_reference (hb_set_t *set); + +HB_EXTERN void +hb_set_destroy (hb_set_t *set); + +HB_EXTERN hb_bool_t +hb_set_set_user_data (hb_set_t *set, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + +HB_EXTERN void * +hb_set_get_user_data (hb_set_t *set, + hb_user_data_key_t *key); + + +/* Returns false if allocation has failed before */ +HB_EXTERN hb_bool_t +hb_set_allocation_successful (const hb_set_t *set); + +HB_EXTERN void +hb_set_clear (hb_set_t *set); + +HB_EXTERN hb_bool_t +hb_set_is_empty (const hb_set_t *set); + +HB_EXTERN hb_bool_t +hb_set_has (const hb_set_t *set, + hb_codepoint_t codepoint); + +/* Right now limited to 16-bit integers. Eventually will do full codepoint range, sans -1 + * which we will use as a sentinel. */ +HB_EXTERN void +hb_set_add (hb_set_t *set, + hb_codepoint_t codepoint); + +HB_EXTERN void +hb_set_add_range (hb_set_t *set, + hb_codepoint_t first, + hb_codepoint_t last); + +HB_EXTERN void +hb_set_del (hb_set_t *set, + hb_codepoint_t codepoint); + +HB_EXTERN void +hb_set_del_range (hb_set_t *set, + hb_codepoint_t first, + hb_codepoint_t last); + +HB_EXTERN hb_bool_t +hb_set_is_equal (const hb_set_t *set, + const hb_set_t *other); + +HB_EXTERN void +hb_set_set (hb_set_t *set, + const hb_set_t *other); + +HB_EXTERN void +hb_set_union (hb_set_t *set, + const hb_set_t *other); + +HB_EXTERN void +hb_set_intersect (hb_set_t *set, + const hb_set_t *other); + +HB_EXTERN void +hb_set_subtract (hb_set_t *set, + const hb_set_t *other); + +HB_EXTERN void +hb_set_symmetric_difference (hb_set_t *set, + const hb_set_t *other); + +HB_EXTERN unsigned int +hb_set_get_population (const hb_set_t *set); + +/* Returns HB_SET_VALUE_INVALID if set empty. */ +HB_EXTERN hb_codepoint_t +hb_set_get_min (const hb_set_t *set); + +/* Returns HB_SET_VALUE_INVALID if set empty. */ +HB_EXTERN hb_codepoint_t +hb_set_get_max (const hb_set_t *set); + +/* Pass HB_SET_VALUE_INVALID in to get started. */ +HB_EXTERN hb_bool_t +hb_set_next (const hb_set_t *set, + hb_codepoint_t *codepoint); + +/* Pass HB_SET_VALUE_INVALID in to get started. */ +HB_EXTERN hb_bool_t +hb_set_previous (const hb_set_t *set, + hb_codepoint_t *codepoint); + +/* Pass HB_SET_VALUE_INVALID for first and last to get started. */ +HB_EXTERN hb_bool_t +hb_set_next_range (const hb_set_t *set, + hb_codepoint_t *first, + hb_codepoint_t *last); + +/* Pass HB_SET_VALUE_INVALID for first and last to get started. */ +HB_EXTERN hb_bool_t +hb_set_previous_range (const hb_set_t *set, + hb_codepoint_t *first, + hb_codepoint_t *last); + + +HB_END_DECLS + +#endif /* HB_SET_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-shape-plan.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-shape-plan.h new file mode 100755 index 00000000..b62ae7ca --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-shape-plan.h @@ -0,0 +1,108 @@ +/* + * Copyright © 2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_SHAPE_PLAN_H +#define HB_SHAPE_PLAN_H + +#include "hb-common.h" +#include "hb-font.h" + +HB_BEGIN_DECLS + +typedef struct hb_shape_plan_t hb_shape_plan_t; + +HB_EXTERN hb_shape_plan_t * +hb_shape_plan_create (hb_face_t *face, + const hb_segment_properties_t *props, + const hb_feature_t *user_features, + unsigned int num_user_features, + const char * const *shaper_list); + +HB_EXTERN hb_shape_plan_t * +hb_shape_plan_create_cached (hb_face_t *face, + const hb_segment_properties_t *props, + const hb_feature_t *user_features, + unsigned int num_user_features, + const char * const *shaper_list); + +HB_EXTERN hb_shape_plan_t * +hb_shape_plan_create2 (hb_face_t *face, + const hb_segment_properties_t *props, + const hb_feature_t *user_features, + unsigned int num_user_features, + const int *coords, + unsigned int num_coords, + const char * const *shaper_list); + +HB_EXTERN hb_shape_plan_t * +hb_shape_plan_create_cached2 (hb_face_t *face, + const hb_segment_properties_t *props, + const hb_feature_t *user_features, + unsigned int num_user_features, + const int *coords, + unsigned int num_coords, + const char * const *shaper_list); + + +HB_EXTERN hb_shape_plan_t * +hb_shape_plan_get_empty (void); + +HB_EXTERN hb_shape_plan_t * +hb_shape_plan_reference (hb_shape_plan_t *shape_plan); + +HB_EXTERN void +hb_shape_plan_destroy (hb_shape_plan_t *shape_plan); + +HB_EXTERN hb_bool_t +hb_shape_plan_set_user_data (hb_shape_plan_t *shape_plan, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + +HB_EXTERN void * +hb_shape_plan_get_user_data (hb_shape_plan_t *shape_plan, + hb_user_data_key_t *key); + + +HB_EXTERN hb_bool_t +hb_shape_plan_execute (hb_shape_plan_t *shape_plan, + hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features); + +HB_EXTERN const char * +hb_shape_plan_get_shaper (hb_shape_plan_t *shape_plan); + + +HB_END_DECLS + +#endif /* HB_SHAPE_PLAN_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-shape.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-shape.h new file mode 100755 index 00000000..39507ff7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-shape.h @@ -0,0 +1,62 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_SHAPE_H +#define HB_SHAPE_H + +#include "hb-common.h" +#include "hb-buffer.h" +#include "hb-font.h" + +HB_BEGIN_DECLS + + +HB_EXTERN void +hb_shape (hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features); + +HB_EXTERN hb_bool_t +hb_shape_full (hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features, + const char * const *shaper_list); + +HB_EXTERN const char ** +hb_shape_list_shapers (void); + + +HB_END_DECLS + +#endif /* HB_SHAPE_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-subset.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-subset.h new file mode 100755 index 00000000..55ce25b0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-subset.h @@ -0,0 +1,83 @@ +/* + * Copyright © 2018 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Rod Sheeter + */ + +#ifndef HB_SUBSET_H +#define HB_SUBSET_H + +#include "hb.h" + +HB_BEGIN_DECLS + +/* + * hb_subset_profile_t + * Things that change based on target environment, e.g. OS. + * Threadsafe for multiple concurrent subset operations. + */ + +typedef struct hb_subset_profile_t hb_subset_profile_t; + +HB_EXTERN hb_subset_profile_t * +hb_subset_profile_create (void); + +HB_EXTERN void +hb_subset_profile_destroy (hb_subset_profile_t *profile); + +/* + * hb_subset_input_t + * + * Things that change based on the input. Characters to keep, etc. + */ + +typedef struct hb_subset_input_t hb_subset_input_t; + +HB_EXTERN hb_subset_input_t * +hb_subset_input_create_or_fail (void); + +HB_EXTERN hb_subset_input_t * +hb_subset_input_reference (hb_subset_input_t *subset_input); + +HB_EXTERN void +hb_subset_input_destroy (hb_subset_input_t *subset_input); + +HB_EXTERN hb_set_t * +hb_subset_input_unicode_set (hb_subset_input_t *subset_input); + +HB_EXTERN hb_set_t * +hb_subset_input_glyph_set (hb_subset_input_t *subset_input); + +HB_EXTERN hb_bool_t * +hb_subset_input_drop_hints (hb_subset_input_t *subset_input); + +/* hb_subset() */ + +HB_EXTERN hb_face_t * +hb_subset (hb_face_t *source, + hb_subset_profile_t *profile, + hb_subset_input_t *input); + +HB_END_DECLS + +#endif /* HB_SUBSET_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-unicode.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-unicode.h new file mode 100755 index 00000000..2657f481 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-unicode.h @@ -0,0 +1,471 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2011 Codethink Limited + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Codethink Author(s): Ryan Lortie + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_UNICODE_H +#define HB_UNICODE_H + +#include "hb-common.h" + +HB_BEGIN_DECLS + + +/* hb_unicode_general_category_t */ + +/* Unicode Character Database property: General_Category (gc) */ +typedef enum +{ + HB_UNICODE_GENERAL_CATEGORY_CONTROL, /* Cc */ + HB_UNICODE_GENERAL_CATEGORY_FORMAT, /* Cf */ + HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED, /* Cn */ + HB_UNICODE_GENERAL_CATEGORY_PRIVATE_USE, /* Co */ + HB_UNICODE_GENERAL_CATEGORY_SURROGATE, /* Cs */ + HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER, /* Ll */ + HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER, /* Lm */ + HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER, /* Lo */ + HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER, /* Lt */ + HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER, /* Lu */ + HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK, /* Mc */ + HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK, /* Me */ + HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK, /* Mn */ + HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER, /* Nd */ + HB_UNICODE_GENERAL_CATEGORY_LETTER_NUMBER, /* Nl */ + HB_UNICODE_GENERAL_CATEGORY_OTHER_NUMBER, /* No */ + HB_UNICODE_GENERAL_CATEGORY_CONNECT_PUNCTUATION, /* Pc */ + HB_UNICODE_GENERAL_CATEGORY_DASH_PUNCTUATION, /* Pd */ + HB_UNICODE_GENERAL_CATEGORY_CLOSE_PUNCTUATION, /* Pe */ + HB_UNICODE_GENERAL_CATEGORY_FINAL_PUNCTUATION, /* Pf */ + HB_UNICODE_GENERAL_CATEGORY_INITIAL_PUNCTUATION, /* Pi */ + HB_UNICODE_GENERAL_CATEGORY_OTHER_PUNCTUATION, /* Po */ + HB_UNICODE_GENERAL_CATEGORY_OPEN_PUNCTUATION, /* Ps */ + HB_UNICODE_GENERAL_CATEGORY_CURRENCY_SYMBOL, /* Sc */ + HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL, /* Sk */ + HB_UNICODE_GENERAL_CATEGORY_MATH_SYMBOL, /* Sm */ + HB_UNICODE_GENERAL_CATEGORY_OTHER_SYMBOL, /* So */ + HB_UNICODE_GENERAL_CATEGORY_LINE_SEPARATOR, /* Zl */ + HB_UNICODE_GENERAL_CATEGORY_PARAGRAPH_SEPARATOR, /* Zp */ + HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR /* Zs */ +} hb_unicode_general_category_t; + +/* hb_unicode_combining_class_t */ + +/* Note: newer versions of Unicode may add new values. Clients should be ready to handle + * any value in the 0..254 range being returned from hb_unicode_combining_class(). + */ + +/* Unicode Character Database property: Canonical_Combining_Class (ccc) */ +typedef enum +{ + HB_UNICODE_COMBINING_CLASS_NOT_REORDERED = 0, + HB_UNICODE_COMBINING_CLASS_OVERLAY = 1, + HB_UNICODE_COMBINING_CLASS_NUKTA = 7, + HB_UNICODE_COMBINING_CLASS_KANA_VOICING = 8, + HB_UNICODE_COMBINING_CLASS_VIRAMA = 9, + + /* Hebrew */ + HB_UNICODE_COMBINING_CLASS_CCC10 = 10, + HB_UNICODE_COMBINING_CLASS_CCC11 = 11, + HB_UNICODE_COMBINING_CLASS_CCC12 = 12, + HB_UNICODE_COMBINING_CLASS_CCC13 = 13, + HB_UNICODE_COMBINING_CLASS_CCC14 = 14, + HB_UNICODE_COMBINING_CLASS_CCC15 = 15, + HB_UNICODE_COMBINING_CLASS_CCC16 = 16, + HB_UNICODE_COMBINING_CLASS_CCC17 = 17, + HB_UNICODE_COMBINING_CLASS_CCC18 = 18, + HB_UNICODE_COMBINING_CLASS_CCC19 = 19, + HB_UNICODE_COMBINING_CLASS_CCC20 = 20, + HB_UNICODE_COMBINING_CLASS_CCC21 = 21, + HB_UNICODE_COMBINING_CLASS_CCC22 = 22, + HB_UNICODE_COMBINING_CLASS_CCC23 = 23, + HB_UNICODE_COMBINING_CLASS_CCC24 = 24, + HB_UNICODE_COMBINING_CLASS_CCC25 = 25, + HB_UNICODE_COMBINING_CLASS_CCC26 = 26, + + /* Arabic */ + HB_UNICODE_COMBINING_CLASS_CCC27 = 27, + HB_UNICODE_COMBINING_CLASS_CCC28 = 28, + HB_UNICODE_COMBINING_CLASS_CCC29 = 29, + HB_UNICODE_COMBINING_CLASS_CCC30 = 30, + HB_UNICODE_COMBINING_CLASS_CCC31 = 31, + HB_UNICODE_COMBINING_CLASS_CCC32 = 32, + HB_UNICODE_COMBINING_CLASS_CCC33 = 33, + HB_UNICODE_COMBINING_CLASS_CCC34 = 34, + HB_UNICODE_COMBINING_CLASS_CCC35 = 35, + + /* Syriac */ + HB_UNICODE_COMBINING_CLASS_CCC36 = 36, + + /* Telugu */ + HB_UNICODE_COMBINING_CLASS_CCC84 = 84, + HB_UNICODE_COMBINING_CLASS_CCC91 = 91, + + /* Thai */ + HB_UNICODE_COMBINING_CLASS_CCC103 = 103, + HB_UNICODE_COMBINING_CLASS_CCC107 = 107, + + /* Lao */ + HB_UNICODE_COMBINING_CLASS_CCC118 = 118, + HB_UNICODE_COMBINING_CLASS_CCC122 = 122, + + /* Tibetan */ + HB_UNICODE_COMBINING_CLASS_CCC129 = 129, + HB_UNICODE_COMBINING_CLASS_CCC130 = 130, + HB_UNICODE_COMBINING_CLASS_CCC133 = 132, + + + HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW_LEFT = 200, + HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW = 202, + HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE = 214, + HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE_RIGHT = 216, + HB_UNICODE_COMBINING_CLASS_BELOW_LEFT = 218, + HB_UNICODE_COMBINING_CLASS_BELOW = 220, + HB_UNICODE_COMBINING_CLASS_BELOW_RIGHT = 222, + HB_UNICODE_COMBINING_CLASS_LEFT = 224, + HB_UNICODE_COMBINING_CLASS_RIGHT = 226, + HB_UNICODE_COMBINING_CLASS_ABOVE_LEFT = 228, + HB_UNICODE_COMBINING_CLASS_ABOVE = 230, + HB_UNICODE_COMBINING_CLASS_ABOVE_RIGHT = 232, + HB_UNICODE_COMBINING_CLASS_DOUBLE_BELOW = 233, + HB_UNICODE_COMBINING_CLASS_DOUBLE_ABOVE = 234, + + HB_UNICODE_COMBINING_CLASS_IOTA_SUBSCRIPT = 240, + + HB_UNICODE_COMBINING_CLASS_INVALID = 255 +} hb_unicode_combining_class_t; + + +/* + * hb_unicode_funcs_t + */ + +typedef struct hb_unicode_funcs_t hb_unicode_funcs_t; + + +/* + * just give me the best implementation you've got there. + */ +HB_EXTERN hb_unicode_funcs_t * +hb_unicode_funcs_get_default (void); + + +HB_EXTERN hb_unicode_funcs_t * +hb_unicode_funcs_create (hb_unicode_funcs_t *parent); + +HB_EXTERN hb_unicode_funcs_t * +hb_unicode_funcs_get_empty (void); + +HB_EXTERN hb_unicode_funcs_t * +hb_unicode_funcs_reference (hb_unicode_funcs_t *ufuncs); + +HB_EXTERN void +hb_unicode_funcs_destroy (hb_unicode_funcs_t *ufuncs); + +HB_EXTERN hb_bool_t +hb_unicode_funcs_set_user_data (hb_unicode_funcs_t *ufuncs, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +HB_EXTERN void * +hb_unicode_funcs_get_user_data (hb_unicode_funcs_t *ufuncs, + hb_user_data_key_t *key); + + +HB_EXTERN void +hb_unicode_funcs_make_immutable (hb_unicode_funcs_t *ufuncs); + +HB_EXTERN hb_bool_t +hb_unicode_funcs_is_immutable (hb_unicode_funcs_t *ufuncs); + +HB_EXTERN hb_unicode_funcs_t * +hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs); + + +/* + * funcs + */ + +/* typedefs */ + +typedef hb_unicode_combining_class_t (*hb_unicode_combining_class_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode, + void *user_data); +typedef unsigned int (*hb_unicode_eastasian_width_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode, + void *user_data); +typedef hb_unicode_general_category_t (*hb_unicode_general_category_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode, + void *user_data); +typedef hb_codepoint_t (*hb_unicode_mirroring_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode, + void *user_data); +typedef hb_script_t (*hb_unicode_script_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode, + void *user_data); + +typedef hb_bool_t (*hb_unicode_compose_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t a, + hb_codepoint_t b, + hb_codepoint_t *ab, + void *user_data); +typedef hb_bool_t (*hb_unicode_decompose_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t ab, + hb_codepoint_t *a, + hb_codepoint_t *b, + void *user_data); + +/** + * hb_unicode_decompose_compatibility_func_t: + * @ufuncs: a Unicode function structure + * @u: codepoint to decompose + * @decomposed: address of codepoint array (of length %HB_UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into + * @user_data: user data pointer as passed to hb_unicode_funcs_set_decompose_compatibility_func() + * + * Fully decompose @u to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to @decomposed. + * The complete length of the decomposition will be returned. + * + * If @u has no compatibility decomposition, zero should be returned. + * + * The Unicode standard guarantees that a buffer of length %HB_UNICODE_MAX_DECOMPOSITION_LEN codepoints will always be sufficient for any + * compatibility decomposition plus an terminating value of 0. Consequently, @decompose must be allocated by the caller to be at least this length. Implementations + * of this function type must ensure that they do not write past the provided array. + * + * Return value: number of codepoints in the full compatibility decomposition of @u, or 0 if no decomposition available. + */ +typedef unsigned int (*hb_unicode_decompose_compatibility_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t u, + hb_codepoint_t *decomposed, + void *user_data); + +/* See Unicode 6.1 for details on the maximum decomposition length. */ +#define HB_UNICODE_MAX_DECOMPOSITION_LEN (18+1) /* codepoints */ + +/* setters */ + +/** + * hb_unicode_funcs_set_combining_class_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_combining_class_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_eastasian_width_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_eastasian_width_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_general_category_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_general_category_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_general_category_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_mirroring_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_mirroring_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_mirroring_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_script_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_script_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_script_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_compose_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_compose_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_compose_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_decompose_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_decompose_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_decompose_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_funcs_set_decompose_compatibility_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +HB_EXTERN void +hb_unicode_funcs_set_decompose_compatibility_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_decompose_compatibility_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/* accessors */ + +/** + * hb_unicode_combining_class: + * + * Since: 0.9.2 + **/ +HB_EXTERN hb_unicode_combining_class_t +hb_unicode_combining_class (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +/** + * hb_unicode_eastasian_width: + * + * Since: 0.9.2 + **/ +HB_EXTERN unsigned int +hb_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +/** + * hb_unicode_general_category: + * + * Since: 0.9.2 + **/ +HB_EXTERN hb_unicode_general_category_t +hb_unicode_general_category (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +/** + * hb_unicode_mirroring: + * + * Since: 0.9.2 + **/ +HB_EXTERN hb_codepoint_t +hb_unicode_mirroring (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +/** + * hb_unicode_script: + * + * Since: 0.9.2 + **/ +HB_EXTERN hb_script_t +hb_unicode_script (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +HB_EXTERN hb_bool_t +hb_unicode_compose (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t a, + hb_codepoint_t b, + hb_codepoint_t *ab); + +HB_EXTERN hb_bool_t +hb_unicode_decompose (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t ab, + hb_codepoint_t *a, + hb_codepoint_t *b); + +HB_EXTERN unsigned int +hb_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t u, + hb_codepoint_t *decomposed); + +HB_END_DECLS + +#endif /* HB_UNICODE_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-version.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-version.h new file mode 100755 index 00000000..27509326 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb-version.h @@ -0,0 +1,66 @@ +/* + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + +#ifndef HB_VERSION_H +#define HB_VERSION_H + +#include "hb-common.h" + +HB_BEGIN_DECLS + + +#define HB_VERSION_MAJOR 1 +#define HB_VERSION_MINOR 7 +#define HB_VERSION_MICRO 6 + +#define HB_VERSION_STRING "1.7.6" + +#define HB_VERSION_ATLEAST(major,minor,micro) \ + ((major)*10000+(minor)*100+(micro) <= \ + HB_VERSION_MAJOR*10000+HB_VERSION_MINOR*100+HB_VERSION_MICRO) + + +HB_EXTERN void +hb_version (unsigned int *major, + unsigned int *minor, + unsigned int *micro); + +HB_EXTERN const char * +hb_version_string (void); + +HB_EXTERN hb_bool_t +hb_version_atleast (unsigned int major, + unsigned int minor, + unsigned int micro); + + +HB_END_DECLS + +#endif /* HB_VERSION_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb.h b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb.h new file mode 100755 index 00000000..7402034f --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/include/harfbuzz/hb.h @@ -0,0 +1,51 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_H +#define HB_H +#define HB_H_IN + +#ifndef HB_EXTERN +#define HB_EXTERN extern +#endif + +#include "hb-blob.h" +#include "hb-buffer.h" +#include "hb-common.h" +#include "hb-deprecated.h" +#include "hb-face.h" +#include "hb-font.h" +#include "hb-set.h" +#include "hb-shape.h" +#include "hb-shape-plan.h" +#include "hb-unicode.h" +#include "hb-version.h" + +HB_BEGIN_DECLS +HB_END_DECLS + +#undef HB_H_IN +#endif /* HB_H */ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz-gobject.0.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz-gobject.0.dylib new file mode 100755 index 00000000..ad3475fb Binary files /dev/null and b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz-gobject.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz-gobject.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz-gobject.dylib new file mode 120000 index 00000000..78c5b4be --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz-gobject.dylib @@ -0,0 +1 @@ +libharfbuzz-gobject.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz-icu.0.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz-icu.0.dylib new file mode 100755 index 00000000..741ae9ad Binary files /dev/null and b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz-icu.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz-icu.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz-icu.dylib new file mode 120000 index 00000000..b19944cc --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz-icu.dylib @@ -0,0 +1 @@ +libharfbuzz-icu.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz-subset.0.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz-subset.0.dylib new file mode 100755 index 00000000..cb4803fe Binary files /dev/null and b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz-subset.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz-subset.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz-subset.dylib new file mode 120000 index 00000000..8ce512dc --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz-subset.dylib @@ -0,0 +1 @@ +libharfbuzz-subset.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz.0.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz.0.dylib new file mode 100755 index 00000000..25b93320 Binary files /dev/null and b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz.dylib b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz.dylib new file mode 120000 index 00000000..fbfe2d23 --- /dev/null +++ b/frameworks/cairosvg/dependencies/harfbuzz/1.7.6_2/lib/libharfbuzz.dylib @@ -0,0 +1 @@ +libharfbuzz.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/alphaindex.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/alphaindex.h new file mode 100755 index 00000000..1442f754 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/alphaindex.h @@ -0,0 +1,755 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 2011-2014 International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +*/ + +#ifndef INDEXCHARS_H +#define INDEXCHARS_H + +#include "unicode/utypes.h" +#include "unicode/uobject.h" +#include "unicode/locid.h" +#include "unicode/unistr.h" + +#if !UCONFIG_NO_COLLATION + +/** + * \file + * \brief C++ API: Index Characters + */ + +U_CDECL_BEGIN + +/** + * Constants for Alphabetic Index Label Types. + * The form of these enum constants anticipates having a plain C API + * for Alphabetic Indexes that will also use them. + * @stable ICU 4.8 + */ +typedef enum UAlphabeticIndexLabelType { + /** + * Normal Label, typically the starting letter of the names + * in the bucket with this label. + * @stable ICU 4.8 + */ + U_ALPHAINDEX_NORMAL = 0, + + /** + * Undeflow Label. The bucket with this label contains names + * in scripts that sort before any of the bucket labels in this index. + * @stable ICU 4.8 + */ + U_ALPHAINDEX_UNDERFLOW = 1, + + /** + * Inflow Label. The bucket with this label contains names + * in scripts that sort between two of the bucket labels in this index. + * Inflow labels are created when an index contains normal labels for + * multiple scripts, and skips other scripts that sort between some of the + * included scripts. + * @stable ICU 4.8 + */ + U_ALPHAINDEX_INFLOW = 2, + + /** + * Overflow Label. Te bucket with this label contains names in scripts + * that sort after all of the bucket labels in this index. + * @stable ICU 4.8 + */ + U_ALPHAINDEX_OVERFLOW = 3 +} UAlphabeticIndexLabelType; + + +struct UHashtable; +U_CDECL_END + +U_NAMESPACE_BEGIN + +// Forward Declarations + +class BucketList; +class Collator; +class RuleBasedCollator; +class StringEnumeration; +class UnicodeSet; +class UVector; + +/** + * AlphabeticIndex supports the creation of a UI index appropriate for a given language. + * It can support either direct use, or use with a client that doesn't support localized collation. + * The following is an example of what an index might look like in a UI: + * + * <pre> + * <b>... A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ...</b> + * + * <b>A</b> + * Addison + * Albertson + * Azensky + * <b>B</b> + * Baker + * ... + * </pre> + * + * The class can generate a list of labels for use as a UI "index", that is, a list of + * clickable characters (or character sequences) that allow the user to see a segment + * (bucket) of a larger "target" list. That is, each label corresponds to a bucket in + * the target list, where everything in the bucket is greater than or equal to the character + * (according to the locale's collation). Strings can be added to the index; + * they will be in sorted order in the right bucket. + * <p> + * The class also supports having buckets for strings before the first (underflow), + * after the last (overflow), and between scripts (inflow). For example, if the index + * is constructed with labels for Russian and English, Greek characters would fall + * into an inflow bucket between the other two scripts. + * <p> + * The AlphabeticIndex class is not intended for public subclassing. + * + * <p><em>Note:</em> If you expect to have a lot of ASCII or Latin characters + * as well as characters from the user's language, + * then it is a good idea to call addLabels(Locale::getEnglish(), status).</p> + * + * <h2>Direct Use</h2> + * <p>The following shows an example of building an index directly. + * The "show..." methods below are just to illustrate usage. + * + * <pre> + * // Create a simple index. "Item" is assumed to be an application + * // defined type that the application's UI and other processing knows about, + * // and that has a name. + * + * UErrorCode status = U_ZERO_ERROR; + * AlphabeticIndex index = new AlphabeticIndex(desiredLocale, status); + * index->addLabels(additionalLocale, status); + * for (Item *item in some source of Items ) { + * index->addRecord(item->name(), item, status); + * } + * ... + * // Show index at top. We could skip or gray out empty buckets + * + * while (index->nextBucket(status)) { + * if (showAll || index->getBucketRecordCount() != 0) { + * showLabelAtTop(UI, index->getBucketLabel()); + * } + * } + * ... + * // Show the buckets with their contents, skipping empty buckets + * + * index->resetBucketIterator(status); + * while (index->nextBucket(status)) { + * if (index->getBucketRecordCount() != 0) { + * showLabelInList(UI, index->getBucketLabel()); + * while (index->nextRecord(status)) { + * showIndexedItem(UI, static_cast<Item *>(index->getRecordData())) + * </pre> + * + * The caller can build different UIs using this class. + * For example, an index character could be omitted or grayed-out + * if its bucket is empty. Small buckets could also be combined based on size, such as: + * + * <pre> + * <b>... A-F G-N O-Z ...</b> + * </pre> + * + * <h2>Client Support</h2> + * <p>Callers can also use the AlphabeticIndex::ImmutableIndex, or the AlphabeticIndex itself, + * to support sorting on a client that doesn't support AlphabeticIndex functionality. + * + * <p>The ImmutableIndex is both immutable and thread-safe. + * The corresponding AlphabeticIndex methods are not thread-safe because + * they "lazily" build the index buckets. + * <ul> + * <li>ImmutableIndex.getBucket(index) provides random access to all + * buckets and their labels and label types. + * <li>The AlphabeticIndex bucket iterator or ImmutableIndex.getBucket(0..getBucketCount-1) + * can be used to get a list of the labels, + * such as "...", "A", "B",..., and send that list to the client. + * <li>When the client has a new name, it sends that name to the server. + * The server needs to call the following methods, + * and communicate the bucketIndex and collationKey back to the client. + * + * <pre> + * int32_t bucketIndex = index.getBucketIndex(name, status); + * const UnicodeString &label = immutableIndex.getBucket(bucketIndex)->getLabel(); // optional + * int32_t skLength = collator.getSortKey(name, sk, skCapacity); + * </pre> + * + * <li>The client would put the name (and associated information) into its bucket for bucketIndex. The sort key sk is a + * sequence of bytes that can be compared with a binary compare, and produce the right localized result.</li> + * </ul> + * + * @stable ICU 4.8 + */ +class U_I18N_API AlphabeticIndex: public UObject { +public: + /** + * An index "bucket" with a label string and type. + * It is referenced by getBucketIndex(), + * and returned by ImmutableIndex.getBucket(). + * + * The Bucket class is not intended for public subclassing. + * @stable ICU 51 + */ + class U_I18N_API Bucket : public UObject { + public: + /** + * Destructor. + * @stable ICU 51 + */ + virtual ~Bucket(); + + /** + * Returns the label string. + * + * @return the label string for the bucket + * @stable ICU 51 + */ + const UnicodeString &getLabel() const { return label_; } + /** + * Returns whether this bucket is a normal, underflow, overflow, or inflow bucket. + * + * @return the bucket label type + * @stable ICU 51 + */ + UAlphabeticIndexLabelType getLabelType() const { return labelType_; } + + private: + friend class AlphabeticIndex; + friend class BucketList; + + UnicodeString label_; + UnicodeString lowerBoundary_; + UAlphabeticIndexLabelType labelType_; + Bucket *displayBucket_; + int32_t displayIndex_; + UVector *records_; // Records are owned by the inputList_ vector. + + Bucket(const UnicodeString &label, // Parameter strings are copied. + const UnicodeString &lowerBoundary, + UAlphabeticIndexLabelType type); + }; + + /** + * Immutable, thread-safe version of AlphabeticIndex. + * This class provides thread-safe methods for bucketing, + * and random access to buckets and their properties, + * but does not offer adding records to the index. + * + * The ImmutableIndex class is not intended for public subclassing. + * + * @stable ICU 51 + */ + class U_I18N_API ImmutableIndex : public UObject { + public: + /** + * Destructor. + * @stable ICU 51 + */ + virtual ~ImmutableIndex(); + + /** + * Returns the number of index buckets and labels, including underflow/inflow/overflow. + * + * @return the number of index buckets + * @stable ICU 51 + */ + int32_t getBucketCount() const; + + /** + * Finds the index bucket for the given name and returns the number of that bucket. + * Use getBucket() to get the bucket's properties. + * + * @param name the string to be sorted into an index bucket + * @return the bucket number for the name + * @stable ICU 51 + */ + int32_t getBucketIndex(const UnicodeString &name, UErrorCode &errorCode) const; + + /** + * Returns the index-th bucket. Returns NULL if the index is out of range. + * + * @param index bucket number + * @return the index-th bucket + * @stable ICU 51 + */ + const Bucket *getBucket(int32_t index) const; + + private: + friend class AlphabeticIndex; + + ImmutableIndex(BucketList *bucketList, Collator *collatorPrimaryOnly) + : buckets_(bucketList), collatorPrimaryOnly_(collatorPrimaryOnly) {} + + BucketList *buckets_; + Collator *collatorPrimaryOnly_; + }; + + /** + * Construct an AlphabeticIndex object for the specified locale. If the locale's + * data does not include index characters, a set of them will be + * synthesized based on the locale's exemplar characters. The locale + * determines the sorting order for both the index characters and the + * user item names appearing under each Index character. + * + * @param locale the desired locale. + * @param status Error code, will be set with the reason if the construction + * of the AlphabeticIndex object fails. + * @stable ICU 4.8 + */ + AlphabeticIndex(const Locale &locale, UErrorCode &status); + + /** + * Construct an AlphabeticIndex that uses a specific collator. + * + * The index will be created with no labels; the addLabels() function must be called + * after creation to add the desired labels to the index. + * + * The index adopts the collator, and is responsible for deleting it. + * The caller should make no further use of the collator after creating the index. + * + * @param collator The collator to use to order the contents of this index. + * @param status Error code, will be set with the reason if the + * operation fails. + * @stable ICU 51 + */ + AlphabeticIndex(RuleBasedCollator *collator, UErrorCode &status); + + /** + * Add Labels to this Index. The labels are additions to those + * that are already in the index; they do not replace the existing + * ones. + * @param additions The additional characters to add to the index, such as A-Z. + * @param status Error code, will be set with the reason if the + * operation fails. + * @return this, for chaining + * @stable ICU 4.8 + */ + virtual AlphabeticIndex &addLabels(const UnicodeSet &additions, UErrorCode &status); + + /** + * Add the index characters from a Locale to the index. The labels + * are added to those that are already in the index; they do not replace the + * existing index characters. The collation order for this index is not + * changed; it remains that of the locale that was originally specified + * when creating this Index. + * + * @param locale The locale whose index characters are to be added. + * @param status Error code, will be set with the reason if the + * operation fails. + * @return this, for chaining + * @stable ICU 4.8 + */ + virtual AlphabeticIndex &addLabels(const Locale &locale, UErrorCode &status); + + /** + * Destructor + * @stable ICU 4.8 + */ + virtual ~AlphabeticIndex(); + + /** + * Builds an immutable, thread-safe version of this instance, without data records. + * + * @return an immutable index instance + * @stable ICU 51 + */ + ImmutableIndex *buildImmutableIndex(UErrorCode &errorCode); + + /** + * Get the Collator that establishes the ordering of the items in this index. + * Ownership of the collator remains with the AlphabeticIndex instance. + * + * The returned collator is a reference to the internal collator used by this + * index. It may be safely used to compare the names of items or to get + * sort keys for names. However if any settings need to be changed, + * or other non-const methods called, a cloned copy must be made first. + * + * @return The collator + * @stable ICU 4.8 + */ + virtual const RuleBasedCollator &getCollator() const; + + + /** + * Get the default label used for abbreviated buckets <i>between</i> other index characters. + * For example, consider the labels when Latin and Greek are used: + * X Y Z ... Α Β Γ. + * + * @return inflow label + * @stable ICU 4.8 + */ + virtual const UnicodeString &getInflowLabel() const; + + /** + * Set the default label used for abbreviated buckets <i>between</i> other index characters. + * An inflow label will be automatically inserted if two otherwise-adjacent label characters + * are from different scripts, e.g. Latin and Cyrillic, and a third script, e.g. Greek, + * sorts between the two. The default inflow character is an ellipsis (...) + * + * @param inflowLabel the new Inflow label. + * @param status Error code, will be set with the reason if the operation fails. + * @return this + * @stable ICU 4.8 + */ + virtual AlphabeticIndex &setInflowLabel(const UnicodeString &inflowLabel, UErrorCode &status); + + + /** + * Get the special label used for items that sort after the last normal label, + * and that would not otherwise have an appropriate label. + * + * @return the overflow label + * @stable ICU 4.8 + */ + virtual const UnicodeString &getOverflowLabel() const; + + + /** + * Set the label used for items that sort after the last normal label, + * and that would not otherwise have an appropriate label. + * + * @param overflowLabel the new overflow label. + * @param status Error code, will be set with the reason if the operation fails. + * @return this + * @stable ICU 4.8 + */ + virtual AlphabeticIndex &setOverflowLabel(const UnicodeString &overflowLabel, UErrorCode &status); + + /** + * Get the special label used for items that sort before the first normal label, + * and that would not otherwise have an appropriate label. + * + * @return underflow label + * @stable ICU 4.8 + */ + virtual const UnicodeString &getUnderflowLabel() const; + + /** + * Set the label used for items that sort before the first normal label, + * and that would not otherwise have an appropriate label. + * + * @param underflowLabel the new underflow label. + * @param status Error code, will be set with the reason if the operation fails. + * @return this + * @stable ICU 4.8 + */ + virtual AlphabeticIndex &setUnderflowLabel(const UnicodeString &underflowLabel, UErrorCode &status); + + + /** + * Get the limit on the number of labels permitted in the index. + * The number does not include over, under and inflow labels. + * + * @return maxLabelCount maximum number of labels. + * @stable ICU 4.8 + */ + virtual int32_t getMaxLabelCount() const; + + /** + * Set a limit on the number of labels permitted in the index. + * The number does not include over, under and inflow labels. + * Currently, if the number is exceeded, then every + * nth item is removed to bring the count down. + * A more sophisticated mechanism may be available in the future. + * + * @param maxLabelCount the maximum number of labels. + * @param status error code + * @return This, for chaining + * @stable ICU 4.8 + */ + virtual AlphabeticIndex &setMaxLabelCount(int32_t maxLabelCount, UErrorCode &status); + + + /** + * Add a record to the index. Each record will be associated with an index Bucket + * based on the record's name. The list of records for each bucket will be sorted + * based on the collation ordering of the names in the index's locale. + * Records with duplicate names are permitted; they will be kept in the order + * that they were added. + * + * @param name The display name for the Record. The Record will be placed in + * a bucket based on this name. + * @param data An optional pointer to user data associated with this + * item. When iterating the contents of a bucket, both the + * data pointer the name will be available for each Record. + * @param status Error code, will be set with the reason if the operation fails. + * @return This, for chaining. + * @stable ICU 4.8 + */ + virtual AlphabeticIndex &addRecord(const UnicodeString &name, const void *data, UErrorCode &status); + + /** + * Remove all Records from the Index. The set of Buckets, which define the headings under + * which records are classified, is not altered. + * + * @param status Error code, will be set with the reason if the operation fails. + * @return This, for chaining. + * @stable ICU 4.8 + */ + virtual AlphabeticIndex &clearRecords(UErrorCode &status); + + + /** Get the number of labels in this index. + * Note: may trigger lazy index construction. + * + * @param status Error code, will be set with the reason if the operation fails. + * @return The number of labels in this index, including any under, over or + * in-flow labels. + * @stable ICU 4.8 + */ + virtual int32_t getBucketCount(UErrorCode &status); + + + /** Get the total number of Records in this index, that is, the number + * of <name, data> pairs added. + * + * @param status Error code, will be set with the reason if the operation fails. + * @return The number of records in this index, that is, the total number + * of (name, data) items added with addRecord(). + * @stable ICU 4.8 + */ + virtual int32_t getRecordCount(UErrorCode &status); + + + + /** + * Given the name of a record, return the zero-based index of the Bucket + * in which the item should appear. The name need not be in the index. + * A Record will not be added to the index by this function. + * Bucket numbers are zero-based, in Bucket iteration order. + * + * @param itemName The name whose bucket position in the index is to be determined. + * @param status Error code, will be set with the reason if the operation fails. + * @return The bucket number for this name. + * @stable ICU 4.8 + * + */ + virtual int32_t getBucketIndex(const UnicodeString &itemName, UErrorCode &status); + + + /** + * Get the zero based index of the current Bucket from an iteration + * over the Buckets of this index. Return -1 if no iteration is in process. + * @return the index of the current Bucket + * @stable ICU 4.8 + */ + virtual int32_t getBucketIndex() const; + + + /** + * Advance the iteration over the Buckets of this index. Return FALSE if + * there are no more Buckets. + * + * @param status Error code, will be set with the reason if the operation fails. + * U_ENUM_OUT_OF_SYNC_ERROR will be reported if the index is modified while + * an enumeration of its contents are in process. + * + * @return TRUE if success, FALSE if at end of iteration + * @stable ICU 4.8 + */ + virtual UBool nextBucket(UErrorCode &status); + + /** + * Return the name of the Label of the current bucket from an iteration over the buckets. + * If the iteration is before the first Bucket (nextBucket() has not been called), + * or after the last, return an empty string. + * + * @return the bucket label. + * @stable ICU 4.8 + */ + virtual const UnicodeString &getBucketLabel() const; + + /** + * Return the type of the label for the current Bucket (selected by the + * iteration over Buckets.) + * + * @return the label type. + * @stable ICU 4.8 + */ + virtual UAlphabeticIndexLabelType getBucketLabelType() const; + + /** + * Get the number of <name, data> Records in the current Bucket. + * If the current bucket iteration position is before the first label or after the + * last, return 0. + * + * @return the number of Records. + * @stable ICU 4.8 + */ + virtual int32_t getBucketRecordCount() const; + + + /** + * Reset the Bucket iteration for this index. The next call to nextBucket() + * will restart the iteration at the first label. + * + * @param status Error code, will be set with the reason if the operation fails. + * @return this, for chaining. + * @stable ICU 4.8 + */ + virtual AlphabeticIndex &resetBucketIterator(UErrorCode &status); + + /** + * Advance to the next record in the current Bucket. + * When nextBucket() is called, Record iteration is reset to just before the + * first Record in the new Bucket. + * + * @param status Error code, will be set with the reason if the operation fails. + * U_ENUM_OUT_OF_SYNC_ERROR will be reported if the index is modified while + * an enumeration of its contents are in process. + * @return TRUE if successful, FALSE when the iteration advances past the last item. + * @stable ICU 4.8 + */ + virtual UBool nextRecord(UErrorCode &status); + + /** + * Get the name of the current Record. + * Return an empty string if the Record iteration position is before first + * or after the last. + * + * @return The name of the current index item. + * @stable ICU 4.8 + */ + virtual const UnicodeString &getRecordName() const; + + + /** + * Return the data pointer of the Record currently being iterated over. + * Return NULL if the current iteration position before the first item in this Bucket, + * or after the last. + * + * @return The current Record's data pointer. + * @stable ICU 4.8 + */ + virtual const void *getRecordData() const; + + + /** + * Reset the Record iterator position to before the first Record in the current Bucket. + * + * @return This, for chaining. + * @stable ICU 4.8 + */ + virtual AlphabeticIndex &resetRecordIterator(); + +private: + /** + * No Copy constructor. + * @internal + */ + AlphabeticIndex(const AlphabeticIndex &other); + + /** + * No assignment. + */ + AlphabeticIndex &operator =(const AlphabeticIndex & /*other*/) { return *this;}; + + /** + * No Equality operators. + * @internal + */ + virtual UBool operator==(const AlphabeticIndex& other) const; + + /** + * Inequality operator. + * @internal + */ + virtual UBool operator!=(const AlphabeticIndex& other) const; + + // Common initialization, for use from all constructors. + void init(const Locale *locale, UErrorCode &status); + + /** + * This method is called to get the index exemplars. Normally these come from the locale directly, + * but if they aren't available, we have to synthesize them. + */ + void addIndexExemplars(const Locale &locale, UErrorCode &status); + /** + * Add Chinese index characters from the tailoring. + */ + UBool addChineseIndexCharacters(UErrorCode &errorCode); + + UVector *firstStringsInScript(UErrorCode &status); + + static UnicodeString separated(const UnicodeString &item); + + /** + * Determine the best labels to use. + * This is based on the exemplars, but we also process to make sure that they are unique, + * and sort differently, and that the overall list is small enough. + */ + void initLabels(UVector &indexCharacters, UErrorCode &errorCode) const; + BucketList *createBucketList(UErrorCode &errorCode) const; + void initBuckets(UErrorCode &errorCode); + void clearBuckets(); + void internalResetBucketIterator(); + +public: + + // The Record is declared public only to allow access from + // implementation code written in plain C. + // It is not intended for public use. + +#ifndef U_HIDE_INTERNAL_API + /** + * A (name, data) pair, to be sorted by name into one of the index buckets. + * The user data is not used by the index implementation. + * @internal + */ + struct Record: public UMemory { + const UnicodeString name_; + const void *data_; + Record(const UnicodeString &name, const void *data); + ~Record(); + }; +#endif /* U_HIDE_INTERNAL_API */ + +private: + + /** + * Holds all user records before they are distributed into buckets. + * Type of contents is (Record *) + * @internal + */ + UVector *inputList_; + + int32_t labelsIterIndex_; // Index of next item to return. + int32_t itemsIterIndex_; + Bucket *currentBucket_; // While an iteration of the index in underway, + // point to the bucket for the current label. + // NULL when no iteration underway. + + int32_t maxLabelCount_; // Limit on # of labels permitted in the index. + + UnicodeSet *initialLabels_; // Initial (unprocessed) set of Labels. Union + // of those explicitly set by the user plus + // those from locales. Raw values, before + // crunching into bucket labels. + + UVector *firstCharsInScripts_; // The first character from each script, + // in collation order. + + RuleBasedCollator *collator_; + RuleBasedCollator *collatorPrimaryOnly_; + + // Lazy evaluated: null means that we have not built yet. + BucketList *buckets_; + + UnicodeString inflowLabel_; + UnicodeString overflowLabel_; + UnicodeString underflowLabel_; + UnicodeString overflowComparisonString_; + + UnicodeString emptyString_; +}; + +U_NAMESPACE_END + +#endif // !UCONFIG_NO_COLLATION +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/appendable.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/appendable.h new file mode 100755 index 00000000..8512c2f3 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/appendable.h @@ -0,0 +1,234 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2011-2012, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************* +* file name: appendable.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2010dec07 +* created by: Markus W. Scherer +*/ + +#ifndef __APPENDABLE_H__ +#define __APPENDABLE_H__ + +/** + * \file + * \brief C++ API: Appendable class: Sink for Unicode code points and 16-bit code units (char16_ts). + */ + +#include "unicode/utypes.h" +#include "unicode/uobject.h" + +U_NAMESPACE_BEGIN + +class UnicodeString; + +/** + * Base class for objects to which Unicode characters and strings can be appended. + * Combines elements of Java Appendable and ICU4C ByteSink. + * + * This class can be used in APIs where it does not matter whether the actual destination is + * a UnicodeString, a char16_t[] array, a UnicodeSet, or any other object + * that receives and processes characters and/or strings. + * + * Implementation classes must implement at least appendCodeUnit(char16_t). + * The base class provides default implementations for the other methods. + * + * The methods do not take UErrorCode parameters. + * If an error occurs (e.g., out-of-memory), + * in addition to returning FALSE from failing operations, + * the implementation must prevent unexpected behavior (e.g., crashes) + * from further calls and should make the error condition available separately + * (e.g., store a UErrorCode, make/keep a UnicodeString bogus). + * @stable ICU 4.8 + */ +class U_COMMON_API Appendable : public UObject { +public: + /** + * Destructor. + * @stable ICU 4.8 + */ + ~Appendable(); + + /** + * Appends a 16-bit code unit. + * @param c code unit + * @return TRUE if the operation succeeded + * @stable ICU 4.8 + */ + virtual UBool appendCodeUnit(char16_t c) = 0; + + /** + * Appends a code point. + * The default implementation calls appendCodeUnit(char16_t) once or twice. + * @param c code point 0..0x10ffff + * @return TRUE if the operation succeeded + * @stable ICU 4.8 + */ + virtual UBool appendCodePoint(UChar32 c); + + /** + * Appends a string. + * The default implementation calls appendCodeUnit(char16_t) for each code unit. + * @param s string, must not be NULL if length!=0 + * @param length string length, or -1 if NUL-terminated + * @return TRUE if the operation succeeded + * @stable ICU 4.8 + */ + virtual UBool appendString(const char16_t *s, int32_t length); + + /** + * Tells the object that the caller is going to append roughly + * appendCapacity char16_ts. A subclass might use this to pre-allocate + * a larger buffer if necessary. + * The default implementation does nothing. (It always returns TRUE.) + * @param appendCapacity estimated number of char16_ts that will be appended + * @return TRUE if the operation succeeded + * @stable ICU 4.8 + */ + virtual UBool reserveAppendCapacity(int32_t appendCapacity); + + /** + * Returns a writable buffer for appending and writes the buffer's capacity to + * *resultCapacity. Guarantees *resultCapacity>=minCapacity. + * May return a pointer to the caller-owned scratch buffer which must have + * scratchCapacity>=minCapacity. + * The returned buffer is only valid until the next operation + * on this Appendable. + * + * After writing at most *resultCapacity char16_ts, call appendString() with the + * pointer returned from this function and the number of char16_ts written. + * Many appendString() implementations will avoid copying char16_ts if this function + * returned an internal buffer. + * + * Partial usage example: + * \code + * int32_t capacity; + * char16_t* buffer = app.getAppendBuffer(..., &capacity); + * ... Write n char16_ts into buffer, with n <= capacity. + * app.appendString(buffer, n); + * \endcode + * In many implementations, that call to append will avoid copying char16_ts. + * + * If the Appendable allocates or reallocates an internal buffer, it should use + * the desiredCapacityHint if appropriate. + * If a caller cannot provide a reasonable guess at the desired capacity, + * it should pass desiredCapacityHint=0. + * + * If a non-scratch buffer is returned, the caller may only pass + * a prefix to it to appendString(). + * That is, it is not correct to pass an interior pointer to appendString(). + * + * The default implementation always returns the scratch buffer. + * + * @param minCapacity required minimum capacity of the returned buffer; + * must be non-negative + * @param desiredCapacityHint desired capacity of the returned buffer; + * must be non-negative + * @param scratch default caller-owned buffer + * @param scratchCapacity capacity of the scratch buffer + * @param resultCapacity pointer to an integer which will be set to the + * capacity of the returned buffer + * @return a buffer with *resultCapacity>=minCapacity + * @stable ICU 4.8 + */ + virtual char16_t *getAppendBuffer(int32_t minCapacity, + int32_t desiredCapacityHint, + char16_t *scratch, int32_t scratchCapacity, + int32_t *resultCapacity); +}; + +/** + * An Appendable implementation which writes to a UnicodeString. + * + * This class is not intended for public subclassing. + * @stable ICU 4.8 + */ +class U_COMMON_API UnicodeStringAppendable : public Appendable { +public: + /** + * Aliases the UnicodeString (keeps its reference) for writing. + * @param s The UnicodeString to which this Appendable will write. + * @stable ICU 4.8 + */ + explicit UnicodeStringAppendable(UnicodeString &s) : str(s) {} + + /** + * Destructor. + * @stable ICU 4.8 + */ + ~UnicodeStringAppendable(); + + /** + * Appends a 16-bit code unit to the string. + * @param c code unit + * @return TRUE if the operation succeeded + * @stable ICU 4.8 + */ + virtual UBool appendCodeUnit(char16_t c); + + /** + * Appends a code point to the string. + * @param c code point 0..0x10ffff + * @return TRUE if the operation succeeded + * @stable ICU 4.8 + */ + virtual UBool appendCodePoint(UChar32 c); + + /** + * Appends a string to the UnicodeString. + * @param s string, must not be NULL if length!=0 + * @param length string length, or -1 if NUL-terminated + * @return TRUE if the operation succeeded + * @stable ICU 4.8 + */ + virtual UBool appendString(const char16_t *s, int32_t length); + + /** + * Tells the UnicodeString that the caller is going to append roughly + * appendCapacity char16_ts. + * @param appendCapacity estimated number of char16_ts that will be appended + * @return TRUE if the operation succeeded + * @stable ICU 4.8 + */ + virtual UBool reserveAppendCapacity(int32_t appendCapacity); + + /** + * Returns a writable buffer for appending and writes the buffer's capacity to + * *resultCapacity. Guarantees *resultCapacity>=minCapacity. + * May return a pointer to the caller-owned scratch buffer which must have + * scratchCapacity>=minCapacity. + * The returned buffer is only valid until the next write operation + * on the UnicodeString. + * + * For details see Appendable::getAppendBuffer(). + * + * @param minCapacity required minimum capacity of the returned buffer; + * must be non-negative + * @param desiredCapacityHint desired capacity of the returned buffer; + * must be non-negative + * @param scratch default caller-owned buffer + * @param scratchCapacity capacity of the scratch buffer + * @param resultCapacity pointer to an integer which will be set to the + * capacity of the returned buffer + * @return a buffer with *resultCapacity>=minCapacity + * @stable ICU 4.8 + */ + virtual char16_t *getAppendBuffer(int32_t minCapacity, + int32_t desiredCapacityHint, + char16_t *scratch, int32_t scratchCapacity, + int32_t *resultCapacity); + +private: + UnicodeString &str; +}; + +U_NAMESPACE_END + +#endif // __APPENDABLE_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/basictz.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/basictz.h new file mode 100755 index 00000000..35412072 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/basictz.h @@ -0,0 +1,216 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2007-2013, International Business Machines Corporation and +* others. All Rights Reserved. +******************************************************************************* +*/ +#ifndef BASICTZ_H +#define BASICTZ_H + +/** + * \file + * \brief C++ API: ICU TimeZone base class + */ + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/timezone.h" +#include "unicode/tzrule.h" +#include "unicode/tztrans.h" + +U_NAMESPACE_BEGIN + +// forward declarations +class UVector; + +/** + * <code>BasicTimeZone</code> is an abstract class extending <code>TimeZone</code>. + * This class provides some additional methods to access time zone transitions and rules. + * All ICU <code>TimeZone</code> concrete subclasses extend this class. + * @stable ICU 3.8 + */ +class U_I18N_API BasicTimeZone: public TimeZone { +public: + /** + * Destructor. + * @stable ICU 3.8 + */ + virtual ~BasicTimeZone(); + + /** + * Gets the first time zone transition after the base time. + * @param base The base time. + * @param inclusive Whether the base time is inclusive or not. + * @param result Receives the first transition after the base time. + * @return TRUE if the transition is found. + * @stable ICU 3.8 + */ + virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const = 0; + + /** + * Gets the most recent time zone transition before the base time. + * @param base The base time. + * @param inclusive Whether the base time is inclusive or not. + * @param result Receives the most recent transition before the base time. + * @return TRUE if the transition is found. + * @stable ICU 3.8 + */ + virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const = 0; + + /** + * Checks if the time zone has equivalent transitions in the time range. + * This method returns true when all of transition times, from/to standard + * offsets and DST savings used by this time zone match the other in the + * time range. + * @param tz The <code>BasicTimeZone</code> object to be compared with. + * @param start The start time of the evaluated time range (inclusive) + * @param end The end time of the evaluated time range (inclusive) + * @param ignoreDstAmount + * When true, any transitions with only daylight saving amount + * changes will be ignored, except either of them is zero. + * For example, a transition from rawoffset 3:00/dstsavings 1:00 + * to rawoffset 2:00/dstsavings 2:00 is excluded from the comparison, + * but a transtion from rawoffset 2:00/dstsavings 1:00 to + * rawoffset 3:00/dstsavings 0:00 is included. + * @param ec Output param to filled in with a success or an error. + * @return true if the other time zone has the equivalent transitions in the + * time range. + * @stable ICU 3.8 + */ + virtual UBool hasEquivalentTransitions(const BasicTimeZone& tz, UDate start, UDate end, + UBool ignoreDstAmount, UErrorCode& ec) const; + + /** + * Returns the number of <code>TimeZoneRule</code>s which represents time transitions, + * for this time zone, that is, all <code>TimeZoneRule</code>s for this time zone except + * <code>InitialTimeZoneRule</code>. The return value range is 0 or any positive value. + * @param status Receives error status code. + * @return The number of <code>TimeZoneRule</code>s representing time transitions. + * @stable ICU 3.8 + */ + virtual int32_t countTransitionRules(UErrorCode& status) const = 0; + + /** + * Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZoneRule</code> + * which represent time transitions for this time zone. On successful return, + * the argument initial points to non-NULL <code>InitialTimeZoneRule</code> and + * the array trsrules is filled with 0 or multiple <code>TimeZoneRule</code> + * instances up to the size specified by trscount. The results are referencing the + * rule instance held by this time zone instance. Therefore, after this time zone + * is destructed, they are no longer available. + * @param initial Receives the initial timezone rule + * @param trsrules Receives the timezone transition rules + * @param trscount On input, specify the size of the array 'transitions' receiving + * the timezone transition rules. On output, actual number of + * rules filled in the array will be set. + * @param status Receives error status code. + * @stable ICU 3.8 + */ + virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial, + const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) const = 0; + + /** + * Gets the set of time zone rules valid at the specified time. Some known external time zone + * implementations are not capable to handle historic time zone rule changes. Also some + * implementations can only handle certain type of rule definitions. + * If this time zone does not use any daylight saving time within about 1 year from the specified + * time, only the <code>InitialTimeZone</code> is returned. Otherwise, the rule for standard + * time and daylight saving time transitions are returned in addition to the + * <code>InitialTimeZoneRule</code>. The standard and daylight saving time transition rules are + * represented by <code>AnnualTimeZoneRule</code> with <code>DateTimeRule::DOW</code> for its date + * rule and <code>DateTimeRule::WALL_TIME</code> for its time rule. Because daylight saving time + * rule is changing time to time in many time zones and also mapping a transition time rule to + * different type is lossy transformation, the set of rules returned by this method may be valid + * for short period of time. + * The time zone rule objects returned by this method is owned by the caller, so the caller is + * responsible for deleting them after use. + * @param date The date used for extracting time zone rules. + * @param initial Receives the <code>InitialTimeZone</code>, always not NULL. + * @param std Receives the <code>AnnualTimeZoneRule</code> for standard time transitions. + * When this time time zone does not observe daylight saving times around the + * specified date, NULL is set. + * @param dst Receives the <code>AnnualTimeZoneRule</code> for daylight saving time + * transitions. When this time zone does not observer daylight saving times + * around the specified date, NULL is set. + * @param status Receives error status code. + * @stable ICU 3.8 + */ + virtual void getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial, + AnnualTimeZoneRule*& std, AnnualTimeZoneRule*& dst, UErrorCode& status) const; + + +#ifndef U_HIDE_INTERNAL_API + /** + * The time type option bit flags used by getOffsetFromLocal + * @internal + */ + enum { + kStandard = 0x01, + kDaylight = 0x03, + kFormer = 0x04, + kLatter = 0x0C + }; +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Get time zone offsets from local wall time. + * @internal + */ + virtual void getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt, + int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const; + +protected: + +#ifndef U_HIDE_INTERNAL_API + /** + * The time type option bit masks used by getOffsetFromLocal + * @internal + */ + enum { + kStdDstMask = kDaylight, + kFormerLatterMask = kLatter + }; +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Default constructor. + * @stable ICU 3.8 + */ + BasicTimeZone(); + + /** + * Construct a timezone with a given ID. + * @param id a system time zone ID + * @stable ICU 3.8 + */ + BasicTimeZone(const UnicodeString &id); + + /** + * Copy constructor. + * @param source the object to be copied. + * @stable ICU 3.8 + */ + BasicTimeZone(const BasicTimeZone& source); + + /** + * Gets the set of TimeZoneRule instances applicable to the specified time and after. + * @param start The start date used for extracting time zone rules + * @param initial Receives the InitialTimeZone, always not NULL + * @param transitionRules Receives the transition rules, could be NULL + * @param status Receives error status code + */ + void getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial, UVector*& transitionRules, + UErrorCode& status) const; +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // BASICTZ_H + +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/brkiter.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/brkiter.h new file mode 100755 index 00000000..607f3ec6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/brkiter.h @@ -0,0 +1,660 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************** +* Copyright (C) 1997-2016, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************** +* +* File brkiter.h +* +* Modification History: +* +* Date Name Description +* 02/18/97 aliu Added typedef for TextCount. Made DONE const. +* 05/07/97 aliu Fixed DLL declaration. +* 07/09/97 jfitz Renamed BreakIterator and interface synced with JDK +* 08/11/98 helena Sync-up JDK1.2. +* 01/13/2000 helena Added UErrorCode parameter to createXXXInstance methods. +******************************************************************************** +*/ + +#ifndef BRKITER_H +#define BRKITER_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Break Iterator. + */ + +#if UCONFIG_NO_BREAK_ITERATION + +U_NAMESPACE_BEGIN + +/* + * Allow the declaration of APIs with pointers to BreakIterator + * even when break iteration is removed from the build. + */ +class BreakIterator; + +U_NAMESPACE_END + +#else + +#include "unicode/uobject.h" +#include "unicode/unistr.h" +#include "unicode/chariter.h" +#include "unicode/locid.h" +#include "unicode/ubrk.h" +#include "unicode/strenum.h" +#include "unicode/utext.h" +#include "unicode/umisc.h" + +U_NAMESPACE_BEGIN + +/** + * The BreakIterator class implements methods for finding the location + * of boundaries in text. BreakIterator is an abstract base class. + * Instances of BreakIterator maintain a current position and scan over + * text returning the index of characters where boundaries occur. + * <p> + * Line boundary analysis determines where a text string can be broken + * when line-wrapping. The mechanism correctly handles punctuation and + * hyphenated words. + * <p> + * Sentence boundary analysis allows selection with correct + * interpretation of periods within numbers and abbreviations, and + * trailing punctuation marks such as quotation marks and parentheses. + * <p> + * Word boundary analysis is used by search and replace functions, as + * well as within text editing applications that allow the user to + * select words with a double click. Word selection provides correct + * interpretation of punctuation marks within and following + * words. Characters that are not part of a word, such as symbols or + * punctuation marks, have word-breaks on both sides. + * <p> + * Character boundary analysis allows users to interact with + * characters as they expect to, for example, when moving the cursor + * through a text string. Character boundary analysis provides correct + * navigation of through character strings, regardless of how the + * character is stored. For example, an accented character might be + * stored as a base character and a diacritical mark. What users + * consider to be a character can differ between languages. + * <p> + * The text boundary positions are found according to the rules + * described in Unicode Standard Annex #29, Text Boundaries, and + * Unicode Standard Annex #14, Line Breaking Properties. These + * are available at http://www.unicode.org/reports/tr14/ and + * http://www.unicode.org/reports/tr29/. + * <p> + * In addition to the C++ API defined in this header file, a + * plain C API with equivalent functionality is defined in the + * file ubrk.h + * <p> + * Code snippets illustrating the use of the Break Iterator APIs + * are available in the ICU User Guide, + * http://icu-project.org/userguide/boundaryAnalysis.html + * and in the sample program icu/source/samples/break/break.cpp + * + */ +class U_COMMON_API BreakIterator : public UObject { +public: + /** + * destructor + * @stable ICU 2.0 + */ + virtual ~BreakIterator(); + + /** + * Return true if another object is semantically equal to this + * one. The other object should be an instance of the same subclass of + * BreakIterator. Objects of different subclasses are considered + * unequal. + * <P> + * Return true if this BreakIterator is at the same position in the + * same text, and is the same class and type (word, line, etc.) of + * BreakIterator, as the argument. Text is considered the same if + * it contains the same characters, it need not be the same + * object, and styles are not considered. + * @stable ICU 2.0 + */ + virtual UBool operator==(const BreakIterator&) const = 0; + + /** + * Returns the complement of the result of operator== + * @param rhs The BreakIterator to be compared for inequality + * @return the complement of the result of operator== + * @stable ICU 2.0 + */ + UBool operator!=(const BreakIterator& rhs) const { return !operator==(rhs); } + + /** + * Return a polymorphic copy of this object. This is an abstract + * method which subclasses implement. + * @stable ICU 2.0 + */ + virtual BreakIterator* clone(void) const = 0; + + /** + * Return a polymorphic class ID for this object. Different subclasses + * will return distinct unequal values. + * @stable ICU 2.0 + */ + virtual UClassID getDynamicClassID(void) const = 0; + + /** + * Return a CharacterIterator over the text being analyzed. + * @stable ICU 2.0 + */ + virtual CharacterIterator& getText(void) const = 0; + + + /** + * Get a UText for the text being analyzed. + * The returned UText is a shallow clone of the UText used internally + * by the break iterator implementation. It can safely be used to + * access the text without impacting any break iterator operations, + * but the underlying text itself must not be altered. + * + * @param fillIn A UText to be filled in. If NULL, a new UText will be + * allocated to hold the result. + * @param status receives any error codes. + * @return The current UText for this break iterator. If an input + * UText was provided, it will always be returned. + * @stable ICU 3.4 + */ + virtual UText *getUText(UText *fillIn, UErrorCode &status) const = 0; + + /** + * Change the text over which this operates. The text boundary is + * reset to the start. + * + * The BreakIterator will retain a reference to the supplied string. + * The caller must not modify or delete the text while the BreakIterator + * retains the reference. + * + * @param text The UnicodeString used to change the text. + * @stable ICU 2.0 + */ + virtual void setText(const UnicodeString &text) = 0; + + /** + * Reset the break iterator to operate over the text represented by + * the UText. The iterator position is reset to the start. + * + * This function makes a shallow clone of the supplied UText. This means + * that the caller is free to immediately close or otherwise reuse the + * Utext that was passed as a parameter, but that the underlying text itself + * must not be altered while being referenced by the break iterator. + * + * All index positions returned by break iterator functions are + * native indices from the UText. For example, when breaking UTF-8 + * encoded text, the break positions returned by next(), previous(), etc. + * will be UTF-8 string indices, not UTF-16 positions. + * + * @param text The UText used to change the text. + * @param status receives any error codes. + * @stable ICU 3.4 + */ + virtual void setText(UText *text, UErrorCode &status) = 0; + + /** + * Change the text over which this operates. The text boundary is + * reset to the start. + * Note that setText(UText *) provides similar functionality to this function, + * and is more efficient. + * @param it The CharacterIterator used to change the text. + * @stable ICU 2.0 + */ + virtual void adoptText(CharacterIterator* it) = 0; + + enum { + /** + * DONE is returned by previous() and next() after all valid + * boundaries have been returned. + * @stable ICU 2.0 + */ + DONE = (int32_t)-1 + }; + + /** + * Sets the current iteration position to the beginning of the text, position zero. + * @return The offset of the beginning of the text, zero. + * @stable ICU 2.0 + */ + virtual int32_t first(void) = 0; + + /** + * Set the iterator position to the index immediately BEYOND the last character in the text being scanned. + * @return The index immediately BEYOND the last character in the text being scanned. + * @stable ICU 2.0 + */ + virtual int32_t last(void) = 0; + + /** + * Set the iterator position to the boundary preceding the current boundary. + * @return The character index of the previous text boundary or DONE if all + * boundaries have been returned. + * @stable ICU 2.0 + */ + virtual int32_t previous(void) = 0; + + /** + * Advance the iterator to the boundary following the current boundary. + * @return The character index of the next text boundary or DONE if all + * boundaries have been returned. + * @stable ICU 2.0 + */ + virtual int32_t next(void) = 0; + + /** + * Return character index of the current iterator position within the text. + * @return The boundary most recently returned. + * @stable ICU 2.0 + */ + virtual int32_t current(void) const = 0; + + /** + * Advance the iterator to the first boundary following the specified offset. + * The value returned is always greater than the offset or + * the value BreakIterator.DONE + * @param offset the offset to begin scanning. + * @return The first boundary after the specified offset. + * @stable ICU 2.0 + */ + virtual int32_t following(int32_t offset) = 0; + + /** + * Set the iterator position to the first boundary preceding the specified offset. + * The value returned is always smaller than the offset or + * the value BreakIterator.DONE + * @param offset the offset to begin scanning. + * @return The first boundary before the specified offset. + * @stable ICU 2.0 + */ + virtual int32_t preceding(int32_t offset) = 0; + + /** + * Return true if the specified position is a boundary position. + * As a side effect, the current position of the iterator is set + * to the first boundary position at or following the specified offset. + * @param offset the offset to check. + * @return True if "offset" is a boundary position. + * @stable ICU 2.0 + */ + virtual UBool isBoundary(int32_t offset) = 0; + + /** + * Set the iterator position to the nth boundary from the current boundary + * @param n the number of boundaries to move by. A value of 0 + * does nothing. Negative values move to previous boundaries + * and positive values move to later boundaries. + * @return The new iterator position, or + * DONE if there are fewer than |n| boundaries in the specified direction. + * @stable ICU 2.0 + */ + virtual int32_t next(int32_t n) = 0; + + /** + * For RuleBasedBreakIterators, return the status tag from the break rule + * that determined the boundary at the current iteration position. + * <p> + * For break iterator types that do not support a rule status, + * a default value of 0 is returned. + * <p> + * @return the status from the break rule that determined the boundary at + * the current iteration position. + * @see RuleBaseBreakIterator::getRuleStatus() + * @see UWordBreak + * @stable ICU 52 + */ + virtual int32_t getRuleStatus() const; + + /** + * For RuleBasedBreakIterators, get the status (tag) values from the break rule(s) + * that determined the boundary at the current iteration position. + * <p> + * For break iterator types that do not support rule status, + * no values are returned. + * <p> + * The returned status value(s) are stored into an array provided by the caller. + * The values are stored in sorted (ascending) order. + * If the capacity of the output array is insufficient to hold the data, + * the output will be truncated to the available length, and a + * U_BUFFER_OVERFLOW_ERROR will be signaled. + * <p> + * @see RuleBaseBreakIterator::getRuleStatusVec + * + * @param fillInVec an array to be filled in with the status values. + * @param capacity the length of the supplied vector. A length of zero causes + * the function to return the number of status values, in the + * normal way, without attempting to store any values. + * @param status receives error codes. + * @return The number of rule status values from rules that determined + * the boundary at the current iteration position. + * In the event of a U_BUFFER_OVERFLOW_ERROR, the return value + * is the total number of status values that were available, + * not the reduced number that were actually returned. + * @see getRuleStatus + * @stable ICU 52 + */ + virtual int32_t getRuleStatusVec(int32_t *fillInVec, int32_t capacity, UErrorCode &status); + + /** + * Create BreakIterator for word-breaks using the given locale. + * Returns an instance of a BreakIterator implementing word breaks. + * WordBreak is useful for word selection (ex. double click) + * @param where the locale. + * @param status the error code + * @return A BreakIterator for word-breaks. The UErrorCode& status + * parameter is used to return status information to the user. + * To check whether the construction succeeded or not, you should check + * the value of U_SUCCESS(err). If you wish more detailed information, you + * can check for informational error results which still indicate success. + * U_USING_FALLBACK_WARNING indicates that a fall back locale was used. For + * example, 'de_CH' was requested, but nothing was found there, so 'de' was + * used. U_USING_DEFAULT_WARNING indicates that the default locale data was + * used; neither the requested locale nor any of its fall back locales + * could be found. + * The caller owns the returned object and is responsible for deleting it. + * @stable ICU 2.0 + */ + static BreakIterator* U_EXPORT2 + createWordInstance(const Locale& where, UErrorCode& status); + + /** + * Create BreakIterator for line-breaks using specified locale. + * Returns an instance of a BreakIterator implementing line breaks. Line + * breaks are logically possible line breaks, actual line breaks are + * usually determined based on display width. + * LineBreak is useful for word wrapping text. + * @param where the locale. + * @param status The error code. + * @return A BreakIterator for line-breaks. The UErrorCode& status + * parameter is used to return status information to the user. + * To check whether the construction succeeded or not, you should check + * the value of U_SUCCESS(err). If you wish more detailed information, you + * can check for informational error results which still indicate success. + * U_USING_FALLBACK_WARNING indicates that a fall back locale was used. For + * example, 'de_CH' was requested, but nothing was found there, so 'de' was + * used. U_USING_DEFAULT_WARNING indicates that the default locale data was + * used; neither the requested locale nor any of its fall back locales + * could be found. + * The caller owns the returned object and is responsible for deleting it. + * @stable ICU 2.0 + */ + static BreakIterator* U_EXPORT2 + createLineInstance(const Locale& where, UErrorCode& status); + + /** + * Create BreakIterator for character-breaks using specified locale + * Returns an instance of a BreakIterator implementing character breaks. + * Character breaks are boundaries of combining character sequences. + * @param where the locale. + * @param status The error code. + * @return A BreakIterator for character-breaks. The UErrorCode& status + * parameter is used to return status information to the user. + * To check whether the construction succeeded or not, you should check + * the value of U_SUCCESS(err). If you wish more detailed information, you + * can check for informational error results which still indicate success. + * U_USING_FALLBACK_WARNING indicates that a fall back locale was used. For + * example, 'de_CH' was requested, but nothing was found there, so 'de' was + * used. U_USING_DEFAULT_WARNING indicates that the default locale data was + * used; neither the requested locale nor any of its fall back locales + * could be found. + * The caller owns the returned object and is responsible for deleting it. + * @stable ICU 2.0 + */ + static BreakIterator* U_EXPORT2 + createCharacterInstance(const Locale& where, UErrorCode& status); + + /** + * Create BreakIterator for sentence-breaks using specified locale + * Returns an instance of a BreakIterator implementing sentence breaks. + * @param where the locale. + * @param status The error code. + * @return A BreakIterator for sentence-breaks. The UErrorCode& status + * parameter is used to return status information to the user. + * To check whether the construction succeeded or not, you should check + * the value of U_SUCCESS(err). If you wish more detailed information, you + * can check for informational error results which still indicate success. + * U_USING_FALLBACK_WARNING indicates that a fall back locale was used. For + * example, 'de_CH' was requested, but nothing was found there, so 'de' was + * used. U_USING_DEFAULT_WARNING indicates that the default locale data was + * used; neither the requested locale nor any of its fall back locales + * could be found. + * The caller owns the returned object and is responsible for deleting it. + * @stable ICU 2.0 + */ + static BreakIterator* U_EXPORT2 + createSentenceInstance(const Locale& where, UErrorCode& status); + + /** + * Create BreakIterator for title-casing breaks using the specified locale + * Returns an instance of a BreakIterator implementing title breaks. + * The iterator returned locates title boundaries as described for + * Unicode 3.2 only. For Unicode 4.0 and above title boundary iteration, + * please use Word Boundary iterator.{@link #createWordInstance } + * + * @param where the locale. + * @param status The error code. + * @return A BreakIterator for title-breaks. The UErrorCode& status + * parameter is used to return status information to the user. + * To check whether the construction succeeded or not, you should check + * the value of U_SUCCESS(err). If you wish more detailed information, you + * can check for informational error results which still indicate success. + * U_USING_FALLBACK_WARNING indicates that a fall back locale was used. For + * example, 'de_CH' was requested, but nothing was found there, so 'de' was + * used. U_USING_DEFAULT_WARNING indicates that the default locale data was + * used; neither the requested locale nor any of its fall back locales + * could be found. + * The caller owns the returned object and is responsible for deleting it. + * @stable ICU 2.1 + */ + static BreakIterator* U_EXPORT2 + createTitleInstance(const Locale& where, UErrorCode& status); + + /** + * Get the set of Locales for which TextBoundaries are installed. + * <p><b>Note:</b> this will not return locales added through the register + * call. To see the registered locales too, use the getAvailableLocales + * function that returns a StringEnumeration object </p> + * @param count the output parameter of number of elements in the locale list + * @return available locales + * @stable ICU 2.0 + */ + static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count); + + /** + * Get name of the object for the desired Locale, in the desired language. + * @param objectLocale must be from getAvailableLocales. + * @param displayLocale specifies the desired locale for output. + * @param name the fill-in parameter of the return value + * Uses best match. + * @return user-displayable name + * @stable ICU 2.0 + */ + static UnicodeString& U_EXPORT2 getDisplayName(const Locale& objectLocale, + const Locale& displayLocale, + UnicodeString& name); + + /** + * Get name of the object for the desired Locale, in the language of the + * default locale. + * @param objectLocale must be from getMatchingLocales + * @param name the fill-in parameter of the return value + * @return user-displayable name + * @stable ICU 2.0 + */ + static UnicodeString& U_EXPORT2 getDisplayName(const Locale& objectLocale, + UnicodeString& name); + + /** + * Deprecated functionality. Use clone() instead. + * + * Thread safe client-buffer-based cloning operation + * Do NOT call delete on a safeclone, since 'new' is not used to create it. + * @param stackBuffer user allocated space for the new clone. If NULL new memory will be allocated. + * If buffer is not large enough, new memory will be allocated. + * @param BufferSize reference to size of allocated space. + * If BufferSize == 0, a sufficient size for use in cloning will + * be returned ('pre-flighting') + * If BufferSize is not enough for a stack-based safe clone, + * new memory will be allocated. + * @param status to indicate whether the operation went on smoothly or there were errors + * An informational status value, U_SAFECLONE_ALLOCATED_ERROR, is used if any allocations were + * necessary. + * @return pointer to the new clone + * + * @deprecated ICU 52. Use clone() instead. + */ + virtual BreakIterator * createBufferClone(void *stackBuffer, + int32_t &BufferSize, + UErrorCode &status) = 0; + +#ifndef U_HIDE_DEPRECATED_API + + /** + * Determine whether the BreakIterator was created in user memory by + * createBufferClone(), and thus should not be deleted. Such objects + * must be closed by an explicit call to the destructor (not delete). + * @deprecated ICU 52. Always delete the BreakIterator. + */ + inline UBool isBufferClone(void); + +#endif /* U_HIDE_DEPRECATED_API */ + +#if !UCONFIG_NO_SERVICE + /** + * Register a new break iterator of the indicated kind, to use in the given locale. + * The break iterator will be adopted. Clones of the iterator will be returned + * if a request for a break iterator of the given kind matches or falls back to + * this locale. + * Because ICU may choose to cache BreakIterators internally, this must + * be called at application startup, prior to any calls to + * BreakIterator::createXXXInstance to avoid undefined behavior. + * @param toAdopt the BreakIterator instance to be adopted + * @param locale the Locale for which this instance is to be registered + * @param kind the type of iterator for which this instance is to be registered + * @param status the in/out status code, no special meanings are assigned + * @return a registry key that can be used to unregister this instance + * @stable ICU 2.4 + */ + static URegistryKey U_EXPORT2 registerInstance(BreakIterator* toAdopt, + const Locale& locale, + UBreakIteratorType kind, + UErrorCode& status); + + /** + * Unregister a previously-registered BreakIterator using the key returned from the + * register call. Key becomes invalid after a successful call and should not be used again. + * The BreakIterator corresponding to the key will be deleted. + * Because ICU may choose to cache BreakIterators internally, this should + * be called during application shutdown, after all calls to + * BreakIterator::createXXXInstance to avoid undefined behavior. + * @param key the registry key returned by a previous call to registerInstance + * @param status the in/out status code, no special meanings are assigned + * @return TRUE if the iterator for the key was successfully unregistered + * @stable ICU 2.4 + */ + static UBool U_EXPORT2 unregister(URegistryKey key, UErrorCode& status); + + /** + * Return a StringEnumeration over the locales available at the time of the call, + * including registered locales. + * @return a StringEnumeration over the locales available at the time of the call + * @stable ICU 2.4 + */ + static StringEnumeration* U_EXPORT2 getAvailableLocales(void); +#endif + + /** + * Returns the locale for this break iterator. Two flavors are available: valid and + * actual locale. + * @stable ICU 2.8 + */ + Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const; + +#ifndef U_HIDE_INTERNAL_API + /** Get the locale for this break iterator object. You can choose between valid and actual locale. + * @param type type of the locale we're looking for (valid or actual) + * @param status error code for the operation + * @return the locale + * @internal + */ + const char *getLocaleID(ULocDataLocaleType type, UErrorCode& status) const; +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Set the subject text string upon which the break iterator is operating + * without changing any other aspect of the matching state. + * The new and previous text strings must have the same content. + * + * This function is intended for use in environments where ICU is operating on + * strings that may move around in memory. It provides a mechanism for notifying + * ICU that the string has been relocated, and providing a new UText to access the + * string in its new position. + * + * Note that the break iterator implementation never copies the underlying text + * of a string being processed, but always operates directly on the original text + * provided by the user. Refreshing simply drops the references to the old text + * and replaces them with references to the new. + * + * Caution: this function is normally used only by very specialized, + * system-level code. One example use case is with garbage collection that moves + * the text in memory. + * + * @param input The new (moved) text string. + * @param status Receives errors detected by this function. + * @return *this + * + * @stable ICU 49 + */ + virtual BreakIterator &refreshInputText(UText *input, UErrorCode &status) = 0; + + private: + static BreakIterator* buildInstance(const Locale& loc, const char *type, UErrorCode& status); + static BreakIterator* createInstance(const Locale& loc, int32_t kind, UErrorCode& status); + static BreakIterator* makeInstance(const Locale& loc, int32_t kind, UErrorCode& status); + + friend class ICUBreakIteratorFactory; + friend class ICUBreakIteratorService; + +protected: + // Do not enclose protected default/copy constructors with #ifndef U_HIDE_INTERNAL_API + // or else the compiler will create a public ones. + /** @internal */ + BreakIterator(); + /** @internal */ + BreakIterator (const BreakIterator &other); +#ifndef U_HIDE_INTERNAL_API + /** @internal */ + BreakIterator (const Locale& valid, const Locale &actual); + /** @internal. Assignment Operator, used by RuleBasedBreakIterator. */ + BreakIterator &operator = (const BreakIterator &other); +#endif /* U_HIDE_INTERNAL_API */ + +private: + + /** @internal */ + char actualLocale[ULOC_FULLNAME_CAPACITY]; + char validLocale[ULOC_FULLNAME_CAPACITY]; +}; + +#ifndef U_HIDE_DEPRECATED_API + +inline UBool BreakIterator::isBufferClone() +{ + return FALSE; +} + +#endif /* U_HIDE_DEPRECATED_API */ + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_BREAK_ITERATION */ + +#endif // BRKITER_H +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/bytestream.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/bytestream.h new file mode 100755 index 00000000..6f61c384 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/bytestream.h @@ -0,0 +1,272 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +// Copyright (C) 2009-2012, International Business Machines +// Corporation and others. All Rights Reserved. +// +// Copyright 2007 Google Inc. All Rights Reserved. +// Author: sanjay@google.com (Sanjay Ghemawat) +// +// Abstract interface that consumes a sequence of bytes (ByteSink). +// +// Used so that we can write a single piece of code that can operate +// on a variety of output string types. +// +// Various implementations of this interface are provided: +// ByteSink: +// CheckedArrayByteSink Write to a flat array, with bounds checking +// StringByteSink Write to an STL string + +// This code is a contribution of Google code, and the style used here is +// a compromise between the original Google code and the ICU coding guidelines. +// For example, data types are ICU-ified (size_t,int->int32_t), +// and API comments doxygen-ified, but function names and behavior are +// as in the original, if possible. +// Assertion-style error handling, not available in ICU, was changed to +// parameter "pinning" similar to UnicodeString. +// +// In addition, this is only a partial port of the original Google code, +// limited to what was needed so far. The (nearly) complete original code +// is in the ICU svn repository at icuhtml/trunk/design/strings/contrib +// (see ICU ticket 6765, r25517). + +#ifndef __BYTESTREAM_H__ +#define __BYTESTREAM_H__ + +/** + * \file + * \brief C++ API: Interface for writing bytes, and implementation classes. + */ + +#include "unicode/utypes.h" +#include "unicode/uobject.h" +#include "unicode/std_string.h" + +U_NAMESPACE_BEGIN + +/** + * A ByteSink can be filled with bytes. + * @stable ICU 4.2 + */ +class U_COMMON_API ByteSink : public UMemory { +public: + /** + * Default constructor. + * @stable ICU 4.2 + */ + ByteSink() { } + /** + * Virtual destructor. + * @stable ICU 4.2 + */ + virtual ~ByteSink(); + + /** + * Append "bytes[0,n-1]" to this. + * @param bytes the pointer to the bytes + * @param n the number of bytes; must be non-negative + * @stable ICU 4.2 + */ + virtual void Append(const char* bytes, int32_t n) = 0; + + /** + * Returns a writable buffer for appending and writes the buffer's capacity to + * *result_capacity. Guarantees *result_capacity>=min_capacity. + * May return a pointer to the caller-owned scratch buffer which must have + * scratch_capacity>=min_capacity. + * The returned buffer is only valid until the next operation + * on this ByteSink. + * + * After writing at most *result_capacity bytes, call Append() with the + * pointer returned from this function and the number of bytes written. + * Many Append() implementations will avoid copying bytes if this function + * returned an internal buffer. + * + * Partial usage example: + * int32_t capacity; + * char* buffer = sink->GetAppendBuffer(..., &capacity); + * ... Write n bytes into buffer, with n <= capacity. + * sink->Append(buffer, n); + * In many implementations, that call to Append will avoid copying bytes. + * + * If the ByteSink allocates or reallocates an internal buffer, it should use + * the desired_capacity_hint if appropriate. + * If a caller cannot provide a reasonable guess at the desired capacity, + * it should pass desired_capacity_hint=0. + * + * If a non-scratch buffer is returned, the caller may only pass + * a prefix to it to Append(). + * That is, it is not correct to pass an interior pointer to Append(). + * + * The default implementation always returns the scratch buffer. + * + * @param min_capacity required minimum capacity of the returned buffer; + * must be non-negative + * @param desired_capacity_hint desired capacity of the returned buffer; + * must be non-negative + * @param scratch default caller-owned buffer + * @param scratch_capacity capacity of the scratch buffer + * @param result_capacity pointer to an integer which will be set to the + * capacity of the returned buffer + * @return a buffer with *result_capacity>=min_capacity + * @stable ICU 4.2 + */ + virtual char* GetAppendBuffer(int32_t min_capacity, + int32_t desired_capacity_hint, + char* scratch, int32_t scratch_capacity, + int32_t* result_capacity); + + /** + * Flush internal buffers. + * Some byte sinks use internal buffers or provide buffering + * and require calling Flush() at the end of the stream. + * The ByteSink should be ready for further Append() calls after Flush(). + * The default implementation of Flush() does nothing. + * @stable ICU 4.2 + */ + virtual void Flush(); + +private: + ByteSink(const ByteSink &) = delete; + ByteSink &operator=(const ByteSink &) = delete; +}; + +// ------------------------------------------------------------- +// Some standard implementations + +/** + * Implementation of ByteSink that writes to a flat byte array, + * with bounds-checking: + * This sink will not write more than capacity bytes to outbuf. + * If more than capacity bytes are Append()ed, then excess bytes are ignored, + * and Overflowed() will return true. + * Overflow does not cause a runtime error. + * @stable ICU 4.2 + */ +class U_COMMON_API CheckedArrayByteSink : public ByteSink { +public: + /** + * Constructs a ByteSink that will write to outbuf[0..capacity-1]. + * @param outbuf buffer to write to + * @param capacity size of the buffer + * @stable ICU 4.2 + */ + CheckedArrayByteSink(char* outbuf, int32_t capacity); + /** + * Destructor. + * @stable ICU 4.2 + */ + virtual ~CheckedArrayByteSink(); + /** + * Returns the sink to its original state, without modifying the buffer. + * Useful for reusing both the buffer and the sink for multiple streams. + * Resets the state to NumberOfBytesWritten()=NumberOfBytesAppended()=0 + * and Overflowed()=FALSE. + * @return *this + * @stable ICU 4.6 + */ + virtual CheckedArrayByteSink& Reset(); + /** + * Append "bytes[0,n-1]" to this. + * @param bytes the pointer to the bytes + * @param n the number of bytes; must be non-negative + * @stable ICU 4.2 + */ + virtual void Append(const char* bytes, int32_t n); + /** + * Returns a writable buffer for appending and writes the buffer's capacity to + * *result_capacity. For details see the base class documentation. + * @param min_capacity required minimum capacity of the returned buffer; + * must be non-negative + * @param desired_capacity_hint desired capacity of the returned buffer; + * must be non-negative + * @param scratch default caller-owned buffer + * @param scratch_capacity capacity of the scratch buffer + * @param result_capacity pointer to an integer which will be set to the + * capacity of the returned buffer + * @return a buffer with *result_capacity>=min_capacity + * @stable ICU 4.2 + */ + virtual char* GetAppendBuffer(int32_t min_capacity, + int32_t desired_capacity_hint, + char* scratch, int32_t scratch_capacity, + int32_t* result_capacity); + /** + * Returns the number of bytes actually written to the sink. + * @return number of bytes written to the buffer + * @stable ICU 4.2 + */ + int32_t NumberOfBytesWritten() const { return size_; } + /** + * Returns true if any bytes were discarded, i.e., if there was an + * attempt to write more than 'capacity' bytes. + * @return TRUE if more than 'capacity' bytes were Append()ed + * @stable ICU 4.2 + */ + UBool Overflowed() const { return overflowed_; } + /** + * Returns the number of bytes appended to the sink. + * If Overflowed() then NumberOfBytesAppended()>NumberOfBytesWritten() + * else they return the same number. + * @return number of bytes written to the buffer + * @stable ICU 4.6 + */ + int32_t NumberOfBytesAppended() const { return appended_; } +private: + char* outbuf_; + const int32_t capacity_; + int32_t size_; + int32_t appended_; + UBool overflowed_; + + CheckedArrayByteSink() = delete; + CheckedArrayByteSink(const CheckedArrayByteSink &) = delete; + CheckedArrayByteSink &operator=(const CheckedArrayByteSink &) = delete; +}; + +/** + * Implementation of ByteSink that writes to a "string". + * The StringClass is usually instantiated with a std::string. + * @stable ICU 4.2 + */ +template<typename StringClass> +class StringByteSink : public ByteSink { + public: + /** + * Constructs a ByteSink that will append bytes to the dest string. + * @param dest pointer to string object to append to + * @stable ICU 4.2 + */ + StringByteSink(StringClass* dest) : dest_(dest) { } +#ifndef U_HIDE_DRAFT_API + /** + * Constructs a ByteSink that reserves append capacity and will append bytes to the dest string. + * + * @param dest pointer to string object to append to + * @param initialAppendCapacity capacity beyond dest->length() to be reserve()d + * @draft ICU 60 + */ + StringByteSink(StringClass* dest, int32_t initialAppendCapacity) : dest_(dest) { + if (initialAppendCapacity > 0 && + (uint32_t)initialAppendCapacity > (dest->capacity() - dest->length())) { + dest->reserve(dest->length() + initialAppendCapacity); + } + } +#endif // U_HIDE_DRAFT_API + /** + * Append "bytes[0,n-1]" to this. + * @param data the pointer to the bytes + * @param n the number of bytes; must be non-negative + * @stable ICU 4.2 + */ + virtual void Append(const char* data, int32_t n) { dest_->append(data, n); } + private: + StringClass* dest_; + + StringByteSink() = delete; + StringByteSink(const StringByteSink &) = delete; + StringByteSink &operator=(const StringByteSink &) = delete; +}; + +U_NAMESPACE_END + +#endif // __BYTESTREAM_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/bytestrie.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/bytestrie.h new file mode 100755 index 00000000..c57b8ccf --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/bytestrie.h @@ -0,0 +1,520 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2010-2012, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************* +* file name: bytestrie.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2010sep25 +* created by: Markus W. Scherer +*/ + +#ifndef __BYTESTRIE_H__ +#define __BYTESTRIE_H__ + +/** + * \file + * \brief C++ API: Trie for mapping byte sequences to integer values. + */ + +#include "unicode/utypes.h" +#include "unicode/stringpiece.h" +#include "unicode/uobject.h" +#include "unicode/ustringtrie.h" + +U_NAMESPACE_BEGIN + +class ByteSink; +class BytesTrieBuilder; +class CharString; +class UVector32; + +/** + * Light-weight, non-const reader class for a BytesTrie. + * Traverses a byte-serialized data structure with minimal state, + * for mapping byte sequences to non-negative integer values. + * + * This class owns the serialized trie data only if it was constructed by + * the builder's build() method. + * The public constructor and the copy constructor only alias the data (only copy the pointer). + * There is no assignment operator. + * + * This class is not intended for public subclassing. + * @stable ICU 4.8 + */ +class U_COMMON_API BytesTrie : public UMemory { +public: + /** + * Constructs a BytesTrie reader instance. + * + * The trieBytes must contain a copy of a byte sequence from the BytesTrieBuilder, + * starting with the first byte of that sequence. + * The BytesTrie object will not read more bytes than + * the BytesTrieBuilder generated in the corresponding build() call. + * + * The array is not copied/cloned and must not be modified while + * the BytesTrie object is in use. + * + * @param trieBytes The byte array that contains the serialized trie. + * @stable ICU 4.8 + */ + BytesTrie(const void *trieBytes) + : ownedArray_(NULL), bytes_(static_cast<const uint8_t *>(trieBytes)), + pos_(bytes_), remainingMatchLength_(-1) {} + + /** + * Destructor. + * @stable ICU 4.8 + */ + ~BytesTrie(); + + /** + * Copy constructor, copies the other trie reader object and its state, + * but not the byte array which will be shared. (Shallow copy.) + * @param other Another BytesTrie object. + * @stable ICU 4.8 + */ + BytesTrie(const BytesTrie &other) + : ownedArray_(NULL), bytes_(other.bytes_), + pos_(other.pos_), remainingMatchLength_(other.remainingMatchLength_) {} + + /** + * Resets this trie to its initial state. + * @return *this + * @stable ICU 4.8 + */ + BytesTrie &reset() { + pos_=bytes_; + remainingMatchLength_=-1; + return *this; + } + + /** + * BytesTrie state object, for saving a trie's current state + * and resetting the trie back to this state later. + * @stable ICU 4.8 + */ + class State : public UMemory { + public: + /** + * Constructs an empty State. + * @stable ICU 4.8 + */ + State() { bytes=NULL; } + private: + friend class BytesTrie; + + const uint8_t *bytes; + const uint8_t *pos; + int32_t remainingMatchLength; + }; + + /** + * Saves the state of this trie. + * @param state The State object to hold the trie's state. + * @return *this + * @see resetToState + * @stable ICU 4.8 + */ + const BytesTrie &saveState(State &state) const { + state.bytes=bytes_; + state.pos=pos_; + state.remainingMatchLength=remainingMatchLength_; + return *this; + } + + /** + * Resets this trie to the saved state. + * If the state object contains no state, or the state of a different trie, + * then this trie remains unchanged. + * @param state The State object which holds a saved trie state. + * @return *this + * @see saveState + * @see reset + * @stable ICU 4.8 + */ + BytesTrie &resetToState(const State &state) { + if(bytes_==state.bytes && bytes_!=NULL) { + pos_=state.pos; + remainingMatchLength_=state.remainingMatchLength; + } + return *this; + } + + /** + * Determines whether the byte sequence so far matches, whether it has a value, + * and whether another input byte can continue a matching byte sequence. + * @return The match/value Result. + * @stable ICU 4.8 + */ + UStringTrieResult current() const; + + /** + * Traverses the trie from the initial state for this input byte. + * Equivalent to reset().next(inByte). + * @param inByte Input byte value. Values -0x100..-1 are treated like 0..0xff. + * Values below -0x100 and above 0xff will never match. + * @return The match/value Result. + * @stable ICU 4.8 + */ + inline UStringTrieResult first(int32_t inByte) { + remainingMatchLength_=-1; + if(inByte<0) { + inByte+=0x100; + } + return nextImpl(bytes_, inByte); + } + + /** + * Traverses the trie from the current state for this input byte. + * @param inByte Input byte value. Values -0x100..-1 are treated like 0..0xff. + * Values below -0x100 and above 0xff will never match. + * @return The match/value Result. + * @stable ICU 4.8 + */ + UStringTrieResult next(int32_t inByte); + + /** + * Traverses the trie from the current state for this byte sequence. + * Equivalent to + * \code + * Result result=current(); + * for(each c in s) + * if(!USTRINGTRIE_HAS_NEXT(result)) return USTRINGTRIE_NO_MATCH; + * result=next(c); + * return result; + * \endcode + * @param s A string or byte sequence. Can be NULL if length is 0. + * @param length The length of the byte sequence. Can be -1 if NUL-terminated. + * @return The match/value Result. + * @stable ICU 4.8 + */ + UStringTrieResult next(const char *s, int32_t length); + + /** + * Returns a matching byte sequence's value if called immediately after + * current()/first()/next() returned USTRINGTRIE_INTERMEDIATE_VALUE or USTRINGTRIE_FINAL_VALUE. + * getValue() can be called multiple times. + * + * Do not call getValue() after USTRINGTRIE_NO_MATCH or USTRINGTRIE_NO_VALUE! + * @return The value for the byte sequence so far. + * @stable ICU 4.8 + */ + inline int32_t getValue() const { + const uint8_t *pos=pos_; + int32_t leadByte=*pos++; + // U_ASSERT(leadByte>=kMinValueLead); + return readValue(pos, leadByte>>1); + } + + /** + * Determines whether all byte sequences reachable from the current state + * map to the same value. + * @param uniqueValue Receives the unique value, if this function returns TRUE. + * (output-only) + * @return TRUE if all byte sequences reachable from the current state + * map to the same value. + * @stable ICU 4.8 + */ + inline UBool hasUniqueValue(int32_t &uniqueValue) const { + const uint8_t *pos=pos_; + // Skip the rest of a pending linear-match node. + return pos!=NULL && findUniqueValue(pos+remainingMatchLength_+1, FALSE, uniqueValue); + } + + /** + * Finds each byte which continues the byte sequence from the current state. + * That is, each byte b for which it would be next(b)!=USTRINGTRIE_NO_MATCH now. + * @param out Each next byte is appended to this object. + * (Only uses the out.Append(s, length) method.) + * @return the number of bytes which continue the byte sequence from here + * @stable ICU 4.8 + */ + int32_t getNextBytes(ByteSink &out) const; + + /** + * Iterator for all of the (byte sequence, value) pairs in a BytesTrie. + * @stable ICU 4.8 + */ + class U_COMMON_API Iterator : public UMemory { + public: + /** + * Iterates from the root of a byte-serialized BytesTrie. + * @param trieBytes The trie bytes. + * @param maxStringLength If 0, the iterator returns full strings/byte sequences. + * Otherwise, the iterator returns strings with this maximum length. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @stable ICU 4.8 + */ + Iterator(const void *trieBytes, int32_t maxStringLength, UErrorCode &errorCode); + + /** + * Iterates from the current state of the specified BytesTrie. + * @param trie The trie whose state will be copied for iteration. + * @param maxStringLength If 0, the iterator returns full strings/byte sequences. + * Otherwise, the iterator returns strings with this maximum length. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @stable ICU 4.8 + */ + Iterator(const BytesTrie &trie, int32_t maxStringLength, UErrorCode &errorCode); + + /** + * Destructor. + * @stable ICU 4.8 + */ + ~Iterator(); + + /** + * Resets this iterator to its initial state. + * @return *this + * @stable ICU 4.8 + */ + Iterator &reset(); + + /** + * @return TRUE if there are more elements. + * @stable ICU 4.8 + */ + UBool hasNext() const; + + /** + * Finds the next (byte sequence, value) pair if there is one. + * + * If the byte sequence is truncated to the maximum length and does not + * have a real value, then the value is set to -1. + * In this case, this "not a real value" is indistinguishable from + * a real value of -1. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return TRUE if there is another element. + * @stable ICU 4.8 + */ + UBool next(UErrorCode &errorCode); + + /** + * @return The NUL-terminated byte sequence for the last successful next(). + * @stable ICU 4.8 + */ + StringPiece getString() const; + /** + * @return The value for the last successful next(). + * @stable ICU 4.8 + */ + int32_t getValue() const { return value_; } + + private: + UBool truncateAndStop(); + + const uint8_t *branchNext(const uint8_t *pos, int32_t length, UErrorCode &errorCode); + + const uint8_t *bytes_; + const uint8_t *pos_; + const uint8_t *initialPos_; + int32_t remainingMatchLength_; + int32_t initialRemainingMatchLength_; + + CharString *str_; + int32_t maxLength_; + int32_t value_; + + // The stack stores pairs of integers for backtracking to another + // outbound edge of a branch node. + // The first integer is an offset from bytes_. + // The second integer has the str_->length() from before the node in bits 15..0, + // and the remaining branch length in bits 24..16. (Bits 31..25 are unused.) + // (We could store the remaining branch length minus 1 in bits 23..16 and not use bits 31..24, + // but the code looks more confusing that way.) + UVector32 *stack_; + }; + +private: + friend class BytesTrieBuilder; + + /** + * Constructs a BytesTrie reader instance. + * Unlike the public constructor which just aliases an array, + * this constructor adopts the builder's array. + * This constructor is only called by the builder. + */ + BytesTrie(void *adoptBytes, const void *trieBytes) + : ownedArray_(static_cast<uint8_t *>(adoptBytes)), + bytes_(static_cast<const uint8_t *>(trieBytes)), + pos_(bytes_), remainingMatchLength_(-1) {} + + // No assignment operator. + BytesTrie &operator=(const BytesTrie &other); + + inline void stop() { + pos_=NULL; + } + + // Reads a compact 32-bit integer. + // pos is already after the leadByte, and the lead byte is already shifted right by 1. + static int32_t readValue(const uint8_t *pos, int32_t leadByte); + static inline const uint8_t *skipValue(const uint8_t *pos, int32_t leadByte) { + // U_ASSERT(leadByte>=kMinValueLead); + if(leadByte>=(kMinTwoByteValueLead<<1)) { + if(leadByte<(kMinThreeByteValueLead<<1)) { + ++pos; + } else if(leadByte<(kFourByteValueLead<<1)) { + pos+=2; + } else { + pos+=3+((leadByte>>1)&1); + } + } + return pos; + } + static inline const uint8_t *skipValue(const uint8_t *pos) { + int32_t leadByte=*pos++; + return skipValue(pos, leadByte); + } + + // Reads a jump delta and jumps. + static const uint8_t *jumpByDelta(const uint8_t *pos); + + static inline const uint8_t *skipDelta(const uint8_t *pos) { + int32_t delta=*pos++; + if(delta>=kMinTwoByteDeltaLead) { + if(delta<kMinThreeByteDeltaLead) { + ++pos; + } else if(delta<kFourByteDeltaLead) { + pos+=2; + } else { + pos+=3+(delta&1); + } + } + return pos; + } + + static inline UStringTrieResult valueResult(int32_t node) { + return (UStringTrieResult)(USTRINGTRIE_INTERMEDIATE_VALUE-(node&kValueIsFinal)); + } + + // Handles a branch node for both next(byte) and next(string). + UStringTrieResult branchNext(const uint8_t *pos, int32_t length, int32_t inByte); + + // Requires remainingLength_<0. + UStringTrieResult nextImpl(const uint8_t *pos, int32_t inByte); + + // Helper functions for hasUniqueValue(). + // Recursively finds a unique value (or whether there is not a unique one) + // from a branch. + static const uint8_t *findUniqueValueFromBranch(const uint8_t *pos, int32_t length, + UBool haveUniqueValue, int32_t &uniqueValue); + // Recursively finds a unique value (or whether there is not a unique one) + // starting from a position on a node lead byte. + static UBool findUniqueValue(const uint8_t *pos, UBool haveUniqueValue, int32_t &uniqueValue); + + // Helper functions for getNextBytes(). + // getNextBytes() when pos is on a branch node. + static void getNextBranchBytes(const uint8_t *pos, int32_t length, ByteSink &out); + static void append(ByteSink &out, int c); + + // BytesTrie data structure + // + // The trie consists of a series of byte-serialized nodes for incremental + // string/byte sequence matching. The root node is at the beginning of the trie data. + // + // Types of nodes are distinguished by their node lead byte ranges. + // After each node, except a final-value node, another node follows to + // encode match values or continue matching further bytes. + // + // Node types: + // - Value node: Stores a 32-bit integer in a compact, variable-length format. + // The value is for the string/byte sequence so far. + // One node bit indicates whether the value is final or whether + // matching continues with the next node. + // - Linear-match node: Matches a number of bytes. + // - Branch node: Branches to other nodes according to the current input byte. + // The node byte is the length of the branch (number of bytes to select from) + // minus 1. It is followed by a sub-node: + // - If the length is at most kMaxBranchLinearSubNodeLength, then + // there are length-1 (key, value) pairs and then one more comparison byte. + // If one of the key bytes matches, then the value is either a final value for + // the string/byte sequence so far, or a "jump" delta to the next node. + // If the last byte matches, then matching continues with the next node. + // (Values have the same encoding as value nodes.) + // - If the length is greater than kMaxBranchLinearSubNodeLength, then + // there is one byte and one "jump" delta. + // If the input byte is less than the sub-node byte, then "jump" by delta to + // the next sub-node which will have a length of length/2. + // (The delta has its own compact encoding.) + // Otherwise, skip the "jump" delta to the next sub-node + // which will have a length of length-length/2. + + // Node lead byte values. + + // 00..0f: Branch node. If node!=0 then the length is node+1, otherwise + // the length is one more than the next byte. + + // For a branch sub-node with at most this many entries, we drop down + // to a linear search. + static const int32_t kMaxBranchLinearSubNodeLength=5; + + // 10..1f: Linear-match node, match 1..16 bytes and continue reading the next node. + static const int32_t kMinLinearMatch=0x10; + static const int32_t kMaxLinearMatchLength=0x10; + + // 20..ff: Variable-length value node. + // If odd, the value is final. (Otherwise, intermediate value or jump delta.) + // Then shift-right by 1 bit. + // The remaining lead byte value indicates the number of following bytes (0..4) + // and contains the value's top bits. + static const int32_t kMinValueLead=kMinLinearMatch+kMaxLinearMatchLength; // 0x20 + // It is a final value if bit 0 is set. + static const int32_t kValueIsFinal=1; + + // Compact value: After testing bit 0, shift right by 1 and then use the following thresholds. + static const int32_t kMinOneByteValueLead=kMinValueLead/2; // 0x10 + static const int32_t kMaxOneByteValue=0x40; // At least 6 bits in the first byte. + + static const int32_t kMinTwoByteValueLead=kMinOneByteValueLead+kMaxOneByteValue+1; // 0x51 + static const int32_t kMaxTwoByteValue=0x1aff; + + static const int32_t kMinThreeByteValueLead=kMinTwoByteValueLead+(kMaxTwoByteValue>>8)+1; // 0x6c + static const int32_t kFourByteValueLead=0x7e; + + // A little more than Unicode code points. (0x11ffff) + static const int32_t kMaxThreeByteValue=((kFourByteValueLead-kMinThreeByteValueLead)<<16)-1; + + static const int32_t kFiveByteValueLead=0x7f; + + // Compact delta integers. + static const int32_t kMaxOneByteDelta=0xbf; + static const int32_t kMinTwoByteDeltaLead=kMaxOneByteDelta+1; // 0xc0 + static const int32_t kMinThreeByteDeltaLead=0xf0; + static const int32_t kFourByteDeltaLead=0xfe; + static const int32_t kFiveByteDeltaLead=0xff; + + static const int32_t kMaxTwoByteDelta=((kMinThreeByteDeltaLead-kMinTwoByteDeltaLead)<<8)-1; // 0x2fff + static const int32_t kMaxThreeByteDelta=((kFourByteDeltaLead-kMinThreeByteDeltaLead)<<16)-1; // 0xdffff + + uint8_t *ownedArray_; + + // Fixed value referencing the BytesTrie bytes. + const uint8_t *bytes_; + + // Iterator variables. + + // Pointer to next trie byte to read. NULL if no more matches. + const uint8_t *pos_; + // Remaining length of a linear-match node, minus 1. Negative if not in such a node. + int32_t remainingMatchLength_; +}; + +U_NAMESPACE_END + +#endif // __BYTESTRIE_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/bytestriebuilder.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/bytestriebuilder.h new file mode 100755 index 00000000..97814fcc --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/bytestriebuilder.h @@ -0,0 +1,182 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2010-2016, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************* +* file name: bytestriebuilder.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2010sep25 +* created by: Markus W. Scherer +*/ + +/** + * \file + * \brief C++ API: Builder for icu::BytesTrie + */ + +#ifndef __BYTESTRIEBUILDER_H__ +#define __BYTESTRIEBUILDER_H__ + +#include "unicode/utypes.h" +#include "unicode/bytestrie.h" +#include "unicode/stringpiece.h" +#include "unicode/stringtriebuilder.h" + +U_NAMESPACE_BEGIN + +class BytesTrieElement; +class CharString; +/** + * Builder class for BytesTrie. + * + * This class is not intended for public subclassing. + * @stable ICU 4.8 + */ +class U_COMMON_API BytesTrieBuilder : public StringTrieBuilder { +public: + /** + * Constructs an empty builder. + * @param errorCode Standard ICU error code. + * @stable ICU 4.8 + */ + BytesTrieBuilder(UErrorCode &errorCode); + + /** + * Destructor. + * @stable ICU 4.8 + */ + virtual ~BytesTrieBuilder(); + + /** + * Adds a (byte sequence, value) pair. + * The byte sequence must be unique. + * The bytes will be copied; the builder does not keep + * a reference to the input StringPiece or its data(). + * @param s The input byte sequence. + * @param value The value associated with this byte sequence. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return *this + * @stable ICU 4.8 + */ + BytesTrieBuilder &add(StringPiece s, int32_t value, UErrorCode &errorCode); + + /** + * Builds a BytesTrie for the add()ed data. + * Once built, no further data can be add()ed until clear() is called. + * + * A BytesTrie cannot be empty. At least one (byte sequence, value) pair + * must have been add()ed. + * + * This method passes ownership of the builder's internal result array to the new trie object. + * Another call to any build() variant will re-serialize the trie. + * After clear() has been called, a new array will be used as well. + * @param buildOption Build option, see UStringTrieBuildOption. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return A new BytesTrie for the add()ed data. + * @stable ICU 4.8 + */ + BytesTrie *build(UStringTrieBuildOption buildOption, UErrorCode &errorCode); + + /** + * Builds a BytesTrie for the add()ed data and byte-serializes it. + * Once built, no further data can be add()ed until clear() is called. + * + * A BytesTrie cannot be empty. At least one (byte sequence, value) pair + * must have been add()ed. + * + * Multiple calls to buildStringPiece() return StringPieces referring to the + * builder's same byte array, without rebuilding. + * If buildStringPiece() is called after build(), the trie will be + * re-serialized into a new array. + * If build() is called after buildStringPiece(), the trie object will become + * the owner of the previously returned array. + * After clear() has been called, a new array will be used as well. + * @param buildOption Build option, see UStringTrieBuildOption. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return A StringPiece which refers to the byte-serialized BytesTrie for the add()ed data. + * @stable ICU 4.8 + */ + StringPiece buildStringPiece(UStringTrieBuildOption buildOption, UErrorCode &errorCode); + + /** + * Removes all (byte sequence, value) pairs. + * New data can then be add()ed and a new trie can be built. + * @return *this + * @stable ICU 4.8 + */ + BytesTrieBuilder &clear(); + +private: + BytesTrieBuilder(const BytesTrieBuilder &other); // no copy constructor + BytesTrieBuilder &operator=(const BytesTrieBuilder &other); // no assignment operator + + void buildBytes(UStringTrieBuildOption buildOption, UErrorCode &errorCode); + + virtual int32_t getElementStringLength(int32_t i) const; + virtual char16_t getElementUnit(int32_t i, int32_t byteIndex) const; + virtual int32_t getElementValue(int32_t i) const; + + virtual int32_t getLimitOfLinearMatch(int32_t first, int32_t last, int32_t byteIndex) const; + + virtual int32_t countElementUnits(int32_t start, int32_t limit, int32_t byteIndex) const; + virtual int32_t skipElementsBySomeUnits(int32_t i, int32_t byteIndex, int32_t count) const; + virtual int32_t indexOfElementWithNextUnit(int32_t i, int32_t byteIndex, char16_t byte) const; + + virtual UBool matchNodesCanHaveValues() const { return FALSE; } + + virtual int32_t getMaxBranchLinearSubNodeLength() const { return BytesTrie::kMaxBranchLinearSubNodeLength; } + virtual int32_t getMinLinearMatch() const { return BytesTrie::kMinLinearMatch; } + virtual int32_t getMaxLinearMatchLength() const { return BytesTrie::kMaxLinearMatchLength; } + + /** + * @internal + */ + class BTLinearMatchNode : public LinearMatchNode { + public: + BTLinearMatchNode(const char *units, int32_t len, Node *nextNode); + virtual UBool operator==(const Node &other) const; + virtual void write(StringTrieBuilder &builder); + private: + const char *s; + }; + + virtual Node *createLinearMatchNode(int32_t i, int32_t byteIndex, int32_t length, + Node *nextNode) const; + + UBool ensureCapacity(int32_t length); + virtual int32_t write(int32_t byte); + int32_t write(const char *b, int32_t length); + virtual int32_t writeElementUnits(int32_t i, int32_t byteIndex, int32_t length); + virtual int32_t writeValueAndFinal(int32_t i, UBool isFinal); + virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_t node); + virtual int32_t writeDeltaTo(int32_t jumpTarget); + + CharString *strings; // Pointer not object so we need not #include internal charstr.h. + BytesTrieElement *elements; + int32_t elementsCapacity; + int32_t elementsLength; + + // Byte serialization of the trie. + // Grows from the back: bytesLength measures from the end of the buffer! + char *bytes; + int32_t bytesCapacity; + int32_t bytesLength; +}; + +U_NAMESPACE_END + +#endif // __BYTESTRIEBUILDER_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/calendar.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/calendar.h new file mode 100755 index 00000000..48021534 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/calendar.h @@ -0,0 +1,2551 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************** +* Copyright (C) 1997-2014, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************** +* +* File CALENDAR.H +* +* Modification History: +* +* Date Name Description +* 04/22/97 aliu Expanded and corrected comments and other header +* contents. +* 05/01/97 aliu Made equals(), before(), after() arguments const. +* 05/20/97 aliu Replaced fAreFieldsSet with fAreFieldsInSync and +* fAreAllFieldsSet. +* 07/27/98 stephen Sync up with JDK 1.2 +* 11/15/99 weiv added YEAR_WOY and DOW_LOCAL +* to EDateFields +* 8/19/2002 srl Removed Javaisms +* 11/07/2003 srl Update, clean up documentation. +******************************************************************************** +*/ + +#ifndef CALENDAR_H +#define CALENDAR_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Calendar object + */ +#if !UCONFIG_NO_FORMATTING + +#include "unicode/uobject.h" +#include "unicode/locid.h" +#include "unicode/timezone.h" +#include "unicode/ucal.h" +#include "unicode/umisc.h" + +U_NAMESPACE_BEGIN + +class ICUServiceFactory; + +/** + * @internal + */ +typedef int32_t UFieldResolutionTable[12][8]; + +class BasicTimeZone; +/** + * <code>Calendar</code> is an abstract base class for converting between + * a <code>UDate</code> object and a set of integer fields such as + * <code>YEAR</code>, <code>MONTH</code>, <code>DAY</code>, <code>HOUR</code>, + * and so on. (A <code>UDate</code> object represents a specific instant in + * time with millisecond precision. See UDate + * for information about the <code>UDate</code> class.) + * + * <p> + * Subclasses of <code>Calendar</code> interpret a <code>UDate</code> + * according to the rules of a specific calendar system. + * The most commonly used subclass of <code>Calendar</code> is + * <code>GregorianCalendar</code>. Other subclasses could represent + * the various types of lunar calendars in use in many parts of the world. + * + * <p> + * <b>NOTE</b>: (ICU 2.6) The subclass interface should be considered unstable + * - it WILL change. + * + * <p> + * Like other locale-sensitive classes, <code>Calendar</code> provides a + * static method, <code>createInstance</code>, for getting a generally useful + * object of this type. <code>Calendar</code>'s <code>createInstance</code> method + * returns the appropriate <code>Calendar</code> subclass whose + * time fields have been initialized with the current date and time: + * \htmlonly<blockquote>\endhtmlonly + * <pre> + * Calendar *rightNow = Calendar::createInstance(errCode); + * </pre> + * \htmlonly</blockquote>\endhtmlonly + * + * <p> + * A <code>Calendar</code> object can produce all the time field values + * needed to implement the date-time formatting for a particular language + * and calendar style (for example, Japanese-Gregorian, Japanese-Traditional). + * + * <p> + * When computing a <code>UDate</code> from time fields, some special circumstances + * may arise: there may be insufficient information to compute the + * <code>UDate</code> (such as only year and month but no day in the month), + * there may be inconsistent information (such as "Tuesday, July 15, 1996" + * -- July 15, 1996 is actually a Monday), or the input time might be ambiguous + * because of time zone transition. + * + * <p> + * <strong>Insufficient information.</strong> The calendar will use default + * information to specify the missing fields. This may vary by calendar; for + * the Gregorian calendar, the default for a field is the same as that of the + * start of the epoch: i.e., YEAR = 1970, MONTH = JANUARY, DATE = 1, etc. + * + * <p> + * <strong>Inconsistent information.</strong> If fields conflict, the calendar + * will give preference to fields set more recently. For example, when + * determining the day, the calendar will look for one of the following + * combinations of fields. The most recent combination, as determined by the + * most recently set single field, will be used. + * + * \htmlonly<blockquote>\endhtmlonly + * <pre> + * MONTH + DAY_OF_MONTH + * MONTH + WEEK_OF_MONTH + DAY_OF_WEEK + * MONTH + DAY_OF_WEEK_IN_MONTH + DAY_OF_WEEK + * DAY_OF_YEAR + * DAY_OF_WEEK + WEEK_OF_YEAR + * </pre> + * \htmlonly</blockquote>\endhtmlonly + * + * For the time of day: + * + * \htmlonly<blockquote>\endhtmlonly + * <pre> + * HOUR_OF_DAY + * AM_PM + HOUR + * </pre> + * \htmlonly</blockquote>\endhtmlonly + * + * <p> + * <strong>Ambiguous Wall Clock Time.</strong> When time offset from UTC has + * changed, it produces an ambiguous time slot around the transition. For example, + * many US locations observe daylight saving time. On the date switching to daylight + * saving time in US, wall clock time jumps from 12:59 AM (standard) to 2:00 AM + * (daylight). Therefore, wall clock time from 1:00 AM to 1:59 AM do not exist on + * the date. When the input wall time fall into this missing time slot, the ICU + * Calendar resolves the time using the UTC offset before the transition by default. + * In this example, 1:30 AM is interpreted as 1:30 AM standard time (non-exist), + * so the final result will be 2:30 AM daylight time. + * + * <p>On the date switching back to standard time, wall clock time is moved back one + * hour at 2:00 AM. So wall clock time from 1:00 AM to 1:59 AM occur twice. In this + * case, the ICU Calendar resolves the time using the UTC offset after the transition + * by default. For example, 1:30 AM on the date is resolved as 1:30 AM standard time. + * + * <p>Ambiguous wall clock time resolution behaviors can be customized by Calendar APIs + * {@link #setRepeatedWallTimeOption} and {@link #setSkippedWallTimeOption}. + * These methods are available in ICU 49 or later versions. + * + * <p> + * <strong>Note:</strong> for some non-Gregorian calendars, different + * fields may be necessary for complete disambiguation. For example, a full + * specification of the historial Arabic astronomical calendar requires year, + * month, day-of-month <em>and</em> day-of-week in some cases. + * + * <p> + * <strong>Note:</strong> There are certain possible ambiguities in + * interpretation of certain singular times, which are resolved in the + * following ways: + * <ol> + * <li> 24:00:00 "belongs" to the following day. That is, + * 23:59 on Dec 31, 1969 < 24:00 on Jan 1, 1970 < 24:01:00 on Jan 1, 1970 + * + * <li> Although historically not precise, midnight also belongs to "am", + * and noon belongs to "pm", so on the same day, + * 12:00 am (midnight) < 12:01 am, and 12:00 pm (noon) < 12:01 pm + * </ol> + * + * <p> + * The date or time format strings are not part of the definition of a + * calendar, as those must be modifiable or overridable by the user at + * runtime. Use {@link DateFormat} + * to format dates. + * + * <p> + * <code>Calendar</code> provides an API for field "rolling", where fields + * can be incremented or decremented, but wrap around. For example, rolling the + * month up in the date <code>December 12, <b>1996</b></code> results in + * <code>January 12, <b>1996</b></code>. + * + * <p> + * <code>Calendar</code> also provides a date arithmetic function for + * adding the specified (signed) amount of time to a particular time field. + * For example, subtracting 5 days from the date <code>September 12, 1996</code> + * results in <code>September 7, 1996</code>. + * + * <p><big><b>Supported range</b></big> + * + * <p>The allowable range of <code>Calendar</code> has been + * narrowed. <code>GregorianCalendar</code> used to attempt to support + * the range of dates with millisecond values from + * <code>Long.MIN_VALUE</code> to <code>Long.MAX_VALUE</code>. + * The new <code>Calendar</code> protocol specifies the + * maximum range of supportable dates as those having Julian day numbers + * of <code>-0x7F000000</code> to <code>+0x7F000000</code>. This + * corresponds to years from ~5,800,000 BCE to ~5,800,000 CE. Programmers + * should use the protected constants in <code>Calendar</code> to + * specify an extremely early or extremely late date.</p> + * + * @stable ICU 2.0 + */ +class U_I18N_API Calendar : public UObject { +public: + + /** + * Field IDs for date and time. Used to specify date/time fields. ERA is calendar + * specific. Example ranges given are for illustration only; see specific Calendar + * subclasses for actual ranges. + * @deprecated ICU 2.6. Use C enum UCalendarDateFields defined in ucal.h + */ + enum EDateFields { +#ifndef U_HIDE_DEPRECATED_API +/* + * ERA may be defined on other platforms. To avoid any potential problems undefined it here. + */ +#ifdef ERA +#undef ERA +#endif + ERA, // Example: 0..1 + YEAR, // Example: 1..big number + MONTH, // Example: 0..11 + WEEK_OF_YEAR, // Example: 1..53 + WEEK_OF_MONTH, // Example: 1..4 + DATE, // Example: 1..31 + DAY_OF_YEAR, // Example: 1..365 + DAY_OF_WEEK, // Example: 1..7 + DAY_OF_WEEK_IN_MONTH, // Example: 1..4, may be specified as -1 + AM_PM, // Example: 0..1 + HOUR, // Example: 0..11 + HOUR_OF_DAY, // Example: 0..23 + MINUTE, // Example: 0..59 + SECOND, // Example: 0..59 + MILLISECOND, // Example: 0..999 + ZONE_OFFSET, // Example: -12*U_MILLIS_PER_HOUR..12*U_MILLIS_PER_HOUR + DST_OFFSET, // Example: 0 or U_MILLIS_PER_HOUR + YEAR_WOY, // 'Y' Example: 1..big number - Year of Week of Year + DOW_LOCAL, // 'e' Example: 1..7 - Day of Week / Localized + + EXTENDED_YEAR, + JULIAN_DAY, + MILLISECONDS_IN_DAY, + IS_LEAP_MONTH, + + FIELD_COUNT = UCAL_FIELD_COUNT // See ucal.h for other fields. +#endif /* U_HIDE_DEPRECATED_API */ + }; + +#ifndef U_HIDE_DEPRECATED_API + /** + * Useful constant for days of week. Note: Calendar day-of-week is 1-based. Clients + * who create locale resources for the field of first-day-of-week should be aware of + * this. For instance, in US locale, first-day-of-week is set to 1, i.e., SUNDAY. + * @deprecated ICU 2.6. Use C enum UCalendarDaysOfWeek defined in ucal.h + */ + enum EDaysOfWeek { + SUNDAY = 1, + MONDAY, + TUESDAY, + WEDNESDAY, + THURSDAY, + FRIDAY, + SATURDAY + }; + + /** + * Useful constants for month. Note: Calendar month is 0-based. + * @deprecated ICU 2.6. Use C enum UCalendarMonths defined in ucal.h + */ + enum EMonths { + JANUARY, + FEBRUARY, + MARCH, + APRIL, + MAY, + JUNE, + JULY, + AUGUST, + SEPTEMBER, + OCTOBER, + NOVEMBER, + DECEMBER, + UNDECIMBER + }; + + /** + * Useful constants for hour in 12-hour clock. Used in GregorianCalendar. + * @deprecated ICU 2.6. Use C enum UCalendarAMPMs defined in ucal.h + */ + enum EAmpm { + AM, + PM + }; +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * destructor + * @stable ICU 2.0 + */ + virtual ~Calendar(); + + /** + * Create and return a polymorphic copy of this calendar. + * + * @return a polymorphic copy of this calendar. + * @stable ICU 2.0 + */ + virtual Calendar* clone(void) const = 0; + + /** + * Creates a Calendar using the default timezone and locale. Clients are responsible + * for deleting the object returned. + * + * @param success Indicates the success/failure of Calendar creation. Filled in + * with U_ZERO_ERROR if created successfully, set to a failure result + * otherwise. U_MISSING_RESOURCE_ERROR will be returned if the resource data + * requests a calendar type which has not been installed. + * @return A Calendar if created successfully. NULL otherwise. + * @stable ICU 2.0 + */ + static Calendar* U_EXPORT2 createInstance(UErrorCode& success); + + /** + * Creates a Calendar using the given timezone and the default locale. + * The Calendar takes ownership of zoneToAdopt; the + * client must not delete it. + * + * @param zoneToAdopt The given timezone to be adopted. + * @param success Indicates the success/failure of Calendar creation. Filled in + * with U_ZERO_ERROR if created successfully, set to a failure result + * otherwise. + * @return A Calendar if created successfully. NULL otherwise. + * @stable ICU 2.0 + */ + static Calendar* U_EXPORT2 createInstance(TimeZone* zoneToAdopt, UErrorCode& success); + + /** + * Creates a Calendar using the given timezone and the default locale. The TimeZone + * is _not_ adopted; the client is still responsible for deleting it. + * + * @param zone The timezone. + * @param success Indicates the success/failure of Calendar creation. Filled in + * with U_ZERO_ERROR if created successfully, set to a failure result + * otherwise. + * @return A Calendar if created successfully. NULL otherwise. + * @stable ICU 2.0 + */ + static Calendar* U_EXPORT2 createInstance(const TimeZone& zone, UErrorCode& success); + + /** + * Creates a Calendar using the default timezone and the given locale. + * + * @param aLocale The given locale. + * @param success Indicates the success/failure of Calendar creation. Filled in + * with U_ZERO_ERROR if created successfully, set to a failure result + * otherwise. + * @return A Calendar if created successfully. NULL otherwise. + * @stable ICU 2.0 + */ + static Calendar* U_EXPORT2 createInstance(const Locale& aLocale, UErrorCode& success); + + /** + * Creates a Calendar using the given timezone and given locale. + * The Calendar takes ownership of zoneToAdopt; the + * client must not delete it. + * + * @param zoneToAdopt The given timezone to be adopted. + * @param aLocale The given locale. + * @param success Indicates the success/failure of Calendar creation. Filled in + * with U_ZERO_ERROR if created successfully, set to a failure result + * otherwise. + * @return A Calendar if created successfully. NULL otherwise. + * @stable ICU 2.0 + */ + static Calendar* U_EXPORT2 createInstance(TimeZone* zoneToAdopt, const Locale& aLocale, UErrorCode& success); + + /** + * Gets a Calendar using the given timezone and given locale. The TimeZone + * is _not_ adopted; the client is still responsible for deleting it. + * + * @param zone The given timezone. + * @param aLocale The given locale. + * @param success Indicates the success/failure of Calendar creation. Filled in + * with U_ZERO_ERROR if created successfully, set to a failure result + * otherwise. + * @return A Calendar if created successfully. NULL otherwise. + * @stable ICU 2.0 + */ + static Calendar* U_EXPORT2 createInstance(const TimeZone& zone, const Locale& aLocale, UErrorCode& success); + + /** + * Returns a list of the locales for which Calendars are installed. + * + * @param count Number of locales returned. + * @return An array of Locale objects representing the set of locales for which + * Calendars are installed. The system retains ownership of this list; + * the caller must NOT delete it. Does not include user-registered Calendars. + * @stable ICU 2.0 + */ + static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count); + + + /** + * Given a key and a locale, returns an array of string values in a preferred + * order that would make a difference. These are all and only those values where + * the open (creation) of the service with the locale formed from the input locale + * plus input keyword and that value has different behavior than creation with the + * input locale alone. + * @param key one of the keys supported by this service. For now, only + * "calendar" is supported. + * @param locale the locale + * @param commonlyUsed if set to true it will return only commonly used values + * with the given locale in preferred order. Otherwise, + * it will return all the available values for the locale. + * @param status ICU Error Code + * @return a string enumeration over keyword values for the given key and the locale. + * @stable ICU 4.2 + */ + static StringEnumeration* U_EXPORT2 getKeywordValuesForLocale(const char* key, + const Locale& locale, UBool commonlyUsed, UErrorCode& status); + + /** + * Returns the current UTC (GMT) time measured in milliseconds since 0:00:00 on 1/1/70 + * (derived from the system time). + * + * @return The current UTC time in milliseconds. + * @stable ICU 2.0 + */ + static UDate U_EXPORT2 getNow(void); + + /** + * Gets this Calendar's time as milliseconds. May involve recalculation of time due + * to previous calls to set time field values. The time specified is non-local UTC + * (GMT) time. Although this method is const, this object may actually be changed + * (semantically const). + * + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid or restricted by + * leniency, this will be set to an error status. + * @return The current time in UTC (GMT) time, or zero if the operation + * failed. + * @stable ICU 2.0 + */ + inline UDate getTime(UErrorCode& status) const { return getTimeInMillis(status); } + + /** + * Sets this Calendar's current time with the given UDate. The time specified should + * be in non-local UTC (GMT) time. + * + * @param date The given UDate in UTC (GMT) time. + * @param status Output param set to success/failure code on exit. If any value + * set in the time field is invalid or restricted by + * leniency, this will be set to an error status. + * @stable ICU 2.0 + */ + inline void setTime(UDate date, UErrorCode& status) { setTimeInMillis(date, status); } + + /** + * Compares the equality of two Calendar objects. Objects of different subclasses + * are considered unequal. This comparison is very exacting; two Calendar objects + * must be in exactly the same state to be considered equal. To compare based on the + * represented time, use equals() instead. + * + * @param that The Calendar object to be compared with. + * @return True if the given Calendar is the same as this Calendar; false + * otherwise. + * @stable ICU 2.0 + */ + virtual UBool operator==(const Calendar& that) const; + + /** + * Compares the inequality of two Calendar objects. + * + * @param that The Calendar object to be compared with. + * @return True if the given Calendar is not the same as this Calendar; false + * otherwise. + * @stable ICU 2.0 + */ + UBool operator!=(const Calendar& that) const {return !operator==(that);} + + /** + * Returns TRUE if the given Calendar object is equivalent to this + * one. An equivalent Calendar will behave exactly as this one + * does, but it may be set to a different time. By contrast, for + * the operator==() method to return TRUE, the other Calendar must + * be set to the same time. + * + * @param other the Calendar to be compared with this Calendar + * @stable ICU 2.4 + */ + virtual UBool isEquivalentTo(const Calendar& other) const; + + /** + * Compares the Calendar time, whereas Calendar::operator== compares the equality of + * Calendar objects. + * + * @param when The Calendar to be compared with this Calendar. Although this is a + * const parameter, the object may be modified physically + * (semantically const). + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid or restricted by + * leniency, this will be set to an error status. + * @return True if the current time of this Calendar is equal to the time of + * Calendar when; false otherwise. + * @stable ICU 2.0 + */ + UBool equals(const Calendar& when, UErrorCode& status) const; + + /** + * Returns true if this Calendar's current time is before "when"'s current time. + * + * @param when The Calendar to be compared with this Calendar. Although this is a + * const parameter, the object may be modified physically + * (semantically const). + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid or restricted by + * leniency, this will be set to an error status. + * @return True if the current time of this Calendar is before the time of + * Calendar when; false otherwise. + * @stable ICU 2.0 + */ + UBool before(const Calendar& when, UErrorCode& status) const; + + /** + * Returns true if this Calendar's current time is after "when"'s current time. + * + * @param when The Calendar to be compared with this Calendar. Although this is a + * const parameter, the object may be modified physically + * (semantically const). + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid or restricted by + * leniency, this will be set to an error status. + * @return True if the current time of this Calendar is after the time of + * Calendar when; false otherwise. + * @stable ICU 2.0 + */ + UBool after(const Calendar& when, UErrorCode& status) const; + + /** + * UDate Arithmetic function. Adds the specified (signed) amount of time to the given + * time field, based on the calendar's rules. For example, to subtract 5 days from + * the current time of the calendar, call add(Calendar::DATE, -5). When adding on + * the month or Calendar::MONTH field, other fields like date might conflict and + * need to be changed. For instance, adding 1 month on the date 01/31/96 will result + * in 02/29/96. + * Adding a positive value always means moving forward in time, so for the Gregorian calendar, + * starting with 100 BC and adding +1 to year results in 99 BC (even though this actually reduces + * the numeric value of the field itself). + * + * @param field Specifies which date field to modify. + * @param amount The amount of time to be added to the field, in the natural unit + * for that field (e.g., days for the day fields, hours for the hour + * field.) + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid or restricted by + * leniency, this will be set to an error status. + * @deprecated ICU 2.6. use add(UCalendarDateFields field, int32_t amount, UErrorCode& status) instead. + */ + virtual void add(EDateFields field, int32_t amount, UErrorCode& status); + + /** + * UDate Arithmetic function. Adds the specified (signed) amount of time to the given + * time field, based on the calendar's rules. For example, to subtract 5 days from + * the current time of the calendar, call add(Calendar::DATE, -5). When adding on + * the month or Calendar::MONTH field, other fields like date might conflict and + * need to be changed. For instance, adding 1 month on the date 01/31/96 will result + * in 02/29/96. + * Adding a positive value always means moving forward in time, so for the Gregorian calendar, + * starting with 100 BC and adding +1 to year results in 99 BC (even though this actually reduces + * the numeric value of the field itself). + * + * @param field Specifies which date field to modify. + * @param amount The amount of time to be added to the field, in the natural unit + * for that field (e.g., days for the day fields, hours for the hour + * field.) + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid or restricted by + * leniency, this will be set to an error status. + * @stable ICU 2.6. + */ + virtual void add(UCalendarDateFields field, int32_t amount, UErrorCode& status); + +#ifndef U_HIDE_DEPRECATED_API + /** + * Time Field Rolling function. Rolls (up/down) a single unit of time on the given + * time field. For example, to roll the current date up by one day, call + * roll(Calendar::DATE, true). When rolling on the year or Calendar::YEAR field, it + * will roll the year value in the range between getMinimum(Calendar::YEAR) and the + * value returned by getMaximum(Calendar::YEAR). When rolling on the month or + * Calendar::MONTH field, other fields like date might conflict and, need to be + * changed. For instance, rolling the month up on the date 01/31/96 will result in + * 02/29/96. Rolling up always means rolling forward in time (unless the limit of the + * field is reached, in which case it may pin or wrap), so for Gregorian calendar, + * starting with 100 BC and rolling the year up results in 99 BC. + * When eras have a definite beginning and end (as in the Chinese calendar, or as in + * most eras in the Japanese calendar) then rolling the year past either limit of the + * era will cause the year to wrap around. When eras only have a limit at one end, + * then attempting to roll the year past that limit will result in pinning the year + * at that limit. Note that for most calendars in which era 0 years move forward in + * time (such as Buddhist, Hebrew, or Islamic), it is possible for add or roll to + * result in negative years for era 0 (that is the only way to represent years before + * the calendar epoch). + * When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it will roll the + * hour value in the range between 0 and 23, which is zero-based. + * <P> + * NOTE: Do not use this method -- use roll(EDateFields, int, UErrorCode&) instead. + * + * @param field The time field. + * @param up Indicates if the value of the specified time field is to be rolled + * up or rolled down. Use true if rolling up, false otherwise. + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid or restricted by + * leniency, this will be set to an error status. + * @deprecated ICU 2.6. Use roll(UCalendarDateFields field, UBool up, UErrorCode& status) instead. + */ + inline void roll(EDateFields field, UBool up, UErrorCode& status); +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Time Field Rolling function. Rolls (up/down) a single unit of time on the given + * time field. For example, to roll the current date up by one day, call + * roll(Calendar::DATE, true). When rolling on the year or Calendar::YEAR field, it + * will roll the year value in the range between getMinimum(Calendar::YEAR) and the + * value returned by getMaximum(Calendar::YEAR). When rolling on the month or + * Calendar::MONTH field, other fields like date might conflict and, need to be + * changed. For instance, rolling the month up on the date 01/31/96 will result in + * 02/29/96. Rolling up always means rolling forward in time (unless the limit of the + * field is reached, in which case it may pin or wrap), so for Gregorian calendar, + * starting with 100 BC and rolling the year up results in 99 BC. + * When eras have a definite beginning and end (as in the Chinese calendar, or as in + * most eras in the Japanese calendar) then rolling the year past either limit of the + * era will cause the year to wrap around. When eras only have a limit at one end, + * then attempting to roll the year past that limit will result in pinning the year + * at that limit. Note that for most calendars in which era 0 years move forward in + * time (such as Buddhist, Hebrew, or Islamic), it is possible for add or roll to + * result in negative years for era 0 (that is the only way to represent years before + * the calendar epoch). + * When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it will roll the + * hour value in the range between 0 and 23, which is zero-based. + * <P> + * NOTE: Do not use this method -- use roll(UCalendarDateFields, int, UErrorCode&) instead. + * + * @param field The time field. + * @param up Indicates if the value of the specified time field is to be rolled + * up or rolled down. Use true if rolling up, false otherwise. + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid or restricted by + * leniency, this will be set to an error status. + * @stable ICU 2.6. + */ + inline void roll(UCalendarDateFields field, UBool up, UErrorCode& status); + + /** + * Time Field Rolling function. Rolls by the given amount on the given + * time field. For example, to roll the current date up by one day, call + * roll(Calendar::DATE, +1, status). When rolling on the month or + * Calendar::MONTH field, other fields like date might conflict and, need to be + * changed. For instance, rolling the month up on the date 01/31/96 will result in + * 02/29/96. Rolling by a positive value always means rolling forward in time (unless + * the limit of the field is reached, in which case it may pin or wrap), so for + * Gregorian calendar, starting with 100 BC and rolling the year by + 1 results in 99 BC. + * When eras have a definite beginning and end (as in the Chinese calendar, or as in + * most eras in the Japanese calendar) then rolling the year past either limit of the + * era will cause the year to wrap around. When eras only have a limit at one end, + * then attempting to roll the year past that limit will result in pinning the year + * at that limit. Note that for most calendars in which era 0 years move forward in + * time (such as Buddhist, Hebrew, or Islamic), it is possible for add or roll to + * result in negative years for era 0 (that is the only way to represent years before + * the calendar epoch). + * When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it will roll the + * hour value in the range between 0 and 23, which is zero-based. + * <P> + * The only difference between roll() and add() is that roll() does not change + * the value of more significant fields when it reaches the minimum or maximum + * of its range, whereas add() does. + * + * @param field The time field. + * @param amount Indicates amount to roll. + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid, this will be set to + * an error status. + * @deprecated ICU 2.6. Use roll(UCalendarDateFields field, int32_t amount, UErrorCode& status) instead. + */ + virtual void roll(EDateFields field, int32_t amount, UErrorCode& status); + + /** + * Time Field Rolling function. Rolls by the given amount on the given + * time field. For example, to roll the current date up by one day, call + * roll(Calendar::DATE, +1, status). When rolling on the month or + * Calendar::MONTH field, other fields like date might conflict and, need to be + * changed. For instance, rolling the month up on the date 01/31/96 will result in + * 02/29/96. Rolling by a positive value always means rolling forward in time (unless + * the limit of the field is reached, in which case it may pin or wrap), so for + * Gregorian calendar, starting with 100 BC and rolling the year by + 1 results in 99 BC. + * When eras have a definite beginning and end (as in the Chinese calendar, or as in + * most eras in the Japanese calendar) then rolling the year past either limit of the + * era will cause the year to wrap around. When eras only have a limit at one end, + * then attempting to roll the year past that limit will result in pinning the year + * at that limit. Note that for most calendars in which era 0 years move forward in + * time (such as Buddhist, Hebrew, or Islamic), it is possible for add or roll to + * result in negative years for era 0 (that is the only way to represent years before + * the calendar epoch). + * When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it will roll the + * hour value in the range between 0 and 23, which is zero-based. + * <P> + * The only difference between roll() and add() is that roll() does not change + * the value of more significant fields when it reaches the minimum or maximum + * of its range, whereas add() does. + * + * @param field The time field. + * @param amount Indicates amount to roll. + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid, this will be set to + * an error status. + * @stable ICU 2.6. + */ + virtual void roll(UCalendarDateFields field, int32_t amount, UErrorCode& status); + + /** + * Return the difference between the given time and the time this + * calendar object is set to. If this calendar is set + * <em>before</em> the given time, the returned value will be + * positive. If this calendar is set <em>after</em> the given + * time, the returned value will be negative. The + * <code>field</code> parameter specifies the units of the return + * value. For example, if <code>fieldDifference(when, + * Calendar::MONTH)</code> returns 3, then this calendar is set to + * 3 months before <code>when</code>, and possibly some addition + * time less than one month. + * + * <p>As a side effect of this call, this calendar is advanced + * toward <code>when</code> by the given amount. That is, calling + * this method has the side effect of calling <code>add(field, + * n)</code>, where <code>n</code> is the return value. + * + * <p>Usage: To use this method, call it first with the largest + * field of interest, then with progressively smaller fields. For + * example: + * + * <pre> + * int y = cal->fieldDifference(when, Calendar::YEAR, err); + * int m = cal->fieldDifference(when, Calendar::MONTH, err); + * int d = cal->fieldDifference(when, Calendar::DATE, err);</pre> + * + * computes the difference between <code>cal</code> and + * <code>when</code> in years, months, and days. + * + * <p>Note: <code>fieldDifference()</code> is + * <em>asymmetrical</em>. That is, in the following code: + * + * <pre> + * cal->setTime(date1, err); + * int m1 = cal->fieldDifference(date2, Calendar::MONTH, err); + * int d1 = cal->fieldDifference(date2, Calendar::DATE, err); + * cal->setTime(date2, err); + * int m2 = cal->fieldDifference(date1, Calendar::MONTH, err); + * int d2 = cal->fieldDifference(date1, Calendar::DATE, err);</pre> + * + * one might expect that <code>m1 == -m2 && d1 == -d2</code>. + * However, this is not generally the case, because of + * irregularities in the underlying calendar system (e.g., the + * Gregorian calendar has a varying number of days per month). + * + * @param when the date to compare this calendar's time to + * @param field the field in which to compute the result + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid, this will be set to + * an error status. + * @return the difference, either positive or negative, between + * this calendar's time and <code>when</code>, in terms of + * <code>field</code>. + * @deprecated ICU 2.6. Use fieldDifference(UDate when, UCalendarDateFields field, UErrorCode& status). + */ + virtual int32_t fieldDifference(UDate when, EDateFields field, UErrorCode& status); + + /** + * Return the difference between the given time and the time this + * calendar object is set to. If this calendar is set + * <em>before</em> the given time, the returned value will be + * positive. If this calendar is set <em>after</em> the given + * time, the returned value will be negative. The + * <code>field</code> parameter specifies the units of the return + * value. For example, if <code>fieldDifference(when, + * Calendar::MONTH)</code> returns 3, then this calendar is set to + * 3 months before <code>when</code>, and possibly some addition + * time less than one month. + * + * <p>As a side effect of this call, this calendar is advanced + * toward <code>when</code> by the given amount. That is, calling + * this method has the side effect of calling <code>add(field, + * n)</code>, where <code>n</code> is the return value. + * + * <p>Usage: To use this method, call it first with the largest + * field of interest, then with progressively smaller fields. For + * example: + * + * <pre> + * int y = cal->fieldDifference(when, Calendar::YEAR, err); + * int m = cal->fieldDifference(when, Calendar::MONTH, err); + * int d = cal->fieldDifference(when, Calendar::DATE, err);</pre> + * + * computes the difference between <code>cal</code> and + * <code>when</code> in years, months, and days. + * + * <p>Note: <code>fieldDifference()</code> is + * <em>asymmetrical</em>. That is, in the following code: + * + * <pre> + * cal->setTime(date1, err); + * int m1 = cal->fieldDifference(date2, Calendar::MONTH, err); + * int d1 = cal->fieldDifference(date2, Calendar::DATE, err); + * cal->setTime(date2, err); + * int m2 = cal->fieldDifference(date1, Calendar::MONTH, err); + * int d2 = cal->fieldDifference(date1, Calendar::DATE, err);</pre> + * + * one might expect that <code>m1 == -m2 && d1 == -d2</code>. + * However, this is not generally the case, because of + * irregularities in the underlying calendar system (e.g., the + * Gregorian calendar has a varying number of days per month). + * + * @param when the date to compare this calendar's time to + * @param field the field in which to compute the result + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid, this will be set to + * an error status. + * @return the difference, either positive or negative, between + * this calendar's time and <code>when</code>, in terms of + * <code>field</code>. + * @stable ICU 2.6. + */ + virtual int32_t fieldDifference(UDate when, UCalendarDateFields field, UErrorCode& status); + + /** + * Sets the calendar's time zone to be the one passed in. The Calendar takes ownership + * of the TimeZone; the caller is no longer responsible for deleting it. If the + * given time zone is NULL, this function has no effect. + * + * @param value The given time zone. + * @stable ICU 2.0 + */ + void adoptTimeZone(TimeZone* value); + + /** + * Sets the calendar's time zone to be the same as the one passed in. The TimeZone + * passed in is _not_ adopted; the client is still responsible for deleting it. + * + * @param zone The given time zone. + * @stable ICU 2.0 + */ + void setTimeZone(const TimeZone& zone); + + /** + * Returns a reference to the time zone owned by this calendar. The returned reference + * is only valid until clients make another call to adoptTimeZone or setTimeZone, + * or this Calendar is destroyed. + * + * @return The time zone object associated with this calendar. + * @stable ICU 2.0 + */ + const TimeZone& getTimeZone(void) const; + + /** + * Returns the time zone owned by this calendar. The caller owns the returned object + * and must delete it when done. After this call, the new time zone associated + * with this Calendar is the default TimeZone as returned by TimeZone::createDefault(). + * + * @return The time zone object which was associated with this calendar. + * @stable ICU 2.0 + */ + TimeZone* orphanTimeZone(void); + + /** + * Queries if the current date for this Calendar is in Daylight Savings Time. + * + * @param status Fill-in parameter which receives the status of this operation. + * @return True if the current date for this Calendar is in Daylight Savings Time, + * false, otherwise. + * @stable ICU 2.0 + */ + virtual UBool inDaylightTime(UErrorCode& status) const = 0; + + /** + * Specifies whether or not date/time interpretation is to be lenient. With lenient + * interpretation, a date such as "February 942, 1996" will be treated as being + * equivalent to the 941st day after February 1, 1996. With strict interpretation, + * such dates will cause an error when computing time from the time field values + * representing the dates. + * + * @param lenient True specifies date/time interpretation to be lenient. + * + * @see DateFormat#setLenient + * @stable ICU 2.0 + */ + void setLenient(UBool lenient); + + /** + * Tells whether date/time interpretation is to be lenient. + * + * @return True tells that date/time interpretation is to be lenient. + * @stable ICU 2.0 + */ + UBool isLenient(void) const; + + /** + * Sets the behavior for handling wall time repeating multiple times + * at negative time zone offset transitions. For example, 1:30 AM on + * November 6, 2011 in US Eastern time (Ameirca/New_York) occurs twice; + * 1:30 AM EDT, then 1:30 AM EST one hour later. When <code>UCAL_WALLTIME_FIRST</code> + * is used, the wall time 1:30AM in this example will be interpreted as 1:30 AM EDT + * (first occurrence). When <code>UCAL_WALLTIME_LAST</code> is used, it will be + * interpreted as 1:30 AM EST (last occurrence). The default value is + * <code>UCAL_WALLTIME_LAST</code>. + * <p> + * <b>Note:</b>When <code>UCAL_WALLTIME_NEXT_VALID</code> is not a valid + * option for this. When the argument is neither <code>UCAL_WALLTIME_FIRST</code> + * nor <code>UCAL_WALLTIME_LAST</code>, this method has no effect and will keep + * the current setting. + * + * @param option the behavior for handling repeating wall time, either + * <code>UCAL_WALLTIME_FIRST</code> or <code>UCAL_WALLTIME_LAST</code>. + * @see #getRepeatedWallTimeOption + * @stable ICU 49 + */ + void setRepeatedWallTimeOption(UCalendarWallTimeOption option); + + /** + * Gets the behavior for handling wall time repeating multiple times + * at negative time zone offset transitions. + * + * @return the behavior for handling repeating wall time, either + * <code>UCAL_WALLTIME_FIRST</code> or <code>UCAL_WALLTIME_LAST</code>. + * @see #setRepeatedWallTimeOption + * @stable ICU 49 + */ + UCalendarWallTimeOption getRepeatedWallTimeOption(void) const; + + /** + * Sets the behavior for handling skipped wall time at positive time zone offset + * transitions. For example, 2:30 AM on March 13, 2011 in US Eastern time (America/New_York) + * does not exist because the wall time jump from 1:59 AM EST to 3:00 AM EDT. When + * <code>UCAL_WALLTIME_FIRST</code> is used, 2:30 AM is interpreted as 30 minutes before 3:00 AM + * EDT, therefore, it will be resolved as 1:30 AM EST. When <code>UCAL_WALLTIME_LAST</code> + * is used, 2:30 AM is interpreted as 31 minutes after 1:59 AM EST, therefore, it will be + * resolved as 3:30 AM EDT. When <code>UCAL_WALLTIME_NEXT_VALID</code> is used, 2:30 AM will + * be resolved as next valid wall time, that is 3:00 AM EDT. The default value is + * <code>UCAL_WALLTIME_LAST</code>. + * <p> + * <b>Note:</b>This option is effective only when this calendar is lenient. + * When the calendar is strict, such non-existing wall time will cause an error. + * + * @param option the behavior for handling skipped wall time at positive time zone + * offset transitions, one of <code>UCAL_WALLTIME_FIRST</code>, <code>UCAL_WALLTIME_LAST</code> and + * <code>UCAL_WALLTIME_NEXT_VALID</code>. + * @see #getSkippedWallTimeOption + * + * @stable ICU 49 + */ + void setSkippedWallTimeOption(UCalendarWallTimeOption option); + + /** + * Gets the behavior for handling skipped wall time at positive time zone offset + * transitions. + * + * @return the behavior for handling skipped wall time, one of + * <code>UCAL_WALLTIME_FIRST</code>, <code>UCAL_WALLTIME_LAST</code> + * and <code>UCAL_WALLTIME_NEXT_VALID</code>. + * @see #setSkippedWallTimeOption + * @stable ICU 49 + */ + UCalendarWallTimeOption getSkippedWallTimeOption(void) const; + +#ifndef U_HIDE_DEPRECATED_API + /** + * Sets what the first day of the week is; e.g., Sunday in US, Monday in France. + * + * @param value The given first day of the week. + * @deprecated ICU 2.6. Use setFirstDayOfWeek(UCalendarDaysOfWeek value) instead. + */ + void setFirstDayOfWeek(EDaysOfWeek value); +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Sets what the first day of the week is; e.g., Sunday in US, Monday in France. + * + * @param value The given first day of the week. + * @stable ICU 2.6. + */ + void setFirstDayOfWeek(UCalendarDaysOfWeek value); + +#ifndef U_HIDE_DEPRECATED_API + /** + * Gets what the first day of the week is; e.g., Sunday in US, Monday in France. + * + * @return The first day of the week. + * @deprecated ICU 2.6 use the overload with error code + */ + EDaysOfWeek getFirstDayOfWeek(void) const; +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Gets what the first day of the week is; e.g., Sunday in US, Monday in France. + * + * @param status error code + * @return The first day of the week. + * @stable ICU 2.6 + */ + UCalendarDaysOfWeek getFirstDayOfWeek(UErrorCode &status) const; + + /** + * Sets what the minimal days required in the first week of the year are; For + * example, if the first week is defined as one that contains the first day of the + * first month of a year, call the method with value 1. If it must be a full week, + * use value 7. + * + * @param value The given minimal days required in the first week of the year. + * @stable ICU 2.0 + */ + void setMinimalDaysInFirstWeek(uint8_t value); + + /** + * Gets what the minimal days required in the first week of the year are; e.g., if + * the first week is defined as one that contains the first day of the first month + * of a year, getMinimalDaysInFirstWeek returns 1. If the minimal days required must + * be a full week, getMinimalDaysInFirstWeek returns 7. + * + * @return The minimal days required in the first week of the year. + * @stable ICU 2.0 + */ + uint8_t getMinimalDaysInFirstWeek(void) const; + + /** + * Gets the minimum value for the given time field. e.g., for Gregorian + * DAY_OF_MONTH, 1. + * + * @param field The given time field. + * @return The minimum value for the given time field. + * @deprecated ICU 2.6. Use getMinimum(UCalendarDateFields field) instead. + */ + virtual int32_t getMinimum(EDateFields field) const; + + /** + * Gets the minimum value for the given time field. e.g., for Gregorian + * DAY_OF_MONTH, 1. + * + * @param field The given time field. + * @return The minimum value for the given time field. + * @stable ICU 2.6. + */ + virtual int32_t getMinimum(UCalendarDateFields field) const; + + /** + * Gets the maximum value for the given time field. e.g. for Gregorian DAY_OF_MONTH, + * 31. + * + * @param field The given time field. + * @return The maximum value for the given time field. + * @deprecated ICU 2.6. Use getMaximum(UCalendarDateFields field) instead. + */ + virtual int32_t getMaximum(EDateFields field) const; + + /** + * Gets the maximum value for the given time field. e.g. for Gregorian DAY_OF_MONTH, + * 31. + * + * @param field The given time field. + * @return The maximum value for the given time field. + * @stable ICU 2.6. + */ + virtual int32_t getMaximum(UCalendarDateFields field) const; + + /** + * Gets the highest minimum value for the given field if varies. Otherwise same as + * getMinimum(). For Gregorian, no difference. + * + * @param field The given time field. + * @return The highest minimum value for the given time field. + * @deprecated ICU 2.6. Use getGreatestMinimum(UCalendarDateFields field) instead. + */ + virtual int32_t getGreatestMinimum(EDateFields field) const; + + /** + * Gets the highest minimum value for the given field if varies. Otherwise same as + * getMinimum(). For Gregorian, no difference. + * + * @param field The given time field. + * @return The highest minimum value for the given time field. + * @stable ICU 2.6. + */ + virtual int32_t getGreatestMinimum(UCalendarDateFields field) const; + + /** + * Gets the lowest maximum value for the given field if varies. Otherwise same as + * getMaximum(). e.g., for Gregorian DAY_OF_MONTH, 28. + * + * @param field The given time field. + * @return The lowest maximum value for the given time field. + * @deprecated ICU 2.6. Use getLeastMaximum(UCalendarDateFields field) instead. + */ + virtual int32_t getLeastMaximum(EDateFields field) const; + + /** + * Gets the lowest maximum value for the given field if varies. Otherwise same as + * getMaximum(). e.g., for Gregorian DAY_OF_MONTH, 28. + * + * @param field The given time field. + * @return The lowest maximum value for the given time field. + * @stable ICU 2.6. + */ + virtual int32_t getLeastMaximum(UCalendarDateFields field) const; + +#ifndef U_HIDE_DEPRECATED_API + /** + * Return the minimum value that this field could have, given the current date. + * For the Gregorian calendar, this is the same as getMinimum() and getGreatestMinimum(). + * + * The version of this function on Calendar uses an iterative algorithm to determine the + * actual minimum value for the field. There is almost always a more efficient way to + * accomplish this (in most cases, you can simply return getMinimum()). GregorianCalendar + * overrides this function with a more efficient implementation. + * + * @param field the field to determine the minimum of + * @param status Fill-in parameter which receives the status of this operation. + * @return the minimum of the given field for the current date of this Calendar + * @deprecated ICU 2.6. Use getActualMinimum(UCalendarDateFields field, UErrorCode& status) instead. + */ + int32_t getActualMinimum(EDateFields field, UErrorCode& status) const; +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Return the minimum value that this field could have, given the current date. + * For the Gregorian calendar, this is the same as getMinimum() and getGreatestMinimum(). + * + * The version of this function on Calendar uses an iterative algorithm to determine the + * actual minimum value for the field. There is almost always a more efficient way to + * accomplish this (in most cases, you can simply return getMinimum()). GregorianCalendar + * overrides this function with a more efficient implementation. + * + * @param field the field to determine the minimum of + * @param status Fill-in parameter which receives the status of this operation. + * @return the minimum of the given field for the current date of this Calendar + * @stable ICU 2.6. + */ + virtual int32_t getActualMinimum(UCalendarDateFields field, UErrorCode& status) const; + +#ifndef U_HIDE_DEPRECATED_API + /** + * Return the maximum value that this field could have, given the current date. + * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual + * maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Hebrew calendar, + * for some years the actual maximum for MONTH is 12, and for others 13. + * + * The version of this function on Calendar uses an iterative algorithm to determine the + * actual maximum value for the field. There is almost always a more efficient way to + * accomplish this (in most cases, you can simply return getMaximum()). GregorianCalendar + * overrides this function with a more efficient implementation. + * + * @param field the field to determine the maximum of + * @param status Fill-in parameter which receives the status of this operation. + * @return the maximum of the given field for the current date of this Calendar + * @deprecated ICU 2.6. Use getActualMaximum(UCalendarDateFields field, UErrorCode& status) instead. + */ + int32_t getActualMaximum(EDateFields field, UErrorCode& status) const; +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Return the maximum value that this field could have, given the current date. + * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual + * maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Hebrew calendar, + * for some years the actual maximum for MONTH is 12, and for others 13. + * + * The version of this function on Calendar uses an iterative algorithm to determine the + * actual maximum value for the field. There is almost always a more efficient way to + * accomplish this (in most cases, you can simply return getMaximum()). GregorianCalendar + * overrides this function with a more efficient implementation. + * + * @param field the field to determine the maximum of + * @param status Fill-in parameter which receives the status of this operation. + * @return the maximum of the given field for the current date of this Calendar + * @stable ICU 2.6. + */ + virtual int32_t getActualMaximum(UCalendarDateFields field, UErrorCode& status) const; + +#ifndef U_HIDE_DEPRECATED_API + /** + * Gets the value for a given time field. Recalculate the current time field values + * if the time value has been changed by a call to setTime(). Return zero for unset + * fields if any fields have been explicitly set by a call to set(). To force a + * recomputation of all fields regardless of the previous state, call complete(). + * This method is semantically const, but may alter the object in memory. + * + * @param field The given time field. + * @param status Fill-in parameter which receives the status of the operation. + * @return The value for the given time field, or zero if the field is unset, + * and set() has been called for any other field. + * @deprecated ICU 2.6. Use get(UCalendarDateFields field, UErrorCode& status) instead. + */ + int32_t get(EDateFields field, UErrorCode& status) const; +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Gets the value for a given time field. Recalculate the current time field values + * if the time value has been changed by a call to setTime(). Return zero for unset + * fields if any fields have been explicitly set by a call to set(). To force a + * recomputation of all fields regardless of the previous state, call complete(). + * This method is semantically const, but may alter the object in memory. + * + * @param field The given time field. + * @param status Fill-in parameter which receives the status of the operation. + * @return The value for the given time field, or zero if the field is unset, + * and set() has been called for any other field. + * @stable ICU 2.6. + */ + int32_t get(UCalendarDateFields field, UErrorCode& status) const; + +#ifndef U_HIDE_DEPRECATED_API + /** + * Determines if the given time field has a value set. This can affect in the + * resolving of time in Calendar. Unset fields have a value of zero, by definition. + * + * @param field The given time field. + * @return True if the given time field has a value set; false otherwise. + * @deprecated ICU 2.6. Use isSet(UCalendarDateFields field) instead. + */ + UBool isSet(EDateFields field) const; +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Determines if the given time field has a value set. This can affect in the + * resolving of time in Calendar. Unset fields have a value of zero, by definition. + * + * @param field The given time field. + * @return True if the given time field has a value set; false otherwise. + * @stable ICU 2.6. + */ + UBool isSet(UCalendarDateFields field) const; + +#ifndef U_HIDE_DEPRECATED_API + /** + * Sets the given time field with the given value. + * + * @param field The given time field. + * @param value The value to be set for the given time field. + * @deprecated ICU 2.6. Use set(UCalendarDateFields field, int32_t value) instead. + */ + void set(EDateFields field, int32_t value); +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Sets the given time field with the given value. + * + * @param field The given time field. + * @param value The value to be set for the given time field. + * @stable ICU 2.6. + */ + void set(UCalendarDateFields field, int32_t value); + + /** + * Sets the values for the fields YEAR, MONTH, and DATE. Other field values are + * retained; call clear() first if this is not desired. + * + * @param year The value used to set the YEAR time field. + * @param month The value used to set the MONTH time field. Month value is 0-based. + * e.g., 0 for January. + * @param date The value used to set the DATE time field. + * @stable ICU 2.0 + */ + void set(int32_t year, int32_t month, int32_t date); + + /** + * Sets the values for the fields YEAR, MONTH, DATE, HOUR_OF_DAY, and MINUTE. Other + * field values are retained; call clear() first if this is not desired. + * + * @param year The value used to set the YEAR time field. + * @param month The value used to set the MONTH time field. Month value is + * 0-based. E.g., 0 for January. + * @param date The value used to set the DATE time field. + * @param hour The value used to set the HOUR_OF_DAY time field. + * @param minute The value used to set the MINUTE time field. + * @stable ICU 2.0 + */ + void set(int32_t year, int32_t month, int32_t date, int32_t hour, int32_t minute); + + /** + * Sets the values for the fields YEAR, MONTH, DATE, HOUR_OF_DAY, MINUTE, and SECOND. + * Other field values are retained; call clear() first if this is not desired. + * + * @param year The value used to set the YEAR time field. + * @param month The value used to set the MONTH time field. Month value is + * 0-based. E.g., 0 for January. + * @param date The value used to set the DATE time field. + * @param hour The value used to set the HOUR_OF_DAY time field. + * @param minute The value used to set the MINUTE time field. + * @param second The value used to set the SECOND time field. + * @stable ICU 2.0 + */ + void set(int32_t year, int32_t month, int32_t date, int32_t hour, int32_t minute, int32_t second); + + /** + * Clears the values of all the time fields, making them both unset and assigning + * them a value of zero. The field values will be determined during the next + * resolving of time into time fields. + * @stable ICU 2.0 + */ + void clear(void); + +#ifndef U_HIDE_DEPRECATED_API + /** + * Clears the value in the given time field, both making it unset and assigning it a + * value of zero. This field value will be determined during the next resolving of + * time into time fields. + * + * @param field The time field to be cleared. + * @deprecated ICU 2.6. Use clear(UCalendarDateFields field) instead. + */ + void clear(EDateFields field); +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Clears the value in the given time field, both making it unset and assigning it a + * value of zero. This field value will be determined during the next resolving of + * time into time fields. + * + * @param field The time field to be cleared. + * @stable ICU 2.6. + */ + void clear(UCalendarDateFields field); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual method. This method is to + * implement a simple version of RTTI, since not all C++ compilers support genuine + * RTTI. Polymorphic operator==() and clone() methods call this method. + * <P> + * Concrete subclasses of Calendar must implement getDynamicClassID() and also a + * static method and data member: + * + * static UClassID getStaticClassID() { return (UClassID)&fgClassID; } + * static char fgClassID; + * + * @return The class ID for this object. All objects of a given class have the + * same class ID. Objects of other classes have different class IDs. + * @stable ICU 2.0 + */ + virtual UClassID getDynamicClassID(void) const = 0; + + /** + * Returns the calendar type name string for this Calendar object. + * The returned string is the legacy ICU calendar attribute value, + * for example, "gregorian" or "japanese". + * + * See type="old type name" for the calendar attribute of locale IDs + * at http://www.unicode.org/reports/tr35/#Key_Type_Definitions + * + * Sample code for getting the LDML/BCP 47 calendar key value: + * \code + * const char *calType = cal->getType(); + * if (0 == strcmp(calType, "unknown")) { + * // deal with unknown calendar type + * } else { + * string localeID("root@calendar="); + * localeID.append(calType); + * char langTag[100]; + * UErrorCode errorCode = U_ZERO_ERROR; + * int32_t length = uloc_toLanguageTag(localeID.c_str(), langTag, (int32_t)sizeof(langTag), TRUE, &errorCode); + * if (U_FAILURE(errorCode)) { + * // deal with errors & overflow + * } + * string lang(langTag, length); + * size_t caPos = lang.find("-ca-"); + * lang.erase(0, caPos + 4); + * // lang now contains the LDML calendar type + * } + * \endcode + * + * @return legacy calendar type name string + * @stable ICU 49 + */ + virtual const char * getType() const = 0; + + /** + * Returns whether the given day of the week is a weekday, a weekend day, + * or a day that transitions from one to the other, for the locale and + * calendar system associated with this Calendar (the locale's region is + * often the most determinant factor). If a transition occurs at midnight, + * then the days before and after the transition will have the + * type UCAL_WEEKDAY or UCAL_WEEKEND. If a transition occurs at a time + * other than midnight, then the day of the transition will have + * the type UCAL_WEEKEND_ONSET or UCAL_WEEKEND_CEASE. In this case, the + * method getWeekendTransition() will return the point of + * transition. + * @param dayOfWeek The day of the week whose type is desired (UCAL_SUNDAY..UCAL_SATURDAY). + * @param status The error code for the operation. + * @return The UCalendarWeekdayType for the day of the week. + * @stable ICU 4.4 + */ + virtual UCalendarWeekdayType getDayOfWeekType(UCalendarDaysOfWeek dayOfWeek, UErrorCode &status) const; + + /** + * Returns the time during the day at which the weekend begins or ends in + * this calendar system. If getDayOfWeekType() returns UCAL_WEEKEND_ONSET + * for the specified dayOfWeek, return the time at which the weekend begins. + * If getDayOfWeekType() returns UCAL_WEEKEND_CEASE for the specified dayOfWeek, + * return the time at which the weekend ends. If getDayOfWeekType() returns + * some other UCalendarWeekdayType for the specified dayOfWeek, is it an error condition + * (U_ILLEGAL_ARGUMENT_ERROR). + * @param dayOfWeek The day of the week for which the weekend transition time is + * desired (UCAL_SUNDAY..UCAL_SATURDAY). + * @param status The error code for the operation. + * @return The milliseconds after midnight at which the weekend begins or ends. + * @stable ICU 4.4 + */ + virtual int32_t getWeekendTransition(UCalendarDaysOfWeek dayOfWeek, UErrorCode &status) const; + + /** + * Returns TRUE if the given UDate is in the weekend in + * this calendar system. + * @param date The UDate in question. + * @param status The error code for the operation. + * @return TRUE if the given UDate is in the weekend in + * this calendar system, FALSE otherwise. + * @stable ICU 4.4 + */ + virtual UBool isWeekend(UDate date, UErrorCode &status) const; + + /** + * Returns TRUE if this Calendar's current date-time is in the weekend in + * this calendar system. + * @return TRUE if this Calendar's current date-time is in the weekend in + * this calendar system, FALSE otherwise. + * @stable ICU 4.4 + */ + virtual UBool isWeekend(void) const; + +protected: + + /** + * Constructs a Calendar with the default time zone as returned by + * TimeZone::createInstance(), and the default locale. + * + * @param success Indicates the status of Calendar object construction. Returns + * U_ZERO_ERROR if constructed successfully. + * @stable ICU 2.0 + */ + Calendar(UErrorCode& success); + + /** + * Copy constructor + * + * @param source Calendar object to be copied from + * @stable ICU 2.0 + */ + Calendar(const Calendar& source); + + /** + * Default assignment operator + * + * @param right Calendar object to be copied + * @stable ICU 2.0 + */ + Calendar& operator=(const Calendar& right); + + /** + * Constructs a Calendar with the given time zone and locale. Clients are no longer + * responsible for deleting the given time zone object after it's adopted. + * + * @param zone The given time zone. + * @param aLocale The given locale. + * @param success Indicates the status of Calendar object construction. Returns + * U_ZERO_ERROR if constructed successfully. + * @stable ICU 2.0 + */ + Calendar(TimeZone* zone, const Locale& aLocale, UErrorCode& success); + + /** + * Constructs a Calendar with the given time zone and locale. + * + * @param zone The given time zone. + * @param aLocale The given locale. + * @param success Indicates the status of Calendar object construction. Returns + * U_ZERO_ERROR if constructed successfully. + * @stable ICU 2.0 + */ + Calendar(const TimeZone& zone, const Locale& aLocale, UErrorCode& success); + + /** + * Converts Calendar's time field values to GMT as milliseconds. + * + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid or restricted by + * leniency, this will be set to an error status. + * @stable ICU 2.0 + */ + virtual void computeTime(UErrorCode& status); + + /** + * Converts GMT as milliseconds to time field values. This allows you to sync up the + * time field values with a new time that is set for the calendar. This method + * does NOT recompute the time first; to recompute the time, then the fields, use + * the method complete(). + * + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid or restricted by + * leniency, this will be set to an error status. + * @stable ICU 2.0 + */ + virtual void computeFields(UErrorCode& status); + + /** + * Gets this Calendar's current time as a long. + * + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid or restricted by + * leniency, this will be set to an error status. + * @return the current time as UTC milliseconds from the epoch. + * @stable ICU 2.0 + */ + double getTimeInMillis(UErrorCode& status) const; + + /** + * Sets this Calendar's current time from the given long value. + * @param millis the new time in UTC milliseconds from the epoch. + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid or restricted by + * leniency, this will be set to an error status. + * @stable ICU 2.0 + */ + void setTimeInMillis( double millis, UErrorCode& status ); + + /** + * Recomputes the current time from currently set fields, and then fills in any + * unset fields in the time field list. + * + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid or restricted by + * leniency, this will be set to an error status. + * @stable ICU 2.0 + */ + void complete(UErrorCode& status); + +#ifndef U_HIDE_DEPRECATED_API + /** + * Gets the value for a given time field. Subclasses can use this function to get + * field values without forcing recomputation of time. + * + * @param field The given time field. + * @return The value for the given time field. + * @deprecated ICU 2.6. Use internalGet(UCalendarDateFields field) instead. + */ + inline int32_t internalGet(EDateFields field) const {return fFields[field];} +#endif /* U_HIDE_DEPRECATED_API */ + +#ifndef U_HIDE_INTERNAL_API + /** + * Gets the value for a given time field. Subclasses can use this function to get + * field values without forcing recomputation of time. If the field's stamp is UNSET, + * the defaultValue is used. + * + * @param field The given time field. + * @param defaultValue a default value used if the field is unset. + * @return The value for the given time field. + * @internal + */ + inline int32_t internalGet(UCalendarDateFields field, int32_t defaultValue) const {return fStamp[field]>kUnset ? fFields[field] : defaultValue;} + + /** + * Gets the value for a given time field. Subclasses can use this function to get + * field values without forcing recomputation of time. + * + * @param field The given time field. + * @return The value for the given time field. + * @internal + */ + inline int32_t internalGet(UCalendarDateFields field) const {return fFields[field];} +#endif /* U_HIDE_INTERNAL_API */ + +#ifndef U_HIDE_DEPRECATED_API + /** + * Sets the value for a given time field. This is a fast internal method for + * subclasses. It does not affect the areFieldsInSync, isTimeSet, or areAllFieldsSet + * flags. + * + * @param field The given time field. + * @param value The value for the given time field. + * @deprecated ICU 2.6. Use internalSet(UCalendarDateFields field, int32_t value) instead. + */ + void internalSet(EDateFields field, int32_t value); +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Sets the value for a given time field. This is a fast internal method for + * subclasses. It does not affect the areFieldsInSync, isTimeSet, or areAllFieldsSet + * flags. + * + * @param field The given time field. + * @param value The value for the given time field. + * @stable ICU 2.6. + */ + inline void internalSet(UCalendarDateFields field, int32_t value); + + /** + * Prepare this calendar for computing the actual minimum or maximum. + * This method modifies this calendar's fields; it is called on a + * temporary calendar. + * @internal + */ + virtual void prepareGetActual(UCalendarDateFields field, UBool isMinimum, UErrorCode &status); + + /** + * Limit enums. Not in sync with UCalendarLimitType (refers to internal fields). + * @internal + */ + enum ELimitType { +#ifndef U_HIDE_INTERNAL_API + UCAL_LIMIT_MINIMUM = 0, + UCAL_LIMIT_GREATEST_MINIMUM, + UCAL_LIMIT_LEAST_MAXIMUM, + UCAL_LIMIT_MAXIMUM, + UCAL_LIMIT_COUNT +#endif /* U_HIDE_INTERNAL_API */ + }; + + /** + * Subclass API for defining limits of different types. + * Subclasses must implement this method to return limits for the + * following fields: + * + * <pre>UCAL_ERA + * UCAL_YEAR + * UCAL_MONTH + * UCAL_WEEK_OF_YEAR + * UCAL_WEEK_OF_MONTH + * UCAL_DATE (DAY_OF_MONTH on Java) + * UCAL_DAY_OF_YEAR + * UCAL_DAY_OF_WEEK_IN_MONTH + * UCAL_YEAR_WOY + * UCAL_EXTENDED_YEAR</pre> + * + * @param field one of the above field numbers + * @param limitType one of <code>MINIMUM</code>, <code>GREATEST_MINIMUM</code>, + * <code>LEAST_MAXIMUM</code>, or <code>MAXIMUM</code> + * @internal + */ + virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const = 0; + + /** + * Return a limit for a field. + * @param field the field, from <code>0..UCAL_MAX_FIELD</code> + * @param limitType the type specifier for the limit + * @see #ELimitType + * @internal + */ + virtual int32_t getLimit(UCalendarDateFields field, ELimitType limitType) const; + + + /** + * Return the Julian day number of day before the first day of the + * given month in the given extended year. Subclasses should override + * this method to implement their calendar system. + * @param eyear the extended year + * @param month the zero-based month, or 0 if useMonth is false + * @param useMonth if false, compute the day before the first day of + * the given year, otherwise, compute the day before the first day of + * the given month + * @return the Julian day number of the day before the first + * day of the given month and year + * @internal + */ + virtual int32_t handleComputeMonthStart(int32_t eyear, int32_t month, + UBool useMonth) const = 0; + + /** + * Return the number of days in the given month of the given extended + * year of this calendar system. Subclasses should override this + * method if they can provide a more correct or more efficient + * implementation than the default implementation in Calendar. + * @internal + */ + virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month) const ; + + /** + * Return the number of days in the given extended year of this + * calendar system. Subclasses should override this method if they can + * provide a more correct or more efficient implementation than the + * default implementation in Calendar. + * @stable ICU 2.0 + */ + virtual int32_t handleGetYearLength(int32_t eyear) const; + + + /** + * Return the extended year defined by the current fields. This will + * use the UCAL_EXTENDED_YEAR field or the UCAL_YEAR and supra-year fields (such + * as UCAL_ERA) specific to the calendar system, depending on which set of + * fields is newer. + * @return the extended year + * @internal + */ + virtual int32_t handleGetExtendedYear() = 0; + + /** + * Subclasses may override this. This method calls + * handleGetMonthLength() to obtain the calendar-specific month + * length. + * @param bestField which field to use to calculate the date + * @return julian day specified by calendar fields. + * @internal + */ + virtual int32_t handleComputeJulianDay(UCalendarDateFields bestField); + + /** + * Subclasses must override this to convert from week fields + * (YEAR_WOY and WEEK_OF_YEAR) to an extended year in the case + * where YEAR, EXTENDED_YEAR are not set. + * The Calendar implementation assumes yearWoy is in extended gregorian form + * @return the extended year, UCAL_EXTENDED_YEAR + * @internal + */ + virtual int32_t handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t woy); + + /** + * Validate a single field of this calendar. Subclasses should + * override this method to validate any calendar-specific fields. + * Generic fields can be handled by + * <code>Calendar::validateField()</code>. + * @see #validateField(int, int, int, int&) + * @internal + */ + virtual void validateField(UCalendarDateFields field, UErrorCode &status); + +#ifndef U_HIDE_INTERNAL_API + /** + * Compute the Julian day from fields. Will determine whether to use + * the JULIAN_DAY field directly, or other fields. + * @return the julian day + * @internal + */ + int32_t computeJulianDay(); + + /** + * Compute the milliseconds in the day from the fields. This is a + * value from 0 to 23:59:59.999 inclusive, unless fields are out of + * range, in which case it can be an arbitrary value. This value + * reflects local zone wall time. + * @internal + */ + double computeMillisInDay(); + + /** + * This method can assume EXTENDED_YEAR has been set. + * @param millis milliseconds of the date fields + * @param millisInDay milliseconds of the time fields; may be out + * or range. + * @param ec Output param set to failure code on function return + * when this function fails. + * @internal + */ + int32_t computeZoneOffset(double millis, double millisInDay, UErrorCode &ec); + + + /** + * Determine the best stamp in a range. + * @param start first enum to look at + * @param end last enum to look at + * @param bestSoFar stamp prior to function call + * @return the stamp value of the best stamp + * @internal + */ + int32_t newestStamp(UCalendarDateFields start, UCalendarDateFields end, int32_t bestSoFar) const; + + /** + * Values for field resolution tables + * @see #resolveFields + * @internal + */ + enum { + /** Marker for end of resolve set (row or group). */ + kResolveSTOP = -1, + /** Value to be bitwised "ORed" against resolve table field values for remapping. Example: (UCAL_DATE | kResolveRemap) in 1st column will cause 'UCAL_DATE' to be returned, but will not examine the value of UCAL_DATE. */ + kResolveRemap = 32 + }; + + /** + * Precedence table for Dates + * @see #resolveFields + * @internal + */ + static const UFieldResolutionTable kDatePrecedence[]; + + /** + * Precedence table for Year + * @see #resolveFields + * @internal + */ + static const UFieldResolutionTable kYearPrecedence[]; + + /** + * Precedence table for Day of Week + * @see #resolveFields + * @internal + */ + static const UFieldResolutionTable kDOWPrecedence[]; + + /** + * Given a precedence table, return the newest field combination in + * the table, or UCAL_FIELD_COUNT if none is found. + * + * <p>The precedence table is a 3-dimensional array of integers. It + * may be thought of as an array of groups. Each group is an array of + * lines. Each line is an array of field numbers. Within a line, if + * all fields are set, then the time stamp of the line is taken to be + * the stamp of the most recently set field. If any field of a line is + * unset, then the line fails to match. Within a group, the line with + * the newest time stamp is selected. The first field of the line is + * returned to indicate which line matched. + * + * <p>In some cases, it may be desirable to map a line to field that + * whose stamp is NOT examined. For example, if the best field is + * DAY_OF_WEEK then the DAY_OF_WEEK_IN_MONTH algorithm may be used. In + * order to do this, insert the value <code>kResolveRemap | F</code> at + * the start of the line, where <code>F</code> is the desired return + * field value. This field will NOT be examined; it only determines + * the return value if the other fields in the line are the newest. + * + * <p>If all lines of a group contain at least one unset field, then no + * line will match, and the group as a whole will fail to match. In + * that case, the next group will be processed. If all groups fail to + * match, then UCAL_FIELD_COUNT is returned. + * @internal + */ + UCalendarDateFields resolveFields(const UFieldResolutionTable *precedenceTable); +#endif /* U_HIDE_INTERNAL_API */ + + + /** + * @internal + */ + virtual const UFieldResolutionTable* getFieldResolutionTable() const; + +#ifndef U_HIDE_INTERNAL_API + /** + * Return the field that is newer, either defaultField, or + * alternateField. If neither is newer or neither is set, return defaultField. + * @internal + */ + UCalendarDateFields newerField(UCalendarDateFields defaultField, UCalendarDateFields alternateField) const; +#endif /* U_HIDE_INTERNAL_API */ + + +private: + /** + * Helper function for calculating limits by trial and error + * @param field The field being investigated + * @param startValue starting (least max) value of field + * @param endValue ending (greatest max) value of field + * @param status return type + * @internal + */ + int32_t getActualHelper(UCalendarDateFields field, int32_t startValue, int32_t endValue, UErrorCode &status) const; + + +protected: + /** + * The flag which indicates if the current time is set in the calendar. + * @stable ICU 2.0 + */ + UBool fIsTimeSet; + + /** + * True if the fields are in sync with the currently set time of this Calendar. + * If false, then the next attempt to get the value of a field will + * force a recomputation of all fields from the current value of the time + * field. + * <P> + * This should really be named areFieldsInSync, but the old name is retained + * for backward compatibility. + * @stable ICU 2.0 + */ + UBool fAreFieldsSet; + + /** + * True if all of the fields have been set. This is initially false, and set to + * true by computeFields(). + * @stable ICU 2.0 + */ + UBool fAreAllFieldsSet; + + /** + * True if all fields have been virtually set, but have not yet been + * computed. This occurs only in setTimeInMillis(). A calendar set + * to this state will compute all fields from the time if it becomes + * necessary, but otherwise will delay such computation. + * @stable ICU 3.0 + */ + UBool fAreFieldsVirtuallySet; + + /** + * Get the current time without recomputing. + * + * @return the current time without recomputing. + * @stable ICU 2.0 + */ + UDate internalGetTime(void) const { return fTime; } + + /** + * Set the current time without affecting flags or fields. + * + * @param time The time to be set + * @return the current time without recomputing. + * @stable ICU 2.0 + */ + void internalSetTime(UDate time) { fTime = time; } + + /** + * The time fields containing values into which the millis is computed. + * @stable ICU 2.0 + */ + int32_t fFields[UCAL_FIELD_COUNT]; + + /** + * The flags which tell if a specified time field for the calendar is set. + * @deprecated ICU 2.8 use (fStamp[n]!=kUnset) + */ + UBool fIsSet[UCAL_FIELD_COUNT]; + + /** Special values of stamp[] + * @stable ICU 2.0 + */ + enum { + kUnset = 0, + kInternallySet, + kMinimumUserStamp + }; + + /** + * Pseudo-time-stamps which specify when each field was set. There + * are two special values, UNSET and INTERNALLY_SET. Values from + * MINIMUM_USER_SET to Integer.MAX_VALUE are legal user set values. + * @stable ICU 2.0 + */ + int32_t fStamp[UCAL_FIELD_COUNT]; + + /** + * Subclasses may override this method to compute several fields + * specific to each calendar system. These are: + * + * <ul><li>ERA + * <li>YEAR + * <li>MONTH + * <li>DAY_OF_MONTH + * <li>DAY_OF_YEAR + * <li>EXTENDED_YEAR</ul> + * + * Subclasses can refer to the DAY_OF_WEEK and DOW_LOCAL fields, which + * will be set when this method is called. Subclasses can also call + * the getGregorianXxx() methods to obtain Gregorian calendar + * equivalents for the given Julian day. + * + * <p>In addition, subclasses should compute any subclass-specific + * fields, that is, fields from BASE_FIELD_COUNT to + * getFieldCount() - 1. + * + * <p>The default implementation in <code>Calendar</code> implements + * a pure proleptic Gregorian calendar. + * @internal + */ + virtual void handleComputeFields(int32_t julianDay, UErrorCode &status); + +#ifndef U_HIDE_INTERNAL_API + /** + * Return the extended year on the Gregorian calendar as computed by + * <code>computeGregorianFields()</code>. + * @internal + */ + int32_t getGregorianYear() const { + return fGregorianYear; + } + + /** + * Return the month (0-based) on the Gregorian calendar as computed by + * <code>computeGregorianFields()</code>. + * @internal + */ + int32_t getGregorianMonth() const { + return fGregorianMonth; + } + + /** + * Return the day of year (1-based) on the Gregorian calendar as + * computed by <code>computeGregorianFields()</code>. + * @internal + */ + int32_t getGregorianDayOfYear() const { + return fGregorianDayOfYear; + } + + /** + * Return the day of month (1-based) on the Gregorian calendar as + * computed by <code>computeGregorianFields()</code>. + * @internal + */ + int32_t getGregorianDayOfMonth() const { + return fGregorianDayOfMonth; + } +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Called by computeJulianDay. Returns the default month (0-based) for the year, + * taking year and era into account. Defaults to 0 for Gregorian, which doesn't care. + * @param eyear The extended year + * @internal + */ + virtual int32_t getDefaultMonthInYear(int32_t eyear) ; + + + /** + * Called by computeJulianDay. Returns the default day (1-based) for the month, + * taking currently-set year and era into account. Defaults to 1 for Gregorian. + * @param eyear the extended year + * @param month the month in the year + * @internal + */ + virtual int32_t getDefaultDayInMonth(int32_t eyear, int32_t month); + + //------------------------------------------------------------------------- + // Protected utility methods for use by subclasses. These are very handy + // for implementing add, roll, and computeFields. + //------------------------------------------------------------------------- + + /** + * Adjust the specified field so that it is within + * the allowable range for the date to which this calendar is set. + * For example, in a Gregorian calendar pinning the {@link #UCalendarDateFields DAY_OF_MONTH} + * field for a calendar set to April 31 would cause it to be set + * to April 30. + * <p> + * <b>Subclassing:</b> + * <br> + * This utility method is intended for use by subclasses that need to implement + * their own overrides of {@link #roll roll} and {@link #add add}. + * <p> + * <b>Note:</b> + * <code>pinField</code> is implemented in terms of + * {@link #getActualMinimum getActualMinimum} + * and {@link #getActualMaximum getActualMaximum}. If either of those methods uses + * a slow, iterative algorithm for a particular field, it would be + * unwise to attempt to call <code>pinField</code> for that field. If you + * really do need to do so, you should override this method to do + * something more efficient for that field. + * <p> + * @param field The calendar field whose value should be pinned. + * @param status Output param set to failure code on function return + * when this function fails. + * + * @see #getActualMinimum + * @see #getActualMaximum + * @stable ICU 2.0 + */ + virtual void pinField(UCalendarDateFields field, UErrorCode& status); + + /** + * Return the week number of a day, within a period. This may be the week number in + * a year or the week number in a month. Usually this will be a value >= 1, but if + * some initial days of the period are excluded from week 1, because + * {@link #getMinimalDaysInFirstWeek getMinimalDaysInFirstWeek} is > 1, then + * the week number will be zero for those + * initial days. This method requires the day number and day of week for some + * known date in the period in order to determine the day of week + * on the desired day. + * <p> + * <b>Subclassing:</b> + * <br> + * This method is intended for use by subclasses in implementing their + * {@link #computeTime computeTime} and/or {@link #computeFields computeFields} methods. + * It is often useful in {@link #getActualMinimum getActualMinimum} and + * {@link #getActualMaximum getActualMaximum} as well. + * <p> + * This variant is handy for computing the week number of some other + * day of a period (often the first or last day of the period) when its day + * of the week is not known but the day number and day of week for some other + * day in the period (e.g. the current date) <em>is</em> known. + * <p> + * @param desiredDay The {@link #UCalendarDateFields DAY_OF_YEAR} or + * {@link #UCalendarDateFields DAY_OF_MONTH} whose week number is desired. + * Should be 1 for the first day of the period. + * + * @param dayOfPeriod The {@link #UCalendarDateFields DAY_OF_YEAR} + * or {@link #UCalendarDateFields DAY_OF_MONTH} for a day in the period whose + * {@link #UCalendarDateFields DAY_OF_WEEK} is specified by the + * <code>knownDayOfWeek</code> parameter. + * Should be 1 for first day of period. + * + * @param dayOfWeek The {@link #UCalendarDateFields DAY_OF_WEEK} for the day + * corresponding to the <code>knownDayOfPeriod</code> parameter. + * 1-based with 1=Sunday. + * + * @return The week number (one-based), or zero if the day falls before + * the first week because + * {@link #getMinimalDaysInFirstWeek getMinimalDaysInFirstWeek} + * is more than one. + * + * @stable ICU 2.8 + */ + int32_t weekNumber(int32_t desiredDay, int32_t dayOfPeriod, int32_t dayOfWeek); + + +#ifndef U_HIDE_INTERNAL_API + /** + * Return the week number of a day, within a period. This may be the week number in + * a year, or the week number in a month. Usually this will be a value >= 1, but if + * some initial days of the period are excluded from week 1, because + * {@link #getMinimalDaysInFirstWeek getMinimalDaysInFirstWeek} is > 1, + * then the week number will be zero for those + * initial days. This method requires the day of week for the given date in order to + * determine the result. + * <p> + * <b>Subclassing:</b> + * <br> + * This method is intended for use by subclasses in implementing their + * {@link #computeTime computeTime} and/or {@link #computeFields computeFields} methods. + * It is often useful in {@link #getActualMinimum getActualMinimum} and + * {@link #getActualMaximum getActualMaximum} as well. + * <p> + * @param dayOfPeriod The {@link #UCalendarDateFields DAY_OF_YEAR} or + * {@link #UCalendarDateFields DAY_OF_MONTH} whose week number is desired. + * Should be 1 for the first day of the period. + * + * @param dayOfWeek The {@link #UCalendarDateFields DAY_OF_WEEK} for the day + * corresponding to the <code>dayOfPeriod</code> parameter. + * 1-based with 1=Sunday. + * + * @return The week number (one-based), or zero if the day falls before + * the first week because + * {@link #getMinimalDaysInFirstWeek getMinimalDaysInFirstWeek} + * is more than one. + * @internal + */ + inline int32_t weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek); + + /** + * returns the local DOW, valid range 0..6 + * @internal + */ + int32_t getLocalDOW(); +#endif /* U_HIDE_INTERNAL_API */ + +private: + + /** + * The next available value for fStamp[] + */ + int32_t fNextStamp;// = MINIMUM_USER_STAMP; + + /** + * Recalculates the time stamp array (fStamp). + * Resets fNextStamp to lowest next stamp value. + */ + void recalculateStamp(); + + /** + * The current time set for the calendar. + */ + UDate fTime; + + /** + * @see #setLenient + */ + UBool fLenient; + + /** + * Time zone affects the time calculation done by Calendar. Calendar subclasses use + * the time zone data to produce the local time. Always set; never NULL. + */ + TimeZone* fZone; + + /** + * Option for rpeated wall time + * @see #setRepeatedWallTimeOption + */ + UCalendarWallTimeOption fRepeatedWallTime; + + /** + * Option for skipped wall time + * @see #setSkippedWallTimeOption + */ + UCalendarWallTimeOption fSkippedWallTime; + + /** + * Both firstDayOfWeek and minimalDaysInFirstWeek are locale-dependent. They are + * used to figure out the week count for a specific date for a given locale. These + * must be set when a Calendar is constructed. For example, in US locale, + * firstDayOfWeek is SUNDAY; minimalDaysInFirstWeek is 1. They are used to figure + * out the week count for a specific date for a given locale. These must be set when + * a Calendar is constructed. + */ + UCalendarDaysOfWeek fFirstDayOfWeek; + uint8_t fMinimalDaysInFirstWeek; + UCalendarDaysOfWeek fWeekendOnset; + int32_t fWeekendOnsetMillis; + UCalendarDaysOfWeek fWeekendCease; + int32_t fWeekendCeaseMillis; + + /** + * Sets firstDayOfWeek and minimalDaysInFirstWeek. Called at Calendar construction + * time. + * + * @param desiredLocale The given locale. + * @param type The calendar type identifier, e.g: gregorian, buddhist, etc. + * @param success Indicates the status of setting the week count data from + * the resource for the given locale. Returns U_ZERO_ERROR if + * constructed successfully. + */ + void setWeekData(const Locale& desiredLocale, const char *type, UErrorCode& success); + + /** + * Recompute the time and update the status fields isTimeSet + * and areFieldsSet. Callers should check isTimeSet and only + * call this method if isTimeSet is false. + * + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid or restricted by + * leniency, this will be set to an error status. + */ + void updateTime(UErrorCode& status); + + /** + * The Gregorian year, as computed by computeGregorianFields() and + * returned by getGregorianYear(). + * @see #computeGregorianFields + */ + int32_t fGregorianYear; + + /** + * The Gregorian month, as computed by computeGregorianFields() and + * returned by getGregorianMonth(). + * @see #computeGregorianFields + */ + int32_t fGregorianMonth; + + /** + * The Gregorian day of the year, as computed by + * computeGregorianFields() and returned by getGregorianDayOfYear(). + * @see #computeGregorianFields + */ + int32_t fGregorianDayOfYear; + + /** + * The Gregorian day of the month, as computed by + * computeGregorianFields() and returned by getGregorianDayOfMonth(). + * @see #computeGregorianFields + */ + int32_t fGregorianDayOfMonth; + + /* calculations */ + + /** + * Compute the Gregorian calendar year, month, and day of month from + * the given Julian day. These values are not stored in fields, but in + * member variables gregorianXxx. Also compute the DAY_OF_WEEK and + * DOW_LOCAL fields. + */ + void computeGregorianAndDOWFields(int32_t julianDay, UErrorCode &ec); + +protected: + + /** + * Compute the Gregorian calendar year, month, and day of month from the + * Julian day. These values are not stored in fields, but in member + * variables gregorianXxx. They are used for time zone computations and by + * subclasses that are Gregorian derivatives. Subclasses may call this + * method to perform a Gregorian calendar millis->fields computation. + */ + void computeGregorianFields(int32_t julianDay, UErrorCode &ec); + +private: + + /** + * Compute the fields WEEK_OF_YEAR, YEAR_WOY, WEEK_OF_MONTH, + * DAY_OF_WEEK_IN_MONTH, and DOW_LOCAL from EXTENDED_YEAR, YEAR, + * DAY_OF_WEEK, and DAY_OF_YEAR. The latter fields are computed by the + * subclass based on the calendar system. + * + * <p>The YEAR_WOY field is computed simplistically. It is equal to YEAR + * most of the time, but at the year boundary it may be adjusted to YEAR-1 + * or YEAR+1 to reflect the overlap of a week into an adjacent year. In + * this case, a simple increment or decrement is performed on YEAR, even + * though this may yield an invalid YEAR value. For instance, if the YEAR + * is part of a calendar system with an N-year cycle field CYCLE, then + * incrementing the YEAR may involve incrementing CYCLE and setting YEAR + * back to 0 or 1. This is not handled by this code, and in fact cannot be + * simply handled without having subclasses define an entire parallel set of + * fields for fields larger than or equal to a year. This additional + * complexity is not warranted, since the intention of the YEAR_WOY field is + * to support ISO 8601 notation, so it will typically be used with a + * proleptic Gregorian calendar, which has no field larger than a year. + */ + void computeWeekFields(UErrorCode &ec); + + + /** + * Ensure that each field is within its valid range by calling {@link + * #validateField(int, int&)} on each field that has been set. This method + * should only be called if this calendar is not lenient. + * @see #isLenient + * @see #validateField(int, int&) + * @internal + */ + void validateFields(UErrorCode &status); + + /** + * Validate a single field of this calendar given its minimum and + * maximum allowed value. If the field is out of range, + * <code>U_ILLEGAL_ARGUMENT_ERROR</code> will be set. Subclasses may + * use this method in their implementation of {@link + * #validateField(int, int&)}. + * @internal + */ + void validateField(UCalendarDateFields field, int32_t min, int32_t max, UErrorCode& status); + + protected: +#ifndef U_HIDE_INTERNAL_API + /** + * Convert a quasi Julian date to the day of the week. The Julian date used here is + * not a true Julian date, since it is measured from midnight, not noon. Return + * value is one-based. + * + * @param julian The given Julian date number. + * @return Day number from 1..7 (SUN..SAT). + * @internal + */ + static uint8_t julianDayToDayOfWeek(double julian); +#endif /* U_HIDE_INTERNAL_API */ + + private: + char validLocale[ULOC_FULLNAME_CAPACITY]; + char actualLocale[ULOC_FULLNAME_CAPACITY]; + + public: +#if !UCONFIG_NO_SERVICE + /** + * INTERNAL FOR 2.6 -- Registration. + */ + +#ifndef U_HIDE_INTERNAL_API + /** + * Return a StringEnumeration over the locales available at the time of the call, + * including registered locales. + * @return a StringEnumeration over the locales available at the time of the call + * @internal + */ + static StringEnumeration* getAvailableLocales(void); + + /** + * Register a new Calendar factory. The factory will be adopted. + * INTERNAL in 2.6 + * + * Because ICU may choose to cache Calendars internally, this must + * be called at application startup, prior to any calls to + * Calendar::createInstance to avoid undefined behavior. + * + * @param toAdopt the factory instance to be adopted + * @param status the in/out status code, no special meanings are assigned + * @return a registry key that can be used to unregister this factory + * @internal + */ + static URegistryKey registerFactory(ICUServiceFactory* toAdopt, UErrorCode& status); + + /** + * Unregister a previously-registered CalendarFactory using the key returned from the + * register call. Key becomes invalid after a successful call and should not be used again. + * The CalendarFactory corresponding to the key will be deleted. + * INTERNAL in 2.6 + * + * Because ICU may choose to cache Calendars internally, this should + * be called during application shutdown, after all calls to + * Calendar::createInstance to avoid undefined behavior. + * + * @param key the registry key returned by a previous call to registerFactory + * @param status the in/out status code, no special meanings are assigned + * @return TRUE if the factory for the key was successfully unregistered + * @internal + */ + static UBool unregister(URegistryKey key, UErrorCode& status); +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Multiple Calendar Implementation + * @internal + */ + friend class CalendarFactory; + + /** + * Multiple Calendar Implementation + * @internal + */ + friend class CalendarService; + + /** + * Multiple Calendar Implementation + * @internal + */ + friend class DefaultCalendarFactory; +#endif /* !UCONFIG_NO_SERVICE */ + + /** + * @return TRUE if this calendar has a default century (i.e. 03 -> 2003) + * @internal + */ + virtual UBool haveDefaultCentury() const = 0; + + /** + * @return the start of the default century, as a UDate + * @internal + */ + virtual UDate defaultCenturyStart() const = 0; + /** + * @return the beginning year of the default century, as a year + * @internal + */ + virtual int32_t defaultCenturyStartYear() const = 0; + + /** Get the locale for this calendar object. You can choose between valid and actual locale. + * @param type type of the locale we're looking for (valid or actual) + * @param status error code for the operation + * @return the locale + * @stable ICU 2.8 + */ + Locale getLocale(ULocDataLocaleType type, UErrorCode &status) const; + + /** + * @return The related Gregorian year; will be obtained by modifying the value + * obtained by get from UCAL_EXTENDED_YEAR field + * @internal + */ + virtual int32_t getRelatedYear(UErrorCode &status) const; + + /** + * @param year The related Gregorian year to set; will be modified as necessary then + * set in UCAL_EXTENDED_YEAR field + * @internal + */ + virtual void setRelatedYear(int32_t year); + +#ifndef U_HIDE_INTERNAL_API + /** Get the locale for this calendar object. You can choose between valid and actual locale. + * @param type type of the locale we're looking for (valid or actual) + * @param status error code for the operation + * @return the locale + * @internal + */ + const char* getLocaleID(ULocDataLocaleType type, UErrorCode &status) const; +#endif /* U_HIDE_INTERNAL_API */ + +private: + /** + * Cast TimeZone used by this object to BasicTimeZone, or NULL if the TimeZone + * is not an instance of BasicTimeZone. + */ + BasicTimeZone* getBasicTimeZone() const; + + /** + * Find the previous zone transtion near the given time. + * @param base The base time, inclusive + * @param transitionTime Receives the result time + * @param status The error status + * @return TRUE if a transition is found. + */ + UBool getImmediatePreviousZoneTransition(UDate base, UDate *transitionTime, UErrorCode& status) const; + +public: +#ifndef U_HIDE_INTERNAL_API + /** + * Creates a new Calendar from a Locale for the cache. + * This method does not set the time or timezone in returned calendar. + * @param locale the locale. + * @param status any error returned here. + * @return the new Calendar object with no time or timezone set. + * @internal For ICU use only. + */ + static Calendar * U_EXPORT2 makeInstance( + const Locale &locale, UErrorCode &status); + + /** + * Get the calendar type for given locale. + * @param locale the locale + * @param typeBuffer calendar type returned here + * @param typeBufferSize The size of typeBuffer in bytes. If the type + * can't fit in the buffer, this method sets status to + * U_BUFFER_OVERFLOW_ERROR + * @param status error, if any, returned here. + * @internal For ICU use only. + */ + static void U_EXPORT2 getCalendarTypeFromLocale( + const Locale &locale, + char *typeBuffer, + int32_t typeBufferSize, + UErrorCode &status); +#endif /* U_HIDE_INTERNAL_API */ +}; + +// ------------------------------------- + +inline Calendar* +Calendar::createInstance(TimeZone* zone, UErrorCode& errorCode) +{ + // since the Locale isn't specified, use the default locale + return createInstance(zone, Locale::getDefault(), errorCode); +} + +// ------------------------------------- + +inline void +Calendar::roll(UCalendarDateFields field, UBool up, UErrorCode& status) +{ + roll(field, (int32_t)(up ? +1 : -1), status); +} + +#ifndef U_HIDE_DEPRECATED_API +inline void +Calendar::roll(EDateFields field, UBool up, UErrorCode& status) +{ + roll((UCalendarDateFields) field, up, status); +} +#endif /* U_HIDE_DEPRECATED_API */ + + +// ------------------------------------- + +/** + * Fast method for subclasses. The caller must maintain fUserSetDSTOffset and + * fUserSetZoneOffset, as well as the isSet[] array. + */ + +inline void +Calendar::internalSet(UCalendarDateFields field, int32_t value) +{ + fFields[field] = value; + fStamp[field] = kInternallySet; + fIsSet[field] = TRUE; // Remove later +} + + +#ifndef U_HIDE_INTERNAL_API +inline int32_t Calendar::weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek) +{ + return weekNumber(dayOfPeriod, dayOfPeriod, dayOfWeek); +} +#endif /* U_HIDE_INTERNAL_API */ + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _CALENDAR diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/caniter.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/caniter.h new file mode 100755 index 00000000..5a882fb3 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/caniter.h @@ -0,0 +1,210 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ******************************************************************************* + * Copyright (C) 1996-2014, International Business Machines Corporation and + * others. All Rights Reserved. + ******************************************************************************* + */ + +#ifndef CANITER_H +#define CANITER_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_NORMALIZATION + +#include "unicode/uobject.h" +#include "unicode/unistr.h" + +/** + * \file + * \brief C++ API: Canonical Iterator + */ + +/** Should permutation skip characters with combining class zero + * Should be either TRUE or FALSE. This is a compile time option + * @stable ICU 2.4 + */ +#ifndef CANITER_SKIP_ZEROES +#define CANITER_SKIP_ZEROES TRUE +#endif + +U_NAMESPACE_BEGIN + +class Hashtable; +class Normalizer2; +class Normalizer2Impl; + +/** + * This class allows one to iterate through all the strings that are canonically equivalent to a given + * string. For example, here are some sample results: +Results for: {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA} +1: \\u0041\\u030A\\u0064\\u0307\\u0327 + = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA} +2: \\u0041\\u030A\\u0064\\u0327\\u0307 + = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D}{COMBINING CEDILLA}{COMBINING DOT ABOVE} +3: \\u0041\\u030A\\u1E0B\\u0327 + = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D WITH DOT ABOVE}{COMBINING CEDILLA} +4: \\u0041\\u030A\\u1E11\\u0307 + = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D WITH CEDILLA}{COMBINING DOT ABOVE} +5: \\u00C5\\u0064\\u0307\\u0327 + = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA} +6: \\u00C5\\u0064\\u0327\\u0307 + = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D}{COMBINING CEDILLA}{COMBINING DOT ABOVE} +7: \\u00C5\\u1E0B\\u0327 + = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D WITH DOT ABOVE}{COMBINING CEDILLA} +8: \\u00C5\\u1E11\\u0307 + = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D WITH CEDILLA}{COMBINING DOT ABOVE} +9: \\u212B\\u0064\\u0307\\u0327 + = {ANGSTROM SIGN}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA} +10: \\u212B\\u0064\\u0327\\u0307 + = {ANGSTROM SIGN}{LATIN SMALL LETTER D}{COMBINING CEDILLA}{COMBINING DOT ABOVE} +11: \\u212B\\u1E0B\\u0327 + = {ANGSTROM SIGN}{LATIN SMALL LETTER D WITH DOT ABOVE}{COMBINING CEDILLA} +12: \\u212B\\u1E11\\u0307 + = {ANGSTROM SIGN}{LATIN SMALL LETTER D WITH CEDILLA}{COMBINING DOT ABOVE} + *<br>Note: the code is intended for use with small strings, and is not suitable for larger ones, + * since it has not been optimized for that situation. + * Note, CanonicalIterator is not intended to be subclassed. + * @author M. Davis + * @author C++ port by V. Weinstein + * @stable ICU 2.4 + */ +class U_COMMON_API CanonicalIterator U_FINAL : public UObject { +public: + /** + * Construct a CanonicalIterator object + * @param source string to get results for + * @param status Fill-in parameter which receives the status of this operation. + * @stable ICU 2.4 + */ + CanonicalIterator(const UnicodeString &source, UErrorCode &status); + + /** Destructor + * Cleans pieces + * @stable ICU 2.4 + */ + virtual ~CanonicalIterator(); + + /** + * Gets the NFD form of the current source we are iterating over. + * @return gets the source: NOTE: it is the NFD form of source + * @stable ICU 2.4 + */ + UnicodeString getSource(); + + /** + * Resets the iterator so that one can start again from the beginning. + * @stable ICU 2.4 + */ + void reset(); + + /** + * Get the next canonically equivalent string. + * <br><b>Warning: The strings are not guaranteed to be in any particular order.</b> + * @return the next string that is canonically equivalent. A bogus string is returned when + * the iteration is done. + * @stable ICU 2.4 + */ + UnicodeString next(); + + /** + * Set a new source for this iterator. Allows object reuse. + * @param newSource the source string to iterate against. This allows the same iterator to be used + * while changing the source string, saving object creation. + * @param status Fill-in parameter which receives the status of this operation. + * @stable ICU 2.4 + */ + void setSource(const UnicodeString &newSource, UErrorCode &status); + +#ifndef U_HIDE_INTERNAL_API + /** + * Dumb recursive implementation of permutation. + * TODO: optimize + * @param source the string to find permutations for + * @param skipZeros determine if skip zeros + * @param result the results in a set. + * @param status Fill-in parameter which receives the status of this operation. + * @internal + */ + static void U_EXPORT2 permute(UnicodeString &source, UBool skipZeros, Hashtable *result, UErrorCode &status); +#endif /* U_HIDE_INTERNAL_API */ + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.2 + */ + static UClassID U_EXPORT2 getStaticClassID(); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.2 + */ + virtual UClassID getDynamicClassID() const; + +private: + // ===================== PRIVATES ============================== + // private default constructor + CanonicalIterator(); + + + /** + * Copy constructor. Private for now. + * @internal + */ + CanonicalIterator(const CanonicalIterator& other); + + /** + * Assignment operator. Private for now. + * @internal + */ + CanonicalIterator& operator=(const CanonicalIterator& other); + + // fields + UnicodeString source; + UBool done; + + // 2 dimensional array holds the pieces of the string with + // their different canonically equivalent representations + UnicodeString **pieces; + int32_t pieces_length; + int32_t *pieces_lengths; + + // current is used in iterating to combine pieces + int32_t *current; + int32_t current_length; + + // transient fields + UnicodeString buffer; + + const Normalizer2 &nfd; + const Normalizer2Impl &nfcImpl; + + // we have a segment, in NFD. Find all the strings that are canonically equivalent to it. + UnicodeString *getEquivalents(const UnicodeString &segment, int32_t &result_len, UErrorCode &status); //private String[] getEquivalents(String segment) + + //Set getEquivalents2(String segment); + Hashtable *getEquivalents2(Hashtable *fillinResult, const char16_t *segment, int32_t segLen, UErrorCode &status); + //Hashtable *getEquivalents2(const UnicodeString &segment, int32_t segLen, UErrorCode &status); + + /** + * See if the decomposition of cp2 is at segment starting at segmentPos + * (with canonical rearrangment!) + * If so, take the remainder, and return the equivalents + */ + //Set extract(int comp, String segment, int segmentPos, StringBuffer buffer); + Hashtable *extract(Hashtable *fillinResult, UChar32 comp, const char16_t *segment, int32_t segLen, int32_t segmentPos, UErrorCode &status); + //Hashtable *extract(UChar32 comp, const UnicodeString &segment, int32_t segLen, int32_t segmentPos, UErrorCode &status); + + void cleanPieces(); + +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_NORMALIZATION */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/casemap.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/casemap.h new file mode 100755 index 00000000..4b77256d --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/casemap.h @@ -0,0 +1,494 @@ +// © 2017 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +// casemap.h +// created: 2017jan12 Markus W. Scherer + +#ifndef __CASEMAP_H__ +#define __CASEMAP_H__ + +#include "unicode/utypes.h" +#include "unicode/stringpiece.h" +#include "unicode/uobject.h" + +/** + * \file + * \brief C++ API: Low-level C++ case mapping functions. + */ + +U_NAMESPACE_BEGIN + +class BreakIterator; +class ByteSink; +class Edits; + +/** + * Low-level C++ case mapping functions. + * + * @stable ICU 59 + */ +class U_COMMON_API CaseMap U_FINAL : public UMemory { +public: + /** + * Lowercases a UTF-16 string and optionally records edits. + * Casing is locale-dependent and context-sensitive. + * The result may be longer or shorter than the original. + * The source string and the destination buffer must not overlap. + * + * @param locale The locale ID. ("" = root locale, NULL = default locale.) + * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. + * @param src The original string. + * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. + * @param dest A buffer for the result string. The result will be NUL-terminated if + * the buffer is large enough. + * The contents is undefined in case of failure. + * @param destCapacity The size of the buffer (number of char16_ts). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param edits Records edits for index mapping, working with styled text, + * and getting only changes (if any). + * The Edits contents is undefined if any error occurs. + * This function calls edits->reset() first unless + * options includes U_EDITS_NO_RESET. edits can be NULL. + * @param errorCode Reference to an in/out error code value + * which must not indicate a failure before the function call. + * @return The length of the result string, if successful. + * When the result would be longer than destCapacity, + * the full length is returned and a U_BUFFER_OVERFLOW_ERROR is set. + * + * @see u_strToLower + * @stable ICU 59 + */ + static int32_t toLower( + const char *locale, uint32_t options, + const char16_t *src, int32_t srcLength, + char16_t *dest, int32_t destCapacity, Edits *edits, + UErrorCode &errorCode); + + /** + * Uppercases a UTF-16 string and optionally records edits. + * Casing is locale-dependent and context-sensitive. + * The result may be longer or shorter than the original. + * The source string and the destination buffer must not overlap. + * + * @param locale The locale ID. ("" = root locale, NULL = default locale.) + * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. + * @param src The original string. + * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. + * @param dest A buffer for the result string. The result will be NUL-terminated if + * the buffer is large enough. + * The contents is undefined in case of failure. + * @param destCapacity The size of the buffer (number of char16_ts). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param edits Records edits for index mapping, working with styled text, + * and getting only changes (if any). + * The Edits contents is undefined if any error occurs. + * This function calls edits->reset() first unless + * options includes U_EDITS_NO_RESET. edits can be NULL. + * @param errorCode Reference to an in/out error code value + * which must not indicate a failure before the function call. + * @return The length of the result string, if successful. + * When the result would be longer than destCapacity, + * the full length is returned and a U_BUFFER_OVERFLOW_ERROR is set. + * + * @see u_strToUpper + * @stable ICU 59 + */ + static int32_t toUpper( + const char *locale, uint32_t options, + const char16_t *src, int32_t srcLength, + char16_t *dest, int32_t destCapacity, Edits *edits, + UErrorCode &errorCode); + +#if !UCONFIG_NO_BREAK_ITERATION + + /** + * Titlecases a UTF-16 string and optionally records edits. + * Casing is locale-dependent and context-sensitive. + * The result may be longer or shorter than the original. + * The source string and the destination buffer must not overlap. + * + * Titlecasing uses a break iterator to find the first characters of words + * that are to be titlecased. It titlecases those characters and lowercases + * all others. (This can be modified with options bits.) + * + * @param locale The locale ID. ("" = root locale, NULL = default locale.) + * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT, U_EDITS_NO_RESET, + * U_TITLECASE_NO_LOWERCASE, + * U_TITLECASE_NO_BREAK_ADJUSTMENT, U_TITLECASE_ADJUST_TO_CASED, + * U_TITLECASE_WHOLE_STRING, U_TITLECASE_SENTENCES. + * @param iter A break iterator to find the first characters of words that are to be titlecased. + * It is set to the source string (setText()) + * and used one or more times for iteration (first() and next()). + * If NULL, then a word break iterator for the locale is used + * (or something equivalent). + * @param src The original string. + * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. + * @param dest A buffer for the result string. The result will be NUL-terminated if + * the buffer is large enough. + * The contents is undefined in case of failure. + * @param destCapacity The size of the buffer (number of char16_ts). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param edits Records edits for index mapping, working with styled text, + * and getting only changes (if any). + * The Edits contents is undefined if any error occurs. + * This function calls edits->reset() first unless + * options includes U_EDITS_NO_RESET. edits can be NULL. + * @param errorCode Reference to an in/out error code value + * which must not indicate a failure before the function call. + * @return The length of the result string, if successful. + * When the result would be longer than destCapacity, + * the full length is returned and a U_BUFFER_OVERFLOW_ERROR is set. + * + * @see u_strToTitle + * @see ucasemap_toTitle + * @stable ICU 59 + */ + static int32_t toTitle( + const char *locale, uint32_t options, BreakIterator *iter, + const char16_t *src, int32_t srcLength, + char16_t *dest, int32_t destCapacity, Edits *edits, + UErrorCode &errorCode); + +#endif // UCONFIG_NO_BREAK_ITERATION + + /** + * Case-folds a UTF-16 string and optionally records edits. + * + * Case folding is locale-independent and not context-sensitive, + * but there is an option for whether to include or exclude mappings for dotted I + * and dotless i that are marked with 'T' in CaseFolding.txt. + * + * The result may be longer or shorter than the original. + * The source string and the destination buffer must not overlap. + * + * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT, U_EDITS_NO_RESET, + * U_FOLD_CASE_DEFAULT, U_FOLD_CASE_EXCLUDE_SPECIAL_I. + * @param src The original string. + * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. + * @param dest A buffer for the result string. The result will be NUL-terminated if + * the buffer is large enough. + * The contents is undefined in case of failure. + * @param destCapacity The size of the buffer (number of char16_ts). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param edits Records edits for index mapping, working with styled text, + * and getting only changes (if any). + * The Edits contents is undefined if any error occurs. + * This function calls edits->reset() first unless + * options includes U_EDITS_NO_RESET. edits can be NULL. + * @param errorCode Reference to an in/out error code value + * which must not indicate a failure before the function call. + * @return The length of the result string, if successful. + * When the result would be longer than destCapacity, + * the full length is returned and a U_BUFFER_OVERFLOW_ERROR is set. + * + * @see u_strFoldCase + * @stable ICU 59 + */ + static int32_t fold( + uint32_t options, + const char16_t *src, int32_t srcLength, + char16_t *dest, int32_t destCapacity, Edits *edits, + UErrorCode &errorCode); + +#ifndef U_HIDE_DRAFT_API + /** + * Lowercases a UTF-8 string and optionally records edits. + * Casing is locale-dependent and context-sensitive. + * The result may be longer or shorter than the original. + * + * @param locale The locale ID. ("" = root locale, NULL = default locale.) + * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. + * @param src The original string. + * @param sink A ByteSink to which the result string is written. + * sink.Flush() is called at the end. + * @param edits Records edits for index mapping, working with styled text, + * and getting only changes (if any). + * The Edits contents is undefined if any error occurs. + * This function calls edits->reset() first unless + * options includes U_EDITS_NO_RESET. edits can be NULL. + * @param errorCode Reference to an in/out error code value + * which must not indicate a failure before the function call. + * + * @see ucasemap_utf8ToLower + * @draft ICU 60 + */ + static void utf8ToLower( + const char *locale, uint32_t options, + StringPiece src, ByteSink &sink, Edits *edits, + UErrorCode &errorCode); + + /** + * Uppercases a UTF-8 string and optionally records edits. + * Casing is locale-dependent and context-sensitive. + * The result may be longer or shorter than the original. + * + * @param locale The locale ID. ("" = root locale, NULL = default locale.) + * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. + * @param src The original string. + * @param sink A ByteSink to which the result string is written. + * sink.Flush() is called at the end. + * @param edits Records edits for index mapping, working with styled text, + * and getting only changes (if any). + * The Edits contents is undefined if any error occurs. + * This function calls edits->reset() first unless + * options includes U_EDITS_NO_RESET. edits can be NULL. + * @param errorCode Reference to an in/out error code value + * which must not indicate a failure before the function call. + * + * @see ucasemap_utf8ToUpper + * @draft ICU 60 + */ + static void utf8ToUpper( + const char *locale, uint32_t options, + StringPiece src, ByteSink &sink, Edits *edits, + UErrorCode &errorCode); + +#if !UCONFIG_NO_BREAK_ITERATION + + /** + * Titlecases a UTF-8 string and optionally records edits. + * Casing is locale-dependent and context-sensitive. + * The result may be longer or shorter than the original. + * + * Titlecasing uses a break iterator to find the first characters of words + * that are to be titlecased. It titlecases those characters and lowercases + * all others. (This can be modified with options bits.) + * + * @param locale The locale ID. ("" = root locale, NULL = default locale.) + * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT, U_EDITS_NO_RESET, + * U_TITLECASE_NO_LOWERCASE, + * U_TITLECASE_NO_BREAK_ADJUSTMENT, U_TITLECASE_ADJUST_TO_CASED, + * U_TITLECASE_WHOLE_STRING, U_TITLECASE_SENTENCES. + * @param iter A break iterator to find the first characters of words that are to be titlecased. + * It is set to the source string (setUText()) + * and used one or more times for iteration (first() and next()). + * If NULL, then a word break iterator for the locale is used + * (or something equivalent). + * @param src The original string. + * @param sink A ByteSink to which the result string is written. + * sink.Flush() is called at the end. + * @param edits Records edits for index mapping, working with styled text, + * and getting only changes (if any). + * The Edits contents is undefined if any error occurs. + * This function calls edits->reset() first unless + * options includes U_EDITS_NO_RESET. edits can be NULL. + * @param errorCode Reference to an in/out error code value + * which must not indicate a failure before the function call. + * + * @see ucasemap_utf8ToTitle + * @draft ICU 60 + */ + static void utf8ToTitle( + const char *locale, uint32_t options, BreakIterator *iter, + StringPiece src, ByteSink &sink, Edits *edits, + UErrorCode &errorCode); + +#endif // UCONFIG_NO_BREAK_ITERATION + + /** + * Case-folds a UTF-8 string and optionally records edits. + * + * Case folding is locale-independent and not context-sensitive, + * but there is an option for whether to include or exclude mappings for dotted I + * and dotless i that are marked with 'T' in CaseFolding.txt. + * + * The result may be longer or shorter than the original. + * + * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. + * @param src The original string. + * @param sink A ByteSink to which the result string is written. + * sink.Flush() is called at the end. + * @param edits Records edits for index mapping, working with styled text, + * and getting only changes (if any). + * The Edits contents is undefined if any error occurs. + * This function calls edits->reset() first unless + * options includes U_EDITS_NO_RESET. edits can be NULL. + * @param errorCode Reference to an in/out error code value + * which must not indicate a failure before the function call. + * + * @see ucasemap_utf8FoldCase + * @draft ICU 60 + */ + static void utf8Fold( + uint32_t options, + StringPiece src, ByteSink &sink, Edits *edits, + UErrorCode &errorCode); +#endif // U_HIDE_DRAFT_API + + /** + * Lowercases a UTF-8 string and optionally records edits. + * Casing is locale-dependent and context-sensitive. + * The result may be longer or shorter than the original. + * The source string and the destination buffer must not overlap. + * + * @param locale The locale ID. ("" = root locale, NULL = default locale.) + * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. + * @param src The original string. + * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. + * @param dest A buffer for the result string. The result will be NUL-terminated if + * the buffer is large enough. + * The contents is undefined in case of failure. + * @param destCapacity The size of the buffer (number of bytes). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param edits Records edits for index mapping, working with styled text, + * and getting only changes (if any). + * The Edits contents is undefined if any error occurs. + * This function calls edits->reset() first unless + * options includes U_EDITS_NO_RESET. edits can be NULL. + * @param errorCode Reference to an in/out error code value + * which must not indicate a failure before the function call. + * @return The length of the result string, if successful. + * When the result would be longer than destCapacity, + * the full length is returned and a U_BUFFER_OVERFLOW_ERROR is set. + * + * @see ucasemap_utf8ToLower + * @stable ICU 59 + */ + static int32_t utf8ToLower( + const char *locale, uint32_t options, + const char *src, int32_t srcLength, + char *dest, int32_t destCapacity, Edits *edits, + UErrorCode &errorCode); + + /** + * Uppercases a UTF-8 string and optionally records edits. + * Casing is locale-dependent and context-sensitive. + * The result may be longer or shorter than the original. + * The source string and the destination buffer must not overlap. + * + * @param locale The locale ID. ("" = root locale, NULL = default locale.) + * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. + * @param src The original string. + * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. + * @param dest A buffer for the result string. The result will be NUL-terminated if + * the buffer is large enough. + * The contents is undefined in case of failure. + * @param destCapacity The size of the buffer (number of bytes). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param edits Records edits for index mapping, working with styled text, + * and getting only changes (if any). + * The Edits contents is undefined if any error occurs. + * This function calls edits->reset() first unless + * options includes U_EDITS_NO_RESET. edits can be NULL. + * @param errorCode Reference to an in/out error code value + * which must not indicate a failure before the function call. + * @return The length of the result string, if successful. + * When the result would be longer than destCapacity, + * the full length is returned and a U_BUFFER_OVERFLOW_ERROR is set. + * + * @see ucasemap_utf8ToUpper + * @stable ICU 59 + */ + static int32_t utf8ToUpper( + const char *locale, uint32_t options, + const char *src, int32_t srcLength, + char *dest, int32_t destCapacity, Edits *edits, + UErrorCode &errorCode); + +#if !UCONFIG_NO_BREAK_ITERATION + + /** + * Titlecases a UTF-8 string and optionally records edits. + * Casing is locale-dependent and context-sensitive. + * The result may be longer or shorter than the original. + * The source string and the destination buffer must not overlap. + * + * Titlecasing uses a break iterator to find the first characters of words + * that are to be titlecased. It titlecases those characters and lowercases + * all others. (This can be modified with options bits.) + * + * @param locale The locale ID. ("" = root locale, NULL = default locale.) + * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT, U_EDITS_NO_RESET, + * U_TITLECASE_NO_LOWERCASE, + * U_TITLECASE_NO_BREAK_ADJUSTMENT, U_TITLECASE_ADJUST_TO_CASED, + * U_TITLECASE_WHOLE_STRING, U_TITLECASE_SENTENCES. + * @param iter A break iterator to find the first characters of words that are to be titlecased. + * It is set to the source string (setUText()) + * and used one or more times for iteration (first() and next()). + * If NULL, then a word break iterator for the locale is used + * (or something equivalent). + * @param src The original string. + * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. + * @param dest A buffer for the result string. The result will be NUL-terminated if + * the buffer is large enough. + * The contents is undefined in case of failure. + * @param destCapacity The size of the buffer (number of bytes). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param edits Records edits for index mapping, working with styled text, + * and getting only changes (if any). + * The Edits contents is undefined if any error occurs. + * This function calls edits->reset() first unless + * options includes U_EDITS_NO_RESET. edits can be NULL. + * @param errorCode Reference to an in/out error code value + * which must not indicate a failure before the function call. + * @return The length of the result string, if successful. + * When the result would be longer than destCapacity, + * the full length is returned and a U_BUFFER_OVERFLOW_ERROR is set. + * + * @see ucasemap_utf8ToTitle + * @stable ICU 59 + */ + static int32_t utf8ToTitle( + const char *locale, uint32_t options, BreakIterator *iter, + const char *src, int32_t srcLength, + char *dest, int32_t destCapacity, Edits *edits, + UErrorCode &errorCode); + +#endif // UCONFIG_NO_BREAK_ITERATION + + /** + * Case-folds a UTF-8 string and optionally records edits. + * + * Case folding is locale-independent and not context-sensitive, + * but there is an option for whether to include or exclude mappings for dotted I + * and dotless i that are marked with 'T' in CaseFolding.txt. + * + * The result may be longer or shorter than the original. + * The source string and the destination buffer must not overlap. + * + * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT, U_EDITS_NO_RESET, + * U_FOLD_CASE_DEFAULT, U_FOLD_CASE_EXCLUDE_SPECIAL_I. + * @param src The original string. + * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. + * @param dest A buffer for the result string. The result will be NUL-terminated if + * the buffer is large enough. + * The contents is undefined in case of failure. + * @param destCapacity The size of the buffer (number of bytes). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param edits Records edits for index mapping, working with styled text, + * and getting only changes (if any). + * The Edits contents is undefined if any error occurs. + * This function calls edits->reset() first unless + * options includes U_EDITS_NO_RESET. edits can be NULL. + * @param errorCode Reference to an in/out error code value + * which must not indicate a failure before the function call. + * @return The length of the result string, if successful. + * When the result would be longer than destCapacity, + * the full length is returned and a U_BUFFER_OVERFLOW_ERROR is set. + * + * @see ucasemap_utf8FoldCase + * @stable ICU 59 + */ + static int32_t utf8Fold( + uint32_t options, + const char *src, int32_t srcLength, + char *dest, int32_t destCapacity, Edits *edits, + UErrorCode &errorCode); + +private: + CaseMap() = delete; + CaseMap(const CaseMap &other) = delete; + CaseMap &operator=(const CaseMap &other) = delete; +}; + +U_NAMESPACE_END + +#endif // __CASEMAP_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/char16ptr.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/char16ptr.h new file mode 100755 index 00000000..49d0e029 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/char16ptr.h @@ -0,0 +1,302 @@ +// © 2017 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +// char16ptr.h +// created: 2017feb28 Markus W. Scherer + +#ifndef __CHAR16PTR_H__ +#define __CHAR16PTR_H__ + +#include <cstddef> +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: char16_t pointer wrappers with + * implicit conversion from bit-compatible raw pointer types. + * Also conversion functions from char16_t * to UChar * and OldUChar *. + */ + +U_NAMESPACE_BEGIN + +/** + * \def U_ALIASING_BARRIER + * Barrier for pointer anti-aliasing optimizations even across function boundaries. + * @internal + */ +#ifdef U_ALIASING_BARRIER + // Use the predefined value. +#elif (defined(__clang__) || defined(__GNUC__)) && U_PLATFORM != U_PF_BROWSER_NATIVE_CLIENT +# define U_ALIASING_BARRIER(ptr) asm volatile("" : : "rm"(ptr) : "memory") +#endif + +/** + * char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types. + * @stable ICU 59 + */ +class U_COMMON_API Char16Ptr U_FINAL { +public: + /** + * Copies the pointer. + * @param p pointer + * @stable ICU 59 + */ + inline Char16Ptr(char16_t *p); +#if !U_CHAR16_IS_TYPEDEF + /** + * Converts the pointer to char16_t *. + * @param p pointer to be converted + * @stable ICU 59 + */ + inline Char16Ptr(uint16_t *p); +#endif +#if U_SIZEOF_WCHAR_T==2 || defined(U_IN_DOXYGEN) + /** + * Converts the pointer to char16_t *. + * (Only defined if U_SIZEOF_WCHAR_T==2.) + * @param p pointer to be converted + * @stable ICU 59 + */ + inline Char16Ptr(wchar_t *p); +#endif + /** + * nullptr constructor. + * @param p nullptr + * @stable ICU 59 + */ + inline Char16Ptr(std::nullptr_t p); + /** + * Destructor. + * @stable ICU 59 + */ + inline ~Char16Ptr(); + + /** + * Pointer access. + * @return the wrapped pointer + * @stable ICU 59 + */ + inline char16_t *get() const; + /** + * char16_t pointer access via type conversion (e.g., static_cast). + * @return the wrapped pointer + * @stable ICU 59 + */ + inline operator char16_t *() const { return get(); } + +private: + Char16Ptr() = delete; + +#ifdef U_ALIASING_BARRIER + template<typename T> static char16_t *cast(T *t) { + U_ALIASING_BARRIER(t); + return reinterpret_cast<char16_t *>(t); + } + + char16_t *p_; +#else + union { + char16_t *cp; + uint16_t *up; + wchar_t *wp; + } u_; +#endif +}; + +#ifdef U_ALIASING_BARRIER + +Char16Ptr::Char16Ptr(char16_t *p) : p_(p) {} +#if !U_CHAR16_IS_TYPEDEF +Char16Ptr::Char16Ptr(uint16_t *p) : p_(cast(p)) {} +#endif +#if U_SIZEOF_WCHAR_T==2 +Char16Ptr::Char16Ptr(wchar_t *p) : p_(cast(p)) {} +#endif +Char16Ptr::Char16Ptr(std::nullptr_t p) : p_(p) {} +Char16Ptr::~Char16Ptr() { + U_ALIASING_BARRIER(p_); +} + +char16_t *Char16Ptr::get() const { return p_; } + +#else + +Char16Ptr::Char16Ptr(char16_t *p) { u_.cp = p; } +#if !U_CHAR16_IS_TYPEDEF +Char16Ptr::Char16Ptr(uint16_t *p) { u_.up = p; } +#endif +#if U_SIZEOF_WCHAR_T==2 +Char16Ptr::Char16Ptr(wchar_t *p) { u_.wp = p; } +#endif +Char16Ptr::Char16Ptr(std::nullptr_t p) { u_.cp = p; } +Char16Ptr::~Char16Ptr() {} + +char16_t *Char16Ptr::get() const { return u_.cp; } + +#endif + +/** + * const char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types. + * @stable ICU 59 + */ +class U_COMMON_API ConstChar16Ptr U_FINAL { +public: + /** + * Copies the pointer. + * @param p pointer + * @stable ICU 59 + */ + inline ConstChar16Ptr(const char16_t *p); +#if !U_CHAR16_IS_TYPEDEF + /** + * Converts the pointer to char16_t *. + * @param p pointer to be converted + * @stable ICU 59 + */ + inline ConstChar16Ptr(const uint16_t *p); +#endif +#if U_SIZEOF_WCHAR_T==2 || defined(U_IN_DOXYGEN) + /** + * Converts the pointer to char16_t *. + * (Only defined if U_SIZEOF_WCHAR_T==2.) + * @param p pointer to be converted + * @stable ICU 59 + */ + inline ConstChar16Ptr(const wchar_t *p); +#endif + /** + * nullptr constructor. + * @param p nullptr + * @stable ICU 59 + */ + inline ConstChar16Ptr(const std::nullptr_t p); + + /** + * Destructor. + * @stable ICU 59 + */ + inline ~ConstChar16Ptr(); + + /** + * Pointer access. + * @return the wrapped pointer + * @stable ICU 59 + */ + inline const char16_t *get() const; + /** + * char16_t pointer access via type conversion (e.g., static_cast). + * @return the wrapped pointer + * @stable ICU 59 + */ + inline operator const char16_t *() const { return get(); } + +private: + ConstChar16Ptr() = delete; + +#ifdef U_ALIASING_BARRIER + template<typename T> static const char16_t *cast(const T *t) { + U_ALIASING_BARRIER(t); + return reinterpret_cast<const char16_t *>(t); + } + + const char16_t *p_; +#else + union { + const char16_t *cp; + const uint16_t *up; + const wchar_t *wp; + } u_; +#endif +}; + +#ifdef U_ALIASING_BARRIER + +ConstChar16Ptr::ConstChar16Ptr(const char16_t *p) : p_(p) {} +#if !U_CHAR16_IS_TYPEDEF +ConstChar16Ptr::ConstChar16Ptr(const uint16_t *p) : p_(cast(p)) {} +#endif +#if U_SIZEOF_WCHAR_T==2 +ConstChar16Ptr::ConstChar16Ptr(const wchar_t *p) : p_(cast(p)) {} +#endif +ConstChar16Ptr::ConstChar16Ptr(const std::nullptr_t p) : p_(p) {} +ConstChar16Ptr::~ConstChar16Ptr() { + U_ALIASING_BARRIER(p_); +} + +const char16_t *ConstChar16Ptr::get() const { return p_; } + +#else + +ConstChar16Ptr::ConstChar16Ptr(const char16_t *p) { u_.cp = p; } +#if !U_CHAR16_IS_TYPEDEF +ConstChar16Ptr::ConstChar16Ptr(const uint16_t *p) { u_.up = p; } +#endif +#if U_SIZEOF_WCHAR_T==2 +ConstChar16Ptr::ConstChar16Ptr(const wchar_t *p) { u_.wp = p; } +#endif +ConstChar16Ptr::ConstChar16Ptr(const std::nullptr_t p) { u_.cp = p; } +ConstChar16Ptr::~ConstChar16Ptr() {} + +const char16_t *ConstChar16Ptr::get() const { return u_.cp; } + +#endif + +/** + * Converts from const char16_t * to const UChar *. + * Includes an aliasing barrier if available. + * @param p pointer + * @return p as const UChar * + * @stable ICU 59 + */ +inline const UChar *toUCharPtr(const char16_t *p) { +#ifdef U_ALIASING_BARRIER + U_ALIASING_BARRIER(p); +#endif + return reinterpret_cast<const UChar *>(p); +} + +/** + * Converts from char16_t * to UChar *. + * Includes an aliasing barrier if available. + * @param p pointer + * @return p as UChar * + * @stable ICU 59 + */ +inline UChar *toUCharPtr(char16_t *p) { +#ifdef U_ALIASING_BARRIER + U_ALIASING_BARRIER(p); +#endif + return reinterpret_cast<UChar *>(p); +} + +/** + * Converts from const char16_t * to const OldUChar *. + * Includes an aliasing barrier if available. + * @param p pointer + * @return p as const OldUChar * + * @stable ICU 59 + */ +inline const OldUChar *toOldUCharPtr(const char16_t *p) { +#ifdef U_ALIASING_BARRIER + U_ALIASING_BARRIER(p); +#endif + return reinterpret_cast<const OldUChar *>(p); +} + +/** + * Converts from char16_t * to OldUChar *. + * Includes an aliasing barrier if available. + * @param p pointer + * @return p as OldUChar * + * @stable ICU 59 + */ +inline OldUChar *toOldUCharPtr(char16_t *p) { +#ifdef U_ALIASING_BARRIER + U_ALIASING_BARRIER(p); +#endif + return reinterpret_cast<OldUChar *>(p); +} + +U_NAMESPACE_END + +#endif // __CHAR16PTR_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/chariter.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/chariter.h new file mode 100755 index 00000000..70d7a248 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/chariter.h @@ -0,0 +1,728 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************** +* +* Copyright (C) 1997-2011, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************** +*/ + +#ifndef CHARITER_H +#define CHARITER_H + +#include "unicode/utypes.h" +#include "unicode/uobject.h" +#include "unicode/unistr.h" +/** + * \file + * \brief C++ API: Character Iterator + */ + +U_NAMESPACE_BEGIN +/** + * Abstract class that defines an API for forward-only iteration + * on text objects. + * This is a minimal interface for iteration without random access + * or backwards iteration. It is especially useful for wrapping + * streams with converters into an object for collation or + * normalization. + * + * <p>Characters can be accessed in two ways: as code units or as + * code points. + * Unicode code points are 21-bit integers and are the scalar values + * of Unicode characters. ICU uses the type UChar32 for them. + * Unicode code units are the storage units of a given + * Unicode/UCS Transformation Format (a character encoding scheme). + * With UTF-16, all code points can be represented with either one + * or two code units ("surrogates"). + * String storage is typically based on code units, while properties + * of characters are typically determined using code point values. + * Some processes may be designed to work with sequences of code units, + * or it may be known that all characters that are important to an + * algorithm can be represented with single code units. + * Other processes will need to use the code point access functions.</p> + * + * <p>ForwardCharacterIterator provides nextPostInc() to access + * a code unit and advance an internal position into the text object, + * similar to a <code>return text[position++]</code>.<br> + * It provides next32PostInc() to access a code point and advance an internal + * position.</p> + * + * <p>next32PostInc() assumes that the current position is that of + * the beginning of a code point, i.e., of its first code unit. + * After next32PostInc(), this will be true again. + * In general, access to code units and code points in the same + * iteration loop should not be mixed. In UTF-16, if the current position + * is on a second code unit (Low Surrogate), then only that code unit + * is returned even by next32PostInc().</p> + * + * <p>For iteration with either function, there are two ways to + * check for the end of the iteration. When there are no more + * characters in the text object: + * <ul> + * <li>The hasNext() function returns FALSE.</li> + * <li>nextPostInc() and next32PostInc() return DONE + * when one attempts to read beyond the end of the text object.</li> + * </ul> + * + * Example: + * \code + * void function1(ForwardCharacterIterator &it) { + * UChar32 c; + * while(it.hasNext()) { + * c=it.next32PostInc(); + * // use c + * } + * } + * + * void function1(ForwardCharacterIterator &it) { + * char16_t c; + * while((c=it.nextPostInc())!=ForwardCharacterIterator::DONE) { + * // use c + * } + * } + * \endcode + * </p> + * + * @stable ICU 2.0 + */ +class U_COMMON_API ForwardCharacterIterator : public UObject { +public: + /** + * Value returned by most of ForwardCharacterIterator's functions + * when the iterator has reached the limits of its iteration. + * @stable ICU 2.0 + */ + enum { DONE = 0xffff }; + + /** + * Destructor. + * @stable ICU 2.0 + */ + virtual ~ForwardCharacterIterator(); + + /** + * Returns true when both iterators refer to the same + * character in the same character-storage object. + * @param that The ForwardCharacterIterator to be compared for equality + * @return true when both iterators refer to the same + * character in the same character-storage object + * @stable ICU 2.0 + */ + virtual UBool operator==(const ForwardCharacterIterator& that) const = 0; + + /** + * Returns true when the iterators refer to different + * text-storage objects, or to different characters in the + * same text-storage object. + * @param that The ForwardCharacterIterator to be compared for inequality + * @return true when the iterators refer to different + * text-storage objects, or to different characters in the + * same text-storage object + * @stable ICU 2.0 + */ + inline UBool operator!=(const ForwardCharacterIterator& that) const; + + /** + * Generates a hash code for this iterator. + * @return the hash code. + * @stable ICU 2.0 + */ + virtual int32_t hashCode(void) const = 0; + + /** + * Returns a UClassID for this ForwardCharacterIterator ("poor man's + * RTTI").<P> Despite the fact that this function is public, + * DO NOT CONSIDER IT PART OF CHARACTERITERATOR'S API! + * @return a UClassID for this ForwardCharacterIterator + * @stable ICU 2.0 + */ + virtual UClassID getDynamicClassID(void) const = 0; + + /** + * Gets the current code unit for returning and advances to the next code unit + * in the iteration range + * (toward endIndex()). If there are + * no more code units to return, returns DONE. + * @return the current code unit. + * @stable ICU 2.0 + */ + virtual char16_t nextPostInc(void) = 0; + + /** + * Gets the current code point for returning and advances to the next code point + * in the iteration range + * (toward endIndex()). If there are + * no more code points to return, returns DONE. + * @return the current code point. + * @stable ICU 2.0 + */ + virtual UChar32 next32PostInc(void) = 0; + + /** + * Returns FALSE if there are no more code units or code points + * at or after the current position in the iteration range. + * This is used with nextPostInc() or next32PostInc() in forward + * iteration. + * @returns FALSE if there are no more code units or code points + * at or after the current position in the iteration range. + * @stable ICU 2.0 + */ + virtual UBool hasNext() = 0; + +protected: + /** Default constructor to be overridden in the implementing class. @stable ICU 2.0*/ + ForwardCharacterIterator(); + + /** Copy constructor to be overridden in the implementing class. @stable ICU 2.0*/ + ForwardCharacterIterator(const ForwardCharacterIterator &other); + + /** + * Assignment operator to be overridden in the implementing class. + * @stable ICU 2.0 + */ + ForwardCharacterIterator &operator=(const ForwardCharacterIterator&) { return *this; } +}; + +/** + * Abstract class that defines an API for iteration + * on text objects. + * This is an interface for forward and backward iteration + * and random access into a text object. + * + * <p>The API provides backward compatibility to the Java and older ICU + * CharacterIterator classes but extends them significantly: + * <ol> + * <li>CharacterIterator is now a subclass of ForwardCharacterIterator.</li> + * <li>While the old API functions provided forward iteration with + * "pre-increment" semantics, the new one also provides functions + * with "post-increment" semantics. They are more efficient and should + * be the preferred iterator functions for new implementations. + * The backward iteration always had "pre-decrement" semantics, which + * are efficient.</li> + * <li>Just like ForwardCharacterIterator, it provides access to + * both code units and code points. Code point access versions are available + * for the old and the new iteration semantics.</li> + * <li>There are new functions for setting and moving the current position + * without returning a character, for efficiency.</li> + * </ol> + * + * See ForwardCharacterIterator for examples for using the new forward iteration + * functions. For backward iteration, there is also a hasPrevious() function + * that can be used analogously to hasNext(). + * The old functions work as before and are shown below.</p> + * + * <p>Examples for some of the new functions:</p> + * + * Forward iteration with hasNext(): + * \code + * void forward1(CharacterIterator &it) { + * UChar32 c; + * for(it.setToStart(); it.hasNext();) { + * c=it.next32PostInc(); + * // use c + * } + * } + * \endcode + * Forward iteration more similar to loops with the old forward iteration, + * showing a way to convert simple for() loops: + * \code + * void forward2(CharacterIterator &it) { + * char16_t c; + * for(c=it.firstPostInc(); c!=CharacterIterator::DONE; c=it.nextPostInc()) { + * // use c + * } + * } + * \endcode + * Backward iteration with setToEnd() and hasPrevious(): + * \code + * void backward1(CharacterIterator &it) { + * UChar32 c; + * for(it.setToEnd(); it.hasPrevious();) { + * c=it.previous32(); + * // use c + * } + * } + * \endcode + * Backward iteration with a more traditional for() loop: + * \code + * void backward2(CharacterIterator &it) { + * char16_t c; + * for(c=it.last(); c!=CharacterIterator::DONE; c=it.previous()) { + * // use c + * } + * } + * \endcode + * + * Example for random access: + * \code + * void random(CharacterIterator &it) { + * // set to the third code point from the beginning + * it.move32(3, CharacterIterator::kStart); + * // get a code point from here without moving the position + * UChar32 c=it.current32(); + * // get the position + * int32_t pos=it.getIndex(); + * // get the previous code unit + * char16_t u=it.previous(); + * // move back one more code unit + * it.move(-1, CharacterIterator::kCurrent); + * // set the position back to where it was + * // and read the same code point c and move beyond it + * it.setIndex(pos); + * if(c!=it.next32PostInc()) { + * exit(1); // CharacterIterator inconsistent + * } + * } + * \endcode + * + * <p>Examples, especially for the old API:</p> + * + * Function processing characters, in this example simple output + * <pre> + * \code + * void processChar( char16_t c ) + * { + * cout << " " << c; + * } + * \endcode + * </pre> + * Traverse the text from start to finish + * <pre> + * \code + * void traverseForward(CharacterIterator& iter) + * { + * for(char16_t c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) { + * processChar(c); + * } + * } + * \endcode + * </pre> + * Traverse the text backwards, from end to start + * <pre> + * \code + * void traverseBackward(CharacterIterator& iter) + * { + * for(char16_t c = iter.last(); c != CharacterIterator.DONE; c = iter.previous()) { + * processChar(c); + * } + * } + * \endcode + * </pre> + * Traverse both forward and backward from a given position in the text. + * Calls to notBoundary() in this example represents some additional stopping criteria. + * <pre> + * \code + * void traverseOut(CharacterIterator& iter, int32_t pos) + * { + * char16_t c; + * for (c = iter.setIndex(pos); + * c != CharacterIterator.DONE && (Unicode::isLetter(c) || Unicode::isDigit(c)); + * c = iter.next()) {} + * int32_t end = iter.getIndex(); + * for (c = iter.setIndex(pos); + * c != CharacterIterator.DONE && (Unicode::isLetter(c) || Unicode::isDigit(c)); + * c = iter.previous()) {} + * int32_t start = iter.getIndex() + 1; + * + * cout << "start: " << start << " end: " << end << endl; + * for (c = iter.setIndex(start); iter.getIndex() < end; c = iter.next() ) { + * processChar(c); + * } + * } + * \endcode + * </pre> + * Creating a StringCharacterIterator and calling the test functions + * <pre> + * \code + * void CharacterIterator_Example( void ) + * { + * cout << endl << "===== CharacterIterator_Example: =====" << endl; + * UnicodeString text("Ein kleiner Satz."); + * StringCharacterIterator iterator(text); + * cout << "----- traverseForward: -----------" << endl; + * traverseForward( iterator ); + * cout << endl << endl << "----- traverseBackward: ----------" << endl; + * traverseBackward( iterator ); + * cout << endl << endl << "----- traverseOut: ---------------" << endl; + * traverseOut( iterator, 7 ); + * cout << endl << endl << "-----" << endl; + * } + * \endcode + * </pre> + * + * @stable ICU 2.0 + */ +class U_COMMON_API CharacterIterator : public ForwardCharacterIterator { +public: + /** + * Origin enumeration for the move() and move32() functions. + * @stable ICU 2.0 + */ + enum EOrigin { kStart, kCurrent, kEnd }; + + /** + * Destructor. + * @stable ICU 2.0 + */ + virtual ~CharacterIterator(); + + /** + * Returns a pointer to a new CharacterIterator of the same + * concrete class as this one, and referring to the same + * character in the same text-storage object as this one. The + * caller is responsible for deleting the new clone. + * @return a pointer to a new CharacterIterator + * @stable ICU 2.0 + */ + virtual CharacterIterator* clone(void) const = 0; + + /** + * Sets the iterator to refer to the first code unit in its + * iteration range, and returns that code unit. + * This can be used to begin an iteration with next(). + * @return the first code unit in its iteration range. + * @stable ICU 2.0 + */ + virtual char16_t first(void) = 0; + + /** + * Sets the iterator to refer to the first code unit in its + * iteration range, returns that code unit, and moves the position + * to the second code unit. This is an alternative to setToStart() + * for forward iteration with nextPostInc(). + * @return the first code unit in its iteration range. + * @stable ICU 2.0 + */ + virtual char16_t firstPostInc(void); + + /** + * Sets the iterator to refer to the first code point in its + * iteration range, and returns that code unit, + * This can be used to begin an iteration with next32(). + * Note that an iteration with next32PostInc(), beginning with, + * e.g., setToStart() or firstPostInc(), is more efficient. + * @return the first code point in its iteration range. + * @stable ICU 2.0 + */ + virtual UChar32 first32(void) = 0; + + /** + * Sets the iterator to refer to the first code point in its + * iteration range, returns that code point, and moves the position + * to the second code point. This is an alternative to setToStart() + * for forward iteration with next32PostInc(). + * @return the first code point in its iteration range. + * @stable ICU 2.0 + */ + virtual UChar32 first32PostInc(void); + + /** + * Sets the iterator to refer to the first code unit or code point in its + * iteration range. This can be used to begin a forward + * iteration with nextPostInc() or next32PostInc(). + * @return the start position of the iteration range + * @stable ICU 2.0 + */ + inline int32_t setToStart(); + + /** + * Sets the iterator to refer to the last code unit in its + * iteration range, and returns that code unit. + * This can be used to begin an iteration with previous(). + * @return the last code unit. + * @stable ICU 2.0 + */ + virtual char16_t last(void) = 0; + + /** + * Sets the iterator to refer to the last code point in its + * iteration range, and returns that code unit. + * This can be used to begin an iteration with previous32(). + * @return the last code point. + * @stable ICU 2.0 + */ + virtual UChar32 last32(void) = 0; + + /** + * Sets the iterator to the end of its iteration range, just behind + * the last code unit or code point. This can be used to begin a backward + * iteration with previous() or previous32(). + * @return the end position of the iteration range + * @stable ICU 2.0 + */ + inline int32_t setToEnd(); + + /** + * Sets the iterator to refer to the "position"-th code unit + * in the text-storage object the iterator refers to, and + * returns that code unit. + * @param position the "position"-th code unit in the text-storage object + * @return the "position"-th code unit. + * @stable ICU 2.0 + */ + virtual char16_t setIndex(int32_t position) = 0; + + /** + * Sets the iterator to refer to the beginning of the code point + * that contains the "position"-th code unit + * in the text-storage object the iterator refers to, and + * returns that code point. + * The current position is adjusted to the beginning of the code point + * (its first code unit). + * @param position the "position"-th code unit in the text-storage object + * @return the "position"-th code point. + * @stable ICU 2.0 + */ + virtual UChar32 setIndex32(int32_t position) = 0; + + /** + * Returns the code unit the iterator currently refers to. + * @return the current code unit. + * @stable ICU 2.0 + */ + virtual char16_t current(void) const = 0; + + /** + * Returns the code point the iterator currently refers to. + * @return the current code point. + * @stable ICU 2.0 + */ + virtual UChar32 current32(void) const = 0; + + /** + * Advances to the next code unit in the iteration range + * (toward endIndex()), and returns that code unit. If there are + * no more code units to return, returns DONE. + * @return the next code unit. + * @stable ICU 2.0 + */ + virtual char16_t next(void) = 0; + + /** + * Advances to the next code point in the iteration range + * (toward endIndex()), and returns that code point. If there are + * no more code points to return, returns DONE. + * Note that iteration with "pre-increment" semantics is less + * efficient than iteration with "post-increment" semantics + * that is provided by next32PostInc(). + * @return the next code point. + * @stable ICU 2.0 + */ + virtual UChar32 next32(void) = 0; + + /** + * Advances to the previous code unit in the iteration range + * (toward startIndex()), and returns that code unit. If there are + * no more code units to return, returns DONE. + * @return the previous code unit. + * @stable ICU 2.0 + */ + virtual char16_t previous(void) = 0; + + /** + * Advances to the previous code point in the iteration range + * (toward startIndex()), and returns that code point. If there are + * no more code points to return, returns DONE. + * @return the previous code point. + * @stable ICU 2.0 + */ + virtual UChar32 previous32(void) = 0; + + /** + * Returns FALSE if there are no more code units or code points + * before the current position in the iteration range. + * This is used with previous() or previous32() in backward + * iteration. + * @return FALSE if there are no more code units or code points + * before the current position in the iteration range, return TRUE otherwise. + * @stable ICU 2.0 + */ + virtual UBool hasPrevious() = 0; + + /** + * Returns the numeric index in the underlying text-storage + * object of the character returned by first(). Since it's + * possible to create an iterator that iterates across only + * part of a text-storage object, this number isn't + * necessarily 0. + * @returns the numeric index in the underlying text-storage + * object of the character returned by first(). + * @stable ICU 2.0 + */ + inline int32_t startIndex(void) const; + + /** + * Returns the numeric index in the underlying text-storage + * object of the position immediately BEYOND the character + * returned by last(). + * @return the numeric index in the underlying text-storage + * object of the position immediately BEYOND the character + * returned by last(). + * @stable ICU 2.0 + */ + inline int32_t endIndex(void) const; + + /** + * Returns the numeric index in the underlying text-storage + * object of the character the iterator currently refers to + * (i.e., the character returned by current()). + * @return the numeric index in the text-storage object of + * the character the iterator currently refers to + * @stable ICU 2.0 + */ + inline int32_t getIndex(void) const; + + /** + * Returns the length of the entire text in the underlying + * text-storage object. + * @return the length of the entire text in the text-storage object + * @stable ICU 2.0 + */ + inline int32_t getLength() const; + + /** + * Moves the current position relative to the start or end of the + * iteration range, or relative to the current position itself. + * The movement is expressed in numbers of code units forward + * or backward by specifying a positive or negative delta. + * @param delta the position relative to origin. A positive delta means forward; + * a negative delta means backward. + * @param origin Origin enumeration {kStart, kCurrent, kEnd} + * @return the new position + * @stable ICU 2.0 + */ + virtual int32_t move(int32_t delta, EOrigin origin) = 0; + + /** + * Moves the current position relative to the start or end of the + * iteration range, or relative to the current position itself. + * The movement is expressed in numbers of code points forward + * or backward by specifying a positive or negative delta. + * @param delta the position relative to origin. A positive delta means forward; + * a negative delta means backward. + * @param origin Origin enumeration {kStart, kCurrent, kEnd} + * @return the new position + * @stable ICU 2.0 + */ +#ifdef move32 + // One of the system headers right now is sometimes defining a conflicting macro we don't use +#undef move32 +#endif + virtual int32_t move32(int32_t delta, EOrigin origin) = 0; + + /** + * Copies the text under iteration into the UnicodeString + * referred to by "result". + * @param result Receives a copy of the text under iteration. + * @stable ICU 2.0 + */ + virtual void getText(UnicodeString& result) = 0; + +protected: + /** + * Empty constructor. + * @stable ICU 2.0 + */ + CharacterIterator(); + + /** + * Constructor, just setting the length field in this base class. + * @stable ICU 2.0 + */ + CharacterIterator(int32_t length); + + /** + * Constructor, just setting the length and position fields in this base class. + * @stable ICU 2.0 + */ + CharacterIterator(int32_t length, int32_t position); + + /** + * Constructor, just setting the length, start, end, and position fields in this base class. + * @stable ICU 2.0 + */ + CharacterIterator(int32_t length, int32_t textBegin, int32_t textEnd, int32_t position); + + /** + * Copy constructor. + * + * @param that The CharacterIterator to be copied + * @stable ICU 2.0 + */ + CharacterIterator(const CharacterIterator &that); + + /** + * Assignment operator. Sets this CharacterIterator to have the same behavior, + * as the one passed in. + * @param that The CharacterIterator passed in. + * @return the newly set CharacterIterator. + * @stable ICU 2.0 + */ + CharacterIterator &operator=(const CharacterIterator &that); + + /** + * Base class text length field. + * Necessary this for correct getText() and hashCode(). + * @stable ICU 2.0 + */ + int32_t textLength; + + /** + * Base class field for the current position. + * @stable ICU 2.0 + */ + int32_t pos; + + /** + * Base class field for the start of the iteration range. + * @stable ICU 2.0 + */ + int32_t begin; + + /** + * Base class field for the end of the iteration range. + * @stable ICU 2.0 + */ + int32_t end; +}; + +inline UBool +ForwardCharacterIterator::operator!=(const ForwardCharacterIterator& that) const { + return !operator==(that); +} + +inline int32_t +CharacterIterator::setToStart() { + return move(0, kStart); +} + +inline int32_t +CharacterIterator::setToEnd() { + return move(0, kEnd); +} + +inline int32_t +CharacterIterator::startIndex(void) const { + return begin; +} + +inline int32_t +CharacterIterator::endIndex(void) const { + return end; +} + +inline int32_t +CharacterIterator::getIndex(void) const { + return pos; +} + +inline int32_t +CharacterIterator::getLength(void) const { + return textLength; +} + +U_NAMESPACE_END +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/choicfmt.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/choicfmt.h new file mode 100755 index 00000000..c9f0f111 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/choicfmt.h @@ -0,0 +1,596 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************** +* Copyright (C) 1997-2013, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************** +* +* File CHOICFMT.H +* +* Modification History: +* +* Date Name Description +* 02/19/97 aliu Converted from java. +* 03/20/97 helena Finished first cut of implementation and got rid +* of nextDouble/previousDouble and replaced with +* boolean array. +* 4/10/97 aliu Clean up. Modified to work on AIX. +* 8/6/97 nos Removed overloaded constructor, member var 'buffer'. +* 07/22/98 stephen Removed operator!= (implemented in Format) +******************************************************************************** +*/ + +#ifndef CHOICFMT_H +#define CHOICFMT_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Choice Format. + */ + +#if !UCONFIG_NO_FORMATTING +#ifndef U_HIDE_DEPRECATED_API + +#include "unicode/fieldpos.h" +#include "unicode/format.h" +#include "unicode/messagepattern.h" +#include "unicode/numfmt.h" +#include "unicode/unistr.h" + +U_NAMESPACE_BEGIN + +class MessageFormat; + +/** + * ChoiceFormat converts between ranges of numeric values and strings for those ranges. + * The strings must conform to the MessageFormat pattern syntax. + * + * <p><em><code>ChoiceFormat</code> is probably not what you need. + * Please use <code>MessageFormat</code> + * with <code>plural</code> arguments for proper plural selection, + * and <code>select</code> arguments for simple selection among a fixed set of choices!</em></p> + * + * <p>A <code>ChoiceFormat</code> splits + * the real number line \htmlonly<code>-∞</code> to + * <code>+∞</code>\endhtmlonly into two + * or more contiguous ranges. Each range is mapped to a + * string.</p> + * + * <p><code>ChoiceFormat</code> was originally intended + * for displaying grammatically correct + * plurals such as "There is one file." vs. "There are 2 files." + * <em>However,</em> plural rules for many languages + * are too complex for the capabilities of ChoiceFormat, + * and its requirement of specifying the precise rules for each message + * is unmanageable for translators.</p> + * + * <p>There are two methods of defining a <code>ChoiceFormat</code>; both + * are equivalent. The first is by using a string pattern. This is the + * preferred method in most cases. The second method is through direct + * specification of the arrays that logically make up the + * <code>ChoiceFormat</code>.</p> + * + * <p>Note: Typically, choice formatting is done (if done at all) via <code>MessageFormat</code> + * with a <code>choice</code> argument type, + * rather than using a stand-alone <code>ChoiceFormat</code>.</p> + * + * <h5>Patterns and Their Interpretation</h5> + * + * <p>The pattern string defines the range boundaries and the strings for each number range. + * Syntax: + * <pre> + * choiceStyle = number separator message ('|' number separator message)* + * number = normal_number | ['-'] \htmlonly∞\endhtmlonly (U+221E, infinity) + * normal_number = double value (unlocalized ASCII string) + * separator = less_than | less_than_or_equal + * less_than = '<' + * less_than_or_equal = '#' | \htmlonly≤\endhtmlonly (U+2264) + * message: see {@link MessageFormat} + * </pre> + * Pattern_White_Space between syntax elements is ignored, except + * around each range's sub-message.</p> + * + * <p>Each numeric sub-range extends from the current range's number + * to the next range's number. + * The number itself is included in its range if a <code>less_than_or_equal</code> sign is used, + * and excluded from its range (and instead included in the previous range) + * if a <code>less_than</code> sign is used.</p> + * + * <p>When a <code>ChoiceFormat</code> is constructed from + * arrays of numbers, closure flags and strings, + * they are interpreted just like + * the sequence of <code>(number separator string)</code> in an equivalent pattern string. + * <code>closure[i]==TRUE</code> corresponds to a <code>less_than</code> separator sign. + * The equivalent pattern string will be constructed automatically.</p> + * + * <p>During formatting, a number is mapped to the first range + * where the number is not greater than the range's upper limit. + * That range's message string is returned. A NaN maps to the very first range.</p> + * + * <p>During parsing, a range is selected for the longest match of + * any range's message. That range's number is returned, ignoring the separator/closure. + * Only a simple string match is performed, without parsing of arguments that + * might be specified in the message strings.</p> + * + * <p>Note that the first range's number is ignored in formatting + * but may be returned from parsing.</p> + * + * <h5>Examples</h5> + * + * <p>Here is an example of two arrays that map the number + * <code>1..7</code> to the English day of the week abbreviations + * <code>Sun..Sat</code>. No closures array is given; this is the same as + * specifying all closures to be <code>FALSE</code>.</p> + * + * <pre> {1,2,3,4,5,6,7}, + * {"Sun","Mon","Tue","Wed","Thur","Fri","Sat"}</pre> + * + * <p>Here is an example that maps the ranges [-Inf, 1), [1, 1], and (1, + * +Inf] to three strings. That is, the number line is split into three + * ranges: x < 1.0, x = 1.0, and x > 1.0. + * (The round parentheses in the notation above indicate an exclusive boundary, + * like the turned bracket in European notation: [-Inf, 1) == [-Inf, 1[ )</p> + * + * <pre> {0, 1, 1}, + * {FALSE, FALSE, TRUE}, + * {"no files", "one file", "many files"}</pre> + * + * <p>Here is an example that shows formatting and parsing: </p> + * + * \code + * #include <unicode/choicfmt.h> + * #include <unicode/unistr.h> + * #include <iostream.h> + * + * int main(int argc, char *argv[]) { + * double limits[] = {1,2,3,4,5,6,7}; + * UnicodeString monthNames[] = { + * "Sun","Mon","Tue","Wed","Thu","Fri","Sat"}; + * ChoiceFormat fmt(limits, monthNames, 7); + * UnicodeString str; + * char buf[256]; + * for (double x = 1.0; x <= 8.0; x += 1.0) { + * fmt.format(x, str); + * str.extract(0, str.length(), buf, 256, ""); + * str.truncate(0); + * cout << x << " -> " + * << buf << endl; + * } + * cout << endl; + * return 0; + * } + * \endcode + * + * <p><em>User subclasses are not supported.</em> While clients may write + * subclasses, such code will not necessarily work and will not be + * guaranteed to work stably from release to release. + * + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ +class U_I18N_API ChoiceFormat: public NumberFormat { +public: + /** + * Constructs a new ChoiceFormat from the pattern string. + * + * @param pattern Pattern used to construct object. + * @param status Output param to receive success code. If the + * pattern cannot be parsed, set to failure code. + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + ChoiceFormat(const UnicodeString& pattern, + UErrorCode& status); + + + /** + * Constructs a new ChoiceFormat with the given limits and message strings. + * All closure flags default to <code>FALSE</code>, + * equivalent to <code>less_than_or_equal</code> separators. + * + * Copies the limits and formats instead of adopting them. + * + * @param limits Array of limit values. + * @param formats Array of formats. + * @param count Size of 'limits' and 'formats' arrays. + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + ChoiceFormat(const double* limits, + const UnicodeString* formats, + int32_t count ); + + /** + * Constructs a new ChoiceFormat with the given limits, closure flags and message strings. + * + * Copies the limits and formats instead of adopting them. + * + * @param limits Array of limit values + * @param closures Array of booleans specifying whether each + * element of 'limits' is open or closed. If FALSE, then the + * corresponding limit number is a member of its range. + * If TRUE, then the limit number belongs to the previous range it. + * @param formats Array of formats + * @param count Size of 'limits', 'closures', and 'formats' arrays + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + ChoiceFormat(const double* limits, + const UBool* closures, + const UnicodeString* formats, + int32_t count); + + /** + * Copy constructor. + * + * @param that ChoiceFormat object to be copied from + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + ChoiceFormat(const ChoiceFormat& that); + + /** + * Assignment operator. + * + * @param that ChoiceFormat object to be copied + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + const ChoiceFormat& operator=(const ChoiceFormat& that); + + /** + * Destructor. + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + virtual ~ChoiceFormat(); + + /** + * Clones this Format object. The caller owns the + * result and must delete it when done. + * + * @return a copy of this object + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + virtual Format* clone(void) const; + + /** + * Returns true if the given Format objects are semantically equal. + * Objects of different subclasses are considered unequal. + * + * @param other ChoiceFormat object to be compared + * @return true if other is the same as this. + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + virtual UBool operator==(const Format& other) const; + + /** + * Sets the pattern. + * @param pattern The pattern to be applied. + * @param status Output param set to success/failure code on + * exit. If the pattern is invalid, this will be + * set to a failure result. + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + virtual void applyPattern(const UnicodeString& pattern, + UErrorCode& status); + + /** + * Sets the pattern. + * @param pattern The pattern to be applied. + * @param parseError Struct to receive information on position + * of error if an error is encountered + * @param status Output param set to success/failure code on + * exit. If the pattern is invalid, this will be + * set to a failure result. + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + virtual void applyPattern(const UnicodeString& pattern, + UParseError& parseError, + UErrorCode& status); + /** + * Gets the pattern. + * + * @param pattern Output param which will receive the pattern + * Previous contents are deleted. + * @return A reference to 'pattern' + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + virtual UnicodeString& toPattern(UnicodeString &pattern) const; + + /** + * Sets the choices to be used in formatting. + * For details see the constructor with the same parameter list. + * + * @param limitsToCopy Contains the top value that you want + * parsed with that format,and should be in + * ascending sorted order. When formatting X, + * the choice will be the i, where limit[i] + * <= X < limit[i+1]. + * @param formatsToCopy The format strings you want to use for each limit. + * @param count The size of the above arrays. + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + virtual void setChoices(const double* limitsToCopy, + const UnicodeString* formatsToCopy, + int32_t count ); + + /** + * Sets the choices to be used in formatting. + * For details see the constructor with the same parameter list. + * + * @param limits Array of limits + * @param closures Array of limit booleans + * @param formats Array of format string + * @param count The size of the above arrays + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + virtual void setChoices(const double* limits, + const UBool* closures, + const UnicodeString* formats, + int32_t count); + + /** + * Returns NULL and 0. + * Before ICU 4.8, this used to return the choice limits array. + * + * @param count Will be set to 0. + * @return NULL + * @deprecated ICU 4.8 Use the MessagePattern class to analyze a ChoiceFormat pattern. + */ + virtual const double* getLimits(int32_t& count) const; + + /** + * Returns NULL and 0. + * Before ICU 4.8, this used to return the limit booleans array. + * + * @param count Will be set to 0. + * @return NULL + * @deprecated ICU 4.8 Use the MessagePattern class to analyze a ChoiceFormat pattern. + */ + virtual const UBool* getClosures(int32_t& count) const; + + /** + * Returns NULL and 0. + * Before ICU 4.8, this used to return the array of choice strings. + * + * @param count Will be set to 0. + * @return NULL + * @deprecated ICU 4.8 Use the MessagePattern class to analyze a ChoiceFormat pattern. + */ + virtual const UnicodeString* getFormats(int32_t& count) const; + + + using NumberFormat::format; + + /** + * Formats a double number using this object's choices. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @return Reference to 'appendTo' parameter. + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + virtual UnicodeString& format(double number, + UnicodeString& appendTo, + FieldPosition& pos) const; + /** + * Formats an int32_t number using this object's choices. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @return Reference to 'appendTo' parameter. + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + virtual UnicodeString& format(int32_t number, + UnicodeString& appendTo, + FieldPosition& pos) const; + + /** + * Formats an int64_t number using this object's choices. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @return Reference to 'appendTo' parameter. + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + virtual UnicodeString& format(int64_t number, + UnicodeString& appendTo, + FieldPosition& pos) const; + + /** + * Formats an array of objects using this object's choices. + * + * @param objs The array of objects to be formatted. + * @param cnt The size of objs. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param success Output param set to success/failure code on + * exit. + * @return Reference to 'appendTo' parameter. + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + virtual UnicodeString& format(const Formattable* objs, + int32_t cnt, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& success) const; + + using NumberFormat::parse; + + /** + * Looks for the longest match of any message string on the input text and, + * if there is a match, sets the result object to the corresponding range's number. + * + * If no string matches, then the parsePosition is unchanged. + * + * @param text The text to be parsed. + * @param result Formattable to be set to the parse result. + * If parse fails, return contents are undefined. + * @param parsePosition The position to start parsing at on input. + * On output, moved to after the last successfully + * parse character. On parse failure, does not change. + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + virtual void parse(const UnicodeString& text, + Formattable& result, + ParsePosition& parsePosition) const; + + /** + * Returns a unique class ID POLYMORPHICALLY. Part of ICU's "poor man's RTTI". + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + virtual UClassID getDynamicClassID(void) const; + + /** + * Returns the class ID for this class. This is useful only for + * comparing to a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . Derived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. + */ + static UClassID U_EXPORT2 getStaticClassID(void); + +private: + /** + * Converts a double value to a string. + * @param value the double number to be converted. + * @param string the result string. + * @return the converted string. + */ + static UnicodeString& dtos(double value, UnicodeString& string); + + ChoiceFormat(); // default constructor not implemented + + /** + * Construct a new ChoiceFormat with the limits and the corresponding formats + * based on the pattern. + * + * @param newPattern Pattern used to construct object. + * @param parseError Struct to receive information on position + * of error if an error is encountered. + * @param status Output param to receive success code. If the + * pattern cannot be parsed, set to failure code. + */ + ChoiceFormat(const UnicodeString& newPattern, + UParseError& parseError, + UErrorCode& status); + + friend class MessageFormat; + + virtual void setChoices(const double* limits, + const UBool* closures, + const UnicodeString* formats, + int32_t count, + UErrorCode &errorCode); + + /** + * Finds the ChoiceFormat sub-message for the given number. + * @param pattern A MessagePattern. + * @param partIndex the index of the first ChoiceFormat argument style part. + * @param number a number to be mapped to one of the ChoiceFormat argument's intervals + * @return the sub-message start part index. + */ + static int32_t findSubMessage(const MessagePattern &pattern, int32_t partIndex, double number); + + static double parseArgument( + const MessagePattern &pattern, int32_t partIndex, + const UnicodeString &source, ParsePosition &pos); + + /** + * Matches the pattern string from the end of the partIndex to + * the beginning of the limitPartIndex, + * including all syntax except SKIP_SYNTAX, + * against the source string starting at sourceOffset. + * If they match, returns the length of the source string match. + * Otherwise returns -1. + */ + static int32_t matchStringUntilLimitPart( + const MessagePattern &pattern, int32_t partIndex, int32_t limitPartIndex, + const UnicodeString &source, int32_t sourceOffset); + + /** + * Some of the ChoiceFormat constructors do not have a UErrorCode paramater. + * We need _some_ way to provide one for the MessagePattern constructor. + * Alternatively, the MessagePattern could be a pointer field, but that is + * not nice either. + */ + UErrorCode constructorErrorCode; + + /** + * The MessagePattern which contains the parsed structure of the pattern string. + * + * Starting with ICU 4.8, the MessagePattern contains a sequence of + * numeric/selector/message parts corresponding to the parsed pattern. + * For details see the MessagePattern class API docs. + */ + MessagePattern msgPattern; + + /** + * Docs & fields from before ICU 4.8, before MessagePattern was used. + * Commented out, and left only for explanation of semantics. + * -------- + * Each ChoiceFormat divides the range -Inf..+Inf into fCount + * intervals. The intervals are: + * + * 0: fChoiceLimits[0]..fChoiceLimits[1] + * 1: fChoiceLimits[1]..fChoiceLimits[2] + * ... + * fCount-2: fChoiceLimits[fCount-2]..fChoiceLimits[fCount-1] + * fCount-1: fChoiceLimits[fCount-1]..+Inf + * + * Interval 0 is special; during formatting (mapping numbers to + * strings), it also contains all numbers less than + * fChoiceLimits[0], as well as NaN values. + * + * Interval i maps to and from string fChoiceFormats[i]. When + * parsing (mapping strings to numbers), then intervals map to + * their lower limit, that is, interval i maps to fChoiceLimit[i]. + * + * The intervals may be closed, half open, or open. This affects + * formatting but does not affect parsing. Interval i is affected + * by fClosures[i] and fClosures[i+1]. If fClosures[i] + * is FALSE, then the value fChoiceLimits[i] is in interval i. + * That is, intervals i and i are: + * + * i-1: ... x < fChoiceLimits[i] + * i: fChoiceLimits[i] <= x ... + * + * If fClosures[i] is TRUE, then the value fChoiceLimits[i] is + * in interval i-1. That is, intervals i-1 and i are: + * + * i-1: ... x <= fChoiceLimits[i] + * i: fChoiceLimits[i] < x ... + * + * Because of the nature of interval 0, fClosures[0] has no + * effect. + */ + // double* fChoiceLimits; + // UBool* fClosures; + // UnicodeString* fChoiceFormats; + // int32_t fCount; +}; + + +U_NAMESPACE_END + +#endif // U_HIDE_DEPRECATED_API +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // CHOICFMT_H +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/coleitr.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/coleitr.h new file mode 100755 index 00000000..f2bd2ecc --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/coleitr.h @@ -0,0 +1,407 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ****************************************************************************** + * Copyright (C) 1997-2014, International Business Machines + * Corporation and others. All Rights Reserved. + ****************************************************************************** + */ + +/** + * \file + * \brief C++ API: Collation Element Iterator. + */ + +/** +* File coleitr.h +* +* Created by: Helena Shih +* +* Modification History: +* +* Date Name Description +* +* 8/18/97 helena Added internal API documentation. +* 08/03/98 erm Synched with 1.2 version CollationElementIterator.java +* 12/10/99 aliu Ported Thai collation support from Java. +* 01/25/01 swquek Modified into a C++ wrapper calling C APIs (ucoliter.h) +* 02/19/01 swquek Removed CollationElementsIterator() since it is +* private constructor and no calls are made to it +* 2012-2014 markus Rewritten in C++ again. +*/ + +#ifndef COLEITR_H +#define COLEITR_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_COLLATION + +#include "unicode/unistr.h" +#include "unicode/uobject.h" + +struct UCollationElements; +struct UHashtable; + +U_NAMESPACE_BEGIN + +struct CollationData; + +class CharacterIterator; +class CollationIterator; +class RuleBasedCollator; +class UCollationPCE; +class UVector32; + +/** +* The CollationElementIterator class is used as an iterator to walk through +* each character of an international string. Use the iterator to return the +* ordering priority of the positioned character. The ordering priority of a +* character, which we refer to as a key, defines how a character is collated in +* the given collation object. +* For example, consider the following in Slovak and in traditional Spanish collation: +* <pre> +* "ca" -> the first key is key('c') and second key is key('a'). +* "cha" -> the first key is key('ch') and second key is key('a').</pre> +* And in German phonebook collation, +* <pre> \htmlonly "æb"-> the first key is key('a'), the second key is key('e'), and +* the third key is key('b'). \endhtmlonly </pre> +* The key of a character, is an integer composed of primary order(short), +* secondary order(char), and tertiary order(char). Java strictly defines the +* size and signedness of its primitive data types. Therefore, the static +* functions primaryOrder(), secondaryOrder(), and tertiaryOrder() return +* int32_t to ensure the correctness of the key value. +* <p>Example of the iterator usage: (without error checking) +* <pre> +* \code +* void CollationElementIterator_Example() +* { +* UnicodeString str = "This is a test"; +* UErrorCode success = U_ZERO_ERROR; +* RuleBasedCollator* rbc = +* (RuleBasedCollator*) RuleBasedCollator::createInstance(success); +* CollationElementIterator* c = +* rbc->createCollationElementIterator( str ); +* int32_t order = c->next(success); +* c->reset(); +* order = c->previous(success); +* delete c; +* delete rbc; +* } +* \endcode +* </pre> +* <p> +* The method next() returns the collation order of the next character based on +* the comparison level of the collator. The method previous() returns the +* collation order of the previous character based on the comparison level of +* the collator. The Collation Element Iterator moves only in one direction +* between calls to reset(), setOffset(), or setText(). That is, next() +* and previous() can not be inter-used. Whenever previous() is to be called after +* next() or vice versa, reset(), setOffset() or setText() has to be called first +* to reset the status, shifting pointers to either the end or the start of +* the string (reset() or setText()), or the specified position (setOffset()). +* Hence at the next call of next() or previous(), the first or last collation order, +* or collation order at the spefcifieid position will be returned. If a change of +* direction is done without one of these calls, the result is undefined. +* <p> +* The result of a forward iterate (next()) and reversed result of the backward +* iterate (previous()) on the same string are equivalent, if collation orders +* with the value 0 are ignored. +* Character based on the comparison level of the collator. A collation order +* consists of primary order, secondary order and tertiary order. The data +* type of the collation order is <strong>int32_t</strong>. +* +* Note, CollationElementIterator should not be subclassed. +* @see Collator +* @see RuleBasedCollator +* @version 1.8 Jan 16 2001 +*/ +class U_I18N_API CollationElementIterator U_FINAL : public UObject { +public: + + // CollationElementIterator public data member ------------------------------ + + enum { + /** + * NULLORDER indicates that an error has occured while processing + * @stable ICU 2.0 + */ + NULLORDER = (int32_t)0xffffffff + }; + + // CollationElementIterator public constructor/destructor ------------------- + + /** + * Copy constructor. + * + * @param other the object to be copied from + * @stable ICU 2.0 + */ + CollationElementIterator(const CollationElementIterator& other); + + /** + * Destructor + * @stable ICU 2.0 + */ + virtual ~CollationElementIterator(); + + // CollationElementIterator public methods ---------------------------------- + + /** + * Returns true if "other" is the same as "this" + * + * @param other the object to be compared + * @return true if "other" is the same as "this" + * @stable ICU 2.0 + */ + UBool operator==(const CollationElementIterator& other) const; + + /** + * Returns true if "other" is not the same as "this". + * + * @param other the object to be compared + * @return true if "other" is not the same as "this" + * @stable ICU 2.0 + */ + UBool operator!=(const CollationElementIterator& other) const; + + /** + * Resets the cursor to the beginning of the string. + * @stable ICU 2.0 + */ + void reset(void); + + /** + * Gets the ordering priority of the next character in the string. + * @param status the error code status. + * @return the next character's ordering. otherwise returns NULLORDER if an + * error has occured or if the end of string has been reached + * @stable ICU 2.0 + */ + int32_t next(UErrorCode& status); + + /** + * Get the ordering priority of the previous collation element in the string. + * @param status the error code status. + * @return the previous element's ordering. otherwise returns NULLORDER if an + * error has occured or if the start of string has been reached + * @stable ICU 2.0 + */ + int32_t previous(UErrorCode& status); + + /** + * Gets the primary order of a collation order. + * @param order the collation order + * @return the primary order of a collation order. + * @stable ICU 2.0 + */ + static inline int32_t primaryOrder(int32_t order); + + /** + * Gets the secondary order of a collation order. + * @param order the collation order + * @return the secondary order of a collation order. + * @stable ICU 2.0 + */ + static inline int32_t secondaryOrder(int32_t order); + + /** + * Gets the tertiary order of a collation order. + * @param order the collation order + * @return the tertiary order of a collation order. + * @stable ICU 2.0 + */ + static inline int32_t tertiaryOrder(int32_t order); + + /** + * Return the maximum length of any expansion sequences that end with the + * specified comparison order. + * @param order a collation order returned by previous or next. + * @return maximum size of the expansion sequences ending with the collation + * element or 1 if collation element does not occur at the end of any + * expansion sequence + * @stable ICU 2.0 + */ + int32_t getMaxExpansion(int32_t order) const; + + /** + * Gets the comparison order in the desired strength. Ignore the other + * differences. + * @param order The order value + * @stable ICU 2.0 + */ + int32_t strengthOrder(int32_t order) const; + + /** + * Sets the source string. + * @param str the source string. + * @param status the error code status. + * @stable ICU 2.0 + */ + void setText(const UnicodeString& str, UErrorCode& status); + + /** + * Sets the source string. + * @param str the source character iterator. + * @param status the error code status. + * @stable ICU 2.0 + */ + void setText(CharacterIterator& str, UErrorCode& status); + + /** + * Checks if a comparison order is ignorable. + * @param order the collation order. + * @return TRUE if a character is ignorable, FALSE otherwise. + * @stable ICU 2.0 + */ + static inline UBool isIgnorable(int32_t order); + + /** + * Gets the offset of the currently processed character in the source string. + * @return the offset of the character. + * @stable ICU 2.0 + */ + int32_t getOffset(void) const; + + /** + * Sets the offset of the currently processed character in the source string. + * @param newOffset the new offset. + * @param status the error code status. + * @return the offset of the character. + * @stable ICU 2.0 + */ + void setOffset(int32_t newOffset, UErrorCode& status); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.2 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.2 + */ + static UClassID U_EXPORT2 getStaticClassID(); + +#ifndef U_HIDE_INTERNAL_API + /** @internal */ + static inline CollationElementIterator *fromUCollationElements(UCollationElements *uc) { + return reinterpret_cast<CollationElementIterator *>(uc); + } + /** @internal */ + static inline const CollationElementIterator *fromUCollationElements(const UCollationElements *uc) { + return reinterpret_cast<const CollationElementIterator *>(uc); + } + /** @internal */ + inline UCollationElements *toUCollationElements() { + return reinterpret_cast<UCollationElements *>(this); + } + /** @internal */ + inline const UCollationElements *toUCollationElements() const { + return reinterpret_cast<const UCollationElements *>(this); + } +#endif // U_HIDE_INTERNAL_API + +private: + friend class RuleBasedCollator; + friend class UCollationPCE; + + /** + * CollationElementIterator constructor. This takes the source string and the + * collation object. The cursor will walk thru the source string based on the + * predefined collation rules. If the source string is empty, NULLORDER will + * be returned on the calls to next(). + * @param sourceText the source string. + * @param order the collation object. + * @param status the error code status. + */ + CollationElementIterator(const UnicodeString& sourceText, + const RuleBasedCollator* order, UErrorCode& status); + // Note: The constructors should take settings & tailoring, not a collator, + // to avoid circular dependencies. + // However, for operator==() we would need to be able to compare tailoring data for equality + // without making CollationData or CollationTailoring depend on TailoredSet. + // (See the implementation of RuleBasedCollator::operator==().) + // That might require creating an intermediate class that would be used + // by both CollationElementIterator and RuleBasedCollator + // but only contain the part of RBC== related to data and rules. + + /** + * CollationElementIterator constructor. This takes the source string and the + * collation object. The cursor will walk thru the source string based on the + * predefined collation rules. If the source string is empty, NULLORDER will + * be returned on the calls to next(). + * @param sourceText the source string. + * @param order the collation object. + * @param status the error code status. + */ + CollationElementIterator(const CharacterIterator& sourceText, + const RuleBasedCollator* order, UErrorCode& status); + + /** + * Assignment operator + * + * @param other the object to be copied + */ + const CollationElementIterator& + operator=(const CollationElementIterator& other); + + CollationElementIterator(); // default constructor not implemented + + /** Normalizes dir_=1 (just after setOffset()) to dir_=0 (just after reset()). */ + inline int8_t normalizeDir() const { return dir_ == 1 ? 0 : dir_; } + + static UHashtable *computeMaxExpansions(const CollationData *data, UErrorCode &errorCode); + + static int32_t getMaxExpansion(const UHashtable *maxExpansions, int32_t order); + + // CollationElementIterator private data members ---------------------------- + + CollationIterator *iter_; // owned + const RuleBasedCollator *rbc_; // aliased + uint32_t otherHalf_; + /** + * <0: backwards; 0: just after reset() (previous() begins from end); + * 1: just after setOffset(); >1: forward + */ + int8_t dir_; + /** + * Stores offsets from expansions and from unsafe-backwards iteration, + * so that getOffset() returns intermediate offsets for the CEs + * that are consistent with forward iteration. + */ + UVector32 *offsets_; + + UnicodeString string_; +}; + +// CollationElementIterator inline method definitions -------------------------- + +inline int32_t CollationElementIterator::primaryOrder(int32_t order) +{ + return (order >> 16) & 0xffff; +} + +inline int32_t CollationElementIterator::secondaryOrder(int32_t order) +{ + return (order >> 8) & 0xff; +} + +inline int32_t CollationElementIterator::tertiaryOrder(int32_t order) +{ + return order & 0xff; +} + +inline UBool CollationElementIterator::isIgnorable(int32_t order) +{ + return (order & 0xffff0000) == 0; +} + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_COLLATION */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/coll.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/coll.h new file mode 100755 index 00000000..d0357050 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/coll.h @@ -0,0 +1,1274 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* Copyright (C) 1996-2016, International Business Machines +* Corporation and others. All Rights Reserved. +****************************************************************************** +*/ + +/** + * \file + * \brief C++ API: Collation Service. + */ + +/** +* File coll.h +* +* Created by: Helena Shih +* +* Modification History: +* +* Date Name Description +* 02/5/97 aliu Modified createDefault to load collation data from +* binary files when possible. Added related methods +* createCollationFromFile, chopLocale, createPathName. +* 02/11/97 aliu Added members addToCache, findInCache, and fgCache. +* 02/12/97 aliu Modified to create objects from RuleBasedCollator cache. +* Moved cache out of Collation class. +* 02/13/97 aliu Moved several methods out of this class and into +* RuleBasedCollator, with modifications. Modified +* createDefault() to call new RuleBasedCollator(Locale&) +* constructor. General clean up and documentation. +* 02/20/97 helena Added clone, operator==, operator!=, operator=, copy +* constructor and getDynamicClassID. +* 03/25/97 helena Updated with platform independent data types. +* 05/06/97 helena Added memory allocation error detection. +* 06/20/97 helena Java class name change. +* 09/03/97 helena Added createCollationKeyValues(). +* 02/10/98 damiba Added compare() with length as parameter. +* 04/23/99 stephen Removed EDecompositionMode, merged with +* Normalizer::EMode. +* 11/02/99 helena Collator performance enhancements. Eliminates the +* UnicodeString construction and special case for NO_OP. +* 11/23/99 srl More performance enhancements. Inlining of +* critical accessors. +* 05/15/00 helena Added version information API. +* 01/29/01 synwee Modified into a C++ wrapper which calls C apis +* (ucol.h). +* 2012-2014 markus Rewritten in C++ again. +*/ + +#ifndef COLL_H +#define COLL_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_COLLATION + +#include "unicode/uobject.h" +#include "unicode/ucol.h" +#include "unicode/unorm.h" +#include "unicode/locid.h" +#include "unicode/uniset.h" +#include "unicode/umisc.h" +#include "unicode/uiter.h" +#include "unicode/stringpiece.h" + +U_NAMESPACE_BEGIN + +class StringEnumeration; + +#if !UCONFIG_NO_SERVICE +/** + * @stable ICU 2.6 + */ +class CollatorFactory; +#endif + +/** +* @stable ICU 2.0 +*/ +class CollationKey; + +/** +* The <code>Collator</code> class performs locale-sensitive string +* comparison.<br> +* You use this class to build searching and sorting routines for natural +* language text. +* <p> +* <code>Collator</code> is an abstract base class. Subclasses implement +* specific collation strategies. One subclass, +* <code>RuleBasedCollator</code>, is currently provided and is applicable +* to a wide set of languages. Other subclasses may be created to handle more +* specialized needs. +* <p> +* Like other locale-sensitive classes, you can use the static factory method, +* <code>createInstance</code>, to obtain the appropriate +* <code>Collator</code> object for a given locale. You will only need to +* look at the subclasses of <code>Collator</code> if you need to +* understand the details of a particular collation strategy or if you need to +* modify that strategy. +* <p> +* The following example shows how to compare two strings using the +* <code>Collator</code> for the default locale. +* \htmlonly<blockquote>\endhtmlonly +* <pre> +* \code +* // Compare two strings in the default locale +* UErrorCode success = U_ZERO_ERROR; +* Collator* myCollator = Collator::createInstance(success); +* if (myCollator->compare("abc", "ABC") < 0) +* cout << "abc is less than ABC" << endl; +* else +* cout << "abc is greater than or equal to ABC" << endl; +* \endcode +* </pre> +* \htmlonly</blockquote>\endhtmlonly +* <p> +* You can set a <code>Collator</code>'s <em>strength</em> attribute to +* determine the level of difference considered significant in comparisons. +* Five strengths are provided: <code>PRIMARY</code>, <code>SECONDARY</code>, +* <code>TERTIARY</code>, <code>QUATERNARY</code> and <code>IDENTICAL</code>. +* The exact assignment of strengths to language features is locale dependent. +* For example, in Czech, "e" and "f" are considered primary differences, +* while "e" and "\u00EA" are secondary differences, "e" and "E" are tertiary +* differences and "e" and "e" are identical. The following shows how both case +* and accents could be ignored for US English. +* \htmlonly<blockquote>\endhtmlonly +* <pre> +* \code +* //Get the Collator for US English and set its strength to PRIMARY +* UErrorCode success = U_ZERO_ERROR; +* Collator* usCollator = Collator::createInstance(Locale::getUS(), success); +* usCollator->setStrength(Collator::PRIMARY); +* if (usCollator->compare("abc", "ABC") == 0) +* cout << "'abc' and 'ABC' strings are equivalent with strength PRIMARY" << endl; +* \endcode +* </pre> +* \htmlonly</blockquote>\endhtmlonly +* +* The <code>getSortKey</code> methods +* convert a string to a series of bytes that can be compared bitwise against +* other sort keys using <code>strcmp()</code>. Sort keys are written as +* zero-terminated byte strings. +* +* Another set of APIs returns a <code>CollationKey</code> object that wraps +* the sort key bytes instead of returning the bytes themselves. +* </p> +* <p> +* <strong>Note:</strong> <code>Collator</code>s with different Locale, +* and CollationStrength settings will return different sort +* orders for the same set of strings. Locales have specific collation rules, +* and the way in which secondary and tertiary differences are taken into +* account, for example, will result in a different sorting order for same +* strings. +* </p> +* @see RuleBasedCollator +* @see CollationKey +* @see CollationElementIterator +* @see Locale +* @see Normalizer2 +* @version 2.0 11/15/01 +*/ + +class U_I18N_API Collator : public UObject { +public: + + // Collator public enums ----------------------------------------------- + + /** + * Base letter represents a primary difference. Set comparison level to + * PRIMARY to ignore secondary and tertiary differences.<br> + * Use this to set the strength of a Collator object.<br> + * Example of primary difference, "abc" < "abd" + * + * Diacritical differences on the same base letter represent a secondary + * difference. Set comparison level to SECONDARY to ignore tertiary + * differences. Use this to set the strength of a Collator object.<br> + * Example of secondary difference, "ä" >> "a". + * + * Uppercase and lowercase versions of the same character represents a + * tertiary difference. Set comparison level to TERTIARY to include all + * comparison differences. Use this to set the strength of a Collator + * object.<br> + * Example of tertiary difference, "abc" <<< "ABC". + * + * Two characters are considered "identical" when they have the same unicode + * spellings.<br> + * For example, "ä" == "ä". + * + * UCollationStrength is also used to determine the strength of sort keys + * generated from Collator objects. + * @stable ICU 2.0 + */ + enum ECollationStrength + { + PRIMARY = UCOL_PRIMARY, // 0 + SECONDARY = UCOL_SECONDARY, // 1 + TERTIARY = UCOL_TERTIARY, // 2 + QUATERNARY = UCOL_QUATERNARY, // 3 + IDENTICAL = UCOL_IDENTICAL // 15 + }; + + + // Cannot use #ifndef U_HIDE_DEPRECATED_API for the following, it is + // used by virtual methods that cannot have that conditional. + /** + * LESS is returned if source string is compared to be less than target + * string in the compare() method. + * EQUAL is returned if source string is compared to be equal to target + * string in the compare() method. + * GREATER is returned if source string is compared to be greater than + * target string in the compare() method. + * @see Collator#compare + * @deprecated ICU 2.6. Use C enum UCollationResult defined in ucol.h + */ + enum EComparisonResult + { + LESS = UCOL_LESS, // -1 + EQUAL = UCOL_EQUAL, // 0 + GREATER = UCOL_GREATER // 1 + }; + + // Collator public destructor ----------------------------------------- + + /** + * Destructor + * @stable ICU 2.0 + */ + virtual ~Collator(); + + // Collator public methods -------------------------------------------- + + /** + * Returns TRUE if "other" is the same as "this". + * + * The base class implementation returns TRUE if "other" has the same type/class as "this": + * <code>typeid(*this) == typeid(other)</code>. + * + * Subclass implementations should do something like the following: + * <pre> + * if (this == &other) { return TRUE; } + * if (!Collator::operator==(other)) { return FALSE; } // not the same class + * + * const MyCollator &o = (const MyCollator&)other; + * (compare this vs. o's subclass fields) + * </pre> + * @param other Collator object to be compared + * @return TRUE if other is the same as this. + * @stable ICU 2.0 + */ + virtual UBool operator==(const Collator& other) const; + + /** + * Returns true if "other" is not the same as "this". + * Calls ! operator==(const Collator&) const which works for all subclasses. + * @param other Collator object to be compared + * @return TRUE if other is not the same as this. + * @stable ICU 2.0 + */ + virtual UBool operator!=(const Collator& other) const; + + /** + * Makes a copy of this object. + * @return a copy of this object, owned by the caller + * @stable ICU 2.0 + */ + virtual Collator* clone(void) const = 0; + + /** + * Creates the Collator object for the current default locale. + * The default locale is determined by Locale::getDefault. + * The UErrorCode& err parameter is used to return status information to the user. + * To check whether the construction succeeded or not, you should check the + * value of U_SUCCESS(err). If you wish more detailed information, you can + * check for informational error results which still indicate success. + * U_USING_FALLBACK_ERROR indicates that a fall back locale was used. For + * example, 'de_CH' was requested, but nothing was found there, so 'de' was + * used. U_USING_DEFAULT_ERROR indicates that the default locale data was + * used; neither the requested locale nor any of its fall back locales + * could be found. + * The caller owns the returned object and is responsible for deleting it. + * + * @param err the error code status. + * @return the collation object of the default locale.(for example, en_US) + * @see Locale#getDefault + * @stable ICU 2.0 + */ + static Collator* U_EXPORT2 createInstance(UErrorCode& err); + + /** + * Gets the collation object for the desired locale. The + * resource of the desired locale will be loaded. + * + * Locale::getRoot() is the base collation table and all other languages are + * built on top of it with additional language-specific modifications. + * + * For some languages, multiple collation types are available; + * for example, "de@collation=phonebook". + * Starting with ICU 54, collation attributes can be specified via locale keywords as well, + * in the old locale extension syntax ("el@colCaseFirst=upper") + * or in language tag syntax ("el-u-kf-upper"). + * See <a href="http://userguide.icu-project.org/collation/api">User Guide: Collation API</a>. + * + * The UErrorCode& err parameter is used to return status information to the user. + * To check whether the construction succeeded or not, you should check + * the value of U_SUCCESS(err). If you wish more detailed information, you + * can check for informational error results which still indicate success. + * U_USING_FALLBACK_ERROR indicates that a fall back locale was used. For + * example, 'de_CH' was requested, but nothing was found there, so 'de' was + * used. U_USING_DEFAULT_ERROR indicates that the default locale data was + * used; neither the requested locale nor any of its fall back locales + * could be found. + * + * The caller owns the returned object and is responsible for deleting it. + * @param loc The locale ID for which to open a collator. + * @param err the error code status. + * @return the created table-based collation object based on the desired + * locale. + * @see Locale + * @see ResourceLoader + * @stable ICU 2.2 + */ + static Collator* U_EXPORT2 createInstance(const Locale& loc, UErrorCode& err); + + /** + * The comparison function compares the character data stored in two + * different strings. Returns information about whether a string is less + * than, greater than or equal to another string. + * @param source the source string to be compared with. + * @param target the string that is to be compared with the source string. + * @return Returns a byte value. GREATER if source is greater + * than target; EQUAL if source is equal to target; LESS if source is less + * than target + * @deprecated ICU 2.6 use the overload with UErrorCode & + */ + virtual EComparisonResult compare(const UnicodeString& source, + const UnicodeString& target) const; + + /** + * The comparison function compares the character data stored in two + * different strings. Returns information about whether a string is less + * than, greater than or equal to another string. + * @param source the source string to be compared with. + * @param target the string that is to be compared with the source string. + * @param status possible error code + * @return Returns an enum value. UCOL_GREATER if source is greater + * than target; UCOL_EQUAL if source is equal to target; UCOL_LESS if source is less + * than target + * @stable ICU 2.6 + */ + virtual UCollationResult compare(const UnicodeString& source, + const UnicodeString& target, + UErrorCode &status) const = 0; + + /** + * Does the same thing as compare but limits the comparison to a specified + * length + * @param source the source string to be compared with. + * @param target the string that is to be compared with the source string. + * @param length the length the comparison is limited to + * @return Returns a byte value. GREATER if source (up to the specified + * length) is greater than target; EQUAL if source (up to specified + * length) is equal to target; LESS if source (up to the specified + * length) is less than target. + * @deprecated ICU 2.6 use the overload with UErrorCode & + */ + virtual EComparisonResult compare(const UnicodeString& source, + const UnicodeString& target, + int32_t length) const; + + /** + * Does the same thing as compare but limits the comparison to a specified + * length + * @param source the source string to be compared with. + * @param target the string that is to be compared with the source string. + * @param length the length the comparison is limited to + * @param status possible error code + * @return Returns an enum value. UCOL_GREATER if source (up to the specified + * length) is greater than target; UCOL_EQUAL if source (up to specified + * length) is equal to target; UCOL_LESS if source (up to the specified + * length) is less than target. + * @stable ICU 2.6 + */ + virtual UCollationResult compare(const UnicodeString& source, + const UnicodeString& target, + int32_t length, + UErrorCode &status) const = 0; + + /** + * The comparison function compares the character data stored in two + * different string arrays. Returns information about whether a string array + * is less than, greater than or equal to another string array. + * <p>Example of use: + * <pre> + * . char16_t ABC[] = {0x41, 0x42, 0x43, 0}; // = "ABC" + * . char16_t abc[] = {0x61, 0x62, 0x63, 0}; // = "abc" + * . UErrorCode status = U_ZERO_ERROR; + * . Collator *myCollation = + * . Collator::createInstance(Locale::getUS(), status); + * . if (U_FAILURE(status)) return; + * . myCollation->setStrength(Collator::PRIMARY); + * . // result would be Collator::EQUAL ("abc" == "ABC") + * . // (no primary difference between "abc" and "ABC") + * . Collator::EComparisonResult result = + * . myCollation->compare(abc, 3, ABC, 3); + * . myCollation->setStrength(Collator::TERTIARY); + * . // result would be Collator::LESS ("abc" <<< "ABC") + * . // (with tertiary difference between "abc" and "ABC") + * . result = myCollation->compare(abc, 3, ABC, 3); + * </pre> + * @param source the source string array to be compared with. + * @param sourceLength the length of the source string array. If this value + * is equal to -1, the string array is null-terminated. + * @param target the string that is to be compared with the source string. + * @param targetLength the length of the target string array. If this value + * is equal to -1, the string array is null-terminated. + * @return Returns a byte value. GREATER if source is greater than target; + * EQUAL if source is equal to target; LESS if source is less than + * target + * @deprecated ICU 2.6 use the overload with UErrorCode & + */ + virtual EComparisonResult compare(const char16_t* source, int32_t sourceLength, + const char16_t* target, int32_t targetLength) + const; + + /** + * The comparison function compares the character data stored in two + * different string arrays. Returns information about whether a string array + * is less than, greater than or equal to another string array. + * @param source the source string array to be compared with. + * @param sourceLength the length of the source string array. If this value + * is equal to -1, the string array is null-terminated. + * @param target the string that is to be compared with the source string. + * @param targetLength the length of the target string array. If this value + * is equal to -1, the string array is null-terminated. + * @param status possible error code + * @return Returns an enum value. UCOL_GREATER if source is greater + * than target; UCOL_EQUAL if source is equal to target; UCOL_LESS if source is less + * than target + * @stable ICU 2.6 + */ + virtual UCollationResult compare(const char16_t* source, int32_t sourceLength, + const char16_t* target, int32_t targetLength, + UErrorCode &status) const = 0; + + /** + * Compares two strings using the Collator. + * Returns whether the first one compares less than/equal to/greater than + * the second one. + * This version takes UCharIterator input. + * @param sIter the first ("source") string iterator + * @param tIter the second ("target") string iterator + * @param status ICU status + * @return UCOL_LESS, UCOL_EQUAL or UCOL_GREATER + * @stable ICU 4.2 + */ + virtual UCollationResult compare(UCharIterator &sIter, + UCharIterator &tIter, + UErrorCode &status) const; + + /** + * Compares two UTF-8 strings using the Collator. + * Returns whether the first one compares less than/equal to/greater than + * the second one. + * This version takes UTF-8 input. + * Note that a StringPiece can be implicitly constructed + * from a std::string or a NUL-terminated const char * string. + * @param source the first UTF-8 string + * @param target the second UTF-8 string + * @param status ICU status + * @return UCOL_LESS, UCOL_EQUAL or UCOL_GREATER + * @stable ICU 4.2 + */ + virtual UCollationResult compareUTF8(const StringPiece &source, + const StringPiece &target, + UErrorCode &status) const; + + /** + * Transforms the string into a series of characters that can be compared + * with CollationKey::compareTo. It is not possible to restore the original + * string from the chars in the sort key. + * <p>Use CollationKey::equals or CollationKey::compare to compare the + * generated sort keys. + * If the source string is null, a null collation key will be returned. + * + * Note that sort keys are often less efficient than simply doing comparison. + * For more details, see the ICU User Guide. + * + * @param source the source string to be transformed into a sort key. + * @param key the collation key to be filled in + * @param status the error code status. + * @return the collation key of the string based on the collation rules. + * @see CollationKey#compare + * @stable ICU 2.0 + */ + virtual CollationKey& getCollationKey(const UnicodeString& source, + CollationKey& key, + UErrorCode& status) const = 0; + + /** + * Transforms the string into a series of characters that can be compared + * with CollationKey::compareTo. It is not possible to restore the original + * string from the chars in the sort key. + * <p>Use CollationKey::equals or CollationKey::compare to compare the + * generated sort keys. + * <p>If the source string is null, a null collation key will be returned. + * + * Note that sort keys are often less efficient than simply doing comparison. + * For more details, see the ICU User Guide. + * + * @param source the source string to be transformed into a sort key. + * @param sourceLength length of the collation key + * @param key the collation key to be filled in + * @param status the error code status. + * @return the collation key of the string based on the collation rules. + * @see CollationKey#compare + * @stable ICU 2.0 + */ + virtual CollationKey& getCollationKey(const char16_t*source, + int32_t sourceLength, + CollationKey& key, + UErrorCode& status) const = 0; + /** + * Generates the hash code for the collation object + * @stable ICU 2.0 + */ + virtual int32_t hashCode(void) const = 0; + + /** + * Gets the locale of the Collator + * + * @param type can be either requested, valid or actual locale. For more + * information see the definition of ULocDataLocaleType in + * uloc.h + * @param status the error code status. + * @return locale where the collation data lives. If the collator + * was instantiated from rules, locale is empty. + * @deprecated ICU 2.8 This API is under consideration for revision + * in ICU 3.0. + */ + virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const = 0; + + /** + * Convenience method for comparing two strings based on the collation rules. + * @param source the source string to be compared with. + * @param target the target string to be compared with. + * @return true if the first string is greater than the second one, + * according to the collation rules. false, otherwise. + * @see Collator#compare + * @stable ICU 2.0 + */ + UBool greater(const UnicodeString& source, const UnicodeString& target) + const; + + /** + * Convenience method for comparing two strings based on the collation rules. + * @param source the source string to be compared with. + * @param target the target string to be compared with. + * @return true if the first string is greater than or equal to the second + * one, according to the collation rules. false, otherwise. + * @see Collator#compare + * @stable ICU 2.0 + */ + UBool greaterOrEqual(const UnicodeString& source, + const UnicodeString& target) const; + + /** + * Convenience method for comparing two strings based on the collation rules. + * @param source the source string to be compared with. + * @param target the target string to be compared with. + * @return true if the strings are equal according to the collation rules. + * false, otherwise. + * @see Collator#compare + * @stable ICU 2.0 + */ + UBool equals(const UnicodeString& source, const UnicodeString& target) const; + + /** + * Determines the minimum strength that will be used in comparison or + * transformation. + * <p>E.g. with strength == SECONDARY, the tertiary difference is ignored + * <p>E.g. with strength == PRIMARY, the secondary and tertiary difference + * are ignored. + * @return the current comparison level. + * @see Collator#setStrength + * @deprecated ICU 2.6 Use getAttribute(UCOL_STRENGTH...) instead + */ + virtual ECollationStrength getStrength(void) const; + + /** + * Sets the minimum strength to be used in comparison or transformation. + * <p>Example of use: + * <pre> + * \code + * UErrorCode status = U_ZERO_ERROR; + * Collator*myCollation = Collator::createInstance(Locale::getUS(), status); + * if (U_FAILURE(status)) return; + * myCollation->setStrength(Collator::PRIMARY); + * // result will be "abc" == "ABC" + * // tertiary differences will be ignored + * Collator::ComparisonResult result = myCollation->compare("abc", "ABC"); + * \endcode + * </pre> + * @see Collator#getStrength + * @param newStrength the new comparison level. + * @deprecated ICU 2.6 Use setAttribute(UCOL_STRENGTH...) instead + */ + virtual void setStrength(ECollationStrength newStrength); + + /** + * Retrieves the reordering codes for this collator. + * @param dest The array to fill with the script ordering. + * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function + * will only return the length of the result without writing any codes (pre-flighting). + * @param status A reference to an error code value, which must not indicate + * a failure before the function call. + * @return The length of the script ordering array. + * @see ucol_setReorderCodes + * @see Collator#getEquivalentReorderCodes + * @see Collator#setReorderCodes + * @see UScriptCode + * @see UColReorderCode + * @stable ICU 4.8 + */ + virtual int32_t getReorderCodes(int32_t *dest, + int32_t destCapacity, + UErrorCode& status) const; + + /** + * Sets the ordering of scripts for this collator. + * + * <p>The reordering codes are a combination of script codes and reorder codes. + * @param reorderCodes An array of script codes in the new order. This can be NULL if the + * length is also set to 0. An empty array will clear any reordering codes on the collator. + * @param reorderCodesLength The length of reorderCodes. + * @param status error code + * @see ucol_setReorderCodes + * @see Collator#getReorderCodes + * @see Collator#getEquivalentReorderCodes + * @see UScriptCode + * @see UColReorderCode + * @stable ICU 4.8 + */ + virtual void setReorderCodes(const int32_t* reorderCodes, + int32_t reorderCodesLength, + UErrorCode& status) ; + + /** + * Retrieves the reorder codes that are grouped with the given reorder code. Some reorder + * codes will be grouped and must reorder together. + * Beginning with ICU 55, scripts only reorder together if they are primary-equal, + * for example Hiragana and Katakana. + * + * @param reorderCode The reorder code to determine equivalence for. + * @param dest The array to fill with the script equivalence reordering codes. + * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the + * function will only return the length of the result without writing any codes (pre-flighting). + * @param status A reference to an error code value, which must not indicate + * a failure before the function call. + * @return The length of the of the reordering code equivalence array. + * @see ucol_setReorderCodes + * @see Collator#getReorderCodes + * @see Collator#setReorderCodes + * @see UScriptCode + * @see UColReorderCode + * @stable ICU 4.8 + */ + static int32_t U_EXPORT2 getEquivalentReorderCodes(int32_t reorderCode, + int32_t* dest, + int32_t destCapacity, + UErrorCode& status); + + /** + * Get name of the object for the desired Locale, in the desired language + * @param objectLocale must be from getAvailableLocales + * @param displayLocale specifies the desired locale for output + * @param name the fill-in parameter of the return value + * @return display-able name of the object for the object locale in the + * desired language + * @stable ICU 2.0 + */ + static UnicodeString& U_EXPORT2 getDisplayName(const Locale& objectLocale, + const Locale& displayLocale, + UnicodeString& name); + + /** + * Get name of the object for the desired Locale, in the language of the + * default locale. + * @param objectLocale must be from getAvailableLocales + * @param name the fill-in parameter of the return value + * @return name of the object for the desired locale in the default language + * @stable ICU 2.0 + */ + static UnicodeString& U_EXPORT2 getDisplayName(const Locale& objectLocale, + UnicodeString& name); + + /** + * Get the set of Locales for which Collations are installed. + * + * <p>Note this does not include locales supported by registered collators. + * If collators might have been registered, use the overload of getAvailableLocales + * that returns a StringEnumeration.</p> + * + * @param count the output parameter of number of elements in the locale list + * @return the list of available locales for which collations are installed + * @stable ICU 2.0 + */ + static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count); + + /** + * Return a StringEnumeration over the locales available at the time of the call, + * including registered locales. If a severe error occurs (such as out of memory + * condition) this will return null. If there is no locale data, an empty enumeration + * will be returned. + * @return a StringEnumeration over the locales available at the time of the call + * @stable ICU 2.6 + */ + static StringEnumeration* U_EXPORT2 getAvailableLocales(void); + + /** + * Create a string enumerator of all possible keywords that are relevant to + * collation. At this point, the only recognized keyword for this + * service is "collation". + * @param status input-output error code + * @return a string enumeration over locale strings. The caller is + * responsible for closing the result. + * @stable ICU 3.0 + */ + static StringEnumeration* U_EXPORT2 getKeywords(UErrorCode& status); + + /** + * Given a keyword, create a string enumeration of all values + * for that keyword that are currently in use. + * @param keyword a particular keyword as enumerated by + * ucol_getKeywords. If any other keyword is passed in, status is set + * to U_ILLEGAL_ARGUMENT_ERROR. + * @param status input-output error code + * @return a string enumeration over collation keyword values, or NULL + * upon error. The caller is responsible for deleting the result. + * @stable ICU 3.0 + */ + static StringEnumeration* U_EXPORT2 getKeywordValues(const char *keyword, UErrorCode& status); + + /** + * Given a key and a locale, returns an array of string values in a preferred + * order that would make a difference. These are all and only those values where + * the open (creation) of the service with the locale formed from the input locale + * plus input keyword and that value has different behavior than creation with the + * input locale alone. + * @param keyword one of the keys supported by this service. For now, only + * "collation" is supported. + * @param locale the locale + * @param commonlyUsed if set to true it will return only commonly used values + * with the given locale in preferred order. Otherwise, + * it will return all the available values for the locale. + * @param status ICU status + * @return a string enumeration over keyword values for the given key and the locale. + * @stable ICU 4.2 + */ + static StringEnumeration* U_EXPORT2 getKeywordValuesForLocale(const char* keyword, const Locale& locale, + UBool commonlyUsed, UErrorCode& status); + + /** + * Return the functionally equivalent locale for the given + * requested locale, with respect to given keyword, for the + * collation service. If two locales return the same result, then + * collators instantiated for these locales will behave + * equivalently. The converse is not always true; two collators + * may in fact be equivalent, but return different results, due to + * internal details. The return result has no other meaning than + * that stated above, and implies nothing as to the relationship + * between the two locales. This is intended for use by + * applications who wish to cache collators, or otherwise reuse + * collators when possible. The functional equivalent may change + * over time. For more information, please see the <a + * href="http://userguide.icu-project.org/locale#TOC-Locales-and-Services"> + * Locales and Services</a> section of the ICU User Guide. + * @param keyword a particular keyword as enumerated by + * ucol_getKeywords. + * @param locale the requested locale + * @param isAvailable reference to a fillin parameter that + * indicates whether the requested locale was 'available' to the + * collation service. A locale is defined as 'available' if it + * physically exists within the collation locale data. + * @param status reference to input-output error code + * @return the functionally equivalent collation locale, or the root + * locale upon error. + * @stable ICU 3.0 + */ + static Locale U_EXPORT2 getFunctionalEquivalent(const char* keyword, const Locale& locale, + UBool& isAvailable, UErrorCode& status); + +#if !UCONFIG_NO_SERVICE + /** + * Register a new Collator. The collator will be adopted. + * Because ICU may choose to cache collators internally, this must be + * called at application startup, prior to any calls to + * Collator::createInstance to avoid undefined behavior. + * @param toAdopt the Collator instance to be adopted + * @param locale the locale with which the collator will be associated + * @param status the in/out status code, no special meanings are assigned + * @return a registry key that can be used to unregister this collator + * @stable ICU 2.6 + */ + static URegistryKey U_EXPORT2 registerInstance(Collator* toAdopt, const Locale& locale, UErrorCode& status); + + /** + * Register a new CollatorFactory. The factory will be adopted. + * Because ICU may choose to cache collators internally, this must be + * called at application startup, prior to any calls to + * Collator::createInstance to avoid undefined behavior. + * @param toAdopt the CollatorFactory instance to be adopted + * @param status the in/out status code, no special meanings are assigned + * @return a registry key that can be used to unregister this collator + * @stable ICU 2.6 + */ + static URegistryKey U_EXPORT2 registerFactory(CollatorFactory* toAdopt, UErrorCode& status); + + /** + * Unregister a previously-registered Collator or CollatorFactory + * using the key returned from the register call. Key becomes + * invalid after a successful call and should not be used again. + * The object corresponding to the key will be deleted. + * Because ICU may choose to cache collators internally, this should + * be called during application shutdown, after all calls to + * Collator::createInstance to avoid undefined behavior. + * @param key the registry key returned by a previous call to registerInstance + * @param status the in/out status code, no special meanings are assigned + * @return TRUE if the collator for the key was successfully unregistered + * @stable ICU 2.6 + */ + static UBool U_EXPORT2 unregister(URegistryKey key, UErrorCode& status); +#endif /* UCONFIG_NO_SERVICE */ + + /** + * Gets the version information for a Collator. + * @param info the version # information, the result will be filled in + * @stable ICU 2.0 + */ + virtual void getVersion(UVersionInfo info) const = 0; + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual method. + * This method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() + * methods call this method. + * @return The class ID for this object. All objects of a given class have + * the same class ID. Objects of other classes have different class + * IDs. + * @stable ICU 2.0 + */ + virtual UClassID getDynamicClassID(void) const = 0; + + /** + * Universal attribute setter + * @param attr attribute type + * @param value attribute value + * @param status to indicate whether the operation went on smoothly or + * there were errors + * @stable ICU 2.2 + */ + virtual void setAttribute(UColAttribute attr, UColAttributeValue value, + UErrorCode &status) = 0; + + /** + * Universal attribute getter + * @param attr attribute type + * @param status to indicate whether the operation went on smoothly or + * there were errors + * @return attribute value + * @stable ICU 2.2 + */ + virtual UColAttributeValue getAttribute(UColAttribute attr, + UErrorCode &status) const = 0; + + /** + * Sets the variable top to the top of the specified reordering group. + * The variable top determines the highest-sorting character + * which is affected by UCOL_ALTERNATE_HANDLING. + * If that attribute is set to UCOL_NON_IGNORABLE, then the variable top has no effect. + * + * The base class implementation sets U_UNSUPPORTED_ERROR. + * @param group one of UCOL_REORDER_CODE_SPACE, UCOL_REORDER_CODE_PUNCTUATION, + * UCOL_REORDER_CODE_SYMBOL, UCOL_REORDER_CODE_CURRENCY; + * or UCOL_REORDER_CODE_DEFAULT to restore the default max variable group + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return *this + * @see getMaxVariable + * @stable ICU 53 + */ + virtual Collator &setMaxVariable(UColReorderCode group, UErrorCode &errorCode); + + /** + * Returns the maximum reordering group whose characters are affected by UCOL_ALTERNATE_HANDLING. + * + * The base class implementation returns UCOL_REORDER_CODE_PUNCTUATION. + * @return the maximum variable reordering group. + * @see setMaxVariable + * @stable ICU 53 + */ + virtual UColReorderCode getMaxVariable() const; + + /** + * Sets the variable top to the primary weight of the specified string. + * + * Beginning with ICU 53, the variable top is pinned to + * the top of one of the supported reordering groups, + * and it must not be beyond the last of those groups. + * See setMaxVariable(). + * @param varTop one or more (if contraction) char16_ts to which the variable top should be set + * @param len length of variable top string. If -1 it is considered to be zero terminated. + * @param status error code. If error code is set, the return value is undefined. Errors set by this function are: <br> + * U_CE_NOT_FOUND_ERROR if more than one character was passed and there is no such contraction<br> + * U_ILLEGAL_ARGUMENT_ERROR if the variable top is beyond + * the last reordering group supported by setMaxVariable() + * @return variable top primary weight + * @deprecated ICU 53 Call setMaxVariable() instead. + */ + virtual uint32_t setVariableTop(const char16_t *varTop, int32_t len, UErrorCode &status) = 0; + + /** + * Sets the variable top to the primary weight of the specified string. + * + * Beginning with ICU 53, the variable top is pinned to + * the top of one of the supported reordering groups, + * and it must not be beyond the last of those groups. + * See setMaxVariable(). + * @param varTop a UnicodeString size 1 or more (if contraction) of char16_ts to which the variable top should be set + * @param status error code. If error code is set, the return value is undefined. Errors set by this function are: <br> + * U_CE_NOT_FOUND_ERROR if more than one character was passed and there is no such contraction<br> + * U_ILLEGAL_ARGUMENT_ERROR if the variable top is beyond + * the last reordering group supported by setMaxVariable() + * @return variable top primary weight + * @deprecated ICU 53 Call setMaxVariable() instead. + */ + virtual uint32_t setVariableTop(const UnicodeString &varTop, UErrorCode &status) = 0; + + /** + * Sets the variable top to the specified primary weight. + * + * Beginning with ICU 53, the variable top is pinned to + * the top of one of the supported reordering groups, + * and it must not be beyond the last of those groups. + * See setMaxVariable(). + * @param varTop primary weight, as returned by setVariableTop or ucol_getVariableTop + * @param status error code + * @deprecated ICU 53 Call setMaxVariable() instead. + */ + virtual void setVariableTop(uint32_t varTop, UErrorCode &status) = 0; + + /** + * Gets the variable top value of a Collator. + * @param status error code (not changed by function). If error code is set, the return value is undefined. + * @return the variable top primary weight + * @see getMaxVariable + * @stable ICU 2.0 + */ + virtual uint32_t getVariableTop(UErrorCode &status) const = 0; + + /** + * Get a UnicodeSet that contains all the characters and sequences + * tailored in this collator. + * @param status error code of the operation + * @return a pointer to a UnicodeSet object containing all the + * code points and sequences that may sort differently than + * in the root collator. The object must be disposed of by using delete + * @stable ICU 2.4 + */ + virtual UnicodeSet *getTailoredSet(UErrorCode &status) const; + + /** + * Same as clone(). + * The base class implementation simply calls clone(). + * @return a copy of this object, owned by the caller + * @see clone() + * @deprecated ICU 50 no need to have two methods for cloning + */ + virtual Collator* safeClone(void) const; + + /** + * Get the sort key as an array of bytes from a UnicodeString. + * Sort key byte arrays are zero-terminated and can be compared using + * strcmp(). + * + * Note that sort keys are often less efficient than simply doing comparison. + * For more details, see the ICU User Guide. + * + * @param source string to be processed. + * @param result buffer to store result in. If NULL, number of bytes needed + * will be returned. + * @param resultLength length of the result buffer. If if not enough the + * buffer will be filled to capacity. + * @return Number of bytes needed for storing the sort key + * @stable ICU 2.2 + */ + virtual int32_t getSortKey(const UnicodeString& source, + uint8_t* result, + int32_t resultLength) const = 0; + + /** + * Get the sort key as an array of bytes from a char16_t buffer. + * Sort key byte arrays are zero-terminated and can be compared using + * strcmp(). + * + * Note that sort keys are often less efficient than simply doing comparison. + * For more details, see the ICU User Guide. + * + * @param source string to be processed. + * @param sourceLength length of string to be processed. + * If -1, the string is 0 terminated and length will be decided by the + * function. + * @param result buffer to store result in. If NULL, number of bytes needed + * will be returned. + * @param resultLength length of the result buffer. If if not enough the + * buffer will be filled to capacity. + * @return Number of bytes needed for storing the sort key + * @stable ICU 2.2 + */ + virtual int32_t getSortKey(const char16_t*source, int32_t sourceLength, + uint8_t*result, int32_t resultLength) const = 0; + + /** + * Produce a bound for a given sortkey and a number of levels. + * Return value is always the number of bytes needed, regardless of + * whether the result buffer was big enough or even valid.<br> + * Resulting bounds can be used to produce a range of strings that are + * between upper and lower bounds. For example, if bounds are produced + * for a sortkey of string "smith", strings between upper and lower + * bounds with one level would include "Smith", "SMITH", "sMiTh".<br> + * There are two upper bounds that can be produced. If UCOL_BOUND_UPPER + * is produced, strings matched would be as above. However, if bound + * produced using UCOL_BOUND_UPPER_LONG is used, the above example will + * also match "Smithsonian" and similar.<br> + * For more on usage, see example in cintltst/capitst.c in procedure + * TestBounds. + * Sort keys may be compared using <TT>strcmp</TT>. + * @param source The source sortkey. + * @param sourceLength The length of source, or -1 if null-terminated. + * (If an unmodified sortkey is passed, it is always null + * terminated). + * @param boundType Type of bound required. It can be UCOL_BOUND_LOWER, which + * produces a lower inclusive bound, UCOL_BOUND_UPPER, that + * produces upper bound that matches strings of the same length + * or UCOL_BOUND_UPPER_LONG that matches strings that have the + * same starting substring as the source string. + * @param noOfLevels Number of levels required in the resulting bound (for most + * uses, the recommended value is 1). See users guide for + * explanation on number of levels a sortkey can have. + * @param result A pointer to a buffer to receive the resulting sortkey. + * @param resultLength The maximum size of result. + * @param status Used for returning error code if something went wrong. If the + * number of levels requested is higher than the number of levels + * in the source key, a warning (U_SORT_KEY_TOO_SHORT_WARNING) is + * issued. + * @return The size needed to fully store the bound. + * @see ucol_keyHashCode + * @stable ICU 2.1 + */ + static int32_t U_EXPORT2 getBound(const uint8_t *source, + int32_t sourceLength, + UColBoundMode boundType, + uint32_t noOfLevels, + uint8_t *result, + int32_t resultLength, + UErrorCode &status); + + +protected: + + // Collator protected constructors ------------------------------------- + + /** + * Default constructor. + * Constructor is different from the old default Collator constructor. + * The task for determing the default collation strength and normalization + * mode is left to the child class. + * @stable ICU 2.0 + */ + Collator(); + +#ifndef U_HIDE_DEPRECATED_API + /** + * Constructor. + * Empty constructor, does not handle the arguments. + * This constructor is done for backward compatibility with 1.7 and 1.8. + * The task for handling the argument collation strength and normalization + * mode is left to the child class. + * @param collationStrength collation strength + * @param decompositionMode + * @deprecated ICU 2.4. Subclasses should use the default constructor + * instead and handle the strength and normalization mode themselves. + */ + Collator(UCollationStrength collationStrength, + UNormalizationMode decompositionMode); +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Copy constructor. + * @param other Collator object to be copied from + * @stable ICU 2.0 + */ + Collator(const Collator& other); + +public: + /** + * Used internally by registration to define the requested and valid locales. + * @param requestedLocale the requested locale + * @param validLocale the valid locale + * @param actualLocale the actual locale + * @internal + */ + virtual void setLocales(const Locale& requestedLocale, const Locale& validLocale, const Locale& actualLocale); + + /** Get the short definition string for a collator. This internal API harvests the collator's + * locale and the attribute set and produces a string that can be used for opening + * a collator with the same attributes using the ucol_openFromShortString API. + * This string will be normalized. + * The structure and the syntax of the string is defined in the "Naming collators" + * section of the users guide: + * http://userguide.icu-project.org/collation/concepts#TOC-Collator-naming-scheme + * This function supports preflighting. + * + * This is internal, and intended to be used with delegate converters. + * + * @param locale a locale that will appear as a collators locale in the resulting + * short string definition. If NULL, the locale will be harvested + * from the collator. + * @param buffer space to hold the resulting string + * @param capacity capacity of the buffer + * @param status for returning errors. All the preflighting errors are featured + * @return length of the resulting string + * @see ucol_openFromShortString + * @see ucol_normalizeShortDefinitionString + * @see ucol_getShortDefinitionString + * @internal + */ + virtual int32_t internalGetShortDefinitionString(const char *locale, + char *buffer, + int32_t capacity, + UErrorCode &status) const; + + /** + * Implements ucol_strcollUTF8(). + * @internal + */ + virtual UCollationResult internalCompareUTF8( + const char *left, int32_t leftLength, + const char *right, int32_t rightLength, + UErrorCode &errorCode) const; + + /** + * Implements ucol_nextSortKeyPart(). + * @internal + */ + virtual int32_t + internalNextSortKeyPart( + UCharIterator *iter, uint32_t state[2], + uint8_t *dest, int32_t count, UErrorCode &errorCode) const; + +#ifndef U_HIDE_INTERNAL_API + /** @internal */ + static inline Collator *fromUCollator(UCollator *uc) { + return reinterpret_cast<Collator *>(uc); + } + /** @internal */ + static inline const Collator *fromUCollator(const UCollator *uc) { + return reinterpret_cast<const Collator *>(uc); + } + /** @internal */ + inline UCollator *toUCollator() { + return reinterpret_cast<UCollator *>(this); + } + /** @internal */ + inline const UCollator *toUCollator() const { + return reinterpret_cast<const UCollator *>(this); + } +#endif // U_HIDE_INTERNAL_API + +private: + /** + * Assignment operator. Private for now. + */ + Collator& operator=(const Collator& other); + + friend class CFactory; + friend class SimpleCFactory; + friend class ICUCollatorFactory; + friend class ICUCollatorService; + static Collator* makeInstance(const Locale& desiredLocale, + UErrorCode& status); +}; + +#if !UCONFIG_NO_SERVICE +/** + * A factory, used with registerFactory, the creates multiple collators and provides + * display names for them. A factory supports some number of locales-- these are the + * locales for which it can create collators. The factory can be visible, in which + * case the supported locales will be enumerated by getAvailableLocales, or invisible, + * in which they are not. Invisible locales are still supported, they are just not + * listed by getAvailableLocales. + * <p> + * If standard locale display names are sufficient, Collator instances can + * be registered using registerInstance instead.</p> + * <p> + * Note: if the collators are to be used from C APIs, they must be instances + * of RuleBasedCollator.</p> + * + * @stable ICU 2.6 + */ +class U_I18N_API CollatorFactory : public UObject { +public: + + /** + * Destructor + * @stable ICU 3.0 + */ + virtual ~CollatorFactory(); + + /** + * Return true if this factory is visible. Default is true. + * If not visible, the locales supported by this factory will not + * be listed by getAvailableLocales. + * @return true if the factory is visible. + * @stable ICU 2.6 + */ + virtual UBool visible(void) const; + + /** + * Return a collator for the provided locale. If the locale + * is not supported, return NULL. + * @param loc the locale identifying the collator to be created. + * @return a new collator if the locale is supported, otherwise NULL. + * @stable ICU 2.6 + */ + virtual Collator* createCollator(const Locale& loc) = 0; + + /** + * Return the name of the collator for the objectLocale, localized for the displayLocale. + * If objectLocale is not supported, or the factory is not visible, set the result string + * to bogus. + * @param objectLocale the locale identifying the collator + * @param displayLocale the locale for which the display name of the collator should be localized + * @param result an output parameter for the display name, set to bogus if not supported. + * @return the display name + * @stable ICU 2.6 + */ + virtual UnicodeString& getDisplayName(const Locale& objectLocale, + const Locale& displayLocale, + UnicodeString& result); + + /** + * Return an array of all the locale names directly supported by this factory. + * The number of names is returned in count. This array is owned by the factory. + * Its contents must never change. + * @param count output parameter for the number of locales supported by the factory + * @param status the in/out error code + * @return a pointer to an array of count UnicodeStrings. + * @stable ICU 2.6 + */ + virtual const UnicodeString * getSupportedIDs(int32_t &count, UErrorCode& status) = 0; +}; +#endif /* UCONFIG_NO_SERVICE */ + +// Collator inline methods ----------------------------------------------- + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_COLLATION */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/compactdecimalformat.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/compactdecimalformat.h new file mode 100755 index 00000000..d682d2d0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/compactdecimalformat.h @@ -0,0 +1,423 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************** +* Copyright (C) 2012-2016, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************** +* +* File COMPACTDECIMALFORMAT.H +******************************************************************************** +*/ + +#ifndef __COMPACT_DECIMAL_FORMAT_H__ +#define __COMPACT_DECIMAL_FORMAT_H__ + +#include "unicode/utypes.h" +/** + * \file + * \brief C++ API: Compatibility APIs for compact decimal number formatting. + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/decimfmt.h" + +struct UHashtable; + +U_NAMESPACE_BEGIN + +class PluralRules; + +/** + * <p><strong>IMPORTANT:</strong> New users are strongly encouraged to see if + * numberformatter.h fits their use case. Although not deprecated, this header + * is provided for backwards compatibility only. + * <hr/> + * + * The CompactDecimalFormat produces abbreviated numbers, suitable for display in + * environments will limited real estate. For example, 'Hits: 1.2B' instead of + * 'Hits: 1,200,000,000'. The format will be appropriate for the given language, + * such as "1,2 Mrd." for German. + * <p> + * For numbers under 1000 trillion (under 10^15, such as 123,456,789,012,345), + * the result will be short for supported languages. However, the result may + * sometimes exceed 7 characters, such as when there are combining marks or thin + * characters. In such cases, the visual width in fonts should still be short. + * <p> + * By default, there are 3 significant digits. After creation, if more than + * three significant digits are set (with setMaximumSignificantDigits), or if a + * fixed number of digits are set (with setMaximumIntegerDigits or + * setMaximumFractionDigits), then result may be wider. + * <p> + * At this time, parsing is not supported, and will produce a U_UNSUPPORTED_ERROR. + * Resetting the pattern prefixes or suffixes is not supported; the method calls + * are ignored. + * <p> + * @stable ICU 51 + */ +class U_I18N_API CompactDecimalFormat : public DecimalFormat { +public: + + /** + * Returns a compact decimal instance for specified locale. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of NumberFormat. + * @param inLocale the given locale. + * @param style whether to use short or long style. + * @param status error code returned here. + * @stable ICU 51 + */ + static CompactDecimalFormat* U_EXPORT2 createInstance( + const Locale& inLocale, UNumberCompactStyle style, UErrorCode& status); + + /** + * Copy constructor. + * + * @param source the DecimalFormat object to be copied from. + * @stable ICU 51 + */ + CompactDecimalFormat(const CompactDecimalFormat& source); + + /** + * Destructor. + * @stable ICU 51 + */ + virtual ~CompactDecimalFormat(); + + /** + * Assignment operator. + * + * @param rhs the DecimalFormat object to be copied. + * @stable ICU 51 + */ + CompactDecimalFormat& operator=(const CompactDecimalFormat& rhs); + + /** + * Clone this Format object polymorphically. The caller owns the + * result and should delete it when done. + * + * @return a polymorphic copy of this CompactDecimalFormat. + * @stable ICU 51 + */ + virtual Format* clone() const; + + /** + * Return TRUE if the given Format objects are semantically equal. + * Objects of different subclasses are considered unequal. + * + * @param other the object to be compared with. + * @return TRUE if the given Format objects are semantically equal. + * @stable ICU 51 + */ + virtual UBool operator==(const Format& other) const; + + + using DecimalFormat::format; + + /** + * Format a double or long number using base-10 representation. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @return Reference to 'appendTo' parameter. + * @stable ICU 51 + */ + virtual UnicodeString& format(double number, + UnicodeString& appendTo, + FieldPosition& pos) const; + + /** + * Format a double or long number using base-10 representation. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(double number, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode &status) const; + + /** + * Format a double or long number using base-10 representation. + * Currently sets status to U_UNSUPPORTED_ERROR. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. + * Can be NULL. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(double number, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + + /** + * Format a long number using base-10 representation. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @return Reference to 'appendTo' parameter. + * @stable ICU 56 + */ + virtual UnicodeString& format(int32_t number, + UnicodeString& appendTo, + FieldPosition& pos) const; + + /** + * Format a long number using base-10 representation. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(int32_t number, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode &status) const; + + /** + * Format a long number using base-10 representation. + * Currently sets status to U_UNSUPPORTED_ERROR + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. + * Can be NULL. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(int32_t number, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + + /** + * Format an int64 number using base-10 representation. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @return Reference to 'appendTo' parameter. + * @stable ICU 51 + */ + virtual UnicodeString& format(int64_t number, + UnicodeString& appendTo, + FieldPosition& pos) const; + + /** + * Format an int64 number using base-10 representation. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(int64_t number, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode &status) const; + + /** + * Format an int64 number using base-10 representation. + * Currently sets status to U_UNSUPPORTED_ERROR + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. + * Can be NULL. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(int64_t number, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + + /** + * Format a decimal number. Currently sets status to U_UNSUPPORTED_ERROR + * The syntax of the unformatted number is a "numeric string" + * as defined in the Decimal Arithmetic Specification, available at + * http://speleotrove.com/decimal + * + * @param number The unformatted number, as a string. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. + * Can be NULL. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(StringPiece number, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + + /** + * Format a decimal number. Currently sets status to U_UNSUPPORTED_ERROR + * The number is a DigitList wrapper onto a floating point decimal number. + * The default implementation in NumberFormat converts the decimal number + * to a double and formats that. + * + * @param number The number, a DigitList format Decimal Floating Point. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(const DigitList &number, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + + /** + * Format a decimal number. Currently sets status to U_UNSUPPORTED_ERROR. + * The number is a DigitList wrapper onto a floating point decimal number. + * The default implementation in NumberFormat converts the decimal number + * to a double and formats that. + * + * @param number The number, a DigitList format Decimal Floating Point. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(const DigitList &number, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& status) const; + + /** + * CompactDecimalFormat does not support parsing. This implementation + * does nothing. + * @param text Unused. + * @param result Does not change. + * @param parsePosition Does not change. + * @see Formattable + * @stable ICU 51 + */ + virtual void parse(const UnicodeString& text, + Formattable& result, + ParsePosition& parsePosition) const; + + /** + * CompactDecimalFormat does not support parsing. This implementation + * sets status to U_UNSUPPORTED_ERROR + * + * @param text Unused. + * @param result Does not change. + * @param status Always set to U_UNSUPPORTED_ERROR. + * @stable ICU 51 + */ + virtual void parse(const UnicodeString& text, + Formattable& result, + UErrorCode& status) const; + + /** + * Parses text from the given string as a currency amount. Unlike + * the parse() method, this method will attempt to parse a generic + * currency name, searching for a match of this object's locale's + * currency display names, or for a 3-letter ISO currency code. + * This method will fail if this format is not a currency format, + * that is, if it does not contain the currency pattern symbol + * (U+00A4) in its prefix or suffix. This implementation always returns + * NULL. + * + * @param text the string to parse + * @param pos input-output position; on input, the position within text + * to match; must have 0 <= pos.getIndex() < text.length(); + * on output, the position after the last matched character. + * If the parse fails, the position in unchanged upon output. + * @return if parse succeeds, a pointer to a newly-created CurrencyAmount + * object (owned by the caller) containing information about + * the parsed currency; if parse fails, this is NULL. + * @internal + */ + virtual CurrencyAmount* parseCurrency(const UnicodeString& text, + ParsePosition& pos) const; + + /** + * Return the class ID for this class. This is useful only for + * comparing to a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . Derived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 51 + */ + static UClassID U_EXPORT2 getStaticClassID(); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. + * This method is to implement a simple version of RTTI, since not all + * C++ compilers support genuine RTTI. Polymorphic operator==() and + * clone() methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 51 + */ + virtual UClassID getDynamicClassID() const; + +private: + + const UHashtable* _unitsByVariant; + const double* _divisors; + PluralRules* _pluralRules; + + // Default constructor not implemented. + CompactDecimalFormat(const DecimalFormat &, const UHashtable* unitsByVariant, const double* divisors, PluralRules* pluralRules); + + UBool eqHelper(const CompactDecimalFormat& that) const; +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // __COMPACT_DECIMAL_FORMAT_H__ +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/curramt.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/curramt.h new file mode 100755 index 00000000..e321df86 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/curramt.h @@ -0,0 +1,132 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (c) 2004-2006, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* Author: Alan Liu +* Created: April 26, 2004 +* Since: ICU 3.0 +********************************************************************** +*/ +#ifndef __CURRENCYAMOUNT_H__ +#define __CURRENCYAMOUNT_H__ + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/measure.h" +#include "unicode/currunit.h" + +/** + * \file + * \brief C++ API: Currency Amount Object. + */ + +U_NAMESPACE_BEGIN + +/** + * + * A currency together with a numeric amount, such as 200 USD. + * + * @author Alan Liu + * @stable ICU 3.0 + */ +class U_I18N_API CurrencyAmount: public Measure { + public: + /** + * Construct an object with the given numeric amount and the given + * ISO currency code. + * @param amount a numeric object; amount.isNumeric() must be TRUE + * @param isoCode the 3-letter ISO 4217 currency code; must not be + * NULL and must have length 3 + * @param ec input-output error code. If the amount or the isoCode + * is invalid, then this will be set to a failing value. + * @stable ICU 3.0 + */ + CurrencyAmount(const Formattable& amount, ConstChar16Ptr isoCode, + UErrorCode &ec); + + /** + * Construct an object with the given numeric amount and the given + * ISO currency code. + * @param amount the amount of the given currency + * @param isoCode the 3-letter ISO 4217 currency code; must not be + * NULL and must have length 3 + * @param ec input-output error code. If the isoCode is invalid, + * then this will be set to a failing value. + * @stable ICU 3.0 + */ + CurrencyAmount(double amount, ConstChar16Ptr isoCode, + UErrorCode &ec); + + /** + * Copy constructor + * @stable ICU 3.0 + */ + CurrencyAmount(const CurrencyAmount& other); + + /** + * Assignment operator + * @stable ICU 3.0 + */ + CurrencyAmount& operator=(const CurrencyAmount& other); + + /** + * Return a polymorphic clone of this object. The result will + * have the same class as returned by getDynamicClassID(). + * @stable ICU 3.0 + */ + virtual UObject* clone() const; + + /** + * Destructor + * @stable ICU 3.0 + */ + virtual ~CurrencyAmount(); + + /** + * Returns a unique class ID for this object POLYMORPHICALLY. + * This method implements a simple form of RTTI used by ICU. + * @return The class ID for this object. All objects of a given + * class have the same class ID. Objects of other classes have + * different class IDs. + * @stable ICU 3.0 + */ + virtual UClassID getDynamicClassID() const; + + /** + * Returns the class ID for this class. This is used to compare to + * the return value of getDynamicClassID(). + * @return The class ID for all objects of this class. + * @stable ICU 3.0 + */ + static UClassID U_EXPORT2 getStaticClassID(); + + /** + * Return the currency unit object of this object. + * @stable ICU 3.0 + */ + inline const CurrencyUnit& getCurrency() const; + + /** + * Return the ISO currency code of this object. + * @stable ICU 3.0 + */ + inline const char16_t* getISOCurrency() const; +}; + +inline const CurrencyUnit& CurrencyAmount::getCurrency() const { + return (const CurrencyUnit&) getUnit(); +} + +inline const char16_t* CurrencyAmount::getISOCurrency() const { + return getCurrency().getISOCurrency(); +} + +U_NAMESPACE_END + +#endif // !UCONFIG_NO_FORMATTING +#endif // __CURRENCYAMOUNT_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/currpinf.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/currpinf.h new file mode 100755 index 00000000..33c18b08 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/currpinf.h @@ -0,0 +1,261 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ******************************************************************************* + * Copyright (C) 2009-2015, International Business Machines Corporation and * + * others. All Rights Reserved. * + ******************************************************************************* + */ +#ifndef CURRPINF_H +#define CURRPINF_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Currency Plural Information used by Decimal Format + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/unistr.h" + +U_NAMESPACE_BEGIN + +class Locale; +class PluralRules; +class Hashtable; + +/** + * This class represents the information needed by + * DecimalFormat to format currency plural, + * such as "3.00 US dollars" or "1.00 US dollar". + * DecimalFormat creates for itself an instance of + * CurrencyPluralInfo from its locale data. + * If you need to change any of these symbols, you can get the + * CurrencyPluralInfo object from your + * DecimalFormat and modify it. + * + * Following are the information needed for currency plural format and parse: + * locale information, + * plural rule of the locale, + * currency plural pattern of the locale. + * + * @stable ICU 4.2 + */ +class U_I18N_API CurrencyPluralInfo : public UObject { +public: + + /** + * Create a CurrencyPluralInfo object for the default locale. + * @param status output param set to success/failure code on exit + * @stable ICU 4.2 + */ + CurrencyPluralInfo(UErrorCode& status); + + /** + * Create a CurrencyPluralInfo object for the given locale. + * @param locale the locale + * @param status output param set to success/failure code on exit + * @stable ICU 4.2 + */ + CurrencyPluralInfo(const Locale& locale, UErrorCode& status); + + /** + * Copy constructor + * + * @stable ICU 4.2 + */ + CurrencyPluralInfo(const CurrencyPluralInfo& info); + + + /** + * Assignment operator + * + * @stable ICU 4.2 + */ + CurrencyPluralInfo& operator=(const CurrencyPluralInfo& info); + + + /** + * Destructor + * + * @stable ICU 4.2 + */ + virtual ~CurrencyPluralInfo(); + + + /** + * Equal operator. + * + * @stable ICU 4.2 + */ + UBool operator==(const CurrencyPluralInfo& info) const; + + + /** + * Not equal operator + * + * @stable ICU 4.2 + */ + UBool operator!=(const CurrencyPluralInfo& info) const; + + + /** + * Clone + * + * @stable ICU 4.2 + */ + CurrencyPluralInfo* clone() const; + + + /** + * Gets plural rules of this locale, used for currency plural format + * + * @return plural rule + * @stable ICU 4.2 + */ + const PluralRules* getPluralRules() const; + + /** + * Given a plural count, gets currency plural pattern of this locale, + * used for currency plural format + * + * @param pluralCount currency plural count + * @param result output param to receive the pattern + * @return a currency plural pattern based on plural count + * @stable ICU 4.2 + */ + UnicodeString& getCurrencyPluralPattern(const UnicodeString& pluralCount, + UnicodeString& result) const; + + /** + * Get locale + * + * @return locale + * @stable ICU 4.2 + */ + const Locale& getLocale() const; + + /** + * Set plural rules. + * The plural rule is set when CurrencyPluralInfo + * instance is created. + * You can call this method to reset plural rules only if you want + * to modify the default plural rule of the locale. + * + * @param ruleDescription new plural rule description + * @param status output param set to success/failure code on exit + * @stable ICU 4.2 + */ + void setPluralRules(const UnicodeString& ruleDescription, + UErrorCode& status); + + /** + * Set currency plural pattern. + * The currency plural pattern is set when CurrencyPluralInfo + * instance is created. + * You can call this method to reset currency plural pattern only if + * you want to modify the default currency plural pattern of the locale. + * + * @param pluralCount the plural count for which the currency pattern will + * be overridden. + * @param pattern the new currency plural pattern + * @param status output param set to success/failure code on exit + * @stable ICU 4.2 + */ + void setCurrencyPluralPattern(const UnicodeString& pluralCount, + const UnicodeString& pattern, + UErrorCode& status); + + /** + * Set locale + * + * @param loc the new locale to set + * @param status output param set to success/failure code on exit + * @stable ICU 4.2 + */ + void setLocale(const Locale& loc, UErrorCode& status); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 4.2 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 4.2 + */ + static UClassID U_EXPORT2 getStaticClassID(); + +private: + friend class DecimalFormat; + friend class DecimalFormatImpl; + + void initialize(const Locale& loc, UErrorCode& status); + + void setupCurrencyPluralPattern(const Locale& loc, UErrorCode& status); + + /* + * delete hash table + * + * @param hTable hash table to be deleted + */ + void deleteHash(Hashtable* hTable); + + + /* + * initialize hash table + * + * @param status output param set to success/failure code on exit + * @return hash table initialized + */ + Hashtable* initHash(UErrorCode& status); + + + + /** + * copy hash table + * + * @param source the source to copy from + * @param target the target to copy to + * @param status error code + */ + void copyHash(const Hashtable* source, Hashtable* target, UErrorCode& status); + + //-------------------- private data member --------------------- + // map from plural count to currency plural pattern, for example + // a plural pattern defined in "CurrencyUnitPatterns" is + // "one{{0} {1}}", in which "one" is a plural count + // and "{0} {1}" is a currency plural pattern". + // The currency plural pattern saved in this mapping is the pattern + // defined in "CurrencyUnitPattern" by replacing + // {0} with the number format pattern, + // and {1} with 3 currency sign. + Hashtable* fPluralCountToCurrencyUnitPattern; + + /* + * The plural rule is used to format currency plural name, + * for example: "3.00 US Dollars". + * If there are 3 currency signs in the currency patttern, + * the 3 currency signs will be replaced by currency plural name. + */ + PluralRules* fPluralRules; + + // locale + Locale* fLocale; +}; + + +inline UBool +CurrencyPluralInfo::operator!=(const CurrencyPluralInfo& info) const { return !operator==(info); } + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _CURRPINFO +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/currunit.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/currunit.h new file mode 100755 index 00000000..5ad23b1f --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/currunit.h @@ -0,0 +1,130 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (c) 2004-2014, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* Author: Alan Liu +* Created: April 26, 2004 +* Since: ICU 3.0 +********************************************************************** +*/ +#ifndef __CURRENCYUNIT_H__ +#define __CURRENCYUNIT_H__ + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/measunit.h" + +/** + * \file + * \brief C++ API: Currency Unit Information. + */ + +U_NAMESPACE_BEGIN + +/** + * A unit of currency, such as USD (U.S. dollars) or JPY (Japanese + * yen). This class is a thin wrapper over a char16_t string that + * subclasses MeasureUnit, for use with Measure and MeasureFormat. + * + * @author Alan Liu + * @stable ICU 3.0 + */ +class U_I18N_API CurrencyUnit: public MeasureUnit { + public: + /** + * Default constructor. Initializes currency code to "XXX" (no currency). + * @draft ICU 60 + */ + CurrencyUnit(); + + /** + * Construct an object with the given ISO currency code. + * @param isoCode the 3-letter ISO 4217 currency code; must not be + * NULL and must have length 3 + * @param ec input-output error code. If the isoCode is invalid, + * then this will be set to a failing value. + * @stable ICU 3.0 + */ + CurrencyUnit(ConstChar16Ptr isoCode, UErrorCode &ec); + + /** + * Copy constructor + * @stable ICU 3.0 + */ + CurrencyUnit(const CurrencyUnit& other); + +#ifndef U_HIDE_DRAFT_API + /** + * Copy constructor from MeasureUnit. This constructor allows you to + * restore a CurrencyUnit that was sliced to MeasureUnit. + * + * @param measureUnit The MeasureUnit to copy from. + * @param ec Set to a failing value if the MeasureUnit is not a currency. + * @draft ICU 60 + */ + CurrencyUnit(const MeasureUnit& measureUnit, UErrorCode &ec); +#endif /* U_HIDE_DRAFT_API */ + + /** + * Assignment operator + * @stable ICU 3.0 + */ + CurrencyUnit& operator=(const CurrencyUnit& other); + + /** + * Return a polymorphic clone of this object. The result will + * have the same class as returned by getDynamicClassID(). + * @stable ICU 3.0 + */ + virtual UObject* clone() const; + + /** + * Destructor + * @stable ICU 3.0 + */ + virtual ~CurrencyUnit(); + + /** + * Returns a unique class ID for this object POLYMORPHICALLY. + * This method implements a simple form of RTTI used by ICU. + * @return The class ID for this object. All objects of a given + * class have the same class ID. Objects of other classes have + * different class IDs. + * @stable ICU 3.0 + */ + virtual UClassID getDynamicClassID() const; + + /** + * Returns the class ID for this class. This is used to compare to + * the return value of getDynamicClassID(). + * @return The class ID for all objects of this class. + * @stable ICU 3.0 + */ + static UClassID U_EXPORT2 getStaticClassID(); + + /** + * Return the ISO currency code of this object. + * @stable ICU 3.0 + */ + inline const char16_t* getISOCurrency() const; + + private: + /** + * The ISO 4217 code of this object. + */ + char16_t isoCode[4]; +}; + +inline const char16_t* CurrencyUnit::getISOCurrency() const { + return isoCode; +} + +U_NAMESPACE_END + +#endif // !UCONFIG_NO_FORMATTING +#endif // __CURRENCYUNIT_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/datefmt.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/datefmt.h new file mode 100755 index 00000000..f8bcf54b --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/datefmt.h @@ -0,0 +1,953 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ******************************************************************************** + * Copyright (C) 1997-2016, International Business Machines + * Corporation and others. All Rights Reserved. + ******************************************************************************** + * + * File DATEFMT.H + * + * Modification History: + * + * Date Name Description + * 02/19/97 aliu Converted from java. + * 04/01/97 aliu Added support for centuries. + * 07/23/98 stephen JDK 1.2 sync + * 11/15/99 weiv Added support for week of year/day of week formatting + ******************************************************************************** + */ + +#ifndef DATEFMT_H +#define DATEFMT_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/udat.h" +#include "unicode/calendar.h" +#include "unicode/numfmt.h" +#include "unicode/format.h" +#include "unicode/locid.h" +#include "unicode/enumset.h" +#include "unicode/udisplaycontext.h" + +/** + * \file + * \brief C++ API: Abstract class for converting dates. + */ + +U_NAMESPACE_BEGIN + +class TimeZone; +class DateTimePatternGenerator; + +// explicit template instantiation. see digitlst.h +// (When building DLLs for Windows this is required.) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +template class U_I18N_API EnumSet<UDateFormatBooleanAttribute, + 0, + UDAT_BOOLEAN_ATTRIBUTE_COUNT>; +#endif + +/** + * DateFormat is an abstract class for a family of classes that convert dates and + * times from their internal representations to textual form and back again in a + * language-independent manner. Converting from the internal representation (milliseconds + * since midnight, January 1, 1970) to text is known as "formatting," and converting + * from text to millis is known as "parsing." We currently define only one concrete + * subclass of DateFormat: SimpleDateFormat, which can handle pretty much all normal + * date formatting and parsing actions. + * <P> + * DateFormat helps you to format and parse dates for any locale. Your code can + * be completely independent of the locale conventions for months, days of the + * week, or even the calendar format: lunar vs. solar. + * <P> + * To format a date for the current Locale, use one of the static factory + * methods: + * <pre> + * \code + * DateFormat* dfmt = DateFormat::createDateInstance(); + * UDate myDate = Calendar::getNow(); + * UnicodeString myString; + * myString = dfmt->format( myDate, myString ); + * \endcode + * </pre> + * If you are formatting multiple numbers, it is more efficient to get the + * format and use it multiple times so that the system doesn't have to fetch the + * information about the local language and country conventions multiple times. + * <pre> + * \code + * DateFormat* df = DateFormat::createDateInstance(); + * UnicodeString myString; + * UDate myDateArr[] = { 0.0, 100000000.0, 2000000000.0 }; // test values + * for (int32_t i = 0; i < 3; ++i) { + * myString.remove(); + * cout << df->format( myDateArr[i], myString ) << endl; + * } + * \endcode + * </pre> + * To get specific fields of a date, you can use UFieldPosition to + * get specific fields. + * <pre> + * \code + * DateFormat* dfmt = DateFormat::createDateInstance(); + * FieldPosition pos(DateFormat::YEAR_FIELD); + * UnicodeString myString; + * myString = dfmt->format( myDate, myString ); + * cout << myString << endl; + * cout << pos.getBeginIndex() << "," << pos. getEndIndex() << endl; + * \endcode + * </pre> + * To format a date for a different Locale, specify it in the call to + * createDateInstance(). + * <pre> + * \code + * DateFormat* df = + * DateFormat::createDateInstance( DateFormat::SHORT, Locale::getFrance()); + * \endcode + * </pre> + * You can use a DateFormat to parse also. + * <pre> + * \code + * UErrorCode status = U_ZERO_ERROR; + * UDate myDate = df->parse(myString, status); + * \endcode + * </pre> + * Use createDateInstance() to produce the normal date format for that country. + * There are other static factory methods available. Use createTimeInstance() + * to produce the normal time format for that country. Use createDateTimeInstance() + * to produce a DateFormat that formats both date and time. You can pass in + * different options to these factory methods to control the length of the + * result; from SHORT to MEDIUM to LONG to FULL. The exact result depends on the + * locale, but generally: + * <ul type=round> + * <li> SHORT is completely numeric, such as 12/13/52 or 3:30pm + * <li> MEDIUM is longer, such as Jan 12, 1952 + * <li> LONG is longer, such as January 12, 1952 or 3:30:32pm + * <li> FULL is pretty completely specified, such as + * Tuesday, April 12, 1952 AD or 3:30:42pm PST. + * </ul> + * You can also set the time zone on the format if you wish. If you want even + * more control over the format or parsing, (or want to give your users more + * control), you can try casting the DateFormat you get from the factory methods + * to a SimpleDateFormat. This will work for the majority of countries; just + * remember to chck getDynamicClassID() before carrying out the cast. + * <P> + * You can also use forms of the parse and format methods with ParsePosition and + * FieldPosition to allow you to + * <ul type=round> + * <li> Progressively parse through pieces of a string. + * <li> Align any particular field, or find out where it is for selection + * on the screen. + * </ul> + * + * <p><em>User subclasses are not supported.</em> While clients may write + * subclasses, such code will not necessarily work and will not be + * guaranteed to work stably from release to release. + */ +class U_I18N_API DateFormat : public Format { +public: + + /** + * Constants for various style patterns. These reflect the order of items in + * the DateTimePatterns resource. There are 4 time patterns, 4 date patterns, + * the default date-time pattern, and 4 date-time patterns. Each block of 4 values + * in the resource occurs in the order full, long, medium, short. + * @stable ICU 2.4 + */ + enum EStyle + { + kNone = -1, + + kFull = 0, + kLong = 1, + kMedium = 2, + kShort = 3, + + kDateOffset = kShort + 1, + // kFull + kDateOffset = 4 + // kLong + kDateOffset = 5 + // kMedium + kDateOffset = 6 + // kShort + kDateOffset = 7 + + kDateTime = 8, + // Default DateTime + + kDateTimeOffset = kDateTime + 1, + // kFull + kDateTimeOffset = 9 + // kLong + kDateTimeOffset = 10 + // kMedium + kDateTimeOffset = 11 + // kShort + kDateTimeOffset = 12 + + // relative dates + kRelative = (1 << 7), + + kFullRelative = (kFull | kRelative), + + kLongRelative = kLong | kRelative, + + kMediumRelative = kMedium | kRelative, + + kShortRelative = kShort | kRelative, + + + kDefault = kMedium, + + + + /** + * These constants are provided for backwards compatibility only. + * Please use the C++ style constants defined above. + */ + FULL = kFull, + LONG = kLong, + MEDIUM = kMedium, + SHORT = kShort, + DEFAULT = kDefault, + DATE_OFFSET = kDateOffset, + NONE = kNone, + DATE_TIME = kDateTime + }; + + /** + * Destructor. + * @stable ICU 2.0 + */ + virtual ~DateFormat(); + + /** + * Equality operator. Returns true if the two formats have the same behavior. + * @stable ICU 2.0 + */ + virtual UBool operator==(const Format&) const; + + + using Format::format; + + /** + * Format an object to produce a string. This method handles Formattable + * objects with a UDate type. If a the Formattable object type is not a Date, + * then it returns a failing UErrorCode. + * + * @param obj The object to format. Must be a Date. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.0 + */ + virtual UnicodeString& format(const Formattable& obj, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& status) const; + + /** + * Format an object to produce a string. This method handles Formattable + * objects with a UDate type. If a the Formattable object type is not a Date, + * then it returns a failing UErrorCode. + * + * @param obj The object to format. Must be a Date. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. Field values + * are defined in UDateFormatField. Can be NULL. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.4 + */ + virtual UnicodeString& format(const Formattable& obj, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + /** + * Formats a date into a date/time string. This is an abstract method which + * concrete subclasses must implement. + * <P> + * On input, the FieldPosition parameter may have its "field" member filled with + * an enum value specifying a field. On output, the FieldPosition will be filled + * in with the text offsets for that field. + * <P> For example, given a time text + * "1996.07.10 AD at 15:08:56 PDT", if the given fieldPosition.field is + * UDAT_YEAR_FIELD, the offsets fieldPosition.beginIndex and + * statfieldPositionus.getEndIndex will be set to 0 and 4, respectively. + * <P> Notice + * that if the same time field appears more than once in a pattern, the status will + * be set for the first occurence of that time field. For instance, + * formatting a UDate to the time string "1 PM PDT (Pacific Daylight Time)" + * using the pattern "h a z (zzzz)" and the alignment field + * DateFormat::TIMEZONE_FIELD, the offsets fieldPosition.beginIndex and + * fieldPosition.getEndIndex will be set to 5 and 8, respectively, for the first + * occurence of the timezone pattern character 'z'. + * + * @param cal Calendar set to the date and time to be formatted + * into a date/time string. When the calendar type is + * different from the internal calendar held by this + * DateFormat instance, the date and the time zone will + * be inherited from the input calendar, but other calendar + * field values will be calculated by the internal calendar. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param fieldPosition On input: an alignment field, if desired (see examples above) + * On output: the offsets of the alignment field (see examples above) + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.1 + */ + virtual UnicodeString& format( Calendar& cal, + UnicodeString& appendTo, + FieldPosition& fieldPosition) const = 0; + + /** + * Formats a date into a date/time string. Subclasses should implement this method. + * + * @param cal Calendar set to the date and time to be formatted + * into a date/time string. When the calendar type is + * different from the internal calendar held by this + * DateFormat instance, the date and the time zone will + * be inherited from the input calendar, but other calendar + * field values will be calculated by the internal calendar. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. Field values + * are defined in UDateFormatField. Can be NULL. + * @param status error status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.4 + */ + virtual UnicodeString& format(Calendar& cal, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + /** + * Formats a UDate into a date/time string. + * <P> + * On input, the FieldPosition parameter may have its "field" member filled with + * an enum value specifying a field. On output, the FieldPosition will be filled + * in with the text offsets for that field. + * <P> For example, given a time text + * "1996.07.10 AD at 15:08:56 PDT", if the given fieldPosition.field is + * UDAT_YEAR_FIELD, the offsets fieldPosition.beginIndex and + * statfieldPositionus.getEndIndex will be set to 0 and 4, respectively. + * <P> Notice + * that if the same time field appears more than once in a pattern, the status will + * be set for the first occurence of that time field. For instance, + * formatting a UDate to the time string "1 PM PDT (Pacific Daylight Time)" + * using the pattern "h a z (zzzz)" and the alignment field + * DateFormat::TIMEZONE_FIELD, the offsets fieldPosition.beginIndex and + * fieldPosition.getEndIndex will be set to 5 and 8, respectively, for the first + * occurence of the timezone pattern character 'z'. + * + * @param date UDate to be formatted into a date/time string. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param fieldPosition On input: an alignment field, if desired (see examples above) + * On output: the offsets of the alignment field (see examples above) + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.0 + */ + UnicodeString& format( UDate date, + UnicodeString& appendTo, + FieldPosition& fieldPosition) const; + + /** + * Formats a UDate into a date/time string. + * + * @param date UDate to be formatted into a date/time string. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. Field values + * are defined in UDateFormatField. Can be NULL. + * @param status error status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.4 + */ + UnicodeString& format(UDate date, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + /** + * Formats a UDate into a date/time string. If there is a problem, you won't + * know, using this method. Use the overloaded format() method which takes a + * FieldPosition& to detect formatting problems. + * + * @param date The UDate value to be formatted into a string. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.0 + */ + UnicodeString& format(UDate date, UnicodeString& appendTo) const; + + /** + * Parse a date/time string. For example, a time text "07/10/96 4:5 PM, PDT" + * will be parsed into a UDate that is equivalent to Date(837039928046). + * Parsing begins at the beginning of the string and proceeds as far as + * possible. Assuming no parse errors were encountered, this function + * doesn't return any information about how much of the string was consumed + * by the parsing. If you need that information, use the version of + * parse() that takes a ParsePosition. + * <P> + * By default, parsing is lenient: If the input is not in the form used by + * this object's format method but can still be parsed as a date, then the + * parse succeeds. Clients may insist on strict adherence to the format by + * calling setLenient(false). + * @see DateFormat::setLenient(boolean) + * <P> + * Note that the normal date formats associated with some calendars - such + * as the Chinese lunar calendar - do not specify enough fields to enable + * dates to be parsed unambiguously. In the case of the Chinese lunar + * calendar, while the year within the current 60-year cycle is specified, + * the number of such cycles since the start date of the calendar (in the + * ERA field of the Calendar object) is not normally part of the format, + * and parsing may assume the wrong era. For cases such as this it is + * recommended that clients parse using the method + * parse(const UnicodeString&, Calendar& cal, ParsePosition&) + * with the Calendar passed in set to the current date, or to a date + * within the era/cycle that should be assumed if absent in the format. + * + * @param text The date/time string to be parsed into a UDate value. + * @param status Output param to be set to success/failure code. If + * 'text' cannot be parsed, it will be set to a failure + * code. + * @return The parsed UDate value, if successful. + * @stable ICU 2.0 + */ + virtual UDate parse( const UnicodeString& text, + UErrorCode& status) const; + + /** + * Parse a date/time string beginning at the given parse position. For + * example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Date + * that is equivalent to Date(837039928046). + * <P> + * By default, parsing is lenient: If the input is not in the form used by + * this object's format method but can still be parsed as a date, then the + * parse succeeds. Clients may insist on strict adherence to the format by + * calling setLenient(false). + * @see DateFormat::setLenient(boolean) + * + * @param text The date/time string to be parsed. + * @param cal A Calendar set on input to the date and time to be used for + * missing values in the date/time string being parsed, and set + * on output to the parsed date/time. When the calendar type is + * different from the internal calendar held by this DateFormat + * instance, the internal calendar will be cloned to a work + * calendar set to the same milliseconds and time zone as the + * cal parameter, field values will be parsed based on the work + * calendar, then the result (milliseconds and time zone) will + * be set in this calendar. + * @param pos On input, the position at which to start parsing; on + * output, the position at which parsing terminated, or the + * start position if the parse failed. + * @stable ICU 2.1 + */ + virtual void parse( const UnicodeString& text, + Calendar& cal, + ParsePosition& pos) const = 0; + + /** + * Parse a date/time string beginning at the given parse position. For + * example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Date + * that is equivalent to Date(837039928046). + * <P> + * By default, parsing is lenient: If the input is not in the form used by + * this object's format method but can still be parsed as a date, then the + * parse succeeds. Clients may insist on strict adherence to the format by + * calling setLenient(false). + * @see DateFormat::setLenient(boolean) + * <P> + * Note that the normal date formats associated with some calendars - such + * as the Chinese lunar calendar - do not specify enough fields to enable + * dates to be parsed unambiguously. In the case of the Chinese lunar + * calendar, while the year within the current 60-year cycle is specified, + * the number of such cycles since the start date of the calendar (in the + * ERA field of the Calendar object) is not normally part of the format, + * and parsing may assume the wrong era. For cases such as this it is + * recommended that clients parse using the method + * parse(const UnicodeString&, Calendar& cal, ParsePosition&) + * with the Calendar passed in set to the current date, or to a date + * within the era/cycle that should be assumed if absent in the format. + * + * @param text The date/time string to be parsed into a UDate value. + * @param pos On input, the position at which to start parsing; on + * output, the position at which parsing terminated, or the + * start position if the parse failed. + * @return A valid UDate if the input could be parsed. + * @stable ICU 2.0 + */ + UDate parse( const UnicodeString& text, + ParsePosition& pos) const; + + /** + * Parse a string to produce an object. This methods handles parsing of + * date/time strings into Formattable objects with UDate types. + * <P> + * Before calling, set parse_pos.index to the offset you want to start + * parsing at in the source. After calling, parse_pos.index is the end of + * the text you parsed. If error occurs, index is unchanged. + * <P> + * When parsing, leading whitespace is discarded (with a successful parse), + * while trailing whitespace is left as is. + * <P> + * See Format::parseObject() for more. + * + * @param source The string to be parsed into an object. + * @param result Formattable to be set to the parse result. + * If parse fails, return contents are undefined. + * @param parse_pos The position to start parsing at. Upon return + * this param is set to the position after the + * last character successfully parsed. If the + * source is not parsed successfully, this param + * will remain unchanged. + * @stable ICU 2.0 + */ + virtual void parseObject(const UnicodeString& source, + Formattable& result, + ParsePosition& parse_pos) const; + + /** + * Create a default date/time formatter that uses the SHORT style for both + * the date and the time. + * + * @return A date/time formatter which the caller owns. + * @stable ICU 2.0 + */ + static DateFormat* U_EXPORT2 createInstance(void); + + /** + * Creates a time formatter with the given formatting style for the given + * locale. + * + * @param style The given formatting style. For example, + * SHORT for "h:mm a" in the US locale. Relative + * time styles are not currently supported. + * @param aLocale The given locale. + * @return A time formatter which the caller owns. + * @stable ICU 2.0 + */ + static DateFormat* U_EXPORT2 createTimeInstance(EStyle style = kDefault, + const Locale& aLocale = Locale::getDefault()); + + /** + * Creates a date formatter with the given formatting style for the given + * const locale. + * + * @param style The given formatting style. For example, SHORT for "M/d/yy" in the + * US locale. As currently implemented, relative date formatting only + * affects a limited range of calendar days before or after the + * current date, based on the CLDR <field type="day">/<relative> data: + * For example, in English, "Yesterday", "Today", and "Tomorrow". + * Outside of this range, dates are formatted using the corresponding + * non-relative style. + * @param aLocale The given locale. + * @return A date formatter which the caller owns. + * @stable ICU 2.0 + */ + static DateFormat* U_EXPORT2 createDateInstance(EStyle style = kDefault, + const Locale& aLocale = Locale::getDefault()); + + /** + * Creates a date/time formatter with the given formatting styles for the + * given locale. + * + * @param dateStyle The given formatting style for the date portion of the result. + * For example, SHORT for "M/d/yy" in the US locale. As currently + * implemented, relative date formatting only affects a limited range + * of calendar days before or after the current date, based on the + * CLDR <field type="day">/<relative> data: For example, in English, + * "Yesterday", "Today", and "Tomorrow". Outside of this range, dates + * are formatted using the corresponding non-relative style. + * @param timeStyle The given formatting style for the time portion of the result. + * For example, SHORT for "h:mm a" in the US locale. Relative + * time styles are not currently supported. + * @param aLocale The given locale. + * @return A date/time formatter which the caller owns. + * @stable ICU 2.0 + */ + static DateFormat* U_EXPORT2 createDateTimeInstance(EStyle dateStyle = kDefault, + EStyle timeStyle = kDefault, + const Locale& aLocale = Locale::getDefault()); + +#ifndef U_HIDE_INTERNAL_API + /** + * Returns the best pattern given a skeleton and locale. + * @param locale the locale + * @param skeleton the skeleton + * @param status ICU error returned here + * @return the best pattern. + * @internal For ICU use only. + */ + static UnicodeString getBestPattern( + const Locale &locale, + const UnicodeString &skeleton, + UErrorCode &status); +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Creates a date/time formatter for the given skeleton and + * default locale. + * + * @param skeleton The skeleton e.g "yMMMMd." Fields in the skeleton can + * be in any order, and this method uses the locale to + * map the skeleton to a pattern that includes locale + * specific separators with the fields in the appropriate + * order for that locale. + * @param status Any error returned here. + * @return A date/time formatter which the caller owns. + * @stable ICU 55 + */ + static DateFormat* U_EXPORT2 createInstanceForSkeleton( + const UnicodeString& skeleton, + UErrorCode &status); + + /** + * Creates a date/time formatter for the given skeleton and locale. + * + * @param skeleton The skeleton e.g "yMMMMd." Fields in the skeleton can + * be in any order, and this method uses the locale to + * map the skeleton to a pattern that includes locale + * specific separators with the fields in the appropriate + * order for that locale. + * @param locale The given locale. + * @param status Any error returned here. + * @return A date/time formatter which the caller owns. + * @stable ICU 55 + */ + static DateFormat* U_EXPORT2 createInstanceForSkeleton( + const UnicodeString& skeleton, + const Locale &locale, + UErrorCode &status); + + /** + * Creates a date/time formatter for the given skeleton and locale. + * + * @param calendarToAdopt the calendar returned DateFormat is to use. + * @param skeleton The skeleton e.g "yMMMMd." Fields in the skeleton can + * be in any order, and this method uses the locale to + * map the skeleton to a pattern that includes locale + * specific separators with the fields in the appropriate + * order for that locale. + * @param locale The given locale. + * @param status Any error returned here. + * @return A date/time formatter which the caller owns. + * @stable ICU 55 + */ + static DateFormat* U_EXPORT2 createInstanceForSkeleton( + Calendar *calendarToAdopt, + const UnicodeString& skeleton, + const Locale &locale, + UErrorCode &status); + + + /** + * Gets the set of locales for which DateFormats are installed. + * @param count Filled in with the number of locales in the list that is returned. + * @return the set of locales for which DateFormats are installed. The caller + * does NOT own this list and must not delete it. + * @stable ICU 2.0 + */ + static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count); + + /** + * Returns whether both date/time parsing in the encapsulated Calendar object and DateFormat whitespace & + * numeric processing is lenient. + * @stable ICU 2.0 + */ + virtual UBool isLenient(void) const; + + /** + * Specifies whether date/time parsing is to be lenient. With + * lenient parsing, the parser may use heuristics to interpret inputs that + * do not precisely match this object's format. Without lenient parsing, + * inputs must match this object's format more closely. + * + * Note: ICU 53 introduced finer grained control of leniency (and added + * new control points) making the preferred method a combination of + * setCalendarLenient() & setBooleanAttribute() calls. + * This method supports prior functionality but may not support all + * future leniency control & behavior of DateFormat. For control of pre 53 leniency, + * Calendar and DateFormat whitespace & numeric tolerance, this method is safe to + * use. However, mixing leniency control via this method and modification of the + * newer attributes via setBooleanAttribute() may produce undesirable + * results. + * + * @param lenient True specifies date/time interpretation to be lenient. + * @see Calendar::setLenient + * @stable ICU 2.0 + */ + virtual void setLenient(UBool lenient); + + + /** + * Returns whether date/time parsing in the encapsulated Calendar object processing is lenient. + * @stable ICU 53 + */ + virtual UBool isCalendarLenient(void) const; + + + /** + * Specifies whether encapsulated Calendar date/time parsing is to be lenient. With + * lenient parsing, the parser may use heuristics to interpret inputs that + * do not precisely match this object's format. Without lenient parsing, + * inputs must match this object's format more closely. + * @param lenient when true, parsing is lenient + * @see com.ibm.icu.util.Calendar#setLenient + * @stable ICU 53 + */ + virtual void setCalendarLenient(UBool lenient); + + + /** + * Gets the calendar associated with this date/time formatter. + * The calendar is owned by the formatter and must not be modified. + * Also, the calendar does not reflect the results of a parse operation. + * To parse to a calendar, use {@link #parse(const UnicodeString&, Calendar& cal, ParsePosition&) const parse(const UnicodeString&, Calendar& cal, ParsePosition&)} + * @return the calendar associated with this date/time formatter. + * @stable ICU 2.0 + */ + virtual const Calendar* getCalendar(void) const; + + /** + * Set the calendar to be used by this date format. Initially, the default + * calendar for the specified or default locale is used. The caller should + * not delete the Calendar object after it is adopted by this call. + * Adopting a new calendar will change to the default symbols. + * + * @param calendarToAdopt Calendar object to be adopted. + * @stable ICU 2.0 + */ + virtual void adoptCalendar(Calendar* calendarToAdopt); + + /** + * Set the calendar to be used by this date format. Initially, the default + * calendar for the specified or default locale is used. + * + * @param newCalendar Calendar object to be set. + * @stable ICU 2.0 + */ + virtual void setCalendar(const Calendar& newCalendar); + + + /** + * Gets the number formatter which this date/time formatter uses to format + * and parse the numeric portions of the pattern. + * @return the number formatter which this date/time formatter uses. + * @stable ICU 2.0 + */ + virtual const NumberFormat* getNumberFormat(void) const; + + /** + * Allows you to set the number formatter. The caller should + * not delete the NumberFormat object after it is adopted by this call. + * @param formatToAdopt NumberFormat object to be adopted. + * @stable ICU 2.0 + */ + virtual void adoptNumberFormat(NumberFormat* formatToAdopt); + + /** + * Allows you to set the number formatter. + * @param newNumberFormat NumberFormat object to be set. + * @stable ICU 2.0 + */ + virtual void setNumberFormat(const NumberFormat& newNumberFormat); + + /** + * Returns a reference to the TimeZone used by this DateFormat's calendar. + * @return the time zone associated with the calendar of DateFormat. + * @stable ICU 2.0 + */ + virtual const TimeZone& getTimeZone(void) const; + + /** + * Sets the time zone for the calendar of this DateFormat object. The caller + * no longer owns the TimeZone object and should not delete it after this call. + * @param zoneToAdopt the TimeZone to be adopted. + * @stable ICU 2.0 + */ + virtual void adoptTimeZone(TimeZone* zoneToAdopt); + + /** + * Sets the time zone for the calendar of this DateFormat object. + * @param zone the new time zone. + * @stable ICU 2.0 + */ + virtual void setTimeZone(const TimeZone& zone); + + /** + * Set a particular UDisplayContext value in the formatter, such as + * UDISPCTX_CAPITALIZATION_FOR_STANDALONE. + * @param value The UDisplayContext value to set. + * @param status Input/output status. If at entry this indicates a failure + * status, the function will do nothing; otherwise this will be + * updated with any new status from the function. + * @stable ICU 53 + */ + virtual void setContext(UDisplayContext value, UErrorCode& status); + + /** + * Get the formatter's UDisplayContext value for the specified UDisplayContextType, + * such as UDISPCTX_TYPE_CAPITALIZATION. + * @param type The UDisplayContextType whose value to return + * @param status Input/output status. If at entry this indicates a failure + * status, the function will do nothing; otherwise this will be + * updated with any new status from the function. + * @return The UDisplayContextValue for the specified type. + * @stable ICU 53 + */ + virtual UDisplayContext getContext(UDisplayContextType type, UErrorCode& status) const; + + /** + * Sets an boolean attribute on this DateFormat. + * May return U_UNSUPPORTED_ERROR if this instance does not support + * the specified attribute. + * @param attr the attribute to set + * @param newvalue new value + * @param status the error type + * @return *this - for chaining (example: format.setAttribute(...).setAttribute(...) ) + * @stable ICU 53 + */ + + virtual DateFormat& U_EXPORT2 setBooleanAttribute(UDateFormatBooleanAttribute attr, + UBool newvalue, + UErrorCode &status); + + /** + * Returns a boolean from this DateFormat + * May return U_UNSUPPORTED_ERROR if this instance does not support + * the specified attribute. + * @param attr the attribute to set + * @param status the error type + * @return the attribute value. Undefined if there is an error. + * @stable ICU 53 + */ + virtual UBool U_EXPORT2 getBooleanAttribute(UDateFormatBooleanAttribute attr, UErrorCode &status) const; + +protected: + /** + * Default constructor. Creates a DateFormat with no Calendar or NumberFormat + * associated with it. This constructor depends on the subclasses to fill in + * the calendar and numberFormat fields. + * @stable ICU 2.0 + */ + DateFormat(); + + /** + * Copy constructor. + * @stable ICU 2.0 + */ + DateFormat(const DateFormat&); + + /** + * Default assignment operator. + * @stable ICU 2.0 + */ + DateFormat& operator=(const DateFormat&); + + /** + * The calendar that DateFormat uses to produce the time field values needed + * to implement date/time formatting. Subclasses should generally initialize + * this to the default calendar for the locale associated with this DateFormat. + * @stable ICU 2.4 + */ + Calendar* fCalendar; + + /** + * The number formatter that DateFormat uses to format numbers in dates and + * times. Subclasses should generally initialize this to the default number + * format for the locale associated with this DateFormat. + * @stable ICU 2.4 + */ + NumberFormat* fNumberFormat; + + +private: + + /** + * Gets the date/time formatter with the given formatting styles for the + * given locale. + * @param dateStyle the given date formatting style. + * @param timeStyle the given time formatting style. + * @param inLocale the given locale. + * @return a date/time formatter, or 0 on failure. + */ + static DateFormat* U_EXPORT2 create(EStyle timeStyle, EStyle dateStyle, const Locale& inLocale); + + + /** + * enum set of active boolean attributes for this instance + */ + EnumSet<UDateFormatBooleanAttribute, 0, UDAT_BOOLEAN_ATTRIBUTE_COUNT> fBoolFlags; + + + UDisplayContext fCapitalizationContext; + friend class DateFmtKeyByStyle; + +public: +#ifndef U_HIDE_OBSOLETE_API + /** + * Field selector for FieldPosition for DateFormat fields. + * @obsolete ICU 3.4 use UDateFormatField instead, since this API will be + * removed in that release + */ + enum EField + { + // Obsolete; use UDateFormatField instead + kEraField = UDAT_ERA_FIELD, + kYearField = UDAT_YEAR_FIELD, + kMonthField = UDAT_MONTH_FIELD, + kDateField = UDAT_DATE_FIELD, + kHourOfDay1Field = UDAT_HOUR_OF_DAY1_FIELD, + kHourOfDay0Field = UDAT_HOUR_OF_DAY0_FIELD, + kMinuteField = UDAT_MINUTE_FIELD, + kSecondField = UDAT_SECOND_FIELD, + kMillisecondField = UDAT_FRACTIONAL_SECOND_FIELD, + kDayOfWeekField = UDAT_DAY_OF_WEEK_FIELD, + kDayOfYearField = UDAT_DAY_OF_YEAR_FIELD, + kDayOfWeekInMonthField = UDAT_DAY_OF_WEEK_IN_MONTH_FIELD, + kWeekOfYearField = UDAT_WEEK_OF_YEAR_FIELD, + kWeekOfMonthField = UDAT_WEEK_OF_MONTH_FIELD, + kAmPmField = UDAT_AM_PM_FIELD, + kHour1Field = UDAT_HOUR1_FIELD, + kHour0Field = UDAT_HOUR0_FIELD, + kTimezoneField = UDAT_TIMEZONE_FIELD, + kYearWOYField = UDAT_YEAR_WOY_FIELD, + kDOWLocalField = UDAT_DOW_LOCAL_FIELD, + kExtendedYearField = UDAT_EXTENDED_YEAR_FIELD, + kJulianDayField = UDAT_JULIAN_DAY_FIELD, + kMillisecondsInDayField = UDAT_MILLISECONDS_IN_DAY_FIELD, + + // Obsolete; use UDateFormatField instead + ERA_FIELD = UDAT_ERA_FIELD, + YEAR_FIELD = UDAT_YEAR_FIELD, + MONTH_FIELD = UDAT_MONTH_FIELD, + DATE_FIELD = UDAT_DATE_FIELD, + HOUR_OF_DAY1_FIELD = UDAT_HOUR_OF_DAY1_FIELD, + HOUR_OF_DAY0_FIELD = UDAT_HOUR_OF_DAY0_FIELD, + MINUTE_FIELD = UDAT_MINUTE_FIELD, + SECOND_FIELD = UDAT_SECOND_FIELD, + MILLISECOND_FIELD = UDAT_FRACTIONAL_SECOND_FIELD, + DAY_OF_WEEK_FIELD = UDAT_DAY_OF_WEEK_FIELD, + DAY_OF_YEAR_FIELD = UDAT_DAY_OF_YEAR_FIELD, + DAY_OF_WEEK_IN_MONTH_FIELD = UDAT_DAY_OF_WEEK_IN_MONTH_FIELD, + WEEK_OF_YEAR_FIELD = UDAT_WEEK_OF_YEAR_FIELD, + WEEK_OF_MONTH_FIELD = UDAT_WEEK_OF_MONTH_FIELD, + AM_PM_FIELD = UDAT_AM_PM_FIELD, + HOUR1_FIELD = UDAT_HOUR1_FIELD, + HOUR0_FIELD = UDAT_HOUR0_FIELD, + TIMEZONE_FIELD = UDAT_TIMEZONE_FIELD + }; +#endif /* U_HIDE_OBSOLETE_API */ +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _DATEFMT +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dbbi.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dbbi.h new file mode 100755 index 00000000..a2c3d7d7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dbbi.h @@ -0,0 +1,42 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 1999-2006,2013 IBM Corp. All rights reserved. +********************************************************************** +* Date Name Description +* 12/1/99 rgillam Complete port from Java. +* 01/13/2000 helena Added UErrorCode to ctors. +********************************************************************** +*/ + +#ifndef DBBI_H +#define DBBI_H + +#include "unicode/rbbi.h" + +#if !UCONFIG_NO_BREAK_ITERATION + +/** + * \file + * \brief C++ API: Dictionary Based Break Iterator + */ + +U_NAMESPACE_BEGIN + +#ifndef U_HIDE_DEPRECATED_API +/** + * An obsolete subclass of RuleBasedBreakIterator. Handling of dictionary- + * based break iteration has been folded into the base class. This class + * is deprecated as of ICU 3.6. + * @deprecated ICU 3.6 + */ +typedef RuleBasedBreakIterator DictionaryBasedBreakIterator; + +#endif /* U_HIDE_DEPRECATED_API */ + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_BREAK_ITERATION */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dcfmtsym.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dcfmtsym.h new file mode 100755 index 00000000..e58befa3 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dcfmtsym.h @@ -0,0 +1,581 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************** +* Copyright (C) 1997-2016, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************** +* +* File DCFMTSYM.H +* +* Modification History: +* +* Date Name Description +* 02/19/97 aliu Converted from java. +* 03/18/97 clhuang Updated per C++ implementation. +* 03/27/97 helena Updated to pass the simple test after code review. +* 08/26/97 aliu Added currency/intl currency symbol support. +* 07/22/98 stephen Changed to match C++ style +* currencySymbol -> fCurrencySymbol +* Constants changed from CAPS to kCaps +* 06/24/99 helena Integrated Alan's NF enhancements and Java2 bug fixes +* 09/22/00 grhoten Marked deprecation tags with a pointer to replacement +* functions. +******************************************************************************** +*/ + +#ifndef DCFMTSYM_H +#define DCFMTSYM_H + +#include "unicode/utypes.h" +#include "unicode/uchar.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/uobject.h" +#include "unicode/locid.h" +#include "unicode/numsys.h" +#include "unicode/unum.h" +#include "unicode/unistr.h" + +/** + * \file + * \brief C++ API: Symbols for formatting numbers. + */ + + +U_NAMESPACE_BEGIN + +/** + * This class represents the set of symbols needed by DecimalFormat + * to format numbers. DecimalFormat creates for itself an instance of + * DecimalFormatSymbols from its locale data. If you need to change any + * of these symbols, you can get the DecimalFormatSymbols object from + * your DecimalFormat and modify it. + * <P> + * Here are the special characters used in the parts of the + * subpattern, with notes on their usage. + * <pre> + * \code + * Symbol Meaning + * 0 a digit + * # a digit, zero shows as absent + * . placeholder for decimal separator + * , placeholder for grouping separator. + * ; separates formats. + * - default negative prefix. + * % divide by 100 and show as percentage + * X any other characters can be used in the prefix or suffix + * ' used to quote special characters in a prefix or suffix. + * \endcode + * </pre> + * [Notes] + * <P> + * If there is no explicit negative subpattern, - is prefixed to the + * positive form. That is, "0.00" alone is equivalent to "0.00;-0.00". + * <P> + * The grouping separator is commonly used for thousands, but in some + * countries for ten-thousands. The interval is a constant number of + * digits between the grouping characters, such as 100,000,000 or 1,0000,0000. + * If you supply a pattern with multiple grouping characters, the interval + * between the last one and the end of the integer is the one that is + * used. So "#,##,###,####" == "######,####" == "##,####,####". + */ +class U_I18N_API DecimalFormatSymbols : public UObject { +public: + /** + * Constants for specifying a number format symbol. + * @stable ICU 2.0 + */ + enum ENumberFormatSymbol { + /** The decimal separator */ + kDecimalSeparatorSymbol, + /** The grouping separator */ + kGroupingSeparatorSymbol, + /** The pattern separator */ + kPatternSeparatorSymbol, + /** The percent sign */ + kPercentSymbol, + /** Zero*/ + kZeroDigitSymbol, + /** Character representing a digit in the pattern */ + kDigitSymbol, + /** The minus sign */ + kMinusSignSymbol, + /** The plus sign */ + kPlusSignSymbol, + /** The currency symbol */ + kCurrencySymbol, + /** The international currency symbol */ + kIntlCurrencySymbol, + /** The monetary separator */ + kMonetarySeparatorSymbol, + /** The exponential symbol */ + kExponentialSymbol, + /** Per mill symbol - replaces kPermillSymbol */ + kPerMillSymbol, + /** Escape padding character */ + kPadEscapeSymbol, + /** Infinity symbol */ + kInfinitySymbol, + /** Nan symbol */ + kNaNSymbol, + /** Significant digit symbol + * @stable ICU 3.0 */ + kSignificantDigitSymbol, + /** The monetary grouping separator + * @stable ICU 3.6 + */ + kMonetaryGroupingSeparatorSymbol, + /** One + * @stable ICU 4.6 + */ + kOneDigitSymbol, + /** Two + * @stable ICU 4.6 + */ + kTwoDigitSymbol, + /** Three + * @stable ICU 4.6 + */ + kThreeDigitSymbol, + /** Four + * @stable ICU 4.6 + */ + kFourDigitSymbol, + /** Five + * @stable ICU 4.6 + */ + kFiveDigitSymbol, + /** Six + * @stable ICU 4.6 + */ + kSixDigitSymbol, + /** Seven + * @stable ICU 4.6 + */ + kSevenDigitSymbol, + /** Eight + * @stable ICU 4.6 + */ + kEightDigitSymbol, + /** Nine + * @stable ICU 4.6 + */ + kNineDigitSymbol, + /** Multiplication sign. + * @stable ICU 54 + */ + kExponentMultiplicationSymbol, + /** count symbol constants */ + kFormatSymbolCount = kNineDigitSymbol + 2 + }; + + /** + * Create a DecimalFormatSymbols object for the given locale. + * + * @param locale The locale to get symbols for. + * @param status Input/output parameter, set to success or + * failure code upon return. + * @stable ICU 2.0 + */ + DecimalFormatSymbols(const Locale& locale, UErrorCode& status); + +#ifndef U_HIDE_DRAFT_API + /** + * Creates a DecimalFormatSymbols instance for the given locale with digits and symbols + * corresponding to the given NumberingSystem. + * + * This constructor behaves equivalently to the normal constructor called with a locale having a + * "numbers=xxxx" keyword specifying the numbering system by name. + * + * In this constructor, the NumberingSystem argument will be used even if the locale has its own + * "numbers=xxxx" keyword. + * + * @param locale The locale to get symbols for. + * @param ns The numbering system. + * @param status Input/output parameter, set to success or + * failure code upon return. + * @draft ICU 60 + */ + DecimalFormatSymbols(const Locale& locale, const NumberingSystem& ns, UErrorCode& status); +#endif /* U_HIDE_DRAFT_API */ + + /** + * Create a DecimalFormatSymbols object for the default locale. + * This constructor will not fail. If the resource file data is + * not available, it will use hard-coded last-resort data and + * set status to U_USING_FALLBACK_ERROR. + * + * @param status Input/output parameter, set to success or + * failure code upon return. + * @stable ICU 2.0 + */ + DecimalFormatSymbols(UErrorCode& status); + + /** + * Creates a DecimalFormatSymbols object with last-resort data. + * Intended for callers who cache the symbols data and + * set all symbols on the resulting object. + * + * The last-resort symbols are similar to those for the root data, + * except that the grouping separators are empty, + * the NaN symbol is U+FFFD rather than "NaN", + * and the CurrencySpacing patterns are empty. + * + * @param status Input/output parameter, set to success or + * failure code upon return. + * @return last-resort symbols + * @stable ICU 52 + */ + static DecimalFormatSymbols* createWithLastResortData(UErrorCode& status); + + /** + * Copy constructor. + * @stable ICU 2.0 + */ + DecimalFormatSymbols(const DecimalFormatSymbols&); + + /** + * Assignment operator. + * @stable ICU 2.0 + */ + DecimalFormatSymbols& operator=(const DecimalFormatSymbols&); + + /** + * Destructor. + * @stable ICU 2.0 + */ + virtual ~DecimalFormatSymbols(); + + /** + * Return true if another object is semantically equal to this one. + * + * @param other the object to be compared with. + * @return true if another object is semantically equal to this one. + * @stable ICU 2.0 + */ + UBool operator==(const DecimalFormatSymbols& other) const; + + /** + * Return true if another object is semantically unequal to this one. + * + * @param other the object to be compared with. + * @return true if another object is semantically unequal to this one. + * @stable ICU 2.0 + */ + UBool operator!=(const DecimalFormatSymbols& other) const { return !operator==(other); } + + /** + * Get one of the format symbols by its enum constant. + * Each symbol is stored as a string so that graphemes + * (characters with modifier letters) can be used. + * + * @param symbol Constant to indicate a number format symbol. + * @return the format symbols by the param 'symbol' + * @stable ICU 2.0 + */ + inline UnicodeString getSymbol(ENumberFormatSymbol symbol) const; + + /** + * Set one of the format symbols by its enum constant. + * Each symbol is stored as a string so that graphemes + * (characters with modifier letters) can be used. + * + * @param symbol Constant to indicate a number format symbol. + * @param value value of the format symbol + * @param propogateDigits If false, setting the zero digit will not automatically set 1-9. + * The default behavior is to automatically set 1-9 if zero is being set and the value + * it is being set to corresponds to a known Unicode zero digit. + * @stable ICU 2.0 + */ + void setSymbol(ENumberFormatSymbol symbol, const UnicodeString &value, const UBool propogateDigits); + + /** + * Returns the locale for which this object was constructed. + * @stable ICU 2.6 + */ + inline Locale getLocale() const; + + /** + * Returns the locale for this object. Two flavors are available: + * valid and actual locale. + * @stable ICU 2.8 + */ + Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const; + + /** + * Get pattern string for 'CurrencySpacing' that can be applied to + * currency format. + * This API gets the CurrencySpacing data from ResourceBundle. The pattern can + * be empty if there is no data from current locale and its parent locales. + * + * @param type : UNUM_CURRENCY_MATCH, UNUM_CURRENCY_SURROUNDING_MATCH or UNUM_CURRENCY_INSERT. + * @param beforeCurrency : true if the pattern is for before currency symbol. + * false if the pattern is for after currency symbol. + * @param status: Input/output parameter, set to success or + * failure code upon return. + * @return pattern string for currencyMatch, surroundingMatch or spaceInsert. + * Return empty string if there is no data for this locale and its parent + * locales. + * @stable ICU 4.8 + */ + const UnicodeString& getPatternForCurrencySpacing(UCurrencySpacing type, + UBool beforeCurrency, + UErrorCode& status) const; + /** + * Set pattern string for 'CurrencySpacing' that can be applied to + * currency format. + * + * @param type : UNUM_CURRENCY_MATCH, UNUM_CURRENCY_SURROUNDING_MATCH or UNUM_CURRENCY_INSERT. + * @param beforeCurrency : true if the pattern is for before currency symbol. + * false if the pattern is for after currency symbol. + * @param pattern : pattern string to override current setting. + * @stable ICU 4.8 + */ + void setPatternForCurrencySpacing(UCurrencySpacing type, + UBool beforeCurrency, + const UnicodeString& pattern); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.2 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.2 + */ + static UClassID U_EXPORT2 getStaticClassID(); + +private: + DecimalFormatSymbols(); + + /** + * Initializes the symbols from the LocaleElements resource bundle. + * Note: The organization of LocaleElements badly needs to be + * cleaned up. + * + * @param locale The locale to get symbols for. + * @param success Input/output parameter, set to success or + * failure code upon return. + * @param useLastResortData determine if use last resort data + * @param ns The NumberingSystem to use; otherwise, fall + * back to the locale. + */ + void initialize(const Locale& locale, UErrorCode& success, + UBool useLastResortData = FALSE, const NumberingSystem* ns = nullptr); + + /** + * Initialize the symbols with default values. + */ + void initialize(); + + void setCurrencyForSymbols(); + +public: + +#ifndef U_HIDE_INTERNAL_API + /** + * @internal For ICU use only + */ + inline UBool isCustomCurrencySymbol() const { + return fIsCustomCurrencySymbol; + } + + /** + * @internal For ICU use only + */ + inline UBool isCustomIntlCurrencySymbol() const { + return fIsCustomIntlCurrencySymbol; + } + + /** + * @internal For ICU use only + */ + inline UChar32 getCodePointZero() const { + return fCodePointZero; + } +#endif /* U_HIDE_INTERNAL_API */ + + /** + * _Internal_ function - more efficient version of getSymbol, + * returning a const reference to one of the symbol strings. + * The returned reference becomes invalid when the symbol is changed + * or when the DecimalFormatSymbols are destroyed. + * ### TODO markus 2002oct11: Consider proposing getConstSymbol() to be really public. + * Note: moved #ifndef U_HIDE_INTERNAL_API after this, since this is needed for inline in DecimalFormat + * + * @param symbol Constant to indicate a number format symbol. + * @return the format symbol by the param 'symbol' + * @internal + */ + inline const UnicodeString& getConstSymbol(ENumberFormatSymbol symbol) const; + +#ifndef U_HIDE_INTERNAL_API + /** + * Returns the const UnicodeString reference, like getConstSymbol, + * corresponding to the digit with the given value. This is equivalent + * to accessing the symbol from getConstSymbol with the corresponding + * key, such as kZeroDigitSymbol or kOneDigitSymbol. + * + * @param digit The digit, an integer between 0 and 9 inclusive. + * If outside the range 0 to 9, the zero digit is returned. + * @return the format symbol for the given digit. + * @internal This API is currently for ICU use only. + */ + inline const UnicodeString& getConstDigitSymbol(int32_t digit) const; + + /** + * Returns that pattern stored in currecy info. Internal API for use by NumberFormat API. + * @internal + */ + inline const char16_t* getCurrencyPattern(void) const; +#endif /* U_HIDE_INTERNAL_API */ + +private: + /** + * Private symbol strings. + * They are either loaded from a resource bundle or otherwise owned. + * setSymbol() clones the symbol string. + * Readonly aliases can only come from a resource bundle, so that we can always + * use fastCopyFrom() with them. + * + * If DecimalFormatSymbols becomes subclassable and the status of fSymbols changes + * from private to protected, + * or when fSymbols can be set any other way that allows them to be readonly aliases + * to non-resource bundle strings, + * then regular UnicodeString copies must be used instead of fastCopyFrom(). + * + * @internal + */ + UnicodeString fSymbols[kFormatSymbolCount]; + + /** + * Non-symbol variable for getConstSymbol(). Always empty. + * @internal + */ + UnicodeString fNoSymbol; + + /** + * Dealing with code points is faster than dealing with strings when formatting. Because of + * this, we maintain a value containing the zero code point that is used whenever digitStrings + * represents a sequence of ten code points in order. + * + * <p>If the value stored here is positive, it means that the code point stored in this value + * corresponds to the digitStrings array, and codePointZero can be used instead of the + * digitStrings array for the purposes of efficient formatting; if -1, then digitStrings does + * *not* contain a sequence of code points, and it must be used directly. + * + * <p>It is assumed that codePointZero always shadows the value in digitStrings. codePointZero + * should never be set directly; rather, it should be updated only when digitStrings mutates. + * That is, the flow of information is digitStrings -> codePointZero, not the other way. + */ + UChar32 fCodePointZero; + + Locale locale; + + char actualLocale[ULOC_FULLNAME_CAPACITY]; + char validLocale[ULOC_FULLNAME_CAPACITY]; + const char16_t* currPattern; + + UnicodeString currencySpcBeforeSym[UNUM_CURRENCY_SPACING_COUNT]; + UnicodeString currencySpcAfterSym[UNUM_CURRENCY_SPACING_COUNT]; + UBool fIsCustomCurrencySymbol; + UBool fIsCustomIntlCurrencySymbol; +}; + +// ------------------------------------- + +inline UnicodeString +DecimalFormatSymbols::getSymbol(ENumberFormatSymbol symbol) const { + const UnicodeString *strPtr; + if(symbol < kFormatSymbolCount) { + strPtr = &fSymbols[symbol]; + } else { + strPtr = &fNoSymbol; + } + return *strPtr; +} + +// See comments above for this function. Not hidden with #ifdef U_HIDE_INTERNAL_API +inline const UnicodeString & +DecimalFormatSymbols::getConstSymbol(ENumberFormatSymbol symbol) const { + const UnicodeString *strPtr; + if(symbol < kFormatSymbolCount) { + strPtr = &fSymbols[symbol]; + } else { + strPtr = &fNoSymbol; + } + return *strPtr; +} + +#ifndef U_HIDE_INTERNAL_API +inline const UnicodeString& DecimalFormatSymbols::getConstDigitSymbol(int32_t digit) const { + if (digit < 0 || digit > 9) { + digit = 0; + } + if (digit == 0) { + return fSymbols[kZeroDigitSymbol]; + } + ENumberFormatSymbol key = static_cast<ENumberFormatSymbol>(kOneDigitSymbol + digit - 1); + return fSymbols[key]; +} +#endif + +// ------------------------------------- + +inline void +DecimalFormatSymbols::setSymbol(ENumberFormatSymbol symbol, const UnicodeString &value, const UBool propogateDigits = TRUE) { + if (symbol == kCurrencySymbol) { + fIsCustomCurrencySymbol = TRUE; + } + else if (symbol == kIntlCurrencySymbol) { + fIsCustomIntlCurrencySymbol = TRUE; + } + if(symbol<kFormatSymbolCount) { + fSymbols[symbol]=value; + } + + // If the zero digit is being set to a known zero digit according to Unicode, + // then we automatically set the corresponding 1-9 digits + // Also record updates to fCodePointZero. Be conservative if in doubt. + if (symbol == kZeroDigitSymbol) { + UChar32 sym = value.char32At(0); + if ( propogateDigits && u_charDigitValue(sym) == 0 && value.countChar32() == 1 ) { + fCodePointZero = sym; + for ( int8_t i = 1 ; i<= 9 ; i++ ) { + sym++; + fSymbols[(int)kOneDigitSymbol+i-1] = UnicodeString(sym); + } + } else { + fCodePointZero = -1; + } + } else if (symbol >= kOneDigitSymbol && symbol <= kNineDigitSymbol) { + fCodePointZero = -1; + } +} + +// ------------------------------------- + +inline Locale +DecimalFormatSymbols::getLocale() const { + return locale; +} + +#ifndef U_HIDE_INTERNAL_API +inline const char16_t* +DecimalFormatSymbols::getCurrencyPattern() const { + return currPattern; +} +#endif /* U_HIDE_INTERNAL_API */ + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _DCFMTSYM +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/decimfmt.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/decimfmt.h new file mode 100755 index 00000000..b062208d --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/decimfmt.h @@ -0,0 +1,2303 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************** +* Copyright (C) 1997-2016, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************** +* +* File DECIMFMT.H +* +* Modification History: +* +* Date Name Description +* 02/19/97 aliu Converted from java. +* 03/20/97 clhuang Updated per C++ implementation. +* 04/03/97 aliu Rewrote parsing and formatting completely, and +* cleaned up and debugged. Actually works now. +* 04/17/97 aliu Changed DigitCount to int per code review. +* 07/10/97 helena Made ParsePosition a class and get rid of the function +* hiding problems. +* 09/09/97 aliu Ported over support for exponential formats. +* 07/20/98 stephen Changed documentation +* 01/30/13 emmons Added Scaling methods +******************************************************************************** +*/ + +#ifndef DECIMFMT_H +#define DECIMFMT_H + +#include "unicode/utypes.h" +/** + * \file + * \brief C++ API: Compatibility APIs for decimal formatting. + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/dcfmtsym.h" +#include "unicode/numfmt.h" +#include "unicode/locid.h" +#include "unicode/fpositer.h" +#include "unicode/stringpiece.h" +#include "unicode/curramt.h" +#include "unicode/enumset.h" + +#ifndef U_HIDE_INTERNAL_API +/** + * \def UNUM_DECIMALFORMAT_INTERNAL_SIZE + * @internal + */ +#if UCONFIG_FORMAT_FASTPATHS_49 +#define UNUM_DECIMALFORMAT_INTERNAL_SIZE 16 +#endif +#endif /* U_HIDE_INTERNAL_API */ + +U_NAMESPACE_BEGIN + +class DigitList; +class CurrencyPluralInfo; +class Hashtable; +class UnicodeSet; +class FieldPositionHandler; +class DecimalFormatStaticSets; +class FixedDecimal; +class DecimalFormatImpl; +class PluralRules; +class VisibleDigitsWithExponent; + +// explicit template instantiation. see digitlst.h +// (When building DLLs for Windows this is required.) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +template class U_I18N_API EnumSet<UNumberFormatAttribute, + UNUM_MAX_NONBOOLEAN_ATTRIBUTE+1, + UNUM_LIMIT_BOOLEAN_ATTRIBUTE>; +#endif + +/** + * <p><strong>IMPORTANT:</strong> New users are strongly encouraged to see if + * numberformatter.h fits their use case. Although not deprecated, this header + * is provided for backwards compatibility only. + * <hr/> + * + * DecimalFormat is a concrete subclass of NumberFormat that formats decimal + * numbers. It has a variety of features designed to make it possible to parse + * and format numbers in any locale, including support for Western, Arabic, or + * Indic digits. It also supports different flavors of numbers, including + * integers ("123"), fixed-point numbers ("123.4"), scientific notation + * ("1.23E4"), percentages ("12%"), and currency amounts ("$123", "USD123", + * "123 US dollars"). All of these flavors can be easily localized. + * + * <p>To obtain a NumberFormat for a specific locale (including the default + * locale) call one of NumberFormat's factory methods such as + * createInstance(). Do not call the DecimalFormat constructors directly, unless + * you know what you are doing, since the NumberFormat factory methods may + * return subclasses other than DecimalFormat. + * + * <p><strong>Example Usage</strong> + * + * \code + * // Normally we would have a GUI with a menu for this + * int32_t locCount; + * const Locale* locales = NumberFormat::getAvailableLocales(locCount); + * + * double myNumber = -1234.56; + * UErrorCode success = U_ZERO_ERROR; + * NumberFormat* form; + * + * // Print out a number with the localized number, currency and percent + * // format for each locale. + * UnicodeString countryName; + * UnicodeString displayName; + * UnicodeString str; + * UnicodeString pattern; + * Formattable fmtable; + * for (int32_t j = 0; j < 3; ++j) { + * cout << endl << "FORMAT " << j << endl; + * for (int32_t i = 0; i < locCount; ++i) { + * if (locales[i].getCountry(countryName).size() == 0) { + * // skip language-only + * continue; + * } + * switch (j) { + * case 0: + * form = NumberFormat::createInstance(locales[i], success ); break; + * case 1: + * form = NumberFormat::createCurrencyInstance(locales[i], success ); break; + * default: + * form = NumberFormat::createPercentInstance(locales[i], success ); break; + * } + * if (form) { + * str.remove(); + * pattern = ((DecimalFormat*)form)->toPattern(pattern); + * cout << locales[i].getDisplayName(displayName) << ": " << pattern; + * cout << " -> " << form->format(myNumber,str) << endl; + * form->parse(form->format(myNumber,str), fmtable, success); + * delete form; + * } + * } + * } + * \endcode + * <P> + * Another example use createInstance(style) + * <P> + * <pre> + * <strong>// Print out a number using the localized number, currency, + * // percent, scientific, integer, iso currency, and plural currency + * // format for each locale</strong> + * Locale* locale = new Locale("en", "US"); + * double myNumber = 1234.56; + * UErrorCode success = U_ZERO_ERROR; + * UnicodeString str; + * Formattable fmtable; + * for (int j=NumberFormat::kNumberStyle; + * j<=NumberFormat::kPluralCurrencyStyle; + * ++j) { + * NumberFormat* format = NumberFormat::createInstance(locale, j, success); + * str.remove(); + * cout << "format result " << form->format(myNumber, str) << endl; + * format->parse(form->format(myNumber, str), fmtable, success); + * }</pre> + * + * + * <p><strong>Patterns</strong> + * + * <p>A DecimalFormat consists of a <em>pattern</em> and a set of + * <em>symbols</em>. The pattern may be set directly using + * applyPattern(), or indirectly using other API methods which + * manipulate aspects of the pattern, such as the minimum number of integer + * digits. The symbols are stored in a DecimalFormatSymbols + * object. When using the NumberFormat factory methods, the + * pattern and symbols are read from ICU's locale data. + * + * <p><strong>Special Pattern Characters</strong> + * + * <p>Many characters in a pattern are taken literally; they are matched during + * parsing and output unchanged during formatting. Special characters, on the + * other hand, stand for other characters, strings, or classes of characters. + * For example, the '#' character is replaced by a localized digit. Often the + * replacement character is the same as the pattern character; in the U.S. locale, + * the ',' grouping character is replaced by ','. However, the replacement is + * still happening, and if the symbols are modified, the grouping character + * changes. Some special characters affect the behavior of the formatter by + * their presence; for example, if the percent character is seen, then the + * value is multiplied by 100 before being displayed. + * + * <p>To insert a special character in a pattern as a literal, that is, without + * any special meaning, the character must be quoted. There are some exceptions to + * this which are noted below. + * + * <p>The characters listed here are used in non-localized patterns. Localized + * patterns use the corresponding characters taken from this formatter's + * DecimalFormatSymbols object instead, and these characters lose + * their special status. Two exceptions are the currency sign and quote, which + * are not localized. + * + * <table border=0 cellspacing=3 cellpadding=0> + * <tr bgcolor="#ccccff"> + * <td align=left><strong>Symbol</strong> + * <td align=left><strong>Location</strong> + * <td align=left><strong>Localized?</strong> + * <td align=left><strong>Meaning</strong> + * <tr valign=top> + * <td><code>0</code> + * <td>Number + * <td>Yes + * <td>Digit + * <tr valign=top bgcolor="#eeeeff"> + * <td><code>1-9</code> + * <td>Number + * <td>Yes + * <td>'1' through '9' indicate rounding. + * <tr valign=top> + * <td><code>\htmlonly@\endhtmlonly</code> <!--doxygen doesn't like @--> + * <td>Number + * <td>No + * <td>Significant digit + * <tr valign=top bgcolor="#eeeeff"> + * <td><code>#</code> + * <td>Number + * <td>Yes + * <td>Digit, zero shows as absent + * <tr valign=top> + * <td><code>.</code> + * <td>Number + * <td>Yes + * <td>Decimal separator or monetary decimal separator + * <tr valign=top bgcolor="#eeeeff"> + * <td><code>-</code> + * <td>Number + * <td>Yes + * <td>Minus sign + * <tr valign=top> + * <td><code>,</code> + * <td>Number + * <td>Yes + * <td>Grouping separator + * <tr valign=top bgcolor="#eeeeff"> + * <td><code>E</code> + * <td>Number + * <td>Yes + * <td>Separates mantissa and exponent in scientific notation. + * <em>Need not be quoted in prefix or suffix.</em> + * <tr valign=top> + * <td><code>+</code> + * <td>Exponent + * <td>Yes + * <td>Prefix positive exponents with localized plus sign. + * <em>Need not be quoted in prefix or suffix.</em> + * <tr valign=top bgcolor="#eeeeff"> + * <td><code>;</code> + * <td>Subpattern boundary + * <td>Yes + * <td>Separates positive and negative subpatterns + * <tr valign=top> + * <td><code>\%</code> + * <td>Prefix or suffix + * <td>Yes + * <td>Multiply by 100 and show as percentage + * <tr valign=top bgcolor="#eeeeff"> + * <td><code>\\u2030</code> + * <td>Prefix or suffix + * <td>Yes + * <td>Multiply by 1000 and show as per mille + * <tr valign=top> + * <td><code>\htmlonly¤\endhtmlonly</code> (<code>\\u00A4</code>) + * <td>Prefix or suffix + * <td>No + * <td>Currency sign, replaced by currency symbol. If + * doubled, replaced by international currency symbol. + * If tripled, replaced by currency plural names, for example, + * "US dollar" or "US dollars" for America. + * If present in a pattern, the monetary decimal separator + * is used instead of the decimal separator. + * <tr valign=top bgcolor="#eeeeff"> + * <td><code>'</code> + * <td>Prefix or suffix + * <td>No + * <td>Used to quote special characters in a prefix or suffix, + * for example, <code>"'#'#"</code> formats 123 to + * <code>"#123"</code>. To create a single quote + * itself, use two in a row: <code>"# o''clock"</code>. + * <tr valign=top> + * <td><code>*</code> + * <td>Prefix or suffix boundary + * <td>Yes + * <td>Pad escape, precedes pad character + * </table> + * + * <p>A DecimalFormat pattern contains a postive and negative + * subpattern, for example, "#,##0.00;(#,##0.00)". Each subpattern has a + * prefix, a numeric part, and a suffix. If there is no explicit negative + * subpattern, the negative subpattern is the localized minus sign prefixed to the + * positive subpattern. That is, "0.00" alone is equivalent to "0.00;-0.00". If there + * is an explicit negative subpattern, it serves only to specify the negative + * prefix and suffix; the number of digits, minimal digits, and other + * characteristics are ignored in the negative subpattern. That means that + * "#,##0.0#;(#)" has precisely the same result as "#,##0.0#;(#,##0.0#)". + * + * <p>The prefixes, suffixes, and various symbols used for infinity, digits, + * thousands separators, decimal separators, etc. may be set to arbitrary + * values, and they will appear properly during formatting. However, care must + * be taken that the symbols and strings do not conflict, or parsing will be + * unreliable. For example, either the positive and negative prefixes or the + * suffixes must be distinct for parse() to be able + * to distinguish positive from negative values. Another example is that the + * decimal separator and thousands separator should be distinct characters, or + * parsing will be impossible. + * + * <p>The <em>grouping separator</em> is a character that separates clusters of + * integer digits to make large numbers more legible. It commonly used for + * thousands, but in some locales it separates ten-thousands. The <em>grouping + * size</em> is the number of digits between the grouping separators, such as 3 + * for "100,000,000" or 4 for "1 0000 0000". There are actually two different + * grouping sizes: One used for the least significant integer digits, the + * <em>primary grouping size</em>, and one used for all others, the + * <em>secondary grouping size</em>. In most locales these are the same, but + * sometimes they are different. For example, if the primary grouping interval + * is 3, and the secondary is 2, then this corresponds to the pattern + * "#,##,##0", and the number 123456789 is formatted as "12,34,56,789". If a + * pattern contains multiple grouping separators, the interval between the last + * one and the end of the integer defines the primary grouping size, and the + * interval between the last two defines the secondary grouping size. All others + * are ignored, so "#,##,###,####" == "###,###,####" == "##,#,###,####". + * + * <p>Illegal patterns, such as "#.#.#" or "#.###,###", will cause + * DecimalFormat to set a failing UErrorCode. + * + * <p><strong>Pattern BNF</strong> + * + * <pre> + * pattern := subpattern (';' subpattern)? + * subpattern := prefix? number exponent? suffix? + * number := (integer ('.' fraction)?) | sigDigits + * prefix := '\\u0000'..'\\uFFFD' - specialCharacters + * suffix := '\\u0000'..'\\uFFFD' - specialCharacters + * integer := '#'* '0'* '0' + * fraction := '0'* '#'* + * sigDigits := '#'* '@' '@'* '#'* + * exponent := 'E' '+'? '0'* '0' + * padSpec := '*' padChar + * padChar := '\\u0000'..'\\uFFFD' - quote + *   + * Notation: + * X* 0 or more instances of X + * X? 0 or 1 instances of X + * X|Y either X or Y + * C..D any character from C up to D, inclusive + * S-T characters in S, except those in T + * </pre> + * The first subpattern is for positive numbers. The second (optional) + * subpattern is for negative numbers. + * + * <p>Not indicated in the BNF syntax above: + * + * <ul><li>The grouping separator ',' can occur inside the integer and + * sigDigits elements, between any two pattern characters of that + * element, as long as the integer or sigDigits element is not + * followed by the exponent element. + * + * <li>Two grouping intervals are recognized: That between the + * decimal point and the first grouping symbol, and that + * between the first and second grouping symbols. These + * intervals are identical in most locales, but in some + * locales they differ. For example, the pattern + * "#,##,###" formats the number 123456789 as + * "12,34,56,789".</li> + * + * <li>The pad specifier <code>padSpec</code> may appear before the prefix, + * after the prefix, before the suffix, after the suffix, or not at all. + * + * <li>In place of '0', the digits '1' through '9' may be used to + * indicate a rounding increment. + * </ul> + * + * <p><strong>Parsing</strong> + * + * <p>DecimalFormat parses all Unicode characters that represent + * decimal digits, as defined by u_charDigitValue(). In addition, + * DecimalFormat also recognizes as digits the ten consecutive + * characters starting with the localized zero digit defined in the + * DecimalFormatSymbols object. During formatting, the + * DecimalFormatSymbols-based digits are output. + * + * <p>During parsing, grouping separators are ignored if in lenient mode; + * otherwise, if present, they must be in appropriate positions. + * + * <p>For currency parsing, the formatter is able to parse every currency + * style formats no matter which style the formatter is constructed with. + * For example, a formatter instance gotten from + * NumberFormat.getInstance(ULocale, NumberFormat.CURRENCYSTYLE) can parse + * formats such as "USD1.00" and "3.00 US dollars". + * + * <p>If parse(UnicodeString&,Formattable&,ParsePosition&) + * fails to parse a string, it leaves the parse position unchanged. + * The convenience method parse(UnicodeString&,Formattable&,UErrorCode&) + * indicates parse failure by setting a failing + * UErrorCode. + * + * <p><strong>Formatting</strong> + * + * <p>Formatting is guided by several parameters, all of which can be + * specified either using a pattern or using the API. The following + * description applies to formats that do not use <a href="#sci">scientific + * notation</a> or <a href="#sigdig">significant digits</a>. + * + * <ul><li>If the number of actual integer digits exceeds the + * <em>maximum integer digits</em>, then only the least significant + * digits are shown. For example, 1997 is formatted as "97" if the + * maximum integer digits is set to 2. + * + * <li>If the number of actual integer digits is less than the + * <em>minimum integer digits</em>, then leading zeros are added. For + * example, 1997 is formatted as "01997" if the minimum integer digits + * is set to 5. + * + * <li>If the number of actual fraction digits exceeds the <em>maximum + * fraction digits</em>, then rounding is performed to the + * maximum fraction digits. For example, 0.125 is formatted as "0.12" + * if the maximum fraction digits is 2. This behavior can be changed + * by specifying a rounding increment and/or a rounding mode. + * + * <li>If the number of actual fraction digits is less than the + * <em>minimum fraction digits</em>, then trailing zeros are added. + * For example, 0.125 is formatted as "0.1250" if the mimimum fraction + * digits is set to 4. + * + * <li>Trailing fractional zeros are not displayed if they occur + * <em>j</em> positions after the decimal, where <em>j</em> is less + * than the maximum fraction digits. For example, 0.10004 is + * formatted as "0.1" if the maximum fraction digits is four or less. + * </ul> + * + * <p><strong>Special Values</strong> + * + * <p><code>NaN</code> is represented as a single character, typically + * <code>\\uFFFD</code>. This character is determined by the + * DecimalFormatSymbols object. This is the only value for which + * the prefixes and suffixes are not used. + * + * <p>Infinity is represented as a single character, typically + * <code>\\u221E</code>, with the positive or negative prefixes and suffixes + * applied. The infinity character is determined by the + * DecimalFormatSymbols object. + * + * <a name="sci"><strong>Scientific Notation</strong></a> + * + * <p>Numbers in scientific notation are expressed as the product of a mantissa + * and a power of ten, for example, 1234 can be expressed as 1.234 x 10<sup>3</sup>. The + * mantissa is typically in the half-open interval [1.0, 10.0) or sometimes [0.0, 1.0), + * but it need not be. DecimalFormat supports arbitrary mantissas. + * DecimalFormat can be instructed to use scientific + * notation through the API or through the pattern. In a pattern, the exponent + * character immediately followed by one or more digit characters indicates + * scientific notation. Example: "0.###E0" formats the number 1234 as + * "1.234E3". + * + * <ul> + * <li>The number of digit characters after the exponent character gives the + * minimum exponent digit count. There is no maximum. Negative exponents are + * formatted using the localized minus sign, <em>not</em> the prefix and suffix + * from the pattern. This allows patterns such as "0.###E0 m/s". To prefix + * positive exponents with a localized plus sign, specify '+' between the + * exponent and the digits: "0.###E+0" will produce formats "1E+1", "1E+0", + * "1E-1", etc. (In localized patterns, use the localized plus sign rather than + * '+'.) + * + * <li>The minimum number of integer digits is achieved by adjusting the + * exponent. Example: 0.00123 formatted with "00.###E0" yields "12.3E-4". This + * only happens if there is no maximum number of integer digits. If there is a + * maximum, then the minimum number of integer digits is fixed at one. + * + * <li>The maximum number of integer digits, if present, specifies the exponent + * grouping. The most common use of this is to generate <em>engineering + * notation</em>, in which the exponent is a multiple of three, e.g., + * "##0.###E0". The number 12345 is formatted using "##0.####E0" as "12.345E3". + * + * <li>When using scientific notation, the formatter controls the + * digit counts using significant digits logic. The maximum number of + * significant digits limits the total number of integer and fraction + * digits that will be shown in the mantissa; it does not affect + * parsing. For example, 12345 formatted with "##0.##E0" is "12.3E3". + * See the section on significant digits for more details. + * + * <li>The number of significant digits shown is determined as + * follows: If areSignificantDigitsUsed() returns false, then the + * minimum number of significant digits shown is one, and the maximum + * number of significant digits shown is the sum of the <em>minimum + * integer</em> and <em>maximum fraction</em> digits, and is + * unaffected by the maximum integer digits. If this sum is zero, + * then all significant digits are shown. If + * areSignificantDigitsUsed() returns true, then the significant digit + * counts are specified by getMinimumSignificantDigits() and + * getMaximumSignificantDigits(). In this case, the number of + * integer digits is fixed at one, and there is no exponent grouping. + * + * <li>Exponential patterns may not contain grouping separators. + * </ul> + * + * <a name="sigdig"><strong>Significant Digits</strong></a> + * + * <code>DecimalFormat</code> has two ways of controlling how many + * digits are shows: (a) significant digits counts, or (b) integer and + * fraction digit counts. Integer and fraction digit counts are + * described above. When a formatter is using significant digits + * counts, the number of integer and fraction digits is not specified + * directly, and the formatter settings for these counts are ignored. + * Instead, the formatter uses however many integer and fraction + * digits are required to display the specified number of significant + * digits. Examples: + * + * <table border=0 cellspacing=3 cellpadding=0> + * <tr bgcolor="#ccccff"> + * <td align=left>Pattern + * <td align=left>Minimum significant digits + * <td align=left>Maximum significant digits + * <td align=left>Number + * <td align=left>Output of format() + * <tr valign=top> + * <td><code>\@\@\@</code> + * <td>3 + * <td>3 + * <td>12345 + * <td><code>12300</code> + * <tr valign=top bgcolor="#eeeeff"> + * <td><code>\@\@\@</code> + * <td>3 + * <td>3 + * <td>0.12345 + * <td><code>0.123</code> + * <tr valign=top> + * <td><code>\@\@##</code> + * <td>2 + * <td>4 + * <td>3.14159 + * <td><code>3.142</code> + * <tr valign=top bgcolor="#eeeeff"> + * <td><code>\@\@##</code> + * <td>2 + * <td>4 + * <td>1.23004 + * <td><code>1.23</code> + * </table> + * + * <ul> + * <li>Significant digit counts may be expressed using patterns that + * specify a minimum and maximum number of significant digits. These + * are indicated by the <code>'@'</code> and <code>'#'</code> + * characters. The minimum number of significant digits is the number + * of <code>'@'</code> characters. The maximum number of significant + * digits is the number of <code>'@'</code> characters plus the number + * of <code>'#'</code> characters following on the right. For + * example, the pattern <code>"@@@"</code> indicates exactly 3 + * significant digits. The pattern <code>"@##"</code> indicates from + * 1 to 3 significant digits. Trailing zero digits to the right of + * the decimal separator are suppressed after the minimum number of + * significant digits have been shown. For example, the pattern + * <code>"@##"</code> formats the number 0.1203 as + * <code>"0.12"</code>. + * + * <li>If a pattern uses significant digits, it may not contain a + * decimal separator, nor the <code>'0'</code> pattern character. + * Patterns such as <code>"@00"</code> or <code>"@.###"</code> are + * disallowed. + * + * <li>Any number of <code>'#'</code> characters may be prepended to + * the left of the leftmost <code>'@'</code> character. These have no + * effect on the minimum and maximum significant digits counts, but + * may be used to position grouping separators. For example, + * <code>"#,#@#"</code> indicates a minimum of one significant digits, + * a maximum of two significant digits, and a grouping size of three. + * + * <li>In order to enable significant digits formatting, use a pattern + * containing the <code>'@'</code> pattern character. Alternatively, + * call setSignificantDigitsUsed(TRUE). + * + * <li>In order to disable significant digits formatting, use a + * pattern that does not contain the <code>'@'</code> pattern + * character. Alternatively, call setSignificantDigitsUsed(FALSE). + * + * <li>The number of significant digits has no effect on parsing. + * + * <li>Significant digits may be used together with exponential notation. Such + * patterns are equivalent to a normal exponential pattern with a minimum and + * maximum integer digit count of one, a minimum fraction digit count of + * <code>getMinimumSignificantDigits() - 1</code>, and a maximum fraction digit + * count of <code>getMaximumSignificantDigits() - 1</code>. For example, the + * pattern <code>"@@###E0"</code> is equivalent to <code>"0.0###E0"</code>. + * + * <li>If signficant digits are in use, then the integer and fraction + * digit counts, as set via the API, are ignored. If significant + * digits are not in use, then the signficant digit counts, as set via + * the API, are ignored. + * + * </ul> + * + * <p><strong>Padding</strong> + * + * <p>DecimalFormat supports padding the result of + * format() to a specific width. Padding may be specified either + * through the API or through the pattern syntax. In a pattern the pad escape + * character, followed by a single pad character, causes padding to be parsed + * and formatted. The pad escape character is '*' in unlocalized patterns, and + * can be localized using DecimalFormatSymbols::setSymbol() with a + * DecimalFormatSymbols::kPadEscapeSymbol + * selector. For example, <code>"$*x#,##0.00"</code> formats 123 to + * <code>"$xx123.00"</code>, and 1234 to <code>"$1,234.00"</code>. + * + * <ul> + * <li>When padding is in effect, the width of the positive subpattern, + * including prefix and suffix, determines the format width. For example, in + * the pattern <code>"* #0 o''clock"</code>, the format width is 10. + * + * <li>The width is counted in 16-bit code units (char16_ts). + * + * <li>Some parameters which usually do not matter have meaning when padding is + * used, because the pattern width is significant with padding. In the pattern + * "* ##,##,#,##0.##", the format width is 14. The initial characters "##,##," + * do not affect the grouping size or maximum integer digits, but they do affect + * the format width. + * + * <li>Padding may be inserted at one of four locations: before the prefix, + * after the prefix, before the suffix, or after the suffix. If padding is + * specified in any other location, applyPattern() + * sets a failing UErrorCode. If there is no prefix, + * before the prefix and after the prefix are equivalent, likewise for the + * suffix. + * + * <li>When specified in a pattern, the 32-bit code point immediately + * following the pad escape is the pad character. This may be any character, + * including a special pattern character. That is, the pad escape + * <em>escapes</em> the following character. If there is no character after + * the pad escape, then the pattern is illegal. + * + * </ul> + * + * <p><strong>Rounding</strong> + * + * <p>DecimalFormat supports rounding to a specific increment. For + * example, 1230 rounded to the nearest 50 is 1250. 1.234 rounded to the + * nearest 0.65 is 1.3. The rounding increment may be specified through the API + * or in a pattern. To specify a rounding increment in a pattern, include the + * increment in the pattern itself. "#,#50" specifies a rounding increment of + * 50. "#,##0.05" specifies a rounding increment of 0.05. + * + * <p>In the absense of an explicit rounding increment numbers are + * rounded to their formatted width. + * + * <ul> + * <li>Rounding only affects the string produced by formatting. It does + * not affect parsing or change any numerical values. + * + * <li>A <em>rounding mode</em> determines how values are rounded; see + * DecimalFormat::ERoundingMode. The default rounding mode is + * DecimalFormat::kRoundHalfEven. The rounding mode can only be set + * through the API; it can not be set with a pattern. + * + * <li>Some locales use rounding in their currency formats to reflect the + * smallest currency denomination. + * + * <li>In a pattern, digits '1' through '9' specify rounding, but otherwise + * behave identically to digit '0'. + * </ul> + * + * <p><strong>Synchronization</strong> + * + * <p>DecimalFormat objects are not synchronized. Multiple + * threads should not access one formatter concurrently. + * + * <p><strong>Subclassing</strong> + * + * <p><em>User subclasses are not supported.</em> While clients may write + * subclasses, such code will not necessarily work and will not be + * guaranteed to work stably from release to release. + */ +class U_I18N_API DecimalFormat: public NumberFormat { +public: + /** + * Pad position. + * @stable ICU 2.4 + */ + enum EPadPosition { + kPadBeforePrefix, + kPadAfterPrefix, + kPadBeforeSuffix, + kPadAfterSuffix + }; + + /** + * Create a DecimalFormat using the default pattern and symbols + * for the default locale. This is a convenient way to obtain a + * DecimalFormat when internationalization is not the main concern. + * <P> + * To obtain standard formats for a given locale, use the factory methods + * on NumberFormat such as createInstance. These factories will + * return the most appropriate sub-class of NumberFormat for a given + * locale. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of DecimalFormat. + * @param status Output param set to success/failure code. If the + * pattern is invalid this will be set to a failure code. + * @stable ICU 2.0 + */ + DecimalFormat(UErrorCode& status); + + /** + * Create a DecimalFormat from the given pattern and the symbols + * for the default locale. This is a convenient way to obtain a + * DecimalFormat when internationalization is not the main concern. + * <P> + * To obtain standard formats for a given locale, use the factory methods + * on NumberFormat such as createInstance. These factories will + * return the most appropriate sub-class of NumberFormat for a given + * locale. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of DecimalFormat. + * @param pattern A non-localized pattern string. + * @param status Output param set to success/failure code. If the + * pattern is invalid this will be set to a failure code. + * @stable ICU 2.0 + */ + DecimalFormat(const UnicodeString& pattern, + UErrorCode& status); + + /** + * Create a DecimalFormat from the given pattern and symbols. + * Use this constructor when you need to completely customize the + * behavior of the format. + * <P> + * To obtain standard formats for a given + * locale, use the factory methods on NumberFormat such as + * createInstance or createCurrencyInstance. If you need only minor adjustments + * to a standard format, you can modify the format returned by + * a NumberFormat factory method. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of DecimalFormat. + * + * @param pattern a non-localized pattern string + * @param symbolsToAdopt the set of symbols to be used. The caller should not + * delete this object after making this call. + * @param status Output param set to success/failure code. If the + * pattern is invalid this will be set to a failure code. + * @stable ICU 2.0 + */ + DecimalFormat( const UnicodeString& pattern, + DecimalFormatSymbols* symbolsToAdopt, + UErrorCode& status); + +#ifndef U_HIDE_INTERNAL_API + /** + * This API is for ICU use only. + * Create a DecimalFormat from the given pattern, symbols, and style. + * + * @param pattern a non-localized pattern string + * @param symbolsToAdopt the set of symbols to be used. The caller should not + * delete this object after making this call. + * @param style style of decimal format + * @param status Output param set to success/failure code. If the + * pattern is invalid this will be set to a failure code. + * @internal + */ + DecimalFormat( const UnicodeString& pattern, + DecimalFormatSymbols* symbolsToAdopt, + UNumberFormatStyle style, + UErrorCode& status); + +#if UCONFIG_HAVE_PARSEALLINPUT + /** + * @internal + */ + void setParseAllInput(UNumberFormatAttributeValue value); +#endif + +#endif /* U_HIDE_INTERNAL_API */ + + + /** + * Set an integer attribute on this DecimalFormat. + * May return U_UNSUPPORTED_ERROR if this instance does not support + * the specified attribute. + * @param attr the attribute to set + * @param newvalue new value + * @param status the error type + * @return *this - for chaining (example: format.setAttribute(...).setAttribute(...) ) + * @stable ICU 51 + */ + virtual DecimalFormat& setAttribute( UNumberFormatAttribute attr, + int32_t newvalue, + UErrorCode &status); + + /** + * Get an integer + * May return U_UNSUPPORTED_ERROR if this instance does not support + * the specified attribute. + * @param attr the attribute to set + * @param status the error type + * @return the attribute value. Undefined if there is an error. + * @stable ICU 51 + */ + virtual int32_t getAttribute( UNumberFormatAttribute attr, + UErrorCode &status) const; + + + /** + * Set whether or not grouping will be used in this format. + * @param newValue True, grouping will be used in this format. + * @see getGroupingUsed + * @stable ICU 53 + */ + virtual void setGroupingUsed(UBool newValue); + + /** + * Sets whether or not numbers should be parsed as integers only. + * @param value set True, this format will parse numbers as integers + * only. + * @see isParseIntegerOnly + * @stable ICU 53 + */ + virtual void setParseIntegerOnly(UBool value); + + /** + * Set a particular UDisplayContext value in the formatter, such as + * UDISPCTX_CAPITALIZATION_FOR_STANDALONE. + * @param value The UDisplayContext value to set. + * @param status Input/output status. If at entry this indicates a failure + * status, the function will do nothing; otherwise this will be + * updated with any new status from the function. + * @stable ICU 53 + */ + virtual void setContext(UDisplayContext value, UErrorCode& status); + + /** + * Create a DecimalFormat from the given pattern and symbols. + * Use this constructor when you need to completely customize the + * behavior of the format. + * <P> + * To obtain standard formats for a given + * locale, use the factory methods on NumberFormat such as + * createInstance or createCurrencyInstance. If you need only minor adjustments + * to a standard format, you can modify the format returned by + * a NumberFormat factory method. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of DecimalFormat. + * + * @param pattern a non-localized pattern string + * @param symbolsToAdopt the set of symbols to be used. The caller should not + * delete this object after making this call. + * @param parseError Output param to receive errors occured during parsing + * @param status Output param set to success/failure code. If the + * pattern is invalid this will be set to a failure code. + * @stable ICU 2.0 + */ + DecimalFormat( const UnicodeString& pattern, + DecimalFormatSymbols* symbolsToAdopt, + UParseError& parseError, + UErrorCode& status); + /** + * Create a DecimalFormat from the given pattern and symbols. + * Use this constructor when you need to completely customize the + * behavior of the format. + * <P> + * To obtain standard formats for a given + * locale, use the factory methods on NumberFormat such as + * createInstance or createCurrencyInstance. If you need only minor adjustments + * to a standard format, you can modify the format returned by + * a NumberFormat factory method. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of DecimalFormat. + * + * @param pattern a non-localized pattern string + * @param symbols the set of symbols to be used + * @param status Output param set to success/failure code. If the + * pattern is invalid this will be set to a failure code. + * @stable ICU 2.0 + */ + DecimalFormat( const UnicodeString& pattern, + const DecimalFormatSymbols& symbols, + UErrorCode& status); + + /** + * Copy constructor. + * + * @param source the DecimalFormat object to be copied from. + * @stable ICU 2.0 + */ + DecimalFormat(const DecimalFormat& source); + + /** + * Assignment operator. + * + * @param rhs the DecimalFormat object to be copied. + * @stable ICU 2.0 + */ + DecimalFormat& operator=(const DecimalFormat& rhs); + + /** + * Destructor. + * @stable ICU 2.0 + */ + virtual ~DecimalFormat(); + + /** + * Clone this Format object polymorphically. The caller owns the + * result and should delete it when done. + * + * @return a polymorphic copy of this DecimalFormat. + * @stable ICU 2.0 + */ + virtual Format* clone(void) const; + + /** + * Return true if the given Format objects are semantically equal. + * Objects of different subclasses are considered unequal. + * + * @param other the object to be compared with. + * @return true if the given Format objects are semantically equal. + * @stable ICU 2.0 + */ + virtual UBool operator==(const Format& other) const; + + + using NumberFormat::format; + + /** + * Format a double or long number using base-10 representation. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.0 + */ + virtual UnicodeString& format(double number, + UnicodeString& appendTo, + FieldPosition& pos) const; + + + /** + * Format a double or long number using base-10 representation. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(double number, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode &status) const; + + /** + * Format a double or long number using base-10 representation. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. + * Can be NULL. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.4 + */ + virtual UnicodeString& format(double number, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + + /** + * Format a long number using base-10 representation. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.0 + */ + virtual UnicodeString& format(int32_t number, + UnicodeString& appendTo, + FieldPosition& pos) const; + + /** + * Format a long number using base-10 representation. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(int32_t number, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode &status) const; + + /** + * Format a long number using base-10 representation. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. + * Can be NULL. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.4 + */ + virtual UnicodeString& format(int32_t number, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + + /** + * Format an int64 number using base-10 representation. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.8 + */ + virtual UnicodeString& format(int64_t number, + UnicodeString& appendTo, + FieldPosition& pos) const; + + /** + * Format an int64 number using base-10 representation. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(int64_t number, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode &status) const; + + /** + * Format an int64 number using base-10 representation. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. + * Can be NULL. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.4 + */ + virtual UnicodeString& format(int64_t number, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + + /** + * Format a decimal number. + * The syntax of the unformatted number is a "numeric string" + * as defined in the Decimal Arithmetic Specification, available at + * http://speleotrove.com/decimal + * + * @param number The unformatted number, as a string. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. + * Can be NULL. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.4 + */ + virtual UnicodeString& format(StringPiece number, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + + + /** + * Format a decimal number. + * The number is a DigitList wrapper onto a floating point decimal number. + * The default implementation in NumberFormat converts the decimal number + * to a double and formats that. + * + * @param number The number, a DigitList format Decimal Floating Point. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(const DigitList &number, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + + /** + * Format a decimal number. + * @param number The number + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format( + const VisibleDigitsWithExponent &number, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& status) const; + + /** + * Format a decimal number. + * @param number The number + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format( + const VisibleDigitsWithExponent &number, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + + /** + * Format a decimal number. + * The number is a DigitList wrapper onto a floating point decimal number. + * The default implementation in NumberFormat converts the decimal number + * to a double and formats that. + * + * @param number The number, a DigitList format Decimal Floating Point. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(const DigitList &number, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& status) const; + + using NumberFormat::parse; + + /** + * Parse the given string using this object's choices. The method + * does string comparisons to try to find an optimal match. + * If no object can be parsed, index is unchanged, and NULL is + * returned. The result is returned as the most parsimonious + * type of Formattable that will accomodate all of the + * necessary precision. For example, if the result is exactly 12, + * it will be returned as a long. However, if it is 1.5, it will + * be returned as a double. + * + * @param text The text to be parsed. + * @param result Formattable to be set to the parse result. + * If parse fails, return contents are undefined. + * @param parsePosition The position to start parsing at on input. + * On output, moved to after the last successfully + * parse character. On parse failure, does not change. + * @see Formattable + * @stable ICU 2.0 + */ + virtual void parse(const UnicodeString& text, + Formattable& result, + ParsePosition& parsePosition) const; + + /** + * Parses text from the given string as a currency amount. Unlike + * the parse() method, this method will attempt to parse a generic + * currency name, searching for a match of this object's locale's + * currency display names, or for a 3-letter ISO currency code. + * This method will fail if this format is not a currency format, + * that is, if it does not contain the currency pattern symbol + * (U+00A4) in its prefix or suffix. + * + * @param text the string to parse + * @param pos input-output position; on input, the position within text + * to match; must have 0 <= pos.getIndex() < text.length(); + * on output, the position after the last matched character. + * If the parse fails, the position in unchanged upon output. + * @return if parse succeeds, a pointer to a newly-created CurrencyAmount + * object (owned by the caller) containing information about + * the parsed currency; if parse fails, this is NULL. + * @stable ICU 49 + */ + virtual CurrencyAmount* parseCurrency(const UnicodeString& text, + ParsePosition& pos) const; + + /** + * Returns the decimal format symbols, which is generally not changed + * by the programmer or user. + * @return desired DecimalFormatSymbols + * @see DecimalFormatSymbols + * @stable ICU 2.0 + */ + virtual const DecimalFormatSymbols* getDecimalFormatSymbols(void) const; + + /** + * Sets the decimal format symbols, which is generally not changed + * by the programmer or user. + * @param symbolsToAdopt DecimalFormatSymbols to be adopted. + * @stable ICU 2.0 + */ + virtual void adoptDecimalFormatSymbols(DecimalFormatSymbols* symbolsToAdopt); + + /** + * Sets the decimal format symbols, which is generally not changed + * by the programmer or user. + * @param symbols DecimalFormatSymbols. + * @stable ICU 2.0 + */ + virtual void setDecimalFormatSymbols(const DecimalFormatSymbols& symbols); + + + /** + * Returns the currency plural format information, + * which is generally not changed by the programmer or user. + * @return desired CurrencyPluralInfo + * @stable ICU 4.2 + */ + virtual const CurrencyPluralInfo* getCurrencyPluralInfo(void) const; + + /** + * Sets the currency plural format information, + * which is generally not changed by the programmer or user. + * @param toAdopt CurrencyPluralInfo to be adopted. + * @stable ICU 4.2 + */ + virtual void adoptCurrencyPluralInfo(CurrencyPluralInfo* toAdopt); + + /** + * Sets the currency plural format information, + * which is generally not changed by the programmer or user. + * @param info Currency Plural Info. + * @stable ICU 4.2 + */ + virtual void setCurrencyPluralInfo(const CurrencyPluralInfo& info); + + + /** + * Get the positive prefix. + * + * @param result Output param which will receive the positive prefix. + * @return A reference to 'result'. + * Examples: +123, $123, sFr123 + * @stable ICU 2.0 + */ + UnicodeString& getPositivePrefix(UnicodeString& result) const; + + /** + * Set the positive prefix. + * + * @param newValue the new value of the the positive prefix to be set. + * Examples: +123, $123, sFr123 + * @stable ICU 2.0 + */ + virtual void setPositivePrefix(const UnicodeString& newValue); + + /** + * Get the negative prefix. + * + * @param result Output param which will receive the negative prefix. + * @return A reference to 'result'. + * Examples: -123, ($123) (with negative suffix), sFr-123 + * @stable ICU 2.0 + */ + UnicodeString& getNegativePrefix(UnicodeString& result) const; + + /** + * Set the negative prefix. + * + * @param newValue the new value of the the negative prefix to be set. + * Examples: -123, ($123) (with negative suffix), sFr-123 + * @stable ICU 2.0 + */ + virtual void setNegativePrefix(const UnicodeString& newValue); + + /** + * Get the positive suffix. + * + * @param result Output param which will receive the positive suffix. + * @return A reference to 'result'. + * Example: 123% + * @stable ICU 2.0 + */ + UnicodeString& getPositiveSuffix(UnicodeString& result) const; + + /** + * Set the positive suffix. + * + * @param newValue the new value of the positive suffix to be set. + * Example: 123% + * @stable ICU 2.0 + */ + virtual void setPositiveSuffix(const UnicodeString& newValue); + + /** + * Get the negative suffix. + * + * @param result Output param which will receive the negative suffix. + * @return A reference to 'result'. + * Examples: -123%, ($123) (with positive suffixes) + * @stable ICU 2.0 + */ + UnicodeString& getNegativeSuffix(UnicodeString& result) const; + + /** + * Set the negative suffix. + * + * @param newValue the new value of the negative suffix to be set. + * Examples: 123% + * @stable ICU 2.0 + */ + virtual void setNegativeSuffix(const UnicodeString& newValue); + + /** + * Get the multiplier for use in percent, permill, etc. + * For a percentage, set the suffixes to have "%" and the multiplier to be 100. + * (For Arabic, use arabic percent symbol). + * For a permill, set the suffixes to have "\\u2031" and the multiplier to be 1000. + * + * @return the multiplier for use in percent, permill, etc. + * Examples: with 100, 1.23 -> "123", and "123" -> 1.23 + * @stable ICU 2.0 + */ + int32_t getMultiplier(void) const; + + /** + * Set the multiplier for use in percent, permill, etc. + * For a percentage, set the suffixes to have "%" and the multiplier to be 100. + * (For Arabic, use arabic percent symbol). + * For a permill, set the suffixes to have "\\u2031" and the multiplier to be 1000. + * + * @param newValue the new value of the multiplier for use in percent, permill, etc. + * Examples: with 100, 1.23 -> "123", and "123" -> 1.23 + * @stable ICU 2.0 + */ + virtual void setMultiplier(int32_t newValue); + + /** + * Get the rounding increment. + * @return A positive rounding increment, or 0.0 if a custom rounding + * increment is not in effect. + * @see #setRoundingIncrement + * @see #getRoundingMode + * @see #setRoundingMode + * @stable ICU 2.0 + */ + virtual double getRoundingIncrement(void) const; + + /** + * Set the rounding increment. In the absence of a rounding increment, + * numbers will be rounded to the number of digits displayed. + * @param newValue A positive rounding increment, or 0.0 to + * use the default rounding increment. + * Negative increments are equivalent to 0.0. + * @see #getRoundingIncrement + * @see #getRoundingMode + * @see #setRoundingMode + * @stable ICU 2.0 + */ + virtual void setRoundingIncrement(double newValue); + + /** + * Get the rounding mode. + * @return A rounding mode + * @see #setRoundingIncrement + * @see #getRoundingIncrement + * @see #setRoundingMode + * @stable ICU 2.0 + */ + virtual ERoundingMode getRoundingMode(void) const; + + /** + * Set the rounding mode. + * @param roundingMode A rounding mode + * @see #setRoundingIncrement + * @see #getRoundingIncrement + * @see #getRoundingMode + * @stable ICU 2.0 + */ + virtual void setRoundingMode(ERoundingMode roundingMode); + + /** + * Get the width to which the output of format() is padded. + * The width is counted in 16-bit code units. + * @return the format width, or zero if no padding is in effect + * @see #setFormatWidth + * @see #getPadCharacterString + * @see #setPadCharacter + * @see #getPadPosition + * @see #setPadPosition + * @stable ICU 2.0 + */ + virtual int32_t getFormatWidth(void) const; + + /** + * Set the width to which the output of format() is padded. + * The width is counted in 16-bit code units. + * This method also controls whether padding is enabled. + * @param width the width to which to pad the result of + * format(), or zero to disable padding. A negative + * width is equivalent to 0. + * @see #getFormatWidth + * @see #getPadCharacterString + * @see #setPadCharacter + * @see #getPadPosition + * @see #setPadPosition + * @stable ICU 2.0 + */ + virtual void setFormatWidth(int32_t width); + + /** + * Get the pad character used to pad to the format width. The + * default is ' '. + * @return a string containing the pad character. This will always + * have a length of one 32-bit code point. + * @see #setFormatWidth + * @see #getFormatWidth + * @see #setPadCharacter + * @see #getPadPosition + * @see #setPadPosition + * @stable ICU 2.0 + */ + virtual UnicodeString getPadCharacterString() const; + + /** + * Set the character used to pad to the format width. If padding + * is not enabled, then this will take effect if padding is later + * enabled. + * @param padChar a string containing the pad charcter. If the string + * has length 0, then the pad characer is set to ' '. Otherwise + * padChar.char32At(0) will be used as the pad character. + * @see #setFormatWidth + * @see #getFormatWidth + * @see #getPadCharacterString + * @see #getPadPosition + * @see #setPadPosition + * @stable ICU 2.0 + */ + virtual void setPadCharacter(const UnicodeString &padChar); + + /** + * Get the position at which padding will take place. This is the location + * at which padding will be inserted if the result of format() + * is shorter than the format width. + * @return the pad position, one of kPadBeforePrefix, + * kPadAfterPrefix, kPadBeforeSuffix, or + * kPadAfterSuffix. + * @see #setFormatWidth + * @see #getFormatWidth + * @see #setPadCharacter + * @see #getPadCharacterString + * @see #setPadPosition + * @see #EPadPosition + * @stable ICU 2.0 + */ + virtual EPadPosition getPadPosition(void) const; + + /** + * Set the position at which padding will take place. This is the location + * at which padding will be inserted if the result of format() + * is shorter than the format width. This has no effect unless padding is + * enabled. + * @param padPos the pad position, one of kPadBeforePrefix, + * kPadAfterPrefix, kPadBeforeSuffix, or + * kPadAfterSuffix. + * @see #setFormatWidth + * @see #getFormatWidth + * @see #setPadCharacter + * @see #getPadCharacterString + * @see #getPadPosition + * @see #EPadPosition + * @stable ICU 2.0 + */ + virtual void setPadPosition(EPadPosition padPos); + + /** + * Return whether or not scientific notation is used. + * @return TRUE if this object formats and parses scientific notation + * @see #setScientificNotation + * @see #getMinimumExponentDigits + * @see #setMinimumExponentDigits + * @see #isExponentSignAlwaysShown + * @see #setExponentSignAlwaysShown + * @stable ICU 2.0 + */ + virtual UBool isScientificNotation(void) const; + + /** + * Set whether or not scientific notation is used. When scientific notation + * is used, the effective maximum number of integer digits is <= 8. If the + * maximum number of integer digits is set to more than 8, the effective + * maximum will be 1. This allows this call to generate a 'default' scientific + * number format without additional changes. + * @param useScientific TRUE if this object formats and parses scientific + * notation + * @see #isScientificNotation + * @see #getMinimumExponentDigits + * @see #setMinimumExponentDigits + * @see #isExponentSignAlwaysShown + * @see #setExponentSignAlwaysShown + * @stable ICU 2.0 + */ + virtual void setScientificNotation(UBool useScientific); + + /** + * Return the minimum exponent digits that will be shown. + * @return the minimum exponent digits that will be shown + * @see #setScientificNotation + * @see #isScientificNotation + * @see #setMinimumExponentDigits + * @see #isExponentSignAlwaysShown + * @see #setExponentSignAlwaysShown + * @stable ICU 2.0 + */ + virtual int8_t getMinimumExponentDigits(void) const; + + /** + * Set the minimum exponent digits that will be shown. This has no + * effect unless scientific notation is in use. + * @param minExpDig a value >= 1 indicating the fewest exponent digits + * that will be shown. Values less than 1 will be treated as 1. + * @see #setScientificNotation + * @see #isScientificNotation + * @see #getMinimumExponentDigits + * @see #isExponentSignAlwaysShown + * @see #setExponentSignAlwaysShown + * @stable ICU 2.0 + */ + virtual void setMinimumExponentDigits(int8_t minExpDig); + + /** + * Return whether the exponent sign is always shown. + * @return TRUE if the exponent is always prefixed with either the + * localized minus sign or the localized plus sign, false if only negative + * exponents are prefixed with the localized minus sign. + * @see #setScientificNotation + * @see #isScientificNotation + * @see #setMinimumExponentDigits + * @see #getMinimumExponentDigits + * @see #setExponentSignAlwaysShown + * @stable ICU 2.0 + */ + virtual UBool isExponentSignAlwaysShown(void) const; + + /** + * Set whether the exponent sign is always shown. This has no effect + * unless scientific notation is in use. + * @param expSignAlways TRUE if the exponent is always prefixed with either + * the localized minus sign or the localized plus sign, false if only + * negative exponents are prefixed with the localized minus sign. + * @see #setScientificNotation + * @see #isScientificNotation + * @see #setMinimumExponentDigits + * @see #getMinimumExponentDigits + * @see #isExponentSignAlwaysShown + * @stable ICU 2.0 + */ + virtual void setExponentSignAlwaysShown(UBool expSignAlways); + + /** + * Return the grouping size. Grouping size is the number of digits between + * grouping separators in the integer portion of a number. For example, + * in the number "123,456.78", the grouping size is 3. + * + * @return the grouping size. + * @see setGroupingSize + * @see NumberFormat::isGroupingUsed + * @see DecimalFormatSymbols::getGroupingSeparator + * @stable ICU 2.0 + */ + int32_t getGroupingSize(void) const; + + /** + * Set the grouping size. Grouping size is the number of digits between + * grouping separators in the integer portion of a number. For example, + * in the number "123,456.78", the grouping size is 3. + * + * @param newValue the new value of the grouping size. + * @see getGroupingSize + * @see NumberFormat::setGroupingUsed + * @see DecimalFormatSymbols::setGroupingSeparator + * @stable ICU 2.0 + */ + virtual void setGroupingSize(int32_t newValue); + + /** + * Return the secondary grouping size. In some locales one + * grouping interval is used for the least significant integer + * digits (the primary grouping size), and another is used for all + * others (the secondary grouping size). A formatter supporting a + * secondary grouping size will return a positive integer unequal + * to the primary grouping size returned by + * getGroupingSize(). For example, if the primary + * grouping size is 4, and the secondary grouping size is 2, then + * the number 123456789 formats as "1,23,45,6789", and the pattern + * appears as "#,##,###0". + * @return the secondary grouping size, or a value less than + * one if there is none + * @see setSecondaryGroupingSize + * @see NumberFormat::isGroupingUsed + * @see DecimalFormatSymbols::getGroupingSeparator + * @stable ICU 2.4 + */ + int32_t getSecondaryGroupingSize(void) const; + + /** + * Set the secondary grouping size. If set to a value less than 1, + * then secondary grouping is turned off, and the primary grouping + * size is used for all intervals, not just the least significant. + * + * @param newValue the new value of the secondary grouping size. + * @see getSecondaryGroupingSize + * @see NumberFormat#setGroupingUsed + * @see DecimalFormatSymbols::setGroupingSeparator + * @stable ICU 2.4 + */ + virtual void setSecondaryGroupingSize(int32_t newValue); + +#ifndef U_HIDE_INTERNAL_API + + /** + * Returns the minimum number of grouping digits. + * Grouping separators are output if there are at least this many + * digits to the left of the first (rightmost) grouping separator, + * that is, there are at least (minimum grouping + grouping size) integer digits. + * (Subject to isGroupingUsed().) + * + * For example, if this value is 2, and the grouping size is 3, then + * 9999 -> "9999" and 10000 -> "10,000" + * + * This is a technology preview. This API may change behavior or may be removed. + * + * The default value for this attribute is 0. + * A value of 1, 0, or lower, means that the use of grouping separators + * only depends on the grouping size (and on isGroupingUsed()). + * Currently, the corresponding CLDR data is not used; this is likely to change. + * + * @see setMinimumGroupingDigits + * @see getGroupingSize + * @internal technology preview + */ + int32_t getMinimumGroupingDigits() const; + +#endif /* U_HIDE_INTERNAL_API */ + + /* Cannot use #ifndef U_HIDE_INTERNAL_API for the following draft method since it is virtual. */ + /** + * Sets the minimum grouping digits. Setting to a value less than or + * equal to 1 turns off minimum grouping digits. + * + * @param newValue the new value of minimum grouping digits. + * @see getMinimumGroupingDigits + * @internal technology preview + */ + virtual void setMinimumGroupingDigits(int32_t newValue); + + + /** + * Allows you to get the behavior of the decimal separator with integers. + * (The decimal separator will always appear with decimals.) + * + * @return TRUE if the decimal separator always appear with decimals. + * Example: Decimal ON: 12345 -> 12345.; OFF: 12345 -> 12345 + * @stable ICU 2.0 + */ + UBool isDecimalSeparatorAlwaysShown(void) const; + + /** + * Allows you to set the behavior of the decimal separator with integers. + * (The decimal separator will always appear with decimals.) + * + * @param newValue set TRUE if the decimal separator will always appear with decimals. + * Example: Decimal ON: 12345 -> 12345.; OFF: 12345 -> 12345 + * @stable ICU 2.0 + */ + virtual void setDecimalSeparatorAlwaysShown(UBool newValue); + + /** + * Allows you to get the parse behavior of the pattern decimal mark. + * + * @return TRUE if input must contain a match to decimal mark in pattern + * @stable ICU 54 + */ + UBool isDecimalPatternMatchRequired(void) const; + + /** + * Allows you to set the behavior of the pattern decimal mark. + * + * if TRUE, the input must have a decimal mark if one was specified in the pattern. When + * FALSE the decimal mark may be omitted from the input. + * + * @param newValue set TRUE if input must contain a match to decimal mark in pattern + * @stable ICU 54 + */ + virtual void setDecimalPatternMatchRequired(UBool newValue); + + + /** + * Synthesizes a pattern string that represents the current state + * of this Format object. + * + * @param result Output param which will receive the pattern. + * Previous contents are deleted. + * @return A reference to 'result'. + * @see applyPattern + * @stable ICU 2.0 + */ + virtual UnicodeString& toPattern(UnicodeString& result) const; + + /** + * Synthesizes a localized pattern string that represents the current + * state of this Format object. + * + * @param result Output param which will receive the localized pattern. + * Previous contents are deleted. + * @return A reference to 'result'. + * @see applyPattern + * @stable ICU 2.0 + */ + virtual UnicodeString& toLocalizedPattern(UnicodeString& result) const; + + /** + * Apply the given pattern to this Format object. A pattern is a + * short-hand specification for the various formatting properties. + * These properties can also be changed individually through the + * various setter methods. + * <P> + * There is no limit to integer digits are set + * by this routine, since that is the typical end-user desire; + * use setMaximumInteger if you want to set a real value. + * For negative numbers, use a second pattern, separated by a semicolon + * <pre> + * . Example "#,#00.0#" -> 1,234.56 + * </pre> + * This means a minimum of 2 integer digits, 1 fraction digit, and + * a maximum of 2 fraction digits. + * <pre> + * . Example: "#,#00.0#;(#,#00.0#)" for negatives in parantheses. + * </pre> + * In negative patterns, the minimum and maximum counts are ignored; + * these are presumed to be set in the positive pattern. + * + * @param pattern The pattern to be applied. + * @param parseError Struct to recieve information on position + * of error if an error is encountered + * @param status Output param set to success/failure code on + * exit. If the pattern is invalid, this will be + * set to a failure result. + * @stable ICU 2.0 + */ + virtual void applyPattern(const UnicodeString& pattern, + UParseError& parseError, + UErrorCode& status); + /** + * Sets the pattern. + * @param pattern The pattern to be applied. + * @param status Output param set to success/failure code on + * exit. If the pattern is invalid, this will be + * set to a failure result. + * @stable ICU 2.0 + */ + virtual void applyPattern(const UnicodeString& pattern, + UErrorCode& status); + + /** + * Apply the given pattern to this Format object. The pattern + * is assumed to be in a localized notation. A pattern is a + * short-hand specification for the various formatting properties. + * These properties can also be changed individually through the + * various setter methods. + * <P> + * There is no limit to integer digits are set + * by this routine, since that is the typical end-user desire; + * use setMaximumInteger if you want to set a real value. + * For negative numbers, use a second pattern, separated by a semicolon + * <pre> + * . Example "#,#00.0#" -> 1,234.56 + * </pre> + * This means a minimum of 2 integer digits, 1 fraction digit, and + * a maximum of 2 fraction digits. + * + * Example: "#,#00.0#;(#,#00.0#)" for negatives in parantheses. + * + * In negative patterns, the minimum and maximum counts are ignored; + * these are presumed to be set in the positive pattern. + * + * @param pattern The localized pattern to be applied. + * @param parseError Struct to recieve information on position + * of error if an error is encountered + * @param status Output param set to success/failure code on + * exit. If the pattern is invalid, this will be + * set to a failure result. + * @stable ICU 2.0 + */ + virtual void applyLocalizedPattern(const UnicodeString& pattern, + UParseError& parseError, + UErrorCode& status); + + /** + * Apply the given pattern to this Format object. + * + * @param pattern The localized pattern to be applied. + * @param status Output param set to success/failure code on + * exit. If the pattern is invalid, this will be + * set to a failure result. + * @stable ICU 2.0 + */ + virtual void applyLocalizedPattern(const UnicodeString& pattern, + UErrorCode& status); + + + /** + * Sets the maximum number of digits allowed in the integer portion of a + * number. This override limits the integer digit count to 309. + * + * @param newValue the new value of the maximum number of digits + * allowed in the integer portion of a number. + * @see NumberFormat#setMaximumIntegerDigits + * @stable ICU 2.0 + */ + virtual void setMaximumIntegerDigits(int32_t newValue); + + /** + * Sets the minimum number of digits allowed in the integer portion of a + * number. This override limits the integer digit count to 309. + * + * @param newValue the new value of the minimum number of digits + * allowed in the integer portion of a number. + * @see NumberFormat#setMinimumIntegerDigits + * @stable ICU 2.0 + */ + virtual void setMinimumIntegerDigits(int32_t newValue); + + /** + * Sets the maximum number of digits allowed in the fraction portion of a + * number. This override limits the fraction digit count to 340. + * + * @param newValue the new value of the maximum number of digits + * allowed in the fraction portion of a number. + * @see NumberFormat#setMaximumFractionDigits + * @stable ICU 2.0 + */ + virtual void setMaximumFractionDigits(int32_t newValue); + + /** + * Sets the minimum number of digits allowed in the fraction portion of a + * number. This override limits the fraction digit count to 340. + * + * @param newValue the new value of the minimum number of digits + * allowed in the fraction portion of a number. + * @see NumberFormat#setMinimumFractionDigits + * @stable ICU 2.0 + */ + virtual void setMinimumFractionDigits(int32_t newValue); + + /** + * Returns the minimum number of significant digits that will be + * displayed. This value has no effect unless areSignificantDigitsUsed() + * returns true. + * @return the fewest significant digits that will be shown + * @stable ICU 3.0 + */ + int32_t getMinimumSignificantDigits() const; + + /** + * Returns the maximum number of significant digits that will be + * displayed. This value has no effect unless areSignificantDigitsUsed() + * returns true. + * @return the most significant digits that will be shown + * @stable ICU 3.0 + */ + int32_t getMaximumSignificantDigits() const; + + /** + * Sets the minimum number of significant digits that will be + * displayed. If <code>min</code> is less than one then it is set + * to one. If the maximum significant digits count is less than + * <code>min</code>, then it is set to <code>min</code>. + * This function also enables the use of significant digits + * by this formatter - areSignificantDigitsUsed() will return TRUE. + * @see #areSignificantDigitsUsed + * @param min the fewest significant digits to be shown + * @stable ICU 3.0 + */ + void setMinimumSignificantDigits(int32_t min); + + /** + * Sets the maximum number of significant digits that will be + * displayed. If <code>max</code> is less than one then it is set + * to one. If the minimum significant digits count is greater + * than <code>max</code>, then it is set to <code>max</code>. + * This function also enables the use of significant digits + * by this formatter - areSignificantDigitsUsed() will return TRUE. + * @see #areSignificantDigitsUsed + * @param max the most significant digits to be shown + * @stable ICU 3.0 + */ + void setMaximumSignificantDigits(int32_t max); + + /** + * Returns true if significant digits are in use, or false if + * integer and fraction digit counts are in use. + * @return true if significant digits are in use + * @stable ICU 3.0 + */ + UBool areSignificantDigitsUsed() const; + + /** + * Sets whether significant digits are in use, or integer and + * fraction digit counts are in use. + * @param useSignificantDigits true to use significant digits, or + * false to use integer and fraction digit counts + * @stable ICU 3.0 + */ + void setSignificantDigitsUsed(UBool useSignificantDigits); + + public: + /** + * Sets the currency used to display currency + * amounts. This takes effect immediately, if this format is a + * currency format. If this format is not a currency format, then + * the currency is used if and when this object becomes a + * currency format through the application of a new pattern. + * @param theCurrency a 3-letter ISO code indicating new currency + * to use. It need not be null-terminated. May be the empty + * string or NULL to indicate no currency. + * @param ec input-output error code + * @stable ICU 3.0 + */ + virtual void setCurrency(const char16_t* theCurrency, UErrorCode& ec); + + /** + * Sets the currency used to display currency amounts. See + * setCurrency(const char16_t*, UErrorCode&). + * @deprecated ICU 3.0. Use setCurrency(const char16_t*, UErrorCode&). + */ + virtual void setCurrency(const char16_t* theCurrency); + + /** + * Sets the <tt>Currency Context</tt> object used to display currency. + * This takes effect immediately, if this format is a + * currency format. + * @param currencyContext new currency context object to use. + * @stable ICU 54 + */ + void setCurrencyUsage(UCurrencyUsage newUsage, UErrorCode* ec); + + /** + * Returns the <tt>Currency Context</tt> object used to display currency + * @stable ICU 54 + */ + UCurrencyUsage getCurrencyUsage() const; + + +#ifndef U_HIDE_DEPRECATED_API + /** + * The resource tags we use to retrieve decimal format data from + * locale resource bundles. + * @deprecated ICU 3.4. This string has no public purpose. Please don't use it. + */ + static const char fgNumberPatterns[]; +#endif // U_HIDE_DEPRECATED_API + +#ifndef U_HIDE_INTERNAL_API + /** + * Get a FixedDecimal corresponding to a double as it would be + * formatted by this DecimalFormat. + * Internal, not intended for public use. + * @internal + */ + FixedDecimal getFixedDecimal(double number, UErrorCode &status) const; + + /** + * Get a FixedDecimal corresponding to a formattable as it would be + * formatted by this DecimalFormat. + * Internal, not intended for public use. + * @internal + */ + FixedDecimal getFixedDecimal(const Formattable &number, UErrorCode &status) const; + + /** + * Get a FixedDecimal corresponding to a DigitList as it would be + * formatted by this DecimalFormat. Note: the DigitList may be modified. + * Internal, not intended for public use. + * @internal + */ + FixedDecimal getFixedDecimal(DigitList &number, UErrorCode &status) const; + + /** + * Get a VisibleDigitsWithExponent corresponding to a double + * as it would be formatted by this DecimalFormat. + * Internal, not intended for public use. + * @internal + */ + VisibleDigitsWithExponent &initVisibleDigitsWithExponent( + double number, + VisibleDigitsWithExponent &digits, + UErrorCode &status) const; + + /** + * Get a VisibleDigitsWithExponent corresponding to a formattable + * as it would be formatted by this DecimalFormat. + * Internal, not intended for public use. + * @internal + */ + VisibleDigitsWithExponent &initVisibleDigitsWithExponent( + const Formattable &number, + VisibleDigitsWithExponent &digits, + UErrorCode &status) const; + + /** + * Get a VisibleDigitsWithExponent corresponding to a DigitList + * as it would be formatted by this DecimalFormat. + * Note: the DigitList may be modified. + * Internal, not intended for public use. + * @internal + */ + VisibleDigitsWithExponent &initVisibleDigitsWithExponent( + DigitList &number, + VisibleDigitsWithExponent &digits, + UErrorCode &status) const; + +#endif /* U_HIDE_INTERNAL_API */ + +public: + + /** + * Return the class ID for this class. This is useful only for + * comparing to a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . Derived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 2.0 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. + * This method is to implement a simple version of RTTI, since not all + * C++ compilers support genuine RTTI. Polymorphic operator==() and + * clone() methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 2.0 + */ + virtual UClassID getDynamicClassID(void) const; + +private: + + DecimalFormat(); // default constructor not implemented + + /** + * Initialize all fields of a new DecimalFormatter to a safe default value. + * Common code for use by constructors. + */ + void init(); + + /** + * Do real work of constructing a new DecimalFormat. + */ + void construct(UErrorCode& status, + UParseError& parseErr, + const UnicodeString* pattern = 0, + DecimalFormatSymbols* symbolsToAdopt = 0 + ); + + void handleCurrencySignInPattern(UErrorCode& status); + + void parse(const UnicodeString& text, + Formattable& result, + ParsePosition& pos, + char16_t* currency) const; + + enum { + fgStatusInfinite, + fgStatusLength // Leave last in list. + } StatusFlags; + + UBool subparse(const UnicodeString& text, + const UnicodeString* negPrefix, + const UnicodeString* negSuffix, + const UnicodeString* posPrefix, + const UnicodeString* posSuffix, + UBool complexCurrencyParsing, + int8_t type, + ParsePosition& parsePosition, + DigitList& digits, UBool* status, + char16_t* currency) const; + + // Mixed style parsing for currency. + // It parses against the current currency pattern + // using complex affix comparison + // parses against the currency plural patterns using complex affix comparison, + // and parses against the current pattern using simple affix comparison. + UBool parseForCurrency(const UnicodeString& text, + ParsePosition& parsePosition, + DigitList& digits, + UBool* status, + char16_t* currency) const; + + int32_t skipPadding(const UnicodeString& text, int32_t position) const; + + int32_t compareAffix(const UnicodeString& input, + int32_t pos, + UBool isNegative, + UBool isPrefix, + const UnicodeString* affixPat, + UBool complexCurrencyParsing, + int8_t type, + char16_t* currency) const; + + static UnicodeString& trimMarksFromAffix(const UnicodeString& affix, UnicodeString& trimmedAffix); + + UBool equalWithSignCompatibility(UChar32 lhs, UChar32 rhs) const; + + int32_t compareSimpleAffix(const UnicodeString& affix, + const UnicodeString& input, + int32_t pos, + UBool lenient) const; + + static int32_t skipPatternWhiteSpace(const UnicodeString& text, int32_t pos); + + static int32_t skipUWhiteSpace(const UnicodeString& text, int32_t pos); + + static int32_t skipUWhiteSpaceAndMarks(const UnicodeString& text, int32_t pos); + + static int32_t skipBidiMarks(const UnicodeString& text, int32_t pos); + + int32_t compareComplexAffix(const UnicodeString& affixPat, + const UnicodeString& input, + int32_t pos, + int8_t type, + char16_t* currency) const; + + static int32_t match(const UnicodeString& text, int32_t pos, UChar32 ch); + + static int32_t match(const UnicodeString& text, int32_t pos, const UnicodeString& str); + + static UBool matchSymbol(const UnicodeString &text, int32_t position, int32_t length, const UnicodeString &symbol, + UnicodeSet *sset, UChar32 schar); + + static UBool matchDecimal(UChar32 symbolChar, + UBool sawDecimal, UChar32 sawDecimalChar, + const UnicodeSet *sset, UChar32 schar); + + static UBool matchGrouping(UChar32 groupingChar, + UBool sawGrouping, UChar32 sawGroupingChar, + const UnicodeSet *sset, + UChar32 decimalChar, const UnicodeSet *decimalSet, + UChar32 schar); + + // set up currency affix patterns for mix parsing. + // The patterns saved here are the affix patterns of default currency + // pattern and the unique affix patterns of the plural currency patterns. + // Those patterns are used by parseForCurrency(). + void setupCurrencyAffixPatterns(UErrorCode& status); + + // get the currency rounding with respect to currency usage + double getCurrencyRounding(const char16_t* currency, + UErrorCode* ec) const; + + // get the currency fraction with respect to currency usage + int getCurrencyFractionDigits(const char16_t* currency, + UErrorCode* ec) const; + + // hashtable operations + Hashtable* initHashForAffixPattern(UErrorCode& status); + + void deleteHashForAffixPattern(); + + void copyHashForAffixPattern(const Hashtable* source, + Hashtable* target, UErrorCode& status); + + DecimalFormatImpl *fImpl; + + /** + * Constants. + */ + + + EnumSet<UNumberFormatAttribute, + UNUM_MAX_NONBOOLEAN_ATTRIBUTE+1, + UNUM_LIMIT_BOOLEAN_ATTRIBUTE> + fBoolFlags; + + + // style is only valid when decimal formatter is constructed by + // DecimalFormat(pattern, decimalFormatSymbol, style) + int fStyle; + + + // Affix pattern set for currency. + // It is a set of AffixPatternsForCurrency, + // each element of the set saves the negative prefix pattern, + // negative suffix pattern, positive prefix pattern, + // and positive suffix pattern of a pattern. + // It is used for currency mixed style parsing. + // It is actually is a set. + // The set contains the default currency pattern from the locale, + // and the currency plural patterns. + // Since it is a set, it does not contain duplicated items. + // For example, if 2 currency plural patterns are the same, only one pattern + // is included in the set. When parsing, we do not check whether the plural + // count match or not. + Hashtable* fAffixPatternsForCurrency; + + // Information needed for DecimalFormat to format/parse currency plural. + CurrencyPluralInfo* fCurrencyPluralInfo; + +#if UCONFIG_HAVE_PARSEALLINPUT + UNumberFormatAttributeValue fParseAllInput; +#endif + + // Decimal Format Static Sets singleton. + const DecimalFormatStaticSets *fStaticSets; + +protected: + +#ifndef U_HIDE_INTERNAL_API + /** + * Rounds a value according to the rules of this object. + * @internal + */ + DigitList& _round(const DigitList& number, DigitList& adjustedNum, UBool& isNegative, UErrorCode& status) const; +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Returns the currency in effect for this formatter. Subclasses + * should override this method as needed. Unlike getCurrency(), + * this method should never return "". + * @result output parameter for null-terminated result, which must + * have a capacity of at least 4 + * @internal + */ + virtual void getEffectiveCurrency(char16_t* result, UErrorCode& ec) const; + + /** number of integer digits + * @stable ICU 2.4 + */ + static const int32_t kDoubleIntegerDigits; + /** number of fraction digits + * @stable ICU 2.4 + */ + static const int32_t kDoubleFractionDigits; + + /** + * When someone turns on scientific mode, we assume that more than this + * number of digits is due to flipping from some other mode that didn't + * restrict the maximum, and so we force 1 integer digit. We don't bother + * to track and see if someone is using exponential notation with more than + * this number, it wouldn't make sense anyway, and this is just to make sure + * that someone turning on scientific mode with default settings doesn't + * end up with lots of zeroes. + * @stable ICU 2.8 + */ + static const int32_t kMaxScientificIntegerDigits; + +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _DECIMFMT +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/docmain.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/docmain.h new file mode 100755 index 00000000..636931cf --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/docmain.h @@ -0,0 +1,222 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/******************************************************************** + * COPYRIGHT: + * Copyright (c) 1997-2012, International Business Machines Corporation and + * others. All Rights Reserved. + * + * FILE NAME: DOCMAIN.h + * + * Date Name Description + * 12/11/2000 Ram Creation. + */ + +/** + * \file + * \brief (Non API- contains Doxygen definitions) + * + * This file contains documentation for Doxygen and doesnot have + * any significance with respect to C or C++ API + */ + +/*! \mainpage + * + * \section API API Reference Usage + * + * <h3>C++ Programmers:</h3> + * <p>Use <a href="hierarchy.html">Class Hierarchy</a> or <a href="classes.html"> Alphabetical List </a> + * or <a href="annotated.html"> Compound List</a> + * to find the class you are interested in. For example, to find BreakIterator, + * you can go to the <a href="classes.html"> Alphabetical List</a>, then click on + * "BreakIterator". Once you are at the class, you will find an inheritance + * chart, a list of the public members, a detailed description of the class, + * then detailed member descriptions.</p> + * + * <h3>C Programmers:</h3> + * <p>Use <a href="#Module">Module List</a> or <a href="globals.html">File Members</a> + * to find a list of all the functions and constants. + * For example, to find BreakIterator functions you would click on + * <a href="files.html"> File List</a>, + * then find "ubrk.h" and click on it. You will find descriptions of Defines, + * Typedefs, Enumerations, and Functions, with detailed descriptions below. + * If you want to find a specific function, such as ubrk_next(), then click + * first on <a href="globals.html"> File Members</a>, then use your browser + * Find dialog to search for "ubrk_next()".</p> + * + * + * <h3>API References for Previous Releases</h3> + * <p>The API References for each release of ICU are also available as + * a zip file from the ICU + * <a href="http://site.icu-project.org/download">download page</a>.</p> + * + * <hr> + * + * <h2>Architecture (User's Guide)</h2> + * <ul> + * <li><a href="http://userguide.icu-project.org/">Introduction</a></li> + * <li><a href="http://userguide.icu-project.org/i18n">Internationalization</a></li> + * <li><a href="http://userguide.icu-project.org/design">Locale Model, Multithreading, Error Handling, etc.</a></li> + * <li><a href="http://userguide.icu-project.org/conversion">Conversion</a></li> + * </ul> + * + * <hr> + *\htmlonly <h2><a NAME="Module">Module List</a></h2> \endhtmlonly + * <table border="1" cols="3" align="center"> + * <tr> + * <td><strong>Module Name</strong></td> + * <td><strong>C</strong></td> + * <td><strong>C++</strong></td> + * </tr> + * <tr> + * <td>Basic Types and Constants</td> + * <td>utypes.h</td> + * <td>utypes.h</td> + * </tr> + * <tr> + * <td>Strings and Character Iteration</td> + * <td>ustring.h, utf8.h, utf16.h, UText, UCharIterator</td> + * <td>icu::UnicodeString, icu::CharacterIterator, icu::Appendable, icu::StringPiece,icu::ByteSink</td> + * </tr> + * <tr> + * <td>Unicode Character<br/>Properties and Names</td> + * <td>uchar.h, uscript.h</td> + * <td>C API</td> + * </tr> + * <tr> + * <td>Sets of Unicode Code Points and Strings</td> + * <td>uset.h</td> + * <td>icu::UnicodeSet</td> + * </tr> + * <tr> + * <td>Maps from Strings to Integer Values</td> + * <td>(no C API)</td> + * <td>icu::BytesTrie, icu::UCharsTrie</td> + * </tr> + * <tr> + * <td>Codepage Conversion</td> + * <td>ucnv.h, ucnvsel.hb</td> + * <td>C API</td> + * </tr> + * <tr> + * <td>Codepage Detection</td> + * <td>ucsdet.h</td> + * <td>C API</td> + * </tr> + * <tr> + * <td>Unicode Text Compression</td> + * <td>ucnv.h<br/>(encoding name "SCSU" or "BOCU-1")</td> + * <td>C API</td> + * </tr> + * <tr> + * <td>Locales </td> + * <td>uloc.h</a></td> + * <td>icu::Locale</td> + * </tr> + * <tr> + * <td>Resource Bundles</td> + * <td>ures.h</td> + * <td>icu::ResourceBundle</td> + * </tr> + * <tr> + * <td>Normalization</td> + * <td>unorm2.h</td> + * <td>icu::Normalizer2</td> + * </tr> + * <tr> + * <td>Calendars</td> + * <td>ucal.h</td> + * <td>icu::Calendar</td> + * </tr> + * <tr> + * <td>Date and Time Formatting</td> + * <td>udat.h</td> + * <td>icu::DateFormat</td> + * </tr> + * <tr> + * <td>Message Formatting</td> + * <td>umsg.h</td> + * <td>icu::MessageFormat</td> + * </tr> + * <tr> + * <td>Number Formatting</td> + * <td>unum.h</td> + * <td>icu::number::NumberFormatter (ICU 60+) or icu::NumberFormat (older versions)</td> + * </tr> + * <tr> + * <td>Number Spellout<br/>(Rule Based Number Formatting)</td> + * <td>unum.h<br/>(use UNUM_SPELLOUT)</td> + * <td>icu::RuleBasedNumberFormat</td> + * </tr> + * <tr> + * <td>Text Transformation<br/>(Transliteration)</td> + * <td>utrans.h</td> + * <td>icu::Transliterator</td> + * </tr> + * <tr> + * <td>Bidirectional Algorithm</td> + * <td>ubidi.h, ubiditransform.h</td> + * <td>C API</td> + * </tr> + * <tr> + * <td>Arabic Shaping</td> + * <td>ushape.h</td> + * <td>C API</td> + * </tr> + * <tr> + * <td>Collation</td> + * <td>ucol.h</td> + * <td>icu::Collator</td> + * </tr> + * <tr> + * <td>String Searching</td> + * <td>usearch.h</td> + * <td>icu::StringSearch</td> + * </tr> + * <tr> + * <td>Index Characters/<br/>Bucketing for Sorted Lists</td> + * <td>(no C API)</td> + * <td>icu::AlphabeticIndex</td> + * </tr> + * <tr> + * <td>Text Boundary Analysis<br/>(Break Iteration)</td> + * <td>ubrk.h</td> + * <td>icu::BreakIterator</td> + * </tr> + * <tr> + * <td>Regular Expressions</td> + * <td>uregex.h</td> + * <td>icu::RegexPattern, icu::RegexMatcher</td> + * </tr> + * <tr> + * <td>StringPrep</td> + * <td>usprep.h</td> + * <td>C API</td> + * </tr> + * <tr> + * <td>International Domain Names in Applications:<br/> + * UTS #46 in C/C++, IDNA2003 only via C API</td> + * <td>uidna.h</td> + * <td>idna.h</td> + * </tr> + * <tr> + * <td>Identifier Spoofing & Confusability</td> + * <td>uspoof.h</td> + * <td>C API</td> + * <tr> + * <td>Universal Time Scale</td> + * <td>utmscale.h</td> + * <td>C API</td> + * </tr> + * <tr> + * <td>Layout Engine/Complex Text Layout</td> + * <td>loengine.h</td> + * <td>icu::LayoutEngine,icu::ParagraphLayout</td> + * </tr> + * <tr> + * <td>ICU I/O</td> + * <td>ustdio.h</td> + * <td>ustream.h</td> + * </tr> + * </table> + * <i>This main page is generated from docmain.h</i> + */ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dtfmtsym.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dtfmtsym.h new file mode 100755 index 00000000..fe914b46 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dtfmtsym.h @@ -0,0 +1,1015 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************** +* Copyright (C) 1997-2016, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************** +* +* File DTFMTSYM.H +* +* Modification History: +* +* Date Name Description +* 02/19/97 aliu Converted from java. +* 07/21/98 stephen Added getZoneIndex() +* Changed to match C++ conventions +******************************************************************************** +*/ + +#ifndef DTFMTSYM_H +#define DTFMTSYM_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/calendar.h" +#include "unicode/strenum.h" +#include "unicode/uobject.h" +#include "unicode/locid.h" +#include "unicode/udat.h" +#include "unicode/ures.h" + +/** + * \file + * \brief C++ API: Symbols for formatting dates. + */ + +U_NAMESPACE_BEGIN + +/* forward declaration */ +class SimpleDateFormat; +class Hashtable; + +/** + * DateFormatSymbols is a public class for encapsulating localizable date-time + * formatting data -- including timezone data. DateFormatSymbols is used by + * DateFormat and SimpleDateFormat. + * <P> + * Rather than first creating a DateFormatSymbols to get a date-time formatter + * by using a SimpleDateFormat constructor, clients are encouraged to create a + * date-time formatter using the getTimeInstance(), getDateInstance(), or + * getDateTimeInstance() method in DateFormat. Each of these methods can return a + * date/time formatter initialized with a default format pattern along with the + * date-time formatting data for a given or default locale. After a formatter is + * created, clients may modify the format pattern using the setPattern function + * as so desired. For more information on using these formatter factory + * functions, see DateFormat. + * <P> + * If clients decide to create a date-time formatter with a particular format + * pattern and locale, they can do so with new SimpleDateFormat(aPattern, + * new DateFormatSymbols(aLocale)). This will load the appropriate date-time + * formatting data from the locale. + * <P> + * DateFormatSymbols objects are clonable. When clients obtain a + * DateFormatSymbols object, they can feel free to modify the date-time + * formatting data as necessary. For instance, clients can + * replace the localized date-time format pattern characters with the ones that + * they feel easy to remember. Or they can change the representative cities + * originally picked by default to using their favorite ones. + * <P> + * DateFormatSymbols are not expected to be subclassed. Data for a calendar is + * loaded out of resource bundles. The 'type' parameter indicates the type of + * calendar, for example, "gregorian" or "japanese". If the type is not gregorian + * (or NULL, or an empty string) then the type is appended to the resource name, + * for example, 'Eras_japanese' instead of 'Eras'. If the resource 'Eras_japanese' did + * not exist (even in root), then this class will fall back to just 'Eras', that is, + * Gregorian data. Therefore, the calendar implementor MUST ensure that the root + * locale at least contains any resources that are to be particularized for the + * calendar type. + */ +class U_I18N_API DateFormatSymbols U_FINAL : public UObject { +public: + /** + * Construct a DateFormatSymbols object by loading format data from + * resources for the default locale, in the default calendar (Gregorian). + * <P> + * NOTE: This constructor will never fail; if it cannot get resource + * data for the default locale, it will return a last-resort object + * based on hard-coded strings. + * + * @param status Status code. Failure + * results if the resources for the default cannot be + * found or cannot be loaded + * @stable ICU 2.0 + */ + DateFormatSymbols(UErrorCode& status); + + /** + * Construct a DateFormatSymbols object by loading format data from + * resources for the given locale, in the default calendar (Gregorian). + * + * @param locale Locale to load format data from. + * @param status Status code. Failure + * results if the resources for the locale cannot be + * found or cannot be loaded + * @stable ICU 2.0 + */ + DateFormatSymbols(const Locale& locale, + UErrorCode& status); + +#ifndef U_HIDE_INTERNAL_API + /** + * Construct a DateFormatSymbols object by loading format data from + * resources for the default locale, in the default calendar (Gregorian). + * <P> + * NOTE: This constructor will never fail; if it cannot get resource + * data for the default locale, it will return a last-resort object + * based on hard-coded strings. + * + * @param type Type of calendar (as returned by Calendar::getType). + * Will be used to access the correct set of strings. + * (NULL or empty string defaults to "gregorian".) + * @param status Status code. Failure + * results if the resources for the default cannot be + * found or cannot be loaded + * @internal + */ + DateFormatSymbols(const char *type, UErrorCode& status); + + /** + * Construct a DateFormatSymbols object by loading format data from + * resources for the given locale, in the default calendar (Gregorian). + * + * @param locale Locale to load format data from. + * @param type Type of calendar (as returned by Calendar::getType). + * Will be used to access the correct set of strings. + * (NULL or empty string defaults to "gregorian".) + * @param status Status code. Failure + * results if the resources for the locale cannot be + * found or cannot be loaded + * @internal + */ + DateFormatSymbols(const Locale& locale, + const char *type, + UErrorCode& status); +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Copy constructor. + * @stable ICU 2.0 + */ + DateFormatSymbols(const DateFormatSymbols&); + + /** + * Assignment operator. + * @stable ICU 2.0 + */ + DateFormatSymbols& operator=(const DateFormatSymbols&); + + /** + * Destructor. This is nonvirtual because this class is not designed to be + * subclassed. + * @stable ICU 2.0 + */ + virtual ~DateFormatSymbols(); + + /** + * Return true if another object is semantically equal to this one. + * + * @param other the DateFormatSymbols object to be compared with. + * @return true if other is semantically equal to this. + * @stable ICU 2.0 + */ + UBool operator==(const DateFormatSymbols& other) const; + + /** + * Return true if another object is semantically unequal to this one. + * + * @param other the DateFormatSymbols object to be compared with. + * @return true if other is semantically unequal to this. + * @stable ICU 2.0 + */ + UBool operator!=(const DateFormatSymbols& other) const { return !operator==(other); } + + /** + * Gets abbreviated era strings. For example: "AD" and "BC". + * + * @param count Filled in with length of the array. + * @return the era strings. + * @stable ICU 2.0 + */ + const UnicodeString* getEras(int32_t& count) const; + + /** + * Sets abbreviated era strings. For example: "AD" and "BC". + * @param eras Array of era strings (DateFormatSymbols retains ownership.) + * @param count Filled in with length of the array. + * @stable ICU 2.0 + */ + void setEras(const UnicodeString* eras, int32_t count); + + /** + * Gets era name strings. For example: "Anno Domini" and "Before Christ". + * + * @param count Filled in with length of the array. + * @return the era name strings. + * @stable ICU 3.4 + */ + const UnicodeString* getEraNames(int32_t& count) const; + + /** + * Sets era name strings. For example: "Anno Domini" and "Before Christ". + * @param eraNames Array of era name strings (DateFormatSymbols retains ownership.) + * @param count Filled in with length of the array. + * @stable ICU 3.6 + */ + void setEraNames(const UnicodeString* eraNames, int32_t count); + + /** + * Gets narrow era strings. For example: "A" and "B". + * + * @param count Filled in with length of the array. + * @return the narrow era strings. + * @stable ICU 4.2 + */ + const UnicodeString* getNarrowEras(int32_t& count) const; + + /** + * Sets narrow era strings. For example: "A" and "B". + * @param narrowEras Array of narrow era strings (DateFormatSymbols retains ownership.) + * @param count Filled in with length of the array. + * @stable ICU 4.2 + */ + void setNarrowEras(const UnicodeString* narrowEras, int32_t count); + + /** + * Gets month strings. For example: "January", "February", etc. + * @param count Filled in with length of the array. + * @return the month strings. (DateFormatSymbols retains ownership.) + * @stable ICU 2.0 + */ + const UnicodeString* getMonths(int32_t& count) const; + + /** + * Sets month strings. For example: "January", "February", etc. + * + * @param months the new month strings. (not adopted; caller retains ownership) + * @param count Filled in with length of the array. + * @stable ICU 2.0 + */ + void setMonths(const UnicodeString* months, int32_t count); + + /** + * Gets short month strings. For example: "Jan", "Feb", etc. + * + * @param count Filled in with length of the array. + * @return the short month strings. (DateFormatSymbols retains ownership.) + * @stable ICU 2.0 + */ + const UnicodeString* getShortMonths(int32_t& count) const; + + /** + * Sets short month strings. For example: "Jan", "Feb", etc. + * @param count Filled in with length of the array. + * @param shortMonths the new short month strings. (not adopted; caller retains ownership) + * @stable ICU 2.0 + */ + void setShortMonths(const UnicodeString* shortMonths, int32_t count); + + /** + * Selector for date formatting context + * @stable ICU 3.6 + */ + enum DtContextType { + FORMAT, + STANDALONE, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal DtContextType value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + DT_CONTEXT_COUNT +#endif // U_HIDE_DEPRECATED_API + }; + + /** + * Selector for date formatting width + * @stable ICU 3.6 + */ + enum DtWidthType { + ABBREVIATED, + WIDE, + NARROW, + /** + * Short width is currently only supported for weekday names. + * @stable ICU 51 + */ + SHORT, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal DtWidthType value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + DT_WIDTH_COUNT = 4 +#endif // U_HIDE_DEPRECATED_API + }; + + /** + * Gets month strings by width and context. For example: "January", "February", etc. + * @param count Filled in with length of the array. + * @param context The formatting context, either FORMAT or STANDALONE + * @param width The width of returned strings, either WIDE, ABBREVIATED, or NARROW. + * @return the month strings. (DateFormatSymbols retains ownership.) + * @stable ICU 3.4 + */ + const UnicodeString* getMonths(int32_t& count, DtContextType context, DtWidthType width) const; + + /** + * Sets month strings by width and context. For example: "January", "February", etc. + * + * @param months The new month strings. (not adopted; caller retains ownership) + * @param count Filled in with length of the array. + * @param context The formatting context, either FORMAT or STANDALONE + * @param width The width of returned strings, either WIDE, ABBREVIATED, or NARROW. + * @stable ICU 3.6 + */ + void setMonths(const UnicodeString* months, int32_t count, DtContextType context, DtWidthType width); + + /** + * Gets wide weekday strings. For example: "Sunday", "Monday", etc. + * @param count Filled in with length of the array. + * @return the weekday strings. (DateFormatSymbols retains ownership.) + * @stable ICU 2.0 + */ + const UnicodeString* getWeekdays(int32_t& count) const; + + + /** + * Sets wide weekday strings. For example: "Sunday", "Monday", etc. + * @param weekdays the new weekday strings. (not adopted; caller retains ownership) + * @param count Filled in with length of the array. + * @stable ICU 2.0 + */ + void setWeekdays(const UnicodeString* weekdays, int32_t count); + + /** + * Gets abbreviated weekday strings. For example: "Sun", "Mon", etc. (Note: The method name is + * misleading; it does not get the CLDR-style "short" weekday strings, e.g. "Su", "Mo", etc.) + * @param count Filled in with length of the array. + * @return the abbreviated weekday strings. (DateFormatSymbols retains ownership.) + * @stable ICU 2.0 + */ + const UnicodeString* getShortWeekdays(int32_t& count) const; + + /** + * Sets abbreviated weekday strings. For example: "Sun", "Mon", etc. (Note: The method name is + * misleading; it does not set the CLDR-style "short" weekday strings, e.g. "Su", "Mo", etc.) + * @param abbrevWeekdays the new abbreviated weekday strings. (not adopted; caller retains ownership) + * @param count Filled in with length of the array. + * @stable ICU 2.0 + */ + void setShortWeekdays(const UnicodeString* abbrevWeekdays, int32_t count); + + /** + * Gets weekday strings by width and context. For example: "Sunday", "Monday", etc. + * @param count Filled in with length of the array. + * @param context The formatting context, either FORMAT or STANDALONE + * @param width The width of returned strings, either WIDE, ABBREVIATED, SHORT, or NARROW + * @return the month strings. (DateFormatSymbols retains ownership.) + * @stable ICU 3.4 + */ + const UnicodeString* getWeekdays(int32_t& count, DtContextType context, DtWidthType width) const; + + /** + * Sets weekday strings by width and context. For example: "Sunday", "Monday", etc. + * @param weekdays The new weekday strings. (not adopted; caller retains ownership) + * @param count Filled in with length of the array. + * @param context The formatting context, either FORMAT or STANDALONE + * @param width The width of returned strings, either WIDE, ABBREVIATED, SHORT, or NARROW + * @stable ICU 3.6 + */ + void setWeekdays(const UnicodeString* weekdays, int32_t count, DtContextType context, DtWidthType width); + + /** + * Gets quarter strings by width and context. For example: "1st Quarter", "2nd Quarter", etc. + * @param count Filled in with length of the array. + * @param context The formatting context, either FORMAT or STANDALONE + * @param width The width of returned strings, either WIDE or ABBREVIATED. There + * are no NARROW quarters. + * @return the quarter strings. (DateFormatSymbols retains ownership.) + * @stable ICU 3.6 + */ + const UnicodeString* getQuarters(int32_t& count, DtContextType context, DtWidthType width) const; + + /** + * Sets quarter strings by width and context. For example: "1st Quarter", "2nd Quarter", etc. + * + * @param quarters The new quarter strings. (not adopted; caller retains ownership) + * @param count Filled in with length of the array. + * @param context The formatting context, either FORMAT or STANDALONE + * @param width The width of returned strings, either WIDE or ABBREVIATED. There + * are no NARROW quarters. + * @stable ICU 3.6 + */ + void setQuarters(const UnicodeString* quarters, int32_t count, DtContextType context, DtWidthType width); + + /** + * Gets AM/PM strings. For example: "AM" and "PM". + * @param count Filled in with length of the array. + * @return the weekday strings. (DateFormatSymbols retains ownership.) + * @stable ICU 2.0 + */ + const UnicodeString* getAmPmStrings(int32_t& count) const; + + /** + * Sets ampm strings. For example: "AM" and "PM". + * @param ampms the new ampm strings. (not adopted; caller retains ownership) + * @param count Filled in with length of the array. + * @stable ICU 2.0 + */ + void setAmPmStrings(const UnicodeString* ampms, int32_t count); + +#ifndef U_HIDE_INTERNAL_API + /** + * This default time separator is used for formatting when the locale + * doesn't specify any time separator, and always recognized when parsing. + * @internal + */ + static const char16_t DEFAULT_TIME_SEPARATOR = 0x003a; // ':' + + /** + * This alternate time separator is always recognized when parsing. + * @internal + */ + static const char16_t ALTERNATE_TIME_SEPARATOR = 0x002e; // '.' + + /** + * Gets the time separator string. For example: ":". + * @param result Output param which will receive the time separator string. + * @return A reference to 'result'. + * @internal + */ + UnicodeString& getTimeSeparatorString(UnicodeString& result) const; + + /** + * Sets the time separator string. For example: ":". + * @param newTimeSeparator the new time separator string. + * @internal + */ + void setTimeSeparatorString(const UnicodeString& newTimeSeparator); +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Gets cyclic year name strings if the calendar has them, by width and context. + * For example: "jia-zi", "yi-chou", etc. + * @param count Filled in with length of the array. + * @param context The usage context: FORMAT, STANDALONE. + * @param width The requested name width: WIDE, ABBREVIATED, NARROW. + * @return The year name strings (DateFormatSymbols retains ownership), + * or null if they are not available for this calendar. + * @stable ICU 54 + */ + const UnicodeString* getYearNames(int32_t& count, + DtContextType context, DtWidthType width) const; + + /** + * Sets cyclic year name strings by width and context. For example: "jia-zi", "yi-chou", etc. + * + * @param yearNames The new cyclic year name strings (not adopted; caller retains ownership). + * @param count The length of the array. + * @param context The usage context: FORMAT, STANDALONE (currently only FORMAT is supported). + * @param width The name width: WIDE, ABBREVIATED, NARROW (currently only ABBREVIATED is supported). + * @stable ICU 54 + */ + void setYearNames(const UnicodeString* yearNames, int32_t count, + DtContextType context, DtWidthType width); + + /** + * Gets calendar zodiac name strings if the calendar has them, by width and context. + * For example: "Rat", "Ox", "Tiger", etc. + * @param count Filled in with length of the array. + * @param context The usage context: FORMAT, STANDALONE. + * @param width The requested name width: WIDE, ABBREVIATED, NARROW. + * @return The zodiac name strings (DateFormatSymbols retains ownership), + * or null if they are not available for this calendar. + * @stable ICU 54 + */ + const UnicodeString* getZodiacNames(int32_t& count, + DtContextType context, DtWidthType width) const; + + /** + * Sets calendar zodiac name strings by width and context. For example: "Rat", "Ox", "Tiger", etc. + * + * @param zodiacNames The new zodiac name strings (not adopted; caller retains ownership). + * @param count The length of the array. + * @param context The usage context: FORMAT, STANDALONE (currently only FORMAT is supported). + * @param width The name width: WIDE, ABBREVIATED, NARROW (currently only ABBREVIATED is supported). + * @stable ICU 54 + */ + void setZodiacNames(const UnicodeString* zodiacNames, int32_t count, + DtContextType context, DtWidthType width); + +#ifndef U_HIDE_INTERNAL_API + /** + * Somewhat temporary constants for leap month pattern types, adequate for supporting + * just leap month patterns as needed for Chinese lunar calendar. + * Eventually we will add full support for different month pattern types (needed for + * other calendars such as Hindu) at which point this approach will be replaced by a + * more complete approach. + * @internal + */ + enum EMonthPatternType + { + kLeapMonthPatternFormatWide, + kLeapMonthPatternFormatAbbrev, + kLeapMonthPatternFormatNarrow, + kLeapMonthPatternStandaloneWide, + kLeapMonthPatternStandaloneAbbrev, + kLeapMonthPatternStandaloneNarrow, + kLeapMonthPatternNumeric, + kMonthPatternsCount + }; + + /** + * Somewhat temporary function for getting complete set of leap month patterns for all + * contexts & widths, indexed by EMonthPatternType values. Returns NULL if calendar + * does not have leap month patterns. Note, there is currently no setter for this. + * Eventually we will add full support for different month pattern types (needed for + * other calendars such as Hindu) at which point this approach will be replaced by a + * more complete approach. + * @param count Filled in with length of the array (may be 0). + * @return The leap month patterns (DateFormatSymbols retains ownership). + * May be NULL if there are no leap month patterns for this calendar. + * @internal + */ + const UnicodeString* getLeapMonthPatterns(int32_t& count) const; + +#endif /* U_HIDE_INTERNAL_API */ + +#ifndef U_HIDE_DEPRECATED_API + /** + * Gets timezone strings. These strings are stored in a 2-dimensional array. + * @param rowCount Output param to receive number of rows. + * @param columnCount Output param to receive number of columns. + * @return The timezone strings as a 2-d array. (DateFormatSymbols retains ownership.) + * @deprecated ICU 3.6 + */ + const UnicodeString** getZoneStrings(int32_t& rowCount, int32_t& columnCount) const; +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Sets timezone strings. These strings are stored in a 2-dimensional array. + * <p><b>Note:</b> SimpleDateFormat no longer use the zone strings stored in + * a DateFormatSymbols. Therefore, the time zone strings set by this mthod + * have no effects in an instance of SimpleDateFormat for formatting time + * zones. + * @param strings The timezone strings as a 2-d array to be copied. (not adopted; caller retains ownership) + * @param rowCount The number of rows (count of first index). + * @param columnCount The number of columns (count of second index). + * @stable ICU 2.0 + */ + void setZoneStrings(const UnicodeString* const* strings, int32_t rowCount, int32_t columnCount); + + /** + * Get the non-localized date-time pattern characters. + * @return the non-localized date-time pattern characters + * @stable ICU 2.0 + */ + static const char16_t * U_EXPORT2 getPatternUChars(void); + + /** + * Gets localized date-time pattern characters. For example: 'u', 't', etc. + * <p> + * Note: ICU no longer provides localized date-time pattern characters for a locale + * starting ICU 3.8. This method returns the non-localized date-time pattern + * characters unless user defined localized data is set by setLocalPatternChars. + * @param result Output param which will receive the localized date-time pattern characters. + * @return A reference to 'result'. + * @stable ICU 2.0 + */ + UnicodeString& getLocalPatternChars(UnicodeString& result) const; + + /** + * Sets localized date-time pattern characters. For example: 'u', 't', etc. + * @param newLocalPatternChars the new localized date-time + * pattern characters. + * @stable ICU 2.0 + */ + void setLocalPatternChars(const UnicodeString& newLocalPatternChars); + + /** + * Returns the locale for this object. Two flavors are available: + * valid and actual locale. + * @stable ICU 2.8 + */ + Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const; + + /* The following type and kCapContextUsageTypeCount cannot be #ifndef U_HIDE_INTERNAL_API, + they are needed for .h file declarations. */ + /** + * Constants for capitalization context usage types. + * @internal + */ + enum ECapitalizationContextUsageType + { +#ifndef U_HIDE_INTERNAL_API + kCapContextUsageOther = 0, + kCapContextUsageMonthFormat, /* except narrow */ + kCapContextUsageMonthStandalone, /* except narrow */ + kCapContextUsageMonthNarrow, + kCapContextUsageDayFormat, /* except narrow */ + kCapContextUsageDayStandalone, /* except narrow */ + kCapContextUsageDayNarrow, + kCapContextUsageEraWide, + kCapContextUsageEraAbbrev, + kCapContextUsageEraNarrow, + kCapContextUsageZoneLong, + kCapContextUsageZoneShort, + kCapContextUsageMetazoneLong, + kCapContextUsageMetazoneShort, +#endif /* U_HIDE_INTERNAL_API */ + kCapContextUsageTypeCount = 14 + }; + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.2 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.2 + */ + static UClassID U_EXPORT2 getStaticClassID(); + +private: + + friend class SimpleDateFormat; + friend class DateFormatSymbolsSingleSetter; // see udat.cpp + + /** + * Abbreviated era strings. For example: "AD" and "BC". + */ + UnicodeString* fEras; + int32_t fErasCount; + + /** + * Era name strings. For example: "Anno Domini" and "Before Christ". + */ + UnicodeString* fEraNames; + int32_t fEraNamesCount; + + /** + * Narrow era strings. For example: "A" and "B". + */ + UnicodeString* fNarrowEras; + int32_t fNarrowErasCount; + + /** + * Month strings. For example: "January", "February", etc. + */ + UnicodeString* fMonths; + int32_t fMonthsCount; + + /** + * Short month strings. For example: "Jan", "Feb", etc. + */ + UnicodeString* fShortMonths; + int32_t fShortMonthsCount; + + /** + * Narrow month strings. For example: "J", "F", etc. + */ + UnicodeString* fNarrowMonths; + int32_t fNarrowMonthsCount; + + /** + * Standalone Month strings. For example: "January", "February", etc. + */ + UnicodeString* fStandaloneMonths; + int32_t fStandaloneMonthsCount; + + /** + * Standalone Short month strings. For example: "Jan", "Feb", etc. + */ + UnicodeString* fStandaloneShortMonths; + int32_t fStandaloneShortMonthsCount; + + /** + * Standalone Narrow month strings. For example: "J", "F", etc. + */ + UnicodeString* fStandaloneNarrowMonths; + int32_t fStandaloneNarrowMonthsCount; + + /** + * CLDR-style format wide weekday strings. For example: "Sunday", "Monday", etc. + */ + UnicodeString* fWeekdays; + int32_t fWeekdaysCount; + + /** + * CLDR-style format abbreviated (not short) weekday strings. For example: "Sun", "Mon", etc. + */ + UnicodeString* fShortWeekdays; + int32_t fShortWeekdaysCount; + + /** + * CLDR-style format short weekday strings. For example: "Su", "Mo", etc. + */ + UnicodeString* fShorterWeekdays; + int32_t fShorterWeekdaysCount; + + /** + * CLDR-style format narrow weekday strings. For example: "S", "M", etc. + */ + UnicodeString* fNarrowWeekdays; + int32_t fNarrowWeekdaysCount; + + /** + * CLDR-style standalone wide weekday strings. For example: "Sunday", "Monday", etc. + */ + UnicodeString* fStandaloneWeekdays; + int32_t fStandaloneWeekdaysCount; + + /** + * CLDR-style standalone abbreviated (not short) weekday strings. For example: "Sun", "Mon", etc. + */ + UnicodeString* fStandaloneShortWeekdays; + int32_t fStandaloneShortWeekdaysCount; + + /** + * CLDR-style standalone short weekday strings. For example: "Su", "Mo", etc. + */ + UnicodeString* fStandaloneShorterWeekdays; + int32_t fStandaloneShorterWeekdaysCount; + + /** + * Standalone Narrow weekday strings. For example: "Sun", "Mon", etc. + */ + UnicodeString* fStandaloneNarrowWeekdays; + int32_t fStandaloneNarrowWeekdaysCount; + + /** + * Ampm strings. For example: "AM" and "PM". + */ + UnicodeString* fAmPms; + int32_t fAmPmsCount; + + /** + * Narrow Ampm strings. For example: "a" and "p". + */ + UnicodeString* fNarrowAmPms; + int32_t fNarrowAmPmsCount; + + /** + * Time separator string. For example: ":". + */ + UnicodeString fTimeSeparator; + + /** + * Quarter strings. For example: "1st quarter", "2nd quarter", etc. + */ + UnicodeString *fQuarters; + int32_t fQuartersCount; + + /** + * Short quarters. For example: "Q1", "Q2", etc. + */ + UnicodeString *fShortQuarters; + int32_t fShortQuartersCount; + + /** + * Standalone quarter strings. For example: "1st quarter", "2nd quarter", etc. + */ + UnicodeString *fStandaloneQuarters; + int32_t fStandaloneQuartersCount; + + /** + * Standalone short quarter strings. For example: "Q1", "Q2", etc. + */ + UnicodeString *fStandaloneShortQuarters; + int32_t fStandaloneShortQuartersCount; + + /** + * All leap month patterns, for example "{0}bis". + */ + UnicodeString *fLeapMonthPatterns; + int32_t fLeapMonthPatternsCount; + + /** + * Cyclic year names, for example: "jia-zi", "yi-chou", ... "gui-hai"; + * currently we only have data for format/abbreviated. + * For the others, just get from format/abbreviated, ignore set. + */ + UnicodeString *fShortYearNames; + int32_t fShortYearNamesCount; + + /** + * Cyclic zodiac names, for example "Rat", "Ox", "Tiger", etc.; + * currently we only have data for format/abbreviated. + * For the others, just get from format/abbreviated, ignore set. + */ + UnicodeString *fShortZodiacNames; + int32_t fShortZodiacNamesCount; + + /** + * Localized names of time zones in this locale. This is a + * two-dimensional array of strings of size n by m, + * where m is at least 5 and up to 7. Each of the n rows is an + * entry containing the localized names for a single TimeZone. + * + * Each such row contains (with i ranging from 0..n-1): + * + * zoneStrings[i][0] - time zone ID + * example: America/Los_Angeles + * zoneStrings[i][1] - long name of zone in standard time + * example: Pacific Standard Time + * zoneStrings[i][2] - short name of zone in standard time + * example: PST + * zoneStrings[i][3] - long name of zone in daylight savings time + * example: Pacific Daylight Time + * zoneStrings[i][4] - short name of zone in daylight savings time + * example: PDT + * zoneStrings[i][5] - location name of zone + * example: United States (Los Angeles) + * zoneStrings[i][6] - long generic name of zone + * example: Pacific Time + * zoneStrings[i][7] - short generic of zone + * example: PT + * + * The zone ID is not localized; it corresponds to the ID + * value associated with a system time zone object. All other entries + * are localized names. If a zone does not implement daylight savings + * time, the daylight savings time names are ignored. + * + * Note:CLDR 1.5 introduced metazone and its historical mappings. + * This simple two-dimensional array is no longer sufficient to represent + * localized names and its historic changes. Since ICU 3.8.1, localized + * zone names extracted from ICU locale data is stored in a ZoneStringFormat + * instance. But we still need to support the old way of customizing + * localized zone names, so we keep this field for the purpose. + */ + UnicodeString **fZoneStrings; // Zone string array set by setZoneStrings + UnicodeString **fLocaleZoneStrings; // Zone string array created by the locale + int32_t fZoneStringsRowCount; + int32_t fZoneStringsColCount; + + Locale fZSFLocale; // Locale used for getting ZoneStringFormat + + /** + * Localized date-time pattern characters. For example: use 'u' as 'y'. + */ + UnicodeString fLocalPatternChars; + + /** + * Capitalization transforms. For each usage type, the first array element indicates + * whether to titlecase for uiListOrMenu context, the second indicates whether to + * titlecase for stand-alone context. + */ + UBool fCapitalization[kCapContextUsageTypeCount][2]; + + /** + * Abbreviated (== short) day period strings. + */ + UnicodeString *fAbbreviatedDayPeriods; + int32_t fAbbreviatedDayPeriodsCount; + + /** + * Wide day period strings. + */ + UnicodeString *fWideDayPeriods; + int32_t fWideDayPeriodsCount; + + /** + * Narrow day period strings. + */ + UnicodeString *fNarrowDayPeriods; + int32_t fNarrowDayPeriodsCount; + + /** + * Stand-alone abbreviated (== short) day period strings. + */ + UnicodeString *fStandaloneAbbreviatedDayPeriods; + int32_t fStandaloneAbbreviatedDayPeriodsCount; + + /** + * Stand-alone wide day period strings. + */ + UnicodeString *fStandaloneWideDayPeriods; + int32_t fStandaloneWideDayPeriodsCount; + + /** + * Stand-alone narrow day period strings. + */ + UnicodeString *fStandaloneNarrowDayPeriods; + int32_t fStandaloneNarrowDayPeriodsCount; + +private: + /** valid/actual locale information + * these are always ICU locales, so the length should not be a problem + */ + char validLocale[ULOC_FULLNAME_CAPACITY]; + char actualLocale[ULOC_FULLNAME_CAPACITY]; + + DateFormatSymbols(); // default constructor not implemented + + /** + * Called by the constructors to actually load data from the resources + * + * @param locale The locale to get symbols for. + * @param type Calendar Type (as from Calendar::getType()) + * @param status Input/output parameter, set to success or + * failure code upon return. + * @param useLastResortData determine if use last resort data + */ + void initializeData(const Locale& locale, const char *type, UErrorCode& status, UBool useLastResortData = FALSE); + + /** + * Copy or alias an array in another object, as appropriate. + * + * @param dstArray the copy destination array. + * @param dstCount fill in with the lenth of 'dstArray'. + * @param srcArray the source array to be copied. + * @param srcCount the length of items to be copied from the 'srcArray'. + */ + static void assignArray(UnicodeString*& dstArray, + int32_t& dstCount, + const UnicodeString* srcArray, + int32_t srcCount); + + /** + * Return true if the given arrays' contents are equal, or if the arrays are + * identical (pointers are equal). + * + * @param array1 one array to be compared with. + * @param array2 another array to be compared with. + * @param count the length of items to be copied. + * @return true if the given arrays' contents are equal, or if the arrays are + * identical (pointers are equal). + */ + static UBool arrayCompare(const UnicodeString* array1, + const UnicodeString* array2, + int32_t count); + + /** + * Create a copy, in fZoneStrings, of the given zone strings array. The + * member variables fZoneStringsRowCount and fZoneStringsColCount should be + * set already by the caller. + */ + void createZoneStrings(const UnicodeString *const * otherStrings); + + /** + * Delete all the storage owned by this object. + */ + void dispose(void); + + /** + * Copy all of the other's data to this. + * @param other the object to be copied. + */ + void copyData(const DateFormatSymbols& other); + + /** + * Create zone strings array by locale if not yet available + */ + void initZoneStringsArray(void); + + /** + * Delete just the zone strings. + */ + void disposeZoneStrings(void); + + /** + * Returns the date format field index of the pattern character c, + * or UDAT_FIELD_COUNT if c is not a pattern character. + */ + static UDateFormatField U_EXPORT2 getPatternCharIndex(char16_t c); + + /** + * Returns TRUE if f (with its pattern character repeated count times) is a numeric field. + */ + static UBool U_EXPORT2 isNumericField(UDateFormatField f, int32_t count); + + /** + * Returns TRUE if c (repeated count times) is the pattern character for a numeric field. + */ + static UBool U_EXPORT2 isNumericPatternChar(char16_t c, int32_t count); +public: +#ifndef U_HIDE_INTERNAL_API + /** + * Gets a DateFormatSymbols by locale. + * Unlike the constructors which always use gregorian calendar, this + * method uses the calendar in the locale. If the locale contains no + * explicit calendar, this method uses the default calendar for that + * locale. + * @param locale the locale. + * @param status error returned here. + * @return the new DateFormatSymbols which the caller owns. + * @internal For ICU use only. + */ + static DateFormatSymbols * U_EXPORT2 createForLocale( + const Locale &locale, UErrorCode &status); +#endif /* U_HIDE_INTERNAL_API */ +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _DTFMTSYM +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dtintrv.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dtintrv.h new file mode 100755 index 00000000..c3f1058c --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dtintrv.h @@ -0,0 +1,160 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2008-2009, International Business Machines Corporation and +* others. All Rights Reserved. +******************************************************************************* +* +* File DTINTRV.H +* +******************************************************************************* +*/ + +#ifndef __DTINTRV_H__ +#define __DTINTRV_H__ + +#include "unicode/utypes.h" +#include "unicode/uobject.h" + +/** + * \file + * \brief C++ API: Date Interval data type + */ + + +U_NAMESPACE_BEGIN + + +/** + * This class represents a date interval. + * It is a pair of UDate representing from UDate 1 to UDate 2. + * @stable ICU 4.0 +**/ +class U_COMMON_API DateInterval : public UObject { +public: + + /** + * Construct a DateInterval given a from date and a to date. + * @param fromDate The from date in date interval. + * @param toDate The to date in date interval. + * @stable ICU 4.0 + */ + DateInterval(UDate fromDate, UDate toDate); + + /** + * destructor + * @stable ICU 4.0 + */ + virtual ~DateInterval(); + + /** + * Get the from date. + * @return the from date in dateInterval. + * @stable ICU 4.0 + */ + UDate getFromDate() const; + + /** + * Get the to date. + * @return the to date in dateInterval. + * @stable ICU 4.0 + */ + UDate getToDate() const; + + + /** + * Return the class ID for this class. This is useful only for comparing to + * a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . derived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 4.0 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This + * method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() + * methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 4.0 + */ + virtual UClassID getDynamicClassID(void) const; + + + /** + * Copy constructor. + * @stable ICU 4.0 + */ + DateInterval(const DateInterval& other); + + /** + * Default assignment operator + * @stable ICU 4.0 + */ + DateInterval& operator=(const DateInterval&); + + /** + * Equality operator. + * @return TRUE if the two DateIntervals are the same + * @stable ICU 4.0 + */ + virtual UBool operator==(const DateInterval& other) const; + + /** + * Non-equality operator + * @return TRUE if the two DateIntervals are not the same + * @stable ICU 4.0 + */ + UBool operator!=(const DateInterval& other) const; + + + /** + * clone this object. + * The caller owns the result and should delete it when done. + * @return a cloned DateInterval + * @stable ICU 4.0 + */ + virtual DateInterval* clone() const; + +private: + /** + * Default constructor, not implemented. + */ + DateInterval(); + + UDate fromDate; + UDate toDate; + +} ;// end class DateInterval + + +inline UDate +DateInterval::getFromDate() const { + return fromDate; +} + + +inline UDate +DateInterval::getToDate() const { + return toDate; +} + + +inline UBool +DateInterval::operator!=(const DateInterval& other) const { + return ( !operator==(other) ); +} + + +U_NAMESPACE_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dtitvfmt.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dtitvfmt.h new file mode 100755 index 00000000..5eaa559d --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dtitvfmt.h @@ -0,0 +1,1046 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/******************************************************************************** +* Copyright (C) 2008-2016, International Business Machines Corporation and +* others. All Rights Reserved. +******************************************************************************* +* +* File DTITVFMT.H +* +******************************************************************************* +*/ + +#ifndef __DTITVFMT_H__ +#define __DTITVFMT_H__ + + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Format and parse date interval in a language-independent manner. + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/ucal.h" +#include "unicode/smpdtfmt.h" +#include "unicode/dtintrv.h" +#include "unicode/dtitvinf.h" +#include "unicode/dtptngen.h" + +U_NAMESPACE_BEGIN + + + +/** + * DateIntervalFormat is a class for formatting and parsing date + * intervals in a language-independent manner. + * Only formatting is supported, parsing is not supported. + * + * <P> + * Date interval means from one date to another date, + * for example, from "Jan 11, 2008" to "Jan 18, 2008". + * We introduced class DateInterval to represent it. + * DateInterval is a pair of UDate, which is + * the standard milliseconds since 24:00 GMT, Jan 1, 1970. + * + * <P> + * DateIntervalFormat formats a DateInterval into + * text as compactly as possible. + * For example, the date interval format from "Jan 11, 2008" to "Jan 18,. 2008" + * is "Jan 11-18, 2008" for English. + * And it parses text into DateInterval, + * although initially, parsing is not supported. + * + * <P> + * There is no structural information in date time patterns. + * For any punctuations and string literals inside a date time pattern, + * we do not know whether it is just a separator, or a prefix, or a suffix. + * Without such information, so, it is difficult to generate a sub-pattern + * (or super-pattern) by algorithm. + * So, formatting a DateInterval is pattern-driven. It is very + * similar to formatting in SimpleDateFormat. + * We introduce class DateIntervalInfo to save date interval + * patterns, similar to date time pattern in SimpleDateFormat. + * + * <P> + * Logically, the interval patterns are mappings + * from (skeleton, the_largest_different_calendar_field) + * to (date_interval_pattern). + * + * <P> + * A skeleton + * <ol> + * <li> + * only keeps the field pattern letter and ignores all other parts + * in a pattern, such as space, punctuations, and string literals. + * </li> + * <li> + * hides the order of fields. + * </li> + * <li> + * might hide a field's pattern letter length. + * </li> + * </ol> + * + * For those non-digit calendar fields, the pattern letter length is + * important, such as MMM, MMMM, and MMMMM; EEE and EEEE, + * and the field's pattern letter length is honored. + * + * For the digit calendar fields, such as M or MM, d or dd, yy or yyyy, + * the field pattern length is ignored and the best match, which is defined + * in date time patterns, will be returned without honor the field pattern + * letter length in skeleton. + * + * <P> + * The calendar fields we support for interval formatting are: + * year, month, date, day-of-week, am-pm, hour, hour-of-day, minute, and second + * (though we do not currently have specific intervalFormat date for skeletons + * with seconds). + * Those calendar fields can be defined in the following order: + * year > month > date > hour (in day) > minute > second + * + * The largest different calendar fields between 2 calendars is the + * first different calendar field in above order. + * + * For example: the largest different calendar fields between "Jan 10, 2007" + * and "Feb 20, 2008" is year. + * + * <P> + * For other calendar fields, the compact interval formatting is not + * supported. And the interval format will be fall back to fall-back + * patterns, which is mostly "{date0} - {date1}". + * + * <P> + * There is a set of pre-defined static skeleton strings. + * There are pre-defined interval patterns for those pre-defined skeletons + * in locales' resource files. + * For example, for a skeleton UDAT_YEAR_ABBR_MONTH_DAY, which is "yMMMd", + * in en_US, if the largest different calendar field between date1 and date2 + * is "year", the date interval pattern is "MMM d, yyyy - MMM d, yyyy", + * such as "Jan 10, 2007 - Jan 10, 2008". + * If the largest different calendar field between date1 and date2 is "month", + * the date interval pattern is "MMM d - MMM d, yyyy", + * such as "Jan 10 - Feb 10, 2007". + * If the largest different calendar field between date1 and date2 is "day", + * the date interval pattern is "MMM d-d, yyyy", such as "Jan 10-20, 2007". + * + * For date skeleton, the interval patterns when year, or month, or date is + * different are defined in resource files. + * For time skeleton, the interval patterns when am/pm, or hour, or minute is + * different are defined in resource files. + * + * <P> + * If a skeleton is not found in a locale's DateIntervalInfo, which means + * the interval patterns for the skeleton is not defined in resource file, + * the interval pattern will falls back to the interval "fallback" pattern + * defined in resource file. + * If the interval "fallback" pattern is not defined, the default fall-back + * is "{date0} - {data1}". + * + * <P> + * For the combination of date and time, + * The rule to generate interval patterns are: + * <ol> + * <li> + * when the year, month, or day differs, falls back to fall-back + * interval pattern, which mostly is the concatenate the two original + * expressions with a separator between, + * For example, interval pattern from "Jan 10, 2007 10:10 am" + * to "Jan 11, 2007 10:10am" is + * "Jan 10, 2007 10:10 am - Jan 11, 2007 10:10am" + * </li> + * <li> + * otherwise, present the date followed by the range expression + * for the time. + * For example, interval pattern from "Jan 10, 2007 10:10 am" + * to "Jan 10, 2007 11:10am" is "Jan 10, 2007 10:10 am - 11:10am" + * </li> + * </ol> + * + * + * <P> + * If two dates are the same, the interval pattern is the single date pattern. + * For example, interval pattern from "Jan 10, 2007" to "Jan 10, 2007" is + * "Jan 10, 2007". + * + * Or if the presenting fields between 2 dates have the exact same values, + * the interval pattern is the single date pattern. + * For example, if user only requests year and month, + * the interval pattern from "Jan 10, 2007" to "Jan 20, 2007" is "Jan 2007". + * + * <P> + * DateIntervalFormat needs the following information for correct + * formatting: time zone, calendar type, pattern, date format symbols, + * and date interval patterns. + * It can be instantiated in 2 ways: + * <ol> + * <li> + * create an instance using default or given locale plus given skeleton. + * Users are encouraged to created date interval formatter this way and + * to use the pre-defined skeleton macros, such as + * UDAT_YEAR_NUM_MONTH, which consists the calendar fields and + * the format style. + * </li> + * <li> + * create an instance using default or given locale plus given skeleton + * plus a given DateIntervalInfo. + * This factory method is for powerful users who want to provide their own + * interval patterns. + * Locale provides the timezone, calendar, and format symbols information. + * Local plus skeleton provides full pattern information. + * DateIntervalInfo provides the date interval patterns. + * </li> + * </ol> + * + * <P> + * For the calendar field pattern letter, such as G, y, M, d, a, h, H, m, s etc. + * DateIntervalFormat uses the same syntax as that of + * DateTime format. + * + * <P> + * Code Sample: general usage + * <pre> + * \code + * // the date interval object which the DateIntervalFormat formats on + * // and parses into + * DateInterval* dtInterval = new DateInterval(1000*3600*24, 1000*3600*24*2); + * UErrorCode status = U_ZERO_ERROR; + * DateIntervalFormat* dtIntervalFmt = DateIntervalFormat::createInstance( + * UDAT_YEAR_MONTH_DAY, + * Locale("en", "GB", ""), status); + * UnicodeUnicodeString dateIntervalString; + * FieldPosition pos = 0; + * // formatting + * dtIntervalFmt->format(dtInterval, dateIntervalUnicodeString, pos, status); + * delete dtIntervalFmt; + * \endcode + * </pre> + */ + +class U_I18N_API DateIntervalFormat : public Format { +public: + + /** + * Construct a DateIntervalFormat from skeleton and the default locale. + * + * This is a convenient override of + * createInstance(const UnicodeString& skeleton, const Locale& locale, + * UErrorCode&) + * with the value of locale as default locale. + * + * @param skeleton the skeleton on which interval format based. + * @param status output param set to success/failure code on exit + * @return a date time interval formatter which the caller owns. + * @stable ICU 4.0 + */ + static DateIntervalFormat* U_EXPORT2 createInstance( + const UnicodeString& skeleton, + UErrorCode& status); + + /** + * Construct a DateIntervalFormat from skeleton and a given locale. + * <P> + * In this factory method, + * the date interval pattern information is load from resource files. + * Users are encouraged to created date interval formatter this way and + * to use the pre-defined skeleton macros. + * + * <P> + * There are pre-defined skeletons (defined in udate.h) having predefined + * interval patterns in resource files. + * Users are encouraged to use those macros. + * For example: + * DateIntervalFormat::createInstance(UDAT_MONTH_DAY, status) + * + * The given Locale provides the interval patterns. + * For example, for en_GB, if skeleton is UDAT_YEAR_ABBR_MONTH_WEEKDAY_DAY, + * which is "yMMMEEEd", + * the interval patterns defined in resource file to above skeleton are: + * "EEE, d MMM, yyyy - EEE, d MMM, yyyy" for year differs, + * "EEE, d MMM - EEE, d MMM, yyyy" for month differs, + * "EEE, d - EEE, d MMM, yyyy" for day differs, + * @param skeleton the skeleton on which the interval format is based. + * @param locale the given locale + * @param status output param set to success/failure code on exit + * @return a date time interval formatter which the caller owns. + * @stable ICU 4.0 + * <p> + * <h4>Sample code</h4> + * \snippet samples/dtitvfmtsample/dtitvfmtsample.cpp dtitvfmtPreDefined1 + * \snippet samples/dtitvfmtsample/dtitvfmtsample.cpp dtitvfmtPreDefined + * <p> + */ + + static DateIntervalFormat* U_EXPORT2 createInstance( + const UnicodeString& skeleton, + const Locale& locale, + UErrorCode& status); + + /** + * Construct a DateIntervalFormat from skeleton + * DateIntervalInfo, and default locale. + * + * This is a convenient override of + * createInstance(const UnicodeString& skeleton, const Locale& locale, + * const DateIntervalInfo& dtitvinf, UErrorCode&) + * with the locale value as default locale. + * + * @param skeleton the skeleton on which interval format based. + * @param dtitvinf the DateIntervalInfo object. + * @param status output param set to success/failure code on exit + * @return a date time interval formatter which the caller owns. + * @stable ICU 4.0 + */ + static DateIntervalFormat* U_EXPORT2 createInstance( + const UnicodeString& skeleton, + const DateIntervalInfo& dtitvinf, + UErrorCode& status); + + /** + * Construct a DateIntervalFormat from skeleton + * a DateIntervalInfo, and the given locale. + * + * <P> + * In this factory method, user provides its own date interval pattern + * information, instead of using those pre-defined data in resource file. + * This factory method is for powerful users who want to provide their own + * interval patterns. + * <P> + * There are pre-defined skeletons (defined in udate.h) having predefined + * interval patterns in resource files. + * Users are encouraged to use those macros. + * For example: + * DateIntervalFormat::createInstance(UDAT_MONTH_DAY, status) + * + * The DateIntervalInfo provides the interval patterns. + * and the DateIntervalInfo ownership remains to the caller. + * + * User are encouraged to set default interval pattern in DateIntervalInfo + * as well, if they want to set other interval patterns ( instead of + * reading the interval patterns from resource files). + * When the corresponding interval pattern for a largest calendar different + * field is not found ( if user not set it ), interval format fallback to + * the default interval pattern. + * If user does not provide default interval pattern, it fallback to + * "{date0} - {date1}" + * + * @param skeleton the skeleton on which interval format based. + * @param locale the given locale + * @param dtitvinf the DateIntervalInfo object. + * @param status output param set to success/failure code on exit + * @return a date time interval formatter which the caller owns. + * @stable ICU 4.0 + * <p> + * <h4>Sample code</h4> + * \snippet samples/dtitvfmtsample/dtitvfmtsample.cpp dtitvfmtPreDefined1 + * \snippet samples/dtitvfmtsample/dtitvfmtsample.cpp dtitvfmtCustomized + * <p> + */ + static DateIntervalFormat* U_EXPORT2 createInstance( + const UnicodeString& skeleton, + const Locale& locale, + const DateIntervalInfo& dtitvinf, + UErrorCode& status); + + /** + * Destructor. + * @stable ICU 4.0 + */ + virtual ~DateIntervalFormat(); + + /** + * Clone this Format object polymorphically. The caller owns the result and + * should delete it when done. + * @return A copy of the object. + * @stable ICU 4.0 + */ + virtual Format* clone(void) const; + + /** + * Return true if the given Format objects are semantically equal. Objects + * of different subclasses are considered unequal. + * @param other the object to be compared with. + * @return true if the given Format objects are semantically equal. + * @stable ICU 4.0 + */ + virtual UBool operator==(const Format& other) const; + + /** + * Return true if the given Format objects are not semantically equal. + * Objects of different subclasses are considered unequal. + * @param other the object to be compared with. + * @return true if the given Format objects are not semantically equal. + * @stable ICU 4.0 + */ + UBool operator!=(const Format& other) const; + + + using Format::format; + + /** + * Format an object to produce a string. This method handles Formattable + * objects with a DateInterval type. + * If a the Formattable object type is not a DateInterval, + * then it returns a failing UErrorCode. + * + * @param obj The object to format. + * Must be a DateInterval. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param fieldPosition On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * There may be multiple instances of a given field type + * in an interval format; in this case the fieldPosition + * offsets refer to the first instance. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.0 + */ + virtual UnicodeString& format(const Formattable& obj, + UnicodeString& appendTo, + FieldPosition& fieldPosition, + UErrorCode& status) const ; + + + + /** + * Format a DateInterval to produce a string. + * + * @param dtInterval DateInterval to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param fieldPosition On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * There may be multiple instances of a given field type + * in an interval format; in this case the fieldPosition + * offsets refer to the first instance. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.0 + */ + UnicodeString& format(const DateInterval* dtInterval, + UnicodeString& appendTo, + FieldPosition& fieldPosition, + UErrorCode& status) const ; + + + /** + * Format 2 Calendars to produce a string. + * + * Note: "fromCalendar" and "toCalendar" are not const, + * since calendar is not const in SimpleDateFormat::format(Calendar&), + * + * @param fromCalendar calendar set to the from date in date interval + * to be formatted into date interval string + * @param toCalendar calendar set to the to date in date interval + * to be formatted into date interval string + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param fieldPosition On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * There may be multiple instances of a given field type + * in an interval format; in this case the fieldPosition + * offsets refer to the first instance. + * @param status Output param filled with success/failure status. + * Caller needs to make sure it is SUCCESS + * at the function entrance + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.0 + */ + UnicodeString& format(Calendar& fromCalendar, + Calendar& toCalendar, + UnicodeString& appendTo, + FieldPosition& fieldPosition, + UErrorCode& status) const ; + + /** + * Date interval parsing is not supported. Please do not use. + * <P> + * This method should handle parsing of + * date time interval strings into Formattable objects with + * DateInterval type, which is a pair of UDate. + * <P> + * Before calling, set parse_pos.index to the offset you want to start + * parsing at in the source. After calling, parse_pos.index is the end of + * the text you parsed. If error occurs, index is unchanged. + * <P> + * When parsing, leading whitespace is discarded (with a successful parse), + * while trailing whitespace is left as is. + * <P> + * See Format::parseObject() for more. + * + * @param source The string to be parsed into an object. + * @param result Formattable to be set to the parse result. + * If parse fails, return contents are undefined. + * @param parse_pos The position to start parsing at. Since no parsing + * is supported, upon return this param is unchanged. + * @return A newly created Formattable* object, or NULL + * on failure. The caller owns this and should + * delete it when done. + * @internal ICU 4.0 + */ + virtual void parseObject(const UnicodeString& source, + Formattable& result, + ParsePosition& parse_pos) const; + + + /** + * Gets the date time interval patterns. + * @return the date time interval patterns associated with + * this date interval formatter. + * @stable ICU 4.0 + */ + const DateIntervalInfo* getDateIntervalInfo(void) const; + + + /** + * Set the date time interval patterns. + * @param newIntervalPatterns the given interval patterns to copy. + * @param status output param set to success/failure code on exit + * @stable ICU 4.0 + */ + void setDateIntervalInfo(const DateIntervalInfo& newIntervalPatterns, + UErrorCode& status); + + + /** + * Gets the date formatter. The DateIntervalFormat instance continues to own + * the returned DateFormatter object, and will use and possibly modify it + * during format operations. In a multi-threaded environment, the returned + * DateFormat can only be used if it is certain that no other threads are + * concurrently using this DateIntervalFormatter, even for nominally const + * functions. + * + * @return the date formatter associated with this date interval formatter. + * @stable ICU 4.0 + */ + const DateFormat* getDateFormat(void) const; + + /** + * Returns a reference to the TimeZone used by this DateIntervalFormat's calendar. + * @return the time zone associated with the calendar of DateIntervalFormat. + * @stable ICU 4.8 + */ + virtual const TimeZone& getTimeZone(void) const; + + /** + * Sets the time zone for the calendar used by this DateIntervalFormat object. The + * caller no longer owns the TimeZone object and should not delete it after this call. + * @param zoneToAdopt the TimeZone to be adopted. + * @stable ICU 4.8 + */ + virtual void adoptTimeZone(TimeZone* zoneToAdopt); + + /** + * Sets the time zone for the calendar used by this DateIntervalFormat object. + * @param zone the new time zone. + * @stable ICU 4.8 + */ + virtual void setTimeZone(const TimeZone& zone); + + /** + * Return the class ID for this class. This is useful only for comparing to + * a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . erived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 4.0 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This + * method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() + * methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 4.0 + */ + virtual UClassID getDynamicClassID(void) const; + +protected: + + /** + * Copy constructor. + * @stable ICU 4.0 + */ + DateIntervalFormat(const DateIntervalFormat&); + + /** + * Assignment operator. + * @stable ICU 4.0 + */ + DateIntervalFormat& operator=(const DateIntervalFormat&); + +private: + + /* + * This is for ICU internal use only. Please do not use. + * Save the interval pattern information. + * Interval pattern consists of 2 single date patterns and the separator. + * For example, interval pattern "MMM d - MMM d, yyyy" consists + * a single date pattern "MMM d", another single date pattern "MMM d, yyyy", + * and a separator "-". + * The pattern is divided into 2 parts. For above example, + * the first part is "MMM d - ", and the second part is "MMM d, yyyy". + * Also, the first date appears in an interval pattern could be + * the earlier date or the later date. + * And such information is saved in the interval pattern as well. + */ + struct PatternInfo { + UnicodeString firstPart; + UnicodeString secondPart; + /** + * Whether the first date in interval pattern is later date or not. + * Fallback format set the default ordering. + * And for a particular interval pattern, the order can be + * overriden by prefixing the interval pattern with "latestFirst:" or + * "earliestFirst:" + * For example, given 2 date, Jan 10, 2007 to Feb 10, 2007. + * if the fallback format is "{0} - {1}", + * and the pattern is "d MMM - d MMM yyyy", the interval format is + * "10 Jan - 10 Feb, 2007". + * If the pattern is "latestFirst:d MMM - d MMM yyyy", + * the interval format is "10 Feb - 10 Jan, 2007" + */ + UBool laterDateFirst; + }; + + + /** + * default constructor + * @internal (private) + */ + DateIntervalFormat(); + + /** + * Construct a DateIntervalFormat from DateFormat, + * a DateIntervalInfo, and skeleton. + * DateFormat provides the timezone, calendar, + * full pattern, and date format symbols information. + * It should be a SimpleDateFormat object which + * has a pattern in it. + * the DateIntervalInfo provides the interval patterns. + * + * Note: the DateIntervalFormat takes ownership of both + * DateFormat and DateIntervalInfo objects. + * Caller should not delete them. + * + * @param locale the locale of this date interval formatter. + * @param dtItvInfo the DateIntervalInfo object to be adopted. + * @param skeleton the skeleton of the date formatter + * @param status output param set to success/failure code on exit + */ + DateIntervalFormat(const Locale& locale, DateIntervalInfo* dtItvInfo, + const UnicodeString* skeleton, UErrorCode& status); + + + /** + * Construct a DateIntervalFormat from DateFormat + * and a DateIntervalInfo. + * + * It is a wrapper of the constructor. + * + * @param locale the locale of this date interval formatter. + * @param dtitvinf the DateIntervalInfo object to be adopted. + * @param skeleton the skeleton of this formatter. + * @param status Output param set to success/failure code. + * @return a date time interval formatter which the caller owns. + */ + static DateIntervalFormat* U_EXPORT2 create(const Locale& locale, + DateIntervalInfo* dtitvinf, + const UnicodeString* skeleton, + UErrorCode& status); + + /** + * Below are for generating interval patterns local to the formatter + */ + + /** + * Provide an updated FieldPosition posResult based on two formats, + * the FieldPosition values for each of them, and the pattern used + * to combine them. The idea is for posResult to indicate the first + * instance (if any) of the specified field in the combined result, + * with correct offsets. + * + * @param combiningPattern Pattern used to combine pat0 and pat1 + * @param pat0 Formatted date/time value to replace {0} + * @param pos0 FieldPosition within pat0 + * @param pat1 Formatted date/time value to replace {1} + * @param pos1 FieldPosition within pat1 + * @param posResult FieldPosition to be set to the correct + * position of the first field instance when + * pat0 and pat1 are combined using combiningPattern + */ + static void + adjustPosition(UnicodeString& combiningPattern, // has {0} and {1} in it + UnicodeString& pat0, FieldPosition& pos0, // pattern and pos corresponding to {0} + UnicodeString& pat1, FieldPosition& pos1, // pattern and pos corresponding to {1} + FieldPosition& posResult); + + + /** + * Format 2 Calendars using fall-back interval pattern + * + * The full pattern used in this fall-back format is the + * full pattern of the date formatter. + * + * gFormatterMutex must already be locked when calling this function. + * + * @param fromCalendar calendar set to the from date in date interval + * to be formatted into date interval string + * @param toCalendar calendar set to the to date in date interval + * to be formatted into date interval string + * @param fromToOnSameDay TRUE iff from and to dates are on the same day + * (any difference is in ampm/hours or below) + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status output param set to success/failure code on exit + * @return Reference to 'appendTo' parameter. + * @internal (private) + */ + UnicodeString& fallbackFormat(Calendar& fromCalendar, + Calendar& toCalendar, + UBool fromToOnSameDay, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& status) const; + + + + /** + * Initialize interval patterns locale to this formatter + * + * This code is a bit complicated since + * 1. the interval patterns saved in resource bundle files are interval + * patterns based on date or time only. + * It does not have interval patterns based on both date and time. + * Interval patterns on both date and time are algorithm generated. + * + * For example, it has interval patterns on skeleton "dMy" and "hm", + * but it does not have interval patterns on skeleton "dMyhm". + * + * The rule to generate interval patterns for both date and time skeleton are + * 1) when the year, month, or day differs, concatenate the two original + * expressions with a separator between, + * For example, interval pattern from "Jan 10, 2007 10:10 am" + * to "Jan 11, 2007 10:10am" is + * "Jan 10, 2007 10:10 am - Jan 11, 2007 10:10am" + * + * 2) otherwise, present the date followed by the range expression + * for the time. + * For example, interval pattern from "Jan 10, 2007 10:10 am" + * to "Jan 10, 2007 11:10am" is + * "Jan 10, 2007 10:10 am - 11:10am" + * + * 2. even a pattern does not request a certain calendar field, + * the interval pattern needs to include such field if such fields are + * different between 2 dates. + * For example, a pattern/skeleton is "hm", but the interval pattern + * includes year, month, and date when year, month, and date differs. + * + * + * @param status output param set to success/failure code on exit + */ + void initializePattern(UErrorCode& status); + + + + /** + * Set fall back interval pattern given a calendar field, + * a skeleton, and a date time pattern generator. + * @param field the largest different calendar field + * @param skeleton a skeleton + * @param status output param set to success/failure code on exit + */ + void setFallbackPattern(UCalendarDateFields field, + const UnicodeString& skeleton, + UErrorCode& status); + + + + /** + * get separated date and time skeleton from a combined skeleton. + * + * The difference between date skeleton and normalizedDateSkeleton are: + * 1. both 'y' and 'd' are appeared only once in normalizeDateSkeleton + * 2. 'E' and 'EE' are normalized into 'EEE' + * 3. 'MM' is normalized into 'M' + * + ** the difference between time skeleton and normalizedTimeSkeleton are: + * 1. both 'H' and 'h' are normalized as 'h' in normalized time skeleton, + * 2. 'a' is omitted in normalized time skeleton. + * 3. there is only one appearance for 'h', 'm','v', 'z' in normalized time + * skeleton + * + * + * @param skeleton given combined skeleton. + * @param date Output parameter for date only skeleton. + * @param normalizedDate Output parameter for normalized date only + * + * @param time Output parameter for time only skeleton. + * @param normalizedTime Output parameter for normalized time only + * skeleton. + * + */ + static void U_EXPORT2 getDateTimeSkeleton(const UnicodeString& skeleton, + UnicodeString& date, + UnicodeString& normalizedDate, + UnicodeString& time, + UnicodeString& normalizedTime); + + + + /** + * Generate date or time interval pattern from resource, + * and set them into the interval pattern locale to this formatter. + * + * It needs to handle the following: + * 1. need to adjust field width. + * For example, the interval patterns saved in DateIntervalInfo + * includes "dMMMy", but not "dMMMMy". + * Need to get interval patterns for dMMMMy from dMMMy. + * Another example, the interval patterns saved in DateIntervalInfo + * includes "hmv", but not "hmz". + * Need to get interval patterns for "hmz' from 'hmv' + * + * 2. there might be no pattern for 'y' differ for skeleton "Md", + * in order to get interval patterns for 'y' differ, + * need to look for it from skeleton 'yMd' + * + * @param dateSkeleton normalized date skeleton + * @param timeSkeleton normalized time skeleton + * @return whether the resource is found for the skeleton. + * TRUE if interval pattern found for the skeleton, + * FALSE otherwise. + */ + UBool setSeparateDateTimePtn(const UnicodeString& dateSkeleton, + const UnicodeString& timeSkeleton); + + + + + /** + * Generate interval pattern from existing resource + * + * It not only save the interval patterns, + * but also return the extended skeleton and its best match skeleton. + * + * @param field largest different calendar field + * @param skeleton skeleton + * @param bestSkeleton the best match skeleton which has interval pattern + * defined in resource + * @param differenceInfo the difference between skeleton and best skeleton + * 0 means the best matched skeleton is the same as input skeleton + * 1 means the fields are the same, but field width are different + * 2 means the only difference between fields are v/z, + * -1 means there are other fields difference + * + * @param extendedSkeleton extended skeleton + * @param extendedBestSkeleton extended best match skeleton + * @return whether the interval pattern is found + * through extending skeleton or not. + * TRUE if interval pattern is found by + * extending skeleton, FALSE otherwise. + */ + UBool setIntervalPattern(UCalendarDateFields field, + const UnicodeString* skeleton, + const UnicodeString* bestSkeleton, + int8_t differenceInfo, + UnicodeString* extendedSkeleton = NULL, + UnicodeString* extendedBestSkeleton = NULL); + + /** + * Adjust field width in best match interval pattern to match + * the field width in input skeleton. + * + * TODO (xji) make a general solution + * The adjusting rule can be: + * 1. always adjust + * 2. never adjust + * 3. default adjust, which means adjust according to the following rules + * 3.1 always adjust string, such as MMM and MMMM + * 3.2 never adjust between string and numeric, such as MM and MMM + * 3.3 always adjust year + * 3.4 do not adjust 'd', 'h', or 'm' if h presents + * 3.5 do not adjust 'M' if it is numeric(?) + * + * Since date interval format is well-formed format, + * date and time skeletons are normalized previously, + * till this stage, the adjust here is only "adjust strings, such as MMM + * and MMMM, EEE and EEEE. + * + * @param inputSkeleton the input skeleton + * @param bestMatchSkeleton the best match skeleton + * @param bestMatchIntervalPattern the best match interval pattern + * @param differenceInfo the difference between 2 skeletons + * 1 means only field width differs + * 2 means v/z exchange + * @param adjustedIntervalPattern adjusted interval pattern + */ + static void U_EXPORT2 adjustFieldWidth( + const UnicodeString& inputSkeleton, + const UnicodeString& bestMatchSkeleton, + const UnicodeString& bestMatchIntervalPattern, + int8_t differenceInfo, + UnicodeString& adjustedIntervalPattern); + + /** + * Concat a single date pattern with a time interval pattern, + * set it into the intervalPatterns, while field is time field. + * This is used to handle time interval patterns on skeleton with + * both time and date. Present the date followed by + * the range expression for the time. + * @param format date and time format + * @param datePattern date pattern + * @param field time calendar field: AM_PM, HOUR, MINUTE + * @param status output param set to success/failure code on exit + */ + void concatSingleDate2TimeInterval(UnicodeString& format, + const UnicodeString& datePattern, + UCalendarDateFields field, + UErrorCode& status); + + /** + * check whether a calendar field present in a skeleton. + * @param field calendar field need to check + * @param skeleton given skeleton on which to check the calendar field + * @return true if field present in a skeleton. + */ + static UBool U_EXPORT2 fieldExistsInSkeleton(UCalendarDateFields field, + const UnicodeString& skeleton); + + + /** + * Split interval patterns into 2 part. + * @param intervalPattern interval pattern + * @return the index in interval pattern which split the pattern into 2 part + */ + static int32_t U_EXPORT2 splitPatternInto2Part(const UnicodeString& intervalPattern); + + + /** + * Break interval patterns as 2 part and save them into pattern info. + * @param field calendar field + * @param intervalPattern interval pattern + */ + void setIntervalPattern(UCalendarDateFields field, + const UnicodeString& intervalPattern); + + + /** + * Break interval patterns as 2 part and save them into pattern info. + * @param field calendar field + * @param intervalPattern interval pattern + * @param laterDateFirst whether later date appear first in interval pattern + */ + void setIntervalPattern(UCalendarDateFields field, + const UnicodeString& intervalPattern, + UBool laterDateFirst); + + + /** + * Set pattern information. + * + * @param field calendar field + * @param firstPart the first part in interval pattern + * @param secondPart the second part in interval pattern + * @param laterDateFirst whether the first date in intervalPattern + * is earlier date or later date + */ + void setPatternInfo(UCalendarDateFields field, + const UnicodeString* firstPart, + const UnicodeString* secondPart, + UBool laterDateFirst); + + /** + * Format 2 Calendars to produce a string. + * Implementation of the similar public format function. + * Must be called with gFormatterMutex already locked. + * + * Note: "fromCalendar" and "toCalendar" are not const, + * since calendar is not const in SimpleDateFormat::format(Calendar&), + * + * @param fromCalendar calendar set to the from date in date interval + * to be formatted into date interval string + * @param toCalendar calendar set to the to date in date interval + * to be formatted into date interval string + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param fieldPosition On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * There may be multiple instances of a given field type + * in an interval format; in this case the fieldPosition + * offsets refer to the first instance. + * @param status Output param filled with success/failure status. + * Caller needs to make sure it is SUCCESS + * at the function entrance + * @return Reference to 'appendTo' parameter. + * @internal (private) + */ + UnicodeString& formatImpl(Calendar& fromCalendar, + Calendar& toCalendar, + UnicodeString& appendTo, + FieldPosition& fieldPosition, + UErrorCode& status) const ; + + + // from calendar field to pattern letter + static const char16_t fgCalendarFieldToPatternLetter[]; + + + /** + * The interval patterns for this locale. + */ + DateIntervalInfo* fInfo; + + /** + * The DateFormat object used to format single pattern + */ + SimpleDateFormat* fDateFormat; + + /** + * The 2 calendars with the from and to date. + * could re-use the calendar in fDateFormat, + * but keeping 2 calendars make it clear and clean. + */ + Calendar* fFromCalendar; + Calendar* fToCalendar; + + Locale fLocale; + + /** + * Following are interval information relevant (locale) to this formatter. + */ + UnicodeString fSkeleton; + PatternInfo fIntervalPatterns[DateIntervalInfo::kIPI_MAX_INDEX]; + + /** + * Patterns for fallback formatting. + */ + UnicodeString* fDatePattern; + UnicodeString* fTimePattern; + UnicodeString* fDateTimeFormat; +}; + +inline UBool +DateIntervalFormat::operator!=(const Format& other) const { + return !operator==(other); +} + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _DTITVFMT_H__ +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dtitvinf.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dtitvinf.h new file mode 100755 index 00000000..726e34a7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dtitvinf.h @@ -0,0 +1,520 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ******************************************************************************* + * Copyright (C) 2008-2016, International Business Machines Corporation and + * others. All Rights Reserved. + ******************************************************************************* + * + * File DTITVINF.H + * + ******************************************************************************* + */ + +#ifndef __DTITVINF_H__ +#define __DTITVINF_H__ + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Date/Time interval patterns for formatting date/time interval + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/udat.h" +#include "unicode/locid.h" +#include "unicode/ucal.h" +#include "unicode/dtptngen.h" + +U_NAMESPACE_BEGIN + +/** + * DateIntervalInfo is a public class for encapsulating localizable + * date time interval patterns. It is used by DateIntervalFormat. + * + * <P> + * For most users, ordinary use of DateIntervalFormat does not need to create + * DateIntervalInfo object directly. + * DateIntervalFormat will take care of it when creating a date interval + * formatter when user pass in skeleton and locale. + * + * <P> + * For power users, who want to create their own date interval patterns, + * or want to re-set date interval patterns, they could do so by + * directly creating DateIntervalInfo and manupulating it. + * + * <P> + * Logically, the interval patterns are mappings + * from (skeleton, the_largest_different_calendar_field) + * to (date_interval_pattern). + * + * <P> + * A skeleton + * <ol> + * <li> + * only keeps the field pattern letter and ignores all other parts + * in a pattern, such as space, punctuations, and string literals. + * <li> + * hides the order of fields. + * <li> + * might hide a field's pattern letter length. + * + * For those non-digit calendar fields, the pattern letter length is + * important, such as MMM, MMMM, and MMMMM; EEE and EEEE, + * and the field's pattern letter length is honored. + * + * For the digit calendar fields, such as M or MM, d or dd, yy or yyyy, + * the field pattern length is ignored and the best match, which is defined + * in date time patterns, will be returned without honor the field pattern + * letter length in skeleton. + * </ol> + * + * <P> + * The calendar fields we support for interval formatting are: + * year, month, date, day-of-week, am-pm, hour, hour-of-day, and minute. + * Those calendar fields can be defined in the following order: + * year > month > date > am-pm > hour > minute + * + * The largest different calendar fields between 2 calendars is the + * first different calendar field in above order. + * + * For example: the largest different calendar fields between "Jan 10, 2007" + * and "Feb 20, 2008" is year. + * + * <P> + * There is a set of pre-defined static skeleton strings. + * There are pre-defined interval patterns for those pre-defined skeletons + * in locales' resource files. + * For example, for a skeleton UDAT_YEAR_ABBR_MONTH_DAY, which is "yMMMd", + * in en_US, if the largest different calendar field between date1 and date2 + * is "year", the date interval pattern is "MMM d, yyyy - MMM d, yyyy", + * such as "Jan 10, 2007 - Jan 10, 2008". + * If the largest different calendar field between date1 and date2 is "month", + * the date interval pattern is "MMM d - MMM d, yyyy", + * such as "Jan 10 - Feb 10, 2007". + * If the largest different calendar field between date1 and date2 is "day", + * the date interval pattern is "MMM d-d, yyyy", such as "Jan 10-20, 2007". + * + * For date skeleton, the interval patterns when year, or month, or date is + * different are defined in resource files. + * For time skeleton, the interval patterns when am/pm, or hour, or minute is + * different are defined in resource files. + * + * + * <P> + * There are 2 dates in interval pattern. For most locales, the first date + * in an interval pattern is the earlier date. There might be a locale in which + * the first date in an interval pattern is the later date. + * We use fallback format for the default order for the locale. + * For example, if the fallback format is "{0} - {1}", it means + * the first date in the interval pattern for this locale is earlier date. + * If the fallback format is "{1} - {0}", it means the first date is the + * later date. + * For a particular interval pattern, the default order can be overriden + * by prefixing "latestFirst:" or "earliestFirst:" to the interval pattern. + * For example, if the fallback format is "{0}-{1}", + * but for skeleton "yMMMd", the interval pattern when day is different is + * "latestFirst:d-d MMM yy", it means by default, the first date in interval + * pattern is the earlier date. But for skeleton "yMMMd", when day is different, + * the first date in "d-d MMM yy" is the later date. + * + * <P> + * The recommended way to create a DateIntervalFormat object is to pass in + * the locale. + * By using a Locale parameter, the DateIntervalFormat object is + * initialized with the pre-defined interval patterns for a given or + * default locale. + * <P> + * Users can also create DateIntervalFormat object + * by supplying their own interval patterns. + * It provides flexibility for power users. + * + * <P> + * After a DateIntervalInfo object is created, clients may modify + * the interval patterns using setIntervalPattern function as so desired. + * Currently, users can only set interval patterns when the following + * calendar fields are different: ERA, YEAR, MONTH, DATE, DAY_OF_MONTH, + * DAY_OF_WEEK, AM_PM, HOUR, HOUR_OF_DAY, and MINUTE. + * Interval patterns when other calendar fields are different is not supported. + * <P> + * DateIntervalInfo objects are cloneable. + * When clients obtain a DateIntervalInfo object, + * they can feel free to modify it as necessary. + * <P> + * DateIntervalInfo are not expected to be subclassed. + * Data for a calendar is loaded out of resource bundles. + * Through ICU 4.4, date interval patterns are only supported in the Gregorian + * calendar; non-Gregorian calendars are supported from ICU 4.4.1. + * @stable ICU 4.0 +**/ + +class U_I18N_API DateIntervalInfo U_FINAL : public UObject { +public: + /** + * Default constructor. + * It does not initialize any interval patterns except + * that it initialize default fall-back pattern as "{0} - {1}", + * which can be reset by setFallbackIntervalPattern(). + * It should be followed by setFallbackIntervalPattern() and + * setIntervalPattern(), + * and is recommended to be used only for power users who + * wants to create their own interval patterns and use them to create + * date interval formatter. + * @param status output param set to success/failure code on exit + * @internal ICU 4.0 + */ + DateIntervalInfo(UErrorCode& status); + + + /** + * Construct DateIntervalInfo for the given locale, + * @param locale the interval patterns are loaded from the appropriate calendar + * data (specified calendar or default calendar) in this locale. + * @param status output param set to success/failure code on exit + * @stable ICU 4.0 + */ + DateIntervalInfo(const Locale& locale, UErrorCode& status); + + + /** + * Copy constructor. + * @stable ICU 4.0 + */ + DateIntervalInfo(const DateIntervalInfo&); + + /** + * Assignment operator + * @stable ICU 4.0 + */ + DateIntervalInfo& operator=(const DateIntervalInfo&); + + /** + * Clone this object polymorphically. + * The caller owns the result and should delete it when done. + * @return a copy of the object + * @stable ICU 4.0 + */ + virtual DateIntervalInfo* clone(void) const; + + /** + * Destructor. + * It is virtual to be safe, but it is not designed to be subclassed. + * @stable ICU 4.0 + */ + virtual ~DateIntervalInfo(); + + + /** + * Return true if another object is semantically equal to this one. + * + * @param other the DateIntervalInfo object to be compared with. + * @return true if other is semantically equal to this. + * @stable ICU 4.0 + */ + virtual UBool operator==(const DateIntervalInfo& other) const; + + /** + * Return true if another object is semantically unequal to this one. + * + * @param other the DateIntervalInfo object to be compared with. + * @return true if other is semantically unequal to this. + * @stable ICU 4.0 + */ + UBool operator!=(const DateIntervalInfo& other) const; + + + + /** + * Provides a way for client to build interval patterns. + * User could construct DateIntervalInfo by providing a list of skeletons + * and their patterns. + * <P> + * For example: + * <pre> + * UErrorCode status = U_ZERO_ERROR; + * DateIntervalInfo dIntervalInfo = new DateIntervalInfo(); + * dIntervalInfo->setFallbackIntervalPattern("{0} ~ {1}"); + * dIntervalInfo->setIntervalPattern("yMd", UCAL_YEAR, "'from' yyyy-M-d 'to' yyyy-M-d", status); + * dIntervalInfo->setIntervalPattern("yMMMd", UCAL_MONTH, "'from' yyyy MMM d 'to' MMM d", status); + * dIntervalInfo->setIntervalPattern("yMMMd", UCAL_DAY, "yyyy MMM d-d", status, status); + * </pre> + * + * Restriction: + * Currently, users can only set interval patterns when the following + * calendar fields are different: ERA, YEAR, MONTH, DATE, DAY_OF_MONTH, + * DAY_OF_WEEK, AM_PM, HOUR, HOUR_OF_DAY, and MINUTE. + * Interval patterns when other calendar fields are different are + * not supported. + * + * @param skeleton the skeleton on which interval pattern based + * @param lrgDiffCalUnit the largest different calendar unit. + * @param intervalPattern the interval pattern on the largest different + * calendar unit. + * For example, if lrgDiffCalUnit is + * "year", the interval pattern for en_US when year + * is different could be "'from' yyyy 'to' yyyy". + * @param status output param set to success/failure code on exit + * @stable ICU 4.0 + */ + void setIntervalPattern(const UnicodeString& skeleton, + UCalendarDateFields lrgDiffCalUnit, + const UnicodeString& intervalPattern, + UErrorCode& status); + + /** + * Get the interval pattern given skeleton and + * the largest different calendar field. + * @param skeleton the skeleton + * @param field the largest different calendar field + * @param result output param to receive the pattern + * @param status output param set to success/failure code on exit + * @return a reference to 'result' + * @stable ICU 4.0 + */ + UnicodeString& getIntervalPattern(const UnicodeString& skeleton, + UCalendarDateFields field, + UnicodeString& result, + UErrorCode& status) const; + + /** + * Get the fallback interval pattern. + * @param result output param to receive the pattern + * @return a reference to 'result' + * @stable ICU 4.0 + */ + UnicodeString& getFallbackIntervalPattern(UnicodeString& result) const; + + + /** + * Re-set the fallback interval pattern. + * + * In construction, default fallback pattern is set as "{0} - {1}". + * And constructor taking locale as parameter will set the + * fallback pattern as what defined in the locale resource file. + * + * This method provides a way for user to replace the fallback pattern. + * + * @param fallbackPattern fall-back interval pattern. + * @param status output param set to success/failure code on exit + * @stable ICU 4.0 + */ + void setFallbackIntervalPattern(const UnicodeString& fallbackPattern, + UErrorCode& status); + + + /** Get default order -- whether the first date in pattern is later date + or not. + * return default date ordering in interval pattern. TRUE if the first date + * in pattern is later date, FALSE otherwise. + * @stable ICU 4.0 + */ + UBool getDefaultOrder() const; + + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 4.0 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 4.0 + */ + static UClassID U_EXPORT2 getStaticClassID(); + + +private: + /** + * DateIntervalFormat will need access to + * getBestSkeleton(), parseSkeleton(), enum IntervalPatternIndex, + * and calendarFieldToPatternIndex(). + * + * Instead of making above public, + * make DateIntervalFormat a friend of DateIntervalInfo. + */ + friend class DateIntervalFormat; + + /** + * Internal struct used to load resource bundle data. + */ + struct DateIntervalSink; + + /** + * Following is for saving the interval patterns. + * We only support interval patterns on + * ERA, YEAR, MONTH, DAY, AM_PM, HOUR, and MINUTE + */ + enum IntervalPatternIndex + { + kIPI_ERA, + kIPI_YEAR, + kIPI_MONTH, + kIPI_DATE, + kIPI_AM_PM, + kIPI_HOUR, + kIPI_MINUTE, + kIPI_SECOND, + kIPI_MAX_INDEX + }; +public: +#ifndef U_HIDE_INTERNAL_API + /** + * Max index for stored interval patterns + * @internal ICU 4.4 + */ + enum { + kMaxIntervalPatternIndex = kIPI_MAX_INDEX + }; +#endif /* U_HIDE_INTERNAL_API */ +private: + + + /** + * Initialize the DateIntervalInfo from locale + * @param locale the given locale. + * @param status output param set to success/failure code on exit + */ + void initializeData(const Locale& locale, UErrorCode& status); + + + /* Set Interval pattern. + * + * It sets interval pattern into the hash map. + * + * @param skeleton skeleton on which the interval pattern based + * @param lrgDiffCalUnit the largest different calendar unit. + * @param intervalPattern the interval pattern on the largest different + * calendar unit. + * @param status output param set to success/failure code on exit + */ + void setIntervalPatternInternally(const UnicodeString& skeleton, + UCalendarDateFields lrgDiffCalUnit, + const UnicodeString& intervalPattern, + UErrorCode& status); + + + /**given an input skeleton, get the best match skeleton + * which has pre-defined interval pattern in resource file. + * Also return the difference between the input skeleton + * and the best match skeleton. + * + * TODO (xji): set field weight or + * isolate the funtionality in DateTimePatternGenerator + * @param skeleton input skeleton + * @param bestMatchDistanceInfo the difference between input skeleton + * and best match skeleton. + * 0, if there is exact match for input skeleton + * 1, if there is only field width difference between + * the best match and the input skeleton + * 2, the only field difference is 'v' and 'z' + * -1, if there is calendar field difference between + * the best match and the input skeleton + * @return best match skeleton + */ + const UnicodeString* getBestSkeleton(const UnicodeString& skeleton, + int8_t& bestMatchDistanceInfo) const; + + + /** + * Parse skeleton, save each field's width. + * It is used for looking for best match skeleton, + * and adjust pattern field width. + * @param skeleton skeleton to be parsed + * @param skeletonFieldWidth parsed skeleton field width + */ + static void U_EXPORT2 parseSkeleton(const UnicodeString& skeleton, + int32_t* skeletonFieldWidth); + + + /** + * Check whether one field width is numeric while the other is string. + * + * TODO (xji): make it general + * + * @param fieldWidth one field width + * @param anotherFieldWidth another field width + * @param patternLetter pattern letter char + * @return true if one field width is numeric and the other is string, + * false otherwise. + */ + static UBool U_EXPORT2 stringNumeric(int32_t fieldWidth, + int32_t anotherFieldWidth, + char patternLetter); + + + /** + * Convert calendar field to the interval pattern index in + * hash table. + * + * Since we only support the following calendar fields: + * ERA, YEAR, MONTH, DATE, DAY_OF_MONTH, DAY_OF_WEEK, + * AM_PM, HOUR, HOUR_OF_DAY, and MINUTE, + * We reserve only 4 interval patterns for a skeleton. + * + * @param field calendar field + * @param status output param set to success/failure code on exit + * @return interval pattern index in hash table + */ + static IntervalPatternIndex U_EXPORT2 calendarFieldToIntervalIndex( + UCalendarDateFields field, + UErrorCode& status); + + + /** + * delete hash table (of type fIntervalPatterns). + * + * @param hTable hash table to be deleted + */ + void deleteHash(Hashtable* hTable); + + + /** + * initialize hash table (of type fIntervalPatterns). + * + * @param status output param set to success/failure code on exit + * @return hash table initialized + */ + Hashtable* initHash(UErrorCode& status); + + + + /** + * copy hash table (of type fIntervalPatterns). + * + * @param source the source to copy from + * @param target the target to copy to + * @param status output param set to success/failure code on exit + */ + void copyHash(const Hashtable* source, Hashtable* target, UErrorCode& status); + + + // data members + // fallback interval pattern + UnicodeString fFallbackIntervalPattern; + // default order + UBool fFirstDateInPtnIsLaterDate; + + // HashMap<UnicodeString, UnicodeString[kIPI_MAX_INDEX]> + // HashMap( skeleton, pattern[largest_different_field] ) + Hashtable* fIntervalPatterns; + +};// end class DateIntervalInfo + + +inline UBool +DateIntervalInfo::operator!=(const DateIntervalInfo& other) const { + return !operator==(other); +} + + +U_NAMESPACE_END + +#endif + +#endif + diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dtptngen.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dtptngen.h new file mode 100755 index 00000000..feb465e7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dtptngen.h @@ -0,0 +1,591 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2007-2016, International Business Machines Corporation and +* others. All Rights Reserved. +******************************************************************************* +* +* File DTPTNGEN.H +* +******************************************************************************* +*/ + +#ifndef __DTPTNGEN_H__ +#define __DTPTNGEN_H__ + +#include "unicode/datefmt.h" +#include "unicode/locid.h" +#include "unicode/udat.h" +#include "unicode/udatpg.h" +#include "unicode/unistr.h" + +U_NAMESPACE_BEGIN + +/** + * \file + * \brief C++ API: Date/Time Pattern Generator + */ + + +class CharString; +class Hashtable; +class FormatParser; +class DateTimeMatcher; +class DistanceInfo; +class PatternMap; +class PtnSkeleton; +class SharedDateTimePatternGenerator; + +/** + * This class provides flexible generation of date format patterns, like "yy-MM-dd". + * The user can build up the generator by adding successive patterns. Once that + * is done, a query can be made using a "skeleton", which is a pattern which just + * includes the desired fields and lengths. The generator will return the "best fit" + * pattern corresponding to that skeleton. + * <p>The main method people will use is getBestPattern(String skeleton), + * since normally this class is pre-built with data from a particular locale. + * However, generators can be built directly from other data as well. + * <p><i>Issue: may be useful to also have a function that returns the list of + * fields in a pattern, in order, since we have that internally. + * That would be useful for getting the UI order of field elements.</i> + * @stable ICU 3.8 +**/ +class U_I18N_API DateTimePatternGenerator : public UObject { +public: + /** + * Construct a flexible generator according to default locale. + * @param status Output param set to success/failure code on exit, + * which must not indicate a failure before the function call. + * @stable ICU 3.8 + */ + static DateTimePatternGenerator* U_EXPORT2 createInstance(UErrorCode& status); + + /** + * Construct a flexible generator according to data for a given locale. + * @param uLocale + * @param status Output param set to success/failure code on exit, + * which must not indicate a failure before the function call. + * @stable ICU 3.8 + */ + static DateTimePatternGenerator* U_EXPORT2 createInstance(const Locale& uLocale, UErrorCode& status); + +#ifndef U_HIDE_INTERNAL_API + + /** + * For ICU use only + * + * @internal + */ + static DateTimePatternGenerator* U_EXPORT2 internalMakeInstance(const Locale& uLocale, UErrorCode& status); + +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Create an empty generator, to be constructed with addPattern(...) etc. + * @param status Output param set to success/failure code on exit, + * which must not indicate a failure before the function call. + * @stable ICU 3.8 + */ + static DateTimePatternGenerator* U_EXPORT2 createEmptyInstance(UErrorCode& status); + + /** + * Destructor. + * @stable ICU 3.8 + */ + virtual ~DateTimePatternGenerator(); + + /** + * Clone DateTimePatternGenerator object. Clients are responsible for + * deleting the DateTimePatternGenerator object cloned. + * @stable ICU 3.8 + */ + DateTimePatternGenerator* clone() const; + + /** + * Return true if another object is semantically equal to this one. + * + * @param other the DateTimePatternGenerator object to be compared with. + * @return true if other is semantically equal to this. + * @stable ICU 3.8 + */ + UBool operator==(const DateTimePatternGenerator& other) const; + + /** + * Return true if another object is semantically unequal to this one. + * + * @param other the DateTimePatternGenerator object to be compared with. + * @return true if other is semantically unequal to this. + * @stable ICU 3.8 + */ + UBool operator!=(const DateTimePatternGenerator& other) const; + + /** + * Utility to return a unique skeleton from a given pattern. For example, + * both "MMM-dd" and "dd/MMM" produce the skeleton "MMMdd". + * + * @param pattern Input pattern, such as "dd/MMM" + * @param status Output param set to success/failure code on exit, + * which must not indicate a failure before the function call. + * @return skeleton such as "MMMdd" + * @stable ICU 56 + */ + static UnicodeString staticGetSkeleton(const UnicodeString& pattern, UErrorCode& status); + + /** + * Utility to return a unique skeleton from a given pattern. For example, + * both "MMM-dd" and "dd/MMM" produce the skeleton "MMMdd". + * getSkeleton() works exactly like staticGetSkeleton(). + * Use staticGetSkeleton() instead of getSkeleton(). + * + * @param pattern Input pattern, such as "dd/MMM" + * @param status Output param set to success/failure code on exit, + * which must not indicate a failure before the function call. + * @return skeleton such as "MMMdd" + * @stable ICU 3.8 + */ + UnicodeString getSkeleton(const UnicodeString& pattern, UErrorCode& status); /* { + The function is commented out because it is a stable API calling a draft API. + After staticGetSkeleton becomes stable, staticGetSkeleton can be used and + these comments and the definition of getSkeleton in dtptngen.cpp should be removed. + return staticGetSkeleton(pattern, status); + }*/ + + /** + * Utility to return a unique base skeleton from a given pattern. This is + * the same as the skeleton, except that differences in length are minimized + * so as to only preserve the difference between string and numeric form. So + * for example, both "MMM-dd" and "d/MMM" produce the skeleton "MMMd" + * (notice the single d). + * + * @param pattern Input pattern, such as "dd/MMM" + * @param status Output param set to success/failure code on exit, + * which must not indicate a failure before the function call. + * @return base skeleton, such as "MMMd" + * @stable ICU 56 + */ + static UnicodeString staticGetBaseSkeleton(const UnicodeString& pattern, UErrorCode& status); + + /** + * Utility to return a unique base skeleton from a given pattern. This is + * the same as the skeleton, except that differences in length are minimized + * so as to only preserve the difference between string and numeric form. So + * for example, both "MMM-dd" and "d/MMM" produce the skeleton "MMMd" + * (notice the single d). + * getBaseSkeleton() works exactly like staticGetBaseSkeleton(). + * Use staticGetBaseSkeleton() instead of getBaseSkeleton(). + * + * @param pattern Input pattern, such as "dd/MMM" + * @param status Output param set to success/failure code on exit, + * which must not indicate a failure before the function call. + * @return base skeleton, such as "MMMd" + * @stable ICU 3.8 + */ + UnicodeString getBaseSkeleton(const UnicodeString& pattern, UErrorCode& status); /* { + The function is commented out because it is a stable API calling a draft API. + After staticGetBaseSkeleton becomes stable, staticGetBaseSkeleton can be used and + these comments and the definition of getBaseSkeleton in dtptngen.cpp should be removed. + return staticGetBaseSkeleton(pattern, status); + }*/ + + /** + * Adds a pattern to the generator. If the pattern has the same skeleton as + * an existing pattern, and the override parameter is set, then the previous + * value is overriden. Otherwise, the previous value is retained. In either + * case, the conflicting status is set and previous vale is stored in + * conflicting pattern. + * <p> + * Note that single-field patterns (like "MMM") are automatically added, and + * don't need to be added explicitly! + * + * @param pattern Input pattern, such as "dd/MMM" + * @param override When existing values are to be overridden use true, + * otherwise use false. + * @param conflictingPattern Previous pattern with the same skeleton. + * @param status Output param set to success/failure code on exit, + * which must not indicate a failure before the function call. + * @return conflicting status. The value could be UDATPG_NO_CONFLICT, + * UDATPG_BASE_CONFLICT or UDATPG_CONFLICT. + * @stable ICU 3.8 + * <p> + * <h4>Sample code</h4> + * \snippet samples/dtptngsample/dtptngsample.cpp getBestPatternExample1 + * \snippet samples/dtptngsample/dtptngsample.cpp addPatternExample + * <p> + */ + UDateTimePatternConflict addPattern(const UnicodeString& pattern, + UBool override, + UnicodeString& conflictingPattern, + UErrorCode& status); + + /** + * An AppendItem format is a pattern used to append a field if there is no + * good match. For example, suppose that the input skeleton is "GyyyyMMMd", + * and there is no matching pattern internally, but there is a pattern + * matching "yyyyMMMd", say "d-MM-yyyy". Then that pattern is used, plus the + * G. The way these two are conjoined is by using the AppendItemFormat for G + * (era). So if that value is, say "{0}, {1}" then the final resulting + * pattern is "d-MM-yyyy, G". + * <p> + * There are actually three available variables: {0} is the pattern so far, + * {1} is the element we are adding, and {2} is the name of the element. + * <p> + * This reflects the way that the CLDR data is organized. + * + * @param field such as UDATPG_ERA_FIELD. + * @param value pattern, such as "{0}, {1}" + * @stable ICU 3.8 + */ + void setAppendItemFormat(UDateTimePatternField field, const UnicodeString& value); + + /** + * Getter corresponding to setAppendItemFormat. Values below 0 or at or + * above UDATPG_FIELD_COUNT are illegal arguments. + * + * @param field such as UDATPG_ERA_FIELD. + * @return append pattern for field + * @stable ICU 3.8 + */ + const UnicodeString& getAppendItemFormat(UDateTimePatternField field) const; + + /** + * Sets the names of field, eg "era" in English for ERA. These are only + * used if the corresponding AppendItemFormat is used, and if it contains a + * {2} variable. + * <p> + * This reflects the way that the CLDR data is organized. + * + * @param field such as UDATPG_ERA_FIELD. + * @param value name of the field + * @stable ICU 3.8 + */ + void setAppendItemName(UDateTimePatternField field, const UnicodeString& value); + + /** + * Getter corresponding to setAppendItemNames. Values below 0 or at or above + * UDATPG_FIELD_COUNT are illegal arguments. Note: The more general method + * for getting date/time field display names is getFieldDisplayName. + * + * @param field such as UDATPG_ERA_FIELD. + * @return name for field + * @see getFieldDisplayName + * @stable ICU 3.8 + */ + const UnicodeString& getAppendItemName(UDateTimePatternField field) const; + +#ifndef U_HIDE_DRAFT_API + /** + * The general interface to get a display name for a particular date/time field, + * in one of several possible display widths. + * + * @param field The desired UDateTimePatternField, such as UDATPG_ERA_FIELD. + * @param width The desired UDateTimePGDisplayWidth, such as UDATPG_ABBREVIATED. + * @return. The display name for field + * @draft ICU 61 + */ + UnicodeString getFieldDisplayName(UDateTimePatternField field, UDateTimePGDisplayWidth width) const; +#endif // U_HIDE_DRAFT_API + + /** + * The DateTimeFormat is a message format pattern used to compose date and + * time patterns. The default pattern in the root locale is "{1} {0}", where + * {1} will be replaced by the date pattern and {0} will be replaced by the + * time pattern; however, other locales may specify patterns such as + * "{1}, {0}" or "{1} 'at' {0}", etc. + * <p> + * This is used when the input skeleton contains both date and time fields, + * but there is not a close match among the added patterns. For example, + * suppose that this object was created by adding "dd-MMM" and "hh:mm", and + * its datetimeFormat is the default "{1} {0}". Then if the input skeleton + * is "MMMdhmm", there is not an exact match, so the input skeleton is + * broken up into two components "MMMd" and "hmm". There are close matches + * for those two skeletons, so the result is put together with this pattern, + * resulting in "d-MMM h:mm". + * + * @param dateTimeFormat + * message format pattern, here {1} will be replaced by the date + * pattern and {0} will be replaced by the time pattern. + * @stable ICU 3.8 + */ + void setDateTimeFormat(const UnicodeString& dateTimeFormat); + + /** + * Getter corresponding to setDateTimeFormat. + * @return DateTimeFormat. + * @stable ICU 3.8 + */ + const UnicodeString& getDateTimeFormat() const; + + /** + * Return the best pattern matching the input skeleton. It is guaranteed to + * have all of the fields in the skeleton. + * + * @param skeleton + * The skeleton is a pattern containing only the variable fields. + * For example, "MMMdd" and "mmhh" are skeletons. + * @param status Output param set to success/failure code on exit, + * which must not indicate a failure before the function call. + * @return bestPattern + * The best pattern found from the given skeleton. + * @stable ICU 3.8 + * <p> + * <h4>Sample code</h4> + * \snippet samples/dtptngsample/dtptngsample.cpp getBestPatternExample1 + * \snippet samples/dtptngsample/dtptngsample.cpp getBestPatternExample + * <p> + */ + UnicodeString getBestPattern(const UnicodeString& skeleton, UErrorCode& status); + + + /** + * Return the best pattern matching the input skeleton. It is guaranteed to + * have all of the fields in the skeleton. + * + * @param skeleton + * The skeleton is a pattern containing only the variable fields. + * For example, "MMMdd" and "mmhh" are skeletons. + * @param options + * Options for forcing the length of specified fields in the + * returned pattern to match those in the skeleton (when this + * would not happen otherwise). For default behavior, use + * UDATPG_MATCH_NO_OPTIONS. + * @param status + * Output param set to success/failure code on exit, + * which must not indicate a failure before the function call. + * @return bestPattern + * The best pattern found from the given skeleton. + * @stable ICU 4.4 + */ + UnicodeString getBestPattern(const UnicodeString& skeleton, + UDateTimePatternMatchOptions options, + UErrorCode& status); + + + /** + * Adjusts the field types (width and subtype) of a pattern to match what is + * in a skeleton. That is, if you supply a pattern like "d-M H:m", and a + * skeleton of "MMMMddhhmm", then the input pattern is adjusted to be + * "dd-MMMM hh:mm". This is used internally to get the best match for the + * input skeleton, but can also be used externally. + * + * @param pattern Input pattern + * @param skeleton + * The skeleton is a pattern containing only the variable fields. + * For example, "MMMdd" and "mmhh" are skeletons. + * @param status Output param set to success/failure code on exit, + * which must not indicate a failure before the function call. + * @return pattern adjusted to match the skeleton fields widths and subtypes. + * @stable ICU 3.8 + * <p> + * <h4>Sample code</h4> + * \snippet samples/dtptngsample/dtptngsample.cpp getBestPatternExample1 + * \snippet samples/dtptngsample/dtptngsample.cpp replaceFieldTypesExample + * <p> + */ + UnicodeString replaceFieldTypes(const UnicodeString& pattern, + const UnicodeString& skeleton, + UErrorCode& status); + + /** + * Adjusts the field types (width and subtype) of a pattern to match what is + * in a skeleton. That is, if you supply a pattern like "d-M H:m", and a + * skeleton of "MMMMddhhmm", then the input pattern is adjusted to be + * "dd-MMMM hh:mm". This is used internally to get the best match for the + * input skeleton, but can also be used externally. + * + * @param pattern Input pattern + * @param skeleton + * The skeleton is a pattern containing only the variable fields. + * For example, "MMMdd" and "mmhh" are skeletons. + * @param options + * Options controlling whether the length of specified fields in the + * pattern are adjusted to match those in the skeleton (when this + * would not happen otherwise). For default behavior, use + * UDATPG_MATCH_NO_OPTIONS. + * @param status + * Output param set to success/failure code on exit, + * which must not indicate a failure before the function call. + * @return pattern adjusted to match the skeleton fields widths and subtypes. + * @stable ICU 4.4 + */ + UnicodeString replaceFieldTypes(const UnicodeString& pattern, + const UnicodeString& skeleton, + UDateTimePatternMatchOptions options, + UErrorCode& status); + + /** + * Return a list of all the skeletons (in canonical form) from this class. + * + * Call getPatternForSkeleton() to get the corresponding pattern. + * + * @param status Output param set to success/failure code on exit, + * which must not indicate a failure before the function call. + * @return StringEnumeration with the skeletons. + * The caller must delete the object. + * @stable ICU 3.8 + */ + StringEnumeration* getSkeletons(UErrorCode& status) const; + + /** + * Get the pattern corresponding to a given skeleton. + * @param skeleton + * @return pattern corresponding to a given skeleton. + * @stable ICU 3.8 + */ + const UnicodeString& getPatternForSkeleton(const UnicodeString& skeleton) const; + + /** + * Return a list of all the base skeletons (in canonical form) from this class. + * + * @param status Output param set to success/failure code on exit, + * which must not indicate a failure before the function call. + * @return a StringEnumeration with the base skeletons. + * The caller must delete the object. + * @stable ICU 3.8 + */ + StringEnumeration* getBaseSkeletons(UErrorCode& status) const; + +#ifndef U_HIDE_INTERNAL_API + /** + * Return a list of redundant patterns are those which if removed, make no + * difference in the resulting getBestPattern values. This method returns a + * list of them, to help check the consistency of the patterns used to build + * this generator. + * + * @param status Output param set to success/failure code on exit, + * which must not indicate a failure before the function call. + * @return a StringEnumeration with the redundant pattern. + * The caller must delete the object. + * @internal ICU 3.8 + */ + StringEnumeration* getRedundants(UErrorCode& status); +#endif /* U_HIDE_INTERNAL_API */ + + /** + * The decimal value is used in formatting fractions of seconds. If the + * skeleton contains fractional seconds, then this is used with the + * fractional seconds. For example, suppose that the input pattern is + * "hhmmssSSSS", and the best matching pattern internally is "H:mm:ss", and + * the decimal string is ",". Then the resulting pattern is modified to be + * "H:mm:ss,SSSS" + * + * @param decimal + * @stable ICU 3.8 + */ + void setDecimal(const UnicodeString& decimal); + + /** + * Getter corresponding to setDecimal. + * @return UnicodeString corresponding to the decimal point + * @stable ICU 3.8 + */ + const UnicodeString& getDecimal() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 3.8 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 3.8 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + +private: + /** + * Constructor. + * @stable ICU 3.8 + */ + DateTimePatternGenerator(UErrorCode & status); + + /** + * Constructor. + * @stable ICU 3.8 + */ + DateTimePatternGenerator(const Locale& locale, UErrorCode & status); + + /** + * Copy constructor. + * @param other DateTimePatternGenerator to copy + * @stable ICU 3.8 + */ + DateTimePatternGenerator(const DateTimePatternGenerator& other); + + /** + * Default assignment operator. + * @param other DateTimePatternGenerator to copy + * @stable ICU 3.8 + */ + DateTimePatternGenerator& operator=(const DateTimePatternGenerator& other); + + // TODO(ticket:13619): re-enable when UDATPG_NARROW no longer in draft mode. + // static const int32_t UDATPG_WIDTH_COUNT = UDATPG_NARROW + 1; + + Locale pLocale; // pattern locale + FormatParser *fp; + DateTimeMatcher* dtMatcher; + DistanceInfo *distanceInfo; + PatternMap *patternMap; + UnicodeString appendItemFormats[UDATPG_FIELD_COUNT]; + // TODO(ticket:13619): [3] -> UDATPG_WIDTH_COUNT + UnicodeString fieldDisplayNames[UDATPG_FIELD_COUNT][3]; + UnicodeString dateTimeFormat; + UnicodeString decimal; + DateTimeMatcher *skipMatcher; + Hashtable *fAvailableFormatKeyHash; + UnicodeString emptyString; + char16_t fDefaultHourFormatChar; + + int32_t fAllowedHourFormats[7]; // Actually an array of AllowedHourFormat enum type, ending with UNKNOWN. + + /* internal flags masks for adjustFieldTypes etc. */ + enum { + kDTPGNoFlags = 0, + kDTPGFixFractionalSeconds = 1, + kDTPGSkeletonUsesCapJ = 2 + // with #13183, no longer need flags for b, B + }; + + void initData(const Locale &locale, UErrorCode &status); + void addCanonicalItems(UErrorCode &status); + void addICUPatterns(const Locale& locale, UErrorCode& status); + void hackTimes(const UnicodeString& hackPattern, UErrorCode& status); + void getCalendarTypeToUse(const Locale& locale, CharString& destination, UErrorCode& err); + void consumeShortTimePattern(const UnicodeString& shortTimePattern, UErrorCode& status); + void addCLDRData(const Locale& locale, UErrorCode& status); + UDateTimePatternConflict addPatternWithSkeleton(const UnicodeString& pattern, const UnicodeString * skeletonToUse, UBool override, UnicodeString& conflictingPattern, UErrorCode& status); + void initHashtable(UErrorCode& status); + void setDateTimeFromCalendar(const Locale& locale, UErrorCode& status); + void setDecimalSymbols(const Locale& locale, UErrorCode& status); + UDateTimePatternField getAppendFormatNumber(const char* field) const; +#ifndef U_HIDE_DRAFT_API + UDateTimePatternField getFieldAndWidthIndices(const char* key, UDateTimePGDisplayWidth* widthP) const; + void setFieldDisplayName(UDateTimePatternField field, UDateTimePGDisplayWidth width, const UnicodeString& value); + UnicodeString& getMutableFieldDisplayName(UDateTimePatternField field, UDateTimePGDisplayWidth width); +#endif // U_HIDE_DRAFT_API + void getAppendName(UDateTimePatternField field, UnicodeString& value); + UnicodeString mapSkeletonMetacharacters(const UnicodeString& patternForm, int32_t* flags, UErrorCode& status); + int32_t getCanonicalIndex(const UnicodeString& field); + const UnicodeString* getBestRaw(DateTimeMatcher& source, int32_t includeMask, DistanceInfo* missingFields, const PtnSkeleton** specifiedSkeletonPtr = 0); + UnicodeString adjustFieldTypes(const UnicodeString& pattern, const PtnSkeleton* specifiedSkeleton, int32_t flags, UDateTimePatternMatchOptions options = UDATPG_MATCH_NO_OPTIONS); + UnicodeString getBestAppending(int32_t missingFields, int32_t flags, UDateTimePatternMatchOptions options = UDATPG_MATCH_NO_OPTIONS); + int32_t getTopBitNumber(int32_t foundMask); + void setAvailableFormat(const UnicodeString &key, UErrorCode& status); + UBool isAvailableFormatSet(const UnicodeString &key) const; + void copyHashtable(Hashtable *other, UErrorCode &status); + UBool isCanonicalItem(const UnicodeString& item) const; + static void U_CALLCONV loadAllowedHourFormatsData(UErrorCode &status); + void getAllowedHourFormats(const Locale &locale, UErrorCode &status); + + struct AppendItemFormatsSink; + struct AppendItemNamesSink; + struct AvailableFormatsSink; +} ;// end class DateTimePatternGenerator + +U_NAMESPACE_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dtrule.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dtrule.h new file mode 100755 index 00000000..07672491 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/dtrule.h @@ -0,0 +1,252 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2007-2008, International Business Machines Corporation and * +* others. All Rights Reserved. * +******************************************************************************* +*/ +#ifndef DTRULE_H +#define DTRULE_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Rule for specifying date and time in an year + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/uobject.h" + +U_NAMESPACE_BEGIN +/** + * <code>DateTimeRule</code> is a class representing a time in a year by + * a rule specified by month, day of month, day of week and + * time in the day. + * + * @stable ICU 3.8 + */ +class U_I18N_API DateTimeRule : public UObject { +public: + + /** + * Date rule type constants. + * @stable ICU 3.8 + */ + enum DateRuleType { + DOM = 0, /**< The exact day of month, + for example, March 11. */ + DOW, /**< The Nth occurence of the day of week, + for example, 2nd Sunday in March. */ + DOW_GEQ_DOM, /**< The first occurence of the day of week on or after the day of monnth, + for example, first Sunday on or after March 8. */ + DOW_LEQ_DOM /**< The last occurence of the day of week on or before the day of month, + for example, first Sunday on or before March 14. */ + }; + + /** + * Time rule type constants. + * @stable ICU 3.8 + */ + enum TimeRuleType { + WALL_TIME = 0, /**< The local wall clock time */ + STANDARD_TIME, /**< The local standard time */ + UTC_TIME /**< The UTC time */ + }; + + /** + * Constructs a <code>DateTimeRule</code> by the day of month and + * the time rule. The date rule type for an instance created by + * this constructor is <code>DOM</code>. + * + * @param month The rule month, for example, <code>Calendar::JANUARY</code> + * @param dayOfMonth The day of month, 1-based. + * @param millisInDay The milliseconds in the rule date. + * @param timeType The time type, <code>WALL_TIME</code> or <code>STANDARD_TIME</code> + * or <code>UTC_TIME</code>. + * @stable ICU 3.8 + */ + DateTimeRule(int32_t month, int32_t dayOfMonth, + int32_t millisInDay, TimeRuleType timeType); + + /** + * Constructs a <code>DateTimeRule</code> by the day of week and its oridinal + * number and the time rule. The date rule type for an instance created + * by this constructor is <code>DOW</code>. + * + * @param month The rule month, for example, <code>Calendar::JANUARY</code>. + * @param weekInMonth The ordinal number of the day of week. Negative number + * may be used for specifying a rule date counted from the + * end of the rule month. + * @param dayOfWeek The day of week, for example, <code>Calendar::SUNDAY</code>. + * @param millisInDay The milliseconds in the rule date. + * @param timeType The time type, <code>WALL_TIME</code> or <code>STANDARD_TIME</code> + * or <code>UTC_TIME</code>. + * @stable ICU 3.8 + */ + DateTimeRule(int32_t month, int32_t weekInMonth, int32_t dayOfWeek, + int32_t millisInDay, TimeRuleType timeType); + + /** + * Constructs a <code>DateTimeRule</code> by the first/last day of week + * on or after/before the day of month and the time rule. The date rule + * type for an instance created by this constructor is either + * <code>DOM_GEQ_DOM</code> or <code>DOM_LEQ_DOM</code>. + * + * @param month The rule month, for example, <code>Calendar::JANUARY</code> + * @param dayOfMonth The day of month, 1-based. + * @param dayOfWeek The day of week, for example, <code>Calendar::SUNDAY</code>. + * @param after true if the rule date is on or after the day of month. + * @param millisInDay The milliseconds in the rule date. + * @param timeType The time type, <code>WALL_TIME</code> or <code>STANDARD_TIME</code> + * or <code>UTC_TIME</code>. + * @stable ICU 3.8 + */ + DateTimeRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, UBool after, + int32_t millisInDay, TimeRuleType timeType); + + /** + * Copy constructor. + * @param source The DateTimeRule object to be copied. + * @stable ICU 3.8 + */ + DateTimeRule(const DateTimeRule& source); + + /** + * Destructor. + * @stable ICU 3.8 + */ + ~DateTimeRule(); + + /** + * Clone this DateTimeRule object polymorphically. The caller owns the result and + * should delete it when done. + * @return A copy of the object. + * @stable ICU 3.8 + */ + DateTimeRule* clone(void) const; + + /** + * Assignment operator. + * @param right The object to be copied. + * @stable ICU 3.8 + */ + DateTimeRule& operator=(const DateTimeRule& right); + + /** + * Return true if the given DateTimeRule objects are semantically equal. Objects + * of different subclasses are considered unequal. + * @param that The object to be compared with. + * @return true if the given DateTimeRule objects are semantically equal. + * @stable ICU 3.8 + */ + UBool operator==(const DateTimeRule& that) const; + + /** + * Return true if the given DateTimeRule objects are semantically unequal. Objects + * of different subclasses are considered unequal. + * @param that The object to be compared with. + * @return true if the given DateTimeRule objects are semantically unequal. + * @stable ICU 3.8 + */ + UBool operator!=(const DateTimeRule& that) const; + + /** + * Gets the date rule type, such as <code>DOM</code> + * @return The date rule type. + * @stable ICU 3.8 + */ + DateRuleType getDateRuleType(void) const; + + /** + * Gets the time rule type + * @return The time rule type, either <code>WALL_TIME</code> or <code>STANDARD_TIME</code> + * or <code>UTC_TIME</code>. + * @stable ICU 3.8 + */ + TimeRuleType getTimeRuleType(void) const; + + /** + * Gets the rule month. + * @return The rule month. + * @stable ICU 3.8 + */ + int32_t getRuleMonth(void) const; + + /** + * Gets the rule day of month. When the date rule type + * is <code>DOW</code>, the value is always 0. + * @return The rule day of month + * @stable ICU 3.8 + */ + int32_t getRuleDayOfMonth(void) const; + + /** + * Gets the rule day of week. When the date rule type + * is <code>DOM</code>, the value is always 0. + * @return The rule day of week. + * @stable ICU 3.8 + */ + int32_t getRuleDayOfWeek(void) const; + + /** + * Gets the ordinal number of the occurence of the day of week + * in the month. When the date rule type is not <code>DOW</code>, + * the value is always 0. + * @return The rule day of week ordinal number in the month. + * @stable ICU 3.8 + */ + int32_t getRuleWeekInMonth(void) const; + + /** + * Gets the rule time in the rule day. + * @return The time in the rule day in milliseconds. + * @stable ICU 3.8 + */ + int32_t getRuleMillisInDay(void) const; + +private: + int32_t fMonth; + int32_t fDayOfMonth; + int32_t fDayOfWeek; + int32_t fWeekInMonth; + int32_t fMillisInDay; + DateRuleType fDateRuleType; + TimeRuleType fTimeRuleType; + +public: + /** + * Return the class ID for this class. This is useful only for comparing to + * a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . erived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 3.8 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This + * method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() + * methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 3.8 + */ + virtual UClassID getDynamicClassID(void) const; +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // DTRULE_H +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/edits.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/edits.h new file mode 100755 index 00000000..5a72574c --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/edits.h @@ -0,0 +1,424 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +// edits.h +// created: 2016dec30 Markus W. Scherer + +#ifndef __EDITS_H__ +#define __EDITS_H__ + +#include "unicode/utypes.h" +#include "unicode/uobject.h" + +/** + * \file + * \brief C++ API: C++ class Edits for low-level string transformations on styled text. + */ + +U_NAMESPACE_BEGIN + +/** + * Records lengths of string edits but not replacement text. + * Supports replacements, insertions, deletions in linear progression. + * Does not support moving/reordering of text. + * + * An Edits object tracks a separate UErrorCode, but ICU string transformation functions + * (e.g., case mapping functions) merge any such errors into their API's UErrorCode. + * + * @stable ICU 59 + */ +class U_COMMON_API Edits U_FINAL : public UMemory { +public: + /** + * Constructs an empty object. + * @stable ICU 59 + */ + Edits() : + array(stackArray), capacity(STACK_CAPACITY), length(0), delta(0), numChanges(0), + errorCode_(U_ZERO_ERROR) {} + /** + * Copy constructor. + * @param other source edits + * @draft ICU 60 + */ + Edits(const Edits &other) : + array(stackArray), capacity(STACK_CAPACITY), length(other.length), + delta(other.delta), numChanges(other.numChanges), + errorCode_(other.errorCode_) { + copyArray(other); + } + /** + * Move constructor, might leave src empty. + * This object will have the same contents that the source object had. + * @param src source edits + * @draft ICU 60 + */ + Edits(Edits &&src) U_NOEXCEPT : + array(stackArray), capacity(STACK_CAPACITY), length(src.length), + delta(src.delta), numChanges(src.numChanges), + errorCode_(src.errorCode_) { + moveArray(src); + } + + /** + * Destructor. + * @stable ICU 59 + */ + ~Edits(); + + /** + * Assignment operator. + * @param other source edits + * @return *this + * @draft ICU 60 + */ + Edits &operator=(const Edits &other); + + /** + * Move assignment operator, might leave src empty. + * This object will have the same contents that the source object had. + * The behavior is undefined if *this and src are the same object. + * @param src source edits + * @return *this + * @draft ICU 60 + */ + Edits &operator=(Edits &&src) U_NOEXCEPT; + + /** + * Resets the data but may not release memory. + * @stable ICU 59 + */ + void reset() U_NOEXCEPT; + + /** + * Adds a record for an unchanged segment of text. + * Normally called from inside ICU string transformation functions, not user code. + * @stable ICU 59 + */ + void addUnchanged(int32_t unchangedLength); + /** + * Adds a record for a text replacement/insertion/deletion. + * Normally called from inside ICU string transformation functions, not user code. + * @stable ICU 59 + */ + void addReplace(int32_t oldLength, int32_t newLength); + /** + * Sets the UErrorCode if an error occurred while recording edits. + * Preserves older error codes in the outErrorCode. + * Normally called from inside ICU string transformation functions, not user code. + * @param outErrorCode Set to an error code if it does not contain one already + * and an error occurred while recording edits. + * Otherwise unchanged. + * @return TRUE if U_FAILURE(outErrorCode) + * @stable ICU 59 + */ + UBool copyErrorTo(UErrorCode &outErrorCode); + + /** + * How much longer is the new text compared with the old text? + * @return new length minus old length + * @stable ICU 59 + */ + int32_t lengthDelta() const { return delta; } + /** + * @return TRUE if there are any change edits + * @stable ICU 59 + */ + UBool hasChanges() const { return numChanges != 0; } + +#ifndef U_HIDE_DRAFT_API + /** + * @return the number of change edits + * @draft ICU 60 + */ + int32_t numberOfChanges() const { return numChanges; } +#endif // U_HIDE_DRAFT_API + + /** + * Access to the list of edits. + * @see getCoarseIterator + * @see getFineIterator + * @stable ICU 59 + */ + struct U_COMMON_API Iterator U_FINAL : public UMemory { + /** + * Default constructor, empty iterator. + * @draft ICU 60 + */ + Iterator() : + array(nullptr), index(0), length(0), + remaining(0), onlyChanges_(FALSE), coarse(FALSE), + dir(0), changed(FALSE), oldLength_(0), newLength_(0), + srcIndex(0), replIndex(0), destIndex(0) {} + /** + * Copy constructor. + * @stable ICU 59 + */ + Iterator(const Iterator &other) = default; + /** + * Assignment operator. + * @stable ICU 59 + */ + Iterator &operator=(const Iterator &other) = default; + + /** + * Advances to the next edit. + * @param errorCode ICU error code. Its input value must pass the U_SUCCESS() test, + * or else the function returns immediately. Check for U_FAILURE() + * on output or use with function chaining. (See User Guide for details.) + * @return TRUE if there is another edit + * @stable ICU 59 + */ + UBool next(UErrorCode &errorCode) { return next(onlyChanges_, errorCode); } + + /** + * Finds the edit that contains the source index. + * The source index may be found in a non-change + * even if normal iteration would skip non-changes. + * Normal iteration can continue from a found edit. + * + * The iterator state before this search logically does not matter. + * (It may affect the performance of the search.) + * + * The iterator state after this search is undefined + * if the source index is out of bounds for the source string. + * + * @param i source index + * @param errorCode ICU error code. Its input value must pass the U_SUCCESS() test, + * or else the function returns immediately. Check for U_FAILURE() + * on output or use with function chaining. (See User Guide for details.) + * @return TRUE if the edit for the source index was found + * @stable ICU 59 + */ + UBool findSourceIndex(int32_t i, UErrorCode &errorCode) { + return findIndex(i, TRUE, errorCode) == 0; + } + +#ifndef U_HIDE_DRAFT_API + /** + * Finds the edit that contains the destination index. + * The destination index may be found in a non-change + * even if normal iteration would skip non-changes. + * Normal iteration can continue from a found edit. + * + * The iterator state before this search logically does not matter. + * (It may affect the performance of the search.) + * + * The iterator state after this search is undefined + * if the source index is out of bounds for the source string. + * + * @param i destination index + * @param errorCode ICU error code. Its input value must pass the U_SUCCESS() test, + * or else the function returns immediately. Check for U_FAILURE() + * on output or use with function chaining. (See User Guide for details.) + * @return TRUE if the edit for the destination index was found + * @draft ICU 60 + */ + UBool findDestinationIndex(int32_t i, UErrorCode &errorCode) { + return findIndex(i, FALSE, errorCode) == 0; + } + + /** + * Returns the destination index corresponding to the given source index. + * If the source index is inside a change edit (not at its start), + * then the destination index at the end of that edit is returned, + * since there is no information about index mapping inside a change edit. + * + * (This means that indexes to the start and middle of an edit, + * for example around a grapheme cluster, are mapped to indexes + * encompassing the entire edit. + * The alternative, mapping an interior index to the start, + * would map such an interval to an empty one.) + * + * This operation will usually but not always modify this object. + * The iterator state after this search is undefined. + * + * @param i source index + * @param errorCode ICU error code. Its input value must pass the U_SUCCESS() test, + * or else the function returns immediately. Check for U_FAILURE() + * on output or use with function chaining. (See User Guide for details.) + * @return destination index; undefined if i is not 0..string length + * @draft ICU 60 + */ + int32_t destinationIndexFromSourceIndex(int32_t i, UErrorCode &errorCode); + + /** + * Returns the source index corresponding to the given destination index. + * If the destination index is inside a change edit (not at its start), + * then the source index at the end of that edit is returned, + * since there is no information about index mapping inside a change edit. + * + * (This means that indexes to the start and middle of an edit, + * for example around a grapheme cluster, are mapped to indexes + * encompassing the entire edit. + * The alternative, mapping an interior index to the start, + * would map such an interval to an empty one.) + * + * This operation will usually but not always modify this object. + * The iterator state after this search is undefined. + * + * @param i destination index + * @param errorCode ICU error code. Its input value must pass the U_SUCCESS() test, + * or else the function returns immediately. Check for U_FAILURE() + * on output or use with function chaining. (See User Guide for details.) + * @return source index; undefined if i is not 0..string length + * @draft ICU 60 + */ + int32_t sourceIndexFromDestinationIndex(int32_t i, UErrorCode &errorCode); +#endif // U_HIDE_DRAFT_API + + /** + * @return TRUE if this edit replaces oldLength() units with newLength() different ones. + * FALSE if oldLength units remain unchanged. + * @stable ICU 59 + */ + UBool hasChange() const { return changed; } + /** + * @return the number of units in the original string which are replaced or remain unchanged. + * @stable ICU 59 + */ + int32_t oldLength() const { return oldLength_; } + /** + * @return the number of units in the modified string, if hasChange() is TRUE. + * Same as oldLength if hasChange() is FALSE. + * @stable ICU 59 + */ + int32_t newLength() const { return newLength_; } + + /** + * @return the current index into the source string + * @stable ICU 59 + */ + int32_t sourceIndex() const { return srcIndex; } + /** + * @return the current index into the replacement-characters-only string, + * not counting unchanged spans + * @stable ICU 59 + */ + int32_t replacementIndex() const { return replIndex; } + /** + * @return the current index into the full destination string + * @stable ICU 59 + */ + int32_t destinationIndex() const { return destIndex; } + + private: + friend class Edits; + + Iterator(const uint16_t *a, int32_t len, UBool oc, UBool crs); + + int32_t readLength(int32_t head); + void updateNextIndexes(); + void updatePreviousIndexes(); + UBool noNext(); + UBool next(UBool onlyChanges, UErrorCode &errorCode); + UBool previous(UErrorCode &errorCode); + /** @return -1: error or i<0; 0: found; 1: i>=string length */ + int32_t findIndex(int32_t i, UBool findSource, UErrorCode &errorCode); + + const uint16_t *array; + int32_t index, length; + // 0 if we are not within compressed equal-length changes. + // Otherwise the number of remaining changes, including the current one. + int32_t remaining; + UBool onlyChanges_, coarse; + + int8_t dir; // iteration direction: back(<0), initial(0), forward(>0) + UBool changed; + int32_t oldLength_, newLength_; + int32_t srcIndex, replIndex, destIndex; + }; + + /** + * Returns an Iterator for coarse-grained changes for simple string updates. + * Skips non-changes. + * @return an Iterator that merges adjacent changes. + * @stable ICU 59 + */ + Iterator getCoarseChangesIterator() const { + return Iterator(array, length, TRUE, TRUE); + } + + /** + * Returns an Iterator for coarse-grained changes and non-changes for simple string updates. + * @return an Iterator that merges adjacent changes. + * @stable ICU 59 + */ + Iterator getCoarseIterator() const { + return Iterator(array, length, FALSE, TRUE); + } + + /** + * Returns an Iterator for fine-grained changes for modifying styled text. + * Skips non-changes. + * @return an Iterator that separates adjacent changes. + * @stable ICU 59 + */ + Iterator getFineChangesIterator() const { + return Iterator(array, length, TRUE, FALSE); + } + + /** + * Returns an Iterator for fine-grained changes and non-changes for modifying styled text. + * @return an Iterator that separates adjacent changes. + * @stable ICU 59 + */ + Iterator getFineIterator() const { + return Iterator(array, length, FALSE, FALSE); + } + +#ifndef U_HIDE_DRAFT_API + /** + * Merges the two input Edits and appends the result to this object. + * + * Consider two string transformations (for example, normalization and case mapping) + * where each records Edits in addition to writing an output string.<br> + * Edits ab reflect how substrings of input string a + * map to substrings of intermediate string b.<br> + * Edits bc reflect how substrings of intermediate string b + * map to substrings of output string c.<br> + * This function merges ab and bc such that the additional edits + * recorded in this object reflect how substrings of input string a + * map to substrings of output string c. + * + * If unrelated Edits are passed in where the output string of the first + * has a different length than the input string of the second, + * then a U_ILLEGAL_ARGUMENT_ERROR is reported. + * + * @param ab reflects how substrings of input string a + * map to substrings of intermediate string b. + * @param bc reflects how substrings of intermediate string b + * map to substrings of output string c. + * @param errorCode ICU error code. Its input value must pass the U_SUCCESS() test, + * or else the function returns immediately. Check for U_FAILURE() + * on output or use with function chaining. (See User Guide for details.) + * @return *this, with the merged edits appended + * @draft ICU 60 + */ + Edits &mergeAndAppend(const Edits &ab, const Edits &bc, UErrorCode &errorCode); +#endif // U_HIDE_DRAFT_API + +private: + void releaseArray() U_NOEXCEPT; + Edits ©Array(const Edits &other); + Edits &moveArray(Edits &src) U_NOEXCEPT; + + void setLastUnit(int32_t last) { array[length - 1] = (uint16_t)last; } + int32_t lastUnit() const { return length > 0 ? array[length - 1] : 0xffff; } + + void append(int32_t r); + UBool growArray(); + + static const int32_t STACK_CAPACITY = 100; + uint16_t *array; + int32_t capacity; + int32_t length; + int32_t delta; + int32_t numChanges; + UErrorCode errorCode_; + uint16_t stackArray[STACK_CAPACITY]; +}; + +U_NAMESPACE_END + +#endif // __EDITS_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/enumset.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/enumset.h new file mode 100755 index 00000000..f63dd162 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/enumset.h @@ -0,0 +1,66 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* +* Copyright (C) 2012,2014 International Business Machines +* Corporation and others. All Rights Reserved. +* +****************************************************************************** +*/ + +/** + * \file + * \brief C++: internal template EnumSet<> + */ + +#ifndef ENUMSET_H +#define ENUMSET_H + +#include "unicode/utypes.h" + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/* Can't use #ifndef U_HIDE_INTERNAL_API for the entire EnumSet class, needed in .h file declarations */ +/** + * enum bitset for boolean fields. Similar to Java EnumSet<>. + * Needs to range check. Used for private instance variables. + * @internal + */ +template<typename T, uint32_t minValue, uint32_t limitValue> +class EnumSet { +public: + inline EnumSet() : fBools(0) {} + inline EnumSet(const EnumSet<T,minValue,limitValue>& other) : fBools(other.fBools) {} + inline ~EnumSet() {} +#ifndef U_HIDE_INTERNAL_API + inline void clear() { fBools=0; } + inline void add(T toAdd) { set(toAdd, 1); } + inline void remove(T toRemove) { set(toRemove, 0); } + inline int32_t contains(T toCheck) const { return get(toCheck); } + inline void set(T toSet, int32_t v) { fBools=(fBools&(~flag(toSet)))|(v?(flag(toSet)):0); } + inline int32_t get(T toCheck) const { return (fBools & flag(toCheck))?1:0; } + inline UBool isValidEnum(T toCheck) const { return (toCheck>=minValue&&toCheck<limitValue); } + inline UBool isValidValue(int32_t v) const { return (v==0||v==1); } + inline const EnumSet<T,minValue,limitValue>& operator=(const EnumSet<T,minValue,limitValue>& other) { + fBools = other.fBools; + return *this; + } + + inline uint32_t getAll() const { + return fBools; + } +#endif /* U_HIDE_INTERNAL_API */ + +private: + inline uint32_t flag(T toCheck) const { return (1<<(toCheck-minValue)); } +private: + uint32_t fBools; +}; + +U_NAMESPACE_END + +#endif /* U_SHOW_CPLUSPLUS_API */ +#endif /* ENUMSET_H */ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/errorcode.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/errorcode.h new file mode 100755 index 00000000..81cad207 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/errorcode.h @@ -0,0 +1,139 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 2009-2011, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: errorcode.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2009mar10 +* created by: Markus W. Scherer +*/ + +#ifndef __ERRORCODE_H__ +#define __ERRORCODE_H__ + +/** + * \file + * \brief C++ API: ErrorCode class intended to make it easier to use + * ICU C and C++ APIs from C++ user code. + */ + +#include "unicode/utypes.h" +#include "unicode/uobject.h" + +U_NAMESPACE_BEGIN + +/** + * Wrapper class for UErrorCode, with conversion operators for direct use + * in ICU C and C++ APIs. + * Intended to be used as a base class, where a subclass overrides + * the handleFailure() function so that it throws an exception, + * does an assert(), logs an error, etc. + * This is not an abstract base class. This class can be used and instantiated + * by itself, although it will be more useful when subclassed. + * + * Features: + * - The constructor initializes the internal UErrorCode to U_ZERO_ERROR, + * removing one common source of errors. + * - Same use in C APIs taking a UErrorCode * (pointer) + * and C++ taking UErrorCode & (reference) via conversion operators. + * - Possible automatic checking for success when it goes out of scope. + * + * Note: For automatic checking for success in the destructor, a subclass + * must implement such logic in its own destructor because the base class + * destructor cannot call a subclass function (like handleFailure()). + * The ErrorCode base class destructor does nothing. + * + * Note also: While it is possible for a destructor to throw an exception, + * it is generally unsafe to do so. This means that in a subclass the destructor + * and the handleFailure() function may need to take different actions. + * + * Sample code: + * \code + * class IcuErrorCode: public icu::ErrorCode { + * public: + * virtual ~IcuErrorCode() { // should be defined in .cpp as "key function" + * // Safe because our handleFailure() does not throw exceptions. + * if(isFailure()) { handleFailure(); } + * } + * protected: + * virtual void handleFailure() const { + * log_failure(u_errorName(errorCode)); + * exit(errorCode); + * } + * }; + * IcuErrorCode error_code; + * UConverter *cnv = ucnv_open("Shift-JIS", error_code); + * length = ucnv_fromUChars(dest, capacity, src, length, error_code); + * ucnv_close(cnv); + * // IcuErrorCode destructor checks for success. + * \endcode + * + * @stable ICU 4.2 + */ +class U_COMMON_API ErrorCode: public UMemory { +public: + /** + * Default constructor. Initializes its UErrorCode to U_ZERO_ERROR. + * @stable ICU 4.2 + */ + ErrorCode() : errorCode(U_ZERO_ERROR) {} + /** Destructor, does nothing. See class documentation for details. @stable ICU 4.2 */ + virtual ~ErrorCode(); + /** Conversion operator, returns a reference. @stable ICU 4.2 */ + operator UErrorCode & () { return errorCode; } + /** Conversion operator, returns a pointer. @stable ICU 4.2 */ + operator UErrorCode * () { return &errorCode; } + /** Tests for U_SUCCESS(). @stable ICU 4.2 */ + UBool isSuccess() const { return U_SUCCESS(errorCode); } + /** Tests for U_FAILURE(). @stable ICU 4.2 */ + UBool isFailure() const { return U_FAILURE(errorCode); } + /** Returns the UErrorCode value. @stable ICU 4.2 */ + UErrorCode get() const { return errorCode; } + /** Sets the UErrorCode value. @stable ICU 4.2 */ + void set(UErrorCode value) { errorCode=value; } + /** Returns the UErrorCode value and resets it to U_ZERO_ERROR. @stable ICU 4.2 */ + UErrorCode reset(); + /** + * Asserts isSuccess(). + * In other words, this method checks for a failure code, + * and the base class handles it like this: + * \code + * if(isFailure()) { handleFailure(); } + * \endcode + * @stable ICU 4.4 + */ + void assertSuccess() const; + /** + * Return a string for the UErrorCode value. + * The string will be the same as the name of the error code constant + * in the UErrorCode enum. + * @stable ICU 4.4 + */ + const char* errorName() const; + +protected: + /** + * Internal UErrorCode, accessible to subclasses. + * @stable ICU 4.2 + */ + UErrorCode errorCode; + /** + * Called by assertSuccess() if isFailure() is true. + * A subclass should override this function to deal with a failure code: + * Throw an exception, log an error, terminate the program, or similar. + * @stable ICU 4.2 + */ + virtual void handleFailure() const {} +}; + +U_NAMESPACE_END + +#endif // __ERRORCODE_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/fieldpos.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/fieldpos.h new file mode 100755 index 00000000..0bcc8daa --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/fieldpos.h @@ -0,0 +1,294 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ******************************************************************************** + * Copyright (C) 1997-2006, International Business Machines + * Corporation and others. All Rights Reserved. + ******************************************************************************** + * + * File FIELDPOS.H + * + * Modification History: + * + * Date Name Description + * 02/25/97 aliu Converted from java. + * 03/17/97 clhuang Updated per Format implementation. + * 07/17/98 stephen Added default/copy ctors, and operators =, ==, != + ******************************************************************************** + */ + +// ***************************************************************************** +// This file was generated from the java source file FieldPosition.java +// ***************************************************************************** + +#ifndef FIELDPOS_H +#define FIELDPOS_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: FieldPosition identifies the fields in a formatted output. + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/uobject.h" + +U_NAMESPACE_BEGIN + +/** + * <code>FieldPosition</code> is a simple class used by <code>Format</code> + * and its subclasses to identify fields in formatted output. Fields are + * identified by constants, whose names typically end with <code>_FIELD</code>, + * defined in the various subclasses of <code>Format</code>. See + * <code>ERA_FIELD</code> and its friends in <code>DateFormat</code> for + * an example. + * + * <p> + * <code>FieldPosition</code> keeps track of the position of the + * field within the formatted output with two indices: the index + * of the first character of the field and the index of the last + * character of the field. + * + * <p> + * One version of the <code>format</code> method in the various + * <code>Format</code> classes requires a <code>FieldPosition</code> + * object as an argument. You use this <code>format</code> method + * to perform partial formatting or to get information about the + * formatted output (such as the position of a field). + * + * The FieldPosition class is not intended for public subclassing. + * + * <p> + * Below is an example of using <code>FieldPosition</code> to aid + * alignment of an array of formatted floating-point numbers on + * their decimal points: + * <pre> + * \code + * double doubleNum[] = {123456789.0, -12345678.9, 1234567.89, -123456.789, + * 12345.6789, -1234.56789, 123.456789, -12.3456789, 1.23456789}; + * int dNumSize = (int)(sizeof(doubleNum)/sizeof(double)); + * + * UErrorCode status = U_ZERO_ERROR; + * DecimalFormat* fmt = (DecimalFormat*) NumberFormat::createInstance(status); + * fmt->setDecimalSeparatorAlwaysShown(true); + * + * const int tempLen = 20; + * char temp[tempLen]; + * + * for (int i=0; i<dNumSize; i++) { + * FieldPosition pos(NumberFormat::INTEGER_FIELD); + * UnicodeString buf; + * char fmtText[tempLen]; + * ToCharString(fmt->format(doubleNum[i], buf, pos), fmtText); + * for (int j=0; j<tempLen; j++) temp[j] = ' '; // clear with spaces + * temp[__min(tempLen, tempLen-pos.getEndIndex())] = '\0'; + * cout << temp << fmtText << endl; + * } + * delete fmt; + * \endcode + * </pre> + * <p> + * The code will generate the following output: + * <pre> + * \code + * 123,456,789.000 + * -12,345,678.900 + * 1,234,567.880 + * -123,456.789 + * 12,345.678 + * -1,234.567 + * 123.456 + * -12.345 + * 1.234 + * \endcode + * </pre> + */ +class U_I18N_API FieldPosition : public UObject { +public: + /** + * DONT_CARE may be specified as the field to indicate that the + * caller doesn't need to specify a field. + * @stable ICU 2.0 + */ + enum { DONT_CARE = -1 }; + + /** + * Creates a FieldPosition object with a non-specified field. + * @stable ICU 2.0 + */ + FieldPosition() + : UObject(), fField(DONT_CARE), fBeginIndex(0), fEndIndex(0) {} + + /** + * Creates a FieldPosition object for the given field. Fields are + * identified by constants, whose names typically end with _FIELD, + * in the various subclasses of Format. + * + * @see NumberFormat#INTEGER_FIELD + * @see NumberFormat#FRACTION_FIELD + * @see DateFormat#YEAR_FIELD + * @see DateFormat#MONTH_FIELD + * @stable ICU 2.0 + */ + FieldPosition(int32_t field) + : UObject(), fField(field), fBeginIndex(0), fEndIndex(0) {} + + /** + * Copy constructor + * @param copy the object to be copied from. + * @stable ICU 2.0 + */ + FieldPosition(const FieldPosition& copy) + : UObject(copy), fField(copy.fField), fBeginIndex(copy.fBeginIndex), fEndIndex(copy.fEndIndex) {} + + /** + * Destructor + * @stable ICU 2.0 + */ + virtual ~FieldPosition(); + + /** + * Assignment operator + * @param copy the object to be copied from. + * @stable ICU 2.0 + */ + FieldPosition& operator=(const FieldPosition& copy); + + /** + * Equality operator. + * @param that the object to be compared with. + * @return TRUE if the two field positions are equal, FALSE otherwise. + * @stable ICU 2.0 + */ + UBool operator==(const FieldPosition& that) const; + + /** + * Equality operator. + * @param that the object to be compared with. + * @return TRUE if the two field positions are not equal, FALSE otherwise. + * @stable ICU 2.0 + */ + UBool operator!=(const FieldPosition& that) const; + + /** + * Clone this object. + * Clones can be used concurrently in multiple threads. + * If an error occurs, then NULL is returned. + * The caller must delete the clone. + * + * @return a clone of this object + * + * @see getDynamicClassID + * @stable ICU 2.8 + */ + FieldPosition *clone() const; + + /** + * Retrieve the field identifier. + * @return the field identifier. + * @stable ICU 2.0 + */ + int32_t getField(void) const { return fField; } + + /** + * Retrieve the index of the first character in the requested field. + * @return the index of the first character in the requested field. + * @stable ICU 2.0 + */ + int32_t getBeginIndex(void) const { return fBeginIndex; } + + /** + * Retrieve the index of the character following the last character in the + * requested field. + * @return the index of the character following the last character in the + * requested field. + * @stable ICU 2.0 + */ + int32_t getEndIndex(void) const { return fEndIndex; } + + /** + * Set the field. + * @param f the new value of the field. + * @stable ICU 2.0 + */ + void setField(int32_t f) { fField = f; } + + /** + * Set the begin index. For use by subclasses of Format. + * @param bi the new value of the begin index + * @stable ICU 2.0 + */ + void setBeginIndex(int32_t bi) { fBeginIndex = bi; } + + /** + * Set the end index. For use by subclasses of Format. + * @param ei the new value of the end index + * @stable ICU 2.0 + */ + void setEndIndex(int32_t ei) { fEndIndex = ei; } + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.2 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.2 + */ + static UClassID U_EXPORT2 getStaticClassID(); + +private: + /** + * Input: Desired field to determine start and end offsets for. + * The meaning depends on the subclass of Format. + */ + int32_t fField; + + /** + * Output: Start offset of field in text. + * If the field does not occur in the text, 0 is returned. + */ + int32_t fBeginIndex; + + /** + * Output: End offset of field in text. + * If the field does not occur in the text, 0 is returned. + */ + int32_t fEndIndex; +}; + +inline FieldPosition& +FieldPosition::operator=(const FieldPosition& copy) +{ + fField = copy.fField; + fEndIndex = copy.fEndIndex; + fBeginIndex = copy.fBeginIndex; + return *this; +} + +inline UBool +FieldPosition::operator==(const FieldPosition& copy) const +{ + return (fField == copy.fField && + fEndIndex == copy.fEndIndex && + fBeginIndex == copy.fBeginIndex); +} + +inline UBool +FieldPosition::operator!=(const FieldPosition& copy) const +{ + return !operator==(copy); +} + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _FIELDPOS +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/filteredbrk.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/filteredbrk.h new file mode 100755 index 00000000..751d1faf --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/filteredbrk.h @@ -0,0 +1,149 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************** +* Copyright (C) 1997-2015, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************** +*/ + +#ifndef FILTEREDBRK_H +#define FILTEREDBRK_H + +#include "unicode/utypes.h" +#include "unicode/brkiter.h" + +#if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILTERED_BREAK_ITERATION + +U_NAMESPACE_BEGIN + +/** + * \file + * \brief C++ API: FilteredBreakIteratorBuilder + */ + +/** + * The BreakIteratorFilter is used to modify the behavior of a BreakIterator + * by constructing a new BreakIterator which suppresses certain segment boundaries. + * See http://www.unicode.org/reports/tr35/tr35-general.html#Segmentation_Exceptions . + * For example, a typical English Sentence Break Iterator would break on the space + * in the string "Mr. Smith" (resulting in two segments), + * but with "Mr." as an exception, a filtered break iterator + * would consider the string "Mr. Smith" to be a single segment. + * + * @stable ICU 56 + */ +class U_COMMON_API FilteredBreakIteratorBuilder : public UObject { + public: + /** + * destructor. + * @stable ICU 56 + */ + virtual ~FilteredBreakIteratorBuilder(); + + /** + * Construct a FilteredBreakIteratorBuilder based on rules in a locale. + * The rules are taken from CLDR exception data for the locale, + * see http://www.unicode.org/reports/tr35/tr35-general.html#Segmentation_Exceptions + * This is the equivalent of calling createInstance(UErrorCode&) + * and then repeatedly calling addNoBreakAfter(...) with the contents + * of the CLDR exception data. + * @param where the locale. + * @param status The error code. + * @return the new builder + * @stable ICU 56 + */ + static FilteredBreakIteratorBuilder *createInstance(const Locale& where, UErrorCode& status); + +#ifndef U_HIDE_DEPRECATED_API + /** + * This function has been deprecated in favor of createEmptyInstance, which has + * identical behavior. + * @param status The error code. + * @return the new builder + * @deprecated ICU 60 use createEmptyInstance instead + * @see createEmptyInstance() + */ + static FilteredBreakIteratorBuilder *createInstance(UErrorCode &status); +#endif /* U_HIDE_DEPRECATED_API */ + +#ifndef U_HIDE_DRAFT_API + /** + * Construct an empty FilteredBreakIteratorBuilder. + * In this state, it will not suppress any segment boundaries. + * @param status The error code. + * @return the new builder + * @draft ICU 60 + */ + static FilteredBreakIteratorBuilder *createEmptyInstance(UErrorCode &status); +#endif /* U_HIDE_DRAFT_API */ + + /** + * Suppress a certain string from being the end of a segment. + * For example, suppressing "Mr.", then segments ending in "Mr." will not be returned + * by the iterator. + * @param string the string to suppress, such as "Mr." + * @param status error code + * @return returns TRUE if the string was not present and now added, + * FALSE if the call was a no-op because the string was already being suppressed. + * @stable ICU 56 + */ + virtual UBool suppressBreakAfter(const UnicodeString& string, UErrorCode& status) = 0; + + /** + * Stop suppressing a certain string from being the end of the segment. + * This function does not create any new segment boundaries, but only serves to un-do + * the effect of earlier calls to suppressBreakAfter, or to un-do the effect of + * locale data which may be suppressing certain strings. + * @param exception the exception to remove + * @param status error code + * @return returns TRUE if the string was present and now removed, + * FALSE if the call was a no-op because the string was not being suppressed. + * @stable ICU 56 + */ + virtual UBool unsuppressBreakAfter(const UnicodeString& string, UErrorCode& status) = 0; + + /** + * This function has been deprecated in favor of wrapIteratorWithFilter() + * The behavior is identical. + * @param adoptBreakIterator the break iterator to adopt + * @param status error code + * @return the new BreakIterator, owned by the caller. + * @deprecated ICU 60 use wrapIteratorWithFilter() instead + * @see wrapBreakIteratorWithFilter() + */ + virtual BreakIterator *build(BreakIterator* adoptBreakIterator, UErrorCode& status) = 0; + +#ifndef U_HIDE_DRAFT_API + /** + * Wrap (adopt) an existing break iterator in a new filtered instance. + * The resulting BreakIterator is owned by the caller. + * The BreakIteratorFilter may be destroyed before the BreakIterator is destroyed. + * Note that the adoptBreakIterator is adopted by the new BreakIterator + * and should no longer be used by the caller. + * The FilteredBreakIteratorBuilder may be reused. + * This function is an alias for build() + * @param adoptBreakIterator the break iterator to adopt + * @param status error code + * @return the new BreakIterator, owned by the caller. + * @draft ICU 60 + */ + inline BreakIterator *wrapIteratorWithFilter(BreakIterator* adoptBreakIterator, UErrorCode& status) { + return build(adoptBreakIterator, status); + } +#endif /* U_HIDE_DRAFT_API */ + + protected: + /** + * For subclass use + * @stable ICU 56 + */ + FilteredBreakIteratorBuilder(); +}; + + +U_NAMESPACE_END + +#endif // #if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILTERED_BREAK_ITERATION + +#endif // #ifndef FILTEREDBRK_H diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/fmtable.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/fmtable.h new file mode 100755 index 00000000..766a7196 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/fmtable.h @@ -0,0 +1,762 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************** +* Copyright (C) 1997-2014, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************** +* +* File FMTABLE.H +* +* Modification History: +* +* Date Name Description +* 02/29/97 aliu Creation. +******************************************************************************** +*/ +#ifndef FMTABLE_H +#define FMTABLE_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Formattable is a thin wrapper for primitive types used for formatting and parsing + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/unistr.h" +#include "unicode/stringpiece.h" +#include "unicode/uformattable.h" + +U_NAMESPACE_BEGIN + +class CharString; +class DigitList; + +/** + * \def UNUM_INTERNAL_STACKARRAY_SIZE + * @internal + */ +#if U_PLATFORM == U_PF_OS400 +#define UNUM_INTERNAL_STACKARRAY_SIZE 144 +#else +#define UNUM_INTERNAL_STACKARRAY_SIZE 128 +#endif + +/** + * Formattable objects can be passed to the Format class or + * its subclasses for formatting. Formattable is a thin wrapper + * class which interconverts between the primitive numeric types + * (double, long, etc.) as well as UDate and UnicodeString. + * + * <p>Internally, a Formattable object is a union of primitive types. + * As such, it can only store one flavor of data at a time. To + * determine what flavor of data it contains, use the getType method. + * + * <p>As of ICU 3.0, Formattable may also wrap a UObject pointer, + * which it owns. This allows an instance of any ICU class to be + * encapsulated in a Formattable. For legacy reasons and for + * efficiency, primitive numeric types are still stored directly + * within a Formattable. + * + * <p>The Formattable class is not suitable for subclassing. + * + * <p>See UFormattable for a C wrapper. + */ +class U_I18N_API Formattable : public UObject { +public: + /** + * This enum is only used to let callers distinguish between + * the Formattable(UDate) constructor and the Formattable(double) + * constructor; the compiler cannot distinguish the signatures, + * since UDate is currently typedefed to be either double or long. + * If UDate is changed later to be a bonafide class + * or struct, then we no longer need this enum. + * @stable ICU 2.4 + */ + enum ISDATE { kIsDate }; + + /** + * Default constructor + * @stable ICU 2.4 + */ + Formattable(); // Type kLong, value 0 + + /** + * Creates a Formattable object with a UDate instance. + * @param d the UDate instance. + * @param flag the flag to indicate this is a date. Always set it to kIsDate + * @stable ICU 2.0 + */ + Formattable(UDate d, ISDATE flag); + + /** + * Creates a Formattable object with a double number. + * @param d the double number. + * @stable ICU 2.0 + */ + Formattable(double d); + + /** + * Creates a Formattable object with a long number. + * @param l the long number. + * @stable ICU 2.0 + */ + Formattable(int32_t l); + + /** + * Creates a Formattable object with an int64_t number + * @param ll the int64_t number. + * @stable ICU 2.8 + */ + Formattable(int64_t ll); + +#if !UCONFIG_NO_CONVERSION + /** + * Creates a Formattable object with a char string pointer. + * Assumes that the char string is null terminated. + * @param strToCopy the char string. + * @stable ICU 2.0 + */ + Formattable(const char* strToCopy); +#endif + + /** + * Creates a Formattable object of an appropriate numeric type from a + * a decimal number in string form. The Formattable will retain the + * full precision of the input in decimal format, even when it exceeds + * what can be represented by a double or int64_t. + * + * @param number the unformatted (not localized) string representation + * of the Decimal number. + * @param status the error code. Possible errors include U_INVALID_FORMAT_ERROR + * if the format of the string does not conform to that of a + * decimal number. + * @stable ICU 4.4 + */ + Formattable(StringPiece number, UErrorCode &status); + + /** + * Creates a Formattable object with a UnicodeString object to copy from. + * @param strToCopy the UnicodeString string. + * @stable ICU 2.0 + */ + Formattable(const UnicodeString& strToCopy); + + /** + * Creates a Formattable object with a UnicodeString object to adopt from. + * @param strToAdopt the UnicodeString string. + * @stable ICU 2.0 + */ + Formattable(UnicodeString* strToAdopt); + + /** + * Creates a Formattable object with an array of Formattable objects. + * @param arrayToCopy the Formattable object array. + * @param count the array count. + * @stable ICU 2.0 + */ + Formattable(const Formattable* arrayToCopy, int32_t count); + + /** + * Creates a Formattable object that adopts the given UObject. + * @param objectToAdopt the UObject to set this object to + * @stable ICU 3.0 + */ + Formattable(UObject* objectToAdopt); + + /** + * Copy constructor. + * @stable ICU 2.0 + */ + Formattable(const Formattable&); + + /** + * Assignment operator. + * @param rhs The Formattable object to copy into this object. + * @stable ICU 2.0 + */ + Formattable& operator=(const Formattable &rhs); + + /** + * Equality comparison. + * @param other the object to be compared with. + * @return TRUE if other are equal to this, FALSE otherwise. + * @stable ICU 2.0 + */ + UBool operator==(const Formattable &other) const; + + /** + * Equality operator. + * @param other the object to be compared with. + * @return TRUE if other are unequal to this, FALSE otherwise. + * @stable ICU 2.0 + */ + UBool operator!=(const Formattable& other) const + { return !operator==(other); } + + /** + * Destructor. + * @stable ICU 2.0 + */ + virtual ~Formattable(); + + /** + * Clone this object. + * Clones can be used concurrently in multiple threads. + * If an error occurs, then NULL is returned. + * The caller must delete the clone. + * + * @return a clone of this object + * + * @see getDynamicClassID + * @stable ICU 2.8 + */ + Formattable *clone() const; + + /** + * Selector for flavor of data type contained within a + * Formattable object. Formattable is a union of several + * different types, and at any time contains exactly one type. + * @stable ICU 2.4 + */ + enum Type { + /** + * Selector indicating a UDate value. Use getDate to retrieve + * the value. + * @stable ICU 2.4 + */ + kDate, + + /** + * Selector indicating a double value. Use getDouble to + * retrieve the value. + * @stable ICU 2.4 + */ + kDouble, + + /** + * Selector indicating a 32-bit integer value. Use getLong to + * retrieve the value. + * @stable ICU 2.4 + */ + kLong, + + /** + * Selector indicating a UnicodeString value. Use getString + * to retrieve the value. + * @stable ICU 2.4 + */ + kString, + + /** + * Selector indicating an array of Formattables. Use getArray + * to retrieve the value. + * @stable ICU 2.4 + */ + kArray, + + /** + * Selector indicating a 64-bit integer value. Use getInt64 + * to retrieve the value. + * @stable ICU 2.8 + */ + kInt64, + + /** + * Selector indicating a UObject value. Use getObject to + * retrieve the value. + * @stable ICU 3.0 + */ + kObject + }; + + /** + * Gets the data type of this Formattable object. + * @return the data type of this Formattable object. + * @stable ICU 2.0 + */ + Type getType(void) const; + + /** + * Returns TRUE if the data type of this Formattable object + * is kDouble, kLong, or kInt64 + * @return TRUE if this is a pure numeric object + * @stable ICU 3.0 + */ + UBool isNumeric() const; + + /** + * Gets the double value of this object. If this object is not of type + * kDouble then the result is undefined. + * @return the double value of this object. + * @stable ICU 2.0 + */ + double getDouble(void) const { return fValue.fDouble; } + + /** + * Gets the double value of this object. If this object is of type + * long, int64 or Decimal Number then a conversion is peformed, with + * possible loss of precision. If the type is kObject and the + * object is a Measure, then the result of + * getNumber().getDouble(status) is returned. If this object is + * neither a numeric type nor a Measure, then 0 is returned and + * the status is set to U_INVALID_FORMAT_ERROR. + * @param status the error code + * @return the double value of this object. + * @stable ICU 3.0 + */ + double getDouble(UErrorCode& status) const; + + /** + * Gets the long value of this object. If this object is not of type + * kLong then the result is undefined. + * @return the long value of this object. + * @stable ICU 2.0 + */ + int32_t getLong(void) const { return (int32_t)fValue.fInt64; } + + /** + * Gets the long value of this object. If the magnitude is too + * large to fit in a long, then the maximum or minimum long value, + * as appropriate, is returned and the status is set to + * U_INVALID_FORMAT_ERROR. If this object is of type kInt64 and + * it fits within a long, then no precision is lost. If it is of + * type kDouble, then a conversion is peformed, with + * truncation of any fractional part. If the type is kObject and + * the object is a Measure, then the result of + * getNumber().getLong(status) is returned. If this object is + * neither a numeric type nor a Measure, then 0 is returned and + * the status is set to U_INVALID_FORMAT_ERROR. + * @param status the error code + * @return the long value of this object. + * @stable ICU 3.0 + */ + int32_t getLong(UErrorCode& status) const; + + /** + * Gets the int64 value of this object. If this object is not of type + * kInt64 then the result is undefined. + * @return the int64 value of this object. + * @stable ICU 2.8 + */ + int64_t getInt64(void) const { return fValue.fInt64; } + + /** + * Gets the int64 value of this object. If this object is of a numeric + * type and the magnitude is too large to fit in an int64, then + * the maximum or minimum int64 value, as appropriate, is returned + * and the status is set to U_INVALID_FORMAT_ERROR. If the + * magnitude fits in an int64, then a casting conversion is + * peformed, with truncation of any fractional part. If the type + * is kObject and the object is a Measure, then the result of + * getNumber().getDouble(status) is returned. If this object is + * neither a numeric type nor a Measure, then 0 is returned and + * the status is set to U_INVALID_FORMAT_ERROR. + * @param status the error code + * @return the int64 value of this object. + * @stable ICU 3.0 + */ + int64_t getInt64(UErrorCode& status) const; + + /** + * Gets the Date value of this object. If this object is not of type + * kDate then the result is undefined. + * @return the Date value of this object. + * @stable ICU 2.0 + */ + UDate getDate() const { return fValue.fDate; } + + /** + * Gets the Date value of this object. If the type is not a date, + * status is set to U_INVALID_FORMAT_ERROR and the return value is + * undefined. + * @param status the error code. + * @return the Date value of this object. + * @stable ICU 3.0 + */ + UDate getDate(UErrorCode& status) const; + + /** + * Gets the string value of this object. If this object is not of type + * kString then the result is undefined. + * @param result Output param to receive the Date value of this object. + * @return A reference to 'result'. + * @stable ICU 2.0 + */ + UnicodeString& getString(UnicodeString& result) const + { result=*fValue.fString; return result; } + + /** + * Gets the string value of this object. If the type is not a + * string, status is set to U_INVALID_FORMAT_ERROR and a bogus + * string is returned. + * @param result Output param to receive the Date value of this object. + * @param status the error code. + * @return A reference to 'result'. + * @stable ICU 3.0 + */ + UnicodeString& getString(UnicodeString& result, UErrorCode& status) const; + + /** + * Gets a const reference to the string value of this object. If + * this object is not of type kString then the result is + * undefined. + * @return a const reference to the string value of this object. + * @stable ICU 2.0 + */ + inline const UnicodeString& getString(void) const; + + /** + * Gets a const reference to the string value of this object. If + * the type is not a string, status is set to + * U_INVALID_FORMAT_ERROR and the result is a bogus string. + * @param status the error code. + * @return a const reference to the string value of this object. + * @stable ICU 3.0 + */ + const UnicodeString& getString(UErrorCode& status) const; + + /** + * Gets a reference to the string value of this object. If this + * object is not of type kString then the result is undefined. + * @return a reference to the string value of this object. + * @stable ICU 2.0 + */ + inline UnicodeString& getString(void); + + /** + * Gets a reference to the string value of this object. If the + * type is not a string, status is set to U_INVALID_FORMAT_ERROR + * and the result is a bogus string. + * @param status the error code. + * @return a reference to the string value of this object. + * @stable ICU 3.0 + */ + UnicodeString& getString(UErrorCode& status); + + /** + * Gets the array value and count of this object. If this object + * is not of type kArray then the result is undefined. + * @param count fill-in with the count of this object. + * @return the array value of this object. + * @stable ICU 2.0 + */ + const Formattable* getArray(int32_t& count) const + { count=fValue.fArrayAndCount.fCount; return fValue.fArrayAndCount.fArray; } + + /** + * Gets the array value and count of this object. If the type is + * not an array, status is set to U_INVALID_FORMAT_ERROR, count is + * set to 0, and the result is NULL. + * @param count fill-in with the count of this object. + * @param status the error code. + * @return the array value of this object. + * @stable ICU 3.0 + */ + const Formattable* getArray(int32_t& count, UErrorCode& status) const; + + /** + * Accesses the specified element in the array value of this + * Formattable object. If this object is not of type kArray then + * the result is undefined. + * @param index the specified index. + * @return the accessed element in the array. + * @stable ICU 2.0 + */ + Formattable& operator[](int32_t index) { return fValue.fArrayAndCount.fArray[index]; } + + /** + * Returns a pointer to the UObject contained within this + * formattable, or NULL if this object does not contain a UObject. + * @return a UObject pointer, or NULL + * @stable ICU 3.0 + */ + const UObject* getObject() const; + + /** + * Returns a numeric string representation of the number contained within this + * formattable, or NULL if this object does not contain numeric type. + * For values obtained by parsing, the returned decimal number retains + * the full precision and range of the original input, unconstrained by + * the limits of a double floating point or a 64 bit int. + * + * This function is not thread safe, and therfore is not declared const, + * even though it is logically const. + * + * Possible errors include U_MEMORY_ALLOCATION_ERROR, and + * U_INVALID_STATE if the formattable object has not been set to + * a numeric type. + * + * @param status the error code. + * @return the unformatted string representation of a number. + * @stable ICU 4.4 + */ + StringPiece getDecimalNumber(UErrorCode &status); + + /** + * Sets the double value of this object and changes the type to + * kDouble. + * @param d the new double value to be set. + * @stable ICU 2.0 + */ + void setDouble(double d); + + /** + * Sets the long value of this object and changes the type to + * kLong. + * @param l the new long value to be set. + * @stable ICU 2.0 + */ + void setLong(int32_t l); + + /** + * Sets the int64 value of this object and changes the type to + * kInt64. + * @param ll the new int64 value to be set. + * @stable ICU 2.8 + */ + void setInt64(int64_t ll); + + /** + * Sets the Date value of this object and changes the type to + * kDate. + * @param d the new Date value to be set. + * @stable ICU 2.0 + */ + void setDate(UDate d); + + /** + * Sets the string value of this object and changes the type to + * kString. + * @param stringToCopy the new string value to be set. + * @stable ICU 2.0 + */ + void setString(const UnicodeString& stringToCopy); + + /** + * Sets the array value and count of this object and changes the + * type to kArray. + * @param array the array value. + * @param count the number of array elements to be copied. + * @stable ICU 2.0 + */ + void setArray(const Formattable* array, int32_t count); + + /** + * Sets and adopts the string value and count of this object and + * changes the type to kArray. + * @param stringToAdopt the new string value to be adopted. + * @stable ICU 2.0 + */ + void adoptString(UnicodeString* stringToAdopt); + + /** + * Sets and adopts the array value and count of this object and + * changes the type to kArray. + * @stable ICU 2.0 + */ + void adoptArray(Formattable* array, int32_t count); + + /** + * Sets and adopts the UObject value of this object and changes + * the type to kObject. After this call, the caller must not + * delete the given object. + * @param objectToAdopt the UObject value to be adopted + * @stable ICU 3.0 + */ + void adoptObject(UObject* objectToAdopt); + + /** + * Sets the the numeric value from a decimal number string, and changes + * the type to to a numeric type appropriate for the number. + * The syntax of the number is a "numeric string" + * as defined in the Decimal Arithmetic Specification, available at + * http://speleotrove.com/decimal + * The full precision and range of the input number will be retained, + * even when it exceeds what can be represented by a double or an int64. + * + * @param numberString a string representation of the unformatted decimal number. + * @param status the error code. Set to U_INVALID_FORMAT_ERROR if the + * incoming string is not a valid decimal number. + * @stable ICU 4.4 + */ + void setDecimalNumber(StringPiece numberString, + UErrorCode &status); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.2 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.2 + */ + static UClassID U_EXPORT2 getStaticClassID(); + + /** + * Convert the UFormattable to a Formattable. Internally, this is a reinterpret_cast. + * @param fmt a valid UFormattable + * @return the UFormattable as a Formattable object pointer. This is an alias to the original + * UFormattable, and so is only valid while the original argument remains in scope. + * @stable ICU 52 + */ + static inline Formattable *fromUFormattable(UFormattable *fmt); + + /** + * Convert the const UFormattable to a const Formattable. Internally, this is a reinterpret_cast. + * @param fmt a valid UFormattable + * @return the UFormattable as a Formattable object pointer. This is an alias to the original + * UFormattable, and so is only valid while the original argument remains in scope. + * @stable ICU 52 + */ + static inline const Formattable *fromUFormattable(const UFormattable *fmt); + + /** + * Convert this object pointer to a UFormattable. + * @return this object as a UFormattable pointer. This is an alias to this object, + * and so is only valid while this object remains in scope. + * @stable ICU 52 + */ + inline UFormattable *toUFormattable(); + + /** + * Convert this object pointer to a UFormattable. + * @return this object as a UFormattable pointer. This is an alias to this object, + * and so is only valid while this object remains in scope. + * @stable ICU 52 + */ + inline const UFormattable *toUFormattable() const; + +#ifndef U_HIDE_DEPRECATED_API + /** + * Deprecated variant of getLong(UErrorCode&). + * @param status the error code + * @return the long value of this object. + * @deprecated ICU 3.0 use getLong(UErrorCode&) instead + */ + inline int32_t getLong(UErrorCode* status) const; +#endif /* U_HIDE_DEPRECATED_API */ + +#ifndef U_HIDE_INTERNAL_API + /** + * Internal function, do not use. + * TODO: figure out how to make this be non-public. + * NumberFormat::format(Formattable, ... + * needs to get at the DigitList, if it exists, for + * big decimal formatting. + * @internal + */ + DigitList *getDigitList() const { return fDecimalNum;} + + /** + * @internal + */ + DigitList *getInternalDigitList(); + + /** + * Adopt, and set value from, a DigitList + * Internal Function, do not use. + * @param dl the Digit List to be adopted + * @internal + */ + void adoptDigitList(DigitList *dl); + + /** + * Internal function to return the CharString pointer. + * @param status error code + * @return pointer to the CharString - may become invalid if the object is modified + * @internal + */ + CharString *internalGetCharString(UErrorCode &status); + +#endif /* U_HIDE_INTERNAL_API */ + +private: + /** + * Cleans up the memory for unwanted values. For example, the adopted + * string or array objects. + */ + void dispose(void); + + /** + * Common initialization, for use by constructors. + */ + void init(); + + UnicodeString* getBogus() const; + + union { + UObject* fObject; + UnicodeString* fString; + double fDouble; + int64_t fInt64; + UDate fDate; + struct { + Formattable* fArray; + int32_t fCount; + } fArrayAndCount; + } fValue; + + CharString *fDecimalStr; + + DigitList *fDecimalNum; + + char fStackData[UNUM_INTERNAL_STACKARRAY_SIZE]; // must be big enough for DigitList + + Type fType; + UnicodeString fBogus; // Bogus string when it's needed. +}; + +inline UDate Formattable::getDate(UErrorCode& status) const { + if (fType != kDate) { + if (U_SUCCESS(status)) { + status = U_INVALID_FORMAT_ERROR; + } + return 0; + } + return fValue.fDate; +} + +inline const UnicodeString& Formattable::getString(void) const { + return *fValue.fString; +} + +inline UnicodeString& Formattable::getString(void) { + return *fValue.fString; +} + +#ifndef U_HIDE_DEPRECATED_API +inline int32_t Formattable::getLong(UErrorCode* status) const { + return getLong(*status); +} +#endif /* U_HIDE_DEPRECATED_API */ + +inline UFormattable* Formattable::toUFormattable() { + return reinterpret_cast<UFormattable*>(this); +} + +inline const UFormattable* Formattable::toUFormattable() const { + return reinterpret_cast<const UFormattable*>(this); +} + +inline Formattable* Formattable::fromUFormattable(UFormattable *fmt) { + return reinterpret_cast<Formattable *>(fmt); +} + +inline const Formattable* Formattable::fromUFormattable(const UFormattable *fmt) { + return reinterpret_cast<const Formattable *>(fmt); +} + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif //_FMTABLE +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/format.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/format.h new file mode 100755 index 00000000..b05318da --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/format.h @@ -0,0 +1,307 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************** +* Copyright (C) 1997-2011, International Business Machines Corporation and others. +* All Rights Reserved. +******************************************************************************** +* +* File FORMAT.H +* +* Modification History: +* +* Date Name Description +* 02/19/97 aliu Converted from java. +* 03/17/97 clhuang Updated per C++ implementation. +* 03/27/97 helena Updated to pass the simple test after code review. +******************************************************************************** +*/ +// ***************************************************************************** +// This file was generated from the java source file Format.java +// ***************************************************************************** + +#ifndef FORMAT_H +#define FORMAT_H + + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Base class for all formats. + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/unistr.h" +#include "unicode/fmtable.h" +#include "unicode/fieldpos.h" +#include "unicode/fpositer.h" +#include "unicode/parsepos.h" +#include "unicode/parseerr.h" +#include "unicode/locid.h" + +U_NAMESPACE_BEGIN + +/** + * Base class for all formats. This is an abstract base class which + * specifies the protocol for classes which convert other objects or + * values, such as numeric values and dates, and their string + * representations. In some cases these representations may be + * localized or contain localized characters or strings. For example, + * a numeric formatter such as DecimalFormat may convert a numeric + * value such as 12345 to the string "$12,345". It may also parse + * the string back into a numeric value. A date and time formatter + * like SimpleDateFormat may represent a specific date, encoded + * numerically, as a string such as "Wednesday, February 26, 1997 AD". + * <P> + * Many of the concrete subclasses of Format employ the notion of + * a pattern. A pattern is a string representation of the rules which + * govern the interconversion between values and strings. For example, + * a DecimalFormat object may be associated with the pattern + * "$#,##0.00;($#,##0.00)", which is a common US English format for + * currency values, yielding strings such as "$1,234.45" for 1234.45, + * and "($987.65)" for 987.6543. The specific syntax of a pattern + * is defined by each subclass. + * <P> + * Even though many subclasses use patterns, the notion of a pattern + * is not inherent to Format classes in general, and is not part of + * the explicit base class protocol. + * <P> + * Two complex formatting classes bear mentioning. These are + * MessageFormat and ChoiceFormat. ChoiceFormat is a subclass of + * NumberFormat which allows the user to format different number ranges + * as strings. For instance, 0 may be represented as "no files", 1 as + * "one file", and any number greater than 1 as "many files". + * MessageFormat is a formatter which utilizes other Format objects to + * format a string containing with multiple values. For instance, + * A MessageFormat object might produce the string "There are no files + * on the disk MyDisk on February 27, 1997." given the arguments 0, + * "MyDisk", and the date value of 2/27/97. See the ChoiceFormat + * and MessageFormat headers for further information. + * <P> + * If formatting is unsuccessful, a failing UErrorCode is returned when + * the Format cannot format the type of object, otherwise if there is + * something illformed about the the Unicode replacement character + * 0xFFFD is returned. + * <P> + * If there is no match when parsing, a parse failure UErrorCode is + * retured for methods which take no ParsePosition. For the method + * that takes a ParsePosition, the index parameter is left unchanged. + * <P> + * <em>User subclasses are not supported.</em> While clients may write + * subclasses, such code will not necessarily work and will not be + * guaranteed to work stably from release to release. + */ +class U_I18N_API Format : public UObject { +public: + + /** Destructor + * @stable ICU 2.4 + */ + virtual ~Format(); + + /** + * Return true if the given Format objects are semantically equal. + * Objects of different subclasses are considered unequal. + * @param other the object to be compared with. + * @return Return true if the given Format objects are semantically equal. + * Objects of different subclasses are considered unequal. + * @stable ICU 2.0 + */ + virtual UBool operator==(const Format& other) const = 0; + + /** + * Return true if the given Format objects are not semantically + * equal. + * @param other the object to be compared with. + * @return Return true if the given Format objects are not semantically. + * @stable ICU 2.0 + */ + UBool operator!=(const Format& other) const { return !operator==(other); } + + /** + * Clone this object polymorphically. The caller is responsible + * for deleting the result when done. + * @return A copy of the object + * @stable ICU 2.0 + */ + virtual Format* clone() const = 0; + + /** + * Formats an object to produce a string. + * + * @param obj The object to format. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param status Output parameter filled in with success or failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.0 + */ + UnicodeString& format(const Formattable& obj, + UnicodeString& appendTo, + UErrorCode& status) const; + + /** + * Format an object to produce a string. This is a pure virtual method which + * subclasses must implement. This method allows polymorphic formatting + * of Formattable objects. If a subclass of Format receives a Formattable + * object type it doesn't handle (e.g., if a numeric Formattable is passed + * to a DateFormat object) then it returns a failing UErrorCode. + * + * @param obj The object to format. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.0 + */ + virtual UnicodeString& format(const Formattable& obj, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& status) const = 0; + /** + * Format an object to produce a string. Subclasses should override this + * method. This method allows polymorphic formatting of Formattable objects. + * If a subclass of Format receives a Formattable object type it doesn't + * handle (e.g., if a numeric Formattable is passed to a DateFormat object) + * then it returns a failing UErrorCode. + * + * @param obj The object to format. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.4 + */ + virtual UnicodeString& format(const Formattable& obj, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + + /** + * Parse a string to produce an object. This is a pure virtual + * method which subclasses must implement. This method allows + * polymorphic parsing of strings into Formattable objects. + * <P> + * Before calling, set parse_pos.index to the offset you want to + * start parsing at in the source. After calling, parse_pos.index + * is the end of the text you parsed. If error occurs, index is + * unchanged. + * <P> + * When parsing, leading whitespace is discarded (with successful + * parse), while trailing whitespace is left as is. + * <P> + * Example: + * <P> + * Parsing "_12_xy" (where _ represents a space) for a number, + * with index == 0 will result in the number 12, with + * parse_pos.index updated to 3 (just before the second space). + * Parsing a second time will result in a failing UErrorCode since + * "xy" is not a number, and leave index at 3. + * <P> + * Subclasses will typically supply specific parse methods that + * return different types of values. Since methods can't overload + * on return types, these will typically be named "parse", while + * this polymorphic method will always be called parseObject. Any + * parse method that does not take a parse_pos should set status + * to an error value when no text in the required format is at the + * start position. + * + * @param source The string to be parsed into an object. + * @param result Formattable to be set to the parse result. + * If parse fails, return contents are undefined. + * @param parse_pos The position to start parsing at. Upon return + * this param is set to the position after the + * last character successfully parsed. If the + * source is not parsed successfully, this param + * will remain unchanged. + * @stable ICU 2.0 + */ + virtual void parseObject(const UnicodeString& source, + Formattable& result, + ParsePosition& parse_pos) const = 0; + + /** + * Parses a string to produce an object. This is a convenience method + * which calls the pure virtual parseObject() method, and returns a + * failure UErrorCode if the ParsePosition indicates failure. + * + * @param source The string to be parsed into an object. + * @param result Formattable to be set to the parse result. + * If parse fails, return contents are undefined. + * @param status Output param to be filled with success/failure + * result code. + * @stable ICU 2.0 + */ + void parseObject(const UnicodeString& source, + Formattable& result, + UErrorCode& status) const; + + /** Get the locale for this format object. You can choose between valid and actual locale. + * @param type type of the locale we're looking for (valid or actual) + * @param status error code for the operation + * @return the locale + * @stable ICU 2.8 + */ + Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const; + +#ifndef U_HIDE_INTERNAL_API + /** Get the locale for this format object. You can choose between valid and actual locale. + * @param type type of the locale we're looking for (valid or actual) + * @param status error code for the operation + * @return the locale + * @internal + */ + const char* getLocaleID(ULocDataLocaleType type, UErrorCode &status) const; +#endif /* U_HIDE_INTERNAL_API */ + + protected: + /** @stable ICU 2.8 */ + void setLocaleIDs(const char* valid, const char* actual); + +protected: + /** + * Default constructor for subclass use only. Does nothing. + * @stable ICU 2.0 + */ + Format(); + + /** + * @stable ICU 2.0 + */ + Format(const Format&); // Does nothing; for subclasses only + + /** + * @stable ICU 2.0 + */ + Format& operator=(const Format&); // Does nothing; for subclasses + + + /** + * Simple function for initializing a UParseError from a UnicodeString. + * + * @param pattern The pattern to copy into the parseError + * @param pos The position in pattern where the error occured + * @param parseError The UParseError object to fill in + * @stable ICU 2.4 + */ + static void syntaxError(const UnicodeString& pattern, + int32_t pos, + UParseError& parseError); + + private: + char actualLocale[ULOC_FULLNAME_CAPACITY]; + char validLocale[ULOC_FULLNAME_CAPACITY]; +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _FORMAT +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/fpositer.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/fpositer.h new file mode 100755 index 00000000..38ccd8fe --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/fpositer.h @@ -0,0 +1,127 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************** +* Copyright (C) 2010-2012, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************** +* +* File attiter.h +* +* Modification History: +* +* Date Name Description +* 12/15/2009 dougfelt Created +******************************************************************************** +*/ + +#ifndef FPOSITER_H +#define FPOSITER_H + +#include "unicode/utypes.h" +#include "unicode/uobject.h" + +/** + * \file + * \brief C++ API: FieldPosition Iterator. + */ + +#if UCONFIG_NO_FORMATTING + +U_NAMESPACE_BEGIN + +/* + * Allow the declaration of APIs with pointers to FieldPositionIterator + * even when formatting is removed from the build. + */ +class FieldPositionIterator; + +U_NAMESPACE_END + +#else + +#include "unicode/fieldpos.h" +#include "unicode/umisc.h" + +U_NAMESPACE_BEGIN + +class UVector32; + +// Forward declaration for number formatting: +namespace number { +namespace impl { +class NumberStringBuilder; +} +} + +/** + * FieldPositionIterator returns the field ids and their start/limit positions generated + * by a call to Format::format. See Format, NumberFormat, DecimalFormat. + * @stable ICU 4.4 + */ +class U_I18N_API FieldPositionIterator : public UObject { +public: + /** + * Destructor. + * @stable ICU 4.4 + */ + ~FieldPositionIterator(); + + /** + * Constructs a new, empty iterator. + * @stable ICU 4.4 + */ + FieldPositionIterator(void); + + /** + * Copy constructor. If the copy failed for some reason, the new iterator will + * be empty. + * @stable ICU 4.4 + */ + FieldPositionIterator(const FieldPositionIterator&); + + /** + * Return true if another object is semantically equal to this + * one. + * <p> + * Return true if this FieldPositionIterator is at the same position in an + * equal array of run values. + * @stable ICU 4.4 + */ + UBool operator==(const FieldPositionIterator&) const; + + /** + * Returns the complement of the result of operator== + * @param rhs The FieldPositionIterator to be compared for inequality + * @return the complement of the result of operator== + * @stable ICU 4.4 + */ + UBool operator!=(const FieldPositionIterator& rhs) const { return !operator==(rhs); } + + /** + * If the current position is valid, updates the FieldPosition values, advances the iterator, + * and returns TRUE, otherwise returns FALSE. + * @stable ICU 4.4 + */ + UBool next(FieldPosition& fp); + +private: + /** + * Sets the data used by the iterator, and resets the position. + * Returns U_ILLEGAL_ARGUMENT_ERROR in status if the data is not valid + * (length is not a multiple of 3, or start >= limit for any run). + */ + void setData(UVector32 *adopt, UErrorCode& status); + + friend class FieldPositionIteratorHandler; + friend class number::impl::NumberStringBuilder; + + UVector32 *data; + int32_t pos; +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // FPOSITER_H diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/gender.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/gender.h new file mode 100755 index 00000000..e3c27d02 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/gender.h @@ -0,0 +1,113 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2008-2013, International Business Machines Corporation and +* others. All Rights Reserved. +******************************************************************************* +* +* +* File GENDER.H +* +* Modification History:* +* Date Name Description +* +******************************************************************************** +*/ + +#ifndef _GENDER +#define _GENDER + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/locid.h" +#include "unicode/ugender.h" +#include "unicode/uobject.h" + +class GenderInfoTest; + +U_NAMESPACE_BEGIN + +// Forward Declaration +void U_CALLCONV GenderInfo_initCache(UErrorCode &status); + +/** + * GenderInfo computes the gender of a list as a whole given the gender of + * each element. + * @stable ICU 50 + */ +class U_I18N_API GenderInfo : public UObject { +public: + + /** + * Provides access to the predefined GenderInfo object for a given + * locale. + * + * @param locale The locale for which a <code>GenderInfo</code> object is + * returned. + * @param status Output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @return The predefined <code>GenderInfo</code> object pointer for + * this locale. The returned object is immutable, so it is + * declared as const. Caller does not own the returned + * pointer, so it must not attempt to free it. + * @stable ICU 50 + */ + static const GenderInfo* U_EXPORT2 getInstance(const Locale& locale, UErrorCode& status); + + /** + * Determines the gender of a list as a whole given the gender of each + * of the elements. + * + * @param genders the gender of each element in the list. + * @param length the length of gender array. + * @param status Output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @return the gender of the whole list. + * @stable ICU 50 + */ + UGender getListGender(const UGender* genders, int32_t length, UErrorCode& status) const; + + /** + * Destructor. + * + * @stable ICU 50 + */ + virtual ~GenderInfo(); + +private: + int32_t _style; + + /** + * Copy constructor. One object per locale invariant. Clients + * must never copy GenderInfo objects. + */ + GenderInfo(const GenderInfo& other); + + /** + * Assignment operator. Not applicable to immutable objects. + */ + GenderInfo& operator=(const GenderInfo&); + + GenderInfo(); + + static const GenderInfo* getNeutralInstance(); + + static const GenderInfo* getMixedNeutralInstance(); + + static const GenderInfo* getMaleTaintsInstance(); + + static const GenderInfo* loadInstance(const Locale& locale, UErrorCode& status); + + friend class ::GenderInfoTest; + friend void U_CALLCONV GenderInfo_initCache(UErrorCode &status); +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _GENDER +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/gregocal.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/gregocal.h new file mode 100755 index 00000000..2b4fe1d8 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/gregocal.h @@ -0,0 +1,779 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +* Copyright (C) 1997-2013, International Business Machines Corporation and others. +* All Rights Reserved. +******************************************************************************** +* +* File GREGOCAL.H +* +* Modification History: +* +* Date Name Description +* 04/22/97 aliu Overhauled header. +* 07/28/98 stephen Sync with JDK 1.2 +* 09/04/98 stephen Re-sync with JDK 8/31 putback +* 09/14/98 stephen Changed type of kOneDay, kOneWeek to double. +* Fixed bug in roll() +* 10/15/99 aliu Fixed j31, incorrect WEEK_OF_YEAR computation. +* Added documentation of WEEK_OF_YEAR computation. +* 10/15/99 aliu Fixed j32, cannot set date to Feb 29 2000 AD. +* {JDK bug 4210209 4209272} +* 11/07/2003 srl Update, clean up documentation. +******************************************************************************** +*/ + +#ifndef GREGOCAL_H +#define GREGOCAL_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/calendar.h" + +/** + * \file + * \brief C++ API: Concrete class which provides the standard calendar. + */ + +U_NAMESPACE_BEGIN + +/** + * Concrete class which provides the standard calendar used by most of the world. + * <P> + * The standard (Gregorian) calendar has 2 eras, BC and AD. + * <P> + * This implementation handles a single discontinuity, which corresponds by default to + * the date the Gregorian calendar was originally instituted (October 15, 1582). Not all + * countries adopted the Gregorian calendar then, so this cutover date may be changed by + * the caller. + * <P> + * Prior to the institution of the Gregorian Calendar, New Year's Day was March 25. To + * avoid confusion, this Calendar always uses January 1. A manual adjustment may be made + * if desired for dates that are prior to the Gregorian changeover and which fall + * between January 1 and March 24. + * + * <p>Values calculated for the <code>WEEK_OF_YEAR</code> field range from 1 to + * 53. Week 1 for a year is the first week that contains at least + * <code>getMinimalDaysInFirstWeek()</code> days from that year. It thus + * depends on the values of <code>getMinimalDaysInFirstWeek()</code>, + * <code>getFirstDayOfWeek()</code>, and the day of the week of January 1. + * Weeks between week 1 of one year and week 1 of the following year are + * numbered sequentially from 2 to 52 or 53 (as needed). + * + * <p>For example, January 1, 1998 was a Thursday. If + * <code>getFirstDayOfWeek()</code> is <code>MONDAY</code> and + * <code>getMinimalDaysInFirstWeek()</code> is 4 (these are the values + * reflecting ISO 8601 and many national standards), then week 1 of 1998 starts + * on December 29, 1997, and ends on January 4, 1998. If, however, + * <code>getFirstDayOfWeek()</code> is <code>SUNDAY</code>, then week 1 of 1998 + * starts on January 4, 1998, and ends on January 10, 1998; the first three days + * of 1998 then are part of week 53 of 1997. + * + * <p>Example for using GregorianCalendar: + * <pre> + * \code + * // get the supported ids for GMT-08:00 (Pacific Standard Time) + * UErrorCode success = U_ZERO_ERROR; + * const StringEnumeration *ids = TimeZone::createEnumeration(-8 * 60 * 60 * 1000); + * // if no ids were returned, something is wrong. get out. + * if (ids == 0 || ids->count(success) == 0) { + * return; + * } + * + * // begin output + * cout << "Current Time" << endl; + * + * // create a Pacific Standard Time time zone + * SimpleTimeZone* pdt = new SimpleTimeZone(-8 * 60 * 60 * 1000, ids->unext(NULL, success))); + * + * // set up rules for daylight savings time + * pdt->setStartRule(UCAL_MARCH, 1, UCAL_SUNDAY, 2 * 60 * 60 * 1000); + * pdt->setEndRule(UCAL_NOVEMBER, 2, UCAL_SUNDAY, 2 * 60 * 60 * 1000); + * + * // create a GregorianCalendar with the Pacific Daylight time zone + * // and the current date and time + * Calendar* calendar = new GregorianCalendar( pdt, success ); + * + * // print out a bunch of interesting things + * cout << "ERA: " << calendar->get( UCAL_ERA, success ) << endl; + * cout << "YEAR: " << calendar->get( UCAL_YEAR, success ) << endl; + * cout << "MONTH: " << calendar->get( UCAL_MONTH, success ) << endl; + * cout << "WEEK_OF_YEAR: " << calendar->get( UCAL_WEEK_OF_YEAR, success ) << endl; + * cout << "WEEK_OF_MONTH: " << calendar->get( UCAL_WEEK_OF_MONTH, success ) << endl; + * cout << "DATE: " << calendar->get( UCAL_DATE, success ) << endl; + * cout << "DAY_OF_MONTH: " << calendar->get( UCAL_DAY_OF_MONTH, success ) << endl; + * cout << "DAY_OF_YEAR: " << calendar->get( UCAL_DAY_OF_YEAR, success ) << endl; + * cout << "DAY_OF_WEEK: " << calendar->get( UCAL_DAY_OF_WEEK, success ) << endl; + * cout << "DAY_OF_WEEK_IN_MONTH: " << calendar->get( UCAL_DAY_OF_WEEK_IN_MONTH, success ) << endl; + * cout << "AM_PM: " << calendar->get( UCAL_AM_PM, success ) << endl; + * cout << "HOUR: " << calendar->get( UCAL_HOUR, success ) << endl; + * cout << "HOUR_OF_DAY: " << calendar->get( UCAL_HOUR_OF_DAY, success ) << endl; + * cout << "MINUTE: " << calendar->get( UCAL_MINUTE, success ) << endl; + * cout << "SECOND: " << calendar->get( UCAL_SECOND, success ) << endl; + * cout << "MILLISECOND: " << calendar->get( UCAL_MILLISECOND, success ) << endl; + * cout << "ZONE_OFFSET: " << (calendar->get( UCAL_ZONE_OFFSET, success )/(60*60*1000)) << endl; + * cout << "DST_OFFSET: " << (calendar->get( UCAL_DST_OFFSET, success )/(60*60*1000)) << endl; + * + * cout << "Current Time, with hour reset to 3" << endl; + * calendar->clear(UCAL_HOUR_OF_DAY); // so doesn't override + * calendar->set(UCAL_HOUR, 3); + * cout << "ERA: " << calendar->get( UCAL_ERA, success ) << endl; + * cout << "YEAR: " << calendar->get( UCAL_YEAR, success ) << endl; + * cout << "MONTH: " << calendar->get( UCAL_MONTH, success ) << endl; + * cout << "WEEK_OF_YEAR: " << calendar->get( UCAL_WEEK_OF_YEAR, success ) << endl; + * cout << "WEEK_OF_MONTH: " << calendar->get( UCAL_WEEK_OF_MONTH, success ) << endl; + * cout << "DATE: " << calendar->get( UCAL_DATE, success ) << endl; + * cout << "DAY_OF_MONTH: " << calendar->get( UCAL_DAY_OF_MONTH, success ) << endl; + * cout << "DAY_OF_YEAR: " << calendar->get( UCAL_DAY_OF_YEAR, success ) << endl; + * cout << "DAY_OF_WEEK: " << calendar->get( UCAL_DAY_OF_WEEK, success ) << endl; + * cout << "DAY_OF_WEEK_IN_MONTH: " << calendar->get( UCAL_DAY_OF_WEEK_IN_MONTH, success ) << endl; + * cout << "AM_PM: " << calendar->get( UCAL_AM_PM, success ) << endl; + * cout << "HOUR: " << calendar->get( UCAL_HOUR, success ) << endl; + * cout << "HOUR_OF_DAY: " << calendar->get( UCAL_HOUR_OF_DAY, success ) << endl; + * cout << "MINUTE: " << calendar->get( UCAL_MINUTE, success ) << endl; + * cout << "SECOND: " << calendar->get( UCAL_SECOND, success ) << endl; + * cout << "MILLISECOND: " << calendar->get( UCAL_MILLISECOND, success ) << endl; + * cout << "ZONE_OFFSET: " << (calendar->get( UCAL_ZONE_OFFSET, success )/(60*60*1000)) << endl; // in hours + * cout << "DST_OFFSET: " << (calendar->get( UCAL_DST_OFFSET, success )/(60*60*1000)) << endl; // in hours + * + * if (U_FAILURE(success)) { + * cout << "An error occured. success=" << u_errorName(success) << endl; + * } + * + * delete ids; + * delete calendar; // also deletes pdt + * \endcode + * </pre> + * @stable ICU 2.0 + */ +class U_I18N_API GregorianCalendar: public Calendar { +public: + + /** + * Useful constants for GregorianCalendar and TimeZone. + * @stable ICU 2.0 + */ + enum EEras { + BC, + AD + }; + + /** + * Constructs a default GregorianCalendar using the current time in the default time + * zone with the default locale. + * + * @param success Indicates the status of GregorianCalendar object construction. + * Returns U_ZERO_ERROR if constructed successfully. + * @stable ICU 2.0 + */ + GregorianCalendar(UErrorCode& success); + + /** + * Constructs a GregorianCalendar based on the current time in the given time zone + * with the default locale. Clients are no longer responsible for deleting the given + * time zone object after it's adopted. + * + * @param zoneToAdopt The given timezone. + * @param success Indicates the status of GregorianCalendar object construction. + * Returns U_ZERO_ERROR if constructed successfully. + * @stable ICU 2.0 + */ + GregorianCalendar(TimeZone* zoneToAdopt, UErrorCode& success); + + /** + * Constructs a GregorianCalendar based on the current time in the given time zone + * with the default locale. + * + * @param zone The given timezone. + * @param success Indicates the status of GregorianCalendar object construction. + * Returns U_ZERO_ERROR if constructed successfully. + * @stable ICU 2.0 + */ + GregorianCalendar(const TimeZone& zone, UErrorCode& success); + + /** + * Constructs a GregorianCalendar based on the current time in the default time zone + * with the given locale. + * + * @param aLocale The given locale. + * @param success Indicates the status of GregorianCalendar object construction. + * Returns U_ZERO_ERROR if constructed successfully. + * @stable ICU 2.0 + */ + GregorianCalendar(const Locale& aLocale, UErrorCode& success); + + /** + * Constructs a GregorianCalendar based on the current time in the given time zone + * with the given locale. Clients are no longer responsible for deleting the given + * time zone object after it's adopted. + * + * @param zoneToAdopt The given timezone. + * @param aLocale The given locale. + * @param success Indicates the status of GregorianCalendar object construction. + * Returns U_ZERO_ERROR if constructed successfully. + * @stable ICU 2.0 + */ + GregorianCalendar(TimeZone* zoneToAdopt, const Locale& aLocale, UErrorCode& success); + + /** + * Constructs a GregorianCalendar based on the current time in the given time zone + * with the given locale. + * + * @param zone The given timezone. + * @param aLocale The given locale. + * @param success Indicates the status of GregorianCalendar object construction. + * Returns U_ZERO_ERROR if constructed successfully. + * @stable ICU 2.0 + */ + GregorianCalendar(const TimeZone& zone, const Locale& aLocale, UErrorCode& success); + + /** + * Constructs a GregorianCalendar with the given AD date set in the default time + * zone with the default locale. + * + * @param year The value used to set the YEAR time field in the calendar. + * @param month The value used to set the MONTH time field in the calendar. Month + * value is 0-based. e.g., 0 for January. + * @param date The value used to set the DATE time field in the calendar. + * @param success Indicates the status of GregorianCalendar object construction. + * Returns U_ZERO_ERROR if constructed successfully. + * @stable ICU 2.0 + */ + GregorianCalendar(int32_t year, int32_t month, int32_t date, UErrorCode& success); + + /** + * Constructs a GregorianCalendar with the given AD date and time set for the + * default time zone with the default locale. + * + * @param year The value used to set the YEAR time field in the calendar. + * @param month The value used to set the MONTH time field in the calendar. Month + * value is 0-based. e.g., 0 for January. + * @param date The value used to set the DATE time field in the calendar. + * @param hour The value used to set the HOUR_OF_DAY time field in the calendar. + * @param minute The value used to set the MINUTE time field in the calendar. + * @param success Indicates the status of GregorianCalendar object construction. + * Returns U_ZERO_ERROR if constructed successfully. + * @stable ICU 2.0 + */ + GregorianCalendar(int32_t year, int32_t month, int32_t date, int32_t hour, int32_t minute, UErrorCode& success); + + /** + * Constructs a GregorianCalendar with the given AD date and time set for the + * default time zone with the default locale. + * + * @param year The value used to set the YEAR time field in the calendar. + * @param month The value used to set the MONTH time field in the calendar. Month + * value is 0-based. e.g., 0 for January. + * @param date The value used to set the DATE time field in the calendar. + * @param hour The value used to set the HOUR_OF_DAY time field in the calendar. + * @param minute The value used to set the MINUTE time field in the calendar. + * @param second The value used to set the SECOND time field in the calendar. + * @param success Indicates the status of GregorianCalendar object construction. + * Returns U_ZERO_ERROR if constructed successfully. + * @stable ICU 2.0 + */ + GregorianCalendar(int32_t year, int32_t month, int32_t date, int32_t hour, int32_t minute, int32_t second, UErrorCode& success); + + /** + * Destructor + * @stable ICU 2.0 + */ + virtual ~GregorianCalendar(); + + /** + * Copy constructor + * @param source the object to be copied. + * @stable ICU 2.0 + */ + GregorianCalendar(const GregorianCalendar& source); + + /** + * Default assignment operator + * @param right the object to be copied. + * @stable ICU 2.0 + */ + GregorianCalendar& operator=(const GregorianCalendar& right); + + /** + * Create and return a polymorphic copy of this calendar. + * @return return a polymorphic copy of this calendar. + * @stable ICU 2.0 + */ + virtual Calendar* clone(void) const; + + /** + * Sets the GregorianCalendar change date. This is the point when the switch from + * Julian dates to Gregorian dates occurred. Default is 00:00:00 local time, October + * 15, 1582. Previous to this time and date will be Julian dates. + * + * @param date The given Gregorian cutover date. + * @param success Output param set to success/failure code on exit. + * @stable ICU 2.0 + */ + void setGregorianChange(UDate date, UErrorCode& success); + + /** + * Gets the Gregorian Calendar change date. This is the point when the switch from + * Julian dates to Gregorian dates occurred. Default is 00:00:00 local time, October + * 15, 1582. Previous to this time and date will be Julian dates. + * + * @return The Gregorian cutover time for this calendar. + * @stable ICU 2.0 + */ + UDate getGregorianChange(void) const; + + /** + * Return true if the given year is a leap year. Determination of whether a year is + * a leap year is actually very complicated. We do something crude and mostly + * correct here, but for a real determination you need a lot of contextual + * information. For example, in Sweden, the change from Julian to Gregorian happened + * in a complex way resulting in missed leap years and double leap years between + * 1700 and 1753. Another example is that after the start of the Julian calendar in + * 45 B.C., the leap years did not regularize until 8 A.D. This method ignores these + * quirks, and pays attention only to the Julian onset date and the Gregorian + * cutover (which can be changed). + * + * @param year The given year. + * @return True if the given year is a leap year; false otherwise. + * @stable ICU 2.0 + */ + UBool isLeapYear(int32_t year) const; + + /** + * Returns TRUE if the given Calendar object is equivalent to this + * one. Calendar override. + * + * @param other the Calendar to be compared with this Calendar + * @stable ICU 2.4 + */ + virtual UBool isEquivalentTo(const Calendar& other) const; + + /** + * (Overrides Calendar) Rolls up or down by the given amount in the specified field. + * For more information, see the documentation for Calendar::roll(). + * + * @param field The time field. + * @param amount Indicates amount to roll. + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid, this will be set to + * an error status. + * @deprecated ICU 2.6. Use roll(UCalendarDateFields field, int32_t amount, UErrorCode& status) instead. + */ + virtual void roll(EDateFields field, int32_t amount, UErrorCode& status); + + /** + * (Overrides Calendar) Rolls up or down by the given amount in the specified field. + * For more information, see the documentation for Calendar::roll(). + * + * @param field The time field. + * @param amount Indicates amount to roll. + * @param status Output param set to success/failure code on exit. If any value + * previously set in the time field is invalid, this will be set to + * an error status. + * @stable ICU 2.6. + */ + virtual void roll(UCalendarDateFields field, int32_t amount, UErrorCode& status); + +#ifndef U_HIDE_DEPRECATED_API + /** + * Return the minimum value that this field could have, given the current date. + * For the Gregorian calendar, this is the same as getMinimum() and getGreatestMinimum(). + * @param field the time field. + * @return the minimum value that this field could have, given the current date. + * @deprecated ICU 2.6. Use getActualMinimum(UCalendarDateFields field) instead. + */ + int32_t getActualMinimum(EDateFields field) const; + + /** + * Return the minimum value that this field could have, given the current date. + * For the Gregorian calendar, this is the same as getMinimum() and getGreatestMinimum(). + * @param field the time field. + * @param status + * @return the minimum value that this field could have, given the current date. + * @deprecated ICU 2.6. Use getActualMinimum(UCalendarDateFields field) instead. (Added to ICU 3.0 for signature consistency) + */ + int32_t getActualMinimum(EDateFields field, UErrorCode& status) const; +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Return the minimum value that this field could have, given the current date. + * For the Gregorian calendar, this is the same as getMinimum() and getGreatestMinimum(). + * @param field the time field. + * @param status error result. + * @return the minimum value that this field could have, given the current date. + * @stable ICU 3.0 + */ + int32_t getActualMinimum(UCalendarDateFields field, UErrorCode &status) const; + +#ifndef U_HIDE_DEPRECATED_API + /** + * Return the maximum value that this field could have, given the current date. + * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual + * maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Hebrew calendar, + * for some years the actual maximum for MONTH is 12, and for others 13. + * @param field the time field. + * @return the maximum value that this field could have, given the current date. + * @deprecated ICU 2.6. Use getActualMaximum(UCalendarDateFields field) instead. + */ + int32_t getActualMaximum(EDateFields field) const; +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Return the maximum value that this field could have, given the current date. + * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual + * maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Hebrew calendar, + * for some years the actual maximum for MONTH is 12, and for others 13. + * @param field the time field. + * @param status returns any errors that may result from this function call. + * @return the maximum value that this field could have, given the current date. + * @stable ICU 2.6 + */ + virtual int32_t getActualMaximum(UCalendarDateFields field, UErrorCode& status) const; + + /** + * (Overrides Calendar) Return true if the current date for this Calendar is in + * Daylight Savings Time. Recognizes DST_OFFSET, if it is set. + * + * @param status Fill-in parameter which receives the status of this operation. + * @return True if the current date for this Calendar is in Daylight Savings Time, + * false, otherwise. + * @stable ICU 2.0 + */ + virtual UBool inDaylightTime(UErrorCode& status) const; + +public: + + /** + * Override Calendar Returns a unique class ID POLYMORPHICALLY. Pure virtual + * override. This method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() methods call + * this method. + * + * @return The class ID for this object. All objects of a given class have the + * same class ID. Objects of other classes have different class IDs. + * @stable ICU 2.0 + */ + virtual UClassID getDynamicClassID(void) const; + + /** + * Return the class ID for this class. This is useful only for comparing to a return + * value from getDynamicClassID(). For example: + * + * Base* polymorphic_pointer = createPolymorphicObject(); + * if (polymorphic_pointer->getDynamicClassID() == + * Derived::getStaticClassID()) ... + * + * @return The class ID for all objects of this class. + * @stable ICU 2.0 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns the calendar type name string for this Calendar object. + * The returned string is the legacy ICU calendar attribute value, + * for example, "gregorian" or "japanese". + * + * For more details see the Calendar::getType() documentation. + * + * @return legacy calendar type name string + * @stable ICU 49 + */ + virtual const char * getType() const; + + private: + GregorianCalendar(); // default constructor not implemented + + protected: + /** + * Return the ERA. We need a special method for this because the + * default ERA is AD, but a zero (unset) ERA is BC. + * @return the ERA. + * @internal + */ + virtual int32_t internalGetEra() const; + + /** + * Return the Julian day number of day before the first day of the + * given month in the given extended year. Subclasses should override + * this method to implement their calendar system. + * @param eyear the extended year + * @param month the zero-based month, or 0 if useMonth is false + * @param useMonth if false, compute the day before the first day of + * the given year, otherwise, compute the day before the first day of + * the given month + * @return the Julian day number of the day before the first + * day of the given month and year + * @internal + */ + virtual int32_t handleComputeMonthStart(int32_t eyear, int32_t month, + UBool useMonth) const; + + /** + * Subclasses may override this. This method calls + * handleGetMonthLength() to obtain the calendar-specific month + * length. + * @param bestField which field to use to calculate the date + * @return julian day specified by calendar fields. + * @internal + */ + virtual int32_t handleComputeJulianDay(UCalendarDateFields bestField) ; + + /** + * Return the number of days in the given month of the given extended + * year of this calendar system. Subclasses should override this + * method if they can provide a more correct or more efficient + * implementation than the default implementation in Calendar. + * @internal + */ + virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month) const; + + /** + * Return the number of days in the given extended year of this + * calendar system. Subclasses should override this method if they can + * provide a more correct or more efficient implementation than the + * default implementation in Calendar. + * @stable ICU 2.0 + */ + virtual int32_t handleGetYearLength(int32_t eyear) const; + + /** + * return the length of the given month. + * @param month the given month. + * @return the length of the given month. + * @internal + */ + virtual int32_t monthLength(int32_t month) const; + + /** + * return the length of the month according to the given year. + * @param month the given month. + * @param year the given year. + * @return the length of the month + * @internal + */ + virtual int32_t monthLength(int32_t month, int32_t year) const; + +#ifndef U_HIDE_INTERNAL_API + /** + * return the length of the given year. + * @param year the given year. + * @return the length of the given year. + * @internal + */ + int32_t yearLength(int32_t year) const; + + /** + * return the length of the year field. + * @return the length of the year field + * @internal + */ + int32_t yearLength(void) const; + + /** + * After adjustments such as add(MONTH), add(YEAR), we don't want the + * month to jump around. E.g., we don't want Jan 31 + 1 month to go to Mar + * 3, we want it to go to Feb 28. Adjustments which might run into this + * problem call this method to retain the proper month. + * @internal + */ + void pinDayOfMonth(void); +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Return the day number with respect to the epoch. January 1, 1970 (Gregorian) + * is day zero. + * @param status Fill-in parameter which receives the status of this operation. + * @return the day number with respect to the epoch. + * @internal + */ + virtual UDate getEpochDay(UErrorCode& status); + + /** + * Subclass API for defining limits of different types. + * Subclasses must implement this method to return limits for the + * following fields: + * + * <pre>UCAL_ERA + * UCAL_YEAR + * UCAL_MONTH + * UCAL_WEEK_OF_YEAR + * UCAL_WEEK_OF_MONTH + * UCAL_DATE (DAY_OF_MONTH on Java) + * UCAL_DAY_OF_YEAR + * UCAL_DAY_OF_WEEK_IN_MONTH + * UCAL_YEAR_WOY + * UCAL_EXTENDED_YEAR</pre> + * + * @param field one of the above field numbers + * @param limitType one of <code>MINIMUM</code>, <code>GREATEST_MINIMUM</code>, + * <code>LEAST_MAXIMUM</code>, or <code>MAXIMUM</code> + * @internal + */ + virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const; + + /** + * Return the extended year defined by the current fields. This will + * use the UCAL_EXTENDED_YEAR field or the UCAL_YEAR and supra-year fields (such + * as UCAL_ERA) specific to the calendar system, depending on which set of + * fields is newer. + * @return the extended year + * @internal + */ + virtual int32_t handleGetExtendedYear(); + + /** + * Subclasses may override this to convert from week fields + * (YEAR_WOY and WEEK_OF_YEAR) to an extended year in the case + * where YEAR, EXTENDED_YEAR are not set. + * The Gregorian implementation assumes a yearWoy in gregorian format, according to the current era. + * @return the extended year, UCAL_EXTENDED_YEAR + * @internal + */ + virtual int32_t handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t woy); + + + /** + * Subclasses may override this method to compute several fields + * specific to each calendar system. These are: + * + * <ul><li>ERA + * <li>YEAR + * <li>MONTH + * <li>DAY_OF_MONTH + * <li>DAY_OF_YEAR + * <li>EXTENDED_YEAR</ul> + * + * <p>The GregorianCalendar implementation implements + * a calendar with the specified Julian/Gregorian cutover date. + * @internal + */ + virtual void handleComputeFields(int32_t julianDay, UErrorCode &status); + + private: + /** + * Compute the julian day number of the given year. + * @param isGregorian if true, using Gregorian calendar, otherwise using Julian calendar + * @param year the given year. + * @param isLeap true if the year is a leap year. + * @return + */ + static double computeJulianDayOfYear(UBool isGregorian, int32_t year, + UBool& isLeap); + + /** + * Validates the values of the set time fields. True if they're all valid. + * @return True if the set time fields are all valid. + */ + UBool validateFields(void) const; + + /** + * Validates the value of the given time field. True if it's valid. + */ + UBool boundsCheck(int32_t value, UCalendarDateFields field) const; + + /** + * Return the pseudo-time-stamp for two fields, given their + * individual pseudo-time-stamps. If either of the fields + * is unset, then the aggregate is unset. Otherwise, the + * aggregate is the later of the two stamps. + * @param stamp_a One given field. + * @param stamp_b Another given field. + * @return the pseudo-time-stamp for two fields + */ + int32_t aggregateStamp(int32_t stamp_a, int32_t stamp_b); + + /** + * The point at which the Gregorian calendar rules are used, measured in + * milliseconds from the standard epoch. Default is October 15, 1582 + * (Gregorian) 00:00:00 UTC, that is, October 4, 1582 (Julian) is followed + * by October 15, 1582 (Gregorian). This corresponds to Julian day number + * 2299161. This is measured from the standard epoch, not in Julian Days. + */ + UDate fGregorianCutover; + + /** + * Julian day number of the Gregorian cutover + */ + int32_t fCutoverJulianDay; + + /** + * Midnight, local time (using this Calendar's TimeZone) at or before the + * gregorianCutover. This is a pure date value with no time of day or + * timezone component. + */ + UDate fNormalizedGregorianCutover;// = gregorianCutover; + + /** + * The year of the gregorianCutover, with 0 representing + * 1 BC, -1 representing 2 BC, etc. + */ + int32_t fGregorianCutoverYear;// = 1582; + + /** + * The year of the gregorianCutover, with 0 representing + * 1 BC, -1 representing 2 BC, etc. + */ + int32_t fGregorianCutoverJulianDay;// = 2299161; + + /** + * Converts time as milliseconds to Julian date. The Julian date used here is not a + * true Julian date, since it is measured from midnight, not noon. + * + * @param millis The given milliseconds. + * @return The Julian date number. + */ + static double millisToJulianDay(UDate millis); + + /** + * Converts Julian date to time as milliseconds. The Julian date used here is not a + * true Julian date, since it is measured from midnight, not noon. + * + * @param julian The given Julian date number. + * @return Time as milliseconds. + */ + static UDate julianDayToMillis(double julian); + + /** + * Used by handleComputeJulianDay() and handleComputeMonthStart(). + * Temporary field indicating whether the calendar is currently Gregorian as opposed to Julian. + */ + UBool fIsGregorian; + + /** + * Used by handleComputeJulianDay() and handleComputeMonthStart(). + * Temporary field indicating that the sense of the gregorian cutover should be inverted + * to handle certain calculations on and around the cutover date. + */ + UBool fInvertGregorian; + + + public: // internal implementation + + /** + * @return TRUE if this calendar has the notion of a default century + * @internal + */ + virtual UBool haveDefaultCentury() const; + + /** + * @return the start of the default century + * @internal + */ + virtual UDate defaultCenturyStart() const; + + /** + * @return the beginning year of the default century + * @internal + */ + virtual int32_t defaultCenturyStartYear() const; +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _GREGOCAL +//eof + diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/icudataver.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/icudataver.h new file mode 100755 index 00000000..1cb202e3 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/icudataver.h @@ -0,0 +1,43 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* +* Copyright (C) 2009-2013, International Business Machines +* Corporation and others. All Rights Reserved. +* +****************************************************************************** +*/ + + +/** + * \file + * \brief C API: access to ICU Data Version number + */ + +#ifndef __ICU_DATA_VER_H__ +#define __ICU_DATA_VER_H__ + +#include "unicode/utypes.h" + +/** + * @stable ICU 49 + */ +#define U_ICU_VERSION_BUNDLE "icuver" + +/** + * @stable ICU 49 + */ +#define U_ICU_DATA_KEY "DataVersion" + +/** + * Retrieves the data version from icuver and stores it in dataVersionFillin. + * + * @param dataVersionFillin icuver data version information to be filled in if not-null + * @param status stores the error code from the calls to resource bundle + * + * @stable ICU 49 + */ +U_STABLE void U_EXPORT2 u_getDataVersion(UVersionInfo dataVersionFillin, UErrorCode *status); + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/icuplug.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/icuplug.h new file mode 100755 index 00000000..1a894a71 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/icuplug.h @@ -0,0 +1,388 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* +* Copyright (C) 2009-2015, International Business Machines +* Corporation and others. All Rights Reserved. +* +****************************************************************************** +* +* FILE NAME : icuplug.h +* +* Date Name Description +* 10/29/2009 sl New. +****************************************************************************** +*/ + +/** + * \file + * \brief C API: ICU Plugin API + * + * <h2>C API: ICU Plugin API</h2> + * + * <p>C API allowing run-time loadable modules that extend or modify ICU functionality.</p> + * + * <h3>Loading and Configuration</h3> + * + * <p>At ICU startup time, the environment variable "ICU_PLUGINS" will be + * queried for a directory name. If it is not set, the preprocessor symbol + * "DEFAULT_ICU_PLUGINS" will be checked for a default value.</p> + * + * <p>Within the above-named directory, the file "icuplugins##.txt" will be + * opened, if present, where ## is the major+minor number of the currently + * running ICU (such as, 44 for ICU 4.4, thus icuplugins44.txt)</p> + * + * <p>The configuration file has this format:</p> + * + * <ul> + * <li>Hash (#) begins a comment line</li> + * + * <li>Non-comment lines have two or three components: + * LIBRARYNAME ENTRYPOINT [ CONFIGURATION .. ]</li> + * + * <li>Tabs or spaces separate the three items.</li> + * + * <li>LIBRARYNAME is the name of a shared library, either a short name if + * it is on the loader path, or a full pathname.</li> + * + * <li>ENTRYPOINT is the short (undecorated) symbol name of the plugin's + * entrypoint, as above.</li> + * + * <li>CONFIGURATION is the entire rest of the line . It's passed as-is to + * the plugin.</li> + * </ul> + * + * <p>An example configuration file is, in its entirety:</p> + * + * \code + * # this is icuplugins44.txt + * testplug.dll myPlugin hello=world + * \endcode + * <p>Plugins are categorized as "high" or "low" level. Low level are those + * which must be run BEFORE high level plugins, and before any operations + * which cause ICU to be 'initialized'. If a plugin is low level but + * causes ICU to allocate memory or become initialized, that plugin is said + * to cause a 'level change'. </p> + * + * <p>At load time, ICU first queries all plugins to determine their level, + * then loads all 'low' plugins first, and then loads all 'high' plugins. + * Plugins are otherwise loaded in the order listed in the configuration file.</p> + * + * <h3>Implementing a Plugin</h3> + * \code + * U_CAPI UPlugTokenReturn U_EXPORT2 + * myPlugin (UPlugData *plug, UPlugReason reason, UErrorCode *status) { + * if(reason==UPLUG_REASON_QUERY) { + * uplug_setPlugName(plug, "Simple Plugin"); + * uplug_setPlugLevel(plug, UPLUG_LEVEL_HIGH); + * } else if(reason==UPLUG_REASON_LOAD) { + * ... Set up some ICU things here.... + * } else if(reason==UPLUG_REASON_UNLOAD) { + * ... unload, clean up ... + * } + * return UPLUG_TOKEN; + * } + * \endcode + * + * <p>The UPlugData* is an opaque pointer to the plugin-specific data, and is + * used in all other API calls.</p> + * + * <p>The API contract is:</p> + * <ol><li>The plugin MUST always return UPLUG_TOKEN as a return value- to + * indicate that it is a valid plugin.</li> + * + * <li>When the 'reason' parameter is set to UPLUG_REASON_QUERY, the + * plugin MUST call uplug_setPlugLevel() to indicate whether it is a high + * level or low level plugin.</li> + * + * <li>When the 'reason' parameter is UPLUG_REASON_QUERY, the plugin + * SHOULD call uplug_setPlugName to indicate a human readable plugin name.</li></ol> + * + * + * \internal ICU 4.4 Technology Preview + */ + + +#ifndef ICUPLUG_H +#define ICUPLUG_H + +#include "unicode/utypes.h" + + +#if UCONFIG_ENABLE_PLUGINS + + + +/* === Basic types === */ + +#ifndef U_HIDE_INTERNAL_API +/** + * @{ + * Opaque structure passed to/from a plugin. + * use the APIs to access it. + * @internal ICU 4.4 Technology Preview + */ + +struct UPlugData; +typedef struct UPlugData UPlugData; + +/** @} */ + +/** + * Random Token to identify a valid ICU plugin. Plugins must return this + * from the entrypoint. + * @internal ICU 4.4 Technology Preview + */ +#define UPLUG_TOKEN 0x54762486 + +/** + * Max width of names, symbols, and configuration strings + * @internal ICU 4.4 Technology Preview + */ +#define UPLUG_NAME_MAX 100 + + +/** + * Return value from a plugin entrypoint. + * Must always be set to UPLUG_TOKEN + * @see UPLUG_TOKEN + * @internal ICU 4.4 Technology Preview + */ +typedef uint32_t UPlugTokenReturn; + +/** + * Reason code for the entrypoint's call + * @internal ICU 4.4 Technology Preview + */ +typedef enum { + UPLUG_REASON_QUERY = 0, /**< The plugin is being queried for info. **/ + UPLUG_REASON_LOAD = 1, /**< The plugin is being loaded. **/ + UPLUG_REASON_UNLOAD = 2, /**< The plugin is being unloaded. **/ + /** + * Number of known reasons. + * @internal The numeric value may change over time, see ICU ticket #12420. + */ + UPLUG_REASON_COUNT +} UPlugReason; + + +/** + * Level of plugin loading + * INITIAL: UNKNOWN + * QUERY: INVALID -> { LOW | HIGH } + * ERR -> INVALID + * @internal ICU 4.4 Technology Preview + */ +typedef enum { + UPLUG_LEVEL_INVALID = 0, /**< The plugin is invalid, hasn't called uplug_setLevel, or can't load. **/ + UPLUG_LEVEL_UNKNOWN = 1, /**< The plugin is waiting to be installed. **/ + UPLUG_LEVEL_LOW = 2, /**< The plugin must be called before u_init completes **/ + UPLUG_LEVEL_HIGH = 3, /**< The plugin can run at any time. **/ + /** + * Number of known levels. + * @internal The numeric value may change over time, see ICU ticket #12420. + */ + UPLUG_LEVEL_COUNT +} UPlugLevel; + +/** + * Entrypoint for an ICU plugin. + * @param plug the UPlugData handle. + * @param status the plugin's extended status code. + * @return A valid plugin must return UPLUG_TOKEN + * @internal ICU 4.4 Technology Preview + */ +typedef UPlugTokenReturn (U_EXPORT2 UPlugEntrypoint) ( + UPlugData *plug, + UPlugReason reason, + UErrorCode *status); + +/* === Needed for Implementing === */ + +/** + * Request that this plugin not be unloaded at cleanup time. + * This is appropriate for plugins which cannot be cleaned up. + * @see u_cleanup() + * @param plug plugin + * @param dontUnload set true if this plugin can't be unloaded + * @internal ICU 4.4 Technology Preview + */ +U_INTERNAL void U_EXPORT2 +uplug_setPlugNoUnload(UPlugData *plug, UBool dontUnload); + +/** + * Set the level of this plugin. + * @param plug plugin data handle + * @param level the level of this plugin + * @internal ICU 4.4 Technology Preview + */ +U_INTERNAL void U_EXPORT2 +uplug_setPlugLevel(UPlugData *plug, UPlugLevel level); + +/** + * Get the level of this plugin. + * @param plug plugin data handle + * @return the level of this plugin + * @internal ICU 4.4 Technology Preview + */ +U_INTERNAL UPlugLevel U_EXPORT2 +uplug_getPlugLevel(UPlugData *plug); + +/** + * Get the lowest level of plug which can currently load. + * For example, if UPLUG_LEVEL_LOW is returned, then low level plugins may load + * if UPLUG_LEVEL_HIGH is returned, then only high level plugins may load. + * @return the lowest level of plug which can currently load + * @internal ICU 4.4 Technology Preview + */ +U_INTERNAL UPlugLevel U_EXPORT2 +uplug_getCurrentLevel(void); + + +/** + * Get plug load status + * @return The error code of this plugin's load attempt. + * @internal ICU 4.4 Technology Preview + */ +U_INTERNAL UErrorCode U_EXPORT2 +uplug_getPlugLoadStatus(UPlugData *plug); + +/** + * Set the human-readable name of this plugin. + * @param plug plugin data handle + * @param name the name of this plugin. The first UPLUG_NAME_MAX characters willi be copied into a new buffer. + * @internal ICU 4.4 Technology Preview + */ +U_INTERNAL void U_EXPORT2 +uplug_setPlugName(UPlugData *plug, const char *name); + +/** + * Get the human-readable name of this plugin. + * @param plug plugin data handle + * @return the name of this plugin + * @internal ICU 4.4 Technology Preview + */ +U_INTERNAL const char * U_EXPORT2 +uplug_getPlugName(UPlugData *plug); + +/** + * Return the symbol name for this plugin, if known. + * @param plug plugin data handle + * @return the symbol name, or NULL + * @internal ICU 4.4 Technology Preview + */ +U_INTERNAL const char * U_EXPORT2 +uplug_getSymbolName(UPlugData *plug); + +/** + * Return the library name for this plugin, if known. + * @param plug plugin data handle + * @param status error code + * @return the library name, or NULL + * @internal ICU 4.4 Technology Preview + */ +U_INTERNAL const char * U_EXPORT2 +uplug_getLibraryName(UPlugData *plug, UErrorCode *status); + +/** + * Return the library used for this plugin, if known. + * Plugins could use this to load data out of their + * @param plug plugin data handle + * @return the library, or NULL + * @internal ICU 4.4 Technology Preview + */ +U_INTERNAL void * U_EXPORT2 +uplug_getLibrary(UPlugData *plug); + +/** + * Return the plugin-specific context data. + * @param plug plugin data handle + * @return the context, or NULL if not set + * @internal ICU 4.4 Technology Preview + */ +U_INTERNAL void * U_EXPORT2 +uplug_getContext(UPlugData *plug); + +/** + * Set the plugin-specific context data. + * @param plug plugin data handle + * @param context new context to set + * @internal ICU 4.4 Technology Preview + */ +U_INTERNAL void U_EXPORT2 +uplug_setContext(UPlugData *plug, void *context); + + +/** + * Get the configuration string, if available. + * The string is in the platform default codepage. + * @param plug plugin data handle + * @return configuration string, or else null. + * @internal ICU 4.4 Technology Preview + */ +U_INTERNAL const char * U_EXPORT2 +uplug_getConfiguration(UPlugData *plug); + +/** + * Return all currently installed plugins, from newest to oldest + * Usage Example: + * \code + * UPlugData *plug = NULL; + * while(plug=uplug_nextPlug(plug)) { + * ... do something with 'plug' ... + * } + * \endcode + * Not thread safe- do not call while plugs are added or removed. + * @param prior pass in 'NULL' to get the first (most recent) plug, + * otherwise pass the value returned on a prior call to uplug_nextPlug + * @return the next oldest plugin, or NULL if no more. + * @internal ICU 4.4 Technology Preview + */ +U_INTERNAL UPlugData* U_EXPORT2 +uplug_nextPlug(UPlugData *prior); + +/** + * Inject a plugin as if it were loaded from a library. + * This is useful for testing plugins. + * Note that it will have a 'NULL' library pointer associated + * with it, and therefore no llibrary will be closed at cleanup time. + * Low level plugins may not be able to load, as ordering can't be enforced. + * @param entrypoint entrypoint to install + * @param config user specified configuration string, if available, or NULL. + * @param status error result + * @return the new UPlugData associated with this plugin, or NULL if error. + * @internal ICU 4.4 Technology Preview + */ +U_INTERNAL UPlugData* U_EXPORT2 +uplug_loadPlugFromEntrypoint(UPlugEntrypoint *entrypoint, const char *config, UErrorCode *status); + + +/** + * Inject a plugin from a library, as if the information came from a config file. + * Low level plugins may not be able to load, and ordering can't be enforced. + * @param libName DLL name to load + * @param sym symbol of plugin (UPlugEntrypoint function) + * @param config configuration string, or NULL + * @param status error result + * @return the new UPlugData associated with this plugin, or NULL if error. + * @internal ICU 4.4 Technology Preview + */ +U_INTERNAL UPlugData* U_EXPORT2 +uplug_loadPlugFromLibrary(const char *libName, const char *sym, const char *config, UErrorCode *status); + +/** + * Remove a plugin. + * Will request the plugin to be unloaded, and close the library if needed + * @param plug plugin handle to close + * @param status error result + * @internal ICU 4.4 Technology Preview + */ +U_INTERNAL void U_EXPORT2 +uplug_removePlug(UPlugData *plug, UErrorCode *status); +#endif /* U_HIDE_INTERNAL_API */ + +#endif /* UCONFIG_ENABLE_PLUGINS */ + +#endif /* _ICUPLUG */ + diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/idna.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/idna.h new file mode 100755 index 00000000..f08658e5 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/idna.h @@ -0,0 +1,325 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2010-2012, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************* +* file name: idna.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2010mar05 +* created by: Markus W. Scherer +*/ + +#ifndef __IDNA_H__ +#define __IDNA_H__ + +/** + * \file + * \brief C++ API: Internationalizing Domain Names in Applications (IDNA) + */ + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_IDNA + +#include "unicode/bytestream.h" +#include "unicode/stringpiece.h" +#include "unicode/uidna.h" +#include "unicode/unistr.h" + +U_NAMESPACE_BEGIN + +class IDNAInfo; + +/** + * Abstract base class for IDNA processing. + * See http://www.unicode.org/reports/tr46/ + * and http://www.ietf.org/rfc/rfc3490.txt + * + * The IDNA class is not intended for public subclassing. + * + * This C++ API currently only implements UTS #46. + * The uidna.h C API implements both UTS #46 (functions using UIDNA service object) + * and IDNA2003 (functions that do not use a service object). + * @stable ICU 4.6 + */ +class U_COMMON_API IDNA : public UObject { +public: + /** + * Destructor. + * @stable ICU 4.6 + */ + ~IDNA(); + + /** + * Returns an IDNA instance which implements UTS #46. + * Returns an unmodifiable instance, owned by the caller. + * Cache it for multiple operations, and delete it when done. + * The instance is thread-safe, that is, it can be used concurrently. + * + * UTS #46 defines Unicode IDNA Compatibility Processing, + * updated to the latest version of Unicode and compatible with both + * IDNA2003 and IDNA2008. + * + * The worker functions use transitional processing, including deviation mappings, + * unless UIDNA_NONTRANSITIONAL_TO_ASCII or UIDNA_NONTRANSITIONAL_TO_UNICODE + * is used in which case the deviation characters are passed through without change. + * + * Disallowed characters are mapped to U+FFFD. + * + * For available options see the uidna.h header. + * Operations with the UTS #46 instance do not support the + * UIDNA_ALLOW_UNASSIGNED option. + * + * By default, the UTS #46 implementation allows all ASCII characters (as valid or mapped). + * When the UIDNA_USE_STD3_RULES option is used, ASCII characters other than + * letters, digits, hyphen (LDH) and dot/full stop are disallowed and mapped to U+FFFD. + * + * @param options Bit set to modify the processing and error checking. + * See option bit set values in uidna.h. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the UTS #46 IDNA instance, if successful + * @stable ICU 4.6 + */ + static IDNA * + createUTS46Instance(uint32_t options, UErrorCode &errorCode); + + /** + * Converts a single domain name label into its ASCII form for DNS lookup. + * If any processing step fails, then info.hasErrors() will be TRUE and + * the result might not be an ASCII string. + * The label might be modified according to the types of errors. + * Labels with severe errors will be left in (or turned into) their Unicode form. + * + * The UErrorCode indicates an error only in exceptional cases, + * such as a U_MEMORY_ALLOCATION_ERROR. + * + * @param label Input domain name label + * @param dest Destination string object + * @param info Output container of IDNA processing details. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return dest + * @stable ICU 4.6 + */ + virtual UnicodeString & + labelToASCII(const UnicodeString &label, UnicodeString &dest, + IDNAInfo &info, UErrorCode &errorCode) const = 0; + + /** + * Converts a single domain name label into its Unicode form for human-readable display. + * If any processing step fails, then info.hasErrors() will be TRUE. + * The label might be modified according to the types of errors. + * + * The UErrorCode indicates an error only in exceptional cases, + * such as a U_MEMORY_ALLOCATION_ERROR. + * + * @param label Input domain name label + * @param dest Destination string object + * @param info Output container of IDNA processing details. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return dest + * @stable ICU 4.6 + */ + virtual UnicodeString & + labelToUnicode(const UnicodeString &label, UnicodeString &dest, + IDNAInfo &info, UErrorCode &errorCode) const = 0; + + /** + * Converts a whole domain name into its ASCII form for DNS lookup. + * If any processing step fails, then info.hasErrors() will be TRUE and + * the result might not be an ASCII string. + * The domain name might be modified according to the types of errors. + * Labels with severe errors will be left in (or turned into) their Unicode form. + * + * The UErrorCode indicates an error only in exceptional cases, + * such as a U_MEMORY_ALLOCATION_ERROR. + * + * @param name Input domain name + * @param dest Destination string object + * @param info Output container of IDNA processing details. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return dest + * @stable ICU 4.6 + */ + virtual UnicodeString & + nameToASCII(const UnicodeString &name, UnicodeString &dest, + IDNAInfo &info, UErrorCode &errorCode) const = 0; + + /** + * Converts a whole domain name into its Unicode form for human-readable display. + * If any processing step fails, then info.hasErrors() will be TRUE. + * The domain name might be modified according to the types of errors. + * + * The UErrorCode indicates an error only in exceptional cases, + * such as a U_MEMORY_ALLOCATION_ERROR. + * + * @param name Input domain name + * @param dest Destination string object + * @param info Output container of IDNA processing details. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return dest + * @stable ICU 4.6 + */ + virtual UnicodeString & + nameToUnicode(const UnicodeString &name, UnicodeString &dest, + IDNAInfo &info, UErrorCode &errorCode) const = 0; + + // UTF-8 versions of the processing methods ---------------------------- *** + + /** + * Converts a single domain name label into its ASCII form for DNS lookup. + * UTF-8 version of labelToASCII(), same behavior. + * + * @param label Input domain name label + * @param dest Destination byte sink; Flush()ed if successful + * @param info Output container of IDNA processing details. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return dest + * @stable ICU 4.6 + */ + virtual void + labelToASCII_UTF8(StringPiece label, ByteSink &dest, + IDNAInfo &info, UErrorCode &errorCode) const; + + /** + * Converts a single domain name label into its Unicode form for human-readable display. + * UTF-8 version of labelToUnicode(), same behavior. + * + * @param label Input domain name label + * @param dest Destination byte sink; Flush()ed if successful + * @param info Output container of IDNA processing details. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return dest + * @stable ICU 4.6 + */ + virtual void + labelToUnicodeUTF8(StringPiece label, ByteSink &dest, + IDNAInfo &info, UErrorCode &errorCode) const; + + /** + * Converts a whole domain name into its ASCII form for DNS lookup. + * UTF-8 version of nameToASCII(), same behavior. + * + * @param name Input domain name + * @param dest Destination byte sink; Flush()ed if successful + * @param info Output container of IDNA processing details. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return dest + * @stable ICU 4.6 + */ + virtual void + nameToASCII_UTF8(StringPiece name, ByteSink &dest, + IDNAInfo &info, UErrorCode &errorCode) const; + + /** + * Converts a whole domain name into its Unicode form for human-readable display. + * UTF-8 version of nameToUnicode(), same behavior. + * + * @param name Input domain name + * @param dest Destination byte sink; Flush()ed if successful + * @param info Output container of IDNA processing details. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return dest + * @stable ICU 4.6 + */ + virtual void + nameToUnicodeUTF8(StringPiece name, ByteSink &dest, + IDNAInfo &info, UErrorCode &errorCode) const; +}; + +class UTS46; + +/** + * Output container for IDNA processing errors. + * The IDNAInfo class is not suitable for subclassing. + * @stable ICU 4.6 + */ +class U_COMMON_API IDNAInfo : public UMemory { +public: + /** + * Constructor for stack allocation. + * @stable ICU 4.6 + */ + IDNAInfo() : errors(0), labelErrors(0), isTransDiff(FALSE), isBiDi(FALSE), isOkBiDi(TRUE) {} + /** + * Were there IDNA processing errors? + * @return TRUE if there were processing errors + * @stable ICU 4.6 + */ + UBool hasErrors() const { return errors!=0; } + /** + * Returns a bit set indicating IDNA processing errors. + * See UIDNA_ERROR_... constants in uidna.h. + * @return bit set of processing errors + * @stable ICU 4.6 + */ + uint32_t getErrors() const { return errors; } + /** + * Returns TRUE if transitional and nontransitional processing produce different results. + * This is the case when the input label or domain name contains + * one or more deviation characters outside a Punycode label (see UTS #46). + * <ul> + * <li>With nontransitional processing, such characters are + * copied to the destination string. + * <li>With transitional processing, such characters are + * mapped (sharp s/sigma) or removed (joiner/nonjoiner). + * </ul> + * @return TRUE if transitional and nontransitional processing produce different results + * @stable ICU 4.6 + */ + UBool isTransitionalDifferent() const { return isTransDiff; } + +private: + friend class UTS46; + + IDNAInfo(const IDNAInfo &other); // no copying + IDNAInfo &operator=(const IDNAInfo &other); // no copying + + void reset() { + errors=labelErrors=0; + isTransDiff=FALSE; + isBiDi=FALSE; + isOkBiDi=TRUE; + } + + uint32_t errors, labelErrors; + UBool isTransDiff; + UBool isBiDi; + UBool isOkBiDi; +}; + +U_NAMESPACE_END + +#endif // UCONFIG_NO_IDNA +#endif // __IDNA_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/listformatter.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/listformatter.h new file mode 100755 index 00000000..180fbcb5 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/listformatter.h @@ -0,0 +1,171 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 2012-2016, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: listformatter.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 20120426 +* created by: Umesh P. Nair +*/ + +#ifndef __LISTFORMATTER_H__ +#define __LISTFORMATTER_H__ + +#include "unicode/utypes.h" + +#include "unicode/unistr.h" +#include "unicode/locid.h" + +U_NAMESPACE_BEGIN + +/** @internal */ +class Hashtable; + +/** @internal */ +struct ListFormatInternal; + +/* The following can't be #ifndef U_HIDE_INTERNAL_API, needed for other .h file declarations */ +/** @internal */ +struct ListFormatData : public UMemory { + UnicodeString twoPattern; + UnicodeString startPattern; + UnicodeString middlePattern; + UnicodeString endPattern; + + ListFormatData(const UnicodeString& two, const UnicodeString& start, const UnicodeString& middle, const UnicodeString& end) : + twoPattern(two), startPattern(start), middlePattern(middle), endPattern(end) {} +}; + + +/** + * \file + * \brief C++ API: API for formatting a list. + */ + + +/** + * An immutable class for formatting a list, using data from CLDR (or supplied + * separately). + * + * Example: Input data ["Alice", "Bob", "Charlie", "Delta"] will be formatted + * as "Alice, Bob, Charlie and Delta" in English. + * + * The ListFormatter class is not intended for public subclassing. + * @stable ICU 50 + */ +class U_COMMON_API ListFormatter : public UObject{ + + public: + + /** + * Copy constructor. + * @stable ICU 52 + */ + ListFormatter(const ListFormatter&); + + /** + * Assignment operator. + * @stable ICU 52 + */ + ListFormatter& operator=(const ListFormatter& other); + + /** + * Creates a ListFormatter appropriate for the default locale. + * + * @param errorCode ICU error code, set if no data available for default locale. + * @return Pointer to a ListFormatter object for the default locale, + * created from internal data derived from CLDR data. + * @stable ICU 50 + */ + static ListFormatter* createInstance(UErrorCode& errorCode); + + /** + * Creates a ListFormatter appropriate for a locale. + * + * @param locale The locale. + * @param errorCode ICU error code, set if no data available for the given locale. + * @return A ListFormatter object created from internal data derived from + * CLDR data. + * @stable ICU 50 + */ + static ListFormatter* createInstance(const Locale& locale, UErrorCode& errorCode); + +#ifndef U_HIDE_INTERNAL_API + /** + * Creates a ListFormatter appropriate for a locale and style. + * + * @param locale The locale. + * @param style the style, either "standard", "duration", or "duration-short" + * @param errorCode ICU error code, set if no data available for the given locale. + * @return A ListFormatter object created from internal data derived from + * CLDR data. + * @internal + */ + static ListFormatter* createInstance(const Locale& locale, const char* style, UErrorCode& errorCode); +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Destructor. + * + * @stable ICU 50 + */ + virtual ~ListFormatter(); + + + /** + * Formats a list of strings. + * + * @param items An array of strings to be combined and formatted. + * @param n_items Length of the array items. + * @param appendTo The string to which the result should be appended to. + * @param errorCode ICU error code, set if there is an error. + * @return Formatted string combining the elements of items, appended to appendTo. + * @stable ICU 50 + */ + UnicodeString& format(const UnicodeString items[], int32_t n_items, + UnicodeString& appendTo, UErrorCode& errorCode) const; + +#ifndef U_HIDE_INTERNAL_API + /** + @internal for MeasureFormat + */ + UnicodeString& format( + const UnicodeString items[], + int32_t n_items, + UnicodeString& appendTo, + int32_t index, + int32_t &offset, + UErrorCode& errorCode) const; + /** + * @internal constructor made public for testing. + */ + ListFormatter(const ListFormatData &data, UErrorCode &errorCode); + /** + * @internal constructor made public for testing. + */ + ListFormatter(const ListFormatInternal* listFormatterInternal); +#endif /* U_HIDE_INTERNAL_API */ + + private: + static void initializeHash(UErrorCode& errorCode); + static const ListFormatInternal* getListFormatInternal(const Locale& locale, const char *style, UErrorCode& errorCode); + struct ListPatternsSink; + static ListFormatInternal* loadListFormatInternal(const Locale& locale, const char* style, UErrorCode& errorCode); + + ListFormatter(); + + ListFormatInternal* owned; + const ListFormatInternal* data; +}; + +U_NAMESPACE_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/localpointer.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/localpointer.h new file mode 100755 index 00000000..e17ee3d8 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/localpointer.h @@ -0,0 +1,524 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 2009-2016, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: localpointer.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2009nov13 +* created by: Markus W. Scherer +*/ + +#ifndef __LOCALPOINTER_H__ +#define __LOCALPOINTER_H__ + +/** + * \file + * \brief C++ API: "Smart pointers" for use with and in ICU4C C++ code. + * + * These classes are inspired by + * - std::auto_ptr + * - boost::scoped_ptr & boost::scoped_array + * - Taligent Safe Pointers (TOnlyPointerTo) + * + * but none of those provide for all of the goals for ICU smart pointers: + * - Smart pointer owns the object and releases it when it goes out of scope. + * - No transfer of ownership via copy/assignment to reduce misuse. Simpler & more robust. + * - ICU-compatible: No exceptions. + * - Need to be able to orphan/release the pointer and its ownership. + * - Need variants for normal C++ object pointers, C++ arrays, and ICU C service objects. + * + * For details see http://site.icu-project.org/design/cpp/scoped_ptr + */ + +#include "unicode/utypes.h" + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * "Smart pointer" base class; do not use directly: use LocalPointer etc. + * + * Base class for smart pointer classes that do not throw exceptions. + * + * Do not use this base class directly, since it does not delete its pointer. + * A subclass must implement methods that delete the pointer: + * Destructor and adoptInstead(). + * + * There is no operator T *() provided because the programmer must decide + * whether to use getAlias() (without transfer of ownership) or orphan() + * (with transfer of ownership and NULLing of the pointer). + * + * @see LocalPointer + * @see LocalArray + * @see U_DEFINE_LOCAL_OPEN_POINTER + * @stable ICU 4.4 + */ +template<typename T> +class LocalPointerBase { +public: + /** + * Constructor takes ownership. + * @param p simple pointer to an object that is adopted + * @stable ICU 4.4 + */ + explicit LocalPointerBase(T *p=NULL) : ptr(p) {} + /** + * Destructor deletes the object it owns. + * Subclass must override: Base class does nothing. + * @stable ICU 4.4 + */ + ~LocalPointerBase() { /* delete ptr; */ } + /** + * NULL check. + * @return TRUE if ==NULL + * @stable ICU 4.4 + */ + UBool isNull() const { return ptr==NULL; } + /** + * NULL check. + * @return TRUE if !=NULL + * @stable ICU 4.4 + */ + UBool isValid() const { return ptr!=NULL; } + /** + * Comparison with a simple pointer, so that existing code + * with ==NULL need not be changed. + * @param other simple pointer for comparison + * @return true if this pointer value equals other + * @stable ICU 4.4 + */ + bool operator==(const T *other) const { return ptr==other; } + /** + * Comparison with a simple pointer, so that existing code + * with !=NULL need not be changed. + * @param other simple pointer for comparison + * @return true if this pointer value differs from other + * @stable ICU 4.4 + */ + bool operator!=(const T *other) const { return ptr!=other; } + /** + * Access without ownership change. + * @return the pointer value + * @stable ICU 4.4 + */ + T *getAlias() const { return ptr; } + /** + * Access without ownership change. + * @return the pointer value as a reference + * @stable ICU 4.4 + */ + T &operator*() const { return *ptr; } + /** + * Access without ownership change. + * @return the pointer value + * @stable ICU 4.4 + */ + T *operator->() const { return ptr; } + /** + * Gives up ownership; the internal pointer becomes NULL. + * @return the pointer value; + * caller becomes responsible for deleting the object + * @stable ICU 4.4 + */ + T *orphan() { + T *p=ptr; + ptr=NULL; + return p; + } + /** + * Deletes the object it owns, + * and adopts (takes ownership of) the one passed in. + * Subclass must override: Base class does not delete the object. + * @param p simple pointer to an object that is adopted + * @stable ICU 4.4 + */ + void adoptInstead(T *p) { + // delete ptr; + ptr=p; + } +protected: + /** + * Actual pointer. + * @internal + */ + T *ptr; +private: + // No comparison operators with other LocalPointerBases. + bool operator==(const LocalPointerBase<T> &other); + bool operator!=(const LocalPointerBase<T> &other); + // No ownership sharing: No copy constructor, no assignment operator. + LocalPointerBase(const LocalPointerBase<T> &other); + void operator=(const LocalPointerBase<T> &other); + // No heap allocation. Use only on the stack. + static void * U_EXPORT2 operator new(size_t size); + static void * U_EXPORT2 operator new[](size_t size); +#if U_HAVE_PLACEMENT_NEW + static void * U_EXPORT2 operator new(size_t, void *ptr); +#endif +}; + +/** + * "Smart pointer" class, deletes objects via the standard C++ delete operator. + * For most methods see the LocalPointerBase base class. + * + * Usage example: + * \code + * LocalPointer<UnicodeString> s(new UnicodeString((UChar32)0x50005)); + * int32_t length=s->length(); // 2 + * char16_t lead=s->charAt(0); // 0xd900 + * if(some condition) { return; } // no need to explicitly delete the pointer + * s.adoptInstead(new UnicodeString((char16_t)0xfffc)); + * length=s->length(); // 1 + * // no need to explicitly delete the pointer + * \endcode + * + * @see LocalPointerBase + * @stable ICU 4.4 + */ +template<typename T> +class LocalPointer : public LocalPointerBase<T> { +public: + using LocalPointerBase<T>::operator*; + using LocalPointerBase<T>::operator->; + /** + * Constructor takes ownership. + * @param p simple pointer to an object that is adopted + * @stable ICU 4.4 + */ + explicit LocalPointer(T *p=NULL) : LocalPointerBase<T>(p) {} + /** + * Constructor takes ownership and reports an error if NULL. + * + * This constructor is intended to be used with other-class constructors + * that may report a failure UErrorCode, + * so that callers need to check only for U_FAILURE(errorCode) + * and not also separately for isNull(). + * + * @param p simple pointer to an object that is adopted + * @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR + * if p==NULL and no other failure code had been set + * @stable ICU 55 + */ + LocalPointer(T *p, UErrorCode &errorCode) : LocalPointerBase<T>(p) { + if(p==NULL && U_SUCCESS(errorCode)) { + errorCode=U_MEMORY_ALLOCATION_ERROR; + } + } + /** + * Move constructor, leaves src with isNull(). + * @param src source smart pointer + * @stable ICU 56 + */ + LocalPointer(LocalPointer<T> &&src) U_NOEXCEPT : LocalPointerBase<T>(src.ptr) { + src.ptr=NULL; + } + /** + * Destructor deletes the object it owns. + * @stable ICU 4.4 + */ + ~LocalPointer() { + delete LocalPointerBase<T>::ptr; + } + /** + * Move assignment operator, leaves src with isNull(). + * The behavior is undefined if *this and src are the same object. + * @param src source smart pointer + * @return *this + * @stable ICU 56 + */ + LocalPointer<T> &operator=(LocalPointer<T> &&src) U_NOEXCEPT { + return moveFrom(src); + } + // do not use #ifndef U_HIDE_DRAFT_API for moveFrom, needed by non-draft API + /** + * Move assignment, leaves src with isNull(). + * The behavior is undefined if *this and src are the same object. + * + * Can be called explicitly, does not need C++11 support. + * @param src source smart pointer + * @return *this + * @draft ICU 56 + */ + LocalPointer<T> &moveFrom(LocalPointer<T> &src) U_NOEXCEPT { + delete LocalPointerBase<T>::ptr; + LocalPointerBase<T>::ptr=src.ptr; + src.ptr=NULL; + return *this; + } + /** + * Swap pointers. + * @param other other smart pointer + * @stable ICU 56 + */ + void swap(LocalPointer<T> &other) U_NOEXCEPT { + T *temp=LocalPointerBase<T>::ptr; + LocalPointerBase<T>::ptr=other.ptr; + other.ptr=temp; + } + /** + * Non-member LocalPointer swap function. + * @param p1 will get p2's pointer + * @param p2 will get p1's pointer + * @stable ICU 56 + */ + friend inline void swap(LocalPointer<T> &p1, LocalPointer<T> &p2) U_NOEXCEPT { + p1.swap(p2); + } + /** + * Deletes the object it owns, + * and adopts (takes ownership of) the one passed in. + * @param p simple pointer to an object that is adopted + * @stable ICU 4.4 + */ + void adoptInstead(T *p) { + delete LocalPointerBase<T>::ptr; + LocalPointerBase<T>::ptr=p; + } + /** + * Deletes the object it owns, + * and adopts (takes ownership of) the one passed in. + * + * If U_FAILURE(errorCode), then the current object is retained and the new one deleted. + * + * If U_SUCCESS(errorCode) but the input pointer is NULL, + * then U_MEMORY_ALLOCATION_ERROR is set, + * the current object is deleted, and NULL is set. + * + * @param p simple pointer to an object that is adopted + * @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR + * if p==NULL and no other failure code had been set + * @stable ICU 55 + */ + void adoptInsteadAndCheckErrorCode(T *p, UErrorCode &errorCode) { + if(U_SUCCESS(errorCode)) { + delete LocalPointerBase<T>::ptr; + LocalPointerBase<T>::ptr=p; + if(p==NULL) { + errorCode=U_MEMORY_ALLOCATION_ERROR; + } + } else { + delete p; + } + } +}; + +/** + * "Smart pointer" class, deletes objects via the C++ array delete[] operator. + * For most methods see the LocalPointerBase base class. + * Adds operator[] for array item access. + * + * Usage example: + * \code + * LocalArray<UnicodeString> a(new UnicodeString[2]); + * a[0].append((char16_t)0x61); + * if(some condition) { return; } // no need to explicitly delete the array + * a.adoptInstead(new UnicodeString[4]); + * a[3].append((char16_t)0x62).append((char16_t)0x63).reverse(); + * // no need to explicitly delete the array + * \endcode + * + * @see LocalPointerBase + * @stable ICU 4.4 + */ +template<typename T> +class LocalArray : public LocalPointerBase<T> { +public: + using LocalPointerBase<T>::operator*; + using LocalPointerBase<T>::operator->; + /** + * Constructor takes ownership. + * @param p simple pointer to an array of T objects that is adopted + * @stable ICU 4.4 + */ + explicit LocalArray(T *p=NULL) : LocalPointerBase<T>(p) {} + /** + * Constructor takes ownership and reports an error if NULL. + * + * This constructor is intended to be used with other-class constructors + * that may report a failure UErrorCode, + * so that callers need to check only for U_FAILURE(errorCode) + * and not also separately for isNull(). + * + * @param p simple pointer to an array of T objects that is adopted + * @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR + * if p==NULL and no other failure code had been set + * @stable ICU 56 + */ + LocalArray(T *p, UErrorCode &errorCode) : LocalPointerBase<T>(p) { + if(p==NULL && U_SUCCESS(errorCode)) { + errorCode=U_MEMORY_ALLOCATION_ERROR; + } + } + /** + * Move constructor, leaves src with isNull(). + * @param src source smart pointer + * @stable ICU 56 + */ + LocalArray(LocalArray<T> &&src) U_NOEXCEPT : LocalPointerBase<T>(src.ptr) { + src.ptr=NULL; + } + /** + * Destructor deletes the array it owns. + * @stable ICU 4.4 + */ + ~LocalArray() { + delete[] LocalPointerBase<T>::ptr; + } + /** + * Move assignment operator, leaves src with isNull(). + * The behavior is undefined if *this and src are the same object. + * @param src source smart pointer + * @return *this + * @stable ICU 56 + */ + LocalArray<T> &operator=(LocalArray<T> &&src) U_NOEXCEPT { + return moveFrom(src); + } + // do not use #ifndef U_HIDE_DRAFT_API for moveFrom, needed by non-draft API + /** + * Move assignment, leaves src with isNull(). + * The behavior is undefined if *this and src are the same object. + * + * Can be called explicitly, does not need C++11 support. + * @param src source smart pointer + * @return *this + * @draft ICU 56 + */ + LocalArray<T> &moveFrom(LocalArray<T> &src) U_NOEXCEPT { + delete[] LocalPointerBase<T>::ptr; + LocalPointerBase<T>::ptr=src.ptr; + src.ptr=NULL; + return *this; + } + /** + * Swap pointers. + * @param other other smart pointer + * @stable ICU 56 + */ + void swap(LocalArray<T> &other) U_NOEXCEPT { + T *temp=LocalPointerBase<T>::ptr; + LocalPointerBase<T>::ptr=other.ptr; + other.ptr=temp; + } + /** + * Non-member LocalArray swap function. + * @param p1 will get p2's pointer + * @param p2 will get p1's pointer + * @stable ICU 56 + */ + friend inline void swap(LocalArray<T> &p1, LocalArray<T> &p2) U_NOEXCEPT { + p1.swap(p2); + } + /** + * Deletes the array it owns, + * and adopts (takes ownership of) the one passed in. + * @param p simple pointer to an array of T objects that is adopted + * @stable ICU 4.4 + */ + void adoptInstead(T *p) { + delete[] LocalPointerBase<T>::ptr; + LocalPointerBase<T>::ptr=p; + } + /** + * Deletes the array it owns, + * and adopts (takes ownership of) the one passed in. + * + * If U_FAILURE(errorCode), then the current array is retained and the new one deleted. + * + * If U_SUCCESS(errorCode) but the input pointer is NULL, + * then U_MEMORY_ALLOCATION_ERROR is set, + * the current array is deleted, and NULL is set. + * + * @param p simple pointer to an array of T objects that is adopted + * @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR + * if p==NULL and no other failure code had been set + * @stable ICU 56 + */ + void adoptInsteadAndCheckErrorCode(T *p, UErrorCode &errorCode) { + if(U_SUCCESS(errorCode)) { + delete[] LocalPointerBase<T>::ptr; + LocalPointerBase<T>::ptr=p; + if(p==NULL) { + errorCode=U_MEMORY_ALLOCATION_ERROR; + } + } else { + delete[] p; + } + } + /** + * Array item access (writable). + * No index bounds check. + * @param i array index + * @return reference to the array item + * @stable ICU 4.4 + */ + T &operator[](ptrdiff_t i) const { return LocalPointerBase<T>::ptr[i]; } +}; + +/** + * \def U_DEFINE_LOCAL_OPEN_POINTER + * "Smart pointer" definition macro, deletes objects via the closeFunction. + * Defines a subclass of LocalPointerBase which works just + * like LocalPointer<Type> except that this subclass will use the closeFunction + * rather than the C++ delete operator. + * + * Usage example: + * \code + * LocalUCaseMapPointer csm(ucasemap_open(localeID, options, &errorCode)); + * utf8OutLength=ucasemap_utf8ToLower(csm.getAlias(), + * utf8Out, (int32_t)sizeof(utf8Out), + * utf8In, utf8InLength, &errorCode); + * if(U_FAILURE(errorCode)) { return; } // no need to explicitly delete the UCaseMap + * \endcode + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction) \ + class LocalPointerClassName : public LocalPointerBase<Type> { \ + public: \ + using LocalPointerBase<Type>::operator*; \ + using LocalPointerBase<Type>::operator->; \ + explicit LocalPointerClassName(Type *p=NULL) : LocalPointerBase<Type>(p) {} \ + LocalPointerClassName(LocalPointerClassName &&src) U_NOEXCEPT \ + : LocalPointerBase<Type>(src.ptr) { \ + src.ptr=NULL; \ + } \ + ~LocalPointerClassName() { if (ptr != NULL) { closeFunction(ptr); } } \ + LocalPointerClassName &operator=(LocalPointerClassName &&src) U_NOEXCEPT { \ + return moveFrom(src); \ + } \ + LocalPointerClassName &moveFrom(LocalPointerClassName &src) U_NOEXCEPT { \ + if (ptr != NULL) { closeFunction(ptr); } \ + LocalPointerBase<Type>::ptr=src.ptr; \ + src.ptr=NULL; \ + return *this; \ + } \ + void swap(LocalPointerClassName &other) U_NOEXCEPT { \ + Type *temp=LocalPointerBase<Type>::ptr; \ + LocalPointerBase<Type>::ptr=other.ptr; \ + other.ptr=temp; \ + } \ + friend inline void swap(LocalPointerClassName &p1, LocalPointerClassName &p2) U_NOEXCEPT { \ + p1.swap(p2); \ + } \ + void adoptInstead(Type *p) { \ + if (ptr != NULL) { closeFunction(ptr); } \ + ptr=p; \ + } \ + } + +U_NAMESPACE_END + +#endif /* U_SHOW_CPLUSPLUS_API */ +#endif /* __LOCALPOINTER_H__ */ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/locdspnm.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/locdspnm.h new file mode 100755 index 00000000..7f227829 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/locdspnm.h @@ -0,0 +1,207 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* Copyright (C) 2010-2016, International Business Machines Corporation and +* others. All Rights Reserved. +****************************************************************************** +*/ + +#ifndef LOCDSPNM_H +#define LOCDSPNM_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Provides display names of Locale and its components. + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/locid.h" +#include "unicode/strenum.h" +#include "unicode/uscript.h" +#include "unicode/uldnames.h" +#include "unicode/udisplaycontext.h" + +U_NAMESPACE_BEGIN + +/** + * Returns display names of Locales and components of Locales. For + * more information on language, script, region, variant, key, and + * values, see Locale. + * @stable ICU 4.4 + */ +class U_COMMON_API LocaleDisplayNames : public UObject { +public: + /** + * Destructor. + * @stable ICU 4.4 + */ + virtual ~LocaleDisplayNames(); + + /** + * Convenience overload of + * {@link #createInstance(const Locale& locale, UDialectHandling dialectHandling)} + * that specifies STANDARD dialect handling. + * @param locale the display locale + * @return a LocaleDisplayNames instance + * @stable ICU 4.4 + */ + static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& locale); + + /** + * Returns an instance of LocaleDisplayNames that returns names + * formatted for the provided locale, using the provided + * dialectHandling. + * + * @param locale the display locale + * @param dialectHandling how to select names for locales + * @return a LocaleDisplayNames instance + * @stable ICU 4.4 + */ + static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& locale, + UDialectHandling dialectHandling); + + /** + * Returns an instance of LocaleDisplayNames that returns names formatted + * for the provided locale, using the provided UDisplayContext settings. + * + * @param locale the display locale + * @param contexts List of one or more context settings (e.g. for dialect + * handling, capitalization, etc. + * @param length Number of items in the contexts list + * @return a LocaleDisplayNames instance + * @stable ICU 51 + */ + static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& locale, + UDisplayContext *contexts, int32_t length); + + // getters for state + /** + * Returns the locale used to determine the display names. This is + * not necessarily the same locale passed to {@link #createInstance}. + * @return the display locale + * @stable ICU 4.4 + */ + virtual const Locale& getLocale() const = 0; + + /** + * Returns the dialect handling used in the display names. + * @return the dialect handling enum + * @stable ICU 4.4 + */ + virtual UDialectHandling getDialectHandling() const = 0; + + /** + * Returns the UDisplayContext value for the specified UDisplayContextType. + * @param type the UDisplayContextType whose value to return + * @return the UDisplayContext for the specified type. + * @stable ICU 51 + */ + virtual UDisplayContext getContext(UDisplayContextType type) const = 0; + + // names for entire locales + /** + * Returns the display name of the provided locale. + * @param locale the locale whose display name to return + * @param result receives the locale's display name + * @return the display name of the provided locale + * @stable ICU 4.4 + */ + virtual UnicodeString& localeDisplayName(const Locale& locale, + UnicodeString& result) const = 0; + + /** + * Returns the display name of the provided locale id. + * @param localeId the id of the locale whose display name to return + * @param result receives the locale's display name + * @return the display name of the provided locale + * @stable ICU 4.4 + */ + virtual UnicodeString& localeDisplayName(const char* localeId, + UnicodeString& result) const = 0; + + // names for components of a locale id + /** + * Returns the display name of the provided language code. + * @param lang the language code + * @param result receives the language code's display name + * @return the display name of the provided language code + * @stable ICU 4.4 + */ + virtual UnicodeString& languageDisplayName(const char* lang, + UnicodeString& result) const = 0; + + /** + * Returns the display name of the provided script code. + * @param script the script code + * @param result receives the script code's display name + * @return the display name of the provided script code + * @stable ICU 4.4 + */ + virtual UnicodeString& scriptDisplayName(const char* script, + UnicodeString& result) const = 0; + + /** + * Returns the display name of the provided script code. + * @param scriptCode the script code number + * @param result receives the script code's display name + * @return the display name of the provided script code + * @stable ICU 4.4 + */ + virtual UnicodeString& scriptDisplayName(UScriptCode scriptCode, + UnicodeString& result) const = 0; + + /** + * Returns the display name of the provided region code. + * @param region the region code + * @param result receives the region code's display name + * @return the display name of the provided region code + * @stable ICU 4.4 + */ + virtual UnicodeString& regionDisplayName(const char* region, + UnicodeString& result) const = 0; + + /** + * Returns the display name of the provided variant. + * @param variant the variant string + * @param result receives the variant's display name + * @return the display name of the provided variant + * @stable ICU 4.4 + */ + virtual UnicodeString& variantDisplayName(const char* variant, + UnicodeString& result) const = 0; + + /** + * Returns the display name of the provided locale key. + * @param key the locale key name + * @param result receives the locale key's display name + * @return the display name of the provided locale key + * @stable ICU 4.4 + */ + virtual UnicodeString& keyDisplayName(const char* key, + UnicodeString& result) const = 0; + + /** + * Returns the display name of the provided value (used with the provided key). + * @param key the locale key name + * @param value the locale key's value + * @param result receives the value's display name + * @return the display name of the provided value + * @stable ICU 4.4 + */ + virtual UnicodeString& keyValueDisplayName(const char* key, const char* value, + UnicodeString& result) const = 0; +}; + +inline LocaleDisplayNames* LocaleDisplayNames::createInstance(const Locale& locale) { + return LocaleDisplayNames::createInstance(locale, ULDN_STANDARD_NAMES); +} + +U_NAMESPACE_END + +#endif + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/locid.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/locid.h new file mode 100755 index 00000000..9ccf4715 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/locid.h @@ -0,0 +1,815 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* +* Copyright (C) 1996-2015, International Business Machines +* Corporation and others. All Rights Reserved. +* +****************************************************************************** +* +* File locid.h +* +* Created by: Helena Shih +* +* Modification History: +* +* Date Name Description +* 02/11/97 aliu Changed gLocPath to fgLocPath and added methods to +* get and set it. +* 04/02/97 aliu Made operator!= inline; fixed return value of getName(). +* 04/15/97 aliu Cleanup for AIX/Win32. +* 04/24/97 aliu Numerous changes per code review. +* 08/18/98 stephen Added tokenizeString(),changed getDisplayName() +* 09/08/98 stephen Moved definition of kEmptyString for Mac Port +* 11/09/99 weiv Added const char * getName() const; +* 04/12/00 srl removing unicodestring api's and cached hash code +* 08/10/01 grhoten Change the static Locales to accessor functions +****************************************************************************** +*/ + +#ifndef LOCID_H +#define LOCID_H + +#include "unicode/utypes.h" +#include "unicode/uobject.h" +#include "unicode/putil.h" +#include "unicode/uloc.h" + +/** + * \file + * \brief C++ API: Locale ID object. + */ + +U_NAMESPACE_BEGIN + +// Forward Declarations +void U_CALLCONV locale_available_init(); /**< @internal */ + +class StringEnumeration; +class UnicodeString; + +/** + * A <code>Locale</code> object represents a specific geographical, political, + * or cultural region. An operation that requires a <code>Locale</code> to perform + * its task is called <em>locale-sensitive</em> and uses the <code>Locale</code> + * to tailor information for the user. For example, displaying a number + * is a locale-sensitive operation--the number should be formatted + * according to the customs/conventions of the user's native country, + * region, or culture. + * + * The Locale class is not suitable for subclassing. + * + * <P> + * You can create a <code>Locale</code> object using the constructor in + * this class: + * \htmlonly<blockquote>\endhtmlonly + * <pre> + * Locale( const char* language, + * const char* country, + * const char* variant); + * </pre> + * \htmlonly</blockquote>\endhtmlonly + * The first argument to the constructors is a valid <STRONG>ISO + * Language Code.</STRONG> These codes are the lower-case two-letter + * codes as defined by ISO-639. + * You can find a full list of these codes at: + * <BR><a href ="http://www.loc.gov/standards/iso639-2/"> + * http://www.loc.gov/standards/iso639-2/</a> + * + * <P> + * The second argument to the constructors is a valid <STRONG>ISO Country + * Code.</STRONG> These codes are the upper-case two-letter codes + * as defined by ISO-3166. + * You can find a full list of these codes at a number of sites, such as: + * <BR><a href="http://www.iso.org/iso/en/prods-services/iso3166ma/index.html"> + * http://www.iso.org/iso/en/prods-services/iso3166ma/index.html</a> + * + * <P> + * The third constructor requires a third argument--the <STRONG>Variant.</STRONG> + * The Variant codes are vendor and browser-specific. + * For example, use REVISED for a language's revised script orthography, and POSIX for POSIX. + * Where there are two variants, separate them with an underscore, and + * put the most important one first. For + * example, a Traditional Spanish collation might be referenced, with + * "ES", "ES", "Traditional_POSIX". + * + * <P> + * Because a <code>Locale</code> object is just an identifier for a region, + * no validity check is performed when you construct a <code>Locale</code>. + * If you want to see whether particular resources are available for the + * <code>Locale</code> you construct, you must query those resources. For + * example, ask the <code>NumberFormat</code> for the locales it supports + * using its <code>getAvailableLocales</code> method. + * <BR><STRONG>Note:</STRONG> When you ask for a resource for a particular + * locale, you get back the best available match, not necessarily + * precisely what you asked for. For more information, look at + * <code>ResourceBundle</code>. + * + * <P> + * The <code>Locale</code> class provides a number of convenient constants + * that you can use to create <code>Locale</code> objects for commonly used + * locales. For example, the following refers to a <code>Locale</code> object + * for the United States: + * \htmlonly<blockquote>\endhtmlonly + * <pre> + * Locale::getUS() + * </pre> + * \htmlonly</blockquote>\endhtmlonly + * + * <P> + * Once you've created a <code>Locale</code> you can query it for information about + * itself. Use <code>getCountry</code> to get the ISO Country Code and + * <code>getLanguage</code> to get the ISO Language Code. You can + * use <code>getDisplayCountry</code> to get the + * name of the country suitable for displaying to the user. Similarly, + * you can use <code>getDisplayLanguage</code> to get the name of + * the language suitable for displaying to the user. Interestingly, + * the <code>getDisplayXXX</code> methods are themselves locale-sensitive + * and have two versions: one that uses the default locale and one + * that takes a locale as an argument and displays the name or country in + * a language appropriate to that locale. + * + * <P> + * ICU provides a number of classes that perform locale-sensitive + * operations. For example, the <code>NumberFormat</code> class formats + * numbers, currency, or percentages in a locale-sensitive manner. Classes + * such as <code>NumberFormat</code> have a number of convenience methods + * for creating a default object of that type. For example, the + * <code>NumberFormat</code> class provides these three convenience methods + * for creating a default <code>NumberFormat</code> object: + * \htmlonly<blockquote>\endhtmlonly + * <pre> + * UErrorCode success = U_ZERO_ERROR; + * Locale myLocale; + * NumberFormat *nf; + * + * nf = NumberFormat::createInstance( success ); delete nf; + * nf = NumberFormat::createCurrencyInstance( success ); delete nf; + * nf = NumberFormat::createPercentInstance( success ); delete nf; + * </pre> + * \htmlonly</blockquote>\endhtmlonly + * Each of these methods has two variants; one with an explicit locale + * and one without; the latter using the default locale. + * \htmlonly<blockquote>\endhtmlonly + * <pre> + * nf = NumberFormat::createInstance( myLocale, success ); delete nf; + * nf = NumberFormat::createCurrencyInstance( myLocale, success ); delete nf; + * nf = NumberFormat::createPercentInstance( myLocale, success ); delete nf; + * </pre> + * \htmlonly</blockquote>\endhtmlonly + * A <code>Locale</code> is the mechanism for identifying the kind of object + * (<code>NumberFormat</code>) that you would like to get. The locale is + * <STRONG>just</STRONG> a mechanism for identifying objects, + * <STRONG>not</STRONG> a container for the objects themselves. + * + * <P> + * Each class that performs locale-sensitive operations allows you + * to get all the available objects of that type. You can sift + * through these objects by language, country, or variant, + * and use the display names to present a menu to the user. + * For example, you can create a menu of all the collation objects + * suitable for a given language. Such classes implement these + * three class methods: + * \htmlonly<blockquote>\endhtmlonly + * <pre> + * static Locale* getAvailableLocales(int32_t& numLocales) + * static UnicodeString& getDisplayName(const Locale& objectLocale, + * const Locale& displayLocale, + * UnicodeString& displayName) + * static UnicodeString& getDisplayName(const Locale& objectLocale, + * UnicodeString& displayName) + * </pre> + * \htmlonly</blockquote>\endhtmlonly + * + * @stable ICU 2.0 + * @see ResourceBundle + */ +class U_COMMON_API Locale : public UObject { +public: + /** Useful constant for the Root locale. @stable ICU 4.4 */ + static const Locale &U_EXPORT2 getRoot(void); + /** Useful constant for this language. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getEnglish(void); + /** Useful constant for this language. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getFrench(void); + /** Useful constant for this language. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getGerman(void); + /** Useful constant for this language. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getItalian(void); + /** Useful constant for this language. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getJapanese(void); + /** Useful constant for this language. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getKorean(void); + /** Useful constant for this language. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getChinese(void); + /** Useful constant for this language. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getSimplifiedChinese(void); + /** Useful constant for this language. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getTraditionalChinese(void); + + /** Useful constant for this country/region. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getFrance(void); + /** Useful constant for this country/region. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getGermany(void); + /** Useful constant for this country/region. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getItaly(void); + /** Useful constant for this country/region. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getJapan(void); + /** Useful constant for this country/region. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getKorea(void); + /** Useful constant for this country/region. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getChina(void); + /** Useful constant for this country/region. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getPRC(void); + /** Useful constant for this country/region. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getTaiwan(void); + /** Useful constant for this country/region. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getUK(void); + /** Useful constant for this country/region. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getUS(void); + /** Useful constant for this country/region. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getCanada(void); + /** Useful constant for this country/region. @stable ICU 2.0 */ + static const Locale &U_EXPORT2 getCanadaFrench(void); + + + /** + * Construct a default locale object, a Locale for the default locale ID. + * + * @see getDefault + * @see uloc_getDefault + * @stable ICU 2.0 + */ + Locale(); + + /** + * Construct a locale from language, country, variant. + * If an error occurs, then the constructed object will be "bogus" + * (isBogus() will return TRUE). + * + * @param language Lowercase two-letter or three-letter ISO-639 code. + * This parameter can instead be an ICU style C locale (e.g. "en_US"), + * but the other parameters must not be used. + * This parameter can be NULL; if so, + * the locale is initialized to match the current default locale. + * (This is the same as using the default constructor.) + * Please note: The Java Locale class does NOT accept the form + * 'new Locale("en_US")' but only 'new Locale("en","US")' + * + * @param country Uppercase two-letter ISO-3166 code. (optional) + * @param variant Uppercase vendor and browser specific code. See class + * description. (optional) + * @param keywordsAndValues A string consisting of keyword/values pairs, such as + * "collation=phonebook;currency=euro" + * + * @see getDefault + * @see uloc_getDefault + * @stable ICU 2.0 + */ + Locale( const char * language, + const char * country = 0, + const char * variant = 0, + const char * keywordsAndValues = 0); + + /** + * Initializes a Locale object from another Locale object. + * + * @param other The Locale object being copied in. + * @stable ICU 2.0 + */ + Locale(const Locale& other); + + + /** + * Destructor + * @stable ICU 2.0 + */ + virtual ~Locale() ; + + /** + * Replaces the entire contents of *this with the specified value. + * + * @param other The Locale object being copied in. + * @return *this + * @stable ICU 2.0 + */ + Locale& operator=(const Locale& other); + + /** + * Checks if two locale keys are the same. + * + * @param other The locale key object to be compared with this. + * @return True if the two locale keys are the same, false otherwise. + * @stable ICU 2.0 + */ + UBool operator==(const Locale& other) const; + + /** + * Checks if two locale keys are not the same. + * + * @param other The locale key object to be compared with this. + * @return True if the two locale keys are not the same, false + * otherwise. + * @stable ICU 2.0 + */ + UBool operator!=(const Locale& other) const; + + /** + * Clone this object. + * Clones can be used concurrently in multiple threads. + * If an error occurs, then NULL is returned. + * The caller must delete the clone. + * + * @return a clone of this object + * + * @see getDynamicClassID + * @stable ICU 2.8 + */ + Locale *clone() const; + +#ifndef U_HIDE_SYSTEM_API + /** + * Common methods of getting the current default Locale. Used for the + * presentation: menus, dialogs, etc. Generally set once when your applet or + * application is initialized, then never reset. (If you do reset the + * default locale, you probably want to reload your GUI, so that the change + * is reflected in your interface.) + * + * More advanced programs will allow users to use different locales for + * different fields, e.g. in a spreadsheet. + * + * Note that the initial setting will match the host system. + * @return a reference to the Locale object for the default locale ID + * @system + * @stable ICU 2.0 + */ + static const Locale& U_EXPORT2 getDefault(void); + + /** + * Sets the default. Normally set once at the beginning of a process, + * then never reset. + * setDefault() only changes ICU's default locale ID, <strong>not</strong> + * the default locale ID of the runtime environment. + * + * @param newLocale Locale to set to. If NULL, set to the value obtained + * from the runtime environment. + * @param success The error code. + * @system + * @stable ICU 2.0 + */ + static void U_EXPORT2 setDefault(const Locale& newLocale, + UErrorCode& success); +#endif /* U_HIDE_SYSTEM_API */ + + /** + * Creates a locale which has had minimal canonicalization + * as per uloc_getName(). + * @param name The name to create from. If name is null, + * the default Locale is used. + * @return new locale object + * @stable ICU 2.0 + * @see uloc_getName + */ + static Locale U_EXPORT2 createFromName(const char *name); + + /** + * Creates a locale from the given string after canonicalizing + * the string by calling uloc_canonicalize(). + * @param name the locale ID to create from. Must not be NULL. + * @return a new locale object corresponding to the given name + * @stable ICU 3.0 + * @see uloc_canonicalize + */ + static Locale U_EXPORT2 createCanonical(const char* name); + + /** + * Returns the locale's ISO-639 language code. + * @return An alias to the code + * @stable ICU 2.0 + */ + inline const char * getLanguage( ) const; + + /** + * Returns the locale's ISO-15924 abbreviation script code. + * @return An alias to the code + * @see uscript_getShortName + * @see uscript_getCode + * @stable ICU 2.8 + */ + inline const char * getScript( ) const; + + /** + * Returns the locale's ISO-3166 country code. + * @return An alias to the code + * @stable ICU 2.0 + */ + inline const char * getCountry( ) const; + + /** + * Returns the locale's variant code. + * @return An alias to the code + * @stable ICU 2.0 + */ + inline const char * getVariant( ) const; + + /** + * Returns the programmatic name of the entire locale, with the language, + * country and variant separated by underbars. If a field is missing, up + * to two leading underbars will occur. Example: "en", "de_DE", "en_US_WIN", + * "de__POSIX", "fr__MAC", "__MAC", "_MT", "_FR_EURO" + * @return A pointer to "name". + * @stable ICU 2.0 + */ + inline const char * getName() const; + + /** + * Returns the programmatic name of the entire locale as getName() would return, + * but without keywords. + * @return A pointer to "name". + * @see getName + * @stable ICU 2.8 + */ + const char * getBaseName() const; + + + /** + * Gets the list of keywords for the specified locale. + * + * @param status the status code + * @return pointer to StringEnumeration class, or NULL if there are no keywords. + * Client must dispose of it by calling delete. + * @stable ICU 2.8 + */ + StringEnumeration * createKeywords(UErrorCode &status) const; + + /** + * Gets the value for a keyword. + * + * @param keywordName name of the keyword for which we want the value. Case insensitive. + * @param buffer The buffer to receive the keyword value. + * @param bufferCapacity The capacity of receiving buffer + * @param status Returns any error information while performing this operation. + * @return the length of the keyword value + * + * @stable ICU 2.8 + */ + int32_t getKeywordValue(const char* keywordName, char *buffer, int32_t bufferCapacity, UErrorCode &status) const; + + /** + * Sets or removes the value for a keyword. + * + * For removing all keywords, use getBaseName(), + * and construct a new Locale if it differs from getName(). + * + * @param keywordName name of the keyword to be set. Case insensitive. + * @param keywordValue value of the keyword to be set. If 0-length or + * NULL, will result in the keyword being removed. No error is given if + * that keyword does not exist. + * @param status Returns any error information while performing this operation. + * + * @stable ICU 49 + */ + void setKeywordValue(const char* keywordName, const char* keywordValue, UErrorCode &status); + + /** + * returns the locale's three-letter language code, as specified + * in ISO draft standard ISO-639-2. + * @return An alias to the code, or an empty string + * @stable ICU 2.0 + */ + const char * getISO3Language() const; + + /** + * Fills in "name" with the locale's three-letter ISO-3166 country code. + * @return An alias to the code, or an empty string + * @stable ICU 2.0 + */ + const char * getISO3Country() const; + + /** + * Returns the Windows LCID value corresponding to this locale. + * This value is stored in the resource data for the locale as a one-to-four-digit + * hexadecimal number. If the resource is missing, in the wrong format, or + * there is no Windows LCID value that corresponds to this locale, returns 0. + * @stable ICU 2.0 + */ + uint32_t getLCID(void) const; + + /** + * Returns whether this locale's script is written right-to-left. + * If there is no script subtag, then the likely script is used, see uloc_addLikelySubtags(). + * If no likely script is known, then FALSE is returned. + * + * A script is right-to-left according to the CLDR script metadata + * which corresponds to whether the script's letters have Bidi_Class=R or AL. + * + * Returns TRUE for "ar" and "en-Hebr", FALSE for "zh" and "fa-Cyrl". + * + * @return TRUE if the locale's script is written right-to-left + * @stable ICU 54 + */ + UBool isRightToLeft() const; + + /** + * Fills in "dispLang" with the name of this locale's language in a format suitable for + * user display in the default locale. For example, if the locale's language code is + * "fr" and the default locale's language code is "en", this function would set + * dispLang to "French". + * @param dispLang Receives the language's display name. + * @return A reference to "dispLang". + * @stable ICU 2.0 + */ + UnicodeString& getDisplayLanguage(UnicodeString& dispLang) const; + + /** + * Fills in "dispLang" with the name of this locale's language in a format suitable for + * user display in the locale specified by "displayLocale". For example, if the locale's + * language code is "en" and displayLocale's language code is "fr", this function would set + * dispLang to "Anglais". + * @param displayLocale Specifies the locale to be used to display the name. In other words, + * if the locale's language code is "en", passing Locale::getFrench() for + * displayLocale would result in "Anglais", while passing Locale::getGerman() + * for displayLocale would result in "Englisch". + * @param dispLang Receives the language's display name. + * @return A reference to "dispLang". + * @stable ICU 2.0 + */ + UnicodeString& getDisplayLanguage( const Locale& displayLocale, + UnicodeString& dispLang) const; + + /** + * Fills in "dispScript" with the name of this locale's script in a format suitable + * for user display in the default locale. For example, if the locale's script code + * is "LATN" and the default locale's language code is "en", this function would set + * dispScript to "Latin". + * @param dispScript Receives the scripts's display name. + * @return A reference to "dispScript". + * @stable ICU 2.8 + */ + UnicodeString& getDisplayScript( UnicodeString& dispScript) const; + + /** + * Fills in "dispScript" with the name of this locale's country in a format suitable + * for user display in the locale specified by "displayLocale". For example, if the locale's + * script code is "LATN" and displayLocale's language code is "en", this function would set + * dispScript to "Latin". + * @param displayLocale Specifies the locale to be used to display the name. In other + * words, if the locale's script code is "LATN", passing + * Locale::getFrench() for displayLocale would result in "", while + * passing Locale::getGerman() for displayLocale would result in + * "". + * @param dispScript Receives the scripts's display name. + * @return A reference to "dispScript". + * @stable ICU 2.8 + */ + UnicodeString& getDisplayScript( const Locale& displayLocale, + UnicodeString& dispScript) const; + + /** + * Fills in "dispCountry" with the name of this locale's country in a format suitable + * for user display in the default locale. For example, if the locale's country code + * is "FR" and the default locale's language code is "en", this function would set + * dispCountry to "France". + * @param dispCountry Receives the country's display name. + * @return A reference to "dispCountry". + * @stable ICU 2.0 + */ + UnicodeString& getDisplayCountry( UnicodeString& dispCountry) const; + + /** + * Fills in "dispCountry" with the name of this locale's country in a format suitable + * for user display in the locale specified by "displayLocale". For example, if the locale's + * country code is "US" and displayLocale's language code is "fr", this function would set + * dispCountry to "États-Unis". + * @param displayLocale Specifies the locale to be used to display the name. In other + * words, if the locale's country code is "US", passing + * Locale::getFrench() for displayLocale would result in "États-Unis", while + * passing Locale::getGerman() for displayLocale would result in + * "Vereinigte Staaten". + * @param dispCountry Receives the country's display name. + * @return A reference to "dispCountry". + * @stable ICU 2.0 + */ + UnicodeString& getDisplayCountry( const Locale& displayLocale, + UnicodeString& dispCountry) const; + + /** + * Fills in "dispVar" with the name of this locale's variant code in a format suitable + * for user display in the default locale. + * @param dispVar Receives the variant's name. + * @return A reference to "dispVar". + * @stable ICU 2.0 + */ + UnicodeString& getDisplayVariant( UnicodeString& dispVar) const; + + /** + * Fills in "dispVar" with the name of this locale's variant code in a format + * suitable for user display in the locale specified by "displayLocale". + * @param displayLocale Specifies the locale to be used to display the name. + * @param dispVar Receives the variant's display name. + * @return A reference to "dispVar". + * @stable ICU 2.0 + */ + UnicodeString& getDisplayVariant( const Locale& displayLocale, + UnicodeString& dispVar) const; + + /** + * Fills in "name" with the name of this locale in a format suitable for user display + * in the default locale. This function uses getDisplayLanguage(), getDisplayCountry(), + * and getDisplayVariant() to do its work, and outputs the display name in the format + * "language (country[,variant])". For example, if the default locale is en_US, then + * fr_FR's display name would be "French (France)", and es_MX_Traditional's display name + * would be "Spanish (Mexico,Traditional)". + * @param name Receives the locale's display name. + * @return A reference to "name". + * @stable ICU 2.0 + */ + UnicodeString& getDisplayName( UnicodeString& name) const; + + /** + * Fills in "name" with the name of this locale in a format suitable for user display + * in the locale specified by "displayLocale". This function uses getDisplayLanguage(), + * getDisplayCountry(), and getDisplayVariant() to do its work, and outputs the display + * name in the format "language (country[,variant])". For example, if displayLocale is + * fr_FR, then en_US's display name would be "Anglais (États-Unis)", and no_NO_NY's + * display name would be "norvégien (Norvège,NY)". + * @param displayLocale Specifies the locale to be used to display the name. + * @param name Receives the locale's display name. + * @return A reference to "name". + * @stable ICU 2.0 + */ + UnicodeString& getDisplayName( const Locale& displayLocale, + UnicodeString& name) const; + + /** + * Generates a hash code for the locale. + * @stable ICU 2.0 + */ + int32_t hashCode(void) const; + + /** + * Sets the locale to bogus + * A bogus locale represents a non-existing locale associated + * with services that can be instantiated from non-locale data + * in addition to locale (for example, collation can be + * instantiated from a locale and from a rule set). + * @stable ICU 2.1 + */ + void setToBogus(); + + /** + * Gets the bogus state. Locale object can be bogus if it doesn't exist + * @return FALSE if it is a real locale, TRUE if it is a bogus locale + * @stable ICU 2.1 + */ + UBool isBogus(void) const; + + /** + * Returns a list of all installed locales. + * @param count Receives the number of locales in the list. + * @return A pointer to an array of Locale objects. This array is the list + * of all locales with installed resource files. The called does NOT + * get ownership of this list, and must NOT delete it. + * @stable ICU 2.0 + */ + static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count); + + /** + * Gets a list of all available 2-letter country codes defined in ISO 3166. This is a + * pointer to an array of pointers to arrays of char. All of these pointers are + * owned by ICU-- do not delete them, and do not write through them. The array is + * terminated with a null pointer. + * @return a list of all available country codes + * @stable ICU 2.0 + */ + static const char* const* U_EXPORT2 getISOCountries(); + + /** + * Gets a list of all available language codes defined in ISO 639. This is a pointer + * to an array of pointers to arrays of char. All of these pointers are owned + * by ICU-- do not delete them, and do not write through them. The array is + * terminated with a null pointer. + * @return a list of all available language codes + * @stable ICU 2.0 + */ + static const char* const* U_EXPORT2 getISOLanguages(); + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.2 + */ + static UClassID U_EXPORT2 getStaticClassID(); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.2 + */ + virtual UClassID getDynamicClassID() const; + +protected: /* only protected for testing purposes. DO NOT USE. */ +#ifndef U_HIDE_INTERNAL_API + /** + * Set this from a single POSIX style locale string. + * @internal + */ + void setFromPOSIXID(const char *posixID); +#endif /* U_HIDE_INTERNAL_API */ + +private: + /** + * Initialize the locale object with a new name. + * Was deprecated - used in implementation - moved internal + * + * @param cLocaleID The new locale name. + * @param canonicalize whether to call uloc_canonicalize on cLocaleID + */ + Locale& init(const char* cLocaleID, UBool canonicalize); + + /* + * Internal constructor to allow construction of a locale object with + * NO side effects. (Default constructor tries to get + * the default locale.) + */ + enum ELocaleType { + eBOGUS + }; + Locale(ELocaleType); + + /** + * Initialize the locale cache for commonly used locales + */ + static Locale *getLocaleCache(void); + + char language[ULOC_LANG_CAPACITY]; + char script[ULOC_SCRIPT_CAPACITY]; + char country[ULOC_COUNTRY_CAPACITY]; + int32_t variantBegin; + char* fullName; + char fullNameBuffer[ULOC_FULLNAME_CAPACITY]; + // name without keywords + char* baseName; + void initBaseName(UErrorCode& status); + + UBool fIsBogus; + + static const Locale &getLocale(int locid); + + /** + * A friend to allow the default locale to be set by either the C or C++ API. + * @internal + */ + friend Locale *locale_set_default_internal(const char *, UErrorCode& status); + + /** + * @internal + */ + friend void U_CALLCONV locale_available_init(); +}; + +inline UBool +Locale::operator!=(const Locale& other) const +{ + return !operator==(other); +} + +inline const char * +Locale::getCountry() const +{ + return country; +} + +inline const char * +Locale::getLanguage() const +{ + return language; +} + +inline const char * +Locale::getScript() const +{ + return script; +} + +inline const char * +Locale::getVariant() const +{ + return &baseName[variantBegin]; +} + +inline const char * +Locale::getName() const +{ + return fullName; +} + +inline UBool +Locale::isBogus(void) const { + return fIsBogus; +} + +U_NAMESPACE_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/measfmt.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/measfmt.h new file mode 100755 index 00000000..00f2d47a --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/measfmt.h @@ -0,0 +1,412 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (c) 2004-2016, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* Author: Alan Liu +* Created: April 20, 2004 +* Since: ICU 3.0 +********************************************************************** +*/ +#ifndef MEASUREFORMAT_H +#define MEASUREFORMAT_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/format.h" +#include "unicode/udat.h" + +/** + * \file + * \brief C++ API: Compatibility APIs for measure formatting. + */ + +/** + * Constants for various widths. + * There are 4 widths: Wide, Short, Narrow, Numeric. + * For example, for English, when formatting "3 hours" + * Wide is "3 hours"; short is "3 hrs"; narrow is "3h"; + * formatting "3 hours 17 minutes" as numeric give "3:17" + * @stable ICU 53 + */ +enum UMeasureFormatWidth { + + // Wide, short, and narrow must be first and in this order. + /** + * Spell out measure units. + * @stable ICU 53 + */ + UMEASFMT_WIDTH_WIDE, + + /** + * Abbreviate measure units. + * @stable ICU 53 + */ + UMEASFMT_WIDTH_SHORT, + + /** + * Use symbols for measure units when possible. + * @stable ICU 53 + */ + UMEASFMT_WIDTH_NARROW, + + /** + * Completely omit measure units when possible. For example, format + * '5 hours, 37 minutes' as '5:37' + * @stable ICU 53 + */ + UMEASFMT_WIDTH_NUMERIC, + +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UMeasureFormatWidth value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UMEASFMT_WIDTH_COUNT = 4 +#endif // U_HIDE_DEPRECATED_API +}; +/** @stable ICU 53 */ +typedef enum UMeasureFormatWidth UMeasureFormatWidth; + +U_NAMESPACE_BEGIN + +class Measure; +class MeasureUnit; +class NumberFormat; +class PluralRules; +class MeasureFormatCacheData; +class SharedNumberFormat; +class SharedPluralRules; +class QuantityFormatter; +class SimpleFormatter; +class ListFormatter; +class DateFormat; + +/** + * <p><strong>IMPORTANT:</strong> New users are strongly encouraged to see if + * numberformatter.h fits their use case. Although not deprecated, this header + * is provided for backwards compatibility only. + * + * @see Format + * @author Alan Liu + * @stable ICU 3.0 + */ +class U_I18N_API MeasureFormat : public Format { + public: + using Format::parseObject; + using Format::format; + + /** + * Constructor. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of NumberFormat. + * @stable ICU 53 + */ + MeasureFormat( + const Locale &locale, UMeasureFormatWidth width, UErrorCode &status); + + /** + * Constructor. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of NumberFormat. + * @stable ICU 53 + */ + MeasureFormat( + const Locale &locale, + UMeasureFormatWidth width, + NumberFormat *nfToAdopt, + UErrorCode &status); + + /** + * Copy constructor. + * @stable ICU 3.0 + */ + MeasureFormat(const MeasureFormat &other); + + /** + * Assignment operator. + * @stable ICU 3.0 + */ + MeasureFormat &operator=(const MeasureFormat &rhs); + + /** + * Destructor. + * @stable ICU 3.0 + */ + virtual ~MeasureFormat(); + + /** + * Return true if given Format objects are semantically equal. + * @stable ICU 53 + */ + virtual UBool operator==(const Format &other) const; + + /** + * Clones this object polymorphically. + * @stable ICU 53 + */ + virtual Format *clone() const; + + /** + * Formats object to produce a string. + * @stable ICU 53 + */ + virtual UnicodeString &format( + const Formattable &obj, + UnicodeString &appendTo, + FieldPosition &pos, + UErrorCode &status) const; + + /** + * Parse a string to produce an object. This implementation sets + * status to U_UNSUPPORTED_ERROR. + * + * @draft ICU 53 + */ + virtual void parseObject( + const UnicodeString &source, + Formattable &reslt, + ParsePosition &pos) const; + + /** + * Formats measure objects to produce a string. An example of such a + * formatted string is 3 meters, 3.5 centimeters. Measure objects appear + * in the formatted string in the same order they appear in the "measures" + * array. The NumberFormat of this object is used only to format the amount + * of the very last measure. The other amounts are formatted with zero + * decimal places while rounding toward zero. + * @param measures array of measure objects. + * @param measureCount the number of measure objects. + * @param appendTo formatted string appended here. + * @param pos the field position. + * @param status the error. + * @return appendTo reference + * + * @stable ICU 53 + */ + UnicodeString &formatMeasures( + const Measure *measures, + int32_t measureCount, + UnicodeString &appendTo, + FieldPosition &pos, + UErrorCode &status) const; + + /** + * Formats a single measure per unit. An example of such a + * formatted string is 3.5 meters per second. + * @param measure The measure object. In above example, 3.5 meters. + * @param perUnit The per unit. In above example, it is + * *MeasureUnit::createSecond(status). + * @param appendTo formatted string appended here. + * @param pos the field position. + * @param status the error. + * @return appendTo reference + * + * @stable ICU 55 + */ + UnicodeString &formatMeasurePerUnit( + const Measure &measure, + const MeasureUnit &perUnit, + UnicodeString &appendTo, + FieldPosition &pos, + UErrorCode &status) const; + + /** + * Gets the display name of the specified {@link MeasureUnit} corresponding to the current + * locale and format width. + * @param unit The unit for which to get a display name. + * @param status the error. + * @return The display name in the locale and width specified in + * {@link MeasureFormat#getInstance}, or null if there is no display name available + * for the specified unit. + * + * @stable ICU 58 + */ + UnicodeString getUnitDisplayName(const MeasureUnit& unit, UErrorCode &status) const; + + + /** + * Return a formatter for CurrencyAmount objects in the given + * locale. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of NumberFormat. + * @param locale desired locale + * @param ec input-output error code + * @return a formatter object, or NULL upon error + * @stable ICU 3.0 + */ + static MeasureFormat* U_EXPORT2 createCurrencyFormat(const Locale& locale, + UErrorCode& ec); + + /** + * Return a formatter for CurrencyAmount objects in the default + * locale. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of NumberFormat. + * @param ec input-output error code + * @return a formatter object, or NULL upon error + * @stable ICU 3.0 + */ + static MeasureFormat* U_EXPORT2 createCurrencyFormat(UErrorCode& ec); + + /** + * Return the class ID for this class. This is useful only for comparing to + * a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . erived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 53 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This + * method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() + * methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 53 + */ + virtual UClassID getDynamicClassID(void) const; + + protected: + /** + * Default constructor. + * @stable ICU 3.0 + */ + MeasureFormat(); + +#ifndef U_HIDE_INTERNAL_API + + /** + * ICU use only. + * Initialize or change MeasureFormat class from subclass. + * @internal. + */ + void initMeasureFormat( + const Locale &locale, + UMeasureFormatWidth width, + NumberFormat *nfToAdopt, + UErrorCode &status); + /** + * ICU use only. + * Allows subclass to change locale. Note that this method also changes + * the NumberFormat object. Returns TRUE if locale changed; FALSE if no + * change was made. + * @internal. + */ + UBool setMeasureFormatLocale(const Locale &locale, UErrorCode &status); + + /** + * ICU use only. + * Let subclass change NumberFormat. + * @internal. + */ + void adoptNumberFormat(NumberFormat *nfToAdopt, UErrorCode &status); + + /** + * ICU use only. + * @internal. + */ + const NumberFormat &getNumberFormat() const; + + /** + * ICU use only. + * @internal. + */ + const PluralRules &getPluralRules() const; + + /** + * ICU use only. + * @internal. + */ + Locale getLocale(UErrorCode &status) const; + + /** + * ICU use only. + * @internal. + */ + const char *getLocaleID(UErrorCode &status) const; + +#endif /* U_HIDE_INTERNAL_API */ + + private: + const MeasureFormatCacheData *cache; + const SharedNumberFormat *numberFormat; + const SharedPluralRules *pluralRules; + UMeasureFormatWidth width; + + // Declared outside of MeasureFormatSharedData because ListFormatter + // objects are relatively cheap to copy; therefore, they don't need to be + // shared across instances. + ListFormatter *listFormatter; + + const SimpleFormatter *getFormatterOrNull( + const MeasureUnit &unit, UMeasureFormatWidth width, int32_t index) const; + + const SimpleFormatter *getFormatter( + const MeasureUnit &unit, UMeasureFormatWidth width, int32_t index, + UErrorCode &errorCode) const; + + const SimpleFormatter *getPluralFormatter( + const MeasureUnit &unit, UMeasureFormatWidth width, int32_t index, + UErrorCode &errorCode) const; + + const SimpleFormatter *getPerFormatter( + UMeasureFormatWidth width, + UErrorCode &status) const; + + int32_t withPerUnitAndAppend( + const UnicodeString &formatted, + const MeasureUnit &perUnit, + UnicodeString &appendTo, + UErrorCode &status) const; + + UnicodeString &formatMeasure( + const Measure &measure, + const NumberFormat &nf, + UnicodeString &appendTo, + FieldPosition &pos, + UErrorCode &status) const; + + UnicodeString &formatMeasuresSlowTrack( + const Measure *measures, + int32_t measureCount, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& status) const; + + UnicodeString &formatNumeric( + const Formattable *hms, // always length 3: [0] is hour; [1] is + // minute; [2] is second. + int32_t bitMap, // 1=hour set, 2=minute set, 4=second set + UnicodeString &appendTo, + UErrorCode &status) const; + + UnicodeString &formatNumeric( + UDate date, + const DateFormat &dateFmt, + UDateFormatField smallestField, + const Formattable &smallestAmount, + UnicodeString &appendTo, + UErrorCode &status) const; +}; + +U_NAMESPACE_END + +#endif // #if !UCONFIG_NO_FORMATTING +#endif // #ifndef MEASUREFORMAT_H diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/measunit.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/measunit.h new file mode 100755 index 00000000..95597244 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/measunit.h @@ -0,0 +1,1341 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (c) 2004-2016, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* Author: Alan Liu +* Created: April 26, 2004 +* Since: ICU 3.0 +********************************************************************** +*/ +#ifndef __MEASUREUNIT_H__ +#define __MEASUREUNIT_H__ + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/unistr.h" + +/** + * \file + * \brief C++ API: A unit for measuring a quantity. + */ + +U_NAMESPACE_BEGIN + +class StringEnumeration; + +/** + * A unit such as length, mass, volume, currency, etc. A unit is + * coupled with a numeric amount to produce a Measure. + * + * @author Alan Liu + * @stable ICU 3.0 + */ +class U_I18N_API MeasureUnit: public UObject { + public: + + /** + * Default constructor. + * Populates the instance with the base dimensionless unit. + * @stable ICU 3.0 + */ + MeasureUnit(); + + /** + * Copy constructor. + * @stable ICU 3.0 + */ + MeasureUnit(const MeasureUnit &other); + + /** + * Assignment operator. + * @stable ICU 3.0 + */ + MeasureUnit &operator=(const MeasureUnit &other); + + /** + * Returns a polymorphic clone of this object. The result will + * have the same class as returned by getDynamicClassID(). + * @stable ICU 3.0 + */ + virtual UObject* clone() const; + + /** + * Destructor + * @stable ICU 3.0 + */ + virtual ~MeasureUnit(); + + /** + * Equality operator. Return true if this object is equal + * to the given object. + * @stable ICU 3.0 + */ + virtual UBool operator==(const UObject& other) const; + + /** + * Inequality operator. Return true if this object is not equal + * to the given object. + * @stable ICU 53 + */ + UBool operator!=(const UObject& other) const { + return !(*this == other); + } + + /** + * Get the type. + * @stable ICU 53 + */ + const char *getType() const; + + /** + * Get the sub type. + * @stable ICU 53 + */ + const char *getSubtype() const; + + /** + * getAvailable gets all of the available units. + * If there are too many units to fit into destCapacity then the + * error code is set to U_BUFFER_OVERFLOW_ERROR. + * + * @param destArray destination buffer. + * @param destCapacity number of MeasureUnit instances available at dest. + * @param errorCode ICU error code. + * @return number of available units. + * @stable ICU 53 + */ + static int32_t getAvailable( + MeasureUnit *destArray, + int32_t destCapacity, + UErrorCode &errorCode); + + /** + * getAvailable gets all of the available units for a specific type. + * If there are too many units to fit into destCapacity then the + * error code is set to U_BUFFER_OVERFLOW_ERROR. + * + * @param type the type + * @param destArray destination buffer. + * @param destCapacity number of MeasureUnit instances available at dest. + * @param errorCode ICU error code. + * @return number of available units for type. + * @stable ICU 53 + */ + static int32_t getAvailable( + const char *type, + MeasureUnit *destArray, + int32_t destCapacity, + UErrorCode &errorCode); + + /** + * getAvailableTypes gets all of the available types. Caller owns the + * returned StringEnumeration and must delete it when finished using it. + * + * @param errorCode ICU error code. + * @return the types. + * @stable ICU 53 + */ + static StringEnumeration* getAvailableTypes(UErrorCode &errorCode); + + /** + * Return the class ID for this class. This is useful only for comparing to + * a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . Derived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 53 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This + * method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() + * methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 53 + */ + virtual UClassID getDynamicClassID(void) const; + +#ifndef U_HIDE_INTERNAL_API + /** + * ICU use only. + * Returns associated array index for this measure unit. Only valid for + * non-currency measure units. + * @internal + */ + int32_t getIndex() const; + + /** + * ICU use only. + * Returns maximum value from getIndex plus 1. + * @internal + */ + static int32_t getIndexCount(); + + /** + * ICU use only. + * @return the unit.getIndex() of the unit which has this unit.getType() and unit.getSubtype(), + * or a negative value if there is no such unit + * @internal + */ + static int32_t internalGetIndexForTypeAndSubtype(const char *type, const char *subtype); + + /** + * ICU use only. + * @internal + */ + static MeasureUnit resolveUnitPerUnit( + const MeasureUnit &unit, const MeasureUnit &perUnit, bool* isResolved); +#endif /* U_HIDE_INTERNAL_API */ + +// All code between the "Start generated createXXX methods" comment and +// the "End generated createXXX methods" comment is auto generated code +// and must not be edited manually. For instructions on how to correctly +// update this code, refer to: +// http://site.icu-project.org/design/formatting/measureformat/updating-measure-unit +// +// Start generated createXXX methods + + /** + * Returns unit of acceleration: g-force. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createGForce(UErrorCode &status); + + /** + * Returns unit of acceleration: meter-per-second-squared. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createMeterPerSecondSquared(UErrorCode &status); + + /** + * Returns unit of angle: arc-minute. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createArcMinute(UErrorCode &status); + + /** + * Returns unit of angle: arc-second. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createArcSecond(UErrorCode &status); + + /** + * Returns unit of angle: degree. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createDegree(UErrorCode &status); + + /** + * Returns unit of angle: radian. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createRadian(UErrorCode &status); + + /** + * Returns unit of angle: revolution. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 56 + */ + static MeasureUnit *createRevolutionAngle(UErrorCode &status); + + /** + * Returns unit of area: acre. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createAcre(UErrorCode &status); + + /** + * Returns unit of area: hectare. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createHectare(UErrorCode &status); + + /** + * Returns unit of area: square-centimeter. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createSquareCentimeter(UErrorCode &status); + + /** + * Returns unit of area: square-foot. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createSquareFoot(UErrorCode &status); + + /** + * Returns unit of area: square-inch. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createSquareInch(UErrorCode &status); + + /** + * Returns unit of area: square-kilometer. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createSquareKilometer(UErrorCode &status); + + /** + * Returns unit of area: square-meter. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createSquareMeter(UErrorCode &status); + + /** + * Returns unit of area: square-mile. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createSquareMile(UErrorCode &status); + + /** + * Returns unit of area: square-yard. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createSquareYard(UErrorCode &status); + + /** + * Returns unit of concentr: karat. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createKarat(UErrorCode &status); + + /** + * Returns unit of concentr: milligram-per-deciliter. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 57 + */ + static MeasureUnit *createMilligramPerDeciliter(UErrorCode &status); + + /** + * Returns unit of concentr: millimole-per-liter. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 57 + */ + static MeasureUnit *createMillimolePerLiter(UErrorCode &status); + + /** + * Returns unit of concentr: part-per-million. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 57 + */ + static MeasureUnit *createPartPerMillion(UErrorCode &status); + + /** + * Returns unit of consumption: liter-per-100kilometers. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 56 + */ + static MeasureUnit *createLiterPer100Kilometers(UErrorCode &status); + + /** + * Returns unit of consumption: liter-per-kilometer. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createLiterPerKilometer(UErrorCode &status); + + /** + * Returns unit of consumption: mile-per-gallon. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createMilePerGallon(UErrorCode &status); + + /** + * Returns unit of consumption: mile-per-gallon-imperial. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 57 + */ + static MeasureUnit *createMilePerGallonImperial(UErrorCode &status); + + /* + * The following were draft ICU 58, but have been withdrawn: + * static MeasureUnit *createEast(UErrorCode &status); + * static MeasureUnit *createNorth(UErrorCode &status); + * static MeasureUnit *createSouth(UErrorCode &status); + * static MeasureUnit *createWest(UErrorCode &status); + */ + + /** + * Returns unit of digital: bit. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createBit(UErrorCode &status); + + /** + * Returns unit of digital: byte. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createByte(UErrorCode &status); + + /** + * Returns unit of digital: gigabit. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createGigabit(UErrorCode &status); + + /** + * Returns unit of digital: gigabyte. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createGigabyte(UErrorCode &status); + + /** + * Returns unit of digital: kilobit. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createKilobit(UErrorCode &status); + + /** + * Returns unit of digital: kilobyte. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createKilobyte(UErrorCode &status); + + /** + * Returns unit of digital: megabit. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createMegabit(UErrorCode &status); + + /** + * Returns unit of digital: megabyte. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createMegabyte(UErrorCode &status); + + /** + * Returns unit of digital: terabit. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createTerabit(UErrorCode &status); + + /** + * Returns unit of digital: terabyte. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createTerabyte(UErrorCode &status); + + /** + * Returns unit of duration: century. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 56 + */ + static MeasureUnit *createCentury(UErrorCode &status); + + /** + * Returns unit of duration: day. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createDay(UErrorCode &status); + + /** + * Returns unit of duration: hour. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createHour(UErrorCode &status); + + /** + * Returns unit of duration: microsecond. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createMicrosecond(UErrorCode &status); + + /** + * Returns unit of duration: millisecond. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createMillisecond(UErrorCode &status); + + /** + * Returns unit of duration: minute. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createMinute(UErrorCode &status); + + /** + * Returns unit of duration: month. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createMonth(UErrorCode &status); + + /** + * Returns unit of duration: nanosecond. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createNanosecond(UErrorCode &status); + + /** + * Returns unit of duration: second. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createSecond(UErrorCode &status); + + /** + * Returns unit of duration: week. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createWeek(UErrorCode &status); + + /** + * Returns unit of duration: year. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createYear(UErrorCode &status); + + /** + * Returns unit of electric: ampere. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createAmpere(UErrorCode &status); + + /** + * Returns unit of electric: milliampere. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createMilliampere(UErrorCode &status); + + /** + * Returns unit of electric: ohm. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createOhm(UErrorCode &status); + + /** + * Returns unit of electric: volt. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createVolt(UErrorCode &status); + + /** + * Returns unit of energy: calorie. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createCalorie(UErrorCode &status); + + /** + * Returns unit of energy: foodcalorie. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createFoodcalorie(UErrorCode &status); + + /** + * Returns unit of energy: joule. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createJoule(UErrorCode &status); + + /** + * Returns unit of energy: kilocalorie. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createKilocalorie(UErrorCode &status); + + /** + * Returns unit of energy: kilojoule. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createKilojoule(UErrorCode &status); + + /** + * Returns unit of energy: kilowatt-hour. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createKilowattHour(UErrorCode &status); + + /** + * Returns unit of frequency: gigahertz. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createGigahertz(UErrorCode &status); + + /** + * Returns unit of frequency: hertz. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createHertz(UErrorCode &status); + + /** + * Returns unit of frequency: kilohertz. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createKilohertz(UErrorCode &status); + + /** + * Returns unit of frequency: megahertz. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createMegahertz(UErrorCode &status); + + /** + * Returns unit of length: astronomical-unit. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createAstronomicalUnit(UErrorCode &status); + + /** + * Returns unit of length: centimeter. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createCentimeter(UErrorCode &status); + + /** + * Returns unit of length: decimeter. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createDecimeter(UErrorCode &status); + + /** + * Returns unit of length: fathom. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createFathom(UErrorCode &status); + + /** + * Returns unit of length: foot. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createFoot(UErrorCode &status); + + /** + * Returns unit of length: furlong. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createFurlong(UErrorCode &status); + + /** + * Returns unit of length: inch. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createInch(UErrorCode &status); + + /** + * Returns unit of length: kilometer. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createKilometer(UErrorCode &status); + + /** + * Returns unit of length: light-year. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createLightYear(UErrorCode &status); + + /** + * Returns unit of length: meter. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createMeter(UErrorCode &status); + + /** + * Returns unit of length: micrometer. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createMicrometer(UErrorCode &status); + + /** + * Returns unit of length: mile. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createMile(UErrorCode &status); + + /** + * Returns unit of length: mile-scandinavian. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 56 + */ + static MeasureUnit *createMileScandinavian(UErrorCode &status); + + /** + * Returns unit of length: millimeter. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createMillimeter(UErrorCode &status); + + /** + * Returns unit of length: nanometer. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createNanometer(UErrorCode &status); + + /** + * Returns unit of length: nautical-mile. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createNauticalMile(UErrorCode &status); + + /** + * Returns unit of length: parsec. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createParsec(UErrorCode &status); + + /** + * Returns unit of length: picometer. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createPicometer(UErrorCode &status); + + /** + * Returns unit of length: point. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 59 + */ + static MeasureUnit *createPoint(UErrorCode &status); + + /** + * Returns unit of length: yard. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createYard(UErrorCode &status); + + /** + * Returns unit of light: lux. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createLux(UErrorCode &status); + + /** + * Returns unit of mass: carat. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createCarat(UErrorCode &status); + + /** + * Returns unit of mass: gram. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createGram(UErrorCode &status); + + /** + * Returns unit of mass: kilogram. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createKilogram(UErrorCode &status); + + /** + * Returns unit of mass: metric-ton. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createMetricTon(UErrorCode &status); + + /** + * Returns unit of mass: microgram. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createMicrogram(UErrorCode &status); + + /** + * Returns unit of mass: milligram. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createMilligram(UErrorCode &status); + + /** + * Returns unit of mass: ounce. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createOunce(UErrorCode &status); + + /** + * Returns unit of mass: ounce-troy. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createOunceTroy(UErrorCode &status); + + /** + * Returns unit of mass: pound. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createPound(UErrorCode &status); + + /** + * Returns unit of mass: stone. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createStone(UErrorCode &status); + + /** + * Returns unit of mass: ton. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createTon(UErrorCode &status); + + /** + * Returns unit of power: gigawatt. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createGigawatt(UErrorCode &status); + + /** + * Returns unit of power: horsepower. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createHorsepower(UErrorCode &status); + + /** + * Returns unit of power: kilowatt. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createKilowatt(UErrorCode &status); + + /** + * Returns unit of power: megawatt. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createMegawatt(UErrorCode &status); + + /** + * Returns unit of power: milliwatt. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createMilliwatt(UErrorCode &status); + + /** + * Returns unit of power: watt. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createWatt(UErrorCode &status); + + /** + * Returns unit of pressure: hectopascal. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createHectopascal(UErrorCode &status); + + /** + * Returns unit of pressure: inch-hg. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createInchHg(UErrorCode &status); + + /** + * Returns unit of pressure: millibar. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createMillibar(UErrorCode &status); + + /** + * Returns unit of pressure: millimeter-of-mercury. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createMillimeterOfMercury(UErrorCode &status); + + /** + * Returns unit of pressure: pound-per-square-inch. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createPoundPerSquareInch(UErrorCode &status); + + /** + * Returns unit of speed: kilometer-per-hour. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createKilometerPerHour(UErrorCode &status); + + /** + * Returns unit of speed: knot. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 56 + */ + static MeasureUnit *createKnot(UErrorCode &status); + + /** + * Returns unit of speed: meter-per-second. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createMeterPerSecond(UErrorCode &status); + + /** + * Returns unit of speed: mile-per-hour. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createMilePerHour(UErrorCode &status); + + /** + * Returns unit of temperature: celsius. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createCelsius(UErrorCode &status); + + /** + * Returns unit of temperature: fahrenheit. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createFahrenheit(UErrorCode &status); + + /** + * Returns unit of temperature: generic. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 56 + */ + static MeasureUnit *createGenericTemperature(UErrorCode &status); + + /** + * Returns unit of temperature: kelvin. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createKelvin(UErrorCode &status); + + /** + * Returns unit of volume: acre-foot. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createAcreFoot(UErrorCode &status); + + /** + * Returns unit of volume: bushel. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createBushel(UErrorCode &status); + + /** + * Returns unit of volume: centiliter. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createCentiliter(UErrorCode &status); + + /** + * Returns unit of volume: cubic-centimeter. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createCubicCentimeter(UErrorCode &status); + + /** + * Returns unit of volume: cubic-foot. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createCubicFoot(UErrorCode &status); + + /** + * Returns unit of volume: cubic-inch. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createCubicInch(UErrorCode &status); + + /** + * Returns unit of volume: cubic-kilometer. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createCubicKilometer(UErrorCode &status); + + /** + * Returns unit of volume: cubic-meter. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createCubicMeter(UErrorCode &status); + + /** + * Returns unit of volume: cubic-mile. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createCubicMile(UErrorCode &status); + + /** + * Returns unit of volume: cubic-yard. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createCubicYard(UErrorCode &status); + + /** + * Returns unit of volume: cup. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createCup(UErrorCode &status); + + /** + * Returns unit of volume: cup-metric. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 56 + */ + static MeasureUnit *createCupMetric(UErrorCode &status); + + /** + * Returns unit of volume: deciliter. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createDeciliter(UErrorCode &status); + + /** + * Returns unit of volume: fluid-ounce. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createFluidOunce(UErrorCode &status); + + /** + * Returns unit of volume: gallon. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createGallon(UErrorCode &status); + + /** + * Returns unit of volume: gallon-imperial. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 57 + */ + static MeasureUnit *createGallonImperial(UErrorCode &status); + + /** + * Returns unit of volume: hectoliter. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createHectoliter(UErrorCode &status); + + /** + * Returns unit of volume: liter. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 53 + */ + static MeasureUnit *createLiter(UErrorCode &status); + + /** + * Returns unit of volume: megaliter. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createMegaliter(UErrorCode &status); + + /** + * Returns unit of volume: milliliter. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createMilliliter(UErrorCode &status); + + /** + * Returns unit of volume: pint. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createPint(UErrorCode &status); + + /** + * Returns unit of volume: pint-metric. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 56 + */ + static MeasureUnit *createPintMetric(UErrorCode &status); + + /** + * Returns unit of volume: quart. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createQuart(UErrorCode &status); + + /** + * Returns unit of volume: tablespoon. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createTablespoon(UErrorCode &status); + + /** + * Returns unit of volume: teaspoon. + * Caller owns returned value and must free it. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createTeaspoon(UErrorCode &status); + + +// End generated createXXX methods + + protected: + +#ifndef U_HIDE_INTERNAL_API + /** + * For ICU use only. + * @internal + */ + void initTime(const char *timeId); + + /** + * For ICU use only. + * @internal + */ + void initCurrency(const char *isoCurrency); + + /** + * For ICU use only. + * @internal + */ + void initNoUnit(const char *subtype); + +#endif /* U_HIDE_INTERNAL_API */ + +private: + int32_t fTypeId; + int32_t fSubTypeId; + char fCurrency[4]; + + MeasureUnit(int32_t typeId, int32_t subTypeId) : fTypeId(typeId), fSubTypeId(subTypeId) { + fCurrency[0] = 0; + } + void setTo(int32_t typeId, int32_t subTypeId); + int32_t getOffset() const; + static MeasureUnit *create(int typeId, int subTypeId, UErrorCode &status); +}; + +U_NAMESPACE_END + +#endif // !UNCONFIG_NO_FORMATTING +#endif // __MEASUREUNIT_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/measure.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/measure.h new file mode 100755 index 00000000..99b7d7a1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/measure.h @@ -0,0 +1,161 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (c) 2004-2015, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* Author: Alan Liu +* Created: April 26, 2004 +* Since: ICU 3.0 +********************************************************************** +*/ +#ifndef __MEASURE_H__ +#define __MEASURE_H__ + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: MeasureUnit object. + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/fmtable.h" + +U_NAMESPACE_BEGIN + +class MeasureUnit; + +/** + * An amount of a specified unit, consisting of a number and a Unit. + * For example, a length measure consists of a number and a length + * unit, such as feet or meters. + * + * <p>Measure objects are formatted by MeasureFormat. + * + * <p>Measure objects are immutable. + * + * @author Alan Liu + * @stable ICU 3.0 + */ +class U_I18N_API Measure: public UObject { + public: + /** + * Construct an object with the given numeric amount and the given + * unit. After this call, the caller must not delete the given + * unit object. + * @param number a numeric object; amount.isNumeric() must be TRUE + * @param adoptedUnit the unit object, which must not be NULL + * @param ec input-output error code. If the amount or the unit + * is invalid, then this will be set to a failing value. + * @stable ICU 3.0 + */ + Measure(const Formattable& number, MeasureUnit* adoptedUnit, + UErrorCode& ec); + + /** + * Copy constructor + * @stable ICU 3.0 + */ + Measure(const Measure& other); + + /** + * Assignment operator + * @stable ICU 3.0 + */ + Measure& operator=(const Measure& other); + + /** + * Return a polymorphic clone of this object. The result will + * have the same class as returned by getDynamicClassID(). + * @stable ICU 3.0 + */ + virtual UObject* clone() const; + + /** + * Destructor + * @stable ICU 3.0 + */ + virtual ~Measure(); + + /** + * Equality operator. Return true if this object is equal + * to the given object. + * @stable ICU 3.0 + */ + UBool operator==(const UObject& other) const; + + /** + * Return a reference to the numeric value of this object. The + * numeric value may be of any numeric type supported by + * Formattable. + * @stable ICU 3.0 + */ + inline const Formattable& getNumber() const; + + /** + * Return a reference to the unit of this object. + * @stable ICU 3.0 + */ + inline const MeasureUnit& getUnit() const; + + /** + * Return the class ID for this class. This is useful only for comparing to + * a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . erived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 53 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This + * method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() + * methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 53 + */ + virtual UClassID getDynamicClassID(void) const; + + protected: + /** + * Default constructor. + * @stable ICU 3.0 + */ + Measure(); + + private: + /** + * The numeric value of this object, e.g. 2.54 or 100. + */ + Formattable number; + + /** + * The unit of this object, e.g., "millimeter" or "JPY". This is + * owned by this object. + */ + MeasureUnit* unit; +}; + +inline const Formattable& Measure::getNumber() const { + return number; +} + +inline const MeasureUnit& Measure::getUnit() const { + return *unit; +} + +U_NAMESPACE_END + +#endif // !UCONFIG_NO_FORMATTING +#endif // __MEASURE_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/messagepattern.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/messagepattern.h new file mode 100755 index 00000000..f28adafe --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/messagepattern.h @@ -0,0 +1,945 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2011-2013, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************* +* file name: messagepattern.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2011mar14 +* created by: Markus W. Scherer +*/ + +#ifndef __MESSAGEPATTERN_H__ +#define __MESSAGEPATTERN_H__ + +/** + * \file + * \brief C++ API: MessagePattern class: Parses and represents ICU MessageFormat patterns. + */ + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/parseerr.h" +#include "unicode/unistr.h" + +/** + * Mode for when an apostrophe starts quoted literal text for MessageFormat output. + * The default is DOUBLE_OPTIONAL unless overridden via uconfig.h + * (UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE). + * <p> + * A pair of adjacent apostrophes always results in a single apostrophe in the output, + * even when the pair is between two single, text-quoting apostrophes. + * <p> + * The following table shows examples of desired MessageFormat.format() output + * with the pattern strings that yield that output. + * <p> + * <table> + * <tr> + * <th>Desired output</th> + * <th>DOUBLE_OPTIONAL</th> + * <th>DOUBLE_REQUIRED</th> + * </tr> + * <tr> + * <td>I see {many}</td> + * <td>I see '{many}'</td> + * <td>(same)</td> + * </tr> + * <tr> + * <td>I said {'Wow!'}</td> + * <td>I said '{''Wow!''}'</td> + * <td>(same)</td> + * </tr> + * <tr> + * <td>I don't know</td> + * <td>I don't know OR<br> I don''t know</td> + * <td>I don''t know</td> + * </tr> + * </table> + * @stable ICU 4.8 + * @see UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE + */ +enum UMessagePatternApostropheMode { + /** + * A literal apostrophe is represented by + * either a single or a double apostrophe pattern character. + * Within a MessageFormat pattern, a single apostrophe only starts quoted literal text + * if it immediately precedes a curly brace {}, + * or a pipe symbol | if inside a choice format, + * or a pound symbol # if inside a plural format. + * <p> + * This is the default behavior starting with ICU 4.8. + * @stable ICU 4.8 + */ + UMSGPAT_APOS_DOUBLE_OPTIONAL, + /** + * A literal apostrophe must be represented by + * a double apostrophe pattern character. + * A single apostrophe always starts quoted literal text. + * <p> + * This is the behavior of ICU 4.6 and earlier, and of the JDK. + * @stable ICU 4.8 + */ + UMSGPAT_APOS_DOUBLE_REQUIRED +}; +/** + * @stable ICU 4.8 + */ +typedef enum UMessagePatternApostropheMode UMessagePatternApostropheMode; + +/** + * MessagePattern::Part type constants. + * @stable ICU 4.8 + */ +enum UMessagePatternPartType { + /** + * Start of a message pattern (main or nested). + * The length is 0 for the top-level message + * and for a choice argument sub-message, otherwise 1 for the '{'. + * The value indicates the nesting level, starting with 0 for the main message. + * <p> + * There is always a later MSG_LIMIT part. + * @stable ICU 4.8 + */ + UMSGPAT_PART_TYPE_MSG_START, + /** + * End of a message pattern (main or nested). + * The length is 0 for the top-level message and + * the last sub-message of a choice argument, + * otherwise 1 for the '}' or (in a choice argument style) the '|'. + * The value indicates the nesting level, starting with 0 for the main message. + * @stable ICU 4.8 + */ + UMSGPAT_PART_TYPE_MSG_LIMIT, + /** + * Indicates a substring of the pattern string which is to be skipped when formatting. + * For example, an apostrophe that begins or ends quoted text + * would be indicated with such a part. + * The value is undefined and currently always 0. + * @stable ICU 4.8 + */ + UMSGPAT_PART_TYPE_SKIP_SYNTAX, + /** + * Indicates that a syntax character needs to be inserted for auto-quoting. + * The length is 0. + * The value is the character code of the insertion character. (U+0027=APOSTROPHE) + * @stable ICU 4.8 + */ + UMSGPAT_PART_TYPE_INSERT_CHAR, + /** + * Indicates a syntactic (non-escaped) # symbol in a plural variant. + * When formatting, replace this part's substring with the + * (value-offset) for the plural argument value. + * The value is undefined and currently always 0. + * @stable ICU 4.8 + */ + UMSGPAT_PART_TYPE_REPLACE_NUMBER, + /** + * Start of an argument. + * The length is 1 for the '{'. + * The value is the ordinal value of the ArgType. Use getArgType(). + * <p> + * This part is followed by either an ARG_NUMBER or ARG_NAME, + * followed by optional argument sub-parts (see UMessagePatternArgType constants) + * and finally an ARG_LIMIT part. + * @stable ICU 4.8 + */ + UMSGPAT_PART_TYPE_ARG_START, + /** + * End of an argument. + * The length is 1 for the '}'. + * The value is the ordinal value of the ArgType. Use getArgType(). + * @stable ICU 4.8 + */ + UMSGPAT_PART_TYPE_ARG_LIMIT, + /** + * The argument number, provided by the value. + * @stable ICU 4.8 + */ + UMSGPAT_PART_TYPE_ARG_NUMBER, + /** + * The argument name. + * The value is undefined and currently always 0. + * @stable ICU 4.8 + */ + UMSGPAT_PART_TYPE_ARG_NAME, + /** + * The argument type. + * The value is undefined and currently always 0. + * @stable ICU 4.8 + */ + UMSGPAT_PART_TYPE_ARG_TYPE, + /** + * The argument style text. + * The value is undefined and currently always 0. + * @stable ICU 4.8 + */ + UMSGPAT_PART_TYPE_ARG_STYLE, + /** + * A selector substring in a "complex" argument style. + * The value is undefined and currently always 0. + * @stable ICU 4.8 + */ + UMSGPAT_PART_TYPE_ARG_SELECTOR, + /** + * An integer value, for example the offset or an explicit selector value + * in a PluralFormat style. + * The part value is the integer value. + * @stable ICU 4.8 + */ + UMSGPAT_PART_TYPE_ARG_INT, + /** + * A numeric value, for example the offset or an explicit selector value + * in a PluralFormat style. + * The part value is an index into an internal array of numeric values; + * use getNumericValue(). + * @stable ICU 4.8 + */ + UMSGPAT_PART_TYPE_ARG_DOUBLE +}; +/** + * @stable ICU 4.8 + */ +typedef enum UMessagePatternPartType UMessagePatternPartType; + +/** + * Argument type constants. + * Returned by Part.getArgType() for ARG_START and ARG_LIMIT parts. + * + * Messages nested inside an argument are each delimited by MSG_START and MSG_LIMIT, + * with a nesting level one greater than the surrounding message. + * @stable ICU 4.8 + */ +enum UMessagePatternArgType { + /** + * The argument has no specified type. + * @stable ICU 4.8 + */ + UMSGPAT_ARG_TYPE_NONE, + /** + * The argument has a "simple" type which is provided by the ARG_TYPE part. + * An ARG_STYLE part might follow that. + * @stable ICU 4.8 + */ + UMSGPAT_ARG_TYPE_SIMPLE, + /** + * The argument is a ChoiceFormat with one or more + * ((ARG_INT | ARG_DOUBLE), ARG_SELECTOR, message) tuples. + * @stable ICU 4.8 + */ + UMSGPAT_ARG_TYPE_CHOICE, + /** + * The argument is a cardinal-number PluralFormat with an optional ARG_INT or ARG_DOUBLE offset + * (e.g., offset:1) + * and one or more (ARG_SELECTOR [explicit-value] message) tuples. + * If the selector has an explicit value (e.g., =2), then + * that value is provided by the ARG_INT or ARG_DOUBLE part preceding the message. + * Otherwise the message immediately follows the ARG_SELECTOR. + * @stable ICU 4.8 + */ + UMSGPAT_ARG_TYPE_PLURAL, + /** + * The argument is a SelectFormat with one or more (ARG_SELECTOR, message) pairs. + * @stable ICU 4.8 + */ + UMSGPAT_ARG_TYPE_SELECT, + /** + * The argument is an ordinal-number PluralFormat + * with the same style parts sequence and semantics as UMSGPAT_ARG_TYPE_PLURAL. + * @stable ICU 50 + */ + UMSGPAT_ARG_TYPE_SELECTORDINAL +}; +/** + * @stable ICU 4.8 + */ +typedef enum UMessagePatternArgType UMessagePatternArgType; + +/** + * \def UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE + * Returns TRUE if the argument type has a plural style part sequence and semantics, + * for example UMSGPAT_ARG_TYPE_PLURAL and UMSGPAT_ARG_TYPE_SELECTORDINAL. + * @stable ICU 50 + */ +#define UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE(argType) \ + ((argType)==UMSGPAT_ARG_TYPE_PLURAL || (argType)==UMSGPAT_ARG_TYPE_SELECTORDINAL) + +enum { + /** + * Return value from MessagePattern.validateArgumentName() for when + * the string is a valid "pattern identifier" but not a number. + * @stable ICU 4.8 + */ + UMSGPAT_ARG_NAME_NOT_NUMBER=-1, + + /** + * Return value from MessagePattern.validateArgumentName() for when + * the string is invalid. + * It might not be a valid "pattern identifier", + * or it have only ASCII digits but there is a leading zero or the number is too large. + * @stable ICU 4.8 + */ + UMSGPAT_ARG_NAME_NOT_VALID=-2 +}; + +/** + * Special value that is returned by getNumericValue(Part) when no + * numeric value is defined for a part. + * @see MessagePattern.getNumericValue() + * @stable ICU 4.8 + */ +#define UMSGPAT_NO_NUMERIC_VALUE ((double)(-123456789)) + +U_NAMESPACE_BEGIN + +class MessagePatternDoubleList; +class MessagePatternPartsList; + +/** + * Parses and represents ICU MessageFormat patterns. + * Also handles patterns for ChoiceFormat, PluralFormat and SelectFormat. + * Used in the implementations of those classes as well as in tools + * for message validation, translation and format conversion. + * <p> + * The parser handles all syntax relevant for identifying message arguments. + * This includes "complex" arguments whose style strings contain + * nested MessageFormat pattern substrings. + * For "simple" arguments (with no nested MessageFormat pattern substrings), + * the argument style is not parsed any further. + * <p> + * The parser handles named and numbered message arguments and allows both in one message. + * <p> + * Once a pattern has been parsed successfully, iterate through the parsed data + * with countParts(), getPart() and related methods. + * <p> + * The data logically represents a parse tree, but is stored and accessed + * as a list of "parts" for fast and simple parsing and to minimize object allocations. + * Arguments and nested messages are best handled via recursion. + * For every _START "part", MessagePattern.getLimitPartIndex() efficiently returns + * the index of the corresponding _LIMIT "part". + * <p> + * List of "parts": + * <pre> + * message = MSG_START (SKIP_SYNTAX | INSERT_CHAR | REPLACE_NUMBER | argument)* MSG_LIMIT + * argument = noneArg | simpleArg | complexArg + * complexArg = choiceArg | pluralArg | selectArg + * + * noneArg = ARG_START.NONE (ARG_NAME | ARG_NUMBER) ARG_LIMIT.NONE + * simpleArg = ARG_START.SIMPLE (ARG_NAME | ARG_NUMBER) ARG_TYPE [ARG_STYLE] ARG_LIMIT.SIMPLE + * choiceArg = ARG_START.CHOICE (ARG_NAME | ARG_NUMBER) choiceStyle ARG_LIMIT.CHOICE + * pluralArg = ARG_START.PLURAL (ARG_NAME | ARG_NUMBER) pluralStyle ARG_LIMIT.PLURAL + * selectArg = ARG_START.SELECT (ARG_NAME | ARG_NUMBER) selectStyle ARG_LIMIT.SELECT + * + * choiceStyle = ((ARG_INT | ARG_DOUBLE) ARG_SELECTOR message)+ + * pluralStyle = [ARG_INT | ARG_DOUBLE] (ARG_SELECTOR [ARG_INT | ARG_DOUBLE] message)+ + * selectStyle = (ARG_SELECTOR message)+ + * </pre> + * <ul> + * <li>Literal output text is not represented directly by "parts" but accessed + * between parts of a message, from one part's getLimit() to the next part's getIndex(). + * <li><code>ARG_START.CHOICE</code> stands for an ARG_START Part with ArgType CHOICE. + * <li>In the choiceStyle, the ARG_SELECTOR has the '<', the '#' or + * the less-than-or-equal-to sign (U+2264). + * <li>In the pluralStyle, the first, optional numeric Part has the "offset:" value. + * The optional numeric Part between each (ARG_SELECTOR, message) pair + * is the value of an explicit-number selector like "=2", + * otherwise the selector is a non-numeric identifier. + * <li>The REPLACE_NUMBER Part can occur only in an immediate sub-message of the pluralStyle. + * </ul> + * <p> + * This class is not intended for public subclassing. + * + * @stable ICU 4.8 + */ +class U_COMMON_API MessagePattern : public UObject { +public: + /** + * Constructs an empty MessagePattern with default UMessagePatternApostropheMode. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @stable ICU 4.8 + */ + MessagePattern(UErrorCode &errorCode); + + /** + * Constructs an empty MessagePattern. + * @param mode Explicit UMessagePatternApostropheMode. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @stable ICU 4.8 + */ + MessagePattern(UMessagePatternApostropheMode mode, UErrorCode &errorCode); + + /** + * Constructs a MessagePattern with default UMessagePatternApostropheMode and + * parses the MessageFormat pattern string. + * @param pattern a MessageFormat pattern string + * @param parseError Struct to receive information on the position + * of an error within the pattern. + * Can be NULL. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * TODO: turn @throws into UErrorCode specifics? + * @throws IllegalArgumentException for syntax errors in the pattern string + * @throws IndexOutOfBoundsException if certain limits are exceeded + * (e.g., argument number too high, argument name too long, etc.) + * @throws NumberFormatException if a number could not be parsed + * @stable ICU 4.8 + */ + MessagePattern(const UnicodeString &pattern, UParseError *parseError, UErrorCode &errorCode); + + /** + * Copy constructor. + * @param other Object to copy. + * @stable ICU 4.8 + */ + MessagePattern(const MessagePattern &other); + + /** + * Assignment operator. + * @param other Object to copy. + * @return *this=other + * @stable ICU 4.8 + */ + MessagePattern &operator=(const MessagePattern &other); + + /** + * Destructor. + * @stable ICU 4.8 + */ + virtual ~MessagePattern(); + + /** + * Parses a MessageFormat pattern string. + * @param pattern a MessageFormat pattern string + * @param parseError Struct to receive information on the position + * of an error within the pattern. + * Can be NULL. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return *this + * @throws IllegalArgumentException for syntax errors in the pattern string + * @throws IndexOutOfBoundsException if certain limits are exceeded + * (e.g., argument number too high, argument name too long, etc.) + * @throws NumberFormatException if a number could not be parsed + * @stable ICU 4.8 + */ + MessagePattern &parse(const UnicodeString &pattern, + UParseError *parseError, UErrorCode &errorCode); + + /** + * Parses a ChoiceFormat pattern string. + * @param pattern a ChoiceFormat pattern string + * @param parseError Struct to receive information on the position + * of an error within the pattern. + * Can be NULL. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return *this + * @throws IllegalArgumentException for syntax errors in the pattern string + * @throws IndexOutOfBoundsException if certain limits are exceeded + * (e.g., argument number too high, argument name too long, etc.) + * @throws NumberFormatException if a number could not be parsed + * @stable ICU 4.8 + */ + MessagePattern &parseChoiceStyle(const UnicodeString &pattern, + UParseError *parseError, UErrorCode &errorCode); + + /** + * Parses a PluralFormat pattern string. + * @param pattern a PluralFormat pattern string + * @param parseError Struct to receive information on the position + * of an error within the pattern. + * Can be NULL. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return *this + * @throws IllegalArgumentException for syntax errors in the pattern string + * @throws IndexOutOfBoundsException if certain limits are exceeded + * (e.g., argument number too high, argument name too long, etc.) + * @throws NumberFormatException if a number could not be parsed + * @stable ICU 4.8 + */ + MessagePattern &parsePluralStyle(const UnicodeString &pattern, + UParseError *parseError, UErrorCode &errorCode); + + /** + * Parses a SelectFormat pattern string. + * @param pattern a SelectFormat pattern string + * @param parseError Struct to receive information on the position + * of an error within the pattern. + * Can be NULL. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return *this + * @throws IllegalArgumentException for syntax errors in the pattern string + * @throws IndexOutOfBoundsException if certain limits are exceeded + * (e.g., argument number too high, argument name too long, etc.) + * @throws NumberFormatException if a number could not be parsed + * @stable ICU 4.8 + */ + MessagePattern &parseSelectStyle(const UnicodeString &pattern, + UParseError *parseError, UErrorCode &errorCode); + + /** + * Clears this MessagePattern. + * countParts() will return 0. + * @stable ICU 4.8 + */ + void clear(); + + /** + * Clears this MessagePattern and sets the UMessagePatternApostropheMode. + * countParts() will return 0. + * @param mode The new UMessagePatternApostropheMode. + * @stable ICU 4.8 + */ + void clearPatternAndSetApostropheMode(UMessagePatternApostropheMode mode) { + clear(); + aposMode=mode; + } + + /** + * @param other another object to compare with. + * @return TRUE if this object is equivalent to the other one. + * @stable ICU 4.8 + */ + UBool operator==(const MessagePattern &other) const; + + /** + * @param other another object to compare with. + * @return FALSE if this object is equivalent to the other one. + * @stable ICU 4.8 + */ + inline UBool operator!=(const MessagePattern &other) const { + return !operator==(other); + } + + /** + * @return A hash code for this object. + * @stable ICU 4.8 + */ + int32_t hashCode() const; + + /** + * @return this instance's UMessagePatternApostropheMode. + * @stable ICU 4.8 + */ + UMessagePatternApostropheMode getApostropheMode() const { + return aposMode; + } + + // Java has package-private jdkAposMode() here. + // In C++, this is declared in the MessageImpl class. + + /** + * @return the parsed pattern string (null if none was parsed). + * @stable ICU 4.8 + */ + const UnicodeString &getPatternString() const { + return msg; + } + + /** + * Does the parsed pattern have named arguments like {first_name}? + * @return TRUE if the parsed pattern has at least one named argument. + * @stable ICU 4.8 + */ + UBool hasNamedArguments() const { + return hasArgNames; + } + + /** + * Does the parsed pattern have numbered arguments like {2}? + * @return TRUE if the parsed pattern has at least one numbered argument. + * @stable ICU 4.8 + */ + UBool hasNumberedArguments() const { + return hasArgNumbers; + } + + /** + * Validates and parses an argument name or argument number string. + * An argument name must be a "pattern identifier", that is, it must contain + * no Unicode Pattern_Syntax or Pattern_White_Space characters. + * If it only contains ASCII digits, then it must be a small integer with no leading zero. + * @param name Input string. + * @return >=0 if the name is a valid number, + * ARG_NAME_NOT_NUMBER (-1) if it is a "pattern identifier" but not all ASCII digits, + * ARG_NAME_NOT_VALID (-2) if it is neither. + * @stable ICU 4.8 + */ + static int32_t validateArgumentName(const UnicodeString &name); + + /** + * Returns a version of the parsed pattern string where each ASCII apostrophe + * is doubled (escaped) if it is not already, and if it is not interpreted as quoting syntax. + * <p> + * For example, this turns "I don't '{know}' {gender,select,female{h''er}other{h'im}}." + * into "I don''t '{know}' {gender,select,female{h''er}other{h''im}}." + * @return the deep-auto-quoted version of the parsed pattern string. + * @see MessageFormat.autoQuoteApostrophe() + * @stable ICU 4.8 + */ + UnicodeString autoQuoteApostropheDeep() const; + + class Part; + + /** + * Returns the number of "parts" created by parsing the pattern string. + * Returns 0 if no pattern has been parsed or clear() was called. + * @return the number of pattern parts. + * @stable ICU 4.8 + */ + int32_t countParts() const { + return partsLength; + } + + /** + * Gets the i-th pattern "part". + * @param i The index of the Part data. (0..countParts()-1) + * @return the i-th pattern "part". + * @stable ICU 4.8 + */ + const Part &getPart(int32_t i) const { + return parts[i]; + } + + /** + * Returns the UMessagePatternPartType of the i-th pattern "part". + * Convenience method for getPart(i).getType(). + * @param i The index of the Part data. (0..countParts()-1) + * @return The UMessagePatternPartType of the i-th Part. + * @stable ICU 4.8 + */ + UMessagePatternPartType getPartType(int32_t i) const { + return getPart(i).type; + } + + /** + * Returns the pattern index of the specified pattern "part". + * Convenience method for getPart(partIndex).getIndex(). + * @param partIndex The index of the Part data. (0..countParts()-1) + * @return The pattern index of this Part. + * @stable ICU 4.8 + */ + int32_t getPatternIndex(int32_t partIndex) const { + return getPart(partIndex).index; + } + + /** + * Returns the substring of the pattern string indicated by the Part. + * Convenience method for getPatternString().substring(part.getIndex(), part.getLimit()). + * @param part a part of this MessagePattern. + * @return the substring associated with part. + * @stable ICU 4.8 + */ + UnicodeString getSubstring(const Part &part) const { + return msg.tempSubString(part.index, part.length); + } + + /** + * Compares the part's substring with the input string s. + * @param part a part of this MessagePattern. + * @param s a string. + * @return TRUE if getSubstring(part).equals(s). + * @stable ICU 4.8 + */ + UBool partSubstringMatches(const Part &part, const UnicodeString &s) const { + return 0==msg.compare(part.index, part.length, s); + } + + /** + * Returns the numeric value associated with an ARG_INT or ARG_DOUBLE. + * @param part a part of this MessagePattern. + * @return the part's numeric value, or UMSGPAT_NO_NUMERIC_VALUE if this is not a numeric part. + * @stable ICU 4.8 + */ + double getNumericValue(const Part &part) const; + + /** + * Returns the "offset:" value of a PluralFormat argument, or 0 if none is specified. + * @param pluralStart the index of the first PluralFormat argument style part. (0..countParts()-1) + * @return the "offset:" value. + * @stable ICU 4.8 + */ + double getPluralOffset(int32_t pluralStart) const; + + /** + * Returns the index of the ARG|MSG_LIMIT part corresponding to the ARG|MSG_START at start. + * @param start The index of some Part data (0..countParts()-1); + * this Part should be of Type ARG_START or MSG_START. + * @return The first i>start where getPart(i).getType()==ARG|MSG_LIMIT at the same nesting level, + * or start itself if getPartType(msgStart)!=ARG|MSG_START. + * @stable ICU 4.8 + */ + int32_t getLimitPartIndex(int32_t start) const { + int32_t limit=getPart(start).limitPartIndex; + if(limit<start) { + return start; + } + return limit; + } + + /** + * A message pattern "part", representing a pattern parsing event. + * There is a part for the start and end of a message or argument, + * for quoting and escaping of and with ASCII apostrophes, + * and for syntax elements of "complex" arguments. + * @stable ICU 4.8 + */ + class Part : public UMemory { + public: + /** + * Default constructor, do not use. + * @internal + */ + Part() {} + + /** + * Returns the type of this part. + * @return the part type. + * @stable ICU 4.8 + */ + UMessagePatternPartType getType() const { + return type; + } + + /** + * Returns the pattern string index associated with this Part. + * @return this part's pattern string index. + * @stable ICU 4.8 + */ + int32_t getIndex() const { + return index; + } + + /** + * Returns the length of the pattern substring associated with this Part. + * This is 0 for some parts. + * @return this part's pattern substring length. + * @stable ICU 4.8 + */ + int32_t getLength() const { + return length; + } + + /** + * Returns the pattern string limit (exclusive-end) index associated with this Part. + * Convenience method for getIndex()+getLength(). + * @return this part's pattern string limit index, same as getIndex()+getLength(). + * @stable ICU 4.8 + */ + int32_t getLimit() const { + return index+length; + } + + /** + * Returns a value associated with this part. + * See the documentation of each part type for details. + * @return the part value. + * @stable ICU 4.8 + */ + int32_t getValue() const { + return value; + } + + /** + * Returns the argument type if this part is of type ARG_START or ARG_LIMIT, + * otherwise UMSGPAT_ARG_TYPE_NONE. + * @return the argument type for this part. + * @stable ICU 4.8 + */ + UMessagePatternArgType getArgType() const { + UMessagePatternPartType type=getType(); + if(type==UMSGPAT_PART_TYPE_ARG_START || type==UMSGPAT_PART_TYPE_ARG_LIMIT) { + return (UMessagePatternArgType)value; + } else { + return UMSGPAT_ARG_TYPE_NONE; + } + } + + /** + * Indicates whether the Part type has a numeric value. + * If so, then that numeric value can be retrieved via MessagePattern.getNumericValue(). + * @param type The Part type to be tested. + * @return TRUE if the Part type has a numeric value. + * @stable ICU 4.8 + */ + static UBool hasNumericValue(UMessagePatternPartType type) { + return type==UMSGPAT_PART_TYPE_ARG_INT || type==UMSGPAT_PART_TYPE_ARG_DOUBLE; + } + + /** + * @param other another object to compare with. + * @return TRUE if this object is equivalent to the other one. + * @stable ICU 4.8 + */ + UBool operator==(const Part &other) const; + + /** + * @param other another object to compare with. + * @return FALSE if this object is equivalent to the other one. + * @stable ICU 4.8 + */ + inline UBool operator!=(const Part &other) const { + return !operator==(other); + } + + /** + * @return A hash code for this object. + * @stable ICU 4.8 + */ + int32_t hashCode() const { + return ((type*37+index)*37+length)*37+value; + } + + private: + friend class MessagePattern; + + static const int32_t MAX_LENGTH=0xffff; + static const int32_t MAX_VALUE=0x7fff; + + // Some fields are not final because they are modified during pattern parsing. + // After pattern parsing, the parts are effectively immutable. + UMessagePatternPartType type; + int32_t index; + uint16_t length; + int16_t value; + int32_t limitPartIndex; + }; + +private: + void preParse(const UnicodeString &pattern, UParseError *parseError, UErrorCode &errorCode); + + void postParse(); + + int32_t parseMessage(int32_t index, int32_t msgStartLength, + int32_t nestingLevel, UMessagePatternArgType parentType, + UParseError *parseError, UErrorCode &errorCode); + + int32_t parseArg(int32_t index, int32_t argStartLength, int32_t nestingLevel, + UParseError *parseError, UErrorCode &errorCode); + + int32_t parseSimpleStyle(int32_t index, UParseError *parseError, UErrorCode &errorCode); + + int32_t parseChoiceStyle(int32_t index, int32_t nestingLevel, + UParseError *parseError, UErrorCode &errorCode); + + int32_t parsePluralOrSelectStyle(UMessagePatternArgType argType, int32_t index, int32_t nestingLevel, + UParseError *parseError, UErrorCode &errorCode); + + /** + * Validates and parses an argument name or argument number string. + * This internal method assumes that the input substring is a "pattern identifier". + * @return >=0 if the name is a valid number, + * ARG_NAME_NOT_NUMBER (-1) if it is a "pattern identifier" but not all ASCII digits, + * ARG_NAME_NOT_VALID (-2) if it is neither. + * @see #validateArgumentName(String) + */ + static int32_t parseArgNumber(const UnicodeString &s, int32_t start, int32_t limit); + + int32_t parseArgNumber(int32_t start, int32_t limit) { + return parseArgNumber(msg, start, limit); + } + + /** + * Parses a number from the specified message substring. + * @param start start index into the message string + * @param limit limit index into the message string, must be start<limit + * @param allowInfinity TRUE if U+221E is allowed (for ChoiceFormat) + * @param parseError + * @param errorCode + */ + void parseDouble(int32_t start, int32_t limit, UBool allowInfinity, + UParseError *parseError, UErrorCode &errorCode); + + // Java has package-private appendReducedApostrophes() here. + // In C++, this is declared in the MessageImpl class. + + int32_t skipWhiteSpace(int32_t index); + + int32_t skipIdentifier(int32_t index); + + /** + * Skips a sequence of characters that could occur in a double value. + * Does not fully parse or validate the value. + */ + int32_t skipDouble(int32_t index); + + static UBool isArgTypeChar(UChar32 c); + + UBool isChoice(int32_t index); + + UBool isPlural(int32_t index); + + UBool isSelect(int32_t index); + + UBool isOrdinal(int32_t index); + + /** + * @return TRUE if we are inside a MessageFormat (sub-)pattern, + * as opposed to inside a top-level choice/plural/select pattern. + */ + UBool inMessageFormatPattern(int32_t nestingLevel); + + /** + * @return TRUE if we are in a MessageFormat sub-pattern + * of a top-level ChoiceFormat pattern. + */ + UBool inTopLevelChoiceMessage(int32_t nestingLevel, UMessagePatternArgType parentType); + + void addPart(UMessagePatternPartType type, int32_t index, int32_t length, + int32_t value, UErrorCode &errorCode); + + void addLimitPart(int32_t start, + UMessagePatternPartType type, int32_t index, int32_t length, + int32_t value, UErrorCode &errorCode); + + void addArgDoublePart(double numericValue, int32_t start, int32_t length, UErrorCode &errorCode); + + void setParseError(UParseError *parseError, int32_t index); + + UBool init(UErrorCode &errorCode); + UBool copyStorage(const MessagePattern &other, UErrorCode &errorCode); + + UMessagePatternApostropheMode aposMode; + UnicodeString msg; + // ArrayList<Part> parts=new ArrayList<Part>(); + MessagePatternPartsList *partsList; + Part *parts; + int32_t partsLength; + // ArrayList<Double> numericValues; + MessagePatternDoubleList *numericValuesList; + double *numericValues; + int32_t numericValuesLength; + UBool hasArgNames; + UBool hasArgNumbers; + UBool needsAutoQuoting; +}; + +U_NAMESPACE_END + +#endif // !UCONFIG_NO_FORMATTING + +#endif // __MESSAGEPATTERN_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/msgfmt.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/msgfmt.h new file mode 100755 index 00000000..fef80107 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/msgfmt.h @@ -0,0 +1,1095 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +* Copyright (C) 2007-2013, International Business Machines Corporation and +* others. All Rights Reserved. +******************************************************************************** +* +* File MSGFMT.H +* +* Modification History: +* +* Date Name Description +* 02/19/97 aliu Converted from java. +* 03/20/97 helena Finished first cut of implementation. +* 07/22/98 stephen Removed operator!= (defined in Format) +* 08/19/2002 srl Removing Javaisms +*******************************************************************************/ + +#ifndef MSGFMT_H +#define MSGFMT_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Formats messages in a language-neutral way. + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/format.h" +#include "unicode/locid.h" +#include "unicode/messagepattern.h" +#include "unicode/parseerr.h" +#include "unicode/plurfmt.h" +#include "unicode/plurrule.h" + +U_CDECL_BEGIN +// Forward declaration. +struct UHashtable; +typedef struct UHashtable UHashtable; /**< @internal */ +U_CDECL_END + +U_NAMESPACE_BEGIN + +class AppendableWrapper; +class DateFormat; +class NumberFormat; + +/** + * <p>MessageFormat prepares strings for display to users, + * with optional arguments (variables/placeholders). + * The arguments can occur in any order, which is necessary for translation + * into languages with different grammars. + * + * <p>A MessageFormat is constructed from a <em>pattern</em> string + * with arguments in {curly braces} which will be replaced by formatted values. + * + * <p><code>MessageFormat</code> differs from the other <code>Format</code> + * classes in that you create a <code>MessageFormat</code> object with one + * of its constructors (not with a <code>createInstance</code> style factory + * method). Factory methods aren't necessary because <code>MessageFormat</code> + * itself doesn't implement locale-specific behavior. Any locale-specific + * behavior is defined by the pattern that you provide and the + * subformats used for inserted arguments. + * + * <p>Arguments can be named (using identifiers) or numbered (using small ASCII-digit integers). + * Some of the API methods work only with argument numbers and throw an exception + * if the pattern has named arguments (see {@link #usesNamedArguments()}). + * + * <p>An argument might not specify any format type. In this case, + * a Number value is formatted with a default (for the locale) NumberFormat, + * a Date value is formatted with a default (for the locale) DateFormat, + * and for any other value its toString() value is used. + * + * <p>An argument might specify a "simple" type for which the specified + * Format object is created, cached and used. + * + * <p>An argument might have a "complex" type with nested MessageFormat sub-patterns. + * During formatting, one of these sub-messages is selected according to the argument value + * and recursively formatted. + * + * <p>After construction, a custom Format object can be set for + * a top-level argument, overriding the default formatting and parsing behavior + * for that argument. + * However, custom formatting can be achieved more simply by writing + * a typeless argument in the pattern string + * and supplying it with a preformatted string value. + * + * <p>When formatting, MessageFormat takes a collection of argument values + * and writes an output string. + * The argument values may be passed as an array + * (when the pattern contains only numbered arguments) + * or as an array of names and and an array of arguments (which works for both named + * and numbered arguments). + * + * <p>Each argument is matched with one of the input values by array index or argument name + * and formatted according to its pattern specification + * (or using a custom Format object if one was set). + * A numbered pattern argument is matched with an argument name that contains that number + * as an ASCII-decimal-digit string (without leading zero). + * + * <h4><a name="patterns">Patterns and Their Interpretation</a></h4> + * + * <code>MessageFormat</code> uses patterns of the following form: + * <pre> + * message = messageText (argument messageText)* + * argument = noneArg | simpleArg | complexArg + * complexArg = choiceArg | pluralArg | selectArg | selectordinalArg + * + * noneArg = '{' argNameOrNumber '}' + * simpleArg = '{' argNameOrNumber ',' argType [',' argStyle] '}' + * choiceArg = '{' argNameOrNumber ',' "choice" ',' choiceStyle '}' + * pluralArg = '{' argNameOrNumber ',' "plural" ',' pluralStyle '}' + * selectArg = '{' argNameOrNumber ',' "select" ',' selectStyle '}' + * selectordinalArg = '{' argNameOrNumber ',' "selectordinal" ',' pluralStyle '}' + * + * choiceStyle: see {@link ChoiceFormat} + * pluralStyle: see {@link PluralFormat} + * selectStyle: see {@link SelectFormat} + * + * argNameOrNumber = argName | argNumber + * argName = [^[[:Pattern_Syntax:][:Pattern_White_Space:]]]+ + * argNumber = '0' | ('1'..'9' ('0'..'9')*) + * + * argType = "number" | "date" | "time" | "spellout" | "ordinal" | "duration" + * argStyle = "short" | "medium" | "long" | "full" | "integer" | "currency" | "percent" | argStyleText + * </pre> + * + * <ul> + * <li>messageText can contain quoted literal strings including syntax characters. + * A quoted literal string begins with an ASCII apostrophe and a syntax character + * (usually a {curly brace}) and continues until the next single apostrophe. + * A double ASCII apostrohpe inside or outside of a quoted string represents + * one literal apostrophe. + * <li>Quotable syntax characters are the {curly braces} in all messageText parts, + * plus the '#' sign in a messageText immediately inside a pluralStyle, + * and the '|' symbol in a messageText immediately inside a choiceStyle. + * <li>See also {@link #UMessagePatternApostropheMode} + * <li>In argStyleText, every single ASCII apostrophe begins and ends quoted literal text, + * and unquoted {curly braces} must occur in matched pairs. + * </ul> + * + * <p>Recommendation: Use the real apostrophe (single quote) character + * \htmlonly’\endhtmlonly (U+2019) for + * human-readable text, and use the ASCII apostrophe ' (U+0027) + * only in program syntax, like quoting in MessageFormat. + * See the annotations for U+0027 Apostrophe in The Unicode Standard. + * + * <p>The <code>choice</code> argument type is deprecated. + * Use <code>plural</code> arguments for proper plural selection, + * and <code>select</code> arguments for simple selection among a fixed set of choices. + * + * <p>The <code>argType</code> and <code>argStyle</code> values are used to create + * a <code>Format</code> instance for the format element. The following + * table shows how the values map to Format instances. Combinations not + * shown in the table are illegal. Any <code>argStyleText</code> must + * be a valid pattern string for the Format subclass used. + * + * <p><table border=1> + * <tr> + * <th>argType + * <th>argStyle + * <th>resulting Format object + * <tr> + * <td colspan=2><i>(none)</i> + * <td><code>null</code> + * <tr> + * <td rowspan=5><code>number</code> + * <td><i>(none)</i> + * <td><code>NumberFormat.createInstance(getLocale(), status)</code> + * <tr> + * <td><code>integer</code> + * <td><code>NumberFormat.createInstance(getLocale(), kNumberStyle, status)</code> + * <tr> + * <td><code>currency</code> + * <td><code>NumberFormat.createCurrencyInstance(getLocale(), status)</code> + * <tr> + * <td><code>percent</code> + * <td><code>NumberFormat.createPercentInstance(getLocale(), status)</code> + * <tr> + * <td><i>argStyleText</i> + * <td><code>new DecimalFormat(argStyleText, new DecimalFormatSymbols(getLocale(), status), status)</code> + * <tr> + * <td rowspan=6><code>date</code> + * <td><i>(none)</i> + * <td><code>DateFormat.createDateInstance(kDefault, getLocale(), status)</code> + * <tr> + * <td><code>short</code> + * <td><code>DateFormat.createDateInstance(kShort, getLocale(), status)</code> + * <tr> + * <td><code>medium</code> + * <td><code>DateFormat.createDateInstance(kDefault, getLocale(), status)</code> + * <tr> + * <td><code>long</code> + * <td><code>DateFormat.createDateInstance(kLong, getLocale(), status)</code> + * <tr> + * <td><code>full</code> + * <td><code>DateFormat.createDateInstance(kFull, getLocale(), status)</code> + * <tr> + * <td><i>argStyleText</i> + * <td><code>new SimpleDateFormat(argStyleText, getLocale(), status) + * <tr> + * <td rowspan=6><code>time</code> + * <td><i>(none)</i> + * <td><code>DateFormat.createTimeInstance(kDefault, getLocale(), status)</code> + * <tr> + * <td><code>short</code> + * <td><code>DateFormat.createTimeInstance(kShort, getLocale(), status)</code> + * <tr> + * <td><code>medium</code> + * <td><code>DateFormat.createTimeInstance(kDefault, getLocale(), status)</code> + * <tr> + * <td><code>long</code> + * <td><code>DateFormat.createTimeInstance(kLong, getLocale(), status)</code> + * <tr> + * <td><code>full</code> + * <td><code>DateFormat.createTimeInstance(kFull, getLocale(), status)</code> + * <tr> + * <td><i>argStyleText</i> + * <td><code>new SimpleDateFormat(argStyleText, getLocale(), status) + * <tr> + * <td><code>spellout</code> + * <td><i>argStyleText (optional)</i> + * <td><code>new RuleBasedNumberFormat(URBNF_SPELLOUT, getLocale(), status) + * <br/>    .setDefaultRuleset(argStyleText, status);</code> + * <tr> + * <td><code>ordinal</code> + * <td><i>argStyleText (optional)</i> + * <td><code>new RuleBasedNumberFormat(URBNF_ORDINAL, getLocale(), status) + * <br/>    .setDefaultRuleset(argStyleText, status);</code> + * <tr> + * <td><code>duration</code> + * <td><i>argStyleText (optional)</i> + * <td><code>new RuleBasedNumberFormat(URBNF_DURATION, getLocale(), status) + * <br/>    .setDefaultRuleset(argStyleText, status);</code> + * </table> + * <p> + * + * <h4>Usage Information</h4> + * + * <p>Here are some examples of usage: + * Example 1: + * + * <pre> + * \code + * UErrorCode success = U_ZERO_ERROR; + * GregorianCalendar cal(success); + * Formattable arguments[] = { + * 7L, + * Formattable( (Date) cal.getTime(success), Formattable::kIsDate), + * "a disturbance in the Force" + * }; + * + * UnicodeString result; + * MessageFormat::format( + * "At {1,time} on {1,date}, there was {2} on planet {0,number}.", + * arguments, 3, result, success ); + * + * cout << "result: " << result << endl; + * //<output>: At 4:34:20 PM on 23-Mar-98, there was a disturbance + * // in the Force on planet 7. + * \endcode + * </pre> + * + * Typically, the message format will come from resources, and the + * arguments will be dynamically set at runtime. + * + * <p>Example 2: + * + * <pre> + * \code + * success = U_ZERO_ERROR; + * Formattable testArgs[] = {3L, "MyDisk"}; + * + * MessageFormat form( + * "The disk \"{1}\" contains {0} file(s).", success ); + * + * UnicodeString string; + * FieldPosition fpos = 0; + * cout << "format: " << form.format(testArgs, 2, string, fpos, success ) << endl; + * + * // output, with different testArgs: + * // output: The disk "MyDisk" contains 0 file(s). + * // output: The disk "MyDisk" contains 1 file(s). + * // output: The disk "MyDisk" contains 1,273 file(s). + * \endcode + * </pre> + * + * + * <p>For messages that include plural forms, you can use a plural argument: + * <pre> + * \code + * success = U_ZERO_ERROR; + * MessageFormat msgFmt( + * "{num_files, plural, " + * "=0{There are no files on disk \"{disk_name}\".}" + * "=1{There is one file on disk \"{disk_name}\".}" + * "other{There are # files on disk \"{disk_name}\".}}", + * Locale("en"), + * success); + * FieldPosition fpos = 0; + * Formattable testArgs[] = {0L, "MyDisk"}; + * UnicodeString testArgsNames[] = {"num_files", "disk_name"}; + * UnicodeString result; + * cout << msgFmt.format(testArgs, testArgsNames, 2, result, fpos, 0, success); + * testArgs[0] = 3L; + * cout << msgFmt.format(testArgs, testArgsNames, 2, result, fpos, 0, success); + * \endcode + * <em>output</em>: + * There are no files on disk "MyDisk". + * There are 3 files on "MyDisk". + * </pre> + * See {@link PluralFormat} and {@link PluralRules} for details. + * + * <h4><a name="synchronization">Synchronization</a></h4> + * + * <p>MessageFormats are not synchronized. + * It is recommended to create separate format instances for each thread. + * If multiple threads access a format concurrently, it must be synchronized + * externally. + * + * @stable ICU 2.0 + */ +class U_I18N_API MessageFormat : public Format { +public: +#ifndef U_HIDE_OBSOLETE_API + /** + * Enum type for kMaxFormat. + * @obsolete ICU 3.0. The 10-argument limit was removed as of ICU 2.6, + * rendering this enum type obsolete. + */ + enum EFormatNumber { + /** + * The maximum number of arguments. + * @obsolete ICU 3.0. The 10-argument limit was removed as of ICU 2.6, + * rendering this constant obsolete. + */ + kMaxFormat = 10 + }; +#endif /* U_HIDE_OBSOLETE_API */ + + /** + * Constructs a new MessageFormat using the given pattern and the + * default locale. + * + * @param pattern Pattern used to construct object. + * @param status Input/output error code. If the + * pattern cannot be parsed, set to failure code. + * @stable ICU 2.0 + */ + MessageFormat(const UnicodeString& pattern, + UErrorCode &status); + + /** + * Constructs a new MessageFormat using the given pattern and locale. + * @param pattern Pattern used to construct object. + * @param newLocale The locale to use for formatting dates and numbers. + * @param status Input/output error code. If the + * pattern cannot be parsed, set to failure code. + * @stable ICU 2.0 + */ + MessageFormat(const UnicodeString& pattern, + const Locale& newLocale, + UErrorCode& status); + /** + * Constructs a new MessageFormat using the given pattern and locale. + * @param pattern Pattern used to construct object. + * @param newLocale The locale to use for formatting dates and numbers. + * @param parseError Struct to receive information on the position + * of an error within the pattern. + * @param status Input/output error code. If the + * pattern cannot be parsed, set to failure code. + * @stable ICU 2.0 + */ + MessageFormat(const UnicodeString& pattern, + const Locale& newLocale, + UParseError& parseError, + UErrorCode& status); + /** + * Constructs a new MessageFormat from an existing one. + * @stable ICU 2.0 + */ + MessageFormat(const MessageFormat&); + + /** + * Assignment operator. + * @stable ICU 2.0 + */ + const MessageFormat& operator=(const MessageFormat&); + + /** + * Destructor. + * @stable ICU 2.0 + */ + virtual ~MessageFormat(); + + /** + * Clones this Format object polymorphically. The caller owns the + * result and should delete it when done. + * @stable ICU 2.0 + */ + virtual Format* clone(void) const; + + /** + * Returns true if the given Format objects are semantically equal. + * Objects of different subclasses are considered unequal. + * @param other the object to be compared with. + * @return true if the given Format objects are semantically equal. + * @stable ICU 2.0 + */ + virtual UBool operator==(const Format& other) const; + + /** + * Sets the locale to be used for creating argument Format objects. + * @param theLocale the new locale value to be set. + * @stable ICU 2.0 + */ + virtual void setLocale(const Locale& theLocale); + + /** + * Gets the locale used for creating argument Format objects. + * format information. + * @return the locale of the object. + * @stable ICU 2.0 + */ + virtual const Locale& getLocale(void) const; + + /** + * Applies the given pattern string to this message format. + * + * @param pattern The pattern to be applied. + * @param status Input/output error code. If the + * pattern cannot be parsed, set to failure code. + * @stable ICU 2.0 + */ + virtual void applyPattern(const UnicodeString& pattern, + UErrorCode& status); + /** + * Applies the given pattern string to this message format. + * + * @param pattern The pattern to be applied. + * @param parseError Struct to receive information on the position + * of an error within the pattern. + * @param status Input/output error code. If the + * pattern cannot be parsed, set to failure code. + * @stable ICU 2.0 + */ + virtual void applyPattern(const UnicodeString& pattern, + UParseError& parseError, + UErrorCode& status); + + /** + * Sets the UMessagePatternApostropheMode and the pattern used by this message format. + * Parses the pattern and caches Format objects for simple argument types. + * Patterns and their interpretation are specified in the + * <a href="#patterns">class description</a>. + * <p> + * This method is best used only once on a given object to avoid confusion about the mode, + * and after constructing the object with an empty pattern string to minimize overhead. + * + * @param pattern The pattern to be applied. + * @param aposMode The new apostrophe mode. + * @param parseError Struct to receive information on the position + * of an error within the pattern. + * Can be NULL. + * @param status Input/output error code. If the + * pattern cannot be parsed, set to failure code. + * @stable ICU 4.8 + */ + virtual void applyPattern(const UnicodeString& pattern, + UMessagePatternApostropheMode aposMode, + UParseError* parseError, + UErrorCode& status); + + /** + * @return this instance's UMessagePatternApostropheMode. + * @stable ICU 4.8 + */ + UMessagePatternApostropheMode getApostropheMode() const { + return msgPattern.getApostropheMode(); + } + + /** + * Returns a pattern that can be used to recreate this object. + * + * @param appendTo Output parameter to receive the pattern. + * Result is appended to existing contents. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.0 + */ + virtual UnicodeString& toPattern(UnicodeString& appendTo) const; + + /** + * Sets subformats. + * See the class description about format numbering. + * The caller should not delete the Format objects after this call. + * <EM>The array formatsToAdopt is not itself adopted.</EM> Its + * ownership is retained by the caller. If the call fails because + * memory cannot be allocated, then the formats will be deleted + * by this method, and this object will remain unchanged. + * + * <p>If this format uses named arguments, the new formats are discarded + * and this format remains unchanged. + * + * @stable ICU 2.0 + * @param formatsToAdopt the format to be adopted. + * @param count the size of the array. + */ + virtual void adoptFormats(Format** formatsToAdopt, int32_t count); + + /** + * Sets subformats. + * See the class description about format numbering. + * Each item in the array is cloned into the internal array. + * If the call fails because memory cannot be allocated, then this + * object will remain unchanged. + * + * <p>If this format uses named arguments, the new formats are discarded + * and this format remains unchanged. + * + * @stable ICU 2.0 + * @param newFormats the new format to be set. + * @param cnt the size of the array. + */ + virtual void setFormats(const Format** newFormats, int32_t cnt); + + + /** + * Sets one subformat. + * See the class description about format numbering. + * The caller should not delete the Format object after this call. + * If the number is over the number of formats already set, + * the item will be deleted and ignored. + * + * <p>If this format uses named arguments, the new format is discarded + * and this format remains unchanged. + * + * @stable ICU 2.0 + * @param formatNumber index of the subformat. + * @param formatToAdopt the format to be adopted. + */ + virtual void adoptFormat(int32_t formatNumber, Format* formatToAdopt); + + /** + * Sets one subformat. + * See the class description about format numbering. + * If the number is over the number of formats already set, + * the item will be ignored. + * @param formatNumber index of the subformat. + * @param format the format to be set. + * @stable ICU 2.0 + */ + virtual void setFormat(int32_t formatNumber, const Format& format); + + /** + * Gets format names. This function returns formatNames in StringEnumerations + * which can be used with getFormat() and setFormat() to export formattable + * array from current MessageFormat to another. It is the caller's responsibility + * to delete the returned formatNames. + * @param status output param set to success/failure code. + * @stable ICU 4.0 + */ + virtual StringEnumeration* getFormatNames(UErrorCode& status); + + /** + * Gets subformat pointer for given format name. + * This function supports both named and numbered + * arguments. If numbered, the formatName is the + * corresponding UnicodeStrings (e.g. "0", "1", "2"...). + * The returned Format object should not be deleted by the caller, + * nor should the ponter of other object . The pointer and its + * contents remain valid only until the next call to any method + * of this class is made with this object. + * @param formatName the name or number specifying a format + * @param status output param set to success/failure code. + * @stable ICU 4.0 + */ + virtual Format* getFormat(const UnicodeString& formatName, UErrorCode& status); + + /** + * Sets one subformat for given format name. + * See the class description about format name. + * This function supports both named and numbered + * arguments-- if numbered, the formatName is the + * corresponding UnicodeStrings (e.g. "0", "1", "2"...). + * If there is no matched formatName or wrong type, + * the item will be ignored. + * @param formatName Name of the subformat. + * @param format the format to be set. + * @param status output param set to success/failure code. + * @stable ICU 4.0 + */ + virtual void setFormat(const UnicodeString& formatName, const Format& format, UErrorCode& status); + + /** + * Sets one subformat for given format name. + * See the class description about format name. + * This function supports both named and numbered + * arguments-- if numbered, the formatName is the + * corresponding UnicodeStrings (e.g. "0", "1", "2"...). + * If there is no matched formatName or wrong type, + * the item will be ignored. + * The caller should not delete the Format object after this call. + * @param formatName Name of the subformat. + * @param formatToAdopt Format to be adopted. + * @param status output param set to success/failure code. + * @stable ICU 4.0 + */ + virtual void adoptFormat(const UnicodeString& formatName, Format* formatToAdopt, UErrorCode& status); + + /** + * Gets an array of subformats of this object. The returned array + * should not be deleted by the caller, nor should the pointers + * within the array. The array and its contents remain valid only + * until the next call to this format. See the class description + * about format numbering. + * + * @param count output parameter to receive the size of the array + * @return an array of count Format* objects, or NULL if out of + * memory. Any or all of the array elements may be NULL. + * @stable ICU 2.0 + */ + virtual const Format** getFormats(int32_t& count) const; + + + using Format::format; + + /** + * Formats the given array of arguments into a user-readable string. + * Does not take ownership of the Formattable* array or its contents. + * + * <p>If this format uses named arguments, appendTo is unchanged and + * status is set to U_ILLEGAL_ARGUMENT_ERROR. + * + * @param source An array of objects to be formatted. + * @param count The number of elements of 'source'. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param ignore Not used; inherited from base class API. + * @param status Input/output error code. If the + * pattern cannot be parsed, set to failure code. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.0 + */ + UnicodeString& format(const Formattable* source, + int32_t count, + UnicodeString& appendTo, + FieldPosition& ignore, + UErrorCode& status) const; + + /** + * Formats the given array of arguments into a user-readable string + * using the given pattern. + * + * <p>If this format uses named arguments, appendTo is unchanged and + * status is set to U_ILLEGAL_ARGUMENT_ERROR. + * + * @param pattern The pattern. + * @param arguments An array of objects to be formatted. + * @param count The number of elements of 'source'. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param status Input/output error code. If the + * pattern cannot be parsed, set to failure code. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.0 + */ + static UnicodeString& format(const UnicodeString& pattern, + const Formattable* arguments, + int32_t count, + UnicodeString& appendTo, + UErrorCode& status); + + /** + * Formats the given array of arguments into a user-readable + * string. The array must be stored within a single Formattable + * object of type kArray. If the Formattable object type is not of + * type kArray, then returns a failing UErrorCode. + * + * <p>If this format uses named arguments, appendTo is unchanged and + * status is set to U_ILLEGAL_ARGUMENT_ERROR. + * + * @param obj A Formattable of type kArray containing + * arguments to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status Input/output error code. If the + * pattern cannot be parsed, set to failure code. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.0 + */ + virtual UnicodeString& format(const Formattable& obj, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& status) const; + + /** + * Formats the given array of arguments into a user-defined argument name + * array. This function supports both named and numbered + * arguments-- if numbered, the formatName is the + * corresponding UnicodeStrings (e.g. "0", "1", "2"...). + * + * @param argumentNames argument name array + * @param arguments An array of objects to be formatted. + * @param count The number of elements of 'argumentNames' and + * arguments. The number of argumentNames and arguments + * must be the same. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param status Input/output error code. If the + * pattern cannot be parsed, set to failure code. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.0 + */ + UnicodeString& format(const UnicodeString* argumentNames, + const Formattable* arguments, + int32_t count, + UnicodeString& appendTo, + UErrorCode& status) const; + /** + * Parses the given string into an array of output arguments. + * + * @param source String to be parsed. + * @param pos On input, starting position for parse. On output, + * final position after parse. Unchanged if parse + * fails. + * @param count Output parameter to receive the number of arguments + * parsed. + * @return an array of parsed arguments. The caller owns both + * the array and its contents. + * @stable ICU 2.0 + */ + virtual Formattable* parse(const UnicodeString& source, + ParsePosition& pos, + int32_t& count) const; + + /** + * Parses the given string into an array of output arguments. + * + * <p>If this format uses named arguments, status is set to + * U_ARGUMENT_TYPE_MISMATCH. + * + * @param source String to be parsed. + * @param count Output param to receive size of returned array. + * @param status Input/output error code. If the + * pattern cannot be parsed, set to failure code. + * @return an array of parsed arguments. The caller owns both + * the array and its contents. Returns NULL if status is not U_ZERO_ERROR. + * + * @stable ICU 2.0 + */ + virtual Formattable* parse(const UnicodeString& source, + int32_t& count, + UErrorCode& status) const; + + /** + * Parses the given string into an array of output arguments + * stored within a single Formattable of type kArray. + * + * @param source The string to be parsed into an object. + * @param result Formattable to be set to the parse result. + * If parse fails, return contents are undefined. + * @param pos On input, starting position for parse. On output, + * final position after parse. Unchanged if parse + * fails. + * @stable ICU 2.0 + */ + virtual void parseObject(const UnicodeString& source, + Formattable& result, + ParsePosition& pos) const; + + /** + * Convert an 'apostrophe-friendly' pattern into a standard + * pattern. Standard patterns treat all apostrophes as + * quotes, which is problematic in some languages, e.g. + * French, where apostrophe is commonly used. This utility + * assumes that only an unpaired apostrophe immediately before + * a brace is a true quote. Other unpaired apostrophes are paired, + * and the resulting standard pattern string is returned. + * + * <p><b>Note</b> it is not guaranteed that the returned pattern + * is indeed a valid pattern. The only effect is to convert + * between patterns having different quoting semantics. + * + * @param pattern the 'apostrophe-friendly' patttern to convert + * @param status Input/output error code. If the pattern + * cannot be parsed, the failure code is set. + * @return the standard equivalent of the original pattern + * @stable ICU 3.4 + */ + static UnicodeString autoQuoteApostrophe(const UnicodeString& pattern, + UErrorCode& status); + + + /** + * Returns true if this MessageFormat uses named arguments, + * and false otherwise. See class description. + * + * @return true if named arguments are used. + * @stable ICU 4.0 + */ + UBool usesNamedArguments() const; + + +#ifndef U_HIDE_INTERNAL_API + /** + * This API is for ICU internal use only. + * Please do not use it. + * + * Returns argument types count in the parsed pattern. + * Used to distinguish pattern "{0} d" and "d". + * + * @return The number of formattable types in the pattern + * @internal + */ + int32_t getArgTypeCount() const; +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. + * This method is to implement a simple version of RTTI, since not all + * C++ compilers support genuine RTTI. Polymorphic operator==() and + * clone() methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 2.0 + */ + virtual UClassID getDynamicClassID(void) const; + + /** + * Return the class ID for this class. This is useful only for + * comparing to a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . Derived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 2.0 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + +#ifndef U_HIDE_INTERNAL_API + /** + * Compares two Format objects. This is used for constructing the hash + * tables. + * + * @param left pointer to a Format object. Must not be NULL. + * @param right pointer to a Format object. Must not be NULL. + * + * @return whether the two objects are the same + * @internal + */ + static UBool equalFormats(const void* left, const void* right); +#endif /* U_HIDE_INTERNAL_API */ + +private: + + Locale fLocale; + MessagePattern msgPattern; + Format** formatAliases; // see getFormats + int32_t formatAliasesCapacity; + + MessageFormat(); // default constructor not implemented + + /** + * This provider helps defer instantiation of a PluralRules object + * until we actually need to select a keyword. + * For example, if the number matches an explicit-value selector like "=1" + * we do not need any PluralRules. + */ + class U_I18N_API PluralSelectorProvider : public PluralFormat::PluralSelector { + public: + PluralSelectorProvider(const MessageFormat &mf, UPluralType type); + virtual ~PluralSelectorProvider(); + virtual UnicodeString select(void *ctx, double number, UErrorCode& ec) const; + + void reset(); + private: + const MessageFormat &msgFormat; + PluralRules* rules; + UPluralType type; + }; + + /** + * A MessageFormat formats an array of arguments. Each argument + * has an expected type, based on the pattern. For example, if + * the pattern contains the subformat "{3,number,integer}", then + * we expect argument 3 to have type Formattable::kLong. This + * array needs to grow dynamically if the MessageFormat is + * modified. + */ + Formattable::Type* argTypes; + int32_t argTypeCount; + int32_t argTypeCapacity; + + /** + * TRUE if there are different argTypes for the same argument. + * This only matters when the MessageFormat is used in the plain C (umsg_xxx) API + * where the pattern argTypes determine how the va_arg list is read. + */ + UBool hasArgTypeConflicts; + + // Variable-size array management + UBool allocateArgTypes(int32_t capacity, UErrorCode& status); + + /** + * Default Format objects used when no format is specified and a + * numeric or date argument is formatted. These are volatile + * cache objects maintained only for performance. They do not + * participate in operator=(), copy constructor(), nor + * operator==(). + */ + NumberFormat* defaultNumberFormat; + DateFormat* defaultDateFormat; + + UHashtable* cachedFormatters; + UHashtable* customFormatArgStarts; + + PluralSelectorProvider pluralProvider; + PluralSelectorProvider ordinalProvider; + + /** + * Method to retrieve default formats (or NULL on failure). + * These are semantically const, but may modify *this. + */ + const NumberFormat* getDefaultNumberFormat(UErrorCode&) const; + const DateFormat* getDefaultDateFormat(UErrorCode&) const; + + /** + * Finds the word s, in the keyword list and returns the located index. + * @param s the keyword to be searched for. + * @param list the list of keywords to be searched with. + * @return the index of the list which matches the keyword s. + */ + static int32_t findKeyword( const UnicodeString& s, + const char16_t * const *list); + + /** + * Thin wrapper around the format(... AppendableWrapper ...) variant. + * Wraps the destination UnicodeString into an AppendableWrapper and + * supplies default values for some other parameters. + */ + UnicodeString& format(const Formattable* arguments, + const UnicodeString *argumentNames, + int32_t cnt, + UnicodeString& appendTo, + FieldPosition* pos, + UErrorCode& status) const; + + /** + * Formats the arguments and writes the result into the + * AppendableWrapper, updates the field position. + * + * @param msgStart Index to msgPattern part to start formatting from. + * @param plNumber NULL except when formatting a plural argument sub-message + * where a '#' is replaced by the format string for this number. + * @param arguments The formattable objects array. (Must not be NULL.) + * @param argumentNames NULL if numbered values are used. Otherwise the same + * length as "arguments", and each entry is the name of the + * corresponding argument in "arguments". + * @param cnt The length of arguments (and of argumentNames if that is not NULL). + * @param appendTo Output parameter to receive the result. + * The result string is appended to existing contents. + * @param pos Field position status. + * @param success The error code status. + */ + void format(int32_t msgStart, + const void *plNumber, + const Formattable* arguments, + const UnicodeString *argumentNames, + int32_t cnt, + AppendableWrapper& appendTo, + FieldPosition* pos, + UErrorCode& success) const; + + UnicodeString getArgName(int32_t partIndex); + + void setArgStartFormat(int32_t argStart, Format* formatter, UErrorCode& status); + + void setCustomArgStartFormat(int32_t argStart, Format* formatter, UErrorCode& status); + + int32_t nextTopLevelArgStart(int32_t partIndex) const; + + UBool argNameMatches(int32_t partIndex, const UnicodeString& argName, int32_t argNumber); + + void cacheExplicitFormats(UErrorCode& status); + + Format* createAppropriateFormat(UnicodeString& type, + UnicodeString& style, + Formattable::Type& formattableType, + UParseError& parseError, + UErrorCode& ec); + + const Formattable* getArgFromListByName(const Formattable* arguments, + const UnicodeString *argumentNames, + int32_t cnt, UnicodeString& name) const; + + Formattable* parse(int32_t msgStart, + const UnicodeString& source, + ParsePosition& pos, + int32_t& count, + UErrorCode& ec) const; + + FieldPosition* updateMetaData(AppendableWrapper& dest, int32_t prevLength, + FieldPosition* fp, const Formattable* argId) const; + + /** + * Finds the "other" sub-message. + * @param partIndex the index of the first PluralFormat argument style part. + * @return the "other" sub-message start part index. + */ + int32_t findOtherSubMessage(int32_t partIndex) const; + + /** + * Returns the ARG_START index of the first occurrence of the plural number in a sub-message. + * Returns -1 if it is a REPLACE_NUMBER. + * Returns 0 if there is neither. + */ + int32_t findFirstPluralNumberArg(int32_t msgStart, const UnicodeString &argName) const; + + Format* getCachedFormatter(int32_t argumentNumber) const; + + UnicodeString getLiteralStringUntilNextArgument(int32_t from) const; + + void copyObjects(const MessageFormat& that, UErrorCode& ec); + + void formatComplexSubMessage(int32_t msgStart, + const void *plNumber, + const Formattable* arguments, + const UnicodeString *argumentNames, + int32_t cnt, + AppendableWrapper& appendTo, + UErrorCode& success) const; + + /** + * Convenience method that ought to be in NumberFormat + */ + NumberFormat* createIntegerFormat(const Locale& locale, UErrorCode& status) const; + + /** + * Returns array of argument types in the parsed pattern + * for use in C API. Only for the use of umsg_vformat(). Not + * for public consumption. + * @param listCount Output parameter to receive the size of array + * @return The array of formattable types in the pattern + */ + const Formattable::Type* getArgTypeList(int32_t& listCount) const { + listCount = argTypeCount; + return argTypes; + } + + /** + * Resets the internal MessagePattern, and other associated caches. + */ + void resetPattern(); + + /** + * A DummyFormatter that we use solely to store a NULL value. UHash does + * not support storing NULL values. + */ + class U_I18N_API DummyFormat : public Format { + public: + virtual UBool operator==(const Format&) const; + virtual Format* clone() const; + virtual UnicodeString& format(const Formattable& obj, + UnicodeString& appendTo, + UErrorCode& status) const; + virtual UnicodeString& format(const Formattable&, + UnicodeString& appendTo, + FieldPosition&, + UErrorCode& status) const; + virtual UnicodeString& format(const Formattable& obj, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + virtual void parseObject(const UnicodeString&, + Formattable&, + ParsePosition&) const; + }; + + friend class MessageFormatAdapter; // getFormatTypeList() access +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _MSGFMT +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/normalizer2.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/normalizer2.h new file mode 100755 index 00000000..8a6d7138 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/normalizer2.h @@ -0,0 +1,774 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 2009-2013, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: normalizer2.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2009nov22 +* created by: Markus W. Scherer +*/ + +#ifndef __NORMALIZER2_H__ +#define __NORMALIZER2_H__ + +/** + * \file + * \brief C++ API: New API for Unicode Normalization. + */ + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_NORMALIZATION + +#include "unicode/stringpiece.h" +#include "unicode/uniset.h" +#include "unicode/unistr.h" +#include "unicode/unorm2.h" + +U_NAMESPACE_BEGIN + +class ByteSink; + +/** + * Unicode normalization functionality for standard Unicode normalization or + * for using custom mapping tables. + * All instances of this class are unmodifiable/immutable. + * Instances returned by getInstance() are singletons that must not be deleted by the caller. + * The Normalizer2 class is not intended for public subclassing. + * + * The primary functions are to produce a normalized string and to detect whether + * a string is already normalized. + * The most commonly used normalization forms are those defined in + * http://www.unicode.org/unicode/reports/tr15/ + * However, this API supports additional normalization forms for specialized purposes. + * For example, NFKC_Casefold is provided via getInstance("nfkc_cf", COMPOSE) + * and can be used in implementations of UTS #46. + * + * Not only are the standard compose and decompose modes supplied, + * but additional modes are provided as documented in the Mode enum. + * + * Some of the functions in this class identify normalization boundaries. + * At a normalization boundary, the portions of the string + * before it and starting from it do not interact and can be handled independently. + * + * The spanQuickCheckYes() stops at a normalization boundary. + * When the goal is a normalized string, then the text before the boundary + * can be copied, and the remainder can be processed with normalizeSecondAndAppend(). + * + * The hasBoundaryBefore(), hasBoundaryAfter() and isInert() functions test whether + * a character is guaranteed to be at a normalization boundary, + * regardless of context. + * This is used for moving from one normalization boundary to the next + * or preceding boundary, and for performing iterative normalization. + * + * Iterative normalization is useful when only a small portion of a + * longer string needs to be processed. + * For example, in ICU, iterative normalization is used by the NormalizationTransliterator + * (to avoid replacing already-normalized text) and ucol_nextSortKeyPart() + * (to process only the substring for which sort key bytes are computed). + * + * The set of normalization boundaries returned by these functions may not be + * complete: There may be more boundaries that could be returned. + * Different functions may return different boundaries. + * @stable ICU 4.4 + */ +class U_COMMON_API Normalizer2 : public UObject { +public: + /** + * Destructor. + * @stable ICU 4.4 + */ + ~Normalizer2(); + + /** + * Returns a Normalizer2 instance for Unicode NFC normalization. + * Same as getInstance(NULL, "nfc", UNORM2_COMPOSE, errorCode). + * Returns an unmodifiable singleton instance. Do not delete it. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the requested Normalizer2, if successful + * @stable ICU 49 + */ + static const Normalizer2 * + getNFCInstance(UErrorCode &errorCode); + + /** + * Returns a Normalizer2 instance for Unicode NFD normalization. + * Same as getInstance(NULL, "nfc", UNORM2_DECOMPOSE, errorCode). + * Returns an unmodifiable singleton instance. Do not delete it. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the requested Normalizer2, if successful + * @stable ICU 49 + */ + static const Normalizer2 * + getNFDInstance(UErrorCode &errorCode); + + /** + * Returns a Normalizer2 instance for Unicode NFKC normalization. + * Same as getInstance(NULL, "nfkc", UNORM2_COMPOSE, errorCode). + * Returns an unmodifiable singleton instance. Do not delete it. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the requested Normalizer2, if successful + * @stable ICU 49 + */ + static const Normalizer2 * + getNFKCInstance(UErrorCode &errorCode); + + /** + * Returns a Normalizer2 instance for Unicode NFKD normalization. + * Same as getInstance(NULL, "nfkc", UNORM2_DECOMPOSE, errorCode). + * Returns an unmodifiable singleton instance. Do not delete it. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the requested Normalizer2, if successful + * @stable ICU 49 + */ + static const Normalizer2 * + getNFKDInstance(UErrorCode &errorCode); + + /** + * Returns a Normalizer2 instance for Unicode NFKC_Casefold normalization. + * Same as getInstance(NULL, "nfkc_cf", UNORM2_COMPOSE, errorCode). + * Returns an unmodifiable singleton instance. Do not delete it. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the requested Normalizer2, if successful + * @stable ICU 49 + */ + static const Normalizer2 * + getNFKCCasefoldInstance(UErrorCode &errorCode); + + /** + * Returns a Normalizer2 instance which uses the specified data file + * (packageName/name similar to ucnv_openPackage() and ures_open()/ResourceBundle) + * and which composes or decomposes text according to the specified mode. + * Returns an unmodifiable singleton instance. Do not delete it. + * + * Use packageName=NULL for data files that are part of ICU's own data. + * Use name="nfc" and UNORM2_COMPOSE/UNORM2_DECOMPOSE for Unicode standard NFC/NFD. + * Use name="nfkc" and UNORM2_COMPOSE/UNORM2_DECOMPOSE for Unicode standard NFKC/NFKD. + * Use name="nfkc_cf" and UNORM2_COMPOSE for Unicode standard NFKC_CF=NFKC_Casefold. + * + * @param packageName NULL for ICU built-in data, otherwise application data package name + * @param name "nfc" or "nfkc" or "nfkc_cf" or name of custom data file + * @param mode normalization mode (compose or decompose etc.) + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the requested Normalizer2, if successful + * @stable ICU 4.4 + */ + static const Normalizer2 * + getInstance(const char *packageName, + const char *name, + UNormalization2Mode mode, + UErrorCode &errorCode); + + /** + * Returns the normalized form of the source string. + * @param src source string + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return normalized src + * @stable ICU 4.4 + */ + UnicodeString + normalize(const UnicodeString &src, UErrorCode &errorCode) const { + UnicodeString result; + normalize(src, result, errorCode); + return result; + } + /** + * Writes the normalized form of the source string to the destination string + * (replacing its contents) and returns the destination string. + * The source and destination strings must be different objects. + * @param src source string + * @param dest destination string; its contents is replaced with normalized src + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return dest + * @stable ICU 4.4 + */ + virtual UnicodeString & + normalize(const UnicodeString &src, + UnicodeString &dest, + UErrorCode &errorCode) const = 0; + + /** + * Normalizes a UTF-8 string and optionally records how source substrings + * relate to changed and unchanged result substrings. + * + * Currently implemented completely only for "compose" modes, + * such as for NFC, NFKC, and NFKC_Casefold + * (UNORM2_COMPOSE and UNORM2_COMPOSE_CONTIGUOUS). + * Otherwise currently converts to & from UTF-16 and does not support edits. + * + * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. + * @param src Source UTF-8 string. + * @param sink A ByteSink to which the normalized UTF-8 result string is written. + * sink.Flush() is called at the end. + * @param edits Records edits for index mapping, working with styled text, + * and getting only changes (if any). + * The Edits contents is undefined if any error occurs. + * This function calls edits->reset() first unless + * options includes U_EDITS_NO_RESET. edits can be nullptr. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @draft ICU 60 + */ + virtual void + normalizeUTF8(uint32_t options, StringPiece src, ByteSink &sink, + Edits *edits, UErrorCode &errorCode) const; + + /** + * Appends the normalized form of the second string to the first string + * (merging them at the boundary) and returns the first string. + * The result is normalized if the first string was normalized. + * The first and second strings must be different objects. + * @param first string, should be normalized + * @param second string, will be normalized + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return first + * @stable ICU 4.4 + */ + virtual UnicodeString & + normalizeSecondAndAppend(UnicodeString &first, + const UnicodeString &second, + UErrorCode &errorCode) const = 0; + /** + * Appends the second string to the first string + * (merging them at the boundary) and returns the first string. + * The result is normalized if both the strings were normalized. + * The first and second strings must be different objects. + * @param first string, should be normalized + * @param second string, should be normalized + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return first + * @stable ICU 4.4 + */ + virtual UnicodeString & + append(UnicodeString &first, + const UnicodeString &second, + UErrorCode &errorCode) const = 0; + + /** + * Gets the decomposition mapping of c. + * Roughly equivalent to normalizing the String form of c + * on a UNORM2_DECOMPOSE Normalizer2 instance, but much faster, and except that this function + * returns FALSE and does not write a string + * if c does not have a decomposition mapping in this instance's data. + * This function is independent of the mode of the Normalizer2. + * @param c code point + * @param decomposition String object which will be set to c's + * decomposition mapping, if there is one. + * @return TRUE if c has a decomposition, otherwise FALSE + * @stable ICU 4.6 + */ + virtual UBool + getDecomposition(UChar32 c, UnicodeString &decomposition) const = 0; + + /** + * Gets the raw decomposition mapping of c. + * + * This is similar to the getDecomposition() method but returns the + * raw decomposition mapping as specified in UnicodeData.txt or + * (for custom data) in the mapping files processed by the gennorm2 tool. + * By contrast, getDecomposition() returns the processed, + * recursively-decomposed version of this mapping. + * + * When used on a standard NFKC Normalizer2 instance, + * getRawDecomposition() returns the Unicode Decomposition_Mapping (dm) property. + * + * When used on a standard NFC Normalizer2 instance, + * it returns the Decomposition_Mapping only if the Decomposition_Type (dt) is Canonical (Can); + * in this case, the result contains either one or two code points (=1..4 char16_ts). + * + * This function is independent of the mode of the Normalizer2. + * The default implementation returns FALSE. + * @param c code point + * @param decomposition String object which will be set to c's + * raw decomposition mapping, if there is one. + * @return TRUE if c has a decomposition, otherwise FALSE + * @stable ICU 49 + */ + virtual UBool + getRawDecomposition(UChar32 c, UnicodeString &decomposition) const; + + /** + * Performs pairwise composition of a & b and returns the composite if there is one. + * + * Returns a composite code point c only if c has a two-way mapping to a+b. + * In standard Unicode normalization, this means that + * c has a canonical decomposition to a+b + * and c does not have the Full_Composition_Exclusion property. + * + * This function is independent of the mode of the Normalizer2. + * The default implementation returns a negative value. + * @param a A (normalization starter) code point. + * @param b Another code point. + * @return The non-negative composite code point if there is one; otherwise a negative value. + * @stable ICU 49 + */ + virtual UChar32 + composePair(UChar32 a, UChar32 b) const; + + /** + * Gets the combining class of c. + * The default implementation returns 0 + * but all standard implementations return the Unicode Canonical_Combining_Class value. + * @param c code point + * @return c's combining class + * @stable ICU 49 + */ + virtual uint8_t + getCombiningClass(UChar32 c) const; + + /** + * Tests if the string is normalized. + * Internally, in cases where the quickCheck() method would return "maybe" + * (which is only possible for the two COMPOSE modes) this method + * resolves to "yes" or "no" to provide a definitive result, + * at the cost of doing more work in those cases. + * @param s input string + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return TRUE if s is normalized + * @stable ICU 4.4 + */ + virtual UBool + isNormalized(const UnicodeString &s, UErrorCode &errorCode) const = 0; + /** + * Tests if the UTF-8 string is normalized. + * Internally, in cases where the quickCheck() method would return "maybe" + * (which is only possible for the two COMPOSE modes) this method + * resolves to "yes" or "no" to provide a definitive result, + * at the cost of doing more work in those cases. + * + * This works for all normalization modes, + * but it is currently optimized for UTF-8 only for "compose" modes, + * such as for NFC, NFKC, and NFKC_Casefold + * (UNORM2_COMPOSE and UNORM2_COMPOSE_CONTIGUOUS). + * For other modes it currently converts to UTF-16 and calls isNormalized(). + * + * @param s UTF-8 input string + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return TRUE if s is normalized + * @draft ICU 60 + */ + virtual UBool + isNormalizedUTF8(StringPiece s, UErrorCode &errorCode) const; + + + /** + * Tests if the string is normalized. + * For the two COMPOSE modes, the result could be "maybe" in cases that + * would take a little more work to resolve definitively. + * Use spanQuickCheckYes() and normalizeSecondAndAppend() for a faster + * combination of quick check + normalization, to avoid + * re-checking the "yes" prefix. + * @param s input string + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return UNormalizationCheckResult + * @stable ICU 4.4 + */ + virtual UNormalizationCheckResult + quickCheck(const UnicodeString &s, UErrorCode &errorCode) const = 0; + + /** + * Returns the end of the normalized substring of the input string. + * In other words, with <code>end=spanQuickCheckYes(s, ec);</code> + * the substring <code>UnicodeString(s, 0, end)</code> + * will pass the quick check with a "yes" result. + * + * The returned end index is usually one or more characters before the + * "no" or "maybe" character: The end index is at a normalization boundary. + * (See the class documentation for more about normalization boundaries.) + * + * When the goal is a normalized string and most input strings are expected + * to be normalized already, then call this method, + * and if it returns a prefix shorter than the input string, + * copy that prefix and use normalizeSecondAndAppend() for the remainder. + * @param s input string + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return "yes" span end index + * @stable ICU 4.4 + */ + virtual int32_t + spanQuickCheckYes(const UnicodeString &s, UErrorCode &errorCode) const = 0; + + /** + * Tests if the character always has a normalization boundary before it, + * regardless of context. + * If true, then the character does not normalization-interact with + * preceding characters. + * In other words, a string containing this character can be normalized + * by processing portions before this character and starting from this + * character independently. + * This is used for iterative normalization. See the class documentation for details. + * @param c character to test + * @return TRUE if c has a normalization boundary before it + * @stable ICU 4.4 + */ + virtual UBool hasBoundaryBefore(UChar32 c) const = 0; + + /** + * Tests if the character always has a normalization boundary after it, + * regardless of context. + * If true, then the character does not normalization-interact with + * following characters. + * In other words, a string containing this character can be normalized + * by processing portions up to this character and after this + * character independently. + * This is used for iterative normalization. See the class documentation for details. + * Note that this operation may be significantly slower than hasBoundaryBefore(). + * @param c character to test + * @return TRUE if c has a normalization boundary after it + * @stable ICU 4.4 + */ + virtual UBool hasBoundaryAfter(UChar32 c) const = 0; + + /** + * Tests if the character is normalization-inert. + * If true, then the character does not change, nor normalization-interact with + * preceding or following characters. + * In other words, a string containing this character can be normalized + * by processing portions before this character and after this + * character independently. + * This is used for iterative normalization. See the class documentation for details. + * Note that this operation may be significantly slower than hasBoundaryBefore(). + * @param c character to test + * @return TRUE if c is normalization-inert + * @stable ICU 4.4 + */ + virtual UBool isInert(UChar32 c) const = 0; +}; + +/** + * Normalization filtered by a UnicodeSet. + * Normalizes portions of the text contained in the filter set and leaves + * portions not contained in the filter set unchanged. + * Filtering is done via UnicodeSet::span(..., USET_SPAN_SIMPLE). + * Not-in-the-filter text is treated as "is normalized" and "quick check yes". + * This class implements all of (and only) the Normalizer2 API. + * An instance of this class is unmodifiable/immutable but is constructed and + * must be destructed by the owner. + * @stable ICU 4.4 + */ +class U_COMMON_API FilteredNormalizer2 : public Normalizer2 { +public: + /** + * Constructs a filtered normalizer wrapping any Normalizer2 instance + * and a filter set. + * Both are aliased and must not be modified or deleted while this object + * is used. + * The filter set should be frozen; otherwise the performance will suffer greatly. + * @param n2 wrapped Normalizer2 instance + * @param filterSet UnicodeSet which determines the characters to be normalized + * @stable ICU 4.4 + */ + FilteredNormalizer2(const Normalizer2 &n2, const UnicodeSet &filterSet) : + norm2(n2), set(filterSet) {} + + /** + * Destructor. + * @stable ICU 4.4 + */ + ~FilteredNormalizer2(); + + /** + * Writes the normalized form of the source string to the destination string + * (replacing its contents) and returns the destination string. + * The source and destination strings must be different objects. + * @param src source string + * @param dest destination string; its contents is replaced with normalized src + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return dest + * @stable ICU 4.4 + */ + virtual UnicodeString & + normalize(const UnicodeString &src, + UnicodeString &dest, + UErrorCode &errorCode) const U_OVERRIDE; + + /** + * Normalizes a UTF-8 string and optionally records how source substrings + * relate to changed and unchanged result substrings. + * + * Currently implemented completely only for "compose" modes, + * such as for NFC, NFKC, and NFKC_Casefold + * (UNORM2_COMPOSE and UNORM2_COMPOSE_CONTIGUOUS). + * Otherwise currently converts to & from UTF-16 and does not support edits. + * + * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. + * @param src Source UTF-8 string. + * @param sink A ByteSink to which the normalized UTF-8 result string is written. + * sink.Flush() is called at the end. + * @param edits Records edits for index mapping, working with styled text, + * and getting only changes (if any). + * The Edits contents is undefined if any error occurs. + * This function calls edits->reset() first unless + * options includes U_EDITS_NO_RESET. edits can be nullptr. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @draft ICU 60 + */ + virtual void + normalizeUTF8(uint32_t options, StringPiece src, ByteSink &sink, + Edits *edits, UErrorCode &errorCode) const U_OVERRIDE; + + /** + * Appends the normalized form of the second string to the first string + * (merging them at the boundary) and returns the first string. + * The result is normalized if the first string was normalized. + * The first and second strings must be different objects. + * @param first string, should be normalized + * @param second string, will be normalized + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return first + * @stable ICU 4.4 + */ + virtual UnicodeString & + normalizeSecondAndAppend(UnicodeString &first, + const UnicodeString &second, + UErrorCode &errorCode) const U_OVERRIDE; + /** + * Appends the second string to the first string + * (merging them at the boundary) and returns the first string. + * The result is normalized if both the strings were normalized. + * The first and second strings must be different objects. + * @param first string, should be normalized + * @param second string, should be normalized + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return first + * @stable ICU 4.4 + */ + virtual UnicodeString & + append(UnicodeString &first, + const UnicodeString &second, + UErrorCode &errorCode) const U_OVERRIDE; + + /** + * Gets the decomposition mapping of c. + * For details see the base class documentation. + * + * This function is independent of the mode of the Normalizer2. + * @param c code point + * @param decomposition String object which will be set to c's + * decomposition mapping, if there is one. + * @return TRUE if c has a decomposition, otherwise FALSE + * @stable ICU 4.6 + */ + virtual UBool + getDecomposition(UChar32 c, UnicodeString &decomposition) const U_OVERRIDE; + + /** + * Gets the raw decomposition mapping of c. + * For details see the base class documentation. + * + * This function is independent of the mode of the Normalizer2. + * @param c code point + * @param decomposition String object which will be set to c's + * raw decomposition mapping, if there is one. + * @return TRUE if c has a decomposition, otherwise FALSE + * @stable ICU 49 + */ + virtual UBool + getRawDecomposition(UChar32 c, UnicodeString &decomposition) const U_OVERRIDE; + + /** + * Performs pairwise composition of a & b and returns the composite if there is one. + * For details see the base class documentation. + * + * This function is independent of the mode of the Normalizer2. + * @param a A (normalization starter) code point. + * @param b Another code point. + * @return The non-negative composite code point if there is one; otherwise a negative value. + * @stable ICU 49 + */ + virtual UChar32 + composePair(UChar32 a, UChar32 b) const U_OVERRIDE; + + /** + * Gets the combining class of c. + * The default implementation returns 0 + * but all standard implementations return the Unicode Canonical_Combining_Class value. + * @param c code point + * @return c's combining class + * @stable ICU 49 + */ + virtual uint8_t + getCombiningClass(UChar32 c) const U_OVERRIDE; + + /** + * Tests if the string is normalized. + * For details see the Normalizer2 base class documentation. + * @param s input string + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return TRUE if s is normalized + * @stable ICU 4.4 + */ + virtual UBool + isNormalized(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE; + /** + * Tests if the UTF-8 string is normalized. + * Internally, in cases where the quickCheck() method would return "maybe" + * (which is only possible for the two COMPOSE modes) this method + * resolves to "yes" or "no" to provide a definitive result, + * at the cost of doing more work in those cases. + * + * This works for all normalization modes, + * but it is currently optimized for UTF-8 only for "compose" modes, + * such as for NFC, NFKC, and NFKC_Casefold + * (UNORM2_COMPOSE and UNORM2_COMPOSE_CONTIGUOUS). + * For other modes it currently converts to UTF-16 and calls isNormalized(). + * + * @param s UTF-8 input string + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return TRUE if s is normalized + * @draft ICU 60 + */ + virtual UBool + isNormalizedUTF8(StringPiece s, UErrorCode &errorCode) const U_OVERRIDE; + /** + * Tests if the string is normalized. + * For details see the Normalizer2 base class documentation. + * @param s input string + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return UNormalizationCheckResult + * @stable ICU 4.4 + */ + virtual UNormalizationCheckResult + quickCheck(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE; + /** + * Returns the end of the normalized substring of the input string. + * For details see the Normalizer2 base class documentation. + * @param s input string + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return "yes" span end index + * @stable ICU 4.4 + */ + virtual int32_t + spanQuickCheckYes(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE; + + /** + * Tests if the character always has a normalization boundary before it, + * regardless of context. + * For details see the Normalizer2 base class documentation. + * @param c character to test + * @return TRUE if c has a normalization boundary before it + * @stable ICU 4.4 + */ + virtual UBool hasBoundaryBefore(UChar32 c) const U_OVERRIDE; + + /** + * Tests if the character always has a normalization boundary after it, + * regardless of context. + * For details see the Normalizer2 base class documentation. + * @param c character to test + * @return TRUE if c has a normalization boundary after it + * @stable ICU 4.4 + */ + virtual UBool hasBoundaryAfter(UChar32 c) const U_OVERRIDE; + + /** + * Tests if the character is normalization-inert. + * For details see the Normalizer2 base class documentation. + * @param c character to test + * @return TRUE if c is normalization-inert + * @stable ICU 4.4 + */ + virtual UBool isInert(UChar32 c) const U_OVERRIDE; +private: + UnicodeString & + normalize(const UnicodeString &src, + UnicodeString &dest, + USetSpanCondition spanCondition, + UErrorCode &errorCode) const; + + void + normalizeUTF8(uint32_t options, const char *src, int32_t length, + ByteSink &sink, Edits *edits, + USetSpanCondition spanCondition, + UErrorCode &errorCode) const; + + UnicodeString & + normalizeSecondAndAppend(UnicodeString &first, + const UnicodeString &second, + UBool doNormalize, + UErrorCode &errorCode) const; + + const Normalizer2 &norm2; + const UnicodeSet &set; +}; + +U_NAMESPACE_END + +#endif // !UCONFIG_NO_NORMALIZATION +#endif // __NORMALIZER2_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/normlzr.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/normlzr.h new file mode 100755 index 00000000..0141058f --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/normlzr.h @@ -0,0 +1,809 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ******************************************************************** + * COPYRIGHT: + * Copyright (c) 1996-2015, International Business Machines Corporation and + * others. All Rights Reserved. + ******************************************************************** + */ + +#ifndef NORMLZR_H +#define NORMLZR_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Unicode Normalization + */ + +#if !UCONFIG_NO_NORMALIZATION + +#include "unicode/chariter.h" +#include "unicode/normalizer2.h" +#include "unicode/unistr.h" +#include "unicode/unorm.h" +#include "unicode/uobject.h" + +U_NAMESPACE_BEGIN +/** + * Old Unicode normalization API. + * + * This API has been replaced by the Normalizer2 class and is only available + * for backward compatibility. This class simply delegates to the Normalizer2 class. + * There is one exception: The new API does not provide a replacement for Normalizer::compare(). + * + * The Normalizer class supports the standard normalization forms described in + * <a href="http://www.unicode.org/unicode/reports/tr15/" target="unicode"> + * Unicode Standard Annex #15: Unicode Normalization Forms</a>. + * + * The Normalizer class consists of two parts: + * - static functions that normalize strings or test if strings are normalized + * - a Normalizer object is an iterator that takes any kind of text and + * provides iteration over its normalized form + * + * The Normalizer class is not suitable for subclassing. + * + * For basic information about normalization forms and details about the C API + * please see the documentation in unorm.h. + * + * The iterator API with the Normalizer constructors and the non-static functions + * use a CharacterIterator as input. It is possible to pass a string which + * is then internally wrapped in a CharacterIterator. + * The input text is not normalized all at once, but incrementally where needed + * (providing efficient random access). + * This allows to pass in a large text but spend only a small amount of time + * normalizing a small part of that text. + * However, if the entire text is normalized, then the iterator will be + * slower than normalizing the entire text at once and iterating over the result. + * A possible use of the Normalizer iterator is also to report an index into the + * original text that is close to where the normalized characters come from. + * + * <em>Important:</em> The iterator API was cleaned up significantly for ICU 2.0. + * The earlier implementation reported the getIndex() inconsistently, + * and previous() could not be used after setIndex(), next(), first(), and current(). + * + * Normalizer allows to start normalizing from anywhere in the input text by + * calling setIndexOnly(), first(), or last(). + * Without calling any of these, the iterator will start at the beginning of the text. + * + * At any time, next() returns the next normalized code point (UChar32), + * with post-increment semantics (like CharacterIterator::next32PostInc()). + * previous() returns the previous normalized code point (UChar32), + * with pre-decrement semantics (like CharacterIterator::previous32()). + * + * current() returns the current code point + * (respectively the one at the newly set index) without moving + * the getIndex(). Note that if the text at the current position + * needs to be normalized, then these functions will do that. + * (This is why current() is not const.) + * It is more efficient to call setIndexOnly() instead, which does not + * normalize. + * + * getIndex() always refers to the position in the input text where the normalized + * code points are returned from. It does not always change with each returned + * code point. + * The code point that is returned from any of the functions + * corresponds to text at or after getIndex(), according to the + * function's iteration semantics (post-increment or pre-decrement). + * + * next() returns a code point from at or after the getIndex() + * from before the next() call. After the next() call, the getIndex() + * might have moved to where the next code point will be returned from + * (from a next() or current() call). + * This is semantically equivalent to array access with array[index++] + * (post-increment semantics). + * + * previous() returns a code point from at or after the getIndex() + * from after the previous() call. + * This is semantically equivalent to array access with array[--index] + * (pre-decrement semantics). + * + * Internally, the Normalizer iterator normalizes a small piece of text + * starting at the getIndex() and ending at a following "safe" index. + * The normalized results is stored in an internal string buffer, and + * the code points are iterated from there. + * With multiple iteration calls, this is repeated until the next piece + * of text needs to be normalized, and the getIndex() needs to be moved. + * + * The following "safe" index, the internal buffer, and the secondary + * iteration index into that buffer are not exposed on the API. + * This also means that it is currently not practical to return to + * a particular, arbitrary position in the text because one would need to + * know, and be able to set, in addition to the getIndex(), at least also the + * current index into the internal buffer. + * It is currently only possible to observe when getIndex() changes + * (with careful consideration of the iteration semantics), + * at which time the internal index will be 0. + * For example, if getIndex() is different after next() than before it, + * then the internal index is 0 and one can return to this getIndex() + * later with setIndexOnly(). + * + * Note: While the setIndex() and getIndex() refer to indices in the + * underlying Unicode input text, the next() and previous() methods + * iterate through characters in the normalized output. + * This means that there is not necessarily a one-to-one correspondence + * between characters returned by next() and previous() and the indices + * passed to and returned from setIndex() and getIndex(). + * It is for this reason that Normalizer does not implement the CharacterIterator interface. + * + * @author Laura Werner, Mark Davis, Markus Scherer + * @stable ICU 2.0 + */ +class U_COMMON_API Normalizer : public UObject { +public: +#ifndef U_HIDE_DEPRECATED_API + /** + * If DONE is returned from an iteration function that returns a code point, + * then there are no more normalization results available. + * @deprecated ICU 56 Use Normalizer2 instead. + */ + enum { + DONE=0xffff + }; + + // Constructors + + /** + * Creates a new <code>Normalizer</code> object for iterating over the + * normalized form of a given string. + * <p> + * @param str The string to be normalized. The normalization + * will start at the beginning of the string. + * + * @param mode The normalization mode. + * @deprecated ICU 56 Use Normalizer2 instead. + */ + Normalizer(const UnicodeString& str, UNormalizationMode mode); + + /** + * Creates a new <code>Normalizer</code> object for iterating over the + * normalized form of a given string. + * <p> + * @param str The string to be normalized. The normalization + * will start at the beginning of the string. + * + * @param length Length of the string, or -1 if NUL-terminated. + * @param mode The normalization mode. + * @deprecated ICU 56 Use Normalizer2 instead. + */ + Normalizer(ConstChar16Ptr str, int32_t length, UNormalizationMode mode); + + /** + * Creates a new <code>Normalizer</code> object for iterating over the + * normalized form of the given text. + * <p> + * @param iter The input text to be normalized. The normalization + * will start at the beginning of the string. + * + * @param mode The normalization mode. + * @deprecated ICU 56 Use Normalizer2 instead. + */ + Normalizer(const CharacterIterator& iter, UNormalizationMode mode); +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Copy constructor. + * @param copy The object to be copied. + * @deprecated ICU 56 Use Normalizer2 instead. + */ + Normalizer(const Normalizer& copy); + + /** + * Destructor + * @deprecated ICU 56 Use Normalizer2 instead. + */ + virtual ~Normalizer(); + + + //------------------------------------------------------------------------- + // Static utility methods + //------------------------------------------------------------------------- + +#ifndef U_HIDE_DEPRECATED_API + /** + * Normalizes a <code>UnicodeString</code> according to the specified normalization mode. + * This is a wrapper for unorm_normalize(), using UnicodeString's. + * + * The <code>options</code> parameter specifies which optional + * <code>Normalizer</code> features are to be enabled for this operation. + * + * @param source the input string to be normalized. + * @param mode the normalization mode + * @param options the optional features to be enabled (0 for no options) + * @param result The normalized string (on output). + * @param status The error code. + * @deprecated ICU 56 Use Normalizer2 instead. + */ + static void U_EXPORT2 normalize(const UnicodeString& source, + UNormalizationMode mode, int32_t options, + UnicodeString& result, + UErrorCode &status); + + /** + * Compose a <code>UnicodeString</code>. + * This is equivalent to normalize() with mode UNORM_NFC or UNORM_NFKC. + * This is a wrapper for unorm_normalize(), using UnicodeString's. + * + * The <code>options</code> parameter specifies which optional + * <code>Normalizer</code> features are to be enabled for this operation. + * + * @param source the string to be composed. + * @param compat Perform compatibility decomposition before composition. + * If this argument is <code>FALSE</code>, only canonical + * decomposition will be performed. + * @param options the optional features to be enabled (0 for no options) + * @param result The composed string (on output). + * @param status The error code. + * @deprecated ICU 56 Use Normalizer2 instead. + */ + static void U_EXPORT2 compose(const UnicodeString& source, + UBool compat, int32_t options, + UnicodeString& result, + UErrorCode &status); + + /** + * Static method to decompose a <code>UnicodeString</code>. + * This is equivalent to normalize() with mode UNORM_NFD or UNORM_NFKD. + * This is a wrapper for unorm_normalize(), using UnicodeString's. + * + * The <code>options</code> parameter specifies which optional + * <code>Normalizer</code> features are to be enabled for this operation. + * + * @param source the string to be decomposed. + * @param compat Perform compatibility decomposition. + * If this argument is <code>FALSE</code>, only canonical + * decomposition will be performed. + * @param options the optional features to be enabled (0 for no options) + * @param result The decomposed string (on output). + * @param status The error code. + * @deprecated ICU 56 Use Normalizer2 instead. + */ + static void U_EXPORT2 decompose(const UnicodeString& source, + UBool compat, int32_t options, + UnicodeString& result, + UErrorCode &status); + + /** + * Performing quick check on a string, to quickly determine if the string is + * in a particular normalization format. + * This is a wrapper for unorm_quickCheck(), using a UnicodeString. + * + * Three types of result can be returned UNORM_YES, UNORM_NO or + * UNORM_MAYBE. Result UNORM_YES indicates that the argument + * string is in the desired normalized format, UNORM_NO determines that + * argument string is not in the desired normalized format. A + * UNORM_MAYBE result indicates that a more thorough check is required, + * the user may have to put the string in its normalized form and compare the + * results. + * @param source string for determining if it is in a normalized format + * @param mode normalization format + * @param status A reference to a UErrorCode to receive any errors + * @return UNORM_YES, UNORM_NO or UNORM_MAYBE + * + * @see isNormalized + * @deprecated ICU 56 Use Normalizer2 instead. + */ + static inline UNormalizationCheckResult + quickCheck(const UnicodeString &source, UNormalizationMode mode, UErrorCode &status); + + /** + * Performing quick check on a string; same as the other version of quickCheck + * but takes an extra options parameter like most normalization functions. + * + * @param source string for determining if it is in a normalized format + * @param mode normalization format + * @param options the optional features to be enabled (0 for no options) + * @param status A reference to a UErrorCode to receive any errors + * @return UNORM_YES, UNORM_NO or UNORM_MAYBE + * + * @see isNormalized + * @deprecated ICU 56 Use Normalizer2 instead. + */ + static UNormalizationCheckResult + quickCheck(const UnicodeString &source, UNormalizationMode mode, int32_t options, UErrorCode &status); + + /** + * Test if a string is in a given normalization form. + * This is semantically equivalent to source.equals(normalize(source, mode)) . + * + * Unlike unorm_quickCheck(), this function returns a definitive result, + * never a "maybe". + * For NFD, NFKD, and FCD, both functions work exactly the same. + * For NFC and NFKC where quickCheck may return "maybe", this function will + * perform further tests to arrive at a TRUE/FALSE result. + * + * @param src String that is to be tested if it is in a normalization format. + * @param mode Which normalization form to test for. + * @param errorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return Boolean value indicating whether the source string is in the + * "mode" normalization form. + * + * @see quickCheck + * @deprecated ICU 56 Use Normalizer2 instead. + */ + static inline UBool + isNormalized(const UnicodeString &src, UNormalizationMode mode, UErrorCode &errorCode); + + /** + * Test if a string is in a given normalization form; same as the other version of isNormalized + * but takes an extra options parameter like most normalization functions. + * + * @param src String that is to be tested if it is in a normalization format. + * @param mode Which normalization form to test for. + * @param options the optional features to be enabled (0 for no options) + * @param errorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return Boolean value indicating whether the source string is in the + * "mode" normalization form. + * + * @see quickCheck + * @deprecated ICU 56 Use Normalizer2 instead. + */ + static UBool + isNormalized(const UnicodeString &src, UNormalizationMode mode, int32_t options, UErrorCode &errorCode); + + /** + * Concatenate normalized strings, making sure that the result is normalized as well. + * + * If both the left and the right strings are in + * the normalization form according to "mode/options", + * then the result will be + * + * \code + * dest=normalize(left+right, mode, options) + * \endcode + * + * For details see unorm_concatenate in unorm.h. + * + * @param left Left source string. + * @param right Right source string. + * @param result The output string. + * @param mode The normalization mode. + * @param options A bit set of normalization options. + * @param errorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return result + * + * @see unorm_concatenate + * @see normalize + * @see unorm_next + * @see unorm_previous + * + * @deprecated ICU 56 Use Normalizer2 instead. + */ + static UnicodeString & + U_EXPORT2 concatenate(const UnicodeString &left, const UnicodeString &right, + UnicodeString &result, + UNormalizationMode mode, int32_t options, + UErrorCode &errorCode); +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Compare two strings for canonical equivalence. + * Further options include case-insensitive comparison and + * code point order (as opposed to code unit order). + * + * Canonical equivalence between two strings is defined as their normalized + * forms (NFD or NFC) being identical. + * This function compares strings incrementally instead of normalizing + * (and optionally case-folding) both strings entirely, + * improving performance significantly. + * + * Bulk normalization is only necessary if the strings do not fulfill the FCD + * conditions. Only in this case, and only if the strings are relatively long, + * is memory allocated temporarily. + * For FCD strings and short non-FCD strings there is no memory allocation. + * + * Semantically, this is equivalent to + * strcmp[CodePointOrder](NFD(foldCase(s1)), NFD(foldCase(s2))) + * where code point order and foldCase are all optional. + * + * UAX 21 2.5 Caseless Matching specifies that for a canonical caseless match + * the case folding must be performed first, then the normalization. + * + * @param s1 First source string. + * @param s2 Second source string. + * + * @param options A bit set of options: + * - U_FOLD_CASE_DEFAULT or 0 is used for default options: + * Case-sensitive comparison in code unit order, and the input strings + * are quick-checked for FCD. + * + * - UNORM_INPUT_IS_FCD + * Set if the caller knows that both s1 and s2 fulfill the FCD conditions. + * If not set, the function will quickCheck for FCD + * and normalize if necessary. + * + * - U_COMPARE_CODE_POINT_ORDER + * Set to choose code point order instead of code unit order + * (see u_strCompare for details). + * + * - U_COMPARE_IGNORE_CASE + * Set to compare strings case-insensitively using case folding, + * instead of case-sensitively. + * If set, then the following case folding options are used. + * + * - Options as used with case-insensitive comparisons, currently: + * + * - U_FOLD_CASE_EXCLUDE_SPECIAL_I + * (see u_strCaseCompare for details) + * + * - regular normalization options shifted left by UNORM_COMPARE_NORM_OPTIONS_SHIFT + * + * @param errorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return <0 or 0 or >0 as usual for string comparisons + * + * @see unorm_compare + * @see normalize + * @see UNORM_FCD + * @see u_strCompare + * @see u_strCaseCompare + * + * @stable ICU 2.2 + */ + static inline int32_t + compare(const UnicodeString &s1, const UnicodeString &s2, + uint32_t options, + UErrorCode &errorCode); + +#ifndef U_HIDE_DEPRECATED_API + //------------------------------------------------------------------------- + // Iteration API + //------------------------------------------------------------------------- + + /** + * Return the current character in the normalized text. + * current() may need to normalize some text at getIndex(). + * The getIndex() is not changed. + * + * @return the current normalized code point + * @deprecated ICU 56 Use Normalizer2 instead. + */ + UChar32 current(void); + + /** + * Return the first character in the normalized text. + * This is equivalent to setIndexOnly(startIndex()) followed by next(). + * (Post-increment semantics.) + * + * @return the first normalized code point + * @deprecated ICU 56 Use Normalizer2 instead. + */ + UChar32 first(void); + + /** + * Return the last character in the normalized text. + * This is equivalent to setIndexOnly(endIndex()) followed by previous(). + * (Pre-decrement semantics.) + * + * @return the last normalized code point + * @deprecated ICU 56 Use Normalizer2 instead. + */ + UChar32 last(void); + + /** + * Return the next character in the normalized text. + * (Post-increment semantics.) + * If the end of the text has already been reached, DONE is returned. + * The DONE value could be confused with a U+FFFF non-character code point + * in the text. If this is possible, you can test getIndex()<endIndex() + * before calling next(), or (getIndex()<endIndex() || last()!=DONE) + * after calling next(). (Calling last() will change the iterator state!) + * + * The C API unorm_next() is more efficient and does not have this ambiguity. + * + * @return the next normalized code point + * @deprecated ICU 56 Use Normalizer2 instead. + */ + UChar32 next(void); + + /** + * Return the previous character in the normalized text and decrement. + * (Pre-decrement semantics.) + * If the beginning of the text has already been reached, DONE is returned. + * The DONE value could be confused with a U+FFFF non-character code point + * in the text. If this is possible, you can test + * (getIndex()>startIndex() || first()!=DONE). (Calling first() will change + * the iterator state!) + * + * The C API unorm_previous() is more efficient and does not have this ambiguity. + * + * @return the previous normalized code point + * @deprecated ICU 56 Use Normalizer2 instead. + */ + UChar32 previous(void); + + /** + * Set the iteration position in the input text that is being normalized, + * without any immediate normalization. + * After setIndexOnly(), getIndex() will return the same index that is + * specified here. + * + * @param index the desired index in the input text. + * @deprecated ICU 56 Use Normalizer2 instead. + */ + void setIndexOnly(int32_t index); + + /** + * Reset the index to the beginning of the text. + * This is equivalent to setIndexOnly(startIndex)). + * @deprecated ICU 56 Use Normalizer2 instead. + */ + void reset(void); + + /** + * Retrieve the current iteration position in the input text that is + * being normalized. + * + * A following call to next() will return a normalized code point from + * the input text at or after this index. + * + * After a call to previous(), getIndex() will point at or before the + * position in the input text where the normalized code point + * was returned from with previous(). + * + * @return the current index in the input text + * @deprecated ICU 56 Use Normalizer2 instead. + */ + int32_t getIndex(void) const; + + /** + * Retrieve the index of the start of the input text. This is the begin index + * of the <code>CharacterIterator</code> or the start (i.e. index 0) of the string + * over which this <code>Normalizer</code> is iterating. + * + * @return the smallest index in the input text where the Normalizer operates + * @deprecated ICU 56 Use Normalizer2 instead. + */ + int32_t startIndex(void) const; + + /** + * Retrieve the index of the end of the input text. This is the end index + * of the <code>CharacterIterator</code> or the length of the string + * over which this <code>Normalizer</code> is iterating. + * This end index is exclusive, i.e., the Normalizer operates only on characters + * before this index. + * + * @return the first index in the input text where the Normalizer does not operate + * @deprecated ICU 56 Use Normalizer2 instead. + */ + int32_t endIndex(void) const; + + /** + * Returns TRUE when both iterators refer to the same character in the same + * input text. + * + * @param that a Normalizer object to compare this one to + * @return comparison result + * @deprecated ICU 56 Use Normalizer2 instead. + */ + UBool operator==(const Normalizer& that) const; + + /** + * Returns FALSE when both iterators refer to the same character in the same + * input text. + * + * @param that a Normalizer object to compare this one to + * @return comparison result + * @deprecated ICU 56 Use Normalizer2 instead. + */ + inline UBool operator!=(const Normalizer& that) const; + + /** + * Returns a pointer to a new Normalizer that is a clone of this one. + * The caller is responsible for deleting the new clone. + * @return a pointer to a new Normalizer + * @deprecated ICU 56 Use Normalizer2 instead. + */ + Normalizer* clone(void) const; + + /** + * Generates a hash code for this iterator. + * + * @return the hash code + * @deprecated ICU 56 Use Normalizer2 instead. + */ + int32_t hashCode(void) const; + + //------------------------------------------------------------------------- + // Property access methods + //------------------------------------------------------------------------- + + /** + * Set the normalization mode for this object. + * <p> + * <b>Note:</b>If the normalization mode is changed while iterating + * over a string, calls to {@link #next() } and {@link #previous() } may + * return previously buffers characters in the old normalization mode + * until the iteration is able to re-sync at the next base character. + * It is safest to call {@link #setIndexOnly }, {@link #reset() }, + * {@link #setText }, {@link #first() }, + * {@link #last() }, etc. after calling <code>setMode</code>. + * <p> + * @param newMode the new mode for this <code>Normalizer</code>. + * @see #getUMode + * @deprecated ICU 56 Use Normalizer2 instead. + */ + void setMode(UNormalizationMode newMode); + + /** + * Return the normalization mode for this object. + * + * This is an unusual name because there used to be a getMode() that + * returned a different type. + * + * @return the mode for this <code>Normalizer</code> + * @see #setMode + * @deprecated ICU 56 Use Normalizer2 instead. + */ + UNormalizationMode getUMode(void) const; + + /** + * Set options that affect this <code>Normalizer</code>'s operation. + * Options do not change the basic composition or decomposition operation + * that is being performed, but they control whether + * certain optional portions of the operation are done. + * Currently the only available option is obsolete. + * + * It is possible to specify multiple options that are all turned on or off. + * + * @param option the option(s) whose value is/are to be set. + * @param value the new setting for the option. Use <code>TRUE</code> to + * turn the option(s) on and <code>FALSE</code> to turn it/them off. + * + * @see #getOption + * @deprecated ICU 56 Use Normalizer2 instead. + */ + void setOption(int32_t option, + UBool value); + + /** + * Determine whether an option is turned on or off. + * If multiple options are specified, then the result is TRUE if any + * of them are set. + * <p> + * @param option the option(s) that are to be checked + * @return TRUE if any of the option(s) are set + * @see #setOption + * @deprecated ICU 56 Use Normalizer2 instead. + */ + UBool getOption(int32_t option) const; + + /** + * Set the input text over which this <code>Normalizer</code> will iterate. + * The iteration position is set to the beginning. + * + * @param newText a string that replaces the current input text + * @param status a UErrorCode + * @deprecated ICU 56 Use Normalizer2 instead. + */ + void setText(const UnicodeString& newText, + UErrorCode &status); + + /** + * Set the input text over which this <code>Normalizer</code> will iterate. + * The iteration position is set to the beginning. + * + * @param newText a CharacterIterator object that replaces the current input text + * @param status a UErrorCode + * @deprecated ICU 56 Use Normalizer2 instead. + */ + void setText(const CharacterIterator& newText, + UErrorCode &status); + + /** + * Set the input text over which this <code>Normalizer</code> will iterate. + * The iteration position is set to the beginning. + * + * @param newText a string that replaces the current input text + * @param length the length of the string, or -1 if NUL-terminated + * @param status a UErrorCode + * @deprecated ICU 56 Use Normalizer2 instead. + */ + void setText(ConstChar16Ptr newText, + int32_t length, + UErrorCode &status); + /** + * Copies the input text into the UnicodeString argument. + * + * @param result Receives a copy of the text under iteration. + * @deprecated ICU 56 Use Normalizer2 instead. + */ + void getText(UnicodeString& result); + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * @returns a UClassID for this class. + * @deprecated ICU 56 Use Normalizer2 instead. + */ + static UClassID U_EXPORT2 getStaticClassID(); +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * @return a UClassID for the actual class. + * @deprecated ICU 56 Use Normalizer2 instead. + */ + virtual UClassID getDynamicClassID() const; + +private: + //------------------------------------------------------------------------- + // Private functions + //------------------------------------------------------------------------- + + Normalizer(); // default constructor not implemented + Normalizer &operator=(const Normalizer &that); // assignment operator not implemented + + // Private utility methods for iteration + // For documentation, see the source code + UBool nextNormalize(); + UBool previousNormalize(); + + void init(); + void clearBuffer(void); + + //------------------------------------------------------------------------- + // Private data + //------------------------------------------------------------------------- + + FilteredNormalizer2*fFilteredNorm2; // owned if not NULL + const Normalizer2 *fNorm2; // not owned; may be equal to fFilteredNorm2 + UNormalizationMode fUMode; // deprecated + int32_t fOptions; + + // The input text and our position in it + CharacterIterator *text; + + // The normalization buffer is the result of normalization + // of the source in [currentIndex..nextIndex[ . + int32_t currentIndex, nextIndex; + + // A buffer for holding intermediate results + UnicodeString buffer; + int32_t bufferPos; +}; + +//------------------------------------------------------------------------- +// Inline implementations +//------------------------------------------------------------------------- + +#ifndef U_HIDE_DEPRECATED_API +inline UBool +Normalizer::operator!= (const Normalizer& other) const +{ return ! operator==(other); } + +inline UNormalizationCheckResult +Normalizer::quickCheck(const UnicodeString& source, + UNormalizationMode mode, + UErrorCode &status) { + return quickCheck(source, mode, 0, status); +} + +inline UBool +Normalizer::isNormalized(const UnicodeString& source, + UNormalizationMode mode, + UErrorCode &status) { + return isNormalized(source, mode, 0, status); +} +#endif /* U_HIDE_DEPRECATED_API */ + +inline int32_t +Normalizer::compare(const UnicodeString &s1, const UnicodeString &s2, + uint32_t options, + UErrorCode &errorCode) { + // all argument checking is done in unorm_compare + return unorm_compare(toUCharPtr(s1.getBuffer()), s1.length(), + toUCharPtr(s2.getBuffer()), s2.length(), + options, + &errorCode); +} + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_NORMALIZATION */ + +#endif // NORMLZR_H diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/nounit.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/nounit.h new file mode 100755 index 00000000..290e77e8 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/nounit.h @@ -0,0 +1,111 @@ +// © 2017 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ******************************************************************************* + * Copyright (C) 2009-2017, International Business Machines Corporation, * + * Google, and others. All Rights Reserved. * + ******************************************************************************* + */ + +#ifndef __NOUNIT_H__ +#define __NOUNIT_H__ + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/measunit.h" + +/** + * \file + * \brief C++ API: units for percent and permille + */ + +U_NAMESPACE_BEGIN + +#ifndef U_HIDE_DRAFT_API +/** + * Dimensionless unit for percent and permille. + * @see NumberFormatter + * @draft ICU 60 + */ +class U_I18N_API NoUnit: public MeasureUnit { +public: + /** + * Returns an instance for the base unit (dimensionless and no scaling). + * + * @return a NoUnit instance + * @draft ICU 60 + */ + static NoUnit U_EXPORT2 base(); + + /** + * Returns an instance for percent, or 1/100 of a base unit. + * + * @return a NoUnit instance + * @draft ICU 60 + */ + static NoUnit U_EXPORT2 percent(); + + /** + * Returns an instance for permille, or 1/1000 of a base unit. + * + * @return a NoUnit instance + * @draft ICU 60 + */ + static NoUnit U_EXPORT2 permille(); + + /** + * Copy operator. + * @draft ICU 60 + */ + NoUnit(const NoUnit& other); + + /** + * Return a polymorphic clone of this object. The result will + * have the same class as returned by getDynamicClassID(). + * @draft ICU 60 + */ + virtual UObject* clone() const; + + /** + * Returns a unique class ID for this object POLYMORPHICALLY. + * This method implements a simple form of RTTI used by ICU. + * @return The class ID for this object. All objects of a given + * class have the same class ID. Objects of other classes have + * different class IDs. + * @draft ICU 60 + */ + virtual UClassID getDynamicClassID() const; + + /** + * Returns the class ID for this class. This is used to compare to + * the return value of getDynamicClassID(). + * @return The class ID for all objects of this class. + * @draft ICU 60 + */ + static UClassID U_EXPORT2 getStaticClassID(); + + /** + * Destructor. + * @draft ICU 60 + */ + virtual ~NoUnit(); + +private: + /** + * Constructor + * @internal (private) + */ + NoUnit(const char* subtype); + +}; +#endif /* U_HIDE_DRAFT_API */ + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // __NOUNIT_H__ +//eof +// diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/numberformatter.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/numberformatter.h new file mode 100755 index 00000000..3fbb33cc --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/numberformatter.h @@ -0,0 +1,2194 @@ +// © 2017 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING +#ifndef __NUMBERFORMATTER_H__ +#define __NUMBERFORMATTER_H__ + +#include "unicode/appendable.h" +#include "unicode/dcfmtsym.h" +#include "unicode/currunit.h" +#include "unicode/fieldpos.h" +#include "unicode/fpositer.h" +#include "unicode/measunit.h" +#include "unicode/nounit.h" +#include "unicode/plurrule.h" +#include "unicode/ucurr.h" +#include "unicode/unum.h" + +#ifndef U_HIDE_DRAFT_API + +/** + * \file + * \brief C++ API: Library for localized number formatting introduced in ICU 60. + * + * This library was introduced in ICU 60 to simplify the process of formatting localized number strings. + * Basic usage examples: + * + * <pre> + * // Most basic usage: + * NumberFormatter::withLocale(...).format(123).toString(); // 1,234 in en-US + * + * // Custom notation, unit, and rounding strategy: + * NumberFormatter::with() + * .notation(Notation::compactShort()) + * .unit(CurrencyUnit("EUR", status)) + * .rounding(Rounder::maxDigits(2)) + * .locale(...) + * .format(1234) + * .toString(); // €1.2K in en-US + * + * // Create a formatter in a singleton for use later: + * static const LocalizedNumberFormatter formatter = NumberFormatter::withLocale(...) + * .unit(NoUnit::percent()) + * .rounding(Rounder::fixedFraction(3)); + * formatter.format(5.9831).toString(); // 5.983% in en-US + * + * // Create a "template" in a singleton but without setting a locale until the call site: + * static const UnlocalizedNumberFormatter template = NumberFormatter::with() + * .sign(UNumberSignDisplay::UNUM_SIGN_ALWAYS) + * .adoptUnit(MeasureUnit::createMeter(status)) + * .unitWidth(UNumberUnitWidth::UNUM_UNIT_WIDTH_FULL_NAME); + * template.locale(...).format(1234).toString(); // +1,234 meters in en-US + * </pre> + * + * <p> + * This API offers more features than DecimalFormat and is geared toward new users of ICU. + * + * <p> + * NumberFormatter instances are immutable and thread safe. This means that invoking a configuration method has no + * effect on the receiving instance; you must store and use the new number formatter instance it returns instead. + * + * <pre> + * UnlocalizedNumberFormatter formatter = UnlocalizedNumberFormatter::with().notation(Notation::scientific()); + * formatter.rounding(Rounder.maxFraction(2)); // does nothing! + * formatter.locale(Locale.getEnglish()).format(9.8765).toString(); // prints "9.8765E0", not "9.88E0" + * </pre> + * + * <p> + * This API is based on the <em>fluent</em> design pattern popularized by libraries such as Google's Guava. For + * extensive details on the design of this API, read <a href="https://goo.gl/szi5VB">the design doc</a>. + * + * @author Shane Carr + */ + +/** + * An enum declaring how to render units, including currencies. Example outputs when formatting 123 USD and 123 + * meters in <em>en-CA</em>: + * + * <p> + * <ul> + * <li>NARROW*: "$123.00" and "123 m" + * <li>SHORT: "US$ 123.00" and "123 m" + * <li>FULL_NAME: "123.00 US dollars" and "123 meters" + * <li>ISO_CODE: "USD 123.00" and undefined behavior + * <li>HIDDEN: "123.00" and "123" + * </ul> + * + * <p> + * This enum is similar to {@link com.ibm.icu.text.MeasureFormat.FormatWidth}. + * + * @draft ICU 60 + */ +typedef enum UNumberUnitWidth { + /** + * Print an abbreviated version of the unit name. Similar to SHORT, but always use the shortest available + * abbreviation or symbol. This option can be used when the context hints at the identity of the unit. For more + * information on the difference between NARROW and SHORT, see SHORT. + * + * <p> + * In CLDR, this option corresponds to the "Narrow" format for measure units and the "¤¤¤¤¤" placeholder for + * currencies. + * + * @draft ICU 60 + */ + UNUM_UNIT_WIDTH_NARROW, + + /** + * Print an abbreviated version of the unit name. Similar to NARROW, but use a slightly wider abbreviation or + * symbol when there may be ambiguity. This is the default behavior. + * + * <p> + * For example, in <em>es-US</em>, the SHORT form for Fahrenheit is "{0} °F", but the NARROW form is "{0}°", + * since Fahrenheit is the customary unit for temperature in that locale. + * + * <p> + * In CLDR, this option corresponds to the "Short" format for measure units and the "¤" placeholder for + * currencies. + * + * @draft ICU 60 + */ + UNUM_UNIT_WIDTH_SHORT, + + /** + * Print the full name of the unit, without any abbreviations. + * + * <p> + * In CLDR, this option corresponds to the default format for measure units and the "¤¤¤" placeholder for + * currencies. + * + * @draft ICU 60 + */ + UNUM_UNIT_WIDTH_FULL_NAME, + + /** + * Use the three-digit ISO XXX code in place of the symbol for displaying currencies. The behavior of this + * option is currently undefined for use with measure units. + * + * <p> + * In CLDR, this option corresponds to the "¤¤" placeholder for currencies. + * + * @draft ICU 60 + */ + UNUM_UNIT_WIDTH_ISO_CODE, + + /** + * Format the number according to the specified unit, but do not display the unit. For currencies, apply + * monetary symbols and formats as with SHORT, but omit the currency symbol. For measure units, the behavior is + * equivalent to not specifying the unit at all. + * + * @draft ICU 60 + */ + UNUM_UNIT_WIDTH_HIDDEN + +#ifndef U_HIDE_INTERNAL_API + , + /** + * One more than the highest UNumberUnitWidth value. + * + * @internal ICU 60: The numeric value may change over time; see ICU ticket #12420. + */ + UNUM_UNIT_WIDTH_COUNT +#endif // U_HIDE_INTERNAL_API +} UNumberUnitWidth; + +/** + * An enum declaring the strategy for when and how to display grouping separators (i.e., the + * separator, often a comma or period, after every 2-3 powers of ten). The choices are several + * pre-built strategies for different use cases that employ locale data whenever possible. Example + * outputs for 1234 and 1234567 in <em>en-IN</em>: + * + * <ul> + * <li>OFF: 1234 and 12345 + * <li>MIN2: 1234 and 12,34,567 + * <li>AUTO: 1,234 and 12,34,567 + * <li>ON_ALIGNED: 1,234 and 12,34,567 + * <li>THOUSANDS: 1,234 and 1,234,567 + * </ul> + * + * <p> + * The default is AUTO, which displays grouping separators unless the locale data says that grouping + * is not customary. To force grouping for all numbers greater than 1000 consistently across locales, + * use ON_ALIGNED. On the other hand, to display grouping less frequently than the default, use MIN2 + * or OFF. See the docs of each option for details. + * + * <p> + * Note: This enum specifies the strategy for grouping sizes. To set which character to use as the + * grouping separator, use the "symbols" setter. + * + * @draft ICU 61 + */ +typedef enum UGroupingStrategy { + /** + * Do not display grouping separators in any locale. + * + * @draft ICU 61 + */ + UNUM_GROUPING_OFF, + + /** + * Display grouping using locale defaults, except do not show grouping on values smaller than + * 10000 (such that there is a <em>minimum of two digits</em> before the first separator). + * + * <p> + * Note that locales may restrict grouping separators to be displayed only on 1 million or + * greater (for example, ee and hu) or disable grouping altogether (for example, bg currency). + * + * <p> + * Locale data is used to determine whether to separate larger numbers into groups of 2 + * (customary in South Asia) or groups of 3 (customary in Europe and the Americas). + * + * @draft ICU 61 + */ + UNUM_GROUPING_MIN2, + + /** + * Display grouping using the default strategy for all locales. This is the default behavior. + * + * <p> + * Note that locales may restrict grouping separators to be displayed only on 1 million or + * greater (for example, ee and hu) or disable grouping altogether (for example, bg currency). + * + * <p> + * Locale data is used to determine whether to separate larger numbers into groups of 2 + * (customary in South Asia) or groups of 3 (customary in Europe and the Americas). + * + * @draft ICU 61 + */ + UNUM_GROUPING_AUTO, + + /** + * Always display the grouping separator on values of at least 1000. + * + * <p> + * This option ignores the locale data that restricts or disables grouping, described in MIN2 and + * AUTO. This option may be useful to normalize the alignment of numbers, such as in a + * spreadsheet. + * + * <p> + * Locale data is used to determine whether to separate larger numbers into groups of 2 + * (customary in South Asia) or groups of 3 (customary in Europe and the Americas). + * + * @draft ICU 61 + */ + UNUM_GROUPING_ON_ALIGNED, + + /** + * Use the Western defaults: groups of 3 and enabled for all numbers 1000 or greater. Do not use + * locale data for determining the grouping strategy. + * + * @draft ICU 61 + */ + UNUM_GROUPING_THOUSANDS + +} UGroupingStrategy; + +/** + * An enum declaring how to denote positive and negative numbers. Example outputs when formatting + * 123, 0, and -123 in <em>en-US</em>: + * + * <ul> + * <li>AUTO: "123", "0", and "-123" + * <li>ALWAYS: "+123", "+0", and "-123" + * <li>NEVER: "123", "0", and "123" + * <li>ACCOUNTING: "$123", "$0", and "($123)" + * <li>ACCOUNTING_ALWAYS: "+$123", "+$0", and "($123)" + * <li>EXCEPT_ZERO: "+123", "0", and "-123" + * <li>ACCOUNTING_EXCEPT_ZERO: "+$123", "$0", and "($123)" + * </ul> + * + * <p> + * The exact format, including the position and the code point of the sign, differ by locale. + * + * @draft ICU 60 + */ +typedef enum UNumberSignDisplay { + /** + * Show the minus sign on negative numbers, and do not show the sign on positive numbers. This is the default + * behavior. + * + * @draft ICU 60 + */ + UNUM_SIGN_AUTO, + + /** + * Show the minus sign on negative numbers and the plus sign on positive numbers, including zero. + * To hide the sign on zero, see {@link UNUM_SIGN_EXCEPT_ZERO}. + * + * @draft ICU 60 + */ + UNUM_SIGN_ALWAYS, + + /** + * Do not show the sign on positive or negative numbers. + * + * @draft ICU 60 + */ + UNUM_SIGN_NEVER, + + /** + * Use the locale-dependent accounting format on negative numbers, and do not show the sign on positive numbers. + * + * <p> + * The accounting format is defined in CLDR and varies by locale; in many Western locales, the format is a pair + * of parentheses around the number. + * + * <p> + * Note: Since CLDR defines the accounting format in the monetary context only, this option falls back to the + * AUTO sign display strategy when formatting without a currency unit. This limitation may be lifted in the + * future. + * + * @draft ICU 60 + */ + UNUM_SIGN_ACCOUNTING, + + /** + * Use the locale-dependent accounting format on negative numbers, and show the plus sign on + * positive numbers, including zero. For more information on the accounting format, see the + * ACCOUNTING sign display strategy. To hide the sign on zero, see + * {@link UNUM_SIGN_ACCOUNTING_EXCEPT_ZERO}. + * + * @draft ICU 60 + */ + UNUM_SIGN_ACCOUNTING_ALWAYS, + + /** + * Show the minus sign on negative numbers and the plus sign on positive numbers. Do not show a + * sign on zero. + * + * @draft ICU 61 + */ + UNUM_SIGN_EXCEPT_ZERO, + + /** + * Use the locale-dependent accounting format on negative numbers, and show the plus sign on + * positive numbers. Do not show a sign on zero. For more information on the accounting format, + * see the ACCOUNTING sign display strategy. + * + * @draft ICU 61 + */ + UNUM_SIGN_ACCOUNTING_EXCEPT_ZERO + +#ifndef U_HIDE_INTERNAL_API + , + /** + * One more than the highest UNumberSignDisplay value. + * + * @internal ICU 60: The numeric value may change over time; see ICU ticket #12420. + */ + UNUM_SIGN_COUNT +#endif // U_HIDE_INTERNAL_API +} UNumberSignDisplay; + +/** + * An enum declaring how to render the decimal separator. + * + * <p> + * <ul> + * <li>UNUM_DECIMAL_SEPARATOR_AUTO: "1", "1.1" + * <li>UNUM_DECIMAL_SEPARATOR_ALWAYS: "1.", "1.1" + * </ul> + */ +typedef enum UNumberDecimalSeparatorDisplay { + /** + * Show the decimal separator when there are one or more digits to display after the separator, and do not show + * it otherwise. This is the default behavior. + * + * @draft ICU 60 + */ + UNUM_DECIMAL_SEPARATOR_AUTO, + + /** + * Always show the decimal separator, even if there are no digits to display after the separator. + * + * @draft ICU 60 + */ + UNUM_DECIMAL_SEPARATOR_ALWAYS + +#ifndef U_HIDE_INTERNAL_API + , + /** + * One more than the highest UNumberDecimalSeparatorDisplay value. + * + * @internal ICU 60: The numeric value may change over time; see ICU ticket #12420. + */ + UNUM_DECIMAL_SEPARATOR_COUNT +#endif // U_HIDE_INTERNAL_API +} UNumberDecimalMarkDisplay; + +U_NAMESPACE_BEGIN namespace number { // icu::number + +// Forward declarations: +class UnlocalizedNumberFormatter; +class LocalizedNumberFormatter; +class FormattedNumber; +class Notation; +class ScientificNotation; +class Rounder; +class FractionRounder; +class CurrencyRounder; +class IncrementRounder; +class IntegerWidth; + +namespace impl { + +#ifndef U_HIDE_INTERNAL_API +/** + * Datatype for minimum/maximum fraction digits. Must be able to hold kMaxIntFracSig. + * + * @internal + */ +typedef int16_t digits_t; + +/** + * Use a default threshold of 3. This means that the third time .format() is called, the data structures get built + * using the "safe" code path. The first two calls to .format() will trigger the unsafe code path. + * + * @internal + */ +static constexpr int32_t DEFAULT_THRESHOLD = 3; +#endif // U_HIDE_INTERNAL_API + +// Forward declarations: +class Padder; +struct MacroProps; +struct MicroProps; +class DecimalQuantity; +struct NumberFormatterResults; +class NumberFormatterImpl; +struct ParsedPatternInfo; +class ScientificModifier; +class MultiplierProducer; +class MutablePatternModifier; +class LongNameHandler; +class ScientificHandler; +class CompactHandler; +class Modifier; +class NumberStringBuilder; + +} // namespace impl + +// Reserve extra names in case they are added as classes in the future: +typedef Notation CompactNotation; +typedef Notation SimpleNotation; + +/** + * A class that defines the notation style to be used when formatting numbers in NumberFormatter. + * + * @draft ICU 60 + */ +class U_I18N_API Notation : public UMemory { + public: + /** + * Print the number using scientific notation (also known as scientific form, standard index form, or standard form + * in the UK). The format for scientific notation varies by locale; for example, many Western locales display the + * number in the form "#E0", where the number is displayed with one digit before the decimal separator, zero or more + * digits after the decimal separator, and the corresponding power of 10 displayed after the "E". + * + * <p> + * Example outputs in <em>en-US</em> when printing 8.765E4 through 8.765E-3: + * + * <pre> + * 8.765E4 + * 8.765E3 + * 8.765E2 + * 8.765E1 + * 8.765E0 + * 8.765E-1 + * 8.765E-2 + * 8.765E-3 + * 0E0 + * </pre> + * + * @return A ScientificNotation for chaining or passing to the NumberFormatter notation() setter. + * @draft ICU 60 + */ + static ScientificNotation scientific(); + + /** + * Print the number using engineering notation, a variant of scientific notation in which the exponent must be + * divisible by 3. + * + * <p> + * Example outputs in <em>en-US</em> when printing 8.765E4 through 8.765E-3: + * + * <pre> + * 87.65E3 + * 8.765E3 + * 876.5E0 + * 87.65E0 + * 8.765E0 + * 876.5E-3 + * 87.65E-3 + * 8.765E-3 + * 0E0 + * </pre> + * + * @return A ScientificNotation for chaining or passing to the NumberFormatter notation() setter. + * @draft ICU 60 + */ + static ScientificNotation engineering(); + + /** + * Print the number using short-form compact notation. + * + * <p> + * <em>Compact notation</em>, defined in Unicode Technical Standard #35 Part 3 Section 2.4.1, prints numbers with + * localized prefixes or suffixes corresponding to different powers of ten. Compact notation is similar to + * engineering notation in how it scales numbers. + * + * <p> + * Compact notation is ideal for displaying large numbers (over ~1000) to humans while at the same time minimizing + * screen real estate. + * + * <p> + * In short form, the powers of ten are abbreviated. In <em>en-US</em>, the abbreviations are "K" for thousands, "M" + * for millions, "B" for billions, and "T" for trillions. Example outputs in <em>en-US</em> when printing 8.765E7 + * through 8.765E0: + * + * <pre> + * 88M + * 8.8M + * 876K + * 88K + * 8.8K + * 876 + * 88 + * 8.8 + * </pre> + * + * <p> + * When compact notation is specified without an explicit rounding strategy, numbers are rounded off to the closest + * integer after scaling the number by the corresponding power of 10, but with a digit shown after the decimal + * separator if there is only one digit before the decimal separator. The default compact notation rounding strategy + * is equivalent to: + * + * <pre> + * Rounder.integer().withMinDigits(2) + * </pre> + * + * @return A CompactNotation for passing to the NumberFormatter notation() setter. + * @draft ICU 60 + */ + static CompactNotation compactShort(); + + /** + * Print the number using long-form compact notation. For more information on compact notation, see + * {@link #compactShort}. + * + * <p> + * In long form, the powers of ten are spelled out fully. Example outputs in <em>en-US</em> when printing 8.765E7 + * through 8.765E0: + * + * <pre> + * 88 million + * 8.8 million + * 876 thousand + * 88 thousand + * 8.8 thousand + * 876 + * 88 + * 8.8 + * </pre> + * + * @return A CompactNotation for passing to the NumberFormatter notation() setter. + * @draft ICU 60 + */ + static CompactNotation compactLong(); + + /** + * Print the number using simple notation without any scaling by powers of ten. This is the default behavior. + * + * <p> + * Since this is the default behavior, this method needs to be called only when it is necessary to override a + * previous setting. + * + * <p> + * Example outputs in <em>en-US</em> when printing 8.765E7 through 8.765E0: + * + * <pre> + * 87,650,000 + * 8,765,000 + * 876,500 + * 87,650 + * 8,765 + * 876.5 + * 87.65 + * 8.765 + * </pre> + * + * @return A SimpleNotation for passing to the NumberFormatter notation() setter. + * @draft ICU 60 + */ + static SimpleNotation simple(); + + private: + enum NotationType { + NTN_SCIENTIFIC, NTN_COMPACT, NTN_SIMPLE, NTN_ERROR + } fType; + + union NotationUnion { + // For NTN_SCIENTIFIC + struct ScientificSettings { + int8_t fEngineeringInterval; + bool fRequireMinInt; + impl::digits_t fMinExponentDigits; + UNumberSignDisplay fExponentSignDisplay; + } scientific; + + // For NTN_COMPACT + UNumberCompactStyle compactStyle; + + // For NTN_ERROR + UErrorCode errorCode; + } fUnion; + + typedef NotationUnion::ScientificSettings ScientificSettings; + + Notation(const NotationType &type, const NotationUnion &union_) : fType(type), fUnion(union_) {} + + Notation(UErrorCode errorCode) : fType(NTN_ERROR) { + fUnion.errorCode = errorCode; + } + + Notation() : fType(NTN_SIMPLE), fUnion() {} + + UBool copyErrorTo(UErrorCode &status) const { + if (fType == NTN_ERROR) { + status = fUnion.errorCode; + return TRUE; + } + return FALSE; + } + + // To allow MacroProps to initialize empty instances: + friend struct impl::MacroProps; + friend class ScientificNotation; + + // To allow implementation to access internal types: + friend class impl::NumberFormatterImpl; + friend class impl::ScientificModifier; + friend class impl::ScientificHandler; +}; + +/** + * A class that defines the scientific notation style to be used when formatting numbers in NumberFormatter. + * + * <p> + * To create a ScientificNotation, use one of the factory methods in {@link Notation}. + * + * @draft ICU 60 + */ +class U_I18N_API ScientificNotation : public Notation { + public: + /** + * Sets the minimum number of digits to show in the exponent of scientific notation, padding with zeros if + * necessary. Useful for fixed-width display. + * + * <p> + * For example, with minExponentDigits=2, the number 123 will be printed as "1.23E02" in <em>en-US</em> instead of + * the default "1.23E2". + * + * @param minExponentDigits + * The minimum number of digits to show in the exponent. + * @return A ScientificNotation, for chaining. + * @draft ICU 60 + */ + ScientificNotation withMinExponentDigits(int32_t minExponentDigits) const; + + /** + * Sets whether to show the sign on positive and negative exponents in scientific notation. The default is AUTO, + * showing the minus sign but not the plus sign. + * + * <p> + * For example, with exponentSignDisplay=ALWAYS, the number 123 will be printed as "1.23E+2" in <em>en-US</em> + * instead of the default "1.23E2". + * + * @param exponentSignDisplay + * The strategy for displaying the sign in the exponent. + * @return A ScientificNotation, for chaining. + * @draft ICU 60 + */ + ScientificNotation withExponentSignDisplay(UNumberSignDisplay exponentSignDisplay) const; + + private: + // Inherit constructor + using Notation::Notation; + + friend class Notation; +}; + +// Reserve extra names in case they are added as classes in the future: +typedef Rounder DigitRounder; + +/** + * A class that defines the rounding strategy to be used when formatting numbers in NumberFormatter. + * + * <p> + * To create a Rounder, use one of the factory methods. + * + * @draft ICU 60 + */ +class U_I18N_API Rounder : public UMemory { + + public: + /** + * Show all available digits to full precision. + * + * <p> + * <strong>NOTE:</strong> When formatting a <em>double</em>, this method, along with {@link #minFraction} and + * {@link #minDigits}, will trigger complex algorithm similar to <em>Dragon4</em> to determine the low-order digits + * and the number of digits to display based on the value of the double. If the number of fraction places or + * significant digits can be bounded, consider using {@link #maxFraction} or {@link #maxDigits} instead to maximize + * performance. For more information, read the following blog post. + * + * <p> + * http://www.serpentine.com/blog/2011/06/29/here-be-dragons-advances-in-problems-you-didnt-even-know-you-had/ + * + * @return A Rounder for chaining or passing to the NumberFormatter rounding() setter. + * @draft ICU 60 + */ + static Rounder unlimited(); + + /** + * Show numbers rounded if necessary to the nearest integer. + * + * @return A FractionRounder for chaining or passing to the NumberFormatter rounding() setter. + * @draft ICU 60 + */ + static FractionRounder integer(); + + /** + * Show numbers rounded if necessary to a certain number of fraction places (numerals after the decimal separator). + * Additionally, pad with zeros to ensure that this number of places are always shown. + * + * <p> + * Example output with minMaxFractionPlaces = 3: + * + * <p> + * 87,650.000<br> + * 8,765.000<br> + * 876.500<br> + * 87.650<br> + * 8.765<br> + * 0.876<br> + * 0.088<br> + * 0.009<br> + * 0.000 (zero) + * + * <p> + * This method is equivalent to {@link #minMaxFraction} with both arguments equal. + * + * @param minMaxFractionPlaces + * The minimum and maximum number of numerals to display after the decimal separator (rounding if too + * long or padding with zeros if too short). + * @return A FractionRounder for chaining or passing to the NumberFormatter rounding() setter. + * @draft ICU 60 + */ + static FractionRounder fixedFraction(int32_t minMaxFractionPlaces); + + /** + * Always show at least a certain number of fraction places after the decimal separator, padding with zeros if + * necessary. Do not perform rounding (display numbers to their full precision). + * + * <p> + * <strong>NOTE:</strong> If you are formatting <em>doubles</em>, see the performance note in {@link #unlimited}. + * + * @param minFractionPlaces + * The minimum number of numerals to display after the decimal separator (padding with zeros if + * necessary). + * @return A FractionRounder for chaining or passing to the NumberFormatter rounding() setter. + * @draft ICU 60 + */ + static FractionRounder minFraction(int32_t minFractionPlaces); + + /** + * Show numbers rounded if necessary to a certain number of fraction places (numerals after the decimal separator). + * Unlike the other fraction rounding strategies, this strategy does <em>not</em> pad zeros to the end of the + * number. + * + * @param maxFractionPlaces + * The maximum number of numerals to display after the decimal mark (rounding if necessary). + * @return A FractionRounder for chaining or passing to the NumberFormatter rounding() setter. + * @draft ICU 60 + */ + static FractionRounder maxFraction(int32_t maxFractionPlaces); + + /** + * Show numbers rounded if necessary to a certain number of fraction places (numerals after the decimal separator); + * in addition, always show at least a certain number of places after the decimal separator, padding with zeros if + * necessary. + * + * @param minFractionPlaces + * The minimum number of numerals to display after the decimal separator (padding with zeros if + * necessary). + * @param maxFractionPlaces + * The maximum number of numerals to display after the decimal separator (rounding if necessary). + * @return A FractionRounder for chaining or passing to the NumberFormatter rounding() setter. + * @draft ICU 60 + */ + static FractionRounder minMaxFraction(int32_t minFractionPlaces, int32_t maxFractionPlaces); + + /** + * Show numbers rounded if necessary to a certain number of significant digits or significant figures. Additionally, + * pad with zeros to ensure that this number of significant digits/figures are always shown. + * + * <p> + * This method is equivalent to {@link #minMaxDigits} with both arguments equal. + * + * @param minMaxSignificantDigits + * The minimum and maximum number of significant digits to display (rounding if too long or padding with + * zeros if too short). + * @return A Rounder for chaining or passing to the NumberFormatter rounding() setter. + * @draft ICU 60 + */ + static DigitRounder fixedDigits(int32_t minMaxSignificantDigits); + + /** + * Always show at least a certain number of significant digits/figures, padding with zeros if necessary. Do not + * perform rounding (display numbers to their full precision). + * + * <p> + * <strong>NOTE:</strong> If you are formatting <em>doubles</em>, see the performance note in {@link #unlimited}. + * + * @param minSignificantDigits + * The minimum number of significant digits to display (padding with zeros if too short). + * @return A Rounder for chaining or passing to the NumberFormatter rounding() setter. + * @draft ICU 60 + */ + static DigitRounder minDigits(int32_t minSignificantDigits); + + /** + * Show numbers rounded if necessary to a certain number of significant digits/figures. + * + * @param maxSignificantDigits + * The maximum number of significant digits to display (rounding if too long). + * @return A Rounder for chaining or passing to the NumberFormatter rounding() setter. + * @draft ICU 60 + */ + static DigitRounder maxDigits(int32_t maxSignificantDigits); + + /** + * Show numbers rounded if necessary to a certain number of significant digits/figures; in addition, always show at + * least a certain number of significant digits, padding with zeros if necessary. + * + * @param minSignificantDigits + * The minimum number of significant digits to display (padding with zeros if necessary). + * @param maxSignificantDigits + * The maximum number of significant digits to display (rounding if necessary). + * @return A Rounder for chaining or passing to the NumberFormatter rounding() setter. + * @draft ICU 60 + */ + static DigitRounder minMaxDigits(int32_t minSignificantDigits, int32_t maxSignificantDigits); + + /** + * Show numbers rounded if necessary to the closest multiple of a certain rounding increment. For example, if the + * rounding increment is 0.5, then round 1.2 to 1 and round 1.3 to 1.5. + * + * <p> + * In order to ensure that numbers are padded to the appropriate number of fraction places, call + * withMinFraction() on the return value of this method. + * For example, to round to the nearest 0.5 and always display 2 numerals after the + * decimal separator (to display 1.2 as "1.00" and 1.3 as "1.50"), you can run: + * + * <pre> + * Rounder::increment(0.5).withMinFraction(2) + * </pre> + * + * @param roundingIncrement + * The increment to which to round numbers. + * @return A Rounder for chaining or passing to the NumberFormatter rounding() setter. + * @draft ICU 60 + */ + static IncrementRounder increment(double roundingIncrement); + + /** + * Show numbers rounded and padded according to the rules for the currency unit. The most common rounding settings + * for currencies include <code>Rounder.fixedFraction(2)</code>, <code>Rounder.integer()</code>, and + * <code>Rounder.increment(0.05)</code> for cash transactions ("nickel rounding"). + * + * <p> + * The exact rounding details will be resolved at runtime based on the currency unit specified in the + * NumberFormatter chain. To round according to the rules for one currency while displaying the symbol for another + * currency, the withCurrency() method can be called on the return value of this method. + * + * @param currencyUsage + * Either STANDARD (for digital transactions) or CASH (for transactions where the rounding increment may + * be limited by the available denominations of cash or coins). + * @return A CurrencyRounder for chaining or passing to the NumberFormatter rounding() setter. + * @draft ICU 60 + */ + static CurrencyRounder currency(UCurrencyUsage currencyUsage); + + /** + * Sets the rounding mode to use when picking the direction to round (up or down). Common values + * include HALF_EVEN, HALF_UP, and FLOOR. The default is HALF_EVEN. + * + * @param roundingMode + * The RoundingMode to use. + * @return A Rounder for passing to the NumberFormatter rounding() setter. + * @draft ICU 60 + */ + Rounder withMode(UNumberFormatRoundingMode roundingMode) const; + + private: + enum RounderType { + RND_BOGUS, + RND_NONE, + RND_FRACTION, + RND_SIGNIFICANT, + RND_FRACTION_SIGNIFICANT, + RND_INCREMENT, + RND_CURRENCY, + RND_PASS_THROUGH, + RND_ERROR + } fType; + + union RounderUnion { + struct FractionSignificantSettings { + // For RND_FRACTION, RND_SIGNIFICANT, and RND_FRACTION_SIGNIFICANT + impl::digits_t fMinFrac; + impl::digits_t fMaxFrac; + impl::digits_t fMinSig; + impl::digits_t fMaxSig; + } fracSig; + struct IncrementSettings { + double fIncrement; + impl::digits_t fMinFrac; + } increment; // For RND_INCREMENT + UCurrencyUsage currencyUsage; // For RND_CURRENCY + UErrorCode errorCode; // For RND_ERROR + } fUnion; + + typedef RounderUnion::FractionSignificantSettings FractionSignificantSettings; + typedef RounderUnion::IncrementSettings IncrementSettings; + + UNumberFormatRoundingMode fRoundingMode; + + Rounder(const RounderType &type, const RounderUnion &union_, UNumberFormatRoundingMode roundingMode) + : fType(type), fUnion(union_), fRoundingMode(roundingMode) {} + + Rounder(UErrorCode errorCode) : fType(RND_ERROR) { + fUnion.errorCode = errorCode; + } + + Rounder() : fType(RND_BOGUS) {} + + bool isBogus() const { + return fType == RND_BOGUS; + } + + UBool copyErrorTo(UErrorCode &status) const { + if (fType == RND_ERROR) { + status = fUnion.errorCode; + return TRUE; + } + return FALSE; + } + + // On the parent type so that this method can be called internally on Rounder instances. + Rounder withCurrency(const CurrencyUnit ¤cy, UErrorCode &status) const; + + /** NON-CONST: mutates the current instance. */ + void setLocaleData(const CurrencyUnit ¤cy, UErrorCode &status); + + void apply(impl::DecimalQuantity &value, UErrorCode &status) const; + + /** Version of {@link #apply} that obeys minInt constraints. Used for scientific notation compatibility mode. */ + void apply(impl::DecimalQuantity &value, int32_t minInt, UErrorCode status); + + /** + * Rounding endpoint used by Engineering and Compact notation. Chooses the most appropriate multiplier (magnitude + * adjustment), applies the adjustment, rounds, and returns the chosen multiplier. + * + * <p> + * In most cases, this is simple. However, when rounding the number causes it to cross a multiplier boundary, we + * need to re-do the rounding. For example, to display 999,999 in Engineering notation with 2 sigfigs, first you + * guess the multiplier to be -3. However, then you end up getting 1000E3, which is not the correct output. You then + * change your multiplier to be -6, and you get 1.0E6, which is correct. + * + * @param input The quantity to process. + * @param producer Function to call to return a multiplier based on a magnitude. + * @return The number of orders of magnitude the input was adjusted by this method. + */ + int32_t + chooseMultiplierAndApply(impl::DecimalQuantity &input, const impl::MultiplierProducer &producer, + UErrorCode &status); + + static FractionRounder constructFraction(int32_t minFrac, int32_t maxFrac); + + static Rounder constructSignificant(int32_t minSig, int32_t maxSig); + + static Rounder + constructFractionSignificant(const FractionRounder &base, int32_t minSig, int32_t maxSig); + + static IncrementRounder constructIncrement(double increment, int32_t minFrac); + + static CurrencyRounder constructCurrency(UCurrencyUsage usage); + + static Rounder constructPassThrough(); + + // To allow MacroProps/MicroProps to initialize bogus instances: + friend struct impl::MacroProps; + friend struct impl::MicroProps; + + // To allow NumberFormatterImpl to access isBogus() and other internal methods: + friend class impl::NumberFormatterImpl; + + // To give access to apply() and chooseMultiplierAndApply(): + friend class impl::MutablePatternModifier; + friend class impl::LongNameHandler; + friend class impl::ScientificHandler; + friend class impl::CompactHandler; + + // To allow child classes to call private methods: + friend class FractionRounder; + friend class CurrencyRounder; + friend class IncrementRounder; +}; + +/** + * A class that defines a rounding strategy based on a number of fraction places and optionally significant digits to be + * used when formatting numbers in NumberFormatter. + * + * <p> + * To create a FractionRounder, use one of the factory methods on Rounder. + * + * @draft ICU 60 + */ +class U_I18N_API FractionRounder : public Rounder { + public: + /** + * Ensure that no less than this number of significant digits are retained when rounding according to fraction + * rules. + * + * <p> + * For example, with integer rounding, the number 3.141 becomes "3". However, with minimum figures set to 2, 3.141 + * becomes "3.1" instead. + * + * <p> + * This setting does not affect the number of trailing zeros. For example, 3.01 would print as "3", not "3.0". + * + * @param minSignificantDigits + * The number of significant figures to guarantee. + * @return A Rounder for chaining or passing to the NumberFormatter rounding() setter. + * @draft ICU 60 + */ + Rounder withMinDigits(int32_t minSignificantDigits) const; + + /** + * Ensure that no more than this number of significant digits are retained when rounding according to fraction + * rules. + * + * <p> + * For example, with integer rounding, the number 123.4 becomes "123". However, with maximum figures set to 2, 123.4 + * becomes "120" instead. + * + * <p> + * This setting does not affect the number of trailing zeros. For example, with fixed fraction of 2, 123.4 would + * become "120.00". + * + * @param maxSignificantDigits + * Round the number to no more than this number of significant figures. + * @return A Rounder for chaining or passing to the NumberFormatter rounding() setter. + * @draft ICU 60 + */ + Rounder withMaxDigits(int32_t maxSignificantDigits) const; + + private: + // Inherit constructor + using Rounder::Rounder; + + // To allow parent class to call this class's constructor: + friend class Rounder; +}; + +/** + * A class that defines a rounding strategy parameterized by a currency to be used when formatting numbers in + * NumberFormatter. + * + * <p> + * To create a CurrencyRounder, use one of the factory methods on Rounder. + * + * @draft ICU 60 + */ +class U_I18N_API CurrencyRounder : public Rounder { + public: + /** + * Associates a currency with this rounding strategy. + * + * <p> + * <strong>Calling this method is <em>not required</em></strong>, because the currency specified in unit() + * is automatically applied to currency rounding strategies. However, + * this method enables you to override that automatic association. + * + * <p> + * This method also enables numbers to be formatted using currency rounding rules without explicitly using a + * currency format. + * + * @param currency + * The currency to associate with this rounding strategy. + * @return A Rounder for chaining or passing to the NumberFormatter rounding() setter. + * @draft ICU 60 + */ + Rounder withCurrency(const CurrencyUnit ¤cy) const; + + private: + // Inherit constructor + using Rounder::Rounder; + + // To allow parent class to call this class's constructor: + friend class Rounder; +}; + +/** + * A class that defines a rounding strategy parameterized by a rounding increment to be used when formatting numbers in + * NumberFormatter. + * + * <p> + * To create an IncrementRounder, use one of the factory methods on Rounder. + * + * @draft ICU 60 + */ +class U_I18N_API IncrementRounder : public Rounder { + public: + /** + * Specifies the minimum number of fraction digits to render after the decimal separator, padding with zeros if + * necessary. By default, no trailing zeros are added. + * + * <p> + * For example, if the rounding increment is 0.5 and minFrac is 2, then the resulting strings include "0.00", + * "0.50", "1.00", and "1.50". + * + * <p> + * Note: In ICU4J, this functionality is accomplished via the scale of the BigDecimal rounding increment. + * + * @param minFrac The minimum number of digits after the decimal separator. + * @return A Rounder for chaining or passing to the NumberFormatter rounding() setter. + * @draft ICU 60 + */ + Rounder withMinFraction(int32_t minFrac) const; + + private: + // Inherit constructor + using Rounder::Rounder; + + // To allow parent class to call this class's constructor: + friend class Rounder; +}; + +/** + * A class that defines the strategy for padding and truncating integers before the decimal separator. + * + * <p> + * To create an IntegerWidth, use one of the factory methods. + * + * @draft ICU 60 + * @see NumberFormatter + */ +class U_I18N_API IntegerWidth : public UMemory { + public: + /** + * Pad numbers at the beginning with zeros to guarantee a certain number of numerals before the decimal separator. + * + * <p> + * For example, with minInt=3, the number 55 will get printed as "055". + * + * @param minInt + * The minimum number of places before the decimal separator. + * @return An IntegerWidth for chaining or passing to the NumberFormatter integerWidth() setter. + * @draft ICU 60 + * @see NumberFormatter + */ + static IntegerWidth zeroFillTo(int32_t minInt); + + /** + * Truncate numbers exceeding a certain number of numerals before the decimal separator. + * + * For example, with maxInt=3, the number 1234 will get printed as "234". + * + * @param maxInt + * The maximum number of places before the decimal separator. maxInt == -1 means no + * truncation. + * @return An IntegerWidth for passing to the NumberFormatter integerWidth() setter. + * @draft ICU 60 + * @see NumberFormatter + */ + IntegerWidth truncateAt(int32_t maxInt); + + private: + union { + struct { + impl::digits_t fMinInt; + impl::digits_t fMaxInt; + } minMaxInt; + UErrorCode errorCode; + } fUnion; + bool fHasError = false; + + IntegerWidth(impl::digits_t minInt, impl::digits_t maxInt); + + IntegerWidth(UErrorCode errorCode) { // NOLINT + fUnion.errorCode = errorCode; + fHasError = true; + } + + IntegerWidth() { // NOLINT + fUnion.minMaxInt.fMinInt = -1; + } + + bool isBogus() const { + return !fHasError && fUnion.minMaxInt.fMinInt == -1; + } + + UBool copyErrorTo(UErrorCode &status) const { + if (fHasError) { + status = fUnion.errorCode; + return TRUE; + } + return FALSE; + } + + void apply(impl::DecimalQuantity &quantity, UErrorCode &status) const; + + // To allow MacroProps/MicroProps to initialize empty instances: + friend struct impl::MacroProps; + friend struct impl::MicroProps; + + // To allow NumberFormatterImpl to access isBogus() and perform other operations: + friend class impl::NumberFormatterImpl; +}; + +namespace impl { + +// Do not enclose entire SymbolsWrapper with #ifndef U_HIDE_INTERNAL_API, needed for a protected field +/** @internal */ +class U_I18N_API SymbolsWrapper : public UMemory { + public: + /** @internal */ + SymbolsWrapper() : fType(SYMPTR_NONE), fPtr{nullptr} {} + + /** @internal */ + SymbolsWrapper(const SymbolsWrapper &other); + + /** @internal */ + ~SymbolsWrapper(); + + /** @internal */ + SymbolsWrapper &operator=(const SymbolsWrapper &other); + +#ifndef U_HIDE_INTERNAL_API + /** + * The provided object is copied, but we do not adopt it. + * @internal + */ + void setTo(const DecimalFormatSymbols &dfs); + + /** + * Adopt the provided object. + * @internal + */ + void setTo(const NumberingSystem *ns); + + /** + * Whether the object is currently holding a DecimalFormatSymbols. + * @internal + */ + bool isDecimalFormatSymbols() const; + + /** + * Whether the object is currently holding a NumberingSystem. + * @internal + */ + bool isNumberingSystem() const; + + /** + * Get the DecimalFormatSymbols pointer. No ownership change. + * @internal + */ + const DecimalFormatSymbols *getDecimalFormatSymbols() const; + + /** + * Get the NumberingSystem pointer. No ownership change. + * @internal + */ + const NumberingSystem *getNumberingSystem() const; + + /** @internal */ + UBool copyErrorTo(UErrorCode &status) const { + if (fType == SYMPTR_DFS && fPtr.dfs == nullptr) { + status = U_MEMORY_ALLOCATION_ERROR; + return TRUE; + } else if (fType == SYMPTR_NS && fPtr.ns == nullptr) { + status = U_MEMORY_ALLOCATION_ERROR; + return TRUE; + } + return FALSE; + } +#endif // U_HIDE_INTERNAL_API + + private: + enum SymbolsPointerType { + SYMPTR_NONE, SYMPTR_DFS, SYMPTR_NS + } fType; + + union { + const DecimalFormatSymbols *dfs; + const NumberingSystem *ns; + } fPtr; + + void doCopyFrom(const SymbolsWrapper &other); + + void doCleanup(); +}; + +// Do not enclose entire Grouper with #ifndef U_HIDE_INTERNAL_API, needed for a protected field +/** @internal */ +class U_I18N_API Grouper : public UMemory { + public: +#ifndef U_HIDE_INTERNAL_API + /** @internal */ + static Grouper forStrategy(UGroupingStrategy grouping); + + // Future: static Grouper forProperties(DecimalFormatProperties& properties); + + /** @internal */ + Grouper(int16_t grouping1, int16_t grouping2, int16_t minGrouping) + : fGrouping1(grouping1), fGrouping2(grouping2), fMinGrouping(minGrouping) {} +#endif // U_HIDE_INTERNAL_API + + private: + /** + * The grouping sizes, with the following special values: + * <ul> + * <li>-1 = no grouping + * <li>-2 = needs locale data + * <li>-4 = fall back to Western grouping if not in locale + * </ul> + */ + int16_t fGrouping1; + int16_t fGrouping2; + + /** + * The minimum gropuing size, with the following special values: + * <ul> + * <li>-2 = needs locale data + * <li>-3 = no less than 2 + * </ul> + */ + int16_t fMinGrouping; + + Grouper() : fGrouping1(-3) {}; + + bool isBogus() const { + return fGrouping1 == -3; + } + + /** NON-CONST: mutates the current instance. */ + void setLocaleData(const impl::ParsedPatternInfo &patternInfo, const Locale& locale); + + bool groupAtPosition(int32_t position, const impl::DecimalQuantity &value) const; + + // To allow MacroProps/MicroProps to initialize empty instances: + friend struct MacroProps; + friend struct MicroProps; + + // To allow NumberFormatterImpl to access isBogus() and perform other operations: + friend class NumberFormatterImpl; +}; + +// Do not enclose entire Padder with #ifndef U_HIDE_INTERNAL_API, needed for a protected field +/** @internal */ +class U_I18N_API Padder : public UMemory { + public: +#ifndef U_HIDE_INTERNAL_API + /** @internal */ + static Padder none(); + + /** @internal */ + static Padder codePoints(UChar32 cp, int32_t targetWidth, UNumberFormatPadPosition position); +#endif // U_HIDE_INTERNAL_API + + private: + UChar32 fWidth; // -3 = error; -2 = bogus; -1 = no padding + union { + struct { + int32_t fCp; + UNumberFormatPadPosition fPosition; + } padding; + UErrorCode errorCode; + } fUnion; + + Padder(UChar32 cp, int32_t width, UNumberFormatPadPosition position); + + Padder(int32_t width); + + Padder(UErrorCode errorCode) : fWidth(-3) { // NOLINT + fUnion.errorCode = errorCode; + } + + Padder() : fWidth(-2) {} // NOLINT + + bool isBogus() const { + return fWidth == -2; + } + + UBool copyErrorTo(UErrorCode &status) const { + if (fWidth == -3) { + status = fUnion.errorCode; + return TRUE; + } + return FALSE; + } + + bool isValid() const { + return fWidth > 0; + } + + int32_t padAndApply(const impl::Modifier &mod1, const impl::Modifier &mod2, + impl::NumberStringBuilder &string, int32_t leftIndex, int32_t rightIndex, + UErrorCode &status) const; + + // To allow MacroProps/MicroProps to initialize empty instances: + friend struct MacroProps; + friend struct MicroProps; + + // To allow NumberFormatterImpl to access isBogus() and perform other operations: + friend class impl::NumberFormatterImpl; +}; + +// Do not enclose entire MacroProps with #ifndef U_HIDE_INTERNAL_API, needed for a protected field +/** @internal */ +struct U_I18N_API MacroProps : public UMemory { + /** @internal */ + Notation notation; + + /** @internal */ + MeasureUnit unit; // = NoUnit::base(); + + /** @internal */ + MeasureUnit perUnit; // = NoUnit::base(); + + /** @internal */ + Rounder rounder; // = Rounder(); (bogus) + + /** @internal */ + Grouper grouper; // = Grouper(); (bogus) + + /** @internal */ + Padder padder; // = Padder(); (bogus) + + /** @internal */ + IntegerWidth integerWidth; // = IntegerWidth(); (bogus) + + /** @internal */ + SymbolsWrapper symbols; + + // UNUM_XYZ_COUNT denotes null (bogus) values. + + /** @internal */ + UNumberUnitWidth unitWidth = UNUM_UNIT_WIDTH_COUNT; + + /** @internal */ + UNumberSignDisplay sign = UNUM_SIGN_COUNT; + + /** @internal */ + UNumberDecimalSeparatorDisplay decimal = UNUM_DECIMAL_SEPARATOR_COUNT; + + /** @internal */ + PluralRules *rules = nullptr; // no ownership + + /** @internal */ + int32_t threshold = DEFAULT_THRESHOLD; + Locale locale; + + /** + * Check all members for errors. + * @internal + */ + bool copyErrorTo(UErrorCode &status) const { + return notation.copyErrorTo(status) || rounder.copyErrorTo(status) || + padder.copyErrorTo(status) || integerWidth.copyErrorTo(status) || + symbols.copyErrorTo(status); + } +}; + +} // namespace impl + +/** + * An abstract base class for specifying settings related to number formatting. This class is implemented by + * {@link UnlocalizedNumberFormatter} and {@link LocalizedNumberFormatter}. + */ +template<typename Derived> +class U_I18N_API NumberFormatterSettings { + public: + /** + * Specifies the notation style (simple, scientific, or compact) for rendering numbers. + * + * <ul> + * <li>Simple notation: "12,300" + * <li>Scientific notation: "1.23E4" + * <li>Compact notation: "12K" + * </ul> + * + * <p> + * All notation styles will be properly localized with locale data, and all notation styles are compatible with + * units, rounding strategies, and other number formatter settings. + * + * <p> + * Pass this method the return value of a {@link Notation} factory method. For example: + * + * <pre> + * NumberFormatter::with().notation(Notation::compactShort()) + * </pre> + * + * The default is to use simple notation. + * + * @param notation + * The notation strategy to use. + * @return The fluent chain. + * @see Notation + * @draft ICU 60 + */ + Derived notation(const Notation ¬ation) const; + + /** + * Specifies the unit (unit of measure, currency, or percent) to associate with rendered numbers. + * + * <ul> + * <li>Unit of measure: "12.3 meters" + * <li>Currency: "$12.30" + * <li>Percent: "12.3%" + * </ul> + * + * All units will be properly localized with locale data, and all units are compatible with notation styles, + * rounding strategies, and other number formatter settings. + * + * Pass this method any instance of {@link MeasureUnit}. For units of measure (which often involve the + * factory methods that return a pointer): + * + * <pre> + * NumberFormatter::with().adoptUnit(MeasureUnit::createMeter(status)) + * </pre> + * + * Currency: + * + * <pre> + * NumberFormatter::with().unit(CurrencyUnit(u"USD", status)) + * </pre> + * + * Percent: + * + * <pre> + * NumberFormatter::with().unit(NoUnit.percent()) + * </pre> + * + * See {@link #perUnit} for information on how to format strings like "5 meters per second". + * + * The default is to render without units (equivalent to NoUnit.base()). + * + * @param unit + * The unit to render. + * @return The fluent chain. + * @see MeasureUnit + * @see Currency + * @see NoUnit + * @see #perUnit + * @draft ICU 60 + */ + Derived unit(const icu::MeasureUnit &unit) const; + + /** + * Like unit(), but takes ownership of a pointer. Convenient for use with the MeasureFormat factory + * methods, which return pointers that need ownership. Example: + * + * <pre> + * NumberFormatter::with().adoptUnit(MeasureUnit::createMeter(status)) + * </pre> + * + * @param unit + * The unit to render. + * @return The fluent chain. + * @see #unit + * @see MeasureUnit + * @draft ICU 60 + */ + Derived adoptUnit(icu::MeasureUnit *unit) const; + + /** + * Sets a unit to be used in the denominator. For example, to format "3 m/s", pass METER to the unit and SECOND to + * the perUnit. + * + * Pass this method any instance of {@link MeasureUnit}. Since MeasureUnit factory methods return pointers, the + * {@link #adoptPerUnit} version of this method is often more useful. + * + * The default is not to display any unit in the denominator. + * + * If a per-unit is specified without a primary unit via {@link #unit}, the behavior is undefined. + * + * @param perUnit + * The unit to render in the denominator. + * @return The fluent chain + * @see #unit + * @draft ICU 61 + */ + Derived perUnit(const icu::MeasureUnit &perUnit) const; + + /** + * Like perUnit(), but takes ownership of a pointer. Convenient for use with the MeasureFormat factory + * methods, which return pointers that need ownership. Example: + * + * <pre> + * NumberFormatter::with() + * .adoptUnit(MeasureUnit::createMeter(status)) + * .adoptPerUnit(MeasureUnit::createSecond(status)) + * </pre> + * + * @param perUnit + * The unit to render in the denominator. + * @return The fluent chain. + * @see #perUnit + * @see MeasureUnit + * @draft ICU 61 + */ + Derived adoptPerUnit(icu::MeasureUnit *perUnit) const; + + /** + * Specifies the rounding strategy to use when formatting numbers. + * + * <ul> + * <li>Round to 3 decimal places: "3.142" + * <li>Round to 3 significant figures: "3.14" + * <li>Round to the closest nickel: "3.15" + * <li>Do not perform rounding: "3.1415926..." + * </ul> + * + * <p> + * Pass this method the return value of one of the factory methods on {@link Rounder}. For example: + * + * <pre> + * NumberFormatter::with().rounding(Rounder::fixedFraction(2)) + * </pre> + * + * <p> + * In most cases, the default rounding strategy is to round to 6 fraction places; i.e., + * <code>Rounder.maxFraction(6)</code>. The exceptions are if compact notation is being used, then the compact + * notation rounding strategy is used (see {@link Notation#compactShort} for details), or if the unit is a currency, + * then standard currency rounding is used, which varies from currency to currency (see {@link Rounder#currency} for + * details). + * + * @param rounder + * The rounding strategy to use. + * @return The fluent chain. + * @see Rounder + * @provisional This API might change or be removed in a future release. + * @draft ICU 60 + */ + Derived rounding(const Rounder &rounder) const; + + /** + * Specifies the grouping strategy to use when formatting numbers. + * + * <ul> + * <li>Default grouping: "12,300" and "1,230" + * <li>Grouping with at least 2 digits: "12,300" and "1230" + * <li>No grouping: "12300" and "1230" + * </ul> + * + * <p> + * The exact grouping widths will be chosen based on the locale. + * + * <p> + * Pass this method an element from the {@link UGroupingStrategy} enum. For example: + * + * <pre> + * NumberFormatter::with().grouping(UNUM_GROUPING_MIN2) + * </pre> + * + * The default is to perform grouping according to locale data; most locales, but not all locales, + * enable it by default. + * + * @param strategy + * The grouping strategy to use. + * @return The fluent chain. + * @draft ICU 61 + */ + Derived grouping(const UGroupingStrategy &strategy) const; + + /** + * Specifies the minimum and maximum number of digits to render before the decimal mark. + * + * <ul> + * <li>Zero minimum integer digits: ".08" + * <li>One minimum integer digit: "0.08" + * <li>Two minimum integer digits: "00.08" + * </ul> + * + * <p> + * Pass this method the return value of {@link IntegerWidth#zeroFillTo(int)}. For example: + * + * <pre> + * NumberFormatter::with().integerWidth(IntegerWidth::zeroFillTo(2)) + * </pre> + * + * The default is to have one minimum integer digit. + * + * @param style + * The integer width to use. + * @return The fluent chain. + * @see IntegerWidth + * @draft ICU 60 + */ + Derived integerWidth(const IntegerWidth &style) const; + + /** + * Specifies the symbols (decimal separator, grouping separator, percent sign, numerals, etc.) to use when rendering + * numbers. + * + * <ul> + * <li><em>en_US</em> symbols: "12,345.67" + * <li><em>fr_FR</em> symbols: "12 345,67" + * <li><em>de_CH</em> symbols: "12’345.67" + * <li><em>my_MY</em> symbols: "áá‚,áƒá„á….á†á‡" + * </ul> + * + * <p> + * Pass this method an instance of {@link DecimalFormatSymbols}. For example: + * + * <pre> + * NumberFormatter::with().symbols(DecimalFormatSymbols(Locale("de_CH"), status)) + * </pre> + * + * <p> + * <strong>Note:</strong> DecimalFormatSymbols automatically chooses the best numbering system based on the locale. + * In the examples above, the first three are using the Latin numbering system, and the fourth is using the Myanmar + * numbering system. + * + * <p> + * <strong>Note:</strong> The instance of DecimalFormatSymbols will be copied: changes made to the symbols object + * after passing it into the fluent chain will not be seen. + * + * <p> + * <strong>Note:</strong> Calling this method will override the NumberingSystem previously specified in + * {@link #symbols(NumberingSystem)}. + * + * <p> + * The default is to choose the symbols based on the locale specified in the fluent chain. + * + * @param symbols + * The DecimalFormatSymbols to use. + * @return The fluent chain. + * @see DecimalFormatSymbols + * @draft ICU 60 + */ + Derived symbols(const DecimalFormatSymbols &symbols) const; + + /** + * Specifies that the given numbering system should be used when fetching symbols. + * + * <ul> + * <li>Latin numbering system: "12,345" + * <li>Myanmar numbering system: "áá‚,áƒá„á…" + * <li>Math Sans Bold numbering system: "đŸ­đŸ®,đŸ¯đŸ°đŸ±" + * </ul> + * + * <p> + * Pass this method an instance of {@link NumberingSystem}. For example, to force the locale to always use the Latin + * alphabet numbering system (ASCII digits): + * + * <pre> + * NumberFormatter::with().adoptSymbols(NumberingSystem::createInstanceByName("latn", status)) + * </pre> + * + * <p> + * <strong>Note:</strong> Calling this method will override the DecimalFormatSymbols previously specified in + * {@link #symbols(DecimalFormatSymbols)}. + * + * <p> + * The default is to choose the best numbering system for the locale. + * + * <p> + * This method takes ownership of a pointer in order to work nicely with the NumberingSystem factory methods. + * + * @param symbols + * The NumberingSystem to use. + * @return The fluent chain. + * @see NumberingSystem + * @draft ICU 60 + */ + Derived adoptSymbols(NumberingSystem *symbols) const; + + /** + * Sets the width of the unit (measure unit or currency). Most common values: + * + * <ul> + * <li>Short: "$12.00", "12 m" + * <li>ISO Code: "USD 12.00" + * <li>Full name: "12.00 US dollars", "12 meters" + * </ul> + * + * <p> + * Pass an element from the {@link UNumberUnitWidth} enum to this setter. For example: + * + * <pre> + * NumberFormatter::with().unitWidth(UNumberUnitWidth::UNUM_UNIT_WIDTH_FULL_NAME) + * </pre> + * + * <p> + * The default is the SHORT width. + * + * @param width + * The width to use when rendering numbers. + * @return The fluent chain + * @see UNumberUnitWidth + * @draft ICU 60 + */ + Derived unitWidth(const UNumberUnitWidth &width) const; + + /** + * Sets the plus/minus sign display strategy. Most common values: + * + * <ul> + * <li>Auto: "123", "-123" + * <li>Always: "+123", "-123" + * <li>Accounting: "$123", "($123)" + * </ul> + * + * <p> + * Pass an element from the {@link UNumberSignDisplay} enum to this setter. For example: + * + * <pre> + * NumberFormatter::with().sign(UNumberSignDisplay::UNUM_SIGN_ALWAYS) + * </pre> + * + * <p> + * The default is AUTO sign display. + * + * @param width + * The sign display strategy to use when rendering numbers. + * @return The fluent chain + * @see UNumberSignDisplay + * @provisional This API might change or be removed in a future release. + * @draft ICU 60 + */ + Derived sign(const UNumberSignDisplay &width) const; + + /** + * Sets the decimal separator display strategy. This affects integer numbers with no fraction part. Most common + * values: + * + * <ul> + * <li>Auto: "1" + * <li>Always: "1." + * </ul> + * + * <p> + * Pass an element from the {@link UNumberDecimalSeparatorDisplay} enum to this setter. For example: + * + * <pre> + * NumberFormatter::with().decimal(UNumberDecimalSeparatorDisplay::UNUM_DECIMAL_SEPARATOR_ALWAYS) + * </pre> + * + * <p> + * The default is AUTO decimal separator display. + * + * @param width + * The decimal separator display strategy to use when rendering numbers. + * @return The fluent chain + * @see UNumberDecimalSeparatorDisplay + * @provisional This API might change or be removed in a future release. + * @draft ICU 60 + */ + Derived decimal(const UNumberDecimalSeparatorDisplay &width) const; + +#ifndef U_HIDE_INTERNAL_API + + /** + * Set the padding strategy. May be added to ICU 61; see #13338. + * + * @internal ICU 60: This API is ICU internal only. + */ + Derived padding(const impl::Padder &padder) const; + + /** + * Internal fluent setter to support a custom regulation threshold. A threshold of 1 causes the data structures to + * be built right away. A threshold of 0 prevents the data structures from being built. + * + * @internal ICU 60: This API is ICU internal only. + */ + Derived threshold(int32_t threshold) const; + +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Sets the UErrorCode if an error occurred in the fluent chain. + * Preserves older error codes in the outErrorCode. + * @return TRUE if U_FAILURE(outErrorCode) + * @draft ICU 60 + */ + UBool copyErrorTo(UErrorCode &outErrorCode) const { + if (U_FAILURE(outErrorCode)) { + // Do not overwrite the older error code + return TRUE; + } + fMacros.copyErrorTo(outErrorCode); + return U_FAILURE(outErrorCode); + } + + protected: + impl::MacroProps fMacros; + + private: + // Don't construct me directly! Use (Un)LocalizedNumberFormatter. + NumberFormatterSettings() = default; + + friend class LocalizedNumberFormatter; + friend class UnlocalizedNumberFormatter; +}; + +/** + * A NumberFormatter that does not yet have a locale. In order to format numbers, a locale must be specified. + * + * @see NumberFormatter + * @draft ICU 60 + */ +class U_I18N_API UnlocalizedNumberFormatter + : public NumberFormatterSettings<UnlocalizedNumberFormatter>, public UMemory { + + public: + /** + * Associate the given locale with the number formatter. The locale is used for picking the appropriate symbols, + * formats, and other data for number display. + * + * <p> + * To use the Java default locale, call Locale::getDefault(): + * + * <pre> + * NumberFormatter::with(). ... .locale(Locale::getDefault()) + * </pre> + * + * @param locale + * The locale to use when loading data for number formatting. + * @return The fluent chain. + * @draft ICU 60 + */ + LocalizedNumberFormatter locale(const icu::Locale &locale) const; + + // Make default copy constructor call the NumberFormatterSettings copy constructor. + /** + * Returns a copy of this UnlocalizedNumberFormatter. + * @draft ICU 60 + */ + UnlocalizedNumberFormatter(const UnlocalizedNumberFormatter &other) : UnlocalizedNumberFormatter( + static_cast<const NumberFormatterSettings<UnlocalizedNumberFormatter> &>(other)) {} + + private: + UnlocalizedNumberFormatter() = default; + + explicit UnlocalizedNumberFormatter( + const NumberFormatterSettings<UnlocalizedNumberFormatter> &other); + + // To give the fluent setters access to this class's constructor: + friend class NumberFormatterSettings<UnlocalizedNumberFormatter>; + + // To give NumberFormatter::with() access to this class's constructor: + friend class NumberFormatter; +}; + +/** + * A NumberFormatter that has a locale associated with it; this means .format() methods are available. + * + * @see NumberFormatter + * @draft ICU 60 + */ +class U_I18N_API LocalizedNumberFormatter + : public NumberFormatterSettings<LocalizedNumberFormatter>, public UMemory { + public: + /** + * Format the given integer number to a string using the settings specified in the NumberFormatter fluent + * setting chain. + * + * @param value + * The number to format. + * @param status + * Set to an ErrorCode if one occurred in the setter chain or during formatting. + * @return A FormattedNumber object; call .toString() to get the string. + * @draft ICU 60 + */ + FormattedNumber formatInt(int64_t value, UErrorCode &status) const; + + /** + * Format the given float or double to a string using the settings specified in the NumberFormatter fluent setting + * chain. + * + * @param value + * The number to format. + * @param status + * Set to an ErrorCode if one occurred in the setter chain or during formatting. + * @return A FormattedNumber object; call .toString() to get the string. + * @draft ICU 60 + */ + FormattedNumber formatDouble(double value, UErrorCode &status) const; + + /** + * Format the given decimal number to a string using the settings + * specified in the NumberFormatter fluent setting chain. + * The syntax of the unformatted number is a "numeric string" + * as defined in the Decimal Arithmetic Specification, available at + * http://speleotrove.com/decimal + * + * @param value + * The number to format. + * @param status + * Set to an ErrorCode if one occurred in the setter chain or during formatting. + * @return A FormattedNumber object; call .toString() to get the string. + * @draft ICU 60 + */ + FormattedNumber formatDecimal(StringPiece value, UErrorCode &status) const; + + // Make default copy constructor call the NumberFormatterSettings copy constructor. + /** + * Returns a copy of this LocalizedNumberFormatter. + * @draft ICU 60 + */ + LocalizedNumberFormatter(const LocalizedNumberFormatter &other) : LocalizedNumberFormatter( + static_cast<const NumberFormatterSettings<LocalizedNumberFormatter> &>(other)) {} + + /** + * Destruct this LocalizedNumberFormatter, cleaning up any memory it might own. + * @draft ICU 60 + */ + ~LocalizedNumberFormatter(); + + private: + const impl::NumberFormatterImpl* fCompiled {nullptr}; + char fUnsafeCallCount[8] {}; // internally cast to u_atomic_int32_t + + LocalizedNumberFormatter() = default; + + explicit LocalizedNumberFormatter(const NumberFormatterSettings<LocalizedNumberFormatter> &other); + + LocalizedNumberFormatter(const impl::MacroProps ¯os, const Locale &locale); + + /** + * This is the core entrypoint to the number formatting pipeline. It performs self-regulation: a static code path + * for the first few calls, and compiling a more efficient data structure if called repeatedly. + * + * <p> + * This function is very hot, being called in every call to the number formatting pipeline. + * + * @param results + * The results object. This method takes ownership. + * @return The formatted number result. + */ + FormattedNumber formatImpl(impl::NumberFormatterResults *results, UErrorCode &status) const; + + // To give the fluent setters access to this class's constructor: + friend class NumberFormatterSettings<UnlocalizedNumberFormatter>; + friend class NumberFormatterSettings<LocalizedNumberFormatter>; + + // To give UnlocalizedNumberFormatter::locale() access to this class's constructor: + friend class UnlocalizedNumberFormatter; +}; + +/** + * The result of a number formatting operation. This class allows the result to be exported in several data types, + * including a UnicodeString and a FieldPositionIterator. + * + * @draft ICU 60 + */ +class U_I18N_API FormattedNumber : public UMemory { + public: + /** + * Returns a UnicodeString representation of the formatted number. + * + * @return a UnicodeString containing the localized number. + * @draft ICU 60 + */ + UnicodeString toString() const; + + /** + * Appends the formatted number to an Appendable. + * + * @param appendable + * The Appendable to which to append the formatted number string. + * @return The same Appendable, for chaining. + * @draft ICU 60 + * @see Appendable + */ + Appendable &appendTo(Appendable &appendable); + + /** + * Determine the start and end indices of the first occurrence of the given <em>field</em> in the output string. + * This allows you to determine the locations of the integer part, fraction part, and sign. + * + * <p> + * If multiple different field attributes are needed, this method can be called repeatedly, or if <em>all</em> field + * attributes are needed, consider using populateFieldPositionIterator(). + * + * <p> + * If a field occurs multiple times in an output string, such as a grouping separator, this method will only ever + * return the first occurrence. Use populateFieldPositionIterator() to access all occurrences of an attribute. + * + * @param fieldPosition + * The FieldPosition to populate with the start and end indices of the desired field. + * @param status + * Set if an error occurs while populating the FieldPosition. + * @draft ICU 60 + * @see UNumberFormatFields + */ + void populateFieldPosition(FieldPosition &fieldPosition, UErrorCode &status); + + /** + * Export the formatted number to a FieldPositionIterator. This allows you to determine which characters in + * the output string correspond to which <em>fields</em>, such as the integer part, fraction part, and sign. + * + * <p> + * If information on only one field is needed, consider using populateFieldPosition() instead. + * + * @param iterator + * The FieldPositionIterator to populate with all of the fields present in the formatted number. + * @param status + * Set if an error occurs while populating the FieldPositionIterator. + * @draft ICU 60 + * @see UNumberFormatFields + */ + void populateFieldPositionIterator(FieldPositionIterator &iterator, UErrorCode &status); + + /** + * Destruct an instance of FormattedNumber, cleaning up any memory it might own. + * @draft ICU 60 + */ + ~FormattedNumber(); + + private: + // Can't use LocalPointer because NumberFormatterResults is forward-declared + const impl::NumberFormatterResults *fResults; + + // Error code for the terminal methods + UErrorCode fErrorCode; + + explicit FormattedNumber(impl::NumberFormatterResults *results) + : fResults(results), fErrorCode(U_ZERO_ERROR) {}; + + explicit FormattedNumber(UErrorCode errorCode) + : fResults(nullptr), fErrorCode(errorCode) {}; + + // To give LocalizedNumberFormatter format methods access to this class's constructor: + friend class LocalizedNumberFormatter; +}; + +/** + * See the main description in numberformatter.h for documentation and examples. + * + * @draft ICU 60 + */ +class U_I18N_API NumberFormatter final { + public: + /** + * Call this method at the beginning of a NumberFormatter fluent chain in which the locale is not currently known at + * the call site. + * + * @return An {@link UnlocalizedNumberFormatter}, to be used for chaining. + * @draft ICU 60 + */ + static UnlocalizedNumberFormatter with(); + + /** + * Call this method at the beginning of a NumberFormatter fluent chain in which the locale is known at the call + * site. + * + * @param locale + * The locale from which to load formats and symbols for number formatting. + * @return A {@link LocalizedNumberFormatter}, to be used for chaining. + * @draft ICU 60 + */ + static LocalizedNumberFormatter withLocale(const Locale &locale); + + /** + * Use factory methods instead of the constructor to create a NumberFormatter. + * @draft ICU 60 + */ + NumberFormatter() = delete; +}; + +} // namespace number +U_NAMESPACE_END + +#endif // U_HIDE_DRAFT_API + +#endif // __NUMBERFORMATTER_H__ + +#endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/numfmt.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/numfmt.h new file mode 100755 index 00000000..39379851 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/numfmt.h @@ -0,0 +1,1254 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************** +* Copyright (C) 1997-2016, International Business Machines Corporation and others. +* All Rights Reserved. +******************************************************************************** +* +* File NUMFMT.H +* +* Modification History: +* +* Date Name Description +* 02/19/97 aliu Converted from java. +* 03/18/97 clhuang Updated per C++ implementation. +* 04/17/97 aliu Changed DigitCount to int per code review. +* 07/20/98 stephen JDK 1.2 sync up. Added scientific support. +* Changed naming conventions to match C++ guidelines +* Derecated Java style constants (eg, INTEGER_FIELD) +******************************************************************************** +*/ + +#ifndef NUMFMT_H +#define NUMFMT_H + + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Compatibility APIs for number formatting. + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/unistr.h" +#include "unicode/format.h" +#include "unicode/unum.h" // UNumberFormatStyle +#include "unicode/locid.h" +#include "unicode/stringpiece.h" +#include "unicode/curramt.h" +#include "unicode/udisplaycontext.h" + +class NumberFormatTest; + +U_NAMESPACE_BEGIN + +class SharedNumberFormat; + +#if !UCONFIG_NO_SERVICE +class NumberFormatFactory; +class StringEnumeration; +#endif + +/** + * <p><strong>IMPORTANT:</strong> New users are strongly encouraged to see if + * numberformatter.h fits their use case. Although not deprecated, this header + * is provided for backwards compatibility only. + * <hr/> + * + * Abstract base class for all number formats. Provides interface for + * formatting and parsing a number. Also provides methods for + * determining which locales have number formats, and what their names + * are. + * + * \headerfile unicode/numfmt.h "unicode/numfmt.h" + * <P> + * NumberFormat helps you to format and parse numbers for any locale. + * Your code can be completely independent of the locale conventions + * for decimal points, thousands-separators, or even the particular + * decimal digits used, or whether the number format is even decimal. + * <P> + * To format a number for the current Locale, use one of the static + * factory methods: + * \code + * #include <iostream> + * #include "unicode/numfmt.h" + * #include "unicode/unistr.h" + * #include "unicode/ustream.h" + * using namespace std; + * + * int main() { + * double myNumber = 7.0; + * UnicodeString myString; + * UErrorCode success = U_ZERO_ERROR; + * NumberFormat* nf = NumberFormat::createInstance(success); + * nf->format(myNumber, myString); + * cout << " Example 1: " << myString << endl; + * } + * \endcode + * Note that there are additional factory methods within subclasses of + * NumberFormat. + * <P> + * If you are formatting multiple numbers, it is more efficient to get + * the format and use it multiple times so that the system doesn't + * have to fetch the information about the local language and country + * conventions multiple times. + * \code + * UnicodeString myString; + * UErrorCode success = U_ZERO_ERROR; + * NumberFormat *nf = NumberFormat::createInstance( success ); + * for (int32_t number: {123, 3333, -1234567}) { + * nf->format(number, myString); + * myString += "; "; + * } + * cout << " Example 2: " << myString << endl; + * \endcode + * To format a number for a different Locale, specify it in the + * call to \c createInstance(). + * \code + * nf = NumberFormat::createInstance(Locale::getFrench(), success); + * \endcode + * You can use a \c NumberFormat to parse also. + * \code + * UErrorCode success; + * Formattable result(-999); // initialized with error code + * nf->parse(myString, result, success); + * \endcode + * Use \c createInstance() to get the normal number format for a \c Locale. + * There are other static factory methods available. Use \c createCurrencyInstance() + * to get the currency number format for that country. Use \c createPercentInstance() + * to get a format for displaying percentages. With this format, a + * fraction from 0.53 is displayed as 53%. + * <P> + * The type of number formatting can be specified by passing a 'style' parameter to \c createInstance(). + * For example, use\n + * \c createInstance(locale, UNUM_DECIMAL, errorCode) to get the normal number format,\n + * \c createInstance(locale, UNUM_PERCENT, errorCode) to get a format for displaying percentage,\n + * \c createInstance(locale, UNUM_SCIENTIFIC, errorCode) to get a format for displaying scientific number,\n + * \c createInstance(locale, UNUM_CURRENCY, errorCode) to get the currency number format, + * in which the currency is represented by its symbol, for example, "$3.00".\n + * \c createInstance(locale, UNUM_CURRENCY_ISO, errorCode) to get the currency number format, + * in which the currency is represented by its ISO code, for example "USD3.00".\n + * \c createInstance(locale, UNUM_CURRENCY_PLURAL, errorCode) to get the currency number format, + * in which the currency is represented by its full name in plural format, + * for example, "3.00 US dollars" or "1.00 US dollar". + * <P> + * You can also control the display of numbers with such methods as + * \c getMinimumFractionDigits(). If you want even more control over the + * format or parsing, or want to give your users more control, you can + * try dynamic_casting the \c NumberFormat you get from the factory methods to a + * \c DecimalFormat. This will work for the vast majority of + * countries; just remember to test for NULL in case you + * encounter an unusual one. + * <P> + * You can also use forms of the parse and format methods with + * \c ParsePosition and \c FieldPosition to allow you to: + * <ul type=round> + * <li>(a) progressively parse through pieces of a string. + * <li>(b) align the decimal point and other areas. + * </ul> + * For example, you can align numbers in two ways. + * <P> + * If you are using a monospaced font with spacing for alignment, you + * can pass the \c FieldPosition in your format call, with field = + * \c UNUM_INTEGER_FIELD. On output, \c getEndIndex will be set to the offset + * between the last character of the integer and the decimal. Add + * (desiredSpaceCount - getEndIndex) spaces at the front of the + * string. + * <P> + * If you are using proportional fonts, instead of padding with + * spaces, measure the width of the string in pixels from the start to + * getEndIndex. Then move the pen by (desiredPixelWidth - + * widthToAlignmentPoint) before drawing the text. It also works + * where there is no decimal, but possibly additional characters at + * the end, e.g. with parentheses in negative numbers: "(12)" for -12. + * <p> + * <em>User subclasses are not supported.</em> While clients may write + * subclasses, such code will not necessarily work and will not be + * guaranteed to work stably from release to release. + * + * @stable ICU 2.0 + */ +class U_I18N_API NumberFormat : public Format { +public: + /** + * Rounding mode. + * + * <p> + * For more detail on rounding modes, see: + * http://userguide.icu-project.org/formatparse/numbers/rounding-modes + * + * @stable ICU 2.4 + */ + enum ERoundingMode { + kRoundCeiling, /**< Round towards positive infinity */ + kRoundFloor, /**< Round towards negative infinity */ + kRoundDown, /**< Round towards zero */ + kRoundUp, /**< Round away from zero */ + kRoundHalfEven, /**< Round towards the nearest integer, or + towards the nearest even integer if equidistant */ + kRoundHalfDown, /**< Round towards the nearest integer, or + towards zero if equidistant */ + kRoundHalfUp, /**< Round towards the nearest integer, or + away from zero if equidistant */ + /** + * Return U_FORMAT_INEXACT_ERROR if number does not format exactly. + * @stable ICU 4.8 + */ + kRoundUnnecessary + }; + + /** + * Alignment Field constants used to construct a FieldPosition object. + * Signifies that the position of the integer part or fraction part of + * a formatted number should be returned. + * + * Note: as of ICU 4.4, the values in this enum have been extended to + * support identification of all number format fields, not just those + * pertaining to alignment. + * + * These constants are provided for backwards compatibility only. + * Please use the C style constants defined in the header file unum.h. + * + * @see FieldPosition + * @stable ICU 2.0 + */ + enum EAlignmentFields { + /** @stable ICU 2.0 */ + kIntegerField = UNUM_INTEGER_FIELD, + /** @stable ICU 2.0 */ + kFractionField = UNUM_FRACTION_FIELD, + /** @stable ICU 2.0 */ + kDecimalSeparatorField = UNUM_DECIMAL_SEPARATOR_FIELD, + /** @stable ICU 2.0 */ + kExponentSymbolField = UNUM_EXPONENT_SYMBOL_FIELD, + /** @stable ICU 2.0 */ + kExponentSignField = UNUM_EXPONENT_SIGN_FIELD, + /** @stable ICU 2.0 */ + kExponentField = UNUM_EXPONENT_FIELD, + /** @stable ICU 2.0 */ + kGroupingSeparatorField = UNUM_GROUPING_SEPARATOR_FIELD, + /** @stable ICU 2.0 */ + kCurrencyField = UNUM_CURRENCY_FIELD, + /** @stable ICU 2.0 */ + kPercentField = UNUM_PERCENT_FIELD, + /** @stable ICU 2.0 */ + kPermillField = UNUM_PERMILL_FIELD, + /** @stable ICU 2.0 */ + kSignField = UNUM_SIGN_FIELD, + + /** + * These constants are provided for backwards compatibility only. + * Please use the constants defined in the header file unum.h. + */ + /** @stable ICU 2.0 */ + INTEGER_FIELD = UNUM_INTEGER_FIELD, + /** @stable ICU 2.0 */ + FRACTION_FIELD = UNUM_FRACTION_FIELD + }; + + /** + * Destructor. + * @stable ICU 2.0 + */ + virtual ~NumberFormat(); + + /** + * Return true if the given Format objects are semantically equal. + * Objects of different subclasses are considered unequal. + * @return true if the given Format objects are semantically equal. + * @stable ICU 2.0 + */ + virtual UBool operator==(const Format& other) const; + + + using Format::format; + + /** + * Format an object to produce a string. This method handles + * Formattable objects with numeric types. If the Formattable + * object type is not a numeric type, then it returns a failing + * UErrorCode. + * + * @param obj The object to format. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.0 + */ + virtual UnicodeString& format(const Formattable& obj, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& status) const; + + /** + * Format an object to produce a string. This method handles + * Formattable objects with numeric types. If the Formattable + * object type is not a numeric type, then it returns a failing + * UErrorCode. + * + * @param obj The object to format. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. Can be + * NULL. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.4 + */ + virtual UnicodeString& format(const Formattable& obj, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + + /** + * Parse a string to produce an object. This methods handles + * parsing of numeric strings into Formattable objects with numeric + * types. + * <P> + * Before calling, set parse_pos.index to the offset you want to + * start parsing at in the source. After calling, parse_pos.index + * indicates the position after the successfully parsed text. If + * an error occurs, parse_pos.index is unchanged. + * <P> + * When parsing, leading whitespace is discarded (with successful + * parse), while trailing whitespace is left as is. + * <P> + * See Format::parseObject() for more. + * + * @param source The string to be parsed into an object. + * @param result Formattable to be set to the parse result. + * If parse fails, return contents are undefined. + * @param parse_pos The position to start parsing at. Upon return + * this param is set to the position after the + * last character successfully parsed. If the + * source is not parsed successfully, this param + * will remain unchanged. + * @return A newly created Formattable* object, or NULL + * on failure. The caller owns this and should + * delete it when done. + * @stable ICU 2.0 + */ + virtual void parseObject(const UnicodeString& source, + Formattable& result, + ParsePosition& parse_pos) const; + + /** + * Format a double number. These methods call the NumberFormat + * pure virtual format() methods with the default FieldPosition. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.0 + */ + UnicodeString& format( double number, + UnicodeString& appendTo) const; + + /** + * Format a long number. These methods call the NumberFormat + * pure virtual format() methods with the default FieldPosition. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.0 + */ + UnicodeString& format( int32_t number, + UnicodeString& appendTo) const; + + /** + * Format an int64 number. These methods call the NumberFormat + * pure virtual format() methods with the default FieldPosition. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.8 + */ + UnicodeString& format( int64_t number, + UnicodeString& appendTo) const; + + /** + * Format a double number. Concrete subclasses must implement + * these pure virtual methods. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.0 + */ + virtual UnicodeString& format(double number, + UnicodeString& appendTo, + FieldPosition& pos) const = 0; + /** + * Format a double number. By default, the parent function simply + * calls the base class and does not return an error status. + * Therefore, the status may be ignored in some subclasses. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status error status + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(double number, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode &status) const; + /** + * Format a double number. Subclasses must implement + * this method. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. + * Can be NULL. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.4 + */ + virtual UnicodeString& format(double number, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + /** + * Format a long number. Concrete subclasses must implement + * these pure virtual methods. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.0 + */ + virtual UnicodeString& format(int32_t number, + UnicodeString& appendTo, + FieldPosition& pos) const = 0; + + /** + * Format a long number. Concrete subclasses may override + * this function to provide status return. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status the output status. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(int32_t number, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode &status) const; + + /** + * Format an int32 number. Subclasses must implement + * this method. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. + * Can be NULL. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.4 + */ + virtual UnicodeString& format(int32_t number, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + /** + * Format an int64 number. (Not abstract to retain compatibility + * with earlier releases, however subclasses should override this + * method as it just delegates to format(int32_t number...); + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.8 + */ + virtual UnicodeString& format(int64_t number, + UnicodeString& appendTo, + FieldPosition& pos) const; + + /** + * Format an int64 number. (Not abstract to retain compatibility + * with earlier releases, however subclasses should override this + * method as it just delegates to format(int32_t number...); + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(int64_t number, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& status) const; + /** + * Format an int64 number. Subclasses must implement + * this method. + * + * @param number The value to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. + * Can be NULL. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.4 + */ + virtual UnicodeString& format(int64_t number, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + + /** + * Format a decimal number. Subclasses must implement + * this method. The syntax of the unformatted number is a "numeric string" + * as defined in the Decimal Arithmetic Specification, available at + * http://speleotrove.com/decimal + * + * @param number The unformatted number, as a string, to be formatted. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. + * Can be NULL. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.4 + */ + virtual UnicodeString& format(StringPiece number, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; +public: + /** + * Format a decimal number. + * The number is a DigitList wrapper onto a floating point decimal number. + * The default implementation in NumberFormat converts the decimal number + * to a double and formats that. Subclasses of NumberFormat that want + * to specifically handle big decimal numbers must override this method. + * class DecimalFormat does so. + * + * @param number The number, a DigitList format Decimal Floating Point. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(const DigitList &number, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + + /** + * Format a decimal number. + * The number is a DigitList wrapper onto a floating point decimal number. + * The default implementation in NumberFormat converts the decimal number + * to a double and formats that. Subclasses of NumberFormat that want + * to specifically handle big decimal numbers must override this method. + * class DecimalFormat does so. + * + * @param number The number, a DigitList format Decimal Floating Point. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(const DigitList &number, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& status) const; + +public: + + /** + * Return a long if possible (e.g. within range LONG_MAX, + * LONG_MAX], and with no decimals), otherwise a double. If + * IntegerOnly is set, will stop at a decimal point (or equivalent; + * e.g. for rational numbers "1 2/3", will stop after the 1). + * <P> + * If no object can be parsed, index is unchanged, and NULL is + * returned. + * <P> + * This is a pure virtual which concrete subclasses must implement. + * + * @param text The text to be parsed. + * @param result Formattable to be set to the parse result. + * If parse fails, return contents are undefined. + * @param parsePosition The position to start parsing at on input. + * On output, moved to after the last successfully + * parse character. On parse failure, does not change. + * @stable ICU 2.0 + */ + virtual void parse(const UnicodeString& text, + Formattable& result, + ParsePosition& parsePosition) const = 0; + + /** + * Parse a string as a numeric value, and return a Formattable + * numeric object. This method parses integers only if IntegerOnly + * is set. + * + * @param text The text to be parsed. + * @param result Formattable to be set to the parse result. + * If parse fails, return contents are undefined. + * @param status Output parameter set to a failure error code + * when a failure occurs. + * @see NumberFormat::isParseIntegerOnly + * @stable ICU 2.0 + */ + virtual void parse(const UnicodeString& text, + Formattable& result, + UErrorCode& status) const; + + /** + * Parses text from the given string as a currency amount. Unlike + * the parse() method, this method will attempt to parse a generic + * currency name, searching for a match of this object's locale's + * currency display names, or for a 3-letter ISO currency code. + * This method will fail if this format is not a currency format, + * that is, if it does not contain the currency pattern symbol + * (U+00A4) in its prefix or suffix. + * + * @param text the string to parse + * @param pos input-output position; on input, the position within text + * to match; must have 0 <= pos.getIndex() < text.length(); + * on output, the position after the last matched character. + * If the parse fails, the position in unchanged upon output. + * @return if parse succeeds, a pointer to a newly-created CurrencyAmount + * object (owned by the caller) containing information about + * the parsed currency; if parse fails, this is NULL. + * @stable ICU 49 + */ + virtual CurrencyAmount* parseCurrency(const UnicodeString& text, + ParsePosition& pos) const; + + /** + * Return true if this format will parse numbers as integers + * only. For example in the English locale, with ParseIntegerOnly + * true, the string "1234." would be parsed as the integer value + * 1234 and parsing would stop at the "." character. Of course, + * the exact format accepted by the parse operation is locale + * dependant and determined by sub-classes of NumberFormat. + * @return true if this format will parse numbers as integers + * only. + * @stable ICU 2.0 + */ + UBool isParseIntegerOnly(void) const; + + /** + * Sets whether or not numbers should be parsed as integers only. + * @param value set True, this format will parse numbers as integers + * only. + * @see isParseIntegerOnly + * @stable ICU 2.0 + */ + virtual void setParseIntegerOnly(UBool value); + + /** + * Sets whether lenient parsing should be enabled (it is off by default). + * + * @param enable \c TRUE if lenient parsing should be used, + * \c FALSE otherwise. + * @stable ICU 4.8 + */ + virtual void setLenient(UBool enable); + + /** + * Returns whether lenient parsing is enabled (it is off by default). + * + * @return \c TRUE if lenient parsing is enabled, + * \c FALSE otherwise. + * @see #setLenient + * @stable ICU 4.8 + */ + virtual UBool isLenient(void) const; + + /** + * Create a default style NumberFormat for the current default locale. + * The default formatting style is locale dependent. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of NumberFormat. + * @stable ICU 2.0 + */ + static NumberFormat* U_EXPORT2 createInstance(UErrorCode&); + + /** + * Create a default style NumberFormat for the specified locale. + * The default formatting style is locale dependent. + * @param inLocale the given locale. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of NumberFormat. + * @stable ICU 2.0 + */ + static NumberFormat* U_EXPORT2 createInstance(const Locale& inLocale, + UErrorCode&); + + /** + * Create a specific style NumberFormat for the specified locale. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of NumberFormat. + * @param desiredLocale the given locale. + * @param style the given style. + * @param errorCode Output param filled with success/failure status. + * @return A new NumberFormat instance. + * @stable ICU 4.8 + */ + static NumberFormat* U_EXPORT2 createInstance(const Locale& desiredLocale, + UNumberFormatStyle style, + UErrorCode& errorCode); + +#ifndef U_HIDE_INTERNAL_API + + /** + * ICU use only. + * Creates NumberFormat instance without using the cache. + * @internal + */ + static NumberFormat* internalCreateInstance( + const Locale& desiredLocale, + UNumberFormatStyle style, + UErrorCode& errorCode); + + /** + * ICU use only. + * Returns handle to the shared, cached NumberFormat instance for given + * locale. On success, caller must call removeRef() on returned value + * once it is done with the shared instance. + * @internal + */ + static const SharedNumberFormat* U_EXPORT2 createSharedInstance( + const Locale& inLocale, UNumberFormatStyle style, UErrorCode& status); + +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Returns a currency format for the current default locale. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of NumberFormat. + * @stable ICU 2.0 + */ + static NumberFormat* U_EXPORT2 createCurrencyInstance(UErrorCode&); + + /** + * Returns a currency format for the specified locale. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of NumberFormat. + * @param inLocale the given locale. + * @stable ICU 2.0 + */ + static NumberFormat* U_EXPORT2 createCurrencyInstance(const Locale& inLocale, + UErrorCode&); + + /** + * Returns a percentage format for the current default locale. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of NumberFormat. + * @stable ICU 2.0 + */ + static NumberFormat* U_EXPORT2 createPercentInstance(UErrorCode&); + + /** + * Returns a percentage format for the specified locale. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of NumberFormat. + * @param inLocale the given locale. + * @stable ICU 2.0 + */ + static NumberFormat* U_EXPORT2 createPercentInstance(const Locale& inLocale, + UErrorCode&); + + /** + * Returns a scientific format for the current default locale. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of NumberFormat. + * @stable ICU 2.0 + */ + static NumberFormat* U_EXPORT2 createScientificInstance(UErrorCode&); + + /** + * Returns a scientific format for the specified locale. + * <p> + * <strong>NOTE:</strong> New users are strongly encouraged to use + * {@link NumberFormatter} instead of NumberFormat. + * @param inLocale the given locale. + * @stable ICU 2.0 + */ + static NumberFormat* U_EXPORT2 createScientificInstance(const Locale& inLocale, + UErrorCode&); + + /** + * Get the set of Locales for which NumberFormats are installed. + * @param count Output param to receive the size of the locales + * @stable ICU 2.0 + */ + static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count); + +#if !UCONFIG_NO_SERVICE + /** + * Register a new NumberFormatFactory. The factory will be adopted. + * Because ICU may choose to cache NumberFormat objects internally, + * this must be called at application startup, prior to any calls to + * NumberFormat::createInstance to avoid undefined behavior. + * @param toAdopt the NumberFormatFactory instance to be adopted + * @param status the in/out status code, no special meanings are assigned + * @return a registry key that can be used to unregister this factory + * @stable ICU 2.6 + */ + static URegistryKey U_EXPORT2 registerFactory(NumberFormatFactory* toAdopt, UErrorCode& status); + + /** + * Unregister a previously-registered NumberFormatFactory using the key returned from the + * register call. Key becomes invalid after a successful call and should not be used again. + * The NumberFormatFactory corresponding to the key will be deleted. + * Because ICU may choose to cache NumberFormat objects internally, + * this should be called during application shutdown, after all calls to + * NumberFormat::createInstance to avoid undefined behavior. + * @param key the registry key returned by a previous call to registerFactory + * @param status the in/out status code, no special meanings are assigned + * @return TRUE if the factory for the key was successfully unregistered + * @stable ICU 2.6 + */ + static UBool U_EXPORT2 unregister(URegistryKey key, UErrorCode& status); + + /** + * Return a StringEnumeration over the locales available at the time of the call, + * including registered locales. + * @return a StringEnumeration over the locales available at the time of the call + * @stable ICU 2.6 + */ + static StringEnumeration* U_EXPORT2 getAvailableLocales(void); +#endif /* UCONFIG_NO_SERVICE */ + + /** + * Returns true if grouping is used in this format. For example, + * in the English locale, with grouping on, the number 1234567 + * might be formatted as "1,234,567". The grouping separator as + * well as the size of each group is locale dependent and is + * determined by sub-classes of NumberFormat. + * @see setGroupingUsed + * @stable ICU 2.0 + */ + UBool isGroupingUsed(void) const; + + /** + * Set whether or not grouping will be used in this format. + * @param newValue True, grouping will be used in this format. + * @see getGroupingUsed + * @stable ICU 2.0 + */ + virtual void setGroupingUsed(UBool newValue); + + /** + * Returns the maximum number of digits allowed in the integer portion of a + * number. + * @return the maximum number of digits allowed in the integer portion of a + * number. + * @see setMaximumIntegerDigits + * @stable ICU 2.0 + */ + int32_t getMaximumIntegerDigits(void) const; + + /** + * Sets the maximum number of digits allowed in the integer portion of a + * number. maximumIntegerDigits must be >= minimumIntegerDigits. If the + * new value for maximumIntegerDigits is less than the current value + * of minimumIntegerDigits, then minimumIntegerDigits will also be set to + * the new value. + * + * @param newValue the new value for the maximum number of digits + * allowed in the integer portion of a number. + * @see getMaximumIntegerDigits + * @stable ICU 2.0 + */ + virtual void setMaximumIntegerDigits(int32_t newValue); + + /** + * Returns the minimum number of digits allowed in the integer portion of a + * number. + * @return the minimum number of digits allowed in the integer portion of a + * number. + * @see setMinimumIntegerDigits + * @stable ICU 2.0 + */ + int32_t getMinimumIntegerDigits(void) const; + + /** + * Sets the minimum number of digits allowed in the integer portion of a + * number. minimumIntegerDigits must be <= maximumIntegerDigits. If the + * new value for minimumIntegerDigits exceeds the current value + * of maximumIntegerDigits, then maximumIntegerDigits will also be set to + * the new value. + * @param newValue the new value to be set. + * @see getMinimumIntegerDigits + * @stable ICU 2.0 + */ + virtual void setMinimumIntegerDigits(int32_t newValue); + + /** + * Returns the maximum number of digits allowed in the fraction portion of a + * number. + * @return the maximum number of digits allowed in the fraction portion of a + * number. + * @see setMaximumFractionDigits + * @stable ICU 2.0 + */ + int32_t getMaximumFractionDigits(void) const; + + /** + * Sets the maximum number of digits allowed in the fraction portion of a + * number. maximumFractionDigits must be >= minimumFractionDigits. If the + * new value for maximumFractionDigits is less than the current value + * of minimumFractionDigits, then minimumFractionDigits will also be set to + * the new value. + * @param newValue the new value to be set. + * @see getMaximumFractionDigits + * @stable ICU 2.0 + */ + virtual void setMaximumFractionDigits(int32_t newValue); + + /** + * Returns the minimum number of digits allowed in the fraction portion of a + * number. + * @return the minimum number of digits allowed in the fraction portion of a + * number. + * @see setMinimumFractionDigits + * @stable ICU 2.0 + */ + int32_t getMinimumFractionDigits(void) const; + + /** + * Sets the minimum number of digits allowed in the fraction portion of a + * number. minimumFractionDigits must be <= maximumFractionDigits. If the + * new value for minimumFractionDigits exceeds the current value + * of maximumFractionDigits, then maximumIntegerDigits will also be set to + * the new value + * @param newValue the new value to be set. + * @see getMinimumFractionDigits + * @stable ICU 2.0 + */ + virtual void setMinimumFractionDigits(int32_t newValue); + + /** + * Sets the currency used to display currency + * amounts. This takes effect immediately, if this format is a + * currency format. If this format is not a currency format, then + * the currency is used if and when this object becomes a + * currency format. + * @param theCurrency a 3-letter ISO code indicating new currency + * to use. It need not be null-terminated. May be the empty + * string or NULL to indicate no currency. + * @param ec input-output error code + * @stable ICU 3.0 + */ + virtual void setCurrency(const char16_t* theCurrency, UErrorCode& ec); + + /** + * Gets the currency used to display currency + * amounts. This may be an empty string for some subclasses. + * @return a 3-letter null-terminated ISO code indicating + * the currency in use, or a pointer to the empty string. + * @stable ICU 2.6 + */ + const char16_t* getCurrency() const; + + /** + * Set a particular UDisplayContext value in the formatter, such as + * UDISPCTX_CAPITALIZATION_FOR_STANDALONE. + * @param value The UDisplayContext value to set. + * @param status Input/output status. If at entry this indicates a failure + * status, the function will do nothing; otherwise this will be + * updated with any new status from the function. + * @stable ICU 53 + */ + virtual void setContext(UDisplayContext value, UErrorCode& status); + + /** + * Get the formatter's UDisplayContext value for the specified UDisplayContextType, + * such as UDISPCTX_TYPE_CAPITALIZATION. + * @param type The UDisplayContextType whose value to return + * @param status Input/output status. If at entry this indicates a failure + * status, the function will do nothing; otherwise this will be + * updated with any new status from the function. + * @return The UDisplayContextValue for the specified type. + * @stable ICU 53 + */ + virtual UDisplayContext getContext(UDisplayContextType type, UErrorCode& status) const; + + /** + * Get the rounding mode. This will always return NumberFormat::ERoundingMode::kRoundUnnecessary + * if the subclass does not support rounding. + * @return A rounding mode + * @draft ICU 60 + */ + virtual ERoundingMode getRoundingMode(void) const; + + /** + * Set the rounding mode. If a subclass does not support rounding, this will do nothing. + * @param roundingMode A rounding mode + * @draft ICU 60 + */ + virtual void setRoundingMode(ERoundingMode roundingMode); + +public: + + /** + * Return the class ID for this class. This is useful for + * comparing to a return value from getDynamicClassID(). Note that, + * because NumberFormat is an abstract base class, no fully constructed object + * will have the class ID returned by NumberFormat::getStaticClassID(). + * @return The class ID for all objects of this class. + * @stable ICU 2.0 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. + * This method is to implement a simple version of RTTI, since not all + * C++ compilers support genuine RTTI. Polymorphic operator==() and + * clone() methods call this method. + * <P> + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 2.0 + */ + virtual UClassID getDynamicClassID(void) const = 0; + +protected: + + /** + * Default constructor for subclass use only. + * @stable ICU 2.0 + */ + NumberFormat(); + + /** + * Copy constructor. + * @stable ICU 2.0 + */ + NumberFormat(const NumberFormat&); + + /** + * Assignment operator. + * @stable ICU 2.0 + */ + NumberFormat& operator=(const NumberFormat&); + + /** + * Returns the currency in effect for this formatter. Subclasses + * should override this method as needed. Unlike getCurrency(), + * this method should never return "". + * @result output parameter for null-terminated result, which must + * have a capacity of at least 4 + * @internal + */ + virtual void getEffectiveCurrency(char16_t* result, UErrorCode& ec) const; + +#ifndef U_HIDE_INTERNAL_API + /** + * Creates the specified number format style of the desired locale. + * If mustBeDecimalFormat is TRUE, then the returned pointer is + * either a DecimalFormat or it is NULL. + * @internal + */ + static NumberFormat* makeInstance(const Locale& desiredLocale, + UNumberFormatStyle style, + UBool mustBeDecimalFormat, + UErrorCode& errorCode); +#endif /* U_HIDE_INTERNAL_API */ + +private: + + static UBool isStyleSupported(UNumberFormatStyle style); + + /** + * Creates the specified decimal format style of the desired locale. + * @param desiredLocale the given locale. + * @param style the given style. + * @param errorCode Output param filled with success/failure status. + * @return A new NumberFormat instance. + */ + static NumberFormat* makeInstance(const Locale& desiredLocale, + UNumberFormatStyle style, + UErrorCode& errorCode); + + UBool fGroupingUsed; + int32_t fMaxIntegerDigits; + int32_t fMinIntegerDigits; + int32_t fMaxFractionDigits; + int32_t fMinFractionDigits; + + protected: + /** \internal */ + static const int32_t gDefaultMaxIntegerDigits; + /** \internal */ + static const int32_t gDefaultMinIntegerDigits; + + private: + UBool fParseIntegerOnly; + UBool fLenient; // TRUE => lenient parse is enabled + + // ISO currency code + char16_t fCurrency[4]; + + UDisplayContext fCapitalizationContext; + + friend class ICUNumberFormatFactory; // access to makeInstance + friend class ICUNumberFormatService; + friend class ::NumberFormatTest; // access to isStyleSupported() +}; + +#if !UCONFIG_NO_SERVICE +/** + * A NumberFormatFactory is used to register new number formats. The factory + * should be able to create any of the predefined formats for each locale it + * supports. When registered, the locales it supports extend or override the + * locale already supported by ICU. + * + * @stable ICU 2.6 + */ +class U_I18N_API NumberFormatFactory : public UObject { +public: + + /** + * Destructor + * @stable ICU 3.0 + */ + virtual ~NumberFormatFactory(); + + /** + * Return true if this factory will be visible. Default is true. + * If not visible, the locales supported by this factory will not + * be listed by getAvailableLocales. + * @stable ICU 2.6 + */ + virtual UBool visible(void) const = 0; + + /** + * Return the locale names directly supported by this factory. The number of names + * is returned in count; + * @stable ICU 2.6 + */ + virtual const UnicodeString * getSupportedIDs(int32_t &count, UErrorCode& status) const = 0; + + /** + * Return a number format of the appropriate type. If the locale + * is not supported, return null. If the locale is supported, but + * the type is not provided by this service, return null. Otherwise + * return an appropriate instance of NumberFormat. + * @stable ICU 2.6 + */ + virtual NumberFormat* createFormat(const Locale& loc, UNumberFormatStyle formatType) = 0; +}; + +/** + * A NumberFormatFactory that supports a single locale. It can be visible or invisible. + * @stable ICU 2.6 + */ +class U_I18N_API SimpleNumberFormatFactory : public NumberFormatFactory { +protected: + /** + * True if the locale supported by this factory is visible. + * @stable ICU 2.6 + */ + const UBool _visible; + + /** + * The locale supported by this factory, as a UnicodeString. + * @stable ICU 2.6 + */ + UnicodeString _id; + +public: + /** + * @stable ICU 2.6 + */ + SimpleNumberFormatFactory(const Locale& locale, UBool visible = TRUE); + + /** + * @stable ICU 3.0 + */ + virtual ~SimpleNumberFormatFactory(); + + /** + * @stable ICU 2.6 + */ + virtual UBool visible(void) const; + + /** + * @stable ICU 2.6 + */ + virtual const UnicodeString * getSupportedIDs(int32_t &count, UErrorCode& status) const; +}; +#endif /* #if !UCONFIG_NO_SERVICE */ + +// ------------------------------------- + +inline UBool +NumberFormat::isParseIntegerOnly() const +{ + return fParseIntegerOnly; +} + +inline UBool +NumberFormat::isLenient() const +{ + return fLenient; +} + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _NUMFMT +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/numsys.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/numsys.h new file mode 100755 index 00000000..9ec3f13f --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/numsys.h @@ -0,0 +1,210 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2010-2014, International Business Machines Corporation and +* others. All Rights Reserved. +******************************************************************************* +* +* +* File NUMSYS.H +* +* Modification History:* +* Date Name Description +* +******************************************************************************** +*/ + +#ifndef NUMSYS +#define NUMSYS + +#include "unicode/utypes.h" + +/** + * \def NUMSYS_NAME_CAPACITY + * Size of a numbering system name. + * @internal + */ +#define NUMSYS_NAME_CAPACITY 8 + + +/** + * \file + * \brief C++ API: NumberingSystem object + */ + +#if !UCONFIG_NO_FORMATTING + + +#include "unicode/format.h" +#include "unicode/uobject.h" + +U_NAMESPACE_BEGIN + +/** + * Defines numbering systems. A numbering system describes the scheme by which + * numbers are to be presented to the end user. In its simplest form, a numbering + * system describes the set of digit characters that are to be used to display + * numbers, such as Western digits, Thai digits, Arabic-Indic digits, etc., in a + * positional numbering system with a specified radix (typically 10). + * More complicated numbering systems are algorithmic in nature, and require use + * of an RBNF formatter ( rule based number formatter ), in order to calculate + * the characters to be displayed for a given number. Examples of algorithmic + * numbering systems include Roman numerals, Chinese numerals, and Hebrew numerals. + * Formatting rules for many commonly used numbering systems are included in + * the ICU package, based on the numbering system rules defined in CLDR. + * Alternate numbering systems can be specified to a locale by using the + * numbers locale keyword. + */ + +class U_I18N_API NumberingSystem : public UObject { +public: + + /** + * Default Constructor. + * + * @stable ICU 4.2 + */ + NumberingSystem(); + + /** + * Copy constructor. + * @stable ICU 4.2 + */ + NumberingSystem(const NumberingSystem& other); + + /** + * Destructor. + * @stable ICU 4.2 + */ + virtual ~NumberingSystem(); + + /** + * Create the default numbering system associated with the specified locale. + * @param inLocale The given locale. + * @param status ICU status + * @stable ICU 4.2 + */ + static NumberingSystem* U_EXPORT2 createInstance(const Locale & inLocale, UErrorCode& status); + + /** + * Create the default numbering system associated with the default locale. + * @stable ICU 4.2 + */ + static NumberingSystem* U_EXPORT2 createInstance(UErrorCode& status); + + /** + * Create a numbering system using the specified radix, type, and description. + * @param radix The radix (base) for this numbering system. + * @param isAlgorithmic TRUE if the numbering system is algorithmic rather than numeric. + * @param description The string representing the set of digits used in a numeric system, or the name of the RBNF + * ruleset to be used in an algorithmic system. + * @param status ICU status + * @stable ICU 4.2 + */ + static NumberingSystem* U_EXPORT2 createInstance(int32_t radix, UBool isAlgorithmic, const UnicodeString& description, UErrorCode& status ); + + /** + * Return a StringEnumeration over all the names of numbering systems known to ICU. + * @stable ICU 4.2 + */ + + static StringEnumeration * U_EXPORT2 getAvailableNames(UErrorCode& status); + + /** + * Create a numbering system from one of the predefined numbering systems specified + * by CLDR and known to ICU, such as "latn", "arabext", or "hanidec"; the full list + * is returned by unumsys_openAvailableNames. Note that some of the names listed at + * http://unicode.org/repos/cldr/tags/latest/common/bcp47/number.xml - e.g. + * default, native, traditional, finance - do not identify specific numbering systems, + * but rather key values that may only be used as part of a locale, which in turn + * defines how they are mapped to a specific numbering system such as "latn" or "hant". + * @param name The name of the numbering system. + * @param status ICU status + * @stable ICU 4.2 + */ + static NumberingSystem* U_EXPORT2 createInstanceByName(const char* name, UErrorCode& status); + + + /** + * Returns the radix of this numbering system. Simple positional numbering systems + * typically have radix 10, but might have a radix of e.g. 16 for hexadecimal. The + * radix is less well-defined for non-positional algorithmic systems. + * @stable ICU 4.2 + */ + int32_t getRadix() const; + + /** + * Returns the name of this numbering system if it was created using one of the predefined names + * known to ICU. Otherwise, returns NULL. + * The predefined names are identical to the numbering system names as defined by + * the BCP47 definition in Unicode CLDR. + * See also, http://www.unicode.org/repos/cldr/tags/latest/common/bcp47/number.xml + * @stable ICU 4.6 + */ + const char * getName() const; + + /** + * Returns the description string of this numbering system. For simple + * positional systems this is the ordered string of digits (with length matching + * the radix), e.g. "\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D" + * for "hanidec"; it would be "0123456789ABCDEF" for hexadecimal. For + * algorithmic systems this is the name of the RBNF ruleset used for formatting, + * e.g. "zh/SpelloutRules/%spellout-cardinal" for "hans" or "%greek-upper" for + * "grek". + * @stable ICU 4.2 + */ + virtual UnicodeString getDescription() const; + + + + /** + * Returns TRUE if the given numbering system is algorithmic + * + * @return TRUE if the numbering system is algorithmic. + * Otherwise, return FALSE. + * @stable ICU 4.2 + */ + UBool isAlgorithmic() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 4.2 + * + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 4.2 + */ + virtual UClassID getDynamicClassID() const; + + +private: + UnicodeString desc; + int32_t radix; + UBool algorithmic; + char name[NUMSYS_NAME_CAPACITY+1]; + + void setRadix(int32_t radix); + + void setAlgorithmic(UBool algorithmic); + + void setDesc(const UnicodeString &desc); + + void setName(const char* name); + + static UBool isValidDigitString(const UnicodeString &str); + + UBool hasContiguousDecimalDigits() const; +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _NUMSYS +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/parseerr.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/parseerr.h new file mode 100755 index 00000000..c23cc273 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/parseerr.h @@ -0,0 +1,94 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 1999-2005, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* Date Name Description +* 03/14/00 aliu Creation. +* 06/27/00 aliu Change from C++ class to C struct +********************************************************************** +*/ +#ifndef PARSEERR_H +#define PARSEERR_H + +#include "unicode/utypes.h" + + +/** + * \file + * \brief C API: Parse Error Information + */ +/** + * The capacity of the context strings in UParseError. + * @stable ICU 2.0 + */ +enum { U_PARSE_CONTEXT_LEN = 16 }; + +/** + * A UParseError struct is used to returned detailed information about + * parsing errors. It is used by ICU parsing engines that parse long + * rules, patterns, or programs, where the text being parsed is long + * enough that more information than a UErrorCode is needed to + * localize the error. + * + * <p>The line, offset, and context fields are optional; parsing + * engines may choose not to use to use them. + * + * <p>The preContext and postContext strings include some part of the + * context surrounding the error. If the source text is "let for=7" + * and "for" is the error (e.g., because it is a reserved word), then + * some examples of what a parser might produce are the following: + * + * <pre> + * preContext postContext + * "" "" The parser does not support context + * "let " "=7" Pre- and post-context only + * "let " "for=7" Pre- and post-context and error text + * "" "for" Error text only + * </pre> + * + * <p>Examples of engines which use UParseError (or may use it in the + * future) are Transliterator, RuleBasedBreakIterator, and + * RegexPattern. + * + * @stable ICU 2.0 + */ +typedef struct UParseError { + + /** + * The line on which the error occurred. If the parser uses this + * field, it sets it to the line number of the source text line on + * which the error appears, which will be a value >= 1. If the + * parse does not support line numbers, the value will be <= 0. + * @stable ICU 2.0 + */ + int32_t line; + + /** + * The character offset to the error. If the line field is >= 1, + * then this is the offset from the start of the line. Otherwise, + * this is the offset from the start of the text. If the parser + * does not support this field, it will have a value < 0. + * @stable ICU 2.0 + */ + int32_t offset; + + /** + * Textual context before the error. Null-terminated. The empty + * string if not supported by parser. + * @stable ICU 2.0 + */ + UChar preContext[U_PARSE_CONTEXT_LEN]; + + /** + * The error itself and/or textual context after the error. + * Null-terminated. The empty string if not supported by parser. + * @stable ICU 2.0 + */ + UChar postContext[U_PARSE_CONTEXT_LEN]; + +} UParseError; + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/parsepos.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/parsepos.h new file mode 100755 index 00000000..bbebca7b --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/parsepos.h @@ -0,0 +1,232 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +* Copyright (C) 1997-2005, International Business Machines Corporation and others. All Rights Reserved. +******************************************************************************* +* +* File PARSEPOS.H +* +* Modification History: +* +* Date Name Description +* 07/09/97 helena Converted from java. +* 07/17/98 stephen Added errorIndex support. +* 05/11/99 stephen Cleaned up. +******************************************************************************* +*/ + +#ifndef PARSEPOS_H +#define PARSEPOS_H + +#include "unicode/utypes.h" +#include "unicode/uobject.h" + + +U_NAMESPACE_BEGIN + +/** + * \file + * \brief C++ API: Canonical Iterator + */ +/** + * <code>ParsePosition</code> is a simple class used by <code>Format</code> + * and its subclasses to keep track of the current position during parsing. + * The <code>parseObject</code> method in the various <code>Format</code> + * classes requires a <code>ParsePosition</code> object as an argument. + * + * <p> + * By design, as you parse through a string with different formats, + * you can use the same <code>ParsePosition</code>, since the index parameter + * records the current position. + * + * The ParsePosition class is not suitable for subclassing. + * + * @version 1.3 10/30/97 + * @author Mark Davis, Helena Shih + * @see java.text.Format + */ + +class U_COMMON_API ParsePosition : public UObject { +public: + /** + * Default constructor, the index starts with 0 as default. + * @stable ICU 2.0 + */ + ParsePosition() + : UObject(), + index(0), + errorIndex(-1) + {} + + /** + * Create a new ParsePosition with the given initial index. + * @param newIndex the new text offset. + * @stable ICU 2.0 + */ + ParsePosition(int32_t newIndex) + : UObject(), + index(newIndex), + errorIndex(-1) + {} + + /** + * Copy constructor + * @param copy the object to be copied from. + * @stable ICU 2.0 + */ + ParsePosition(const ParsePosition& copy) + : UObject(copy), + index(copy.index), + errorIndex(copy.errorIndex) + {} + + /** + * Destructor + * @stable ICU 2.0 + */ + virtual ~ParsePosition(); + + /** + * Assignment operator + * @stable ICU 2.0 + */ + ParsePosition& operator=(const ParsePosition& copy); + + /** + * Equality operator. + * @return TRUE if the two parse positions are equal, FALSE otherwise. + * @stable ICU 2.0 + */ + UBool operator==(const ParsePosition& that) const; + + /** + * Equality operator. + * @return TRUE if the two parse positions are not equal, FALSE otherwise. + * @stable ICU 2.0 + */ + UBool operator!=(const ParsePosition& that) const; + + /** + * Clone this object. + * Clones can be used concurrently in multiple threads. + * If an error occurs, then NULL is returned. + * The caller must delete the clone. + * + * @return a clone of this object + * + * @see getDynamicClassID + * @stable ICU 2.8 + */ + ParsePosition *clone() const; + + /** + * Retrieve the current parse position. On input to a parse method, this + * is the index of the character at which parsing will begin; on output, it + * is the index of the character following the last character parsed. + * @return the current index. + * @stable ICU 2.0 + */ + int32_t getIndex(void) const; + + /** + * Set the current parse position. + * @param index the new index. + * @stable ICU 2.0 + */ + void setIndex(int32_t index); + + /** + * Set the index at which a parse error occurred. Formatters + * should set this before returning an error code from their + * parseObject method. The default value is -1 if this is not + * set. + * @stable ICU 2.0 + */ + void setErrorIndex(int32_t ei); + + /** + * Retrieve the index at which an error occurred, or -1 if the + * error index has not been set. + * @stable ICU 2.0 + */ + int32_t getErrorIndex(void) const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.2 + */ + static UClassID U_EXPORT2 getStaticClassID(); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.2 + */ + virtual UClassID getDynamicClassID() const; + +private: + /** + * Input: the place you start parsing. + * <br>Output: position where the parse stopped. + * This is designed to be used serially, + * with each call setting index up for the next one. + */ + int32_t index; + + /** + * The index at which a parse error occurred. + */ + int32_t errorIndex; + +}; + +inline ParsePosition& +ParsePosition::operator=(const ParsePosition& copy) +{ + index = copy.index; + errorIndex = copy.errorIndex; + return *this; +} + +inline UBool +ParsePosition::operator==(const ParsePosition& copy) const +{ + if(index != copy.index || errorIndex != copy.errorIndex) + return FALSE; + else + return TRUE; +} + +inline UBool +ParsePosition::operator!=(const ParsePosition& copy) const +{ + return !operator==(copy); +} + +inline int32_t +ParsePosition::getIndex() const +{ + return index; +} + +inline void +ParsePosition::setIndex(int32_t offset) +{ + this->index = offset; +} + +inline int32_t +ParsePosition::getErrorIndex() const +{ + return errorIndex; +} + +inline void +ParsePosition::setErrorIndex(int32_t ei) +{ + this->errorIndex = ei; +} +U_NAMESPACE_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/platform.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/platform.h new file mode 100755 index 00000000..c63fce6e --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/platform.h @@ -0,0 +1,865 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* +* Copyright (C) 1997-2016, International Business Machines +* Corporation and others. All Rights Reserved. +* +****************************************************************************** +* +* FILE NAME : platform.h +* +* Date Name Description +* 05/13/98 nos Creation (content moved here from ptypes.h). +* 03/02/99 stephen Added AS400 support. +* 03/30/99 stephen Added Linux support. +* 04/13/99 stephen Reworked for autoconf. +****************************************************************************** +*/ + +#ifndef _PLATFORM_H +#define _PLATFORM_H + +#include "unicode/uconfig.h" +#include "unicode/uvernum.h" + +/** + * \file + * \brief Basic types for the platform. + * + * This file used to be generated by autoconf/configure. + * Starting with ICU 49, platform.h is a normal source file, + * to simplify cross-compiling and working with non-autoconf/make build systems. + * + * When a value in this file does not work on a platform, then please + * try to derive it from the U_PLATFORM value + * (for which we might need a new value constant in rare cases) + * and/or from other macros that are predefined by the compiler + * or defined in standard (POSIX or platform or compiler) headers. + * + * As a temporary workaround, you can add an explicit <code>#define</code> for some macros + * before it is first tested, or add an equivalent -D macro definition + * to the compiler's command line. + * + * Note: Some compilers provide ways to show the predefined macros. + * For example, with gcc you can compile an empty .c file and have the compiler + * print the predefined macros with + * \code + * gcc -E -dM -x c /dev/null | sort + * \endcode + * (You can provide an actual empty .c file rather than /dev/null. + * <code>-x c++</code> is for C++.) + */ + +/** + * Define some things so that they can be documented. + * @internal + */ +#ifdef U_IN_DOXYGEN +/* + * Problem: "platform.h:335: warning: documentation for unknown define U_HAVE_STD_STRING found." means that U_HAVE_STD_STRING is not documented. + * Solution: #define any defines for non @internal API here, so that they are visible in the docs. If you just set PREDEFINED in Doxyfile.in, they won't be documented. + */ + +/* None for now. */ +#endif + +/** + * \def U_PLATFORM + * The U_PLATFORM macro defines the platform we're on. + * + * We used to define one different, value-less macro per platform. + * That made it hard to know the set of relevant platforms and macros, + * and hard to deal with variants of platforms. + * + * Starting with ICU 49, we define platforms as numeric macros, + * with ranges of values for related platforms and their variants. + * The U_PLATFORM macro is set to one of these values. + * + * Historical note from the Solaris Wikipedia article: + * AT&T and Sun collaborated on a project to merge the most popular Unix variants + * on the market at that time: BSD, System V, and Xenix. + * This became Unix System V Release 4 (SVR4). + * + * @internal + */ + +/** Unknown platform. @internal */ +#define U_PF_UNKNOWN 0 +/** Windows @internal */ +#define U_PF_WINDOWS 1000 +/** MinGW. Windows, calls to Win32 API, but using GNU gcc and binutils. @internal */ +#define U_PF_MINGW 1800 +/** + * Cygwin. Windows, calls to cygwin1.dll for Posix functions, + * using MSVC or GNU gcc and binutils. + * @internal + */ +#define U_PF_CYGWIN 1900 +/* Reserve 2000 for U_PF_UNIX? */ +/** HP-UX is based on UNIX System V. @internal */ +#define U_PF_HPUX 2100 +/** Solaris is a Unix operating system based on SVR4. @internal */ +#define U_PF_SOLARIS 2600 +/** BSD is a UNIX operating system derivative. @internal */ +#define U_PF_BSD 3000 +/** AIX is based on UNIX System V Releases and 4.3 BSD. @internal */ +#define U_PF_AIX 3100 +/** IRIX is based on UNIX System V with BSD extensions. @internal */ +#define U_PF_IRIX 3200 +/** + * Darwin is a POSIX-compliant operating system, composed of code developed by Apple, + * as well as code derived from NeXTSTEP, BSD, and other projects, + * built around the Mach kernel. + * Darwin forms the core set of components upon which Mac OS X, Apple TV, and iOS are based. + * (Original description modified from WikiPedia.) + * @internal + */ +#define U_PF_DARWIN 3500 +/** iPhone OS (iOS) is a derivative of Mac OS X. @internal */ +#define U_PF_IPHONE 3550 +/** QNX is a commercial Unix-like real-time operating system related to BSD. @internal */ +#define U_PF_QNX 3700 +/** Linux is a Unix-like operating system. @internal */ +#define U_PF_LINUX 4000 +/** + * Native Client is pretty close to Linux. + * See https://developer.chrome.com/native-client and + * http://www.chromium.org/nativeclient + * @internal + */ +#define U_PF_BROWSER_NATIVE_CLIENT 4020 +/** Android is based on Linux. @internal */ +#define U_PF_ANDROID 4050 +/** Fuchsia is a POSIX-ish platform. @internal */ +#define U_PF_FUCHSIA 4100 +/* Maximum value for Linux-based platform is 4499 */ +/** z/OS is the successor to OS/390 which was the successor to MVS. @internal */ +#define U_PF_OS390 9000 +/** "IBM i" is the current name of what used to be i5/OS and earlier OS/400. @internal */ +#define U_PF_OS400 9400 + +#ifdef U_PLATFORM + /* Use the predefined value. */ +#elif defined(__MINGW32__) +# define U_PLATFORM U_PF_MINGW +#elif defined(__CYGWIN__) +# define U_PLATFORM U_PF_CYGWIN +#elif defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) +# define U_PLATFORM U_PF_WINDOWS +#elif defined(__ANDROID__) +# define U_PLATFORM U_PF_ANDROID + /* Android wchar_t support depends on the API level. */ +# include <android/api-level.h> +#elif defined(__pnacl__) || defined(__native_client__) +# define U_PLATFORM U_PF_BROWSER_NATIVE_CLIENT +#elif defined(__Fuchsia__) +# define U_PLATFORM U_PF_FUCHSIA +#elif defined(linux) || defined(__linux__) || defined(__linux) +# define U_PLATFORM U_PF_LINUX +#elif defined(__APPLE__) && defined(__MACH__) +# include <TargetConditionals.h> +# if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE /* variant of TARGET_OS_MAC */ +# define U_PLATFORM U_PF_IPHONE +# else +# define U_PLATFORM U_PF_DARWIN +# endif +#elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__MirBSD__) +# if defined(__FreeBSD__) +# include <sys/endian.h> +# endif +# define U_PLATFORM U_PF_BSD +#elif defined(sun) || defined(__sun) + /* Check defined(__SVR4) || defined(__svr4__) to distinguish Solaris from SunOS? */ +# define U_PLATFORM U_PF_SOLARIS +# if defined(__GNUC__) + /* Solaris/GCC needs this header file to get the proper endianness. Normally, this + * header file is included with stddef.h but on Solairs/GCC, the GCC version of stddef.h + * is included which does not include this header file. + */ +# include <sys/isa_defs.h> +# endif +#elif defined(_AIX) || defined(__TOS_AIX__) +# define U_PLATFORM U_PF_AIX +#elif defined(_hpux) || defined(hpux) || defined(__hpux) +# define U_PLATFORM U_PF_HPUX +#elif defined(sgi) || defined(__sgi) +# define U_PLATFORM U_PF_IRIX +#elif defined(__QNX__) || defined(__QNXNTO__) +# define U_PLATFORM U_PF_QNX +#elif defined(__TOS_MVS__) +# define U_PLATFORM U_PF_OS390 +#elif defined(__OS400__) || defined(__TOS_OS400__) +# define U_PLATFORM U_PF_OS400 +#else +# define U_PLATFORM U_PF_UNKNOWN +#endif + +/** + * \def UPRV_INCOMPLETE_CPP11_SUPPORT + * This switch turns off ICU 60 NumberFormatter code. + * By default, this switch is enabled on AIX and z/OS, + * which have poor C++11 support. + * + * NOTE: This switch is intended to be temporary; see #13393. + * + * @internal + */ +#ifndef UPRV_INCOMPLETE_CPP11_SUPPORT +# define UPRV_INCOMPLETE_CPP11_SUPPORT (U_PLATFORM == U_PF_AIX || U_PLATFORM == U_PF_OS390 || U_PLATFORM == U_PF_SOLARIS ) +#endif + +/** + * \def CYGWINMSVC + * Defined if this is Windows with Cygwin, but using MSVC rather than gcc. + * Otherwise undefined. + * @internal + */ +/* Commented out because this is already set in mh-cygwin-msvc +#if U_PLATFORM == U_PF_CYGWIN && defined(_MSC_VER) +# define CYGWINMSVC +#endif +*/ + +/** + * \def U_PLATFORM_USES_ONLY_WIN32_API + * Defines whether the platform uses only the Win32 API. + * Set to 1 for Windows/MSVC and MinGW but not Cygwin. + * @internal + */ +#ifdef U_PLATFORM_USES_ONLY_WIN32_API + /* Use the predefined value. */ +#elif (U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_MINGW) || defined(CYGWINMSVC) +# define U_PLATFORM_USES_ONLY_WIN32_API 1 +#else + /* Cygwin implements POSIX. */ +# define U_PLATFORM_USES_ONLY_WIN32_API 0 +#endif + +/** + * \def U_PLATFORM_HAS_WIN32_API + * Defines whether the Win32 API is available on the platform. + * Set to 1 for Windows/MSVC, MinGW and Cygwin. + * @internal + */ +#ifdef U_PLATFORM_HAS_WIN32_API + /* Use the predefined value. */ +#elif U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +# define U_PLATFORM_HAS_WIN32_API 1 +#else +# define U_PLATFORM_HAS_WIN32_API 0 +#endif + +/** + * \def U_PLATFORM_HAS_WINUWP_API + * Defines whether target is intended for Universal Windows Platform API + * Set to 1 for Windows10 Release Solution Configuration + * @internal + */ +#ifdef U_PLATFORM_HAS_WINUWP_API + /* Use the predefined value. */ +#else +# define U_PLATFORM_HAS_WINUWP_API 0 +#endif + +/** + * \def U_PLATFORM_IMPLEMENTS_POSIX + * Defines whether the platform implements (most of) the POSIX API. + * Set to 1 for Cygwin and most other platforms. + * @internal + */ +#ifdef U_PLATFORM_IMPLEMENTS_POSIX + /* Use the predefined value. */ +#elif U_PLATFORM_USES_ONLY_WIN32_API +# define U_PLATFORM_IMPLEMENTS_POSIX 0 +#else +# define U_PLATFORM_IMPLEMENTS_POSIX 1 +#endif + +/** + * \def U_PLATFORM_IS_LINUX_BASED + * Defines whether the platform is Linux or one of its derivatives. + * @internal + */ +#ifdef U_PLATFORM_IS_LINUX_BASED + /* Use the predefined value. */ +#elif U_PF_LINUX <= U_PLATFORM && U_PLATFORM <= 4499 +# define U_PLATFORM_IS_LINUX_BASED 1 +#else +# define U_PLATFORM_IS_LINUX_BASED 0 +#endif + +/** + * \def U_PLATFORM_IS_DARWIN_BASED + * Defines whether the platform is Darwin or one of its derivatives. + * @internal + */ +#ifdef U_PLATFORM_IS_DARWIN_BASED + /* Use the predefined value. */ +#elif U_PF_DARWIN <= U_PLATFORM && U_PLATFORM <= U_PF_IPHONE +# define U_PLATFORM_IS_DARWIN_BASED 1 +#else +# define U_PLATFORM_IS_DARWIN_BASED 0 +#endif + +/** + * \def U_HAVE_STDINT_H + * Defines whether stdint.h is available. It is a C99 standard header. + * We used to include inttypes.h which includes stdint.h but we usually do not need + * the additional definitions from inttypes.h. + * @internal + */ +#ifdef U_HAVE_STDINT_H + /* Use the predefined value. */ +#elif U_PLATFORM_USES_ONLY_WIN32_API +# if defined(__BORLANDC__) || U_PLATFORM == U_PF_MINGW || (defined(_MSC_VER) && _MSC_VER>=1600) + /* Windows Visual Studio 9 and below do not have stdint.h & inttypes.h, but VS 2010 adds them. */ +# define U_HAVE_STDINT_H 1 +# else +# define U_HAVE_STDINT_H 0 +# endif +#elif U_PLATFORM == U_PF_SOLARIS + /* Solaris has inttypes.h but not stdint.h. */ +# define U_HAVE_STDINT_H 0 +#elif U_PLATFORM == U_PF_AIX && !defined(_AIX51) && defined(_POWER) + /* PPC AIX <= 4.3 has inttypes.h but not stdint.h. */ +# define U_HAVE_STDINT_H 0 +#else +# define U_HAVE_STDINT_H 1 +#endif + +/** + * \def U_HAVE_INTTYPES_H + * Defines whether inttypes.h is available. It is a C99 standard header. + * We include inttypes.h where it is available but stdint.h is not. + * @internal + */ +#ifdef U_HAVE_INTTYPES_H + /* Use the predefined value. */ +#elif U_PLATFORM == U_PF_SOLARIS + /* Solaris has inttypes.h but not stdint.h. */ +# define U_HAVE_INTTYPES_H 1 +#elif U_PLATFORM == U_PF_AIX && !defined(_AIX51) && defined(_POWER) + /* PPC AIX <= 4.3 has inttypes.h but not stdint.h. */ +# define U_HAVE_INTTYPES_H 1 +#else + /* Most platforms have both inttypes.h and stdint.h, or neither. */ +# define U_HAVE_INTTYPES_H U_HAVE_STDINT_H +#endif + +/*===========================================================================*/ +/** @{ Compiler and environment features */ +/*===========================================================================*/ + +/** + * \def U_GCC_MAJOR_MINOR + * Indicates whether the compiler is gcc (test for != 0), + * and if so, contains its major (times 100) and minor version numbers. + * If the compiler is not gcc, then U_GCC_MAJOR_MINOR == 0. + * + * For example, for testing for whether we have gcc, and whether it's 4.6 or higher, + * use "#if U_GCC_MAJOR_MINOR >= 406". + * @internal + */ +#ifdef __GNUC__ +# define U_GCC_MAJOR_MINOR (__GNUC__ * 100 + __GNUC_MINOR__) +#else +# define U_GCC_MAJOR_MINOR 0 +#endif + +/** + * \def U_IS_BIG_ENDIAN + * Determines the endianness of the platform. + * @internal + */ +#ifdef U_IS_BIG_ENDIAN + /* Use the predefined value. */ +#elif defined(BYTE_ORDER) && defined(BIG_ENDIAN) +# define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN) +#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) + /* gcc */ +# define U_IS_BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +#elif defined(__BIG_ENDIAN__) || defined(_BIG_ENDIAN) +# define U_IS_BIG_ENDIAN 1 +#elif defined(__LITTLE_ENDIAN__) || defined(_LITTLE_ENDIAN) +# define U_IS_BIG_ENDIAN 0 +#elif U_PLATFORM == U_PF_OS390 || U_PLATFORM == U_PF_OS400 || defined(__s390__) || defined(__s390x__) + /* These platforms do not appear to predefine any endianness macros. */ +# define U_IS_BIG_ENDIAN 1 +#elif defined(_PA_RISC1_0) || defined(_PA_RISC1_1) || defined(_PA_RISC2_0) + /* HPPA do not appear to predefine any endianness macros. */ +# define U_IS_BIG_ENDIAN 1 +#elif defined(sparc) || defined(__sparc) || defined(__sparc__) + /* Some sparc based systems (e.g. Linux) do not predefine any endianness macros. */ +# define U_IS_BIG_ENDIAN 1 +#else +# define U_IS_BIG_ENDIAN 0 +#endif + +/** + * \def U_HAVE_PLACEMENT_NEW + * Determines whether to override placement new and delete for STL. + * @stable ICU 2.6 + */ +#ifdef U_HAVE_PLACEMENT_NEW + /* Use the predefined value. */ +#elif defined(__BORLANDC__) +# define U_HAVE_PLACEMENT_NEW 0 +#else +# define U_HAVE_PLACEMENT_NEW 1 +#endif + +/** + * \def U_HAVE_DEBUG_LOCATION_NEW + * Define this to define the MFC debug version of the operator new. + * + * @stable ICU 3.4 + */ +#ifdef U_HAVE_DEBUG_LOCATION_NEW + /* Use the predefined value. */ +#elif defined(_MSC_VER) +# define U_HAVE_DEBUG_LOCATION_NEW 1 +#else +# define U_HAVE_DEBUG_LOCATION_NEW 0 +#endif + +/* Compatibility with compilers other than clang: http://clang.llvm.org/docs/LanguageExtensions.html */ +#ifndef __has_attribute +# define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute +# define __has_cpp_attribute(x) 0 +#endif +#ifndef __has_builtin +# define __has_builtin(x) 0 +#endif +#ifndef __has_feature +# define __has_feature(x) 0 +#endif +#ifndef __has_extension +# define __has_extension(x) 0 +#endif +#ifndef __has_warning +# define __has_warning(x) 0 +#endif + +/** + * \def U_MALLOC_ATTR + * Attribute to mark functions as malloc-like + * @internal + */ +#if defined(__GNUC__) && __GNUC__>=3 +# define U_MALLOC_ATTR __attribute__ ((__malloc__)) +#else +# define U_MALLOC_ATTR +#endif + +/** + * \def U_ALLOC_SIZE_ATTR + * Attribute to specify the size of the allocated buffer for malloc-like functions + * @internal + */ +#if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) || __has_attribute(alloc_size) +# define U_ALLOC_SIZE_ATTR(X) __attribute__ ((alloc_size(X))) +# define U_ALLOC_SIZE_ATTR2(X,Y) __attribute__ ((alloc_size(X,Y))) +#else +# define U_ALLOC_SIZE_ATTR(X) +# define U_ALLOC_SIZE_ATTR2(X,Y) +#endif + +/** + * \def U_CPLUSPLUS_VERSION + * 0 if no C++; 1, 11, 14, ... if C++. + * Support for specific features cannot always be determined by the C++ version alone. + * @internal + */ +#ifdef U_CPLUSPLUS_VERSION +# if U_CPLUSPLUS_VERSION != 0 && !defined(__cplusplus) +# undef U_CPLUSPLUS_VERSION +# define U_CPLUSPLUS_VERSION 0 +# endif + /* Otherwise use the predefined value. */ +#elif !defined(__cplusplus) +# define U_CPLUSPLUS_VERSION 0 +#elif __cplusplus >= 201402L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) +# define U_CPLUSPLUS_VERSION 14 +#elif __cplusplus >= 201103L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L) +# define U_CPLUSPLUS_VERSION 11 +#else + // C++98 or C++03 +# define U_CPLUSPLUS_VERSION 1 +#endif + +#if (U_PLATFORM == U_PF_AIX || U_PLATFORM == U_PF_OS390) && defined(__cplusplus) &&(U_CPLUSPLUS_VERSION < 11) +// add in std::nullptr_t +namespace std { + typedef decltype(nullptr) nullptr_t; +}; +#endif + +/** + * \def U_NOEXCEPT + * "noexcept" if supported, otherwise empty. + * Some code, especially STL containers, uses move semantics of objects only + * if the move constructor and the move operator are declared as not throwing exceptions. + * @internal + */ +#ifdef U_NOEXCEPT + /* Use the predefined value. */ +#elif defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS /* Visual Studio */ +# define U_NOEXCEPT +#elif U_CPLUSPLUS_VERSION >= 11 || __has_feature(cxx_noexcept) || __has_extension(cxx_noexcept) \ + || (defined(_MSC_VER) && _MSC_VER >= 1900) /* Visual Studio 2015 */ +# define U_NOEXCEPT noexcept +#else +# define U_NOEXCEPT +#endif + +/** + * \def U_FALLTHROUGH + * Annotate intentional fall-through between switch labels. + * http://clang.llvm.org/docs/AttributeReference.html#fallthrough-clang-fallthrough + * @internal + */ +#ifndef __cplusplus + // Not for C. +#elif defined(U_FALLTHROUGH) + // Use the predefined value. +#elif defined(__clang__) + // Test for compiler vs. feature separately. + // Other compilers might choke on the feature test. +# if __has_cpp_attribute(clang::fallthrough) || \ + (__has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough")) +# define U_FALLTHROUGH [[clang::fallthrough]] +# endif +#endif + +#ifndef U_FALLTHROUGH +# define U_FALLTHROUGH +#endif + +/** @} */ + +/*===========================================================================*/ +/** @{ Character data types */ +/*===========================================================================*/ + +/** + * U_CHARSET_FAMILY is equal to this value when the platform is an ASCII based platform. + * @stable ICU 2.0 + */ +#define U_ASCII_FAMILY 0 + +/** + * U_CHARSET_FAMILY is equal to this value when the platform is an EBCDIC based platform. + * @stable ICU 2.0 + */ +#define U_EBCDIC_FAMILY 1 + +/** + * \def U_CHARSET_FAMILY + * + * <p>These definitions allow to specify the encoding of text + * in the char data type as defined by the platform and the compiler. + * It is enough to determine the code point values of "invariant characters", + * which are the ones shared by all encodings that are in use + * on a given platform.</p> + * + * <p>Those "invariant characters" should be all the uppercase and lowercase + * latin letters, the digits, the space, and "basic punctuation". + * Also, '\\n', '\\r', '\\t' should be available.</p> + * + * <p>The list of "invariant characters" is:<br> + * \code + * A-Z a-z 0-9 SPACE " % & ' ( ) * + , - . / : ; < = > ? _ + * \endcode + * <br> + * (52 letters + 10 numbers + 20 punc/sym/space = 82 total)</p> + * + * <p>This matches the IBM Syntactic Character Set (CS 640).</p> + * + * <p>In other words, all the graphic characters in 7-bit ASCII should + * be safely accessible except the following:</p> + * + * \code + * '\' <backslash> + * '[' <left bracket> + * ']' <right bracket> + * '{' <left brace> + * '}' <right brace> + * '^' <circumflex> + * '~' <tilde> + * '!' <exclamation mark> + * '#' <number sign> + * '|' <vertical line> + * '$' <dollar sign> + * '@' <commercial at> + * '`' <grave accent> + * \endcode + * @stable ICU 2.0 + */ +#ifdef U_CHARSET_FAMILY + /* Use the predefined value. */ +#elif U_PLATFORM == U_PF_OS390 && (!defined(__CHARSET_LIB) || !__CHARSET_LIB) +# define U_CHARSET_FAMILY U_EBCDIC_FAMILY +#elif U_PLATFORM == U_PF_OS400 && !defined(__UTF32__) +# define U_CHARSET_FAMILY U_EBCDIC_FAMILY +#else +# define U_CHARSET_FAMILY U_ASCII_FAMILY +#endif + +/** + * \def U_CHARSET_IS_UTF8 + * + * Hardcode the default charset to UTF-8. + * + * If this is set to 1, then + * - ICU will assume that all non-invariant char*, StringPiece, std::string etc. + * contain UTF-8 text, regardless of what the system API uses + * - some ICU code will use fast functions like u_strFromUTF8() + * rather than the more general and more heavy-weight conversion API (ucnv.h) + * - ucnv_getDefaultName() always returns "UTF-8" + * - ucnv_setDefaultName() is disabled and will not change the default charset + * - static builds of ICU are smaller + * - more functionality is available with the UCONFIG_NO_CONVERSION build-time + * configuration option (see unicode/uconfig.h) + * - the UCONFIG_NO_CONVERSION build option in uconfig.h is more usable + * + * @stable ICU 4.2 + * @see UCONFIG_NO_CONVERSION + */ +#ifdef U_CHARSET_IS_UTF8 + /* Use the predefined value. */ +#elif U_PLATFORM_IS_LINUX_BASED || U_PLATFORM_IS_DARWIN_BASED +# define U_CHARSET_IS_UTF8 1 +#else +# define U_CHARSET_IS_UTF8 0 +#endif + +/** @} */ + +/*===========================================================================*/ +/** @{ Information about wchar support */ +/*===========================================================================*/ + +/** + * \def U_HAVE_WCHAR_H + * Indicates whether <wchar.h> is available (1) or not (0). Set to 1 by default. + * + * @stable ICU 2.0 + */ +#ifdef U_HAVE_WCHAR_H + /* Use the predefined value. */ +#elif U_PLATFORM == U_PF_ANDROID && __ANDROID_API__ < 9 + /* + * Android before Gingerbread (Android 2.3, API level 9) did not support wchar_t. + * The type and header existed, but the library functions did not work as expected. + * The size of wchar_t was 1 but L"xyz" string literals had 32-bit units anyway. + */ +# define U_HAVE_WCHAR_H 0 +#else +# define U_HAVE_WCHAR_H 1 +#endif + +/** + * \def U_SIZEOF_WCHAR_T + * U_SIZEOF_WCHAR_T==sizeof(wchar_t) + * + * @stable ICU 2.0 + */ +#ifdef U_SIZEOF_WCHAR_T + /* Use the predefined value. */ +#elif (U_PLATFORM == U_PF_ANDROID && __ANDROID_API__ < 9) + /* + * Classic Mac OS and Mac OS X before 10.3 (Panther) did not support wchar_t or wstring. + * Newer Mac OS X has size 4. + */ +# define U_SIZEOF_WCHAR_T 1 +#elif U_PLATFORM_HAS_WIN32_API || U_PLATFORM == U_PF_CYGWIN +# define U_SIZEOF_WCHAR_T 2 +#elif U_PLATFORM == U_PF_AIX + /* + * AIX 6.1 information, section "Wide character data representation": + * "... the wchar_t datatype is 32-bit in the 64-bit environment and + * 16-bit in the 32-bit environment." + * and + * "All locales use Unicode for their wide character code values (process code), + * except the IBM-eucTW codeset." + */ +# ifdef __64BIT__ +# define U_SIZEOF_WCHAR_T 4 +# else +# define U_SIZEOF_WCHAR_T 2 +# endif +#elif U_PLATFORM == U_PF_OS390 + /* + * z/OS V1R11 information center, section "LP64 | ILP32": + * "In 31-bit mode, the size of long and pointers is 4 bytes and the size of wchar_t is 2 bytes. + * Under LP64, the size of long and pointer is 8 bytes and the size of wchar_t is 4 bytes." + */ +# ifdef _LP64 +# define U_SIZEOF_WCHAR_T 4 +# else +# define U_SIZEOF_WCHAR_T 2 +# endif +#elif U_PLATFORM == U_PF_OS400 +# if defined(__UTF32__) + /* + * LOCALETYPE(*LOCALEUTF) is specified. + * Wide-character strings are in UTF-32, + * narrow-character strings are in UTF-8. + */ +# define U_SIZEOF_WCHAR_T 4 +# elif defined(__UCS2__) + /* + * LOCALETYPE(*LOCALEUCS2) is specified. + * Wide-character strings are in UCS-2, + * narrow-character strings are in EBCDIC. + */ +# define U_SIZEOF_WCHAR_T 2 +#else + /* + * LOCALETYPE(*CLD) or LOCALETYPE(*LOCALE) is specified. + * Wide-character strings are in 16-bit EBCDIC, + * narrow-character strings are in EBCDIC. + */ +# define U_SIZEOF_WCHAR_T 2 +# endif +#else +# define U_SIZEOF_WCHAR_T 4 +#endif + +#ifndef U_HAVE_WCSCPY +#define U_HAVE_WCSCPY U_HAVE_WCHAR_H +#endif + +/** @} */ + +/** + * \def U_HAVE_CHAR16_T + * Defines whether the char16_t type is available for UTF-16 + * and u"abc" UTF-16 string literals are supported. + * This is a new standard type and standard string literal syntax in C++0x + * but has been available in some compilers before. + * @internal + */ +#ifdef U_HAVE_CHAR16_T + /* Use the predefined value. */ +#else + /* + * Notes: + * Visual Studio 2010 (_MSC_VER==1600) defines char16_t as a typedef + * and does not support u"abc" string literals. + * Visual Studio 2015 (_MSC_VER>=1900) and above adds support for + * both char16_t and u"abc" string literals. + * gcc 4.4 defines the __CHAR16_TYPE__ macro to a usable type but + * does not support u"abc" string literals. + * C++11 and C11 require support for UTF-16 literals + * TODO: Fix for plain C. Doesn't work on Mac. + */ +# if U_CPLUSPLUS_VERSION >= 11 || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) +# define U_HAVE_CHAR16_T 1 +# else +# define U_HAVE_CHAR16_T 0 +# endif +#endif + +/** + * @{ + * \def U_DECLARE_UTF16 + * Do not use this macro because it is not defined on all platforms. + * Use the UNICODE_STRING or U_STRING_DECL macros instead. + * @internal + */ +#ifdef U_DECLARE_UTF16 + /* Use the predefined value. */ +#elif U_HAVE_CHAR16_T \ + || (defined(__xlC__) && defined(__IBM_UTF_LITERAL) && U_SIZEOF_WCHAR_T != 2) \ + || (defined(__HP_aCC) && __HP_aCC >= 035000) \ + || (defined(__HP_cc) && __HP_cc >= 111106) +# define U_DECLARE_UTF16(string) u ## string +#elif U_SIZEOF_WCHAR_T == 2 \ + && (U_CHARSET_FAMILY == 0 || (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400 && defined(__UCS2__))) +# define U_DECLARE_UTF16(string) L ## string +#else + /* Leave U_DECLARE_UTF16 undefined. See unistr.h. */ +#endif + +/** @} */ + +/*===========================================================================*/ +/** @{ Symbol import-export control */ +/*===========================================================================*/ + +#ifdef U_EXPORT + /* Use the predefined value. */ +#elif defined(U_STATIC_IMPLEMENTATION) +# define U_EXPORT +#elif defined(__GNUC__) +# define U_EXPORT __attribute__((visibility("default"))) +#elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \ + || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550) +# define U_EXPORT __global +/*#elif defined(__HP_aCC) || defined(__HP_cc) +# define U_EXPORT __declspec(dllexport)*/ +#elif defined(_MSC_VER) +# define U_EXPORT __declspec(dllexport) +#else +# define U_EXPORT +#endif + +/* U_CALLCONV is releated to U_EXPORT2 */ +#ifdef U_EXPORT2 + /* Use the predefined value. */ +#elif defined(_MSC_VER) +# define U_EXPORT2 __cdecl +#else +# define U_EXPORT2 +#endif + +#ifdef U_IMPORT + /* Use the predefined value. */ +#elif defined(_MSC_VER) + /* Windows needs to export/import data. */ +# define U_IMPORT __declspec(dllimport) +#else +# define U_IMPORT +#endif + +/** + * \def U_CALLCONV + * Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary + * in callback function typedefs to make sure that the calling convention + * is compatible. + * + * This is only used for non-ICU-API functions. + * When a function is a public ICU API, + * you must use the U_CAPI and U_EXPORT2 qualifiers. + * + * Please note, you need to use U_CALLCONV after the *. + * + * NO : "static const char U_CALLCONV *func( . . . )" + * YES: "static const char* U_CALLCONV func( . . . )" + * + * @stable ICU 2.0 + */ +#if U_PLATFORM == U_PF_OS390 && defined(__cplusplus) +# define U_CALLCONV __cdecl +#else +# define U_CALLCONV U_EXPORT2 +#endif + +/** + * \def U_CALLCONV_FPTR + * Similar to U_CALLCONV, but only used on function pointers. + * @internal + */ +#if U_PLATFORM == U_PF_OS390 && defined(__cplusplus) +# define U_CALLCONV_FPTR U_CALLCONV +#else +# define U_CALLCONV_FPTR +#endif +/* @} */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/plurfmt.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/plurfmt.h new file mode 100755 index 00000000..fd537c24 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/plurfmt.h @@ -0,0 +1,617 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2007-2014, International Business Machines Corporation and +* others. All Rights Reserved. +******************************************************************************* +* + +* File PLURFMT.H +******************************************************************************** +*/ + +#ifndef PLURFMT +#define PLURFMT + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: PluralFormat object + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/messagepattern.h" +#include "unicode/numfmt.h" +#include "unicode/plurrule.h" + +U_NAMESPACE_BEGIN + +class Hashtable; +class NFRule; + +/** + * <p> + * <code>PluralFormat</code> supports the creation of internationalized + * messages with plural inflection. It is based on <i>plural + * selection</i>, i.e. the caller specifies messages for each + * plural case that can appear in the user's language and the + * <code>PluralFormat</code> selects the appropriate message based on + * the number. + * </p> + * <h4>The Problem of Plural Forms in Internationalized Messages</h4> + * <p> + * Different languages have different ways to inflect + * plurals. Creating internationalized messages that include plural + * forms is only feasible when the framework is able to handle plural + * forms of <i>all</i> languages correctly. <code>ChoiceFormat</code> + * doesn't handle this well, because it attaches a number interval to + * each message and selects the message whose interval contains a + * given number. This can only handle a finite number of + * intervals. But in some languages, like Polish, one plural case + * applies to infinitely many intervals (e.g., the plural case applies to + * numbers ending with 2, 3, or 4 except those ending with 12, 13, or + * 14). Thus <code>ChoiceFormat</code> is not adequate. + * </p><p> + * <code>PluralFormat</code> deals with this by breaking the problem + * into two parts: + * <ul> + * <li>It uses <code>PluralRules</code> that can define more complex + * conditions for a plural case than just a single interval. These plural + * rules define both what plural cases exist in a language, and to + * which numbers these cases apply. + * <li>It provides predefined plural rules for many languages. Thus, the programmer + * need not worry about the plural cases of a language and + * does not have to define the plural cases; they can simply + * use the predefined keywords. The whole plural formatting of messages can + * be done using localized patterns from resource bundles. For predefined plural + * rules, see the CLDR <i>Language Plural Rules</i> page at + * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html + * </ul> + * </p> + * <h4>Usage of <code>PluralFormat</code></h4> + * <p>Note: Typically, plural formatting is done via <code>MessageFormat</code> + * with a <code>plural</code> argument type, + * rather than using a stand-alone <code>PluralFormat</code>. + * </p><p> + * This discussion assumes that you use <code>PluralFormat</code> with + * a predefined set of plural rules. You can create one using one of + * the constructors that takes a <code>locale</code> object. To + * specify the message pattern, you can either pass it to the + * constructor or set it explicitly using the + * <code>applyPattern()</code> method. The <code>format()</code> + * method takes a number object and selects the message of the + * matching plural case. This message will be returned. + * </p> + * <h5>Patterns and Their Interpretation</h5> + * <p> + * The pattern text defines the message output for each plural case of the + * specified locale. Syntax: + * <pre> + * pluralStyle = [offsetValue] (selector '{' message '}')+ + * offsetValue = "offset:" number + * selector = explicitValue | keyword + * explicitValue = '=' number // adjacent, no white space in between + * keyword = [^[[:Pattern_Syntax:][:Pattern_White_Space:]]]+ + * message: see {@link MessageFormat} + * </pre> + * Pattern_White_Space between syntax elements is ignored, except + * between the {curly braces} and their sub-message, + * and between the '=' and the number of an explicitValue. + * + * </p><p> + * There are 6 predefined casekeyword in CLDR/ICU - 'zero', 'one', 'two', 'few', 'many' and + * 'other'. You always have to define a message text for the default plural case + * <code>other</code> which is contained in every rule set. + * If you do not specify a message text for a particular plural case, the + * message text of the plural case <code>other</code> gets assigned to this + * plural case. + * </p><p> + * When formatting, the input number is first matched against the explicitValue clauses. + * If there is no exact-number match, then a keyword is selected by calling + * the <code>PluralRules</code> with the input number <em>minus the offset</em>. + * (The offset defaults to 0 if it is omitted from the pattern string.) + * If there is no clause with that keyword, then the "other" clauses is returned. + * </p><p> + * An unquoted pound sign (<code>#</code>) in the selected sub-message + * itself (i.e., outside of arguments nested in the sub-message) + * is replaced by the input number minus the offset. + * The number-minus-offset value is formatted using a + * <code>NumberFormat</code> for the <code>PluralFormat</code>'s locale. If you + * need special number formatting, you have to use a <code>MessageFormat</code> + * and explicitly specify a <code>NumberFormat</code> argument. + * <strong>Note:</strong> That argument is formatting without subtracting the offset! + * If you need a custom format and have a non-zero offset, then you need to pass the + * number-minus-offset value as a separate parameter. + * </p> + * For a usage example, see the {@link MessageFormat} class documentation. + * + * <h4>Defining Custom Plural Rules</h4> + * <p>If you need to use <code>PluralFormat</code> with custom rules, you can + * create a <code>PluralRules</code> object and pass it to + * <code>PluralFormat</code>'s constructor. If you also specify a locale in this + * constructor, this locale will be used to format the number in the message + * texts. + * </p><p> + * For more information about <code>PluralRules</code>, see + * {@link PluralRules}. + * </p> + * + * ported from Java + * @stable ICU 4.0 + */ + +class U_I18N_API PluralFormat : public Format { +public: + + /** + * Creates a new cardinal-number <code>PluralFormat</code> for the default locale. + * This locale will be used to get the set of plural rules and for standard + * number formatting. + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @stable ICU 4.0 + */ + PluralFormat(UErrorCode& status); + + /** + * Creates a new cardinal-number <code>PluralFormat</code> for a given locale. + * @param locale the <code>PluralFormat</code> will be configured with + * rules for this locale. This locale will also be used for + * standard number formatting. + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @stable ICU 4.0 + */ + PluralFormat(const Locale& locale, UErrorCode& status); + + /** + * Creates a new <code>PluralFormat</code> for a given set of rules. + * The standard number formatting will be done using the default locale. + * @param rules defines the behavior of the <code>PluralFormat</code> + * object. + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @stable ICU 4.0 + */ + PluralFormat(const PluralRules& rules, UErrorCode& status); + + /** + * Creates a new <code>PluralFormat</code> for a given set of rules. + * The standard number formatting will be done using the given locale. + * @param locale the default number formatting will be done using this + * locale. + * @param rules defines the behavior of the <code>PluralFormat</code> + * object. + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @stable ICU 4.0 + * <p> + * <h4>Sample code</h4> + * \snippet samples/plurfmtsample/plurfmtsample.cpp PluralFormatExample1 + * \snippet samples/plurfmtsample/plurfmtsample.cpp PluralFormatExample + * <p> + */ + PluralFormat(const Locale& locale, const PluralRules& rules, UErrorCode& status); + + /** + * Creates a new <code>PluralFormat</code> for the plural type. + * The standard number formatting will be done using the given locale. + * @param locale the default number formatting will be done using this + * locale. + * @param type The plural type (e.g., cardinal or ordinal). + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @stable ICU 50 + */ + PluralFormat(const Locale& locale, UPluralType type, UErrorCode& status); + + /** + * Creates a new cardinal-number <code>PluralFormat</code> for a given pattern string. + * The default locale will be used to get the set of plural rules and for + * standard number formatting. + * @param pattern the pattern for this <code>PluralFormat</code>. + * errors are returned to status if the pattern is invalid. + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @stable ICU 4.0 + */ + PluralFormat(const UnicodeString& pattern, UErrorCode& status); + + /** + * Creates a new cardinal-number <code>PluralFormat</code> for a given pattern string and + * locale. + * The locale will be used to get the set of plural rules and for + * standard number formatting. + * @param locale the <code>PluralFormat</code> will be configured with + * rules for this locale. This locale will also be used for + * standard number formatting. + * @param pattern the pattern for this <code>PluralFormat</code>. + * errors are returned to status if the pattern is invalid. + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @stable ICU 4.0 + */ + PluralFormat(const Locale& locale, const UnicodeString& pattern, UErrorCode& status); + + /** + * Creates a new <code>PluralFormat</code> for a given set of rules, a + * pattern and a locale. + * @param rules defines the behavior of the <code>PluralFormat</code> + * object. + * @param pattern the pattern for this <code>PluralFormat</code>. + * errors are returned to status if the pattern is invalid. + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @stable ICU 4.0 + */ + PluralFormat(const PluralRules& rules, + const UnicodeString& pattern, + UErrorCode& status); + + /** + * Creates a new <code>PluralFormat</code> for a given set of rules, a + * pattern and a locale. + * @param locale the <code>PluralFormat</code> will be configured with + * rules for this locale. This locale will also be used for + * standard number formatting. + * @param rules defines the behavior of the <code>PluralFormat</code> + * object. + * @param pattern the pattern for this <code>PluralFormat</code>. + * errors are returned to status if the pattern is invalid. + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @stable ICU 4.0 + */ + PluralFormat(const Locale& locale, + const PluralRules& rules, + const UnicodeString& pattern, + UErrorCode& status); + + /** + * Creates a new <code>PluralFormat</code> for a plural type, a + * pattern and a locale. + * @param locale the <code>PluralFormat</code> will be configured with + * rules for this locale. This locale will also be used for + * standard number formatting. + * @param type The plural type (e.g., cardinal or ordinal). + * @param pattern the pattern for this <code>PluralFormat</code>. + * errors are returned to status if the pattern is invalid. + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @stable ICU 50 + */ + PluralFormat(const Locale& locale, + UPluralType type, + const UnicodeString& pattern, + UErrorCode& status); + + /** + * copy constructor. + * @stable ICU 4.0 + */ + PluralFormat(const PluralFormat& other); + + /** + * Destructor. + * @stable ICU 4.0 + */ + virtual ~PluralFormat(); + + /** + * Sets the pattern used by this plural format. + * The method parses the pattern and creates a map of format strings + * for the plural rules. + * Patterns and their interpretation are specified in the class description. + * + * @param pattern the pattern for this plural format + * errors are returned to status if the pattern is invalid. + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @stable ICU 4.0 + */ + void applyPattern(const UnicodeString& pattern, UErrorCode& status); + + + using Format::format; + + /** + * Formats a plural message for a given number. + * + * @param number a number for which the plural message should be formatted + * for. If no pattern has been applied to this + * <code>PluralFormat</code> object yet, the formatted number + * will be returned. + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @return the string containing the formatted plural message. + * @stable ICU 4.0 + */ + UnicodeString format(int32_t number, UErrorCode& status) const; + + /** + * Formats a plural message for a given number. + * + * @param number a number for which the plural message should be formatted + * for. If no pattern has been applied to this + * PluralFormat object yet, the formatted number + * will be returned. + * @param status output param set to success or failure code on exit, which + * must not indicate a failure before the function call. + * @return the string containing the formatted plural message. + * @stable ICU 4.0 + */ + UnicodeString format(double number, UErrorCode& status) const; + + /** + * Formats a plural message for a given number. + * + * @param number a number for which the plural message should be formatted + * for. If no pattern has been applied to this + * <code>PluralFormat</code> object yet, the formatted number + * will be returned. + * @param appendTo output parameter to receive result. + * result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @return the string containing the formatted plural message. + * @stable ICU 4.0 + */ + UnicodeString& format(int32_t number, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& status) const; + + /** + * Formats a plural message for a given number. + * + * @param number a number for which the plural message should be formatted + * for. If no pattern has been applied to this + * PluralFormat object yet, the formatted number + * will be returned. + * @param appendTo output parameter to receive result. + * result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @return the string containing the formatted plural message. + * @stable ICU 4.0 + */ + UnicodeString& format(double number, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& status) const; + +#ifndef U_HIDE_DEPRECATED_API + /** + * Sets the locale used by this <code>PluraFormat</code> object. + * Note: Calling this method resets this <code>PluraFormat</code> object, + * i.e., a pattern that was applied previously will be removed, + * and the NumberFormat is set to the default number format for + * the locale. The resulting format behaves the same as one + * constructed from {@link #PluralFormat(const Locale& locale, UPluralType type, UErrorCode& status)} + * with UPLURAL_TYPE_CARDINAL. + * @param locale the <code>locale</code> to use to configure the formatter. + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @deprecated ICU 50 This method clears the pattern and might create + * a different kind of PluralRules instance; + * use one of the constructors to create a new instance instead. + */ + void setLocale(const Locale& locale, UErrorCode& status); +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Sets the number format used by this formatter. You only need to + * call this if you want a different number format than the default + * formatter for the locale. + * @param format the number format to use. + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @stable ICU 4.0 + */ + void setNumberFormat(const NumberFormat* format, UErrorCode& status); + + /** + * Assignment operator + * + * @param other the PluralFormat object to copy from. + * @stable ICU 4.0 + */ + PluralFormat& operator=(const PluralFormat& other); + + /** + * Return true if another object is semantically equal to this one. + * + * @param other the PluralFormat object to be compared with. + * @return true if other is semantically equal to this. + * @stable ICU 4.0 + */ + virtual UBool operator==(const Format& other) const; + + /** + * Return true if another object is semantically unequal to this one. + * + * @param other the PluralFormat object to be compared with. + * @return true if other is semantically unequal to this. + * @stable ICU 4.0 + */ + virtual UBool operator!=(const Format& other) const; + + /** + * Clones this Format object polymorphically. The caller owns the + * result and should delete it when done. + * @stable ICU 4.0 + */ + virtual Format* clone(void) const; + + /** + * Formats a plural message for a number taken from a Formattable object. + * + * @param obj The object containing a number for which the + * plural message should be formatted. + * The object must be of a numeric type. + * @param appendTo output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.0 + */ + UnicodeString& format(const Formattable& obj, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& status) const; + + /** + * Returns the pattern from applyPattern() or constructor(). + * + * @param appendTo output parameter to receive result. + * Result is appended to existing contents. + * @return the UnicodeString with inserted pattern. + * @stable ICU 4.0 + */ + UnicodeString& toPattern(UnicodeString& appendTo); + + /** + * This method is not yet supported by <code>PluralFormat</code>. + * <P> + * Before calling, set parse_pos.index to the offset you want to start + * parsing at in the source. After calling, parse_pos.index is the end of + * the text you parsed. If error occurs, index is unchanged. + * <P> + * When parsing, leading whitespace is discarded (with a successful parse), + * while trailing whitespace is left as is. + * <P> + * See Format::parseObject() for more. + * + * @param source The string to be parsed into an object. + * @param result Formattable to be set to the parse result. + * If parse fails, return contents are undefined. + * @param parse_pos The position to start parsing at. Upon return + * this param is set to the position after the + * last character successfully parsed. If the + * source is not parsed successfully, this param + * will remain unchanged. + * @stable ICU 4.0 + */ + virtual void parseObject(const UnicodeString& source, + Formattable& result, + ParsePosition& parse_pos) const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 4.0 + * + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 4.0 + */ + virtual UClassID getDynamicClassID() const; + +#if (defined(__xlC__) && (__xlC__ < 0x0C00)) || (U_PLATFORM == U_PF_OS390) || (U_PLATFORM ==U_PF_OS400) +// Work around a compiler bug on xlC 11.1 on AIX 7.1 that would +// prevent PluralSelectorAdapter from implementing private PluralSelector. +// xlC error message: +// 1540-0300 (S) The "private" member "class icu_49::PluralFormat::PluralSelector" cannot be accessed. +public: +#else +private: +#endif + /** + * @internal + */ + class U_I18N_API PluralSelector : public UMemory { + public: + virtual ~PluralSelector(); + /** + * Given a number, returns the appropriate PluralFormat keyword. + * + * @param context worker object for the selector. + * @param number The number to be plural-formatted. + * @param ec Error code. + * @return The selected PluralFormat keyword. + * @internal + */ + virtual UnicodeString select(void *context, double number, UErrorCode& ec) const = 0; + }; + + /** + * @internal + */ + class U_I18N_API PluralSelectorAdapter : public PluralSelector { + public: + PluralSelectorAdapter() : pluralRules(NULL) { + } + + virtual ~PluralSelectorAdapter(); + + virtual UnicodeString select(void *context, double number, UErrorCode& /*ec*/) const; /**< @internal */ + + void reset(); + + PluralRules* pluralRules; + }; + +#if defined(__xlC__) +// End of xlC bug workaround, keep remaining definitions private. +private: +#endif + Locale locale; + MessagePattern msgPattern; + NumberFormat* numberFormat; + double offset; + PluralSelectorAdapter pluralRulesWrapper; + + PluralFormat(); // default constructor not implemented + void init(const PluralRules* rules, UPluralType type, UErrorCode& status); + /** + * Copies dynamically allocated values (pointer fields). + * Others are copied using their copy constructors and assignment operators. + */ + void copyObjects(const PluralFormat& other); + + UnicodeString& format(const Formattable& numberObject, double number, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& status) const; /**< @internal */ + + /** + * Finds the PluralFormat sub-message for the given number, or the "other" sub-message. + * @param pattern A MessagePattern. + * @param partIndex the index of the first PluralFormat argument style part. + * @param selector the PluralSelector for mapping the number (minus offset) to a keyword. + * @param context worker object for the selector. + * @param number a number to be matched to one of the PluralFormat argument's explicit values, + * or mapped via the PluralSelector. + * @param ec ICU error code. + * @return the sub-message start part index. + */ + static int32_t findSubMessage( + const MessagePattern& pattern, int32_t partIndex, + const PluralSelector& selector, void *context, double number, UErrorCode& ec); /**< @internal */ + + void parseType(const UnicodeString& source, const NFRule *rbnfLenientScanner, + Formattable& result, FieldPosition& pos) const; + + friend class MessageFormat; + friend class NFRule; +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _PLURFMT +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/plurrule.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/plurrule.h new file mode 100755 index 00000000..d372d79c --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/plurrule.h @@ -0,0 +1,531 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2008-2015, International Business Machines Corporation and +* others. All Rights Reserved. +******************************************************************************* +* +* +* File PLURRULE.H +* +* Modification History:* +* Date Name Description +* +******************************************************************************** +*/ + +#ifndef PLURRULE +#define PLURRULE + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: PluralRules object + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/format.h" +#include "unicode/upluralrules.h" +#ifndef U_HIDE_INTERNAL_API +#include "unicode/numfmt.h" +#endif /* U_HIDE_INTERNAL_API */ + +/** + * Value returned by PluralRules::getUniqueKeywordValue() when there is no + * unique value to return. + * @stable ICU 4.8 + */ +#define UPLRULES_NO_UNIQUE_VALUE ((double)-0.00123456777) + +U_NAMESPACE_BEGIN + +class Hashtable; +class IFixedDecimal; +class VisibleDigitsWithExponent; +class RuleChain; +class PluralRuleParser; +class PluralKeywordEnumeration; +class AndConstraint; +class SharedPluralRules; + +/** + * Defines rules for mapping non-negative numeric values onto a small set of + * keywords. Rules are constructed from a text description, consisting + * of a series of keywords and conditions. The {@link #select} method + * examines each condition in order and returns the keyword for the + * first condition that matches the number. If none match, + * default rule(other) is returned. + * + * For more information, details, and tips for writing rules, see the + * LDML spec, C.11 Language Plural Rules: + * http://www.unicode.org/draft/reports/tr35/tr35.html#Language_Plural_Rules + * + * Examples:<pre> + * "one: n is 1; few: n in 2..4"</pre> + * This defines two rules, for 'one' and 'few'. The condition for + * 'one' is "n is 1" which means that the number must be equal to + * 1 for this condition to pass. The condition for 'few' is + * "n in 2..4" which means that the number must be between 2 and + * 4 inclusive for this condition to pass. All other numbers + * are assigned the keyword "other" by the default rule. + * </p><pre> + * "zero: n is 0; one: n is 1; zero: n mod 100 in 1..19"</pre> + * This illustrates that the same keyword can be defined multiple times. + * Each rule is examined in order, and the first keyword whose condition + * passes is the one returned. Also notes that a modulus is applied + * to n in the last rule. Thus its condition holds for 119, 219, 319... + * </p><pre> + * "one: n is 1; few: n mod 10 in 2..4 and n mod 100 not in 12..14"</pre> + * This illustrates conjunction and negation. The condition for 'few' + * has two parts, both of which must be met: "n mod 10 in 2..4" and + * "n mod 100 not in 12..14". The first part applies a modulus to n + * before the test as in the previous example. The second part applies + * a different modulus and also uses negation, thus it matches all + * numbers _not_ in 12, 13, 14, 112, 113, 114, 212, 213, 214... + * </p> + * <p> + * Syntax:<pre> + * \code + * rules = rule (';' rule)* + * rule = keyword ':' condition + * keyword = <identifier> + * condition = and_condition ('or' and_condition)* + * and_condition = relation ('and' relation)* + * relation = is_relation | in_relation | within_relation | 'n' <EOL> + * is_relation = expr 'is' ('not')? value + * in_relation = expr ('not')? 'in' range_list + * within_relation = expr ('not')? 'within' range + * expr = ('n' | 'i' | 'f' | 'v' | 'j') ('mod' value)? + * range_list = (range | value) (',' range_list)* + * value = digit+ ('.' digit+)? + * digit = 0|1|2|3|4|5|6|7|8|9 + * range = value'..'value + * \endcode + * </pre></p> + * <p> + * <p> + * The i, f, and v values are defined as follows: + * </p> + * <ul> + * <li>i to be the integer digits.</li> + * <li>f to be the visible fractional digits, as an integer.</li> + * <li>v to be the number of visible fraction digits.</li> + * <li>j is defined to only match integers. That is j is 3 fails if v != 0 (eg for 3.1 or 3.0).</li> + * </ul> + * <p> + * Examples are in the following table: + * </p> + * <table border='1' style="border-collapse:collapse"> + * <tbody> + * <tr> + * <th>n</th> + * <th>i</th> + * <th>f</th> + * <th>v</th> + * </tr> + * <tr> + * <td>1.0</td> + * <td>1</td> + * <td align="right">0</td> + * <td>1</td> + * </tr> + * <tr> + * <td>1.00</td> + * <td>1</td> + * <td align="right">0</td> + * <td>2</td> + * </tr> + * <tr> + * <td>1.3</td> + * <td>1</td> + * <td align="right">3</td> + * <td>1</td> + * </tr> + * <tr> + * <td>1.03</td> + * <td>1</td> + * <td align="right">3</td> + * <td>2</td> + * </tr> + * <tr> + * <td>1.23</td> + * <td>1</td> + * <td align="right">23</td> + * <td>2</td> + * </tr> + * </tbody> + * </table> + * <p> + * The difference between 'in' and 'within' is that 'in' only includes integers in the specified range, while 'within' + * includes all values. Using 'within' with a range_list consisting entirely of values is the same as using 'in' (it's + * not an error). + * </p> + + * An "identifier" is a sequence of characters that do not have the + * Unicode Pattern_Syntax or Pattern_White_Space properties. + * <p> + * The difference between 'in' and 'within' is that 'in' only includes + * integers in the specified range, while 'within' includes all values. + * Using 'within' with a range_list consisting entirely of values is the + * same as using 'in' (it's not an error). + *</p> + * <p> + * Keywords + * could be defined by users or from ICU locale data. There are 6 + * predefined values in ICU - 'zero', 'one', 'two', 'few', 'many' and + * 'other'. Callers need to check the value of keyword returned by + * {@link #select} method. + * </p> + * + * Examples:<pre> + * UnicodeString keyword = pl->select(number); + * if (keyword== UnicodeString("one") { + * ... + * } + * else if ( ... ) + * </pre> + * <strong>Note:</strong><br> + * <p> + * ICU defines plural rules for many locales based on CLDR <i>Language Plural Rules</i>. + * For these predefined rules, see CLDR page at + * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html + * </p> + */ +class U_I18N_API PluralRules : public UObject { +public: + + /** + * Constructor. + * @param status Output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * + * @stable ICU 4.0 + */ + PluralRules(UErrorCode& status); + + /** + * Copy constructor. + * @stable ICU 4.0 + */ + PluralRules(const PluralRules& other); + + /** + * Destructor. + * @stable ICU 4.0 + */ + virtual ~PluralRules(); + + /** + * Clone + * @stable ICU 4.0 + */ + PluralRules* clone() const; + + /** + * Assignment operator. + * @stable ICU 4.0 + */ + PluralRules& operator=(const PluralRules&); + + /** + * Creates a PluralRules from a description if it is parsable, otherwise + * returns NULL. + * + * @param description rule description + * @param status Output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @return new PluralRules pointer. NULL if there is an error. + * @stable ICU 4.0 + */ + static PluralRules* U_EXPORT2 createRules(const UnicodeString& description, + UErrorCode& status); + + /** + * The default rules that accept any number. + * + * @param status Output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @return new PluralRules pointer. NULL if there is an error. + * @stable ICU 4.0 + */ + static PluralRules* U_EXPORT2 createDefaultRules(UErrorCode& status); + + /** + * Provides access to the predefined cardinal-number <code>PluralRules</code> for a given + * locale. + * Same as forLocale(locale, UPLURAL_TYPE_CARDINAL, status). + * + * @param locale The locale for which a <code>PluralRules</code> object is + * returned. + * @param status Output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @return The predefined <code>PluralRules</code> object pointer for + * this locale. If there's no predefined rules for this locale, + * the rules for the closest parent in the locale hierarchy + * that has one will be returned. The final fallback always + * returns the default 'other' rules. + * @stable ICU 4.0 + */ + static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UErrorCode& status); + + /** + * Provides access to the predefined <code>PluralRules</code> for a given + * locale and the plural type. + * + * @param locale The locale for which a <code>PluralRules</code> object is + * returned. + * @param type The plural type (e.g., cardinal or ordinal). + * @param status Output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @return The predefined <code>PluralRules</code> object pointer for + * this locale. If there's no predefined rules for this locale, + * the rules for the closest parent in the locale hierarchy + * that has one will be returned. The final fallback always + * returns the default 'other' rules. + * @stable ICU 50 + */ + static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UPluralType type, UErrorCode& status); + +#ifndef U_HIDE_INTERNAL_API + /** + * Return a StringEnumeration over the locales for which there is plurals data. + * @return a StringEnumeration over the locales available. + * @internal + */ + static StringEnumeration* U_EXPORT2 getAvailableLocales(UErrorCode &status); + + /** + * Returns whether or not there are overrides. + * @param locale the locale to check. + * @return + * @internal + */ + static UBool hasOverride(const Locale &locale); + + /** + * For ICU use only. + * creates a SharedPluralRules object + * @internal + */ + static PluralRules* U_EXPORT2 internalForLocale(const Locale& locale, UPluralType type, UErrorCode& status); + + /** + * For ICU use only. + * Returns handle to the shared, cached PluralRules instance. + * Caller must call removeRef() on returned value once it is done with + * the shared instance. + * @internal + */ + static const SharedPluralRules* U_EXPORT2 createSharedInstance( + const Locale& locale, UPluralType type, UErrorCode& status); + + +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Given a number, returns the keyword of the first rule that applies to + * the number. This function can be used with isKeyword* functions to + * determine the keyword for default plural rules. + * + * @param number The number for which the rule has to be determined. + * @return The keyword of the selected rule. + * @stable ICU 4.0 + */ + UnicodeString select(int32_t number) const; + + /** + * Given a number, returns the keyword of the first rule that applies to + * the number. This function can be used with isKeyword* functions to + * determine the keyword for default plural rules. + * + * @param number The number for which the rule has to be determined. + * @return The keyword of the selected rule. + * @stable ICU 4.0 + */ + UnicodeString select(double number) const; + +#ifndef U_HIDE_INTERNAL_API + /** + * Given a number and a format, returns the keyword of the first applicable + * rule for this PluralRules object. + * Note: This internal preview interface may be removed in the future if + * an architecturally cleaner solution reaches stable status. + * @param obj The numeric object for which the rule should be determined. + * @param fmt The NumberFormat specifying how the number will be formatted + * (this can affect the plural form, e.g. "1 dollar" vs "1.0 dollars"). + * @param status Input/output parameter. If at entry this indicates a + * failure status, the method returns immediately; otherwise + * this is set to indicate the outcome of the call. + * @return The keyword of the selected rule. Undefined in the case of an error. + * @internal ICU 59 technology preview, may be removed in the future + */ + UnicodeString select(const Formattable& obj, const NumberFormat& fmt, UErrorCode& status) const; + + /** + * @internal + */ + UnicodeString select(const IFixedDecimal &number) const; + /** + * @internal + */ + UnicodeString select(const VisibleDigitsWithExponent &number) const; +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Returns a list of all rule keywords used in this <code>PluralRules</code> + * object. The rule 'other' is always present by default. + * + * @param status Output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @return StringEnumeration with the keywords. + * The caller must delete the object. + * @stable ICU 4.0 + */ + StringEnumeration* getKeywords(UErrorCode& status) const; + +#ifndef U_HIDE_DEPRECATED_API + /** + * Deprecated Function, does not return useful results. + * + * Originally intended to return a unique value for this keyword if it exists, + * else the constant UPLRULES_NO_UNIQUE_VALUE. + * + * @param keyword The keyword. + * @return Stub deprecated function returns UPLRULES_NO_UNIQUE_VALUE always. + * @deprecated ICU 55 + */ + double getUniqueKeywordValue(const UnicodeString& keyword); + + /** + * Deprecated Function, does not produce useful results. + * + * Originally intended to return all the values for which select() would return the keyword. + * If the keyword is unknown, returns no values, but this is not an error. If + * the number of values is unlimited, returns no values and -1 as the + * count. + * + * The number of returned values is typically small. + * + * @param keyword The keyword. + * @param dest Array into which to put the returned values. May + * be NULL if destCapacity is 0. + * @param destCapacity The capacity of the array, must be at least 0. + * @param status The error code. Deprecated function, always sets U_UNSUPPORTED_ERROR. + * @return The count of values available, or -1. This count + * can be larger than destCapacity, but no more than + * destCapacity values will be written. + * @deprecated ICU 55 + */ + int32_t getAllKeywordValues(const UnicodeString &keyword, + double *dest, int32_t destCapacity, + UErrorCode& status); +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Returns sample values for which select() would return the keyword. If + * the keyword is unknown, returns no values, but this is not an error. + * + * The number of returned values is typically small. + * + * @param keyword The keyword. + * @param dest Array into which to put the returned values. May + * be NULL if destCapacity is 0. + * @param destCapacity The capacity of the array, must be at least 0. + * @param status The error code. + * @return The count of values written. + * If more than destCapacity samples are available, then + * only destCapacity are written, and destCapacity is returned as the count, + * rather than setting a U_BUFFER_OVERFLOW_ERROR. + * (The actual number of keyword values could be unlimited.) + * @stable ICU 4.8 + */ + int32_t getSamples(const UnicodeString &keyword, + double *dest, int32_t destCapacity, + UErrorCode& status); + + /** + * Returns TRUE if the given keyword is defined in this + * <code>PluralRules</code> object. + * + * @param keyword the input keyword. + * @return TRUE if the input keyword is defined. + * Otherwise, return FALSE. + * @stable ICU 4.0 + */ + UBool isKeyword(const UnicodeString& keyword) const; + + + /** + * Returns keyword for default plural form. + * + * @return keyword for default plural form. + * @stable ICU 4.0 + */ + UnicodeString getKeywordOther() const; + +#ifndef U_HIDE_INTERNAL_API + /** + * + * @internal + */ + UnicodeString getRules() const; +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Compares the equality of two PluralRules objects. + * + * @param other The other PluralRules object to be compared with. + * @return True if the given PluralRules is the same as this + * PluralRules; false otherwise. + * @stable ICU 4.0 + */ + virtual UBool operator==(const PluralRules& other) const; + + /** + * Compares the inequality of two PluralRules objects. + * + * @param other The PluralRules object to be compared with. + * @return True if the given PluralRules is not the same as this + * PluralRules; false otherwise. + * @stable ICU 4.0 + */ + UBool operator!=(const PluralRules& other) const {return !operator==(other);} + + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 4.0 + * + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 4.0 + */ + virtual UClassID getDynamicClassID() const; + + +private: + RuleChain *mRules; + + PluralRules(); // default constructor not implemented + void parseDescription(const UnicodeString& ruleData, UErrorCode &status); + int32_t getNumberValue(const UnicodeString& token) const; + UnicodeString getRuleFromResource(const Locale& locale, UPluralType type, UErrorCode& status); + RuleChain *rulesForKeyword(const UnicodeString &keyword) const; + + friend class PluralRuleParser; +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _PLURRULE +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ptypes.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ptypes.h new file mode 100755 index 00000000..6eaf2dbf --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ptypes.h @@ -0,0 +1,128 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* +* Copyright (C) 1997-2012, International Business Machines +* Corporation and others. All Rights Reserved. +* +****************************************************************************** +* +* FILE NAME : ptypes.h +* +* Date Name Description +* 05/13/98 nos Creation (content moved here from ptypes.h). +* 03/02/99 stephen Added AS400 support. +* 03/30/99 stephen Added Linux support. +* 04/13/99 stephen Reworked for autoconf. +* 09/18/08 srl Moved basic types back to ptypes.h from platform.h +****************************************************************************** +*/ + +/** + * \file + * \brief C API: Definitions of integer types of various widths + */ + +#ifndef _PTYPES_H +#define _PTYPES_H + +/** + * \def __STDC_LIMIT_MACROS + * According to the Linux stdint.h, the ISO C99 standard specifies that in C++ implementations + * macros like INT32_MIN and UINTPTR_MAX should only be defined if explicitly requested. + * We need to define __STDC_LIMIT_MACROS before including stdint.h in C++ code + * that uses such limit macros. + * @internal + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS +#endif + +/* NULL, size_t, wchar_t */ +#include <stddef.h> + +/* + * If all compilers provided all of the C99 headers and types, + * we would just unconditionally #include <stdint.h> here + * and not need any of the stuff after including platform.h. + */ + +/* Find out if we have stdint.h etc. */ +#include "unicode/platform.h" + +/*===========================================================================*/ +/* Generic data types */ +/*===========================================================================*/ + +/* If your platform does not have the <stdint.h> header, you may + need to edit the typedefs in the #else section below. + Use #if...#else...#endif with predefined compiler macros if possible. */ +#if U_HAVE_STDINT_H + +/* + * We mostly need <stdint.h> (which defines the standard integer types) but not <inttypes.h>. + * <inttypes.h> includes <stdint.h> and adds the printf/scanf helpers PRId32, SCNx16 etc. + * which we almost never use, plus stuff like imaxabs() which we never use. + */ +#include <stdint.h> + +#if U_PLATFORM == U_PF_OS390 +/* The features header is needed to get (u)int64_t sometimes. */ +#include <features.h> +/* z/OS has <stdint.h>, but some versions are missing uint8_t (APAR PK62248). */ +#if !defined(__uint8_t) +#define __uint8_t 1 +typedef unsigned char uint8_t; +#endif +#endif /* U_PLATFORM == U_PF_OS390 */ + +#elif U_HAVE_INTTYPES_H + +# include <inttypes.h> + +#else /* neither U_HAVE_STDINT_H nor U_HAVE_INTTYPES_H */ + +#if ! U_HAVE_INT8_T +typedef signed char int8_t; +#endif + +#if ! U_HAVE_UINT8_T +typedef unsigned char uint8_t; +#endif + +#if ! U_HAVE_INT16_T +typedef signed short int16_t; +#endif + +#if ! U_HAVE_UINT16_T +typedef unsigned short uint16_t; +#endif + +#if ! U_HAVE_INT32_T +typedef signed int int32_t; +#endif + +#if ! U_HAVE_UINT32_T +typedef unsigned int uint32_t; +#endif + +#if ! U_HAVE_INT64_T +#ifdef _MSC_VER + typedef signed __int64 int64_t; +#else + typedef signed long long int64_t; +#endif +#endif + +#if ! U_HAVE_UINT64_T +#ifdef _MSC_VER + typedef unsigned __int64 uint64_t; +#else + typedef unsigned long long uint64_t; +#endif +#endif + +#endif /* U_HAVE_STDINT_H / U_HAVE_INTTYPES_H */ + +#endif /* _PTYPES_H */ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/putil.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/putil.h new file mode 100755 index 00000000..759b136c --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/putil.h @@ -0,0 +1,183 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* +* Copyright (C) 1997-2014, International Business Machines +* Corporation and others. All Rights Reserved. +* +****************************************************************************** +* +* FILE NAME : putil.h +* +* Date Name Description +* 05/14/98 nos Creation (content moved here from utypes.h). +* 06/17/99 erm Added IEEE_754 +* 07/22/98 stephen Added IEEEremainder, max, min, trunc +* 08/13/98 stephen Added isNegativeInfinity, isPositiveInfinity +* 08/24/98 stephen Added longBitsFromDouble +* 03/02/99 stephen Removed openFile(). Added AS400 support. +* 04/15/99 stephen Converted to C +* 11/15/99 helena Integrated S/390 changes for IEEE support. +* 01/11/00 helena Added u_getVersion. +****************************************************************************** +*/ + +#ifndef PUTIL_H +#define PUTIL_H + +#include "unicode/utypes.h" + /** + * \file + * \brief C API: Platform Utilities + */ + +/*==========================================================================*/ +/* Platform utilities */ +/*==========================================================================*/ + +/** + * Platform utilities isolates the platform dependencies of the + * library. For each platform which this code is ported to, these + * functions may have to be re-implemented. + */ + +/** + * Return the ICU data directory. + * The data directory is where common format ICU data files (.dat files) + * are loaded from. Note that normal use of the built-in ICU + * facilities does not require loading of an external data file; + * unless you are adding custom data to ICU, the data directory + * does not need to be set. + * + * The data directory is determined as follows: + * If u_setDataDirectory() has been called, that is it, otherwise + * if the ICU_DATA environment variable is set, use that, otherwise + * If a data directory was specified at ICU build time + * <code> + * \code + * #define ICU_DATA_DIR "path" + * \endcode + * </code> use that, + * otherwise no data directory is available. + * + * @return the data directory, or an empty string ("") if no data directory has + * been specified. + * + * @stable ICU 2.0 + */ +U_STABLE const char* U_EXPORT2 u_getDataDirectory(void); + + +/** + * Set the ICU data directory. + * The data directory is where common format ICU data files (.dat files) + * are loaded from. Note that normal use of the built-in ICU + * facilities does not require loading of an external data file; + * unless you are adding custom data to ICU, the data directory + * does not need to be set. + * + * This function should be called at most once in a process, before the + * first ICU operation (e.g., u_init()) that will require the loading of an + * ICU data file. + * This function is not thread-safe. Use it before calling ICU APIs from + * multiple threads. + * + * @param directory The directory to be set. + * + * @see u_init + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 u_setDataDirectory(const char *directory); + +#ifndef U_HIDE_INTERNAL_API +/** + * Return the time zone files override directory, or an empty string if + * no directory was specified. Certain time zone resources will be preferentially + * loaded from individual files in this directory. + * + * @return the time zone data override directory. + * @internal + */ +U_INTERNAL const char * U_EXPORT2 u_getTimeZoneFilesDirectory(UErrorCode *status); + +/** + * Set the time zone files override directory. + * This function is not thread safe; it must not be called concurrently with + * u_getTimeZoneFilesDirectory() or any other use of ICU time zone functions. + * This function should only be called before using any ICU service that + * will access the time zone data. + * @internal + */ +U_INTERNAL void U_EXPORT2 u_setTimeZoneFilesDirectory(const char *path, UErrorCode *status); +#endif /* U_HIDE_INTERNAL_API */ + + +/** + * @{ + * Filesystem file and path separator characters. + * Example: '/' and ':' on Unix, '\\' and ';' on Windows. + * @stable ICU 2.0 + */ +#if U_PLATFORM_USES_ONLY_WIN32_API +# define U_FILE_SEP_CHAR '\\' +# define U_FILE_ALT_SEP_CHAR '/' +# define U_PATH_SEP_CHAR ';' +# define U_FILE_SEP_STRING "\\" +# define U_FILE_ALT_SEP_STRING "/" +# define U_PATH_SEP_STRING ";" +#else +# define U_FILE_SEP_CHAR '/' +# define U_FILE_ALT_SEP_CHAR '/' +# define U_PATH_SEP_CHAR ':' +# define U_FILE_SEP_STRING "/" +# define U_FILE_ALT_SEP_STRING "/" +# define U_PATH_SEP_STRING ":" +#endif + +/** @} */ + +/** + * Convert char characters to UChar characters. + * This utility function is useful only for "invariant characters" + * that are encoded in the platform default encoding. + * They are a small, constant subset of the encoding and include + * just the latin letters, digits, and some punctuation. + * For details, see U_CHARSET_FAMILY. + * + * @param cs Input string, points to <code>length</code> + * character bytes from a subset of the platform encoding. + * @param us Output string, points to memory for <code>length</code> + * Unicode characters. + * @param length The number of characters to convert; this may + * include the terminating <code>NUL</code>. + * + * @see U_CHARSET_FAMILY + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +u_charsToUChars(const char *cs, UChar *us, int32_t length); + +/** + * Convert UChar characters to char characters. + * This utility function is useful only for "invariant characters" + * that can be encoded in the platform default encoding. + * They are a small, constant subset of the encoding and include + * just the latin letters, digits, and some punctuation. + * For details, see U_CHARSET_FAMILY. + * + * @param us Input string, points to <code>length</code> + * Unicode characters that can be encoded with the + * codepage-invariant subset of the platform encoding. + * @param cs Output string, points to memory for <code>length</code> + * character bytes. + * @param length The number of characters to convert; this may + * include the terminating <code>NUL</code>. + * + * @see U_CHARSET_FAMILY + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +u_UCharsToChars(const UChar *us, char *cs, int32_t length); + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/rbbi.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/rbbi.h new file mode 100755 index 00000000..f0ac4bc4 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/rbbi.h @@ -0,0 +1,705 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +*************************************************************************** +* Copyright (C) 1999-2016 International Business Machines Corporation * +* and others. All rights reserved. * +*************************************************************************** + +********************************************************************** +* Date Name Description +* 10/22/99 alan Creation. +* 11/11/99 rgillam Complete port from Java. +********************************************************************** +*/ + +#ifndef RBBI_H +#define RBBI_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Rule Based Break Iterator + */ + +#if !UCONFIG_NO_BREAK_ITERATION + +#include "unicode/brkiter.h" +#include "unicode/udata.h" +#include "unicode/parseerr.h" +#include "unicode/schriter.h" + +U_NAMESPACE_BEGIN + +/** @internal */ +class LanguageBreakEngine; +struct RBBIDataHeader; +class RBBIDataWrapper; +class UnhandledEngine; +class UStack; + +/** + * + * A subclass of BreakIterator whose behavior is specified using a list of rules. + * <p>Instances of this class are most commonly created by the factory methods of + * BreakIterator::createWordInstance(), BreakIterator::createLineInstance(), etc., + * and then used via the abstract API in class BreakIterator</p> + * + * <p>See the ICU User Guide for information on Break Iterator Rules.</p> + * + * <p>This class is not intended to be subclassed.</p> + */ +class U_COMMON_API RuleBasedBreakIterator /*U_FINAL*/ : public BreakIterator { + +private: + /** + * The UText through which this BreakIterator accesses the text + * @internal + */ + UText fText; + +#ifndef U_HIDE_INTERNAL_API +public: +#endif /* U_HIDE_INTERNAL_API */ + /** + * The rule data for this BreakIterator instance. + * Not for general use; Public only for testing purposes. + * @internal + */ + RBBIDataWrapper *fData; +private: + + /** + * The iteration state - current position, rule status for the current position, + * and whether the iterator ran off the end, yielding UBRK_DONE. + * Current position is pinned to be 0 < position <= text.length. + * Current position is always set to a boundary. + * @internal + */ + /** + * The current position of the iterator. Pinned, 0 < fPosition <= text.length. + * Never has the value UBRK_DONE (-1). + */ + int32_t fPosition; + + /** + * TODO: + */ + int32_t fRuleStatusIndex; + + /** + * Cache of previously determined boundary positions. + */ + class BreakCache; + BreakCache *fBreakCache; + + /** + * Cache of boundary positions within a region of text that has been + * sub-divided by dictionary based breaking. + */ + class DictionaryCache; + DictionaryCache *fDictionaryCache; + + /** + * + * If present, UStack of LanguageBreakEngine objects that might handle + * dictionary characters. Searched from top to bottom to find an object to + * handle a given character. + * @internal + */ + UStack *fLanguageBreakEngines; + + /** + * + * If present, the special LanguageBreakEngine used for handling + * characters that are in the dictionary set, but not handled by any + * LangugageBreakEngine. + * @internal + */ + UnhandledEngine *fUnhandledBreakEngine; + + /** + * Counter for the number of characters encountered with the "dictionary" + * flag set. + * @internal + */ + uint32_t fDictionaryCharCount; + + /** + * A character iterator that refers to the same text as the UText, above. + * Only included for compatibility with old API, which was based on CharacterIterators. + * Value may be adopted from outside, or one of fSCharIter or fDCharIter, below. + */ + CharacterIterator *fCharIter; + + /** + * When the input text is provided by a UnicodeString, this will point to + * a characterIterator that wraps that data. Needed only for the + * implementation of getText(), a backwards compatibility issue. + */ + StringCharacterIterator fSCharIter; + + /** + * True when iteration has run off the end, and iterator functions should return UBRK_DONE. + */ + UBool fDone; + + //======================================================================= + // constructors + //======================================================================= + + /** + * Constructor from a flattened set of RBBI data in malloced memory. + * RulesBasedBreakIterators built from a custom set of rules + * are created via this constructor; the rules are compiled + * into memory, then the break iterator is constructed here. + * + * The break iterator adopts the memory, and will + * free it when done. + * @internal + */ + RuleBasedBreakIterator(RBBIDataHeader* data, UErrorCode &status); + + /** @internal */ + friend class RBBIRuleBuilder; + /** @internal */ + friend class BreakIterator; + +public: + + /** Default constructor. Creates an empty shell of an iterator, with no + * rules or text to iterate over. Object can subsequently be assigned to. + * @stable ICU 2.2 + */ + RuleBasedBreakIterator(); + + /** + * Copy constructor. Will produce a break iterator with the same behavior, + * and which iterates over the same text, as the one passed in. + * @param that The RuleBasedBreakIterator passed to be copied + * @stable ICU 2.0 + */ + RuleBasedBreakIterator(const RuleBasedBreakIterator& that); + + /** + * Construct a RuleBasedBreakIterator from a set of rules supplied as a string. + * @param rules The break rules to be used. + * @param parseError In the event of a syntax error in the rules, provides the location + * within the rules of the problem. + * @param status Information on any errors encountered. + * @stable ICU 2.2 + */ + RuleBasedBreakIterator( const UnicodeString &rules, + UParseError &parseError, + UErrorCode &status); + + /** + * Construct a RuleBasedBreakIterator from a set of precompiled binary rules. + * Binary rules are obtained from RulesBasedBreakIterator::getBinaryRules(). + * Construction of a break iterator in this way is substantially faster than + * construction from source rules. + * + * Ownership of the storage containing the compiled rules remains with the + * caller of this function. The compiled rules must not be modified or + * deleted during the life of the break iterator. + * + * The compiled rules are not compatible across different major versions of ICU. + * The compiled rules are compatible only between machines with the same + * byte ordering (little or big endian) and the same base character set family + * (ASCII or EBCDIC). + * + * @see #getBinaryRules + * @param compiledRules A pointer to the compiled break rules to be used. + * @param ruleLength The length of the compiled break rules, in bytes. This + * corresponds to the length value produced by getBinaryRules(). + * @param status Information on any errors encountered, including invalid + * binary rules. + * @stable ICU 4.8 + */ + RuleBasedBreakIterator(const uint8_t *compiledRules, + uint32_t ruleLength, + UErrorCode &status); + + /** + * This constructor uses the udata interface to create a BreakIterator + * whose internal tables live in a memory-mapped file. "image" is an + * ICU UDataMemory handle for the pre-compiled break iterator tables. + * @param image handle to the memory image for the break iterator data. + * Ownership of the UDataMemory handle passes to the Break Iterator, + * which will be responsible for closing it when it is no longer needed. + * @param status Information on any errors encountered. + * @see udata_open + * @see #getBinaryRules + * @stable ICU 2.8 + */ + RuleBasedBreakIterator(UDataMemory* image, UErrorCode &status); + + /** + * Destructor + * @stable ICU 2.0 + */ + virtual ~RuleBasedBreakIterator(); + + /** + * Assignment operator. Sets this iterator to have the same behavior, + * and iterate over the same text, as the one passed in. + * @param that The RuleBasedBreakItertor passed in + * @return the newly created RuleBasedBreakIterator + * @stable ICU 2.0 + */ + RuleBasedBreakIterator& operator=(const RuleBasedBreakIterator& that); + + /** + * Equality operator. Returns TRUE if both BreakIterators are of the + * same class, have the same behavior, and iterate over the same text. + * @param that The BreakIterator to be compared for equality + * @return TRUE if both BreakIterators are of the + * same class, have the same behavior, and iterate over the same text. + * @stable ICU 2.0 + */ + virtual UBool operator==(const BreakIterator& that) const; + + /** + * Not-equal operator. If operator== returns TRUE, this returns FALSE, + * and vice versa. + * @param that The BreakIterator to be compared for inequality + * @return TRUE if both BreakIterators are not same. + * @stable ICU 2.0 + */ + UBool operator!=(const BreakIterator& that) const; + + /** + * Returns a newly-constructed RuleBasedBreakIterator with the same + * behavior, and iterating over the same text, as this one. + * Differs from the copy constructor in that it is polymorphic, and + * will correctly clone (copy) a derived class. + * clone() is thread safe. Multiple threads may simultaneously + * clone the same source break iterator. + * @return a newly-constructed RuleBasedBreakIterator + * @stable ICU 2.0 + */ + virtual BreakIterator* clone() const; + + /** + * Compute a hash code for this BreakIterator + * @return A hash code + * @stable ICU 2.0 + */ + virtual int32_t hashCode(void) const; + + /** + * Returns the description used to create this iterator + * @return the description used to create this iterator + * @stable ICU 2.0 + */ + virtual const UnicodeString& getRules(void) const; + + //======================================================================= + // BreakIterator overrides + //======================================================================= + + /** + * <p> + * Return a CharacterIterator over the text being analyzed. + * The returned character iterator is owned by the break iterator, and must + * not be deleted by the caller. Repeated calls to this function may + * return the same CharacterIterator. + * </p> + * <p> + * The returned character iterator must not be used concurrently with + * the break iterator. If concurrent operation is needed, clone the + * returned character iterator first and operate on the clone. + * </p> + * <p> + * When the break iterator is operating on text supplied via a UText, + * this function will fail. Lacking any way to signal failures, it + * returns an CharacterIterator containing no text. + * The function getUText() provides similar functionality, + * is reliable, and is more efficient. + * </p> + * + * TODO: deprecate this function? + * + * @return An iterator over the text being analyzed. + * @stable ICU 2.0 + */ + virtual CharacterIterator& getText(void) const; + + + /** + * Get a UText for the text being analyzed. + * The returned UText is a shallow clone of the UText used internally + * by the break iterator implementation. It can safely be used to + * access the text without impacting any break iterator operations, + * but the underlying text itself must not be altered. + * + * @param fillIn A UText to be filled in. If NULL, a new UText will be + * allocated to hold the result. + * @param status receives any error codes. + * @return The current UText for this break iterator. If an input + * UText was provided, it will always be returned. + * @stable ICU 3.4 + */ + virtual UText *getUText(UText *fillIn, UErrorCode &status) const; + + /** + * Set the iterator to analyze a new piece of text. This function resets + * the current iteration position to the beginning of the text. + * @param newText An iterator over the text to analyze. The BreakIterator + * takes ownership of the character iterator. The caller MUST NOT delete it! + * @stable ICU 2.0 + */ + virtual void adoptText(CharacterIterator* newText); + + /** + * Set the iterator to analyze a new piece of text. This function resets + * the current iteration position to the beginning of the text. + * + * The BreakIterator will retain a reference to the supplied string. + * The caller must not modify or delete the text while the BreakIterator + * retains the reference. + * + * @param newText The text to analyze. + * @stable ICU 2.0 + */ + virtual void setText(const UnicodeString& newText); + + /** + * Reset the break iterator to operate over the text represented by + * the UText. The iterator position is reset to the start. + * + * This function makes a shallow clone of the supplied UText. This means + * that the caller is free to immediately close or otherwise reuse the + * Utext that was passed as a parameter, but that the underlying text itself + * must not be altered while being referenced by the break iterator. + * + * @param text The UText used to change the text. + * @param status Receives any error codes. + * @stable ICU 3.4 + */ + virtual void setText(UText *text, UErrorCode &status); + + /** + * Sets the current iteration position to the beginning of the text, position zero. + * @return The offset of the beginning of the text, zero. + * @stable ICU 2.0 + */ + virtual int32_t first(void); + + /** + * Sets the current iteration position to the end of the text. + * @return The text's past-the-end offset. + * @stable ICU 2.0 + */ + virtual int32_t last(void); + + /** + * Advances the iterator either forward or backward the specified number of steps. + * Negative values move backward, and positive values move forward. This is + * equivalent to repeatedly calling next() or previous(). + * @param n The number of steps to move. The sign indicates the direction + * (negative is backwards, and positive is forwards). + * @return The character offset of the boundary position n boundaries away from + * the current one. + * @stable ICU 2.0 + */ + virtual int32_t next(int32_t n); + + /** + * Advances the iterator to the next boundary position. + * @return The position of the first boundary after this one. + * @stable ICU 2.0 + */ + virtual int32_t next(void); + + /** + * Moves the iterator backwards, to the last boundary preceding this one. + * @return The position of the last boundary position preceding this one. + * @stable ICU 2.0 + */ + virtual int32_t previous(void); + + /** + * Sets the iterator to refer to the first boundary position following + * the specified position. + * @param offset The position from which to begin searching for a break position. + * @return The position of the first break after the current position. + * @stable ICU 2.0 + */ + virtual int32_t following(int32_t offset); + + /** + * Sets the iterator to refer to the last boundary position before the + * specified position. + * @param offset The position to begin searching for a break from. + * @return The position of the last boundary before the starting position. + * @stable ICU 2.0 + */ + virtual int32_t preceding(int32_t offset); + + /** + * Returns true if the specified position is a boundary position. As a side + * effect, leaves the iterator pointing to the first boundary position at + * or after "offset". + * @param offset the offset to check. + * @return True if "offset" is a boundary position. + * @stable ICU 2.0 + */ + virtual UBool isBoundary(int32_t offset); + + /** + * Returns the current iteration position. Note that UBRK_DONE is never + * returned from this function; if iteration has run to the end of a + * string, current() will return the length of the string while + * next() will return UBRK_DONE). + * @return The current iteration position. + * @stable ICU 2.0 + */ + virtual int32_t current(void) const; + + + /** + * Return the status tag from the break rule that determined the boundary at + * the current iteration position. For break rules that do not specify a + * status, a default value of 0 is returned. If more than one break rule + * would cause a boundary to be located at some position in the text, + * the numerically largest of the applicable status values is returned. + * <p> + * Of the standard types of ICU break iterators, only word break and + * line break provide status values. The values are defined in + * the header file ubrk.h. For Word breaks, the status allows distinguishing between words + * that contain alphabetic letters, "words" that appear to be numbers, + * punctuation and spaces, words containing ideographic characters, and + * more. For Line Break, the status distinguishes between hard (mandatory) breaks + * and soft (potential) break positions. + * <p> + * <code>getRuleStatus()</code> can be called after obtaining a boundary + * position from <code>next()</code>, <code>previous()</code>, or + * any other break iterator functions that returns a boundary position. + * <p> + * Note that <code>getRuleStatus()</code> returns the value corresponding to + * <code>current()</code> index even after <code>next()</code> has returned DONE. + * <p> + * When creating custom break rules, one is free to define whatever + * status values may be convenient for the application. + * <p> + * @return the status from the break rule that determined the boundary + * at the current iteration position. + * + * @see UWordBreak + * @stable ICU 2.2 + */ + virtual int32_t getRuleStatus() const; + + /** + * Get the status (tag) values from the break rule(s) that determined the boundary + * at the current iteration position. + * <p> + * The returned status value(s) are stored into an array provided by the caller. + * The values are stored in sorted (ascending) order. + * If the capacity of the output array is insufficient to hold the data, + * the output will be truncated to the available length, and a + * U_BUFFER_OVERFLOW_ERROR will be signaled. + * + * @param fillInVec an array to be filled in with the status values. + * @param capacity the length of the supplied vector. A length of zero causes + * the function to return the number of status values, in the + * normal way, without attempting to store any values. + * @param status receives error codes. + * @return The number of rule status values from the rules that determined + * the boundary at the current iteration position. + * In the event of a U_BUFFER_OVERFLOW_ERROR, the return value + * is the total number of status values that were available, + * not the reduced number that were actually returned. + * @see getRuleStatus + * @stable ICU 3.0 + */ + virtual int32_t getRuleStatusVec(int32_t *fillInVec, int32_t capacity, UErrorCode &status); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. + * This method is to implement a simple version of RTTI, since not all + * C++ compilers support genuine RTTI. Polymorphic operator==() and + * clone() methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 2.0 + */ + virtual UClassID getDynamicClassID(void) const; + + /** + * Returns the class ID for this class. This is useful only for + * comparing to a return value from getDynamicClassID(). For example: + * + * Base* polymorphic_pointer = createPolymorphicObject(); + * if (polymorphic_pointer->getDynamicClassID() == + * Derived::getStaticClassID()) ... + * + * @return The class ID for all objects of this class. + * @stable ICU 2.0 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Deprecated functionality. Use clone() instead. + * + * Create a clone (copy) of this break iterator in memory provided + * by the caller. The idea is to increase performance by avoiding + * a storage allocation. Use of this function is NOT RECOMMENDED. + * Performance gains are minimal, and correct buffer management is + * tricky. Use clone() instead. + * + * @param stackBuffer The pointer to the memory into which the cloned object + * should be placed. If NULL, allocate heap memory + * for the cloned object. + * @param BufferSize The size of the buffer. If zero, return the required + * buffer size, but do not clone the object. If the + * size was too small (but not zero), allocate heap + * storage for the cloned object. + * + * @param status Error status. U_SAFECLONE_ALLOCATED_WARNING will be + * returned if the provided buffer was too small, and + * the clone was therefore put on the heap. + * + * @return Pointer to the clone object. This may differ from the stackBuffer + * address if the byte alignment of the stack buffer was not suitable + * or if the stackBuffer was too small to hold the clone. + * @deprecated ICU 52. Use clone() instead. + */ + virtual BreakIterator * createBufferClone(void *stackBuffer, + int32_t &BufferSize, + UErrorCode &status); + + + /** + * Return the binary form of compiled break rules, + * which can then be used to create a new break iterator at some + * time in the future. Creating a break iterator from pre-compiled rules + * is much faster than building one from the source form of the + * break rules. + * + * The binary data can only be used with the same version of ICU + * and on the same platform type (processor endian-ness) + * + * @param length Returns the length of the binary data. (Out parameter.) + * + * @return A pointer to the binary (compiled) rule data. The storage + * belongs to the RulesBasedBreakIterator object, not the + * caller, and must not be modified or deleted. + * @stable ICU 4.8 + */ + virtual const uint8_t *getBinaryRules(uint32_t &length); + + /** + * Set the subject text string upon which the break iterator is operating + * without changing any other aspect of the matching state. + * The new and previous text strings must have the same content. + * + * This function is intended for use in environments where ICU is operating on + * strings that may move around in memory. It provides a mechanism for notifying + * ICU that the string has been relocated, and providing a new UText to access the + * string in its new position. + * + * Note that the break iterator implementation never copies the underlying text + * of a string being processed, but always operates directly on the original text + * provided by the user. Refreshing simply drops the references to the old text + * and replaces them with references to the new. + * + * Caution: this function is normally used only by very specialized, + * system-level code. One example use case is with garbage collection that moves + * the text in memory. + * + * @param input The new (moved) text string. + * @param status Receives errors detected by this function. + * @return *this + * + * @stable ICU 49 + */ + virtual RuleBasedBreakIterator &refreshInputText(UText *input, UErrorCode &status); + + +private: + //======================================================================= + // implementation + //======================================================================= + /** + * Dumps caches and performs other actions associated with a complete change + * in text or iteration position. + * @internal + */ + void reset(void); + + /** + * Common initialization function, used by constructors and bufferClone. + * @internal + */ + void init(UErrorCode &status); + + /** + * Iterate backwards from an arbitrary position in the input text using the Safe Reverse rules. + * This locates a "Safe Position" from which the forward break rules + * will operate correctly. A Safe Position is not necessarily a boundary itself. + * + * @param fromPosition the position in the input text to begin the iteration. + * @internal + */ + int32_t handlePrevious(int32_t fromPosition); + + /** + * Find a rule-based boundary by running the state machine. + * Input + * fPosition, the position in the text to begin from. + * Output + * fPosition: the boundary following the starting position. + * fDictionaryCharCount the number of dictionary characters encountered. + * If > 0, the segment will be further subdivided + * fRuleStatusIndex Info from the state table indicating which rules caused the boundary. + * + * @internal + */ + int32_t handleNext(); + + + /** + * This function returns the appropriate LanguageBreakEngine for a + * given character c. + * @param c A character in the dictionary set + * @internal + */ + const LanguageBreakEngine *getLanguageBreakEngine(UChar32 c); + + public: +#ifndef U_HIDE_INTERNAL_API + /** + * Debugging function only. + * @internal + */ + void dumpCache(); + + /** + * Debugging function only. + * @internal + */ + void dumpTables(); + +#endif /* U_HIDE_INTERNAL_API */ +}; + +//------------------------------------------------------------------------------ +// +// Inline Functions Definitions ... +// +//------------------------------------------------------------------------------ + +inline UBool RuleBasedBreakIterator::operator!=(const BreakIterator& that) const { + return !operator==(that); +} + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_BREAK_ITERATION */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/rbnf.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/rbnf.h new file mode 100755 index 00000000..12925443 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/rbnf.h @@ -0,0 +1,1140 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 1997-2015, International Business Machines Corporation and others. +* All Rights Reserved. +******************************************************************************* +*/ + +#ifndef RBNF_H +#define RBNF_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Rule Based Number Format + */ + +/** + * \def U_HAVE_RBNF + * This will be 0 if RBNF support is not included in ICU + * and 1 if it is. + * + * @stable ICU 2.4 + */ +#if UCONFIG_NO_FORMATTING +#define U_HAVE_RBNF 0 +#else +#define U_HAVE_RBNF 1 + +#include "unicode/dcfmtsym.h" +#include "unicode/fmtable.h" +#include "unicode/locid.h" +#include "unicode/numfmt.h" +#include "unicode/unistr.h" +#include "unicode/strenum.h" +#include "unicode/brkiter.h" +#include "unicode/upluralrules.h" + +U_NAMESPACE_BEGIN + +class NFRule; +class NFRuleSet; +class LocalizationInfo; +class PluralFormat; +class RuleBasedCollator; + +/** + * Tags for the predefined rulesets. + * + * @stable ICU 2.2 + */ +enum URBNFRuleSetTag { + URBNF_SPELLOUT, + URBNF_ORDINAL, + URBNF_DURATION, + URBNF_NUMBERING_SYSTEM, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal URBNFRuleSetTag value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + URBNF_COUNT +#endif // U_HIDE_DEPRECATED_API +}; + +/** + * The RuleBasedNumberFormat class formats numbers according to a set of rules. This number formatter is + * typically used for spelling out numeric values in words (e.g., 25,3476 as + * "twenty-five thousand three hundred seventy-six" or "vingt-cinq mille trois + * cents soixante-seize" or + * "fünfundzwanzigtausenddreihundertsechsundsiebzig"), but can also be used for + * other complicated formatting tasks, such as formatting a number of seconds as hours, + * minutes and seconds (e.g., 3,730 as "1:02:10"). + * + * <p>The resources contain three predefined formatters for each locale: spellout, which + * spells out a value in words (123 is "one hundred twenty-three"); ordinal, which + * appends an ordinal suffix to the end of a numeral (123 is "123rd"); and + * duration, which shows a duration in seconds as hours, minutes, and seconds (123 is + * "2:03").  The client can also define more specialized <tt>RuleBasedNumberFormat</tt>s + * by supplying programmer-defined rule sets.</p> + * + * <p>The behavior of a <tt>RuleBasedNumberFormat</tt> is specified by a textual description + * that is either passed to the constructor as a <tt>String</tt> or loaded from a resource + * bundle. In its simplest form, the description consists of a semicolon-delimited list of <em>rules.</em> + * Each rule has a string of output text and a value or range of values it is applicable to. + * In a typical spellout rule set, the first twenty rules are the words for the numbers from + * 0 to 19:</p> + * + * <pre>zero; one; two; three; four; five; six; seven; eight; nine; + * ten; eleven; twelve; thirteen; fourteen; fifteen; sixteen; seventeen; eighteen; nineteen;</pre> + * + * <p>For larger numbers, we can use the preceding set of rules to format the ones place, and + * we only have to supply the words for the multiples of 10:</p> + * + * <pre> 20: twenty[->>]; + * 30: thirty[->>]; + * 40: forty[->>]; + * 50: fifty[->>]; + * 60: sixty[->>]; + * 70: seventy[->>]; + * 80: eighty[->>]; + * 90: ninety[->>];</pre> + * + * <p>In these rules, the <em>base value</em> is spelled out explicitly and set off from the + * rule's output text with a colon. The rules are in a sorted list, and a rule is applicable + * to all numbers from its own base value to one less than the next rule's base value. The + * ">>" token is called a <em>substitution</em> and tells the fomatter to + * isolate the number's ones digit, format it using this same set of rules, and place the + * result at the position of the ">>" token. Text in brackets is omitted if + * the number being formatted is an even multiple of 10 (the hyphen is a literal hyphen; 24 + * is "twenty-four," not "twenty four").</p> + * + * <p>For even larger numbers, we can actually look up several parts of the number in the + * list:</p> + * + * <pre>100: << hundred[ >>];</pre> + * + * <p>The "<<" represents a new kind of substitution. The << isolates + * the hundreds digit (and any digits to its left), formats it using this same rule set, and + * places the result where the "<<" was. Notice also that the meaning of + * >> has changed: it now refers to both the tens and the ones digits. The meaning of + * both substitutions depends on the rule's base value. The base value determines the rule's <em>divisor,</em> + * which is the highest power of 10 that is less than or equal to the base value (the user + * can change this). To fill in the substitutions, the formatter divides the number being + * formatted by the divisor. The integral quotient is used to fill in the << + * substitution, and the remainder is used to fill in the >> substitution. The meaning + * of the brackets changes similarly: text in brackets is omitted if the value being + * formatted is an even multiple of the rule's divisor. The rules are applied recursively, so + * if a substitution is filled in with text that includes another substitution, that + * substitution is also filled in.</p> + * + * <p>This rule covers values up to 999, at which point we add another rule:</p> + * + * <pre>1000: << thousand[ >>];</pre> + * + * <p>Again, the meanings of the brackets and substitution tokens shift because the rule's + * base value is a higher power of 10, changing the rule's divisor. This rule can actually be + * used all the way up to 999,999. This allows us to finish out the rules as follows:</p> + * + * <pre> 1,000,000: << million[ >>]; + * 1,000,000,000: << billion[ >>]; + * 1,000,000,000,000: << trillion[ >>]; + * 1,000,000,000,000,000: OUT OF RANGE!;</pre> + * + * <p>Commas, periods, and spaces can be used in the base values to improve legibility and + * are ignored by the rule parser. The last rule in the list is customarily treated as an + * "overflow rule," applying to everything from its base value on up, and often (as + * in this example) being used to print out an error message or default representation. + * Notice also that the size of the major groupings in large numbers is controlled by the + * spacing of the rules: because in English we group numbers by thousand, the higher rules + * are separated from each other by a factor of 1,000.</p> + * + * <p>To see how these rules actually work in practice, consider the following example: + * Formatting 25,430 with this rule set would work like this:</p> + * + * <table border="0" width="100%"> + * <tr> + * <td><strong><< thousand >></strong></td> + * <td>[the rule whose base value is 1,000 is applicable to 25,340]</td> + * </tr> + * <tr> + * <td><strong>twenty->></strong> thousand >></td> + * <td>[25,340 over 1,000 is 25. The rule for 20 applies.]</td> + * </tr> + * <tr> + * <td>twenty-<strong>five</strong> thousand >></td> + * <td>[25 mod 10 is 5. The rule for 5 is "five."</td> + * </tr> + * <tr> + * <td>twenty-five thousand <strong><< hundred >></strong></td> + * <td>[25,340 mod 1,000 is 340. The rule for 100 applies.]</td> + * </tr> + * <tr> + * <td>twenty-five thousand <strong>three</strong> hundred >></td> + * <td>[340 over 100 is 3. The rule for 3 is "three."]</td> + * </tr> + * <tr> + * <td>twenty-five thousand three hundred <strong>forty</strong></td> + * <td>[340 mod 100 is 40. The rule for 40 applies. Since 40 divides + * evenly by 10, the hyphen and substitution in the brackets are omitted.]</td> + * </tr> + * </table> + * + * <p>The above syntax suffices only to format positive integers. To format negative numbers, + * we add a special rule:</p> + * + * <pre>-x: minus >>;</pre> + * + * <p>This is called a <em>negative-number rule,</em> and is identified by "-x" + * where the base value would be. This rule is used to format all negative numbers. the + * >> token here means "find the number's absolute value, format it with these + * rules, and put the result here."</p> + * + * <p>We also add a special rule called a <em>fraction rule </em>for numbers with fractional + * parts:</p> + * + * <pre>x.x: << point >>;</pre> + * + * <p>This rule is used for all positive non-integers (negative non-integers pass through the + * negative-number rule first and then through this rule). Here, the << token refers to + * the number's integral part, and the >> to the number's fractional part. The + * fractional part is formatted as a series of single-digit numbers (e.g., 123.456 would be + * formatted as "one hundred twenty-three point four five six").</p> + * + * <p>To see how this rule syntax is applied to various languages, examine the resource data.</p> + * + * <p>There is actually much more flexibility built into the rule language than the + * description above shows. A formatter may own multiple rule sets, which can be selected by + * the caller, and which can use each other to fill in their substitutions. Substitutions can + * also be filled in with digits, using a DecimalFormat object. There is syntax that can be + * used to alter a rule's divisor in various ways. And there is provision for much more + * flexible fraction handling. A complete description of the rule syntax follows:</p> + * + * <hr> + * + * <p>The description of a <tt>RuleBasedNumberFormat</tt>'s behavior consists of one or more <em>rule + * sets.</em> Each rule set consists of a name, a colon, and a list of <em>rules.</em> A rule + * set name must begin with a % sign. Rule sets with names that begin with a single % sign + * are <em>public:</em> the caller can specify that they be used to format and parse numbers. + * Rule sets with names that begin with %% are <em>private:</em> they exist only for the use + * of other rule sets. If a formatter only has one rule set, the name may be omitted.</p> + * + * <p>The user can also specify a special "rule set" named <tt>%%lenient-parse</tt>. + * The body of <tt>%%lenient-parse</tt> isn't a set of number-formatting rules, but a <tt>RuleBasedCollator</tt> + * description which is used to define equivalences for lenient parsing. For more information + * on the syntax, see <tt>RuleBasedCollator</tt>. For more information on lenient parsing, + * see <tt>setLenientParse()</tt>. <em>Note:</em> symbols that have syntactic meaning + * in collation rules, such as '&', have no particular meaning when appearing outside + * of the <tt>lenient-parse</tt> rule set.</p> + * + * <p>The body of a rule set consists of an ordered, semicolon-delimited list of <em>rules.</em> + * Internally, every rule has a base value, a divisor, rule text, and zero, one, or two <em>substitutions.</em> + * These parameters are controlled by the description syntax, which consists of a <em>rule + * descriptor,</em> a colon, and a <em>rule body.</em></p> + * + * <p>A rule descriptor can take one of the following forms (text in <em>italics</em> is the + * name of a token):</p> + * + * <table border="0" width="100%"> + * <tr> + * <td><em>bv</em>:</td> + * <td><em>bv</em> specifies the rule's base value. <em>bv</em> is a decimal + * number expressed using ASCII digits. <em>bv</em> may contain spaces, period, and commas, + * which are ignored. The rule's divisor is the highest power of 10 less than or equal to + * the base value.</td> + * </tr> + * <tr> + * <td><em>bv</em>/<em>rad</em>:</td> + * <td><em>bv</em> specifies the rule's base value. The rule's divisor is the + * highest power of <em>rad</em> less than or equal to the base value.</td> + * </tr> + * <tr> + * <td><em>bv</em>>:</td> + * <td><em>bv</em> specifies the rule's base value. To calculate the divisor, + * let the radix be 10, and the exponent be the highest exponent of the radix that yields a + * result less than or equal to the base value. Every > character after the base value + * decreases the exponent by 1. If the exponent is positive or 0, the divisor is the radix + * raised to the power of the exponent; otherwise, the divisor is 1.</td> + * </tr> + * <tr> + * <td><em>bv</em>/<em>rad</em>>:</td> + * <td><em>bv</em> specifies the rule's base value. To calculate the divisor, + * let the radix be <em>rad</em>, and the exponent be the highest exponent of the radix that + * yields a result less than or equal to the base value. Every > character after the radix + * decreases the exponent by 1. If the exponent is positive or 0, the divisor is the radix + * raised to the power of the exponent; otherwise, the divisor is 1.</td> + * </tr> + * <tr> + * <td>-x:</td> + * <td>The rule is a negative-number rule.</td> + * </tr> + * <tr> + * <td>x.x:</td> + * <td>The rule is an <em>improper fraction rule</em>. If the full stop in + * the middle of the rule name is replaced with the decimal point + * that is used in the language or DecimalFormatSymbols, then that rule will + * have precedence when formatting and parsing this rule. For example, some + * languages use the comma, and can thus be written as x,x instead. For example, + * you can use "x.x: << point >>;x,x: << comma >>;" to + * handle the decimal point that matches the language's natural spelling of + * the punctuation of either the full stop or comma.</td> + * </tr> + * <tr> + * <td>0.x:</td> + * <td>The rule is a <em>proper fraction rule</em>. If the full stop in + * the middle of the rule name is replaced with the decimal point + * that is used in the language or DecimalFormatSymbols, then that rule will + * have precedence when formatting and parsing this rule. For example, some + * languages use the comma, and can thus be written as 0,x instead. For example, + * you can use "0.x: point >>;0,x: comma >>;" to + * handle the decimal point that matches the language's natural spelling of + * the punctuation of either the full stop or comma.</td> + * </tr> + * <tr> + * <td>x.0:</td> + * <td>The rule is a <em>master rule</em>. If the full stop in + * the middle of the rule name is replaced with the decimal point + * that is used in the language or DecimalFormatSymbols, then that rule will + * have precedence when formatting and parsing this rule. For example, some + * languages use the comma, and can thus be written as x,0 instead. For example, + * you can use "x.0: << point;x,0: << comma;" to + * handle the decimal point that matches the language's natural spelling of + * the punctuation of either the full stop or comma.</td> + * </tr> + * <tr> + * <td>Inf:</td> + * <td>The rule for infinity.</td> + * </tr> + * <tr> + * <td>NaN:</td> + * <td>The rule for an IEEE 754 NaN (not a number).</td> + * </tr> + * <tr> + * <tr> + * <td><em>nothing</em></td> + * <td>If the rule's rule descriptor is left out, the base value is one plus the + * preceding rule's base value (or zero if this is the first rule in the list) in a normal + * rule set.  In a fraction rule set, the base value is the same as the preceding rule's + * base value.</td> + * </tr> + * </table> + * + * <p>A rule set may be either a regular rule set or a <em>fraction rule set,</em> depending + * on whether it is used to format a number's integral part (or the whole number) or a + * number's fractional part. Using a rule set to format a rule's fractional part makes it a + * fraction rule set.</p> + * + * <p>Which rule is used to format a number is defined according to one of the following + * algorithms: If the rule set is a regular rule set, do the following: + * + * <ul> + * <li>If the rule set includes a master rule (and the number was passed in as a <tt>double</tt>), + * use the master rule.  (If the number being formatted was passed in as a <tt>long</tt>, + * the master rule is ignored.)</li> + * <li>If the number is negative, use the negative-number rule.</li> + * <li>If the number has a fractional part and is greater than 1, use the improper fraction + * rule.</li> + * <li>If the number has a fractional part and is between 0 and 1, use the proper fraction + * rule.</li> + * <li>Binary-search the rule list for the rule with the highest base value less than or equal + * to the number. If that rule has two substitutions, its base value is not an even multiple + * of its divisor, and the number <em>is</em> an even multiple of the rule's divisor, use the + * rule that precedes it in the rule list. Otherwise, use the rule itself.</li> + * </ul> + * + * <p>If the rule set is a fraction rule set, do the following: + * + * <ul> + * <li>Ignore negative-number and fraction rules.</li> + * <li>For each rule in the list, multiply the number being formatted (which will always be + * between 0 and 1) by the rule's base value. Keep track of the distance between the result + * the nearest integer.</li> + * <li>Use the rule that produced the result closest to zero in the above calculation. In the + * event of a tie or a direct hit, use the first matching rule encountered. (The idea here is + * to try each rule's base value as a possible denominator of a fraction. Whichever + * denominator produces the fraction closest in value to the number being formatted wins.) If + * the rule following the matching rule has the same base value, use it if the numerator of + * the fraction is anything other than 1; if the numerator is 1, use the original matching + * rule. (This is to allow singular and plural forms of the rule text without a lot of extra + * hassle.)</li> + * </ul> + * + * <p>A rule's body consists of a string of characters terminated by a semicolon. The rule + * may include zero, one, or two <em>substitution tokens,</em> and a range of text in + * brackets. The brackets denote optional text (and may also include one or both + * substitutions). The exact meanings of the substitution tokens, and under what conditions + * optional text is omitted, depend on the syntax of the substitution token and the context. + * The rest of the text in a rule body is literal text that is output when the rule matches + * the number being formatted.</p> + * + * <p>A substitution token begins and ends with a <em>token character.</em> The token + * character and the context together specify a mathematical operation to be performed on the + * number being formatted. An optional <em>substitution descriptor </em>specifies how the + * value resulting from that operation is used to fill in the substitution. The position of + * the substitution token in the rule body specifies the location of the resultant text in + * the original rule text.</p> + * + * <p>The meanings of the substitution token characters are as follows:</p> + * + * <table border="0" width="100%"> + * <tr> + * <td>>></td> + * <td>in normal rule</td> + * <td>Divide the number by the rule's divisor and format the remainder</td> + * </tr> + * <tr> + * <td></td> + * <td>in negative-number rule</td> + * <td>Find the absolute value of the number and format the result</td> + * </tr> + * <tr> + * <td></td> + * <td>in fraction or master rule</td> + * <td>Isolate the number's fractional part and format it.</td> + * </tr> + * <tr> + * <td></td> + * <td>in rule in fraction rule set</td> + * <td>Not allowed.</td> + * </tr> + * <tr> + * <td>>>></td> + * <td>in normal rule</td> + * <td>Divide the number by the rule's divisor and format the remainder, + * but bypass the normal rule-selection process and just use the + * rule that precedes this one in this rule list.</td> + * </tr> + * <tr> + * <td></td> + * <td>in all other rules</td> + * <td>Not allowed.</td> + * </tr> + * <tr> + * <td><<</td> + * <td>in normal rule</td> + * <td>Divide the number by the rule's divisor and format the quotient</td> + * </tr> + * <tr> + * <td></td> + * <td>in negative-number rule</td> + * <td>Not allowed.</td> + * </tr> + * <tr> + * <td></td> + * <td>in fraction or master rule</td> + * <td>Isolate the number's integral part and format it.</td> + * </tr> + * <tr> + * <td></td> + * <td>in rule in fraction rule set</td> + * <td>Multiply the number by the rule's base value and format the result.</td> + * </tr> + * <tr> + * <td>==</td> + * <td>in all rule sets</td> + * <td>Format the number unchanged</td> + * </tr> + * <tr> + * <td>[]</td> + * <td>in normal rule</td> + * <td>Omit the optional text if the number is an even multiple of the rule's divisor</td> + * </tr> + * <tr> + * <td></td> + * <td>in negative-number rule</td> + * <td>Not allowed.</td> + * </tr> + * <tr> + * <td></td> + * <td>in improper-fraction rule</td> + * <td>Omit the optional text if the number is between 0 and 1 (same as specifying both an + * x.x rule and a 0.x rule)</td> + * </tr> + * <tr> + * <td></td> + * <td>in master rule</td> + * <td>Omit the optional text if the number is an integer (same as specifying both an x.x + * rule and an x.0 rule)</td> + * </tr> + * <tr> + * <td></td> + * <td>in proper-fraction rule</td> + * <td>Not allowed.</td> + * </tr> + * <tr> + * <td></td> + * <td>in rule in fraction rule set</td> + * <td>Omit the optional text if multiplying the number by the rule's base value yields 1.</td> + * </tr> + * <tr> + * <td width="37">$(cardinal,<i>plural syntax</i>)$</td> + * <td width="23"></td> + * <td width="165" valign="top">in all rule sets</td> + * <td>This provides the ability to choose a word based on the number divided by the radix to the power of the + * exponent of the base value for the specified locale, which is normally equivalent to the << value. + * This uses the cardinal plural rules from PluralFormat. All strings used in the plural format are treated + * as the same base value for parsing.</td> + * </tr> + * <tr> + * <td width="37">$(ordinal,<i>plural syntax</i>)$</td> + * <td width="23"></td> + * <td width="165" valign="top">in all rule sets</td> + * <td>This provides the ability to choose a word based on the number divided by the radix to the power of the + * exponent of the base value for the specified locale, which is normally equivalent to the << value. + * This uses the ordinal plural rules from PluralFormat. All strings used in the plural format are treated + * as the same base value for parsing.</td> + * </tr> + * </table> + * + * <p>The substitution descriptor (i.e., the text between the token characters) may take one + * of three forms:</p> + * + * <table border="0" width="100%"> + * <tr> + * <td>a rule set name</td> + * <td>Perform the mathematical operation on the number, and format the result using the + * named rule set.</td> + * </tr> + * <tr> + * <td>a DecimalFormat pattern</td> + * <td>Perform the mathematical operation on the number, and format the result using a + * DecimalFormat with the specified pattern.  The pattern must begin with 0 or #.</td> + * </tr> + * <tr> + * <td>nothing</td> + * <td>Perform the mathematical operation on the number, and format the result using the rule + * set containing the current rule, except: + * <ul> + * <li>You can't have an empty substitution descriptor with a == substitution.</li> + * <li>If you omit the substitution descriptor in a >> substitution in a fraction rule, + * format the result one digit at a time using the rule set containing the current rule.</li> + * <li>If you omit the substitution descriptor in a << substitution in a rule in a + * fraction rule set, format the result using the default rule set for this formatter.</li> + * </ul> + * </td> + * </tr> + * </table> + * + * <p>Whitespace is ignored between a rule set name and a rule set body, between a rule + * descriptor and a rule body, or between rules. If a rule body begins with an apostrophe, + * the apostrophe is ignored, but all text after it becomes significant (this is how you can + * have a rule's rule text begin with whitespace). There is no escape function: the semicolon + * is not allowed in rule set names or in rule text, and the colon is not allowed in rule set + * names. The characters beginning a substitution token are always treated as the beginning + * of a substitution token.</p> + * + * <p>See the resource data and the demo program for annotated examples of real rule sets + * using these features.</p> + * + * <p><em>User subclasses are not supported.</em> While clients may write + * subclasses, such code will not necessarily work and will not be + * guaranteed to work stably from release to release. + * + * <p><b>Localizations</b></p> + * <p>Constructors are available that allow the specification of localizations for the + * public rule sets (and also allow more control over what public rule sets are available). + * Localization data is represented as a textual description. The description represents + * an array of arrays of string. The first element is an array of the public rule set names, + * each of these must be one of the public rule set names that appear in the rules. Only + * names in this array will be treated as public rule set names by the API. Each subsequent + * element is an array of localizations of these names. The first element of one of these + * subarrays is the locale name, and the remaining elements are localizations of the + * public rule set names, in the same order as they were listed in the first arrray.</p> + * <p>In the syntax, angle brackets '<', '>' are used to delimit the arrays, and comma ',' is used + * to separate elements of an array. Whitespace is ignored, unless quoted.</p> + * <p>For example:<pre> + * < < %foo, %bar, %baz >, + * < en, Foo, Bar, Baz >, + * < fr, 'le Foo', 'le Bar', 'le Baz' > + * < zh, \\u7532, \\u4e59, \\u4e19 > > + * </pre></p> + * @author Richard Gillam + * @see NumberFormat + * @see DecimalFormat + * @see PluralFormat + * @see PluralRules + * @stable ICU 2.0 + */ +class U_I18N_API RuleBasedNumberFormat : public NumberFormat { +public: + + //----------------------------------------------------------------------- + // constructors + //----------------------------------------------------------------------- + + /** + * Creates a RuleBasedNumberFormat that behaves according to the description + * passed in. The formatter uses the default locale. + * @param rules A description of the formatter's desired behavior. + * See the class documentation for a complete explanation of the description + * syntax. + * @param perror The parse error if an error was encountered. + * @param status The status indicating whether the constructor succeeded. + * @stable ICU 3.2 + */ + RuleBasedNumberFormat(const UnicodeString& rules, UParseError& perror, UErrorCode& status); + + /** + * Creates a RuleBasedNumberFormat that behaves according to the description + * passed in. The formatter uses the default locale. + * <p> + * The localizations data provides information about the public + * rule sets and their localized display names for different + * locales. The first element in the list is an array of the names + * of the public rule sets. The first element in this array is + * the initial default ruleset. The remaining elements in the + * list are arrays of localizations of the names of the public + * rule sets. Each of these is one longer than the initial array, + * with the first String being the ULocale ID, and the remaining + * Strings being the localizations of the rule set names, in the + * same order as the initial array. Arrays are NULL-terminated. + * @param rules A description of the formatter's desired behavior. + * See the class documentation for a complete explanation of the description + * syntax. + * @param localizations the localization information. + * names in the description. These will be copied by the constructor. + * @param perror The parse error if an error was encountered. + * @param status The status indicating whether the constructor succeeded. + * @stable ICU 3.2 + */ + RuleBasedNumberFormat(const UnicodeString& rules, const UnicodeString& localizations, + UParseError& perror, UErrorCode& status); + + /** + * Creates a RuleBasedNumberFormat that behaves according to the rules + * passed in. The formatter uses the specified locale to determine the + * characters to use when formatting numerals, and to define equivalences + * for lenient parsing. + * @param rules The formatter rules. + * See the class documentation for a complete explanation of the rule + * syntax. + * @param locale A locale that governs which characters are used for + * formatting values in numerals and which characters are equivalent in + * lenient parsing. + * @param perror The parse error if an error was encountered. + * @param status The status indicating whether the constructor succeeded. + * @stable ICU 2.0 + */ + RuleBasedNumberFormat(const UnicodeString& rules, const Locale& locale, + UParseError& perror, UErrorCode& status); + + /** + * Creates a RuleBasedNumberFormat that behaves according to the description + * passed in. The formatter uses the default locale. + * <p> + * The localizations data provides information about the public + * rule sets and their localized display names for different + * locales. The first element in the list is an array of the names + * of the public rule sets. The first element in this array is + * the initial default ruleset. The remaining elements in the + * list are arrays of localizations of the names of the public + * rule sets. Each of these is one longer than the initial array, + * with the first String being the ULocale ID, and the remaining + * Strings being the localizations of the rule set names, in the + * same order as the initial array. Arrays are NULL-terminated. + * @param rules A description of the formatter's desired behavior. + * See the class documentation for a complete explanation of the description + * syntax. + * @param localizations a list of localizations for the rule set + * names in the description. These will be copied by the constructor. + * @param locale A locale that governs which characters are used for + * formatting values in numerals and which characters are equivalent in + * lenient parsing. + * @param perror The parse error if an error was encountered. + * @param status The status indicating whether the constructor succeeded. + * @stable ICU 3.2 + */ + RuleBasedNumberFormat(const UnicodeString& rules, const UnicodeString& localizations, + const Locale& locale, UParseError& perror, UErrorCode& status); + + /** + * Creates a RuleBasedNumberFormat from a predefined ruleset. The selector + * code choosed among three possible predefined formats: spellout, ordinal, + * and duration. + * @param tag A selector code specifying which kind of formatter to create for that + * locale. There are four legal values: URBNF_SPELLOUT, which creates a formatter that + * spells out a value in words in the desired language, URBNF_ORDINAL, which attaches + * an ordinal suffix from the desired language to the end of a number (e.g. "123rd"), + * URBNF_DURATION, which formats a duration in seconds as hours, minutes, and seconds always rounding down, + * and URBNF_NUMBERING_SYSTEM, which is used to invoke rules for alternate numbering + * systems such as the Hebrew numbering system, or for Roman Numerals, etc. + * @param locale The locale for the formatter. + * @param status The status indicating whether the constructor succeeded. + * @stable ICU 2.0 + */ + RuleBasedNumberFormat(URBNFRuleSetTag tag, const Locale& locale, UErrorCode& status); + + //----------------------------------------------------------------------- + // boilerplate + //----------------------------------------------------------------------- + + /** + * Copy constructor + * @param rhs the object to be copied from. + * @stable ICU 2.6 + */ + RuleBasedNumberFormat(const RuleBasedNumberFormat& rhs); + + /** + * Assignment operator + * @param rhs the object to be copied from. + * @stable ICU 2.6 + */ + RuleBasedNumberFormat& operator=(const RuleBasedNumberFormat& rhs); + + /** + * Release memory allocated for a RuleBasedNumberFormat when you are finished with it. + * @stable ICU 2.6 + */ + virtual ~RuleBasedNumberFormat(); + + /** + * Clone this object polymorphically. The caller is responsible + * for deleting the result when done. + * @return A copy of the object. + * @stable ICU 2.6 + */ + virtual Format* clone(void) const; + + /** + * Return true if the given Format objects are semantically equal. + * Objects of different subclasses are considered unequal. + * @param other the object to be compared with. + * @return true if the given Format objects are semantically equal. + * @stable ICU 2.6 + */ + virtual UBool operator==(const Format& other) const; + +//----------------------------------------------------------------------- +// public API functions +//----------------------------------------------------------------------- + + /** + * return the rules that were provided to the RuleBasedNumberFormat. + * @return the result String that was passed in + * @stable ICU 2.0 + */ + virtual UnicodeString getRules() const; + + /** + * Return the number of public rule set names. + * @return the number of public rule set names. + * @stable ICU 2.0 + */ + virtual int32_t getNumberOfRuleSetNames() const; + + /** + * Return the name of the index'th public ruleSet. If index is not valid, + * the function returns null. + * @param index the index of the ruleset + * @return the name of the index'th public ruleSet. + * @stable ICU 2.0 + */ + virtual UnicodeString getRuleSetName(int32_t index) const; + + /** + * Return the number of locales for which we have localized rule set display names. + * @return the number of locales for which we have localized rule set display names. + * @stable ICU 3.2 + */ + virtual int32_t getNumberOfRuleSetDisplayNameLocales(void) const; + + /** + * Return the index'th display name locale. + * @param index the index of the locale + * @param status set to a failure code when this function fails + * @return the locale + * @see #getNumberOfRuleSetDisplayNameLocales + * @stable ICU 3.2 + */ + virtual Locale getRuleSetDisplayNameLocale(int32_t index, UErrorCode& status) const; + + /** + * Return the rule set display names for the provided locale. These are in the same order + * as those returned by getRuleSetName. The locale is matched against the locales for + * which there is display name data, using normal fallback rules. If no locale matches, + * the default display names are returned. (These are the internal rule set names minus + * the leading '%'.) + * @param index the index of the rule set + * @param locale the locale (returned by getRuleSetDisplayNameLocales) for which the localized + * display name is desired + * @return the display name for the given index, which might be bogus if there is an error + * @see #getRuleSetName + * @stable ICU 3.2 + */ + virtual UnicodeString getRuleSetDisplayName(int32_t index, + const Locale& locale = Locale::getDefault()); + + /** + * Return the rule set display name for the provided rule set and locale. + * The locale is matched against the locales for which there is display name data, using + * normal fallback rules. If no locale matches, the default display name is returned. + * @return the display name for the rule set + * @stable ICU 3.2 + * @see #getRuleSetDisplayName + */ + virtual UnicodeString getRuleSetDisplayName(const UnicodeString& ruleSetName, + const Locale& locale = Locale::getDefault()); + + + using NumberFormat::format; + + /** + * Formats the specified 32-bit number using the default ruleset. + * @param number The number to format. + * @param toAppendTo the string that will hold the (appended) result + * @param pos the fieldposition + * @return A textual representation of the number. + * @stable ICU 2.0 + */ + virtual UnicodeString& format(int32_t number, + UnicodeString& toAppendTo, + FieldPosition& pos) const; + + /** + * Formats the specified 64-bit number using the default ruleset. + * @param number The number to format. + * @param toAppendTo the string that will hold the (appended) result + * @param pos the fieldposition + * @return A textual representation of the number. + * @stable ICU 2.1 + */ + virtual UnicodeString& format(int64_t number, + UnicodeString& toAppendTo, + FieldPosition& pos) const; + /** + * Formats the specified number using the default ruleset. + * @param number The number to format. + * @param toAppendTo the string that will hold the (appended) result + * @param pos the fieldposition + * @return A textual representation of the number. + * @stable ICU 2.0 + */ + virtual UnicodeString& format(double number, + UnicodeString& toAppendTo, + FieldPosition& pos) const; + + /** + * Formats the specified number using the named ruleset. + * @param number The number to format. + * @param ruleSetName The name of the rule set to format the number with. + * This must be the name of a valid public rule set for this formatter. + * @param toAppendTo the string that will hold the (appended) result + * @param pos the fieldposition + * @param status the status + * @return A textual representation of the number. + * @stable ICU 2.0 + */ + virtual UnicodeString& format(int32_t number, + const UnicodeString& ruleSetName, + UnicodeString& toAppendTo, + FieldPosition& pos, + UErrorCode& status) const; + /** + * Formats the specified 64-bit number using the named ruleset. + * @param number The number to format. + * @param ruleSetName The name of the rule set to format the number with. + * This must be the name of a valid public rule set for this formatter. + * @param toAppendTo the string that will hold the (appended) result + * @param pos the fieldposition + * @param status the status + * @return A textual representation of the number. + * @stable ICU 2.1 + */ + virtual UnicodeString& format(int64_t number, + const UnicodeString& ruleSetName, + UnicodeString& toAppendTo, + FieldPosition& pos, + UErrorCode& status) const; + /** + * Formats the specified number using the named ruleset. + * @param number The number to format. + * @param ruleSetName The name of the rule set to format the number with. + * This must be the name of a valid public rule set for this formatter. + * @param toAppendTo the string that will hold the (appended) result + * @param pos the fieldposition + * @param status the status + * @return A textual representation of the number. + * @stable ICU 2.0 + */ + virtual UnicodeString& format(double number, + const UnicodeString& ruleSetName, + UnicodeString& toAppendTo, + FieldPosition& pos, + UErrorCode& status) const; + +protected: + /** + * Format a decimal number. + * The number is a DigitList wrapper onto a floating point decimal number. + * The default implementation in NumberFormat converts the decimal number + * to a double and formats that. Subclasses of NumberFormat that want + * to specifically handle big decimal numbers must override this method. + * class DecimalFormat does so. + * + * @param number The number, a DigitList format Decimal Floating Point. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(const DigitList &number, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + + /** + * Format a decimal number. + * The number is a DigitList wrapper onto a floating point decimal number. + * The default implementation in NumberFormat converts the decimal number + * to a double and formats that. Subclasses of NumberFormat that want + * to specifically handle big decimal numbers must override this method. + * class DecimalFormat does so. + * + * @param number The number, a DigitList format Decimal Floating Point. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @internal + */ + virtual UnicodeString& format(const DigitList &number, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& status) const; +public: + + using NumberFormat::parse; + + /** + * Parses the specfied string, beginning at the specified position, according + * to this formatter's rules. This will match the string against all of the + * formatter's public rule sets and return the value corresponding to the longest + * parseable substring. This function's behavior is affected by the lenient + * parse mode. + * @param text The string to parse + * @param result the result of the parse, either a double or a long. + * @param parsePosition On entry, contains the position of the first character + * in "text" to examine. On exit, has been updated to contain the position + * of the first character in "text" that wasn't consumed by the parse. + * @see #setLenient + * @stable ICU 2.0 + */ + virtual void parse(const UnicodeString& text, + Formattable& result, + ParsePosition& parsePosition) const; + +#if !UCONFIG_NO_COLLATION + + /** + * Turns lenient parse mode on and off. + * + * When in lenient parse mode, the formatter uses a Collator for parsing the text. + * Only primary differences are treated as significant. This means that case + * differences, accent differences, alternate spellings of the same letter + * (e.g., ae and a-umlaut in German), ignorable characters, etc. are ignored in + * matching the text. In many cases, numerals will be accepted in place of words + * or phrases as well. + * + * For example, all of the following will correctly parse as 255 in English in + * lenient-parse mode: + * <br>"two hundred fifty-five" + * <br>"two hundred fifty five" + * <br>"TWO HUNDRED FIFTY-FIVE" + * <br>"twohundredfiftyfive" + * <br>"2 hundred fifty-5" + * + * The Collator used is determined by the locale that was + * passed to this object on construction. The description passed to this object + * on construction may supply additional collation rules that are appended to the + * end of the default collator for the locale, enabling additional equivalences + * (such as adding more ignorable characters or permitting spelled-out version of + * symbols; see the demo program for examples). + * + * It's important to emphasize that even strict parsing is relatively lenient: it + * will accept some text that it won't produce as output. In English, for example, + * it will correctly parse "two hundred zero" and "fifteen hundred". + * + * @param enabled If true, turns lenient-parse mode on; if false, turns it off. + * @see RuleBasedCollator + * @stable ICU 2.0 + */ + virtual void setLenient(UBool enabled); + + /** + * Returns true if lenient-parse mode is turned on. Lenient parsing is off + * by default. + * @return true if lenient-parse mode is turned on. + * @see #setLenient + * @stable ICU 2.0 + */ + virtual inline UBool isLenient(void) const; + +#endif + + /** + * Override the default rule set to use. If ruleSetName is null, reset + * to the initial default rule set. If the rule set is not a public rule set name, + * U_ILLEGAL_ARGUMENT_ERROR is returned in status. + * @param ruleSetName the name of the rule set, or null to reset the initial default. + * @param status set to failure code when a problem occurs. + * @stable ICU 2.6 + */ + virtual void setDefaultRuleSet(const UnicodeString& ruleSetName, UErrorCode& status); + + /** + * Return the name of the current default rule set. If the current rule set is + * not public, returns a bogus (and empty) UnicodeString. + * @return the name of the current default rule set + * @stable ICU 3.0 + */ + virtual UnicodeString getDefaultRuleSetName() const; + + /** + * Set a particular UDisplayContext value in the formatter, such as + * UDISPCTX_CAPITALIZATION_FOR_STANDALONE. Note: For getContext, see + * NumberFormat. + * @param value The UDisplayContext value to set. + * @param status Input/output status. If at entry this indicates a failure + * status, the function will do nothing; otherwise this will be + * updated with any new status from the function. + * @stable ICU 53 + */ + virtual void setContext(UDisplayContext value, UErrorCode& status); + + /** + * Get the rounding mode. + * @return A rounding mode + * @draft ICU 60 + */ + virtual ERoundingMode getRoundingMode(void) const; + + /** + * Set the rounding mode. + * @param roundingMode A rounding mode + * @draft ICU 60 + */ + virtual void setRoundingMode(ERoundingMode roundingMode); + +public: + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.8 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.8 + */ + virtual UClassID getDynamicClassID(void) const; + + /** + * Sets the decimal format symbols, which is generally not changed + * by the programmer or user. The formatter takes ownership of + * symbolsToAdopt; the client must not delete it. + * + * @param symbolsToAdopt DecimalFormatSymbols to be adopted. + * @stable ICU 49 + */ + virtual void adoptDecimalFormatSymbols(DecimalFormatSymbols* symbolsToAdopt); + + /** + * Sets the decimal format symbols, which is generally not changed + * by the programmer or user. A clone of the symbols is created and + * the symbols is _not_ adopted; the client is still responsible for + * deleting it. + * + * @param symbols DecimalFormatSymbols. + * @stable ICU 49 + */ + virtual void setDecimalFormatSymbols(const DecimalFormatSymbols& symbols); + +private: + RuleBasedNumberFormat(); // default constructor not implemented + + // this will ref the localizations if they are not NULL + // caller must deref to get adoption + RuleBasedNumberFormat(const UnicodeString& description, LocalizationInfo* localizations, + const Locale& locale, UParseError& perror, UErrorCode& status); + + void init(const UnicodeString& rules, LocalizationInfo* localizations, UParseError& perror, UErrorCode& status); + void initCapitalizationContextInfo(const Locale& thelocale); + void dispose(); + void stripWhitespace(UnicodeString& src); + void initDefaultRuleSet(); + NFRuleSet* findRuleSet(const UnicodeString& name, UErrorCode& status) const; + + /* friend access */ + friend class NFSubstitution; + friend class NFRule; + friend class NFRuleSet; + friend class FractionalPartSubstitution; + + inline NFRuleSet * getDefaultRuleSet() const; + const RuleBasedCollator * getCollator() const; + DecimalFormatSymbols * initializeDecimalFormatSymbols(UErrorCode &status); + const DecimalFormatSymbols * getDecimalFormatSymbols() const; + NFRule * initializeDefaultInfinityRule(UErrorCode &status); + const NFRule * getDefaultInfinityRule() const; + NFRule * initializeDefaultNaNRule(UErrorCode &status); + const NFRule * getDefaultNaNRule() const; + PluralFormat *createPluralFormat(UPluralType pluralType, const UnicodeString &pattern, UErrorCode& status) const; + UnicodeString& adjustForCapitalizationContext(int32_t startPos, UnicodeString& currentResult, UErrorCode& status) const; + UnicodeString& format(int64_t number, NFRuleSet *ruleSet, UnicodeString& toAppendTo, UErrorCode& status) const; + void format(double number, NFRuleSet& rs, UnicodeString& toAppendTo, UErrorCode& status) const; + +private: + NFRuleSet **ruleSets; + UnicodeString* ruleSetDescriptions; + int32_t numRuleSets; + NFRuleSet *defaultRuleSet; + Locale locale; + RuleBasedCollator* collator; + DecimalFormatSymbols* decimalFormatSymbols; + NFRule *defaultInfinityRule; + NFRule *defaultNaNRule; + ERoundingMode roundingMode; + UBool lenient; + UnicodeString* lenientParseRules; + LocalizationInfo* localizations; + UnicodeString originalDescription; + UBool capitalizationInfoSet; + UBool capitalizationForUIListMenu; + UBool capitalizationForStandAlone; + BreakIterator* capitalizationBrkIter; +}; + +// --------------- + +#if !UCONFIG_NO_COLLATION + +inline UBool +RuleBasedNumberFormat::isLenient(void) const { + return lenient; +} + +#endif + +inline NFRuleSet* +RuleBasedNumberFormat::getDefaultRuleSet() const { + return defaultRuleSet; +} + +U_NAMESPACE_END + +/* U_HAVE_RBNF */ +#endif + +/* RBNF_H */ +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/rbtz.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/rbtz.h new file mode 100755 index 00000000..6d652f69 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/rbtz.h @@ -0,0 +1,364 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2007-2013, International Business Machines Corporation and * +* others. All Rights Reserved. * +******************************************************************************* +*/ +#ifndef RBTZ_H +#define RBTZ_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Rule based customizable time zone + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/basictz.h" +#include "unicode/unistr.h" + +U_NAMESPACE_BEGIN + +// forward declaration +class UVector; +struct Transition; + +/** + * a BasicTimeZone subclass implemented in terms of InitialTimeZoneRule and TimeZoneRule instances + * @see BasicTimeZone + * @see InitialTimeZoneRule + * @see TimeZoneRule + */ +class U_I18N_API RuleBasedTimeZone : public BasicTimeZone { +public: + /** + * Constructs a <code>RuleBasedTimeZone</code> object with the ID and the + * <code>InitialTimeZoneRule</code>. The input <code>InitialTimeZoneRule</code> + * is adopted by this <code>RuleBasedTimeZone</code>, thus the caller must not + * delete it. + * @param id The time zone ID. + * @param initialRule The initial time zone rule. + * @stable ICU 3.8 + */ + RuleBasedTimeZone(const UnicodeString& id, InitialTimeZoneRule* initialRule); + + /** + * Copy constructor. + * @param source The RuleBasedTimeZone object to be copied. + * @stable ICU 3.8 + */ + RuleBasedTimeZone(const RuleBasedTimeZone& source); + + /** + * Destructor. + * @stable ICU 3.8 + */ + virtual ~RuleBasedTimeZone(); + + /** + * Assignment operator. + * @param right The object to be copied. + * @stable ICU 3.8 + */ + RuleBasedTimeZone& operator=(const RuleBasedTimeZone& right); + + /** + * Return true if the given <code>TimeZone</code> objects are + * semantically equal. Objects of different subclasses are considered unequal. + * @param that The object to be compared with. + * @return true if the given <code>TimeZone</code> objects are + *semantically equal. + * @stable ICU 3.8 + */ + virtual UBool operator==(const TimeZone& that) const; + + /** + * Return true if the given <code>TimeZone</code> objects are + * semantically unequal. Objects of different subclasses are considered unequal. + * @param that The object to be compared with. + * @return true if the given <code>TimeZone</code> objects are + * semantically unequal. + * @stable ICU 3.8 + */ + virtual UBool operator!=(const TimeZone& that) const; + + /** + * Adds the <code>TimeZoneRule</code> which represents time transitions. + * The <code>TimeZoneRule</code> must have start times, that is, the result + * of isTransitionRule() must be true. Otherwise, U_ILLEGAL_ARGUMENT_ERROR + * is set to the error code. + * The input <code>TimeZoneRule</code> is adopted by this + * <code>RuleBasedTimeZone</code> on successful completion of this method, + * thus, the caller must not delete it when no error is returned. + * After all rules are added, the caller must call complete() method to + * make this <code>RuleBasedTimeZone</code> ready to handle common time + * zone functions. + * @param rule The <code>TimeZoneRule</code>. + * @param status Output param to filled in with a success or an error. + * @stable ICU 3.8 + */ + void addTransitionRule(TimeZoneRule* rule, UErrorCode& status); + + /** + * Makes the <code>TimeZoneRule</code> ready to handle actual timezone + * calcuation APIs. This method collects time zone rules specified + * by the caller via the constructor and addTransitionRule() and + * builds internal structure for making the object ready to support + * time zone APIs such as getOffset(), getNextTransition() and others. + * @param status Output param to filled in with a success or an error. + * @stable ICU 3.8 + */ + void complete(UErrorCode& status); + + /** + * Clones TimeZone objects polymorphically. Clients are responsible for deleting + * the TimeZone object cloned. + * + * @return A new copy of this TimeZone object. + * @stable ICU 3.8 + */ + virtual TimeZone* clone(void) const; + + /** + * Returns the TimeZone's adjusted GMT offset (i.e., the number of milliseconds to add + * to GMT to get local time in this time zone, taking daylight savings time into + * account) as of a particular reference date. The reference date is used to determine + * whether daylight savings time is in effect and needs to be figured into the offset + * that is returned (in other words, what is the adjusted GMT offset in this time zone + * at this particular date and time?). For the time zones produced by createTimeZone(), + * the reference data is specified according to the Gregorian calendar, and the date + * and time fields are local standard time. + * + * <p>Note: Don't call this method. Instead, call the getOffset(UDate...) overload, + * which returns both the raw and the DST offset for a given time. This method + * is retained only for backward compatibility. + * + * @param era The reference date's era + * @param year The reference date's year + * @param month The reference date's month (0-based; 0 is January) + * @param day The reference date's day-in-month (1-based) + * @param dayOfWeek The reference date's day-of-week (1-based; 1 is Sunday) + * @param millis The reference date's milliseconds in day, local standard time + * @param status Output param to filled in with a success or an error. + * @return The offset in milliseconds to add to GMT to get local time. + * @stable ICU 3.8 + */ + virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, + uint8_t dayOfWeek, int32_t millis, UErrorCode& status) const; + + /** + * Gets the time zone offset, for current date, modified in case of + * daylight savings. This is the offset to add *to* UTC to get local time. + * + * <p>Note: Don't call this method. Instead, call the getOffset(UDate...) overload, + * which returns both the raw and the DST offset for a given time. This method + * is retained only for backward compatibility. + * + * @param era The reference date's era + * @param year The reference date's year + * @param month The reference date's month (0-based; 0 is January) + * @param day The reference date's day-in-month (1-based) + * @param dayOfWeek The reference date's day-of-week (1-based; 1 is Sunday) + * @param millis The reference date's milliseconds in day, local standard time + * @param monthLength The length of the given month in days. + * @param status Output param to filled in with a success or an error. + * @return The offset in milliseconds to add to GMT to get local time. + * @stable ICU 3.8 + */ + virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, + uint8_t dayOfWeek, int32_t millis, + int32_t monthLength, UErrorCode& status) const; + + /** + * Returns the time zone raw and GMT offset for the given moment + * in time. Upon return, local-millis = GMT-millis + rawOffset + + * dstOffset. All computations are performed in the proleptic + * Gregorian calendar. The default implementation in the TimeZone + * class delegates to the 8-argument getOffset(). + * + * @param date moment in time for which to return offsets, in + * units of milliseconds from January 1, 1970 0:00 GMT, either GMT + * time or local wall time, depending on `local'. + * @param local if true, `date' is local wall time; otherwise it + * is in GMT time. + * @param rawOffset output parameter to receive the raw offset, that + * is, the offset not including DST adjustments + * @param dstOffset output parameter to receive the DST offset, + * that is, the offset to be added to `rawOffset' to obtain the + * total offset between local and GMT time. If DST is not in + * effect, this value is zero; otherwise it is a positive value, + * typically one hour. + * @param ec input-output error code + * @stable ICU 3.8 + */ + virtual void getOffset(UDate date, UBool local, int32_t& rawOffset, + int32_t& dstOffset, UErrorCode& ec) const; + + /** + * Sets the TimeZone's raw GMT offset (i.e., the number of milliseconds to add + * to GMT to get local time, before taking daylight savings time into account). + * + * @param offsetMillis The new raw GMT offset for this time zone. + * @stable ICU 3.8 + */ + virtual void setRawOffset(int32_t offsetMillis); + + /** + * Returns the TimeZone's raw GMT offset (i.e., the number of milliseconds to add + * to GMT to get local time, before taking daylight savings time into account). + * + * @return The TimeZone's raw GMT offset. + * @stable ICU 3.8 + */ + virtual int32_t getRawOffset(void) const; + + /** + * Queries if this time zone uses daylight savings time. + * @return true if this time zone uses daylight savings time, + * false, otherwise. + * @stable ICU 3.8 + */ + virtual UBool useDaylightTime(void) const; + + /** + * Queries if the given date is in daylight savings time in + * this time zone. + * This method is wasteful since it creates a new GregorianCalendar and + * deletes it each time it is called. This is a deprecated method + * and provided only for Java compatibility. + * + * @param date the given UDate. + * @param status Output param filled in with success/error code. + * @return true if the given date is in daylight savings time, + * false, otherwise. + * @deprecated ICU 2.4. Use Calendar::inDaylightTime() instead. + */ + virtual UBool inDaylightTime(UDate date, UErrorCode& status) const; + + /** + * Returns true if this zone has the same rule and offset as another zone. + * That is, if this zone differs only in ID, if at all. + * @param other the <code>TimeZone</code> object to be compared with + * @return true if the given zone is the same as this one, + * with the possible exception of the ID + * @stable ICU 3.8 + */ + virtual UBool hasSameRules(const TimeZone& other) const; + + /** + * Gets the first time zone transition after the base time. + * @param base The base time. + * @param inclusive Whether the base time is inclusive or not. + * @param result Receives the first transition after the base time. + * @return TRUE if the transition is found. + * @stable ICU 3.8 + */ + virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const; + + /** + * Gets the most recent time zone transition before the base time. + * @param base The base time. + * @param inclusive Whether the base time is inclusive or not. + * @param result Receives the most recent transition before the base time. + * @return TRUE if the transition is found. + * @stable ICU 3.8 + */ + virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const; + + /** + * Returns the number of <code>TimeZoneRule</code>s which represents time transitions, + * for this time zone, that is, all <code>TimeZoneRule</code>s for this time zone except + * <code>InitialTimeZoneRule</code>. The return value range is 0 or any positive value. + * @param status Receives error status code. + * @return The number of <code>TimeZoneRule</code>s representing time transitions. + * @stable ICU 3.8 + */ + virtual int32_t countTransitionRules(UErrorCode& status) const; + + /** + * Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZoneRule</code> + * which represent time transitions for this time zone. On successful return, + * the argument initial points to non-NULL <code>InitialTimeZoneRule</code> and + * the array trsrules is filled with 0 or multiple <code>TimeZoneRule</code> + * instances up to the size specified by trscount. The results are referencing the + * rule instance held by this time zone instance. Therefore, after this time zone + * is destructed, they are no longer available. + * @param initial Receives the initial timezone rule + * @param trsrules Receives the timezone transition rules + * @param trscount On input, specify the size of the array 'transitions' receiving + * the timezone transition rules. On output, actual number of + * rules filled in the array will be set. + * @param status Receives error status code. + * @stable ICU 3.8 + */ + virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial, + const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) const; + + /** + * Get time zone offsets from local wall time. + * @internal + */ + virtual void getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt, + int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const; + +private: + void deleteRules(void); + void deleteTransitions(void); + UVector* copyRules(UVector* source); + TimeZoneRule* findRuleInFinal(UDate date, UBool local, + int32_t NonExistingTimeOpt, int32_t DuplicatedTimeOpt) const; + UBool findNext(UDate base, UBool inclusive, UDate& time, TimeZoneRule*& from, TimeZoneRule*& to) const; + UBool findPrev(UDate base, UBool inclusive, UDate& time, TimeZoneRule*& from, TimeZoneRule*& to) const; + int32_t getLocalDelta(int32_t rawBefore, int32_t dstBefore, int32_t rawAfter, int32_t dstAfter, + int32_t NonExistingTimeOpt, int32_t DuplicatedTimeOpt) const; + UDate getTransitionTime(Transition* transition, UBool local, + int32_t NonExistingTimeOpt, int32_t DuplicatedTimeOpt) const; + void getOffsetInternal(UDate date, UBool local, int32_t NonExistingTimeOpt, int32_t DuplicatedTimeOpt, + int32_t& rawOffset, int32_t& dstOffset, UErrorCode& ec) const; + void completeConst(UErrorCode &status) const; + + InitialTimeZoneRule *fInitialRule; + UVector *fHistoricRules; + UVector *fFinalRules; + UVector *fHistoricTransitions; + UBool fUpToDate; + +public: + /** + * Return the class ID for this class. This is useful only for comparing to + * a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . erived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 3.8 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This + * method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() + * methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 3.8 + */ + virtual UClassID getDynamicClassID(void) const; +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // RBTZ_H + +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/regex.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/regex.h new file mode 100755 index 00000000..6829f7ba --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/regex.h @@ -0,0 +1,1885 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 2002-2016, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* file name: regex.h +* encoding: UTF-8 +* indentation:4 +* +* created on: 2002oct22 +* created by: Andy Heninger +* +* ICU Regular Expressions, API for C++ +*/ + +#ifndef REGEX_H +#define REGEX_H + +//#define REGEX_DEBUG + +/** + * \file + * \brief C++ API: Regular Expressions + * + * <h2>Regular Expression API</h2> + * + * <p>The ICU API for processing regular expressions consists of two classes, + * <code>RegexPattern</code> and <code>RegexMatcher</code>. + * <code>RegexPattern</code> objects represent a pre-processed, or compiled + * regular expression. They are created from a regular expression pattern string, + * and can be used to create <code>RegexMatcher</code> objects for the pattern.</p> + * + * <p>Class <code>RegexMatcher</code> bundles together a regular expression + * pattern and a target string to which the search pattern will be applied. + * <code>RegexMatcher</code> includes API for doing plain find or search + * operations, for search and replace operations, and for obtaining detailed + * information about bounds of a match. </p> + * + * <p>Note that by constructing <code>RegexMatcher</code> objects directly from regular + * expression pattern strings application code can be simplified and the explicit + * need for <code>RegexPattern</code> objects can usually be eliminated. + * </p> + */ + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_REGULAR_EXPRESSIONS + +#include "unicode/uobject.h" +#include "unicode/unistr.h" +#include "unicode/utext.h" +#include "unicode/parseerr.h" + +#include "unicode/uregex.h" + +// Forward Declarations + +struct UHashtable; + +U_NAMESPACE_BEGIN + +struct Regex8BitSet; +class RegexCImpl; +class RegexMatcher; +class RegexPattern; +struct REStackFrame; +class RuleBasedBreakIterator; +class UnicodeSet; +class UVector; +class UVector32; +class UVector64; + + +/** + * Class <code>RegexPattern</code> represents a compiled regular expression. It includes + * factory methods for creating a RegexPattern object from the source (string) form + * of a regular expression, methods for creating RegexMatchers that allow the pattern + * to be applied to input text, and a few convenience methods for simple common + * uses of regular expressions. + * + * <p>Class RegexPattern is not intended to be subclassed.</p> + * + * @stable ICU 2.4 + */ +class U_I18N_API RegexPattern U_FINAL : public UObject { +public: + + /** + * default constructor. Create a RegexPattern object that refers to no actual + * pattern. Not normally needed; RegexPattern objects are usually + * created using the factory method <code>compile()</code>. + * + * @stable ICU 2.4 + */ + RegexPattern(); + + /** + * Copy Constructor. Create a new RegexPattern object that is equivalent + * to the source object. + * @param source the pattern object to be copied. + * @stable ICU 2.4 + */ + RegexPattern(const RegexPattern &source); + + /** + * Destructor. Note that a RegexPattern object must persist so long as any + * RegexMatcher objects that were created from the RegexPattern are active. + * @stable ICU 2.4 + */ + virtual ~RegexPattern(); + + /** + * Comparison operator. Two RegexPattern objects are considered equal if they + * were constructed from identical source patterns using the same match flag + * settings. + * @param that a RegexPattern object to compare with "this". + * @return TRUE if the objects are equivalent. + * @stable ICU 2.4 + */ + UBool operator==(const RegexPattern& that) const; + + /** + * Comparison operator. Two RegexPattern objects are considered equal if they + * were constructed from identical source patterns using the same match flag + * settings. + * @param that a RegexPattern object to compare with "this". + * @return TRUE if the objects are different. + * @stable ICU 2.4 + */ + inline UBool operator!=(const RegexPattern& that) const {return ! operator ==(that);} + + /** + * Assignment operator. After assignment, this RegexPattern will behave identically + * to the source object. + * @stable ICU 2.4 + */ + RegexPattern &operator =(const RegexPattern &source); + + /** + * Create an exact copy of this RegexPattern object. Since RegexPattern is not + * intended to be subclassed, <code>clone()</code> and the copy construction are + * equivalent operations. + * @return the copy of this RegexPattern + * @stable ICU 2.4 + */ + virtual RegexPattern *clone() const; + + + /** + * Compiles the regular expression in string form into a RegexPattern + * object. These compile methods, rather than the constructors, are the usual + * way that RegexPattern objects are created. + * + * <p>Note that RegexPattern objects must not be deleted while RegexMatcher + * objects created from the pattern are active. RegexMatchers keep a pointer + * back to their pattern, so premature deletion of the pattern is a + * catastrophic error.</p> + * + * <p>All pattern match mode flags are set to their default values.</p> + * + * <p>Note that it is often more convenient to construct a RegexMatcher directly + * from a pattern string rather than separately compiling the pattern and + * then creating a RegexMatcher object from the pattern.</p> + * + * @param regex The regular expression to be compiled. + * @param pe Receives the position (line and column nubers) of any error + * within the regular expression.) + * @param status A reference to a UErrorCode to receive any errors. + * @return A regexPattern object for the compiled pattern. + * + * @stable ICU 2.4 + */ + static RegexPattern * U_EXPORT2 compile( const UnicodeString ®ex, + UParseError &pe, + UErrorCode &status); + + /** + * Compiles the regular expression in string form into a RegexPattern + * object. These compile methods, rather than the constructors, are the usual + * way that RegexPattern objects are created. + * + * <p>Note that RegexPattern objects must not be deleted while RegexMatcher + * objects created from the pattern are active. RegexMatchers keep a pointer + * back to their pattern, so premature deletion of the pattern is a + * catastrophic error.</p> + * + * <p>All pattern match mode flags are set to their default values.</p> + * + * <p>Note that it is often more convenient to construct a RegexMatcher directly + * from a pattern string rather than separately compiling the pattern and + * then creating a RegexMatcher object from the pattern.</p> + * + * @param regex The regular expression to be compiled. Note, the text referred + * to by this UText must not be deleted during the lifetime of the + * RegexPattern object or any RegexMatcher object created from it. + * @param pe Receives the position (line and column nubers) of any error + * within the regular expression.) + * @param status A reference to a UErrorCode to receive any errors. + * @return A regexPattern object for the compiled pattern. + * + * @stable ICU 4.6 + */ + static RegexPattern * U_EXPORT2 compile( UText *regex, + UParseError &pe, + UErrorCode &status); + + /** + * Compiles the regular expression in string form into a RegexPattern + * object using the specified match mode flags. These compile methods, + * rather than the constructors, are the usual way that RegexPattern objects + * are created. + * + * <p>Note that RegexPattern objects must not be deleted while RegexMatcher + * objects created from the pattern are active. RegexMatchers keep a pointer + * back to their pattern, so premature deletion of the pattern is a + * catastrophic error.</p> + * + * <p>Note that it is often more convenient to construct a RegexMatcher directly + * from a pattern string instead of than separately compiling the pattern and + * then creating a RegexMatcher object from the pattern.</p> + * + * @param regex The regular expression to be compiled. + * @param flags The match mode flags to be used. + * @param pe Receives the position (line and column numbers) of any error + * within the regular expression.) + * @param status A reference to a UErrorCode to receive any errors. + * @return A regexPattern object for the compiled pattern. + * + * @stable ICU 2.4 + */ + static RegexPattern * U_EXPORT2 compile( const UnicodeString ®ex, + uint32_t flags, + UParseError &pe, + UErrorCode &status); + + /** + * Compiles the regular expression in string form into a RegexPattern + * object using the specified match mode flags. These compile methods, + * rather than the constructors, are the usual way that RegexPattern objects + * are created. + * + * <p>Note that RegexPattern objects must not be deleted while RegexMatcher + * objects created from the pattern are active. RegexMatchers keep a pointer + * back to their pattern, so premature deletion of the pattern is a + * catastrophic error.</p> + * + * <p>Note that it is often more convenient to construct a RegexMatcher directly + * from a pattern string instead of than separately compiling the pattern and + * then creating a RegexMatcher object from the pattern.</p> + * + * @param regex The regular expression to be compiled. Note, the text referred + * to by this UText must not be deleted during the lifetime of the + * RegexPattern object or any RegexMatcher object created from it. + * @param flags The match mode flags to be used. + * @param pe Receives the position (line and column numbers) of any error + * within the regular expression.) + * @param status A reference to a UErrorCode to receive any errors. + * @return A regexPattern object for the compiled pattern. + * + * @stable ICU 4.6 + */ + static RegexPattern * U_EXPORT2 compile( UText *regex, + uint32_t flags, + UParseError &pe, + UErrorCode &status); + + /** + * Compiles the regular expression in string form into a RegexPattern + * object using the specified match mode flags. These compile methods, + * rather than the constructors, are the usual way that RegexPattern objects + * are created. + * + * <p>Note that RegexPattern objects must not be deleted while RegexMatcher + * objects created from the pattern are active. RegexMatchers keep a pointer + * back to their pattern, so premature deletion of the pattern is a + * catastrophic error.</p> + * + * <p>Note that it is often more convenient to construct a RegexMatcher directly + * from a pattern string instead of than separately compiling the pattern and + * then creating a RegexMatcher object from the pattern.</p> + * + * @param regex The regular expression to be compiled. + * @param flags The match mode flags to be used. + * @param status A reference to a UErrorCode to receive any errors. + * @return A regexPattern object for the compiled pattern. + * + * @stable ICU 2.6 + */ + static RegexPattern * U_EXPORT2 compile( const UnicodeString ®ex, + uint32_t flags, + UErrorCode &status); + + /** + * Compiles the regular expression in string form into a RegexPattern + * object using the specified match mode flags. These compile methods, + * rather than the constructors, are the usual way that RegexPattern objects + * are created. + * + * <p>Note that RegexPattern objects must not be deleted while RegexMatcher + * objects created from the pattern are active. RegexMatchers keep a pointer + * back to their pattern, so premature deletion of the pattern is a + * catastrophic error.</p> + * + * <p>Note that it is often more convenient to construct a RegexMatcher directly + * from a pattern string instead of than separately compiling the pattern and + * then creating a RegexMatcher object from the pattern.</p> + * + * @param regex The regular expression to be compiled. Note, the text referred + * to by this UText must not be deleted during the lifetime of the + * RegexPattern object or any RegexMatcher object created from it. + * @param flags The match mode flags to be used. + * @param status A reference to a UErrorCode to receive any errors. + * @return A regexPattern object for the compiled pattern. + * + * @stable ICU 4.6 + */ + static RegexPattern * U_EXPORT2 compile( UText *regex, + uint32_t flags, + UErrorCode &status); + + /** + * Get the match mode flags that were used when compiling this pattern. + * @return the match mode flags + * @stable ICU 2.4 + */ + virtual uint32_t flags() const; + + /** + * Creates a RegexMatcher that will match the given input against this pattern. The + * RegexMatcher can then be used to perform match, find or replace operations + * on the input. Note that a RegexPattern object must not be deleted while + * RegexMatchers created from it still exist and might possibly be used again. + * <p> + * The matcher will retain a reference to the supplied input string, and all regexp + * pattern matching operations happen directly on this original string. It is + * critical that the string not be altered or deleted before use by the regular + * expression operations is complete. + * + * @param input The input string to which the regular expression will be applied. + * @param status A reference to a UErrorCode to receive any errors. + * @return A RegexMatcher object for this pattern and input. + * + * @stable ICU 2.4 + */ + virtual RegexMatcher *matcher(const UnicodeString &input, + UErrorCode &status) const; + +private: + /** + * Cause a compilation error if an application accidentally attempts to + * create a matcher with a (char16_t *) string as input rather than + * a UnicodeString. Avoids a dangling reference to a temporary string. + * <p> + * To efficiently work with char16_t *strings, wrap the data in a UnicodeString + * using one of the aliasing constructors, such as + * <code>UnicodeString(UBool isTerminated, const char16_t *text, int32_t textLength);</code> + * or in a UText, using + * <code>utext_openUChars(UText *ut, const char16_t *text, int64_t textLength, UErrorCode *status);</code> + * + */ + RegexMatcher *matcher(const char16_t *input, + UErrorCode &status) const; +public: + + + /** + * Creates a RegexMatcher that will match against this pattern. The + * RegexMatcher can be used to perform match, find or replace operations. + * Note that a RegexPattern object must not be deleted while + * RegexMatchers created from it still exist and might possibly be used again. + * + * @param status A reference to a UErrorCode to receive any errors. + * @return A RegexMatcher object for this pattern and input. + * + * @stable ICU 2.6 + */ + virtual RegexMatcher *matcher(UErrorCode &status) const; + + + /** + * Test whether a string matches a regular expression. This convenience function + * both compiles the regular expression and applies it in a single operation. + * Note that if the same pattern needs to be applied repeatedly, this method will be + * less efficient than creating and reusing a RegexMatcher object. + * + * @param regex The regular expression + * @param input The string data to be matched + * @param pe Receives the position of any syntax errors within the regular expression + * @param status A reference to a UErrorCode to receive any errors. + * @return True if the regular expression exactly matches the full input string. + * + * @stable ICU 2.4 + */ + static UBool U_EXPORT2 matches(const UnicodeString ®ex, + const UnicodeString &input, + UParseError &pe, + UErrorCode &status); + + /** + * Test whether a string matches a regular expression. This convenience function + * both compiles the regular expression and applies it in a single operation. + * Note that if the same pattern needs to be applied repeatedly, this method will be + * less efficient than creating and reusing a RegexMatcher object. + * + * @param regex The regular expression + * @param input The string data to be matched + * @param pe Receives the position of any syntax errors within the regular expression + * @param status A reference to a UErrorCode to receive any errors. + * @return True if the regular expression exactly matches the full input string. + * + * @stable ICU 4.6 + */ + static UBool U_EXPORT2 matches(UText *regex, + UText *input, + UParseError &pe, + UErrorCode &status); + + /** + * Returns the regular expression from which this pattern was compiled. This method will work + * even if the pattern was compiled from a UText. + * + * Note: If the pattern was originally compiled from a UText, and that UText was modified, + * the returned string may no longer reflect the RegexPattern object. + * @stable ICU 2.4 + */ + virtual UnicodeString pattern() const; + + + /** + * Returns the regular expression from which this pattern was compiled. This method will work + * even if the pattern was compiled from a UnicodeString. + * + * Note: This is the original input, not a clone. If the pattern was originally compiled from a + * UText, and that UText was modified, the returned UText may no longer reflect the RegexPattern + * object. + * + * @stable ICU 4.6 + */ + virtual UText *patternText(UErrorCode &status) const; + + + /** + * Get the group number corresponding to a named capture group. + * The returned number can be used with any function that access + * capture groups by number. + * + * The function returns an error status if the specified name does not + * appear in the pattern. + * + * @param groupName The capture group name. + * @param status A UErrorCode to receive any errors. + * + * @stable ICU 55 + */ + virtual int32_t groupNumberFromName(const UnicodeString &groupName, UErrorCode &status) const; + + + /** + * Get the group number corresponding to a named capture group. + * The returned number can be used with any function that access + * capture groups by number. + * + * The function returns an error status if the specified name does not + * appear in the pattern. + * + * @param groupName The capture group name, + * platform invariant characters only. + * @param nameLength The length of the name, or -1 if the name is + * nul-terminated. + * @param status A UErrorCode to receive any errors. + * + * @stable ICU 55 + */ + virtual int32_t groupNumberFromName(const char *groupName, int32_t nameLength, UErrorCode &status) const; + + + /** + * Split a string into fields. Somewhat like split() from Perl or Java. + * Pattern matches identify delimiters that separate the input + * into fields. The input data between the delimiters becomes the + * fields themselves. + * + * If the delimiter pattern includes capture groups, the captured text will + * also appear in the destination array of output strings, interspersed + * with the fields. This is similar to Perl, but differs from Java, + * which ignores the presence of capture groups in the pattern. + * + * Trailing empty fields will always be returned, assuming sufficient + * destination capacity. This differs from the default behavior for Java + * and Perl where trailing empty fields are not returned. + * + * The number of strings produced by the split operation is returned. + * This count includes the strings from capture groups in the delimiter pattern. + * This behavior differs from Java, which ignores capture groups. + * + * For the best performance on split() operations, + * <code>RegexMatcher::split</code> is preferable to this function + * + * @param input The string to be split into fields. The field delimiters + * match the pattern (in the "this" object) + * @param dest An array of UnicodeStrings to receive the results of the split. + * This is an array of actual UnicodeString objects, not an + * array of pointers to strings. Local (stack based) arrays can + * work well here. + * @param destCapacity The number of elements in the destination array. + * If the number of fields found is less than destCapacity, the + * extra strings in the destination array are not altered. + * If the number of destination strings is less than the number + * of fields, the trailing part of the input string, including any + * field delimiters, is placed in the last destination string. + * @param status A reference to a UErrorCode to receive any errors. + * @return The number of fields into which the input string was split. + * @stable ICU 2.4 + */ + virtual int32_t split(const UnicodeString &input, + UnicodeString dest[], + int32_t destCapacity, + UErrorCode &status) const; + + + /** + * Split a string into fields. Somewhat like split() from Perl or Java. + * Pattern matches identify delimiters that separate the input + * into fields. The input data between the delimiters becomes the + * fields themselves. + * + * If the delimiter pattern includes capture groups, the captured text will + * also appear in the destination array of output strings, interspersed + * with the fields. This is similar to Perl, but differs from Java, + * which ignores the presence of capture groups in the pattern. + * + * Trailing empty fields will always be returned, assuming sufficient + * destination capacity. This differs from the default behavior for Java + * and Perl where trailing empty fields are not returned. + * + * The number of strings produced by the split operation is returned. + * This count includes the strings from capture groups in the delimiter pattern. + * This behavior differs from Java, which ignores capture groups. + * + * For the best performance on split() operations, + * <code>RegexMatcher::split</code> is preferable to this function + * + * @param input The string to be split into fields. The field delimiters + * match the pattern (in the "this" object) + * @param dest An array of mutable UText structs to receive the results of the split. + * If a field is NULL, a new UText is allocated to contain the results for + * that field. This new UText is not guaranteed to be mutable. + * @param destCapacity The number of elements in the destination array. + * If the number of fields found is less than destCapacity, the + * extra strings in the destination array are not altered. + * If the number of destination strings is less than the number + * of fields, the trailing part of the input string, including any + * field delimiters, is placed in the last destination string. + * @param status A reference to a UErrorCode to receive any errors. + * @return The number of destination strings used. + * + * @stable ICU 4.6 + */ + virtual int32_t split(UText *input, + UText *dest[], + int32_t destCapacity, + UErrorCode &status) const; + + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.4 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.4 + */ + static UClassID U_EXPORT2 getStaticClassID(); + +private: + // + // Implementation Data + // + UText *fPattern; // The original pattern string. + UnicodeString *fPatternString; // The original pattern UncodeString if relevant + uint32_t fFlags; // The flags used when compiling the pattern. + // + UVector64 *fCompiledPat; // The compiled pattern p-code. + UnicodeString fLiteralText; // Any literal string data from the pattern, + // after un-escaping, for use during the match. + + UVector *fSets; // Any UnicodeSets referenced from the pattern. + Regex8BitSet *fSets8; // (and fast sets for latin-1 range.) + + + UErrorCode fDeferredStatus; // status if some prior error has left this + // RegexPattern in an unusable state. + + int32_t fMinMatchLen; // Minimum Match Length. All matches will have length + // >= this value. For some patterns, this calculated + // value may be less than the true shortest + // possible match. + + int32_t fFrameSize; // Size of a state stack frame in the + // execution engine. + + int32_t fDataSize; // The size of the data needed by the pattern that + // does not go on the state stack, but has just + // a single copy per matcher. + + UVector32 *fGroupMap; // Map from capture group number to position of + // the group's variables in the matcher stack frame. + + UnicodeSet **fStaticSets; // Ptr to static (shared) sets for predefined + // regex character classes, e.g. Word. + + Regex8BitSet *fStaticSets8; // Ptr to the static (shared) latin-1 only + // sets for predefined regex classes. + + int32_t fStartType; // Info on how a match must start. + int32_t fInitialStringIdx; // + int32_t fInitialStringLen; + UnicodeSet *fInitialChars; + UChar32 fInitialChar; + Regex8BitSet *fInitialChars8; + UBool fNeedsAltInput; + + UHashtable *fNamedCaptureMap; // Map from capture group names to numbers. + + friend class RegexCompile; + friend class RegexMatcher; + friend class RegexCImpl; + + // + // Implementation Methods + // + void init(); // Common initialization, for use by constructors. + void zap(); // Common cleanup + + void dumpOp(int32_t index) const; + + public: +#ifndef U_HIDE_INTERNAL_API + /** + * Dump a compiled pattern. Internal debug function. + * @internal + */ + void dumpPattern() const; +#endif /* U_HIDE_INTERNAL_API */ +}; + + + +/** + * class RegexMatcher bundles together a regular expression pattern and + * input text to which the expression can be applied. It includes methods + * for testing for matches, and for find and replace operations. + * + * <p>Class RegexMatcher is not intended to be subclassed.</p> + * + * @stable ICU 2.4 + */ +class U_I18N_API RegexMatcher U_FINAL : public UObject { +public: + + /** + * Construct a RegexMatcher for a regular expression. + * This is a convenience method that avoids the need to explicitly create + * a RegexPattern object. Note that if several RegexMatchers need to be + * created for the same expression, it will be more efficient to + * separately create and cache a RegexPattern object, and use + * its matcher() method to create the RegexMatcher objects. + * + * @param regexp The Regular Expression to be compiled. + * @param flags Regular expression options, such as case insensitive matching. + * @see UREGEX_CASE_INSENSITIVE + * @param status Any errors are reported by setting this UErrorCode variable. + * @stable ICU 2.6 + */ + RegexMatcher(const UnicodeString ®exp, uint32_t flags, UErrorCode &status); + + /** + * Construct a RegexMatcher for a regular expression. + * This is a convenience method that avoids the need to explicitly create + * a RegexPattern object. Note that if several RegexMatchers need to be + * created for the same expression, it will be more efficient to + * separately create and cache a RegexPattern object, and use + * its matcher() method to create the RegexMatcher objects. + * + * @param regexp The regular expression to be compiled. + * @param flags Regular expression options, such as case insensitive matching. + * @see UREGEX_CASE_INSENSITIVE + * @param status Any errors are reported by setting this UErrorCode variable. + * + * @stable ICU 4.6 + */ + RegexMatcher(UText *regexp, uint32_t flags, UErrorCode &status); + + /** + * Construct a RegexMatcher for a regular expression. + * This is a convenience method that avoids the need to explicitly create + * a RegexPattern object. Note that if several RegexMatchers need to be + * created for the same expression, it will be more efficient to + * separately create and cache a RegexPattern object, and use + * its matcher() method to create the RegexMatcher objects. + * <p> + * The matcher will retain a reference to the supplied input string, and all regexp + * pattern matching operations happen directly on the original string. It is + * critical that the string not be altered or deleted before use by the regular + * expression operations is complete. + * + * @param regexp The Regular Expression to be compiled. + * @param input The string to match. The matcher retains a reference to the + * caller's string; mo copy is made. + * @param flags Regular expression options, such as case insensitive matching. + * @see UREGEX_CASE_INSENSITIVE + * @param status Any errors are reported by setting this UErrorCode variable. + * @stable ICU 2.6 + */ + RegexMatcher(const UnicodeString ®exp, const UnicodeString &input, + uint32_t flags, UErrorCode &status); + + /** + * Construct a RegexMatcher for a regular expression. + * This is a convenience method that avoids the need to explicitly create + * a RegexPattern object. Note that if several RegexMatchers need to be + * created for the same expression, it will be more efficient to + * separately create and cache a RegexPattern object, and use + * its matcher() method to create the RegexMatcher objects. + * <p> + * The matcher will make a shallow clone of the supplied input text, and all regexp + * pattern matching operations happen on this clone. While read-only operations on + * the supplied text are permitted, it is critical that the underlying string not be + * altered or deleted before use by the regular expression operations is complete. + * + * @param regexp The Regular Expression to be compiled. + * @param input The string to match. The matcher retains a shallow clone of the text. + * @param flags Regular expression options, such as case insensitive matching. + * @see UREGEX_CASE_INSENSITIVE + * @param status Any errors are reported by setting this UErrorCode variable. + * + * @stable ICU 4.6 + */ + RegexMatcher(UText *regexp, UText *input, + uint32_t flags, UErrorCode &status); + +private: + /** + * Cause a compilation error if an application accidentally attempts to + * create a matcher with a (char16_t *) string as input rather than + * a UnicodeString. Avoids a dangling reference to a temporary string. + * <p> + * To efficiently work with char16_t *strings, wrap the data in a UnicodeString + * using one of the aliasing constructors, such as + * <code>UnicodeString(UBool isTerminated, const char16_t *text, int32_t textLength);</code> + * or in a UText, using + * <code>utext_openUChars(UText *ut, const char16_t *text, int64_t textLength, UErrorCode *status);</code> + * + */ + RegexMatcher(const UnicodeString ®exp, const char16_t *input, + uint32_t flags, UErrorCode &status); +public: + + + /** + * Destructor. + * + * @stable ICU 2.4 + */ + virtual ~RegexMatcher(); + + + /** + * Attempts to match the entire input region against the pattern. + * @param status A reference to a UErrorCode to receive any errors. + * @return TRUE if there is a match + * @stable ICU 2.4 + */ + virtual UBool matches(UErrorCode &status); + + + /** + * Resets the matcher, then attempts to match the input beginning + * at the specified startIndex, and extending to the end of the input. + * The input region is reset to include the entire input string. + * A successful match must extend to the end of the input. + * @param startIndex The input string (native) index at which to begin matching. + * @param status A reference to a UErrorCode to receive any errors. + * @return TRUE if there is a match + * @stable ICU 2.8 + */ + virtual UBool matches(int64_t startIndex, UErrorCode &status); + + + /** + * Attempts to match the input string, starting from the beginning of the region, + * against the pattern. Like the matches() method, this function + * always starts at the beginning of the input region; + * unlike that function, it does not require that the entire region be matched. + * + * <p>If the match succeeds then more information can be obtained via the <code>start()</code>, + * <code>end()</code>, and <code>group()</code> functions.</p> + * + * @param status A reference to a UErrorCode to receive any errors. + * @return TRUE if there is a match at the start of the input string. + * @stable ICU 2.4 + */ + virtual UBool lookingAt(UErrorCode &status); + + + /** + * Attempts to match the input string, starting from the specified index, against the pattern. + * The match may be of any length, and is not required to extend to the end + * of the input string. Contrast with match(). + * + * <p>If the match succeeds then more information can be obtained via the <code>start()</code>, + * <code>end()</code>, and <code>group()</code> functions.</p> + * + * @param startIndex The input string (native) index at which to begin matching. + * @param status A reference to a UErrorCode to receive any errors. + * @return TRUE if there is a match. + * @stable ICU 2.8 + */ + virtual UBool lookingAt(int64_t startIndex, UErrorCode &status); + + + /** + * Find the next pattern match in the input string. + * The find begins searching the input at the location following the end of + * the previous match, or at the start of the string if there is no previous match. + * If a match is found, <code>start(), end()</code> and <code>group()</code> + * will provide more information regarding the match. + * <p>Note that if the input string is changed by the application, + * use find(startPos, status) instead of find(), because the saved starting + * position may not be valid with the altered input string.</p> + * @return TRUE if a match is found. + * @stable ICU 2.4 + */ + virtual UBool find(); + + + /** + * Find the next pattern match in the input string. + * The find begins searching the input at the location following the end of + * the previous match, or at the start of the string if there is no previous match. + * If a match is found, <code>start(), end()</code> and <code>group()</code> + * will provide more information regarding the match. + * <p>Note that if the input string is changed by the application, + * use find(startPos, status) instead of find(), because the saved starting + * position may not be valid with the altered input string.</p> + * @param status A reference to a UErrorCode to receive any errors. + * @return TRUE if a match is found. + * @stable ICU 55 + */ + virtual UBool find(UErrorCode &status); + + /** + * Resets this RegexMatcher and then attempts to find the next substring of the + * input string that matches the pattern, starting at the specified index. + * + * @param start The (native) index in the input string to begin the search. + * @param status A reference to a UErrorCode to receive any errors. + * @return TRUE if a match is found. + * @stable ICU 2.4 + */ + virtual UBool find(int64_t start, UErrorCode &status); + + + /** + * Returns a string containing the text matched by the previous match. + * If the pattern can match an empty string, an empty string may be returned. + * @param status A reference to a UErrorCode to receive any errors. + * Possible errors are U_REGEX_INVALID_STATE if no match + * has been attempted or the last match failed. + * @return a string containing the matched input text. + * @stable ICU 2.4 + */ + virtual UnicodeString group(UErrorCode &status) const; + + + /** + * Returns a string containing the text captured by the given group + * during the previous match operation. Group(0) is the entire match. + * + * A zero length string is returned both for capture groups that did not + * participate in the match and for actual zero length matches. + * To distinguish between these two cases use the function start(), + * which returns -1 for non-participating groups. + * + * @param groupNum the capture group number + * @param status A reference to a UErrorCode to receive any errors. + * Possible errors are U_REGEX_INVALID_STATE if no match + * has been attempted or the last match failed and + * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number. + * @return the captured text + * @stable ICU 2.4 + */ + virtual UnicodeString group(int32_t groupNum, UErrorCode &status) const; + + /** + * Returns the number of capturing groups in this matcher's pattern. + * @return the number of capture groups + * @stable ICU 2.4 + */ + virtual int32_t groupCount() const; + + + /** + * Returns a shallow clone of the entire live input string with the UText current native index + * set to the beginning of the requested group. + * + * @param dest The UText into which the input should be cloned, or NULL to create a new UText + * @param group_len A reference to receive the length of the desired capture group + * @param status A reference to a UErrorCode to receive any errors. + * Possible errors are U_REGEX_INVALID_STATE if no match + * has been attempted or the last match failed and + * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number. + * @return dest if non-NULL, a shallow copy of the input text otherwise + * + * @stable ICU 4.6 + */ + virtual UText *group(UText *dest, int64_t &group_len, UErrorCode &status) const; + + /** + * Returns a shallow clone of the entire live input string with the UText current native index + * set to the beginning of the requested group. + * + * A group length of zero is returned both for capture groups that did not + * participate in the match and for actual zero length matches. + * To distinguish between these two cases use the function start(), + * which returns -1 for non-participating groups. + * + * @param groupNum The capture group number. + * @param dest The UText into which the input should be cloned, or NULL to create a new UText. + * @param group_len A reference to receive the length of the desired capture group + * @param status A reference to a UErrorCode to receive any errors. + * Possible errors are U_REGEX_INVALID_STATE if no match + * has been attempted or the last match failed and + * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number. + * @return dest if non-NULL, a shallow copy of the input text otherwise + * + * @stable ICU 4.6 + */ + virtual UText *group(int32_t groupNum, UText *dest, int64_t &group_len, UErrorCode &status) const; + + /** + * Returns the index in the input string of the start of the text matched + * during the previous match operation. + * @param status a reference to a UErrorCode to receive any errors. + * @return The (native) position in the input string of the start of the last match. + * @stable ICU 2.4 + */ + virtual int32_t start(UErrorCode &status) const; + + /** + * Returns the index in the input string of the start of the text matched + * during the previous match operation. + * @param status a reference to a UErrorCode to receive any errors. + * @return The (native) position in the input string of the start of the last match. + * @stable ICU 4.6 + */ + virtual int64_t start64(UErrorCode &status) const; + + + /** + * Returns the index in the input string of the start of the text matched by the + * specified capture group during the previous match operation. Return -1 if + * the capture group exists in the pattern, but was not part of the last match. + * + * @param group the capture group number + * @param status A reference to a UErrorCode to receive any errors. Possible + * errors are U_REGEX_INVALID_STATE if no match has been + * attempted or the last match failed, and + * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number + * @return the (native) start position of substring matched by the specified group. + * @stable ICU 2.4 + */ + virtual int32_t start(int32_t group, UErrorCode &status) const; + + /** + * Returns the index in the input string of the start of the text matched by the + * specified capture group during the previous match operation. Return -1 if + * the capture group exists in the pattern, but was not part of the last match. + * + * @param group the capture group number. + * @param status A reference to a UErrorCode to receive any errors. Possible + * errors are U_REGEX_INVALID_STATE if no match has been + * attempted or the last match failed, and + * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number. + * @return the (native) start position of substring matched by the specified group. + * @stable ICU 4.6 + */ + virtual int64_t start64(int32_t group, UErrorCode &status) const; + + /** + * Returns the index in the input string of the first character following the + * text matched during the previous match operation. + * + * @param status A reference to a UErrorCode to receive any errors. Possible + * errors are U_REGEX_INVALID_STATE if no match has been + * attempted or the last match failed. + * @return the index of the last character matched, plus one. + * The index value returned is a native index, corresponding to + * code units for the underlying encoding type, for example, + * a byte index for UTF-8. + * @stable ICU 2.4 + */ + virtual int32_t end(UErrorCode &status) const; + + /** + * Returns the index in the input string of the first character following the + * text matched during the previous match operation. + * + * @param status A reference to a UErrorCode to receive any errors. Possible + * errors are U_REGEX_INVALID_STATE if no match has been + * attempted or the last match failed. + * @return the index of the last character matched, plus one. + * The index value returned is a native index, corresponding to + * code units for the underlying encoding type, for example, + * a byte index for UTF-8. + * @stable ICU 4.6 + */ + virtual int64_t end64(UErrorCode &status) const; + + + /** + * Returns the index in the input string of the character following the + * text matched by the specified capture group during the previous match operation. + * + * @param group the capture group number + * @param status A reference to a UErrorCode to receive any errors. Possible + * errors are U_REGEX_INVALID_STATE if no match has been + * attempted or the last match failed and + * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number + * @return the index of the first character following the text + * captured by the specified group during the previous match operation. + * Return -1 if the capture group exists in the pattern but was not part of the match. + * The index value returned is a native index, corresponding to + * code units for the underlying encoding type, for example, + * a byte index for UTF8. + * @stable ICU 2.4 + */ + virtual int32_t end(int32_t group, UErrorCode &status) const; + + /** + * Returns the index in the input string of the character following the + * text matched by the specified capture group during the previous match operation. + * + * @param group the capture group number + * @param status A reference to a UErrorCode to receive any errors. Possible + * errors are U_REGEX_INVALID_STATE if no match has been + * attempted or the last match failed and + * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number + * @return the index of the first character following the text + * captured by the specified group during the previous match operation. + * Return -1 if the capture group exists in the pattern but was not part of the match. + * The index value returned is a native index, corresponding to + * code units for the underlying encoding type, for example, + * a byte index for UTF8. + * @stable ICU 4.6 + */ + virtual int64_t end64(int32_t group, UErrorCode &status) const; + + /** + * Resets this matcher. The effect is to remove any memory of previous matches, + * and to cause subsequent find() operations to begin at the beginning of + * the input string. + * + * @return this RegexMatcher. + * @stable ICU 2.4 + */ + virtual RegexMatcher &reset(); + + + /** + * Resets this matcher, and set the current input position. + * The effect is to remove any memory of previous matches, + * and to cause subsequent find() operations to begin at + * the specified (native) position in the input string. + * <p> + * The matcher's region is reset to its default, which is the entire + * input string. + * <p> + * An alternative to this function is to set a match region + * beginning at the desired index. + * + * @return this RegexMatcher. + * @stable ICU 2.8 + */ + virtual RegexMatcher &reset(int64_t index, UErrorCode &status); + + + /** + * Resets this matcher with a new input string. This allows instances of RegexMatcher + * to be reused, which is more efficient than creating a new RegexMatcher for + * each input string to be processed. + * @param input The new string on which subsequent pattern matches will operate. + * The matcher retains a reference to the callers string, and operates + * directly on that. Ownership of the string remains with the caller. + * Because no copy of the string is made, it is essential that the + * caller not delete the string until after regexp operations on it + * are done. + * Note that while a reset on the matcher with an input string that is then + * modified across/during matcher operations may be supported currently for UnicodeString, + * this was not originally intended behavior, and support for this is not guaranteed + * in upcoming versions of ICU. + * @return this RegexMatcher. + * @stable ICU 2.4 + */ + virtual RegexMatcher &reset(const UnicodeString &input); + + + /** + * Resets this matcher with a new input string. This allows instances of RegexMatcher + * to be reused, which is more efficient than creating a new RegexMatcher for + * each input string to be processed. + * @param input The new string on which subsequent pattern matches will operate. + * The matcher makes a shallow clone of the given text; ownership of the + * original string remains with the caller. Because no deep copy of the + * text is made, it is essential that the caller not modify the string + * until after regexp operations on it are done. + * @return this RegexMatcher. + * + * @stable ICU 4.6 + */ + virtual RegexMatcher &reset(UText *input); + + + /** + * Set the subject text string upon which the regular expression is looking for matches + * without changing any other aspect of the matching state. + * The new and previous text strings must have the same content. + * + * This function is intended for use in environments where ICU is operating on + * strings that may move around in memory. It provides a mechanism for notifying + * ICU that the string has been relocated, and providing a new UText to access the + * string in its new position. + * + * Note that the regular expression implementation never copies the underlying text + * of a string being matched, but always operates directly on the original text + * provided by the user. Refreshing simply drops the references to the old text + * and replaces them with references to the new. + * + * Caution: this function is normally used only by very specialized, + * system-level code. One example use case is with garbage collection that moves + * the text in memory. + * + * @param input The new (moved) text string. + * @param status Receives errors detected by this function. + * + * @stable ICU 4.8 + */ + virtual RegexMatcher &refreshInputText(UText *input, UErrorCode &status); + +private: + /** + * Cause a compilation error if an application accidentally attempts to + * reset a matcher with a (char16_t *) string as input rather than + * a UnicodeString. Avoids a dangling reference to a temporary string. + * <p> + * To efficiently work with char16_t *strings, wrap the data in a UnicodeString + * using one of the aliasing constructors, such as + * <code>UnicodeString(UBool isTerminated, const char16_t *text, int32_t textLength);</code> + * or in a UText, using + * <code>utext_openUChars(UText *ut, const char16_t *text, int64_t textLength, UErrorCode *status);</code> + * + */ + RegexMatcher &reset(const char16_t *input); +public: + + /** + * Returns the input string being matched. Ownership of the string belongs to + * the matcher; it should not be altered or deleted. This method will work even if the input + * was originally supplied as a UText. + * @return the input string + * @stable ICU 2.4 + */ + virtual const UnicodeString &input() const; + + /** + * Returns the input string being matched. This is the live input text; it should not be + * altered or deleted. This method will work even if the input was originally supplied as + * a UnicodeString. + * @return the input text + * + * @stable ICU 4.6 + */ + virtual UText *inputText() const; + + /** + * Returns the input string being matched, either by copying it into the provided + * UText parameter or by returning a shallow clone of the live input. Note that copying + * the entire input may cause significant performance and memory issues. + * @param dest The UText into which the input should be copied, or NULL to create a new UText + * @param status error code + * @return dest if non-NULL, a shallow copy of the input text otherwise + * + * @stable ICU 4.6 + */ + virtual UText *getInput(UText *dest, UErrorCode &status) const; + + + /** Sets the limits of this matcher's region. + * The region is the part of the input string that will be searched to find a match. + * Invoking this method resets the matcher, and then sets the region to start + * at the index specified by the start parameter and end at the index specified + * by the end parameter. + * + * Depending on the transparency and anchoring being used (see useTransparentBounds + * and useAnchoringBounds), certain constructs such as anchors may behave differently + * at or around the boundaries of the region + * + * The function will fail if start is greater than limit, or if either index + * is less than zero or greater than the length of the string being matched. + * + * @param start The (native) index to begin searches at. + * @param limit The index to end searches at (exclusive). + * @param status A reference to a UErrorCode to receive any errors. + * @stable ICU 4.0 + */ + virtual RegexMatcher ®ion(int64_t start, int64_t limit, UErrorCode &status); + + /** + * Identical to region(start, limit, status) but also allows a start position without + * resetting the region state. + * @param regionStart The region start + * @param regionLimit the limit of the region + * @param startIndex The (native) index within the region bounds at which to begin searches. + * @param status A reference to a UErrorCode to receive any errors. + * If startIndex is not within the specified region bounds, + * U_INDEX_OUTOFBOUNDS_ERROR is returned. + * @stable ICU 4.6 + */ + virtual RegexMatcher ®ion(int64_t regionStart, int64_t regionLimit, int64_t startIndex, UErrorCode &status); + + /** + * Reports the start index of this matcher's region. The searches this matcher + * conducts are limited to finding matches within regionStart (inclusive) and + * regionEnd (exclusive). + * + * @return The starting (native) index of this matcher's region. + * @stable ICU 4.0 + */ + virtual int32_t regionStart() const; + + /** + * Reports the start index of this matcher's region. The searches this matcher + * conducts are limited to finding matches within regionStart (inclusive) and + * regionEnd (exclusive). + * + * @return The starting (native) index of this matcher's region. + * @stable ICU 4.6 + */ + virtual int64_t regionStart64() const; + + + /** + * Reports the end (limit) index (exclusive) of this matcher's region. The searches + * this matcher conducts are limited to finding matches within regionStart + * (inclusive) and regionEnd (exclusive). + * + * @return The ending point (native) of this matcher's region. + * @stable ICU 4.0 + */ + virtual int32_t regionEnd() const; + + /** + * Reports the end (limit) index (exclusive) of this matcher's region. The searches + * this matcher conducts are limited to finding matches within regionStart + * (inclusive) and regionEnd (exclusive). + * + * @return The ending point (native) of this matcher's region. + * @stable ICU 4.6 + */ + virtual int64_t regionEnd64() const; + + /** + * Queries the transparency of region bounds for this matcher. + * See useTransparentBounds for a description of transparent and opaque bounds. + * By default, a matcher uses opaque region boundaries. + * + * @return TRUE if this matcher is using opaque bounds, false if it is not. + * @stable ICU 4.0 + */ + virtual UBool hasTransparentBounds() const; + + /** + * Sets the transparency of region bounds for this matcher. + * Invoking this function with an argument of true will set this matcher to use transparent bounds. + * If the boolean argument is false, then opaque bounds will be used. + * + * Using transparent bounds, the boundaries of this matcher's region are transparent + * to lookahead, lookbehind, and boundary matching constructs. Those constructs can + * see text beyond the boundaries of the region while checking for a match. + * + * With opaque bounds, no text outside of the matcher's region is visible to lookahead, + * lookbehind, and boundary matching constructs. + * + * By default, a matcher uses opaque bounds. + * + * @param b TRUE for transparent bounds; FALSE for opaque bounds + * @return This Matcher; + * @stable ICU 4.0 + **/ + virtual RegexMatcher &useTransparentBounds(UBool b); + + + /** + * Return true if this matcher is using anchoring bounds. + * By default, matchers use anchoring region bounds. + * + * @return TRUE if this matcher is using anchoring bounds. + * @stable ICU 4.0 + */ + virtual UBool hasAnchoringBounds() const; + + + /** + * Set whether this matcher is using Anchoring Bounds for its region. + * With anchoring bounds, pattern anchors such as ^ and $ will match at the start + * and end of the region. Without Anchoring Bounds, anchors will only match at + * the positions they would in the complete text. + * + * Anchoring Bounds are the default for regions. + * + * @param b TRUE if to enable anchoring bounds; FALSE to disable them. + * @return This Matcher + * @stable ICU 4.0 + */ + virtual RegexMatcher &useAnchoringBounds(UBool b); + + + /** + * Return TRUE if the most recent matching operation attempted to access + * additional input beyond the available input text. + * In this case, additional input text could change the results of the match. + * + * hitEnd() is defined for both successful and unsuccessful matches. + * In either case hitEnd() will return TRUE if if the end of the text was + * reached at any point during the matching process. + * + * @return TRUE if the most recent match hit the end of input + * @stable ICU 4.0 + */ + virtual UBool hitEnd() const; + + /** + * Return TRUE the most recent match succeeded and additional input could cause + * it to fail. If this method returns false and a match was found, then more input + * might change the match but the match won't be lost. If a match was not found, + * then requireEnd has no meaning. + * + * @return TRUE if more input could cause the most recent match to no longer match. + * @stable ICU 4.0 + */ + virtual UBool requireEnd() const; + + + /** + * Returns the pattern that is interpreted by this matcher. + * @return the RegexPattern for this RegexMatcher + * @stable ICU 2.4 + */ + virtual const RegexPattern &pattern() const; + + + /** + * Replaces every substring of the input that matches the pattern + * with the given replacement string. This is a convenience function that + * provides a complete find-and-replace-all operation. + * + * This method first resets this matcher. It then scans the input string + * looking for matches of the pattern. Input that is not part of any + * match is left unchanged; each match is replaced in the result by the + * replacement string. The replacement string may contain references to + * capture groups. + * + * @param replacement a string containing the replacement text. + * @param status a reference to a UErrorCode to receive any errors. + * @return a string containing the results of the find and replace. + * @stable ICU 2.4 + */ + virtual UnicodeString replaceAll(const UnicodeString &replacement, UErrorCode &status); + + + /** + * Replaces every substring of the input that matches the pattern + * with the given replacement string. This is a convenience function that + * provides a complete find-and-replace-all operation. + * + * This method first resets this matcher. It then scans the input string + * looking for matches of the pattern. Input that is not part of any + * match is left unchanged; each match is replaced in the result by the + * replacement string. The replacement string may contain references to + * capture groups. + * + * @param replacement a string containing the replacement text. + * @param dest a mutable UText in which the results are placed. + * If NULL, a new UText will be created (which may not be mutable). + * @param status a reference to a UErrorCode to receive any errors. + * @return a string containing the results of the find and replace. + * If a pre-allocated UText was provided, it will always be used and returned. + * + * @stable ICU 4.6 + */ + virtual UText *replaceAll(UText *replacement, UText *dest, UErrorCode &status); + + + /** + * Replaces the first substring of the input that matches + * the pattern with the replacement string. This is a convenience + * function that provides a complete find-and-replace operation. + * + * <p>This function first resets this RegexMatcher. It then scans the input string + * looking for a match of the pattern. Input that is not part + * of the match is appended directly to the result string; the match is replaced + * in the result by the replacement string. The replacement string may contain + * references to captured groups.</p> + * + * <p>The state of the matcher (the position at which a subsequent find() + * would begin) after completing a replaceFirst() is not specified. The + * RegexMatcher should be reset before doing additional find() operations.</p> + * + * @param replacement a string containing the replacement text. + * @param status a reference to a UErrorCode to receive any errors. + * @return a string containing the results of the find and replace. + * @stable ICU 2.4 + */ + virtual UnicodeString replaceFirst(const UnicodeString &replacement, UErrorCode &status); + + + /** + * Replaces the first substring of the input that matches + * the pattern with the replacement string. This is a convenience + * function that provides a complete find-and-replace operation. + * + * <p>This function first resets this RegexMatcher. It then scans the input string + * looking for a match of the pattern. Input that is not part + * of the match is appended directly to the result string; the match is replaced + * in the result by the replacement string. The replacement string may contain + * references to captured groups.</p> + * + * <p>The state of the matcher (the position at which a subsequent find() + * would begin) after completing a replaceFirst() is not specified. The + * RegexMatcher should be reset before doing additional find() operations.</p> + * + * @param replacement a string containing the replacement text. + * @param dest a mutable UText in which the results are placed. + * If NULL, a new UText will be created (which may not be mutable). + * @param status a reference to a UErrorCode to receive any errors. + * @return a string containing the results of the find and replace. + * If a pre-allocated UText was provided, it will always be used and returned. + * + * @stable ICU 4.6 + */ + virtual UText *replaceFirst(UText *replacement, UText *dest, UErrorCode &status); + + + /** + * Implements a replace operation intended to be used as part of an + * incremental find-and-replace. + * + * <p>The input string, starting from the end of the previous replacement and ending at + * the start of the current match, is appended to the destination string. Then the + * replacement string is appended to the output string, + * including handling any substitutions of captured text.</p> + * + * <p>For simple, prepackaged, non-incremental find-and-replace + * operations, see replaceFirst() or replaceAll().</p> + * + * @param dest A UnicodeString to which the results of the find-and-replace are appended. + * @param replacement A UnicodeString that provides the text to be substituted for + * the input text that matched the regexp pattern. The replacement + * text may contain references to captured text from the + * input. + * @param status A reference to a UErrorCode to receive any errors. Possible + * errors are U_REGEX_INVALID_STATE if no match has been + * attempted or the last match failed, and U_INDEX_OUTOFBOUNDS_ERROR + * if the replacement text specifies a capture group that + * does not exist in the pattern. + * + * @return this RegexMatcher + * @stable ICU 2.4 + * + */ + virtual RegexMatcher &appendReplacement(UnicodeString &dest, + const UnicodeString &replacement, UErrorCode &status); + + + /** + * Implements a replace operation intended to be used as part of an + * incremental find-and-replace. + * + * <p>The input string, starting from the end of the previous replacement and ending at + * the start of the current match, is appended to the destination string. Then the + * replacement string is appended to the output string, + * including handling any substitutions of captured text.</p> + * + * <p>For simple, prepackaged, non-incremental find-and-replace + * operations, see replaceFirst() or replaceAll().</p> + * + * @param dest A mutable UText to which the results of the find-and-replace are appended. + * Must not be NULL. + * @param replacement A UText that provides the text to be substituted for + * the input text that matched the regexp pattern. The replacement + * text may contain references to captured text from the input. + * @param status A reference to a UErrorCode to receive any errors. Possible + * errors are U_REGEX_INVALID_STATE if no match has been + * attempted or the last match failed, and U_INDEX_OUTOFBOUNDS_ERROR + * if the replacement text specifies a capture group that + * does not exist in the pattern. + * + * @return this RegexMatcher + * + * @stable ICU 4.6 + */ + virtual RegexMatcher &appendReplacement(UText *dest, + UText *replacement, UErrorCode &status); + + + /** + * As the final step in a find-and-replace operation, append the remainder + * of the input string, starting at the position following the last appendReplacement(), + * to the destination string. <code>appendTail()</code> is intended to be invoked after one + * or more invocations of the <code>RegexMatcher::appendReplacement()</code>. + * + * @param dest A UnicodeString to which the results of the find-and-replace are appended. + * @return the destination string. + * @stable ICU 2.4 + */ + virtual UnicodeString &appendTail(UnicodeString &dest); + + + /** + * As the final step in a find-and-replace operation, append the remainder + * of the input string, starting at the position following the last appendReplacement(), + * to the destination string. <code>appendTail()</code> is intended to be invoked after one + * or more invocations of the <code>RegexMatcher::appendReplacement()</code>. + * + * @param dest A mutable UText to which the results of the find-and-replace are appended. + * Must not be NULL. + * @param status error cod + * @return the destination string. + * + * @stable ICU 4.6 + */ + virtual UText *appendTail(UText *dest, UErrorCode &status); + + + /** + * Split a string into fields. Somewhat like split() from Perl. + * The pattern matches identify delimiters that separate the input + * into fields. The input data between the matches becomes the + * fields themselves. + * + * @param input The string to be split into fields. The field delimiters + * match the pattern (in the "this" object). This matcher + * will be reset to this input string. + * @param dest An array of UnicodeStrings to receive the results of the split. + * This is an array of actual UnicodeString objects, not an + * array of pointers to strings. Local (stack based) arrays can + * work well here. + * @param destCapacity The number of elements in the destination array. + * If the number of fields found is less than destCapacity, the + * extra strings in the destination array are not altered. + * If the number of destination strings is less than the number + * of fields, the trailing part of the input string, including any + * field delimiters, is placed in the last destination string. + * @param status A reference to a UErrorCode to receive any errors. + * @return The number of fields into which the input string was split. + * @stable ICU 2.6 + */ + virtual int32_t split(const UnicodeString &input, + UnicodeString dest[], + int32_t destCapacity, + UErrorCode &status); + + + /** + * Split a string into fields. Somewhat like split() from Perl. + * The pattern matches identify delimiters that separate the input + * into fields. The input data between the matches becomes the + * fields themselves. + * + * @param input The string to be split into fields. The field delimiters + * match the pattern (in the "this" object). This matcher + * will be reset to this input string. + * @param dest An array of mutable UText structs to receive the results of the split. + * If a field is NULL, a new UText is allocated to contain the results for + * that field. This new UText is not guaranteed to be mutable. + * @param destCapacity The number of elements in the destination array. + * If the number of fields found is less than destCapacity, the + * extra strings in the destination array are not altered. + * If the number of destination strings is less than the number + * of fields, the trailing part of the input string, including any + * field delimiters, is placed in the last destination string. + * @param status A reference to a UErrorCode to receive any errors. + * @return The number of fields into which the input string was split. + * + * @stable ICU 4.6 + */ + virtual int32_t split(UText *input, + UText *dest[], + int32_t destCapacity, + UErrorCode &status); + + /** + * Set a processing time limit for match operations with this Matcher. + * + * Some patterns, when matching certain strings, can run in exponential time. + * For practical purposes, the match operation may appear to be in an + * infinite loop. + * When a limit is set a match operation will fail with an error if the + * limit is exceeded. + * <p> + * The units of the limit are steps of the match engine. + * Correspondence with actual processor time will depend on the speed + * of the processor and the details of the specific pattern, but will + * typically be on the order of milliseconds. + * <p> + * By default, the matching time is not limited. + * <p> + * + * @param limit The limit value, or 0 for no limit. + * @param status A reference to a UErrorCode to receive any errors. + * @stable ICU 4.0 + */ + virtual void setTimeLimit(int32_t limit, UErrorCode &status); + + /** + * Get the time limit, if any, for match operations made with this Matcher. + * + * @return the maximum allowed time for a match, in units of processing steps. + * @stable ICU 4.0 + */ + virtual int32_t getTimeLimit() const; + + /** + * Set the amount of heap storage available for use by the match backtracking stack. + * The matcher is also reset, discarding any results from previous matches. + * <p> + * ICU uses a backtracking regular expression engine, with the backtrack stack + * maintained on the heap. This function sets the limit to the amount of memory + * that can be used for this purpose. A backtracking stack overflow will + * result in an error from the match operation that caused it. + * <p> + * A limit is desirable because a malicious or poorly designed pattern can use + * excessive memory, potentially crashing the process. A limit is enabled + * by default. + * <p> + * @param limit The maximum size, in bytes, of the matching backtrack stack. + * A value of zero means no limit. + * The limit must be greater or equal to zero. + * + * @param status A reference to a UErrorCode to receive any errors. + * + * @stable ICU 4.0 + */ + virtual void setStackLimit(int32_t limit, UErrorCode &status); + + /** + * Get the size of the heap storage available for use by the back tracking stack. + * + * @return the maximum backtracking stack size, in bytes, or zero if the + * stack size is unlimited. + * @stable ICU 4.0 + */ + virtual int32_t getStackLimit() const; + + + /** + * Set a callback function for use with this Matcher. + * During matching operations the function will be called periodically, + * giving the application the opportunity to terminate a long-running + * match. + * + * @param callback A pointer to the user-supplied callback function. + * @param context User context pointer. The value supplied at the + * time the callback function is set will be saved + * and passed to the callback each time that it is called. + * @param status A reference to a UErrorCode to receive any errors. + * @stable ICU 4.0 + */ + virtual void setMatchCallback(URegexMatchCallback *callback, + const void *context, + UErrorCode &status); + + + /** + * Get the callback function for this URegularExpression. + * + * @param callback Out parameter, receives a pointer to the user-supplied + * callback function. + * @param context Out parameter, receives the user context pointer that + * was set when uregex_setMatchCallback() was called. + * @param status A reference to a UErrorCode to receive any errors. + * @stable ICU 4.0 + */ + virtual void getMatchCallback(URegexMatchCallback *&callback, + const void *&context, + UErrorCode &status); + + + /** + * Set a progress callback function for use with find operations on this Matcher. + * During find operations, the callback will be invoked after each return from a + * match attempt, giving the application the opportunity to terminate a long-running + * find operation. + * + * @param callback A pointer to the user-supplied callback function. + * @param context User context pointer. The value supplied at the + * time the callback function is set will be saved + * and passed to the callback each time that it is called. + * @param status A reference to a UErrorCode to receive any errors. + * @stable ICU 4.6 + */ + virtual void setFindProgressCallback(URegexFindProgressCallback *callback, + const void *context, + UErrorCode &status); + + + /** + * Get the find progress callback function for this URegularExpression. + * + * @param callback Out parameter, receives a pointer to the user-supplied + * callback function. + * @param context Out parameter, receives the user context pointer that + * was set when uregex_setFindProgressCallback() was called. + * @param status A reference to a UErrorCode to receive any errors. + * @stable ICU 4.6 + */ + virtual void getFindProgressCallback(URegexFindProgressCallback *&callback, + const void *&context, + UErrorCode &status); + +#ifndef U_HIDE_INTERNAL_API + /** + * setTrace Debug function, enable/disable tracing of the matching engine. + * For internal ICU development use only. DO NO USE!!!! + * @internal + */ + void setTrace(UBool state); +#endif /* U_HIDE_INTERNAL_API */ + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.2 + */ + static UClassID U_EXPORT2 getStaticClassID(); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.2 + */ + virtual UClassID getDynamicClassID() const; + +private: + // Constructors and other object boilerplate are private. + // Instances of RegexMatcher can not be assigned, copied, cloned, etc. + RegexMatcher(); // default constructor not implemented + RegexMatcher(const RegexPattern *pat); + RegexMatcher(const RegexMatcher &other); + RegexMatcher &operator =(const RegexMatcher &rhs); + void init(UErrorCode &status); // Common initialization + void init2(UText *t, UErrorCode &e); // Common initialization, part 2. + + friend class RegexPattern; + friend class RegexCImpl; +public: +#ifndef U_HIDE_INTERNAL_API + /** @internal */ + void resetPreserveRegion(); // Reset matcher state, but preserve any region. +#endif /* U_HIDE_INTERNAL_API */ +private: + + // + // MatchAt This is the internal interface to the match engine itself. + // Match status comes back in matcher member variables. + // + void MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status); + inline void backTrack(int64_t &inputIdx, int32_t &patIdx); + UBool isWordBoundary(int64_t pos); // perform Perl-like \b test + UBool isUWordBoundary(int64_t pos); // perform RBBI based \b test + REStackFrame *resetStack(); + inline REStackFrame *StateSave(REStackFrame *fp, int64_t savePatIdx, UErrorCode &status); + void IncrementTime(UErrorCode &status); + + // Call user find callback function, if set. Return TRUE if operation should be interrupted. + inline UBool findProgressInterrupt(int64_t matchIndex, UErrorCode &status); + + int64_t appendGroup(int32_t groupNum, UText *dest, UErrorCode &status) const; + + UBool findUsingChunk(UErrorCode &status); + void MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &status); + UBool isChunkWordBoundary(int32_t pos); + + const RegexPattern *fPattern; + RegexPattern *fPatternOwned; // Non-NULL if this matcher owns the pattern, and + // should delete it when through. + + const UnicodeString *fInput; // The string being matched. Only used for input() + UText *fInputText; // The text being matched. Is never NULL. + UText *fAltInputText; // A shallow copy of the text being matched. + // Only created if the pattern contains backreferences. + int64_t fInputLength; // Full length of the input text. + int32_t fFrameSize; // The size of a frame in the backtrack stack. + + int64_t fRegionStart; // Start of the input region, default = 0. + int64_t fRegionLimit; // End of input region, default to input.length. + + int64_t fAnchorStart; // Region bounds for anchoring operations (^ or $). + int64_t fAnchorLimit; // See useAnchoringBounds + + int64_t fLookStart; // Region bounds for look-ahead/behind and + int64_t fLookLimit; // and other boundary tests. See + // useTransparentBounds + + int64_t fActiveStart; // Currently active bounds for matching. + int64_t fActiveLimit; // Usually is the same as region, but + // is changed to fLookStart/Limit when + // entering look around regions. + + UBool fTransparentBounds; // True if using transparent bounds. + UBool fAnchoringBounds; // True if using anchoring bounds. + + UBool fMatch; // True if the last attempted match was successful. + int64_t fMatchStart; // Position of the start of the most recent match + int64_t fMatchEnd; // First position after the end of the most recent match + // Zero if no previous match, even when a region + // is active. + int64_t fLastMatchEnd; // First position after the end of the previous match, + // or -1 if there was no previous match. + int64_t fAppendPosition; // First position after the end of the previous + // appendReplacement(). As described by the + // JavaDoc for Java Matcher, where it is called + // "append position" + UBool fHitEnd; // True if the last match touched the end of input. + UBool fRequireEnd; // True if the last match required end-of-input + // (matched $ or Z) + + UVector64 *fStack; + REStackFrame *fFrame; // After finding a match, the last active stack frame, + // which will contain the capture group results. + // NOT valid while match engine is running. + + int64_t *fData; // Data area for use by the compiled pattern. + int64_t fSmallData[8]; // Use this for data if it's enough. + + int32_t fTimeLimit; // Max time (in arbitrary steps) to let the + // match engine run. Zero for unlimited. + + int32_t fTime; // Match time, accumulates while matching. + int32_t fTickCounter; // Low bits counter for time. Counts down StateSaves. + // Kept separately from fTime to keep as much + // code as possible out of the inline + // StateSave function. + + int32_t fStackLimit; // Maximum memory size to use for the backtrack + // stack, in bytes. Zero for unlimited. + + URegexMatchCallback *fCallbackFn; // Pointer to match progress callback funct. + // NULL if there is no callback. + const void *fCallbackContext; // User Context ptr for callback function. + + URegexFindProgressCallback *fFindProgressCallbackFn; // Pointer to match progress callback funct. + // NULL if there is no callback. + const void *fFindProgressCallbackContext; // User Context ptr for callback function. + + + UBool fInputUniStrMaybeMutable; // Set when fInputText wraps a UnicodeString that may be mutable - compatibility. + + UBool fTraceDebug; // Set true for debug tracing of match engine. + + UErrorCode fDeferredStatus; // Save error state that cannot be immediately + // reported, or that permanently disables this matcher. + + RuleBasedBreakIterator *fWordBreakItr; +}; + +U_NAMESPACE_END +#endif // UCONFIG_NO_REGULAR_EXPRESSIONS +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/region.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/region.h new file mode 100755 index 00000000..80b2929e --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/region.h @@ -0,0 +1,224 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ******************************************************************************* + * Copyright (C) 2014-2016, International Business Machines Corporation and others. + * All Rights Reserved. + ******************************************************************************* + */ + +#ifndef REGION_H +#define REGION_H + +/** + * \file + * \brief C++ API: Region classes (territory containment) + */ + +#include "unicode/utypes.h" +#include "unicode/uregion.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/uobject.h" +#include "unicode/uniset.h" +#include "unicode/unistr.h" +#include "unicode/strenum.h" + +U_NAMESPACE_BEGIN + +/** + * <code>Region</code> is the class representing a Unicode Region Code, also known as a + * Unicode Region Subtag, which is defined based upon the BCP 47 standard. We often think of + * "regions" as "countries" when defining the characteristics of a locale. Region codes There are different + * types of region codes that are important to distinguish. + * <p> + * Macroregion - A code for a "macro geographical (continental) region, geographical sub-region, or + * selected economic and other grouping" as defined in + * UN M.49 (http://unstats.un.org/unsd/methods/m49/m49regin.htm). + * These are typically 3-digit codes, but contain some 2-letter codes, such as the LDML code QO + * added for Outlying Oceania. Not all UNM.49 codes are defined in LDML, but most of them are. + * Macroregions are represented in ICU by one of three region types: WORLD ( region code 001 ), + * CONTINENTS ( regions contained directly by WORLD ), and SUBCONTINENTS ( things contained directly + * by a continent ). + * <p> + * TERRITORY - A Region that is not a Macroregion. These are typically codes for countries, but also + * include areas that are not separate countries, such as the code "AQ" for Antarctica or the code + * "HK" for Hong Kong (SAR China). Overseas dependencies of countries may or may not have separate + * codes. The codes are typically 2-letter codes aligned with the ISO 3166 standard, but BCP47 allows + * for the use of 3-digit codes in the future. + * <p> + * UNKNOWN - The code ZZ is defined by Unicode LDML for use to indicate that the Region is unknown, + * or that the value supplied as a region was invalid. + * <p> + * DEPRECATED - Region codes that have been defined in the past but are no longer in modern usage, + * usually due to a country splitting into multiple territories or changing its name. + * <p> + * GROUPING - A widely understood grouping of territories that has a well defined membership such + * that a region code has been assigned for it. Some of these are UNM.49 codes that do't fall into + * the world/continent/sub-continent hierarchy, while others are just well known groupings that have + * their own region code. Region "EU" (European Union) is one such region code that is a grouping. + * Groupings will never be returned by the getContainingRegion() API, since a different type of region + * ( WORLD, CONTINENT, or SUBCONTINENT ) will always be the containing region instead. + * + * The Region class is not intended for public subclassing. + * + * @author John Emmons + * @stable ICU 51 + */ + +class U_I18N_API Region : public UObject { +public: + /** + * Destructor. + * @stable ICU 51 + */ + virtual ~Region(); + + /** + * Returns true if the two regions are equal. + * @stable ICU 51 + */ + UBool operator==(const Region &that) const; + + /** + * Returns true if the two regions are NOT equal; that is, if operator ==() returns false. + * @stable ICU 51 + */ + UBool operator!=(const Region &that) const; + + /** + * Returns a pointer to a Region using the given region code. The region code can be either 2-letter ISO code, + * 3-letter ISO code, UNM.49 numeric code, or other valid Unicode Region Code as defined by the LDML specification. + * The identifier will be canonicalized internally using the supplemental metadata as defined in the CLDR. + * If the region code is NULL or not recognized, the appropriate error code will be set ( U_ILLEGAL_ARGUMENT_ERROR ) + * @stable ICU 51 + */ + static const Region* U_EXPORT2 getInstance(const char *region_code, UErrorCode &status); + + /** + * Returns a pointer to a Region using the given numeric region code. If the numeric region code is not recognized, + * the appropriate error code will be set ( U_ILLEGAL_ARGUMENT_ERROR ). + * @stable ICU 51 + */ + static const Region* U_EXPORT2 getInstance (int32_t code, UErrorCode &status); + + /** + * Returns an enumeration over the IDs of all known regions that match the given type. + * @stable ICU 55 + */ + static StringEnumeration* U_EXPORT2 getAvailable(URegionType type, UErrorCode &status); + + /** + * Returns a pointer to the region that contains this region. Returns NULL if this region is code "001" (World) + * or "ZZ" (Unknown region). For example, calling this method with region "IT" (Italy) returns the + * region "039" (Southern Europe). + * @stable ICU 51 + */ + const Region* getContainingRegion() const; + + /** + * Return a pointer to the region that geographically contains this region and matches the given type, + * moving multiple steps up the containment chain if necessary. Returns NULL if no containing region can be found + * that matches the given type. Note: The URegionTypes = "URGN_GROUPING", "URGN_DEPRECATED", or "URGN_UNKNOWN" + * are not appropriate for use in this API. NULL will be returned in this case. For example, calling this method + * with region "IT" (Italy) for type "URGN_CONTINENT" returns the region "150" ( Europe ). + * @stable ICU 51 + */ + const Region* getContainingRegion(URegionType type) const; + + /** + * Return an enumeration over the IDs of all the regions that are immediate children of this region in the + * region hierarchy. These returned regions could be either macro regions, territories, or a mixture of the two, + * depending on the containment data as defined in CLDR. This API may return NULL if this region doesn't have + * any sub-regions. For example, calling this method with region "150" (Europe) returns an enumeration containing + * the various sub regions of Europe - "039" (Southern Europe) - "151" (Eastern Europe) - "154" (Northern Europe) + * and "155" (Western Europe). + * @stable ICU 55 + */ + StringEnumeration* getContainedRegions(UErrorCode &status) const; + + /** + * Returns an enumeration over the IDs of all the regions that are children of this region anywhere in the region + * hierarchy and match the given type. This API may return an empty enumeration if this region doesn't have any + * sub-regions that match the given type. For example, calling this method with region "150" (Europe) and type + * "URGN_TERRITORY" returns a set containing all the territories in Europe ( "FR" (France) - "IT" (Italy) - "DE" (Germany) etc. ) + * @stable ICU 55 + */ + StringEnumeration* getContainedRegions( URegionType type, UErrorCode &status ) const; + + /** + * Returns true if this region contains the supplied other region anywhere in the region hierarchy. + * @stable ICU 51 + */ + UBool contains(const Region &other) const; + + /** + * For deprecated regions, return an enumeration over the IDs of the regions that are the preferred replacement + * regions for this region. Returns null for a non-deprecated region. For example, calling this method with region + * "SU" (Soviet Union) would return a list of the regions containing "RU" (Russia), "AM" (Armenia), "AZ" (Azerbaijan), etc... + * @stable ICU 55 + */ + StringEnumeration* getPreferredValues(UErrorCode &status) const; + + /** + * Return this region's canonical region code. + * @stable ICU 51 + */ + const char* getRegionCode() const; + + /** + * Return this region's numeric code. + * Returns a negative value if the given region does not have a numeric code assigned to it. + * @stable ICU 51 + */ + int32_t getNumericCode() const; + + /** + * Returns the region type of this region. + * @stable ICU 51 + */ + URegionType getType() const; + +#ifndef U_HIDE_INTERNAL_API + /** + * Cleans up statically allocated memory. + * @internal + */ + static void cleanupRegionData(); +#endif /* U_HIDE_INTERNAL_API */ + +private: + char id[4]; + UnicodeString idStr; + int32_t code; + URegionType type; + Region *containingRegion; + UVector *containedRegions; + UVector *preferredValues; + + /** + * Default Constructor. Internal - use factory methods only. + */ + Region(); + + + /* + * Initializes the region data from the ICU resource bundles. The region data + * contains the basic relationships such as which regions are known, what the numeric + * codes are, any known aliases, and the territory containment data. + * + * If the region data has already loaded, then this method simply returns without doing + * anything meaningful. + */ + + static void U_CALLCONV loadRegionData(UErrorCode &status); + +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ +#endif // REGION_H + +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/reldatefmt.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/reldatefmt.h new file mode 100755 index 00000000..09d9620b --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/reldatefmt.h @@ -0,0 +1,522 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +***************************************************************************** +* Copyright (C) 2014-2016, International Business Machines Corporation and +* others. +* All Rights Reserved. +***************************************************************************** +* +* File RELDATEFMT.H +***************************************************************************** +*/ + +#ifndef __RELDATEFMT_H +#define __RELDATEFMT_H + +#include "unicode/utypes.h" +#include "unicode/uobject.h" +#include "unicode/udisplaycontext.h" +#include "unicode/ureldatefmt.h" +#include "unicode/locid.h" + +/** + * \file + * \brief C++ API: Formats relative dates such as "1 day ago" or "tomorrow" + */ + +#if !UCONFIG_NO_FORMATTING + +/** + * Represents the unit for formatting a relative date. e.g "in 5 days" + * or "in 3 months" + * @stable ICU 53 + */ +typedef enum UDateRelativeUnit { + + /** + * Seconds + * @stable ICU 53 + */ + UDAT_RELATIVE_SECONDS, + + /** + * Minutes + * @stable ICU 53 + */ + UDAT_RELATIVE_MINUTES, + + /** + * Hours + * @stable ICU 53 + */ + UDAT_RELATIVE_HOURS, + + /** + * Days + * @stable ICU 53 + */ + UDAT_RELATIVE_DAYS, + + /** + * Weeks + * @stable ICU 53 + */ + UDAT_RELATIVE_WEEKS, + + /** + * Months + * @stable ICU 53 + */ + UDAT_RELATIVE_MONTHS, + + /** + * Years + * @stable ICU 53 + */ + UDAT_RELATIVE_YEARS, + +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UDateRelativeUnit value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UDAT_RELATIVE_UNIT_COUNT +#endif // U_HIDE_DEPRECATED_API +} UDateRelativeUnit; + +/** + * Represents an absolute unit. + * @stable ICU 53 + */ +typedef enum UDateAbsoluteUnit { + + // Days of week have to remain together and in order from Sunday to + // Saturday. + /** + * Sunday + * @stable ICU 53 + */ + UDAT_ABSOLUTE_SUNDAY, + + /** + * Monday + * @stable ICU 53 + */ + UDAT_ABSOLUTE_MONDAY, + + /** + * Tuesday + * @stable ICU 53 + */ + UDAT_ABSOLUTE_TUESDAY, + + /** + * Wednesday + * @stable ICU 53 + */ + UDAT_ABSOLUTE_WEDNESDAY, + + /** + * Thursday + * @stable ICU 53 + */ + UDAT_ABSOLUTE_THURSDAY, + + /** + * Friday + * @stable ICU 53 + */ + UDAT_ABSOLUTE_FRIDAY, + + /** + * Saturday + * @stable ICU 53 + */ + UDAT_ABSOLUTE_SATURDAY, + + /** + * Day + * @stable ICU 53 + */ + UDAT_ABSOLUTE_DAY, + + /** + * Week + * @stable ICU 53 + */ + UDAT_ABSOLUTE_WEEK, + + /** + * Month + * @stable ICU 53 + */ + UDAT_ABSOLUTE_MONTH, + + /** + * Year + * @stable ICU 53 + */ + UDAT_ABSOLUTE_YEAR, + + /** + * Now + * @stable ICU 53 + */ + UDAT_ABSOLUTE_NOW, + +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UDateAbsoluteUnit value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UDAT_ABSOLUTE_UNIT_COUNT +#endif // U_HIDE_DEPRECATED_API +} UDateAbsoluteUnit; + +/** + * Represents a direction for an absolute unit e.g "Next Tuesday" + * or "Last Tuesday" + * @stable ICU 53 + */ +typedef enum UDateDirection { + + /** + * Two before. Not fully supported in every locale. + * @stable ICU 53 + */ + UDAT_DIRECTION_LAST_2, + + /** + * Last + * @stable ICU 53 + */ + UDAT_DIRECTION_LAST, + + /** + * This + * @stable ICU 53 + */ + UDAT_DIRECTION_THIS, + + /** + * Next + * @stable ICU 53 + */ + UDAT_DIRECTION_NEXT, + + /** + * Two after. Not fully supported in every locale. + * @stable ICU 53 + */ + UDAT_DIRECTION_NEXT_2, + + /** + * Plain, which means the absence of a qualifier. + * @stable ICU 53 + */ + UDAT_DIRECTION_PLAIN, + +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UDateDirection value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UDAT_DIRECTION_COUNT +#endif // U_HIDE_DEPRECATED_API +} UDateDirection; + +#if !UCONFIG_NO_BREAK_ITERATION + +U_NAMESPACE_BEGIN + +class BreakIterator; +class RelativeDateTimeCacheData; +class SharedNumberFormat; +class SharedPluralRules; +class SharedBreakIterator; +class NumberFormat; +class UnicodeString; + +/** + * Formats simple relative dates. There are two types of relative dates that + * it handles: + * <ul> + * <li>relative dates with a quantity e.g "in 5 days"</li> + * <li>relative dates without a quantity e.g "next Tuesday"</li> + * </ul> + * <p> + * This API is very basic and is intended to be a building block for more + * fancy APIs. The caller tells it exactly what to display in a locale + * independent way. While this class automatically provides the correct plural + * forms, the grammatical form is otherwise as neutral as possible. It is the + * caller's responsibility to handle cut-off logic such as deciding between + * displaying "in 7 days" or "in 1 week." This API supports relative dates + * involving one single unit. This API does not support relative dates + * involving compound units, + * e.g "in 5 days and 4 hours" nor does it support parsing. + * <p> + * This class is mostly thread safe and immutable with the following caveats: + * 1. The assignment operator violates Immutability. It must not be used + * concurrently with other operations. + * 2. Caller must not hold onto adopted pointers. + * <p> + * This class is not intended for public subclassing. + * <p> + * Here are some examples of use: + * <blockquote> + * <pre> + * UErrorCode status = U_ZERO_ERROR; + * UnicodeString appendTo; + * RelativeDateTimeFormatter fmt(status); + * // Appends "in 1 day" + * fmt.format( + * 1, UDAT_DIRECTION_NEXT, UDAT_RELATIVE_DAYS, appendTo, status); + * // Appends "in 3 days" + * fmt.format( + * 3, UDAT_DIRECTION_NEXT, UDAT_RELATIVE_DAYS, appendTo, status); + * // Appends "3.2 years ago" + * fmt.format( + * 3.2, UDAT_DIRECTION_LAST, UDAT_RELATIVE_YEARS, appendTo, status); + * // Appends "last Sunday" + * fmt.format(UDAT_DIRECTION_LAST, UDAT_ABSOLUTE_SUNDAY, appendTo, status); + * // Appends "this Sunday" + * fmt.format(UDAT_DIRECTION_THIS, UDAT_ABSOLUTE_SUNDAY, appendTo, status); + * // Appends "next Sunday" + * fmt.format(UDAT_DIRECTION_NEXT, UDAT_ABSOLUTE_SUNDAY, appendTo, status); + * // Appends "Sunday" + * fmt.format(UDAT_DIRECTION_PLAIN, UDAT_ABSOLUTE_SUNDAY, appendTo, status); + * + * // Appends "yesterday" + * fmt.format(UDAT_DIRECTION_LAST, UDAT_ABSOLUTE_DAY, appendTo, status); + * // Appends "today" + * fmt.format(UDAT_DIRECTION_THIS, UDAT_ABSOLUTE_DAY, appendTo, status); + * // Appends "tomorrow" + * fmt.format(UDAT_DIRECTION_NEXT, UDAT_ABSOLUTE_DAY, appendTo, status); + * // Appends "now" + * fmt.format(UDAT_DIRECTION_PLAIN, UDAT_ABSOLUTE_NOW, appendTo, status); + * + * </pre> + * </blockquote> + * <p> + * In the future, we may add more forms, such as abbreviated/short forms + * (3 secs ago), and relative day periods ("yesterday afternoon"), etc. + * + * The RelativeDateTimeFormatter class is not intended for public subclassing. + * + * @stable ICU 53 + */ +class U_I18N_API RelativeDateTimeFormatter : public UObject { +public: + + /** + * Create RelativeDateTimeFormatter with default locale. + * @stable ICU 53 + */ + RelativeDateTimeFormatter(UErrorCode& status); + + /** + * Create RelativeDateTimeFormatter with given locale. + * @stable ICU 53 + */ + RelativeDateTimeFormatter(const Locale& locale, UErrorCode& status); + + /** + * Create RelativeDateTimeFormatter with given locale and NumberFormat. + * + * @param locale the locale + * @param nfToAdopt Constructed object takes ownership of this pointer. + * It is an error for caller to delete this pointer or change its + * contents after calling this constructor. + * @status Any error is returned here. + * @stable ICU 53 + */ + RelativeDateTimeFormatter( + const Locale& locale, NumberFormat *nfToAdopt, UErrorCode& status); + + /** + * Create RelativeDateTimeFormatter with given locale, NumberFormat, + * and capitalization context. + * + * @param locale the locale + * @param nfToAdopt Constructed object takes ownership of this pointer. + * It is an error for caller to delete this pointer or change its + * contents after calling this constructor. Caller may pass NULL for + * this argument if they want default number format behavior. + * @param style the format style. The UDAT_RELATIVE bit field has no effect. + * @param capitalizationContext A value from UDisplayContext that pertains to + * capitalization. + * @status Any error is returned here. + * @stable ICU 54 + */ + RelativeDateTimeFormatter( + const Locale& locale, + NumberFormat *nfToAdopt, + UDateRelativeDateTimeFormatterStyle style, + UDisplayContext capitalizationContext, + UErrorCode& status); + + /** + * Copy constructor. + * @stable ICU 53 + */ + RelativeDateTimeFormatter(const RelativeDateTimeFormatter& other); + + /** + * Assignment operator. + * @stable ICU 53 + */ + RelativeDateTimeFormatter& operator=( + const RelativeDateTimeFormatter& other); + + /** + * Destructor. + * @stable ICU 53 + */ + virtual ~RelativeDateTimeFormatter(); + + /** + * Formats a relative date with a quantity such as "in 5 days" or + * "3 months ago" + * @param quantity The numerical amount e.g 5. This value is formatted + * according to this object's NumberFormat object. + * @param direction NEXT means a future relative date; LAST means a past + * relative date. If direction is anything else, this method sets + * status to U_ILLEGAL_ARGUMENT_ERROR. + * @param unit the unit e.g day? month? year? + * @param appendTo The string to which the formatted result will be + * appended + * @param status ICU error code returned here. + * @return appendTo + * @stable ICU 53 + */ + UnicodeString& format( + double quantity, + UDateDirection direction, + UDateRelativeUnit unit, + UnicodeString& appendTo, + UErrorCode& status) const; + + /** + * Formats a relative date without a quantity. + * @param direction NEXT, LAST, THIS, etc. + * @param unit e.g SATURDAY, DAY, MONTH + * @param appendTo The string to which the formatted result will be + * appended. If the value of direction is documented as not being fully + * supported in all locales then this method leaves appendTo unchanged if + * no format string is available. + * @param status ICU error code returned here. + * @return appendTo + * @stable ICU 53 + */ + UnicodeString& format( + UDateDirection direction, + UDateAbsoluteUnit unit, + UnicodeString& appendTo, + UErrorCode& status) const; + + /** + * Format a combination of URelativeDateTimeUnit and numeric offset + * using a numeric style, e.g. "1 week ago", "in 1 week", + * "5 weeks ago", "in 5 weeks". + * + * @param offset The signed offset for the specified unit. This + * will be formatted according to this object's + * NumberFormat object. + * @param unit The unit to use when formatting the relative + * date, e.g. UDAT_REL_UNIT_WEEK, + * UDAT_REL_UNIT_FRIDAY. + * @param appendTo The string to which the formatted result will be + * appended. + * @param status ICU error code returned here. + * @return appendTo + * @stable ICU 57 + */ + UnicodeString& formatNumeric( + double offset, + URelativeDateTimeUnit unit, + UnicodeString& appendTo, + UErrorCode& status) const; + + /** + * Format a combination of URelativeDateTimeUnit and numeric offset + * using a text style if possible, e.g. "last week", "this week", + * "next week", "yesterday", "tomorrow". Falls back to numeric + * style if no appropriate text term is available for the specified + * offset in the object's locale. + * + * @param offset The signed offset for the specified unit. + * @param unit The unit to use when formatting the relative + * date, e.g. UDAT_REL_UNIT_WEEK, + * UDAT_REL_UNIT_FRIDAY. + * @param appendTo The string to which the formatted result will be + * appended. + * @param status ICU error code returned here. + * @return appendTo + * @stable ICU 57 + */ + UnicodeString& format( + double offset, + URelativeDateTimeUnit unit, + UnicodeString& appendTo, + UErrorCode& status) const; + + /** + * Combines a relative date string and a time string in this object's + * locale. This is done with the same date-time separator used for the + * default calendar in this locale. + * + * @param relativeDateString the relative date, e.g 'yesterday' + * @param timeString the time e.g '3:45' + * @param appendTo concatenated date and time appended here + * @param status ICU error code returned here. + * @return appendTo + * @stable ICU 53 + */ + UnicodeString& combineDateAndTime( + const UnicodeString& relativeDateString, + const UnicodeString& timeString, + UnicodeString& appendTo, + UErrorCode& status) const; + + /** + * Returns the NumberFormat this object is using. + * + * @stable ICU 53 + */ + const NumberFormat& getNumberFormat() const; + + /** + * Returns the capitalization context. + * + * @stable ICU 54 + */ + UDisplayContext getCapitalizationContext() const; + + /** + * Returns the format style. + * + * @stable ICU 54 + */ + UDateRelativeDateTimeFormatterStyle getFormatStyle() const; + +private: + const RelativeDateTimeCacheData* fCache; + const SharedNumberFormat *fNumberFormat; + const SharedPluralRules *fPluralRules; + UDateRelativeDateTimeFormatterStyle fStyle; + UDisplayContext fContext; + const SharedBreakIterator *fOptBreakIterator; + Locale fLocale; + void init( + NumberFormat *nfToAdopt, + BreakIterator *brkIter, + UErrorCode &status); + void adjustForContext(UnicodeString &) const; +}; + +U_NAMESPACE_END + +#endif /* !UCONFIG_NO_BREAK_ITERATION */ +#endif /* !UCONFIG_NO_FORMATTING */ +#endif /* __RELDATEFMT_H */ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/rep.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/rep.h new file mode 100755 index 00000000..41fdc040 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/rep.h @@ -0,0 +1,263 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +************************************************************************** +* Copyright (C) 1999-2012, International Business Machines Corporation and +* others. All Rights Reserved. +************************************************************************** +* Date Name Description +* 11/17/99 aliu Creation. Ported from java. Modified to +* match current UnicodeString API. Forced +* to use name "handleReplaceBetween" because +* of existing methods in UnicodeString. +************************************************************************** +*/ + +#ifndef REP_H +#define REP_H + +#include "unicode/uobject.h" + +/** + * \file + * \brief C++ API: Replaceable String + */ + +U_NAMESPACE_BEGIN + +class UnicodeString; + +/** + * <code>Replaceable</code> is an abstract base class representing a + * string of characters that supports the replacement of a range of + * itself with a new string of characters. It is used by APIs that + * change a piece of text while retaining metadata. Metadata is data + * other than the Unicode characters returned by char32At(). One + * example of metadata is style attributes; another is an edit + * history, marking each character with an author and revision number. + * + * <p>An implicit aspect of the <code>Replaceable</code> API is that + * during a replace operation, new characters take on the metadata of + * the old characters. For example, if the string "the <b>bold</b> + * font" has range (4, 8) replaced with "strong", then it becomes "the + * <b>strong</b> font". + * + * <p><code>Replaceable</code> specifies ranges using a start + * offset and a limit offset. The range of characters thus specified + * includes the characters at offset start..limit-1. That is, the + * start offset is inclusive, and the limit offset is exclusive. + * + * <p><code>Replaceable</code> also includes API to access characters + * in the string: <code>length()</code>, <code>charAt()</code>, + * <code>char32At()</code>, and <code>extractBetween()</code>. + * + * <p>For a subclass to support metadata, typical behavior of + * <code>replace()</code> is the following: + * <ul> + * <li>Set the metadata of the new text to the metadata of the first + * character replaced</li> + * <li>If no characters are replaced, use the metadata of the + * previous character</li> + * <li>If there is no previous character (i.e. start == 0), use the + * following character</li> + * <li>If there is no following character (i.e. the replaceable was + * empty), use default metadata.<br> + * <li>If the code point U+FFFF is seen, it should be interpreted as + * a special marker having no metadata<li> + * </li> + * </ul> + * If this is not the behavior, the subclass should document any differences. + * @author Alan Liu + * @stable ICU 2.0 + */ +class U_COMMON_API Replaceable : public UObject { + +public: + /** + * Destructor. + * @stable ICU 2.0 + */ + virtual ~Replaceable(); + + /** + * Returns the number of 16-bit code units in the text. + * @return number of 16-bit code units in text + * @stable ICU 1.8 + */ + inline int32_t length() const; + + /** + * Returns the 16-bit code unit at the given offset into the text. + * @param offset an integer between 0 and <code>length()</code>-1 + * inclusive + * @return 16-bit code unit of text at given offset + * @stable ICU 1.8 + */ + inline char16_t charAt(int32_t offset) const; + + /** + * Returns the 32-bit code point at the given 16-bit offset into + * the text. This assumes the text is stored as 16-bit code units + * with surrogate pairs intermixed. If the offset of a leading or + * trailing code unit of a surrogate pair is given, return the + * code point of the surrogate pair. + * + * @param offset an integer between 0 and <code>length()</code>-1 + * inclusive + * @return 32-bit code point of text at given offset + * @stable ICU 1.8 + */ + inline UChar32 char32At(int32_t offset) const; + + /** + * Copies characters in the range [<tt>start</tt>, <tt>limit</tt>) + * into the UnicodeString <tt>target</tt>. + * @param start offset of first character which will be copied + * @param limit offset immediately following the last character to + * be copied + * @param target UnicodeString into which to copy characters. + * @return A reference to <TT>target</TT> + * @stable ICU 2.1 + */ + virtual void extractBetween(int32_t start, + int32_t limit, + UnicodeString& target) const = 0; + + /** + * Replaces a substring of this object with the given text. If the + * characters being replaced have metadata, the new characters + * that replace them should be given the same metadata. + * + * <p>Subclasses must ensure that if the text between start and + * limit is equal to the replacement text, that replace has no + * effect. That is, any metadata + * should be unaffected. In addition, subclasses are encouraged to + * check for initial and trailing identical characters, and make a + * smaller replacement if possible. This will preserve as much + * metadata as possible. + * @param start the beginning index, inclusive; <code>0 <= start + * <= limit</code>. + * @param limit the ending index, exclusive; <code>start <= limit + * <= length()</code>. + * @param text the text to replace characters <code>start</code> + * to <code>limit - 1</code> + * @stable ICU 2.0 + */ + virtual void handleReplaceBetween(int32_t start, + int32_t limit, + const UnicodeString& text) = 0; + // Note: All other methods in this class take the names of + // existing UnicodeString methods. This method is the exception. + // It is named differently because all replace methods of + // UnicodeString return a UnicodeString&. The 'between' is + // required in order to conform to the UnicodeString naming + // convention; API taking start/length are named <operation>, and + // those taking start/limit are named <operationBetween>. The + // 'handle' is added because 'replaceBetween' and + // 'doReplaceBetween' are already taken. + + /** + * Copies a substring of this object, retaining metadata. + * This method is used to duplicate or reorder substrings. + * The destination index must not overlap the source range. + * + * @param start the beginning index, inclusive; <code>0 <= start <= + * limit</code>. + * @param limit the ending index, exclusive; <code>start <= limit <= + * length()</code>. + * @param dest the destination index. The characters from + * <code>start..limit-1</code> will be copied to <code>dest</code>. + * Implementations of this method may assume that <code>dest <= start || + * dest >= limit</code>. + * @stable ICU 2.0 + */ + virtual void copy(int32_t start, int32_t limit, int32_t dest) = 0; + + /** + * Returns true if this object contains metadata. If a + * Replaceable object has metadata, calls to the Replaceable API + * must be made so as to preserve metadata. If it does not, calls + * to the Replaceable API may be optimized to improve performance. + * The default implementation returns true. + * @return true if this object contains metadata + * @stable ICU 2.2 + */ + virtual UBool hasMetaData() const; + + /** + * Clone this object, an instance of a subclass of Replaceable. + * Clones can be used concurrently in multiple threads. + * If a subclass does not implement clone(), or if an error occurs, + * then NULL is returned. + * The clone functions in all subclasses return a pointer to a Replaceable + * because some compilers do not support covariant (same-as-this) + * return types; cast to the appropriate subclass if necessary. + * The caller must delete the clone. + * + * @return a clone of this object + * + * @see getDynamicClassID + * @stable ICU 2.6 + */ + virtual Replaceable *clone() const; + +protected: + + /** + * Default constructor. + * @stable ICU 2.4 + */ + inline Replaceable(); + + /* + * Assignment operator not declared. The compiler will provide one + * which does nothing since this class does not contain any data members. + * API/code coverage may show the assignment operator as present and + * untested - ignore. + * Subclasses need this assignment operator if they use compiler-provided + * assignment operators of their own. An alternative to not declaring one + * here would be to declare and empty-implement a protected or public one. + Replaceable &Replaceable::operator=(const Replaceable &); + */ + + /** + * Virtual version of length(). + * @stable ICU 2.4 + */ + virtual int32_t getLength() const = 0; + + /** + * Virtual version of charAt(). + * @stable ICU 2.4 + */ + virtual char16_t getCharAt(int32_t offset) const = 0; + + /** + * Virtual version of char32At(). + * @stable ICU 2.4 + */ + virtual UChar32 getChar32At(int32_t offset) const = 0; +}; + +inline Replaceable::Replaceable() {} + +inline int32_t +Replaceable::length() const { + return getLength(); +} + +inline char16_t +Replaceable::charAt(int32_t offset) const { + return getCharAt(offset); +} + +inline UChar32 +Replaceable::char32At(int32_t offset) const { + return getChar32At(offset); +} + +// There is no rep.cpp, see unistr.cpp for Replaceable function implementations. + +U_NAMESPACE_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/resbund.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/resbund.h new file mode 100755 index 00000000..ad589900 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/resbund.h @@ -0,0 +1,492 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* +* Copyright (C) 1996-2013, International Business Machines Corporation +* and others. All Rights Reserved. +* +****************************************************************************** +* +* File resbund.h +* +* CREATED BY +* Richard Gillam +* +* Modification History: +* +* Date Name Description +* 2/5/97 aliu Added scanForLocaleInFile. Added +* constructor which attempts to read resource bundle +* from a specific file, without searching other files. +* 2/11/97 aliu Added UErrorCode return values to constructors. Fixed +* infinite loops in scanForFile and scanForLocale. +* Modified getRawResourceData to not delete storage +* in localeData and resourceData which it doesn't own. +* Added Mac compatibility #ifdefs for tellp() and +* ios::nocreate. +* 2/18/97 helena Updated with 100% documentation coverage. +* 3/13/97 aliu Rewrote to load in entire resource bundle and store +* it as a Hashtable of ResourceBundleData objects. +* Added state table to govern parsing of files. +* Modified to load locale index out of new file +* distinct from default.txt. +* 3/25/97 aliu Modified to support 2-d arrays, needed for timezone +* data. Added support for custom file suffixes. Again, +* needed to support timezone data. +* 4/7/97 aliu Cleaned up. +* 03/02/99 stephen Removed dependency on FILE*. +* 03/29/99 helena Merged Bertrand and Stephen's changes. +* 06/11/99 stephen Removed parsing of .txt files. +* Reworked to use new binary format. +* Cleaned up. +* 06/14/99 stephen Removed methods taking a filename suffix. +* 11/09/99 weiv Added getLocale(), fRealLocale, removed fRealLocaleID +****************************************************************************** +*/ + +#ifndef RESBUND_H +#define RESBUND_H + +#include "unicode/utypes.h" +#include "unicode/uobject.h" +#include "unicode/ures.h" +#include "unicode/unistr.h" +#include "unicode/locid.h" + +/** + * \file + * \brief C++ API: Resource Bundle + */ + +U_NAMESPACE_BEGIN + +/** + * A class representing a collection of resource information pertaining to a given + * locale. A resource bundle provides a way of accessing locale- specfic information in + * a data file. You create a resource bundle that manages the resources for a given + * locale and then ask it for individual resources. + * <P> + * Resource bundles in ICU4C are currently defined using text files which conform to the following + * <a href="http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt">BNF definition</a>. + * More on resource bundle concepts and syntax can be found in the + * <a href="http://icu-project.org/userguide/ResourceManagement.html">Users Guide</a>. + * <P> + * + * The ResourceBundle class is not suitable for subclassing. + * + * @stable ICU 2.0 + */ +class U_COMMON_API ResourceBundle : public UObject { +public: + /** + * Constructor + * + * @param packageName The packageName and locale together point to an ICU udata object, + * as defined by <code> udata_open( packageName, "res", locale, err) </code> + * or equivalent. Typically, packageName will refer to a (.dat) file, or to + * a package registered with udata_setAppData(). Using a full file or directory + * pathname for packageName is deprecated. + * @param locale This is the locale this resource bundle is for. To get resources + * for the French locale, for example, you would create a + * ResourceBundle passing Locale::FRENCH for the "locale" parameter, + * and all subsequent calls to that resource bundle will return + * resources that pertain to the French locale. If the caller doesn't + * pass a locale parameter, the default locale for the system (as + * returned by Locale::getDefault()) will be used. + * @param err The Error Code. + * The UErrorCode& err parameter is used to return status information to the user. To + * check whether the construction succeeded or not, you should check the value of + * U_SUCCESS(err). If you wish more detailed information, you can check for + * informational error results which still indicate success. U_USING_FALLBACK_WARNING + * indicates that a fall back locale was used. For example, 'de_CH' was requested, + * but nothing was found there, so 'de' was used. U_USING_DEFAULT_WARNING indicates that + * the default locale data was used; neither the requested locale nor any of its + * fall back locales could be found. + * @stable ICU 2.0 + */ + ResourceBundle(const UnicodeString& packageName, + const Locale& locale, + UErrorCode& err); + + /** + * Construct a resource bundle for the default bundle in the specified package. + * + * @param packageName The packageName and locale together point to an ICU udata object, + * as defined by <code> udata_open( packageName, "res", locale, err) </code> + * or equivalent. Typically, packageName will refer to a (.dat) file, or to + * a package registered with udata_setAppData(). Using a full file or directory + * pathname for packageName is deprecated. + * @param err A UErrorCode value + * @stable ICU 2.0 + */ + ResourceBundle(const UnicodeString& packageName, + UErrorCode& err); + + /** + * Construct a resource bundle for the ICU default bundle. + * + * @param err A UErrorCode value + * @stable ICU 2.0 + */ + ResourceBundle(UErrorCode &err); + + /** + * Standard constructor, constructs a resource bundle for the locale-specific + * bundle in the specified package. + * + * @param packageName The packageName and locale together point to an ICU udata object, + * as defined by <code> udata_open( packageName, "res", locale, err) </code> + * or equivalent. Typically, packageName will refer to a (.dat) file, or to + * a package registered with udata_setAppData(). Using a full file or directory + * pathname for packageName is deprecated. + * NULL is used to refer to ICU data. + * @param locale The locale for which to open a resource bundle. + * @param err A UErrorCode value + * @stable ICU 2.0 + */ + ResourceBundle(const char* packageName, + const Locale& locale, + UErrorCode& err); + + /** + * Copy constructor. + * + * @param original The resource bundle to copy. + * @stable ICU 2.0 + */ + ResourceBundle(const ResourceBundle &original); + + /** + * Constructor from a C UResourceBundle. The resource bundle is + * copied and not adopted. ures_close will still need to be used on the + * original resource bundle. + * + * @param res A pointer to the C resource bundle. + * @param status A UErrorCode value. + * @stable ICU 2.0 + */ + ResourceBundle(UResourceBundle *res, + UErrorCode &status); + + /** + * Assignment operator. + * + * @param other The resource bundle to copy. + * @stable ICU 2.0 + */ + ResourceBundle& + operator=(const ResourceBundle& other); + + /** Destructor. + * @stable ICU 2.0 + */ + virtual ~ResourceBundle(); + + /** + * Clone this object. + * Clones can be used concurrently in multiple threads. + * If an error occurs, then NULL is returned. + * The caller must delete the clone. + * + * @return a clone of this object + * + * @see getDynamicClassID + * @stable ICU 2.8 + */ + ResourceBundle *clone() const; + + /** + * Returns the size of a resource. Size for scalar types is always 1, and for vector/table types is + * the number of child resources. + * @warning Integer array is treated as a scalar type. There are no + * APIs to access individual members of an integer array. It + * is always returned as a whole. + * + * @return number of resources in a given resource. + * @stable ICU 2.0 + */ + int32_t + getSize(void) const; + + /** + * returns a string from a string resource type + * + * @param status fills in the outgoing error code + * could be <TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not found + * could be a warning + * e.g.: <TT>U_USING_FALLBACK_WARNING</TT>,<TT>U_USING_DEFAULT_WARNING </TT> + * @return a pointer to a zero-terminated char16_t array which lives in a memory mapped/DLL file. + * @stable ICU 2.0 + */ + UnicodeString + getString(UErrorCode& status) const; + + /** + * returns a binary data from a resource. Can be used at most primitive resource types (binaries, + * strings, ints) + * + * @param len fills in the length of resulting byte chunk + * @param status fills in the outgoing error code + * could be <TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not found + * could be a warning + * e.g.: <TT>U_USING_FALLBACK_WARNING</TT>,<TT>U_USING_DEFAULT_WARNING </TT> + * @return a pointer to a chunk of unsigned bytes which live in a memory mapped/DLL file. + * @stable ICU 2.0 + */ + const uint8_t* + getBinary(int32_t& len, UErrorCode& status) const; + + + /** + * returns an integer vector from a resource. + * + * @param len fills in the length of resulting integer vector + * @param status fills in the outgoing error code + * could be <TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not found + * could be a warning + * e.g.: <TT>U_USING_FALLBACK_WARNING</TT>,<TT>U_USING_DEFAULT_WARNING </TT> + * @return a pointer to a vector of integers that lives in a memory mapped/DLL file. + * @stable ICU 2.0 + */ + const int32_t* + getIntVector(int32_t& len, UErrorCode& status) const; + + /** + * returns an unsigned integer from a resource. + * This integer is originally 28 bits. + * + * @param status fills in the outgoing error code + * could be <TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not found + * could be a warning + * e.g.: <TT>U_USING_FALLBACK_WARNING</TT>,<TT>U_USING_DEFAULT_WARNING </TT> + * @return an unsigned integer value + * @stable ICU 2.0 + */ + uint32_t + getUInt(UErrorCode& status) const; + + /** + * returns a signed integer from a resource. + * This integer is originally 28 bit and the sign gets propagated. + * + * @param status fills in the outgoing error code + * could be <TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not found + * could be a warning + * e.g.: <TT>U_USING_FALLBACK_WARNING</TT>,<TT>U_USING_DEFAULT_WARNING </TT> + * @return a signed integer value + * @stable ICU 2.0 + */ + int32_t + getInt(UErrorCode& status) const; + + /** + * Checks whether the resource has another element to iterate over. + * + * @return TRUE if there are more elements, FALSE if there is no more elements + * @stable ICU 2.0 + */ + UBool + hasNext(void) const; + + /** + * Resets the internal context of a resource so that iteration starts from the first element. + * + * @stable ICU 2.0 + */ + void + resetIterator(void); + + /** + * Returns the key associated with this resource. Not all the resources have a key - only + * those that are members of a table. + * + * @return a key associated to this resource, or NULL if it doesn't have a key + * @stable ICU 2.0 + */ + const char* + getKey(void) const; + + /** + * Gets the locale ID of the resource bundle as a string. + * Same as getLocale().getName() . + * + * @return the locale ID of the resource bundle as a string + * @stable ICU 2.0 + */ + const char* + getName(void) const; + + + /** + * Returns the type of a resource. Available types are defined in enum UResType + * + * @return type of the given resource. + * @stable ICU 2.0 + */ + UResType + getType(void) const; + + /** + * Returns the next resource in a given resource or NULL if there are no more resources + * + * @param status fills in the outgoing error code + * @return ResourceBundle object. + * @stable ICU 2.0 + */ + ResourceBundle + getNext(UErrorCode& status); + + /** + * Returns the next string in a resource or NULL if there are no more resources + * to iterate over. + * + * @param status fills in the outgoing error code + * @return an UnicodeString object. + * @stable ICU 2.0 + */ + UnicodeString + getNextString(UErrorCode& status); + + /** + * Returns the next string in a resource or NULL if there are no more resources + * to iterate over. + * + * @param key fill in for key associated with this string + * @param status fills in the outgoing error code + * @return an UnicodeString object. + * @stable ICU 2.0 + */ + UnicodeString + getNextString(const char ** key, + UErrorCode& status); + + /** + * Returns the resource in a resource at the specified index. + * + * @param index an index to the wanted resource. + * @param status fills in the outgoing error code + * @return ResourceBundle object. If there is an error, resource is invalid. + * @stable ICU 2.0 + */ + ResourceBundle + get(int32_t index, + UErrorCode& status) const; + + /** + * Returns the string in a given resource at the specified index. + * + * @param index an index to the wanted string. + * @param status fills in the outgoing error code + * @return an UnicodeString object. If there is an error, string is bogus + * @stable ICU 2.0 + */ + UnicodeString + getStringEx(int32_t index, + UErrorCode& status) const; + + /** + * Returns a resource in a resource that has a given key. This procedure works only with table + * resources. + * + * @param key a key associated with the wanted resource + * @param status fills in the outgoing error code. + * @return ResourceBundle object. If there is an error, resource is invalid. + * @stable ICU 2.0 + */ + ResourceBundle + get(const char* key, + UErrorCode& status) const; + + /** + * Returns a string in a resource that has a given key. This procedure works only with table + * resources. + * + * @param key a key associated with the wanted string + * @param status fills in the outgoing error code + * @return an UnicodeString object. If there is an error, string is bogus + * @stable ICU 2.0 + */ + UnicodeString + getStringEx(const char* key, + UErrorCode& status) const; + +#ifndef U_HIDE_DEPRECATED_API + /** + * Return the version number associated with this ResourceBundle as a string. Please + * use getVersion, as this method is going to be deprecated. + * + * @return A version number string as specified in the resource bundle or its parent. + * The caller does not own this string. + * @see getVersion + * @deprecated ICU 2.8 Use getVersion instead. + */ + const char* + getVersionNumber(void) const; +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Return the version number associated with this ResourceBundle as a UVersionInfo array. + * + * @param versionInfo A UVersionInfo array that is filled with the version number + * as specified in the resource bundle or its parent. + * @stable ICU 2.0 + */ + void + getVersion(UVersionInfo versionInfo) const; + +#ifndef U_HIDE_DEPRECATED_API + /** + * Return the Locale associated with this ResourceBundle. + * + * @return a Locale object + * @deprecated ICU 2.8 Use getLocale(ULocDataLocaleType type, UErrorCode &status) overload instead. + */ + const Locale& + getLocale(void) const; +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Return the Locale associated with this ResourceBundle. + * @param type You can choose between requested, valid and actual + * locale. For description see the definition of + * ULocDataLocaleType in uloc.h + * @param status just for catching illegal arguments + * + * @return a Locale object + * @stable ICU 2.8 + */ + const Locale + getLocale(ULocDataLocaleType type, UErrorCode &status) const; +#ifndef U_HIDE_INTERNAL_API + /** + * This API implements multilevel fallback + * @internal + */ + ResourceBundle + getWithFallback(const char* key, UErrorCode& status); +#endif /* U_HIDE_INTERNAL_API */ + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.2 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.2 + */ + static UClassID U_EXPORT2 getStaticClassID(); + +private: + ResourceBundle(); // default constructor not implemented + + UResourceBundle *fResource; + void constructForLocale(const UnicodeString& path, const Locale& locale, UErrorCode& error); + Locale *fLocale; +}; + +U_NAMESPACE_END +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/schriter.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/schriter.h new file mode 100755 index 00000000..42f02691 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/schriter.h @@ -0,0 +1,189 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* +* Copyright (C) 1998-2005, International Business Machines +* Corporation and others. All Rights Reserved. +* +****************************************************************************** +* +* File schriter.h +* +* Modification History: +* +* Date Name Description +* 05/05/99 stephen Cleaned up. +****************************************************************************** +*/ + +#ifndef SCHRITER_H +#define SCHRITER_H + +#include "unicode/utypes.h" +#include "unicode/chariter.h" +#include "unicode/uchriter.h" + +/** + * \file + * \brief C++ API: String Character Iterator + */ + +U_NAMESPACE_BEGIN +/** + * A concrete subclass of CharacterIterator that iterates over the + * characters (code units or code points) in a UnicodeString. + * It's possible not only to create an + * iterator that iterates over an entire UnicodeString, but also to + * create one that iterates over only a subrange of a UnicodeString + * (iterators over different subranges of the same UnicodeString don't + * compare equal). + * @see CharacterIterator + * @see ForwardCharacterIterator + * @stable ICU 2.0 + */ +class U_COMMON_API StringCharacterIterator : public UCharCharacterIterator { +public: + /** + * Create an iterator over the UnicodeString referred to by "textStr". + * The UnicodeString object is copied. + * The iteration range is the whole string, and the starting position is 0. + * @param textStr The unicode string used to create an iterator + * @stable ICU 2.0 + */ + StringCharacterIterator(const UnicodeString& textStr); + + /** + * Create an iterator over the UnicodeString referred to by "textStr". + * The iteration range is the whole string, and the starting + * position is specified by "textPos". If "textPos" is outside the valid + * iteration range, the behavior of this object is undefined. + * @param textStr The unicode string used to create an iterator + * @param textPos The starting position of the iteration + * @stable ICU 2.0 + */ + StringCharacterIterator(const UnicodeString& textStr, + int32_t textPos); + + /** + * Create an iterator over the UnicodeString referred to by "textStr". + * The UnicodeString object is copied. + * The iteration range begins with the code unit specified by + * "textBegin" and ends with the code unit BEFORE the code unit specified + * by "textEnd". The starting position is specified by "textPos". If + * "textBegin" and "textEnd" don't form a valid range on "text" (i.e., + * textBegin >= textEnd or either is negative or greater than text.size()), + * or "textPos" is outside the range defined by "textBegin" and "textEnd", + * the behavior of this iterator is undefined. + * @param textStr The unicode string used to create the StringCharacterIterator + * @param textBegin The begin position of the iteration range + * @param textEnd The end position of the iteration range + * @param textPos The starting position of the iteration + * @stable ICU 2.0 + */ + StringCharacterIterator(const UnicodeString& textStr, + int32_t textBegin, + int32_t textEnd, + int32_t textPos); + + /** + * Copy constructor. The new iterator iterates over the same range + * of the same string as "that", and its initial position is the + * same as "that"'s current position. + * The UnicodeString object in "that" is copied. + * @param that The StringCharacterIterator to be copied + * @stable ICU 2.0 + */ + StringCharacterIterator(const StringCharacterIterator& that); + + /** + * Destructor. + * @stable ICU 2.0 + */ + virtual ~StringCharacterIterator(); + + /** + * Assignment operator. *this is altered to iterate over the same + * range of the same string as "that", and refers to the same + * character within that string as "that" does. + * @param that The object to be copied. + * @return the newly created object. + * @stable ICU 2.0 + */ + StringCharacterIterator& + operator=(const StringCharacterIterator& that); + + /** + * Returns true if the iterators iterate over the same range of the + * same string and are pointing at the same character. + * @param that The ForwardCharacterIterator to be compared for equality + * @return true if the iterators iterate over the same range of the + * same string and are pointing at the same character. + * @stable ICU 2.0 + */ + virtual UBool operator==(const ForwardCharacterIterator& that) const; + + /** + * Returns a new StringCharacterIterator referring to the same + * character in the same range of the same string as this one. The + * caller must delete the new iterator. + * @return the newly cloned object. + * @stable ICU 2.0 + */ + virtual CharacterIterator* clone(void) const; + + /** + * Sets the iterator to iterate over the provided string. + * @param newText The string to be iterated over + * @stable ICU 2.0 + */ + void setText(const UnicodeString& newText); + + /** + * Copies the UnicodeString under iteration into the UnicodeString + * referred to by "result". Even if this iterator iterates across + * only a part of this string, the whole string is copied. + * @param result Receives a copy of the text under iteration. + * @stable ICU 2.0 + */ + virtual void getText(UnicodeString& result); + + /** + * Return a class ID for this object (not really public) + * @return a class ID for this object. + * @stable ICU 2.0 + */ + virtual UClassID getDynamicClassID(void) const; + + /** + * Return a class ID for this class (not really public) + * @return a class ID for this class + * @stable ICU 2.0 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + +protected: + /** + * Default constructor, iteration over empty string. + * @stable ICU 2.0 + */ + StringCharacterIterator(); + + /** + * Sets the iterator to iterate over the provided string. + * @param newText The string to be iterated over + * @param newTextLength The length of the String + * @stable ICU 2.0 + */ + void setText(const char16_t* newText, int32_t newTextLength); + + /** + * Copy of the iterated string object. + * @stable ICU 2.0 + */ + UnicodeString text; + +}; + +U_NAMESPACE_END +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/scientificnumberformatter.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/scientificnumberformatter.h new file mode 100755 index 00000000..15023d51 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/scientificnumberformatter.h @@ -0,0 +1,222 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (c) 2014-2016, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +*/ +#ifndef SCINUMBERFORMATTER_H +#define SCINUMBERFORMATTER_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + + +#include "unicode/unistr.h" + +/** + * \file + * \brief C++ API: Formats in scientific notation. + */ + +U_NAMESPACE_BEGIN + +class FieldPositionIterator; +class DecimalFormatStaticSets; +class DecimalFormatSymbols; +class DecimalFormat; +class Formattable; + +/** + * A formatter that formats numbers in user-friendly scientific notation. + * + * Sample code: + * <pre> + * UErrorCode status = U_ZERO_ERROR; + * LocalPointer<ScientificNumberFormatter> fmt( + * ScientificNumberFormatter::createMarkupInstance( + * "en", "<sup>", "</sup>", status)); + * if (U_FAILURE(status)) { + * return; + * } + * UnicodeString appendTo; + * // appendTo = "1.23456x10<sup>-78</sup>" + * fmt->format(1.23456e-78, appendTo, status); + * </pre> + * + * @stable ICU 55 + */ +class U_I18N_API ScientificNumberFormatter : public UObject { +public: + + /** + * Creates a ScientificNumberFormatter instance that uses + * superscript characters for exponents. + * @param fmtToAdopt The DecimalFormat which must be configured for + * scientific notation. + * @param status error returned here. + * @return The new ScientificNumberFormatter instance. + * + * @stable ICU 55 + */ + static ScientificNumberFormatter *createSuperscriptInstance( + DecimalFormat *fmtToAdopt, UErrorCode &status); + + /** + * Creates a ScientificNumberFormatter instance that uses + * superscript characters for exponents for this locale. + * @param locale The locale + * @param status error returned here. + * @return The ScientificNumberFormatter instance. + * + * @stable ICU 55 + */ + static ScientificNumberFormatter *createSuperscriptInstance( + const Locale &locale, UErrorCode &status); + + + /** + * Creates a ScientificNumberFormatter instance that uses + * markup for exponents. + * @param fmtToAdopt The DecimalFormat which must be configured for + * scientific notation. + * @param beginMarkup the markup to start superscript. + * @param endMarkup the markup to end superscript. + * @param status error returned here. + * @return The new ScientificNumberFormatter instance. + * + * @stable ICU 55 + */ + static ScientificNumberFormatter *createMarkupInstance( + DecimalFormat *fmtToAdopt, + const UnicodeString &beginMarkup, + const UnicodeString &endMarkup, + UErrorCode &status); + + /** + * Creates a ScientificNumberFormatter instance that uses + * markup for exponents for this locale. + * @param locale The locale + * @param beginMarkup the markup to start superscript. + * @param endMarkup the markup to end superscript. + * @param status error returned here. + * @return The ScientificNumberFormatter instance. + * + * @stable ICU 55 + */ + static ScientificNumberFormatter *createMarkupInstance( + const Locale &locale, + const UnicodeString &beginMarkup, + const UnicodeString &endMarkup, + UErrorCode &status); + + + /** + * Returns a copy of this object. Caller must free returned copy. + * @stable ICU 55 + */ + ScientificNumberFormatter *clone() const { + return new ScientificNumberFormatter(*this); + } + + /** + * Destructor. + * @stable ICU 55 + */ + virtual ~ScientificNumberFormatter(); + + /** + * Formats a number into user friendly scientific notation. + * + * @param number the number to format. + * @param appendTo formatted string appended here. + * @param status any error returned here. + * @return appendTo + * + * @stable ICU 55 + */ + UnicodeString &format( + const Formattable &number, + UnicodeString &appendTo, + UErrorCode &status) const; + private: + class U_I18N_API Style : public UObject { + public: + virtual Style *clone() const = 0; + protected: + virtual UnicodeString &format( + const UnicodeString &original, + FieldPositionIterator &fpi, + const UnicodeString &preExponent, + const DecimalFormatStaticSets &decimalFormatSets, + UnicodeString &appendTo, + UErrorCode &status) const = 0; + private: + friend class ScientificNumberFormatter; + }; + + class U_I18N_API SuperscriptStyle : public Style { + public: + virtual Style *clone() const; + protected: + virtual UnicodeString &format( + const UnicodeString &original, + FieldPositionIterator &fpi, + const UnicodeString &preExponent, + const DecimalFormatStaticSets &decimalFormatSets, + UnicodeString &appendTo, + UErrorCode &status) const; + }; + + class U_I18N_API MarkupStyle : public Style { + public: + MarkupStyle( + const UnicodeString &beginMarkup, + const UnicodeString &endMarkup) + : Style(), + fBeginMarkup(beginMarkup), + fEndMarkup(endMarkup) { } + virtual Style *clone() const; + protected: + virtual UnicodeString &format( + const UnicodeString &original, + FieldPositionIterator &fpi, + const UnicodeString &preExponent, + const DecimalFormatStaticSets &decimalFormatSets, + UnicodeString &appendTo, + UErrorCode &status) const; + private: + UnicodeString fBeginMarkup; + UnicodeString fEndMarkup; + }; + + ScientificNumberFormatter( + DecimalFormat *fmtToAdopt, + Style *styleToAdopt, + UErrorCode &status); + + ScientificNumberFormatter(const ScientificNumberFormatter &other); + ScientificNumberFormatter &operator=(const ScientificNumberFormatter &); + + static void getPreExponent( + const DecimalFormatSymbols &dfs, UnicodeString &preExponent); + + static ScientificNumberFormatter *createInstance( + DecimalFormat *fmtToAdopt, + Style *styleToAdopt, + UErrorCode &status); + + UnicodeString fPreExponent; + DecimalFormat *fDecimalFormat; + Style *fStyle; + const DecimalFormatStaticSets *fStaticSets; + +}; + +U_NAMESPACE_END + + +#endif /* !UCONFIG_NO_FORMATTING */ +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/search.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/search.h new file mode 100755 index 00000000..65f7f10b --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/search.h @@ -0,0 +1,577 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 2001-2011 IBM and others. All rights reserved. +********************************************************************** +* Date Name Description +* 03/22/2000 helena Creation. +********************************************************************** +*/ + +#ifndef SEARCH_H +#define SEARCH_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: SearchIterator object. + */ + +#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION + +#include "unicode/uobject.h" +#include "unicode/unistr.h" +#include "unicode/chariter.h" +#include "unicode/brkiter.h" +#include "unicode/usearch.h" + +/** +* @stable ICU 2.0 +*/ +struct USearch; +/** +* @stable ICU 2.0 +*/ +typedef struct USearch USearch; + +U_NAMESPACE_BEGIN + +/** + * + * <tt>SearchIterator</tt> is an abstract base class that provides + * methods to search for a pattern within a text string. Instances of + * <tt>SearchIterator</tt> maintain a current position and scans over the + * target text, returning the indices the pattern is matched and the length + * of each match. + * <p> + * <tt>SearchIterator</tt> defines a protocol for text searching. + * Subclasses provide concrete implementations of various search algorithms. + * For example, <tt>StringSearch</tt> implements language-sensitive pattern + * matching based on the comparison rules defined in a + * <tt>RuleBasedCollator</tt> object. + * <p> + * Other options for searching includes using a BreakIterator to restrict + * the points at which matches are detected. + * <p> + * <tt>SearchIterator</tt> provides an API that is similar to that of + * other text iteration classes such as <tt>BreakIterator</tt>. Using + * this class, it is easy to scan through text looking for all occurances of + * a given pattern. The following example uses a <tt>StringSearch</tt> + * object to find all instances of "fox" in the target string. Any other + * subclass of <tt>SearchIterator</tt> can be used in an identical + * manner. + * <pre><code> + * UnicodeString target("The quick brown fox jumped over the lazy fox"); + * UnicodeString pattern("fox"); + * + * SearchIterator *iter = new StringSearch(pattern, target); + * UErrorCode error = U_ZERO_ERROR; + * for (int pos = iter->first(error); pos != USEARCH_DONE; + * pos = iter->next(error)) { + * printf("Found match at %d pos, length is %d\n", pos, + * iter.getMatchLength()); + * } + * </code></pre> + * + * @see StringSearch + * @see RuleBasedCollator + */ +class U_I18N_API SearchIterator : public UObject { + +public: + + // public constructors and destructors ------------------------------- + + /** + * Copy constructor that creates a SearchIterator instance with the same + * behavior, and iterating over the same text. + * @param other the SearchIterator instance to be copied. + * @stable ICU 2.0 + */ + SearchIterator(const SearchIterator &other); + + /** + * Destructor. Cleans up the search iterator data struct. + * @stable ICU 2.0 + */ + virtual ~SearchIterator(); + + // public get and set methods ---------------------------------------- + + /** + * Sets the index to point to the given position, and clears any state + * that's affected. + * <p> + * This method takes the argument index and sets the position in the text + * string accordingly without checking if the index is pointing to a + * valid starting point to begin searching. + * @param position within the text to be set. If position is less + * than or greater than the text range for searching, + * an U_INDEX_OUTOFBOUNDS_ERROR will be returned + * @param status for errors if it occurs + * @stable ICU 2.0 + */ + virtual void setOffset(int32_t position, UErrorCode &status) = 0; + + /** + * Return the current index in the text being searched. + * If the iteration has gone past the end of the text + * (or past the beginning for a backwards search), USEARCH_DONE + * is returned. + * @return current index in the text being searched. + * @stable ICU 2.0 + */ + virtual int32_t getOffset(void) const = 0; + + /** + * Sets the text searching attributes located in the enum + * USearchAttribute with values from the enum USearchAttributeValue. + * USEARCH_DEFAULT can be used for all attributes for resetting. + * @param attribute text attribute (enum USearchAttribute) to be set + * @param value text attribute value + * @param status for errors if it occurs + * @stable ICU 2.0 + */ + void setAttribute(USearchAttribute attribute, + USearchAttributeValue value, + UErrorCode &status); + + /** + * Gets the text searching attributes + * @param attribute text attribute (enum USearchAttribute) to be retrieve + * @return text attribute value + * @stable ICU 2.0 + */ + USearchAttributeValue getAttribute(USearchAttribute attribute) const; + + /** + * Returns the index to the match in the text string that was searched. + * This call returns a valid result only after a successful call to + * <tt>first</tt>, <tt>next</tt>, <tt>previous</tt>, or <tt>last</tt>. + * Just after construction, or after a searching method returns + * <tt>USEARCH_DONE</tt>, this method will return <tt>USEARCH_DONE</tt>. + * <p> + * Use getMatchedLength to get the matched string length. + * @return index of a substring within the text string that is being + * searched. + * @see #first + * @see #next + * @see #previous + * @see #last + * @stable ICU 2.0 + */ + int32_t getMatchedStart(void) const; + + /** + * Returns the length of text in the string which matches the search + * pattern. This call returns a valid result only after a successful call + * to <tt>first</tt>, <tt>next</tt>, <tt>previous</tt>, or <tt>last</tt>. + * Just after construction, or after a searching method returns + * <tt>USEARCH_DONE</tt>, this method will return 0. + * @return The length of the match in the target text, or 0 if there + * is no match currently. + * @see #first + * @see #next + * @see #previous + * @see #last + * @stable ICU 2.0 + */ + int32_t getMatchedLength(void) const; + + /** + * Returns the text that was matched by the most recent call to + * <tt>first</tt>, <tt>next</tt>, <tt>previous</tt>, or <tt>last</tt>. + * If the iterator is not pointing at a valid match (e.g. just after + * construction or after <tt>USEARCH_DONE</tt> has been returned, + * returns an empty string. + * @param result stores the matched string or an empty string if a match + * is not found. + * @see #first + * @see #next + * @see #previous + * @see #last + * @stable ICU 2.0 + */ + void getMatchedText(UnicodeString &result) const; + + /** + * Set the BreakIterator that will be used to restrict the points + * at which matches are detected. The user is responsible for deleting + * the breakiterator. + * @param breakiter A BreakIterator that will be used to restrict the + * points at which matches are detected. If a match is + * found, but the match's start or end index is not a + * boundary as determined by the <tt>BreakIterator</tt>, + * the match will be rejected and another will be searched + * for. If this parameter is <tt>NULL</tt>, no break + * detection is attempted. + * @param status for errors if it occurs + * @see BreakIterator + * @stable ICU 2.0 + */ + void setBreakIterator(BreakIterator *breakiter, UErrorCode &status); + + /** + * Returns the BreakIterator that is used to restrict the points at + * which matches are detected. This will be the same object that was + * passed to the constructor or to <tt>setBreakIterator</tt>. + * Note that <tt>NULL</tt> is a legal value; it means that break + * detection should not be attempted. + * @return BreakIterator used to restrict matchings. + * @see #setBreakIterator + * @stable ICU 2.0 + */ + const BreakIterator * getBreakIterator(void) const; + + /** + * Set the string text to be searched. Text iteration will hence begin at + * the start of the text string. This method is useful if you want to + * re-use an iterator to search for the same pattern within a different + * body of text. The user is responsible for deleting the text. + * @param text string to be searched. + * @param status for errors. If the text length is 0, + * an U_ILLEGAL_ARGUMENT_ERROR is returned. + * @stable ICU 2.0 + */ + virtual void setText(const UnicodeString &text, UErrorCode &status); + + /** + * Set the string text to be searched. Text iteration will hence begin at + * the start of the text string. This method is useful if you want to + * re-use an iterator to search for the same pattern within a different + * body of text. + * <p> + * Note: No parsing of the text within the <tt>CharacterIterator</tt> + * will be done during searching for this version. The block of text + * in <tt>CharacterIterator</tt> will be used as it is. + * The user is responsible for deleting the text. + * @param text string iterator to be searched. + * @param status for errors if any. If the text length is 0 then an + * U_ILLEGAL_ARGUMENT_ERROR is returned. + * @stable ICU 2.0 + */ + virtual void setText(CharacterIterator &text, UErrorCode &status); + + /** + * Return the string text to be searched. + * @return text string to be searched. + * @stable ICU 2.0 + */ + const UnicodeString & getText(void) const; + + // operator overloading ---------------------------------------------- + + /** + * Equality operator. + * @param that SearchIterator instance to be compared. + * @return TRUE if both BreakIterators are of the same class, have the + * same behavior, terates over the same text and have the same + * attributes. FALSE otherwise. + * @stable ICU 2.0 + */ + virtual UBool operator==(const SearchIterator &that) const; + + /** + * Not-equal operator. + * @param that SearchIterator instance to be compared. + * @return FALSE if operator== returns TRUE, and vice versa. + * @stable ICU 2.0 + */ + UBool operator!=(const SearchIterator &that) const; + + // public methods ---------------------------------------------------- + + /** + * Returns a copy of SearchIterator with the same behavior, and + * iterating over the same text, as this one. Note that all data will be + * replicated, except for the text string to be searched. + * @return cloned object + * @stable ICU 2.0 + */ + virtual SearchIterator* safeClone(void) const = 0; + + /** + * Returns the first index at which the string text matches the search + * pattern. The iterator is adjusted so that its current index (as + * returned by <tt>getOffset</tt>) is the match position if one + * was found. + * If a match is not found, <tt>USEARCH_DONE</tt> will be returned and + * the iterator will be adjusted to the index USEARCH_DONE + * @param status for errors if it occurs + * @return The character index of the first match, or + * <tt>USEARCH_DONE</tt> if there are no matches. + * @see #getOffset + * @stable ICU 2.0 + */ + int32_t first(UErrorCode &status); + + /** + * Returns the first index equal or greater than <tt>position</tt> at which the + * string text matches the search pattern. The iterator is adjusted so + * that its current index (as returned by <tt>getOffset</tt>) is the + * match position if one was found. + * If a match is not found, <tt>USEARCH_DONE</tt> will be returned and the + * iterator will be adjusted to the index <tt>USEARCH_DONE</tt>. + * @param position where search if to start from. If position is less + * than or greater than the text range for searching, + * an U_INDEX_OUTOFBOUNDS_ERROR will be returned + * @param status for errors if it occurs + * @return The character index of the first match following + * <tt>position</tt>, or <tt>USEARCH_DONE</tt> if there are no + * matches. + * @see #getOffset + * @stable ICU 2.0 + */ + int32_t following(int32_t position, UErrorCode &status); + + /** + * Returns the last index in the target text at which it matches the + * search pattern. The iterator is adjusted so that its current index + * (as returned by <tt>getOffset</tt>) is the match position if one was + * found. + * If a match is not found, <tt>USEARCH_DONE</tt> will be returned and + * the iterator will be adjusted to the index USEARCH_DONE. + * @param status for errors if it occurs + * @return The index of the first match, or <tt>USEARCH_DONE</tt> if + * there are no matches. + * @see #getOffset + * @stable ICU 2.0 + */ + int32_t last(UErrorCode &status); + + /** + * Returns the first index less than <tt>position</tt> at which the string + * text matches the search pattern. The iterator is adjusted so that its + * current index (as returned by <tt>getOffset</tt>) is the match + * position if one was found. If a match is not found, + * <tt>USEARCH_DONE</tt> will be returned and the iterator will be + * adjusted to the index USEARCH_DONE + * <p> + * When <tt>USEARCH_OVERLAP</tt> option is off, the last index of the + * result match is always less than <tt>position</tt>. + * When <tt>USERARCH_OVERLAP</tt> is on, the result match may span across + * <tt>position</tt>. + * + * @param position where search is to start from. If position is less + * than or greater than the text range for searching, + * an U_INDEX_OUTOFBOUNDS_ERROR will be returned + * @param status for errors if it occurs + * @return The character index of the first match preceding + * <tt>position</tt>, or <tt>USEARCH_DONE</tt> if there are + * no matches. + * @see #getOffset + * @stable ICU 2.0 + */ + int32_t preceding(int32_t position, UErrorCode &status); + + /** + * Returns the index of the next point at which the text matches the + * search pattern, starting from the current position + * The iterator is adjusted so that its current index (as returned by + * <tt>getOffset</tt>) is the match position if one was found. + * If a match is not found, <tt>USEARCH_DONE</tt> will be returned and + * the iterator will be adjusted to a position after the end of the text + * string. + * @param status for errors if it occurs + * @return The index of the next match after the current position, + * or <tt>USEARCH_DONE</tt> if there are no more matches. + * @see #getOffset + * @stable ICU 2.0 + */ + int32_t next(UErrorCode &status); + + /** + * Returns the index of the previous point at which the string text + * matches the search pattern, starting at the current position. + * The iterator is adjusted so that its current index (as returned by + * <tt>getOffset</tt>) is the match position if one was found. + * If a match is not found, <tt>USEARCH_DONE</tt> will be returned and + * the iterator will be adjusted to the index USEARCH_DONE + * @param status for errors if it occurs + * @return The index of the previous match before the current position, + * or <tt>USEARCH_DONE</tt> if there are no more matches. + * @see #getOffset + * @stable ICU 2.0 + */ + int32_t previous(UErrorCode &status); + + /** + * Resets the iteration. + * Search will begin at the start of the text string if a forward + * iteration is initiated before a backwards iteration. Otherwise if a + * backwards iteration is initiated before a forwards iteration, the + * search will begin at the end of the text string. + * @stable ICU 2.0 + */ + virtual void reset(); + +protected: + // protected data members --------------------------------------------- + + /** + * C search data struct + * @stable ICU 2.0 + */ + USearch *m_search_; + + /** + * Break iterator. + * Currently the C++ breakiterator does not have getRules etc to reproduce + * another in C. Hence we keep the original around and do the verification + * at the end of the match. The user is responsible for deleting this + * break iterator. + * @stable ICU 2.0 + */ + BreakIterator *m_breakiterator_; + + /** + * Unicode string version of the search text + * @stable ICU 2.0 + */ + UnicodeString m_text_; + + // protected constructors and destructors ----------------------------- + + /** + * Default constructor. + * Initializes data to the default values. + * @stable ICU 2.0 + */ + SearchIterator(); + + /** + * Constructor for use by subclasses. + * @param text The target text to be searched. + * @param breakiter A {@link BreakIterator} that is used to restrict the + * points at which matches are detected. If + * <tt>handleNext</tt> or <tt>handlePrev</tt> finds a + * match, but the match's start or end index is not a + * boundary as determined by the <tt>BreakIterator</tt>, + * the match is rejected and <tt>handleNext</tt> or + * <tt>handlePrev</tt> is called again. If this parameter + * is <tt>NULL</tt>, no break detection is attempted. + * @see #handleNext + * @see #handlePrev + * @stable ICU 2.0 + */ + SearchIterator(const UnicodeString &text, + BreakIterator *breakiter = NULL); + + /** + * Constructor for use by subclasses. + * <p> + * Note: No parsing of the text within the <tt>CharacterIterator</tt> + * will be done during searching for this version. The block of text + * in <tt>CharacterIterator</tt> will be used as it is. + * @param text The target text to be searched. + * @param breakiter A {@link BreakIterator} that is used to restrict the + * points at which matches are detected. If + * <tt>handleNext</tt> or <tt>handlePrev</tt> finds a + * match, but the match's start or end index is not a + * boundary as determined by the <tt>BreakIterator</tt>, + * the match is rejected and <tt>handleNext</tt> or + * <tt>handlePrev</tt> is called again. If this parameter + * is <tt>NULL</tt>, no break detection is attempted. + * @see #handleNext + * @see #handlePrev + * @stable ICU 2.0 + */ + SearchIterator(CharacterIterator &text, BreakIterator *breakiter = NULL); + + // protected methods -------------------------------------------------- + + /** + * Assignment operator. Sets this iterator to have the same behavior, + * and iterate over the same text, as the one passed in. + * @param that instance to be copied. + * @stable ICU 2.0 + */ + SearchIterator & operator=(const SearchIterator &that); + + /** + * Abstract method which subclasses override to provide the mechanism + * for finding the next match in the target text. This allows different + * subclasses to provide different search algorithms. + * <p> + * If a match is found, the implementation should return the index at + * which the match starts and should call + * <tt>setMatchLength</tt> with the number of characters + * in the target text that make up the match. If no match is found, the + * method should return USEARCH_DONE. + * <p> + * @param position The index in the target text at which the search + * should start. + * @param status for error codes if it occurs. + * @return index at which the match starts, else if match is not found + * USEARCH_DONE is returned + * @see #setMatchLength + * @stable ICU 2.0 + */ + virtual int32_t handleNext(int32_t position, UErrorCode &status) + = 0; + + /** + * Abstract method which subclasses override to provide the mechanism for + * finding the previous match in the target text. This allows different + * subclasses to provide different search algorithms. + * <p> + * If a match is found, the implementation should return the index at + * which the match starts and should call + * <tt>setMatchLength</tt> with the number of characters + * in the target text that make up the match. If no match is found, the + * method should return USEARCH_DONE. + * <p> + * @param position The index in the target text at which the search + * should start. + * @param status for error codes if it occurs. + * @return index at which the match starts, else if match is not found + * USEARCH_DONE is returned + * @see #setMatchLength + * @stable ICU 2.0 + */ + virtual int32_t handlePrev(int32_t position, UErrorCode &status) + = 0; + + /** + * Sets the length of the currently matched string in the text string to + * be searched. + * Subclasses' <tt>handleNext</tt> and <tt>handlePrev</tt> + * methods should call this when they find a match in the target text. + * @param length length of the matched text. + * @see #handleNext + * @see #handlePrev + * @stable ICU 2.0 + */ + virtual void setMatchLength(int32_t length); + + /** + * Sets the offset of the currently matched string in the text string to + * be searched. + * Subclasses' <tt>handleNext</tt> and <tt>handlePrev</tt> + * methods should call this when they find a match in the target text. + * @param position start offset of the matched text. + * @see #handleNext + * @see #handlePrev + * @stable ICU 2.0 + */ + virtual void setMatchStart(int32_t position); + + /** + * sets match not found + * @stable ICU 2.0 + */ + void setMatchNotFound(); +}; + +inline UBool SearchIterator::operator!=(const SearchIterator &that) const +{ + return !operator==(that); +} +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_COLLATION */ + +#endif + diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/selfmt.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/selfmt.h new file mode 100755 index 00000000..08e9d444 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/selfmt.h @@ -0,0 +1,369 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/******************************************************************** + * COPYRIGHT: + * Copyright (c) 1997-2011, International Business Machines Corporation and + * others. All Rights Reserved. + * Copyright (C) 2010 , Yahoo! Inc. + ******************************************************************** + * + * File SELFMT.H + * + * Modification History: + * + * Date Name Description + * 11/11/09 kirtig Finished first cut of implementation. + ********************************************************************/ + +#ifndef SELFMT +#define SELFMT + +#include "unicode/messagepattern.h" +#include "unicode/numfmt.h" +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: SelectFormat object + */ + +#if !UCONFIG_NO_FORMATTING + +U_NAMESPACE_BEGIN + +class MessageFormat; + +/** + * <p><code>SelectFormat</code> supports the creation of internationalized + * messages by selecting phrases based on keywords. The pattern specifies + * how to map keywords to phrases and provides a default phrase. The + * object provided to the format method is a string that's matched + * against the keywords. If there is a match, the corresponding phrase + * is selected; otherwise, the default phrase is used.</p> + * + * <h4>Using <code>SelectFormat</code> for Gender Agreement</h4> + * + * <p>Note: Typically, select formatting is done via <code>MessageFormat</code> + * with a <code>select</code> argument type, + * rather than using a stand-alone <code>SelectFormat</code>.</p> + * + * <p>The main use case for the select format is gender based inflection. + * When names or nouns are inserted into sentences, their gender can affect pronouns, + * verb forms, articles, and adjectives. Special care needs to be + * taken for the case where the gender cannot be determined. + * The impact varies between languages:</p> + * \htmlonly + * <ul> + * <li>English has three genders, and unknown gender is handled as a special + * case. Names use the gender of the named person (if known), nouns referring + * to people use natural gender, and inanimate objects are usually neutral. + * The gender only affects pronouns: "he", "she", "it", "they". + * + * <li>German differs from English in that the gender of nouns is rather + * arbitrary, even for nouns referring to people ("Mädchen", girl, is neutral). + * The gender affects pronouns ("er", "sie", "es"), articles ("der", "die", + * "das"), and adjective forms ("guter Mann", "gute Frau", "gutes Mädchen"). + * + * <li>French has only two genders; as in German the gender of nouns + * is rather arbitrary - for sun and moon, the genders + * are the opposite of those in German. The gender affects + * pronouns ("il", "elle"), articles ("le", "la"), + * adjective forms ("bon", "bonne"), and sometimes + * verb forms ("allé", "allée"). + * + * <li>Polish distinguishes five genders (or noun classes), + * human masculine, animate non-human masculine, inanimate masculine, + * feminine, and neuter. + * </ul> + * \endhtmlonly + * <p>Some other languages have noun classes that are not related to gender, + * but similar in grammatical use. + * Some African languages have around 20 noun classes.</p> + * + * <p><b>Note:</b>For the gender of a <i>person</i> in a given sentence, + * we usually need to distinguish only between female, male and other/unknown.</p> + * + * <p>To enable localizers to create sentence patterns that take their + * language's gender dependencies into consideration, software has to provide + * information about the gender associated with a noun or name to + * <code>MessageFormat</code>. + * Two main cases can be distinguished:</p> + * + * <ul> + * <li>For people, natural gender information should be maintained for each person. + * Keywords like "male", "female", "mixed" (for groups of people) + * and "unknown" could be used. + * + * <li>For nouns, grammatical gender information should be maintained for + * each noun and per language, e.g., in resource bundles. + * The keywords "masculine", "feminine", and "neuter" are commonly used, + * but some languages may require other keywords. + * </ul> + * + * <p>The resulting keyword is provided to <code>MessageFormat</code> as a + * parameter separate from the name or noun it's associated with. For example, + * to generate a message such as "Jean went to Paris", three separate arguments + * would be provided: The name of the person as argument 0, the gender of + * the person as argument 1, and the name of the city as argument 2. + * The sentence pattern for English, where the gender of the person has + * no impact on this simple sentence, would not refer to argument 1 at all:</p> + * + * <pre>{0} went to {2}.</pre> + * + * <p><b>Note:</b> The entire sentence should be included (and partially repeated) + * inside each phrase. Otherwise translators would have to be trained on how to + * move bits of the sentence in and out of the select argument of a message. + * (The examples below do not follow this recommendation!)</p> + * + * <p>The sentence pattern for French, where the gender of the person affects + * the form of the participle, uses a select format based on argument 1:</p> + * + * \htmlonly<pre>{0} est {1, select, female {allée} other {allé}} à {2}.</pre>\endhtmlonly + * + * <p>Patterns can be nested, so that it's possible to handle interactions of + * number and gender where necessary. For example, if the above sentence should + * allow for the names of several people to be inserted, the following sentence + * pattern can be used (with argument 0 the list of people's names, + * argument 1 the number of people, argument 2 their combined gender, and + * argument 3 the city name):</p> + * + * \htmlonly + * <pre>{0} {1, plural, + * one {est {2, select, female {allée} other {allé}}} + * other {sont {2, select, female {allées} other {allés}}} + * }à {3}.</pre> + * \endhtmlonly + * + * <h4>Patterns and Their Interpretation</h4> + * + * <p>The <code>SelectFormat</code> pattern string defines the phrase output + * for each user-defined keyword. + * The pattern is a sequence of (keyword, message) pairs. + * A keyword is a "pattern identifier": [^[[:Pattern_Syntax:][:Pattern_White_Space:]]]+</p> + * + * <p>Each message is a MessageFormat pattern string enclosed in {curly braces}.</p> + * + * <p>You always have to define a phrase for the default keyword + * <code>other</code>; this phrase is returned when the keyword + * provided to + * the <code>format</code> method matches no other keyword. + * If a pattern does not provide a phrase for <code>other</code>, the method + * it's provided to returns the error <code>U_DEFAULT_KEYWORD_MISSING</code>. + * <br> + * Pattern_White_Space between keywords and messages is ignored. + * Pattern_White_Space within a message is preserved and output.</p> + * + * <p><pre>Example: + * \htmlonly + * + * UErrorCode status = U_ZERO_ERROR; + * MessageFormat *msgFmt = new MessageFormat(UnicodeString("{0} est {1, select, female {allée} other {allé}} à Paris."), Locale("fr"), status); + * if (U_FAILURE(status)) { + * return; + * } + * FieldPosition ignore(FieldPosition::DONT_CARE); + * UnicodeString result; + * + * char* str1= "Kirti,female"; + * Formattable args1[] = {"Kirti","female"}; + * msgFmt->format(args1, 2, result, ignore, status); + * cout << "Input is " << str1 << " and result is: " << result << endl; + * delete msgFmt; + * + * \endhtmlonly + * </pre> + * </p> + * + * Produces the output:<br> + * \htmlonly + * <code>Kirti est allée à Paris.</code> + * \endhtmlonly + * + * @stable ICU 4.4 + */ + +class U_I18N_API SelectFormat : public Format { +public: + + /** + * Creates a new <code>SelectFormat</code> for a given pattern string. + * @param pattern the pattern for this <code>SelectFormat</code>. + * errors are returned to status if the pattern is invalid. + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @stable ICU 4.4 + */ + SelectFormat(const UnicodeString& pattern, UErrorCode& status); + + /** + * copy constructor. + * @stable ICU 4.4 + */ + SelectFormat(const SelectFormat& other); + + /** + * Destructor. + * @stable ICU 4.4 + */ + virtual ~SelectFormat(); + + /** + * Sets the pattern used by this select format. + * for the keyword rules. + * Patterns and their interpretation are specified in the class description. + * + * @param pattern the pattern for this select format + * errors are returned to status if the pattern is invalid. + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @stable ICU 4.4 + */ + void applyPattern(const UnicodeString& pattern, UErrorCode& status); + + + using Format::format; + + /** + * Selects the phrase for the given keyword + * + * @param keyword The keyword that is used to select an alternative. + * @param appendTo output parameter to receive result. + * result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status output param set to success/failure code on exit, which + * must not indicate a failure before the function call. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.4 + */ + UnicodeString& format(const UnicodeString& keyword, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& status) const; + + /** + * Assignment operator + * + * @param other the SelectFormat object to copy from. + * @stable ICU 4.4 + */ + SelectFormat& operator=(const SelectFormat& other); + + /** + * Return true if another object is semantically equal to this one. + * + * @param other the SelectFormat object to be compared with. + * @return true if other is semantically equal to this. + * @stable ICU 4.4 + */ + virtual UBool operator==(const Format& other) const; + + /** + * Return true if another object is semantically unequal to this one. + * + * @param other the SelectFormat object to be compared with. + * @return true if other is semantically unequal to this. + * @stable ICU 4.4 + */ + virtual UBool operator!=(const Format& other) const; + + /** + * Clones this Format object polymorphically. The caller owns the + * result and should delete it when done. + * @stable ICU 4.4 + */ + virtual Format* clone(void) const; + + /** + * Format an object to produce a string. + * This method handles keyword strings. + * If the Formattable object is not a <code>UnicodeString</code>, + * then it returns a failing UErrorCode. + * + * @param obj A keyword string that is used to select an alternative. + * @param appendTo output parameter to receive result. + * Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. + * On output: the offsets of the alignment field. + * @param status output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.4 + */ + UnicodeString& format(const Formattable& obj, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& status) const; + + /** + * Returns the pattern from applyPattern() or constructor. + * + * @param appendTo output parameter to receive result. + * Result is appended to existing contents. + * @return the UnicodeString with inserted pattern. + * @stable ICU 4.4 + */ + UnicodeString& toPattern(UnicodeString& appendTo); + + /** + * This method is not yet supported by <code>SelectFormat</code>. + * <P> + * Before calling, set parse_pos.index to the offset you want to start + * parsing at in the source. After calling, parse_pos.index is the end of + * the text you parsed. If error occurs, index is unchanged. + * <P> + * When parsing, leading whitespace is discarded (with a successful parse), + * while trailing whitespace is left as is. + * <P> + * See Format::parseObject() for more. + * + * @param source The string to be parsed into an object. + * @param result Formattable to be set to the parse result. + * If parse fails, return contents are undefined. + * @param parse_pos The position to start parsing at. Upon return + * this param is set to the position after the + * last character successfully parsed. If the + * source is not parsed successfully, this param + * will remain unchanged. + * @stable ICU 4.4 + */ + virtual void parseObject(const UnicodeString& source, + Formattable& result, + ParsePosition& parse_pos) const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * @stable ICU 4.4 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * @stable ICU 4.4 + */ + virtual UClassID getDynamicClassID() const; + +private: + friend class MessageFormat; + + SelectFormat(); // default constructor not implemented. + + /** + * Finds the SelectFormat sub-message for the given keyword, or the "other" sub-message. + * @param pattern A MessagePattern. + * @param partIndex the index of the first SelectFormat argument style part. + * @param keyword a keyword to be matched to one of the SelectFormat argument's keywords. + * @param ec Error code. + * @return the sub-message start part index. + */ + static int32_t findSubMessage(const MessagePattern& pattern, int32_t partIndex, + const UnicodeString& keyword, UErrorCode& ec); + + MessagePattern msgPattern; +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _SELFMT +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/simpleformatter.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/simpleformatter.h new file mode 100755 index 00000000..850949ca --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/simpleformatter.h @@ -0,0 +1,303 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* Copyright (C) 2014-2016, International Business Machines +* Corporation and others. All Rights Reserved. +****************************************************************************** +* simpleformatter.h +*/ + +#ifndef __SIMPLEFORMATTER_H__ +#define __SIMPLEFORMATTER_H__ + +/** + * \file + * \brief C++ API: Simple formatter, minimal subset of MessageFormat. + */ + +#include "unicode/utypes.h" +#include "unicode/unistr.h" + +U_NAMESPACE_BEGIN + +// Forward declaration: +namespace number { +namespace impl { +class SimpleModifier; +} +} + +/** + * Formats simple patterns like "{1} was born in {0}". + * Minimal subset of MessageFormat; fast, simple, minimal dependencies. + * Supports only numbered arguments with no type nor style parameters, + * and formats only string values. + * Quoting via ASCII apostrophe compatible with ICU MessageFormat default behavior. + * + * Factory methods set error codes for syntax errors + * and for too few or too many arguments/placeholders. + * + * SimpleFormatter objects are thread-safe except for assignment and applying new patterns. + * + * Example: + * <pre> + * UErrorCode errorCode = U_ZERO_ERROR; + * SimpleFormatter fmt("{1} '{born}' in {0}", errorCode); + * UnicodeString result; + * + * // Output: "paul {born} in england" + * fmt.format("england", "paul", result, errorCode); + * </pre> + * + * This class is not intended for public subclassing. + * + * @see MessageFormat + * @see UMessagePatternApostropheMode + * @stable ICU 57 + */ +class U_COMMON_API SimpleFormatter U_FINAL : public UMemory { +public: + /** + * Default constructor. + * @stable ICU 57 + */ + SimpleFormatter() : compiledPattern((char16_t)0) {} + + /** + * Constructs a formatter from the pattern string. + * + * @param pattern The pattern string. + * @param errorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * Set to U_ILLEGAL_ARGUMENT_ERROR for bad argument syntax. + * @stable ICU 57 + */ + SimpleFormatter(const UnicodeString& pattern, UErrorCode &errorCode) { + applyPattern(pattern, errorCode); + } + + /** + * Constructs a formatter from the pattern string. + * The number of arguments checked against the given limits is the + * highest argument number plus one, not the number of occurrences of arguments. + * + * @param pattern The pattern string. + * @param min The pattern must have at least this many arguments. + * @param max The pattern must have at most this many arguments. + * @param errorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * Set to U_ILLEGAL_ARGUMENT_ERROR for bad argument syntax and + * too few or too many arguments. + * @stable ICU 57 + */ + SimpleFormatter(const UnicodeString& pattern, int32_t min, int32_t max, + UErrorCode &errorCode) { + applyPatternMinMaxArguments(pattern, min, max, errorCode); + } + + /** + * Copy constructor. + * @stable ICU 57 + */ + SimpleFormatter(const SimpleFormatter& other) + : compiledPattern(other.compiledPattern) {} + + /** + * Assignment operator. + * @stable ICU 57 + */ + SimpleFormatter &operator=(const SimpleFormatter& other); + + /** + * Destructor. + * @stable ICU 57 + */ + ~SimpleFormatter(); + + /** + * Changes this object according to the new pattern. + * + * @param pattern The pattern string. + * @param errorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * Set to U_ILLEGAL_ARGUMENT_ERROR for bad argument syntax. + * @return TRUE if U_SUCCESS(errorCode). + * @stable ICU 57 + */ + UBool applyPattern(const UnicodeString &pattern, UErrorCode &errorCode) { + return applyPatternMinMaxArguments(pattern, 0, INT32_MAX, errorCode); + } + + /** + * Changes this object according to the new pattern. + * The number of arguments checked against the given limits is the + * highest argument number plus one, not the number of occurrences of arguments. + * + * @param pattern The pattern string. + * @param min The pattern must have at least this many arguments. + * @param max The pattern must have at most this many arguments. + * @param errorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * Set to U_ILLEGAL_ARGUMENT_ERROR for bad argument syntax and + * too few or too many arguments. + * @return TRUE if U_SUCCESS(errorCode). + * @stable ICU 57 + */ + UBool applyPatternMinMaxArguments(const UnicodeString &pattern, + int32_t min, int32_t max, UErrorCode &errorCode); + + /** + * @return The max argument number + 1. + * @stable ICU 57 + */ + int32_t getArgumentLimit() const { + return getArgumentLimit(compiledPattern.getBuffer(), compiledPattern.length()); + } + + /** + * Formats the given value, appending to the appendTo builder. + * The argument value must not be the same object as appendTo. + * getArgumentLimit() must be at most 1. + * + * @param value0 Value for argument {0}. + * @param appendTo Gets the formatted pattern and value appended. + * @param errorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return appendTo + * @stable ICU 57 + */ + UnicodeString &format( + const UnicodeString &value0, + UnicodeString &appendTo, UErrorCode &errorCode) const; + + /** + * Formats the given values, appending to the appendTo builder. + * An argument value must not be the same object as appendTo. + * getArgumentLimit() must be at most 2. + * + * @param value0 Value for argument {0}. + * @param value1 Value for argument {1}. + * @param appendTo Gets the formatted pattern and values appended. + * @param errorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return appendTo + * @stable ICU 57 + */ + UnicodeString &format( + const UnicodeString &value0, + const UnicodeString &value1, + UnicodeString &appendTo, UErrorCode &errorCode) const; + + /** + * Formats the given values, appending to the appendTo builder. + * An argument value must not be the same object as appendTo. + * getArgumentLimit() must be at most 3. + * + * @param value0 Value for argument {0}. + * @param value1 Value for argument {1}. + * @param value2 Value for argument {2}. + * @param appendTo Gets the formatted pattern and values appended. + * @param errorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return appendTo + * @stable ICU 57 + */ + UnicodeString &format( + const UnicodeString &value0, + const UnicodeString &value1, + const UnicodeString &value2, + UnicodeString &appendTo, UErrorCode &errorCode) const; + + /** + * Formats the given values, appending to the appendTo string. + * + * @param values The argument values. + * An argument value must not be the same object as appendTo. + * Can be NULL if valuesLength==getArgumentLimit()==0. + * @param valuesLength The length of the values array. + * Must be at least getArgumentLimit(). + * @param appendTo Gets the formatted pattern and values appended. + * @param offsets offsets[i] receives the offset of where + * values[i] replaced pattern argument {i}. + * Can be shorter or longer than values. Can be NULL if offsetsLength==0. + * If there is no {i} in the pattern, then offsets[i] is set to -1. + * @param offsetsLength The length of the offsets array. + * @param errorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return appendTo + * @stable ICU 57 + */ + UnicodeString &formatAndAppend( + const UnicodeString *const *values, int32_t valuesLength, + UnicodeString &appendTo, + int32_t *offsets, int32_t offsetsLength, UErrorCode &errorCode) const; + + /** + * Formats the given values, replacing the contents of the result string. + * May optimize by actually appending to the result if it is the same object + * as the value corresponding to the initial argument in the pattern. + * + * @param values The argument values. + * An argument value may be the same object as result. + * Can be NULL if valuesLength==getArgumentLimit()==0. + * @param valuesLength The length of the values array. + * Must be at least getArgumentLimit(). + * @param result Gets its contents replaced by the formatted pattern and values. + * @param offsets offsets[i] receives the offset of where + * values[i] replaced pattern argument {i}. + * Can be shorter or longer than values. Can be NULL if offsetsLength==0. + * If there is no {i} in the pattern, then offsets[i] is set to -1. + * @param offsetsLength The length of the offsets array. + * @param errorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return result + * @stable ICU 57 + */ + UnicodeString &formatAndReplace( + const UnicodeString *const *values, int32_t valuesLength, + UnicodeString &result, + int32_t *offsets, int32_t offsetsLength, UErrorCode &errorCode) const; + + /** + * Returns the pattern text with none of the arguments. + * Like formatting with all-empty string values. + * @stable ICU 57 + */ + UnicodeString getTextWithNoArguments() const { + return getTextWithNoArguments(compiledPattern.getBuffer(), compiledPattern.length()); + } + +private: + /** + * Binary representation of the compiled pattern. + * Index 0: One more than the highest argument number. + * Followed by zero or more arguments or literal-text segments. + * + * An argument is stored as its number, less than ARG_NUM_LIMIT. + * A literal-text segment is stored as its length (at least 1) offset by ARG_NUM_LIMIT, + * followed by that many chars. + */ + UnicodeString compiledPattern; + + static inline int32_t getArgumentLimit(const char16_t *compiledPattern, + int32_t compiledPatternLength) { + return compiledPatternLength == 0 ? 0 : compiledPattern[0]; + } + + static UnicodeString getTextWithNoArguments(const char16_t *compiledPattern, int32_t compiledPatternLength); + + static UnicodeString &format( + const char16_t *compiledPattern, int32_t compiledPatternLength, + const UnicodeString *const *values, + UnicodeString &result, const UnicodeString *resultCopy, UBool forbidResultAsValue, + int32_t *offsets, int32_t offsetsLength, + UErrorCode &errorCode); + + // Give access to internals to SimpleModifier for number formatting + friend class number::impl::SimpleModifier; +}; + +U_NAMESPACE_END + +#endif // __SIMPLEFORMATTER_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/simpletz.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/simpletz.h new file mode 100755 index 00000000..3ae08077 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/simpletz.h @@ -0,0 +1,932 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ******************************************************************************** + * Copyright (C) 1997-2013, International Business Machines * + * Corporation and others. All Rights Reserved. * + ******************************************************************************** + * + * File SIMPLETZ.H + * + * Modification History: + * + * Date Name Description + * 04/21/97 aliu Overhauled header. + * 08/10/98 stephen JDK 1.2 sync + * Added setStartRule() / setEndRule() overloads + * Added hasSameRules() + * 09/02/98 stephen Added getOffset(monthLen) + * Changed getOffset() to take UErrorCode + * 07/09/99 stephen Removed millisPerHour (unused, for HP compiler) + * 12/02/99 aliu Added TimeMode and constructor and setStart/EndRule + * methods that take TimeMode. Added to docs. + ******************************************************************************** + */ + +#ifndef SIMPLETZ_H +#define SIMPLETZ_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: SimpleTimeZone is a concrete subclass of TimeZone. + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/basictz.h" + +U_NAMESPACE_BEGIN + +// forward declaration +class InitialTimeZoneRule; +class TimeZoneTransition; +class AnnualTimeZoneRule; + +/** + * <code>SimpleTimeZone</code> is a concrete subclass of <code>TimeZone</code> + * that represents a time zone for use with a Gregorian calendar. This + * class does not handle historical changes. + * <P> + * When specifying daylight-savings-time begin and end dates, use a negative value for + * <code>dayOfWeekInMonth</code> to indicate that <code>SimpleTimeZone</code> should + * count from the end of the month backwards. For example, if Daylight Savings + * Time starts or ends at the last Sunday a month, use <code>dayOfWeekInMonth = -1</code> + * along with <code>dayOfWeek = UCAL_SUNDAY</code> to specify the rule. + * + * @see Calendar + * @see GregorianCalendar + * @see TimeZone + * @author D. Goldsmith, Mark Davis, Chen-Lieh Huang, Alan Liu + */ +class U_I18N_API SimpleTimeZone: public BasicTimeZone { +public: + + /** + * TimeMode is used, together with a millisecond offset after + * midnight, to specify a rule transition time. Most rules + * transition at a local wall time, that is, according to the + * current time in effect, either standard, or DST. However, some + * rules transition at local standard time, and some at a specific + * UTC time. Although it might seem that all times could be + * converted to wall time, thus eliminating the need for this + * parameter, this is not the case. + * @stable ICU 2.0 + */ + enum TimeMode { + WALL_TIME = 0, + STANDARD_TIME, + UTC_TIME + }; + + /** + * Copy constructor + * @param source the object to be copied. + * @stable ICU 2.0 + */ + SimpleTimeZone(const SimpleTimeZone& source); + + /** + * Default assignment operator + * @param right the object to be copied. + * @stable ICU 2.0 + */ + SimpleTimeZone& operator=(const SimpleTimeZone& right); + + /** + * Destructor + * @stable ICU 2.0 + */ + virtual ~SimpleTimeZone(); + + /** + * Returns true if the two TimeZone objects are equal; that is, they have + * the same ID, raw GMT offset, and DST rules. + * + * @param that The SimpleTimeZone object to be compared with. + * @return True if the given time zone is equal to this time zone; false + * otherwise. + * @stable ICU 2.0 + */ + virtual UBool operator==(const TimeZone& that) const; + + /** + * Constructs a SimpleTimeZone with the given raw GMT offset and time zone ID, + * and which doesn't observe daylight savings time. Normally you should use + * TimeZone::createInstance() to create a TimeZone instead of creating a + * SimpleTimeZone directly with this constructor. + * + * @param rawOffsetGMT The given base time zone offset to GMT. + * @param ID The timezone ID which is obtained from + * TimeZone.getAvailableIDs. + * @stable ICU 2.0 + */ + SimpleTimeZone(int32_t rawOffsetGMT, const UnicodeString& ID); + + /** + * Construct a SimpleTimeZone with the given raw GMT offset, time zone ID, + * and times to start and end daylight savings time. To create a TimeZone that + * doesn't observe daylight savings time, don't use this constructor; use + * SimpleTimeZone(rawOffset, ID) instead. Normally, you should use + * TimeZone.createInstance() to create a TimeZone instead of creating a + * SimpleTimeZone directly with this constructor. + * <P> + * Various types of daylight-savings time rules can be specfied by using different + * values for startDay and startDayOfWeek and endDay and endDayOfWeek. For a + * complete explanation of how these parameters work, see the documentation for + * setStartRule(). + * + * @param rawOffsetGMT The new SimpleTimeZone's raw GMT offset + * @param ID The new SimpleTimeZone's time zone ID. + * @param savingsStartMonth The daylight savings starting month. Month is + * 0-based. eg, 0 for January. + * @param savingsStartDayOfWeekInMonth The daylight savings starting + * day-of-week-in-month. See setStartRule() for a + * complete explanation. + * @param savingsStartDayOfWeek The daylight savings starting day-of-week. + * See setStartRule() for a complete explanation. + * @param savingsStartTime The daylight savings starting time, expressed as the + * number of milliseconds after midnight. + * @param savingsEndMonth The daylight savings ending month. Month is + * 0-based. eg, 0 for January. + * @param savingsEndDayOfWeekInMonth The daylight savings ending day-of-week-in-month. + * See setStartRule() for a complete explanation. + * @param savingsEndDayOfWeek The daylight savings ending day-of-week. + * See setStartRule() for a complete explanation. + * @param savingsEndTime The daylight savings ending time, expressed as the + * number of milliseconds after midnight. + * @param status An UErrorCode to receive the status. + * @stable ICU 2.0 + */ + SimpleTimeZone(int32_t rawOffsetGMT, const UnicodeString& ID, + int8_t savingsStartMonth, int8_t savingsStartDayOfWeekInMonth, + int8_t savingsStartDayOfWeek, int32_t savingsStartTime, + int8_t savingsEndMonth, int8_t savingsEndDayOfWeekInMonth, + int8_t savingsEndDayOfWeek, int32_t savingsEndTime, + UErrorCode& status); + /** + * Construct a SimpleTimeZone with the given raw GMT offset, time zone ID, + * and times to start and end daylight savings time. To create a TimeZone that + * doesn't observe daylight savings time, don't use this constructor; use + * SimpleTimeZone(rawOffset, ID) instead. Normally, you should use + * TimeZone.createInstance() to create a TimeZone instead of creating a + * SimpleTimeZone directly with this constructor. + * <P> + * Various types of daylight-savings time rules can be specfied by using different + * values for startDay and startDayOfWeek and endDay and endDayOfWeek. For a + * complete explanation of how these parameters work, see the documentation for + * setStartRule(). + * + * @param rawOffsetGMT The new SimpleTimeZone's raw GMT offset + * @param ID The new SimpleTimeZone's time zone ID. + * @param savingsStartMonth The daylight savings starting month. Month is + * 0-based. eg, 0 for January. + * @param savingsStartDayOfWeekInMonth The daylight savings starting + * day-of-week-in-month. See setStartRule() for a + * complete explanation. + * @param savingsStartDayOfWeek The daylight savings starting day-of-week. + * See setStartRule() for a complete explanation. + * @param savingsStartTime The daylight savings starting time, expressed as the + * number of milliseconds after midnight. + * @param savingsEndMonth The daylight savings ending month. Month is + * 0-based. eg, 0 for January. + * @param savingsEndDayOfWeekInMonth The daylight savings ending day-of-week-in-month. + * See setStartRule() for a complete explanation. + * @param savingsEndDayOfWeek The daylight savings ending day-of-week. + * See setStartRule() for a complete explanation. + * @param savingsEndTime The daylight savings ending time, expressed as the + * number of milliseconds after midnight. + * @param savingsDST The number of milliseconds added to standard time + * to get DST time. Default is one hour. + * @param status An UErrorCode to receive the status. + * @stable ICU 2.0 + */ + SimpleTimeZone(int32_t rawOffsetGMT, const UnicodeString& ID, + int8_t savingsStartMonth, int8_t savingsStartDayOfWeekInMonth, + int8_t savingsStartDayOfWeek, int32_t savingsStartTime, + int8_t savingsEndMonth, int8_t savingsEndDayOfWeekInMonth, + int8_t savingsEndDayOfWeek, int32_t savingsEndTime, + int32_t savingsDST, UErrorCode& status); + + /** + * Construct a SimpleTimeZone with the given raw GMT offset, time zone ID, + * and times to start and end daylight savings time. To create a TimeZone that + * doesn't observe daylight savings time, don't use this constructor; use + * SimpleTimeZone(rawOffset, ID) instead. Normally, you should use + * TimeZone.createInstance() to create a TimeZone instead of creating a + * SimpleTimeZone directly with this constructor. + * <P> + * Various types of daylight-savings time rules can be specfied by using different + * values for startDay and startDayOfWeek and endDay and endDayOfWeek. For a + * complete explanation of how these parameters work, see the documentation for + * setStartRule(). + * + * @param rawOffsetGMT The new SimpleTimeZone's raw GMT offset + * @param ID The new SimpleTimeZone's time zone ID. + * @param savingsStartMonth The daylight savings starting month. Month is + * 0-based. eg, 0 for January. + * @param savingsStartDayOfWeekInMonth The daylight savings starting + * day-of-week-in-month. See setStartRule() for a + * complete explanation. + * @param savingsStartDayOfWeek The daylight savings starting day-of-week. + * See setStartRule() for a complete explanation. + * @param savingsStartTime The daylight savings starting time, expressed as the + * number of milliseconds after midnight. + * @param savingsStartTimeMode Whether the start time is local wall time, local + * standard time, or UTC time. Default is local wall time. + * @param savingsEndMonth The daylight savings ending month. Month is + * 0-based. eg, 0 for January. + * @param savingsEndDayOfWeekInMonth The daylight savings ending day-of-week-in-month. + * See setStartRule() for a complete explanation. + * @param savingsEndDayOfWeek The daylight savings ending day-of-week. + * See setStartRule() for a complete explanation. + * @param savingsEndTime The daylight savings ending time, expressed as the + * number of milliseconds after midnight. + * @param savingsEndTimeMode Whether the end time is local wall time, local + * standard time, or UTC time. Default is local wall time. + * @param savingsDST The number of milliseconds added to standard time + * to get DST time. Default is one hour. + * @param status An UErrorCode to receive the status. + * @stable ICU 2.0 + */ + SimpleTimeZone(int32_t rawOffsetGMT, const UnicodeString& ID, + int8_t savingsStartMonth, int8_t savingsStartDayOfWeekInMonth, + int8_t savingsStartDayOfWeek, int32_t savingsStartTime, + TimeMode savingsStartTimeMode, + int8_t savingsEndMonth, int8_t savingsEndDayOfWeekInMonth, + int8_t savingsEndDayOfWeek, int32_t savingsEndTime, TimeMode savingsEndTimeMode, + int32_t savingsDST, UErrorCode& status); + + /** + * Sets the daylight savings starting year, that is, the year this time zone began + * observing its specified daylight savings time rules. The time zone is considered + * not to observe daylight savings time prior to that year; SimpleTimeZone doesn't + * support historical daylight-savings-time rules. + * @param year the daylight savings starting year. + * @stable ICU 2.0 + */ + void setStartYear(int32_t year); + + /** + * Sets the daylight savings starting rule. For example, in the U.S., Daylight Savings + * Time starts at the second Sunday in March, at 2 AM in standard time. + * Therefore, you can set the start rule by calling: + * setStartRule(UCAL_MARCH, 2, UCAL_SUNDAY, 2*60*60*1000); + * The dayOfWeekInMonth and dayOfWeek parameters together specify how to calculate + * the exact starting date. Their exact meaning depend on their respective signs, + * allowing various types of rules to be constructed, as follows: + * <ul> + * <li>If both dayOfWeekInMonth and dayOfWeek are positive, they specify the + * day of week in the month (e.g., (2, WEDNESDAY) is the second Wednesday + * of the month).</li> + * <li>If dayOfWeek is positive and dayOfWeekInMonth is negative, they specify + * the day of week in the month counting backward from the end of the month. + * (e.g., (-1, MONDAY) is the last Monday in the month)</li> + * <li>If dayOfWeek is zero and dayOfWeekInMonth is positive, dayOfWeekInMonth + * specifies the day of the month, regardless of what day of the week it is. + * (e.g., (10, 0) is the tenth day of the month)</li> + * <li>If dayOfWeek is zero and dayOfWeekInMonth is negative, dayOfWeekInMonth + * specifies the day of the month counting backward from the end of the + * month, regardless of what day of the week it is (e.g., (-2, 0) is the + * next-to-last day of the month).</li> + * <li>If dayOfWeek is negative and dayOfWeekInMonth is positive, they specify the + * first specified day of the week on or after the specfied day of the month. + * (e.g., (15, -SUNDAY) is the first Sunday after the 15th of the month + * [or the 15th itself if the 15th is a Sunday].)</li> + * <li>If dayOfWeek and DayOfWeekInMonth are both negative, they specify the + * last specified day of the week on or before the specified day of the month. + * (e.g., (-20, -TUESDAY) is the last Tuesday before the 20th of the month + * [or the 20th itself if the 20th is a Tuesday].)</li> + * </ul> + * @param month the daylight savings starting month. Month is 0-based. + * eg, 0 for January. + * @param dayOfWeekInMonth the daylight savings starting + * day-of-week-in-month. Please see the member description for an example. + * @param dayOfWeek the daylight savings starting day-of-week. Please see + * the member description for an example. + * @param time the daylight savings starting time. Please see the member + * description for an example. + * @param status An UErrorCode + * @stable ICU 2.0 + */ + void setStartRule(int32_t month, int32_t dayOfWeekInMonth, int32_t dayOfWeek, + int32_t time, UErrorCode& status); + /** + * Sets the daylight savings starting rule. For example, in the U.S., Daylight Savings + * Time starts at the second Sunday in March, at 2 AM in standard time. + * Therefore, you can set the start rule by calling: + * setStartRule(UCAL_MARCH, 2, UCAL_SUNDAY, 2*60*60*1000); + * The dayOfWeekInMonth and dayOfWeek parameters together specify how to calculate + * the exact starting date. Their exact meaning depend on their respective signs, + * allowing various types of rules to be constructed, as follows: + * <ul> + * <li>If both dayOfWeekInMonth and dayOfWeek are positive, they specify the + * day of week in the month (e.g., (2, WEDNESDAY) is the second Wednesday + * of the month).</li> + * <li>If dayOfWeek is positive and dayOfWeekInMonth is negative, they specify + * the day of week in the month counting backward from the end of the month. + * (e.g., (-1, MONDAY) is the last Monday in the month)</li> + * <li>If dayOfWeek is zero and dayOfWeekInMonth is positive, dayOfWeekInMonth + * specifies the day of the month, regardless of what day of the week it is. + * (e.g., (10, 0) is the tenth day of the month)</li> + * <li>If dayOfWeek is zero and dayOfWeekInMonth is negative, dayOfWeekInMonth + * specifies the day of the month counting backward from the end of the + * month, regardless of what day of the week it is (e.g., (-2, 0) is the + * next-to-last day of the month).</li> + * <li>If dayOfWeek is negative and dayOfWeekInMonth is positive, they specify the + * first specified day of the week on or after the specfied day of the month. + * (e.g., (15, -SUNDAY) is the first Sunday after the 15th of the month + * [or the 15th itself if the 15th is a Sunday].)</li> + * <li>If dayOfWeek and DayOfWeekInMonth are both negative, they specify the + * last specified day of the week on or before the specified day of the month. + * (e.g., (-20, -TUESDAY) is the last Tuesday before the 20th of the month + * [or the 20th itself if the 20th is a Tuesday].)</li> + * </ul> + * @param month the daylight savings starting month. Month is 0-based. + * eg, 0 for January. + * @param dayOfWeekInMonth the daylight savings starting + * day-of-week-in-month. Please see the member description for an example. + * @param dayOfWeek the daylight savings starting day-of-week. Please see + * the member description for an example. + * @param time the daylight savings starting time. Please see the member + * description for an example. + * @param mode whether the time is local wall time, local standard time, + * or UTC time. Default is local wall time. + * @param status An UErrorCode + * @stable ICU 2.0 + */ + void setStartRule(int32_t month, int32_t dayOfWeekInMonth, int32_t dayOfWeek, + int32_t time, TimeMode mode, UErrorCode& status); + + /** + * Sets the DST start rule to a fixed date within a month. + * + * @param month The month in which this rule occurs (0-based). + * @param dayOfMonth The date in that month (1-based). + * @param time The time of that day (number of millis after midnight) + * when DST takes effect in local wall time, which is + * standard time in this case. + * @param status An UErrorCode + * @stable ICU 2.0 + */ + void setStartRule(int32_t month, int32_t dayOfMonth, int32_t time, + UErrorCode& status); + /** + * Sets the DST start rule to a fixed date within a month. + * + * @param month The month in which this rule occurs (0-based). + * @param dayOfMonth The date in that month (1-based). + * @param time The time of that day (number of millis after midnight) + * when DST takes effect in local wall time, which is + * standard time in this case. + * @param mode whether the time is local wall time, local standard time, + * or UTC time. Default is local wall time. + * @param status An UErrorCode + * @stable ICU 2.0 + */ + void setStartRule(int32_t month, int32_t dayOfMonth, int32_t time, + TimeMode mode, UErrorCode& status); + + /** + * Sets the DST start rule to a weekday before or after a give date within + * a month, e.g., the first Monday on or after the 8th. + * + * @param month The month in which this rule occurs (0-based). + * @param dayOfMonth A date within that month (1-based). + * @param dayOfWeek The day of the week on which this rule occurs. + * @param time The time of that day (number of millis after midnight) + * when DST takes effect in local wall time, which is + * standard time in this case. + * @param after If true, this rule selects the first dayOfWeek on + * or after dayOfMonth. If false, this rule selects + * the last dayOfWeek on or before dayOfMonth. + * @param status An UErrorCode + * @stable ICU 2.0 + */ + void setStartRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, + int32_t time, UBool after, UErrorCode& status); + /** + * Sets the DST start rule to a weekday before or after a give date within + * a month, e.g., the first Monday on or after the 8th. + * + * @param month The month in which this rule occurs (0-based). + * @param dayOfMonth A date within that month (1-based). + * @param dayOfWeek The day of the week on which this rule occurs. + * @param time The time of that day (number of millis after midnight) + * when DST takes effect in local wall time, which is + * standard time in this case. + * @param mode whether the time is local wall time, local standard time, + * or UTC time. Default is local wall time. + * @param after If true, this rule selects the first dayOfWeek on + * or after dayOfMonth. If false, this rule selects + * the last dayOfWeek on or before dayOfMonth. + * @param status An UErrorCode + * @stable ICU 2.0 + */ + void setStartRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, + int32_t time, TimeMode mode, UBool after, UErrorCode& status); + + /** + * Sets the daylight savings ending rule. For example, if Daylight + * Savings Time ends at the last (-1) Sunday in October, at 2 AM in standard time. + * Therefore, you can set the end rule by calling: + * <pre> + * setEndRule(UCAL_OCTOBER, -1, UCAL_SUNDAY, 2*60*60*1000); + * </pre> + * Various other types of rules can be specified by manipulating the dayOfWeek + * and dayOfWeekInMonth parameters. For complete details, see the documentation + * for setStartRule(). + * + * @param month the daylight savings ending month. Month is 0-based. + * eg, 0 for January. + * @param dayOfWeekInMonth the daylight savings ending + * day-of-week-in-month. See setStartRule() for a complete explanation. + * @param dayOfWeek the daylight savings ending day-of-week. See setStartRule() + * for a complete explanation. + * @param time the daylight savings ending time. Please see the member + * description for an example. + * @param status An UErrorCode + * @stable ICU 2.0 + */ + void setEndRule(int32_t month, int32_t dayOfWeekInMonth, int32_t dayOfWeek, + int32_t time, UErrorCode& status); + + /** + * Sets the daylight savings ending rule. For example, if Daylight + * Savings Time ends at the last (-1) Sunday in October, at 2 AM in standard time. + * Therefore, you can set the end rule by calling: + * <pre> + * setEndRule(UCAL_OCTOBER, -1, UCAL_SUNDAY, 2*60*60*1000); + * </pre> + * Various other types of rules can be specified by manipulating the dayOfWeek + * and dayOfWeekInMonth parameters. For complete details, see the documentation + * for setStartRule(). + * + * @param month the daylight savings ending month. Month is 0-based. + * eg, 0 for January. + * @param dayOfWeekInMonth the daylight savings ending + * day-of-week-in-month. See setStartRule() for a complete explanation. + * @param dayOfWeek the daylight savings ending day-of-week. See setStartRule() + * for a complete explanation. + * @param time the daylight savings ending time. Please see the member + * description for an example. + * @param mode whether the time is local wall time, local standard time, + * or UTC time. Default is local wall time. + * @param status An UErrorCode + * @stable ICU 2.0 + */ + void setEndRule(int32_t month, int32_t dayOfWeekInMonth, int32_t dayOfWeek, + int32_t time, TimeMode mode, UErrorCode& status); + + /** + * Sets the DST end rule to a fixed date within a month. + * + * @param month The month in which this rule occurs (0-based). + * @param dayOfMonth The date in that month (1-based). + * @param time The time of that day (number of millis after midnight) + * when DST ends in local wall time, which is daylight + * time in this case. + * @param status An UErrorCode + * @stable ICU 2.0 + */ + void setEndRule(int32_t month, int32_t dayOfMonth, int32_t time, UErrorCode& status); + + /** + * Sets the DST end rule to a fixed date within a month. + * + * @param month The month in which this rule occurs (0-based). + * @param dayOfMonth The date in that month (1-based). + * @param time The time of that day (number of millis after midnight) + * when DST ends in local wall time, which is daylight + * time in this case. + * @param mode whether the time is local wall time, local standard time, + * or UTC time. Default is local wall time. + * @param status An UErrorCode + * @stable ICU 2.0 + */ + void setEndRule(int32_t month, int32_t dayOfMonth, int32_t time, + TimeMode mode, UErrorCode& status); + + /** + * Sets the DST end rule to a weekday before or after a give date within + * a month, e.g., the first Monday on or after the 8th. + * + * @param month The month in which this rule occurs (0-based). + * @param dayOfMonth A date within that month (1-based). + * @param dayOfWeek The day of the week on which this rule occurs. + * @param time The time of that day (number of millis after midnight) + * when DST ends in local wall time, which is daylight + * time in this case. + * @param after If true, this rule selects the first dayOfWeek on + * or after dayOfMonth. If false, this rule selects + * the last dayOfWeek on or before dayOfMonth. + * @param status An UErrorCode + * @stable ICU 2.0 + */ + void setEndRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, + int32_t time, UBool after, UErrorCode& status); + + /** + * Sets the DST end rule to a weekday before or after a give date within + * a month, e.g., the first Monday on or after the 8th. + * + * @param month The month in which this rule occurs (0-based). + * @param dayOfMonth A date within that month (1-based). + * @param dayOfWeek The day of the week on which this rule occurs. + * @param time The time of that day (number of millis after midnight) + * when DST ends in local wall time, which is daylight + * time in this case. + * @param mode whether the time is local wall time, local standard time, + * or UTC time. Default is local wall time. + * @param after If true, this rule selects the first dayOfWeek on + * or after dayOfMonth. If false, this rule selects + * the last dayOfWeek on or before dayOfMonth. + * @param status An UErrorCode + * @stable ICU 2.0 + */ + void setEndRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, + int32_t time, TimeMode mode, UBool after, UErrorCode& status); + + /** + * Returns the TimeZone's adjusted GMT offset (i.e., the number of milliseconds to add + * to GMT to get local time in this time zone, taking daylight savings time into + * account) as of a particular reference date. The reference date is used to determine + * whether daylight savings time is in effect and needs to be figured into the offset + * that is returned (in other words, what is the adjusted GMT offset in this time zone + * at this particular date and time?). For the time zones produced by createTimeZone(), + * the reference data is specified according to the Gregorian calendar, and the date + * and time fields are in GMT, NOT local time. + * + * @param era The reference date's era + * @param year The reference date's year + * @param month The reference date's month (0-based; 0 is January) + * @param day The reference date's day-in-month (1-based) + * @param dayOfWeek The reference date's day-of-week (1-based; 1 is Sunday) + * @param millis The reference date's milliseconds in day, UTT (NOT local time). + * @param status An UErrorCode to receive the status. + * @return The offset in milliseconds to add to GMT to get local time. + * @stable ICU 2.0 + */ + virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, + uint8_t dayOfWeek, int32_t millis, UErrorCode& status) const; + + /** + * Gets the time zone offset, for current date, modified in case of + * daylight savings. This is the offset to add *to* UTC to get local time. + * @param era the era of the given date. + * @param year the year in the given date. + * @param month the month in the given date. + * Month is 0-based. e.g., 0 for January. + * @param day the day-in-month of the given date. + * @param dayOfWeek the day-of-week of the given date. + * @param milliseconds the millis in day in <em>standard</em> local time. + * @param monthLength the length of the given month in days. + * @param status An UErrorCode to receive the status. + * @return the offset to add *to* GMT to get local time. + * @stable ICU 2.0 + */ + virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, + uint8_t dayOfWeek, int32_t milliseconds, + int32_t monthLength, UErrorCode& status) const; + /** + * Gets the time zone offset, for current date, modified in case of + * daylight savings. This is the offset to add *to* UTC to get local time. + * @param era the era of the given date. + * @param year the year in the given date. + * @param month the month in the given date. + * Month is 0-based. e.g., 0 for January. + * @param day the day-in-month of the given date. + * @param dayOfWeek the day-of-week of the given date. + * @param milliseconds the millis in day in <em>standard</em> local time. + * @param monthLength the length of the given month in days. + * @param prevMonthLength length of the previous month in days. + * @param status An UErrorCode to receive the status. + * @return the offset to add *to* GMT to get local time. + * @stable ICU 2.0 + */ + virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, + uint8_t dayOfWeek, int32_t milliseconds, + int32_t monthLength, int32_t prevMonthLength, + UErrorCode& status) const; + + /** + * Redeclared TimeZone method. This implementation simply calls + * the base class method, which otherwise would be hidden. + * @stable ICU 2.8 + */ + virtual void getOffset(UDate date, UBool local, int32_t& rawOffset, + int32_t& dstOffset, UErrorCode& ec) const; + + /** + * Get time zone offsets from local wall time. + * @internal + */ + virtual void getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt, + int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const; + + /** + * Returns the TimeZone's raw GMT offset (i.e., the number of milliseconds to add + * to GMT to get local time, before taking daylight savings time into account). + * + * @return The TimeZone's raw GMT offset. + * @stable ICU 2.0 + */ + virtual int32_t getRawOffset(void) const; + + /** + * Sets the TimeZone's raw GMT offset (i.e., the number of milliseconds to add + * to GMT to get local time, before taking daylight savings time into account). + * + * @param offsetMillis The new raw GMT offset for this time zone. + * @stable ICU 2.0 + */ + virtual void setRawOffset(int32_t offsetMillis); + + /** + * Sets the amount of time in ms that the clock is advanced during DST. + * @param millisSavedDuringDST the number of milliseconds the time is + * advanced with respect to standard time when the daylight savings rules + * are in effect. Typically one hour (+3600000). The amount could be negative, + * but not 0. + * @param status An UErrorCode to receive the status. + * @stable ICU 2.0 + */ + void setDSTSavings(int32_t millisSavedDuringDST, UErrorCode& status); + + /** + * Returns the amount of time in ms that the clock is advanced during DST. + * @return the number of milliseconds the time is + * advanced with respect to standard time when the daylight savings rules + * are in effect. Typically one hour (+3600000). The amount could be negative, + * but not 0. + * @stable ICU 2.0 + */ + virtual int32_t getDSTSavings(void) const; + + /** + * Queries if this TimeZone uses Daylight Savings Time. + * + * @return True if this TimeZone uses Daylight Savings Time; false otherwise. + * @stable ICU 2.0 + */ + virtual UBool useDaylightTime(void) const; + + /** + * Returns true if the given date is within the period when daylight savings time + * is in effect; false otherwise. If the TimeZone doesn't observe daylight savings + * time, this functions always returns false. + * This method is wasteful since it creates a new GregorianCalendar and + * deletes it each time it is called. This is a deprecated method + * and provided only for Java compatibility. + * + * @param date The date to test. + * @param status An UErrorCode to receive the status. + * @return true if the given date is in Daylight Savings Time; + * false otherwise. + * @deprecated ICU 2.4. Use Calendar::inDaylightTime() instead. + */ + virtual UBool inDaylightTime(UDate date, UErrorCode& status) const; + + /** + * Return true if this zone has the same rules and offset as another zone. + * @param other the TimeZone object to be compared with + * @return true if the given zone has the same rules and offset as this one + * @stable ICU 2.0 + */ + UBool hasSameRules(const TimeZone& other) const; + + /** + * Clones TimeZone objects polymorphically. Clients are responsible for deleting + * the TimeZone object cloned. + * + * @return A new copy of this TimeZone object. + * @stable ICU 2.0 + */ + virtual TimeZone* clone(void) const; + + /** + * Gets the first time zone transition after the base time. + * @param base The base time. + * @param inclusive Whether the base time is inclusive or not. + * @param result Receives the first transition after the base time. + * @return TRUE if the transition is found. + * @stable ICU 3.8 + */ + virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const; + + /** + * Gets the most recent time zone transition before the base time. + * @param base The base time. + * @param inclusive Whether the base time is inclusive or not. + * @param result Receives the most recent transition before the base time. + * @return TRUE if the transition is found. + * @stable ICU 3.8 + */ + virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const; + + /** + * Returns the number of <code>TimeZoneRule</code>s which represents time transitions, + * for this time zone, that is, all <code>TimeZoneRule</code>s for this time zone except + * <code>InitialTimeZoneRule</code>. The return value range is 0 or any positive value. + * @param status Receives error status code. + * @return The number of <code>TimeZoneRule</code>s representing time transitions. + * @stable ICU 3.8 + */ + virtual int32_t countTransitionRules(UErrorCode& status) const; + + /** + * Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZoneRule</code> + * which represent time transitions for this time zone. On successful return, + * the argument initial points to non-NULL <code>InitialTimeZoneRule</code> and + * the array trsrules is filled with 0 or multiple <code>TimeZoneRule</code> + * instances up to the size specified by trscount. The results are referencing the + * rule instance held by this time zone instance. Therefore, after this time zone + * is destructed, they are no longer available. + * @param initial Receives the initial timezone rule + * @param trsrules Receives the timezone transition rules + * @param trscount On input, specify the size of the array 'transitions' receiving + * the timezone transition rules. On output, actual number of + * rules filled in the array will be set. + * @param status Receives error status code. + * @stable ICU 3.8 + */ + virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial, + const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) const; + + +public: + + /** + * Override TimeZone Returns a unique class ID POLYMORPHICALLY. Pure virtual + * override. This method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() methods call + * this method. + * + * @return The class ID for this object. All objects of a given class have the + * same class ID. Objects of other classes have different class IDs. + * @stable ICU 2.0 + */ + virtual UClassID getDynamicClassID(void) const; + + /** + * Return the class ID for this class. This is useful only for comparing to a return + * value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . Derived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 2.0 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + +private: + /** + * Constants specifying values of startMode and endMode. + */ + enum EMode + { + DOM_MODE = 1, + DOW_IN_MONTH_MODE, + DOW_GE_DOM_MODE, + DOW_LE_DOM_MODE + }; + + SimpleTimeZone(); // default constructor not implemented + + /** + * Internal construction method. + * @param rawOffsetGMT The new SimpleTimeZone's raw GMT offset + * @param startMonth the month DST starts + * @param startDay the day DST starts + * @param startDayOfWeek the DOW DST starts + * @param startTime the time DST starts + * @param startTimeMode Whether the start time is local wall time, local + * standard time, or UTC time. Default is local wall time. + * @param endMonth the month DST ends + * @param endDay the day DST ends + * @param endDayOfWeek the DOW DST ends + * @param endTime the time DST ends + * @param endTimeMode Whether the end time is local wall time, local + * standard time, or UTC time. Default is local wall time. + * @param dstSavings The number of milliseconds added to standard time + * to get DST time. Default is one hour. + * @param status An UErrorCode to receive the status. + */ + void construct(int32_t rawOffsetGMT, + int8_t startMonth, int8_t startDay, int8_t startDayOfWeek, + int32_t startTime, TimeMode startTimeMode, + int8_t endMonth, int8_t endDay, int8_t endDayOfWeek, + int32_t endTime, TimeMode endTimeMode, + int32_t dstSavings, UErrorCode& status); + + /** + * Compare a given date in the year to a rule. Return 1, 0, or -1, depending + * on whether the date is after, equal to, or before the rule date. The + * millis are compared directly against the ruleMillis, so any + * standard-daylight adjustments must be handled by the caller. + * + * @return 1 if the date is after the rule date, -1 if the date is before + * the rule date, or 0 if the date is equal to the rule date. + */ + static int32_t compareToRule(int8_t month, int8_t monthLen, int8_t prevMonthLen, + int8_t dayOfMonth, + int8_t dayOfWeek, int32_t millis, int32_t millisDelta, + EMode ruleMode, int8_t ruleMonth, int8_t ruleDayOfWeek, + int8_t ruleDay, int32_t ruleMillis); + + /** + * Given a set of encoded rules in startDay and startDayOfMonth, decode + * them and set the startMode appropriately. Do the same for endDay and + * endDayOfMonth. + * <P> + * Upon entry, the day of week variables may be zero or + * negative, in order to indicate special modes. The day of month + * variables may also be negative. + * <P> + * Upon exit, the mode variables will be + * set, and the day of week and day of month variables will be positive. + * <P> + * This method also recognizes a startDay or endDay of zero as indicating + * no DST. + */ + void decodeRules(UErrorCode& status); + void decodeStartRule(UErrorCode& status); + void decodeEndRule(UErrorCode& status); + + int8_t startMonth, startDay, startDayOfWeek; // the month, day, DOW, and time DST starts + int32_t startTime; + TimeMode startTimeMode, endTimeMode; // Mode for startTime, endTime; see TimeMode + int8_t endMonth, endDay, endDayOfWeek; // the month, day, DOW, and time DST ends + int32_t endTime; + int32_t startYear; // the year these DST rules took effect + int32_t rawOffset; // the TimeZone's raw GMT offset + UBool useDaylight; // flag indicating whether this TimeZone uses DST + static const int8_t STATICMONTHLENGTH[12]; // lengths of the months + EMode startMode, endMode; // flags indicating what kind of rules the DST rules are + + /** + * A positive value indicating the amount of time saved during DST in ms. + * Typically one hour; sometimes 30 minutes. + */ + int32_t dstSavings; + + /* Private for BasicTimeZone implementation */ + void checkTransitionRules(UErrorCode& status) const; + void initTransitionRules(UErrorCode& status); + void clearTransitionRules(void); + void deleteTransitionRules(void); + UBool transitionRulesInitialized; + InitialTimeZoneRule* initialRule; + TimeZoneTransition* firstTransition; + AnnualTimeZoneRule* stdRule; + AnnualTimeZoneRule* dstRule; +}; + +inline void SimpleTimeZone::setStartRule(int32_t month, int32_t dayOfWeekInMonth, + int32_t dayOfWeek, + int32_t time, UErrorCode& status) { + setStartRule(month, dayOfWeekInMonth, dayOfWeek, time, WALL_TIME, status); +} + +inline void SimpleTimeZone::setStartRule(int32_t month, int32_t dayOfMonth, + int32_t time, + UErrorCode& status) { + setStartRule(month, dayOfMonth, time, WALL_TIME, status); +} + +inline void SimpleTimeZone::setStartRule(int32_t month, int32_t dayOfMonth, + int32_t dayOfWeek, + int32_t time, UBool after, UErrorCode& status) { + setStartRule(month, dayOfMonth, dayOfWeek, time, WALL_TIME, after, status); +} + +inline void SimpleTimeZone::setEndRule(int32_t month, int32_t dayOfWeekInMonth, + int32_t dayOfWeek, + int32_t time, UErrorCode& status) { + setEndRule(month, dayOfWeekInMonth, dayOfWeek, time, WALL_TIME, status); +} + +inline void SimpleTimeZone::setEndRule(int32_t month, int32_t dayOfMonth, + int32_t time, UErrorCode& status) { + setEndRule(month, dayOfMonth, time, WALL_TIME, status); +} + +inline void SimpleTimeZone::setEndRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, + int32_t time, UBool after, UErrorCode& status) { + setEndRule(month, dayOfMonth, dayOfWeek, time, WALL_TIME, after, status); +} + +inline void +SimpleTimeZone::getOffset(UDate date, UBool local, int32_t& rawOffsetRef, + int32_t& dstOffsetRef, UErrorCode& ec) const { + TimeZone::getOffset(date, local, rawOffsetRef, dstOffsetRef, ec); +} + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _SIMPLETZ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/smpdtfmt.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/smpdtfmt.h new file mode 100755 index 00000000..9801b29b --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/smpdtfmt.h @@ -0,0 +1,1630 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +* Copyright (C) 1997-2016, International Business Machines Corporation and +* others. All Rights Reserved. +******************************************************************************* +* +* File SMPDTFMT.H +* +* Modification History: +* +* Date Name Description +* 02/19/97 aliu Converted from java. +* 07/09/97 helena Make ParsePosition into a class. +* 07/21/98 stephen Added GMT_PLUS, GMT_MINUS +* Changed setTwoDigitStartDate to set2DigitYearStart +* Changed getTwoDigitStartDate to get2DigitYearStart +* Removed subParseLong +* Removed getZoneIndex (added in DateFormatSymbols) +* 06/14/99 stephen Removed fgTimeZoneDataSuffix +* 10/14/99 aliu Updated class doc to describe 2-digit year parsing +* {j28 4182066}. +******************************************************************************* +*/ + +#ifndef SMPDTFMT_H +#define SMPDTFMT_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Format and parse dates in a language-independent manner. + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/datefmt.h" +#include "unicode/udisplaycontext.h" +#include "unicode/tzfmt.h" /* for UTimeZoneFormatTimeType */ +#include "unicode/brkiter.h" + +U_NAMESPACE_BEGIN + +class DateFormatSymbols; +class DateFormat; +class MessageFormat; +class FieldPositionHandler; +class TimeZoneFormat; +class SharedNumberFormat; +class SimpleDateFormatMutableNFs; + +/** + * + * SimpleDateFormat is a concrete class for formatting and parsing dates in a + * language-independent manner. It allows for formatting (millis -> text), + * parsing (text -> millis), and normalization. Formats/Parses a date or time, + * which is the standard milliseconds since 24:00 GMT, Jan 1, 1970. + * <P> + * Clients are encouraged to create a date-time formatter using DateFormat::getInstance(), + * getDateInstance(), getDateInstance(), or getDateTimeInstance() rather than + * explicitly constructing an instance of SimpleDateFormat. This way, the client + * is guaranteed to get an appropriate formatting pattern for whatever locale the + * program is running in. However, if the client needs something more unusual than + * the default patterns in the locales, he can construct a SimpleDateFormat directly + * and give it an appropriate pattern (or use one of the factory methods on DateFormat + * and modify the pattern after the fact with toPattern() and applyPattern(). + * + * <p><strong>Date and Time Patterns:</strong></p> + * + * <p>Date and time formats are specified by <em>date and time pattern</em> strings. + * Within date and time pattern strings, all unquoted ASCII letters [A-Za-z] are reserved + * as pattern letters representing calendar fields. <code>SimpleDateFormat</code> supports + * the date and time formatting algorithm and pattern letters defined by + * <a href="http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table">UTS#35 + * Unicode Locale Data Markup Language (LDML)</a> and further documented for ICU in the + * <a href="https://sites.google.com/site/icuprojectuserguide/formatparse/datetime?pli=1#TOC-Date-Field-Symbol-Table">ICU + * User Guide</a>. The following pattern letters are currently available (note that the actual + * values depend on CLDR and may change from the examples shown here):</p> + * + * <table border="1"> + * <tr> + * <th>Field</th> + * <th style="text-align: center">Sym.</th> + * <th style="text-align: center">No.</th> + * <th>Example</th> + * <th>Description</th> + * </tr> + * <tr> + * <th rowspan="3">era</th> + * <td style="text-align: center" rowspan="3">G</td> + * <td style="text-align: center">1..3</td> + * <td>AD</td> + * <td rowspan="3">Era - Replaced with the Era string for the current date. One to three letters for the + * abbreviated form, four letters for the long (wide) form, five for the narrow form.</td> + * </tr> + * <tr> + * <td style="text-align: center">4</td> + * <td>Anno Domini</td> + * </tr> + * <tr> + * <td style="text-align: center">5</td> + * <td>A</td> + * </tr> + * <tr> + * <th rowspan="6">year</th> + * <td style="text-align: center">y</td> + * <td style="text-align: center">1..n</td> + * <td>1996</td> + * <td>Year. Normally the length specifies the padding, but for two letters it also specifies the maximum + * length. Example:<div align="center"> + * <center> + * <table border="1" cellpadding="2" cellspacing="0"> + * <tr> + * <th>Year</th> + * <th style="text-align: right">y</th> + * <th style="text-align: right">yy</th> + * <th style="text-align: right">yyy</th> + * <th style="text-align: right">yyyy</th> + * <th style="text-align: right">yyyyy</th> + * </tr> + * <tr> + * <td>AD 1</td> + * <td style="text-align: right">1</td> + * <td style="text-align: right">01</td> + * <td style="text-align: right">001</td> + * <td style="text-align: right">0001</td> + * <td style="text-align: right">00001</td> + * </tr> + * <tr> + * <td>AD 12</td> + * <td style="text-align: right">12</td> + * <td style="text-align: right">12</td> + * <td style="text-align: right">012</td> + * <td style="text-align: right">0012</td> + * <td style="text-align: right">00012</td> + * </tr> + * <tr> + * <td>AD 123</td> + * <td style="text-align: right">123</td> + * <td style="text-align: right">23</td> + * <td style="text-align: right">123</td> + * <td style="text-align: right">0123</td> + * <td style="text-align: right">00123</td> + * </tr> + * <tr> + * <td>AD 1234</td> + * <td style="text-align: right">1234</td> + * <td style="text-align: right">34</td> + * <td style="text-align: right">1234</td> + * <td style="text-align: right">1234</td> + * <td style="text-align: right">01234</td> + * </tr> + * <tr> + * <td>AD 12345</td> + * <td style="text-align: right">12345</td> + * <td style="text-align: right">45</td> + * <td style="text-align: right">12345</td> + * <td style="text-align: right">12345</td> + * <td style="text-align: right">12345</td> + * </tr> + * </table> + * </center></div> + * </td> + * </tr> + * <tr> + * <td style="text-align: center">Y</td> + * <td style="text-align: center">1..n</td> + * <td>1997</td> + * <td>Year (in "Week of Year" based calendars). Normally the length specifies the padding, + * but for two letters it also specifies the maximum length. This year designation is used in ISO + * year-week calendar as defined by ISO 8601, but can be used in non-Gregorian based calendar systems + * where week date processing is desired. May not always be the same value as calendar year.</td> + * </tr> + * <tr> + * <td style="text-align: center">u</td> + * <td style="text-align: center">1..n</td> + * <td>4601</td> + * <td>Extended year. This is a single number designating the year of this calendar system, encompassing + * all supra-year fields. For example, for the Julian calendar system, year numbers are positive, with an + * era of BCE or CE. An extended year value for the Julian calendar system assigns positive values to CE + * years and negative values to BCE years, with 1 BCE being year 0.</td> + * </tr> + * <tr> + * <td style="text-align: center" rowspan="3">U</td> + * <td style="text-align: center">1..3</td> + * <td>甲子</td> + * <td rowspan="3">Cyclic year name. Calendars such as the Chinese lunar calendar (and related calendars) + * and the Hindu calendars use 60-year cycles of year names. Use one through three letters for the abbreviated + * name, four for the full (wide) name, or five for the narrow name (currently the data only provides abbreviated names, + * which will be used for all requested name widths). If the calendar does not provide cyclic year name data, + * or if the year value to be formatted is out of the range of years for which cyclic name data is provided, + * then numeric formatting is used (behaves like 'y').</td> + * </tr> + * <tr> + * <td style="text-align: center">4</td> + * <td>(currently also 甲子)</td> + * </tr> + * <tr> + * <td style="text-align: center">5</td> + * <td>(currently also 甲子)</td> + * </tr> + * <tr> + * <th rowspan="6">quarter</th> + * <td rowspan="3" style="text-align: center">Q</td> + * <td style="text-align: center">1..2</td> + * <td>02</td> + * <td rowspan="3">Quarter - Use one or two for the numerical quarter, three for the abbreviation, or four for the + * full (wide) name (five for the narrow name is not yet supported).</td> + * </tr> + * <tr> + * <td style="text-align: center">3</td> + * <td>Q2</td> + * </tr> + * <tr> + * <td style="text-align: center">4</td> + * <td>2nd quarter</td> + * </tr> + * <tr> + * <td rowspan="3" style="text-align: center">q</td> + * <td style="text-align: center">1..2</td> + * <td>02</td> + * <td rowspan="3"><b>Stand-Alone</b> Quarter - Use one or two for the numerical quarter, three for the abbreviation, + * or four for the full name (five for the narrow name is not yet supported).</td> + * </tr> + * <tr> + * <td style="text-align: center">3</td> + * <td>Q2</td> + * </tr> + * <tr> + * <td style="text-align: center">4</td> + * <td>2nd quarter</td> + * </tr> + * <tr> + * <th rowspan="8">month</th> + * <td rowspan="4" style="text-align: center">M</td> + * <td style="text-align: center">1..2</td> + * <td>09</td> + * <td rowspan="4">Month - Use one or two for the numerical month, three for the abbreviation, four for + * the full (wide) name, or five for the narrow name. With two ("MM"), the month number is zero-padded + * if necessary (e.g. "08")</td> + * </tr> + * <tr> + * <td style="text-align: center">3</td> + * <td>Sep</td> + * </tr> + * <tr> + * <td style="text-align: center">4</td> + * <td>September</td> + * </tr> + * <tr> + * <td style="text-align: center">5</td> + * <td>S</td> + * </tr> + * <tr> + * <td rowspan="4" style="text-align: center">L</td> + * <td style="text-align: center">1..2</td> + * <td>09</td> + * <td rowspan="4"><b>Stand-Alone</b> Month - Use one or two for the numerical month, three for the abbreviation, + * four for the full (wide) name, or 5 for the narrow name. With two ("LL"), the month number is zero-padded if + * necessary (e.g. "08")</td> + * </tr> + * <tr> + * <td style="text-align: center">3</td> + * <td>Sep</td> + * </tr> + * <tr> + * <td style="text-align: center">4</td> + * <td>September</td> + * </tr> + * <tr> + * <td style="text-align: center">5</td> + * <td>S</td> + * </tr> + * <tr> + * <th rowspan="2">week</th> + * <td style="text-align: center">w</td> + * <td style="text-align: center">1..2</td> + * <td>27</td> + * <td>Week of Year. Use "w" to show the minimum number of digits, or "ww" to always show two digits + * (zero-padding if necessary, e.g. "08").</td> + * </tr> + * <tr> + * <td style="text-align: center">W</td> + * <td style="text-align: center">1</td> + * <td>3</td> + * <td>Week of Month</td> + * </tr> + * <tr> + * <th rowspan="4">day</th> + * <td style="text-align: center">d</td> + * <td style="text-align: center">1..2</td> + * <td>1</td> + * <td>Date - Day of the month. Use "d" to show the minimum number of digits, or "dd" to always show + * two digits (zero-padding if necessary, e.g. "08").</td> + * </tr> + * <tr> + * <td style="text-align: center">D</td> + * <td style="text-align: center">1..3</td> + * <td>345</td> + * <td>Day of year</td> + * </tr> + * <tr> + * <td style="text-align: center">F</td> + * <td style="text-align: center">1</td> + * <td>2</td> + * <td>Day of Week in Month. The example is for the 2nd Wed in July</td> + * </tr> + * <tr> + * <td style="text-align: center">g</td> + * <td style="text-align: center">1..n</td> + * <td>2451334</td> + * <td>Modified Julian day. This is different from the conventional Julian day number in two regards. + * First, it demarcates days at local zone midnight, rather than noon GMT. Second, it is a local number; + * that is, it depends on the local time zone. It can be thought of as a single number that encompasses + * all the date-related fields.</td> + * </tr> + * <tr> + * <th rowspan="14">week<br> + * day</th> + * <td rowspan="4" style="text-align: center">E</td> + * <td style="text-align: center">1..3</td> + * <td>Tue</td> + * <td rowspan="4">Day of week - Use one through three letters for the short day, four for the full (wide) name, + * five for the narrow name, or six for the short name.</td> + * </tr> + * <tr> + * <td style="text-align: center">4</td> + * <td>Tuesday</td> + * </tr> + * <tr> + * <td style="text-align: center">5</td> + * <td>T</td> + * </tr> + * <tr> + * <td style="text-align: center">6</td> + * <td>Tu</td> + * </tr> + * <tr> + * <td rowspan="5" style="text-align: center">e</td> + * <td style="text-align: center">1..2</td> + * <td>2</td> + * <td rowspan="5">Local day of week. Same as E except adds a numeric value that will depend on the local + * starting day of the week, using one or two letters. For this example, Monday is the first day of the week.</td> + * </tr> + * <tr> + * <td style="text-align: center">3</td> + * <td>Tue</td> + * </tr> + * <tr> + * <td style="text-align: center">4</td> + * <td>Tuesday</td> + * </tr> + * <tr> + * <td style="text-align: center">5</td> + * <td>T</td> + * </tr> + * <tr> + * <td style="text-align: center">6</td> + * <td>Tu</td> + * </tr> + * <tr> + * <td rowspan="5" style="text-align: center">c</td> + * <td style="text-align: center">1</td> + * <td>2</td> + * <td rowspan="5"><b>Stand-Alone</b> local day of week - Use one letter for the local numeric value (same + * as 'e'), three for the short day, four for the full (wide) name, five for the narrow name, or six for + * the short name.</td> + * </tr> + * <tr> + * <td style="text-align: center">3</td> + * <td>Tue</td> + * </tr> + * <tr> + * <td style="text-align: center">4</td> + * <td>Tuesday</td> + * </tr> + * <tr> + * <td style="text-align: center">5</td> + * <td>T</td> + * </tr> + * <tr> + * <td style="text-align: center">6</td> + * <td>Tu</td> + * </tr> + * <tr> + * <th>period</th> + * <td style="text-align: center">a</td> + * <td style="text-align: center">1</td> + * <td>AM</td> + * <td>AM or PM</td> + * </tr> + * <tr> + * <th rowspan="4">hour</th> + * <td style="text-align: center">h</td> + * <td style="text-align: center">1..2</td> + * <td>11</td> + * <td>Hour [1-12]. When used in skeleton data or in a skeleton passed in an API for flexible data pattern + * generation, it should match the 12-hour-cycle format preferred by the locale (h or K); it should not match + * a 24-hour-cycle format (H or k). Use hh for zero padding.</td> + * </tr> + * <tr> + * <td style="text-align: center">H</td> + * <td style="text-align: center">1..2</td> + * <td>13</td> + * <td>Hour [0-23]. When used in skeleton data or in a skeleton passed in an API for flexible data pattern + * generation, it should match the 24-hour-cycle format preferred by the locale (H or k); it should not match a + * 12-hour-cycle format (h or K). Use HH for zero padding.</td> + * </tr> + * <tr> + * <td style="text-align: center">K</td> + * <td style="text-align: center">1..2</td> + * <td>0</td> + * <td>Hour [0-11]. When used in a skeleton, only matches K or h, see above. Use KK for zero padding.</td> + * </tr> + * <tr> + * <td style="text-align: center">k</td> + * <td style="text-align: center">1..2</td> + * <td>24</td> + * <td>Hour [1-24]. When used in a skeleton, only matches k or H, see above. Use kk for zero padding.</td> + * </tr> + * <tr> + * <th>minute</th> + * <td style="text-align: center">m</td> + * <td style="text-align: center">1..2</td> + * <td>59</td> + * <td>Minute. Use "m" to show the minimum number of digits, or "mm" to always show two digits + * (zero-padding if necessary, e.g. "08").</td> + * </tr> + * <tr> + * <th rowspan="3">second</th> + * <td style="text-align: center">s</td> + * <td style="text-align: center">1..2</td> + * <td>12</td> + * <td>Second. Use "s" to show the minimum number of digits, or "ss" to always show two digits + * (zero-padding if necessary, e.g. "08").</td> + * </tr> + * <tr> + * <td style="text-align: center">S</td> + * <td style="text-align: center">1..n</td> + * <td>3450</td> + * <td>Fractional Second - truncates (like other time fields) to the count of letters when formatting. + * Appends zeros if more than 3 letters specified. Truncates at three significant digits when parsing. + * (example shows display using pattern SSSS for seconds value 12.34567)</td> + * </tr> + * <tr> + * <td style="text-align: center">A</td> + * <td style="text-align: center">1..n</td> + * <td>69540000</td> + * <td>Milliseconds in day. This field behaves <i>exactly</i> like a composite of all time-related fields, + * not including the zone fields. As such, it also reflects discontinuities of those fields on DST transition + * days. On a day of DST onset, it will jump forward. On a day of DST cessation, it will jump backward. This + * reflects the fact that is must be combined with the offset field to obtain a unique local time value.</td> + * </tr> + * <tr> + * <th rowspan="23">zone</th> + * <td rowspan="2" style="text-align: center">z</td> + * <td style="text-align: center">1..3</td> + * <td>PDT</td> + * <td>The <i>short specific non-location format</i>. + * Where that is unavailable, falls back to the <i>short localized GMT format</i> ("O").</td> + * </tr> + * <tr> + * <td style="text-align: center">4</td> + * <td>Pacific Daylight Time</td> + * <td>The <i>long specific non-location format</i>. + * Where that is unavailable, falls back to the <i>long localized GMT format</i> ("OOOO").</td> + * </tr> + * <tr> + * <td rowspan="3" style="text-align: center">Z</td> + * <td style="text-align: center">1..3</td> + * <td>-0800</td> + * <td>The <i>ISO8601 basic format</i> with hours, minutes and optional seconds fields. + * The format is equivalent to RFC 822 zone format (when optional seconds field is absent). + * This is equivalent to the "xxxx" specifier.</td> + * </tr> + * <tr> + * <td style="text-align: center">4</td> + * <td>GMT-8:00</td> + * <td>The <i>long localized GMT format</i>. + * This is equivalent to the "OOOO" specifier.</td> + * </tr> + * <tr> + * <td style="text-align: center">5</td> + * <td>-08:00<br> + * -07:52:58</td> + * <td>The <i>ISO8601 extended format</i> with hours, minutes and optional seconds fields. + * The ISO8601 UTC indicator "Z" is used when local time offset is 0. + * This is equivalent to the "XXXXX" specifier.</td> + * </tr> + * <tr> + * <td rowspan="2" style="text-align: center">O</td> + * <td style="text-align: center">1</td> + * <td>GMT-8</td> + * <td>The <i>short localized GMT format</i>.</td> + * </tr> + * <tr> + * <td style="text-align: center">4</td> + * <td>GMT-08:00</td> + * <td>The <i>long localized GMT format</i>.</td> + * </tr> + * <tr> + * <td rowspan="2" style="text-align: center">v</td> + * <td style="text-align: center">1</td> + * <td>PT</td> + * <td>The <i>short generic non-location format</i>. + * Where that is unavailable, falls back to the <i>generic location format</i> ("VVVV"), + * then the <i>short localized GMT format</i> as the final fallback.</td> + * </tr> + * <tr> + * <td style="text-align: center">4</td> + * <td>Pacific Time</td> + * <td>The <i>long generic non-location format</i>. + * Where that is unavailable, falls back to <i>generic location format</i> ("VVVV"). + * </tr> + * <tr> + * <td rowspan="4" style="text-align: center">V</td> + * <td style="text-align: center">1</td> + * <td>uslax</td> + * <td>The short time zone ID. + * Where that is unavailable, the special short time zone ID <i>unk</i> (Unknown Zone) is used.<br> + * <i><b>Note</b>: This specifier was originally used for a variant of the short specific non-location format, + * but it was deprecated in the later version of the LDML specification. In CLDR 23/ICU 51, the definition of + * the specifier was changed to designate a short time zone ID.</i></td> + * </tr> + * <tr> + * <td style="text-align: center">2</td> + * <td>America/Los_Angeles</td> + * <td>The long time zone ID.</td> + * </tr> + * <tr> + * <td style="text-align: center">3</td> + * <td>Los Angeles</td> + * <td>The exemplar city (location) for the time zone. + * Where that is unavailable, the localized exemplar city name for the special zone <i>Etc/Unknown</i> is used + * as the fallback (for example, "Unknown City"). </td> + * </tr> + * <tr> + * <td style="text-align: center">4</td> + * <td>Los Angeles Time</td> + * <td>The <i>generic location format</i>. + * Where that is unavailable, falls back to the <i>long localized GMT format</i> ("OOOO"; + * Note: Fallback is only necessary with a GMT-style Time Zone ID, like Etc/GMT-830.)<br> + * This is especially useful when presenting possible timezone choices for user selection, + * since the naming is more uniform than the "v" format.</td> + * </tr> + * <tr> + * <td rowspan="5" style="text-align: center">X</td> + * <td style="text-align: center">1</td> + * <td>-08<br> + * +0530<br> + * Z</td> + * <td>The <i>ISO8601 basic format</i> with hours field and optional minutes field. + * The ISO8601 UTC indicator "Z" is used when local time offset is 0.</td> + * </tr> + * <tr> + * <td style="text-align: center">2</td> + * <td>-0800<br> + * Z</td> + * <td>The <i>ISO8601 basic format</i> with hours and minutes fields. + * The ISO8601 UTC indicator "Z" is used when local time offset is 0.</td> + * </tr> + * <tr> + * <td style="text-align: center">3</td> + * <td>-08:00<br> + * Z</td> + * <td>The <i>ISO8601 extended format</i> with hours and minutes fields. + * The ISO8601 UTC indicator "Z" is used when local time offset is 0.</td> + * </tr> + * <tr> + * <td style="text-align: center">4</td> + * <td>-0800<br> + * -075258<br> + * Z</td> + * <td>The <i>ISO8601 basic format</i> with hours, minutes and optional seconds fields. + * (Note: The seconds field is not supported by the ISO8601 specification.) + * The ISO8601 UTC indicator "Z" is used when local time offset is 0.</td> + * </tr> + * <tr> + * <td style="text-align: center">5</td> + * <td>-08:00<br> + * -07:52:58<br> + * Z</td> + * <td>The <i>ISO8601 extended format</i> with hours, minutes and optional seconds fields. + * (Note: The seconds field is not supported by the ISO8601 specification.) + * The ISO8601 UTC indicator "Z" is used when local time offset is 0.</td> + * </tr> + * <tr> + * <td rowspan="5" style="text-align: center">x</td> + * <td style="text-align: center">1</td> + * <td>-08<br> + * +0530</td> + * <td>The <i>ISO8601 basic format</i> with hours field and optional minutes field.</td> + * </tr> + * <tr> + * <td style="text-align: center">2</td> + * <td>-0800</td> + * <td>The <i>ISO8601 basic format</i> with hours and minutes fields.</td> + * </tr> + * <tr> + * <td style="text-align: center">3</td> + * <td>-08:00</td> + * <td>The <i>ISO8601 extended format</i> with hours and minutes fields.</td> + * </tr> + * <tr> + * <td style="text-align: center">4</td> + * <td>-0800<br> + * -075258</td> + * <td>The <i>ISO8601 basic format</i> with hours, minutes and optional seconds fields. + * (Note: The seconds field is not supported by the ISO8601 specification.)</td> + * </tr> + * <tr> + * <td style="text-align: center">5</td> + * <td>-08:00<br> + * -07:52:58</td> + * <td>The <i>ISO8601 extended format</i> with hours, minutes and optional seconds fields. + * (Note: The seconds field is not supported by the ISO8601 specification.)</td> + * </tr> + * </table> + * + * <P> + * Any characters in the pattern that are not in the ranges of ['a'..'z'] and + * ['A'..'Z'] will be treated as quoted text. For instance, characters + * like ':', '.', ' ', '#' and '@' will appear in the resulting time text + * even they are not embraced within single quotes. + * <P> + * A pattern containing any invalid pattern letter will result in a failing + * UErrorCode result during formatting or parsing. + * <P> + * Examples using the US locale: + * <pre> + * \code + * Format Pattern Result + * -------------- ------- + * "yyyy.MM.dd G 'at' HH:mm:ss vvvv" ->> 1996.07.10 AD at 15:08:56 Pacific Time + * "EEE, MMM d, ''yy" ->> Wed, July 10, '96 + * "h:mm a" ->> 12:08 PM + * "hh 'o''clock' a, zzzz" ->> 12 o'clock PM, Pacific Daylight Time + * "K:mm a, vvv" ->> 0:00 PM, PT + * "yyyyy.MMMMM.dd GGG hh:mm aaa" ->> 1996.July.10 AD 12:08 PM + * \endcode + * </pre> + * Code Sample: + * <pre> + * \code + * UErrorCode success = U_ZERO_ERROR; + * SimpleTimeZone* pdt = new SimpleTimeZone(-8 * 60 * 60 * 1000, "PST"); + * pdt->setStartRule( Calendar::APRIL, 1, Calendar::SUNDAY, 2*60*60*1000); + * pdt->setEndRule( Calendar::OCTOBER, -1, Calendar::SUNDAY, 2*60*60*1000); + * + * // Format the current time. + * SimpleDateFormat* formatter + * = new SimpleDateFormat ("yyyy.MM.dd G 'at' hh:mm:ss a zzz", success ); + * GregorianCalendar cal(success); + * UDate currentTime_1 = cal.getTime(success); + * FieldPosition fp(FieldPosition::DONT_CARE); + * UnicodeString dateString; + * formatter->format( currentTime_1, dateString, fp ); + * cout << "result: " << dateString << endl; + * + * // Parse the previous string back into a Date. + * ParsePosition pp(0); + * UDate currentTime_2 = formatter->parse(dateString, pp ); + * \endcode + * </pre> + * In the above example, the time value "currentTime_2" obtained from parsing + * will be equal to currentTime_1. However, they may not be equal if the am/pm + * marker 'a' is left out from the format pattern while the "hour in am/pm" + * pattern symbol is used. This information loss can happen when formatting the + * time in PM. + * + * <p> + * When parsing a date string using the abbreviated year pattern ("y" or "yy"), + * SimpleDateFormat must interpret the abbreviated year + * relative to some century. It does this by adjusting dates to be + * within 80 years before and 20 years after the time the SimpleDateFormat + * instance is created. For example, using a pattern of "MM/dd/yy" and a + * SimpleDateFormat instance created on Jan 1, 1997, the string + * "01/11/12" would be interpreted as Jan 11, 2012 while the string "05/04/64" + * would be interpreted as May 4, 1964. + * During parsing, only strings consisting of exactly two digits, as defined by + * <code>Unicode::isDigit()</code>, will be parsed into the default century. + * Any other numeric string, such as a one digit string, a three or more digit + * string, or a two digit string that isn't all digits (for example, "-1"), is + * interpreted literally. So "01/02/3" or "01/02/003" are parsed (for the + * Gregorian calendar), using the same pattern, as Jan 2, 3 AD. Likewise (but + * only in lenient parse mode, the default) "01/02/-3" is parsed as Jan 2, 4 BC. + * + * <p> + * If the year pattern has more than two 'y' characters, the year is + * interpreted literally, regardless of the number of digits. So using the + * pattern "MM/dd/yyyy", "01/11/12" parses to Jan 11, 12 A.D. + * + * <p> + * When numeric fields abut one another directly, with no intervening delimiter + * characters, they constitute a run of abutting numeric fields. Such runs are + * parsed specially. For example, the format "HHmmss" parses the input text + * "123456" to 12:34:56, parses the input text "12345" to 1:23:45, and fails to + * parse "1234". In other words, the leftmost field of the run is flexible, + * while the others keep a fixed width. If the parse fails anywhere in the run, + * then the leftmost field is shortened by one character, and the entire run is + * parsed again. This is repeated until either the parse succeeds or the + * leftmost field is one character in length. If the parse still fails at that + * point, the parse of the run fails. + * + * <P> + * For time zones that have no names, SimpleDateFormat uses strings GMT+hours:minutes or + * GMT-hours:minutes. + * <P> + * The calendar defines what is the first day of the week, the first week of the + * year, whether hours are zero based or not (0 vs 12 or 24), and the timezone. + * There is one common number format to handle all the numbers; the digit count + * is handled programmatically according to the pattern. + * + * <p><em>User subclasses are not supported.</em> While clients may write + * subclasses, such code will not necessarily work and will not be + * guaranteed to work stably from release to release. + */ +class U_I18N_API SimpleDateFormat: public DateFormat { +public: + /** + * Construct a SimpleDateFormat using the default pattern for the default + * locale. + * <P> + * [Note:] Not all locales support SimpleDateFormat; for full generality, + * use the factory methods in the DateFormat class. + * @param status Output param set to success/failure code. + * @stable ICU 2.0 + */ + SimpleDateFormat(UErrorCode& status); + + /** + * Construct a SimpleDateFormat using the given pattern and the default locale. + * The locale is used to obtain the symbols used in formatting (e.g., the + * names of the months), but not to provide the pattern. + * <P> + * [Note:] Not all locales support SimpleDateFormat; for full generality, + * use the factory methods in the DateFormat class. + * @param pattern the pattern for the format. + * @param status Output param set to success/failure code. + * @stable ICU 2.0 + */ + SimpleDateFormat(const UnicodeString& pattern, + UErrorCode& status); + + /** + * Construct a SimpleDateFormat using the given pattern, numbering system override, and the default locale. + * The locale is used to obtain the symbols used in formatting (e.g., the + * names of the months), but not to provide the pattern. + * <P> + * A numbering system override is a string containing either the name of a known numbering system, + * or a set of field and numbering system pairs that specify which fields are to be formattied with + * the alternate numbering system. For example, to specify that all numeric fields in the specified + * date or time pattern are to be rendered using Thai digits, simply specify the numbering system override + * as "thai". To specify that just the year portion of the date be formatted using Hebrew numbering, + * use the override string "y=hebrew". Numbering system overrides can be combined using a semi-colon + * character in the override string, such as "d=decimal;M=arabic;y=hebrew", etc. + * + * <P> + * [Note:] Not all locales support SimpleDateFormat; for full generality, + * use the factory methods in the DateFormat class. + * @param pattern the pattern for the format. + * @param override the override string. + * @param status Output param set to success/failure code. + * @stable ICU 4.2 + */ + SimpleDateFormat(const UnicodeString& pattern, + const UnicodeString& override, + UErrorCode& status); + + /** + * Construct a SimpleDateFormat using the given pattern and locale. + * The locale is used to obtain the symbols used in formatting (e.g., the + * names of the months), but not to provide the pattern. + * <P> + * [Note:] Not all locales support SimpleDateFormat; for full generality, + * use the factory methods in the DateFormat class. + * @param pattern the pattern for the format. + * @param locale the given locale. + * @param status Output param set to success/failure code. + * @stable ICU 2.0 + */ + SimpleDateFormat(const UnicodeString& pattern, + const Locale& locale, + UErrorCode& status); + + /** + * Construct a SimpleDateFormat using the given pattern, numbering system override, and locale. + * The locale is used to obtain the symbols used in formatting (e.g., the + * names of the months), but not to provide the pattern. + * <P> + * A numbering system override is a string containing either the name of a known numbering system, + * or a set of field and numbering system pairs that specify which fields are to be formattied with + * the alternate numbering system. For example, to specify that all numeric fields in the specified + * date or time pattern are to be rendered using Thai digits, simply specify the numbering system override + * as "thai". To specify that just the year portion of the date be formatted using Hebrew numbering, + * use the override string "y=hebrew". Numbering system overrides can be combined using a semi-colon + * character in the override string, such as "d=decimal;M=arabic;y=hebrew", etc. + * <P> + * [Note:] Not all locales support SimpleDateFormat; for full generality, + * use the factory methods in the DateFormat class. + * @param pattern the pattern for the format. + * @param override the numbering system override. + * @param locale the given locale. + * @param status Output param set to success/failure code. + * @stable ICU 4.2 + */ + SimpleDateFormat(const UnicodeString& pattern, + const UnicodeString& override, + const Locale& locale, + UErrorCode& status); + + /** + * Construct a SimpleDateFormat using the given pattern and locale-specific + * symbol data. The formatter takes ownership of the DateFormatSymbols object; + * the caller is no longer responsible for deleting it. + * @param pattern the given pattern for the format. + * @param formatDataToAdopt the symbols to be adopted. + * @param status Output param set to success/faulure code. + * @stable ICU 2.0 + */ + SimpleDateFormat(const UnicodeString& pattern, + DateFormatSymbols* formatDataToAdopt, + UErrorCode& status); + + /** + * Construct a SimpleDateFormat using the given pattern and locale-specific + * symbol data. The DateFormatSymbols object is NOT adopted; the caller + * remains responsible for deleting it. + * @param pattern the given pattern for the format. + * @param formatData the formatting symbols to be use. + * @param status Output param set to success/faulure code. + * @stable ICU 2.0 + */ + SimpleDateFormat(const UnicodeString& pattern, + const DateFormatSymbols& formatData, + UErrorCode& status); + + /** + * Copy constructor. + * @stable ICU 2.0 + */ + SimpleDateFormat(const SimpleDateFormat&); + + /** + * Assignment operator. + * @stable ICU 2.0 + */ + SimpleDateFormat& operator=(const SimpleDateFormat&); + + /** + * Destructor. + * @stable ICU 2.0 + */ + virtual ~SimpleDateFormat(); + + /** + * Clone this Format object polymorphically. The caller owns the result and + * should delete it when done. + * @return A copy of the object. + * @stable ICU 2.0 + */ + virtual Format* clone(void) const; + + /** + * Return true if the given Format objects are semantically equal. Objects + * of different subclasses are considered unequal. + * @param other the object to be compared with. + * @return true if the given Format objects are semantically equal. + * @stable ICU 2.0 + */ + virtual UBool operator==(const Format& other) const; + + + using DateFormat::format; + + /** + * Format a date or time, which is the standard millis since 24:00 GMT, Jan + * 1, 1970. Overrides DateFormat pure virtual method. + * <P> + * Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->> + * 1996.07.10 AD at 15:08:56 PDT + * + * @param cal Calendar set to the date and time to be formatted + * into a date/time string. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param pos The formatting position. On input: an alignment field, + * if desired. On output: the offsets of the alignment field. + * @return Reference to 'appendTo' parameter. + * @stable ICU 2.1 + */ + virtual UnicodeString& format( Calendar& cal, + UnicodeString& appendTo, + FieldPosition& pos) const; + + /** + * Format a date or time, which is the standard millis since 24:00 GMT, Jan + * 1, 1970. Overrides DateFormat pure virtual method. + * <P> + * Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->> + * 1996.07.10 AD at 15:08:56 PDT + * + * @param cal Calendar set to the date and time to be formatted + * into a date/time string. + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param posIter On return, can be used to iterate over positions + * of fields generated by this format call. Field values + * are defined in UDateFormatField. + * @param status Input/output param set to success/failure code. + * @return Reference to 'appendTo' parameter. + * @stable ICU 4.4 + */ + virtual UnicodeString& format( Calendar& cal, + UnicodeString& appendTo, + FieldPositionIterator* posIter, + UErrorCode& status) const; + + using DateFormat::parse; + + /** + * Parse a date/time string beginning at the given parse position. For + * example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Date + * that is equivalent to Date(837039928046). + * <P> + * By default, parsing is lenient: If the input is not in the form used by + * this object's format method but can still be parsed as a date, then the + * parse succeeds. Clients may insist on strict adherence to the format by + * calling setLenient(false). + * @see DateFormat::setLenient(boolean) + * + * @param text The date/time string to be parsed + * @param cal A Calendar set on input to the date and time to be used for + * missing values in the date/time string being parsed, and set + * on output to the parsed date/time. When the calendar type is + * different from the internal calendar held by this SimpleDateFormat + * instance, the internal calendar will be cloned to a work + * calendar set to the same milliseconds and time zone as the + * cal parameter, field values will be parsed based on the work + * calendar, then the result (milliseconds and time zone) will + * be set in this calendar. + * @param pos On input, the position at which to start parsing; on + * output, the position at which parsing terminated, or the + * start position if the parse failed. + * @stable ICU 2.1 + */ + virtual void parse( const UnicodeString& text, + Calendar& cal, + ParsePosition& pos) const; + + + /** + * Set the start UDate used to interpret two-digit year strings. + * When dates are parsed having 2-digit year strings, they are placed within + * a assumed range of 100 years starting on the two digit start date. For + * example, the string "24-Jan-17" may be in the year 1817, 1917, 2017, or + * some other year. SimpleDateFormat chooses a year so that the resultant + * date is on or after the two digit start date and within 100 years of the + * two digit start date. + * <P> + * By default, the two digit start date is set to 80 years before the current + * time at which a SimpleDateFormat object is created. + * @param d start UDate used to interpret two-digit year strings. + * @param status Filled in with U_ZERO_ERROR if the parse was successful, and with + * an error value if there was a parse error. + * @stable ICU 2.0 + */ + virtual void set2DigitYearStart(UDate d, UErrorCode& status); + + /** + * Get the start UDate used to interpret two-digit year strings. + * When dates are parsed having 2-digit year strings, they are placed within + * a assumed range of 100 years starting on the two digit start date. For + * example, the string "24-Jan-17" may be in the year 1817, 1917, 2017, or + * some other year. SimpleDateFormat chooses a year so that the resultant + * date is on or after the two digit start date and within 100 years of the + * two digit start date. + * <P> + * By default, the two digit start date is set to 80 years before the current + * time at which a SimpleDateFormat object is created. + * @param status Filled in with U_ZERO_ERROR if the parse was successful, and with + * an error value if there was a parse error. + * @stable ICU 2.0 + */ + UDate get2DigitYearStart(UErrorCode& status) const; + + /** + * Return a pattern string describing this date format. + * @param result Output param to receive the pattern. + * @return A reference to 'result'. + * @stable ICU 2.0 + */ + virtual UnicodeString& toPattern(UnicodeString& result) const; + + /** + * Return a localized pattern string describing this date format. + * In most cases, this will return the same thing as toPattern(), + * but a locale can specify characters to use in pattern descriptions + * in place of the ones described in this class's class documentation. + * (Presumably, letters that would be more mnemonic in that locale's + * language.) This function would produce a pattern using those + * letters. + * <p> + * <b>Note:</b> This implementation depends on DateFormatSymbols::getLocalPatternChars() + * to get localized format pattern characters. ICU does not include + * localized pattern character data, therefore, unless user sets localized + * pattern characters manually, this method returns the same result as + * toPattern(). + * + * @param result Receives the localized pattern. + * @param status Output param set to success/failure code on + * exit. If the pattern is invalid, this will be + * set to a failure result. + * @return A reference to 'result'. + * @stable ICU 2.0 + */ + virtual UnicodeString& toLocalizedPattern(UnicodeString& result, + UErrorCode& status) const; + + /** + * Apply the given unlocalized pattern string to this date format. + * (i.e., after this call, this formatter will format dates according to + * the new pattern) + * + * @param pattern The pattern to be applied. + * @stable ICU 2.0 + */ + virtual void applyPattern(const UnicodeString& pattern); + + /** + * Apply the given localized pattern string to this date format. + * (see toLocalizedPattern() for more information on localized patterns.) + * + * @param pattern The localized pattern to be applied. + * @param status Output param set to success/failure code on + * exit. If the pattern is invalid, this will be + * set to a failure result. + * @stable ICU 2.0 + */ + virtual void applyLocalizedPattern(const UnicodeString& pattern, + UErrorCode& status); + + /** + * Gets the date/time formatting symbols (this is an object carrying + * the various strings and other symbols used in formatting: e.g., month + * names and abbreviations, time zone names, AM/PM strings, etc.) + * @return a copy of the date-time formatting data associated + * with this date-time formatter. + * @stable ICU 2.0 + */ + virtual const DateFormatSymbols* getDateFormatSymbols(void) const; + + /** + * Set the date/time formatting symbols. The caller no longer owns the + * DateFormatSymbols object and should not delete it after making this call. + * @param newFormatSymbols the given date-time formatting symbols to copy. + * @stable ICU 2.0 + */ + virtual void adoptDateFormatSymbols(DateFormatSymbols* newFormatSymbols); + + /** + * Set the date/time formatting data. + * @param newFormatSymbols the given date-time formatting symbols to copy. + * @stable ICU 2.0 + */ + virtual void setDateFormatSymbols(const DateFormatSymbols& newFormatSymbols); + + /** + * Return the class ID for this class. This is useful only for comparing to + * a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . erived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 2.0 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This + * method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() + * methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 2.0 + */ + virtual UClassID getDynamicClassID(void) const; + + /** + * Set the calendar to be used by this date format. Initially, the default + * calendar for the specified or default locale is used. The caller should + * not delete the Calendar object after it is adopted by this call. + * Adopting a new calendar will change to the default symbols. + * + * @param calendarToAdopt Calendar object to be adopted. + * @stable ICU 2.0 + */ + virtual void adoptCalendar(Calendar* calendarToAdopt); + + /* Cannot use #ifndef U_HIDE_INTERNAL_API for the following methods since they are virtual */ + /** + * Sets the TimeZoneFormat to be used by this date/time formatter. + * The caller should not delete the TimeZoneFormat object after + * it is adopted by this call. + * @param timeZoneFormatToAdopt The TimeZoneFormat object to be adopted. + * @internal ICU 49 technology preview + */ + virtual void adoptTimeZoneFormat(TimeZoneFormat* timeZoneFormatToAdopt); + + /** + * Sets the TimeZoneFormat to be used by this date/time formatter. + * @param newTimeZoneFormat The TimeZoneFormat object to copy. + * @internal ICU 49 technology preview + */ + virtual void setTimeZoneFormat(const TimeZoneFormat& newTimeZoneFormat); + + /** + * Gets the time zone format object associated with this date/time formatter. + * @return the time zone format associated with this date/time formatter. + * @internal ICU 49 technology preview + */ + virtual const TimeZoneFormat* getTimeZoneFormat(void) const; + + /** + * Set a particular UDisplayContext value in the formatter, such as + * UDISPCTX_CAPITALIZATION_FOR_STANDALONE. Note: For getContext, see + * DateFormat. + * @param value The UDisplayContext value to set. + * @param status Input/output status. If at entry this indicates a failure + * status, the function will do nothing; otherwise this will be + * updated with any new status from the function. + * @stable ICU 53 + */ + virtual void setContext(UDisplayContext value, UErrorCode& status); + + /** + * Overrides base class method and + * This method clears per field NumberFormat instances + * previously set by {@see adoptNumberFormat(const UnicodeString&, NumberFormat*, UErrorCode)} + * @param adoptNF the NumbeferFormat used + * @stable ICU 54 + */ + void adoptNumberFormat(NumberFormat *formatToAdopt); + + /** + * Allow the user to set the NumberFormat for several fields + * It can be a single field like: "y"(year) or "M"(month) + * It can be several field combined together: "yM"(year and month) + * Note: + * 1 symbol field is enough for multiple symbol field (so "y" will override "yy", "yyy") + * If the field is not numeric, then override has no effect (like "MMM" will use abbreviation, not numerical field) + * Per field NumberFormat can also be cleared in {@see DateFormat::setNumberFormat(const NumberFormat& newNumberFormat)} + * + * @param fields the fields to override(like y) + * @param adoptNF the NumbeferFormat used + * @param status Receives a status code, which will be U_ZERO_ERROR + * if the operation succeeds. + * @stable ICU 54 + */ + void adoptNumberFormat(const UnicodeString& fields, NumberFormat *formatToAdopt, UErrorCode &status); + + /** + * Get the numbering system to be used for a particular field. + * @param field The UDateFormatField to get + * @stable ICU 54 + */ + const NumberFormat * getNumberFormatForField(char16_t field) const; + +#ifndef U_HIDE_INTERNAL_API + /** + * This is for ICU internal use only. Please do not use. + * Check whether the 'field' is smaller than all the fields covered in + * pattern, return TRUE if it is. The sequence of calendar field, + * from large to small is: ERA, YEAR, MONTH, DATE, AM_PM, HOUR, MINUTE,... + * @param field the calendar field need to check against + * @return TRUE if the 'field' is smaller than all the fields + * covered in pattern. FALSE otherwise. + * @internal ICU 4.0 + */ + UBool isFieldUnitIgnored(UCalendarDateFields field) const; + + + /** + * This is for ICU internal use only. Please do not use. + * Check whether the 'field' is smaller than all the fields covered in + * pattern, return TRUE if it is. The sequence of calendar field, + * from large to small is: ERA, YEAR, MONTH, DATE, AM_PM, HOUR, MINUTE,... + * @param pattern the pattern to check against + * @param field the calendar field need to check against + * @return TRUE if the 'field' is smaller than all the fields + * covered in pattern. FALSE otherwise. + * @internal ICU 4.0 + */ + static UBool isFieldUnitIgnored(const UnicodeString& pattern, + UCalendarDateFields field); + + /** + * This is for ICU internal use only. Please do not use. + * Get the locale of this simple date formatter. + * It is used in DateIntervalFormat. + * + * @return locale in this simple date formatter + * @internal ICU 4.0 + */ + const Locale& getSmpFmtLocale(void) const; +#endif /* U_HIDE_INTERNAL_API */ + +private: + friend class DateFormat; + + void initializeDefaultCentury(void); + + void initializeBooleanAttributes(void); + + SimpleDateFormat(); // default constructor not implemented + + /** + * Used by the DateFormat factory methods to construct a SimpleDateFormat. + * @param timeStyle the time style. + * @param dateStyle the date style. + * @param locale the given locale. + * @param status Output param set to success/failure code on + * exit. + */ + SimpleDateFormat(EStyle timeStyle, EStyle dateStyle, const Locale& locale, UErrorCode& status); + + /** + * Construct a SimpleDateFormat for the given locale. If no resource data + * is available, create an object of last resort, using hard-coded strings. + * This is an internal method, called by DateFormat. It should never fail. + * @param locale the given locale. + * @param status Output param set to success/failure code on + * exit. + */ + SimpleDateFormat(const Locale& locale, UErrorCode& status); // Use default pattern + + /** + * Hook called by format(... FieldPosition& ...) and format(...FieldPositionIterator&...) + */ + UnicodeString& _format(Calendar& cal, UnicodeString& appendTo, FieldPositionHandler& handler, UErrorCode& status) const; + + /** + * Called by format() to format a single field. + * + * @param appendTo Output parameter to receive result. + * Result is appended to existing contents. + * @param ch The format character we encountered in the pattern. + * @param count Number of characters in the current pattern symbol (e.g., + * "yyyy" in the pattern would result in a call to this function + * with ch equal to 'y' and count equal to 4) + * @param capitalizationContext Capitalization context for this date format. + * @param fieldNum Zero-based numbering of current field within the overall format. + * @param handler Records information about field positions. + * @param cal Calendar to use + * @param status Receives a status code, which will be U_ZERO_ERROR if the operation + * succeeds. + */ + void subFormat(UnicodeString &appendTo, + char16_t ch, + int32_t count, + UDisplayContext capitalizationContext, + int32_t fieldNum, + FieldPositionHandler& handler, + Calendar& cal, + SimpleDateFormatMutableNFs &mutableNFs, + UErrorCode& status) const; // in case of illegal argument + + /** + * Used by subFormat() to format a numeric value. + * Appends to toAppendTo a string representation of "value" + * having a number of digits between "minDigits" and + * "maxDigits". Uses the DateFormat's NumberFormat. + * + * @param currentNumberFormat + * @param appendTo Output parameter to receive result. + * Formatted number is appended to existing contents. + * @param value Value to format. + * @param minDigits Minimum number of digits the result should have + * @param maxDigits Maximum number of digits the result should have + */ + void zeroPaddingNumber(NumberFormat *currentNumberFormat, + UnicodeString &appendTo, + int32_t value, + int32_t minDigits, + int32_t maxDigits) const; + + /** + * Return true if the given format character, occuring count + * times, represents a numeric field. + */ + static UBool isNumeric(char16_t formatChar, int32_t count); + + /** + * Returns TRUE if the patternOffset is at the start of a numeric field. + */ + static UBool isAtNumericField(const UnicodeString &pattern, int32_t patternOffset); + + /** + * Returns TRUE if the patternOffset is right after a non-numeric field. + */ + static UBool isAfterNonNumericField(const UnicodeString &pattern, int32_t patternOffset); + + /** + * initializes fCalendar from parameters. Returns fCalendar as a convenience. + * @param adoptZone Zone to be adopted, or NULL for TimeZone::createDefault(). + * @param locale Locale of the calendar + * @param status Error code + * @return the newly constructed fCalendar + */ + Calendar *initializeCalendar(TimeZone* adoptZone, const Locale& locale, UErrorCode& status); + + /** + * Called by several of the constructors to load pattern data and formatting symbols + * out of a resource bundle and initialize the locale based on it. + * @param timeStyle The time style, as passed to DateFormat::createDateInstance(). + * @param dateStyle The date style, as passed to DateFormat::createTimeInstance(). + * @param locale The locale to load the patterns from. + * @param status Filled in with an error code if loading the data from the + * resources fails. + */ + void construct(EStyle timeStyle, EStyle dateStyle, const Locale& locale, UErrorCode& status); + + /** + * Called by construct() and the various constructors to set up the SimpleDateFormat's + * Calendar and NumberFormat objects. + * @param locale The locale for which we want a Calendar and a NumberFormat. + * @param status Filled in with an error code if creating either subobject fails. + */ + void initialize(const Locale& locale, UErrorCode& status); + + /** + * Private code-size reduction function used by subParse. + * @param text the time text being parsed. + * @param start where to start parsing. + * @param field the date field being parsed. + * @param stringArray the string array to parsed. + * @param stringArrayCount the size of the array. + * @param monthPattern pointer to leap month pattern, or NULL if none. + * @param cal a Calendar set to the date and time to be formatted + * into a date/time string. + * @return the new start position if matching succeeded; a negative number + * indicating matching failure, otherwise. + */ + int32_t matchString(const UnicodeString& text, int32_t start, UCalendarDateFields field, + const UnicodeString* stringArray, int32_t stringArrayCount, + const UnicodeString* monthPattern, Calendar& cal) const; + + /** + * Private code-size reduction function used by subParse. + * @param text the time text being parsed. + * @param start where to start parsing. + * @param field the date field being parsed. + * @param stringArray the string array to parsed. + * @param stringArrayCount the size of the array. + * @param cal a Calendar set to the date and time to be formatted + * into a date/time string. + * @return the new start position if matching succeeded; a negative number + * indicating matching failure, otherwise. + */ + int32_t matchQuarterString(const UnicodeString& text, int32_t start, UCalendarDateFields field, + const UnicodeString* stringArray, int32_t stringArrayCount, Calendar& cal) const; + + /** + * Used by subParse() to match localized day period strings. + */ + int32_t matchDayPeriodStrings(const UnicodeString& text, int32_t start, + const UnicodeString* stringArray, int32_t stringArrayCount, + int32_t &dayPeriod) const; + + /** + * Private function used by subParse to match literal pattern text. + * + * @param pattern the pattern string + * @param patternOffset the starting offset into the pattern text. On + * outupt will be set the offset of the first non-literal character in the pattern + * @param text the text being parsed + * @param textOffset the starting offset into the text. On output + * will be set to the offset of the character after the match + * @param whitespaceLenient <code>TRUE</code> if whitespace parse is lenient, <code>FALSE</code> otherwise. + * @param partialMatchLenient <code>TRUE</code> if partial match parse is lenient, <code>FALSE</code> otherwise. + * @param oldLeniency <code>TRUE</code> if old leniency control is lenient, <code>FALSE</code> otherwise. + * + * @return <code>TRUE</code> if the literal text could be matched, <code>FALSE</code> otherwise. + */ + static UBool matchLiterals(const UnicodeString &pattern, int32_t &patternOffset, + const UnicodeString &text, int32_t &textOffset, + UBool whitespaceLenient, UBool partialMatchLenient, UBool oldLeniency); + + /** + * Private member function that converts the parsed date strings into + * timeFields. Returns -start (for ParsePosition) if failed. + * @param text the time text to be parsed. + * @param start where to start parsing. + * @param ch the pattern character for the date field text to be parsed. + * @param count the count of a pattern character. + * @param obeyCount if true then the count is strictly obeyed. + * @param allowNegative + * @param ambiguousYear If true then the two-digit year == the default start year. + * @param saveHebrewMonth Used to hang onto month until year is known. + * @param cal a Calendar set to the date and time to be formatted + * into a date/time string. + * @param patLoc + * @param numericLeapMonthFormatter If non-null, used to parse numeric leap months. + * @param tzTimeType the type of parsed time zone - standard, daylight or unknown (output). + * This parameter can be NULL if caller does not need the information. + * @return the new start position if matching succeeded; a negative number + * indicating matching failure, otherwise. + */ + int32_t subParse(const UnicodeString& text, int32_t& start, char16_t ch, int32_t count, + UBool obeyCount, UBool allowNegative, UBool ambiguousYear[], int32_t& saveHebrewMonth, Calendar& cal, + int32_t patLoc, MessageFormat * numericLeapMonthFormatter, UTimeZoneFormatTimeType *tzTimeType, SimpleDateFormatMutableNFs &mutableNFs, + int32_t *dayPeriod=NULL) const; + + void parseInt(const UnicodeString& text, + Formattable& number, + ParsePosition& pos, + UBool allowNegative, + NumberFormat *fmt) const; + + void parseInt(const UnicodeString& text, + Formattable& number, + int32_t maxDigits, + ParsePosition& pos, + UBool allowNegative, + NumberFormat *fmt) const; + + int32_t checkIntSuffix(const UnicodeString& text, int32_t start, + int32_t patLoc, UBool isNegative) const; + + /** + * Counts number of digit code points in the specified text. + * + * @param text input text + * @param start start index, inclusive + * @param end end index, exclusive + * @return number of digits found in the text in the specified range. + */ + int32_t countDigits(const UnicodeString& text, int32_t start, int32_t end) const; + + /** + * Translate a pattern, mapping each character in the from string to the + * corresponding character in the to string. Return an error if the original + * pattern contains an unmapped character, or if a quote is unmatched. + * Quoted (single quotes only) material is not translated. + * @param originalPattern the original pattern. + * @param translatedPattern Output param to receive the translited pattern. + * @param from the characters to be translited from. + * @param to the characters to be translited to. + * @param status Receives a status code, which will be U_ZERO_ERROR + * if the operation succeeds. + */ + static void translatePattern(const UnicodeString& originalPattern, + UnicodeString& translatedPattern, + const UnicodeString& from, + const UnicodeString& to, + UErrorCode& status); + + /** + * Sets the starting date of the 100-year window that dates with 2-digit years + * are considered to fall within. + * @param startDate the start date + * @param status Receives a status code, which will be U_ZERO_ERROR + * if the operation succeeds. + */ + void parseAmbiguousDatesAsAfter(UDate startDate, UErrorCode& status); + + /** + * Return the length matched by the given affix, or -1 if none. + * Runs of white space in the affix, match runs of white space in + * the input. + * @param affix pattern string, taken as a literal + * @param input input text + * @param pos offset into input at which to begin matching + * @return length of input that matches, or -1 if match failure + */ + int32_t compareSimpleAffix(const UnicodeString& affix, + const UnicodeString& input, + int32_t pos) const; + + /** + * Skip over a run of zero or more Pattern_White_Space characters at + * pos in text. + */ + int32_t skipPatternWhiteSpace(const UnicodeString& text, int32_t pos) const; + + /** + * Skip over a run of zero or more isUWhiteSpace() characters at pos + * in text. + */ + int32_t skipUWhiteSpace(const UnicodeString& text, int32_t pos) const; + + /** + * Initialize NumberFormat instances used for numbering system overrides. + */ + void initNumberFormatters(const Locale &locale,UErrorCode &status); + + /** + * Parse the given override string and set up structures for number formats + */ + void processOverrideString(const Locale &locale, const UnicodeString &str, int8_t type, UErrorCode &status); + + /** + * Used to map pattern characters to Calendar field identifiers. + */ + static const UCalendarDateFields fgPatternIndexToCalendarField[]; + + /** + * Map index into pattern character string to DateFormat field number + */ + static const UDateFormatField fgPatternIndexToDateFormatField[]; + + /** + * Lazy TimeZoneFormat instantiation, semantically const + */ + TimeZoneFormat *tzFormat() const; + + const NumberFormat* getNumberFormatByIndex(UDateFormatField index) const; + + /** + * Used to map Calendar field to field level. + * The larger the level, the smaller the field unit. + * For example, UCAL_ERA level is 0, UCAL_YEAR level is 10, + * UCAL_MONTH level is 20. + */ + static const int32_t fgCalendarFieldToLevel[]; + + /** + * Map calendar field letter into calendar field level. + */ + static int32_t getLevelFromChar(char16_t ch); + + /** + * Tell if a character can be used to define a field in a format string. + */ + static UBool isSyntaxChar(char16_t ch); + + /** + * The formatting pattern for this formatter. + */ + UnicodeString fPattern; + + /** + * The numbering system override for dates. + */ + UnicodeString fDateOverride; + + /** + * The numbering system override for times. + */ + UnicodeString fTimeOverride; + + + /** + * The original locale used (for reloading symbols) + */ + Locale fLocale; + + /** + * A pointer to an object containing the strings to use in formatting (e.g., + * month and day names, AM and PM strings, time zone names, etc.) + */ + DateFormatSymbols* fSymbols; // Owned + + /** + * The time zone formatter + */ + TimeZoneFormat* fTimeZoneFormat; + + /** + * If dates have ambiguous years, we map them into the century starting + * at defaultCenturyStart, which may be any date. If defaultCenturyStart is + * set to SYSTEM_DEFAULT_CENTURY, which it is by default, then the system + * values are used. The instance values defaultCenturyStart and + * defaultCenturyStartYear are only used if explicitly set by the user + * through the API method parseAmbiguousDatesAsAfter(). + */ + UDate fDefaultCenturyStart; + + UBool fHasMinute; + UBool fHasSecond; + + /** + * Sets fHasMinutes and fHasSeconds. + */ + void parsePattern(); + + /** + * See documentation for defaultCenturyStart. + */ + /*transient*/ int32_t fDefaultCenturyStartYear; + + struct NSOverride : public UMemory { + const SharedNumberFormat *snf; + int32_t hash; + NSOverride *next; + void free(); + NSOverride() : snf(NULL), hash(0), next(NULL) { + } + ~NSOverride(); + }; + + /** + * The number format in use for each date field. NULL means fall back + * to fNumberFormat in DateFormat. + */ + const SharedNumberFormat **fSharedNumberFormatters; + + UBool fHaveDefaultCentury; + + BreakIterator* fCapitalizationBrkIter; +}; + +inline UDate +SimpleDateFormat::get2DigitYearStart(UErrorCode& /*status*/) const +{ + return fDefaultCenturyStart; +} + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // _SMPDTFMT +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/sortkey.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/sortkey.h new file mode 100755 index 00000000..1f424601 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/sortkey.h @@ -0,0 +1,340 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ***************************************************************************** + * Copyright (C) 1996-2014, International Business Machines Corporation and others. + * All Rights Reserved. + ***************************************************************************** + * + * File sortkey.h + * + * Created by: Helena Shih + * + * Modification History: + * + * Date Name Description + * + * 6/20/97 helena Java class name change. + * 8/18/97 helena Added internal API documentation. + * 6/26/98 erm Changed to use byte arrays and memcmp. + ***************************************************************************** + */ + +#ifndef SORTKEY_H +#define SORTKEY_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Keys for comparing strings multiple times. + */ + +#if !UCONFIG_NO_COLLATION + +#include "unicode/uobject.h" +#include "unicode/unistr.h" +#include "unicode/coll.h" + +U_NAMESPACE_BEGIN + +/* forward declaration */ +class RuleBasedCollator; +class CollationKeyByteSink; + +/** + * + * Collation keys are generated by the Collator class. Use the CollationKey objects + * instead of Collator to compare strings multiple times. A CollationKey + * preprocesses the comparison information from the Collator object to + * make the comparison faster. If you are not going to comparing strings + * multiple times, then using the Collator object is generally faster, + * since it only processes as much of the string as needed to make a + * comparison. + * <p> For example (with strength == tertiary) + * <p>When comparing "Abernathy" to "Baggins-Smythworthy", Collator + * only needs to process a couple of characters, while a comparison + * with CollationKeys will process all of the characters. On the other hand, + * if you are doing a sort of a number of fields, it is much faster to use + * CollationKeys, since you will be comparing strings multiple times. + * <p>Typical use of CollationKeys are in databases, where you store a CollationKey + * in a hidden field, and use it for sorting or indexing. + * + * <p>Example of use: + * <pre> + * \code + * UErrorCode success = U_ZERO_ERROR; + * Collator* myCollator = Collator::createInstance(success); + * CollationKey* keys = new CollationKey [3]; + * myCollator->getCollationKey("Tom", keys[0], success ); + * myCollator->getCollationKey("Dick", keys[1], success ); + * myCollator->getCollationKey("Harry", keys[2], success ); + * + * // Inside body of sort routine, compare keys this way: + * CollationKey tmp; + * if(keys[0].compareTo( keys[1] ) > 0 ) { + * tmp = keys[0]; keys[0] = keys[1]; keys[1] = tmp; + * } + * //... + * \endcode + * </pre> + * <p>Because Collator::compare()'s algorithm is complex, it is faster to sort + * long lists of words by retrieving collation keys with Collator::getCollationKey(). + * You can then cache the collation keys and compare them using CollationKey::compareTo(). + * <p> + * <strong>Note:</strong> <code>Collator</code>s with different Locale, + * CollationStrength and DecompositionMode settings will return different + * CollationKeys for the same set of strings. Locales have specific + * collation rules, and the way in which secondary and tertiary differences + * are taken into account, for example, will result in different CollationKeys + * for same strings. + * <p> + + * @see Collator + * @see RuleBasedCollator + * @version 1.3 12/18/96 + * @author Helena Shih + * @stable ICU 2.0 + */ +class U_I18N_API CollationKey : public UObject { +public: + /** + * This creates an empty collation key based on the null string. An empty + * collation key contains no sorting information. When comparing two empty + * collation keys, the result is Collator::EQUAL. Comparing empty collation key + * with non-empty collation key is always Collator::LESS. + * @stable ICU 2.0 + */ + CollationKey(); + + + /** + * Creates a collation key based on the collation key values. + * @param values the collation key values + * @param count number of collation key values, including trailing nulls. + * @stable ICU 2.0 + */ + CollationKey(const uint8_t* values, + int32_t count); + + /** + * Copy constructor. + * @param other the object to be copied. + * @stable ICU 2.0 + */ + CollationKey(const CollationKey& other); + + /** + * Sort key destructor. + * @stable ICU 2.0 + */ + virtual ~CollationKey(); + + /** + * Assignment operator + * @param other the object to be copied. + * @stable ICU 2.0 + */ + const CollationKey& operator=(const CollationKey& other); + + /** + * Compare if two collation keys are the same. + * @param source the collation key to compare to. + * @return Returns true if two collation keys are equal, false otherwise. + * @stable ICU 2.0 + */ + UBool operator==(const CollationKey& source) const; + + /** + * Compare if two collation keys are not the same. + * @param source the collation key to compare to. + * @return Returns TRUE if two collation keys are different, FALSE otherwise. + * @stable ICU 2.0 + */ + UBool operator!=(const CollationKey& source) const; + + + /** + * Test to see if the key is in an invalid state. The key will be in an + * invalid state if it couldn't allocate memory for some operation. + * @return Returns TRUE if the key is in an invalid, FALSE otherwise. + * @stable ICU 2.0 + */ + UBool isBogus(void) const; + + /** + * Returns a pointer to the collation key values. The storage is owned + * by the collation key and the pointer will become invalid if the key + * is deleted. + * @param count the output parameter of number of collation key values, + * including any trailing nulls. + * @return a pointer to the collation key values. + * @stable ICU 2.0 + */ + const uint8_t* getByteArray(int32_t& count) const; + +#ifdef U_USE_COLLATION_KEY_DEPRECATES + /** + * Extracts the collation key values into a new array. The caller owns + * this storage and should free it. + * @param count the output parameter of number of collation key values, + * including any trailing nulls. + * @obsolete ICU 2.6. Use getByteArray instead since this API will be removed in that release. + */ + uint8_t* toByteArray(int32_t& count) const; +#endif + +#ifndef U_HIDE_DEPRECATED_API + /** + * Convenience method which does a string(bit-wise) comparison of the + * two collation keys. + * @param target target collation key to be compared with + * @return Returns Collator::LESS if sourceKey < targetKey, + * Collator::GREATER if sourceKey > targetKey and Collator::EQUAL + * otherwise. + * @deprecated ICU 2.6 use the overload with error code + */ + Collator::EComparisonResult compareTo(const CollationKey& target) const; +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Convenience method which does a string(bit-wise) comparison of the + * two collation keys. + * @param target target collation key to be compared with + * @param status error code + * @return Returns UCOL_LESS if sourceKey < targetKey, + * UCOL_GREATER if sourceKey > targetKey and UCOL_EQUAL + * otherwise. + * @stable ICU 2.6 + */ + UCollationResult compareTo(const CollationKey& target, UErrorCode &status) const; + + /** + * Creates an integer that is unique to the collation key. NOTE: this + * is not the same as String.hashCode. + * <p>Example of use: + * <pre> + * . UErrorCode status = U_ZERO_ERROR; + * . Collator *myCollation = Collator::createInstance(Locale::US, status); + * . if (U_FAILURE(status)) return; + * . CollationKey key1, key2; + * . UErrorCode status1 = U_ZERO_ERROR, status2 = U_ZERO_ERROR; + * . myCollation->getCollationKey("abc", key1, status1); + * . if (U_FAILURE(status1)) { delete myCollation; return; } + * . myCollation->getCollationKey("ABC", key2, status2); + * . if (U_FAILURE(status2)) { delete myCollation; return; } + * . // key1.hashCode() != key2.hashCode() + * </pre> + * @return the hash value based on the string's collation order. + * @see UnicodeString#hashCode + * @stable ICU 2.0 + */ + int32_t hashCode(void) const; + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * @stable ICU 2.2 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * @stable ICU 2.2 + */ + static UClassID U_EXPORT2 getStaticClassID(); + +private: + /** + * Replaces the current bytes buffer with a new one of newCapacity + * and copies length bytes from the old buffer to the new one. + * @return the new buffer, or NULL if the allocation failed + */ + uint8_t *reallocate(int32_t newCapacity, int32_t length); + /** + * Set a new length for a new sort key in the existing fBytes. + */ + void setLength(int32_t newLength); + + uint8_t *getBytes() { + return (fFlagAndLength >= 0) ? fUnion.fStackBuffer : fUnion.fFields.fBytes; + } + const uint8_t *getBytes() const { + return (fFlagAndLength >= 0) ? fUnion.fStackBuffer : fUnion.fFields.fBytes; + } + int32_t getCapacity() const { + return (fFlagAndLength >= 0) ? (int32_t)sizeof(fUnion) : fUnion.fFields.fCapacity; + } + int32_t getLength() const { return fFlagAndLength & 0x7fffffff; } + + /** + * Set the CollationKey to a "bogus" or invalid state + * @return this CollationKey + */ + CollationKey& setToBogus(void); + /** + * Resets this CollationKey to an empty state + * @return this CollationKey + */ + CollationKey& reset(void); + + /** + * Allow private access to RuleBasedCollator + */ + friend class RuleBasedCollator; + friend class CollationKeyByteSink; + + // Class fields. sizeof(CollationKey) is intended to be 48 bytes + // on a machine with 64-bit pointers. + // We use a union to maximize the size of the internal buffer, + // similar to UnicodeString but not as tight and complex. + + // (implicit) *vtable; + /** + * Sort key length and flag. + * Bit 31 is set if the buffer is heap-allocated. + * Bits 30..0 contain the sort key length. + */ + int32_t fFlagAndLength; + /** + * Unique hash value of this CollationKey. + * Special value 2 if the key is bogus. + */ + mutable int32_t fHashCode; + /** + * fUnion provides 32 bytes for the internal buffer or for + * pointer+capacity. + */ + union StackBufferOrFields { + /** fStackBuffer is used iff fFlagAndLength>=0, else fFields is used */ + uint8_t fStackBuffer[32]; + struct { + uint8_t *fBytes; + int32_t fCapacity; + } fFields; + } fUnion; +}; + +inline UBool +CollationKey::operator!=(const CollationKey& other) const +{ + return !(*this == other); +} + +inline UBool +CollationKey::isBogus() const +{ + return fHashCode == 2; // kBogusHashCode +} + +inline const uint8_t* +CollationKey::getByteArray(int32_t &count) const +{ + count = getLength(); + return getBytes(); +} + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_COLLATION */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/std_string.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/std_string.h new file mode 100755 index 00000000..729c5639 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/std_string.h @@ -0,0 +1,37 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 2009-2014, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: std_string.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2009feb19 +* created by: Markus W. Scherer +*/ + +#ifndef __STD_STRING_H__ +#define __STD_STRING_H__ + +/** + * \file + * \brief C++ API: Central ICU header for including the C++ standard <string> + * header and for related definitions. + */ + +#include "unicode/utypes.h" + +// Workaround for a libstdc++ bug before libstdc++4.6 (2011). +// https://bugs.llvm.org/show_bug.cgi?id=13364 +#if defined(__GLIBCXX__) +namespace std { class type_info; } +#endif +#include <string> + +#endif // __STD_STRING_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/strenum.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/strenum.h new file mode 100755 index 00000000..61d51481 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/strenum.h @@ -0,0 +1,278 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 2002-2012, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +*/ + +#ifndef STRENUM_H +#define STRENUM_H + +#include "unicode/uobject.h" +#include "unicode/unistr.h" + +/** + * \file + * \brief C++ API: String Enumeration + */ + +U_NAMESPACE_BEGIN + +/** + * Base class for 'pure' C++ implementations of uenum api. Adds a + * method that returns the next UnicodeString since in C++ this can + * be a common storage format for strings. + * + * <p>The model is that the enumeration is over strings maintained by + * a 'service.' At any point, the service might change, invalidating + * the enumerator (though this is expected to be rare). The iterator + * returns an error if this has occurred. Lack of the error is no + * guarantee that the service didn't change immediately after the + * call, so the returned string still might not be 'valid' on + * subsequent use.</p> + * + * <p>Strings may take the form of const char*, const char16_t*, or const + * UnicodeString*. The type you get is determine by the variant of + * 'next' that you call. In general the StringEnumeration is + * optimized for one of these types, but all StringEnumerations can + * return all types. Returned strings are each terminated with a NUL. + * Depending on the service data, they might also include embedded NUL + * characters, so API is provided to optionally return the true + * length, counting the embedded NULs but not counting the terminating + * NUL.</p> + * + * <p>The pointers returned by next, unext, and snext become invalid + * upon any subsequent call to the enumeration's destructor, next, + * unext, snext, or reset.</p> + * + * ICU 2.8 adds some default implementations and helper functions + * for subclasses. + * + * @stable ICU 2.4 + */ +class U_COMMON_API StringEnumeration : public UObject { +public: + /** + * Destructor. + * @stable ICU 2.4 + */ + virtual ~StringEnumeration(); + + /** + * Clone this object, an instance of a subclass of StringEnumeration. + * Clones can be used concurrently in multiple threads. + * If a subclass does not implement clone(), or if an error occurs, + * then NULL is returned. + * The clone functions in all subclasses return a base class pointer + * because some compilers do not support covariant (same-as-this) + * return types; cast to the appropriate subclass if necessary. + * The caller must delete the clone. + * + * @return a clone of this object + * + * @see getDynamicClassID + * @stable ICU 2.8 + */ + virtual StringEnumeration *clone() const; + + /** + * <p>Return the number of elements that the iterator traverses. If + * the iterator is out of sync with its service, status is set to + * U_ENUM_OUT_OF_SYNC_ERROR, and the return value is zero.</p> + * + * <p>The return value will not change except possibly as a result of + * a subsequent call to reset, or if the iterator becomes out of sync.</p> + * + * <p>This is a convenience function. It can end up being very + * expensive as all the items might have to be pre-fetched + * (depending on the storage format of the data being + * traversed).</p> + * + * @param status the error code. + * @return number of elements in the iterator. + * + * @stable ICU 2.4 */ + virtual int32_t count(UErrorCode& status) const = 0; + + /** + * <p>Returns the next element as a NUL-terminated char*. If there + * are no more elements, returns NULL. If the resultLength pointer + * is not NULL, the length of the string (not counting the + * terminating NUL) is returned at that address. If an error + * status is returned, the value at resultLength is undefined.</p> + * + * <p>The returned pointer is owned by this iterator and must not be + * deleted by the caller. The pointer is valid until the next call + * to next, unext, snext, reset, or the enumerator's destructor.</p> + * + * <p>If the iterator is out of sync with its service, status is set + * to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned.</p> + * + * <p>If the native service string is a char16_t* string, it is + * converted to char* with the invariant converter. If the + * conversion fails (because a character cannot be converted) then + * status is set to U_INVARIANT_CONVERSION_ERROR and the return + * value is undefined (though not NULL).</p> + * + * Starting with ICU 2.8, the default implementation calls snext() + * and handles the conversion. + * Either next() or snext() must be implemented differently by a subclass. + * + * @param status the error code. + * @param resultLength a pointer to receive the length, can be NULL. + * @return a pointer to the string, or NULL. + * + * @stable ICU 2.4 + */ + virtual const char* next(int32_t *resultLength, UErrorCode& status); + + /** + * <p>Returns the next element as a NUL-terminated char16_t*. If there + * are no more elements, returns NULL. If the resultLength pointer + * is not NULL, the length of the string (not counting the + * terminating NUL) is returned at that address. If an error + * status is returned, the value at resultLength is undefined.</p> + * + * <p>The returned pointer is owned by this iterator and must not be + * deleted by the caller. The pointer is valid until the next call + * to next, unext, snext, reset, or the enumerator's destructor.</p> + * + * <p>If the iterator is out of sync with its service, status is set + * to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned.</p> + * + * Starting with ICU 2.8, the default implementation calls snext() + * and handles the conversion. + * + * @param status the error code. + * @param resultLength a ponter to receive the length, can be NULL. + * @return a pointer to the string, or NULL. + * + * @stable ICU 2.4 + */ + virtual const char16_t* unext(int32_t *resultLength, UErrorCode& status); + + /** + * <p>Returns the next element a UnicodeString*. If there are no + * more elements, returns NULL.</p> + * + * <p>The returned pointer is owned by this iterator and must not be + * deleted by the caller. The pointer is valid until the next call + * to next, unext, snext, reset, or the enumerator's destructor.</p> + * + * <p>If the iterator is out of sync with its service, status is set + * to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned.</p> + * + * Starting with ICU 2.8, the default implementation calls next() + * and handles the conversion. + * Either next() or snext() must be implemented differently by a subclass. + * + * @param status the error code. + * @return a pointer to the string, or NULL. + * + * @stable ICU 2.4 + */ + virtual const UnicodeString* snext(UErrorCode& status); + + /** + * <p>Resets the iterator. This re-establishes sync with the + * service and rewinds the iterator to start at the first + * element.</p> + * + * <p>Previous pointers returned by next, unext, or snext become + * invalid, and the value returned by count might change.</p> + * + * @param status the error code. + * + * @stable ICU 2.4 + */ + virtual void reset(UErrorCode& status) = 0; + + /** + * Compares this enumeration to other to check if both are equal + * + * @param that The other string enumeration to compare this object to + * @return TRUE if the enumerations are equal. FALSE if not. + * @stable ICU 3.6 + */ + virtual UBool operator==(const StringEnumeration& that)const; + /** + * Compares this enumeration to other to check if both are not equal + * + * @param that The other string enumeration to compare this object to + * @return TRUE if the enumerations are equal. FALSE if not. + * @stable ICU 3.6 + */ + virtual UBool operator!=(const StringEnumeration& that)const; + +protected: + /** + * UnicodeString field for use with default implementations and subclasses. + * @stable ICU 2.8 + */ + UnicodeString unistr; + /** + * char * default buffer for use with default implementations and subclasses. + * @stable ICU 2.8 + */ + char charsBuffer[32]; + /** + * char * buffer for use with default implementations and subclasses. + * Allocated in constructor and in ensureCharsCapacity(). + * @stable ICU 2.8 + */ + char *chars; + /** + * Capacity of chars, for use with default implementations and subclasses. + * @stable ICU 2.8 + */ + int32_t charsCapacity; + + /** + * Default constructor for use with default implementations and subclasses. + * @stable ICU 2.8 + */ + StringEnumeration(); + + /** + * Ensures that chars is at least as large as the requested capacity. + * For use with default implementations and subclasses. + * + * @param capacity Requested capacity. + * @param status ICU in/out error code. + * @stable ICU 2.8 + */ + void ensureCharsCapacity(int32_t capacity, UErrorCode &status); + + /** + * Converts s to Unicode and sets unistr to the result. + * For use with default implementations and subclasses, + * especially for implementations of snext() in terms of next(). + * This is provided with a helper function instead of a default implementation + * of snext() to avoid potential infinite loops between next() and snext(). + * + * For example: + * \code + * const UnicodeString* snext(UErrorCode& status) { + * int32_t resultLength=0; + * const char *s=next(&resultLength, status); + * return setChars(s, resultLength, status); + * } + * \endcode + * + * @param s String to be converted to Unicode. + * @param length Length of the string. + * @param status ICU in/out error code. + * @return A pointer to unistr. + * @stable ICU 2.8 + */ + UnicodeString *setChars(const char *s, int32_t length, UErrorCode &status); +}; + +U_NAMESPACE_END + +/* STRENUM_H */ +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/stringoptions.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/stringoptions.h new file mode 100755 index 00000000..f2de96e9 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/stringoptions.h @@ -0,0 +1,198 @@ +// © 2017 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +// stringoptions.h +// created: 2017jun08 Markus W. Scherer + +#ifndef __STRINGOPTIONS_H__ +#define __STRINGOPTIONS_H__ + +#include "unicode/utypes.h" + +/** + * \file + * \brief C API: Bit set option bit constants for various string and character processing functions. + */ + +/** + * Option value for case folding: Use default mappings defined in CaseFolding.txt. + * + * @stable ICU 2.0 + */ +#define U_FOLD_CASE_DEFAULT 0 + +/** + * Option value for case folding: + * + * Use the modified set of mappings provided in CaseFolding.txt to handle dotted I + * and dotless i appropriately for Turkic languages (tr, az). + * + * Before Unicode 3.2, CaseFolding.txt contains mappings marked with 'I' that + * are to be included for default mappings and + * excluded for the Turkic-specific mappings. + * + * Unicode 3.2 CaseFolding.txt instead contains mappings marked with 'T' that + * are to be excluded for default mappings and + * included for the Turkic-specific mappings. + * + * @stable ICU 2.0 + */ +#define U_FOLD_CASE_EXCLUDE_SPECIAL_I 1 + +#ifndef U_HIDE_DRAFT_API + +/** + * Titlecase the string as a whole rather than each word. + * (Titlecase only the character at index 0, possibly adjusted.) + * Option bits value for titlecasing APIs that take an options bit set. + * + * It is an error to specify multiple titlecasing iterator options together, + * including both an options bit and an explicit BreakIterator. + * + * @see U_TITLECASE_ADJUST_TO_CASED + * @draft ICU 60 + */ +#define U_TITLECASE_WHOLE_STRING 0x20 + +/** + * Titlecase sentences rather than words. + * (Titlecase only the first character of each sentence, possibly adjusted.) + * Option bits value for titlecasing APIs that take an options bit set. + * + * It is an error to specify multiple titlecasing iterator options together, + * including both an options bit and an explicit BreakIterator. + * + * @see U_TITLECASE_ADJUST_TO_CASED + * @draft ICU 60 + */ +#define U_TITLECASE_SENTENCES 0x40 + +#endif // U_HIDE_DRAFT_API + +/** + * Do not lowercase non-initial parts of words when titlecasing. + * Option bit for titlecasing APIs that take an options bit set. + * + * By default, titlecasing will titlecase the character at each + * (possibly adjusted) BreakIterator index and + * lowercase all other characters up to the next iterator index. + * With this option, the other characters will not be modified. + * + * @see U_TITLECASE_ADJUST_TO_CASED + * @see UnicodeString::toTitle + * @see CaseMap::toTitle + * @see ucasemap_setOptions + * @see ucasemap_toTitle + * @see ucasemap_utf8ToTitle + * @stable ICU 3.8 + */ +#define U_TITLECASE_NO_LOWERCASE 0x100 + +/** + * Do not adjust the titlecasing BreakIterator indexes; + * titlecase exactly the characters at breaks from the iterator. + * Option bit for titlecasing APIs that take an options bit set. + * + * By default, titlecasing will take each break iterator index, + * adjust it to the next relevant character (see U_TITLECASE_ADJUST_TO_CASED), + * and titlecase that one. + * + * Other characters are lowercased. + * + * It is an error to specify multiple titlecasing adjustment options together. + * + * @see U_TITLECASE_ADJUST_TO_CASED + * @see U_TITLECASE_NO_LOWERCASE + * @see UnicodeString::toTitle + * @see CaseMap::toTitle + * @see ucasemap_setOptions + * @see ucasemap_toTitle + * @see ucasemap_utf8ToTitle + * @stable ICU 3.8 + */ +#define U_TITLECASE_NO_BREAK_ADJUSTMENT 0x200 + +#ifndef U_HIDE_DRAFT_API + +/** + * Adjust each titlecasing BreakIterator index to the next cased character. + * (See the Unicode Standard, chapter 3, Default Case Conversion, R3 toTitlecase(X).) + * Option bit for titlecasing APIs that take an options bit set. + * + * This used to be the default index adjustment in ICU. + * Since ICU 60, the default index adjustment is to the next character that is + * a letter, number, symbol, or private use code point. + * (Uncased modifier letters are skipped.) + * The difference in behavior is small for word titlecasing, + * but the new adjustment is much better for whole-string and sentence titlecasing: + * It yields "49ers" and "«丰(abc)»" instead of "49Ers" and "«丰(Abc)»". + * + * It is an error to specify multiple titlecasing adjustment options together. + * + * @see U_TITLECASE_NO_BREAK_ADJUSTMENT + * @draft ICU 60 + */ +#define U_TITLECASE_ADJUST_TO_CASED 0x400 + +/** + * Option for string transformation functions to not first reset the Edits object. + * Used for example in some case-mapping and normalization functions. + * + * @see CaseMap + * @see Edits + * @see Normalizer2 + * @draft ICU 60 + */ +#define U_EDITS_NO_RESET 0x2000 + +/** + * Omit unchanged text when recording how source substrings + * relate to changed and unchanged result substrings. + * Used for example in some case-mapping and normalization functions. + * + * @see CaseMap + * @see Edits + * @see Normalizer2 + * @draft ICU 60 + */ +#define U_OMIT_UNCHANGED_TEXT 0x4000 + +#endif // U_HIDE_DRAFT_API + +/** + * Option bit for u_strCaseCompare, u_strcasecmp, unorm_compare, etc: + * Compare strings in code point order instead of code unit order. + * @stable ICU 2.2 + */ +#define U_COMPARE_CODE_POINT_ORDER 0x8000 + +/** + * Option bit for unorm_compare: + * Perform case-insensitive comparison. + * @stable ICU 2.2 + */ +#define U_COMPARE_IGNORE_CASE 0x10000 + +/** + * Option bit for unorm_compare: + * Both input strings are assumed to fulfill FCD conditions. + * @stable ICU 2.2 + */ +#define UNORM_INPUT_IS_FCD 0x20000 + +// Related definitions elsewhere. +// Options that are not meaningful in the same functions +// can share the same bits. +// +// Public: +// unicode/unorm.h #define UNORM_COMPARE_NORM_OPTIONS_SHIFT 20 +// +// Internal: (may change or be removed) +// ucase.h #define _STRCASECMP_OPTIONS_MASK 0xffff +// ucase.h #define _FOLD_CASE_OPTIONS_MASK 7 +// ucasemap_imp.h #define U_TITLECASE_ITERATOR_MASK 0xe0 +// ucasemap_imp.h #define U_TITLECASE_ADJUSTMENT_MASK 0x600 +// ustr_imp.h #define _STRNCMP_STYLE 0x1000 +// unormcmp.cpp #define _COMPARE_EQUIV 0x80000 + +#endif // __STRINGOPTIONS_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/stringpiece.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/stringpiece.h new file mode 100755 index 00000000..b0887eff --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/stringpiece.h @@ -0,0 +1,224 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +// Copyright (C) 2009-2013, International Business Machines +// Corporation and others. All Rights Reserved. +// +// Copyright 2001 and onwards Google Inc. +// Author: Sanjay Ghemawat + +// This code is a contribution of Google code, and the style used here is +// a compromise between the original Google code and the ICU coding guidelines. +// For example, data types are ICU-ified (size_t,int->int32_t), +// and API comments doxygen-ified, but function names and behavior are +// as in the original, if possible. +// Assertion-style error handling, not available in ICU, was changed to +// parameter "pinning" similar to UnicodeString. +// +// In addition, this is only a partial port of the original Google code, +// limited to what was needed so far. The (nearly) complete original code +// is in the ICU svn repository at icuhtml/trunk/design/strings/contrib +// (see ICU ticket 6765, r25517). + +#ifndef __STRINGPIECE_H__ +#define __STRINGPIECE_H__ + +/** + * \file + * \brief C++ API: StringPiece: Read-only byte string wrapper class. + */ + +#include "unicode/utypes.h" +#include "unicode/uobject.h" +#include "unicode/std_string.h" + +// Arghh! I wish C++ literals were "string". + +U_NAMESPACE_BEGIN + +/** + * A string-like object that points to a sized piece of memory. + * + * We provide non-explicit singleton constructors so users can pass + * in a "const char*" or a "string" wherever a "StringPiece" is + * expected. + * + * Functions or methods may use StringPiece parameters to accept either a + * "const char*" or a "string" value that will be implicitly converted to a + * StringPiece. + * + * Systematic usage of StringPiece is encouraged as it will reduce unnecessary + * conversions from "const char*" to "string" and back again. + * + * @stable ICU 4.2 + */ +class U_COMMON_API StringPiece : public UMemory { + private: + const char* ptr_; + int32_t length_; + + public: + /** + * Default constructor, creates an empty StringPiece. + * @stable ICU 4.2 + */ + StringPiece() : ptr_(NULL), length_(0) { } + /** + * Constructs from a NUL-terminated const char * pointer. + * @param str a NUL-terminated const char * pointer + * @stable ICU 4.2 + */ + StringPiece(const char* str); + /** + * Constructs from a std::string. + * @stable ICU 4.2 + */ + StringPiece(const std::string& str) + : ptr_(str.data()), length_(static_cast<int32_t>(str.size())) { } + /** + * Constructs from a const char * pointer and a specified length. + * @param offset a const char * pointer (need not be terminated) + * @param len the length of the string; must be non-negative + * @stable ICU 4.2 + */ + StringPiece(const char* offset, int32_t len) : ptr_(offset), length_(len) { } + /** + * Substring of another StringPiece. + * @param x the other StringPiece + * @param pos start position in x; must be non-negative and <= x.length(). + * @stable ICU 4.2 + */ + StringPiece(const StringPiece& x, int32_t pos); + /** + * Substring of another StringPiece. + * @param x the other StringPiece + * @param pos start position in x; must be non-negative and <= x.length(). + * @param len length of the substring; + * must be non-negative and will be pinned to at most x.length() - pos. + * @stable ICU 4.2 + */ + StringPiece(const StringPiece& x, int32_t pos, int32_t len); + + /** + * Returns the string pointer. May be NULL if it is empty. + * + * data() may return a pointer to a buffer with embedded NULs, and the + * returned buffer may or may not be null terminated. Therefore it is + * typically a mistake to pass data() to a routine that expects a NUL + * terminated string. + * @return the string pointer + * @stable ICU 4.2 + */ + const char* data() const { return ptr_; } + /** + * Returns the string length. Same as length(). + * @return the string length + * @stable ICU 4.2 + */ + int32_t size() const { return length_; } + /** + * Returns the string length. Same as size(). + * @return the string length + * @stable ICU 4.2 + */ + int32_t length() const { return length_; } + /** + * Returns whether the string is empty. + * @return TRUE if the string is empty + * @stable ICU 4.2 + */ + UBool empty() const { return length_ == 0; } + + /** + * Sets to an empty string. + * @stable ICU 4.2 + */ + void clear() { ptr_ = NULL; length_ = 0; } + + /** + * Reset the stringpiece to refer to new data. + * @param xdata pointer the new string data. Need not be nul terminated. + * @param len the length of the new data + * @stable ICU 4.8 + */ + void set(const char* xdata, int32_t len) { ptr_ = xdata; length_ = len; } + + /** + * Reset the stringpiece to refer to new data. + * @param str a pointer to a NUL-terminated string. + * @stable ICU 4.8 + */ + void set(const char* str); + + /** + * Removes the first n string units. + * @param n prefix length, must be non-negative and <=length() + * @stable ICU 4.2 + */ + void remove_prefix(int32_t n) { + if (n >= 0) { + if (n > length_) { + n = length_; + } + ptr_ += n; + length_ -= n; + } + } + + /** + * Removes the last n string units. + * @param n suffix length, must be non-negative and <=length() + * @stable ICU 4.2 + */ + void remove_suffix(int32_t n) { + if (n >= 0) { + if (n <= length_) { + length_ -= n; + } else { + length_ = 0; + } + } + } + + /** + * Maximum integer, used as a default value for substring methods. + * @stable ICU 4.2 + */ + static const int32_t npos; // = 0x7fffffff; + + /** + * Returns a substring of this StringPiece. + * @param pos start position; must be non-negative and <= length(). + * @param len length of the substring; + * must be non-negative and will be pinned to at most length() - pos. + * @return the substring StringPiece + * @stable ICU 4.2 + */ + StringPiece substr(int32_t pos, int32_t len = npos) const { + return StringPiece(*this, pos, len); + } +}; + +/** + * Global operator == for StringPiece + * @param x The first StringPiece to compare. + * @param y The second StringPiece to compare. + * @return TRUE if the string data is equal + * @stable ICU 4.8 + */ +U_EXPORT UBool U_EXPORT2 +operator==(const StringPiece& x, const StringPiece& y); + +/** + * Global operator != for StringPiece + * @param x The first StringPiece to compare. + * @param y The second StringPiece to compare. + * @return TRUE if the string data is not equal + * @stable ICU 4.8 + */ +inline UBool operator!=(const StringPiece& x, const StringPiece& y) { + return !(x == y); +} + +U_NAMESPACE_END + +#endif // __STRINGPIECE_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/stringtriebuilder.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/stringtriebuilder.h new file mode 100755 index 00000000..caeae51a --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/stringtriebuilder.h @@ -0,0 +1,414 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2010-2012,2014, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************* +* file name: stringtriebuilder.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2010dec24 +* created by: Markus W. Scherer +*/ + +#ifndef __STRINGTRIEBUILDER_H__ +#define __STRINGTRIEBUILDER_H__ + +#include "unicode/utypes.h" +#include "unicode/uobject.h" + +/** + * \file + * \brief C++ API: Builder API for trie builders + */ + +// Forward declaration. +struct UHashtable; +typedef struct UHashtable UHashtable; + +/** + * Build options for BytesTrieBuilder and CharsTrieBuilder. + * @stable ICU 4.8 + */ +enum UStringTrieBuildOption { + /** + * Builds a trie quickly. + * @stable ICU 4.8 + */ + USTRINGTRIE_BUILD_FAST, + /** + * Builds a trie more slowly, attempting to generate + * a shorter but equivalent serialization. + * This build option also uses more memory. + * + * This option can be effective when many integer values are the same + * and string/byte sequence suffixes can be shared. + * Runtime speed is not expected to improve. + * @stable ICU 4.8 + */ + USTRINGTRIE_BUILD_SMALL +}; + +U_NAMESPACE_BEGIN + +/** + * Base class for string trie builder classes. + * + * This class is not intended for public subclassing. + * @stable ICU 4.8 + */ +class U_COMMON_API StringTrieBuilder : public UObject { +public: +#ifndef U_HIDE_INTERNAL_API + /** @internal */ + static UBool hashNode(const void *node); + /** @internal */ + static UBool equalNodes(const void *left, const void *right); +#endif /* U_HIDE_INTERNAL_API */ + +protected: + // Do not enclose the protected default constructor with #ifndef U_HIDE_INTERNAL_API + // or else the compiler will create a public default constructor. + /** @internal */ + StringTrieBuilder(); + /** @internal */ + virtual ~StringTrieBuilder(); + +#ifndef U_HIDE_INTERNAL_API + /** @internal */ + void createCompactBuilder(int32_t sizeGuess, UErrorCode &errorCode); + /** @internal */ + void deleteCompactBuilder(); + + /** @internal */ + void build(UStringTrieBuildOption buildOption, int32_t elementsLength, UErrorCode &errorCode); + + /** @internal */ + int32_t writeNode(int32_t start, int32_t limit, int32_t unitIndex); + /** @internal */ + int32_t writeBranchSubNode(int32_t start, int32_t limit, int32_t unitIndex, int32_t length); +#endif /* U_HIDE_INTERNAL_API */ + + class Node; + +#ifndef U_HIDE_INTERNAL_API + /** @internal */ + Node *makeNode(int32_t start, int32_t limit, int32_t unitIndex, UErrorCode &errorCode); + /** @internal */ + Node *makeBranchSubNode(int32_t start, int32_t limit, int32_t unitIndex, + int32_t length, UErrorCode &errorCode); +#endif /* U_HIDE_INTERNAL_API */ + + /** @internal */ + virtual int32_t getElementStringLength(int32_t i) const = 0; + /** @internal */ + virtual char16_t getElementUnit(int32_t i, int32_t unitIndex) const = 0; + /** @internal */ + virtual int32_t getElementValue(int32_t i) const = 0; + + // Finds the first unit index after this one where + // the first and last element have different units again. + /** @internal */ + virtual int32_t getLimitOfLinearMatch(int32_t first, int32_t last, int32_t unitIndex) const = 0; + + // Number of different units at unitIndex. + /** @internal */ + virtual int32_t countElementUnits(int32_t start, int32_t limit, int32_t unitIndex) const = 0; + /** @internal */ + virtual int32_t skipElementsBySomeUnits(int32_t i, int32_t unitIndex, int32_t count) const = 0; + /** @internal */ + virtual int32_t indexOfElementWithNextUnit(int32_t i, int32_t unitIndex, char16_t unit) const = 0; + + /** @internal */ + virtual UBool matchNodesCanHaveValues() const = 0; + + /** @internal */ + virtual int32_t getMaxBranchLinearSubNodeLength() const = 0; + /** @internal */ + virtual int32_t getMinLinearMatch() const = 0; + /** @internal */ + virtual int32_t getMaxLinearMatchLength() const = 0; + +#ifndef U_HIDE_INTERNAL_API + // max(BytesTrie::kMaxBranchLinearSubNodeLength, UCharsTrie::kMaxBranchLinearSubNodeLength). + /** @internal */ + static const int32_t kMaxBranchLinearSubNodeLength=5; + + // Maximum number of nested split-branch levels for a branch on all 2^16 possible char16_t units. + // log2(2^16/kMaxBranchLinearSubNodeLength) rounded up. + /** @internal */ + static const int32_t kMaxSplitBranchLevels=14; + + /** + * Makes sure that there is only one unique node registered that is + * equivalent to newNode. + * @param newNode Input node. The builder takes ownership. + * @param errorCode ICU in/out UErrorCode. + Set to U_MEMORY_ALLOCATION_ERROR if it was success but newNode==NULL. + * @return newNode if it is the first of its kind, or + * an equivalent node if newNode is a duplicate. + * @internal + */ + Node *registerNode(Node *newNode, UErrorCode &errorCode); + /** + * Makes sure that there is only one unique FinalValueNode registered + * with this value. + * Avoids creating a node if the value is a duplicate. + * @param value A final value. + * @param errorCode ICU in/out UErrorCode. + Set to U_MEMORY_ALLOCATION_ERROR if it was success but newNode==NULL. + * @return A FinalValueNode with the given value. + * @internal + */ + Node *registerFinalValue(int32_t value, UErrorCode &errorCode); +#endif /* U_HIDE_INTERNAL_API */ + + /* + * C++ note: + * registerNode() and registerFinalValue() take ownership of their input nodes, + * and only return owned nodes. + * If they see a failure UErrorCode, they will delete the input node. + * If they get a NULL pointer, they will record a U_MEMORY_ALLOCATION_ERROR. + * If there is a failure, they return NULL. + * + * NULL Node pointers can be safely passed into other Nodes because + * they call the static Node::hashCode() which checks for a NULL pointer first. + * + * Therefore, as long as builder functions register a new node, + * they need to check for failures only before explicitly dereferencing + * a Node pointer, or before setting a new UErrorCode. + */ + + // Hash set of nodes, maps from nodes to integer 1. + /** @internal */ + UHashtable *nodes; + + // Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API, + // it is needed for layout of other objects. + /** @internal */ + class Node : public UObject { + public: + Node(int32_t initialHash) : hash(initialHash), offset(0) {} + inline int32_t hashCode() const { return hash; } + // Handles node==NULL. + static inline int32_t hashCode(const Node *node) { return node==NULL ? 0 : node->hashCode(); } + // Base class operator==() compares the actual class types. + virtual UBool operator==(const Node &other) const; + inline UBool operator!=(const Node &other) const { return !operator==(other); } + /** + * Traverses the Node graph and numbers branch edges, with rightmost edges first. + * This is to avoid writing a duplicate node twice. + * + * Branch nodes in this trie data structure are not symmetric. + * Most branch edges "jump" to other nodes but the rightmost branch edges + * just continue without a jump. + * Therefore, write() must write the rightmost branch edge last + * (trie units are written backwards), and must write it at that point even if + * it is a duplicate of a node previously written elsewhere. + * + * This function visits and marks right branch edges first. + * Edges are numbered with increasingly negative values because we share the + * offset field which gets positive values when nodes are written. + * A branch edge also remembers the first number for any of its edges. + * + * When a further-left branch edge has a number in the range of the rightmost + * edge's numbers, then it will be written as part of the required right edge + * and we can avoid writing it first. + * + * After root.markRightEdgesFirst(-1) the offsets of all nodes are negative + * edge numbers. + * + * @param edgeNumber The first edge number for this node and its sub-nodes. + * @return An edge number that is at least the maximum-negative + * of the input edge number and the numbers of this node and all of its sub-nodes. + */ + virtual int32_t markRightEdgesFirst(int32_t edgeNumber); + // write() must set the offset to a positive value. + virtual void write(StringTrieBuilder &builder) = 0; + // See markRightEdgesFirst. + inline void writeUnlessInsideRightEdge(int32_t firstRight, int32_t lastRight, + StringTrieBuilder &builder) { + // Note: Edge numbers are negative, lastRight<=firstRight. + // If offset>0 then this node and its sub-nodes have been written already + // and we need not write them again. + // If this node is part of the unwritten right branch edge, + // then we wait until that is written. + if(offset<0 && (offset<lastRight || firstRight<offset)) { + write(builder); + } + } + inline int32_t getOffset() const { return offset; } + protected: + int32_t hash; + int32_t offset; + }; + +#ifndef U_HIDE_INTERNAL_API + // This class should not be overridden because + // registerFinalValue() compares a stack-allocated FinalValueNode + // (stack-allocated so that we don't unnecessarily create lots of duplicate nodes) + // with the input node, and the + // !Node::operator==(other) used inside FinalValueNode::operator==(other) + // will be false if the typeid's are different. + /** @internal */ + class FinalValueNode : public Node { + public: + FinalValueNode(int32_t v) : Node(0x111111u*37u+v), value(v) {} + virtual UBool operator==(const Node &other) const; + virtual void write(StringTrieBuilder &builder); + protected: + int32_t value; + }; +#endif /* U_HIDE_INTERNAL_API */ + + // Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API, + // it is needed for layout of other objects. + /** + * @internal + */ + class ValueNode : public Node { + public: + ValueNode(int32_t initialHash) : Node(initialHash), hasValue(FALSE), value(0) {} + virtual UBool operator==(const Node &other) const; + void setValue(int32_t v) { + hasValue=TRUE; + value=v; + hash=hash*37u+v; + } + protected: + UBool hasValue; + int32_t value; + }; + +#ifndef U_HIDE_INTERNAL_API + /** + * @internal + */ + class IntermediateValueNode : public ValueNode { + public: + IntermediateValueNode(int32_t v, Node *nextNode) + : ValueNode(0x222222u*37u+hashCode(nextNode)), next(nextNode) { setValue(v); } + virtual UBool operator==(const Node &other) const; + virtual int32_t markRightEdgesFirst(int32_t edgeNumber); + virtual void write(StringTrieBuilder &builder); + protected: + Node *next; + }; +#endif /* U_HIDE_INTERNAL_API */ + + // Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API, + // it is needed for layout of other objects. + /** + * @internal + */ + class LinearMatchNode : public ValueNode { + public: + LinearMatchNode(int32_t len, Node *nextNode) + : ValueNode((0x333333u*37u+len)*37u+hashCode(nextNode)), + length(len), next(nextNode) {} + virtual UBool operator==(const Node &other) const; + virtual int32_t markRightEdgesFirst(int32_t edgeNumber); + protected: + int32_t length; + Node *next; + }; + +#ifndef U_HIDE_INTERNAL_API + /** + * @internal + */ + class BranchNode : public Node { + public: + BranchNode(int32_t initialHash) : Node(initialHash) {} + protected: + int32_t firstEdgeNumber; + }; + + /** + * @internal + */ + class ListBranchNode : public BranchNode { + public: + ListBranchNode() : BranchNode(0x444444), length(0) {} + virtual UBool operator==(const Node &other) const; + virtual int32_t markRightEdgesFirst(int32_t edgeNumber); + virtual void write(StringTrieBuilder &builder); + // Adds a unit with a final value. + void add(int32_t c, int32_t value) { + units[length]=(char16_t)c; + equal[length]=NULL; + values[length]=value; + ++length; + hash=(hash*37u+c)*37u+value; + } + // Adds a unit which leads to another match node. + void add(int32_t c, Node *node) { + units[length]=(char16_t)c; + equal[length]=node; + values[length]=0; + ++length; + hash=(hash*37u+c)*37u+hashCode(node); + } + protected: + Node *equal[kMaxBranchLinearSubNodeLength]; // NULL means "has final value". + int32_t length; + int32_t values[kMaxBranchLinearSubNodeLength]; + char16_t units[kMaxBranchLinearSubNodeLength]; + }; + + /** + * @internal + */ + class SplitBranchNode : public BranchNode { + public: + SplitBranchNode(char16_t middleUnit, Node *lessThanNode, Node *greaterOrEqualNode) + : BranchNode(((0x555555u*37u+middleUnit)*37u+ + hashCode(lessThanNode))*37u+hashCode(greaterOrEqualNode)), + unit(middleUnit), lessThan(lessThanNode), greaterOrEqual(greaterOrEqualNode) {} + virtual UBool operator==(const Node &other) const; + virtual int32_t markRightEdgesFirst(int32_t edgeNumber); + virtual void write(StringTrieBuilder &builder); + protected: + char16_t unit; + Node *lessThan; + Node *greaterOrEqual; + }; + + // Branch head node, for writing the actual node lead unit. + /** @internal */ + class BranchHeadNode : public ValueNode { + public: + BranchHeadNode(int32_t len, Node *subNode) + : ValueNode((0x666666u*37u+len)*37u+hashCode(subNode)), + length(len), next(subNode) {} + virtual UBool operator==(const Node &other) const; + virtual int32_t markRightEdgesFirst(int32_t edgeNumber); + virtual void write(StringTrieBuilder &builder); + protected: + int32_t length; + Node *next; // A branch sub-node. + }; +#endif /* U_HIDE_INTERNAL_API */ + + /** @internal */ + virtual Node *createLinearMatchNode(int32_t i, int32_t unitIndex, int32_t length, + Node *nextNode) const = 0; + + /** @internal */ + virtual int32_t write(int32_t unit) = 0; + /** @internal */ + virtual int32_t writeElementUnits(int32_t i, int32_t unitIndex, int32_t length) = 0; + /** @internal */ + virtual int32_t writeValueAndFinal(int32_t i, UBool isFinal) = 0; + /** @internal */ + virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_t node) = 0; + /** @internal */ + virtual int32_t writeDeltaTo(int32_t jumpTarget) = 0; +}; + +U_NAMESPACE_END + +#endif // __STRINGTRIEBUILDER_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/stsearch.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/stsearch.h new file mode 100755 index 00000000..57b5b321 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/stsearch.h @@ -0,0 +1,506 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 2001-2014 IBM and others. All rights reserved. +********************************************************************** +* Date Name Description +* 03/22/2000 helena Creation. +********************************************************************** +*/ + +#ifndef STSEARCH_H +#define STSEARCH_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Service for searching text based on RuleBasedCollator. + */ + +#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION + +#include "unicode/tblcoll.h" +#include "unicode/coleitr.h" +#include "unicode/search.h" + +U_NAMESPACE_BEGIN + +/** + * + * <tt>StringSearch</tt> is a <tt>SearchIterator</tt> that provides + * language-sensitive text searching based on the comparison rules defined + * in a {@link RuleBasedCollator} object. + * StringSearch ensures that language eccentricity can be + * handled, e.g. for the German collator, characters ß and SS will be matched + * if case is chosen to be ignored. + * See the <a href="http://source.icu-project.org/repos/icu/icuhtml/trunk/design/collation/ICU_collation_design.htm"> + * "ICU Collation Design Document"</a> for more information. + * <p> + * There are 2 match options for selection:<br> + * Let S' be the sub-string of a text string S between the offsets start and + * end [start, end]. + * <br> + * A pattern string P matches a text string S at the offsets [start, end] + * if + * <pre> + * option 1. Some canonical equivalent of P matches some canonical equivalent + * of S' + * option 2. P matches S' and if P starts or ends with a combining mark, + * there exists no non-ignorable combining mark before or after S? + * in S respectively. + * </pre> + * Option 2. will be the default. + * <p> + * This search has APIs similar to that of other text iteration mechanisms + * such as the break iterators in <tt>BreakIterator</tt>. Using these + * APIs, it is easy to scan through text looking for all occurrences of + * a given pattern. This search iterator allows changing of direction by + * calling a <tt>reset</tt> followed by a <tt>next</tt> or <tt>previous</tt>. + * Though a direction change can occur without calling <tt>reset</tt> first, + * this operation comes with some speed penalty. + * Match results in the forward direction will match the result matches in + * the backwards direction in the reverse order + * <p> + * <tt>SearchIterator</tt> provides APIs to specify the starting position + * within the text string to be searched, e.g. <tt>setOffset</tt>, + * <tt>preceding</tt> and <tt>following</tt>. Since the + * starting position will be set as it is specified, please take note that + * there are some danger points which the search may render incorrect + * results: + * <ul> + * <li> The midst of a substring that requires normalization. + * <li> If the following match is to be found, the position should not be the + * second character which requires to be swapped with the preceding + * character. Vice versa, if the preceding match is to be found, + * position to search from should not be the first character which + * requires to be swapped with the next character. E.g certain Thai and + * Lao characters require swapping. + * <li> If a following pattern match is to be found, any position within a + * contracting sequence except the first will fail. Vice versa if a + * preceding pattern match is to be found, a invalid starting point + * would be any character within a contracting sequence except the last. + * </ul> + * <p> + * A <tt>BreakIterator</tt> can be used if only matches at logical breaks are desired. + * Using a <tt>BreakIterator</tt> will only give you results that exactly matches the + * boundaries given by the breakiterator. For instance the pattern "e" will + * not be found in the string "\u00e9" if a character break iterator is used. + * <p> + * Options are provided to handle overlapping matches. + * E.g. In English, overlapping matches produces the result 0 and 2 + * for the pattern "abab" in the text "ababab", where else mutually + * exclusive matches only produce the result of 0. + * <p> + * Though collator attributes will be taken into consideration while + * performing matches, there are no APIs here for setting and getting the + * attributes. These attributes can be set by getting the collator + * from <tt>getCollator</tt> and using the APIs in <tt>coll.h</tt>. + * Lastly to update <tt>StringSearch</tt> to the new collator attributes, + * <tt>reset</tt> has to be called. + * <p> + * Restriction: <br> + * Currently there are no composite characters that consists of a + * character with combining class > 0 before a character with combining + * class == 0. However, if such a character exists in the future, + * <tt>StringSearch</tt> does not guarantee the results for option 1. + * <p> + * Consult the <tt>SearchIterator</tt> documentation for information on + * and examples of how to use instances of this class to implement text + * searching. + * <pre><code> + * UnicodeString target("The quick brown fox jumps over the lazy dog."); + * UnicodeString pattern("fox"); + * + * UErrorCode error = U_ZERO_ERROR; + * StringSearch iter(pattern, target, Locale::getUS(), NULL, status); + * for (int pos = iter.first(error); + * pos != USEARCH_DONE; + * pos = iter.next(error)) + * { + * printf("Found match at %d pos, length is %d\n", pos, + * iter.getMatchLength()); + * } + * </code></pre> + * <p> + * Note, <tt>StringSearch</tt> is not to be subclassed. + * </p> + * @see SearchIterator + * @see RuleBasedCollator + * @since ICU 2.0 + */ + +class U_I18N_API StringSearch U_FINAL : public SearchIterator +{ +public: + + // public constructors and destructors -------------------------------- + + /** + * Creating a <tt>StringSearch</tt> instance using the argument locale + * language rule set. A collator will be created in the process, which + * will be owned by this instance and will be deleted during + * destruction + * @param pattern The text for which this object will search. + * @param text The text in which to search for the pattern. + * @param locale A locale which defines the language-sensitive + * comparison rules used to determine whether text in the + * pattern and target matches. + * @param breakiter A <tt>BreakIterator</tt> object used to constrain + * the matches that are found. Matches whose start and end + * indices in the target text are not boundaries as + * determined by the <tt>BreakIterator</tt> are + * ignored. If this behavior is not desired, + * <tt>NULL</tt> can be passed in instead. + * @param status for errors if any. If pattern or text is NULL, or if + * either the length of pattern or text is 0 then an + * U_ILLEGAL_ARGUMENT_ERROR is returned. + * @stable ICU 2.0 + */ + StringSearch(const UnicodeString &pattern, const UnicodeString &text, + const Locale &locale, + BreakIterator *breakiter, + UErrorCode &status); + + /** + * Creating a <tt>StringSearch</tt> instance using the argument collator + * language rule set. Note, user retains the ownership of this collator, + * it does not get destroyed during this instance's destruction. + * @param pattern The text for which this object will search. + * @param text The text in which to search for the pattern. + * @param coll A <tt>RuleBasedCollator</tt> object which defines + * the language-sensitive comparison rules used to + * determine whether text in the pattern and target + * matches. User is responsible for the clearing of this + * object. + * @param breakiter A <tt>BreakIterator</tt> object used to constrain + * the matches that are found. Matches whose start and end + * indices in the target text are not boundaries as + * determined by the <tt>BreakIterator</tt> are + * ignored. If this behavior is not desired, + * <tt>NULL</tt> can be passed in instead. + * @param status for errors if any. If either the length of pattern or + * text is 0 then an U_ILLEGAL_ARGUMENT_ERROR is returned. + * @stable ICU 2.0 + */ + StringSearch(const UnicodeString &pattern, + const UnicodeString &text, + RuleBasedCollator *coll, + BreakIterator *breakiter, + UErrorCode &status); + + /** + * Creating a <tt>StringSearch</tt> instance using the argument locale + * language rule set. A collator will be created in the process, which + * will be owned by this instance and will be deleted during + * destruction + * <p> + * Note: No parsing of the text within the <tt>CharacterIterator</tt> + * will be done during searching for this version. The block of text + * in <tt>CharacterIterator</tt> will be used as it is. + * @param pattern The text for which this object will search. + * @param text The text iterator in which to search for the pattern. + * @param locale A locale which defines the language-sensitive + * comparison rules used to determine whether text in the + * pattern and target matches. User is responsible for + * the clearing of this object. + * @param breakiter A <tt>BreakIterator</tt> object used to constrain + * the matches that are found. Matches whose start and end + * indices in the target text are not boundaries as + * determined by the <tt>BreakIterator</tt> are + * ignored. If this behavior is not desired, + * <tt>NULL</tt> can be passed in instead. + * @param status for errors if any. If either the length of pattern or + * text is 0 then an U_ILLEGAL_ARGUMENT_ERROR is returned. + * @stable ICU 2.0 + */ + StringSearch(const UnicodeString &pattern, CharacterIterator &text, + const Locale &locale, + BreakIterator *breakiter, + UErrorCode &status); + + /** + * Creating a <tt>StringSearch</tt> instance using the argument collator + * language rule set. Note, user retains the ownership of this collator, + * it does not get destroyed during this instance's destruction. + * <p> + * Note: No parsing of the text within the <tt>CharacterIterator</tt> + * will be done during searching for this version. The block of text + * in <tt>CharacterIterator</tt> will be used as it is. + * @param pattern The text for which this object will search. + * @param text The text in which to search for the pattern. + * @param coll A <tt>RuleBasedCollator</tt> object which defines + * the language-sensitive comparison rules used to + * determine whether text in the pattern and target + * matches. User is responsible for the clearing of this + * object. + * @param breakiter A <tt>BreakIterator</tt> object used to constrain + * the matches that are found. Matches whose start and end + * indices in the target text are not boundaries as + * determined by the <tt>BreakIterator</tt> are + * ignored. If this behavior is not desired, + * <tt>NULL</tt> can be passed in instead. + * @param status for errors if any. If either the length of pattern or + * text is 0 then an U_ILLEGAL_ARGUMENT_ERROR is returned. + * @stable ICU 2.0 + */ + StringSearch(const UnicodeString &pattern, CharacterIterator &text, + RuleBasedCollator *coll, + BreakIterator *breakiter, + UErrorCode &status); + + /** + * Copy constructor that creates a StringSearch instance with the same + * behavior, and iterating over the same text. + * @param that StringSearch instance to be copied. + * @stable ICU 2.0 + */ + StringSearch(const StringSearch &that); + + /** + * Destructor. Cleans up the search iterator data struct. + * If a collator is created in the constructor, it will be destroyed here. + * @stable ICU 2.0 + */ + virtual ~StringSearch(void); + + /** + * Clone this object. + * Clones can be used concurrently in multiple threads. + * If an error occurs, then NULL is returned. + * The caller must delete the clone. + * + * @return a clone of this object + * + * @see getDynamicClassID + * @stable ICU 2.8 + */ + StringSearch *clone() const; + + // operator overloading --------------------------------------------- + + /** + * Assignment operator. Sets this iterator to have the same behavior, + * and iterate over the same text, as the one passed in. + * @param that instance to be copied. + * @stable ICU 2.0 + */ + StringSearch & operator=(const StringSearch &that); + + /** + * Equality operator. + * @param that instance to be compared. + * @return TRUE if both instances have the same attributes, + * breakiterators, collators and iterate over the same text + * while looking for the same pattern. + * @stable ICU 2.0 + */ + virtual UBool operator==(const SearchIterator &that) const; + + // public get and set methods ---------------------------------------- + + /** + * Sets the index to point to the given position, and clears any state + * that's affected. + * <p> + * This method takes the argument index and sets the position in the text + * string accordingly without checking if the index is pointing to a + * valid starting point to begin searching. + * @param position within the text to be set. If position is less + * than or greater than the text range for searching, + * an U_INDEX_OUTOFBOUNDS_ERROR will be returned + * @param status for errors if it occurs + * @stable ICU 2.0 + */ + virtual void setOffset(int32_t position, UErrorCode &status); + + /** + * Return the current index in the text being searched. + * If the iteration has gone past the end of the text + * (or past the beginning for a backwards search), USEARCH_DONE + * is returned. + * @return current index in the text being searched. + * @stable ICU 2.0 + */ + virtual int32_t getOffset(void) const; + + /** + * Set the target text to be searched. + * Text iteration will hence begin at the start of the text string. + * This method is + * useful if you want to re-use an iterator to search for the same + * pattern within a different body of text. + * @param text text string to be searched + * @param status for errors if any. If the text length is 0 then an + * U_ILLEGAL_ARGUMENT_ERROR is returned. + * @stable ICU 2.0 + */ + virtual void setText(const UnicodeString &text, UErrorCode &status); + + /** + * Set the target text to be searched. + * Text iteration will hence begin at the start of the text string. + * This method is + * useful if you want to re-use an iterator to search for the same + * pattern within a different body of text. + * Note: No parsing of the text within the <tt>CharacterIterator</tt> + * will be done during searching for this version. The block of text + * in <tt>CharacterIterator</tt> will be used as it is. + * @param text text string to be searched + * @param status for errors if any. If the text length is 0 then an + * U_ILLEGAL_ARGUMENT_ERROR is returned. + * @stable ICU 2.0 + */ + virtual void setText(CharacterIterator &text, UErrorCode &status); + + /** + * Gets the collator used for the language rules. + * <p> + * Caller may modify but <b>must not</b> delete the <tt>RuleBasedCollator</tt>! + * Modifications to this collator will affect the original collator passed in to + * the <tt>StringSearch></tt> constructor or to setCollator, if any. + * @return collator used for string search + * @stable ICU 2.0 + */ + RuleBasedCollator * getCollator() const; + + /** + * Sets the collator used for the language rules. User retains the + * ownership of this collator, thus the responsibility of deletion lies + * with the user. The iterator's position will not be changed by this method. + * @param coll collator + * @param status for errors if any + * @stable ICU 2.0 + */ + void setCollator(RuleBasedCollator *coll, UErrorCode &status); + + /** + * Sets the pattern used for matching. + * The iterator's position will not be changed by this method. + * @param pattern search pattern to be found + * @param status for errors if any. If the pattern length is 0 then an + * U_ILLEGAL_ARGUMENT_ERROR is returned. + * @stable ICU 2.0 + */ + void setPattern(const UnicodeString &pattern, UErrorCode &status); + + /** + * Gets the search pattern. + * @return pattern used for matching + * @stable ICU 2.0 + */ + const UnicodeString & getPattern() const; + + // public methods ---------------------------------------------------- + + /** + * Reset the iteration. + * Search will begin at the start of the text string if a forward + * iteration is initiated before a backwards iteration. Otherwise if + * a backwards iteration is initiated before a forwards iteration, the + * search will begin at the end of the text string. + * @stable ICU 2.0 + */ + virtual void reset(); + + /** + * Returns a copy of StringSearch with the same behavior, and + * iterating over the same text, as this one. Note that all data will be + * replicated, except for the user-specified collator and the + * breakiterator. + * @return cloned object + * @stable ICU 2.0 + */ + virtual SearchIterator * safeClone(void) const; + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.2 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.2 + */ + static UClassID U_EXPORT2 getStaticClassID(); + +protected: + + // protected method ------------------------------------------------- + + /** + * Search forward for matching text, starting at a given location. + * Clients should not call this method directly; instead they should + * call {@link SearchIterator#next }. + * <p> + * If a match is found, this method returns the index at which the match + * starts and calls {@link SearchIterator#setMatchLength } with the number + * of characters in the target text that make up the match. If no match + * is found, the method returns <tt>USEARCH_DONE</tt>. + * <p> + * The <tt>StringSearch</tt> is adjusted so that its current index + * (as returned by {@link #getOffset }) is the match position if one was + * found. + * If a match is not found, <tt>USEARCH_DONE</tt> will be returned and + * the <tt>StringSearch</tt> will be adjusted to the index USEARCH_DONE. + * @param position The index in the target text at which the search + * starts + * @param status for errors if any occurs + * @return The index at which the matched text in the target starts, or + * USEARCH_DONE if no match was found. + * @stable ICU 2.0 + */ + virtual int32_t handleNext(int32_t position, UErrorCode &status); + + /** + * Search backward for matching text, starting at a given location. + * Clients should not call this method directly; instead they should call + * <tt>SearchIterator.previous()</tt>, which this method overrides. + * <p> + * If a match is found, this method returns the index at which the match + * starts and calls {@link SearchIterator#setMatchLength } with the number + * of characters in the target text that make up the match. If no match + * is found, the method returns <tt>USEARCH_DONE</tt>. + * <p> + * The <tt>StringSearch</tt> is adjusted so that its current index + * (as returned by {@link #getOffset }) is the match position if one was + * found. + * If a match is not found, <tt>USEARCH_DONE</tt> will be returned and + * the <tt>StringSearch</tt> will be adjusted to the index USEARCH_DONE. + * @param position The index in the target text at which the search + * starts. + * @param status for errors if any occurs + * @return The index at which the matched text in the target starts, or + * USEARCH_DONE if no match was found. + * @stable ICU 2.0 + */ + virtual int32_t handlePrev(int32_t position, UErrorCode &status); + +private : + StringSearch(); // default constructor not implemented + + // private data members ---------------------------------------------- + + /** + * Pattern text + * @stable ICU 2.0 + */ + UnicodeString m_pattern_; + /** + * String search struct data + * @stable ICU 2.0 + */ + UStringSearch *m_strsrch_; + +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_COLLATION */ + +#endif + diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/symtable.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/symtable.h new file mode 100755 index 00000000..35e5f238 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/symtable.h @@ -0,0 +1,114 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (c) 2000-2005, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* Date Name Description +* 02/04/00 aliu Creation. +********************************************************************** +*/ +#ifndef SYMTABLE_H +#define SYMTABLE_H + +#include "unicode/utypes.h" +#include "unicode/uobject.h" + +/** + * \file + * \brief C++ API: An interface that defines both lookup protocol and parsing of + * symbolic names. + */ + +U_NAMESPACE_BEGIN + +class ParsePosition; +class UnicodeFunctor; +class UnicodeSet; +class UnicodeString; + +/** + * An interface that defines both lookup protocol and parsing of + * symbolic names. + * + * <p>A symbol table maintains two kinds of mappings. The first is + * between symbolic names and their values. For example, if the + * variable with the name "start" is set to the value "alpha" + * (perhaps, though not necessarily, through an expression such as + * "$start=alpha"), then the call lookup("start") will return the + * char[] array ['a', 'l', 'p', 'h', 'a']. + * + * <p>The second kind of mapping is between character values and + * UnicodeMatcher objects. This is used by RuleBasedTransliterator, + * which uses characters in the private use area to represent objects + * such as UnicodeSets. If U+E015 is mapped to the UnicodeSet [a-z], + * then lookupMatcher(0xE015) will return the UnicodeSet [a-z]. + * + * <p>Finally, a symbol table defines parsing behavior for symbolic + * names. All symbolic names start with the SYMBOL_REF character. + * When a parser encounters this character, it calls parseReference() + * with the position immediately following the SYMBOL_REF. The symbol + * table parses the name, if there is one, and returns it. + * + * @stable ICU 2.8 + */ +class U_COMMON_API SymbolTable /* not : public UObject because this is an interface/mixin class */ { +public: + + /** + * The character preceding a symbol reference name. + * @stable ICU 2.8 + */ + enum { SYMBOL_REF = 0x0024 /*$*/ }; + + /** + * Destructor. + * @stable ICU 2.8 + */ + virtual ~SymbolTable(); + + /** + * Lookup the characters associated with this string and return it. + * Return <tt>NULL</tt> if no such name exists. The resultant + * string may have length zero. + * @param s the symbolic name to lookup + * @return a string containing the name's value, or <tt>NULL</tt> if + * there is no mapping for s. + * @stable ICU 2.8 + */ + virtual const UnicodeString* lookup(const UnicodeString& s) const = 0; + + /** + * Lookup the UnicodeMatcher associated with the given character, and + * return it. Return <tt>NULL</tt> if not found. + * @param ch a 32-bit code point from 0 to 0x10FFFF inclusive. + * @return the UnicodeMatcher object represented by the given + * character, or NULL if there is no mapping for ch. + * @stable ICU 2.8 + */ + virtual const UnicodeFunctor* lookupMatcher(UChar32 ch) const = 0; + + /** + * Parse a symbol reference name from the given string, starting + * at the given position. If no valid symbol reference name is + * found, return the empty string and leave pos unchanged. That is, if the + * character at pos cannot start a name, or if pos is at or after + * text.length(), then return an empty string. This indicates an + * isolated SYMBOL_REF character. + * @param text the text to parse for the name + * @param pos on entry, the index of the first character to parse. + * This is the character following the SYMBOL_REF character. On + * exit, the index after the last parsed character. If the parse + * failed, pos is unchanged on exit. + * @param limit the index after the last character to be parsed. + * @return the parsed name, or an empty string if there is no + * valid symbolic name at the given position. + * @stable ICU 2.8 + */ + virtual UnicodeString parseReference(const UnicodeString& text, + ParsePosition& pos, int32_t limit) const = 0; +}; +U_NAMESPACE_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tblcoll.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tblcoll.h new file mode 100755 index 00000000..24ba213b --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tblcoll.h @@ -0,0 +1,877 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* Copyright (C) 1996-2016, International Business Machines Corporation and +* others. All Rights Reserved. +****************************************************************************** +*/ + +/** + * \file + * \brief C++ API: The RuleBasedCollator class implements the Collator abstract base class. + */ + +/** +* File tblcoll.h +* +* Created by: Helena Shih +* +* Modification History: +* +* Date Name Description +* 2/5/97 aliu Added streamIn and streamOut methods. Added +* constructor which reads RuleBasedCollator object from +* a binary file. Added writeToFile method which streams +* RuleBasedCollator out to a binary file. The streamIn +* and streamOut methods use istream and ostream objects +* in binary mode. +* 2/12/97 aliu Modified to use TableCollationData sub-object to +* hold invariant data. +* 2/13/97 aliu Moved several methods into this class from Collation. +* Added a private RuleBasedCollator(Locale&) constructor, +* to be used by Collator::createDefault(). General +* clean up. +* 2/20/97 helena Added clone, operator==, operator!=, operator=, and copy +* constructor and getDynamicClassID. +* 3/5/97 aliu Modified constructFromFile() to add parameter +* specifying whether or not binary loading is to be +* attempted. This is required for dynamic rule loading. +* 05/07/97 helena Added memory allocation error detection. +* 6/17/97 helena Added IDENTICAL strength for compare, changed getRules to +* use MergeCollation::getPattern. +* 6/20/97 helena Java class name change. +* 8/18/97 helena Added internal API documentation. +* 09/03/97 helena Added createCollationKeyValues(). +* 02/10/98 damiba Added compare with "length" parameter +* 08/05/98 erm Synched with 1.2 version of RuleBasedCollator.java +* 04/23/99 stephen Removed EDecompositionMode, merged with +* Normalizer::EMode +* 06/14/99 stephen Removed kResourceBundleSuffix +* 11/02/99 helena Collator performance enhancements. Eliminates the +* UnicodeString construction and special case for NO_OP. +* 11/23/99 srl More performance enhancements. Updates to NormalizerIterator +* internal state management. +* 12/15/99 aliu Update to support Thai collation. Move NormalizerIterator +* to implementation file. +* 01/29/01 synwee Modified into a C++ wrapper which calls C API +* (ucol.h) +* 2012-2014 markus Rewritten in C++ again. +*/ + +#ifndef TBLCOLL_H +#define TBLCOLL_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_COLLATION + +#include "unicode/coll.h" +#include "unicode/locid.h" +#include "unicode/uiter.h" +#include "unicode/ucol.h" + +U_NAMESPACE_BEGIN + +struct CollationCacheEntry; +struct CollationData; +struct CollationSettings; +struct CollationTailoring; +/** +* @stable ICU 2.0 +*/ +class StringSearch; +/** +* @stable ICU 2.0 +*/ +class CollationElementIterator; +class CollationKey; +class SortKeyByteSink; +class UnicodeSet; +class UnicodeString; +class UVector64; + +/** + * The RuleBasedCollator class provides the implementation of + * Collator, using data-driven tables. The user can create a customized + * table-based collation. + * <p> + * For more information about the collation service see + * <a href="http://userguide.icu-project.org/collation">the User Guide</a>. + * <p> + * Collation service provides correct sorting orders for most locales supported in ICU. + * If specific data for a locale is not available, the orders eventually falls back + * to the <a href="http://www.unicode.org/reports/tr35/tr35-collation.html#Root_Collation">CLDR root sort order</a>. + * <p> + * Sort ordering may be customized by providing your own set of rules. For more on + * this subject see the <a href="http://userguide.icu-project.org/collation/customization"> + * Collation Customization</a> section of the User Guide. + * <p> + * Note, RuleBasedCollator is not to be subclassed. + * @see Collator + */ +class U_I18N_API RuleBasedCollator : public Collator { +public: + /** + * RuleBasedCollator constructor. This takes the table rules and builds a + * collation table out of them. Please see RuleBasedCollator class + * description for more details on the collation rule syntax. + * @param rules the collation rules to build the collation table from. + * @param status reporting a success or an error. + * @stable ICU 2.0 + */ + RuleBasedCollator(const UnicodeString& rules, UErrorCode& status); + + /** + * RuleBasedCollator constructor. This takes the table rules and builds a + * collation table out of them. Please see RuleBasedCollator class + * description for more details on the collation rule syntax. + * @param rules the collation rules to build the collation table from. + * @param collationStrength strength for comparison + * @param status reporting a success or an error. + * @stable ICU 2.0 + */ + RuleBasedCollator(const UnicodeString& rules, + ECollationStrength collationStrength, + UErrorCode& status); + + /** + * RuleBasedCollator constructor. This takes the table rules and builds a + * collation table out of them. Please see RuleBasedCollator class + * description for more details on the collation rule syntax. + * @param rules the collation rules to build the collation table from. + * @param decompositionMode the normalisation mode + * @param status reporting a success or an error. + * @stable ICU 2.0 + */ + RuleBasedCollator(const UnicodeString& rules, + UColAttributeValue decompositionMode, + UErrorCode& status); + + /** + * RuleBasedCollator constructor. This takes the table rules and builds a + * collation table out of them. Please see RuleBasedCollator class + * description for more details on the collation rule syntax. + * @param rules the collation rules to build the collation table from. + * @param collationStrength strength for comparison + * @param decompositionMode the normalisation mode + * @param status reporting a success or an error. + * @stable ICU 2.0 + */ + RuleBasedCollator(const UnicodeString& rules, + ECollationStrength collationStrength, + UColAttributeValue decompositionMode, + UErrorCode& status); + +#ifndef U_HIDE_INTERNAL_API + /** + * TODO: document & propose as public API + * @internal + */ + RuleBasedCollator(const UnicodeString &rules, + UParseError &parseError, UnicodeString &reason, + UErrorCode &errorCode); +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Copy constructor. + * @param other the RuleBasedCollator object to be copied + * @stable ICU 2.0 + */ + RuleBasedCollator(const RuleBasedCollator& other); + + + /** Opens a collator from a collator binary image created using + * cloneBinary. Binary image used in instantiation of the + * collator remains owned by the user and should stay around for + * the lifetime of the collator. The API also takes a base collator + * which must be the root collator. + * @param bin binary image owned by the user and required through the + * lifetime of the collator + * @param length size of the image. If negative, the API will try to + * figure out the length of the image + * @param base Base collator, for lookup of untailored characters. + * Must be the root collator, must not be NULL. + * The base is required to be present through the lifetime of the collator. + * @param status for catching errors + * @return newly created collator + * @see cloneBinary + * @stable ICU 3.4 + */ + RuleBasedCollator(const uint8_t *bin, int32_t length, + const RuleBasedCollator *base, + UErrorCode &status); + + /** + * Destructor. + * @stable ICU 2.0 + */ + virtual ~RuleBasedCollator(); + + /** + * Assignment operator. + * @param other other RuleBasedCollator object to copy from. + * @stable ICU 2.0 + */ + RuleBasedCollator& operator=(const RuleBasedCollator& other); + + /** + * Returns true if argument is the same as this object. + * @param other Collator object to be compared. + * @return true if arguments is the same as this object. + * @stable ICU 2.0 + */ + virtual UBool operator==(const Collator& other) const; + + /** + * Makes a copy of this object. + * @return a copy of this object, owned by the caller + * @stable ICU 2.0 + */ + virtual Collator* clone(void) const; + + /** + * Creates a collation element iterator for the source string. The caller of + * this method is responsible for the memory management of the return + * pointer. + * @param source the string over which the CollationElementIterator will + * iterate. + * @return the collation element iterator of the source string using this as + * the based Collator. + * @stable ICU 2.2 + */ + virtual CollationElementIterator* createCollationElementIterator( + const UnicodeString& source) const; + + /** + * Creates a collation element iterator for the source. The caller of this + * method is responsible for the memory management of the returned pointer. + * @param source the CharacterIterator which produces the characters over + * which the CollationElementItgerator will iterate. + * @return the collation element iterator of the source using this as the + * based Collator. + * @stable ICU 2.2 + */ + virtual CollationElementIterator* createCollationElementIterator( + const CharacterIterator& source) const; + + // Make deprecated versions of Collator::compare() visible. + using Collator::compare; + + /** + * The comparison function compares the character data stored in two + * different strings. Returns information about whether a string is less + * than, greater than or equal to another string. + * @param source the source string to be compared with. + * @param target the string that is to be compared with the source string. + * @param status possible error code + * @return Returns an enum value. UCOL_GREATER if source is greater + * than target; UCOL_EQUAL if source is equal to target; UCOL_LESS if source is less + * than target + * @stable ICU 2.6 + **/ + virtual UCollationResult compare(const UnicodeString& source, + const UnicodeString& target, + UErrorCode &status) const; + + /** + * Does the same thing as compare but limits the comparison to a specified + * length + * @param source the source string to be compared with. + * @param target the string that is to be compared with the source string. + * @param length the length the comparison is limited to + * @param status possible error code + * @return Returns an enum value. UCOL_GREATER if source (up to the specified + * length) is greater than target; UCOL_EQUAL if source (up to specified + * length) is equal to target; UCOL_LESS if source (up to the specified + * length) is less than target. + * @stable ICU 2.6 + */ + virtual UCollationResult compare(const UnicodeString& source, + const UnicodeString& target, + int32_t length, + UErrorCode &status) const; + + /** + * The comparison function compares the character data stored in two + * different string arrays. Returns information about whether a string array + * is less than, greater than or equal to another string array. + * @param source the source string array to be compared with. + * @param sourceLength the length of the source string array. If this value + * is equal to -1, the string array is null-terminated. + * @param target the string that is to be compared with the source string. + * @param targetLength the length of the target string array. If this value + * is equal to -1, the string array is null-terminated. + * @param status possible error code + * @return Returns an enum value. UCOL_GREATER if source is greater + * than target; UCOL_EQUAL if source is equal to target; UCOL_LESS if source is less + * than target + * @stable ICU 2.6 + */ + virtual UCollationResult compare(const char16_t* source, int32_t sourceLength, + const char16_t* target, int32_t targetLength, + UErrorCode &status) const; + + /** + * Compares two strings using the Collator. + * Returns whether the first one compares less than/equal to/greater than + * the second one. + * This version takes UCharIterator input. + * @param sIter the first ("source") string iterator + * @param tIter the second ("target") string iterator + * @param status ICU status + * @return UCOL_LESS, UCOL_EQUAL or UCOL_GREATER + * @stable ICU 4.2 + */ + virtual UCollationResult compare(UCharIterator &sIter, + UCharIterator &tIter, + UErrorCode &status) const; + + /** + * Compares two UTF-8 strings using the Collator. + * Returns whether the first one compares less than/equal to/greater than + * the second one. + * This version takes UTF-8 input. + * Note that a StringPiece can be implicitly constructed + * from a std::string or a NUL-terminated const char * string. + * @param source the first UTF-8 string + * @param target the second UTF-8 string + * @param status ICU status + * @return UCOL_LESS, UCOL_EQUAL or UCOL_GREATER + * @stable ICU 51 + */ + virtual UCollationResult compareUTF8(const StringPiece &source, + const StringPiece &target, + UErrorCode &status) const; + + /** + * Transforms the string into a series of characters + * that can be compared with CollationKey.compare(). + * + * Note that sort keys are often less efficient than simply doing comparison. + * For more details, see the ICU User Guide. + * + * @param source the source string. + * @param key the transformed key of the source string. + * @param status the error code status. + * @return the transformed key. + * @see CollationKey + * @stable ICU 2.0 + */ + virtual CollationKey& getCollationKey(const UnicodeString& source, + CollationKey& key, + UErrorCode& status) const; + + /** + * Transforms a specified region of the string into a series of characters + * that can be compared with CollationKey.compare. + * + * Note that sort keys are often less efficient than simply doing comparison. + * For more details, see the ICU User Guide. + * + * @param source the source string. + * @param sourceLength the length of the source string. + * @param key the transformed key of the source string. + * @param status the error code status. + * @return the transformed key. + * @see CollationKey + * @stable ICU 2.0 + */ + virtual CollationKey& getCollationKey(const char16_t *source, + int32_t sourceLength, + CollationKey& key, + UErrorCode& status) const; + + /** + * Generates the hash code for the rule-based collation object. + * @return the hash code. + * @stable ICU 2.0 + */ + virtual int32_t hashCode() const; + + /** + * Gets the locale of the Collator + * @param type can be either requested, valid or actual locale. For more + * information see the definition of ULocDataLocaleType in + * uloc.h + * @param status the error code status. + * @return locale where the collation data lives. If the collator + * was instantiated from rules, locale is empty. + * @deprecated ICU 2.8 likely to change in ICU 3.0, based on feedback + */ + virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const; + + /** + * Gets the tailoring rules for this collator. + * @return the collation tailoring from which this collator was created + * @stable ICU 2.0 + */ + const UnicodeString& getRules() const; + + /** + * Gets the version information for a Collator. + * @param info the version # information, the result will be filled in + * @stable ICU 2.0 + */ + virtual void getVersion(UVersionInfo info) const; + +#ifndef U_HIDE_DEPRECATED_API + /** + * Returns the maximum length of any expansion sequences that end with the + * specified comparison order. + * + * This is specific to the kind of collation element values and sequences + * returned by the CollationElementIterator. + * Call CollationElementIterator::getMaxExpansion() instead. + * + * @param order a collation order returned by CollationElementIterator::previous + * or CollationElementIterator::next. + * @return maximum size of the expansion sequences ending with the collation + * element, or 1 if the collation element does not occur at the end of + * any expansion sequence + * @see CollationElementIterator#getMaxExpansion + * @deprecated ICU 51 Use CollationElementIterator::getMaxExpansion() instead. + */ + int32_t getMaxExpansion(int32_t order) const; +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This + * method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() + * methods call this method. + * @return The class ID for this object. All objects of a given class have + * the same class ID. Objects of other classes have different class + * IDs. + * @stable ICU 2.0 + */ + virtual UClassID getDynamicClassID(void) const; + + /** + * Returns the class ID for this class. This is useful only for comparing to + * a return value from getDynamicClassID(). For example: + * <pre> + * Base* polymorphic_pointer = createPolymorphicObject(); + * if (polymorphic_pointer->getDynamicClassID() == + * Derived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 2.0 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + +#ifndef U_HIDE_DEPRECATED_API + /** + * Do not use this method: The caller and the ICU library might use different heaps. + * Use cloneBinary() instead which writes to caller-provided memory. + * + * Returns a binary format of this collator. + * @param length Returns the length of the data, in bytes + * @param status the error code status. + * @return memory, owned by the caller, of size 'length' bytes. + * @deprecated ICU 52. Use cloneBinary() instead. + */ + uint8_t *cloneRuleData(int32_t &length, UErrorCode &status) const; +#endif /* U_HIDE_DEPRECATED_API */ + + /** Creates a binary image of a collator. This binary image can be stored and + * later used to instantiate a collator using ucol_openBinary. + * This API supports preflighting. + * @param buffer a fill-in buffer to receive the binary image + * @param capacity capacity of the destination buffer + * @param status for catching errors + * @return size of the image + * @see ucol_openBinary + * @stable ICU 3.4 + */ + int32_t cloneBinary(uint8_t *buffer, int32_t capacity, UErrorCode &status) const; + + /** + * Returns current rules. Delta defines whether full rules are returned or + * just the tailoring. + * + * getRules(void) should normally be used instead. + * See http://userguide.icu-project.org/collation/customization#TOC-Building-on-Existing-Locales + * @param delta one of UCOL_TAILORING_ONLY, UCOL_FULL_RULES. + * @param buffer UnicodeString to store the result rules + * @stable ICU 2.2 + * @see UCOL_FULL_RULES + */ + void getRules(UColRuleOption delta, UnicodeString &buffer) const; + + /** + * Universal attribute setter + * @param attr attribute type + * @param value attribute value + * @param status to indicate whether the operation went on smoothly or there were errors + * @stable ICU 2.2 + */ + virtual void setAttribute(UColAttribute attr, UColAttributeValue value, + UErrorCode &status); + + /** + * Universal attribute getter. + * @param attr attribute type + * @param status to indicate whether the operation went on smoothly or there were errors + * @return attribute value + * @stable ICU 2.2 + */ + virtual UColAttributeValue getAttribute(UColAttribute attr, + UErrorCode &status) const; + + /** + * Sets the variable top to the top of the specified reordering group. + * The variable top determines the highest-sorting character + * which is affected by UCOL_ALTERNATE_HANDLING. + * If that attribute is set to UCOL_NON_IGNORABLE, then the variable top has no effect. + * @param group one of UCOL_REORDER_CODE_SPACE, UCOL_REORDER_CODE_PUNCTUATION, + * UCOL_REORDER_CODE_SYMBOL, UCOL_REORDER_CODE_CURRENCY; + * or UCOL_REORDER_CODE_DEFAULT to restore the default max variable group + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return *this + * @see getMaxVariable + * @stable ICU 53 + */ + virtual Collator &setMaxVariable(UColReorderCode group, UErrorCode &errorCode); + + /** + * Returns the maximum reordering group whose characters are affected by UCOL_ALTERNATE_HANDLING. + * @return the maximum variable reordering group. + * @see setMaxVariable + * @stable ICU 53 + */ + virtual UColReorderCode getMaxVariable() const; + + /** + * Sets the variable top to the primary weight of the specified string. + * + * Beginning with ICU 53, the variable top is pinned to + * the top of one of the supported reordering groups, + * and it must not be beyond the last of those groups. + * See setMaxVariable(). + * @param varTop one or more (if contraction) char16_ts to which the variable top should be set + * @param len length of variable top string. If -1 it is considered to be zero terminated. + * @param status error code. If error code is set, the return value is undefined. Errors set by this function are: <br> + * U_CE_NOT_FOUND_ERROR if more than one character was passed and there is no such contraction<br> + * U_ILLEGAL_ARGUMENT_ERROR if the variable top is beyond + * the last reordering group supported by setMaxVariable() + * @return variable top primary weight + * @deprecated ICU 53 Call setMaxVariable() instead. + */ + virtual uint32_t setVariableTop(const char16_t *varTop, int32_t len, UErrorCode &status); + + /** + * Sets the variable top to the primary weight of the specified string. + * + * Beginning with ICU 53, the variable top is pinned to + * the top of one of the supported reordering groups, + * and it must not be beyond the last of those groups. + * See setMaxVariable(). + * @param varTop a UnicodeString size 1 or more (if contraction) of char16_ts to which the variable top should be set + * @param status error code. If error code is set, the return value is undefined. Errors set by this function are: <br> + * U_CE_NOT_FOUND_ERROR if more than one character was passed and there is no such contraction<br> + * U_ILLEGAL_ARGUMENT_ERROR if the variable top is beyond + * the last reordering group supported by setMaxVariable() + * @return variable top primary weight + * @deprecated ICU 53 Call setMaxVariable() instead. + */ + virtual uint32_t setVariableTop(const UnicodeString &varTop, UErrorCode &status); + + /** + * Sets the variable top to the specified primary weight. + * + * Beginning with ICU 53, the variable top is pinned to + * the top of one of the supported reordering groups, + * and it must not be beyond the last of those groups. + * See setMaxVariable(). + * @param varTop primary weight, as returned by setVariableTop or ucol_getVariableTop + * @param status error code + * @deprecated ICU 53 Call setMaxVariable() instead. + */ + virtual void setVariableTop(uint32_t varTop, UErrorCode &status); + + /** + * Gets the variable top value of a Collator. + * @param status error code (not changed by function). If error code is set, the return value is undefined. + * @return the variable top primary weight + * @see getMaxVariable + * @stable ICU 2.0 + */ + virtual uint32_t getVariableTop(UErrorCode &status) const; + + /** + * Get a UnicodeSet that contains all the characters and sequences tailored in + * this collator. + * @param status error code of the operation + * @return a pointer to a UnicodeSet object containing all the + * code points and sequences that may sort differently than + * in the root collator. The object must be disposed of by using delete + * @stable ICU 2.4 + */ + virtual UnicodeSet *getTailoredSet(UErrorCode &status) const; + + /** + * Get the sort key as an array of bytes from a UnicodeString. + * + * Note that sort keys are often less efficient than simply doing comparison. + * For more details, see the ICU User Guide. + * + * @param source string to be processed. + * @param result buffer to store result in. If NULL, number of bytes needed + * will be returned. + * @param resultLength length of the result buffer. If if not enough the + * buffer will be filled to capacity. + * @return Number of bytes needed for storing the sort key + * @stable ICU 2.0 + */ + virtual int32_t getSortKey(const UnicodeString& source, uint8_t *result, + int32_t resultLength) const; + + /** + * Get the sort key as an array of bytes from a char16_t buffer. + * + * Note that sort keys are often less efficient than simply doing comparison. + * For more details, see the ICU User Guide. + * + * @param source string to be processed. + * @param sourceLength length of string to be processed. If -1, the string + * is 0 terminated and length will be decided by the function. + * @param result buffer to store result in. If NULL, number of bytes needed + * will be returned. + * @param resultLength length of the result buffer. If if not enough the + * buffer will be filled to capacity. + * @return Number of bytes needed for storing the sort key + * @stable ICU 2.2 + */ + virtual int32_t getSortKey(const char16_t *source, int32_t sourceLength, + uint8_t *result, int32_t resultLength) const; + + /** + * Retrieves the reordering codes for this collator. + * @param dest The array to fill with the script ordering. + * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function + * will only return the length of the result without writing any codes (pre-flighting). + * @param status A reference to an error code value, which must not indicate + * a failure before the function call. + * @return The length of the script ordering array. + * @see ucol_setReorderCodes + * @see Collator#getEquivalentReorderCodes + * @see Collator#setReorderCodes + * @stable ICU 4.8 + */ + virtual int32_t getReorderCodes(int32_t *dest, + int32_t destCapacity, + UErrorCode& status) const; + + /** + * Sets the ordering of scripts for this collator. + * @param reorderCodes An array of script codes in the new order. This can be NULL if the + * length is also set to 0. An empty array will clear any reordering codes on the collator. + * @param reorderCodesLength The length of reorderCodes. + * @param status error code + * @see ucol_setReorderCodes + * @see Collator#getReorderCodes + * @see Collator#getEquivalentReorderCodes + * @stable ICU 4.8 + */ + virtual void setReorderCodes(const int32_t* reorderCodes, + int32_t reorderCodesLength, + UErrorCode& status) ; + + /** + * Implements ucol_strcollUTF8(). + * @internal + */ + virtual UCollationResult internalCompareUTF8( + const char *left, int32_t leftLength, + const char *right, int32_t rightLength, + UErrorCode &errorCode) const; + + /** Get the short definition string for a collator. This internal API harvests the collator's + * locale and the attribute set and produces a string that can be used for opening + * a collator with the same attributes using the ucol_openFromShortString API. + * This string will be normalized. + * The structure and the syntax of the string is defined in the "Naming collators" + * section of the users guide: + * http://userguide.icu-project.org/collation/concepts#TOC-Collator-naming-scheme + * This function supports preflighting. + * + * This is internal, and intended to be used with delegate converters. + * + * @param locale a locale that will appear as a collators locale in the resulting + * short string definition. If NULL, the locale will be harvested + * from the collator. + * @param buffer space to hold the resulting string + * @param capacity capacity of the buffer + * @param status for returning errors. All the preflighting errors are featured + * @return length of the resulting string + * @see ucol_openFromShortString + * @see ucol_normalizeShortDefinitionString + * @see ucol_getShortDefinitionString + * @internal + */ + virtual int32_t internalGetShortDefinitionString(const char *locale, + char *buffer, + int32_t capacity, + UErrorCode &status) const; + + /** + * Implements ucol_nextSortKeyPart(). + * @internal + */ + virtual int32_t internalNextSortKeyPart( + UCharIterator *iter, uint32_t state[2], + uint8_t *dest, int32_t count, UErrorCode &errorCode) const; + + // Do not enclose the default constructor with #ifndef U_HIDE_INTERNAL_API + /** + * Only for use in ucol_openRules(). + * @internal + */ + RuleBasedCollator(); + +#ifndef U_HIDE_INTERNAL_API + /** + * Implements ucol_getLocaleByType(). + * Needed because the lifetime of the locale ID string must match that of the collator. + * getLocale() returns a copy of a Locale, with minimal lifetime in a C wrapper. + * @internal + */ + const char *internalGetLocaleID(ULocDataLocaleType type, UErrorCode &errorCode) const; + + /** + * Implements ucol_getContractionsAndExpansions(). + * Gets this collator's sets of contraction strings and/or + * characters and strings that map to multiple collation elements (expansions). + * If addPrefixes is TRUE, then contractions that are expressed as + * prefix/pre-context rules are included. + * @param contractions if not NULL, the set to hold the contractions + * @param expansions if not NULL, the set to hold the expansions + * @param addPrefixes include prefix contextual mappings + * @param errorCode in/out ICU error code + * @internal + */ + void internalGetContractionsAndExpansions( + UnicodeSet *contractions, UnicodeSet *expansions, + UBool addPrefixes, UErrorCode &errorCode) const; + + /** + * Adds the contractions that start with character c to the set. + * Ignores prefixes. Used by AlphabeticIndex. + * @internal + */ + void internalAddContractions(UChar32 c, UnicodeSet &set, UErrorCode &errorCode) const; + + /** + * Implements from-rule constructors, and ucol_openRules(). + * @internal + */ + void internalBuildTailoring( + const UnicodeString &rules, + int32_t strength, + UColAttributeValue decompositionMode, + UParseError *outParseError, UnicodeString *outReason, + UErrorCode &errorCode); + + /** @internal */ + static inline RuleBasedCollator *rbcFromUCollator(UCollator *uc) { + return dynamic_cast<RuleBasedCollator *>(fromUCollator(uc)); + } + /** @internal */ + static inline const RuleBasedCollator *rbcFromUCollator(const UCollator *uc) { + return dynamic_cast<const RuleBasedCollator *>(fromUCollator(uc)); + } + + /** + * Appends the CEs for the string to the vector. + * @internal for tests & tools + */ + void internalGetCEs(const UnicodeString &str, UVector64 &ces, UErrorCode &errorCode) const; +#endif // U_HIDE_INTERNAL_API + +protected: + /** + * Used internally by registration to define the requested and valid locales. + * @param requestedLocale the requested locale + * @param validLocale the valid locale + * @param actualLocale the actual locale + * @internal + */ + virtual void setLocales(const Locale& requestedLocale, const Locale& validLocale, const Locale& actualLocale); + +private: + friend class CollationElementIterator; + friend class Collator; + + RuleBasedCollator(const CollationCacheEntry *entry); + + /** + * Enumeration of attributes that are relevant for short definition strings + * (e.g., ucol_getShortDefinitionString()). + * Effectively extends UColAttribute. + */ + enum Attributes { + ATTR_VARIABLE_TOP = UCOL_ATTRIBUTE_COUNT, + ATTR_LIMIT + }; + + void adoptTailoring(CollationTailoring *t, UErrorCode &errorCode); + + // Both lengths must be <0 or else both must be >=0. + UCollationResult doCompare(const char16_t *left, int32_t leftLength, + const char16_t *right, int32_t rightLength, + UErrorCode &errorCode) const; + UCollationResult doCompare(const uint8_t *left, int32_t leftLength, + const uint8_t *right, int32_t rightLength, + UErrorCode &errorCode) const; + + void writeSortKey(const char16_t *s, int32_t length, + SortKeyByteSink &sink, UErrorCode &errorCode) const; + + void writeIdenticalLevel(const char16_t *s, const char16_t *limit, + SortKeyByteSink &sink, UErrorCode &errorCode) const; + + const CollationSettings &getDefaultSettings() const; + + void setAttributeDefault(int32_t attribute) { + explicitlySetAttributes &= ~((uint32_t)1 << attribute); + } + void setAttributeExplicitly(int32_t attribute) { + explicitlySetAttributes |= (uint32_t)1 << attribute; + } + UBool attributeHasBeenSetExplicitly(int32_t attribute) const { + // assert(0 <= attribute < ATTR_LIMIT); + return (UBool)((explicitlySetAttributes & ((uint32_t)1 << attribute)) != 0); + } + + /** + * Tests whether a character is "unsafe" for use as a collation starting point. + * + * @param c code point or code unit + * @return TRUE if c is unsafe + * @see CollationElementIterator#setOffset(int) + */ + UBool isUnsafe(UChar32 c) const; + + static void U_CALLCONV computeMaxExpansions(const CollationTailoring *t, UErrorCode &errorCode); + UBool initMaxExpansions(UErrorCode &errorCode) const; + + void setFastLatinOptions(CollationSettings &ownedSettings) const; + + const CollationData *data; + const CollationSettings *settings; // reference-counted + const CollationTailoring *tailoring; // alias of cacheEntry->tailoring + const CollationCacheEntry *cacheEntry; // reference-counted + Locale validLocale; + uint32_t explicitlySetAttributes; + + UBool actualLocaleIsSameAsValid; +}; + +U_NAMESPACE_END + +#endif // !UCONFIG_NO_COLLATION +#endif // TBLCOLL_H diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/timezone.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/timezone.h new file mode 100755 index 00000000..83dee317 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/timezone.h @@ -0,0 +1,965 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/************************************************************************* +* Copyright (c) 1997-2016, International Business Machines Corporation +* and others. All Rights Reserved. +************************************************************************** +* +* File TIMEZONE.H +* +* Modification History: +* +* Date Name Description +* 04/21/97 aliu Overhauled header. +* 07/09/97 helena Changed createInstance to createDefault. +* 08/06/97 aliu Removed dependency on internal header for Hashtable. +* 08/10/98 stephen Changed getDisplayName() API conventions to match +* 08/19/98 stephen Changed createTimeZone() to never return 0 +* 09/02/98 stephen Sync to JDK 1.2 8/31 +* - Added getOffset(... monthlen ...) +* - Added hasSameRules() +* 09/15/98 stephen Added getStaticClassID +* 12/03/99 aliu Moved data out of static table into icudata.dll. +* Hashtable replaced by new static data structures. +* 12/14/99 aliu Made GMT public. +* 08/15/01 grhoten Made GMT private and added the getGMT() function +************************************************************************** +*/ + +#ifndef TIMEZONE_H +#define TIMEZONE_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: TimeZone object + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/uobject.h" +#include "unicode/unistr.h" +#include "unicode/ures.h" +#include "unicode/ucal.h" + +U_NAMESPACE_BEGIN + +class StringEnumeration; + +/** + * + * <code>TimeZone</code> represents a time zone offset, and also figures out daylight + * savings. + * + * <p> + * Typically, you get a <code>TimeZone</code> using <code>createDefault</code> + * which creates a <code>TimeZone</code> based on the time zone where the program + * is running. For example, for a program running in Japan, <code>createDefault</code> + * creates a <code>TimeZone</code> object based on Japanese Standard Time. + * + * <p> + * You can also get a <code>TimeZone</code> using <code>createTimeZone</code> along + * with a time zone ID. For instance, the time zone ID for the US Pacific + * Time zone is "America/Los_Angeles". So, you can get a Pacific Time <code>TimeZone</code> object + * with: + * \htmlonly<blockquote>\endhtmlonly + * <pre> + * TimeZone *tz = TimeZone::createTimeZone("America/Los_Angeles"); + * </pre> + * \htmlonly</blockquote>\endhtmlonly + * You can use the <code>createEnumeration</code> method to iterate through + * all the supported time zone IDs, or the <code>getCanonicalID</code> method to check + * if a time zone ID is supported or not. You can then choose a + * supported ID to get a <code>TimeZone</code>. + * If the time zone you want is not represented by one of the + * supported IDs, then you can create a custom time zone ID with + * the following syntax: + * + * \htmlonly<blockquote>\endhtmlonly + * <pre> + * GMT[+|-]hh[[:]mm] + * </pre> + * \htmlonly</blockquote>\endhtmlonly + * + * For example, you might specify GMT+14:00 as a custom + * time zone ID. The <code>TimeZone</code> that is returned + * when you specify a custom time zone ID uses the specified + * offset from GMT(=UTC) and does not observe daylight saving + * time. For example, you might specify GMT+14:00 as a custom + * time zone ID to create a TimeZone representing 14 hours ahead + * of GMT (with no daylight saving time). In addition, + * <code>getCanonicalID</code> can also be used to + * normalize a custom time zone ID. + * + * TimeZone is an abstract class representing a time zone. A TimeZone is needed for + * Calendar to produce local time for a particular time zone. A TimeZone comprises + * three basic pieces of information: + * <ul> + * <li>A time zone offset; that, is the number of milliseconds to add or subtract + * from a time expressed in terms of GMT to convert it to the same time in that + * time zone (without taking daylight savings time into account).</li> + * <li>Logic necessary to take daylight savings time into account if daylight savings + * time is observed in that time zone (e.g., the days and hours on which daylight + * savings time begins and ends).</li> + * <li>An ID. This is a text string that uniquely identifies the time zone.</li> + * </ul> + * + * (Only the ID is actually implemented in TimeZone; subclasses of TimeZone may handle + * daylight savings time and GMT offset in different ways. Currently we have the following + * TimeZone subclasses: RuleBasedTimeZone, SimpleTimeZone, and VTimeZone.) + * <P> + * The TimeZone class contains a static list containing a TimeZone object for every + * combination of GMT offset and daylight-savings time rules currently in use in the + * world, each with a unique ID. Each ID consists of a region (usually a continent or + * ocean) and a city in that region, separated by a slash, (for example, US Pacific + * Time is "America/Los_Angeles.") Because older versions of this class used + * three- or four-letter abbreviations instead, there is also a table that maps the older + * abbreviations to the newer ones (for example, "PST" maps to "America/Los_Angeles"). + * Anywhere the API requires an ID, you can use either form. + * <P> + * To create a new TimeZone, you call the factory function TimeZone::createTimeZone() + * and pass it a time zone ID. You can use the createEnumeration() function to + * obtain a list of all the time zone IDs recognized by createTimeZone(). + * <P> + * You can also use TimeZone::createDefault() to create a TimeZone. This function uses + * platform-specific APIs to produce a TimeZone for the time zone corresponding to + * the client's computer's physical location. For example, if you're in Japan (assuming + * your machine is set up correctly), TimeZone::createDefault() will return a TimeZone + * for Japanese Standard Time ("Asia/Tokyo"). + */ +class U_I18N_API TimeZone : public UObject { +public: + /** + * @stable ICU 2.0 + */ + virtual ~TimeZone(); + + /** + * Returns the "unknown" time zone. + * It behaves like the GMT/UTC time zone but has the + * <code>UCAL_UNKNOWN_ZONE_ID</code> = "Etc/Unknown". + * createTimeZone() returns a mutable clone of this time zone if the input ID is not recognized. + * + * @return the "unknown" time zone. + * @see UCAL_UNKNOWN_ZONE_ID + * @see createTimeZone + * @see getGMT + * @stable ICU 49 + */ + static const TimeZone& U_EXPORT2 getUnknown(); + + /** + * The GMT (=UTC) time zone has a raw offset of zero and does not use daylight + * savings time. This is a commonly used time zone. + * + * <p>Note: For backward compatibility reason, the ID used by the time + * zone returned by this method is "GMT", although the ICU's canonical + * ID for the GMT time zone is "Etc/GMT". + * + * @return the GMT/UTC time zone. + * @see getUnknown + * @stable ICU 2.0 + */ + static const TimeZone* U_EXPORT2 getGMT(void); + + /** + * Creates a <code>TimeZone</code> for the given ID. + * @param ID the ID for a <code>TimeZone</code>, such as "America/Los_Angeles", + * or a custom ID such as "GMT-8:00". + * @return the specified <code>TimeZone</code>, or a mutable clone of getUnknown() + * if the given ID cannot be understood or if the given ID is "Etc/Unknown". + * The return result is guaranteed to be non-NULL. + * If you require that the specific zone asked for be returned, + * compare the result with getUnknown() or check the ID of the return result. + * @stable ICU 2.0 + */ + static TimeZone* U_EXPORT2 createTimeZone(const UnicodeString& ID); + + /** + * Returns an enumeration over system time zone IDs with the given + * filter conditions. + * @param zoneType The system time zone type. + * @param region The ISO 3166 two-letter country code or UN M.49 + * three-digit area code. When NULL, no filtering + * done by region. + * @param rawOffset An offset from GMT in milliseconds, ignoring + * the effect of daylight savings time, if any. + * When NULL, no filtering done by zone offset. + * @param ec Output param to filled in with a success or + * an error. + * @return an enumeration object, owned by the caller. + * @stable ICU 4.8 + */ + static StringEnumeration* U_EXPORT2 createTimeZoneIDEnumeration( + USystemTimeZoneType zoneType, + const char* region, + const int32_t* rawOffset, + UErrorCode& ec); + + /** + * Returns an enumeration over all recognized time zone IDs. (i.e., + * all strings that createTimeZone() accepts) + * + * @return an enumeration object, owned by the caller. + * @stable ICU 2.4 + */ + static StringEnumeration* U_EXPORT2 createEnumeration(); + + /** + * Returns an enumeration over time zone IDs with a given raw + * offset from GMT. There may be several times zones with the + * same GMT offset that differ in the way they handle daylight + * savings time. For example, the state of Arizona doesn't + * observe daylight savings time. If you ask for the time zone + * IDs corresponding to GMT-7:00, you'll get back an enumeration + * over two time zone IDs: "America/Denver," which corresponds to + * Mountain Standard Time in the winter and Mountain Daylight Time + * in the summer, and "America/Phoenix", which corresponds to + * Mountain Standard Time year-round, even in the summer. + * + * @param rawOffset an offset from GMT in milliseconds, ignoring + * the effect of daylight savings time, if any + * @return an enumeration object, owned by the caller + * @stable ICU 2.4 + */ + static StringEnumeration* U_EXPORT2 createEnumeration(int32_t rawOffset); + + /** + * Returns an enumeration over time zone IDs associated with the + * given country. Some zones are affiliated with no country + * (e.g., "UTC"); these may also be retrieved, as a group. + * + * @param country The ISO 3166 two-letter country code, or NULL to + * retrieve zones not affiliated with any country. + * @return an enumeration object, owned by the caller + * @stable ICU 2.4 + */ + static StringEnumeration* U_EXPORT2 createEnumeration(const char* country); + + /** + * Returns the number of IDs in the equivalency group that + * includes the given ID. An equivalency group contains zones + * that have the same GMT offset and rules. + * + * <p>The returned count includes the given ID; it is always >= 1. + * The given ID must be a system time zone. If it is not, returns + * zero. + * @param id a system time zone ID + * @return the number of zones in the equivalency group containing + * 'id', or zero if 'id' is not a valid system ID + * @see #getEquivalentID + * @stable ICU 2.0 + */ + static int32_t U_EXPORT2 countEquivalentIDs(const UnicodeString& id); + + /** + * Returns an ID in the equivalency group that + * includes the given ID. An equivalency group contains zones + * that have the same GMT offset and rules. + * + * <p>The given index must be in the range 0..n-1, where n is the + * value returned by <code>countEquivalentIDs(id)</code>. For + * some value of 'index', the returned value will be equal to the + * given id. If the given id is not a valid system time zone, or + * if 'index' is out of range, then returns an empty string. + * @param id a system time zone ID + * @param index a value from 0 to n-1, where n is the value + * returned by <code>countEquivalentIDs(id)</code> + * @return the ID of the index-th zone in the equivalency group + * containing 'id', or an empty string if 'id' is not a valid + * system ID or 'index' is out of range + * @see #countEquivalentIDs + * @stable ICU 2.0 + */ + static const UnicodeString U_EXPORT2 getEquivalentID(const UnicodeString& id, + int32_t index); + + /** + * Creates an instance of TimeZone detected from the current host + * system configuration. Note that ICU4C does not change the default + * time zone unless TimeZone::adoptDefault(TimeZone*) or + * TimeZone::setDefault(const TimeZone&) is explicitly called by a + * user. This method does not update the current ICU's default, + * and may return a different TimeZone from the one returned by + * TimeZone::createDefault(). + * + * @return A new instance of TimeZone detected from the current host system + * configuration. + * @stable ICU 55 + */ + static TimeZone* U_EXPORT2 detectHostTimeZone(); + + /** + * Creates a new copy of the default TimeZone for this host. Unless the default time + * zone has already been set using adoptDefault() or setDefault(), the default is + * determined by querying the system using methods in TPlatformUtilities. If the + * system routines fail, or if they specify a TimeZone or TimeZone offset which is not + * recognized, the TimeZone indicated by the ID kLastResortID is instantiated + * and made the default. + * + * @return A default TimeZone. Clients are responsible for deleting the time zone + * object returned. + * @stable ICU 2.0 + */ + static TimeZone* U_EXPORT2 createDefault(void); + + /** + * Sets the default time zone (i.e., what's returned by createDefault()) to be the + * specified time zone. If NULL is specified for the time zone, the default time + * zone is set to the default host time zone. This call adopts the TimeZone object + * passed in; the client is no longer responsible for deleting it. + * + * <p>This function is not thread safe. It is an error for multiple threads + * to concurrently attempt to set the default time zone, or for any thread + * to attempt to reference the default zone while another thread is setting it. + * + * @param zone A pointer to the new TimeZone object to use as the default. + * @stable ICU 2.0 + */ + static void U_EXPORT2 adoptDefault(TimeZone* zone); + +#ifndef U_HIDE_SYSTEM_API + /** + * Same as adoptDefault(), except that the TimeZone object passed in is NOT adopted; + * the caller remains responsible for deleting it. + * + * <p>See the thread safety note under adoptDefault(). + * + * @param zone The given timezone. + * @system + * @stable ICU 2.0 + */ + static void U_EXPORT2 setDefault(const TimeZone& zone); +#endif /* U_HIDE_SYSTEM_API */ + + /** + * Returns the timezone data version currently used by ICU. + * @param status Output param to filled in with a success or an error. + * @return the version string, such as "2007f" + * @stable ICU 3.8 + */ + static const char* U_EXPORT2 getTZDataVersion(UErrorCode& status); + + /** + * Returns the canonical system timezone ID or the normalized + * custom time zone ID for the given time zone ID. + * @param id The input time zone ID to be canonicalized. + * @param canonicalID Receives the canonical system time zone ID + * or the custom time zone ID in normalized format. + * @param status Receives the status. When the given time zone ID + * is neither a known system time zone ID nor a + * valid custom time zone ID, U_ILLEGAL_ARGUMENT_ERROR + * is set. + * @return A reference to the result. + * @stable ICU 4.0 + */ + static UnicodeString& U_EXPORT2 getCanonicalID(const UnicodeString& id, + UnicodeString& canonicalID, UErrorCode& status); + + /** + * Returns the canonical system time zone ID or the normalized + * custom time zone ID for the given time zone ID. + * @param id The input time zone ID to be canonicalized. + * @param canonicalID Receives the canonical system time zone ID + * or the custom time zone ID in normalized format. + * @param isSystemID Receives if the given ID is a known system + * time zone ID. + * @param status Receives the status. When the given time zone ID + * is neither a known system time zone ID nor a + * valid custom time zone ID, U_ILLEGAL_ARGUMENT_ERROR + * is set. + * @return A reference to the result. + * @stable ICU 4.0 + */ + static UnicodeString& U_EXPORT2 getCanonicalID(const UnicodeString& id, + UnicodeString& canonicalID, UBool& isSystemID, UErrorCode& status); + + /** + * Converts a system time zone ID to an equivalent Windows time zone ID. For example, + * Windows time zone ID "Pacific Standard Time" is returned for input "America/Los_Angeles". + * + * <p>There are system time zones that cannot be mapped to Windows zones. When the input + * system time zone ID is unknown or unmappable to a Windows time zone, then the result will be + * empty, but the operation itself remains successful (no error status set on return). + * + * <p>This implementation utilizes <a href="http://unicode.org/cldr/charts/supplemental/zone_tzid.html"> + * Zone-Tzid mapping data</a>. The mapping data is updated time to time. To get the latest changes, + * please read the ICU user guide section <a href="http://userguide.icu-project.org/datetime/timezone#TOC-Updating-the-Time-Zone-Data"> + * Updating the Time Zone Data</a>. + * + * @param id A system time zone ID. + * @param winid Receives a Windows time zone ID. When the input system time zone ID is unknown + * or unmappable to a Windows time zone ID, then an empty string is set on return. + * @param status Receives the status. + * @return A reference to the result (<code>winid</code>). + * @see getIDForWindowsID + * + * @stable ICU 52 + */ + static UnicodeString& U_EXPORT2 getWindowsID(const UnicodeString& id, + UnicodeString& winid, UErrorCode& status); + + /** + * Converts a Windows time zone ID to an equivalent system time zone ID + * for a region. For example, system time zone ID "America/Los_Angeles" is returned + * for input Windows ID "Pacific Standard Time" and region "US" (or <code>null</code>), + * "America/Vancouver" is returned for the same Windows ID "Pacific Standard Time" and + * region "CA". + * + * <p>Not all Windows time zones can be mapped to system time zones. When the input + * Windows time zone ID is unknown or unmappable to a system time zone, then the result + * will be empty, but the operation itself remains successful (no error status set on return). + * + * <p>This implementation utilizes <a href="http://unicode.org/cldr/charts/supplemental/zone_tzid.html"> + * Zone-Tzid mapping data</a>. The mapping data is updated time to time. To get the latest changes, + * please read the ICU user guide section <a href="http://userguide.icu-project.org/datetime/timezone#TOC-Updating-the-Time-Zone-Data"> + * Updating the Time Zone Data</a>. + * + * @param winid A Windows time zone ID. + * @param region A null-terminated region code, or <code>NULL</code> if no regional preference. + * @param id Receives a system time zone ID. When the input Windows time zone ID is unknown + * or unmappable to a system time zone ID, then an empty string is set on return. + * @param status Receives the status. + * @return A reference to the result (<code>id</code>). + * @see getWindowsID + * + * @stable ICU 52 + */ + static UnicodeString& U_EXPORT2 getIDForWindowsID(const UnicodeString& winid, const char* region, + UnicodeString& id, UErrorCode& status); + + /** + * Returns true if the two TimeZones are equal. (The TimeZone version only compares + * IDs, but subclasses are expected to also compare the fields they add.) + * + * @param that The TimeZone object to be compared with. + * @return True if the given TimeZone is equal to this TimeZone; false + * otherwise. + * @stable ICU 2.0 + */ + virtual UBool operator==(const TimeZone& that) const; + + /** + * Returns true if the two TimeZones are NOT equal; that is, if operator==() returns + * false. + * + * @param that The TimeZone object to be compared with. + * @return True if the given TimeZone is not equal to this TimeZone; false + * otherwise. + * @stable ICU 2.0 + */ + UBool operator!=(const TimeZone& that) const {return !operator==(that);} + + /** + * Returns the TimeZone's adjusted GMT offset (i.e., the number of milliseconds to add + * to GMT to get local time in this time zone, taking daylight savings time into + * account) as of a particular reference date. The reference date is used to determine + * whether daylight savings time is in effect and needs to be figured into the offset + * that is returned (in other words, what is the adjusted GMT offset in this time zone + * at this particular date and time?). For the time zones produced by createTimeZone(), + * the reference data is specified according to the Gregorian calendar, and the date + * and time fields are local standard time. + * + * <p>Note: Don't call this method. Instead, call the getOffset(UDate...) overload, + * which returns both the raw and the DST offset for a given time. This method + * is retained only for backward compatibility. + * + * @param era The reference date's era + * @param year The reference date's year + * @param month The reference date's month (0-based; 0 is January) + * @param day The reference date's day-in-month (1-based) + * @param dayOfWeek The reference date's day-of-week (1-based; 1 is Sunday) + * @param millis The reference date's milliseconds in day, local standard time + * @param status Output param to filled in with a success or an error. + * @return The offset in milliseconds to add to GMT to get local time. + * @stable ICU 2.0 + */ + virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, + uint8_t dayOfWeek, int32_t millis, UErrorCode& status) const = 0; + + /** + * Gets the time zone offset, for current date, modified in case of + * daylight savings. This is the offset to add *to* UTC to get local time. + * + * <p>Note: Don't call this method. Instead, call the getOffset(UDate...) overload, + * which returns both the raw and the DST offset for a given time. This method + * is retained only for backward compatibility. + * + * @param era the era of the given date. + * @param year the year in the given date. + * @param month the month in the given date. + * Month is 0-based. e.g., 0 for January. + * @param day the day-in-month of the given date. + * @param dayOfWeek the day-of-week of the given date. + * @param milliseconds the millis in day in <em>standard</em> local time. + * @param monthLength the length of the given month in days. + * @param status Output param to filled in with a success or an error. + * @return the offset to add *to* GMT to get local time. + * @stable ICU 2.0 + */ + virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, + uint8_t dayOfWeek, int32_t milliseconds, + int32_t monthLength, UErrorCode& status) const = 0; + + /** + * Returns the time zone raw and GMT offset for the given moment + * in time. Upon return, local-millis = GMT-millis + rawOffset + + * dstOffset. All computations are performed in the proleptic + * Gregorian calendar. The default implementation in the TimeZone + * class delegates to the 8-argument getOffset(). + * + * @param date moment in time for which to return offsets, in + * units of milliseconds from January 1, 1970 0:00 GMT, either GMT + * time or local wall time, depending on `local'. + * @param local if true, `date' is local wall time; otherwise it + * is in GMT time. + * @param rawOffset output parameter to receive the raw offset, that + * is, the offset not including DST adjustments + * @param dstOffset output parameter to receive the DST offset, + * that is, the offset to be added to `rawOffset' to obtain the + * total offset between local and GMT time. If DST is not in + * effect, this value is zero; otherwise it is a positive value, + * typically one hour. + * @param ec input-output error code + * + * @stable ICU 2.8 + */ + virtual void getOffset(UDate date, UBool local, int32_t& rawOffset, + int32_t& dstOffset, UErrorCode& ec) const; + + /** + * Sets the TimeZone's raw GMT offset (i.e., the number of milliseconds to add + * to GMT to get local time, before taking daylight savings time into account). + * + * @param offsetMillis The new raw GMT offset for this time zone. + * @stable ICU 2.0 + */ + virtual void setRawOffset(int32_t offsetMillis) = 0; + + /** + * Returns the TimeZone's raw GMT offset (i.e., the number of milliseconds to add + * to GMT to get local time, before taking daylight savings time into account). + * + * @return The TimeZone's raw GMT offset. + * @stable ICU 2.0 + */ + virtual int32_t getRawOffset(void) const = 0; + + /** + * Fills in "ID" with the TimeZone's ID. + * + * @param ID Receives this TimeZone's ID. + * @return A reference to 'ID' + * @stable ICU 2.0 + */ + UnicodeString& getID(UnicodeString& ID) const; + + /** + * Sets the TimeZone's ID to the specified value. This doesn't affect any other + * fields (for example, if you say< + * blockquote><pre> + * . TimeZone* foo = TimeZone::createTimeZone("America/New_York"); + * . foo.setID("America/Los_Angeles"); + * </pre>\htmlonly</blockquote>\endhtmlonly + * the time zone's GMT offset and daylight-savings rules don't change to those for + * Los Angeles. They're still those for New York. Only the ID has changed.) + * + * @param ID The new time zone ID. + * @stable ICU 2.0 + */ + void setID(const UnicodeString& ID); + + /** + * Enum for use with getDisplayName + * @stable ICU 2.4 + */ + enum EDisplayType { + /** + * Selector for short display name + * @stable ICU 2.4 + */ + SHORT = 1, + /** + * Selector for long display name + * @stable ICU 2.4 + */ + LONG, + /** + * Selector for short generic display name + * @stable ICU 4.4 + */ + SHORT_GENERIC, + /** + * Selector for long generic display name + * @stable ICU 4.4 + */ + LONG_GENERIC, + /** + * Selector for short display name derived + * from time zone offset + * @stable ICU 4.4 + */ + SHORT_GMT, + /** + * Selector for long display name derived + * from time zone offset + * @stable ICU 4.4 + */ + LONG_GMT, + /** + * Selector for short display name derived + * from the time zone's fallback name + * @stable ICU 4.4 + */ + SHORT_COMMONLY_USED, + /** + * Selector for long display name derived + * from the time zone's fallback name + * @stable ICU 4.4 + */ + GENERIC_LOCATION + }; + + /** + * Returns a name of this time zone suitable for presentation to the user + * in the default locale. + * This method returns the long name, not including daylight savings. + * If the display name is not available for the locale, + * then this method returns a string in the localized GMT offset format + * such as <code>GMT[+-]HH:mm</code>. + * @param result the human-readable name of this time zone in the default locale. + * @return A reference to 'result'. + * @stable ICU 2.0 + */ + UnicodeString& getDisplayName(UnicodeString& result) const; + + /** + * Returns a name of this time zone suitable for presentation to the user + * in the specified locale. + * This method returns the long name, not including daylight savings. + * If the display name is not available for the locale, + * then this method returns a string in the localized GMT offset format + * such as <code>GMT[+-]HH:mm</code>. + * @param locale the locale in which to supply the display name. + * @param result the human-readable name of this time zone in the given locale + * or in the default locale if the given locale is not recognized. + * @return A reference to 'result'. + * @stable ICU 2.0 + */ + UnicodeString& getDisplayName(const Locale& locale, UnicodeString& result) const; + + /** + * Returns a name of this time zone suitable for presentation to the user + * in the default locale. + * If the display name is not available for the locale, + * then this method returns a string in the localized GMT offset format + * such as <code>GMT[+-]HH:mm</code>. + * @param daylight if true, return the daylight savings name. + * @param style + * @param result the human-readable name of this time zone in the default locale. + * @return A reference to 'result'. + * @stable ICU 2.0 + */ + UnicodeString& getDisplayName(UBool daylight, EDisplayType style, UnicodeString& result) const; + + /** + * Returns a name of this time zone suitable for presentation to the user + * in the specified locale. + * If the display name is not available for the locale, + * then this method returns a string in the localized GMT offset format + * such as <code>GMT[+-]HH:mm</code>. + * @param daylight if true, return the daylight savings name. + * @param style + * @param locale the locale in which to supply the display name. + * @param result the human-readable name of this time zone in the given locale + * or in the default locale if the given locale is not recognized. + * @return A refence to 'result'. + * @stable ICU 2.0 + */ + UnicodeString& getDisplayName(UBool daylight, EDisplayType style, const Locale& locale, UnicodeString& result) const; + + /** + * Queries if this time zone uses daylight savings time. + * @return true if this time zone uses daylight savings time, + * false, otherwise. + * <p><strong>Note:</strong>The default implementation of + * ICU TimeZone uses the tz database, which supports historic + * rule changes, for system time zones. With the implementation, + * there are time zones that used daylight savings time in the + * past, but no longer used currently. For example, Asia/Tokyo has + * never used daylight savings time since 1951. Most clients would + * expect that this method to return <code>FALSE</code> for such case. + * The default implementation of this method returns <code>TRUE</code> + * when the time zone uses daylight savings time in the current + * (Gregorian) calendar year. + * <p>In Java 7, <code>observesDaylightTime()</code> was added in + * addition to <code>useDaylightTime()</code>. In Java, <code>useDaylightTime()</code> + * only checks if daylight saving time is observed by the last known + * rule. This specification might not be what most users would expect + * if daylight saving time is currently observed, but not scheduled + * in future. In this case, Java's <code>userDaylightTime()</code> returns + * <code>false</code>. To resolve the issue, Java 7 added <code>observesDaylightTime()</code>, + * which takes the current rule into account. The method <code>observesDaylightTime()</code> + * was added in ICU4J for supporting API signature compatibility with JDK. + * In general, ICU4C also provides JDK compatible methods, but the current + * implementation <code>userDaylightTime()</code> serves the purpose + * (takes the current rule into account), <code>observesDaylightTime()</code> + * is not added in ICU4C. In addition to <code>useDaylightTime()</code>, ICU4C + * <code>BasicTimeZone</code> class (Note that <code>TimeZone::createTimeZone(const UnicodeString &ID)</code> + * always returns a <code>BasicTimeZone</code>) provides a series of methods allowing + * historic and future time zone rule iteration, so you can check if daylight saving + * time is observed or not within a given period. + * + * @stable ICU 2.0 + */ + virtual UBool useDaylightTime(void) const = 0; + + /** + * Queries if the given date is in daylight savings time in + * this time zone. + * This method is wasteful since it creates a new GregorianCalendar and + * deletes it each time it is called. This is a deprecated method + * and provided only for Java compatibility. + * + * @param date the given UDate. + * @param status Output param filled in with success/error code. + * @return true if the given date is in daylight savings time, + * false, otherwise. + * @deprecated ICU 2.4. Use Calendar::inDaylightTime() instead. + */ + virtual UBool inDaylightTime(UDate date, UErrorCode& status) const = 0; + + /** + * Returns true if this zone has the same rule and offset as another zone. + * That is, if this zone differs only in ID, if at all. + * @param other the <code>TimeZone</code> object to be compared with + * @return true if the given zone is the same as this one, + * with the possible exception of the ID + * @stable ICU 2.0 + */ + virtual UBool hasSameRules(const TimeZone& other) const; + + /** + * Clones TimeZone objects polymorphically. Clients are responsible for deleting + * the TimeZone object cloned. + * + * @return A new copy of this TimeZone object. + * @stable ICU 2.0 + */ + virtual TimeZone* clone(void) const = 0; + + /** + * Return the class ID for this class. This is useful only for + * comparing to a return value from getDynamicClassID(). + * @return The class ID for all objects of this class. + * @stable ICU 2.0 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID POLYMORPHICALLY. This method is to + * implement a simple version of RTTI, since not all C++ compilers support genuine + * RTTI. Polymorphic operator==() and clone() methods call this method. + * <P> + * Concrete subclasses of TimeZone must use the UOBJECT_DEFINE_RTTI_IMPLEMENTATION + * macro from uobject.h in their implementation to provide correct RTTI information. + * @return The class ID for this object. All objects of a given class have the + * same class ID. Objects of other classes have different class IDs. + * @stable ICU 2.0 + */ + virtual UClassID getDynamicClassID(void) const = 0; + + /** + * Returns the amount of time to be added to local standard time + * to get local wall clock time. + * <p> + * The default implementation always returns 3600000 milliseconds + * (i.e., one hour) if this time zone observes Daylight Saving + * Time. Otherwise, 0 (zero) is returned. + * <p> + * If an underlying TimeZone implementation subclass supports + * historical Daylight Saving Time changes, this method returns + * the known latest daylight saving value. + * + * @return the amount of saving time in milliseconds + * @stable ICU 3.6 + */ + virtual int32_t getDSTSavings() const; + + /** + * Gets the region code associated with the given + * system time zone ID. The region code is either ISO 3166 + * 2-letter country code or UN M.49 3-digit area code. + * When the time zone is not associated with a specific location, + * for example - "Etc/UTC", "EST5EDT", then this method returns + * "001" (UN M.49 area code for World). + * + * @param id The system time zone ID. + * @param region Output buffer for receiving the region code. + * @param capacity The size of the output buffer. + * @param status Receives the status. When the given time zone ID + * is not a known system time zone ID, + * U_ILLEGAL_ARGUMENT_ERROR is set. + * @return The length of the output region code. + * @stable ICU 4.8 + */ + static int32_t U_EXPORT2 getRegion(const UnicodeString& id, + char *region, int32_t capacity, UErrorCode& status); + +protected: + + /** + * Default constructor. ID is initialized to the empty string. + * @stable ICU 2.0 + */ + TimeZone(); + + /** + * Construct a TimeZone with a given ID. + * @param id a system time zone ID + * @stable ICU 2.0 + */ + TimeZone(const UnicodeString &id); + + /** + * Copy constructor. + * @param source the object to be copied. + * @stable ICU 2.0 + */ + TimeZone(const TimeZone& source); + + /** + * Default assignment operator. + * @param right the object to be copied. + * @stable ICU 2.0 + */ + TimeZone& operator=(const TimeZone& right); + +#ifndef U_HIDE_INTERNAL_API + /** + * Utility function. For internally loading rule data. + * @param top Top resource bundle for tz data + * @param ruleid ID of rule to load + * @param oldbundle Old bundle to reuse or NULL + * @param status Status parameter + * @return either a new bundle or *oldbundle + * @internal + */ + static UResourceBundle* loadRule(const UResourceBundle* top, const UnicodeString& ruleid, UResourceBundle* oldbundle, UErrorCode&status); +#endif /* U_HIDE_INTERNAL_API */ + +private: + friend class ZoneMeta; + + + static TimeZone* createCustomTimeZone(const UnicodeString&); // Creates a time zone based on the string. + + /** + * Finds the given ID in the Olson tzdata. If the given ID is found in the tzdata, + * returns the pointer to the ID resource. This method is exposed through ZoneMeta class + * for ICU internal implementation and useful for building hashtable using a time zone + * ID as a key. + * @param id zone id string + * @return the pointer of the ID resource, or NULL. + */ + static const char16_t* findID(const UnicodeString& id); + + /** + * Resolve a link in Olson tzdata. When the given id is known and it's not a link, + * the id itself is returned. When the given id is known and it is a link, then + * dereferenced zone id is returned. When the given id is unknown, then it returns + * NULL. + * @param id zone id string + * @return the dereferenced zone or NULL + */ + static const char16_t* dereferOlsonLink(const UnicodeString& id); + + /** + * Returns the region code associated with the given zone, + * or NULL if the zone is not known. + * @param id zone id string + * @return the region associated with the given zone + */ + static const char16_t* getRegion(const UnicodeString& id); + + public: +#ifndef U_HIDE_INTERNAL_API + /** + * Returns the region code associated with the given zone, + * or NULL if the zone is not known. + * @param id zone id string + * @param status Status parameter + * @return the region associated with the given zone + * @internal + */ + static const char16_t* getRegion(const UnicodeString& id, UErrorCode& status); +#endif /* U_HIDE_INTERNAL_API */ + + private: + /** + * Parses the given custom time zone identifier + * @param id id A string of the form GMT[+-]hh:mm, GMT[+-]hhmm, or + * GMT[+-]hh. + * @param sign Receves parsed sign, 1 for positive, -1 for negative. + * @param hour Receives parsed hour field + * @param minute Receives parsed minute field + * @param second Receives parsed second field + * @return Returns TRUE when the given custom id is valid. + */ + static UBool parseCustomID(const UnicodeString& id, int32_t& sign, int32_t& hour, + int32_t& minute, int32_t& second); + + /** + * Parse a custom time zone identifier and return the normalized + * custom time zone identifier for the given custom id string. + * @param id a string of the form GMT[+-]hh:mm, GMT[+-]hhmm, or + * GMT[+-]hh. + * @param normalized Receives the normalized custom ID + * @param status Receives the status. When the input ID string is invalid, + * U_ILLEGAL_ARGUMENT_ERROR is set. + * @return The normalized custom id string. + */ + static UnicodeString& getCustomID(const UnicodeString& id, UnicodeString& normalized, + UErrorCode& status); + + /** + * Returns the normalized custome time zone ID for the given offset fields. + * @param hour offset hours + * @param min offset minutes + * @param sec offset seconds + * @param negative sign of the offset, TRUE for negative offset. + * @param id Receves the format result (normalized custom ID) + * @return The reference to id + */ + static UnicodeString& formatCustomID(int32_t hour, int32_t min, int32_t sec, + UBool negative, UnicodeString& id); + + UnicodeString fID; // this time zone's ID + + friend class TZEnumeration; +}; + + +// ------------------------------------- + +inline UnicodeString& +TimeZone::getID(UnicodeString& ID) const +{ + ID = fID; + return ID; +} + +// ------------------------------------- + +inline void +TimeZone::setID(const UnicodeString& ID) +{ + fID = ID; +} +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif //_TIMEZONE +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tmunit.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tmunit.h new file mode 100755 index 00000000..fa59f104 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tmunit.h @@ -0,0 +1,137 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ******************************************************************************* + * Copyright (C) 2009-2016, International Business Machines Corporation, * + * Google, and others. All Rights Reserved. * + ******************************************************************************* + */ + +#ifndef __TMUNIT_H__ +#define __TMUNIT_H__ + + +/** + * \file + * \brief C++ API: time unit object + */ + + +#include "unicode/measunit.h" + +#if !UCONFIG_NO_FORMATTING + +U_NAMESPACE_BEGIN + +/** + * Measurement unit for time units. + * @see TimeUnitAmount + * @see TimeUnit + * @stable ICU 4.2 + */ +class U_I18N_API TimeUnit: public MeasureUnit { +public: + /** + * Constants for all the time units we supported. + * @stable ICU 4.2 + */ + enum UTimeUnitFields { + UTIMEUNIT_YEAR, + UTIMEUNIT_MONTH, + UTIMEUNIT_DAY, + UTIMEUNIT_WEEK, + UTIMEUNIT_HOUR, + UTIMEUNIT_MINUTE, + UTIMEUNIT_SECOND, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UTimeUnitFields value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UTIMEUNIT_FIELD_COUNT +#endif // U_HIDE_DEPRECATED_API + }; + + /** + * Create Instance. + * @param timeUnitField time unit field based on which the instance + * is created. + * @param status input-output error code. + * If the timeUnitField is invalid, + * then this will be set to U_ILLEGAL_ARGUMENT_ERROR. + * @return a TimeUnit instance + * @stable ICU 4.2 + */ + static TimeUnit* U_EXPORT2 createInstance(UTimeUnitFields timeUnitField, + UErrorCode& status); + + + /** + * Override clone. + * @stable ICU 4.2 + */ + virtual UObject* clone() const; + + /** + * Copy operator. + * @stable ICU 4.2 + */ + TimeUnit(const TimeUnit& other); + + /** + * Assignment operator. + * @stable ICU 4.2 + */ + TimeUnit& operator=(const TimeUnit& other); + + /** + * Returns a unique class ID for this object POLYMORPHICALLY. + * This method implements a simple form of RTTI used by ICU. + * @return The class ID for this object. All objects of a given + * class have the same class ID. Objects of other classes have + * different class IDs. + * @stable ICU 4.2 + */ + virtual UClassID getDynamicClassID() const; + + /** + * Returns the class ID for this class. This is used to compare to + * the return value of getDynamicClassID(). + * @return The class ID for all objects of this class. + * @stable ICU 4.2 + */ + static UClassID U_EXPORT2 getStaticClassID(); + + + /** + * Get time unit field. + * @return time unit field. + * @stable ICU 4.2 + */ + UTimeUnitFields getTimeUnitField() const; + + /** + * Destructor. + * @stable ICU 4.2 + */ + virtual ~TimeUnit(); + +private: + UTimeUnitFields fTimeUnitField; + + /** + * Constructor + * @internal (private) + */ + TimeUnit(UTimeUnitFields timeUnitField); + +}; + + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // __TMUNIT_H__ +//eof +// diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tmutamt.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tmutamt.h new file mode 100755 index 00000000..274bfa6f --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tmutamt.h @@ -0,0 +1,170 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ******************************************************************************* + * Copyright (C) 2009-2010, Google, International Business Machines Corporation and * + * others. All Rights Reserved. * + ******************************************************************************* + */ + +#ifndef __TMUTAMT_H__ +#define __TMUTAMT_H__ + + +/** + * \file + * \brief C++ API: time unit amount object. + */ + +#include "unicode/measure.h" +#include "unicode/tmunit.h" + +#if !UCONFIG_NO_FORMATTING + +U_NAMESPACE_BEGIN + + +/** + * Express a duration as a time unit and number. Patterned after Currency. + * @see TimeUnitAmount + * @see TimeUnitFormat + * @stable ICU 4.2 + */ +class U_I18N_API TimeUnitAmount: public Measure { +public: + /** + * Construct TimeUnitAmount object with the given number and the + * given time unit. + * @param number a numeric object; number.isNumeric() must be TRUE + * @param timeUnitField the time unit field of a time unit + * @param status the input-output error code. + * If the number is not numeric or the timeUnitField + * is not valid, + * then this will be set to a failing value: + * U_ILLEGAL_ARGUMENT_ERROR. + * @stable ICU 4.2 + */ + TimeUnitAmount(const Formattable& number, + TimeUnit::UTimeUnitFields timeUnitField, + UErrorCode& status); + + /** + * Construct TimeUnitAmount object with the given numeric amount and the + * given time unit. + * @param amount a numeric amount. + * @param timeUnitField the time unit field on which a time unit amount + * object will be created. + * @param status the input-output error code. + * If the timeUnitField is not valid, + * then this will be set to a failing value: + * U_ILLEGAL_ARGUMENT_ERROR. + * @stable ICU 4.2 + */ + TimeUnitAmount(double amount, TimeUnit::UTimeUnitFields timeUnitField, + UErrorCode& status); + + + /** + * Copy constructor + * @stable ICU 4.2 + */ + TimeUnitAmount(const TimeUnitAmount& other); + + + /** + * Assignment operator + * @stable ICU 4.2 + */ + TimeUnitAmount& operator=(const TimeUnitAmount& other); + + + /** + * Clone. + * @return a polymorphic clone of this object. The result will have the same class as returned by getDynamicClassID(). + * @stable ICU 4.2 + */ + virtual UObject* clone() const; + + + /** + * Destructor + * @stable ICU 4.2 + */ + virtual ~TimeUnitAmount(); + + + /** + * Equality operator. + * @param other the object to compare to. + * @return true if this object is equal to the given object. + * @stable ICU 4.2 + */ + virtual UBool operator==(const UObject& other) const; + + + /** + * Not-equality operator. + * @param other the object to compare to. + * @return true if this object is not equal to the given object. + * @stable ICU 4.2 + */ + UBool operator!=(const UObject& other) const; + + + /** + * Return the class ID for this class. This is useful only for comparing to + * a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . erived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 4.2 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This + * method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() + * methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 4.2 + */ + virtual UClassID getDynamicClassID(void) const; + + + /** + * Get the time unit. + * @return time unit object. + * @stable ICU 4.2 + */ + const TimeUnit& getTimeUnit() const; + + /** + * Get the time unit field value. + * @return time unit field value. + * @stable ICU 4.2 + */ + TimeUnit::UTimeUnitFields getTimeUnitField() const; +}; + + + +inline UBool +TimeUnitAmount::operator!=(const UObject& other) const { + return !operator==(other); +} + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // __TMUTAMT_H__ +//eof +// diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tmutfmt.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tmutfmt.h new file mode 100755 index 00000000..8f245859 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tmutfmt.h @@ -0,0 +1,248 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ******************************************************************************* + * Copyright (C) 2008-2014, Google, International Business Machines Corporation + * and others. All Rights Reserved. + ******************************************************************************* + */ + +#ifndef __TMUTFMT_H__ +#define __TMUTFMT_H__ + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Format and parse duration in single time unit + */ + + +#if !UCONFIG_NO_FORMATTING +#ifndef U_HIDE_DEPRECATED_API + +#include "unicode/unistr.h" +#include "unicode/tmunit.h" +#include "unicode/tmutamt.h" +#include "unicode/measfmt.h" +#include "unicode/numfmt.h" +#include "unicode/plurrule.h" + + +/** + * Constants for various styles. + * There are 2 styles: full name and abbreviated name. + * For example, for English, the full name for hour duration is "3 hours", + * and the abbreviated name is "3 hrs". + * @deprecated ICU 53 Use MeasureFormat and UMeasureFormatWidth instead. + */ +enum UTimeUnitFormatStyle { + /** @deprecated ICU 53 */ + UTMUTFMT_FULL_STYLE, + /** @deprecated ICU 53 */ + UTMUTFMT_ABBREVIATED_STYLE, + /** @deprecated ICU 53 */ + UTMUTFMT_FORMAT_STYLE_COUNT +}; +typedef enum UTimeUnitFormatStyle UTimeUnitFormatStyle; /**< @deprecated ICU 53 */ + + +U_NAMESPACE_BEGIN + +class Hashtable; +class UVector; + +struct TimeUnitFormatReadSink; + +/** + * Format or parse a TimeUnitAmount, using plural rules for the units where available. + * + * <P> + * Code Sample: + * <pre> + * // create time unit amount instance - a combination of Number and time unit + * UErrorCode status = U_ZERO_ERROR; + * TimeUnitAmount* source = new TimeUnitAmount(2, TimeUnit::UTIMEUNIT_YEAR, status); + * // create time unit format instance + * TimeUnitFormat* format = new TimeUnitFormat(Locale("en"), status); + * // format a time unit amount + * UnicodeString formatted; + * Formattable formattable; + * if (U_SUCCESS(status)) { + * formattable.adoptObject(source); + * formatted = ((Format*)format)->format(formattable, formatted, status); + * Formattable result; + * ((Format*)format)->parseObject(formatted, result, status); + * if (U_SUCCESS(status)) { + * assert (result == formattable); + * } + * } + * </pre> + * + * <P> + * @see TimeUnitAmount + * @see TimeUnitFormat + * @deprecated ICU 53 Use the MeasureFormat class instead. + */ +class U_I18N_API TimeUnitFormat: public MeasureFormat { +public: + + /** + * Create TimeUnitFormat with default locale, and full name style. + * Use setLocale and/or setFormat to modify. + * @deprecated ICU 53 + */ + TimeUnitFormat(UErrorCode& status); + + /** + * Create TimeUnitFormat given locale, and full name style. + * @deprecated ICU 53 + */ + TimeUnitFormat(const Locale& locale, UErrorCode& status); + + /** + * Create TimeUnitFormat given locale and style. + * @deprecated ICU 53 + */ + TimeUnitFormat(const Locale& locale, UTimeUnitFormatStyle style, UErrorCode& status); + + /** + * Copy constructor. + * @deprecated ICU 53 + */ + TimeUnitFormat(const TimeUnitFormat&); + + /** + * deconstructor + * @deprecated ICU 53 + */ + virtual ~TimeUnitFormat(); + + /** + * Clone this Format object polymorphically. The caller owns the result and + * should delete it when done. + * @return A copy of the object. + * @deprecated ICU 53 + */ + virtual Format* clone(void) const; + + /** + * Assignment operator + * @deprecated ICU 53 + */ + TimeUnitFormat& operator=(const TimeUnitFormat& other); + + /** + * Return true if the given Format objects are not semantically equal. + * Objects of different subclasses are considered unequal. + * @param other the object to be compared with. + * @return true if the given Format objects are not semantically equal. + * @deprecated ICU 53 + */ + UBool operator!=(const Format& other) const; + + /** + * Set the locale used for formatting or parsing. + * @param locale the locale to be set + * @param status output param set to success/failure code on exit + * @deprecated ICU 53 + */ + void setLocale(const Locale& locale, UErrorCode& status); + + + /** + * Set the number format used for formatting or parsing. + * @param format the number formatter to be set + * @param status output param set to success/failure code on exit + * @deprecated ICU 53 + */ + void setNumberFormat(const NumberFormat& format, UErrorCode& status); + + /** + * Parse a TimeUnitAmount. + * @see Format#parseObject(const UnicodeString&, Formattable&, ParsePosition&) const; + * @deprecated ICU 53 + */ + virtual void parseObject(const UnicodeString& source, + Formattable& result, + ParsePosition& pos) const; + + /** + * Return the class ID for this class. This is useful only for comparing to + * a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . erived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @deprecated ICU 53 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This + * method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() + * methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @deprecated ICU 53 + */ + virtual UClassID getDynamicClassID(void) const; + +private: + Hashtable* fTimeUnitToCountToPatterns[TimeUnit::UTIMEUNIT_FIELD_COUNT]; + UTimeUnitFormatStyle fStyle; + + void create(UTimeUnitFormatStyle style, UErrorCode& status); + + // it might actually be simpler to make them Decimal Formats later. + // initialize all private data members + void setup(UErrorCode& status); + + // initialize data member without fill in data for fTimeUnitToCountToPattern + void initDataMembers(UErrorCode& status); + + // initialize fTimeUnitToCountToPatterns from current locale's resource. + void readFromCurrentLocale(UTimeUnitFormatStyle style, const char* key, const UVector& pluralCounts, + UErrorCode& status); + + // check completeness of fTimeUnitToCountToPatterns against all time units, + // and all plural rules, fill in fallback as necessary. + void checkConsistency(UTimeUnitFormatStyle style, const char* key, UErrorCode& status); + + // fill in fTimeUnitToCountToPatterns from locale fall-back chain + void searchInLocaleChain(UTimeUnitFormatStyle style, const char* key, const char* localeName, + TimeUnit::UTimeUnitFields field, const UnicodeString&, + const char*, Hashtable*, UErrorCode&); + + // initialize hash table + Hashtable* initHash(UErrorCode& status); + + // delete hash table + void deleteHash(Hashtable* htable); + + // copy hash table + void copyHash(const Hashtable* source, Hashtable* target, UErrorCode& status); + // get time unit name, such as "year", from time unit field enum, such as + // UTIMEUNIT_YEAR. + static const char* getTimeUnitName(TimeUnit::UTimeUnitFields field, UErrorCode& status); + + friend struct TimeUnitFormatReadSink; +}; + +inline UBool +TimeUnitFormat::operator!=(const Format& other) const { + return !operator==(other); +} + +U_NAMESPACE_END + +#endif /* U_HIDE_DEPRECATED_API */ +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // __TMUTFMT_H__ +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/translit.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/translit.h new file mode 100755 index 00000000..bccba548 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/translit.h @@ -0,0 +1,1344 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 1999-2014, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* Date Name Description +* 11/17/99 aliu Creation. +********************************************************************** +*/ +#ifndef TRANSLIT_H +#define TRANSLIT_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Tranforms text from one format to another. + */ + +#if !UCONFIG_NO_TRANSLITERATION + +#include "unicode/uobject.h" +#include "unicode/unistr.h" +#include "unicode/parseerr.h" +#include "unicode/utrans.h" // UTransPosition, UTransDirection +#include "unicode/strenum.h" + +U_NAMESPACE_BEGIN + +class UnicodeFilter; +class UnicodeSet; +class CompoundTransliterator; +class TransliteratorParser; +class NormalizationTransliterator; +class TransliteratorIDParser; + +/** + * + * <code>Transliterator</code> is an abstract class that + * transliterates text from one format to another. The most common + * kind of transliterator is a script, or alphabet, transliterator. + * For example, a Russian to Latin transliterator changes Russian text + * written in Cyrillic characters to phonetically equivalent Latin + * characters. It does not <em>translate</em> Russian to English! + * Transliteration, unlike translation, operates on characters, without + * reference to the meanings of words and sentences. + * + * <p>Although script conversion is its most common use, a + * transliterator can actually perform a more general class of tasks. + * In fact, <code>Transliterator</code> defines a very general API + * which specifies only that a segment of the input text is replaced + * by new text. The particulars of this conversion are determined + * entirely by subclasses of <code>Transliterator</code>. + * + * <p><b>Transliterators are stateless</b> + * + * <p><code>Transliterator</code> objects are <em>stateless</em>; they + * retain no information between calls to + * <code>transliterate()</code>. (However, this does <em>not</em> + * mean that threads may share transliterators without synchronizing + * them. Transliterators are not immutable, so they must be + * synchronized when shared between threads.) This might seem to + * limit the complexity of the transliteration operation. In + * practice, subclasses perform complex transliterations by delaying + * the replacement of text until it is known that no other + * replacements are possible. In other words, although the + * <code>Transliterator</code> objects are stateless, the source text + * itself embodies all the needed information, and delayed operation + * allows arbitrary complexity. + * + * <p><b>Batch transliteration</b> + * + * <p>The simplest way to perform transliteration is all at once, on a + * string of existing text. This is referred to as <em>batch</em> + * transliteration. For example, given a string <code>input</code> + * and a transliterator <code>t</code>, the call + * + * \htmlonly<blockquote>\endhtmlonly<code>String result = t.transliterate(input); + * </code>\htmlonly</blockquote>\endhtmlonly + * + * will transliterate it and return the result. Other methods allow + * the client to specify a substring to be transliterated and to use + * {@link Replaceable } objects instead of strings, in order to + * preserve out-of-band information (such as text styles). + * + * <p><b>Keyboard transliteration</b> + * + * <p>Somewhat more involved is <em>keyboard</em>, or incremental + * transliteration. This is the transliteration of text that is + * arriving from some source (typically the user's keyboard) one + * character at a time, or in some other piecemeal fashion. + * + * <p>In keyboard transliteration, a <code>Replaceable</code> buffer + * stores the text. As text is inserted, as much as possible is + * transliterated on the fly. This means a GUI that displays the + * contents of the buffer may show text being modified as each new + * character arrives. + * + * <p>Consider the simple <code>RuleBasedTransliterator</code>: + * + * \htmlonly<blockquote>\endhtmlonly<code> + * th>{theta}<br> + * t>{tau} + * </code>\htmlonly</blockquote>\endhtmlonly + * + * When the user types 't', nothing will happen, since the + * transliterator is waiting to see if the next character is 'h'. To + * remedy this, we introduce the notion of a cursor, marked by a '|' + * in the output string: + * + * \htmlonly<blockquote>\endhtmlonly<code> + * t>|{tau}<br> + * {tau}h>{theta} + * </code>\htmlonly</blockquote>\endhtmlonly + * + * Now when the user types 't', tau appears, and if the next character + * is 'h', the tau changes to a theta. This is accomplished by + * maintaining a cursor position (independent of the insertion point, + * and invisible in the GUI) across calls to + * <code>transliterate()</code>. Typically, the cursor will + * be coincident with the insertion point, but in a case like the one + * above, it will precede the insertion point. + * + * <p>Keyboard transliteration methods maintain a set of three indices + * that are updated with each call to + * <code>transliterate()</code>, including the cursor, start, + * and limit. Since these indices are changed by the method, they are + * passed in an <code>int[]</code> array. The <code>START</code> index + * marks the beginning of the substring that the transliterator will + * look at. It is advanced as text becomes committed (but it is not + * the committed index; that's the <code>CURSOR</code>). The + * <code>CURSOR</code> index, described above, marks the point at + * which the transliterator last stopped, either because it reached + * the end, or because it required more characters to disambiguate + * between possible inputs. The <code>CURSOR</code> can also be + * explicitly set by rules in a <code>RuleBasedTransliterator</code>. + * Any characters before the <code>CURSOR</code> index are frozen; + * future keyboard transliteration calls within this input sequence + * will not change them. New text is inserted at the + * <code>LIMIT</code> index, which marks the end of the substring that + * the transliterator looks at. + * + * <p>Because keyboard transliteration assumes that more characters + * are to arrive, it is conservative in its operation. It only + * transliterates when it can do so unambiguously. Otherwise it waits + * for more characters to arrive. When the client code knows that no + * more characters are forthcoming, perhaps because the user has + * performed some input termination operation, then it should call + * <code>finishTransliteration()</code> to complete any + * pending transliterations. + * + * <p><b>Inverses</b> + * + * <p>Pairs of transliterators may be inverses of one another. For + * example, if transliterator <b>A</b> transliterates characters by + * incrementing their Unicode value (so "abc" -> "def"), and + * transliterator <b>B</b> decrements character values, then <b>A</b> + * is an inverse of <b>B</b> and vice versa. If we compose <b>A</b> + * with <b>B</b> in a compound transliterator, the result is the + * indentity transliterator, that is, a transliterator that does not + * change its input text. + * + * The <code>Transliterator</code> method <code>getInverse()</code> + * returns a transliterator's inverse, if one exists, or + * <code>null</code> otherwise. However, the result of + * <code>getInverse()</code> usually will <em>not</em> be a true + * mathematical inverse. This is because true inverse transliterators + * are difficult to formulate. For example, consider two + * transliterators: <b>AB</b>, which transliterates the character 'A' + * to 'B', and <b>BA</b>, which transliterates 'B' to 'A'. It might + * seem that these are exact inverses, since + * + * \htmlonly<blockquote>\endhtmlonly"A" x <b>AB</b> -> "B"<br> + * "B" x <b>BA</b> -> "A"\htmlonly</blockquote>\endhtmlonly + * + * where 'x' represents transliteration. However, + * + * \htmlonly<blockquote>\endhtmlonly"ABCD" x <b>AB</b> -> "BBCD"<br> + * "BBCD" x <b>BA</b> -> "AACD"\htmlonly</blockquote>\endhtmlonly + * + * so <b>AB</b> composed with <b>BA</b> is not the + * identity. Nonetheless, <b>BA</b> may be usefully considered to be + * <b>AB</b>'s inverse, and it is on this basis that + * <b>AB</b><code>.getInverse()</code> could legitimately return + * <b>BA</b>. + * + * <p><b>IDs and display names</b> + * + * <p>A transliterator is designated by a short identifier string or + * <em>ID</em>. IDs follow the format <em>source-destination</em>, + * where <em>source</em> describes the entity being replaced, and + * <em>destination</em> describes the entity replacing + * <em>source</em>. The entities may be the names of scripts, + * particular sequences of characters, or whatever else it is that the + * transliterator converts to or from. For example, a transliterator + * from Russian to Latin might be named "Russian-Latin". A + * transliterator from keyboard escape sequences to Latin-1 characters + * might be named "KeyboardEscape-Latin1". By convention, system + * entity names are in English, with the initial letters of words + * capitalized; user entity names may follow any format so long as + * they do not contain dashes. + * + * <p>In addition to programmatic IDs, transliterator objects have + * display names for presentation in user interfaces, returned by + * {@link #getDisplayName }. + * + * <p><b>Factory methods and registration</b> + * + * <p>In general, client code should use the factory method + * {@link #createInstance } to obtain an instance of a + * transliterator given its ID. Valid IDs may be enumerated using + * <code>getAvailableIDs()</code>. Since transliterators are mutable, + * multiple calls to {@link #createInstance } with the same ID will + * return distinct objects. + * + * <p>In addition to the system transliterators registered at startup, + * user transliterators may be registered by calling + * <code>registerInstance()</code> at run time. A registered instance + * acts a template; future calls to {@link #createInstance } with the ID + * of the registered object return clones of that object. Thus any + * object passed to <tt>registerInstance()</tt> must implement + * <tt>clone()</tt> propertly. To register a transliterator subclass + * without instantiating it (until it is needed), users may call + * {@link #registerFactory }. In this case, the objects are + * instantiated by invoking the zero-argument public constructor of + * the class. + * + * <p><b>Subclassing</b> + * + * Subclasses must implement the abstract method + * <code>handleTransliterate()</code>. <p>Subclasses should override + * the <code>transliterate()</code> method taking a + * <code>Replaceable</code> and the <code>transliterate()</code> + * method taking a <code>String</code> and <code>StringBuffer</code> + * if the performance of these methods can be improved over the + * performance obtained by the default implementations in this class. + * + * @author Alan Liu + * @stable ICU 2.0 + */ +class U_I18N_API Transliterator : public UObject { + +private: + + /** + * Programmatic name, e.g., "Latin-Arabic". + */ + UnicodeString ID; + + /** + * This transliterator's filter. Any character for which + * <tt>filter.contains()</tt> returns <tt>false</tt> will not be + * altered by this transliterator. If <tt>filter</tt> is + * <tt>null</tt> then no filtering is applied. + */ + UnicodeFilter* filter; + + int32_t maximumContextLength; + + public: + + /** + * A context integer or pointer for a factory function, passed by + * value. + * @stable ICU 2.4 + */ + union Token { + /** + * This token, interpreted as a 32-bit integer. + * @stable ICU 2.4 + */ + int32_t integer; + /** + * This token, interpreted as a native pointer. + * @stable ICU 2.4 + */ + void* pointer; + }; + +#ifndef U_HIDE_INTERNAL_API + /** + * Return a token containing an integer. + * @return a token containing an integer. + * @internal + */ + inline static Token integerToken(int32_t); + + /** + * Return a token containing a pointer. + * @return a token containing a pointer. + * @internal + */ + inline static Token pointerToken(void*); +#endif /* U_HIDE_INTERNAL_API */ + + /** + * A function that creates and returns a Transliterator. When + * invoked, it will be passed the ID string that is being + * instantiated, together with the context pointer that was passed + * in when the factory function was first registered. Many + * factory functions will ignore both parameters, however, + * functions that are registered to more than one ID may use the + * ID or the context parameter to parameterize the transliterator + * they create. + * @param ID the string identifier for this transliterator + * @param context a context pointer that will be stored and + * later passed to the factory function when an ID matching + * the registration ID is being instantiated with this factory. + * @stable ICU 2.4 + */ + typedef Transliterator* (U_EXPORT2 *Factory)(const UnicodeString& ID, Token context); + +protected: + + /** + * Default constructor. + * @param ID the string identifier for this transliterator + * @param adoptedFilter the filter. Any character for which + * <tt>filter.contains()</tt> returns <tt>false</tt> will not be + * altered by this transliterator. If <tt>filter</tt> is + * <tt>null</tt> then no filtering is applied. + * @stable ICU 2.4 + */ + Transliterator(const UnicodeString& ID, UnicodeFilter* adoptedFilter); + + /** + * Copy constructor. + * @stable ICU 2.4 + */ + Transliterator(const Transliterator&); + + /** + * Assignment operator. + * @stable ICU 2.4 + */ + Transliterator& operator=(const Transliterator&); + + /** + * Create a transliterator from a basic ID. This is an ID + * containing only the forward direction source, target, and + * variant. + * @param id a basic ID of the form S-T or S-T/V. + * @param canon canonical ID to assign to the object, or + * NULL to leave the ID unchanged + * @return a newly created Transliterator or null if the ID is + * invalid. + * @stable ICU 2.4 + */ + static Transliterator* createBasicInstance(const UnicodeString& id, + const UnicodeString* canon); + + friend class TransliteratorParser; // for parseID() + friend class TransliteratorIDParser; // for createBasicInstance() + friend class TransliteratorAlias; // for setID() + +public: + + /** + * Destructor. + * @stable ICU 2.0 + */ + virtual ~Transliterator(); + + /** + * Implements Cloneable. + * All subclasses are encouraged to implement this method if it is + * possible and reasonable to do so. Subclasses that are to be + * registered with the system using <tt>registerInstance()</tt> + * are required to implement this method. If a subclass does not + * implement clone() properly and is registered with the system + * using registerInstance(), then the default clone() implementation + * will return null, and calls to createInstance() will fail. + * + * @return a copy of the object. + * @see #registerInstance + * @stable ICU 2.0 + */ + virtual Transliterator* clone() const; + + /** + * Transliterates a segment of a string, with optional filtering. + * + * @param text the string to be transliterated + * @param start the beginning index, inclusive; <code>0 <= start + * <= limit</code>. + * @param limit the ending index, exclusive; <code>start <= limit + * <= text.length()</code>. + * @return The new limit index. The text previously occupying <code>[start, + * limit)</code> has been transliterated, possibly to a string of a different + * length, at <code>[start, </code><em>new-limit</em><code>)</code>, where + * <em>new-limit</em> is the return value. If the input offsets are out of bounds, + * the returned value is -1 and the input string remains unchanged. + * @stable ICU 2.0 + */ + virtual int32_t transliterate(Replaceable& text, + int32_t start, int32_t limit) const; + + /** + * Transliterates an entire string in place. Convenience method. + * @param text the string to be transliterated + * @stable ICU 2.0 + */ + virtual void transliterate(Replaceable& text) const; + + /** + * Transliterates the portion of the text buffer that can be + * transliterated unambiguosly after new text has been inserted, + * typically as a result of a keyboard event. The new text in + * <code>insertion</code> will be inserted into <code>text</code> + * at <code>index.limit</code>, advancing + * <code>index.limit</code> by <code>insertion.length()</code>. + * Then the transliterator will try to transliterate characters of + * <code>text</code> between <code>index.cursor</code> and + * <code>index.limit</code>. Characters before + * <code>index.cursor</code> will not be changed. + * + * <p>Upon return, values in <code>index</code> will be updated. + * <code>index.start</code> will be advanced to the first + * character that future calls to this method will read. + * <code>index.cursor</code> and <code>index.limit</code> will + * be adjusted to delimit the range of text that future calls to + * this method may change. + * + * <p>Typical usage of this method begins with an initial call + * with <code>index.start</code> and <code>index.limit</code> + * set to indicate the portion of <code>text</code> to be + * transliterated, and <code>index.cursor == index.start</code>. + * Thereafter, <code>index</code> can be used without + * modification in future calls, provided that all changes to + * <code>text</code> are made via this method. + * + * <p>This method assumes that future calls may be made that will + * insert new text into the buffer. As a result, it only performs + * unambiguous transliterations. After the last call to this + * method, there may be untransliterated text that is waiting for + * more input to resolve an ambiguity. In order to perform these + * pending transliterations, clients should call {@link + * #finishTransliteration } after the last call to this + * method has been made. + * + * @param text the buffer holding transliterated and untransliterated text + * @param index an array of three integers. + * + * <ul><li><code>index.start</code>: the beginning index, + * inclusive; <code>0 <= index.start <= index.limit</code>. + * + * <li><code>index.limit</code>: the ending index, exclusive; + * <code>index.start <= index.limit <= text.length()</code>. + * <code>insertion</code> is inserted at + * <code>index.limit</code>. + * + * <li><code>index.cursor</code>: the next character to be + * considered for transliteration; <code>index.start <= + * index.cursor <= index.limit</code>. Characters before + * <code>index.cursor</code> will not be changed by future calls + * to this method.</ul> + * + * @param insertion text to be inserted and possibly + * transliterated into the translation buffer at + * <code>index.limit</code>. If <code>null</code> then no text + * is inserted. + * @param status Output param to filled in with a success or an error. + * @see #handleTransliterate + * @exception IllegalArgumentException if <code>index</code> + * is invalid + * @see UTransPosition + * @stable ICU 2.0 + */ + virtual void transliterate(Replaceable& text, UTransPosition& index, + const UnicodeString& insertion, + UErrorCode& status) const; + + /** + * Transliterates the portion of the text buffer that can be + * transliterated unambiguosly after a new character has been + * inserted, typically as a result of a keyboard event. This is a + * convenience method. + * @param text the buffer holding transliterated and + * untransliterated text + * @param index an array of three integers. + * @param insertion text to be inserted and possibly + * transliterated into the translation buffer at + * <code>index.limit</code>. + * @param status Output param to filled in with a success or an error. + * @see #transliterate(Replaceable&, UTransPosition&, const UnicodeString&, UErrorCode&) const + * @stable ICU 2.0 + */ + virtual void transliterate(Replaceable& text, UTransPosition& index, + UChar32 insertion, + UErrorCode& status) const; + + /** + * Transliterates the portion of the text buffer that can be + * transliterated unambiguosly. This is a convenience method; see + * {@link + * #transliterate(Replaceable&, UTransPosition&, const UnicodeString&, UErrorCode&) const } + * for details. + * @param text the buffer holding transliterated and + * untransliterated text + * @param index an array of three integers. See {@link #transliterate(Replaceable&, UTransPosition&, const UnicodeString*, UErrorCode&) const }. + * @param status Output param to filled in with a success or an error. + * @see #transliterate(Replaceable, int[], String) + * @stable ICU 2.0 + */ + virtual void transliterate(Replaceable& text, UTransPosition& index, + UErrorCode& status) const; + + /** + * Finishes any pending transliterations that were waiting for + * more characters. Clients should call this method as the last + * call after a sequence of one or more calls to + * <code>transliterate()</code>. + * @param text the buffer holding transliterated and + * untransliterated text. + * @param index the array of indices previously passed to {@link + * #transliterate } + * @stable ICU 2.0 + */ + virtual void finishTransliteration(Replaceable& text, + UTransPosition& index) const; + +private: + + /** + * This internal method does incremental transliteration. If the + * 'insertion' is non-null then we append it to 'text' before + * proceeding. This method calls through to the pure virtual + * framework method handleTransliterate() to do the actual + * work. + * @param text the buffer holding transliterated and + * untransliterated text + * @param index an array of three integers. See {@link + * #transliterate(Replaceable, int[], String)}. + * @param insertion text to be inserted and possibly + * transliterated into the translation buffer at + * <code>index.limit</code>. + * @param status Output param to filled in with a success or an error. + */ + void _transliterate(Replaceable& text, + UTransPosition& index, + const UnicodeString* insertion, + UErrorCode &status) const; + +protected: + + /** + * Abstract method that concrete subclasses define to implement + * their transliteration algorithm. This method handles both + * incremental and non-incremental transliteration. Let + * <code>originalStart</code> refer to the value of + * <code>pos.start</code> upon entry. + * + * <ul> + * <li>If <code>incremental</code> is false, then this method + * should transliterate all characters between + * <code>pos.start</code> and <code>pos.limit</code>. Upon return + * <code>pos.start</code> must == <code> pos.limit</code>.</li> + * + * <li>If <code>incremental</code> is true, then this method + * should transliterate all characters between + * <code>pos.start</code> and <code>pos.limit</code> that can be + * unambiguously transliterated, regardless of future insertions + * of text at <code>pos.limit</code>. Upon return, + * <code>pos.start</code> should be in the range + * [<code>originalStart</code>, <code>pos.limit</code>). + * <code>pos.start</code> should be positioned such that + * characters [<code>originalStart</code>, <code> + * pos.start</code>) will not be changed in the future by this + * transliterator and characters [<code>pos.start</code>, + * <code>pos.limit</code>) are unchanged.</li> + * </ul> + * + * <p>Implementations of this method should also obey the + * following invariants:</p> + * + * <ul> + * <li> <code>pos.limit</code> and <code>pos.contextLimit</code> + * should be updated to reflect changes in length of the text + * between <code>pos.start</code> and <code>pos.limit</code>. The + * difference <code> pos.contextLimit - pos.limit</code> should + * not change.</li> + * + * <li><code>pos.contextStart</code> should not change.</li> + * + * <li>Upon return, neither <code>pos.start</code> nor + * <code>pos.limit</code> should be less than + * <code>originalStart</code>.</li> + * + * <li>Text before <code>originalStart</code> and text after + * <code>pos.limit</code> should not change.</li> + * + * <li>Text before <code>pos.contextStart</code> and text after + * <code> pos.contextLimit</code> should be ignored.</li> + * </ul> + * + * <p>Subclasses may safely assume that all characters in + * [<code>pos.start</code>, <code>pos.limit</code>) are filtered. + * In other words, the filter has already been applied by the time + * this method is called. See + * <code>filteredTransliterate()</code>. + * + * <p>This method is <b>not</b> for public consumption. Calling + * this method directly will transliterate + * [<code>pos.start</code>, <code>pos.limit</code>) without + * applying the filter. End user code should call <code> + * transliterate()</code> instead of this method. Subclass code + * and wrapping transliterators should call + * <code>filteredTransliterate()</code> instead of this method.<p> + * + * @param text the buffer holding transliterated and + * untransliterated text + * + * @param pos the indices indicating the start, limit, context + * start, and context limit of the text. + * + * @param incremental if true, assume more text may be inserted at + * <code>pos.limit</code> and act accordingly. Otherwise, + * transliterate all text between <code>pos.start</code> and + * <code>pos.limit</code> and move <code>pos.start</code> up to + * <code>pos.limit</code>. + * + * @see #transliterate + * @stable ICU 2.4 + */ + virtual void handleTransliterate(Replaceable& text, + UTransPosition& pos, + UBool incremental) const = 0; + +public: + /** + * Transliterate a substring of text, as specified by index, taking filters + * into account. This method is for subclasses that need to delegate to + * another transliterator, such as CompoundTransliterator. + * @param text the text to be transliterated + * @param index the position indices + * @param incremental if TRUE, then assume more characters may be inserted + * at index.limit, and postpone processing to accomodate future incoming + * characters + * @stable ICU 2.4 + */ + virtual void filteredTransliterate(Replaceable& text, + UTransPosition& index, + UBool incremental) const; + +private: + + /** + * Top-level transliteration method, handling filtering, incremental and + * non-incremental transliteration, and rollback. All transliteration + * public API methods eventually call this method with a rollback argument + * of TRUE. Other entities may call this method but rollback should be + * FALSE. + * + * <p>If this transliterator has a filter, break up the input text into runs + * of unfiltered characters. Pass each run to + * subclass.handleTransliterate(). + * + * <p>In incremental mode, if rollback is TRUE, perform a special + * incremental procedure in which several passes are made over the input + * text, adding one character at a time, and committing successful + * transliterations as they occur. Unsuccessful transliterations are rolled + * back and retried with additional characters to give correct results. + * + * @param text the text to be transliterated + * @param index the position indices + * @param incremental if TRUE, then assume more characters may be inserted + * at index.limit, and postpone processing to accomodate future incoming + * characters + * @param rollback if TRUE and if incremental is TRUE, then perform special + * incremental processing, as described above, and undo partial + * transliterations where necessary. If incremental is FALSE then this + * parameter is ignored. + */ + virtual void filteredTransliterate(Replaceable& text, + UTransPosition& index, + UBool incremental, + UBool rollback) const; + +public: + + /** + * Returns the length of the longest context required by this transliterator. + * This is <em>preceding</em> context. The default implementation supplied + * by <code>Transliterator</code> returns zero; subclasses + * that use preceding context should override this method to return the + * correct value. For example, if a transliterator translates "ddd" (where + * d is any digit) to "555" when preceded by "(ddd)", then the preceding + * context length is 5, the length of "(ddd)". + * + * @return The maximum number of preceding context characters this + * transliterator needs to examine + * @stable ICU 2.0 + */ + int32_t getMaximumContextLength(void) const; + +protected: + + /** + * Method for subclasses to use to set the maximum context length. + * @param maxContextLength the new value to be set. + * @see #getMaximumContextLength + * @stable ICU 2.4 + */ + void setMaximumContextLength(int32_t maxContextLength); + +public: + + /** + * Returns a programmatic identifier for this transliterator. + * If this identifier is passed to <code>createInstance()</code>, it + * will return this object, if it has been registered. + * @return a programmatic identifier for this transliterator. + * @see #registerInstance + * @see #registerFactory + * @see #getAvailableIDs + * @stable ICU 2.0 + */ + virtual const UnicodeString& getID(void) const; + + /** + * Returns a name for this transliterator that is appropriate for + * display to the user in the default locale. See {@link + * #getDisplayName } for details. + * @param ID the string identifier for this transliterator + * @param result Output param to receive the display name + * @return A reference to 'result'. + * @stable ICU 2.0 + */ + static UnicodeString& U_EXPORT2 getDisplayName(const UnicodeString& ID, + UnicodeString& result); + + /** + * Returns a name for this transliterator that is appropriate for + * display to the user in the given locale. This name is taken + * from the locale resource data in the standard manner of the + * <code>java.text</code> package. + * + * <p>If no localized names exist in the system resource bundles, + * a name is synthesized using a localized + * <code>MessageFormat</code> pattern from the resource data. The + * arguments to this pattern are an integer followed by one or two + * strings. The integer is the number of strings, either 1 or 2. + * The strings are formed by splitting the ID for this + * transliterator at the first '-'. If there is no '-', then the + * entire ID forms the only string. + * @param ID the string identifier for this transliterator + * @param inLocale the Locale in which the display name should be + * localized. + * @param result Output param to receive the display name + * @return A reference to 'result'. + * @stable ICU 2.0 + */ + static UnicodeString& U_EXPORT2 getDisplayName(const UnicodeString& ID, + const Locale& inLocale, + UnicodeString& result); + + /** + * Returns the filter used by this transliterator, or <tt>NULL</tt> + * if this transliterator uses no filter. + * @return the filter used by this transliterator, or <tt>NULL</tt> + * if this transliterator uses no filter. + * @stable ICU 2.0 + */ + const UnicodeFilter* getFilter(void) const; + + /** + * Returns the filter used by this transliterator, or <tt>NULL</tt> if this + * transliterator uses no filter. The caller must eventually delete the + * result. After this call, this transliterator's filter is set to + * <tt>NULL</tt>. + * @return the filter used by this transliterator, or <tt>NULL</tt> if this + * transliterator uses no filter. + * @stable ICU 2.4 + */ + UnicodeFilter* orphanFilter(void); + + /** + * Changes the filter used by this transliterator. If the filter + * is set to <tt>null</tt> then no filtering will occur. + * + * <p>Callers must take care if a transliterator is in use by + * multiple threads. The filter should not be changed by one + * thread while another thread may be transliterating. + * @param adoptedFilter the new filter to be adopted. + * @stable ICU 2.0 + */ + void adoptFilter(UnicodeFilter* adoptedFilter); + + /** + * Returns this transliterator's inverse. See the class + * documentation for details. This implementation simply inverts + * the two entities in the ID and attempts to retrieve the + * resulting transliterator. That is, if <code>getID()</code> + * returns "A-B", then this method will return the result of + * <code>createInstance("B-A")</code>, or <code>null</code> if that + * call fails. + * + * <p>Subclasses with knowledge of their inverse may wish to + * override this method. + * + * @param status Output param to filled in with a success or an error. + * @return a transliterator that is an inverse, not necessarily + * exact, of this transliterator, or <code>null</code> if no such + * transliterator is registered. + * @see #registerInstance + * @stable ICU 2.0 + */ + Transliterator* createInverse(UErrorCode& status) const; + + /** + * Returns a <code>Transliterator</code> object given its ID. + * The ID must be either a system transliterator ID or a ID registered + * using <code>registerInstance()</code>. + * + * @param ID a valid ID, as enumerated by <code>getAvailableIDs()</code> + * @param dir either FORWARD or REVERSE. + * @param parseError Struct to recieve information on position + * of error if an error is encountered + * @param status Output param to filled in with a success or an error. + * @return A <code>Transliterator</code> object with the given ID + * @see #registerInstance + * @see #getAvailableIDs + * @see #getID + * @stable ICU 2.0 + */ + static Transliterator* U_EXPORT2 createInstance(const UnicodeString& ID, + UTransDirection dir, + UParseError& parseError, + UErrorCode& status); + + /** + * Returns a <code>Transliterator</code> object given its ID. + * The ID must be either a system transliterator ID or a ID registered + * using <code>registerInstance()</code>. + * @param ID a valid ID, as enumerated by <code>getAvailableIDs()</code> + * @param dir either FORWARD or REVERSE. + * @param status Output param to filled in with a success or an error. + * @return A <code>Transliterator</code> object with the given ID + * @stable ICU 2.0 + */ + static Transliterator* U_EXPORT2 createInstance(const UnicodeString& ID, + UTransDirection dir, + UErrorCode& status); + + /** + * Returns a <code>Transliterator</code> object constructed from + * the given rule string. This will be a RuleBasedTransliterator, + * if the rule string contains only rules, or a + * CompoundTransliterator, if it contains ID blocks, or a + * NullTransliterator, if it contains ID blocks which parse as + * empty for the given direction. + * @param ID the id for the transliterator. + * @param rules rules, separated by ';' + * @param dir either FORWARD or REVERSE. + * @param parseError Struct to recieve information on position + * of error if an error is encountered + * @param status Output param set to success/failure code. + * @stable ICU 2.0 + */ + static Transliterator* U_EXPORT2 createFromRules(const UnicodeString& ID, + const UnicodeString& rules, + UTransDirection dir, + UParseError& parseError, + UErrorCode& status); + + /** + * Create a rule string that can be passed to createFromRules() + * to recreate this transliterator. + * @param result the string to receive the rules. Previous + * contents will be deleted. + * @param escapeUnprintable if TRUE then convert unprintable + * character to their hex escape representations, \\uxxxx or + * \\Uxxxxxxxx. Unprintable characters are those other than + * U+000A, U+0020..U+007E. + * @stable ICU 2.0 + */ + virtual UnicodeString& toRules(UnicodeString& result, + UBool escapeUnprintable) const; + + /** + * Return the number of elements that make up this transliterator. + * For example, if the transliterator "NFD;Jamo-Latin;Latin-Greek" + * were created, the return value of this method would be 3. + * + * <p>If this transliterator is not composed of other + * transliterators, then this method returns 1. + * @return the number of transliterators that compose this + * transliterator, or 1 if this transliterator is not composed of + * multiple transliterators + * @stable ICU 3.0 + */ + int32_t countElements() const; + + /** + * Return an element that makes up this transliterator. For + * example, if the transliterator "NFD;Jamo-Latin;Latin-Greek" + * were created, the return value of this method would be one + * of the three transliterator objects that make up that + * transliterator: [NFD, Jamo-Latin, Latin-Greek]. + * + * <p>If this transliterator is not composed of other + * transliterators, then this method will return a reference to + * this transliterator when given the index 0. + * @param index a value from 0..countElements()-1 indicating the + * transliterator to return + * @param ec input-output error code + * @return one of the transliterators that makes up this + * transliterator, if this transliterator is made up of multiple + * transliterators, otherwise a reference to this object if given + * an index of 0 + * @stable ICU 3.0 + */ + const Transliterator& getElement(int32_t index, UErrorCode& ec) const; + + /** + * Returns the set of all characters that may be modified in the + * input text by this Transliterator. This incorporates this + * object's current filter; if the filter is changed, the return + * value of this function will change. The default implementation + * returns an empty set. Some subclasses may override {@link + * #handleGetSourceSet } to return a more precise result. The + * return result is approximate in any case and is intended for + * use by tests, tools, or utilities. + * @param result receives result set; previous contents lost + * @return a reference to result + * @see #getTargetSet + * @see #handleGetSourceSet + * @stable ICU 2.4 + */ + UnicodeSet& getSourceSet(UnicodeSet& result) const; + + /** + * Framework method that returns the set of all characters that + * may be modified in the input text by this Transliterator, + * ignoring the effect of this object's filter. The base class + * implementation returns the empty set. Subclasses that wish to + * implement this should override this method. + * @return the set of characters that this transliterator may + * modify. The set may be modified, so subclasses should return a + * newly-created object. + * @param result receives result set; previous contents lost + * @see #getSourceSet + * @see #getTargetSet + * @stable ICU 2.4 + */ + virtual void handleGetSourceSet(UnicodeSet& result) const; + + /** + * Returns the set of all characters that may be generated as + * replacement text by this transliterator. The default + * implementation returns the empty set. Some subclasses may + * override this method to return a more precise result. The + * return result is approximate in any case and is intended for + * use by tests, tools, or utilities requiring such + * meta-information. + * @param result receives result set; previous contents lost + * @return a reference to result + * @see #getTargetSet + * @stable ICU 2.4 + */ + virtual UnicodeSet& getTargetSet(UnicodeSet& result) const; + +public: + + /** + * Registers a factory function that creates transliterators of + * a given ID. + * + * Because ICU may choose to cache Transliterators internally, this must + * be called at application startup, prior to any calls to + * Transliterator::createXXX to avoid undefined behavior. + * + * @param id the ID being registered + * @param factory a function pointer that will be copied and + * called later when the given ID is passed to createInstance() + * @param context a context pointer that will be stored and + * later passed to the factory function when an ID matching + * the registration ID is being instantiated with this factory. + * @stable ICU 2.0 + */ + static void U_EXPORT2 registerFactory(const UnicodeString& id, + Factory factory, + Token context); + + /** + * Registers an instance <tt>obj</tt> of a subclass of + * <code>Transliterator</code> with the system. When + * <tt>createInstance()</tt> is called with an ID string that is + * equal to <tt>obj->getID()</tt>, then <tt>obj->clone()</tt> is + * returned. + * + * After this call the Transliterator class owns the adoptedObj + * and will delete it. + * + * Because ICU may choose to cache Transliterators internally, this must + * be called at application startup, prior to any calls to + * Transliterator::createXXX to avoid undefined behavior. + * + * @param adoptedObj an instance of subclass of + * <code>Transliterator</code> that defines <tt>clone()</tt> + * @see #createInstance + * @see #registerFactory + * @see #unregister + * @stable ICU 2.0 + */ + static void U_EXPORT2 registerInstance(Transliterator* adoptedObj); + + /** + * Registers an ID string as an alias of another ID string. + * That is, after calling this function, <tt>createInstance(aliasID)</tt> + * will return the same thing as <tt>createInstance(realID)</tt>. + * This is generally used to create shorter, more mnemonic aliases + * for long compound IDs. + * + * @param aliasID The new ID being registered. + * @param realID The ID that the new ID is to be an alias for. + * This can be a compound ID and can include filters and should + * refer to transliterators that have already been registered with + * the framework, although this isn't checked. + * @stable ICU 3.6 + */ + static void U_EXPORT2 registerAlias(const UnicodeString& aliasID, + const UnicodeString& realID); + +protected: + +#ifndef U_HIDE_INTERNAL_API + /** + * @param id the ID being registered + * @param factory a function pointer that will be copied and + * called later when the given ID is passed to createInstance() + * @param context a context pointer that will be stored and + * later passed to the factory function when an ID matching + * the registration ID is being instantiated with this factory. + * @internal + */ + static void _registerFactory(const UnicodeString& id, + Factory factory, + Token context); + + /** + * @internal + */ + static void _registerInstance(Transliterator* adoptedObj); + + /** + * @internal + */ + static void _registerAlias(const UnicodeString& aliasID, const UnicodeString& realID); + + /** + * Register two targets as being inverses of one another. For + * example, calling registerSpecialInverse("NFC", "NFD", true) causes + * Transliterator to form the following inverse relationships: + * + * <pre>NFC => NFD + * Any-NFC => Any-NFD + * NFD => NFC + * Any-NFD => Any-NFC</pre> + * + * (Without the special inverse registration, the inverse of NFC + * would be NFC-Any.) Note that NFD is shorthand for Any-NFD, but + * that the presence or absence of "Any-" is preserved. + * + * <p>The relationship is symmetrical; registering (a, b) is + * equivalent to registering (b, a). + * + * <p>The relevant IDs must still be registered separately as + * factories or classes. + * + * <p>Only the targets are specified. Special inverses always + * have the form Any-Target1 <=> Any-Target2. The target should + * have canonical casing (the casing desired to be produced when + * an inverse is formed) and should contain no whitespace or other + * extraneous characters. + * + * @param target the target against which to register the inverse + * @param inverseTarget the inverse of target, that is + * Any-target.getInverse() => Any-inverseTarget + * @param bidirectional if true, register the reverse relation + * as well, that is, Any-inverseTarget.getInverse() => Any-target + * @internal + */ + static void _registerSpecialInverse(const UnicodeString& target, + const UnicodeString& inverseTarget, + UBool bidirectional); +#endif /* U_HIDE_INTERNAL_API */ + +public: + + /** + * Unregisters a transliterator or class. This may be either + * a system transliterator or a user transliterator or class. + * Any attempt to construct an unregistered transliterator based + * on its ID will fail. + * + * Because ICU may choose to cache Transliterators internally, this should + * be called during application shutdown, after all calls to + * Transliterator::createXXX to avoid undefined behavior. + * + * @param ID the ID of the transliterator or class + * @return the <code>Object</code> that was registered with + * <code>ID</code>, or <code>null</code> if none was + * @see #registerInstance + * @see #registerFactory + * @stable ICU 2.0 + */ + static void U_EXPORT2 unregister(const UnicodeString& ID); + +public: + + /** + * Return a StringEnumeration over the IDs available at the time of the + * call, including user-registered IDs. + * @param ec input-output error code + * @return a newly-created StringEnumeration over the transliterators + * available at the time of the call. The caller should delete this object + * when done using it. + * @stable ICU 3.0 + */ + static StringEnumeration* U_EXPORT2 getAvailableIDs(UErrorCode& ec); + + /** + * Return the number of registered source specifiers. + * @return the number of registered source specifiers. + * @stable ICU 2.0 + */ + static int32_t U_EXPORT2 countAvailableSources(void); + + /** + * Return a registered source specifier. + * @param index which specifier to return, from 0 to n-1, where + * n = countAvailableSources() + * @param result fill-in paramter to receive the source specifier. + * If index is out of range, result will be empty. + * @return reference to result + * @stable ICU 2.0 + */ + static UnicodeString& U_EXPORT2 getAvailableSource(int32_t index, + UnicodeString& result); + + /** + * Return the number of registered target specifiers for a given + * source specifier. + * @param source the given source specifier. + * @return the number of registered target specifiers for a given + * source specifier. + * @stable ICU 2.0 + */ + static int32_t U_EXPORT2 countAvailableTargets(const UnicodeString& source); + + /** + * Return a registered target specifier for a given source. + * @param index which specifier to return, from 0 to n-1, where + * n = countAvailableTargets(source) + * @param source the source specifier + * @param result fill-in paramter to receive the target specifier. + * If source is invalid or if index is out of range, result will + * be empty. + * @return reference to result + * @stable ICU 2.0 + */ + static UnicodeString& U_EXPORT2 getAvailableTarget(int32_t index, + const UnicodeString& source, + UnicodeString& result); + + /** + * Return the number of registered variant specifiers for a given + * source-target pair. + * @param source the source specifiers. + * @param target the target specifiers. + * @stable ICU 2.0 + */ + static int32_t U_EXPORT2 countAvailableVariants(const UnicodeString& source, + const UnicodeString& target); + + /** + * Return a registered variant specifier for a given source-target + * pair. + * @param index which specifier to return, from 0 to n-1, where + * n = countAvailableVariants(source, target) + * @param source the source specifier + * @param target the target specifier + * @param result fill-in paramter to receive the variant + * specifier. If source is invalid or if target is invalid or if + * index is out of range, result will be empty. + * @return reference to result + * @stable ICU 2.0 + */ + static UnicodeString& U_EXPORT2 getAvailableVariant(int32_t index, + const UnicodeString& source, + const UnicodeString& target, + UnicodeString& result); + +protected: + +#ifndef U_HIDE_INTERNAL_API + /** + * Non-mutexed internal method + * @internal + */ + static int32_t _countAvailableSources(void); + + /** + * Non-mutexed internal method + * @internal + */ + static UnicodeString& _getAvailableSource(int32_t index, + UnicodeString& result); + + /** + * Non-mutexed internal method + * @internal + */ + static int32_t _countAvailableTargets(const UnicodeString& source); + + /** + * Non-mutexed internal method + * @internal + */ + static UnicodeString& _getAvailableTarget(int32_t index, + const UnicodeString& source, + UnicodeString& result); + + /** + * Non-mutexed internal method + * @internal + */ + static int32_t _countAvailableVariants(const UnicodeString& source, + const UnicodeString& target); + + /** + * Non-mutexed internal method + * @internal + */ + static UnicodeString& _getAvailableVariant(int32_t index, + const UnicodeString& source, + const UnicodeString& target, + UnicodeString& result); +#endif /* U_HIDE_INTERNAL_API */ + +protected: + + /** + * Set the ID of this transliterators. Subclasses shouldn't do + * this, unless the underlying script behavior has changed. + * @param id the new id t to be set. + * @stable ICU 2.4 + */ + void setID(const UnicodeString& id); + +public: + + /** + * Return the class ID for this class. This is useful only for + * comparing to a return value from getDynamicClassID(). + * Note that Transliterator is an abstract base class, and therefor + * no fully constructed object will have a dynamic + * UCLassID that equals the UClassID returned from + * TRansliterator::getStaticClassID(). + * @return The class ID for class Transliterator. + * @stable ICU 2.0 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID <b>polymorphically</b>. This method + * is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and + * clone() methods call this method. + * + * <p>Concrete subclasses of Transliterator must use the + * UOBJECT_DEFINE_RTTI_IMPLEMENTATION macro from + * uobject.h to provide the RTTI functions. + * + * @return The class ID for this object. All objects of a given + * class have the same class ID. Objects of other classes have + * different class IDs. + * @stable ICU 2.0 + */ + virtual UClassID getDynamicClassID(void) const = 0; + +private: + static UBool initializeRegistry(UErrorCode &status); + +public: +#ifndef U_HIDE_OBSOLETE_API + /** + * Return the number of IDs currently registered with the system. + * To retrieve the actual IDs, call getAvailableID(i) with + * i from 0 to countAvailableIDs() - 1. + * @return the number of IDs currently registered with the system. + * @obsolete ICU 3.4 use getAvailableIDs() instead + */ + static int32_t U_EXPORT2 countAvailableIDs(void); + + /** + * Return the index-th available ID. index must be between 0 + * and countAvailableIDs() - 1, inclusive. If index is out of + * range, the result of getAvailableID(0) is returned. + * @param index the given ID index. + * @return the index-th available ID. index must be between 0 + * and countAvailableIDs() - 1, inclusive. If index is out of + * range, the result of getAvailableID(0) is returned. + * @obsolete ICU 3.4 use getAvailableIDs() instead; this function + * is not thread safe, since it returns a reference to storage that + * may become invalid if another thread calls unregister + */ + static const UnicodeString& U_EXPORT2 getAvailableID(int32_t index); +#endif /* U_HIDE_OBSOLETE_API */ +}; + +inline int32_t Transliterator::getMaximumContextLength(void) const { + return maximumContextLength; +} + +inline void Transliterator::setID(const UnicodeString& id) { + ID = id; + // NUL-terminate the ID string, which is a non-aliased copy. + ID.append((char16_t)0); + ID.truncate(ID.length()-1); +} + +#ifndef U_HIDE_INTERNAL_API +inline Transliterator::Token Transliterator::integerToken(int32_t i) { + Token t; + t.integer = i; + return t; +} + +inline Transliterator::Token Transliterator::pointerToken(void* p) { + Token t; + t.pointer = p; + return t; +} +#endif /* U_HIDE_INTERNAL_API */ + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_TRANSLITERATION */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tzfmt.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tzfmt.h new file mode 100755 index 00000000..724ff4d8 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tzfmt.h @@ -0,0 +1,1097 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2011-2015, International Business Machines Corporation and +* others. All Rights Reserved. +******************************************************************************* +*/ +#ifndef __TZFMT_H +#define __TZFMT_H + +/** + * \file + * \brief C++ API: TimeZoneFormat + */ + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/format.h" +#include "unicode/timezone.h" +#include "unicode/tznames.h" + +U_CDECL_BEGIN +/** + * Constants for time zone display format style used by format/parse APIs + * in TimeZoneFormat. + * @stable ICU 50 + */ +typedef enum UTimeZoneFormatStyle { + /** + * Generic location format, such as "United States Time (New York)", "Italy Time" + * @stable ICU 50 + */ + UTZFMT_STYLE_GENERIC_LOCATION, + /** + * Generic long non-location format, such as "Eastern Time". + * @stable ICU 50 + */ + UTZFMT_STYLE_GENERIC_LONG, + /** + * Generic short non-location format, such as "ET". + * @stable ICU 50 + */ + UTZFMT_STYLE_GENERIC_SHORT, + /** + * Specific long format, such as "Eastern Standard Time". + * @stable ICU 50 + */ + UTZFMT_STYLE_SPECIFIC_LONG, + /** + * Specific short format, such as "EST", "PDT". + * @stable ICU 50 + */ + UTZFMT_STYLE_SPECIFIC_SHORT, + /** + * Localized GMT offset format, such as "GMT-05:00", "UTC+0100" + * @stable ICU 50 + */ + UTZFMT_STYLE_LOCALIZED_GMT, + /** + * Short localized GMT offset format, such as "GMT-5", "UTC+1:30" + * This style is equivalent to the LDML date format pattern "O". + * @stable ICU 51 + */ + UTZFMT_STYLE_LOCALIZED_GMT_SHORT, + /** + * Short ISO 8601 local time difference (basic format) or the UTC indicator. + * For example, "-05", "+0530", and "Z"(UTC). + * This style is equivalent to the LDML date format pattern "X". + * @stable ICU 51 + */ + UTZFMT_STYLE_ISO_BASIC_SHORT, + /** + * Short ISO 8601 locale time difference (basic format). + * For example, "-05" and "+0530". + * This style is equivalent to the LDML date format pattern "x". + * @stable ICU 51 + */ + UTZFMT_STYLE_ISO_BASIC_LOCAL_SHORT, + /** + * Fixed width ISO 8601 local time difference (basic format) or the UTC indicator. + * For example, "-0500", "+0530", and "Z"(UTC). + * This style is equivalent to the LDML date format pattern "XX". + * @stable ICU 51 + */ + UTZFMT_STYLE_ISO_BASIC_FIXED, + /** + * Fixed width ISO 8601 local time difference (basic format). + * For example, "-0500" and "+0530". + * This style is equivalent to the LDML date format pattern "xx". + * @stable ICU 51 + */ + UTZFMT_STYLE_ISO_BASIC_LOCAL_FIXED, + /** + * ISO 8601 local time difference (basic format) with optional seconds field, or the UTC indicator. + * For example, "-0500", "+052538", and "Z"(UTC). + * This style is equivalent to the LDML date format pattern "XXXX". + * @stable ICU 51 + */ + UTZFMT_STYLE_ISO_BASIC_FULL, + /** + * ISO 8601 local time difference (basic format) with optional seconds field. + * For example, "-0500" and "+052538". + * This style is equivalent to the LDML date format pattern "xxxx". + * @stable ICU 51 + */ + UTZFMT_STYLE_ISO_BASIC_LOCAL_FULL, + /** + * Fixed width ISO 8601 local time difference (extended format) or the UTC indicator. + * For example, "-05:00", "+05:30", and "Z"(UTC). + * This style is equivalent to the LDML date format pattern "XXX". + * @stable ICU 51 + */ + UTZFMT_STYLE_ISO_EXTENDED_FIXED, + /** + * Fixed width ISO 8601 local time difference (extended format). + * For example, "-05:00" and "+05:30". + * This style is equivalent to the LDML date format pattern "xxx" and "ZZZZZ". + * @stable ICU 51 + */ + UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FIXED, + /** + * ISO 8601 local time difference (extended format) with optional seconds field, or the UTC indicator. + * For example, "-05:00", "+05:25:38", and "Z"(UTC). + * This style is equivalent to the LDML date format pattern "XXXXX". + * @stable ICU 51 + */ + UTZFMT_STYLE_ISO_EXTENDED_FULL, + /** + * ISO 8601 local time difference (extended format) with optional seconds field. + * For example, "-05:00" and "+05:25:38". + * This style is equivalent to the LDML date format pattern "xxxxx". + * @stable ICU 51 + */ + UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FULL, + /** + * Time Zone ID, such as "America/Los_Angeles". + * @stable ICU 51 + */ + UTZFMT_STYLE_ZONE_ID, + /** + * Short Time Zone ID (BCP 47 Unicode location extension, time zone type value), such as "uslax". + * @stable ICU 51 + */ + UTZFMT_STYLE_ZONE_ID_SHORT, + /** + * Exemplar location, such as "Los Angeles" and "Paris". + * @stable ICU 51 + */ + UTZFMT_STYLE_EXEMPLAR_LOCATION +} UTimeZoneFormatStyle; + +/** + * Constants for GMT offset pattern types. + * @stable ICU 50 + */ +typedef enum UTimeZoneFormatGMTOffsetPatternType { + /** + * Positive offset with hours and minutes fields + * @stable ICU 50 + */ + UTZFMT_PAT_POSITIVE_HM, + /** + * Positive offset with hours, minutes and seconds fields + * @stable ICU 50 + */ + UTZFMT_PAT_POSITIVE_HMS, + /** + * Negative offset with hours and minutes fields + * @stable ICU 50 + */ + UTZFMT_PAT_NEGATIVE_HM, + /** + * Negative offset with hours, minutes and seconds fields + * @stable ICU 50 + */ + UTZFMT_PAT_NEGATIVE_HMS, + /** + * Positive offset with hours field + * @stable ICU 51 + */ + UTZFMT_PAT_POSITIVE_H, + /** + * Negative offset with hours field + * @stable ICU 51 + */ + UTZFMT_PAT_NEGATIVE_H, + + /* The following cannot be #ifndef U_HIDE_INTERNAL_API, needed for other .h declarations */ + /** + * Number of UTimeZoneFormatGMTOffsetPatternType types. + * @internal + */ + UTZFMT_PAT_COUNT = 6 +} UTimeZoneFormatGMTOffsetPatternType; + +/** + * Constants for time types used by TimeZoneFormat APIs for + * receiving time type (standard time, daylight time or unknown). + * @stable ICU 50 + */ +typedef enum UTimeZoneFormatTimeType { + /** + * Unknown + * @stable ICU 50 + */ + UTZFMT_TIME_TYPE_UNKNOWN, + /** + * Standard time + * @stable ICU 50 + */ + UTZFMT_TIME_TYPE_STANDARD, + /** + * Daylight saving time + * @stable ICU 50 + */ + UTZFMT_TIME_TYPE_DAYLIGHT +} UTimeZoneFormatTimeType; + +/** + * Constants for parse option flags, used for specifying optional parse behavior. + * @stable ICU 50 + */ +typedef enum UTimeZoneFormatParseOption { + /** + * No option. + * @stable ICU 50 + */ + UTZFMT_PARSE_OPTION_NONE = 0x00, + /** + * When a time zone display name is not found within a set of display names + * used for the specified style, look for the name from display names used + * by other styles. + * @stable ICU 50 + */ + UTZFMT_PARSE_OPTION_ALL_STYLES = 0x01, + /** + * When parsing a time zone display name in UTZFMT_STYLE_SPECIFIC_SHORT, + * look for the IANA tz database compatible zone abbreviations in addition + * to the localized names coming from the {@link TimeZoneNames} currently + * used by the {@link TimeZoneFormat}. + * @stable ICU 54 + */ + UTZFMT_PARSE_OPTION_TZ_DATABASE_ABBREVIATIONS = 0x02 +} UTimeZoneFormatParseOption; + +U_CDECL_END + +U_NAMESPACE_BEGIN + +class TimeZoneGenericNames; +class TZDBTimeZoneNames; +class UVector; + +/** + * <code>TimeZoneFormat</code> supports time zone display name formatting and parsing. + * An instance of TimeZoneFormat works as a subformatter of {@link SimpleDateFormat}, + * but you can also directly get a new instance of <code>TimeZoneFormat</code> and + * formatting/parsing time zone display names. + * <p> + * ICU implements the time zone display names defined by <a href="http://www.unicode.org/reports/tr35/">UTS#35 + * Unicode Locale Data Markup Language (LDML)</a>. {@link TimeZoneNames} represents the + * time zone display name data model and this class implements the algorithm for actual + * formatting and parsing. + * + * @see SimpleDateFormat + * @see TimeZoneNames + * @stable ICU 50 + */ +class U_I18N_API TimeZoneFormat : public Format { +public: + /** + * Copy constructor. + * @stable ICU 50 + */ + TimeZoneFormat(const TimeZoneFormat& other); + + /** + * Destructor. + * @stable ICU 50 + */ + virtual ~TimeZoneFormat(); + + /** + * Assignment operator. + * @stable ICU 50 + */ + TimeZoneFormat& operator=(const TimeZoneFormat& other); + + /** + * Return true if the given Format objects are semantically equal. + * Objects of different subclasses are considered unequal. + * @param other The object to be compared with. + * @return Return TRUE if the given Format objects are semantically equal. + * Objects of different subclasses are considered unequal. + * @stable ICU 50 + */ + virtual UBool operator==(const Format& other) const; + + /** + * Clone this object polymorphically. The caller is responsible + * for deleting the result when done. + * @return A copy of the object + * @stable ICU 50 + */ + virtual Format* clone() const; + + /** + * Creates an instance of <code>TimeZoneFormat</code> for the given locale. + * @param locale The locale. + * @param status Receives the status. + * @return An instance of <code>TimeZoneFormat</code> for the given locale, + * owned by the caller. + * @stable ICU 50 + */ + static TimeZoneFormat* U_EXPORT2 createInstance(const Locale& locale, UErrorCode& status); + + /** + * Returns the time zone display name data used by this instance. + * @return The time zone display name data. + * @stable ICU 50 + */ + const TimeZoneNames* getTimeZoneNames() const; + + /** + * Sets the time zone display name data to this format instnace. + * The caller should not delete the TimeZoenNames object after it is adopted + * by this call. + * @param tznames TimeZoneNames object to be adopted. + * @stable ICU 50 + */ + void adoptTimeZoneNames(TimeZoneNames *tznames); + + /** + * Sets the time zone display name data to this format instnace. + * @param tznames TimeZoneNames object to be set. + * @stable ICU 50 + */ + void setTimeZoneNames(const TimeZoneNames &tznames); + + /** + * Returns the localized GMT format pattern. + * @param pattern Receives the localized GMT format pattern. + * @return A reference to the result pattern. + * @see #setGMTPattern + * @stable ICU 50 + */ + UnicodeString& getGMTPattern(UnicodeString& pattern) const; + + /** + * Sets the localized GMT format pattern. The pattern must contain + * a single argument {0}, for example "GMT {0}". + * @param pattern The localized GMT format pattern to be used by this object. + * @param status Recieves the status. + * @see #getGMTPattern + * @stable ICU 50 + */ + void setGMTPattern(const UnicodeString& pattern, UErrorCode& status); + + /** + * Returns the offset pattern used for localized GMT format. + * @param type The offset pattern type enum. + * @param pattern Receives the offset pattern. + * @return A reference to the result pattern. + * @see #setGMTOffsetPattern + * @stable ICU 50 + */ + UnicodeString& getGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type, UnicodeString& pattern) const; + + /** + * Sets the offset pattern for the given offset type. + * @param type The offset pattern type enum. + * @param pattern The offset pattern used for localized GMT format for the type. + * @param status Receives the status. + * @see #getGMTOffsetPattern + * @stable ICU 50 + */ + void setGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type, const UnicodeString& pattern, UErrorCode& status); + + /** + * Returns the decimal digit characters used for localized GMT format. + * The return string contains exactly 10 code points (may include Unicode + * supplementary character) representing digit 0 to digit 9 in the ascending + * order. + * @param digits Receives the decimal digits used for localized GMT format. + * @see #setGMTOffsetDigits + * @stable ICU 50 + */ + UnicodeString& getGMTOffsetDigits(UnicodeString& digits) const; + + /** + * Sets the decimal digit characters used for localized GMT format. + * The input <code>digits</code> must contain exactly 10 code points + * (Unicode supplementary characters are also allowed) representing + * digit 0 to digit 9 in the ascending order. When the input <code>digits</code> + * does not satisfy the condition, <code>U_ILLEGAL_ARGUMENT_ERROR</code> + * will be set to the return status. + * @param digits The decimal digits used for localized GMT format. + * @param status Receives the status. + * @see #getGMTOffsetDigits + * @stable ICU 50 + */ + void setGMTOffsetDigits(const UnicodeString& digits, UErrorCode& status); + + /** + * Returns the localized GMT format string for GMT(UTC) itself (GMT offset is 0). + * @param gmtZeroFormat Receives the localized GMT string string for GMT(UTC) itself. + * @return A reference to the result GMT string. + * @see #setGMTZeroFormat + * @stable ICU 50 + */ + UnicodeString& getGMTZeroFormat(UnicodeString& gmtZeroFormat) const; + + /** + * Sets the localized GMT format string for GMT(UTC) itself (GMT offset is 0). + * @param gmtZeroFormat The localized GMT format string for GMT(UTC). + * @param status Receives the status. + * @see #getGMTZeroFormat + * @stable ICU 50 + */ + void setGMTZeroFormat(const UnicodeString& gmtZeroFormat, UErrorCode& status); + + /** + * Returns the bitwise flags of UTimeZoneFormatParseOption representing the default parse + * options used by this object. + * @return the default parse options. + * @see ParseOption + * @stable ICU 50 + */ + uint32_t getDefaultParseOptions(void) const; + + /** + * Sets the default parse options. + * <p><b>Note</b>: By default, an instance of <code>TimeZoneFormat</code> + * created by {@link #createInstance} has no parse options set (UTZFMT_PARSE_OPTION_NONE). + * To specify multipe options, use bitwise flags of UTimeZoneFormatParseOption. + * @see #UTimeZoneFormatParseOption + * @stable ICU 50 + */ + void setDefaultParseOptions(uint32_t flags); + + /** + * Returns the ISO 8601 basic time zone string for the given offset. + * For example, "-08", "-0830" and "Z" + * + * @param offset the offset from GMT(UTC) in milliseconds. + * @param useUtcIndicator true if ISO 8601 UTC indicator "Z" is used when the offset is 0. + * @param isShort true if shortest form is used. + * @param ignoreSeconds true if non-zero offset seconds is appended. + * @param result Receives the ISO format string. + * @param status Receives the status + * @return the ISO 8601 basic format. + * @see #formatOffsetISO8601Extended + * @see #parseOffsetISO8601 + * @stable ICU 51 + */ + UnicodeString& formatOffsetISO8601Basic(int32_t offset, UBool useUtcIndicator, UBool isShort, UBool ignoreSeconds, + UnicodeString& result, UErrorCode& status) const; + + /** + * Returns the ISO 8601 extended time zone string for the given offset. + * For example, "-08:00", "-08:30" and "Z" + * + * @param offset the offset from GMT(UTC) in milliseconds. + * @param useUtcIndicator true if ISO 8601 UTC indicator "Z" is used when the offset is 0. + * @param isShort true if shortest form is used. + * @param ignoreSeconds true if non-zero offset seconds is appended. + * @param result Receives the ISO format string. + * @param status Receives the status + * @return the ISO 8601 basic format. + * @see #formatOffsetISO8601Extended + * @see #parseOffsetISO8601 + * @stable ICU 51 + */ + UnicodeString& formatOffsetISO8601Extended(int32_t offset, UBool useUtcIndicator, UBool isShort, UBool ignoreSeconds, + UnicodeString& result, UErrorCode& status) const; + + /** + * Returns the localized GMT(UTC) offset format for the given offset. + * The localized GMT offset is defined by; + * <ul> + * <li>GMT format pattern (e.g. "GMT {0}" - see {@link #getGMTPattern}) + * <li>Offset time pattern (e.g. "+HH:mm" - see {@link #getGMTOffsetPattern}) + * <li>Offset digits (e.g. "0123456789" - see {@link #getGMTOffsetDigits}) + * <li>GMT zero format (e.g. "GMT" - see {@link #getGMTZeroFormat}) + * </ul> + * This format always uses 2 digit hours and minutes. When the given offset has non-zero + * seconds, 2 digit seconds field will be appended. For example, + * GMT+05:00 and GMT+05:28:06. + * @param offset the offset from GMT(UTC) in milliseconds. + * @param status Receives the status + * @param result Receives the localized GMT format string. + * @return A reference to the result. + * @see #parseOffsetLocalizedGMT + * @stable ICU 50 + */ + UnicodeString& formatOffsetLocalizedGMT(int32_t offset, UnicodeString& result, UErrorCode& status) const; + + /** + * Returns the short localized GMT(UTC) offset format for the given offset. + * The short localized GMT offset is defined by; + * <ul> + * <li>GMT format pattern (e.g. "GMT {0}" - see {@link #getGMTPattern}) + * <li>Offset time pattern (e.g. "+HH:mm" - see {@link #getGMTOffsetPattern}) + * <li>Offset digits (e.g. "0123456789" - see {@link #getGMTOffsetDigits}) + * <li>GMT zero format (e.g. "GMT" - see {@link #getGMTZeroFormat}) + * </ul> + * This format uses the shortest representation of offset. The hours field does not + * have leading zero and lower fields with zero will be truncated. For example, + * GMT+5 and GMT+530. + * @param offset the offset from GMT(UTC) in milliseconds. + * @param status Receives the status + * @param result Receives the short localized GMT format string. + * @return A reference to the result. + * @see #parseOffsetShortLocalizedGMT + * @stable ICU 51 + */ + UnicodeString& formatOffsetShortLocalizedGMT(int32_t offset, UnicodeString& result, UErrorCode& status) const; + + using Format::format; + + /** + * Returns the display name of the time zone at the given date for the style. + * @param style The style (e.g. <code>UTZFMT_STYLE_GENERIC_LONG</code>, <code>UTZFMT_STYLE_LOCALIZED_GMT</code>...) + * @param tz The time zone. + * @param date The date. + * @param name Receives the display name. + * @param timeType the output argument for receiving the time type (standard/daylight/unknown) + * used for the display name, or NULL if the information is not necessary. + * @return A reference to the result + * @see #UTimeZoneFormatStyle + * @see #UTimeZoneFormatTimeType + * @stable ICU 50 + */ + virtual UnicodeString& format(UTimeZoneFormatStyle style, const TimeZone& tz, UDate date, + UnicodeString& name, UTimeZoneFormatTimeType* timeType = NULL) const; + + /** + * Returns offset from GMT(UTC) in milliseconds for the given ISO 8601 + * style time zone string. When the given string is not an ISO 8601 time zone + * string, this method sets the current position as the error index + * to <code>ParsePosition pos</code> and returns 0. + * @param text The text contains ISO8601 style time zone string (e.g. "-08:00", "Z") + * at the position. + * @param pos The ParsePosition object. + * @return The offset from GMT(UTC) in milliseconds for the given ISO 8601 style + * time zone string. + * @see #formatOffsetISO8601Basic + * @see #formatOffsetISO8601Extended + * @stable ICU 50 + */ + int32_t parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos) const; + + /** + * Returns offset from GMT(UTC) in milliseconds for the given localized GMT + * offset format string. When the given string cannot be parsed, this method + * sets the current position as the error index to <code>ParsePosition pos</code> + * and returns 0. + * @param text The text contains a localized GMT offset string at the position. + * @param pos The ParsePosition object. + * @return The offset from GMT(UTC) in milliseconds for the given localized GMT + * offset format string. + * @see #formatOffsetLocalizedGMT + * @stable ICU 50 + */ + int32_t parseOffsetLocalizedGMT(const UnicodeString& text, ParsePosition& pos) const; + + /** + * Returns offset from GMT(UTC) in milliseconds for the given short localized GMT + * offset format string. When the given string cannot be parsed, this method + * sets the current position as the error index to <code>ParsePosition pos</code> + * and returns 0. + * @param text The text contains a short localized GMT offset string at the position. + * @param pos The ParsePosition object. + * @return The offset from GMT(UTC) in milliseconds for the given short localized GMT + * offset format string. + * @see #formatOffsetShortLocalizedGMT + * @stable ICU 51 + */ + int32_t parseOffsetShortLocalizedGMT(const UnicodeString& text, ParsePosition& pos) const; + + /** + * Returns a <code>TimeZone</code> by parsing the time zone string according to + * the given parse position, the specified format style and parse options. + * + * @param text The text contains a time zone string at the position. + * @param style The format style + * @param pos The position. + * @param parseOptions The parse options repesented by bitwise flags of UTimeZoneFormatParseOption. + * @param timeType The output argument for receiving the time type (standard/daylight/unknown), + * or NULL if the information is not necessary. + * @return A <code>TimeZone</code>, or null if the input could not be parsed. + * @see UTimeZoneFormatStyle + * @see UTimeZoneFormatParseOption + * @see UTimeZoneFormatTimeType + * @stable ICU 50 + */ + virtual TimeZone* parse(UTimeZoneFormatStyle style, const UnicodeString& text, ParsePosition& pos, + int32_t parseOptions, UTimeZoneFormatTimeType* timeType = NULL) const; + + /** + * Returns a <code>TimeZone</code> by parsing the time zone string according to + * the given parse position, the specified format style and the default parse options. + * + * @param text The text contains a time zone string at the position. + * @param style The format style + * @param pos The position. + * @param timeType The output argument for receiving the time type (standard/daylight/unknown), + * or NULL if the information is not necessary. + * @return A <code>TimeZone</code>, or null if the input could not be parsed. + * @see UTimeZoneFormatStyle + * @see UTimeZoneFormatParseOption + * @see UTimeZoneFormatTimeType + * @stable ICU 50 + */ + TimeZone* parse(UTimeZoneFormatStyle style, const UnicodeString& text, ParsePosition& pos, + UTimeZoneFormatTimeType* timeType = NULL) const; + + /* ---------------------------------------------- + * Format APIs + * ---------------------------------------------- */ + + /** + * Format an object to produce a time zone display string using localized GMT offset format. + * This method handles Formattable objects with a <code>TimeZone</code>. If a the Formattable + * object type is not a <code>TimeZone</code>, then it returns a failing UErrorCode. + * @param obj The object to format. Must be a <code>TimeZone</code>. + * @param appendTo Output parameter to receive result. Result is appended to existing contents. + * @param pos On input: an alignment field, if desired. On output: the offsets of the alignment field. + * @param status Output param filled with success/failure status. + * @return Reference to 'appendTo' parameter. + * @stable ICU 50 + */ + virtual UnicodeString& format(const Formattable& obj, UnicodeString& appendTo, + FieldPosition& pos, UErrorCode& status) const; + + /** + * Parse a string to produce an object. This methods handles parsing of + * time zone display strings into Formattable objects with <code>TimeZone</code>. + * @param source The string to be parsed into an object. + * @param result Formattable to be set to the parse result. If parse fails, return contents are undefined. + * @param parse_pos The position to start parsing at. Upon return this param is set to the position after the + * last character successfully parsed. If the source is not parsed successfully, this param + * will remain unchanged. + * @return A newly created Formattable* object, or NULL on failure. The caller owns this and should + * delete it when done. + * @stable ICU 50 + */ + virtual void parseObject(const UnicodeString& source, Formattable& result, ParsePosition& parse_pos) const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * @stable ICU 50 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * @stable ICU 50 + */ + virtual UClassID getDynamicClassID() const; + +protected: + /** + * Constructs a TimeZoneFormat object for the specified locale. + * @param locale the locale + * @param status receives the status. + * @stable ICU 50 + */ + TimeZoneFormat(const Locale& locale, UErrorCode& status); + +private: + /* Locale of this object */ + Locale fLocale; + + /* Stores the region (could be implicit default) */ + char fTargetRegion[ULOC_COUNTRY_CAPACITY]; + + /* TimeZoneNames object used by this formatter */ + TimeZoneNames* fTimeZoneNames; + + /* TimeZoneGenericNames object used by this formatter - lazily instantiated */ + TimeZoneGenericNames* fTimeZoneGenericNames; + + /* Localized GMT format pattern - e.g. "GMT{0}" */ + UnicodeString fGMTPattern; + + /* Array of offset patterns used by Localized GMT format - e.g. "+HH:mm" */ + UnicodeString fGMTOffsetPatterns[UTZFMT_PAT_COUNT]; + + /* Localized decimal digits used by Localized GMT format */ + UChar32 fGMTOffsetDigits[10]; + + /* Localized GMT zero format - e.g. "GMT" */ + UnicodeString fGMTZeroFormat; + + /* Bit flags representing parse options */ + uint32_t fDefParseOptionFlags; + + /* Constant parts of GMT format pattern, populated from localized GMT format pattern*/ + UnicodeString fGMTPatternPrefix; /* Substring before {0} */ + UnicodeString fGMTPatternSuffix; /* Substring after {0} */ + + /* Compiled offset patterns generated from fGMTOffsetPatterns[] */ + UVector* fGMTOffsetPatternItems[UTZFMT_PAT_COUNT]; + + UBool fAbuttingOffsetHoursAndMinutes; + + /* TZDBTimeZoneNames object used for parsing */ + TZDBTimeZoneNames* fTZDBTimeZoneNames; + + /** + * Returns the time zone's specific format string. + * @param tz the time zone + * @param stdType the name type used for standard time + * @param dstType the name type used for daylight time + * @param date the date + * @param name receives the time zone's specific format name string + * @param timeType when null, actual time type is set + * @return a reference to name. + */ + UnicodeString& formatSpecific(const TimeZone& tz, UTimeZoneNameType stdType, UTimeZoneNameType dstType, + UDate date, UnicodeString& name, UTimeZoneFormatTimeType *timeType) const; + + /** + * Returns the time zone's generic format string. + * @param tz the time zone + * @param genType the generic name type + * @param date the date + * @param name receives the time zone's generic format name string + * @return a reference to name. + */ + UnicodeString& formatGeneric(const TimeZone& tz, int32_t genType, UDate date, UnicodeString& name) const; + + /** + * Lazily create a TimeZoneGenericNames instance + * @param status receives the status + * @return the cached TimeZoneGenericNames. + */ + const TimeZoneGenericNames* getTimeZoneGenericNames(UErrorCode& status) const; + + /** + * Lazily create a TZDBTimeZoneNames instance + * @param status receives the status + * @return the cached TZDBTimeZoneNames. + */ + const TZDBTimeZoneNames* getTZDBTimeZoneNames(UErrorCode& status) const; + + /** + * Private method returning the time zone's exemplar location string. + * This method will never return empty. + * @param tz the time zone + * @param name receives the time zone's exemplar location name + * @return a reference to name. + */ + UnicodeString& formatExemplarLocation(const TimeZone& tz, UnicodeString& name) const; + + /** + * Private enum specifying a combination of offset fields + */ + enum OffsetFields { + FIELDS_H, + FIELDS_HM, + FIELDS_HMS + }; + + /** + * Parses the localized GMT pattern string and initialize + * localized gmt pattern fields. + * @param gmtPattern the localized GMT pattern string such as "GMT {0}" + * @param status U_ILLEGAL_ARGUMENT_ERROR is set when the specified pattern does not + * contain an argument "{0}". + */ + void initGMTPattern(const UnicodeString& gmtPattern, UErrorCode& status); + + /** + * Parse the GMT offset pattern into runtime optimized format. + * @param pattern the offset pattern string + * @param required the required set of fields, such as FIELDS_HM + * @param status U_ILLEGAL_ARGUMENT is set when the specified pattern does not contain + * pattern letters for the required fields. + * @return A list of GMTOffsetField objects, or NULL on error. + */ + static UVector* parseOffsetPattern(const UnicodeString& pattern, OffsetFields required, UErrorCode& status); + + /** + * Appends seconds field to the offset pattern with hour/minute + * Note: This code will be obsoleted once we add hour-minute-second pattern data in CLDR. + * @param offsetHM the offset pattern including hours and minutes fields + * @param result the output offset pattern including hour, minute and seconds fields + * @param status receives the status + * @return a reference to result + */ + static UnicodeString& expandOffsetPattern(const UnicodeString& offsetHM, UnicodeString& result, UErrorCode& status); + + /** + * Truncates minutes field to the offset pattern with hour/minute + * Note: This code will be obsoleted once we add hour pattern data in CLDR. + * @param offsetHM the offset pattern including hours and minutes fields + * @param result the output offset pattern including only hours field + * @param status receives the status + * @return a reference to result + */ + static UnicodeString& truncateOffsetPattern(const UnicodeString& offsetHM, UnicodeString& result, UErrorCode& status); + + /** + * Break input string into UChar32[]. Each array element represents + * a code point. This method is used for parsing localized digit + * characters and support characters in Unicode supplemental planes. + * @param str the string + * @param codeArray receives the result + * @param capacity the capacity of codeArray + * @return TRUE when the specified code array is fully filled with code points + * (no under/overflow). + */ + static UBool toCodePoints(const UnicodeString& str, UChar32* codeArray, int32_t capacity); + + /** + * Private method supprting all of ISO8601 formats + * @param offset the offset from GMT(UTC) in milliseconds. + * @param useUtcIndicator true if ISO 8601 UTC indicator "Z" is used when the offset is 0. + * @param isShort true if shortest form is used. + * @param ignoreSeconds true if non-zero offset seconds is appended. + * @param result Receives the result + * @param status Receives the status + * @return the ISO 8601 basic format. + */ + UnicodeString& formatOffsetISO8601(int32_t offset, UBool isBasic, UBool useUtcIndicator, + UBool isShort, UBool ignoreSeconds, UnicodeString& result, UErrorCode& status) const; + + /** + * Private method used for localized GMT formatting. + * @param offset the zone's UTC offset + * @param isShort true if the short localized GMT format is desired. + * @param result receives the localized GMT format string + * @param status receives the status + */ + UnicodeString& formatOffsetLocalizedGMT(int32_t offset, UBool isShort, UnicodeString& result, UErrorCode& status) const; + + /** + * Returns offset from GMT(UTC) in milliseconds for the given ISO 8601 style + * (extended format) time zone string. When the given string is not an ISO 8601 time + * zone string, this method sets the current position as the error index + * to <code>ParsePosition pos</code> and returns 0. + * @param text the text contains ISO 8601 style time zone string (e.g. "-08:00", "Z") + * at the position. + * @param pos the position, non-negative error index will be set on failure. + * @param extendedOnly TRUE if parsing the text as ISO 8601 extended offset format (e.g. "-08:00"), + * or FALSE to evaluate the text as basic format. + * @param hasDigitOffset receiving if the parsed zone string contains offset digits. + * @return the offset from GMT(UTC) in milliseconds for the given ISO 8601 style + * time zone string. + */ + int32_t parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos, UBool extendedOnly, + UBool* hasDigitOffset = NULL) const; + + /** + * Appends localized digits to the buffer. + * This code assumes that the input number is 0 - 59 + * @param buf the target buffer + * @param n the integer number + * @param minDigits the minimum digits width + */ + void appendOffsetDigits(UnicodeString& buf, int32_t n, uint8_t minDigits) const; + + /** + * Returns offset from GMT(UTC) in milliseconds for the given localized GMT + * offset format string. When the given string cannot be parsed, this method + * sets the current position as the error index to <code>ParsePosition pos</code> + * and returns 0. + * @param text the text contains a localized GMT offset string at the position. + * @param pos the position, non-negative error index will be set on failure. + * @param isShort true if this parser to try the short format first + * @param hasDigitOffset receiving if the parsed zone string contains offset digits. + * @return the offset from GMT(UTC) in milliseconds for the given localized GMT + * offset format string. + */ + int32_t parseOffsetLocalizedGMT(const UnicodeString& text, ParsePosition& pos, + UBool isShort, UBool* hasDigitOffset) const; + + /** + * Parse localized GMT format generated by the patter used by this formatter, except + * GMT Zero format. + * @param text the input text + * @param start the start index + * @param isShort true if the short localized format is parsed. + * @param parsedLen receives the parsed length + * @return the parsed offset in milliseconds + */ + int32_t parseOffsetLocalizedGMTPattern(const UnicodeString& text, int32_t start, + UBool isShort, int32_t& parsedLen) const; + + /** + * Parses localized GMT offset fields into offset. + * @param text the input text + * @param start the start index + * @param isShort true if this is a short format - currently not used + * @param parsedLen the parsed length, or 0 on failure. + * @return the parsed offset in milliseconds. + */ + int32_t parseOffsetFields(const UnicodeString& text, int32_t start, UBool isShort, int32_t& parsedLen) const; + + /** + * Parse localized GMT offset fields with the given pattern. + * @param text the input text + * @param start the start index + * @param pattenItems the pattern (already itemized) + * @param forceSingleHourDigit true if hours field is parsed as a single digit + * @param hour receives the hour offset field + * @param min receives the minute offset field + * @param sec receives the second offset field + * @return the parsed length + */ + int32_t parseOffsetFieldsWithPattern(const UnicodeString& text, int32_t start, + UVector* patternItems, UBool forceSingleHourDigit, int32_t& hour, int32_t& min, int32_t& sec) const; + + /** + * Parses abutting localized GMT offset fields (such as 0800) into offset. + * @param text the input text + * @param start the start index + * @param parsedLen the parsed length, or 0 on failure + * @return the parsed offset in milliseconds. + */ + int32_t parseAbuttingOffsetFields(const UnicodeString& text, int32_t start, int32_t& parsedLen) const; + + /** + * Parses the input text using the default format patterns (e.g. "UTC{0}"). + * @param text the input text + * @param start the start index + * @param parsedLen the parsed length, or 0 on failure + * @return the parsed offset in milliseconds. + */ + int32_t parseOffsetDefaultLocalizedGMT(const UnicodeString& text, int start, int32_t& parsedLen) const; + + /** + * Parses the input GMT offset fields with the default offset pattern. + * @param text the input text + * @param start the start index + * @param separator the separator character, e.g. ':' + * @param parsedLen the parsed length, or 0 on failure. + * @return the parsed offset in milliseconds. + */ + int32_t parseDefaultOffsetFields(const UnicodeString& text, int32_t start, char16_t separator, + int32_t& parsedLen) const; + + /** + * Reads an offset field value. This method will stop parsing when + * 1) number of digits reaches <code>maxDigits</code> + * 2) just before already parsed number exceeds <code>maxVal</code> + * + * @param text the text + * @param start the start offset + * @param minDigits the minimum number of required digits + * @param maxDigits the maximum number of digits + * @param minVal the minimum value + * @param maxVal the maximum value + * @param parsedLen the actual parsed length. + * @return the integer value parsed + */ + int32_t parseOffsetFieldWithLocalizedDigits(const UnicodeString& text, int32_t start, + uint8_t minDigits, uint8_t maxDigits, uint16_t minVal, uint16_t maxVal, int32_t& parsedLen) const; + + /** + * Reads a single decimal digit, either localized digits used by this object + * or any Unicode numeric character. + * @param text the text + * @param start the start index + * @param len the actual length read from the text + * the start index is not a decimal number. + * @return the integer value of the parsed digit, or -1 on failure. + */ + int32_t parseSingleLocalizedDigit(const UnicodeString& text, int32_t start, int32_t& len) const; + + /** + * Formats offset using ASCII digits. The input offset range must be + * within +/-24 hours (exclusive). + * @param offset The offset + * @param sep The field separator character or 0 if not required + * @param minFields The minimum fields + * @param maxFields The maximum fields + * @return The offset string + */ + static UnicodeString& formatOffsetWithAsciiDigits(int32_t offset, char16_t sep, + OffsetFields minFields, OffsetFields maxFields, UnicodeString& result); + + /** + * Parses offset represented by contiguous ASCII digits. + * <p> + * Note: This method expects the input position is already at the start of + * ASCII digits and does not parse sign (+/-). + * @param text The text contains a sequence of ASCII digits + * @param pos The parse position + * @param minFields The minimum Fields to be parsed + * @param maxFields The maximum Fields to be parsed + * @param fixedHourWidth true if hours field must be width of 2 + * @return Parsed offset, 0 or positive number. + */ + static int32_t parseAbuttingAsciiOffsetFields(const UnicodeString& text, ParsePosition& pos, + OffsetFields minFields, OffsetFields maxFields, UBool fixedHourWidth); + + /** + * Parses offset represented by ASCII digits and separators. + * <p> + * Note: This method expects the input position is already at the start of + * ASCII digits and does not parse sign (+/-). + * @param text The text + * @param pos The parse position + * @param sep The separator character + * @param minFields The minimum Fields to be parsed + * @param maxFields The maximum Fields to be parsed + * @return Parsed offset, 0 or positive number. + */ + static int32_t parseAsciiOffsetFields(const UnicodeString& text, ParsePosition& pos, char16_t sep, + OffsetFields minFields, OffsetFields maxFields); + + /** + * Unquotes the message format style pattern. + * @param pattern the pattern + * @param result receive the unquoted pattern. + * @return A reference to result. + */ + static UnicodeString& unquote(const UnicodeString& pattern, UnicodeString& result); + + /** + * Initialize localized GMT format offset hour/min/sec patterns. + * This method parses patterns into optimized run-time format. + * @param status receives the status. + */ + void initGMTOffsetPatterns(UErrorCode& status); + + /** + * Check if there are any GMT format offset patterns without + * any separators between hours field and minutes field and update + * fAbuttingOffsetHoursAndMinutes field. This method must be called + * after all patterns are parsed into pattern items. + */ + void checkAbuttingHoursAndMinutes(); + + /** + * Creates an instance of TimeZone for the given offset + * @param offset the offset + * @return A TimeZone with the given offset + */ + TimeZone* createTimeZoneForOffset(int32_t offset) const; + + /** + * Returns the time type for the given name type + * @param nameType the name type + * @return the time type (unknown/standard/daylight) + */ + static UTimeZoneFormatTimeType getTimeType(UTimeZoneNameType nameType); + + /** + * Returns the time zone ID of a match at the specified index within + * the MatchInfoCollection. + * @param matches the collection of matches + * @param idx the index withing matches + * @param tzID receives the resolved time zone ID + * @return a reference to tzID. + */ + UnicodeString& getTimeZoneID(const TimeZoneNames::MatchInfoCollection* matches, int32_t idx, UnicodeString& tzID) const; + + + /** + * Parse a zone ID. + * @param text the text contains a time zone ID string at the position. + * @param pos the position + * @param tzID receives the zone ID + * @return a reference to tzID + */ + UnicodeString& parseZoneID(const UnicodeString& text, ParsePosition& pos, UnicodeString& tzID) const; + + /** + * Parse a short zone ID. + * @param text the text contains a short time zone ID string at the position. + * @param pos the position + * @param tzID receives the short zone ID + * @return a reference to tzID + */ + UnicodeString& parseShortZoneID(const UnicodeString& text, ParsePosition& pos, UnicodeString& tzID) const; + + /** + * Parse an exemplar location string. + * @param text the text contains an exemplar location string at the position. + * @param pos the position. + * @param tzID receives the time zone ID + * @return a reference to tzID + */ + UnicodeString& parseExemplarLocation(const UnicodeString& text, ParsePosition& pos, UnicodeString& tzID) const; +}; + +U_NAMESPACE_END + +#endif /* !UCONFIG_NO_FORMATTING */ +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tznames.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tznames.h new file mode 100755 index 00000000..399265d8 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tznames.h @@ -0,0 +1,414 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2011-2016, International Business Machines Corporation and +* others. All Rights Reserved. +******************************************************************************* +*/ +#ifndef __TZNAMES_H +#define __TZNAMES_H + +/** + * \file + * \brief C++ API: TimeZoneNames + */ +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/uloc.h" +#include "unicode/unistr.h" + +U_CDECL_BEGIN + +/** + * Constants for time zone display name types. + * @stable ICU 50 + */ +typedef enum UTimeZoneNameType { + /** + * Unknown display name type. + * @stable ICU 50 + */ + UTZNM_UNKNOWN = 0x00, + /** + * Long display name, such as "Eastern Time". + * @stable ICU 50 + */ + UTZNM_LONG_GENERIC = 0x01, + /** + * Long display name for standard time, such as "Eastern Standard Time". + * @stable ICU 50 + */ + UTZNM_LONG_STANDARD = 0x02, + /** + * Long display name for daylight saving time, such as "Eastern Daylight Time". + * @stable ICU 50 + */ + UTZNM_LONG_DAYLIGHT = 0x04, + /** + * Short display name, such as "ET". + * @stable ICU 50 + */ + UTZNM_SHORT_GENERIC = 0x08, + /** + * Short display name for standard time, such as "EST". + * @stable ICU 50 + */ + UTZNM_SHORT_STANDARD = 0x10, + /** + * Short display name for daylight saving time, such as "EDT". + * @stable ICU 50 + */ + UTZNM_SHORT_DAYLIGHT = 0x20, + /** + * Exemplar location name, such as "Los Angeles". + * @stable ICU 51 + */ + UTZNM_EXEMPLAR_LOCATION = 0x40 +} UTimeZoneNameType; + +U_CDECL_END + +U_NAMESPACE_BEGIN + +class UVector; +struct MatchInfo; + +/** + * <code>TimeZoneNames</code> is an abstract class representing the time zone display name data model defined + * by <a href="http://www.unicode.org/reports/tr35/">UTS#35 Unicode Locale Data Markup Language (LDML)</a>. + * The model defines meta zone, which is used for storing a set of display names. A meta zone can be shared + * by multiple time zones. Also a time zone may have multiple meta zone historic mappings. + * <p> + * For example, people in the United States refer the zone used by the east part of North America as "Eastern Time". + * The tz database contains multiple time zones "America/New_York", "America/Detroit", "America/Montreal" and some + * others that belong to "Eastern Time". However, assigning different display names to these time zones does not make + * much sense for most of people. + * <p> + * In <a href="http://cldr.unicode.org/">CLDR</a> (which uses LDML for representing locale data), the display name + * "Eastern Time" is stored as long generic display name of a meta zone identified by the ID "America_Eastern". + * Then, there is another table maintaining the historic mapping to meta zones for each time zone. The time zones in + * the above example ("America/New_York", "America/Detroit"...) are mapped to the meta zone "America_Eastern". + * <p> + * Sometimes, a time zone is mapped to a different time zone in the past. For example, "America/Indiana/Knox" + * had been moving "Eastern Time" and "Central Time" back and forth. Therefore, it is necessary that time zone + * to meta zones mapping data are stored by date range. + * + * <p><b>Note:</b> + * The methods in this class assume that time zone IDs are already canonicalized. For example, you may not get proper + * result returned by a method with time zone ID "America/Indiana/Indianapolis", because it's not a canonical time zone + * ID (the canonical time zone ID for the time zone is "America/Indianapolis". See + * {@link TimeZone#getCanonicalID(const UnicodeString& id, UnicodeString& canonicalID, UErrorCode& status)} about ICU + * canonical time zone IDs. + * + * <p> + * In CLDR, most of time zone display names except location names are provided through meta zones. But a time zone may + * have a specific name that is not shared with other time zones. + * + * For example, time zone "Europe/London" has English long name for standard time "Greenwich Mean Time", which is also + * shared with other time zones. However, the long name for daylight saving time is "British Summer Time", which is only + * used for "Europe/London". + * + * <p> + * {@link #getTimeZoneDisplayName} is designed for accessing a name only used by a single time zone. + * But is not necessarily mean that a subclass implementation use the same model with CLDR. A subclass implementation + * may provide time zone names only through {@link #getTimeZoneDisplayName}, or only through {@link #getMetaZoneDisplayName}, + * or both. + * + * <p> + * The default <code>TimeZoneNames</code> implementation returned by {@link #createInstance} + * uses the locale data imported from CLDR. In CLDR, set of meta zone IDs and mappings between zone IDs and meta zone + * IDs are shared by all locales. Therefore, the behavior of {@link #getAvailableMetaZoneIDs}, + * {@link #getMetaZoneID}, and {@link #getReferenceZoneID} won't be changed no matter + * what locale is used for getting an instance of <code>TimeZoneNames</code>. + * + * @stable ICU 50 + */ +class U_I18N_API TimeZoneNames : public UObject { +public: + /** + * Destructor. + * @stable ICU 50 + */ + virtual ~TimeZoneNames(); + + /** + * Return true if the given TimeZoneNames objects are semantically equal. + * @param other the object to be compared with. + * @return Return TRUE if the given Format objects are semantically equal. + * @stable ICU 50 + */ + virtual UBool operator==(const TimeZoneNames& other) const = 0; + + /** + * Return true if the given TimeZoneNames objects are not semantically + * equal. + * @param other the object to be compared with. + * @return Return TRUE if the given Format objects are not semantically equal. + * @stable ICU 50 + */ + UBool operator!=(const TimeZoneNames& other) const { return !operator==(other); } + + /** + * Clone this object polymorphically. The caller is responsible + * for deleting the result when done. + * @return A copy of the object + * @stable ICU 50 + */ + virtual TimeZoneNames* clone() const = 0; + + /** + * Returns an instance of <code>TimeZoneNames</code> for the specified locale. + * + * @param locale The locale. + * @param status Receives the status. + * @return An instance of <code>TimeZoneNames</code> + * @stable ICU 50 + */ + static TimeZoneNames* U_EXPORT2 createInstance(const Locale& locale, UErrorCode& status); + + /** + * Returns an instance of <code>TimeZoneNames</code> containing only short specific + * zone names (SHORT_STANDARD and SHORT_DAYLIGHT), + * compatible with the IANA tz database's zone abbreviations (not localized). + * <br> + * Note: The input locale is used for resolving ambiguous names (e.g. "IST" is parsed + * as Israel Standard Time for Israel, while it is parsed as India Standard Time for + * all other regions). The zone names returned by this instance are not localized. + * @stable ICU 54 + */ + static TimeZoneNames* U_EXPORT2 createTZDBInstance(const Locale& locale, UErrorCode& status); + + /** + * Returns an enumeration of all available meta zone IDs. + * @param status Receives the status. + * @return an enumeration object, owned by the caller. + * @stable ICU 50 + */ + virtual StringEnumeration* getAvailableMetaZoneIDs(UErrorCode& status) const = 0; + + /** + * Returns an enumeration of all available meta zone IDs used by the given time zone. + * @param tzID The canoical tiem zone ID. + * @param status Receives the status. + * @return an enumeration object, owned by the caller. + * @stable ICU 50 + */ + virtual StringEnumeration* getAvailableMetaZoneIDs(const UnicodeString& tzID, UErrorCode& status) const = 0; + + /** + * Returns the meta zone ID for the given canonical time zone ID at the given date. + * @param tzID The canonical time zone ID. + * @param date The date. + * @param mzID Receives the meta zone ID for the given time zone ID at the given date. If the time zone does not have a + * corresponding meta zone at the given date or the implementation does not support meta zones, "bogus" state + * is set. + * @return A reference to the result. + * @stable ICU 50 + */ + virtual UnicodeString& getMetaZoneID(const UnicodeString& tzID, UDate date, UnicodeString& mzID) const = 0; + + /** + * Returns the reference zone ID for the given meta zone ID for the region. + * + * Note: Each meta zone must have a reference zone associated with a special region "001" (world). + * Some meta zones may have region specific reference zone IDs other than the special region + * "001". When a meta zone does not have any region specific reference zone IDs, this method + * return the reference zone ID for the special region "001" (world). + * + * @param mzID The meta zone ID. + * @param region The region. + * @param tzID Receives the reference zone ID ("golden zone" in the LDML specification) for the given time zone ID for the + * region. If the meta zone is unknown or the implementation does not support meta zones, "bogus" state + * is set. + * @return A reference to the result. + * @stable ICU 50 + */ + virtual UnicodeString& getReferenceZoneID(const UnicodeString& mzID, const char* region, UnicodeString& tzID) const = 0; + + /** + * Returns the display name of the meta zone. + * @param mzID The meta zone ID. + * @param type The display name type. See {@link #UTimeZoneNameType}. + * @param name Receives the display name of the meta zone. When this object does not have a localized display name for the given + * meta zone with the specified type or the implementation does not provide any display names associated + * with meta zones, "bogus" state is set. + * @return A reference to the result. + * @stable ICU 50 + */ + virtual UnicodeString& getMetaZoneDisplayName(const UnicodeString& mzID, UTimeZoneNameType type, UnicodeString& name) const = 0; + + /** + * Returns the display name of the time zone. Unlike {@link #getDisplayName}, + * this method does not get a name from a meta zone used by the time zone. + * @param tzID The canonical time zone ID. + * @param type The display name type. See {@link #UTimeZoneNameType}. + * @param name Receives the display name for the time zone. When this object does not have a localized display name for the given + * time zone with the specified type, "bogus" state is set. + * @return A reference to the result. + * @stable ICU 50 + */ + virtual UnicodeString& getTimeZoneDisplayName(const UnicodeString& tzID, UTimeZoneNameType type, UnicodeString& name) const = 0; + + /** + * Returns the exemplar location name for the given time zone. When this object does not have a localized location + * name, the default implementation may still returns a programmatically generated name with the logic described + * below. + * <ol> + * <li>Check if the ID contains "/". If not, return null. + * <li>Check if the ID does not start with "Etc/" or "SystemV/". If it does, return null. + * <li>Extract a substring after the last occurrence of "/". + * <li>Replace "_" with " ". + * </ol> + * For example, "New York" is returned for the time zone ID "America/New_York" when this object does not have the + * localized location name. + * + * @param tzID The canonical time zone ID + * @param name Receives the exemplar location name for the given time zone, or "bogus" state is set when a localized + * location name is not available and the fallback logic described above cannot extract location from the ID. + * @return A reference to the result. + * @stable ICU 50 + */ + virtual UnicodeString& getExemplarLocationName(const UnicodeString& tzID, UnicodeString& name) const; + + /** + * Returns the display name of the time zone at the given date. + * <p> + * <b>Note:</b> This method calls the subclass's {@link #getTimeZoneDisplayName} first. When the + * result is bogus, this method calls {@link #getMetaZoneID} to get the meta zone ID mapped from the + * time zone, then calls {@link #getMetaZoneDisplayName}. + * + * @param tzID The canonical time zone ID. + * @param type The display name type. See {@link #UTimeZoneNameType}. + * @param date The date. + * @param name Receives the display name for the time zone at the given date. When this object does not have a localized display + * name for the time zone with the specified type and date, "bogus" state is set. + * @return A reference to the result. + * @stable ICU 50 + */ + virtual UnicodeString& getDisplayName(const UnicodeString& tzID, UTimeZoneNameType type, UDate date, UnicodeString& name) const; + + /** + * @internal ICU internal only, for specific users only until proposed publicly. + */ + virtual void loadAllDisplayNames(UErrorCode& status); + + /** + * @internal ICU internal only, for specific users only until proposed publicly. + */ + virtual void getDisplayNames(const UnicodeString& tzID, const UTimeZoneNameType types[], int32_t numTypes, UDate date, UnicodeString dest[], UErrorCode& status) const; + + /** + * <code>MatchInfoCollection</code> represents a collection of time zone name matches used by + * {@link TimeZoneNames#find}. + * @internal + */ + class U_I18N_API MatchInfoCollection : public UMemory { + public: + /** + * Constructor. + * @internal + */ + MatchInfoCollection(); + /** + * Destructor. + * @internal + */ + virtual ~MatchInfoCollection(); + +#ifndef U_HIDE_INTERNAL_API + /** + * Adds a zone match. + * @param nameType The name type. + * @param matchLength The match length. + * @param tzID The time zone ID. + * @param status Receives the status + * @internal + */ + void addZone(UTimeZoneNameType nameType, int32_t matchLength, + const UnicodeString& tzID, UErrorCode& status); + + /** + * Adds a meata zone match. + * @param nameType The name type. + * @param matchLength The match length. + * @param mzID The metazone ID. + * @param status Receives the status + * @internal + */ + void addMetaZone(UTimeZoneNameType nameType, int32_t matchLength, + const UnicodeString& mzID, UErrorCode& status); + + /** + * Returns the number of entries available in this object. + * @return The number of entries. + * @internal + */ + int32_t size() const; + + /** + * Returns the time zone name type of a match at the specified index. + * @param idx The index + * @return The time zone name type. If the specified idx is out of range, + * it returns UTZNM_UNKNOWN. + * @see UTimeZoneNameType + * @internal + */ + UTimeZoneNameType getNameTypeAt(int32_t idx) const; + + /** + * Returns the match length of a match at the specified index. + * @param idx The index + * @return The match length. If the specified idx is out of range, + * it returns 0. + * @internal + */ + int32_t getMatchLengthAt(int32_t idx) const; + + /** + * Gets the zone ID of a match at the specified index. + * @param idx The index + * @param tzID Receives the zone ID. + * @return TRUE if the zone ID was set to tzID. + * @internal + */ + UBool getTimeZoneIDAt(int32_t idx, UnicodeString& tzID) const; + + /** + * Gets the metazone ID of a match at the specified index. + * @param idx The index + * @param mzID Receives the metazone ID + * @return TRUE if the meta zone ID was set to mzID. + * @internal + */ + UBool getMetaZoneIDAt(int32_t idx, UnicodeString& mzID) const; +#endif /* U_HIDE_INTERNAL_API */ + + private: + UVector* fMatches; // vector of MatchEntry + + UVector* matches(UErrorCode& status); + }; + + /** + * Finds time zone name prefix matches for the input text at the + * given offset and returns a collection of the matches. + * @param text The text. + * @param start The starting offset within the text. + * @param types The set of name types represented by bitwise flags of UTimeZoneNameType enums, + * or UTZNM_UNKNOWN for all name types. + * @param status Receives the status. + * @return A collection of matches (owned by the caller), or NULL if no matches are found. + * @see UTimeZoneNameType + * @see MatchInfoCollection + * @internal + */ + virtual MatchInfoCollection* find(const UnicodeString& text, int32_t start, uint32_t types, UErrorCode& status) const = 0; +}; + +U_NAMESPACE_END + +#endif +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tzrule.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tzrule.h new file mode 100755 index 00000000..1647fda7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tzrule.h @@ -0,0 +1,830 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2007-2008, International Business Machines Corporation and * +* others. All Rights Reserved. * +******************************************************************************* +*/ +#ifndef TZRULE_H +#define TZRULE_H + +/** + * \file + * \brief C++ API: Time zone rule classes + */ + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/uobject.h" +#include "unicode/unistr.h" +#include "unicode/dtrule.h" + +U_NAMESPACE_BEGIN + +/** + * <code>TimeZoneRule</code> is a class representing a rule for time zone. + * <code>TimeZoneRule</code> has a set of time zone attributes, such as zone name, + * raw offset (UTC offset for standard time) and daylight saving time offset. + * + * @stable ICU 3.8 + */ +class U_I18N_API TimeZoneRule : public UObject { +public: + /** + * Destructor. + * @stable ICU 3.8 + */ + virtual ~TimeZoneRule(); + + /** + * Clone this TimeZoneRule object polymorphically. The caller owns the result and + * should delete it when done. + * @return A copy of the object. + * @stable ICU 3.8 + */ + virtual TimeZoneRule* clone(void) const = 0; + + /** + * Return true if the given <code>TimeZoneRule</code> objects are semantically equal. Objects + * of different subclasses are considered unequal. + * @param that The object to be compared with. + * @return true if the given <code>TimeZoneRule</code> objects are semantically equal. + * @stable ICU 3.8 + */ + virtual UBool operator==(const TimeZoneRule& that) const; + + /** + * Return true if the given <code>TimeZoneRule</code> objects are semantically unequal. Objects + * of different subclasses are considered unequal. + * @param that The object to be compared with. + * @return true if the given <code>TimeZoneRule</code> objects are semantically unequal. + * @stable ICU 3.8 + */ + virtual UBool operator!=(const TimeZoneRule& that) const; + + /** + * Fills in "name" with the name of this time zone. + * @param name Receives the name of this time zone. + * @return A reference to "name" + * @stable ICU 3.8 + */ + UnicodeString& getName(UnicodeString& name) const; + + /** + * Gets the standard time offset. + * @return The standard time offset from UTC in milliseconds. + * @stable ICU 3.8 + */ + int32_t getRawOffset(void) const; + + /** + * Gets the amount of daylight saving delta time from the standard time. + * @return The amount of daylight saving offset used by this rule + * in milliseconds. + * @stable ICU 3.8 + */ + int32_t getDSTSavings(void) const; + + /** + * Returns if this rule represents the same rule and offsets as another. + * When two <code>TimeZoneRule</code> objects differ only its names, this method + * returns true. + * @param other The <code>TimeZoneRule</code> object to be compared with. + * @return true if the other <code>TimeZoneRule</code> is the same as this one. + * @stable ICU 3.8 + */ + virtual UBool isEquivalentTo(const TimeZoneRule& other) const; + + /** + * Gets the very first time when this rule takes effect. + * @param prevRawOffset The standard time offset from UTC before this rule + * takes effect in milliseconds. + * @param prevDSTSavings The amount of daylight saving offset from the + * standard time. + * @param result Receives the very first time when this rule takes effect. + * @return true if the start time is available. When false is returned, output parameter + * "result" is unchanged. + * @stable ICU 3.8 + */ + virtual UBool getFirstStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const = 0; + + /** + * Gets the final time when this rule takes effect. + * @param prevRawOffset The standard time offset from UTC before this rule + * takes effect in milliseconds. + * @param prevDSTSavings The amount of daylight saving offset from the + * standard time. + * @param result Receives the final time when this rule takes effect. + * @return true if the start time is available. When false is returned, output parameter + * "result" is unchanged. + * @stable ICU 3.8 + */ + virtual UBool getFinalStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const = 0; + + /** + * Gets the first time when this rule takes effect after the specified time. + * @param base The first start time after this base time will be returned. + * @param prevRawOffset The standard time offset from UTC before this rule + * takes effect in milliseconds. + * @param prevDSTSavings The amount of daylight saving offset from the + * standard time. + * @param inclusive Whether the base time is inclusive or not. + * @param result Receives The first time when this rule takes effect after + * the specified base time. + * @return true if the start time is available. When false is returned, output parameter + * "result" is unchanged. + * @stable ICU 3.8 + */ + virtual UBool getNextStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings, + UBool inclusive, UDate& result) const = 0; + + /** + * Gets the most recent time when this rule takes effect before the specified time. + * @param base The most recent time before this base time will be returned. + * @param prevRawOffset The standard time offset from UTC before this rule + * takes effect in milliseconds. + * @param prevDSTSavings The amount of daylight saving offset from the + * standard time. + * @param inclusive Whether the base time is inclusive or not. + * @param result Receives The most recent time when this rule takes effect before + * the specified base time. + * @return true if the start time is available. When false is returned, output parameter + * "result" is unchanged. + * @stable ICU 3.8 + */ + virtual UBool getPreviousStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings, + UBool inclusive, UDate& result) const = 0; + +protected: + + /** + * Constructs a <code>TimeZoneRule</code> with the name, the GMT offset of its + * standard time and the amount of daylight saving offset adjustment. + * @param name The time zone name. + * @param rawOffset The UTC offset of its standard time in milliseconds. + * @param dstSavings The amount of daylight saving offset adjustment in milliseconds. + * If this ia a rule for standard time, the value of this argument is 0. + * @stable ICU 3.8 + */ + TimeZoneRule(const UnicodeString& name, int32_t rawOffset, int32_t dstSavings); + + /** + * Copy constructor. + * @param source The TimeZoneRule object to be copied. + * @stable ICU 3.8 + */ + TimeZoneRule(const TimeZoneRule& source); + + /** + * Assignment operator. + * @param right The object to be copied. + * @stable ICU 3.8 + */ + TimeZoneRule& operator=(const TimeZoneRule& right); + +private: + UnicodeString fName; // time name + int32_t fRawOffset; // UTC offset of the standard time in milliseconds + int32_t fDSTSavings; // DST saving amount in milliseconds +}; + +/** + * <code>InitialTimeZoneRule</code> represents a time zone rule + * representing a time zone effective from the beginning and + * has no actual start times. + * @stable ICU 3.8 + */ +class U_I18N_API InitialTimeZoneRule : public TimeZoneRule { +public: + /** + * Constructs an <code>InitialTimeZoneRule</code> with the name, the GMT offset of its + * standard time and the amount of daylight saving offset adjustment. + * @param name The time zone name. + * @param rawOffset The UTC offset of its standard time in milliseconds. + * @param dstSavings The amount of daylight saving offset adjustment in milliseconds. + * If this ia a rule for standard time, the value of this argument is 0. + * @stable ICU 3.8 + */ + InitialTimeZoneRule(const UnicodeString& name, int32_t rawOffset, int32_t dstSavings); + + /** + * Copy constructor. + * @param source The InitialTimeZoneRule object to be copied. + * @stable ICU 3.8 + */ + InitialTimeZoneRule(const InitialTimeZoneRule& source); + + /** + * Destructor. + * @stable ICU 3.8 + */ + virtual ~InitialTimeZoneRule(); + + /** + * Clone this InitialTimeZoneRule object polymorphically. The caller owns the result and + * should delete it when done. + * @return A copy of the object. + * @stable ICU 3.8 + */ + virtual InitialTimeZoneRule* clone(void) const; + + /** + * Assignment operator. + * @param right The object to be copied. + * @stable ICU 3.8 + */ + InitialTimeZoneRule& operator=(const InitialTimeZoneRule& right); + + /** + * Return true if the given <code>TimeZoneRule</code> objects are semantically equal. Objects + * of different subclasses are considered unequal. + * @param that The object to be compared with. + * @return true if the given <code>TimeZoneRule</code> objects are semantically equal. + * @stable ICU 3.8 + */ + virtual UBool operator==(const TimeZoneRule& that) const; + + /** + * Return true if the given <code>TimeZoneRule</code> objects are semantically unequal. Objects + * of different subclasses are considered unequal. + * @param that The object to be compared with. + * @return true if the given <code>TimeZoneRule</code> objects are semantically unequal. + * @stable ICU 3.8 + */ + virtual UBool operator!=(const TimeZoneRule& that) const; + + /** + * Gets the time when this rule takes effect in the given year. + * @param year The Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc. + * @param prevRawOffset The standard time offset from UTC before this rule + * takes effect in milliseconds. + * @param prevDSTSavings The amount of daylight saving offset from the + * standard time. + * @param result Receives the start time in the year. + * @return true if this rule takes effect in the year and the result is set to + * "result". + * @stable ICU 3.8 + */ + UBool getStartInYear(int32_t year, int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const; + + /** + * Returns if this rule represents the same rule and offsets as another. + * When two <code>TimeZoneRule</code> objects differ only its names, this method + * returns true. + * @param that The <code>TimeZoneRule</code> object to be compared with. + * @return true if the other <code>TimeZoneRule</code> is equivalent to this one. + * @stable ICU 3.8 + */ + virtual UBool isEquivalentTo(const TimeZoneRule& that) const; + + /** + * Gets the very first time when this rule takes effect. + * @param prevRawOffset The standard time offset from UTC before this rule + * takes effect in milliseconds. + * @param prevDSTSavings The amount of daylight saving offset from the + * standard time. + * @param result Receives the very first time when this rule takes effect. + * @return true if the start time is available. When false is returned, output parameter + * "result" is unchanged. + * @stable ICU 3.8 + */ + virtual UBool getFirstStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const; + + /** + * Gets the final time when this rule takes effect. + * @param prevRawOffset The standard time offset from UTC before this rule + * takes effect in milliseconds. + * @param prevDSTSavings The amount of daylight saving offset from the + * standard time. + * @param result Receives the final time when this rule takes effect. + * @return true if the start time is available. When false is returned, output parameter + * "result" is unchanged. + * @stable ICU 3.8 + */ + virtual UBool getFinalStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const; + + /** + * Gets the first time when this rule takes effect after the specified time. + * @param base The first start time after this base time will be returned. + * @param prevRawOffset The standard time offset from UTC before this rule + * takes effect in milliseconds. + * @param prevDSTSavings The amount of daylight saving offset from the + * standard time. + * @param inclusive Whether the base time is inclusive or not. + * @param result Receives The first time when this rule takes effect after + * the specified base time. + * @return true if the start time is available. When false is returned, output parameter + * "result" is unchanged. + * @stable ICU 3.8 + */ + virtual UBool getNextStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings, + UBool inclusive, UDate& result) const; + + /** + * Gets the most recent time when this rule takes effect before the specified time. + * @param base The most recent time before this base time will be returned. + * @param prevRawOffset The standard time offset from UTC before this rule + * takes effect in milliseconds. + * @param prevDSTSavings The amount of daylight saving offset from the + * standard time. + * @param inclusive Whether the base time is inclusive or not. + * @param result Receives The most recent time when this rule takes effect before + * the specified base time. + * @return true if the start time is available. When false is returned, output parameter + * "result" is unchanged. + * @stable ICU 3.8 + */ + virtual UBool getPreviousStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings, + UBool inclusive, UDate& result) const; + +public: + /** + * Return the class ID for this class. This is useful only for comparing to + * a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . erived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 3.8 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This + * method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() + * methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 3.8 + */ + virtual UClassID getDynamicClassID(void) const; +}; + +/** + * <code>AnnualTimeZoneRule</code> is a class used for representing a time zone + * rule which takes effect annually. The calenday system used for the rule is + * is based on Gregorian calendar + * + * @stable ICU 3.8 + */ +class U_I18N_API AnnualTimeZoneRule : public TimeZoneRule { +public: + /** + * The constant representing the maximum year used for designating + * a rule is permanent. + */ + static const int32_t MAX_YEAR; + + /** + * Constructs a <code>AnnualTimeZoneRule</code> with the name, the GMT offset of its + * standard time, the amount of daylight saving offset adjustment, the annual start + * time rule and the start/until years. The input DateTimeRule is copied by this + * constructor, so the caller remains responsible for deleting the object. + * @param name The time zone name. + * @param rawOffset The GMT offset of its standard time in milliseconds. + * @param dstSavings The amount of daylight saving offset adjustment in + * milliseconds. If this ia a rule for standard time, + * the value of this argument is 0. + * @param dateTimeRule The start date/time rule repeated annually. + * @param startYear The first year when this rule takes effect. + * @param endYear The last year when this rule takes effect. If this + * rule is effective forever in future, specify MAX_YEAR. + * @stable ICU 3.8 + */ + AnnualTimeZoneRule(const UnicodeString& name, int32_t rawOffset, int32_t dstSavings, + const DateTimeRule& dateTimeRule, int32_t startYear, int32_t endYear); + + /** + * Constructs a <code>AnnualTimeZoneRule</code> with the name, the GMT offset of its + * standard time, the amount of daylight saving offset adjustment, the annual start + * time rule and the start/until years. The input DateTimeRule object is adopted + * by this object, therefore, the caller must not delete the object. + * @param name The time zone name. + * @param rawOffset The GMT offset of its standard time in milliseconds. + * @param dstSavings The amount of daylight saving offset adjustment in + * milliseconds. If this ia a rule for standard time, + * the value of this argument is 0. + * @param dateTimeRule The start date/time rule repeated annually. + * @param startYear The first year when this rule takes effect. + * @param endYear The last year when this rule takes effect. If this + * rule is effective forever in future, specify MAX_YEAR. + * @stable ICU 3.8 + */ + AnnualTimeZoneRule(const UnicodeString& name, int32_t rawOffset, int32_t dstSavings, + DateTimeRule* dateTimeRule, int32_t startYear, int32_t endYear); + + /** + * Copy constructor. + * @param source The AnnualTimeZoneRule object to be copied. + * @stable ICU 3.8 + */ + AnnualTimeZoneRule(const AnnualTimeZoneRule& source); + + /** + * Destructor. + * @stable ICU 3.8 + */ + virtual ~AnnualTimeZoneRule(); + + /** + * Clone this AnnualTimeZoneRule object polymorphically. The caller owns the result and + * should delete it when done. + * @return A copy of the object. + * @stable ICU 3.8 + */ + virtual AnnualTimeZoneRule* clone(void) const; + + /** + * Assignment operator. + * @param right The object to be copied. + * @stable ICU 3.8 + */ + AnnualTimeZoneRule& operator=(const AnnualTimeZoneRule& right); + + /** + * Return true if the given <code>TimeZoneRule</code> objects are semantically equal. Objects + * of different subclasses are considered unequal. + * @param that The object to be compared with. + * @return true if the given <code>TimeZoneRule</code> objects are semantically equal. + * @stable ICU 3.8 + */ + virtual UBool operator==(const TimeZoneRule& that) const; + + /** + * Return true if the given <code>TimeZoneRule</code> objects are semantically unequal. Objects + * of different subclasses are considered unequal. + * @param that The object to be compared with. + * @return true if the given <code>TimeZoneRule</code> objects are semantically unequal. + * @stable ICU 3.8 + */ + virtual UBool operator!=(const TimeZoneRule& that) const; + + /** + * Gets the start date/time rule used by this rule. + * @return The <code>AnnualDateTimeRule</code> which represents the start date/time + * rule used by this time zone rule. + * @stable ICU 3.8 + */ + const DateTimeRule* getRule(void) const; + + /** + * Gets the first year when this rule takes effect. + * @return The start year of this rule. The year is in Gregorian calendar + * with 0 == 1 BCE, -1 == 2 BCE, etc. + * @stable ICU 3.8 + */ + int32_t getStartYear(void) const; + + /** + * Gets the end year when this rule takes effect. + * @return The end year of this rule (inclusive). The year is in Gregorian calendar + * with 0 == 1 BCE, -1 == 2 BCE, etc. + * @stable ICU 3.8 + */ + int32_t getEndYear(void) const; + + /** + * Gets the time when this rule takes effect in the given year. + * @param year The Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc. + * @param prevRawOffset The standard time offset from UTC before this rule + * takes effect in milliseconds. + * @param prevDSTSavings The amount of daylight saving offset from the + * standard time. + * @param result Receives the start time in the year. + * @return true if this rule takes effect in the year and the result is set to + * "result". + * @stable ICU 3.8 + */ + UBool getStartInYear(int32_t year, int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const; + + /** + * Returns if this rule represents the same rule and offsets as another. + * When two <code>TimeZoneRule</code> objects differ only its names, this method + * returns true. + * @param that The <code>TimeZoneRule</code> object to be compared with. + * @return true if the other <code>TimeZoneRule</code> is equivalent to this one. + * @stable ICU 3.8 + */ + virtual UBool isEquivalentTo(const TimeZoneRule& that) const; + + /** + * Gets the very first time when this rule takes effect. + * @param prevRawOffset The standard time offset from UTC before this rule + * takes effect in milliseconds. + * @param prevDSTSavings The amount of daylight saving offset from the + * standard time. + * @param result Receives the very first time when this rule takes effect. + * @return true if the start time is available. When false is returned, output parameter + * "result" is unchanged. + * @stable ICU 3.8 + */ + virtual UBool getFirstStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const; + + /** + * Gets the final time when this rule takes effect. + * @param prevRawOffset The standard time offset from UTC before this rule + * takes effect in milliseconds. + * @param prevDSTSavings The amount of daylight saving offset from the + * standard time. + * @param result Receives the final time when this rule takes effect. + * @return true if the start time is available. When false is returned, output parameter + * "result" is unchanged. + * @stable ICU 3.8 + */ + virtual UBool getFinalStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const; + + /** + * Gets the first time when this rule takes effect after the specified time. + * @param base The first start time after this base time will be returned. + * @param prevRawOffset The standard time offset from UTC before this rule + * takes effect in milliseconds. + * @param prevDSTSavings The amount of daylight saving offset from the + * standard time. + * @param inclusive Whether the base time is inclusive or not. + * @param result Receives The first time when this rule takes effect after + * the specified base time. + * @return true if the start time is available. When false is returned, output parameter + * "result" is unchanged. + * @stable ICU 3.8 + */ + virtual UBool getNextStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings, + UBool inclusive, UDate& result) const; + + /** + * Gets the most recent time when this rule takes effect before the specified time. + * @param base The most recent time before this base time will be returned. + * @param prevRawOffset The standard time offset from UTC before this rule + * takes effect in milliseconds. + * @param prevDSTSavings The amount of daylight saving offset from the + * standard time. + * @param inclusive Whether the base time is inclusive or not. + * @param result Receives The most recent time when this rule takes effect before + * the specified base time. + * @return true if the start time is available. When false is returned, output parameter + * "result" is unchanged. + * @stable ICU 3.8 + */ + virtual UBool getPreviousStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings, + UBool inclusive, UDate& result) const; + + +private: + DateTimeRule* fDateTimeRule; + int32_t fStartYear; + int32_t fEndYear; + +public: + /** + * Return the class ID for this class. This is useful only for comparing to + * a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . erived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 3.8 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This + * method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() + * methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 3.8 + */ + virtual UClassID getDynamicClassID(void) const; +}; + +/** + * <code>TimeArrayTimeZoneRule</code> represents a time zone rule whose start times are + * defined by an array of milliseconds since the standard base time. + * + * @stable ICU 3.8 + */ +class U_I18N_API TimeArrayTimeZoneRule : public TimeZoneRule { +public: + /** + * Constructs a <code>TimeArrayTimeZoneRule</code> with the name, the GMT offset of its + * standard time, the amount of daylight saving offset adjustment and + * the array of times when this rule takes effect. + * @param name The time zone name. + * @param rawOffset The UTC offset of its standard time in milliseconds. + * @param dstSavings The amount of daylight saving offset adjustment in + * milliseconds. If this ia a rule for standard time, + * the value of this argument is 0. + * @param startTimes The array start times in milliseconds since the base time + * (January 1, 1970, 00:00:00). + * @param numStartTimes The number of elements in the parameter "startTimes" + * @param timeRuleType The time type of the start times, which is one of + * <code>DataTimeRule::WALL_TIME</code>, <code>STANDARD_TIME</code> + * and <code>UTC_TIME</code>. + * @stable ICU 3.8 + */ + TimeArrayTimeZoneRule(const UnicodeString& name, int32_t rawOffset, int32_t dstSavings, + const UDate* startTimes, int32_t numStartTimes, DateTimeRule::TimeRuleType timeRuleType); + + /** + * Copy constructor. + * @param source The TimeArrayTimeZoneRule object to be copied. + * @stable ICU 3.8 + */ + TimeArrayTimeZoneRule(const TimeArrayTimeZoneRule& source); + + /** + * Destructor. + * @stable ICU 3.8 + */ + virtual ~TimeArrayTimeZoneRule(); + + /** + * Clone this TimeArrayTimeZoneRule object polymorphically. The caller owns the result and + * should delete it when done. + * @return A copy of the object. + * @stable ICU 3.8 + */ + virtual TimeArrayTimeZoneRule* clone(void) const; + + /** + * Assignment operator. + * @param right The object to be copied. + * @stable ICU 3.8 + */ + TimeArrayTimeZoneRule& operator=(const TimeArrayTimeZoneRule& right); + + /** + * Return true if the given <code>TimeZoneRule</code> objects are semantically equal. Objects + * of different subclasses are considered unequal. + * @param that The object to be compared with. + * @return true if the given <code>TimeZoneRule</code> objects are semantically equal. + * @stable ICU 3.8 + */ + virtual UBool operator==(const TimeZoneRule& that) const; + + /** + * Return true if the given <code>TimeZoneRule</code> objects are semantically unequal. Objects + * of different subclasses are considered unequal. + * @param that The object to be compared with. + * @return true if the given <code>TimeZoneRule</code> objects are semantically unequal. + * @stable ICU 3.8 + */ + virtual UBool operator!=(const TimeZoneRule& that) const; + + /** + * Gets the time type of the start times used by this rule. The return value + * is either <code>DateTimeRule::WALL_TIME</code> or <code>STANDARD_TIME</code> + * or <code>UTC_TIME</code>. + * + * @return The time type used of the start times used by this rule. + * @stable ICU 3.8 + */ + DateTimeRule::TimeRuleType getTimeType(void) const; + + /** + * Gets a start time at the index stored in this rule. + * @param index The index of start times + * @param result Receives the start time at the index + * @return true if the index is within the valid range and + * and the result is set. When false, the output + * parameger "result" is unchanged. + * @stable ICU 3.8 + */ + UBool getStartTimeAt(int32_t index, UDate& result) const; + + /** + * Returns the number of start times stored in this rule + * @return The number of start times. + * @stable ICU 3.8 + */ + int32_t countStartTimes(void) const; + + /** + * Returns if this rule represents the same rule and offsets as another. + * When two <code>TimeZoneRule</code> objects differ only its names, this method + * returns true. + * @param that The <code>TimeZoneRule</code> object to be compared with. + * @return true if the other <code>TimeZoneRule</code> is equivalent to this one. + * @stable ICU 3.8 + */ + virtual UBool isEquivalentTo(const TimeZoneRule& that) const; + + /** + * Gets the very first time when this rule takes effect. + * @param prevRawOffset The standard time offset from UTC before this rule + * takes effect in milliseconds. + * @param prevDSTSavings The amount of daylight saving offset from the + * standard time. + * @param result Receives the very first time when this rule takes effect. + * @return true if the start time is available. When false is returned, output parameter + * "result" is unchanged. + * @stable ICU 3.8 + */ + virtual UBool getFirstStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const; + + /** + * Gets the final time when this rule takes effect. + * @param prevRawOffset The standard time offset from UTC before this rule + * takes effect in milliseconds. + * @param prevDSTSavings The amount of daylight saving offset from the + * standard time. + * @param result Receives the final time when this rule takes effect. + * @return true if the start time is available. When false is returned, output parameter + * "result" is unchanged. + * @stable ICU 3.8 + */ + virtual UBool getFinalStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const; + + /** + * Gets the first time when this rule takes effect after the specified time. + * @param base The first start time after this base time will be returned. + * @param prevRawOffset The standard time offset from UTC before this rule + * takes effect in milliseconds. + * @param prevDSTSavings The amount of daylight saving offset from the + * standard time. + * @param inclusive Whether the base time is inclusive or not. + * @param result Receives The first time when this rule takes effect after + * the specified base time. + * @return true if the start time is available. When false is returned, output parameter + * "result" is unchanged. + * @stable ICU 3.8 + */ + virtual UBool getNextStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings, + UBool inclusive, UDate& result) const; + + /** + * Gets the most recent time when this rule takes effect before the specified time. + * @param base The most recent time before this base time will be returned. + * @param prevRawOffset The standard time offset from UTC before this rule + * takes effect in milliseconds. + * @param prevDSTSavings The amount of daylight saving offset from the + * standard time. + * @param inclusive Whether the base time is inclusive or not. + * @param result Receives The most recent time when this rule takes effect before + * the specified base time. + * @return true if the start time is available. When false is returned, output parameter + * "result" is unchanged. + * @stable ICU 3.8 + */ + virtual UBool getPreviousStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings, + UBool inclusive, UDate& result) const; + + +private: + enum { TIMEARRAY_STACK_BUFFER_SIZE = 32 }; + UBool initStartTimes(const UDate source[], int32_t size, UErrorCode& ec); + UDate getUTC(UDate time, int32_t raw, int32_t dst) const; + + DateTimeRule::TimeRuleType fTimeRuleType; + int32_t fNumStartTimes; + UDate* fStartTimes; + UDate fLocalStartTimes[TIMEARRAY_STACK_BUFFER_SIZE]; + +public: + /** + * Return the class ID for this class. This is useful only for comparing to + * a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . erived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 3.8 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This + * method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() + * methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 3.8 + */ + virtual UClassID getDynamicClassID(void) const; +}; + + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // TZRULE_H + +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tztrans.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tztrans.h new file mode 100755 index 00000000..a476c68c --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/tztrans.h @@ -0,0 +1,197 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2007-2008, International Business Machines Corporation and * +* others. All Rights Reserved. * +******************************************************************************* +*/ +#ifndef TZTRANS_H +#define TZTRANS_H + +/** + * \file + * \brief C++ API: Time zone transition + */ + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/uobject.h" + +U_NAMESPACE_BEGIN + +// Forward declaration +class TimeZoneRule; + +/** + * <code>TimeZoneTransition</code> is a class representing a time zone transition. + * An instance has a time of transition and rules for both before and after the transition. + * @stable ICU 3.8 + */ +class U_I18N_API TimeZoneTransition : public UObject { +public: + /** + * Constructs a <code>TimeZoneTransition</code> with the time and the rules before/after + * the transition. + * + * @param time The time of transition in milliseconds since the base time. + * @param from The time zone rule used before the transition. + * @param to The time zone rule used after the transition. + * @stable ICU 3.8 + */ + TimeZoneTransition(UDate time, const TimeZoneRule& from, const TimeZoneRule& to); + + /** + * Constructs an empty <code>TimeZoneTransition</code> + * @stable ICU 3.8 + */ + TimeZoneTransition(); + + /** + * Copy constructor. + * @param source The TimeZoneTransition object to be copied. + * @stable ICU 3.8 + */ + TimeZoneTransition(const TimeZoneTransition& source); + + /** + * Destructor. + * @stable ICU 3.8 + */ + ~TimeZoneTransition(); + + /** + * Clone this TimeZoneTransition object polymorphically. The caller owns the result and + * should delete it when done. + * @return A copy of the object. + * @stable ICU 3.8 + */ + TimeZoneTransition* clone(void) const; + + /** + * Assignment operator. + * @param right The object to be copied. + * @stable ICU 3.8 + */ + TimeZoneTransition& operator=(const TimeZoneTransition& right); + + /** + * Return true if the given TimeZoneTransition objects are semantically equal. Objects + * of different subclasses are considered unequal. + * @param that The object to be compared with. + * @return true if the given TimeZoneTransition objects are semantically equal. + * @stable ICU 3.8 + */ + UBool operator==(const TimeZoneTransition& that) const; + + /** + * Return true if the given TimeZoneTransition objects are semantically unequal. Objects + * of different subclasses are considered unequal. + * @param that The object to be compared with. + * @return true if the given TimeZoneTransition objects are semantically unequal. + * @stable ICU 3.8 + */ + UBool operator!=(const TimeZoneTransition& that) const; + + /** + * Returns the time of transition in milliseconds. + * @return The time of the transition in milliseconds since the 1970 Jan 1 epoch time. + * @stable ICU 3.8 + */ + UDate getTime(void) const; + + /** + * Sets the time of transition in milliseconds. + * @param time The time of the transition in milliseconds since the 1970 Jan 1 epoch time. + * @stable ICU 3.8 + */ + void setTime(UDate time); + + /** + * Returns the rule used before the transition. + * @return The time zone rule used after the transition. + * @stable ICU 3.8 + */ + const TimeZoneRule* getFrom(void) const; + + /** + * Sets the rule used before the transition. The caller remains + * responsible for deleting the <code>TimeZoneRule</code> object. + * @param from The time zone rule used before the transition. + * @stable ICU 3.8 + */ + void setFrom(const TimeZoneRule& from); + + /** + * Adopts the rule used before the transition. The caller must + * not delete the <code>TimeZoneRule</code> object passed in. + * @param from The time zone rule used before the transition. + * @stable ICU 3.8 + */ + void adoptFrom(TimeZoneRule* from); + + /** + * Sets the rule used after the transition. The caller remains + * responsible for deleting the <code>TimeZoneRule</code> object. + * @param to The time zone rule used after the transition. + * @stable ICU 3.8 + */ + void setTo(const TimeZoneRule& to); + + /** + * Adopts the rule used after the transition. The caller must + * not delete the <code>TimeZoneRule</code> object passed in. + * @param to The time zone rule used after the transition. + * @stable ICU 3.8 + */ + void adoptTo(TimeZoneRule* to); + + /** + * Returns the rule used after the transition. + * @return The time zone rule used after the transition. + * @stable ICU 3.8 + */ + const TimeZoneRule* getTo(void) const; + +private: + UDate fTime; + TimeZoneRule* fFrom; + TimeZoneRule* fTo; + +public: + /** + * Return the class ID for this class. This is useful only for comparing to + * a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . erived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 3.8 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This + * method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() + * methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 3.8 + */ + virtual UClassID getDynamicClassID(void) const; +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // TZTRANS_H + +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ubidi.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ubidi.h new file mode 100755 index 00000000..254a5bf9 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ubidi.h @@ -0,0 +1,2201 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* +* Copyright (C) 1999-2013, International Business Machines +* Corporation and others. All Rights Reserved. +* +****************************************************************************** +* file name: ubidi.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 1999jul27 +* created by: Markus W. Scherer, updated by Matitiahu Allouche +*/ + +#ifndef UBIDI_H +#define UBIDI_H + +#include "unicode/utypes.h" +#include "unicode/uchar.h" +#include "unicode/localpointer.h" + +/** + *\file + * \brief C API: Bidi algorithm + * + * <h2>Bidi algorithm for ICU</h2> + * + * This is an implementation of the Unicode Bidirectional Algorithm. + * The algorithm is defined in the + * <a href="http://www.unicode.org/unicode/reports/tr9/">Unicode Standard Annex #9</a>.<p> + * + * Note: Libraries that perform a bidirectional algorithm and + * reorder strings accordingly are sometimes called "Storage Layout Engines". + * ICU's Bidi and shaping (u_shapeArabic()) APIs can be used at the core of such + * "Storage Layout Engines". + * + * <h3>General remarks about the API:</h3> + * + * In functions with an error code parameter, + * the <code>pErrorCode</code> pointer must be valid + * and the value that it points to must not indicate a failure before + * the function call. Otherwise, the function returns immediately. + * After the function call, the value indicates success or failure.<p> + * + * The "limit" of a sequence of characters is the position just after their + * last character, i.e., one more than that position.<p> + * + * Some of the API functions provide access to "runs". + * Such a "run" is defined as a sequence of characters + * that are at the same embedding level + * after performing the Bidi algorithm.<p> + * + * @author Markus W. Scherer + * @version 1.0 + * + * + * <h4> Sample code for the ICU Bidi API </h4> + * + * <h5>Rendering a paragraph with the ICU Bidi API</h5> + * + * This is (hypothetical) sample code that illustrates + * how the ICU Bidi API could be used to render a paragraph of text. + * Rendering code depends highly on the graphics system, + * therefore this sample code must make a lot of assumptions, + * which may or may not match any existing graphics system's properties. + * + * <p>The basic assumptions are:</p> + * <ul> + * <li>Rendering is done from left to right on a horizontal line.</li> + * <li>A run of single-style, unidirectional text can be rendered at once.</li> + * <li>Such a run of text is passed to the graphics system with + * characters (code units) in logical order.</li> + * <li>The line-breaking algorithm is very complicated + * and Locale-dependent - + * and therefore its implementation omitted from this sample code.</li> + * </ul> + * + * <pre> + * \code + *#include "unicode/ubidi.h" + * + *typedef enum { + * styleNormal=0, styleSelected=1, + * styleBold=2, styleItalics=4, + * styleSuper=8, styleSub=16 + *} Style; + * + *typedef struct { int32_t limit; Style style; } StyleRun; + * + *int getTextWidth(const UChar *text, int32_t start, int32_t limit, + * const StyleRun *styleRuns, int styleRunCount); + * + * // set *pLimit and *pStyleRunLimit for a line + * // from text[start] and from styleRuns[styleRunStart] + * // using ubidi_getLogicalRun(para, ...) + *void getLineBreak(const UChar *text, int32_t start, int32_t *pLimit, + * UBiDi *para, + * const StyleRun *styleRuns, int styleRunStart, int *pStyleRunLimit, + * int *pLineWidth); + * + * // render runs on a line sequentially, always from left to right + * + * // prepare rendering a new line + * void startLine(UBiDiDirection textDirection, int lineWidth); + * + * // render a run of text and advance to the right by the run width + * // the text[start..limit-1] is always in logical order + * void renderRun(const UChar *text, int32_t start, int32_t limit, + * UBiDiDirection textDirection, Style style); + * + * // We could compute a cross-product + * // from the style runs with the directional runs + * // and then reorder it. + * // Instead, here we iterate over each run type + * // and render the intersections - + * // with shortcuts in simple (and common) cases. + * // renderParagraph() is the main function. + * + * // render a directional run with + * // (possibly) multiple style runs intersecting with it + * void renderDirectionalRun(const UChar *text, + * int32_t start, int32_t limit, + * UBiDiDirection direction, + * const StyleRun *styleRuns, int styleRunCount) { + * int i; + * + * // iterate over style runs + * if(direction==UBIDI_LTR) { + * int styleLimit; + * + * for(i=0; i<styleRunCount; ++i) { + * styleLimit=styleRun[i].limit; + * if(start<styleLimit) { + * if(styleLimit>limit) { styleLimit=limit; } + * renderRun(text, start, styleLimit, + * direction, styleRun[i].style); + * if(styleLimit==limit) { break; } + * start=styleLimit; + * } + * } + * } else { + * int styleStart; + * + * for(i=styleRunCount-1; i>=0; --i) { + * if(i>0) { + * styleStart=styleRun[i-1].limit; + * } else { + * styleStart=0; + * } + * if(limit>=styleStart) { + * if(styleStart<start) { styleStart=start; } + * renderRun(text, styleStart, limit, + * direction, styleRun[i].style); + * if(styleStart==start) { break; } + * limit=styleStart; + * } + * } + * } + * } + * + * // the line object represents text[start..limit-1] + * void renderLine(UBiDi *line, const UChar *text, + * int32_t start, int32_t limit, + * const StyleRun *styleRuns, int styleRunCount) { + * UBiDiDirection direction=ubidi_getDirection(line); + * if(direction!=UBIDI_MIXED) { + * // unidirectional + * if(styleRunCount<=1) { + * renderRun(text, start, limit, direction, styleRuns[0].style); + * } else { + * renderDirectionalRun(text, start, limit, + * direction, styleRuns, styleRunCount); + * } + * } else { + * // mixed-directional + * int32_t count, i, length; + * UBiDiLevel level; + * + * count=ubidi_countRuns(para, pErrorCode); + * if(U_SUCCESS(*pErrorCode)) { + * if(styleRunCount<=1) { + * Style style=styleRuns[0].style; + * + * // iterate over directional runs + * for(i=0; i<count; ++i) { + * direction=ubidi_getVisualRun(para, i, &start, &length); + * renderRun(text, start, start+length, direction, style); + * } + * } else { + * int32_t j; + * + * // iterate over both directional and style runs + * for(i=0; i<count; ++i) { + * direction=ubidi_getVisualRun(line, i, &start, &length); + * renderDirectionalRun(text, start, start+length, + * direction, styleRuns, styleRunCount); + * } + * } + * } + * } + * } + * + *void renderParagraph(const UChar *text, int32_t length, + * UBiDiDirection textDirection, + * const StyleRun *styleRuns, int styleRunCount, + * int lineWidth, + * UErrorCode *pErrorCode) { + * UBiDi *para; + * + * if(pErrorCode==NULL || U_FAILURE(*pErrorCode) || length<=0) { + * return; + * } + * + * para=ubidi_openSized(length, 0, pErrorCode); + * if(para==NULL) { return; } + * + * ubidi_setPara(para, text, length, + * textDirection ? UBIDI_DEFAULT_RTL : UBIDI_DEFAULT_LTR, + * NULL, pErrorCode); + * if(U_SUCCESS(*pErrorCode)) { + * UBiDiLevel paraLevel=1&ubidi_getParaLevel(para); + * StyleRun styleRun={ length, styleNormal }; + * int width; + * + * if(styleRuns==NULL || styleRunCount<=0) { + * styleRunCount=1; + * styleRuns=&styleRun; + * } + * + * // assume styleRuns[styleRunCount-1].limit>=length + * + * width=getTextWidth(text, 0, length, styleRuns, styleRunCount); + * if(width<=lineWidth) { + * // everything fits onto one line + * + * // prepare rendering a new line from either left or right + * startLine(paraLevel, width); + * + * renderLine(para, text, 0, length, + * styleRuns, styleRunCount); + * } else { + * UBiDi *line; + * + * // we need to render several lines + * line=ubidi_openSized(length, 0, pErrorCode); + * if(line!=NULL) { + * int32_t start=0, limit; + * int styleRunStart=0, styleRunLimit; + * + * for(;;) { + * limit=length; + * styleRunLimit=styleRunCount; + * getLineBreak(text, start, &limit, para, + * styleRuns, styleRunStart, &styleRunLimit, + * &width); + * ubidi_setLine(para, start, limit, line, pErrorCode); + * if(U_SUCCESS(*pErrorCode)) { + * // prepare rendering a new line + * // from either left or right + * startLine(paraLevel, width); + * + * renderLine(line, text, start, limit, + * styleRuns+styleRunStart, + * styleRunLimit-styleRunStart); + * } + * if(limit==length) { break; } + * start=limit; + * styleRunStart=styleRunLimit-1; + * if(start>=styleRuns[styleRunStart].limit) { + * ++styleRunStart; + * } + * } + * + * ubidi_close(line); + * } + * } + * } + * + * ubidi_close(para); + *} + *\endcode + * </pre> + */ + +/*DOCXX_TAG*/ +/*@{*/ + +/** + * UBiDiLevel is the type of the level values in this + * Bidi implementation. + * It holds an embedding level and indicates the visual direction + * by its bit 0 (even/odd value).<p> + * + * It can also hold non-level values for the + * <code>paraLevel</code> and <code>embeddingLevels</code> + * arguments of <code>ubidi_setPara()</code>; there: + * <ul> + * <li>bit 7 of an <code>embeddingLevels[]</code> + * value indicates whether the using application is + * specifying the level of a character to <i>override</i> whatever the + * Bidi implementation would resolve it to.</li> + * <li><code>paraLevel</code> can be set to the + * pseudo-level values <code>UBIDI_DEFAULT_LTR</code> + * and <code>UBIDI_DEFAULT_RTL</code>.</li> + * </ul> + * + * @see ubidi_setPara + * + * <p>The related constants are not real, valid level values. + * <code>UBIDI_DEFAULT_XXX</code> can be used to specify + * a default for the paragraph level for + * when the <code>ubidi_setPara()</code> function + * shall determine it but there is no + * strongly typed character in the input.<p> + * + * Note that the value for <code>UBIDI_DEFAULT_LTR</code> is even + * and the one for <code>UBIDI_DEFAULT_RTL</code> is odd, + * just like with normal LTR and RTL level values - + * these special values are designed that way. Also, the implementation + * assumes that UBIDI_MAX_EXPLICIT_LEVEL is odd. + * + * @see UBIDI_DEFAULT_LTR + * @see UBIDI_DEFAULT_RTL + * @see UBIDI_LEVEL_OVERRIDE + * @see UBIDI_MAX_EXPLICIT_LEVEL + * @stable ICU 2.0 + */ +typedef uint8_t UBiDiLevel; + +/** Paragraph level setting.<p> + * + * Constant indicating that the base direction depends on the first strong + * directional character in the text according to the Unicode Bidirectional + * Algorithm. If no strong directional character is present, + * then set the paragraph level to 0 (left-to-right).<p> + * + * If this value is used in conjunction with reordering modes + * <code>UBIDI_REORDER_INVERSE_LIKE_DIRECT</code> or + * <code>UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</code>, the text to reorder + * is assumed to be visual LTR, and the text after reordering is required + * to be the corresponding logical string with appropriate contextual + * direction. The direction of the result string will be RTL if either + * the righmost or leftmost strong character of the source text is RTL + * or Arabic Letter, the direction will be LTR otherwise.<p> + * + * If reordering option <code>UBIDI_OPTION_INSERT_MARKS</code> is set, an RLM may + * be added at the beginning of the result string to ensure round trip + * (that the result string, when reordered back to visual, will produce + * the original source text). + * @see UBIDI_REORDER_INVERSE_LIKE_DIRECT + * @see UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL + * @stable ICU 2.0 + */ +#define UBIDI_DEFAULT_LTR 0xfe + +/** Paragraph level setting.<p> + * + * Constant indicating that the base direction depends on the first strong + * directional character in the text according to the Unicode Bidirectional + * Algorithm. If no strong directional character is present, + * then set the paragraph level to 1 (right-to-left).<p> + * + * If this value is used in conjunction with reordering modes + * <code>UBIDI_REORDER_INVERSE_LIKE_DIRECT</code> or + * <code>UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</code>, the text to reorder + * is assumed to be visual LTR, and the text after reordering is required + * to be the corresponding logical string with appropriate contextual + * direction. The direction of the result string will be RTL if either + * the righmost or leftmost strong character of the source text is RTL + * or Arabic Letter, or if the text contains no strong character; + * the direction will be LTR otherwise.<p> + * + * If reordering option <code>UBIDI_OPTION_INSERT_MARKS</code> is set, an RLM may + * be added at the beginning of the result string to ensure round trip + * (that the result string, when reordered back to visual, will produce + * the original source text). + * @see UBIDI_REORDER_INVERSE_LIKE_DIRECT + * @see UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL + * @stable ICU 2.0 + */ +#define UBIDI_DEFAULT_RTL 0xff + +/** + * Maximum explicit embedding level. + * (The maximum resolved level can be up to <code>UBIDI_MAX_EXPLICIT_LEVEL+1</code>). + * @stable ICU 2.0 + */ +#define UBIDI_MAX_EXPLICIT_LEVEL 125 + +/** Bit flag for level input. + * Overrides directional properties. + * @stable ICU 2.0 + */ +#define UBIDI_LEVEL_OVERRIDE 0x80 + +/** + * Special value which can be returned by the mapping functions when a logical + * index has no corresponding visual index or vice-versa. This may happen + * for the logical-to-visual mapping of a Bidi control when option + * <code>#UBIDI_OPTION_REMOVE_CONTROLS</code> is specified. This can also happen + * for the visual-to-logical mapping of a Bidi mark (LRM or RLM) inserted + * by option <code>#UBIDI_OPTION_INSERT_MARKS</code>. + * @see ubidi_getVisualIndex + * @see ubidi_getVisualMap + * @see ubidi_getLogicalIndex + * @see ubidi_getLogicalMap + * @stable ICU 3.6 + */ +#define UBIDI_MAP_NOWHERE (-1) + +/** + * <code>UBiDiDirection</code> values indicate the text direction. + * @stable ICU 2.0 + */ +enum UBiDiDirection { + /** Left-to-right text. This is a 0 value. + * <ul> + * <li>As return value for <code>ubidi_getDirection()</code>, it means + * that the source string contains no right-to-left characters, or + * that the source string is empty and the paragraph level is even. + * <li> As return value for <code>ubidi_getBaseDirection()</code>, it + * means that the first strong character of the source string has + * a left-to-right direction. + * </ul> + * @stable ICU 2.0 + */ + UBIDI_LTR, + /** Right-to-left text. This is a 1 value. + * <ul> + * <li>As return value for <code>ubidi_getDirection()</code>, it means + * that the source string contains no left-to-right characters, or + * that the source string is empty and the paragraph level is odd. + * <li> As return value for <code>ubidi_getBaseDirection()</code>, it + * means that the first strong character of the source string has + * a right-to-left direction. + * </ul> + * @stable ICU 2.0 + */ + UBIDI_RTL, + /** Mixed-directional text. + * <p>As return value for <code>ubidi_getDirection()</code>, it means + * that the source string contains both left-to-right and + * right-to-left characters. + * @stable ICU 2.0 + */ + UBIDI_MIXED, + /** No strongly directional text. + * <p>As return value for <code>ubidi_getBaseDirection()</code>, it means + * that the source string is missing or empty, or contains neither left-to-right + * nor right-to-left characters. + * @stable ICU 4.6 + */ + UBIDI_NEUTRAL +}; + +/** @stable ICU 2.0 */ +typedef enum UBiDiDirection UBiDiDirection; + +/** + * Forward declaration of the <code>UBiDi</code> structure for the declaration of + * the API functions. Its fields are implementation-specific.<p> + * This structure holds information about a paragraph (or multiple paragraphs) + * of text with Bidi-algorithm-related details, or about one line of + * such a paragraph.<p> + * Reordering can be done on a line, or on one or more paragraphs which are + * then interpreted each as one single line. + * @stable ICU 2.0 + */ +struct UBiDi; + +/** @stable ICU 2.0 */ +typedef struct UBiDi UBiDi; + +/** + * Allocate a <code>UBiDi</code> structure. + * Such an object is initially empty. It is assigned + * the Bidi properties of a piece of text containing one or more paragraphs + * by <code>ubidi_setPara()</code> + * or the Bidi properties of a line within a paragraph by + * <code>ubidi_setLine()</code>.<p> + * This object can be reused for as long as it is not deallocated + * by calling <code>ubidi_close()</code>.<p> + * <code>ubidi_setPara()</code> and <code>ubidi_setLine()</code> will allocate + * additional memory for internal structures as necessary. + * + * @return An empty <code>UBiDi</code> object. + * @stable ICU 2.0 + */ +U_STABLE UBiDi * U_EXPORT2 +ubidi_open(void); + +/** + * Allocate a <code>UBiDi</code> structure with preallocated memory + * for internal structures. + * This function provides a <code>UBiDi</code> object like <code>ubidi_open()</code> + * with no arguments, but it also preallocates memory for internal structures + * according to the sizings supplied by the caller.<p> + * Subsequent functions will not allocate any more memory, and are thus + * guaranteed not to fail because of lack of memory.<p> + * The preallocation can be limited to some of the internal memory + * by setting some values to 0 here. That means that if, e.g., + * <code>maxRunCount</code> cannot be reasonably predetermined and should not + * be set to <code>maxLength</code> (the only failproof value) to avoid + * wasting memory, then <code>maxRunCount</code> could be set to 0 here + * and the internal structures that are associated with it will be allocated + * on demand, just like with <code>ubidi_open()</code>. + * + * @param maxLength is the maximum text or line length that internal memory + * will be preallocated for. An attempt to associate this object with a + * longer text will fail, unless this value is 0, which leaves the allocation + * up to the implementation. + * + * @param maxRunCount is the maximum anticipated number of same-level runs + * that internal memory will be preallocated for. An attempt to access + * visual runs on an object that was not preallocated for as many runs + * as the text was actually resolved to will fail, + * unless this value is 0, which leaves the allocation up to the implementation.<br><br> + * The number of runs depends on the actual text and maybe anywhere between + * 1 and <code>maxLength</code>. It is typically small. + * + * @param pErrorCode must be a valid pointer to an error code value. + * + * @return An empty <code>UBiDi</code> object with preallocated memory. + * @stable ICU 2.0 + */ +U_STABLE UBiDi * U_EXPORT2 +ubidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode); + +/** + * <code>ubidi_close()</code> must be called to free the memory + * associated with a UBiDi object.<p> + * + * <strong>Important: </strong> + * A parent <code>UBiDi</code> object must not be destroyed or reused if + * it still has children. + * If a <code>UBiDi</code> object has become the <i>child</i> + * of another one (its <i>parent</i>) by calling + * <code>ubidi_setLine()</code>, then the child object must + * be destroyed (closed) or reused (by calling + * <code>ubidi_setPara()</code> or <code>ubidi_setLine()</code>) + * before the parent object. + * + * @param pBiDi is a <code>UBiDi</code> object. + * + * @see ubidi_setPara + * @see ubidi_setLine + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ubidi_close(UBiDi *pBiDi); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUBiDiPointer + * "Smart pointer" class, closes a UBiDi via ubidi_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUBiDiPointer, UBiDi, ubidi_close); + +U_NAMESPACE_END + +#endif + +/** + * Modify the operation of the Bidi algorithm such that it + * approximates an "inverse Bidi" algorithm. This function + * must be called before <code>ubidi_setPara()</code>. + * + * <p>The normal operation of the Bidi algorithm as described + * in the Unicode Technical Report is to take text stored in logical + * (keyboard, typing) order and to determine the reordering of it for visual + * rendering. + * Some legacy systems store text in visual order, and for operations + * with standard, Unicode-based algorithms, the text needs to be transformed + * to logical order. This is effectively the inverse algorithm of the + * described Bidi algorithm. Note that there is no standard algorithm for + * this "inverse Bidi" and that the current implementation provides only an + * approximation of "inverse Bidi".</p> + * + * <p>With <code>isInverse</code> set to <code>TRUE</code>, + * this function changes the behavior of some of the subsequent functions + * in a way that they can be used for the inverse Bidi algorithm. + * Specifically, runs of text with numeric characters will be treated in a + * special way and may need to be surrounded with LRM characters when they are + * written in reordered sequence.</p> + * + * <p>Output runs should be retrieved using <code>ubidi_getVisualRun()</code>. + * Since the actual input for "inverse Bidi" is visually ordered text and + * <code>ubidi_getVisualRun()</code> gets the reordered runs, these are actually + * the runs of the logically ordered output.</p> + * + * <p>Calling this function with argument <code>isInverse</code> set to + * <code>TRUE</code> is equivalent to calling + * <code>ubidi_setReorderingMode</code> with argument + * <code>reorderingMode</code> + * set to <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>.<br> + * Calling this function with argument <code>isInverse</code> set to + * <code>FALSE</code> is equivalent to calling + * <code>ubidi_setReorderingMode</code> with argument + * <code>reorderingMode</code> + * set to <code>#UBIDI_REORDER_DEFAULT</code>. + * + * @param pBiDi is a <code>UBiDi</code> object. + * + * @param isInverse specifies "forward" or "inverse" Bidi operation. + * + * @see ubidi_setPara + * @see ubidi_writeReordered + * @see ubidi_setReorderingMode + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ubidi_setInverse(UBiDi *pBiDi, UBool isInverse); + +/** + * Is this Bidi object set to perform the inverse Bidi algorithm? + * <p>Note: calling this function after setting the reordering mode with + * <code>ubidi_setReorderingMode</code> will return <code>TRUE</code> if the + * reordering mode was set to <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>, + * <code>FALSE</code> for all other values.</p> + * + * @param pBiDi is a <code>UBiDi</code> object. + * @return TRUE if the Bidi object is set to perform the inverse Bidi algorithm + * by handling numbers as L. + * + * @see ubidi_setInverse + * @see ubidi_setReorderingMode + * @stable ICU 2.0 + */ + +U_STABLE UBool U_EXPORT2 +ubidi_isInverse(UBiDi *pBiDi); + +/** + * Specify whether block separators must be allocated level zero, + * so that successive paragraphs will progress from left to right. + * This function must be called before <code>ubidi_setPara()</code>. + * Paragraph separators (B) may appear in the text. Setting them to level zero + * means that all paragraph separators (including one possibly appearing + * in the last text position) are kept in the reordered text after the text + * that they follow in the source text. + * When this feature is not enabled, a paragraph separator at the last + * position of the text before reordering will go to the first position + * of the reordered text when the paragraph level is odd. + * + * @param pBiDi is a <code>UBiDi</code> object. + * + * @param orderParagraphsLTR specifies whether paragraph separators (B) must + * receive level 0, so that successive paragraphs progress from left to right. + * + * @see ubidi_setPara + * @stable ICU 3.4 + */ +U_STABLE void U_EXPORT2 +ubidi_orderParagraphsLTR(UBiDi *pBiDi, UBool orderParagraphsLTR); + +/** + * Is this Bidi object set to allocate level 0 to block separators so that + * successive paragraphs progress from left to right? + * + * @param pBiDi is a <code>UBiDi</code> object. + * @return TRUE if the Bidi object is set to allocate level 0 to block + * separators. + * + * @see ubidi_orderParagraphsLTR + * @stable ICU 3.4 + */ +U_STABLE UBool U_EXPORT2 +ubidi_isOrderParagraphsLTR(UBiDi *pBiDi); + +/** + * <code>UBiDiReorderingMode</code> values indicate which variant of the Bidi + * algorithm to use. + * + * @see ubidi_setReorderingMode + * @stable ICU 3.6 + */ +typedef enum UBiDiReorderingMode { + /** Regular Logical to Visual Bidi algorithm according to Unicode. + * This is a 0 value. + * @stable ICU 3.6 */ + UBIDI_REORDER_DEFAULT = 0, + /** Logical to Visual algorithm which handles numbers in a way which + * mimics the behavior of Windows XP. + * @stable ICU 3.6 */ + UBIDI_REORDER_NUMBERS_SPECIAL, + /** Logical to Visual algorithm grouping numbers with adjacent R characters + * (reversible algorithm). + * @stable ICU 3.6 */ + UBIDI_REORDER_GROUP_NUMBERS_WITH_R, + /** Reorder runs only to transform a Logical LTR string to the Logical RTL + * string with the same display, or vice-versa.<br> + * If this mode is set together with option + * <code>#UBIDI_OPTION_INSERT_MARKS</code>, some Bidi controls in the source + * text may be removed and other controls may be added to produce the + * minimum combination which has the required display. + * @stable ICU 3.6 */ + UBIDI_REORDER_RUNS_ONLY, + /** Visual to Logical algorithm which handles numbers like L + * (same algorithm as selected by <code>ubidi_setInverse(TRUE)</code>. + * @see ubidi_setInverse + * @stable ICU 3.6 */ + UBIDI_REORDER_INVERSE_NUMBERS_AS_L, + /** Visual to Logical algorithm equivalent to the regular Logical to Visual + * algorithm. + * @stable ICU 3.6 */ + UBIDI_REORDER_INVERSE_LIKE_DIRECT, + /** Inverse Bidi (Visual to Logical) algorithm for the + * <code>UBIDI_REORDER_NUMBERS_SPECIAL</code> Bidi algorithm. + * @stable ICU 3.6 */ + UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL, +#ifndef U_HIDE_DEPRECATED_API + /** + * Number of values for reordering mode. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UBIDI_REORDER_COUNT +#endif // U_HIDE_DEPRECATED_API +} UBiDiReorderingMode; + +/** + * Modify the operation of the Bidi algorithm such that it implements some + * variant to the basic Bidi algorithm or approximates an "inverse Bidi" + * algorithm, depending on different values of the "reordering mode". + * This function must be called before <code>ubidi_setPara()</code>, and stays + * in effect until called again with a different argument. + * + * <p>The normal operation of the Bidi algorithm as described + * in the Unicode Standard Annex #9 is to take text stored in logical + * (keyboard, typing) order and to determine how to reorder it for visual + * rendering.</p> + * + * <p>With the reordering mode set to a value other than + * <code>#UBIDI_REORDER_DEFAULT</code>, this function changes the behavior of + * some of the subsequent functions in a way such that they implement an + * inverse Bidi algorithm or some other algorithm variants.</p> + * + * <p>Some legacy systems store text in visual order, and for operations + * with standard, Unicode-based algorithms, the text needs to be transformed + * into logical order. This is effectively the inverse algorithm of the + * described Bidi algorithm. Note that there is no standard algorithm for + * this "inverse Bidi", so a number of variants are implemented here.</p> + * + * <p>In other cases, it may be desirable to emulate some variant of the + * Logical to Visual algorithm (e.g. one used in MS Windows), or perform a + * Logical to Logical transformation.</p> + * + * <ul> + * <li>When the reordering mode is set to <code>#UBIDI_REORDER_DEFAULT</code>, + * the standard Bidi Logical to Visual algorithm is applied.</li> + * + * <li>When the reordering mode is set to + * <code>#UBIDI_REORDER_NUMBERS_SPECIAL</code>, + * the algorithm used to perform Bidi transformations when calling + * <code>ubidi_setPara</code> should approximate the algorithm used in + * Microsoft Windows XP rather than strictly conform to the Unicode Bidi + * algorithm. + * <br> + * The differences between the basic algorithm and the algorithm addressed + * by this option are as follows: + * <ul> + * <li>Within text at an even embedding level, the sequence "123AB" + * (where AB represent R or AL letters) is transformed to "123BA" by the + * Unicode algorithm and to "BA123" by the Windows algorithm.</li> + * <li>Arabic-Indic numbers (AN) are handled by the Windows algorithm just + * like regular numbers (EN).</li> + * </ul></li> + * + * <li>When the reordering mode is set to + * <code>#UBIDI_REORDER_GROUP_NUMBERS_WITH_R</code>, + * numbers located between LTR text and RTL text are associated with the RTL + * text. For instance, an LTR paragraph with content "abc 123 DEF" (where + * upper case letters represent RTL characters) will be transformed to + * "abc FED 123" (and not "abc 123 FED"), "DEF 123 abc" will be transformed + * to "123 FED abc" and "123 FED abc" will be transformed to "DEF 123 abc". + * This makes the algorithm reversible and makes it useful when round trip + * (from visual to logical and back to visual) must be achieved without + * adding LRM characters. However, this is a variation from the standard + * Unicode Bidi algorithm.<br> + * The source text should not contain Bidi control characters other than LRM + * or RLM.</li> + * + * <li>When the reordering mode is set to + * <code>#UBIDI_REORDER_RUNS_ONLY</code>, + * a "Logical to Logical" transformation must be performed: + * <ul> + * <li>If the default text level of the source text (argument <code>paraLevel</code> + * in <code>ubidi_setPara</code>) is even, the source text will be handled as + * LTR logical text and will be transformed to the RTL logical text which has + * the same LTR visual display.</li> + * <li>If the default level of the source text is odd, the source text + * will be handled as RTL logical text and will be transformed to the + * LTR logical text which has the same LTR visual display.</li> + * </ul> + * This mode may be needed when logical text which is basically Arabic or + * Hebrew, with possible included numbers or phrases in English, has to be + * displayed as if it had an even embedding level (this can happen if the + * displaying application treats all text as if it was basically LTR). + * <br> + * This mode may also be needed in the reverse case, when logical text which is + * basically English, with possible included phrases in Arabic or Hebrew, has to + * be displayed as if it had an odd embedding level. + * <br> + * Both cases could be handled by adding LRE or RLE at the head of the text, + * if the display subsystem supports these formatting controls. If it does not, + * the problem may be handled by transforming the source text in this mode + * before displaying it, so that it will be displayed properly.<br> + * The source text should not contain Bidi control characters other than LRM + * or RLM.</li> + * + * <li>When the reordering mode is set to + * <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>, an "inverse Bidi" algorithm + * is applied. + * Runs of text with numeric characters will be treated like LTR letters and + * may need to be surrounded with LRM characters when they are written in + * reordered sequence (the option <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code> can + * be used with function <code>ubidi_writeReordered</code> to this end. This + * mode is equivalent to calling <code>ubidi_setInverse()</code> with + * argument <code>isInverse</code> set to <code>TRUE</code>.</li> + * + * <li>When the reordering mode is set to + * <code>#UBIDI_REORDER_INVERSE_LIKE_DIRECT</code>, the "direct" Logical to Visual + * Bidi algorithm is used as an approximation of an "inverse Bidi" algorithm. + * This mode is similar to mode <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code> + * but is closer to the regular Bidi algorithm. + * <br> + * For example, an LTR paragraph with the content "FED 123 456 CBA" (where + * upper case represents RTL characters) will be transformed to + * "ABC 456 123 DEF", as opposed to "DEF 123 456 ABC" + * with mode <code>UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>.<br> + * When used in conjunction with option + * <code>#UBIDI_OPTION_INSERT_MARKS</code>, this mode generally + * adds Bidi marks to the output significantly more sparingly than mode + * <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code> with option + * <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code> in calls to + * <code>ubidi_writeReordered</code>.</li> + * + * <li>When the reordering mode is set to + * <code>#UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</code>, the Logical to Visual + * Bidi algorithm used in Windows XP is used as an approximation of an "inverse Bidi" algorithm. + * <br> + * For example, an LTR paragraph with the content "abc FED123" (where + * upper case represents RTL characters) will be transformed to "abc 123DEF."</li> + * </ul> + * + * <p>In all the reordering modes specifying an "inverse Bidi" algorithm + * (i.e. those with a name starting with <code>UBIDI_REORDER_INVERSE</code>), + * output runs should be retrieved using + * <code>ubidi_getVisualRun()</code>, and the output text with + * <code>ubidi_writeReordered()</code>. The caller should keep in mind that in + * "inverse Bidi" modes the input is actually visually ordered text and + * reordered output returned by <code>ubidi_getVisualRun()</code> or + * <code>ubidi_writeReordered()</code> are actually runs or character string + * of logically ordered output.<br> + * For all the "inverse Bidi" modes, the source text should not contain + * Bidi control characters other than LRM or RLM.</p> + * + * <p>Note that option <code>#UBIDI_OUTPUT_REVERSE</code> of + * <code>ubidi_writeReordered</code> has no useful meaning and should not be + * used in conjunction with any value of the reordering mode specifying + * "inverse Bidi" or with value <code>UBIDI_REORDER_RUNS_ONLY</code>. + * + * @param pBiDi is a <code>UBiDi</code> object. + * @param reorderingMode specifies the required variant of the Bidi algorithm. + * + * @see UBiDiReorderingMode + * @see ubidi_setInverse + * @see ubidi_setPara + * @see ubidi_writeReordered + * @stable ICU 3.6 + */ +U_STABLE void U_EXPORT2 +ubidi_setReorderingMode(UBiDi *pBiDi, UBiDiReorderingMode reorderingMode); + +/** + * What is the requested reordering mode for a given Bidi object? + * + * @param pBiDi is a <code>UBiDi</code> object. + * @return the current reordering mode of the Bidi object + * @see ubidi_setReorderingMode + * @stable ICU 3.6 + */ +U_STABLE UBiDiReorderingMode U_EXPORT2 +ubidi_getReorderingMode(UBiDi *pBiDi); + +/** + * <code>UBiDiReorderingOption</code> values indicate which options are + * specified to affect the Bidi algorithm. + * + * @see ubidi_setReorderingOptions + * @stable ICU 3.6 + */ +typedef enum UBiDiReorderingOption { + /** + * option value for <code>ubidi_setReorderingOptions</code>: + * disable all the options which can be set with this function + * @see ubidi_setReorderingOptions + * @stable ICU 3.6 + */ + UBIDI_OPTION_DEFAULT = 0, + + /** + * option bit for <code>ubidi_setReorderingOptions</code>: + * insert Bidi marks (LRM or RLM) when needed to ensure correct result of + * a reordering to a Logical order + * + * <p>This option must be set or reset before calling + * <code>ubidi_setPara</code>.</p> + * + * <p>This option is significant only with reordering modes which generate + * a result with Logical order, specifically:</p> + * <ul> + * <li><code>#UBIDI_REORDER_RUNS_ONLY</code></li> + * <li><code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code></li> + * <li><code>#UBIDI_REORDER_INVERSE_LIKE_DIRECT</code></li> + * <li><code>#UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</code></li> + * </ul> + * + * <p>If this option is set in conjunction with reordering mode + * <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code> or with calling + * <code>ubidi_setInverse(TRUE)</code>, it implies + * option <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code> + * in calls to function <code>ubidi_writeReordered()</code>.</p> + * + * <p>For other reordering modes, a minimum number of LRM or RLM characters + * will be added to the source text after reordering it so as to ensure + * round trip, i.e. when applying the inverse reordering mode on the + * resulting logical text with removal of Bidi marks + * (option <code>#UBIDI_OPTION_REMOVE_CONTROLS</code> set before calling + * <code>ubidi_setPara()</code> or option <code>#UBIDI_REMOVE_BIDI_CONTROLS</code> + * in <code>ubidi_writeReordered</code>), the result will be identical to the + * source text in the first transformation. + * + * <p>This option will be ignored if specified together with option + * <code>#UBIDI_OPTION_REMOVE_CONTROLS</code>. It inhibits option + * <code>UBIDI_REMOVE_BIDI_CONTROLS</code> in calls to function + * <code>ubidi_writeReordered()</code> and it implies option + * <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code> in calls to function + * <code>ubidi_writeReordered()</code> if the reordering mode is + * <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>.</p> + * + * @see ubidi_setReorderingMode + * @see ubidi_setReorderingOptions + * @stable ICU 3.6 + */ + UBIDI_OPTION_INSERT_MARKS = 1, + + /** + * option bit for <code>ubidi_setReorderingOptions</code>: + * remove Bidi control characters + * + * <p>This option must be set or reset before calling + * <code>ubidi_setPara</code>.</p> + * + * <p>This option nullifies option <code>#UBIDI_OPTION_INSERT_MARKS</code>. + * It inhibits option <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code> in calls + * to function <code>ubidi_writeReordered()</code> and it implies option + * <code>#UBIDI_REMOVE_BIDI_CONTROLS</code> in calls to that function.</p> + * + * @see ubidi_setReorderingMode + * @see ubidi_setReorderingOptions + * @stable ICU 3.6 + */ + UBIDI_OPTION_REMOVE_CONTROLS = 2, + + /** + * option bit for <code>ubidi_setReorderingOptions</code>: + * process the output as part of a stream to be continued + * + * <p>This option must be set or reset before calling + * <code>ubidi_setPara</code>.</p> + * + * <p>This option specifies that the caller is interested in processing large + * text object in parts. + * The results of the successive calls are expected to be concatenated by the + * caller. Only the call for the last part will have this option bit off.</p> + * + * <p>When this option bit is on, <code>ubidi_setPara()</code> may process + * less than the full source text in order to truncate the text at a meaningful + * boundary. The caller should call <code>ubidi_getProcessedLength()</code> + * immediately after calling <code>ubidi_setPara()</code> in order to + * determine how much of the source text has been processed. + * Source text beyond that length should be resubmitted in following calls to + * <code>ubidi_setPara</code>. The processed length may be less than + * the length of the source text if a character preceding the last character of + * the source text constitutes a reasonable boundary (like a block separator) + * for text to be continued.<br> + * If the last character of the source text constitutes a reasonable + * boundary, the whole text will be processed at once.<br> + * If nowhere in the source text there exists + * such a reasonable boundary, the processed length will be zero.<br> + * The caller should check for such an occurrence and do one of the following: + * <ul><li>submit a larger amount of text with a better chance to include + * a reasonable boundary.</li> + * <li>resubmit the same text after turning off option + * <code>UBIDI_OPTION_STREAMING</code>.</li></ul> + * In all cases, this option should be turned off before processing the last + * part of the text.</p> + * + * <p>When the <code>UBIDI_OPTION_STREAMING</code> option is used, + * it is recommended to call <code>ubidi_orderParagraphsLTR()</code> with + * argument <code>orderParagraphsLTR</code> set to <code>TRUE</code> before + * calling <code>ubidi_setPara</code> so that later paragraphs may be + * concatenated to previous paragraphs on the right.</p> + * + * @see ubidi_setReorderingMode + * @see ubidi_setReorderingOptions + * @see ubidi_getProcessedLength + * @see ubidi_orderParagraphsLTR + * @stable ICU 3.6 + */ + UBIDI_OPTION_STREAMING = 4 +} UBiDiReorderingOption; + +/** + * Specify which of the reordering options + * should be applied during Bidi transformations. + * + * @param pBiDi is a <code>UBiDi</code> object. + * @param reorderingOptions is a combination of zero or more of the following + * options: + * <code>#UBIDI_OPTION_DEFAULT</code>, <code>#UBIDI_OPTION_INSERT_MARKS</code>, + * <code>#UBIDI_OPTION_REMOVE_CONTROLS</code>, <code>#UBIDI_OPTION_STREAMING</code>. + * + * @see ubidi_getReorderingOptions + * @stable ICU 3.6 + */ +U_STABLE void U_EXPORT2 +ubidi_setReorderingOptions(UBiDi *pBiDi, uint32_t reorderingOptions); + +/** + * What are the reordering options applied to a given Bidi object? + * + * @param pBiDi is a <code>UBiDi</code> object. + * @return the current reordering options of the Bidi object + * @see ubidi_setReorderingOptions + * @stable ICU 3.6 + */ +U_STABLE uint32_t U_EXPORT2 +ubidi_getReorderingOptions(UBiDi *pBiDi); + +/** + * Set the context before a call to ubidi_setPara().<p> + * + * ubidi_setPara() computes the left-right directionality for a given piece + * of text which is supplied as one of its arguments. Sometimes this piece + * of text (the "main text") should be considered in context, because text + * appearing before ("prologue") and/or after ("epilogue") the main text + * may affect the result of this computation.<p> + * + * This function specifies the prologue and/or the epilogue for the next + * call to ubidi_setPara(). The characters specified as prologue and + * epilogue should not be modified by the calling program until the call + * to ubidi_setPara() has returned. If successive calls to ubidi_setPara() + * all need specification of a context, ubidi_setContext() must be called + * before each call to ubidi_setPara(). In other words, a context is not + * "remembered" after the following successful call to ubidi_setPara().<p> + * + * If a call to ubidi_setPara() specifies UBIDI_DEFAULT_LTR or + * UBIDI_DEFAULT_RTL as paraLevel and is preceded by a call to + * ubidi_setContext() which specifies a prologue, the paragraph level will + * be computed taking in consideration the text in the prologue.<p> + * + * When ubidi_setPara() is called without a previous call to + * ubidi_setContext, the main text is handled as if preceded and followed + * by strong directional characters at the current paragraph level. + * Calling ubidi_setContext() with specification of a prologue will change + * this behavior by handling the main text as if preceded by the last + * strong character appearing in the prologue, if any. + * Calling ubidi_setContext() with specification of an epilogue will change + * the behavior of ubidi_setPara() by handling the main text as if followed + * by the first strong character or digit appearing in the epilogue, if any.<p> + * + * Note 1: if <code>ubidi_setContext</code> is called repeatedly without + * calling <code>ubidi_setPara</code>, the earlier calls have no effect, + * only the last call will be remembered for the next call to + * <code>ubidi_setPara</code>.<p> + * + * Note 2: calling <code>ubidi_setContext(pBiDi, NULL, 0, NULL, 0, &errorCode)</code> + * cancels any previous setting of non-empty prologue or epilogue. + * The next call to <code>ubidi_setPara()</code> will process no + * prologue or epilogue.<p> + * + * Note 3: users must be aware that even after setting the context + * before a call to ubidi_setPara() to perform e.g. a logical to visual + * transformation, the resulting string may not be identical to what it + * would have been if all the text, including prologue and epilogue, had + * been processed together.<br> + * Example (upper case letters represent RTL characters):<br> + *   prologue = "<code>abc DE</code>"<br> + *   epilogue = none<br> + *   main text = "<code>FGH xyz</code>"<br> + *   paraLevel = UBIDI_LTR<br> + *   display without prologue = "<code>HGF xyz</code>" + * ("HGF" is adjacent to "xyz")<br> + *   display with prologue = "<code>abc HGFED xyz</code>" + * ("HGF" is not adjacent to "xyz")<br> + * + * @param pBiDi is a paragraph <code>UBiDi</code> object. + * + * @param prologue is a pointer to the text which precedes the text that + * will be specified in a coming call to ubidi_setPara(). + * If there is no prologue to consider, then <code>proLength</code> + * must be zero and this pointer can be NULL. + * + * @param proLength is the length of the prologue; if <code>proLength==-1</code> + * then the prologue must be zero-terminated. + * Otherwise proLength must be >= 0. If <code>proLength==0</code>, it means + * that there is no prologue to consider. + * + * @param epilogue is a pointer to the text which follows the text that + * will be specified in a coming call to ubidi_setPara(). + * If there is no epilogue to consider, then <code>epiLength</code> + * must be zero and this pointer can be NULL. + * + * @param epiLength is the length of the epilogue; if <code>epiLength==-1</code> + * then the epilogue must be zero-terminated. + * Otherwise epiLength must be >= 0. If <code>epiLength==0</code>, it means + * that there is no epilogue to consider. + * + * @param pErrorCode must be a valid pointer to an error code value. + * + * @see ubidi_setPara + * @stable ICU 4.8 + */ +U_STABLE void U_EXPORT2 +ubidi_setContext(UBiDi *pBiDi, + const UChar *prologue, int32_t proLength, + const UChar *epilogue, int32_t epiLength, + UErrorCode *pErrorCode); + +/** + * Perform the Unicode Bidi algorithm. It is defined in the + * <a href="http://www.unicode.org/unicode/reports/tr9/">Unicode Standard Annex #9</a>, + * version 13, + * also described in The Unicode Standard, Version 4.0 .<p> + * + * This function takes a piece of plain text containing one or more paragraphs, + * with or without externally specified embedding levels from <i>styled</i> + * text and computes the left-right-directionality of each character.<p> + * + * If the entire text is all of the same directionality, then + * the function may not perform all the steps described by the algorithm, + * i.e., some levels may not be the same as if all steps were performed. + * This is not relevant for unidirectional text.<br> + * For example, in pure LTR text with numbers the numbers would get + * a resolved level of 2 higher than the surrounding text according to + * the algorithm. This implementation may set all resolved levels to + * the same value in such a case.<p> + * + * The text can be composed of multiple paragraphs. Occurrence of a block + * separator in the text terminates a paragraph, and whatever comes next starts + * a new paragraph. The exception to this rule is when a Carriage Return (CR) + * is followed by a Line Feed (LF). Both CR and LF are block separators, but + * in that case, the pair of characters is considered as terminating the + * preceding paragraph, and a new paragraph will be started by a character + * coming after the LF. + * + * @param pBiDi A <code>UBiDi</code> object allocated with <code>ubidi_open()</code> + * which will be set to contain the reordering information, + * especially the resolved levels for all the characters in <code>text</code>. + * + * @param text is a pointer to the text that the Bidi algorithm will be performed on. + * This pointer is stored in the UBiDi object and can be retrieved + * with <code>ubidi_getText()</code>.<br> + * <strong>Note:</strong> the text must be (at least) <code>length</code> long. + * + * @param length is the length of the text; if <code>length==-1</code> then + * the text must be zero-terminated. + * + * @param paraLevel specifies the default level for the text; + * it is typically 0 (LTR) or 1 (RTL). + * If the function shall determine the paragraph level from the text, + * then <code>paraLevel</code> can be set to + * either <code>#UBIDI_DEFAULT_LTR</code> + * or <code>#UBIDI_DEFAULT_RTL</code>; if the text contains multiple + * paragraphs, the paragraph level shall be determined separately for + * each paragraph; if a paragraph does not include any strongly typed + * character, then the desired default is used (0 for LTR or 1 for RTL). + * Any other value between 0 and <code>#UBIDI_MAX_EXPLICIT_LEVEL</code> + * is also valid, with odd levels indicating RTL. + * + * @param embeddingLevels (in) may be used to preset the embedding and override levels, + * ignoring characters like LRE and PDF in the text. + * A level overrides the directional property of its corresponding + * (same index) character if the level has the + * <code>#UBIDI_LEVEL_OVERRIDE</code> bit set.<br><br> + * Aside from that bit, it must be + * <code>paraLevel<=embeddingLevels[]<=UBIDI_MAX_EXPLICIT_LEVEL</code>, + * except that level 0 is always allowed. + * Level 0 for a paragraph separator prevents reordering of paragraphs; + * this only works reliably if <code>#UBIDI_LEVEL_OVERRIDE</code> + * is also set for paragraph separators. + * Level 0 for other characters is treated as a wildcard + * and is lifted up to the resolved level of the surrounding paragraph.<br><br> + * <strong>Caution: </strong>A copy of this pointer, not of the levels, + * will be stored in the <code>UBiDi</code> object; + * the <code>embeddingLevels</code> array must not be + * deallocated before the <code>UBiDi</code> structure is destroyed or reused, + * and the <code>embeddingLevels</code> + * should not be modified to avoid unexpected results on subsequent Bidi operations. + * However, the <code>ubidi_setPara()</code> and + * <code>ubidi_setLine()</code> functions may modify some or all of the levels.<br><br> + * After the <code>UBiDi</code> object is reused or destroyed, the caller + * must take care of the deallocation of the <code>embeddingLevels</code> array.<br><br> + * <strong>Note:</strong> the <code>embeddingLevels</code> array must be + * at least <code>length</code> long. + * This pointer can be <code>NULL</code> if this + * value is not necessary. + * + * @param pErrorCode must be a valid pointer to an error code value. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ubidi_setPara(UBiDi *pBiDi, const UChar *text, int32_t length, + UBiDiLevel paraLevel, UBiDiLevel *embeddingLevels, + UErrorCode *pErrorCode); + +/** + * <code>ubidi_setLine()</code> sets a <code>UBiDi</code> to + * contain the reordering information, especially the resolved levels, + * for all the characters in a line of text. This line of text is + * specified by referring to a <code>UBiDi</code> object representing + * this information for a piece of text containing one or more paragraphs, + * and by specifying a range of indexes in this text.<p> + * In the new line object, the indexes will range from 0 to <code>limit-start-1</code>.<p> + * + * This is used after calling <code>ubidi_setPara()</code> + * for a piece of text, and after line-breaking on that text. + * It is not necessary if each paragraph is treated as a single line.<p> + * + * After line-breaking, rules (L1) and (L2) for the treatment of + * trailing WS and for reordering are performed on + * a <code>UBiDi</code> object that represents a line.<p> + * + * <strong>Important: </strong><code>pLineBiDi</code> shares data with + * <code>pParaBiDi</code>. + * You must destroy or reuse <code>pLineBiDi</code> before <code>pParaBiDi</code>. + * In other words, you must destroy or reuse the <code>UBiDi</code> object for a line + * before the object for its parent paragraph.<p> + * + * The text pointer that was stored in <code>pParaBiDi</code> is also copied, + * and <code>start</code> is added to it so that it points to the beginning of the + * line for this object. + * + * @param pParaBiDi is the parent paragraph object. It must have been set + * by a successful call to ubidi_setPara. + * + * @param start is the line's first index into the text. + * + * @param limit is just behind the line's last index into the text + * (its last index +1).<br> + * It must be <code>0<=start<limit<=</code>containing paragraph limit. + * If the specified line crosses a paragraph boundary, the function + * will terminate with error code U_ILLEGAL_ARGUMENT_ERROR. + * + * @param pLineBiDi is the object that will now represent a line of the text. + * + * @param pErrorCode must be a valid pointer to an error code value. + * + * @see ubidi_setPara + * @see ubidi_getProcessedLength + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ubidi_setLine(const UBiDi *pParaBiDi, + int32_t start, int32_t limit, + UBiDi *pLineBiDi, + UErrorCode *pErrorCode); + +/** + * Get the directionality of the text. + * + * @param pBiDi is the paragraph or line <code>UBiDi</code> object. + * + * @return a value of <code>UBIDI_LTR</code>, <code>UBIDI_RTL</code> + * or <code>UBIDI_MIXED</code> + * that indicates if the entire text + * represented by this object is unidirectional, + * and which direction, or if it is mixed-directional. + * Note - The value <code>UBIDI_NEUTRAL</code> is never returned from this method. + * + * @see UBiDiDirection + * @stable ICU 2.0 + */ +U_STABLE UBiDiDirection U_EXPORT2 +ubidi_getDirection(const UBiDi *pBiDi); + +/** + * Gets the base direction of the text provided according + * to the Unicode Bidirectional Algorithm. The base direction + * is derived from the first character in the string with bidirectional + * character type L, R, or AL. If the first such character has type L, + * <code>UBIDI_LTR</code> is returned. If the first such character has + * type R or AL, <code>UBIDI_RTL</code> is returned. If the string does + * not contain any character of these types, then + * <code>UBIDI_NEUTRAL</code> is returned. + * + * This is a lightweight function for use when only the base direction + * is needed and no further bidi processing of the text is needed. + * + * @param text is a pointer to the text whose base + * direction is needed. + * Note: the text must be (at least) @c length long. + * + * @param length is the length of the text; + * if <code>length==-1</code> then the text + * must be zero-terminated. + * + * @return <code>UBIDI_LTR</code>, <code>UBIDI_RTL</code>, + * <code>UBIDI_NEUTRAL</code> + * + * @see UBiDiDirection + * @stable ICU 4.6 + */ +U_STABLE UBiDiDirection U_EXPORT2 +ubidi_getBaseDirection(const UChar *text, int32_t length ); + +/** + * Get the pointer to the text. + * + * @param pBiDi is the paragraph or line <code>UBiDi</code> object. + * + * @return The pointer to the text that the UBiDi object was created for. + * + * @see ubidi_setPara + * @see ubidi_setLine + * @stable ICU 2.0 + */ +U_STABLE const UChar * U_EXPORT2 +ubidi_getText(const UBiDi *pBiDi); + +/** + * Get the length of the text. + * + * @param pBiDi is the paragraph or line <code>UBiDi</code> object. + * + * @return The length of the text that the UBiDi object was created for. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ubidi_getLength(const UBiDi *pBiDi); + +/** + * Get the paragraph level of the text. + * + * @param pBiDi is the paragraph or line <code>UBiDi</code> object. + * + * @return The paragraph level. If there are multiple paragraphs, their + * level may vary if the required paraLevel is UBIDI_DEFAULT_LTR or + * UBIDI_DEFAULT_RTL. In that case, the level of the first paragraph + * is returned. + * + * @see UBiDiLevel + * @see ubidi_getParagraph + * @see ubidi_getParagraphByIndex + * @stable ICU 2.0 + */ +U_STABLE UBiDiLevel U_EXPORT2 +ubidi_getParaLevel(const UBiDi *pBiDi); + +/** + * Get the number of paragraphs. + * + * @param pBiDi is the paragraph or line <code>UBiDi</code> object. + * + * @return The number of paragraphs. + * @stable ICU 3.4 + */ +U_STABLE int32_t U_EXPORT2 +ubidi_countParagraphs(UBiDi *pBiDi); + +/** + * Get a paragraph, given a position within the text. + * This function returns information about a paragraph.<br> + * Note: if the paragraph index is known, it is more efficient to + * retrieve the paragraph information using ubidi_getParagraphByIndex().<p> + * + * @param pBiDi is the paragraph or line <code>UBiDi</code> object. + * + * @param charIndex is the index of a character within the text, in the + * range <code>[0..ubidi_getProcessedLength(pBiDi)-1]</code>. + * + * @param pParaStart will receive the index of the first character of the + * paragraph in the text. + * This pointer can be <code>NULL</code> if this + * value is not necessary. + * + * @param pParaLimit will receive the limit of the paragraph. + * The l-value that you point to here may be the + * same expression (variable) as the one for + * <code>charIndex</code>. + * This pointer can be <code>NULL</code> if this + * value is not necessary. + * + * @param pParaLevel will receive the level of the paragraph. + * This pointer can be <code>NULL</code> if this + * value is not necessary. + * + * @param pErrorCode must be a valid pointer to an error code value. + * + * @return The index of the paragraph containing the specified position. + * + * @see ubidi_getProcessedLength + * @stable ICU 3.4 + */ +U_STABLE int32_t U_EXPORT2 +ubidi_getParagraph(const UBiDi *pBiDi, int32_t charIndex, int32_t *pParaStart, + int32_t *pParaLimit, UBiDiLevel *pParaLevel, + UErrorCode *pErrorCode); + +/** + * Get a paragraph, given the index of this paragraph. + * + * This function returns information about a paragraph.<p> + * + * @param pBiDi is the paragraph <code>UBiDi</code> object. + * + * @param paraIndex is the number of the paragraph, in the + * range <code>[0..ubidi_countParagraphs(pBiDi)-1]</code>. + * + * @param pParaStart will receive the index of the first character of the + * paragraph in the text. + * This pointer can be <code>NULL</code> if this + * value is not necessary. + * + * @param pParaLimit will receive the limit of the paragraph. + * This pointer can be <code>NULL</code> if this + * value is not necessary. + * + * @param pParaLevel will receive the level of the paragraph. + * This pointer can be <code>NULL</code> if this + * value is not necessary. + * + * @param pErrorCode must be a valid pointer to an error code value. + * + * @stable ICU 3.4 + */ +U_STABLE void U_EXPORT2 +ubidi_getParagraphByIndex(const UBiDi *pBiDi, int32_t paraIndex, + int32_t *pParaStart, int32_t *pParaLimit, + UBiDiLevel *pParaLevel, UErrorCode *pErrorCode); + +/** + * Get the level for one character. + * + * @param pBiDi is the paragraph or line <code>UBiDi</code> object. + * + * @param charIndex the index of a character. It must be in the range + * [0..ubidi_getProcessedLength(pBiDi)]. + * + * @return The level for the character at charIndex (0 if charIndex is not + * in the valid range). + * + * @see UBiDiLevel + * @see ubidi_getProcessedLength + * @stable ICU 2.0 + */ +U_STABLE UBiDiLevel U_EXPORT2 +ubidi_getLevelAt(const UBiDi *pBiDi, int32_t charIndex); + +/** + * Get an array of levels for each character.<p> + * + * Note that this function may allocate memory under some + * circumstances, unlike <code>ubidi_getLevelAt()</code>. + * + * @param pBiDi is the paragraph or line <code>UBiDi</code> object, whose + * text length must be strictly positive. + * + * @param pErrorCode must be a valid pointer to an error code value. + * + * @return The levels array for the text, + * or <code>NULL</code> if an error occurs. + * + * @see UBiDiLevel + * @see ubidi_getProcessedLength + * @stable ICU 2.0 + */ +U_STABLE const UBiDiLevel * U_EXPORT2 +ubidi_getLevels(UBiDi *pBiDi, UErrorCode *pErrorCode); + +/** + * Get a logical run. + * This function returns information about a run and is used + * to retrieve runs in logical order.<p> + * This is especially useful for line-breaking on a paragraph. + * + * @param pBiDi is the paragraph or line <code>UBiDi</code> object. + * + * @param logicalPosition is a logical position within the source text. + * + * @param pLogicalLimit will receive the limit of the corresponding run. + * The l-value that you point to here may be the + * same expression (variable) as the one for + * <code>logicalPosition</code>. + * This pointer can be <code>NULL</code> if this + * value is not necessary. + * + * @param pLevel will receive the level of the corresponding run. + * This pointer can be <code>NULL</code> if this + * value is not necessary. + * + * @see ubidi_getProcessedLength + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ubidi_getLogicalRun(const UBiDi *pBiDi, int32_t logicalPosition, + int32_t *pLogicalLimit, UBiDiLevel *pLevel); + +/** + * Get the number of runs. + * This function may invoke the actual reordering on the + * <code>UBiDi</code> object, after <code>ubidi_setPara()</code> + * may have resolved only the levels of the text. Therefore, + * <code>ubidi_countRuns()</code> may have to allocate memory, + * and may fail doing so. + * + * @param pBiDi is the paragraph or line <code>UBiDi</code> object. + * + * @param pErrorCode must be a valid pointer to an error code value. + * + * @return The number of runs. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ubidi_countRuns(UBiDi *pBiDi, UErrorCode *pErrorCode); + +/** + * Get one run's logical start, length, and directionality, + * which can be 0 for LTR or 1 for RTL. + * In an RTL run, the character at the logical start is + * visually on the right of the displayed run. + * The length is the number of characters in the run.<p> + * <code>ubidi_countRuns()</code> should be called + * before the runs are retrieved. + * + * @param pBiDi is the paragraph or line <code>UBiDi</code> object. + * + * @param runIndex is the number of the run in visual order, in the + * range <code>[0..ubidi_countRuns(pBiDi)-1]</code>. + * + * @param pLogicalStart is the first logical character index in the text. + * The pointer may be <code>NULL</code> if this index is not needed. + * + * @param pLength is the number of characters (at least one) in the run. + * The pointer may be <code>NULL</code> if this is not needed. + * + * @return the directionality of the run, + * <code>UBIDI_LTR==0</code> or <code>UBIDI_RTL==1</code>, + * never <code>UBIDI_MIXED</code>, + * never <code>UBIDI_NEUTRAL</code>. + * + * @see ubidi_countRuns + * + * Example: + * <pre> + * \code + * int32_t i, count=ubidi_countRuns(pBiDi), + * logicalStart, visualIndex=0, length; + * for(i=0; i<count; ++i) { + * if(UBIDI_LTR==ubidi_getVisualRun(pBiDi, i, &logicalStart, &length)) { + * do { // LTR + * show_char(text[logicalStart++], visualIndex++); + * } while(--length>0); + * } else { + * logicalStart+=length; // logicalLimit + * do { // RTL + * show_char(text[--logicalStart], visualIndex++); + * } while(--length>0); + * } + * } + *\endcode + * </pre> + * + * Note that in right-to-left runs, code like this places + * second surrogates before first ones (which is generally a bad idea) + * and combining characters before base characters. + * <p> + * Use of <code>ubidi_writeReordered()</code>, optionally with the + * <code>#UBIDI_KEEP_BASE_COMBINING</code> option, can be considered in order + * to avoid these issues. + * @stable ICU 2.0 + */ +U_STABLE UBiDiDirection U_EXPORT2 +ubidi_getVisualRun(UBiDi *pBiDi, int32_t runIndex, + int32_t *pLogicalStart, int32_t *pLength); + +/** + * Get the visual position from a logical text position. + * If such a mapping is used many times on the same + * <code>UBiDi</code> object, then calling + * <code>ubidi_getLogicalMap()</code> is more efficient.<p> + * + * The value returned may be <code>#UBIDI_MAP_NOWHERE</code> if there is no + * visual position because the corresponding text character is a Bidi control + * removed from output by the option <code>#UBIDI_OPTION_REMOVE_CONTROLS</code>. + * <p> + * When the visual output is altered by using options of + * <code>ubidi_writeReordered()</code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>, + * <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>, + * <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the visual position returned may not + * be correct. It is advised to use, when possible, reordering options + * such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>. + * <p> + * Note that in right-to-left runs, this mapping places + * second surrogates before first ones (which is generally a bad idea) + * and combining characters before base characters. + * Use of <code>ubidi_writeReordered()</code>, optionally with the + * <code>#UBIDI_KEEP_BASE_COMBINING</code> option can be considered instead + * of using the mapping, in order to avoid these issues. + * + * @param pBiDi is the paragraph or line <code>UBiDi</code> object. + * + * @param logicalIndex is the index of a character in the text. + * + * @param pErrorCode must be a valid pointer to an error code value. + * + * @return The visual position of this character. + * + * @see ubidi_getLogicalMap + * @see ubidi_getLogicalIndex + * @see ubidi_getProcessedLength + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ubidi_getVisualIndex(UBiDi *pBiDi, int32_t logicalIndex, UErrorCode *pErrorCode); + +/** + * Get the logical text position from a visual position. + * If such a mapping is used many times on the same + * <code>UBiDi</code> object, then calling + * <code>ubidi_getVisualMap()</code> is more efficient.<p> + * + * The value returned may be <code>#UBIDI_MAP_NOWHERE</code> if there is no + * logical position because the corresponding text character is a Bidi mark + * inserted in the output by option <code>#UBIDI_OPTION_INSERT_MARKS</code>. + * <p> + * This is the inverse function to <code>ubidi_getVisualIndex()</code>. + * <p> + * When the visual output is altered by using options of + * <code>ubidi_writeReordered()</code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>, + * <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>, + * <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the logical position returned may not + * be correct. It is advised to use, when possible, reordering options + * such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>. + * + * @param pBiDi is the paragraph or line <code>UBiDi</code> object. + * + * @param visualIndex is the visual position of a character. + * + * @param pErrorCode must be a valid pointer to an error code value. + * + * @return The index of this character in the text. + * + * @see ubidi_getVisualMap + * @see ubidi_getVisualIndex + * @see ubidi_getResultLength + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ubidi_getLogicalIndex(UBiDi *pBiDi, int32_t visualIndex, UErrorCode *pErrorCode); + +/** + * Get a logical-to-visual index map (array) for the characters in the UBiDi + * (paragraph or line) object. + * <p> + * Some values in the map may be <code>#UBIDI_MAP_NOWHERE</code> if the + * corresponding text characters are Bidi controls removed from the visual + * output by the option <code>#UBIDI_OPTION_REMOVE_CONTROLS</code>. + * <p> + * When the visual output is altered by using options of + * <code>ubidi_writeReordered()</code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>, + * <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>, + * <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the visual positions returned may not + * be correct. It is advised to use, when possible, reordering options + * such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>. + * <p> + * Note that in right-to-left runs, this mapping places + * second surrogates before first ones (which is generally a bad idea) + * and combining characters before base characters. + * Use of <code>ubidi_writeReordered()</code>, optionally with the + * <code>#UBIDI_KEEP_BASE_COMBINING</code> option can be considered instead + * of using the mapping, in order to avoid these issues. + * + * @param pBiDi is the paragraph or line <code>UBiDi</code> object. + * + * @param indexMap is a pointer to an array of <code>ubidi_getProcessedLength()</code> + * indexes which will reflect the reordering of the characters. + * If option <code>#UBIDI_OPTION_INSERT_MARKS</code> is set, the number + * of elements allocated in <code>indexMap</code> must be no less than + * <code>ubidi_getResultLength()</code>. + * The array does not need to be initialized.<br><br> + * The index map will result in <code>indexMap[logicalIndex]==visualIndex</code>. + * + * @param pErrorCode must be a valid pointer to an error code value. + * + * @see ubidi_getVisualMap + * @see ubidi_getVisualIndex + * @see ubidi_getProcessedLength + * @see ubidi_getResultLength + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ubidi_getLogicalMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode); + +/** + * Get a visual-to-logical index map (array) for the characters in the UBiDi + * (paragraph or line) object. + * <p> + * Some values in the map may be <code>#UBIDI_MAP_NOWHERE</code> if the + * corresponding text characters are Bidi marks inserted in the visual output + * by the option <code>#UBIDI_OPTION_INSERT_MARKS</code>. + * <p> + * When the visual output is altered by using options of + * <code>ubidi_writeReordered()</code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>, + * <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>, + * <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the logical positions returned may not + * be correct. It is advised to use, when possible, reordering options + * such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>. + * + * @param pBiDi is the paragraph or line <code>UBiDi</code> object. + * + * @param indexMap is a pointer to an array of <code>ubidi_getResultLength()</code> + * indexes which will reflect the reordering of the characters. + * If option <code>#UBIDI_OPTION_REMOVE_CONTROLS</code> is set, the number + * of elements allocated in <code>indexMap</code> must be no less than + * <code>ubidi_getProcessedLength()</code>. + * The array does not need to be initialized.<br><br> + * The index map will result in <code>indexMap[visualIndex]==logicalIndex</code>. + * + * @param pErrorCode must be a valid pointer to an error code value. + * + * @see ubidi_getLogicalMap + * @see ubidi_getLogicalIndex + * @see ubidi_getProcessedLength + * @see ubidi_getResultLength + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ubidi_getVisualMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode); + +/** + * This is a convenience function that does not use a UBiDi object. + * It is intended to be used for when an application has determined the levels + * of objects (character sequences) and just needs to have them reordered (L2). + * This is equivalent to using <code>ubidi_getLogicalMap()</code> on a + * <code>UBiDi</code> object. + * + * @param levels is an array with <code>length</code> levels that have been determined by + * the application. + * + * @param length is the number of levels in the array, or, semantically, + * the number of objects to be reordered. + * It must be <code>length>0</code>. + * + * @param indexMap is a pointer to an array of <code>length</code> + * indexes which will reflect the reordering of the characters. + * The array does not need to be initialized.<p> + * The index map will result in <code>indexMap[logicalIndex]==visualIndex</code>. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ubidi_reorderLogical(const UBiDiLevel *levels, int32_t length, int32_t *indexMap); + +/** + * This is a convenience function that does not use a UBiDi object. + * It is intended to be used for when an application has determined the levels + * of objects (character sequences) and just needs to have them reordered (L2). + * This is equivalent to using <code>ubidi_getVisualMap()</code> on a + * <code>UBiDi</code> object. + * + * @param levels is an array with <code>length</code> levels that have been determined by + * the application. + * + * @param length is the number of levels in the array, or, semantically, + * the number of objects to be reordered. + * It must be <code>length>0</code>. + * + * @param indexMap is a pointer to an array of <code>length</code> + * indexes which will reflect the reordering of the characters. + * The array does not need to be initialized.<p> + * The index map will result in <code>indexMap[visualIndex]==logicalIndex</code>. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ubidi_reorderVisual(const UBiDiLevel *levels, int32_t length, int32_t *indexMap); + +/** + * Invert an index map. + * The index mapping of the first map is inverted and written to + * the second one. + * + * @param srcMap is an array with <code>length</code> elements + * which defines the original mapping from a source array containing + * <code>length</code> elements to a destination array. + * Some elements of the source array may have no mapping in the + * destination array. In that case, their value will be + * the special value <code>UBIDI_MAP_NOWHERE</code>. + * All elements must be >=0 or equal to <code>UBIDI_MAP_NOWHERE</code>. + * Some elements may have a value >= <code>length</code>, if the + * destination array has more elements than the source array. + * There must be no duplicate indexes (two or more elements with the + * same value except <code>UBIDI_MAP_NOWHERE</code>). + * + * @param destMap is an array with a number of elements equal to 1 + the highest + * value in <code>srcMap</code>. + * <code>destMap</code> will be filled with the inverse mapping. + * If element with index i in <code>srcMap</code> has a value k different + * from <code>UBIDI_MAP_NOWHERE</code>, this means that element i of + * the source array maps to element k in the destination array. + * The inverse map will have value i in its k-th element. + * For all elements of the destination array which do not map to + * an element in the source array, the corresponding element in the + * inverse map will have a value equal to <code>UBIDI_MAP_NOWHERE</code>. + * + * @param length is the length of each array. + * @see UBIDI_MAP_NOWHERE + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ubidi_invertMap(const int32_t *srcMap, int32_t *destMap, int32_t length); + +/** option flags for ubidi_writeReordered() */ + +/** + * option bit for ubidi_writeReordered(): + * keep combining characters after their base characters in RTL runs + * + * @see ubidi_writeReordered + * @stable ICU 2.0 + */ +#define UBIDI_KEEP_BASE_COMBINING 1 + +/** + * option bit for ubidi_writeReordered(): + * replace characters with the "mirrored" property in RTL runs + * by their mirror-image mappings + * + * @see ubidi_writeReordered + * @stable ICU 2.0 + */ +#define UBIDI_DO_MIRRORING 2 + +/** + * option bit for ubidi_writeReordered(): + * surround the run with LRMs if necessary; + * this is part of the approximate "inverse Bidi" algorithm + * + * <p>This option does not imply corresponding adjustment of the index + * mappings.</p> + * + * @see ubidi_setInverse + * @see ubidi_writeReordered + * @stable ICU 2.0 + */ +#define UBIDI_INSERT_LRM_FOR_NUMERIC 4 + +/** + * option bit for ubidi_writeReordered(): + * remove Bidi control characters + * (this does not affect #UBIDI_INSERT_LRM_FOR_NUMERIC) + * + * <p>This option does not imply corresponding adjustment of the index + * mappings.</p> + * + * @see ubidi_writeReordered + * @stable ICU 2.0 + */ +#define UBIDI_REMOVE_BIDI_CONTROLS 8 + +/** + * option bit for ubidi_writeReordered(): + * write the output in reverse order + * + * <p>This has the same effect as calling <code>ubidi_writeReordered()</code> + * first without this option, and then calling + * <code>ubidi_writeReverse()</code> without mirroring. + * Doing this in the same step is faster and avoids a temporary buffer. + * An example for using this option is output to a character terminal that + * is designed for RTL scripts and stores text in reverse order.</p> + * + * @see ubidi_writeReordered + * @stable ICU 2.0 + */ +#define UBIDI_OUTPUT_REVERSE 16 + +/** + * Get the length of the source text processed by the last call to + * <code>ubidi_setPara()</code>. This length may be different from the length + * of the source text if option <code>#UBIDI_OPTION_STREAMING</code> + * has been set. + * <br> + * Note that whenever the length of the text affects the execution or the + * result of a function, it is the processed length which must be considered, + * except for <code>ubidi_setPara</code> (which receives unprocessed source + * text) and <code>ubidi_getLength</code> (which returns the original length + * of the source text).<br> + * In particular, the processed length is the one to consider in the following + * cases: + * <ul> + * <li>maximum value of the <code>limit</code> argument of + * <code>ubidi_setLine</code></li> + * <li>maximum value of the <code>charIndex</code> argument of + * <code>ubidi_getParagraph</code></li> + * <li>maximum value of the <code>charIndex</code> argument of + * <code>ubidi_getLevelAt</code></li> + * <li>number of elements in the array returned by <code>ubidi_getLevels</code></li> + * <li>maximum value of the <code>logicalStart</code> argument of + * <code>ubidi_getLogicalRun</code></li> + * <li>maximum value of the <code>logicalIndex</code> argument of + * <code>ubidi_getVisualIndex</code></li> + * <li>number of elements filled in the <code>*indexMap</code> argument of + * <code>ubidi_getLogicalMap</code></li> + * <li>length of text processed by <code>ubidi_writeReordered</code></li> + * </ul> + * + * @param pBiDi is the paragraph <code>UBiDi</code> object. + * + * @return The length of the part of the source text processed by + * the last call to <code>ubidi_setPara</code>. + * @see ubidi_setPara + * @see UBIDI_OPTION_STREAMING + * @stable ICU 3.6 + */ +U_STABLE int32_t U_EXPORT2 +ubidi_getProcessedLength(const UBiDi *pBiDi); + +/** + * Get the length of the reordered text resulting from the last call to + * <code>ubidi_setPara()</code>. This length may be different from the length + * of the source text if option <code>#UBIDI_OPTION_INSERT_MARKS</code> + * or option <code>#UBIDI_OPTION_REMOVE_CONTROLS</code> has been set. + * <br> + * This resulting length is the one to consider in the following cases: + * <ul> + * <li>maximum value of the <code>visualIndex</code> argument of + * <code>ubidi_getLogicalIndex</code></li> + * <li>number of elements of the <code>*indexMap</code> argument of + * <code>ubidi_getVisualMap</code></li> + * </ul> + * Note that this length stays identical to the source text length if + * Bidi marks are inserted or removed using option bits of + * <code>ubidi_writeReordered</code>, or if option + * <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code> has been set. + * + * @param pBiDi is the paragraph <code>UBiDi</code> object. + * + * @return The length of the reordered text resulting from + * the last call to <code>ubidi_setPara</code>. + * @see ubidi_setPara + * @see UBIDI_OPTION_INSERT_MARKS + * @see UBIDI_OPTION_REMOVE_CONTROLS + * @stable ICU 3.6 + */ +U_STABLE int32_t U_EXPORT2 +ubidi_getResultLength(const UBiDi *pBiDi); + +U_CDECL_BEGIN + +#ifndef U_HIDE_DEPRECATED_API +/** + * Value returned by <code>UBiDiClassCallback</code> callbacks when + * there is no need to override the standard Bidi class for a given code point. + * + * This constant is deprecated; use u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1 instead. + * + * @see UBiDiClassCallback + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ +#define U_BIDI_CLASS_DEFAULT U_CHAR_DIRECTION_COUNT +#endif // U_HIDE_DEPRECATED_API + +/** + * Callback type declaration for overriding default Bidi class values with + * custom ones. + * <p>Usually, the function pointer will be propagated to a <code>UBiDi</code> + * object by calling the <code>ubidi_setClassCallback()</code> function; + * then the callback will be invoked by the UBA implementation any time the + * class of a character is to be determined.</p> + * + * @param context is a pointer to the callback private data. + * + * @param c is the code point to get a Bidi class for. + * + * @return The directional property / Bidi class for the given code point + * <code>c</code> if the default class has been overridden, or + * <code>#U_BIDI_CLASS_DEFAULT=u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1</code> + * if the standard Bidi class value for <code>c</code> is to be used. + * @see ubidi_setClassCallback + * @see ubidi_getClassCallback + * @stable ICU 3.6 + */ +typedef UCharDirection U_CALLCONV +UBiDiClassCallback(const void *context, UChar32 c); + +U_CDECL_END + +/** + * Retrieve the Bidi class for a given code point. + * <p>If a <code>#UBiDiClassCallback</code> callback is defined and returns a + * value other than <code>#U_BIDI_CLASS_DEFAULT=u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1</code>, + * that value is used; otherwise the default class determination mechanism is invoked.</p> + * + * @param pBiDi is the paragraph <code>UBiDi</code> object. + * + * @param c is the code point whose Bidi class must be retrieved. + * + * @return The Bidi class for character <code>c</code> based + * on the given <code>pBiDi</code> instance. + * @see UBiDiClassCallback + * @stable ICU 3.6 + */ +U_STABLE UCharDirection U_EXPORT2 +ubidi_getCustomizedClass(UBiDi *pBiDi, UChar32 c); + +/** + * Set the callback function and callback data used by the UBA + * implementation for Bidi class determination. + * <p>This may be useful for assigning Bidi classes to PUA characters, or + * for special application needs. For instance, an application may want to + * handle all spaces like L or R characters (according to the base direction) + * when creating the visual ordering of logical lines which are part of a report + * organized in columns: there should not be interaction between adjacent + * cells.<p> + * + * @param pBiDi is the paragraph <code>UBiDi</code> object. + * + * @param newFn is the new callback function pointer. + * + * @param newContext is the new callback context pointer. This can be NULL. + * + * @param oldFn fillin: Returns the old callback function pointer. This can be + * NULL. + * + * @param oldContext fillin: Returns the old callback's context. This can be + * NULL. + * + * @param pErrorCode must be a valid pointer to an error code value. + * + * @see ubidi_getClassCallback + * @stable ICU 3.6 + */ +U_STABLE void U_EXPORT2 +ubidi_setClassCallback(UBiDi *pBiDi, UBiDiClassCallback *newFn, + const void *newContext, UBiDiClassCallback **oldFn, + const void **oldContext, UErrorCode *pErrorCode); + +/** + * Get the current callback function used for Bidi class determination. + * + * @param pBiDi is the paragraph <code>UBiDi</code> object. + * + * @param fn fillin: Returns the callback function pointer. + * + * @param context fillin: Returns the callback's private context. + * + * @see ubidi_setClassCallback + * @stable ICU 3.6 + */ +U_STABLE void U_EXPORT2 +ubidi_getClassCallback(UBiDi *pBiDi, UBiDiClassCallback **fn, const void **context); + +/** + * Take a <code>UBiDi</code> object containing the reordering + * information for a piece of text (one or more paragraphs) set by + * <code>ubidi_setPara()</code> or for a line of text set by + * <code>ubidi_setLine()</code> and write a reordered string to the + * destination buffer. + * + * This function preserves the integrity of characters with multiple + * code units and (optionally) combining characters. + * Characters in RTL runs can be replaced by mirror-image characters + * in the destination buffer. Note that "real" mirroring has + * to be done in a rendering engine by glyph selection + * and that for many "mirrored" characters there are no + * Unicode characters as mirror-image equivalents. + * There are also options to insert or remove Bidi control + * characters; see the description of the <code>destSize</code> + * and <code>options</code> parameters and of the option bit flags. + * + * @param pBiDi A pointer to a <code>UBiDi</code> object that + * is set by <code>ubidi_setPara()</code> or + * <code>ubidi_setLine()</code> and contains the reordering + * information for the text that it was defined for, + * as well as a pointer to that text.<br><br> + * The text was aliased (only the pointer was stored + * without copying the contents) and must not have been modified + * since the <code>ubidi_setPara()</code> call. + * + * @param dest A pointer to where the reordered text is to be copied. + * The source text and <code>dest[destSize]</code> + * must not overlap. + * + * @param destSize The size of the <code>dest</code> buffer, + * in number of UChars. + * If the <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code> + * option is set, then the destination length could be + * as large as + * <code>ubidi_getLength(pBiDi)+2*ubidi_countRuns(pBiDi)</code>. + * If the <code>UBIDI_REMOVE_BIDI_CONTROLS</code> option + * is set, then the destination length may be less than + * <code>ubidi_getLength(pBiDi)</code>. + * If none of these options is set, then the destination length + * will be exactly <code>ubidi_getProcessedLength(pBiDi)</code>. + * + * @param options A bit set of options for the reordering that control + * how the reordered text is written. + * The options include mirroring the characters on a code + * point basis and inserting LRM characters, which is used + * especially for transforming visually stored text + * to logically stored text (although this is still an + * imperfect implementation of an "inverse Bidi" algorithm + * because it uses the "forward Bidi" algorithm at its core). + * The available options are: + * <code>#UBIDI_DO_MIRRORING</code>, + * <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code>, + * <code>#UBIDI_KEEP_BASE_COMBINING</code>, + * <code>#UBIDI_OUTPUT_REVERSE</code>, + * <code>#UBIDI_REMOVE_BIDI_CONTROLS</code> + * + * @param pErrorCode must be a valid pointer to an error code value. + * + * @return The length of the output string. + * + * @see ubidi_getProcessedLength + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ubidi_writeReordered(UBiDi *pBiDi, + UChar *dest, int32_t destSize, + uint16_t options, + UErrorCode *pErrorCode); + +/** + * Reverse a Right-To-Left run of Unicode text. + * + * This function preserves the integrity of characters with multiple + * code units and (optionally) combining characters. + * Characters can be replaced by mirror-image characters + * in the destination buffer. Note that "real" mirroring has + * to be done in a rendering engine by glyph selection + * and that for many "mirrored" characters there are no + * Unicode characters as mirror-image equivalents. + * There are also options to insert or remove Bidi control + * characters. + * + * This function is the implementation for reversing RTL runs as part + * of <code>ubidi_writeReordered()</code>. For detailed descriptions + * of the parameters, see there. + * Since no Bidi controls are inserted here, the output string length + * will never exceed <code>srcLength</code>. + * + * @see ubidi_writeReordered + * + * @param src A pointer to the RTL run text. + * + * @param srcLength The length of the RTL run. + * + * @param dest A pointer to where the reordered text is to be copied. + * <code>src[srcLength]</code> and <code>dest[destSize]</code> + * must not overlap. + * + * @param destSize The size of the <code>dest</code> buffer, + * in number of UChars. + * If the <code>UBIDI_REMOVE_BIDI_CONTROLS</code> option + * is set, then the destination length may be less than + * <code>srcLength</code>. + * If this option is not set, then the destination length + * will be exactly <code>srcLength</code>. + * + * @param options A bit set of options for the reordering that control + * how the reordered text is written. + * See the <code>options</code> parameter in <code>ubidi_writeReordered()</code>. + * + * @param pErrorCode must be a valid pointer to an error code value. + * + * @return The length of the output string. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ubidi_writeReverse(const UChar *src, int32_t srcLength, + UChar *dest, int32_t destSize, + uint16_t options, + UErrorCode *pErrorCode); + +/*#define BIDI_SAMPLE_CODE*/ +/*@}*/ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ubiditransform.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ubiditransform.h new file mode 100755 index 00000000..627b005e --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ubiditransform.h @@ -0,0 +1,318 @@ +/* +****************************************************************************** +* +* © 2016 and later: Unicode, Inc. and others. +* License & terms of use: http://www.unicode.org/copyright.html +* +****************************************************************************** +* file name: ubiditransform.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2016jul24 +* created by: Lina Kemmel +* +*/ + +#ifndef UBIDITRANSFORM_H +#define UBIDITRANSFORM_H + +#include "unicode/utypes.h" +#include "unicode/ubidi.h" +#include "unicode/uchar.h" +#include "unicode/localpointer.h" + +/** + * \file + * \brief Bidi Transformations + * + * <code>UBiDiOrder</code> indicates the order of text.<p> + * This bidi transformation engine supports all possible combinations (4 in + * total) of input and output text order: + * <ul> + * <li><logical input, visual output>: unless the output direction is RTL, this + * corresponds to a normal operation of the Bidi algorithm as described in the + * Unicode Technical Report and implemented by <code>UBiDi</code> when the + * reordering mode is set to <code>UBIDI_REORDER_DEFAULT</code>. Visual RTL + * mode is not supported by <code>UBiDi</code> and is accomplished through + * reversing a visual LTR string,</li> + * <li><visual input, logical output>: unless the input direction is RTL, this + * corresponds to an "inverse bidi algorithm" in <code>UBiDi</code> with the + * reordering mode set to <code>UBIDI_REORDER_INVERSE_LIKE_DIRECT</code>. + * Visual RTL mode is not not supported by <code>UBiDi</code> and is + * accomplished through reversing a visual LTR string,</li> + * <li><logical input, logical output>: if the input and output base directions + * mismatch, this corresponds to the <code>UBiDi</code> implementation with the + * reordering mode set to <code>UBIDI_REORDER_RUNS_ONLY</code>; and if the + * input and output base directions are identical, the transformation engine + * will only handle character mirroring and Arabic shaping operations without + * reordering,</li> + * <li><visual input, visual output>: this reordering mode is not supported by + * the <code>UBiDi</code> engine; it implies character mirroring, Arabic + * shaping, and - if the input/output base directions mismatch - string + * reverse operations.</li> + * </ul> + * @see ubidi_setInverse + * @see ubidi_setReorderingMode + * @see UBIDI_REORDER_DEFAULT + * @see UBIDI_REORDER_INVERSE_LIKE_DIRECT + * @see UBIDI_REORDER_RUNS_ONLY + * @stable ICU 58 + */ +typedef enum { + /** 0: Constant indicating a logical order. + * This is the default for input text. + * @stable ICU 58 + */ + UBIDI_LOGICAL = 0, + /** 1: Constant indicating a visual order. + * This is a default for output text. + * @stable ICU 58 + */ + UBIDI_VISUAL +} UBiDiOrder; + +/** + * <code>UBiDiMirroring</code> indicates whether or not characters with the + * "mirrored" property in RTL runs should be replaced with their mirror-image + * counterparts. + * @see UBIDI_DO_MIRRORING + * @see ubidi_setReorderingOptions + * @see ubidi_writeReordered + * @see ubidi_writeReverse + * @stable ICU 58 + */ +typedef enum { + /** 0: Constant indicating that character mirroring should not be + * performed. + * This is the default. + * @stable ICU 58 + */ + UBIDI_MIRRORING_OFF = 0, + /** 1: Constant indicating that character mirroring should be performed. + * This corresponds to calling <code>ubidi_writeReordered</code> or + * <code>ubidi_writeReverse</code> with the + * <code>UBIDI_DO_MIRRORING</code> option bit set. + * @stable ICU 58 + */ + UBIDI_MIRRORING_ON +} UBiDiMirroring; + +/** + * Forward declaration of the <code>UBiDiTransform</code> structure that stores + * information used by the layout transformation engine. + * @stable ICU 58 + */ +typedef struct UBiDiTransform UBiDiTransform; + +/** + * Performs transformation of text from the bidi layout defined by the input + * ordering scheme to the bidi layout defined by the output ordering scheme, + * and applies character mirroring and Arabic shaping operations.<p> + * In terms of <code>UBiDi</code>, such a transformation implies: + * <ul> + * <li>calling <code>ubidi_setReorderingMode</code> as needed (when the + * reordering mode is other than normal),</li> + * <li>calling <code>ubidi_setInverse</code> as needed (when text should be + * transformed from a visual to a logical form),</li> + * <li>resolving embedding levels of each character in the input text by + * calling <code>ubidi_setPara</code>,</li> + * <li>reordering the characters based on the computed embedding levels, also + * performing character mirroring as needed, and streaming the result to the + * output, by calling <code>ubidi_writeReordered</code>,</li> + * <li>performing Arabic digit and letter shaping on the output text by calling + * <code>u_shapeArabic</code>.</li> + * </ul> + * An "ordering scheme" encompasses the base direction and the order of text, + * and these characteristics must be defined by the caller for both input and + * output explicitly .<p> + * There are 36 possible combinations of <input, output> ordering schemes, + * which are partially supported by <code>UBiDi</code> already. Examples of the + * currently supported combinations: + * <ul> + * <li><Logical LTR, Visual LTR>: this is equivalent to calling + * <code>ubidi_setPara</code> with <code>paraLevel == UBIDI_LTR</code>,</li> + * <li><Logical RTL, Visual LTR>: this is equivalent to calling + * <code>ubidi_setPara</code> with <code>paraLevel == UBIDI_RTL</code>,</li> + * <li><Logical Default ("Auto") LTR, Visual LTR>: this is equivalent to + * calling <code>ubidi_setPara</code> with + * <code>paraLevel == UBIDI_DEFAULT_LTR</code>,</li> + * <li><Logical Default ("Auto") RTL, Visual LTR>: this is equivalent to + * calling <code>ubidi_setPara</code> with + * <code>paraLevel == UBIDI_DEFAULT_RTL</code>,</li> + * <li><Visual LTR, Logical LTR>: this is equivalent to + * calling <code>ubidi_setInverse(UBiDi*, TRUE)</code> and then + * <code>ubidi_setPara</code> with <code>paraLevel == UBIDI_LTR</code>,</li> + * <li><Visual LTR, Logical RTL>: this is equivalent to + * calling <code>ubidi_setInverse(UBiDi*, TRUE)</code> and then + * <code>ubidi_setPara</code> with <code>paraLevel == UBIDI_RTL</code>.</li> + * </ul> + * All combinations that involve the Visual RTL scheme are unsupported by + * <code>UBiDi</code>, for instance: + * <ul> + * <li><Logical LTR, Visual RTL>,</li> + * <li><Visual RTL, Logical RTL>.</li> + * </ul> + * <p>Example of usage of the transformation engine:<br> + * <pre> + * \code + * UChar text1[] = {'a', 'b', 'c', 0x0625, '1', 0}; + * UChar text2[] = {'a', 'b', 'c', 0x0625, '1', 0}; + * UErrorCode errorCode = U_ZERO_ERROR; + * // Run a transformation. + * ubiditransform_transform(pBidiTransform, + * text1, -1, text2, -1, + * UBIDI_LTR, UBIDI_VISUAL, + * UBIDI_RTL, UBIDI_LOGICAL, + * UBIDI_MIRRORING_OFF, + * U_SHAPE_DIGITS_AN2EN | U_SHAPE_DIGIT_TYPE_AN_EXTENDED, + * &errorCode); + * // Do something with text2. + * text2[4] = '2'; + * // Run a reverse transformation. + * ubiditransform_transform(pBidiTransform, + * text2, -1, text1, -1, + * UBIDI_RTL, UBIDI_LOGICAL, + * UBIDI_LTR, UBIDI_VISUAL, + * UBIDI_MIRRORING_OFF, + * U_SHAPE_DIGITS_EN2AN | U_SHAPE_DIGIT_TYPE_AN_EXTENDED, + * &errorCode); + *\endcode + * </pre> + * </p> + * + * @param pBiDiTransform A pointer to a <code>UBiDiTransform</code> object + * allocated with <code>ubiditransform_open()</code> or + * <code>NULL</code>.<p> + * This object serves for one-time setup to amortize initialization + * overheads. Use of this object is not thread-safe. All other threads + * should allocate a new <code>UBiDiTransform</code> object by calling + * <code>ubiditransform_open()</code> before using it. Alternatively, + * a caller can set this parameter to <code>NULL</code>, in which case + * the object will be allocated by the engine on the fly.</p> + * @param src A pointer to the text that the Bidi layout transformations will + * be performed on. + * <p><strong>Note:</strong> the text must be (at least) + * <code>srcLength</code> long.</p> + * @param srcLength The length of the text, in number of UChars. If + * <code>length == -1</code> then the text must be zero-terminated. + * @param dest A pointer to where the processed text is to be copied. + * @param destSize The size of the <code>dest</code> buffer, in number of + * UChars. If the <code>U_SHAPE_LETTERS_UNSHAPE</code> option is set, + * then the destination length could be as large as + * <code>srcLength * 2</code>. Otherwise, the destination length will + * not exceed <code>srcLength</code>. If the caller reserves the last + * position for zero-termination, it should be excluded from + * <code>destSize</code>. + * <p><code>destSize == -1</code> is allowed and makes sense when + * <code>dest</code> was holds some meaningful value, e.g. that of + * <code>src</code>. In this case <code>dest</code> must be + * zero-terminated.</p> + * @param inParaLevel A base embedding level of the input as defined in + * <code>ubidi_setPara</code> documentation for the + * <code>paraLevel</code> parameter. + * @param inOrder An order of the input, which can be one of the + * <code>UBiDiOrder</code> values. + * @param outParaLevel A base embedding level of the output as defined in + * <code>ubidi_setPara</code> documentation for the + * <code>paraLevel</code> parameter. + * @param outOrder An order of the output, which can be one of the + * <code>UBiDiOrder</code> values. + * @param doMirroring Indicates whether or not to perform character mirroring, + * and can accept one of the <code>UBiDiMirroring</code> values. + * @param shapingOptions Arabic digit and letter shaping options defined in the + * ushape.h documentation. + * <p><strong>Note:</strong> Direction indicator options are computed by + * the transformation engine based on the effective ordering schemes, so + * user-defined direction indicators will be ignored.</p> + * @param pErrorCode A pointer to an error code value. + * + * @return The destination length, i.e. the number of UChars written to + * <code>dest</code>. If the transformation fails, the return value + * will be 0 (and the error code will be written to + * <code>pErrorCode</code>). + * + * @see UBiDiLevel + * @see UBiDiOrder + * @see UBiDiMirroring + * @see ubidi_setPara + * @see u_shapeArabic + * @stable ICU 58 + */ +U_STABLE uint32_t U_EXPORT2 +ubiditransform_transform(UBiDiTransform *pBiDiTransform, + const UChar *src, int32_t srcLength, + UChar *dest, int32_t destSize, + UBiDiLevel inParaLevel, UBiDiOrder inOrder, + UBiDiLevel outParaLevel, UBiDiOrder outOrder, + UBiDiMirroring doMirroring, uint32_t shapingOptions, + UErrorCode *pErrorCode); + +/** + * Allocates a <code>UBiDiTransform</code> object. This object can be reused, + * e.g. with different ordering schemes, mirroring or shaping options.<p> + * <strong>Note:</strong>The object can only be reused in the same thread. + * All other threads should allocate a new <code>UBiDiTransform</code> object + * before using it.<p> + * Example of usage:<p> + * <pre> + * \code + * UErrorCode errorCode = U_ZERO_ERROR; + * // Open a new UBiDiTransform. + * UBiDiTransform* transform = ubiditransform_open(&errorCode); + * // Run a transformation. + * ubiditransform_transform(transform, + * text1, -1, text2, -1, + * UBIDI_RTL, UBIDI_LOGICAL, + * UBIDI_LTR, UBIDI_VISUAL, + * UBIDI_MIRRORING_ON, + * U_SHAPE_DIGITS_EN2AN, + * &errorCode); + * // Do something with the output text and invoke another transformation using + * // that text as input. + * ubiditransform_transform(transform, + * text2, -1, text3, -1, + * UBIDI_LTR, UBIDI_VISUAL, + * UBIDI_RTL, UBIDI_VISUAL, + * UBIDI_MIRRORING_ON, + * 0, &errorCode); + *\endcode + * </pre> + * <p> + * The <code>UBiDiTransform</code> object must be deallocated by calling + * <code>ubiditransform_close()</code>. + * + * @return An empty <code>UBiDiTransform</code> object. + * @stable ICU 58 + */ +U_STABLE UBiDiTransform* U_EXPORT2 +ubiditransform_open(UErrorCode *pErrorCode); + +/** + * Deallocates the given <code>UBiDiTransform</code> object. + * @stable ICU 58 + */ +U_STABLE void U_EXPORT2 +ubiditransform_close(UBiDiTransform *pBidiTransform); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUBiDiTransformPointer + * "Smart pointer" class, closes a UBiDiTransform via ubiditransform_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 58 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUBiDiTransformPointer, UBiDiTransform, ubiditransform_close); + +U_NAMESPACE_END + +#endif + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ubrk.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ubrk.h new file mode 100755 index 00000000..73c1553b --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ubrk.h @@ -0,0 +1,628 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* Copyright (C) 1996-2015, International Business Machines Corporation and others. +* All Rights Reserved. +****************************************************************************** +*/ + +#ifndef UBRK_H +#define UBRK_H + +#include "unicode/utypes.h" +#include "unicode/uloc.h" +#include "unicode/utext.h" +#include "unicode/localpointer.h" + +/** + * A text-break iterator. + * For usage in C programs. + */ +#ifndef UBRK_TYPEDEF_UBREAK_ITERATOR +# define UBRK_TYPEDEF_UBREAK_ITERATOR + /** + * Opaque type representing an ICU Break iterator object. + * @stable ICU 2.0 + */ + typedef struct UBreakIterator UBreakIterator; +#endif + +#if !UCONFIG_NO_BREAK_ITERATION + +#include "unicode/parseerr.h" + +/** + * \file + * \brief C API: BreakIterator + * + * <h2> BreakIterator C API </h2> + * + * The BreakIterator C API defines methods for finding the location + * of boundaries in text. Pointer to a UBreakIterator maintain a + * current position and scan over text returning the index of characters + * where boundaries occur. + * <p> + * Line boundary analysis determines where a text string can be broken + * when line-wrapping. The mechanism correctly handles punctuation and + * hyphenated words. + * <p> + * Note: The locale keyword "lb" can be used to modify line break + * behavior according to the CSS level 3 line-break options, see + * <http://dev.w3.org/csswg/css-text/#line-breaking>. For example: + * "ja@lb=strict", "zh@lb=loose". + * <p> + * Sentence boundary analysis allows selection with correct + * interpretation of periods within numbers and abbreviations, and + * trailing punctuation marks such as quotation marks and parentheses. + * <p> + * Note: The locale keyword "ss" can be used to enable use of + * segmentation suppression data (preventing breaks in English after + * abbreviations such as "Mr." or "Est.", for example), as follows: + * "en@ss=standard". + * <p> + * Word boundary analysis is used by search and replace functions, as + * well as within text editing applications that allow the user to + * select words with a double click. Word selection provides correct + * interpretation of punctuation marks within and following + * words. Characters that are not part of a word, such as symbols or + * punctuation marks, have word-breaks on both sides. + * <p> + * Character boundary analysis identifies the boundaries of + * "Extended Grapheme Clusters", which are groupings of codepoints + * that should be treated as character-like units for many text operations. + * Please see Unicode Standard Annex #29, Unicode Text Segmentation, + * http://www.unicode.org/reports/tr29/ for additional information + * on grapheme clusters and guidelines on their use. + * <p> + * Title boundary analysis locates all positions, + * typically starts of words, that should be set to Title Case + * when title casing the text. + * <p> + * The text boundary positions are found according to the rules + * described in Unicode Standard Annex #29, Text Boundaries, and + * Unicode Standard Annex #14, Line Breaking Properties. These + * are available at http://www.unicode.org/reports/tr14/ and + * http://www.unicode.org/reports/tr29/. + * <p> + * In addition to the plain C API defined in this header file, an + * object oriented C++ API with equivalent functionality is defined in the + * file brkiter.h. + * <p> + * Code snippets illustrating the use of the Break Iterator APIs + * are available in the ICU User Guide, + * http://icu-project.org/userguide/boundaryAnalysis.html + * and in the sample program icu/source/samples/break/break.cpp + */ + +/** The possible types of text boundaries. @stable ICU 2.0 */ +typedef enum UBreakIteratorType { + /** Character breaks @stable ICU 2.0 */ + UBRK_CHARACTER = 0, + /** Word breaks @stable ICU 2.0 */ + UBRK_WORD = 1, + /** Line breaks @stable ICU 2.0 */ + UBRK_LINE = 2, + /** Sentence breaks @stable ICU 2.0 */ + UBRK_SENTENCE = 3, + +#ifndef U_HIDE_DEPRECATED_API + /** + * Title Case breaks + * The iterator created using this type locates title boundaries as described for + * Unicode 3.2 only. For Unicode 4.0 and above title boundary iteration, + * please use Word Boundary iterator. + * + * @deprecated ICU 2.8 Use the word break iterator for titlecasing for Unicode 4 and later. + */ + UBRK_TITLE = 4, + /** + * One more than the highest normal UBreakIteratorType value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UBRK_COUNT = 5 +#endif // U_HIDE_DEPRECATED_API +} UBreakIteratorType; + +/** Value indicating all text boundaries have been returned. + * @stable ICU 2.0 + */ +#define UBRK_DONE ((int32_t) -1) + + +/** + * Enum constants for the word break tags returned by + * getRuleStatus(). A range of values is defined for each category of + * word, to allow for further subdivisions of a category in future releases. + * Applications should check for tag values falling within the range, rather + * than for single individual values. + * + * The numeric values of all of these constants are stable (will not change). + * + * @stable ICU 2.2 +*/ +typedef enum UWordBreak { + /** Tag value for "words" that do not fit into any of other categories. + * Includes spaces and most punctuation. */ + UBRK_WORD_NONE = 0, + /** Upper bound for tags for uncategorized words. */ + UBRK_WORD_NONE_LIMIT = 100, + /** Tag value for words that appear to be numbers, lower limit. */ + UBRK_WORD_NUMBER = 100, + /** Tag value for words that appear to be numbers, upper limit. */ + UBRK_WORD_NUMBER_LIMIT = 200, + /** Tag value for words that contain letters, excluding + * hiragana, katakana or ideographic characters, lower limit. */ + UBRK_WORD_LETTER = 200, + /** Tag value for words containing letters, upper limit */ + UBRK_WORD_LETTER_LIMIT = 300, + /** Tag value for words containing kana characters, lower limit */ + UBRK_WORD_KANA = 300, + /** Tag value for words containing kana characters, upper limit */ + UBRK_WORD_KANA_LIMIT = 400, + /** Tag value for words containing ideographic characters, lower limit */ + UBRK_WORD_IDEO = 400, + /** Tag value for words containing ideographic characters, upper limit */ + UBRK_WORD_IDEO_LIMIT = 500 +} UWordBreak; + +/** + * Enum constants for the line break tags returned by getRuleStatus(). + * A range of values is defined for each category of + * word, to allow for further subdivisions of a category in future releases. + * Applications should check for tag values falling within the range, rather + * than for single individual values. + * + * The numeric values of all of these constants are stable (will not change). + * + * @stable ICU 2.8 +*/ +typedef enum ULineBreakTag { + /** Tag value for soft line breaks, positions at which a line break + * is acceptable but not required */ + UBRK_LINE_SOFT = 0, + /** Upper bound for soft line breaks. */ + UBRK_LINE_SOFT_LIMIT = 100, + /** Tag value for a hard, or mandatory line break */ + UBRK_LINE_HARD = 100, + /** Upper bound for hard line breaks. */ + UBRK_LINE_HARD_LIMIT = 200 +} ULineBreakTag; + + + +/** + * Enum constants for the sentence break tags returned by getRuleStatus(). + * A range of values is defined for each category of + * sentence, to allow for further subdivisions of a category in future releases. + * Applications should check for tag values falling within the range, rather + * than for single individual values. + * + * The numeric values of all of these constants are stable (will not change). + * + * @stable ICU 2.8 +*/ +typedef enum USentenceBreakTag { + /** Tag value for for sentences ending with a sentence terminator + * ('.', '?', '!', etc.) character, possibly followed by a + * hard separator (CR, LF, PS, etc.) + */ + UBRK_SENTENCE_TERM = 0, + /** Upper bound for tags for sentences ended by sentence terminators. */ + UBRK_SENTENCE_TERM_LIMIT = 100, + /** Tag value for for sentences that do not contain an ending + * sentence terminator ('.', '?', '!', etc.) character, but + * are ended only by a hard separator (CR, LF, PS, etc.) or end of input. + */ + UBRK_SENTENCE_SEP = 100, + /** Upper bound for tags for sentences ended by a separator. */ + UBRK_SENTENCE_SEP_LIMIT = 200 + /** Tag value for a hard, or mandatory line break */ +} USentenceBreakTag; + + +/** + * Open a new UBreakIterator for locating text boundaries for a specified locale. + * A UBreakIterator may be used for detecting character, line, word, + * and sentence breaks in text. + * @param type The type of UBreakIterator to open: one of UBRK_CHARACTER, UBRK_WORD, + * UBRK_LINE, UBRK_SENTENCE + * @param locale The locale specifying the text-breaking conventions. Note that + * locale keys such as "lb" and "ss" may be used to modify text break behavior, + * see general discussion of BreakIterator C API. + * @param text The text to be iterated over. May be null, in which case ubrk_setText() is + * used to specify the text to be iterated. + * @param textLength The number of characters in text, or -1 if null-terminated. + * @param status A UErrorCode to receive any errors. + * @return A UBreakIterator for the specified locale. + * @see ubrk_openRules + * @stable ICU 2.0 + */ +U_STABLE UBreakIterator* U_EXPORT2 +ubrk_open(UBreakIteratorType type, + const char *locale, + const UChar *text, + int32_t textLength, + UErrorCode *status); + +/** + * Open a new UBreakIterator for locating text boundaries using specified breaking rules. + * The rule syntax is ... (TBD) + * @param rules A set of rules specifying the text breaking conventions. + * @param rulesLength The number of characters in rules, or -1 if null-terminated. + * @param text The text to be iterated over. May be null, in which case ubrk_setText() is + * used to specify the text to be iterated. + * @param textLength The number of characters in text, or -1 if null-terminated. + * @param parseErr Receives position and context information for any syntax errors + * detected while parsing the rules. + * @param status A UErrorCode to receive any errors. + * @return A UBreakIterator for the specified rules. + * @see ubrk_open + * @stable ICU 2.2 + */ +U_STABLE UBreakIterator* U_EXPORT2 +ubrk_openRules(const UChar *rules, + int32_t rulesLength, + const UChar *text, + int32_t textLength, + UParseError *parseErr, + UErrorCode *status); + +/** + * Open a new UBreakIterator for locating text boundaries using precompiled binary rules. + * Opening a UBreakIterator this way is substantially faster than using ubrk_openRules. + * Binary rules may be obtained using ubrk_getBinaryRules. The compiled rules are not + * compatible across different major versions of ICU, nor across platforms of different + * endianness or different base character set family (ASCII vs EBCDIC). + * @param binaryRules A set of compiled binary rules specifying the text breaking + * conventions. Ownership of the storage containing the compiled + * rules remains with the caller of this function. The compiled + * rules must not be modified or deleted during the life of the + * break iterator. + * @param rulesLength The length of binaryRules in bytes; must be >= 0. + * @param text The text to be iterated over. May be null, in which case + * ubrk_setText() is used to specify the text to be iterated. + * @param textLength The number of characters in text, or -1 if null-terminated. + * @param status Pointer to UErrorCode to receive any errors. + * @return UBreakIterator for the specified rules. + * @see ubrk_getBinaryRules + * @stable ICU 59 + */ +U_STABLE UBreakIterator* U_EXPORT2 +ubrk_openBinaryRules(const uint8_t *binaryRules, int32_t rulesLength, + const UChar * text, int32_t textLength, + UErrorCode * status); + +/** + * Thread safe cloning operation + * @param bi iterator to be cloned + * @param stackBuffer <em>Deprecated functionality as of ICU 52, use NULL.</em><br> + * user allocated space for the new clone. If NULL new memory will be allocated. + * If buffer is not large enough, new memory will be allocated. + * Clients can use the U_BRK_SAFECLONE_BUFFERSIZE. + * @param pBufferSize <em>Deprecated functionality as of ICU 52, use NULL or 1.</em><br> + * pointer to size of allocated space. + * If *pBufferSize == 0, a sufficient size for use in cloning will + * be returned ('pre-flighting') + * If *pBufferSize is not enough for a stack-based safe clone, + * new memory will be allocated. + * @param status to indicate whether the operation went on smoothly or there were errors + * An informational status value, U_SAFECLONE_ALLOCATED_ERROR, is used if any allocations were necessary. + * @return pointer to the new clone + * @stable ICU 2.0 + */ +U_STABLE UBreakIterator * U_EXPORT2 +ubrk_safeClone( + const UBreakIterator *bi, + void *stackBuffer, + int32_t *pBufferSize, + UErrorCode *status); + +#ifndef U_HIDE_DEPRECATED_API + +/** + * A recommended size (in bytes) for the memory buffer to be passed to ubrk_saveClone(). + * @deprecated ICU 52. Do not rely on ubrk_safeClone() cloning into any provided buffer. + */ +#define U_BRK_SAFECLONE_BUFFERSIZE 1 + +#endif /* U_HIDE_DEPRECATED_API */ + +/** +* Close a UBreakIterator. +* Once closed, a UBreakIterator may no longer be used. +* @param bi The break iterator to close. + * @stable ICU 2.0 +*/ +U_STABLE void U_EXPORT2 +ubrk_close(UBreakIterator *bi); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUBreakIteratorPointer + * "Smart pointer" class, closes a UBreakIterator via ubrk_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUBreakIteratorPointer, UBreakIterator, ubrk_close); + +U_NAMESPACE_END + +#endif + +/** + * Sets an existing iterator to point to a new piece of text. + * The break iterator retains a pointer to the supplied text. + * The caller must not modify or delete the text while the BreakIterator + * retains the reference. + * + * @param bi The iterator to use + * @param text The text to be set + * @param textLength The length of the text + * @param status The error code + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ubrk_setText(UBreakIterator* bi, + const UChar* text, + int32_t textLength, + UErrorCode* status); + + +/** + * Sets an existing iterator to point to a new piece of text. + * + * All index positions returned by break iterator functions are + * native indices from the UText. For example, when breaking UTF-8 + * encoded text, the break positions returned by \ref ubrk_next, \ref ubrk_previous, etc. + * will be UTF-8 string indices, not UTF-16 positions. + * + * @param bi The iterator to use + * @param text The text to be set. + * This function makes a shallow clone of the supplied UText. This means + * that the caller is free to immediately close or otherwise reuse the + * UText that was passed as a parameter, but that the underlying text itself + * must not be altered while being referenced by the break iterator. + * @param status The error code + * @stable ICU 3.4 + */ +U_STABLE void U_EXPORT2 +ubrk_setUText(UBreakIterator* bi, + UText* text, + UErrorCode* status); + + + +/** + * Determine the most recently-returned text boundary. + * + * @param bi The break iterator to use. + * @return The character index most recently returned by \ref ubrk_next, \ref ubrk_previous, + * \ref ubrk_first, or \ref ubrk_last. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ubrk_current(const UBreakIterator *bi); + +/** + * Advance the iterator to the boundary following the current boundary. + * + * @param bi The break iterator to use. + * @return The character index of the next text boundary, or UBRK_DONE + * if all text boundaries have been returned. + * @see ubrk_previous + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ubrk_next(UBreakIterator *bi); + +/** + * Set the iterator position to the boundary preceding the current boundary. + * + * @param bi The break iterator to use. + * @return The character index of the preceding text boundary, or UBRK_DONE + * if all text boundaries have been returned. + * @see ubrk_next + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ubrk_previous(UBreakIterator *bi); + +/** + * Set the iterator position to zero, the start of the text being scanned. + * @param bi The break iterator to use. + * @return The new iterator position (zero). + * @see ubrk_last + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ubrk_first(UBreakIterator *bi); + +/** + * Set the iterator position to the index immediately <EM>beyond</EM> the last character in the text being scanned. + * This is not the same as the last character. + * @param bi The break iterator to use. + * @return The character offset immediately <EM>beyond</EM> the last character in the + * text being scanned. + * @see ubrk_first + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ubrk_last(UBreakIterator *bi); + +/** + * Set the iterator position to the first boundary preceding the specified offset. + * The new position is always smaller than offset, or UBRK_DONE. + * @param bi The break iterator to use. + * @param offset The offset to begin scanning. + * @return The text boundary preceding offset, or UBRK_DONE. + * @see ubrk_following + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ubrk_preceding(UBreakIterator *bi, + int32_t offset); + +/** + * Advance the iterator to the first boundary following the specified offset. + * The value returned is always greater than offset, or UBRK_DONE. + * @param bi The break iterator to use. + * @param offset The offset to begin scanning. + * @return The text boundary following offset, or UBRK_DONE. + * @see ubrk_preceding + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ubrk_following(UBreakIterator *bi, + int32_t offset); + +/** +* Get a locale for which text breaking information is available. +* A UBreakIterator in a locale returned by this function will perform the correct +* text breaking for the locale. +* @param index The index of the desired locale. +* @return A locale for which number text breaking information is available, or 0 if none. +* @see ubrk_countAvailable +* @stable ICU 2.0 +*/ +U_STABLE const char* U_EXPORT2 +ubrk_getAvailable(int32_t index); + +/** +* Determine how many locales have text breaking information available. +* This function is most useful as determining the loop ending condition for +* calls to \ref ubrk_getAvailable. +* @return The number of locales for which text breaking information is available. +* @see ubrk_getAvailable +* @stable ICU 2.0 +*/ +U_STABLE int32_t U_EXPORT2 +ubrk_countAvailable(void); + + +/** +* Returns true if the specified position is a boundary position. As a side +* effect, leaves the iterator pointing to the first boundary position at +* or after "offset". +* @param bi The break iterator to use. +* @param offset the offset to check. +* @return True if "offset" is a boundary position. +* @stable ICU 2.0 +*/ +U_STABLE UBool U_EXPORT2 +ubrk_isBoundary(UBreakIterator *bi, int32_t offset); + +/** + * Return the status from the break rule that determined the most recently + * returned break position. The values appear in the rule source + * within brackets, {123}, for example. For rules that do not specify a + * status, a default value of 0 is returned. + * <p> + * For word break iterators, the possible values are defined in enum UWordBreak. + * @stable ICU 2.2 + */ +U_STABLE int32_t U_EXPORT2 +ubrk_getRuleStatus(UBreakIterator *bi); + +/** + * Get the statuses from the break rules that determined the most recently + * returned break position. The values appear in the rule source + * within brackets, {123}, for example. The default status value for rules + * that do not explicitly provide one is zero. + * <p> + * For word break iterators, the possible values are defined in enum UWordBreak. + * @param bi The break iterator to use + * @param fillInVec an array to be filled in with the status values. + * @param capacity the length of the supplied vector. A length of zero causes + * the function to return the number of status values, in the + * normal way, without attempting to store any values. + * @param status receives error codes. + * @return The number of rule status values from rules that determined + * the most recent boundary returned by the break iterator. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +ubrk_getRuleStatusVec(UBreakIterator *bi, int32_t *fillInVec, int32_t capacity, UErrorCode *status); + +/** + * Return the locale of the break iterator. You can choose between the valid and + * the actual locale. + * @param bi break iterator + * @param type locale type (valid or actual) + * @param status error code + * @return locale string + * @stable ICU 2.8 + */ +U_STABLE const char* U_EXPORT2 +ubrk_getLocaleByType(const UBreakIterator *bi, ULocDataLocaleType type, UErrorCode* status); + +/** + * Set the subject text string upon which the break iterator is operating + * without changing any other aspect of the state. + * The new and previous text strings must have the same content. + * + * This function is intended for use in environments where ICU is operating on + * strings that may move around in memory. It provides a mechanism for notifying + * ICU that the string has been relocated, and providing a new UText to access the + * string in its new position. + * + * Note that the break iterator never copies the underlying text + * of a string being processed, but always operates directly on the original text + * provided by the user. Refreshing simply drops the references to the old text + * and replaces them with references to the new. + * + * Caution: this function is normally used only by very specialized + * system-level code. One example use case is with garbage collection + * that moves the text in memory. + * + * @param bi The break iterator. + * @param text The new (moved) text string. + * @param status Receives errors detected by this function. + * + * @stable ICU 49 + */ +U_STABLE void U_EXPORT2 +ubrk_refreshUText(UBreakIterator *bi, + UText *text, + UErrorCode *status); + + +/** + * Get a compiled binary version of the rules specifying the behavior of a UBreakIterator. + * The binary rules may be used with ubrk_openBinaryRules to open a new UBreakIterator + * more quickly than using ubrk_openRules. The compiled rules are not compatible across + * different major versions of ICU, nor across platforms of different endianness or + * different base character set family (ASCII vs EBCDIC). Supports preflighting (with + * binaryRules=NULL and rulesCapacity=0) to get the rules length without copying them to + * the binaryRules buffer. However, whether preflighting or not, if the actual length + * is greater than INT32_MAX, then the function returns 0 and sets *status to + * U_INDEX_OUTOFBOUNDS_ERROR. + + * @param bi The break iterator to use. + * @param binaryRules Buffer to receive the compiled binary rules; set to NULL for + * preflighting. + * @param rulesCapacity Capacity (in bytes) of the binaryRules buffer; set to 0 for + * preflighting. Must be >= 0. + * @param status Pointer to UErrorCode to receive any errors, such as + * U_BUFFER_OVERFLOW_ERROR, U_INDEX_OUTOFBOUNDS_ERROR, or + * U_ILLEGAL_ARGUMENT_ERROR. + * @return The actual byte length of the binary rules, if <= INT32_MAX; + * otherwise 0. If not preflighting and this is larger than + * rulesCapacity, *status will be set to an error. + * @see ubrk_openBinaryRules + * @stable ICU 59 + */ +U_STABLE int32_t U_EXPORT2 +ubrk_getBinaryRules(UBreakIterator *bi, + uint8_t * binaryRules, int32_t rulesCapacity, + UErrorCode * status); + +#endif /* #if !UCONFIG_NO_BREAK_ITERATION */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucal.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucal.h new file mode 100755 index 00000000..c765e785 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucal.h @@ -0,0 +1,1564 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ******************************************************************************* + * Copyright (C) 1996-2015, International Business Machines Corporation and + * others. All Rights Reserved. + ******************************************************************************* + */ + +#ifndef UCAL_H +#define UCAL_H + +#include "unicode/utypes.h" +#include "unicode/uenum.h" +#include "unicode/uloc.h" +#include "unicode/localpointer.h" + +#if !UCONFIG_NO_FORMATTING + +/** + * \file + * \brief C API: Calendar + * + * <h2>Calendar C API</h2> + * + * UCalendar C API is used for converting between a <code>UDate</code> object + * and a set of integer fields such as <code>UCAL_YEAR</code>, <code>UCAL_MONTH</code>, + * <code>UCAL_DAY</code>, <code>UCAL_HOUR</code>, and so on. + * (A <code>UDate</code> object represents a specific instant in + * time with millisecond precision. See UDate + * for information about the <code>UDate</code> .) + * + * <p> + * Types of <code>UCalendar</code> interpret a <code>UDate</code> + * according to the rules of a specific calendar system. The U_STABLE + * provides the enum UCalendarType with UCAL_TRADITIONAL and + * UCAL_GREGORIAN. + * <p> + * Like other locale-sensitive C API, calendar API provides a + * function, <code>ucal_open()</code>, which returns a pointer to + * <code>UCalendar</code> whose time fields have been initialized + * with the current date and time. We need to specify the type of + * calendar to be opened and the timezoneId. + * \htmlonly<blockquote>\endhtmlonly + * <pre> + * \code + * UCalendar *caldef; + * UChar *tzId; + * UErrorCode status; + * tzId=(UChar*)malloc(sizeof(UChar) * (strlen("PST") +1) ); + * u_uastrcpy(tzId, "PST"); + * caldef=ucal_open(tzID, u_strlen(tzID), NULL, UCAL_TRADITIONAL, &status); + * \endcode + * </pre> + * \htmlonly</blockquote>\endhtmlonly + * + * <p> + * A <code>UCalendar</code> object can produce all the time field values + * needed to implement the date-time formatting for a particular language + * and calendar style (for example, Japanese-Gregorian, Japanese-Traditional). + * + * <p> + * When computing a <code>UDate</code> from time fields, two special circumstances + * may arise: there may be insufficient information to compute the + * <code>UDate</code> (such as only year and month but no day in the month), + * or there may be inconsistent information (such as "Tuesday, July 15, 1996" + * -- July 15, 1996 is actually a Monday). + * + * <p> + * <strong>Insufficient information.</strong> The calendar will use default + * information to specify the missing fields. This may vary by calendar; for + * the Gregorian calendar, the default for a field is the same as that of the + * start of the epoch: i.e., UCAL_YEAR = 1970, UCAL_MONTH = JANUARY, UCAL_DATE = 1, etc. + * + * <p> + * <strong>Inconsistent information.</strong> If fields conflict, the calendar + * will give preference to fields set more recently. For example, when + * determining the day, the calendar will look for one of the following + * combinations of fields. The most recent combination, as determined by the + * most recently set single field, will be used. + * + * \htmlonly<blockquote>\endhtmlonly + * <pre> + * \code + * UCAL_MONTH + UCAL_DAY_OF_MONTH + * UCAL_MONTH + UCAL_WEEK_OF_MONTH + UCAL_DAY_OF_WEEK + * UCAL_MONTH + UCAL_DAY_OF_WEEK_IN_MONTH + UCAL_DAY_OF_WEEK + * UCAL_DAY_OF_YEAR + * UCAL_DAY_OF_WEEK + UCAL_WEEK_OF_YEAR + * \endcode + * </pre> + * \htmlonly</blockquote>\endhtmlonly + * + * For the time of day: + * + * \htmlonly<blockquote>\endhtmlonly + * <pre> + * \code + * UCAL_HOUR_OF_DAY + * UCAL_AM_PM + UCAL_HOUR + * \endcode + * </pre> + * \htmlonly</blockquote>\endhtmlonly + * + * <p> + * <strong>Note:</strong> for some non-Gregorian calendars, different + * fields may be necessary for complete disambiguation. For example, a full + * specification of the historial Arabic astronomical calendar requires year, + * month, day-of-month <em>and</em> day-of-week in some cases. + * + * <p> + * <strong>Note:</strong> There are certain possible ambiguities in + * interpretation of certain singular times, which are resolved in the + * following ways: + * <ol> + * <li> 24:00:00 "belongs" to the following day. That is, + * 23:59 on Dec 31, 1969 < 24:00 on Jan 1, 1970 < 24:01:00 on Jan 1, 1970 + * + * <li> Although historically not precise, midnight also belongs to "am", + * and noon belongs to "pm", so on the same day, + * 12:00 am (midnight) < 12:01 am, and 12:00 pm (noon) < 12:01 pm + * </ol> + * + * <p> + * The date or time format strings are not part of the definition of a + * calendar, as those must be modifiable or overridable by the user at + * runtime. Use {@link icu::DateFormat} + * to format dates. + * + * <p> + * <code>Calendar</code> provides an API for field "rolling", where fields + * can be incremented or decremented, but wrap around. For example, rolling the + * month up in the date <code>December 12, <b>1996</b></code> results in + * <code>January 12, <b>1996</b></code>. + * + * <p> + * <code>Calendar</code> also provides a date arithmetic function for + * adding the specified (signed) amount of time to a particular time field. + * For example, subtracting 5 days from the date <code>September 12, 1996</code> + * results in <code>September 7, 1996</code>. + * + * @stable ICU 2.0 + */ + +/** + * The time zone ID reserved for unknown time zone. + * @stable ICU 4.8 + */ +#define UCAL_UNKNOWN_ZONE_ID "Etc/Unknown" + +/** A calendar. + * For usage in C programs. + * @stable ICU 2.0 + */ +typedef void* UCalendar; + +/** Possible types of UCalendars + * @stable ICU 2.0 + */ +enum UCalendarType { + /** + * Despite the name, UCAL_TRADITIONAL designates the locale's default calendar, + * which may be the Gregorian calendar or some other calendar. + * @stable ICU 2.0 + */ + UCAL_TRADITIONAL, + /** + * A better name for UCAL_TRADITIONAL. + * @stable ICU 4.2 + */ + UCAL_DEFAULT = UCAL_TRADITIONAL, + /** + * Unambiguously designates the Gregorian calendar for the locale. + * @stable ICU 2.0 + */ + UCAL_GREGORIAN +}; + +/** @stable ICU 2.0 */ +typedef enum UCalendarType UCalendarType; + +/** Possible fields in a UCalendar + * @stable ICU 2.0 + */ +enum UCalendarDateFields { + /** + * Field number indicating the era, e.g., AD or BC in the Gregorian (Julian) calendar. + * This is a calendar-specific value. + * @stable ICU 2.6 + */ + UCAL_ERA, + + /** + * Field number indicating the year. This is a calendar-specific value. + * @stable ICU 2.6 + */ + UCAL_YEAR, + + /** + * Field number indicating the month. This is a calendar-specific value. + * The first month of the year is + * <code>JANUARY</code>; the last depends on the number of months in a year. + * @see #UCAL_JANUARY + * @see #UCAL_FEBRUARY + * @see #UCAL_MARCH + * @see #UCAL_APRIL + * @see #UCAL_MAY + * @see #UCAL_JUNE + * @see #UCAL_JULY + * @see #UCAL_AUGUST + * @see #UCAL_SEPTEMBER + * @see #UCAL_OCTOBER + * @see #UCAL_NOVEMBER + * @see #UCAL_DECEMBER + * @see #UCAL_UNDECIMBER + * @stable ICU 2.6 + */ + UCAL_MONTH, + + /** + * Field number indicating the + * week number within the current year. The first week of the year, as + * defined by <code>UCAL_FIRST_DAY_OF_WEEK</code> and <code>UCAL_MINIMAL_DAYS_IN_FIRST_WEEK</code> + * attributes, has value 1. Subclasses define + * the value of <code>UCAL_WEEK_OF_YEAR</code> for days before the first week of + * the year. + * @see ucal_getAttribute + * @see ucal_setAttribute + * @stable ICU 2.6 + */ + UCAL_WEEK_OF_YEAR, + + /** + * Field number indicating the + * week number within the current month. The first week of the month, as + * defined by <code>UCAL_FIRST_DAY_OF_WEEK</code> and <code>UCAL_MINIMAL_DAYS_IN_FIRST_WEEK</code> + * attributes, has value 1. Subclasses define + * the value of <code>WEEK_OF_MONTH</code> for days before the first week of + * the month. + * @see ucal_getAttribute + * @see ucal_setAttribute + * @see #UCAL_FIRST_DAY_OF_WEEK + * @see #UCAL_MINIMAL_DAYS_IN_FIRST_WEEK + * @stable ICU 2.6 + */ + UCAL_WEEK_OF_MONTH, + + /** + * Field number indicating the + * day of the month. This is a synonym for <code>DAY_OF_MONTH</code>. + * The first day of the month has value 1. + * @see #UCAL_DAY_OF_MONTH + * @stable ICU 2.6 + */ + UCAL_DATE, + + /** + * Field number indicating the day + * number within the current year. The first day of the year has value 1. + * @stable ICU 2.6 + */ + UCAL_DAY_OF_YEAR, + + /** + * Field number indicating the day + * of the week. This field takes values <code>SUNDAY</code>, + * <code>MONDAY</code>, <code>TUESDAY</code>, <code>WEDNESDAY</code>, + * <code>THURSDAY</code>, <code>FRIDAY</code>, and <code>SATURDAY</code>. + * @see #UCAL_SUNDAY + * @see #UCAL_MONDAY + * @see #UCAL_TUESDAY + * @see #UCAL_WEDNESDAY + * @see #UCAL_THURSDAY + * @see #UCAL_FRIDAY + * @see #UCAL_SATURDAY + * @stable ICU 2.6 + */ + UCAL_DAY_OF_WEEK, + + /** + * Field number indicating the + * ordinal number of the day of the week within the current month. Together + * with the <code>DAY_OF_WEEK</code> field, this uniquely specifies a day + * within a month. Unlike <code>WEEK_OF_MONTH</code> and + * <code>WEEK_OF_YEAR</code>, this field's value does <em>not</em> depend on + * <code>getFirstDayOfWeek()</code> or + * <code>getMinimalDaysInFirstWeek()</code>. <code>DAY_OF_MONTH 1</code> + * through <code>7</code> always correspond to <code>DAY_OF_WEEK_IN_MONTH + * 1</code>; <code>8</code> through <code>15</code> correspond to + * <code>DAY_OF_WEEK_IN_MONTH 2</code>, and so on. + * <code>DAY_OF_WEEK_IN_MONTH 0</code> indicates the week before + * <code>DAY_OF_WEEK_IN_MONTH 1</code>. Negative values count back from the + * end of the month, so the last Sunday of a month is specified as + * <code>DAY_OF_WEEK = SUNDAY, DAY_OF_WEEK_IN_MONTH = -1</code>. Because + * negative values count backward they will usually be aligned differently + * within the month than positive values. For example, if a month has 31 + * days, <code>DAY_OF_WEEK_IN_MONTH -1</code> will overlap + * <code>DAY_OF_WEEK_IN_MONTH 5</code> and the end of <code>4</code>. + * @see #UCAL_DAY_OF_WEEK + * @see #UCAL_WEEK_OF_MONTH + * @stable ICU 2.6 + */ + UCAL_DAY_OF_WEEK_IN_MONTH, + + /** + * Field number indicating + * whether the <code>HOUR</code> is before or after noon. + * E.g., at 10:04:15.250 PM the <code>AM_PM</code> is <code>PM</code>. + * @see #UCAL_AM + * @see #UCAL_PM + * @see #UCAL_HOUR + * @stable ICU 2.6 + */ + UCAL_AM_PM, + + /** + * Field number indicating the + * hour of the morning or afternoon. <code>HOUR</code> is used for the 12-hour + * clock. + * E.g., at 10:04:15.250 PM the <code>HOUR</code> is 10. + * @see #UCAL_AM_PM + * @see #UCAL_HOUR_OF_DAY + * @stable ICU 2.6 + */ + UCAL_HOUR, + + /** + * Field number indicating the + * hour of the day. <code>HOUR_OF_DAY</code> is used for the 24-hour clock. + * E.g., at 10:04:15.250 PM the <code>HOUR_OF_DAY</code> is 22. + * @see #UCAL_HOUR + * @stable ICU 2.6 + */ + UCAL_HOUR_OF_DAY, + + /** + * Field number indicating the + * minute within the hour. + * E.g., at 10:04:15.250 PM the <code>UCAL_MINUTE</code> is 4. + * @stable ICU 2.6 + */ + UCAL_MINUTE, + + /** + * Field number indicating the + * second within the minute. + * E.g., at 10:04:15.250 PM the <code>UCAL_SECOND</code> is 15. + * @stable ICU 2.6 + */ + UCAL_SECOND, + + /** + * Field number indicating the + * millisecond within the second. + * E.g., at 10:04:15.250 PM the <code>UCAL_MILLISECOND</code> is 250. + * @stable ICU 2.6 + */ + UCAL_MILLISECOND, + + /** + * Field number indicating the + * raw offset from GMT in milliseconds. + * @stable ICU 2.6 + */ + UCAL_ZONE_OFFSET, + + /** + * Field number indicating the + * daylight savings offset in milliseconds. + * @stable ICU 2.6 + */ + UCAL_DST_OFFSET, + + /** + * Field number + * indicating the extended year corresponding to the + * <code>UCAL_WEEK_OF_YEAR</code> field. This may be one greater or less + * than the value of <code>UCAL_EXTENDED_YEAR</code>. + * @stable ICU 2.6 + */ + UCAL_YEAR_WOY, + + /** + * Field number + * indicating the localized day of week. This will be a value from 1 + * to 7 inclusive, with 1 being the localized first day of the week. + * @stable ICU 2.6 + */ + UCAL_DOW_LOCAL, + + /** + * Year of this calendar system, encompassing all supra-year fields. For example, + * in Gregorian/Julian calendars, positive Extended Year values indicate years AD, + * 1 BC = 0 extended, 2 BC = -1 extended, and so on. + * @stable ICU 2.8 + */ + UCAL_EXTENDED_YEAR, + + /** + * Field number + * indicating the modified Julian day number. This is different from + * the conventional Julian day number in two regards. First, it + * demarcates days at local zone midnight, rather than noon GMT. + * Second, it is a local number; that is, it depends on the local time + * zone. It can be thought of as a single number that encompasses all + * the date-related fields. + * @stable ICU 2.8 + */ + UCAL_JULIAN_DAY, + + /** + * Ranges from 0 to 23:59:59.999 (regardless of DST). This field behaves <em>exactly</em> + * like a composite of all time-related fields, not including the zone fields. As such, + * it also reflects discontinuities of those fields on DST transition days. On a day + * of DST onset, it will jump forward. On a day of DST cessation, it will jump + * backward. This reflects the fact that it must be combined with the DST_OFFSET field + * to obtain a unique local time value. + * @stable ICU 2.8 + */ + UCAL_MILLISECONDS_IN_DAY, + + /** + * Whether or not the current month is a leap month (0 or 1). See the Chinese calendar for + * an example of this. + */ + UCAL_IS_LEAP_MONTH, + + /* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API, + * it is needed for layout of Calendar, DateFormat, and other objects */ + /** + * One more than the highest normal UCalendarDateFields value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UCAL_FIELD_COUNT, + + /** + * Field number indicating the + * day of the month. This is a synonym for <code>UCAL_DATE</code>. + * The first day of the month has value 1. + * @see #UCAL_DATE + * Synonym for UCAL_DATE + * @stable ICU 2.8 + **/ + UCAL_DAY_OF_MONTH=UCAL_DATE +}; + +/** @stable ICU 2.0 */ +typedef enum UCalendarDateFields UCalendarDateFields; + /** + * Useful constant for days of week. Note: Calendar day-of-week is 1-based. Clients + * who create locale resources for the field of first-day-of-week should be aware of + * this. For instance, in US locale, first-day-of-week is set to 1, i.e., UCAL_SUNDAY. + */ +/** Possible days of the week in a UCalendar + * @stable ICU 2.0 + */ +enum UCalendarDaysOfWeek { + /** Sunday */ + UCAL_SUNDAY = 1, + /** Monday */ + UCAL_MONDAY, + /** Tuesday */ + UCAL_TUESDAY, + /** Wednesday */ + UCAL_WEDNESDAY, + /** Thursday */ + UCAL_THURSDAY, + /** Friday */ + UCAL_FRIDAY, + /** Saturday */ + UCAL_SATURDAY +}; + +/** @stable ICU 2.0 */ +typedef enum UCalendarDaysOfWeek UCalendarDaysOfWeek; + +/** Possible months in a UCalendar. Note: Calendar month is 0-based. + * @stable ICU 2.0 + */ +enum UCalendarMonths { + /** January */ + UCAL_JANUARY, + /** February */ + UCAL_FEBRUARY, + /** March */ + UCAL_MARCH, + /** April */ + UCAL_APRIL, + /** May */ + UCAL_MAY, + /** June */ + UCAL_JUNE, + /** July */ + UCAL_JULY, + /** August */ + UCAL_AUGUST, + /** September */ + UCAL_SEPTEMBER, + /** October */ + UCAL_OCTOBER, + /** November */ + UCAL_NOVEMBER, + /** December */ + UCAL_DECEMBER, + /** Value of the <code>UCAL_MONTH</code> field indicating the + * thirteenth month of the year. Although the Gregorian calendar + * does not use this value, lunar calendars do. + */ + UCAL_UNDECIMBER +}; + +/** @stable ICU 2.0 */ +typedef enum UCalendarMonths UCalendarMonths; + +/** Possible AM/PM values in a UCalendar + * @stable ICU 2.0 + */ +enum UCalendarAMPMs { + /** AM */ + UCAL_AM, + /** PM */ + UCAL_PM +}; + +/** @stable ICU 2.0 */ +typedef enum UCalendarAMPMs UCalendarAMPMs; + +/** + * System time zone type constants used by filtering zones + * in ucal_openTimeZoneIDEnumeration. + * @see ucal_openTimeZoneIDEnumeration + * @stable ICU 4.8 + */ +enum USystemTimeZoneType { + /** + * Any system zones. + * @stable ICU 4.8 + */ + UCAL_ZONE_TYPE_ANY, + /** + * Canonical system zones. + * @stable ICU 4.8 + */ + UCAL_ZONE_TYPE_CANONICAL, + /** + * Canonical system zones associated with actual locations. + * @stable ICU 4.8 + */ + UCAL_ZONE_TYPE_CANONICAL_LOCATION +}; + +/** @stable ICU 4.8 */ +typedef enum USystemTimeZoneType USystemTimeZoneType; + +/** + * Create an enumeration over system time zone IDs with the given + * filter conditions. + * @param zoneType The system time zone type. + * @param region The ISO 3166 two-letter country code or UN M.49 + * three-digit area code. When NULL, no filtering + * done by region. + * @param rawOffset An offset from GMT in milliseconds, ignoring the + * effect of daylight savings time, if any. When NULL, + * no filtering done by zone offset. + * @param ec A pointer to an UErrorCode to receive any errors + * @return an enumeration object that the caller must dispose of + * using enum_close(), or NULL upon failure. In case of failure, + * *ec will indicate the error. + * @stable ICU 4.8 + */ +U_STABLE UEnumeration* U_EXPORT2 +ucal_openTimeZoneIDEnumeration(USystemTimeZoneType zoneType, const char* region, + const int32_t* rawOffset, UErrorCode* ec); + +/** + * Create an enumeration over all time zones. + * + * @param ec input/output error code + * + * @return an enumeration object that the caller must dispose of using + * uenum_close(), or NULL upon failure. In case of failure *ec will + * indicate the error. + * + * @stable ICU 2.6 + */ +U_STABLE UEnumeration* U_EXPORT2 +ucal_openTimeZones(UErrorCode* ec); + +/** + * Create an enumeration over all time zones associated with the given + * country. Some zones are affiliated with no country (e.g., "UTC"); + * these may also be retrieved, as a group. + * + * @param country the ISO 3166 two-letter country code, or NULL to + * retrieve zones not affiliated with any country + * + * @param ec input/output error code + * + * @return an enumeration object that the caller must dispose of using + * uenum_close(), or NULL upon failure. In case of failure *ec will + * indicate the error. + * + * @stable ICU 2.6 + */ +U_STABLE UEnumeration* U_EXPORT2 +ucal_openCountryTimeZones(const char* country, UErrorCode* ec); + +/** + * Return the default time zone. The default is determined initially + * by querying the host operating system. It may be changed with + * ucal_setDefaultTimeZone() or with the C++ TimeZone API. + * + * @param result A buffer to receive the result, or NULL + * + * @param resultCapacity The capacity of the result buffer + * + * @param ec input/output error code + * + * @return The result string length, not including the terminating + * null + * + * @stable ICU 2.6 + */ +U_STABLE int32_t U_EXPORT2 +ucal_getDefaultTimeZone(UChar* result, int32_t resultCapacity, UErrorCode* ec); + +/** + * Set the default time zone. + * + * @param zoneID null-terminated time zone ID + * + * @param ec input/output error code + * + * @stable ICU 2.6 + */ +U_STABLE void U_EXPORT2 +ucal_setDefaultTimeZone(const UChar* zoneID, UErrorCode* ec); + +/** + * Return the amount of time in milliseconds that the clock is + * advanced during daylight savings time for the given time zone, or + * zero if the time zone does not observe daylight savings time. + * + * @param zoneID null-terminated time zone ID + * + * @param ec input/output error code + * + * @return the number of milliseconds the time is advanced with + * respect to standard time when the daylight savings rules are in + * effect. This is always a non-negative number, most commonly either + * 3,600,000 (one hour) or zero. + * + * @stable ICU 2.6 + */ +U_STABLE int32_t U_EXPORT2 +ucal_getDSTSavings(const UChar* zoneID, UErrorCode* ec); + +/** + * Get the current date and time. + * The value returned is represented as milliseconds from the epoch. + * @return The current date and time. + * @stable ICU 2.0 + */ +U_STABLE UDate U_EXPORT2 +ucal_getNow(void); + +/** + * Open a UCalendar. + * A UCalendar may be used to convert a millisecond value to a year, + * month, and day. + * <p> + * Note: When unknown TimeZone ID is specified or if the TimeZone ID specified is "Etc/Unknown", + * the UCalendar returned by the function is initialized with GMT zone with TimeZone ID + * <code>UCAL_UNKNOWN_ZONE_ID</code> ("Etc/Unknown") without any errors/warnings. If you want + * to check if a TimeZone ID is valid prior to this function, use <code>ucal_getCanonicalTimeZoneID</code>. + * + * @param zoneID The desired TimeZone ID. If 0, use the default time zone. + * @param len The length of zoneID, or -1 if null-terminated. + * @param locale The desired locale + * @param type The type of UCalendar to open. This can be UCAL_GREGORIAN to open the Gregorian + * calendar for the locale, or UCAL_DEFAULT to open the default calendar for the locale (the + * default calendar may also be Gregorian). To open a specific non-Gregorian calendar for the + * locale, use uloc_setKeywordValue to set the value of the calendar keyword for the locale + * and then pass the locale to ucal_open with UCAL_DEFAULT as the type. + * @param status A pointer to an UErrorCode to receive any errors + * @return A pointer to a UCalendar, or 0 if an error occurred. + * @see #UCAL_UNKNOWN_ZONE_ID + * @stable ICU 2.0 + */ +U_STABLE UCalendar* U_EXPORT2 +ucal_open(const UChar* zoneID, + int32_t len, + const char* locale, + UCalendarType type, + UErrorCode* status); + +/** + * Close a UCalendar. + * Once closed, a UCalendar may no longer be used. + * @param cal The UCalendar to close. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucal_close(UCalendar *cal); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUCalendarPointer + * "Smart pointer" class, closes a UCalendar via ucal_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUCalendarPointer, UCalendar, ucal_close); + +U_NAMESPACE_END + +#endif + +/** + * Open a copy of a UCalendar. + * This function performs a deep copy. + * @param cal The calendar to copy + * @param status A pointer to an UErrorCode to receive any errors. + * @return A pointer to a UCalendar identical to cal. + * @stable ICU 4.0 + */ +U_STABLE UCalendar* U_EXPORT2 +ucal_clone(const UCalendar* cal, + UErrorCode* status); + +/** + * Set the TimeZone used by a UCalendar. + * A UCalendar uses a timezone for converting from Greenwich time to local time. + * @param cal The UCalendar to set. + * @param zoneID The desired TimeZone ID. If 0, use the default time zone. + * @param len The length of zoneID, or -1 if null-terminated. + * @param status A pointer to an UErrorCode to receive any errors. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucal_setTimeZone(UCalendar* cal, + const UChar* zoneID, + int32_t len, + UErrorCode* status); + +/** + * Get the ID of the UCalendar's time zone. + * + * @param cal The UCalendar to query. + * @param result Receives the UCalendar's time zone ID. + * @param resultLength The maximum size of result. + * @param status Receives the status. + * @return The total buffer size needed; if greater than resultLength, the output was truncated. + * @stable ICU 51 + */ +U_STABLE int32_t U_EXPORT2 +ucal_getTimeZoneID(const UCalendar *cal, + UChar *result, + int32_t resultLength, + UErrorCode *status); + +/** + * Possible formats for a UCalendar's display name + * @stable ICU 2.0 + */ +enum UCalendarDisplayNameType { + /** Standard display name */ + UCAL_STANDARD, + /** Short standard display name */ + UCAL_SHORT_STANDARD, + /** Daylight savings display name */ + UCAL_DST, + /** Short daylight savings display name */ + UCAL_SHORT_DST +}; + +/** @stable ICU 2.0 */ +typedef enum UCalendarDisplayNameType UCalendarDisplayNameType; + +/** + * Get the display name for a UCalendar's TimeZone. + * A display name is suitable for presentation to a user. + * @param cal The UCalendar to query. + * @param type The desired display name format; one of UCAL_STANDARD, UCAL_SHORT_STANDARD, + * UCAL_DST, UCAL_SHORT_DST + * @param locale The desired locale for the display name. + * @param result A pointer to a buffer to receive the formatted number. + * @param resultLength The maximum size of result. + * @param status A pointer to an UErrorCode to receive any errors + * @return The total buffer size needed; if greater than resultLength, the output was truncated. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucal_getTimeZoneDisplayName(const UCalendar* cal, + UCalendarDisplayNameType type, + const char* locale, + UChar* result, + int32_t resultLength, + UErrorCode* status); + +/** + * Determine if a UCalendar is currently in daylight savings time. + * Daylight savings time is not used in all parts of the world. + * @param cal The UCalendar to query. + * @param status A pointer to an UErrorCode to receive any errors + * @return TRUE if cal is currently in daylight savings time, FALSE otherwise + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +ucal_inDaylightTime(const UCalendar* cal, + UErrorCode* status ); + +/** + * Sets the GregorianCalendar change date. This is the point when the switch from + * Julian dates to Gregorian dates occurred. Default is 00:00:00 local time, October + * 15, 1582. Previous to this time and date will be Julian dates. + * + * This function works only for Gregorian calendars. If the UCalendar is not + * an instance of a Gregorian calendar, then a U_UNSUPPORTED_ERROR + * error code is set. + * + * @param cal The calendar object. + * @param date The given Gregorian cutover date. + * @param pErrorCode Pointer to a standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * + * @see GregorianCalendar::setGregorianChange + * @see ucal_getGregorianChange + * @stable ICU 3.6 + */ +U_STABLE void U_EXPORT2 +ucal_setGregorianChange(UCalendar *cal, UDate date, UErrorCode *pErrorCode); + +/** + * Gets the Gregorian Calendar change date. This is the point when the switch from + * Julian dates to Gregorian dates occurred. Default is 00:00:00 local time, October + * 15, 1582. Previous to this time and date will be Julian dates. + * + * This function works only for Gregorian calendars. If the UCalendar is not + * an instance of a Gregorian calendar, then a U_UNSUPPORTED_ERROR + * error code is set. + * + * @param cal The calendar object. + * @param pErrorCode Pointer to a standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return The Gregorian cutover time for this calendar. + * + * @see GregorianCalendar::getGregorianChange + * @see ucal_setGregorianChange + * @stable ICU 3.6 + */ +U_STABLE UDate U_EXPORT2 +ucal_getGregorianChange(const UCalendar *cal, UErrorCode *pErrorCode); + +/** + * Types of UCalendar attributes + * @stable ICU 2.0 + */ +enum UCalendarAttribute { + /** + * Lenient parsing + * @stable ICU 2.0 + */ + UCAL_LENIENT, + /** + * First day of week + * @stable ICU 2.0 + */ + UCAL_FIRST_DAY_OF_WEEK, + /** + * Minimum number of days in first week + * @stable ICU 2.0 + */ + UCAL_MINIMAL_DAYS_IN_FIRST_WEEK, + /** + * The behavior for handling wall time repeating multiple times + * at negative time zone offset transitions + * @stable ICU 49 + */ + UCAL_REPEATED_WALL_TIME, + /** + * The behavior for handling skipped wall time at positive time + * zone offset transitions. + * @stable ICU 49 + */ + UCAL_SKIPPED_WALL_TIME +}; + +/** @stable ICU 2.0 */ +typedef enum UCalendarAttribute UCalendarAttribute; + +/** + * Options for handling ambiguous wall time at time zone + * offset transitions. + * @stable ICU 49 + */ +enum UCalendarWallTimeOption { + /** + * An ambiguous wall time to be interpreted as the latest. + * This option is valid for UCAL_REPEATED_WALL_TIME and + * UCAL_SKIPPED_WALL_TIME. + * @stable ICU 49 + */ + UCAL_WALLTIME_LAST, + /** + * An ambiguous wall time to be interpreted as the earliest. + * This option is valid for UCAL_REPEATED_WALL_TIME and + * UCAL_SKIPPED_WALL_TIME. + * @stable ICU 49 + */ + UCAL_WALLTIME_FIRST, + /** + * An ambiguous wall time to be interpreted as the next valid + * wall time. This option is valid for UCAL_SKIPPED_WALL_TIME. + * @stable ICU 49 + */ + UCAL_WALLTIME_NEXT_VALID +}; +/** @stable ICU 49 */ +typedef enum UCalendarWallTimeOption UCalendarWallTimeOption; + +/** + * Get a numeric attribute associated with a UCalendar. + * Numeric attributes include the first day of the week, or the minimal numbers + * of days in the first week of the month. + * @param cal The UCalendar to query. + * @param attr The desired attribute; one of UCAL_LENIENT, UCAL_FIRST_DAY_OF_WEEK, + * UCAL_MINIMAL_DAYS_IN_FIRST_WEEK, UCAL_REPEATED_WALL_TIME or UCAL_SKIPPED_WALL_TIME + * @return The value of attr. + * @see ucal_setAttribute + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucal_getAttribute(const UCalendar* cal, + UCalendarAttribute attr); + +/** + * Set a numeric attribute associated with a UCalendar. + * Numeric attributes include the first day of the week, or the minimal numbers + * of days in the first week of the month. + * @param cal The UCalendar to set. + * @param attr The desired attribute; one of UCAL_LENIENT, UCAL_FIRST_DAY_OF_WEEK, + * UCAL_MINIMAL_DAYS_IN_FIRST_WEEK, UCAL_REPEATED_WALL_TIME or UCAL_SKIPPED_WALL_TIME + * @param newValue The new value of attr. + * @see ucal_getAttribute + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucal_setAttribute(UCalendar* cal, + UCalendarAttribute attr, + int32_t newValue); + +/** + * Get a locale for which calendars are available. + * A UCalendar in a locale returned by this function will contain the correct + * day and month names for the locale. + * @param localeIndex The index of the desired locale. + * @return A locale for which calendars are available, or 0 if none. + * @see ucal_countAvailable + * @stable ICU 2.0 + */ +U_STABLE const char* U_EXPORT2 +ucal_getAvailable(int32_t localeIndex); + +/** + * Determine how many locales have calendars available. + * This function is most useful as determining the loop ending condition for + * calls to \ref ucal_getAvailable. + * @return The number of locales for which calendars are available. + * @see ucal_getAvailable + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucal_countAvailable(void); + +/** + * Get a UCalendar's current time in millis. + * The time is represented as milliseconds from the epoch. + * @param cal The UCalendar to query. + * @param status A pointer to an UErrorCode to receive any errors + * @return The calendar's current time in millis. + * @see ucal_setMillis + * @see ucal_setDate + * @see ucal_setDateTime + * @stable ICU 2.0 + */ +U_STABLE UDate U_EXPORT2 +ucal_getMillis(const UCalendar* cal, + UErrorCode* status); + +/** + * Set a UCalendar's current time in millis. + * The time is represented as milliseconds from the epoch. + * @param cal The UCalendar to set. + * @param dateTime The desired date and time. + * @param status A pointer to an UErrorCode to receive any errors + * @see ucal_getMillis + * @see ucal_setDate + * @see ucal_setDateTime + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucal_setMillis(UCalendar* cal, + UDate dateTime, + UErrorCode* status ); + +/** + * Set a UCalendar's current date. + * The date is represented as a series of 32-bit integers. + * @param cal The UCalendar to set. + * @param year The desired year. + * @param month The desired month; one of UCAL_JANUARY, UCAL_FEBRUARY, UCAL_MARCH, UCAL_APRIL, UCAL_MAY, + * UCAL_JUNE, UCAL_JULY, UCAL_AUGUST, UCAL_SEPTEMBER, UCAL_OCTOBER, UCAL_NOVEMBER, UCAL_DECEMBER, UCAL_UNDECIMBER + * @param date The desired day of the month. + * @param status A pointer to an UErrorCode to receive any errors + * @see ucal_getMillis + * @see ucal_setMillis + * @see ucal_setDateTime + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucal_setDate(UCalendar* cal, + int32_t year, + int32_t month, + int32_t date, + UErrorCode* status); + +/** + * Set a UCalendar's current date. + * The date is represented as a series of 32-bit integers. + * @param cal The UCalendar to set. + * @param year The desired year. + * @param month The desired month; one of UCAL_JANUARY, UCAL_FEBRUARY, UCAL_MARCH, UCAL_APRIL, UCAL_MAY, + * UCAL_JUNE, UCAL_JULY, UCAL_AUGUST, UCAL_SEPTEMBER, UCAL_OCTOBER, UCAL_NOVEMBER, UCAL_DECEMBER, UCAL_UNDECIMBER + * @param date The desired day of the month. + * @param hour The desired hour of day. + * @param minute The desired minute. + * @param second The desirec second. + * @param status A pointer to an UErrorCode to receive any errors + * @see ucal_getMillis + * @see ucal_setMillis + * @see ucal_setDate + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucal_setDateTime(UCalendar* cal, + int32_t year, + int32_t month, + int32_t date, + int32_t hour, + int32_t minute, + int32_t second, + UErrorCode* status); + +/** + * Returns TRUE if two UCalendars are equivalent. Equivalent + * UCalendars will behave identically, but they may be set to + * different times. + * @param cal1 The first of the UCalendars to compare. + * @param cal2 The second of the UCalendars to compare. + * @return TRUE if cal1 and cal2 are equivalent, FALSE otherwise. + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +ucal_equivalentTo(const UCalendar* cal1, + const UCalendar* cal2); + +/** + * Add a specified signed amount to a particular field in a UCalendar. + * This can modify more significant fields in the calendar. + * Adding a positive value always means moving forward in time, so for the Gregorian calendar, + * starting with 100 BC and adding +1 to year results in 99 BC (even though this actually reduces + * the numeric value of the field itself). + * @param cal The UCalendar to which to add. + * @param field The field to which to add the signed value; one of UCAL_ERA, UCAL_YEAR, UCAL_MONTH, + * UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL_DAY_OF_WEEK, + * UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL_MINUTE, UCAL_SECOND, + * UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET. + * @param amount The signed amount to add to field. If the amount causes the value + * to exceed to maximum or minimum values for that field, other fields are modified + * to preserve the magnitude of the change. + * @param status A pointer to an UErrorCode to receive any errors + * @see ucal_roll + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucal_add(UCalendar* cal, + UCalendarDateFields field, + int32_t amount, + UErrorCode* status); + +/** + * Add a specified signed amount to a particular field in a UCalendar. + * This will not modify more significant fields in the calendar. + * Rolling by a positive value always means moving forward in time (unless the limit of the + * field is reached, in which case it may pin or wrap), so for Gregorian calendar, + * starting with 100 BC and rolling the year by +1 results in 99 BC. + * When eras have a definite beginning and end (as in the Chinese calendar, or as in most eras in the + * Japanese calendar) then rolling the year past either limit of the era will cause the year to wrap around. + * When eras only have a limit at one end, then attempting to roll the year past that limit will result in + * pinning the year at that limit. Note that for most calendars in which era 0 years move forward in time + * (such as Buddhist, Hebrew, or Islamic), it is possible for add or roll to result in negative years for + * era 0 (that is the only way to represent years before the calendar epoch). + * @param cal The UCalendar to which to add. + * @param field The field to which to add the signed value; one of UCAL_ERA, UCAL_YEAR, UCAL_MONTH, + * UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL_DAY_OF_WEEK, + * UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL_MINUTE, UCAL_SECOND, + * UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET. + * @param amount The signed amount to add to field. If the amount causes the value + * to exceed to maximum or minimum values for that field, the field is pinned to a permissible + * value. + * @param status A pointer to an UErrorCode to receive any errors + * @see ucal_add + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucal_roll(UCalendar* cal, + UCalendarDateFields field, + int32_t amount, + UErrorCode* status); + +/** + * Get the current value of a field from a UCalendar. + * All fields are represented as 32-bit integers. + * @param cal The UCalendar to query. + * @param field The desired field; one of UCAL_ERA, UCAL_YEAR, UCAL_MONTH, + * UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL_DAY_OF_WEEK, + * UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL_MINUTE, UCAL_SECOND, + * UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET. + * @param status A pointer to an UErrorCode to receive any errors + * @return The value of the desired field. + * @see ucal_set + * @see ucal_isSet + * @see ucal_clearField + * @see ucal_clear + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucal_get(const UCalendar* cal, + UCalendarDateFields field, + UErrorCode* status ); + +/** + * Set the value of a field in a UCalendar. + * All fields are represented as 32-bit integers. + * @param cal The UCalendar to set. + * @param field The field to set; one of UCAL_ERA, UCAL_YEAR, UCAL_MONTH, + * UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL_DAY_OF_WEEK, + * UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL_MINUTE, UCAL_SECOND, + * UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET. + * @param value The desired value of field. + * @see ucal_get + * @see ucal_isSet + * @see ucal_clearField + * @see ucal_clear + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucal_set(UCalendar* cal, + UCalendarDateFields field, + int32_t value); + +/** + * Determine if a field in a UCalendar is set. + * All fields are represented as 32-bit integers. + * @param cal The UCalendar to query. + * @param field The desired field; one of UCAL_ERA, UCAL_YEAR, UCAL_MONTH, + * UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL_DAY_OF_WEEK, + * UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL_MINUTE, UCAL_SECOND, + * UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET. + * @return TRUE if field is set, FALSE otherwise. + * @see ucal_get + * @see ucal_set + * @see ucal_clearField + * @see ucal_clear + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +ucal_isSet(const UCalendar* cal, + UCalendarDateFields field); + +/** + * Clear a field in a UCalendar. + * All fields are represented as 32-bit integers. + * @param cal The UCalendar containing the field to clear. + * @param field The field to clear; one of UCAL_ERA, UCAL_YEAR, UCAL_MONTH, + * UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL_DAY_OF_WEEK, + * UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL_MINUTE, UCAL_SECOND, + * UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET. + * @see ucal_get + * @see ucal_set + * @see ucal_isSet + * @see ucal_clear + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucal_clearField(UCalendar* cal, + UCalendarDateFields field); + +/** + * Clear all fields in a UCalendar. + * All fields are represented as 32-bit integers. + * @param calendar The UCalendar to clear. + * @see ucal_get + * @see ucal_set + * @see ucal_isSet + * @see ucal_clearField + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucal_clear(UCalendar* calendar); + +/** + * Possible limit values for a UCalendar + * @stable ICU 2.0 + */ +enum UCalendarLimitType { + /** Minimum value */ + UCAL_MINIMUM, + /** Maximum value */ + UCAL_MAXIMUM, + /** Greatest minimum value */ + UCAL_GREATEST_MINIMUM, + /** Leaest maximum value */ + UCAL_LEAST_MAXIMUM, + /** Actual minimum value */ + UCAL_ACTUAL_MINIMUM, + /** Actual maximum value */ + UCAL_ACTUAL_MAXIMUM +}; + +/** @stable ICU 2.0 */ +typedef enum UCalendarLimitType UCalendarLimitType; + +/** + * Determine a limit for a field in a UCalendar. + * A limit is a maximum or minimum value for a field. + * @param cal The UCalendar to query. + * @param field The desired field; one of UCAL_ERA, UCAL_YEAR, UCAL_MONTH, + * UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL_DAY_OF_WEEK, + * UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL_MINUTE, UCAL_SECOND, + * UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET. + * @param type The desired critical point; one of UCAL_MINIMUM, UCAL_MAXIMUM, UCAL_GREATEST_MINIMUM, + * UCAL_LEAST_MAXIMUM, UCAL_ACTUAL_MINIMUM, UCAL_ACTUAL_MAXIMUM + * @param status A pointer to an UErrorCode to receive any errors. + * @return The requested value. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucal_getLimit(const UCalendar* cal, + UCalendarDateFields field, + UCalendarLimitType type, + UErrorCode* status); + +/** Get the locale for this calendar object. You can choose between valid and actual locale. + * @param cal The calendar object + * @param type type of the locale we're looking for (valid or actual) + * @param status error code for the operation + * @return the locale name + * @stable ICU 2.8 + */ +U_STABLE const char * U_EXPORT2 +ucal_getLocaleByType(const UCalendar *cal, ULocDataLocaleType type, UErrorCode* status); + +/** + * Returns the timezone data version currently used by ICU. + * @param status error code for the operation + * @return the version string, such as "2007f" + * @stable ICU 3.8 + */ +U_STABLE const char * U_EXPORT2 +ucal_getTZDataVersion(UErrorCode* status); + +/** + * Returns the canonical system timezone ID or the normalized + * custom time zone ID for the given time zone ID. + * @param id The input timezone ID to be canonicalized. + * @param len The length of id, or -1 if null-terminated. + * @param result The buffer receives the canonical system timezone ID + * or the custom timezone ID in normalized format. + * @param resultCapacity The capacity of the result buffer. + * @param isSystemID Receives if the given ID is a known system + * timezone ID. + * @param status Receives the status. When the given timezone ID + * is neither a known system time zone ID nor a + * valid custom timezone ID, U_ILLEGAL_ARGUMENT_ERROR + * is set. + * @return The result string length, not including the terminating + * null. + * @stable ICU 4.0 + */ +U_STABLE int32_t U_EXPORT2 +ucal_getCanonicalTimeZoneID(const UChar* id, int32_t len, + UChar* result, int32_t resultCapacity, UBool *isSystemID, UErrorCode* status); +/** + * Get the resource keyword value string designating the calendar type for the UCalendar. + * @param cal The UCalendar to query. + * @param status The error code for the operation. + * @return The resource keyword value string. + * @stable ICU 4.2 + */ +U_STABLE const char * U_EXPORT2 +ucal_getType(const UCalendar *cal, UErrorCode* status); + +/** + * Given a key and a locale, returns an array of string values in a preferred + * order that would make a difference. These are all and only those values where + * the open (creation) of the service with the locale formed from the input locale + * plus input keyword and that value has different behavior than creation with the + * input locale alone. + * @param key one of the keys supported by this service. For now, only + * "calendar" is supported. + * @param locale the locale + * @param commonlyUsed if set to true it will return only commonly used values + * with the given locale in preferred order. Otherwise, + * it will return all the available values for the locale. + * @param status error status + * @return a string enumeration over keyword values for the given key and the locale. + * @stable ICU 4.2 + */ +U_STABLE UEnumeration* U_EXPORT2 +ucal_getKeywordValuesForLocale(const char* key, + const char* locale, + UBool commonlyUsed, + UErrorCode* status); + + +/** Weekday types, as returned by ucal_getDayOfWeekType(). + * @stable ICU 4.4 + */ +enum UCalendarWeekdayType { + /** + * Designates a full weekday (no part of the day is included in the weekend). + * @stable ICU 4.4 + */ + UCAL_WEEKDAY, + /** + * Designates a full weekend day (the entire day is included in the weekend). + * @stable ICU 4.4 + */ + UCAL_WEEKEND, + /** + * Designates a day that starts as a weekday and transitions to the weekend. + * Call ucal_getWeekendTransition() to get the time of transition. + * @stable ICU 4.4 + */ + UCAL_WEEKEND_ONSET, + /** + * Designates a day that starts as the weekend and transitions to a weekday. + * Call ucal_getWeekendTransition() to get the time of transition. + * @stable ICU 4.4 + */ + UCAL_WEEKEND_CEASE +}; + +/** @stable ICU 4.4 */ +typedef enum UCalendarWeekdayType UCalendarWeekdayType; + +/** + * Returns whether the given day of the week is a weekday, a weekend day, + * or a day that transitions from one to the other, for the locale and + * calendar system associated with this UCalendar (the locale's region is + * often the most determinant factor). If a transition occurs at midnight, + * then the days before and after the transition will have the + * type UCAL_WEEKDAY or UCAL_WEEKEND. If a transition occurs at a time + * other than midnight, then the day of the transition will have + * the type UCAL_WEEKEND_ONSET or UCAL_WEEKEND_CEASE. In this case, the + * function ucal_getWeekendTransition() will return the point of + * transition. + * @param cal The UCalendar to query. + * @param dayOfWeek The day of the week whose type is desired (UCAL_SUNDAY..UCAL_SATURDAY). + * @param status The error code for the operation. + * @return The UCalendarWeekdayType for the day of the week. + * @stable ICU 4.4 + */ +U_STABLE UCalendarWeekdayType U_EXPORT2 +ucal_getDayOfWeekType(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode* status); + +/** + * Returns the time during the day at which the weekend begins or ends in + * this calendar system. If ucal_getDayOfWeekType() returns UCAL_WEEKEND_ONSET + * for the specified dayOfWeek, return the time at which the weekend begins. + * If ucal_getDayOfWeekType() returns UCAL_WEEKEND_CEASE for the specified dayOfWeek, + * return the time at which the weekend ends. If ucal_getDayOfWeekType() returns + * some other UCalendarWeekdayType for the specified dayOfWeek, is it an error condition + * (U_ILLEGAL_ARGUMENT_ERROR). + * @param cal The UCalendar to query. + * @param dayOfWeek The day of the week for which the weekend transition time is + * desired (UCAL_SUNDAY..UCAL_SATURDAY). + * @param status The error code for the operation. + * @return The milliseconds after midnight at which the weekend begins or ends. + * @stable ICU 4.4 + */ +U_STABLE int32_t U_EXPORT2 +ucal_getWeekendTransition(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode *status); + +/** + * Returns TRUE if the given UDate is in the weekend in + * this calendar system. + * @param cal The UCalendar to query. + * @param date The UDate in question. + * @param status The error code for the operation. + * @return TRUE if the given UDate is in the weekend in + * this calendar system, FALSE otherwise. + * @stable ICU 4.4 + */ +U_STABLE UBool U_EXPORT2 +ucal_isWeekend(const UCalendar *cal, UDate date, UErrorCode *status); + +/** + * Return the difference between the target time and the time this calendar object is currently set to. + * If the target time is after the current calendar setting, the the returned value will be positive. + * The field parameter specifies the units of the return value. For example, if field is UCAL_MONTH + * and ucal_getFieldDifference returns 3, then the target time is 3 to less than 4 months after the + * current calendar setting. + * + * As a side effect of this call, this calendar is advanced toward target by the given amount. That is, + * calling this function has the side effect of calling ucal_add on this calendar with the specified + * field and an amount equal to the return value from this function. + * + * A typical way of using this function is to call it first with the largest field of interest, then + * with progressively smaller fields. + * + * @param cal The UCalendar to compare and update. + * @param target The target date to compare to the current calendar setting. + * @param field The field to compare; one of UCAL_ERA, UCAL_YEAR, UCAL_MONTH, + * UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL_DAY_OF_WEEK, + * UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL_MINUTE, UCAL_SECOND, + * UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET. + * @param status A pointer to an UErrorCode to receive any errors + * @return The date difference for the specified field. + * @stable ICU 4.8 + */ +U_STABLE int32_t U_EXPORT2 +ucal_getFieldDifference(UCalendar* cal, + UDate target, + UCalendarDateFields field, + UErrorCode* status); + +/** + * Time zone transition types for ucal_getTimeZoneTransitionDate + * @stable ICU 50 + */ +enum UTimeZoneTransitionType { + /** + * Get the next transition after the current date, + * i.e. excludes the current date + * @stable ICU 50 + */ + UCAL_TZ_TRANSITION_NEXT, + /** + * Get the next transition on or after the current date, + * i.e. may include the current date + * @stable ICU 50 + */ + UCAL_TZ_TRANSITION_NEXT_INCLUSIVE, + /** + * Get the previous transition before the current date, + * i.e. excludes the current date + * @stable ICU 50 + */ + UCAL_TZ_TRANSITION_PREVIOUS, + /** + * Get the previous transition on or before the current date, + * i.e. may include the current date + * @stable ICU 50 + */ + UCAL_TZ_TRANSITION_PREVIOUS_INCLUSIVE +}; + +typedef enum UTimeZoneTransitionType UTimeZoneTransitionType; /**< @stable ICU 50 */ + +/** +* Get the UDate for the next/previous time zone transition relative to +* the calendar's current date, in the time zone to which the calendar +* is currently set. If there is no known time zone transition of the +* requested type relative to the calendar's date, the function returns +* FALSE. +* @param cal The UCalendar to query. +* @param type The type of transition desired. +* @param transition A pointer to a UDate to be set to the transition time. +* If the function returns FALSE, the value set is unspecified. +* @param status A pointer to a UErrorCode to receive any errors. +* @return TRUE if a valid transition time is set in *transition, FALSE +* otherwise. +* @stable ICU 50 +*/ +U_STABLE UBool U_EXPORT2 +ucal_getTimeZoneTransitionDate(const UCalendar* cal, UTimeZoneTransitionType type, + UDate* transition, UErrorCode* status); + +/** +* Converts a system time zone ID to an equivalent Windows time zone ID. For example, +* Windows time zone ID "Pacific Standard Time" is returned for input "America/Los_Angeles". +* +* <p>There are system time zones that cannot be mapped to Windows zones. When the input +* system time zone ID is unknown or unmappable to a Windows time zone, then this +* function returns 0 as the result length, but the operation itself remains successful +* (no error status set on return). +* +* <p>This implementation utilizes <a href="http://unicode.org/cldr/charts/supplemental/zone_tzid.html"> +* Zone-Tzid mapping data</a>. The mapping data is updated time to time. To get the latest changes, +* please read the ICU user guide section <a href="http://userguide.icu-project.org/datetime/timezone#TOC-Updating-the-Time-Zone-Data"> +* Updating the Time Zone Data</a>. +* +* @param id A system time zone ID. +* @param len The length of <code>id</code>, or -1 if null-terminated. +* @param winid A buffer to receive a Windows time zone ID. +* @param winidCapacity The capacity of the result buffer <code>winid</code>. +* @param status Receives the status. +* @return The result string length, not including the terminating null. +* @see ucal_getTimeZoneIDForWindowsID +* +* @stable ICU 52 +*/ +U_STABLE int32_t U_EXPORT2 +ucal_getWindowsTimeZoneID(const UChar* id, int32_t len, + UChar* winid, int32_t winidCapacity, UErrorCode* status); + +/** +* Converts a Windows time zone ID to an equivalent system time zone ID +* for a region. For example, system time zone ID "America/Los_Angeles" is returned +* for input Windows ID "Pacific Standard Time" and region "US" (or <code>null</code>), +* "America/Vancouver" is returned for the same Windows ID "Pacific Standard Time" and +* region "CA". +* +* <p>Not all Windows time zones can be mapped to system time zones. When the input +* Windows time zone ID is unknown or unmappable to a system time zone, then this +* function returns 0 as the result length, but the operation itself remains successful +* (no error status set on return). +* +* <p>This implementation utilizes <a href="http://unicode.org/cldr/charts/supplemental/zone_tzid.html"> +* Zone-Tzid mapping data</a>. The mapping data is updated time to time. To get the latest changes, +* please read the ICU user guide section <a href="http://userguide.icu-project.org/datetime/timezone#TOC-Updating-the-Time-Zone-Data"> +* Updating the Time Zone Data</a>. +* +* @param winid A Windows time zone ID. +* @param len The length of <code>winid</code>, or -1 if null-terminated. +* @param region A null-terminated region code, or <code>NULL</code> if no regional preference. +* @param id A buffer to receive a system time zone ID. +* @param idCapacity The capacity of the result buffer <code>id</code>. +* @param status Receives the status. +* @return The result string length, not including the terminating null. +* @see ucal_getWindowsTimeZoneID +* +* @stable ICU 52 +*/ +U_STABLE int32_t U_EXPORT2 +ucal_getTimeZoneIDForWindowsID(const UChar* winid, int32_t len, const char* region, + UChar* id, int32_t idCapacity, UErrorCode* status); + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucasemap.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucasemap.h new file mode 100755 index 00000000..6b253e3d --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucasemap.h @@ -0,0 +1,385 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 2005-2012, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: ucasemap.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2005may06 +* created by: Markus W. Scherer +* +* Case mapping service object and functions using it. +*/ + +#ifndef __UCASEMAP_H__ +#define __UCASEMAP_H__ + +#include "unicode/utypes.h" +#include "unicode/localpointer.h" +#include "unicode/stringoptions.h" +#include "unicode/ustring.h" + +/** + * \file + * \brief C API: Unicode case mapping functions using a UCaseMap service object. + * + * The service object takes care of memory allocations, data loading, and setup + * for the attributes, as usual. + * + * Currently, the functionality provided here does not overlap with uchar.h + * and ustring.h, except for ucasemap_toTitle(). + * + * ucasemap_utf8XYZ() functions operate directly on UTF-8 strings. + */ + +/** + * UCaseMap is an opaque service object for newer ICU case mapping functions. + * Older functions did not use a service object. + * @stable ICU 3.4 + */ +struct UCaseMap; +typedef struct UCaseMap UCaseMap; /**< C typedef for struct UCaseMap. @stable ICU 3.4 */ + +/** + * Open a UCaseMap service object for a locale and a set of options. + * The locale ID and options are preprocessed so that functions using the + * service object need not process them in each call. + * + * @param locale ICU locale ID, used for language-dependent + * upper-/lower-/title-casing according to the Unicode standard. + * Usual semantics: ""=root, NULL=default locale, etc. + * @param options Options bit set, used for case folding and string comparisons. + * Same flags as for u_foldCase(), u_strFoldCase(), + * u_strCaseCompare(), etc. + * Use 0 or U_FOLD_CASE_DEFAULT for default behavior. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return Pointer to a UCaseMap service object, if successful. + * + * @see U_FOLD_CASE_DEFAULT + * @see U_FOLD_CASE_EXCLUDE_SPECIAL_I + * @see U_TITLECASE_NO_LOWERCASE + * @see U_TITLECASE_NO_BREAK_ADJUSTMENT + * @stable ICU 3.4 + */ +U_STABLE UCaseMap * U_EXPORT2 +ucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode); + +/** + * Close a UCaseMap service object. + * @param csm Object to be closed. + * @stable ICU 3.4 + */ +U_STABLE void U_EXPORT2 +ucasemap_close(UCaseMap *csm); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUCaseMapPointer + * "Smart pointer" class, closes a UCaseMap via ucasemap_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUCaseMapPointer, UCaseMap, ucasemap_close); + +U_NAMESPACE_END + +#endif + +/** + * Get the locale ID that is used for language-dependent case mappings. + * @param csm UCaseMap service object. + * @return locale ID + * @stable ICU 3.4 + */ +U_STABLE const char * U_EXPORT2 +ucasemap_getLocale(const UCaseMap *csm); + +/** + * Get the options bit set that is used for case folding and string comparisons. + * @param csm UCaseMap service object. + * @return options bit set + * @stable ICU 3.4 + */ +U_STABLE uint32_t U_EXPORT2 +ucasemap_getOptions(const UCaseMap *csm); + +/** + * Set the locale ID that is used for language-dependent case mappings. + * + * @param csm UCaseMap service object. + * @param locale Locale ID, see ucasemap_open(). + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * + * @see ucasemap_open + * @stable ICU 3.4 + */ +U_STABLE void U_EXPORT2 +ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode); + +/** + * Set the options bit set that is used for case folding and string comparisons. + * + * @param csm UCaseMap service object. + * @param options Options bit set, see ucasemap_open(). + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * + * @see ucasemap_open + * @stable ICU 3.4 + */ +U_STABLE void U_EXPORT2 +ucasemap_setOptions(UCaseMap *csm, uint32_t options, UErrorCode *pErrorCode); + +#if !UCONFIG_NO_BREAK_ITERATION + +/** + * Get the break iterator that is used for titlecasing. + * Do not modify the returned break iterator. + * @param csm UCaseMap service object. + * @return titlecasing break iterator + * @stable ICU 3.8 + */ +U_STABLE const UBreakIterator * U_EXPORT2 +ucasemap_getBreakIterator(const UCaseMap *csm); + +/** + * Set the break iterator that is used for titlecasing. + * The UCaseMap service object releases a previously set break iterator + * and "adopts" this new one, taking ownership of it. + * It will be released in a subsequent call to ucasemap_setBreakIterator() + * or ucasemap_close(). + * + * Break iterator operations are not thread-safe. Therefore, titlecasing + * functions use non-const UCaseMap objects. It is not possible to titlecase + * strings concurrently using the same UCaseMap. + * + * @param csm UCaseMap service object. + * @param iterToAdopt Break iterator to be adopted for titlecasing. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * + * @see ucasemap_toTitle + * @see ucasemap_utf8ToTitle + * @stable ICU 3.8 + */ +U_STABLE void U_EXPORT2 +ucasemap_setBreakIterator(UCaseMap *csm, UBreakIterator *iterToAdopt, UErrorCode *pErrorCode); + +/** + * Titlecase a UTF-16 string. This function is almost a duplicate of u_strToTitle(), + * except that it takes ucasemap_setOptions() into account and has performance + * advantages from being able to use a UCaseMap object for multiple case mapping + * operations, saving setup time. + * + * Casing is locale-dependent and context-sensitive. + * Titlecasing uses a break iterator to find the first characters of words + * that are to be titlecased. It titlecases those characters and lowercases + * all others. (This can be modified with ucasemap_setOptions().) + * + * Note: This function takes a non-const UCaseMap pointer because it will + * open a default break iterator if no break iterator was set yet, + * and effectively call ucasemap_setBreakIterator(); + * also because the break iterator is stateful and will be modified during + * the iteration. + * + * The titlecase break iterator can be provided to customize for arbitrary + * styles, using rules and dictionaries beyond the standard iterators. + * The standard titlecase iterator for the root locale implements the + * algorithm of Unicode TR 21. + * + * This function uses only the setText(), first() and next() methods of the + * provided break iterator. + * + * The result may be longer or shorter than the original. + * The source string and the destination buffer must not overlap. + * + * @param csm UCaseMap service object. This pointer is non-const! + * See the note above for details. + * @param dest A buffer for the result string. The result will be NUL-terminated if + * the buffer is large enough. + * The contents is undefined in case of failure. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param src The original string. + * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The length of the result string, if successful - or in case of a buffer overflow, + * in which case it will be greater than destCapacity. + * + * @see u_strToTitle + * @stable ICU 3.8 + */ +U_STABLE int32_t U_EXPORT2 +ucasemap_toTitle(UCaseMap *csm, + UChar *dest, int32_t destCapacity, + const UChar *src, int32_t srcLength, + UErrorCode *pErrorCode); + +#endif // UCONFIG_NO_BREAK_ITERATION + +/** + * Lowercase the characters in a UTF-8 string. + * Casing is locale-dependent and context-sensitive. + * The result may be longer or shorter than the original. + * The source string and the destination buffer must not overlap. + * + * @param csm UCaseMap service object. + * @param dest A buffer for the result string. The result will be NUL-terminated if + * the buffer is large enough. + * The contents is undefined in case of failure. + * @param destCapacity The size of the buffer (number of bytes). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param src The original string. + * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The length of the result string, if successful - or in case of a buffer overflow, + * in which case it will be greater than destCapacity. + * + * @see u_strToLower + * @stable ICU 3.4 + */ +U_STABLE int32_t U_EXPORT2 +ucasemap_utf8ToLower(const UCaseMap *csm, + char *dest, int32_t destCapacity, + const char *src, int32_t srcLength, + UErrorCode *pErrorCode); + +/** + * Uppercase the characters in a UTF-8 string. + * Casing is locale-dependent and context-sensitive. + * The result may be longer or shorter than the original. + * The source string and the destination buffer must not overlap. + * + * @param csm UCaseMap service object. + * @param dest A buffer for the result string. The result will be NUL-terminated if + * the buffer is large enough. + * The contents is undefined in case of failure. + * @param destCapacity The size of the buffer (number of bytes). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param src The original string. + * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The length of the result string, if successful - or in case of a buffer overflow, + * in which case it will be greater than destCapacity. + * + * @see u_strToUpper + * @stable ICU 3.4 + */ +U_STABLE int32_t U_EXPORT2 +ucasemap_utf8ToUpper(const UCaseMap *csm, + char *dest, int32_t destCapacity, + const char *src, int32_t srcLength, + UErrorCode *pErrorCode); + +#if !UCONFIG_NO_BREAK_ITERATION + +/** + * Titlecase a UTF-8 string. + * Casing is locale-dependent and context-sensitive. + * Titlecasing uses a break iterator to find the first characters of words + * that are to be titlecased. It titlecases those characters and lowercases + * all others. (This can be modified with ucasemap_setOptions().) + * + * Note: This function takes a non-const UCaseMap pointer because it will + * open a default break iterator if no break iterator was set yet, + * and effectively call ucasemap_setBreakIterator(); + * also because the break iterator is stateful and will be modified during + * the iteration. + * + * The titlecase break iterator can be provided to customize for arbitrary + * styles, using rules and dictionaries beyond the standard iterators. + * The standard titlecase iterator for the root locale implements the + * algorithm of Unicode TR 21. + * + * This function uses only the setUText(), first(), next() and close() methods of the + * provided break iterator. + * + * The result may be longer or shorter than the original. + * The source string and the destination buffer must not overlap. + * + * @param csm UCaseMap service object. This pointer is non-const! + * See the note above for details. + * @param dest A buffer for the result string. The result will be NUL-terminated if + * the buffer is large enough. + * The contents is undefined in case of failure. + * @param destCapacity The size of the buffer (number of bytes). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param src The original string. + * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The length of the result string, if successful - or in case of a buffer overflow, + * in which case it will be greater than destCapacity. + * + * @see u_strToTitle + * @see U_TITLECASE_NO_LOWERCASE + * @see U_TITLECASE_NO_BREAK_ADJUSTMENT + * @stable ICU 3.8 + */ +U_STABLE int32_t U_EXPORT2 +ucasemap_utf8ToTitle(UCaseMap *csm, + char *dest, int32_t destCapacity, + const char *src, int32_t srcLength, + UErrorCode *pErrorCode); + +#endif + +/** + * Case-folds the characters in a UTF-8 string. + * + * Case-folding is locale-independent and not context-sensitive, + * but there is an option for whether to include or exclude mappings for dotted I + * and dotless i that are marked with 'T' in CaseFolding.txt. + * + * The result may be longer or shorter than the original. + * The source string and the destination buffer must not overlap. + * + * @param csm UCaseMap service object. + * @param dest A buffer for the result string. The result will be NUL-terminated if + * the buffer is large enough. + * The contents is undefined in case of failure. + * @param destCapacity The size of the buffer (number of bytes). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param src The original string. + * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The length of the result string, if successful - or in case of a buffer overflow, + * in which case it will be greater than destCapacity. + * + * @see u_strFoldCase + * @see ucasemap_setOptions + * @see U_FOLD_CASE_DEFAULT + * @see U_FOLD_CASE_EXCLUDE_SPECIAL_I + * @stable ICU 3.8 + */ +U_STABLE int32_t U_EXPORT2 +ucasemap_utf8FoldCase(const UCaseMap *csm, + char *dest, int32_t destCapacity, + const char *src, int32_t srcLength, + UErrorCode *pErrorCode); + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucat.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucat.h new file mode 100755 index 00000000..4d1ff3f6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucat.h @@ -0,0 +1,160 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (c) 2003-2004, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* Author: Alan Liu +* Created: March 19 2003 +* Since: ICU 2.6 +********************************************************************** +*/ +#ifndef UCAT_H +#define UCAT_H + +#include "unicode/utypes.h" +#include "unicode/ures.h" + +/** + * \file + * \brief C API: Message Catalog Wrappers + * + * This C API provides look-alike functions that deliberately resemble + * the POSIX catopen, catclose, and catgets functions. The underlying + * implementation is in terms of ICU resource bundles, rather than + * POSIX message catalogs. + * + * The ICU resource bundles obey standard ICU inheritance policies. + * To facilitate this, sets and messages are flattened into one tier. + * This is done by creating resource bundle keys of the form + * <set_num>%<msg_num> where set_num is the set number and msg_num is + * the message number, formatted as decimal strings. + * + * Example: Consider a message catalog containing two sets: + * + * Set 1: Message 4 = "Good morning." + * Message 5 = "Good afternoon." + * Message 7 = "Good evening." + * Message 8 = "Good night." + * Set 4: Message 14 = "Please " + * Message 19 = "Thank you." + * Message 20 = "Sincerely," + * + * The ICU resource bundle source file would, assuming it is named + * "greet.txt", would look like this: + * + * greet + * { + * 1%4 { "Good morning." } + * 1%5 { "Good afternoon." } + * 1%7 { "Good evening." } + * 1%8 { "Good night." } + * + * 4%14 { "Please " } + * 4%19 { "Thank you." } + * 4%20 { "Sincerely," } + * } + * + * The catgets function is commonly used in combination with functions + * like printf and strftime. ICU components like message format can + * be used instead, although they use a different format syntax. + * There is an ICU package, icuio, that provides some of + * the POSIX-style formatting API. + */ + +U_CDECL_BEGIN + +/** + * An ICU message catalog descriptor, analogous to nl_catd. + * + * @stable ICU 2.6 + */ +typedef UResourceBundle* u_nl_catd; + +/** + * Open and return an ICU message catalog descriptor. The descriptor + * may be passed to u_catgets() to retrieve localized strings. + * + * @param name string containing the full path pointing to the + * directory where the resources reside followed by the package name + * e.g. "/usr/resource/my_app/resources/guimessages" on a Unix system. + * If NULL, ICU default data files will be used. + * + * Unlike POSIX, environment variables are not interpolated within the + * name. + * + * @param locale the locale for which we want to open the resource. If + * NULL, the default ICU locale will be used (see uloc_getDefault). If + * strlen(locale) == 0, the root locale will be used. + * + * @param ec input/output error code. Upon output, + * U_USING_FALLBACK_WARNING indicates that a fallback locale was + * used. For example, 'de_CH' was requested, but nothing was found + * there, so 'de' was used. U_USING_DEFAULT_WARNING indicates that the + * default locale data or root locale data was used; neither the + * requested locale nor any of its fallback locales were found. + * + * @return a message catalog descriptor that may be passed to + * u_catgets(). If the ec parameter indicates success, then the caller + * is responsible for calling u_catclose() to close the message + * catalog. If the ec parameter indicates failure, then NULL will be + * returned. + * + * @stable ICU 2.6 + */ +U_STABLE u_nl_catd U_EXPORT2 +u_catopen(const char* name, const char* locale, UErrorCode* ec); + +/** + * Close an ICU message catalog, given its descriptor. + * + * @param catd a message catalog descriptor to be closed. May be NULL, + * in which case no action is taken. + * + * @stable ICU 2.6 + */ +U_STABLE void U_EXPORT2 +u_catclose(u_nl_catd catd); + +/** + * Retrieve a localized string from an ICU message catalog. + * + * @param catd a message catalog descriptor returned by u_catopen. + * + * @param set_num the message catalog set number. Sets need not be + * numbered consecutively. + * + * @param msg_num the message catalog message number within the + * set. Messages need not be numbered consecutively. + * + * @param s the default string. This is returned if the string + * specified by the set_num and msg_num is not found. It must be + * zero-terminated. + * + * @param len fill-in parameter to receive the length of the result. + * May be NULL, in which case it is ignored. + * + * @param ec input/output error code. May be U_USING_FALLBACK_WARNING + * or U_USING_DEFAULT_WARNING. U_MISSING_RESOURCE_ERROR indicates that + * the set_num/msg_num tuple does not specify a valid message string + * in this catalog. + * + * @return a pointer to a zero-terminated UChar array which lives in + * an internal buffer area, typically a memory mapped/DLL file. The + * caller must NOT delete this pointer. If the call is unsuccessful + * for any reason, then s is returned. This includes the situation in + * which ec indicates a failing error code upon entry to this + * function. + * + * @stable ICU 2.6 + */ +U_STABLE const UChar* U_EXPORT2 +u_catgets(u_nl_catd catd, int32_t set_num, int32_t msg_num, + const UChar* s, + int32_t* len, UErrorCode* ec); + +U_CDECL_END + +#endif /*UCAT_H*/ +/*eof*/ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uchar.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uchar.h new file mode 100755 index 00000000..4b72ecfc --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uchar.h @@ -0,0 +1,3731 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 1997-2016, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* +* File UCHAR.H +* +* Modification History: +* +* Date Name Description +* 04/02/97 aliu Creation. +* 03/29/99 helena Updated for C APIs. +* 4/15/99 Madhu Updated for C Implementation and Javadoc +* 5/20/99 Madhu Added the function u_getVersion() +* 8/19/1999 srl Upgraded scripts to Unicode 3.0 +* 8/27/1999 schererm UCharDirection constants: U_... +* 11/11/1999 weiv added u_isalnum(), cleaned comments +* 01/11/2000 helena Renamed u_getVersion to u_getUnicodeVersion(). +****************************************************************************** +*/ + +#ifndef UCHAR_H +#define UCHAR_H + +#include "unicode/utypes.h" +#include "unicode/stringoptions.h" + +U_CDECL_BEGIN + +/*==========================================================================*/ +/* Unicode version number */ +/*==========================================================================*/ +/** + * Unicode version number, default for the current ICU version. + * The actual Unicode Character Database (UCD) data is stored in uprops.dat + * and may be generated from UCD files from a different Unicode version. + * Call u_getUnicodeVersion to get the actual Unicode version of the data. + * + * @see u_getUnicodeVersion + * @stable ICU 2.0 + */ +#define U_UNICODE_VERSION "10.0" + +/** + * \file + * \brief C API: Unicode Properties + * + * This C API provides low-level access to the Unicode Character Database. + * In addition to raw property values, some convenience functions calculate + * derived properties, for example for Java-style programming. + * + * Unicode assigns each code point (not just assigned character) values for + * many properties. + * Most of them are simple boolean flags, or constants from a small enumerated list. + * For some properties, values are strings or other relatively more complex types. + * + * For more information see + * "About the Unicode Character Database" (http://www.unicode.org/ucd/) + * and the ICU User Guide chapter on Properties (http://icu-project.org/userguide/properties.html). + * + * Many functions are designed to match java.lang.Character functions. + * See the individual function documentation, + * and see the JDK 1.4 java.lang.Character documentation + * at http://java.sun.com/j2se/1.4/docs/api/java/lang/Character.html + * + * There are also functions that provide easy migration from C/POSIX functions + * like isblank(). Their use is generally discouraged because the C/POSIX + * standards do not define their semantics beyond the ASCII range, which means + * that different implementations exhibit very different behavior. + * Instead, Unicode properties should be used directly. + * + * There are also only a few, broad C/POSIX character classes, and they tend + * to be used for conflicting purposes. For example, the "isalpha()" class + * is sometimes used to determine word boundaries, while a more sophisticated + * approach would at least distinguish initial letters from continuation + * characters (the latter including combining marks). + * (In ICU, BreakIterator is the most sophisticated API for word boundaries.) + * Another example: There is no "istitle()" class for titlecase characters. + * + * ICU 3.4 and later provides API access for all twelve C/POSIX character classes. + * ICU implements them according to the Standard Recommendations in + * Annex C: Compatibility Properties of UTS #18 Unicode Regular Expressions + * (http://www.unicode.org/reports/tr18/#Compatibility_Properties). + * + * API access for C/POSIX character classes is as follows: + * - alpha: u_isUAlphabetic(c) or u_hasBinaryProperty(c, UCHAR_ALPHABETIC) + * - lower: u_isULowercase(c) or u_hasBinaryProperty(c, UCHAR_LOWERCASE) + * - upper: u_isUUppercase(c) or u_hasBinaryProperty(c, UCHAR_UPPERCASE) + * - punct: u_ispunct(c) + * - digit: u_isdigit(c) or u_charType(c)==U_DECIMAL_DIGIT_NUMBER + * - xdigit: u_isxdigit(c) or u_hasBinaryProperty(c, UCHAR_POSIX_XDIGIT) + * - alnum: u_hasBinaryProperty(c, UCHAR_POSIX_ALNUM) + * - space: u_isUWhiteSpace(c) or u_hasBinaryProperty(c, UCHAR_WHITE_SPACE) + * - blank: u_isblank(c) or u_hasBinaryProperty(c, UCHAR_POSIX_BLANK) + * - cntrl: u_charType(c)==U_CONTROL_CHAR + * - graph: u_hasBinaryProperty(c, UCHAR_POSIX_GRAPH) + * - print: u_hasBinaryProperty(c, UCHAR_POSIX_PRINT) + * + * Note: Some of the u_isxyz() functions in uchar.h predate, and do not match, + * the Standard Recommendations in UTS #18. Instead, they match Java + * functions according to their API documentation. + * + * \htmlonly + * The C/POSIX character classes are also available in UnicodeSet patterns, + * using patterns like [:graph:] or \p{graph}. + * \endhtmlonly + * + * Note: There are several ICU whitespace functions. + * Comparison: + * - u_isUWhiteSpace=UCHAR_WHITE_SPACE: Unicode White_Space property; + * most of general categories "Z" (separators) + most whitespace ISO controls + * (including no-break spaces, but excluding IS1..IS4) + * - u_isWhitespace: Java isWhitespace; Z + whitespace ISO controls but excluding no-break spaces + * - u_isJavaSpaceChar: Java isSpaceChar; just Z (including no-break spaces) + * - u_isspace: Z + whitespace ISO controls (including no-break spaces) + * - u_isblank: "horizontal spaces" = TAB + Zs + */ + +/** + * Constants. + */ + +/** The lowest Unicode code point value. Code points are non-negative. @stable ICU 2.0 */ +#define UCHAR_MIN_VALUE 0 + +/** + * The highest Unicode code point value (scalar value) according to + * The Unicode Standard. This is a 21-bit value (20.1 bits, rounded up). + * For a single character, UChar32 is a simple type that can hold any code point value. + * + * @see UChar32 + * @stable ICU 2.0 + */ +#define UCHAR_MAX_VALUE 0x10ffff + +/** + * Get a single-bit bit set (a flag) from a bit number 0..31. + * @stable ICU 2.1 + */ +#define U_MASK(x) ((uint32_t)1<<(x)) + +/** + * Selection constants for Unicode properties. + * These constants are used in functions like u_hasBinaryProperty to select + * one of the Unicode properties. + * + * The properties APIs are intended to reflect Unicode properties as defined + * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). + * + * For details about the properties see + * UAX #44: Unicode Character Database (http://www.unicode.org/reports/tr44/). + * + * Important: If ICU is built with UCD files from Unicode versions below, e.g., 3.2, + * then properties marked with "new in Unicode 3.2" are not or not fully available. + * Check u_getUnicodeVersion to be sure. + * + * @see u_hasBinaryProperty + * @see u_getIntPropertyValue + * @see u_getUnicodeVersion + * @stable ICU 2.1 + */ +typedef enum UProperty { + /* + * Note: UProperty constants are parsed by preparseucd.py. + * It matches lines like + * UCHAR_<Unicode property name>=<integer>, + */ + + /* Note: Place UCHAR_ALPHABETIC before UCHAR_BINARY_START so that + debuggers display UCHAR_ALPHABETIC as the symbolic name for 0, + rather than UCHAR_BINARY_START. Likewise for other *_START + identifiers. */ + + /** Binary property Alphabetic. Same as u_isUAlphabetic, different from u_isalpha. + Lu+Ll+Lt+Lm+Lo+Nl+Other_Alphabetic @stable ICU 2.1 */ + UCHAR_ALPHABETIC=0, + /** First constant for binary Unicode properties. @stable ICU 2.1 */ + UCHAR_BINARY_START=UCHAR_ALPHABETIC, + /** Binary property ASCII_Hex_Digit. 0-9 A-F a-f @stable ICU 2.1 */ + UCHAR_ASCII_HEX_DIGIT=1, + /** Binary property Bidi_Control. + Format controls which have specific functions + in the Bidi Algorithm. @stable ICU 2.1 */ + UCHAR_BIDI_CONTROL=2, + /** Binary property Bidi_Mirrored. + Characters that may change display in RTL text. + Same as u_isMirrored. + See Bidi Algorithm, UTR 9. @stable ICU 2.1 */ + UCHAR_BIDI_MIRRORED=3, + /** Binary property Dash. Variations of dashes. @stable ICU 2.1 */ + UCHAR_DASH=4, + /** Binary property Default_Ignorable_Code_Point (new in Unicode 3.2). + Ignorable in most processing. + <2060..206F, FFF0..FFFB, E0000..E0FFF>+Other_Default_Ignorable_Code_Point+(Cf+Cc+Cs-White_Space) @stable ICU 2.1 */ + UCHAR_DEFAULT_IGNORABLE_CODE_POINT=5, + /** Binary property Deprecated (new in Unicode 3.2). + The usage of deprecated characters is strongly discouraged. @stable ICU 2.1 */ + UCHAR_DEPRECATED=6, + /** Binary property Diacritic. Characters that linguistically modify + the meaning of another character to which they apply. @stable ICU 2.1 */ + UCHAR_DIACRITIC=7, + /** Binary property Extender. + Extend the value or shape of a preceding alphabetic character, + e.g., length and iteration marks. @stable ICU 2.1 */ + UCHAR_EXTENDER=8, + /** Binary property Full_Composition_Exclusion. + CompositionExclusions.txt+Singleton Decompositions+ + Non-Starter Decompositions. @stable ICU 2.1 */ + UCHAR_FULL_COMPOSITION_EXCLUSION=9, + /** Binary property Grapheme_Base (new in Unicode 3.2). + For programmatic determination of grapheme cluster boundaries. + [0..10FFFF]-Cc-Cf-Cs-Co-Cn-Zl-Zp-Grapheme_Link-Grapheme_Extend-CGJ @stable ICU 2.1 */ + UCHAR_GRAPHEME_BASE=10, + /** Binary property Grapheme_Extend (new in Unicode 3.2). + For programmatic determination of grapheme cluster boundaries. + Me+Mn+Mc+Other_Grapheme_Extend-Grapheme_Link-CGJ @stable ICU 2.1 */ + UCHAR_GRAPHEME_EXTEND=11, + /** Binary property Grapheme_Link (new in Unicode 3.2). + For programmatic determination of grapheme cluster boundaries. @stable ICU 2.1 */ + UCHAR_GRAPHEME_LINK=12, + /** Binary property Hex_Digit. + Characters commonly used for hexadecimal numbers. @stable ICU 2.1 */ + UCHAR_HEX_DIGIT=13, + /** Binary property Hyphen. Dashes used to mark connections + between pieces of words, plus the Katakana middle dot. @stable ICU 2.1 */ + UCHAR_HYPHEN=14, + /** Binary property ID_Continue. + Characters that can continue an identifier. + DerivedCoreProperties.txt also says "NOTE: Cf characters should be filtered out." + ID_Start+Mn+Mc+Nd+Pc @stable ICU 2.1 */ + UCHAR_ID_CONTINUE=15, + /** Binary property ID_Start. + Characters that can start an identifier. + Lu+Ll+Lt+Lm+Lo+Nl @stable ICU 2.1 */ + UCHAR_ID_START=16, + /** Binary property Ideographic. + CJKV ideographs. @stable ICU 2.1 */ + UCHAR_IDEOGRAPHIC=17, + /** Binary property IDS_Binary_Operator (new in Unicode 3.2). + For programmatic determination of + Ideographic Description Sequences. @stable ICU 2.1 */ + UCHAR_IDS_BINARY_OPERATOR=18, + /** Binary property IDS_Trinary_Operator (new in Unicode 3.2). + For programmatic determination of + Ideographic Description Sequences. @stable ICU 2.1 */ + UCHAR_IDS_TRINARY_OPERATOR=19, + /** Binary property Join_Control. + Format controls for cursive joining and ligation. @stable ICU 2.1 */ + UCHAR_JOIN_CONTROL=20, + /** Binary property Logical_Order_Exception (new in Unicode 3.2). + Characters that do not use logical order and + require special handling in most processing. @stable ICU 2.1 */ + UCHAR_LOGICAL_ORDER_EXCEPTION=21, + /** Binary property Lowercase. Same as u_isULowercase, different from u_islower. + Ll+Other_Lowercase @stable ICU 2.1 */ + UCHAR_LOWERCASE=22, + /** Binary property Math. Sm+Other_Math @stable ICU 2.1 */ + UCHAR_MATH=23, + /** Binary property Noncharacter_Code_Point. + Code points that are explicitly defined as illegal + for the encoding of characters. @stable ICU 2.1 */ + UCHAR_NONCHARACTER_CODE_POINT=24, + /** Binary property Quotation_Mark. @stable ICU 2.1 */ + UCHAR_QUOTATION_MARK=25, + /** Binary property Radical (new in Unicode 3.2). + For programmatic determination of + Ideographic Description Sequences. @stable ICU 2.1 */ + UCHAR_RADICAL=26, + /** Binary property Soft_Dotted (new in Unicode 3.2). + Characters with a "soft dot", like i or j. + An accent placed on these characters causes + the dot to disappear. @stable ICU 2.1 */ + UCHAR_SOFT_DOTTED=27, + /** Binary property Terminal_Punctuation. + Punctuation characters that generally mark + the end of textual units. @stable ICU 2.1 */ + UCHAR_TERMINAL_PUNCTUATION=28, + /** Binary property Unified_Ideograph (new in Unicode 3.2). + For programmatic determination of + Ideographic Description Sequences. @stable ICU 2.1 */ + UCHAR_UNIFIED_IDEOGRAPH=29, + /** Binary property Uppercase. Same as u_isUUppercase, different from u_isupper. + Lu+Other_Uppercase @stable ICU 2.1 */ + UCHAR_UPPERCASE=30, + /** Binary property White_Space. + Same as u_isUWhiteSpace, different from u_isspace and u_isWhitespace. + Space characters+TAB+CR+LF-ZWSP-ZWNBSP @stable ICU 2.1 */ + UCHAR_WHITE_SPACE=31, + /** Binary property XID_Continue. + ID_Continue modified to allow closure under + normalization forms NFKC and NFKD. @stable ICU 2.1 */ + UCHAR_XID_CONTINUE=32, + /** Binary property XID_Start. ID_Start modified to allow + closure under normalization forms NFKC and NFKD. @stable ICU 2.1 */ + UCHAR_XID_START=33, + /** Binary property Case_Sensitive. Either the source of a case + mapping or _in_ the target of a case mapping. Not the same as + the general category Cased_Letter. @stable ICU 2.6 */ + UCHAR_CASE_SENSITIVE=34, + /** Binary property STerm (new in Unicode 4.0.1). + Sentence Terminal. Used in UAX #29: Text Boundaries + (http://www.unicode.org/reports/tr29/) + @stable ICU 3.0 */ + UCHAR_S_TERM=35, + /** Binary property Variation_Selector (new in Unicode 4.0.1). + Indicates all those characters that qualify as Variation Selectors. + For details on the behavior of these characters, + see StandardizedVariants.html and 15.6 Variation Selectors. + @stable ICU 3.0 */ + UCHAR_VARIATION_SELECTOR=36, + /** Binary property NFD_Inert. + ICU-specific property for characters that are inert under NFD, + i.e., they do not interact with adjacent characters. + See the documentation for the Normalizer2 class and the + Normalizer2::isInert() method. + @stable ICU 3.0 */ + UCHAR_NFD_INERT=37, + /** Binary property NFKD_Inert. + ICU-specific property for characters that are inert under NFKD, + i.e., they do not interact with adjacent characters. + See the documentation for the Normalizer2 class and the + Normalizer2::isInert() method. + @stable ICU 3.0 */ + UCHAR_NFKD_INERT=38, + /** Binary property NFC_Inert. + ICU-specific property for characters that are inert under NFC, + i.e., they do not interact with adjacent characters. + See the documentation for the Normalizer2 class and the + Normalizer2::isInert() method. + @stable ICU 3.0 */ + UCHAR_NFC_INERT=39, + /** Binary property NFKC_Inert. + ICU-specific property for characters that are inert under NFKC, + i.e., they do not interact with adjacent characters. + See the documentation for the Normalizer2 class and the + Normalizer2::isInert() method. + @stable ICU 3.0 */ + UCHAR_NFKC_INERT=40, + /** Binary Property Segment_Starter. + ICU-specific property for characters that are starters in terms of + Unicode normalization and combining character sequences. + They have ccc=0 and do not occur in non-initial position of the + canonical decomposition of any character + (like a-umlaut in NFD and a Jamo T in an NFD(Hangul LVT)). + ICU uses this property for segmenting a string for generating a set of + canonically equivalent strings, e.g. for canonical closure while + processing collation tailoring rules. + @stable ICU 3.0 */ + UCHAR_SEGMENT_STARTER=41, + /** Binary property Pattern_Syntax (new in Unicode 4.1). + See UAX #31 Identifier and Pattern Syntax + (http://www.unicode.org/reports/tr31/) + @stable ICU 3.4 */ + UCHAR_PATTERN_SYNTAX=42, + /** Binary property Pattern_White_Space (new in Unicode 4.1). + See UAX #31 Identifier and Pattern Syntax + (http://www.unicode.org/reports/tr31/) + @stable ICU 3.4 */ + UCHAR_PATTERN_WHITE_SPACE=43, + /** Binary property alnum (a C/POSIX character class). + Implemented according to the UTS #18 Annex C Standard Recommendation. + See the uchar.h file documentation. + @stable ICU 3.4 */ + UCHAR_POSIX_ALNUM=44, + /** Binary property blank (a C/POSIX character class). + Implemented according to the UTS #18 Annex C Standard Recommendation. + See the uchar.h file documentation. + @stable ICU 3.4 */ + UCHAR_POSIX_BLANK=45, + /** Binary property graph (a C/POSIX character class). + Implemented according to the UTS #18 Annex C Standard Recommendation. + See the uchar.h file documentation. + @stable ICU 3.4 */ + UCHAR_POSIX_GRAPH=46, + /** Binary property print (a C/POSIX character class). + Implemented according to the UTS #18 Annex C Standard Recommendation. + See the uchar.h file documentation. + @stable ICU 3.4 */ + UCHAR_POSIX_PRINT=47, + /** Binary property xdigit (a C/POSIX character class). + Implemented according to the UTS #18 Annex C Standard Recommendation. + See the uchar.h file documentation. + @stable ICU 3.4 */ + UCHAR_POSIX_XDIGIT=48, + /** Binary property Cased. For Lowercase, Uppercase and Titlecase characters. @stable ICU 4.4 */ + UCHAR_CASED=49, + /** Binary property Case_Ignorable. Used in context-sensitive case mappings. @stable ICU 4.4 */ + UCHAR_CASE_IGNORABLE=50, + /** Binary property Changes_When_Lowercased. @stable ICU 4.4 */ + UCHAR_CHANGES_WHEN_LOWERCASED=51, + /** Binary property Changes_When_Uppercased. @stable ICU 4.4 */ + UCHAR_CHANGES_WHEN_UPPERCASED=52, + /** Binary property Changes_When_Titlecased. @stable ICU 4.4 */ + UCHAR_CHANGES_WHEN_TITLECASED=53, + /** Binary property Changes_When_Casefolded. @stable ICU 4.4 */ + UCHAR_CHANGES_WHEN_CASEFOLDED=54, + /** Binary property Changes_When_Casemapped. @stable ICU 4.4 */ + UCHAR_CHANGES_WHEN_CASEMAPPED=55, + /** Binary property Changes_When_NFKC_Casefolded. @stable ICU 4.4 */ + UCHAR_CHANGES_WHEN_NFKC_CASEFOLDED=56, + /** + * Binary property Emoji. + * See http://www.unicode.org/reports/tr51/#Emoji_Properties + * + * @stable ICU 57 + */ + UCHAR_EMOJI=57, + /** + * Binary property Emoji_Presentation. + * See http://www.unicode.org/reports/tr51/#Emoji_Properties + * + * @stable ICU 57 + */ + UCHAR_EMOJI_PRESENTATION=58, + /** + * Binary property Emoji_Modifier. + * See http://www.unicode.org/reports/tr51/#Emoji_Properties + * + * @stable ICU 57 + */ + UCHAR_EMOJI_MODIFIER=59, + /** + * Binary property Emoji_Modifier_Base. + * See http://www.unicode.org/reports/tr51/#Emoji_Properties + * + * @stable ICU 57 + */ + UCHAR_EMOJI_MODIFIER_BASE=60, + /** + * Binary property Emoji_Component. + * See http://www.unicode.org/reports/tr51/#Emoji_Properties + * + * @stable ICU 60 + */ + UCHAR_EMOJI_COMPONENT=61, + /** + * Binary property Regional_Indicator. + * @stable ICU 60 + */ + UCHAR_REGIONAL_INDICATOR=62, + /** + * Binary property Prepended_Concatenation_Mark. + * @stable ICU 60 + */ + UCHAR_PREPENDED_CONCATENATION_MARK=63, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the last constant for binary Unicode properties. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UCHAR_BINARY_LIMIT, +#endif // U_HIDE_DEPRECATED_API + + /** Enumerated property Bidi_Class. + Same as u_charDirection, returns UCharDirection values. @stable ICU 2.2 */ + UCHAR_BIDI_CLASS=0x1000, + /** First constant for enumerated/integer Unicode properties. @stable ICU 2.2 */ + UCHAR_INT_START=UCHAR_BIDI_CLASS, + /** Enumerated property Block. + Same as ublock_getCode, returns UBlockCode values. @stable ICU 2.2 */ + UCHAR_BLOCK=0x1001, + /** Enumerated property Canonical_Combining_Class. + Same as u_getCombiningClass, returns 8-bit numeric values. @stable ICU 2.2 */ + UCHAR_CANONICAL_COMBINING_CLASS=0x1002, + /** Enumerated property Decomposition_Type. + Returns UDecompositionType values. @stable ICU 2.2 */ + UCHAR_DECOMPOSITION_TYPE=0x1003, + /** Enumerated property East_Asian_Width. + See http://www.unicode.org/reports/tr11/ + Returns UEastAsianWidth values. @stable ICU 2.2 */ + UCHAR_EAST_ASIAN_WIDTH=0x1004, + /** Enumerated property General_Category. + Same as u_charType, returns UCharCategory values. @stable ICU 2.2 */ + UCHAR_GENERAL_CATEGORY=0x1005, + /** Enumerated property Joining_Group. + Returns UJoiningGroup values. @stable ICU 2.2 */ + UCHAR_JOINING_GROUP=0x1006, + /** Enumerated property Joining_Type. + Returns UJoiningType values. @stable ICU 2.2 */ + UCHAR_JOINING_TYPE=0x1007, + /** Enumerated property Line_Break. + Returns ULineBreak values. @stable ICU 2.2 */ + UCHAR_LINE_BREAK=0x1008, + /** Enumerated property Numeric_Type. + Returns UNumericType values. @stable ICU 2.2 */ + UCHAR_NUMERIC_TYPE=0x1009, + /** Enumerated property Script. + Same as uscript_getScript, returns UScriptCode values. @stable ICU 2.2 */ + UCHAR_SCRIPT=0x100A, + /** Enumerated property Hangul_Syllable_Type, new in Unicode 4. + Returns UHangulSyllableType values. @stable ICU 2.6 */ + UCHAR_HANGUL_SYLLABLE_TYPE=0x100B, + /** Enumerated property NFD_Quick_Check. + Returns UNormalizationCheckResult values. @stable ICU 3.0 */ + UCHAR_NFD_QUICK_CHECK=0x100C, + /** Enumerated property NFKD_Quick_Check. + Returns UNormalizationCheckResult values. @stable ICU 3.0 */ + UCHAR_NFKD_QUICK_CHECK=0x100D, + /** Enumerated property NFC_Quick_Check. + Returns UNormalizationCheckResult values. @stable ICU 3.0 */ + UCHAR_NFC_QUICK_CHECK=0x100E, + /** Enumerated property NFKC_Quick_Check. + Returns UNormalizationCheckResult values. @stable ICU 3.0 */ + UCHAR_NFKC_QUICK_CHECK=0x100F, + /** Enumerated property Lead_Canonical_Combining_Class. + ICU-specific property for the ccc of the first code point + of the decomposition, or lccc(c)=ccc(NFD(c)[0]). + Useful for checking for canonically ordered text; + see UNORM_FCD and http://www.unicode.org/notes/tn5/#FCD . + Returns 8-bit numeric values like UCHAR_CANONICAL_COMBINING_CLASS. @stable ICU 3.0 */ + UCHAR_LEAD_CANONICAL_COMBINING_CLASS=0x1010, + /** Enumerated property Trail_Canonical_Combining_Class. + ICU-specific property for the ccc of the last code point + of the decomposition, or tccc(c)=ccc(NFD(c)[last]). + Useful for checking for canonically ordered text; + see UNORM_FCD and http://www.unicode.org/notes/tn5/#FCD . + Returns 8-bit numeric values like UCHAR_CANONICAL_COMBINING_CLASS. @stable ICU 3.0 */ + UCHAR_TRAIL_CANONICAL_COMBINING_CLASS=0x1011, + /** Enumerated property Grapheme_Cluster_Break (new in Unicode 4.1). + Used in UAX #29: Text Boundaries + (http://www.unicode.org/reports/tr29/) + Returns UGraphemeClusterBreak values. @stable ICU 3.4 */ + UCHAR_GRAPHEME_CLUSTER_BREAK=0x1012, + /** Enumerated property Sentence_Break (new in Unicode 4.1). + Used in UAX #29: Text Boundaries + (http://www.unicode.org/reports/tr29/) + Returns USentenceBreak values. @stable ICU 3.4 */ + UCHAR_SENTENCE_BREAK=0x1013, + /** Enumerated property Word_Break (new in Unicode 4.1). + Used in UAX #29: Text Boundaries + (http://www.unicode.org/reports/tr29/) + Returns UWordBreakValues values. @stable ICU 3.4 */ + UCHAR_WORD_BREAK=0x1014, + /** Enumerated property Bidi_Paired_Bracket_Type (new in Unicode 6.3). + Used in UAX #9: Unicode Bidirectional Algorithm + (http://www.unicode.org/reports/tr9/) + Returns UBidiPairedBracketType values. @stable ICU 52 */ + UCHAR_BIDI_PAIRED_BRACKET_TYPE=0x1015, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the last constant for enumerated/integer Unicode properties. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UCHAR_INT_LIMIT=0x1016, +#endif // U_HIDE_DEPRECATED_API + + /** Bitmask property General_Category_Mask. + This is the General_Category property returned as a bit mask. + When used in u_getIntPropertyValue(c), same as U_MASK(u_charType(c)), + returns bit masks for UCharCategory values where exactly one bit is set. + When used with u_getPropertyValueName() and u_getPropertyValueEnum(), + a multi-bit mask is used for sets of categories like "Letters". + Mask values should be cast to uint32_t. + @stable ICU 2.4 */ + UCHAR_GENERAL_CATEGORY_MASK=0x2000, + /** First constant for bit-mask Unicode properties. @stable ICU 2.4 */ + UCHAR_MASK_START=UCHAR_GENERAL_CATEGORY_MASK, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the last constant for bit-mask Unicode properties. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UCHAR_MASK_LIMIT=0x2001, +#endif // U_HIDE_DEPRECATED_API + + /** Double property Numeric_Value. + Corresponds to u_getNumericValue. @stable ICU 2.4 */ + UCHAR_NUMERIC_VALUE=0x3000, + /** First constant for double Unicode properties. @stable ICU 2.4 */ + UCHAR_DOUBLE_START=UCHAR_NUMERIC_VALUE, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the last constant for double Unicode properties. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UCHAR_DOUBLE_LIMIT=0x3001, +#endif // U_HIDE_DEPRECATED_API + + /** String property Age. + Corresponds to u_charAge. @stable ICU 2.4 */ + UCHAR_AGE=0x4000, + /** First constant for string Unicode properties. @stable ICU 2.4 */ + UCHAR_STRING_START=UCHAR_AGE, + /** String property Bidi_Mirroring_Glyph. + Corresponds to u_charMirror. @stable ICU 2.4 */ + UCHAR_BIDI_MIRRORING_GLYPH=0x4001, + /** String property Case_Folding. + Corresponds to u_strFoldCase in ustring.h. @stable ICU 2.4 */ + UCHAR_CASE_FOLDING=0x4002, +#ifndef U_HIDE_DEPRECATED_API + /** Deprecated string property ISO_Comment. + Corresponds to u_getISOComment. @deprecated ICU 49 */ + UCHAR_ISO_COMMENT=0x4003, +#endif /* U_HIDE_DEPRECATED_API */ + /** String property Lowercase_Mapping. + Corresponds to u_strToLower in ustring.h. @stable ICU 2.4 */ + UCHAR_LOWERCASE_MAPPING=0x4004, + /** String property Name. + Corresponds to u_charName. @stable ICU 2.4 */ + UCHAR_NAME=0x4005, + /** String property Simple_Case_Folding. + Corresponds to u_foldCase. @stable ICU 2.4 */ + UCHAR_SIMPLE_CASE_FOLDING=0x4006, + /** String property Simple_Lowercase_Mapping. + Corresponds to u_tolower. @stable ICU 2.4 */ + UCHAR_SIMPLE_LOWERCASE_MAPPING=0x4007, + /** String property Simple_Titlecase_Mapping. + Corresponds to u_totitle. @stable ICU 2.4 */ + UCHAR_SIMPLE_TITLECASE_MAPPING=0x4008, + /** String property Simple_Uppercase_Mapping. + Corresponds to u_toupper. @stable ICU 2.4 */ + UCHAR_SIMPLE_UPPERCASE_MAPPING=0x4009, + /** String property Titlecase_Mapping. + Corresponds to u_strToTitle in ustring.h. @stable ICU 2.4 */ + UCHAR_TITLECASE_MAPPING=0x400A, +#ifndef U_HIDE_DEPRECATED_API + /** String property Unicode_1_Name. + This property is of little practical value. + Beginning with ICU 49, ICU APIs return an empty string for this property. + Corresponds to u_charName(U_UNICODE_10_CHAR_NAME). @deprecated ICU 49 */ + UCHAR_UNICODE_1_NAME=0x400B, +#endif /* U_HIDE_DEPRECATED_API */ + /** String property Uppercase_Mapping. + Corresponds to u_strToUpper in ustring.h. @stable ICU 2.4 */ + UCHAR_UPPERCASE_MAPPING=0x400C, + /** String property Bidi_Paired_Bracket (new in Unicode 6.3). + Corresponds to u_getBidiPairedBracket. @stable ICU 52 */ + UCHAR_BIDI_PAIRED_BRACKET=0x400D, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the last constant for string Unicode properties. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UCHAR_STRING_LIMIT=0x400E, +#endif // U_HIDE_DEPRECATED_API + + /** Miscellaneous property Script_Extensions (new in Unicode 6.0). + Some characters are commonly used in multiple scripts. + For more information, see UAX #24: http://www.unicode.org/reports/tr24/. + Corresponds to uscript_hasScript and uscript_getScriptExtensions in uscript.h. + @stable ICU 4.6 */ + UCHAR_SCRIPT_EXTENSIONS=0x7000, + /** First constant for Unicode properties with unusual value types. @stable ICU 4.6 */ + UCHAR_OTHER_PROPERTY_START=UCHAR_SCRIPT_EXTENSIONS, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the last constant for Unicode properties with unusual value types. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UCHAR_OTHER_PROPERTY_LIMIT=0x7001, +#endif // U_HIDE_DEPRECATED_API + + /** Represents a nonexistent or invalid property or property value. @stable ICU 2.4 */ + UCHAR_INVALID_CODE = -1 +} UProperty; + +/** + * Data for enumerated Unicode general category types. + * See http://www.unicode.org/Public/UNIDATA/UnicodeData.html . + * @stable ICU 2.0 + */ +typedef enum UCharCategory +{ + /* + * Note: UCharCategory constants and their API comments are parsed by preparseucd.py. + * It matches pairs of lines like + * / ** <Unicode 2-letter General_Category value> comment... * / + * U_<[A-Z_]+> = <integer>, + */ + + /** Non-category for unassigned and non-character code points. @stable ICU 2.0 */ + U_UNASSIGNED = 0, + /** Cn "Other, Not Assigned (no characters in [UnicodeData.txt] have this property)" (same as U_UNASSIGNED!) @stable ICU 2.0 */ + U_GENERAL_OTHER_TYPES = 0, + /** Lu @stable ICU 2.0 */ + U_UPPERCASE_LETTER = 1, + /** Ll @stable ICU 2.0 */ + U_LOWERCASE_LETTER = 2, + /** Lt @stable ICU 2.0 */ + U_TITLECASE_LETTER = 3, + /** Lm @stable ICU 2.0 */ + U_MODIFIER_LETTER = 4, + /** Lo @stable ICU 2.0 */ + U_OTHER_LETTER = 5, + /** Mn @stable ICU 2.0 */ + U_NON_SPACING_MARK = 6, + /** Me @stable ICU 2.0 */ + U_ENCLOSING_MARK = 7, + /** Mc @stable ICU 2.0 */ + U_COMBINING_SPACING_MARK = 8, + /** Nd @stable ICU 2.0 */ + U_DECIMAL_DIGIT_NUMBER = 9, + /** Nl @stable ICU 2.0 */ + U_LETTER_NUMBER = 10, + /** No @stable ICU 2.0 */ + U_OTHER_NUMBER = 11, + /** Zs @stable ICU 2.0 */ + U_SPACE_SEPARATOR = 12, + /** Zl @stable ICU 2.0 */ + U_LINE_SEPARATOR = 13, + /** Zp @stable ICU 2.0 */ + U_PARAGRAPH_SEPARATOR = 14, + /** Cc @stable ICU 2.0 */ + U_CONTROL_CHAR = 15, + /** Cf @stable ICU 2.0 */ + U_FORMAT_CHAR = 16, + /** Co @stable ICU 2.0 */ + U_PRIVATE_USE_CHAR = 17, + /** Cs @stable ICU 2.0 */ + U_SURROGATE = 18, + /** Pd @stable ICU 2.0 */ + U_DASH_PUNCTUATION = 19, + /** Ps @stable ICU 2.0 */ + U_START_PUNCTUATION = 20, + /** Pe @stable ICU 2.0 */ + U_END_PUNCTUATION = 21, + /** Pc @stable ICU 2.0 */ + U_CONNECTOR_PUNCTUATION = 22, + /** Po @stable ICU 2.0 */ + U_OTHER_PUNCTUATION = 23, + /** Sm @stable ICU 2.0 */ + U_MATH_SYMBOL = 24, + /** Sc @stable ICU 2.0 */ + U_CURRENCY_SYMBOL = 25, + /** Sk @stable ICU 2.0 */ + U_MODIFIER_SYMBOL = 26, + /** So @stable ICU 2.0 */ + U_OTHER_SYMBOL = 27, + /** Pi @stable ICU 2.0 */ + U_INITIAL_PUNCTUATION = 28, + /** Pf @stable ICU 2.0 */ + U_FINAL_PUNCTUATION = 29, + /** + * One higher than the last enum UCharCategory constant. + * This numeric value is stable (will not change), see + * http://www.unicode.org/policies/stability_policy.html#Property_Value + * + * @stable ICU 2.0 + */ + U_CHAR_CATEGORY_COUNT +} UCharCategory; + +/** + * U_GC_XX_MASK constants are bit flags corresponding to Unicode + * general category values. + * For each category, the nth bit is set if the numeric value of the + * corresponding UCharCategory constant is n. + * + * There are also some U_GC_Y_MASK constants for groups of general categories + * like L for all letter categories. + * + * @see u_charType + * @see U_GET_GC_MASK + * @see UCharCategory + * @stable ICU 2.1 + */ +#define U_GC_CN_MASK U_MASK(U_GENERAL_OTHER_TYPES) + +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_LU_MASK U_MASK(U_UPPERCASE_LETTER) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_LL_MASK U_MASK(U_LOWERCASE_LETTER) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_LT_MASK U_MASK(U_TITLECASE_LETTER) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_LM_MASK U_MASK(U_MODIFIER_LETTER) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_LO_MASK U_MASK(U_OTHER_LETTER) + +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_MN_MASK U_MASK(U_NON_SPACING_MARK) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_ME_MASK U_MASK(U_ENCLOSING_MARK) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_MC_MASK U_MASK(U_COMBINING_SPACING_MARK) + +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_ND_MASK U_MASK(U_DECIMAL_DIGIT_NUMBER) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_NL_MASK U_MASK(U_LETTER_NUMBER) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_NO_MASK U_MASK(U_OTHER_NUMBER) + +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_ZS_MASK U_MASK(U_SPACE_SEPARATOR) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_ZL_MASK U_MASK(U_LINE_SEPARATOR) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_ZP_MASK U_MASK(U_PARAGRAPH_SEPARATOR) + +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_CC_MASK U_MASK(U_CONTROL_CHAR) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_CF_MASK U_MASK(U_FORMAT_CHAR) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_CO_MASK U_MASK(U_PRIVATE_USE_CHAR) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_CS_MASK U_MASK(U_SURROGATE) + +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_PD_MASK U_MASK(U_DASH_PUNCTUATION) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_PS_MASK U_MASK(U_START_PUNCTUATION) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_PE_MASK U_MASK(U_END_PUNCTUATION) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_PC_MASK U_MASK(U_CONNECTOR_PUNCTUATION) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_PO_MASK U_MASK(U_OTHER_PUNCTUATION) + +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_SM_MASK U_MASK(U_MATH_SYMBOL) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_SC_MASK U_MASK(U_CURRENCY_SYMBOL) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_SK_MASK U_MASK(U_MODIFIER_SYMBOL) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_SO_MASK U_MASK(U_OTHER_SYMBOL) + +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_PI_MASK U_MASK(U_INITIAL_PUNCTUATION) +/** Mask constant for a UCharCategory. @stable ICU 2.1 */ +#define U_GC_PF_MASK U_MASK(U_FINAL_PUNCTUATION) + + +/** Mask constant for multiple UCharCategory bits (L Letters). @stable ICU 2.1 */ +#define U_GC_L_MASK \ + (U_GC_LU_MASK|U_GC_LL_MASK|U_GC_LT_MASK|U_GC_LM_MASK|U_GC_LO_MASK) + +/** Mask constant for multiple UCharCategory bits (LC Cased Letters). @stable ICU 2.1 */ +#define U_GC_LC_MASK \ + (U_GC_LU_MASK|U_GC_LL_MASK|U_GC_LT_MASK) + +/** Mask constant for multiple UCharCategory bits (M Marks). @stable ICU 2.1 */ +#define U_GC_M_MASK (U_GC_MN_MASK|U_GC_ME_MASK|U_GC_MC_MASK) + +/** Mask constant for multiple UCharCategory bits (N Numbers). @stable ICU 2.1 */ +#define U_GC_N_MASK (U_GC_ND_MASK|U_GC_NL_MASK|U_GC_NO_MASK) + +/** Mask constant for multiple UCharCategory bits (Z Separators). @stable ICU 2.1 */ +#define U_GC_Z_MASK (U_GC_ZS_MASK|U_GC_ZL_MASK|U_GC_ZP_MASK) + +/** Mask constant for multiple UCharCategory bits (C Others). @stable ICU 2.1 */ +#define U_GC_C_MASK \ + (U_GC_CN_MASK|U_GC_CC_MASK|U_GC_CF_MASK|U_GC_CO_MASK|U_GC_CS_MASK) + +/** Mask constant for multiple UCharCategory bits (P Punctuation). @stable ICU 2.1 */ +#define U_GC_P_MASK \ + (U_GC_PD_MASK|U_GC_PS_MASK|U_GC_PE_MASK|U_GC_PC_MASK|U_GC_PO_MASK| \ + U_GC_PI_MASK|U_GC_PF_MASK) + +/** Mask constant for multiple UCharCategory bits (S Symbols). @stable ICU 2.1 */ +#define U_GC_S_MASK (U_GC_SM_MASK|U_GC_SC_MASK|U_GC_SK_MASK|U_GC_SO_MASK) + +/** + * This specifies the language directional property of a character set. + * @stable ICU 2.0 + */ +typedef enum UCharDirection { + /* + * Note: UCharDirection constants and their API comments are parsed by preparseucd.py. + * It matches pairs of lines like + * / ** <Unicode 1..3-letter Bidi_Class value> comment... * / + * U_<[A-Z_]+> = <integer>, + */ + + /** L @stable ICU 2.0 */ + U_LEFT_TO_RIGHT = 0, + /** R @stable ICU 2.0 */ + U_RIGHT_TO_LEFT = 1, + /** EN @stable ICU 2.0 */ + U_EUROPEAN_NUMBER = 2, + /** ES @stable ICU 2.0 */ + U_EUROPEAN_NUMBER_SEPARATOR = 3, + /** ET @stable ICU 2.0 */ + U_EUROPEAN_NUMBER_TERMINATOR = 4, + /** AN @stable ICU 2.0 */ + U_ARABIC_NUMBER = 5, + /** CS @stable ICU 2.0 */ + U_COMMON_NUMBER_SEPARATOR = 6, + /** B @stable ICU 2.0 */ + U_BLOCK_SEPARATOR = 7, + /** S @stable ICU 2.0 */ + U_SEGMENT_SEPARATOR = 8, + /** WS @stable ICU 2.0 */ + U_WHITE_SPACE_NEUTRAL = 9, + /** ON @stable ICU 2.0 */ + U_OTHER_NEUTRAL = 10, + /** LRE @stable ICU 2.0 */ + U_LEFT_TO_RIGHT_EMBEDDING = 11, + /** LRO @stable ICU 2.0 */ + U_LEFT_TO_RIGHT_OVERRIDE = 12, + /** AL @stable ICU 2.0 */ + U_RIGHT_TO_LEFT_ARABIC = 13, + /** RLE @stable ICU 2.0 */ + U_RIGHT_TO_LEFT_EMBEDDING = 14, + /** RLO @stable ICU 2.0 */ + U_RIGHT_TO_LEFT_OVERRIDE = 15, + /** PDF @stable ICU 2.0 */ + U_POP_DIRECTIONAL_FORMAT = 16, + /** NSM @stable ICU 2.0 */ + U_DIR_NON_SPACING_MARK = 17, + /** BN @stable ICU 2.0 */ + U_BOUNDARY_NEUTRAL = 18, + /** FSI @stable ICU 52 */ + U_FIRST_STRONG_ISOLATE = 19, + /** LRI @stable ICU 52 */ + U_LEFT_TO_RIGHT_ISOLATE = 20, + /** RLI @stable ICU 52 */ + U_RIGHT_TO_LEFT_ISOLATE = 21, + /** PDI @stable ICU 52 */ + U_POP_DIRECTIONAL_ISOLATE = 22, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest UCharDirection value. + * The highest value is available via u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS). + * + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_CHAR_DIRECTION_COUNT +#endif // U_HIDE_DEPRECATED_API +} UCharDirection; + +/** + * Bidi Paired Bracket Type constants. + * + * @see UCHAR_BIDI_PAIRED_BRACKET_TYPE + * @stable ICU 52 + */ +typedef enum UBidiPairedBracketType { + /* + * Note: UBidiPairedBracketType constants are parsed by preparseucd.py. + * It matches lines like + * U_BPT_<Unicode Bidi_Paired_Bracket_Type value name> + */ + + /** Not a paired bracket. @stable ICU 52 */ + U_BPT_NONE, + /** Open paired bracket. @stable ICU 52 */ + U_BPT_OPEN, + /** Close paired bracket. @stable ICU 52 */ + U_BPT_CLOSE, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UBidiPairedBracketType value. + * The highest value is available via u_getIntPropertyMaxValue(UCHAR_BIDI_PAIRED_BRACKET_TYPE). + * + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_BPT_COUNT /* 3 */ +#endif // U_HIDE_DEPRECATED_API +} UBidiPairedBracketType; + +/** + * Constants for Unicode blocks, see the Unicode Data file Blocks.txt + * @stable ICU 2.0 + */ +enum UBlockCode { + /* + * Note: UBlockCode constants are parsed by preparseucd.py. + * It matches lines like + * UBLOCK_<Unicode Block value name> = <integer>, + */ + + /** New No_Block value in Unicode 4. @stable ICU 2.6 */ + UBLOCK_NO_BLOCK = 0, /*[none]*/ /* Special range indicating No_Block */ + + /** @stable ICU 2.0 */ + UBLOCK_BASIC_LATIN = 1, /*[0000]*/ + + /** @stable ICU 2.0 */ + UBLOCK_LATIN_1_SUPPLEMENT=2, /*[0080]*/ + + /** @stable ICU 2.0 */ + UBLOCK_LATIN_EXTENDED_A =3, /*[0100]*/ + + /** @stable ICU 2.0 */ + UBLOCK_LATIN_EXTENDED_B =4, /*[0180]*/ + + /** @stable ICU 2.0 */ + UBLOCK_IPA_EXTENSIONS =5, /*[0250]*/ + + /** @stable ICU 2.0 */ + UBLOCK_SPACING_MODIFIER_LETTERS =6, /*[02B0]*/ + + /** @stable ICU 2.0 */ + UBLOCK_COMBINING_DIACRITICAL_MARKS =7, /*[0300]*/ + + /** + * Unicode 3.2 renames this block to "Greek and Coptic". + * @stable ICU 2.0 + */ + UBLOCK_GREEK =8, /*[0370]*/ + + /** @stable ICU 2.0 */ + UBLOCK_CYRILLIC =9, /*[0400]*/ + + /** @stable ICU 2.0 */ + UBLOCK_ARMENIAN =10, /*[0530]*/ + + /** @stable ICU 2.0 */ + UBLOCK_HEBREW =11, /*[0590]*/ + + /** @stable ICU 2.0 */ + UBLOCK_ARABIC =12, /*[0600]*/ + + /** @stable ICU 2.0 */ + UBLOCK_SYRIAC =13, /*[0700]*/ + + /** @stable ICU 2.0 */ + UBLOCK_THAANA =14, /*[0780]*/ + + /** @stable ICU 2.0 */ + UBLOCK_DEVANAGARI =15, /*[0900]*/ + + /** @stable ICU 2.0 */ + UBLOCK_BENGALI =16, /*[0980]*/ + + /** @stable ICU 2.0 */ + UBLOCK_GURMUKHI =17, /*[0A00]*/ + + /** @stable ICU 2.0 */ + UBLOCK_GUJARATI =18, /*[0A80]*/ + + /** @stable ICU 2.0 */ + UBLOCK_ORIYA =19, /*[0B00]*/ + + /** @stable ICU 2.0 */ + UBLOCK_TAMIL =20, /*[0B80]*/ + + /** @stable ICU 2.0 */ + UBLOCK_TELUGU =21, /*[0C00]*/ + + /** @stable ICU 2.0 */ + UBLOCK_KANNADA =22, /*[0C80]*/ + + /** @stable ICU 2.0 */ + UBLOCK_MALAYALAM =23, /*[0D00]*/ + + /** @stable ICU 2.0 */ + UBLOCK_SINHALA =24, /*[0D80]*/ + + /** @stable ICU 2.0 */ + UBLOCK_THAI =25, /*[0E00]*/ + + /** @stable ICU 2.0 */ + UBLOCK_LAO =26, /*[0E80]*/ + + /** @stable ICU 2.0 */ + UBLOCK_TIBETAN =27, /*[0F00]*/ + + /** @stable ICU 2.0 */ + UBLOCK_MYANMAR =28, /*[1000]*/ + + /** @stable ICU 2.0 */ + UBLOCK_GEORGIAN =29, /*[10A0]*/ + + /** @stable ICU 2.0 */ + UBLOCK_HANGUL_JAMO =30, /*[1100]*/ + + /** @stable ICU 2.0 */ + UBLOCK_ETHIOPIC =31, /*[1200]*/ + + /** @stable ICU 2.0 */ + UBLOCK_CHEROKEE =32, /*[13A0]*/ + + /** @stable ICU 2.0 */ + UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS =33, /*[1400]*/ + + /** @stable ICU 2.0 */ + UBLOCK_OGHAM =34, /*[1680]*/ + + /** @stable ICU 2.0 */ + UBLOCK_RUNIC =35, /*[16A0]*/ + + /** @stable ICU 2.0 */ + UBLOCK_KHMER =36, /*[1780]*/ + + /** @stable ICU 2.0 */ + UBLOCK_MONGOLIAN =37, /*[1800]*/ + + /** @stable ICU 2.0 */ + UBLOCK_LATIN_EXTENDED_ADDITIONAL =38, /*[1E00]*/ + + /** @stable ICU 2.0 */ + UBLOCK_GREEK_EXTENDED =39, /*[1F00]*/ + + /** @stable ICU 2.0 */ + UBLOCK_GENERAL_PUNCTUATION =40, /*[2000]*/ + + /** @stable ICU 2.0 */ + UBLOCK_SUPERSCRIPTS_AND_SUBSCRIPTS =41, /*[2070]*/ + + /** @stable ICU 2.0 */ + UBLOCK_CURRENCY_SYMBOLS =42, /*[20A0]*/ + + /** + * Unicode 3.2 renames this block to "Combining Diacritical Marks for Symbols". + * @stable ICU 2.0 + */ + UBLOCK_COMBINING_MARKS_FOR_SYMBOLS =43, /*[20D0]*/ + + /** @stable ICU 2.0 */ + UBLOCK_LETTERLIKE_SYMBOLS =44, /*[2100]*/ + + /** @stable ICU 2.0 */ + UBLOCK_NUMBER_FORMS =45, /*[2150]*/ + + /** @stable ICU 2.0 */ + UBLOCK_ARROWS =46, /*[2190]*/ + + /** @stable ICU 2.0 */ + UBLOCK_MATHEMATICAL_OPERATORS =47, /*[2200]*/ + + /** @stable ICU 2.0 */ + UBLOCK_MISCELLANEOUS_TECHNICAL =48, /*[2300]*/ + + /** @stable ICU 2.0 */ + UBLOCK_CONTROL_PICTURES =49, /*[2400]*/ + + /** @stable ICU 2.0 */ + UBLOCK_OPTICAL_CHARACTER_RECOGNITION =50, /*[2440]*/ + + /** @stable ICU 2.0 */ + UBLOCK_ENCLOSED_ALPHANUMERICS =51, /*[2460]*/ + + /** @stable ICU 2.0 */ + UBLOCK_BOX_DRAWING =52, /*[2500]*/ + + /** @stable ICU 2.0 */ + UBLOCK_BLOCK_ELEMENTS =53, /*[2580]*/ + + /** @stable ICU 2.0 */ + UBLOCK_GEOMETRIC_SHAPES =54, /*[25A0]*/ + + /** @stable ICU 2.0 */ + UBLOCK_MISCELLANEOUS_SYMBOLS =55, /*[2600]*/ + + /** @stable ICU 2.0 */ + UBLOCK_DINGBATS =56, /*[2700]*/ + + /** @stable ICU 2.0 */ + UBLOCK_BRAILLE_PATTERNS =57, /*[2800]*/ + + /** @stable ICU 2.0 */ + UBLOCK_CJK_RADICALS_SUPPLEMENT =58, /*[2E80]*/ + + /** @stable ICU 2.0 */ + UBLOCK_KANGXI_RADICALS =59, /*[2F00]*/ + + /** @stable ICU 2.0 */ + UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS =60, /*[2FF0]*/ + + /** @stable ICU 2.0 */ + UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION =61, /*[3000]*/ + + /** @stable ICU 2.0 */ + UBLOCK_HIRAGANA =62, /*[3040]*/ + + /** @stable ICU 2.0 */ + UBLOCK_KATAKANA =63, /*[30A0]*/ + + /** @stable ICU 2.0 */ + UBLOCK_BOPOMOFO =64, /*[3100]*/ + + /** @stable ICU 2.0 */ + UBLOCK_HANGUL_COMPATIBILITY_JAMO =65, /*[3130]*/ + + /** @stable ICU 2.0 */ + UBLOCK_KANBUN =66, /*[3190]*/ + + /** @stable ICU 2.0 */ + UBLOCK_BOPOMOFO_EXTENDED =67, /*[31A0]*/ + + /** @stable ICU 2.0 */ + UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS =68, /*[3200]*/ + + /** @stable ICU 2.0 */ + UBLOCK_CJK_COMPATIBILITY =69, /*[3300]*/ + + /** @stable ICU 2.0 */ + UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A =70, /*[3400]*/ + + /** @stable ICU 2.0 */ + UBLOCK_CJK_UNIFIED_IDEOGRAPHS =71, /*[4E00]*/ + + /** @stable ICU 2.0 */ + UBLOCK_YI_SYLLABLES =72, /*[A000]*/ + + /** @stable ICU 2.0 */ + UBLOCK_YI_RADICALS =73, /*[A490]*/ + + /** @stable ICU 2.0 */ + UBLOCK_HANGUL_SYLLABLES =74, /*[AC00]*/ + + /** @stable ICU 2.0 */ + UBLOCK_HIGH_SURROGATES =75, /*[D800]*/ + + /** @stable ICU 2.0 */ + UBLOCK_HIGH_PRIVATE_USE_SURROGATES =76, /*[DB80]*/ + + /** @stable ICU 2.0 */ + UBLOCK_LOW_SURROGATES =77, /*[DC00]*/ + + /** + * Same as UBLOCK_PRIVATE_USE. + * Until Unicode 3.1.1, the corresponding block name was "Private Use", + * and multiple code point ranges had this block. + * Unicode 3.2 renames the block for the BMP PUA to "Private Use Area" and + * adds separate blocks for the supplementary PUAs. + * + * @stable ICU 2.0 + */ + UBLOCK_PRIVATE_USE_AREA =78, /*[E000]*/ + /** + * Same as UBLOCK_PRIVATE_USE_AREA. + * Until Unicode 3.1.1, the corresponding block name was "Private Use", + * and multiple code point ranges had this block. + * Unicode 3.2 renames the block for the BMP PUA to "Private Use Area" and + * adds separate blocks for the supplementary PUAs. + * + * @stable ICU 2.0 + */ + UBLOCK_PRIVATE_USE = UBLOCK_PRIVATE_USE_AREA, + + /** @stable ICU 2.0 */ + UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS =79, /*[F900]*/ + + /** @stable ICU 2.0 */ + UBLOCK_ALPHABETIC_PRESENTATION_FORMS =80, /*[FB00]*/ + + /** @stable ICU 2.0 */ + UBLOCK_ARABIC_PRESENTATION_FORMS_A =81, /*[FB50]*/ + + /** @stable ICU 2.0 */ + UBLOCK_COMBINING_HALF_MARKS =82, /*[FE20]*/ + + /** @stable ICU 2.0 */ + UBLOCK_CJK_COMPATIBILITY_FORMS =83, /*[FE30]*/ + + /** @stable ICU 2.0 */ + UBLOCK_SMALL_FORM_VARIANTS =84, /*[FE50]*/ + + /** @stable ICU 2.0 */ + UBLOCK_ARABIC_PRESENTATION_FORMS_B =85, /*[FE70]*/ + + /** @stable ICU 2.0 */ + UBLOCK_SPECIALS =86, /*[FFF0]*/ + + /** @stable ICU 2.0 */ + UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS =87, /*[FF00]*/ + + /* New blocks in Unicode 3.1 */ + + /** @stable ICU 2.0 */ + UBLOCK_OLD_ITALIC = 88, /*[10300]*/ + /** @stable ICU 2.0 */ + UBLOCK_GOTHIC = 89, /*[10330]*/ + /** @stable ICU 2.0 */ + UBLOCK_DESERET = 90, /*[10400]*/ + /** @stable ICU 2.0 */ + UBLOCK_BYZANTINE_MUSICAL_SYMBOLS = 91, /*[1D000]*/ + /** @stable ICU 2.0 */ + UBLOCK_MUSICAL_SYMBOLS = 92, /*[1D100]*/ + /** @stable ICU 2.0 */ + UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS = 93, /*[1D400]*/ + /** @stable ICU 2.0 */ + UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B = 94, /*[20000]*/ + /** @stable ICU 2.0 */ + UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT = 95, /*[2F800]*/ + /** @stable ICU 2.0 */ + UBLOCK_TAGS = 96, /*[E0000]*/ + + /* New blocks in Unicode 3.2 */ + + /** @stable ICU 3.0 */ + UBLOCK_CYRILLIC_SUPPLEMENT = 97, /*[0500]*/ + /** + * Unicode 4.0.1 renames the "Cyrillic Supplementary" block to "Cyrillic Supplement". + * @stable ICU 2.2 + */ + UBLOCK_CYRILLIC_SUPPLEMENTARY = UBLOCK_CYRILLIC_SUPPLEMENT, + /** @stable ICU 2.2 */ + UBLOCK_TAGALOG = 98, /*[1700]*/ + /** @stable ICU 2.2 */ + UBLOCK_HANUNOO = 99, /*[1720]*/ + /** @stable ICU 2.2 */ + UBLOCK_BUHID = 100, /*[1740]*/ + /** @stable ICU 2.2 */ + UBLOCK_TAGBANWA = 101, /*[1760]*/ + /** @stable ICU 2.2 */ + UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A = 102, /*[27C0]*/ + /** @stable ICU 2.2 */ + UBLOCK_SUPPLEMENTAL_ARROWS_A = 103, /*[27F0]*/ + /** @stable ICU 2.2 */ + UBLOCK_SUPPLEMENTAL_ARROWS_B = 104, /*[2900]*/ + /** @stable ICU 2.2 */ + UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B = 105, /*[2980]*/ + /** @stable ICU 2.2 */ + UBLOCK_SUPPLEMENTAL_MATHEMATICAL_OPERATORS = 106, /*[2A00]*/ + /** @stable ICU 2.2 */ + UBLOCK_KATAKANA_PHONETIC_EXTENSIONS = 107, /*[31F0]*/ + /** @stable ICU 2.2 */ + UBLOCK_VARIATION_SELECTORS = 108, /*[FE00]*/ + /** @stable ICU 2.2 */ + UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_A = 109, /*[F0000]*/ + /** @stable ICU 2.2 */ + UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B = 110, /*[100000]*/ + + /* New blocks in Unicode 4 */ + + /** @stable ICU 2.6 */ + UBLOCK_LIMBU = 111, /*[1900]*/ + /** @stable ICU 2.6 */ + UBLOCK_TAI_LE = 112, /*[1950]*/ + /** @stable ICU 2.6 */ + UBLOCK_KHMER_SYMBOLS = 113, /*[19E0]*/ + /** @stable ICU 2.6 */ + UBLOCK_PHONETIC_EXTENSIONS = 114, /*[1D00]*/ + /** @stable ICU 2.6 */ + UBLOCK_MISCELLANEOUS_SYMBOLS_AND_ARROWS = 115, /*[2B00]*/ + /** @stable ICU 2.6 */ + UBLOCK_YIJING_HEXAGRAM_SYMBOLS = 116, /*[4DC0]*/ + /** @stable ICU 2.6 */ + UBLOCK_LINEAR_B_SYLLABARY = 117, /*[10000]*/ + /** @stable ICU 2.6 */ + UBLOCK_LINEAR_B_IDEOGRAMS = 118, /*[10080]*/ + /** @stable ICU 2.6 */ + UBLOCK_AEGEAN_NUMBERS = 119, /*[10100]*/ + /** @stable ICU 2.6 */ + UBLOCK_UGARITIC = 120, /*[10380]*/ + /** @stable ICU 2.6 */ + UBLOCK_SHAVIAN = 121, /*[10450]*/ + /** @stable ICU 2.6 */ + UBLOCK_OSMANYA = 122, /*[10480]*/ + /** @stable ICU 2.6 */ + UBLOCK_CYPRIOT_SYLLABARY = 123, /*[10800]*/ + /** @stable ICU 2.6 */ + UBLOCK_TAI_XUAN_JING_SYMBOLS = 124, /*[1D300]*/ + /** @stable ICU 2.6 */ + UBLOCK_VARIATION_SELECTORS_SUPPLEMENT = 125, /*[E0100]*/ + + /* New blocks in Unicode 4.1 */ + + /** @stable ICU 3.4 */ + UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION = 126, /*[1D200]*/ + /** @stable ICU 3.4 */ + UBLOCK_ANCIENT_GREEK_NUMBERS = 127, /*[10140]*/ + /** @stable ICU 3.4 */ + UBLOCK_ARABIC_SUPPLEMENT = 128, /*[0750]*/ + /** @stable ICU 3.4 */ + UBLOCK_BUGINESE = 129, /*[1A00]*/ + /** @stable ICU 3.4 */ + UBLOCK_CJK_STROKES = 130, /*[31C0]*/ + /** @stable ICU 3.4 */ + UBLOCK_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT = 131, /*[1DC0]*/ + /** @stable ICU 3.4 */ + UBLOCK_COPTIC = 132, /*[2C80]*/ + /** @stable ICU 3.4 */ + UBLOCK_ETHIOPIC_EXTENDED = 133, /*[2D80]*/ + /** @stable ICU 3.4 */ + UBLOCK_ETHIOPIC_SUPPLEMENT = 134, /*[1380]*/ + /** @stable ICU 3.4 */ + UBLOCK_GEORGIAN_SUPPLEMENT = 135, /*[2D00]*/ + /** @stable ICU 3.4 */ + UBLOCK_GLAGOLITIC = 136, /*[2C00]*/ + /** @stable ICU 3.4 */ + UBLOCK_KHAROSHTHI = 137, /*[10A00]*/ + /** @stable ICU 3.4 */ + UBLOCK_MODIFIER_TONE_LETTERS = 138, /*[A700]*/ + /** @stable ICU 3.4 */ + UBLOCK_NEW_TAI_LUE = 139, /*[1980]*/ + /** @stable ICU 3.4 */ + UBLOCK_OLD_PERSIAN = 140, /*[103A0]*/ + /** @stable ICU 3.4 */ + UBLOCK_PHONETIC_EXTENSIONS_SUPPLEMENT = 141, /*[1D80]*/ + /** @stable ICU 3.4 */ + UBLOCK_SUPPLEMENTAL_PUNCTUATION = 142, /*[2E00]*/ + /** @stable ICU 3.4 */ + UBLOCK_SYLOTI_NAGRI = 143, /*[A800]*/ + /** @stable ICU 3.4 */ + UBLOCK_TIFINAGH = 144, /*[2D30]*/ + /** @stable ICU 3.4 */ + UBLOCK_VERTICAL_FORMS = 145, /*[FE10]*/ + + /* New blocks in Unicode 5.0 */ + + /** @stable ICU 3.6 */ + UBLOCK_NKO = 146, /*[07C0]*/ + /** @stable ICU 3.6 */ + UBLOCK_BALINESE = 147, /*[1B00]*/ + /** @stable ICU 3.6 */ + UBLOCK_LATIN_EXTENDED_C = 148, /*[2C60]*/ + /** @stable ICU 3.6 */ + UBLOCK_LATIN_EXTENDED_D = 149, /*[A720]*/ + /** @stable ICU 3.6 */ + UBLOCK_PHAGS_PA = 150, /*[A840]*/ + /** @stable ICU 3.6 */ + UBLOCK_PHOENICIAN = 151, /*[10900]*/ + /** @stable ICU 3.6 */ + UBLOCK_CUNEIFORM = 152, /*[12000]*/ + /** @stable ICU 3.6 */ + UBLOCK_CUNEIFORM_NUMBERS_AND_PUNCTUATION = 153, /*[12400]*/ + /** @stable ICU 3.6 */ + UBLOCK_COUNTING_ROD_NUMERALS = 154, /*[1D360]*/ + + /* New blocks in Unicode 5.1 */ + + /** @stable ICU 4.0 */ + UBLOCK_SUNDANESE = 155, /*[1B80]*/ + /** @stable ICU 4.0 */ + UBLOCK_LEPCHA = 156, /*[1C00]*/ + /** @stable ICU 4.0 */ + UBLOCK_OL_CHIKI = 157, /*[1C50]*/ + /** @stable ICU 4.0 */ + UBLOCK_CYRILLIC_EXTENDED_A = 158, /*[2DE0]*/ + /** @stable ICU 4.0 */ + UBLOCK_VAI = 159, /*[A500]*/ + /** @stable ICU 4.0 */ + UBLOCK_CYRILLIC_EXTENDED_B = 160, /*[A640]*/ + /** @stable ICU 4.0 */ + UBLOCK_SAURASHTRA = 161, /*[A880]*/ + /** @stable ICU 4.0 */ + UBLOCK_KAYAH_LI = 162, /*[A900]*/ + /** @stable ICU 4.0 */ + UBLOCK_REJANG = 163, /*[A930]*/ + /** @stable ICU 4.0 */ + UBLOCK_CHAM = 164, /*[AA00]*/ + /** @stable ICU 4.0 */ + UBLOCK_ANCIENT_SYMBOLS = 165, /*[10190]*/ + /** @stable ICU 4.0 */ + UBLOCK_PHAISTOS_DISC = 166, /*[101D0]*/ + /** @stable ICU 4.0 */ + UBLOCK_LYCIAN = 167, /*[10280]*/ + /** @stable ICU 4.0 */ + UBLOCK_CARIAN = 168, /*[102A0]*/ + /** @stable ICU 4.0 */ + UBLOCK_LYDIAN = 169, /*[10920]*/ + /** @stable ICU 4.0 */ + UBLOCK_MAHJONG_TILES = 170, /*[1F000]*/ + /** @stable ICU 4.0 */ + UBLOCK_DOMINO_TILES = 171, /*[1F030]*/ + + /* New blocks in Unicode 5.2 */ + + /** @stable ICU 4.4 */ + UBLOCK_SAMARITAN = 172, /*[0800]*/ + /** @stable ICU 4.4 */ + UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED = 173, /*[18B0]*/ + /** @stable ICU 4.4 */ + UBLOCK_TAI_THAM = 174, /*[1A20]*/ + /** @stable ICU 4.4 */ + UBLOCK_VEDIC_EXTENSIONS = 175, /*[1CD0]*/ + /** @stable ICU 4.4 */ + UBLOCK_LISU = 176, /*[A4D0]*/ + /** @stable ICU 4.4 */ + UBLOCK_BAMUM = 177, /*[A6A0]*/ + /** @stable ICU 4.4 */ + UBLOCK_COMMON_INDIC_NUMBER_FORMS = 178, /*[A830]*/ + /** @stable ICU 4.4 */ + UBLOCK_DEVANAGARI_EXTENDED = 179, /*[A8E0]*/ + /** @stable ICU 4.4 */ + UBLOCK_HANGUL_JAMO_EXTENDED_A = 180, /*[A960]*/ + /** @stable ICU 4.4 */ + UBLOCK_JAVANESE = 181, /*[A980]*/ + /** @stable ICU 4.4 */ + UBLOCK_MYANMAR_EXTENDED_A = 182, /*[AA60]*/ + /** @stable ICU 4.4 */ + UBLOCK_TAI_VIET = 183, /*[AA80]*/ + /** @stable ICU 4.4 */ + UBLOCK_MEETEI_MAYEK = 184, /*[ABC0]*/ + /** @stable ICU 4.4 */ + UBLOCK_HANGUL_JAMO_EXTENDED_B = 185, /*[D7B0]*/ + /** @stable ICU 4.4 */ + UBLOCK_IMPERIAL_ARAMAIC = 186, /*[10840]*/ + /** @stable ICU 4.4 */ + UBLOCK_OLD_SOUTH_ARABIAN = 187, /*[10A60]*/ + /** @stable ICU 4.4 */ + UBLOCK_AVESTAN = 188, /*[10B00]*/ + /** @stable ICU 4.4 */ + UBLOCK_INSCRIPTIONAL_PARTHIAN = 189, /*[10B40]*/ + /** @stable ICU 4.4 */ + UBLOCK_INSCRIPTIONAL_PAHLAVI = 190, /*[10B60]*/ + /** @stable ICU 4.4 */ + UBLOCK_OLD_TURKIC = 191, /*[10C00]*/ + /** @stable ICU 4.4 */ + UBLOCK_RUMI_NUMERAL_SYMBOLS = 192, /*[10E60]*/ + /** @stable ICU 4.4 */ + UBLOCK_KAITHI = 193, /*[11080]*/ + /** @stable ICU 4.4 */ + UBLOCK_EGYPTIAN_HIEROGLYPHS = 194, /*[13000]*/ + /** @stable ICU 4.4 */ + UBLOCK_ENCLOSED_ALPHANUMERIC_SUPPLEMENT = 195, /*[1F100]*/ + /** @stable ICU 4.4 */ + UBLOCK_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT = 196, /*[1F200]*/ + /** @stable ICU 4.4 */ + UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C = 197, /*[2A700]*/ + + /* New blocks in Unicode 6.0 */ + + /** @stable ICU 4.6 */ + UBLOCK_MANDAIC = 198, /*[0840]*/ + /** @stable ICU 4.6 */ + UBLOCK_BATAK = 199, /*[1BC0]*/ + /** @stable ICU 4.6 */ + UBLOCK_ETHIOPIC_EXTENDED_A = 200, /*[AB00]*/ + /** @stable ICU 4.6 */ + UBLOCK_BRAHMI = 201, /*[11000]*/ + /** @stable ICU 4.6 */ + UBLOCK_BAMUM_SUPPLEMENT = 202, /*[16800]*/ + /** @stable ICU 4.6 */ + UBLOCK_KANA_SUPPLEMENT = 203, /*[1B000]*/ + /** @stable ICU 4.6 */ + UBLOCK_PLAYING_CARDS = 204, /*[1F0A0]*/ + /** @stable ICU 4.6 */ + UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS = 205, /*[1F300]*/ + /** @stable ICU 4.6 */ + UBLOCK_EMOTICONS = 206, /*[1F600]*/ + /** @stable ICU 4.6 */ + UBLOCK_TRANSPORT_AND_MAP_SYMBOLS = 207, /*[1F680]*/ + /** @stable ICU 4.6 */ + UBLOCK_ALCHEMICAL_SYMBOLS = 208, /*[1F700]*/ + /** @stable ICU 4.6 */ + UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D = 209, /*[2B740]*/ + + /* New blocks in Unicode 6.1 */ + + /** @stable ICU 49 */ + UBLOCK_ARABIC_EXTENDED_A = 210, /*[08A0]*/ + /** @stable ICU 49 */ + UBLOCK_ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS = 211, /*[1EE00]*/ + /** @stable ICU 49 */ + UBLOCK_CHAKMA = 212, /*[11100]*/ + /** @stable ICU 49 */ + UBLOCK_MEETEI_MAYEK_EXTENSIONS = 213, /*[AAE0]*/ + /** @stable ICU 49 */ + UBLOCK_MEROITIC_CURSIVE = 214, /*[109A0]*/ + /** @stable ICU 49 */ + UBLOCK_MEROITIC_HIEROGLYPHS = 215, /*[10980]*/ + /** @stable ICU 49 */ + UBLOCK_MIAO = 216, /*[16F00]*/ + /** @stable ICU 49 */ + UBLOCK_SHARADA = 217, /*[11180]*/ + /** @stable ICU 49 */ + UBLOCK_SORA_SOMPENG = 218, /*[110D0]*/ + /** @stable ICU 49 */ + UBLOCK_SUNDANESE_SUPPLEMENT = 219, /*[1CC0]*/ + /** @stable ICU 49 */ + UBLOCK_TAKRI = 220, /*[11680]*/ + + /* New blocks in Unicode 7.0 */ + + /** @stable ICU 54 */ + UBLOCK_BASSA_VAH = 221, /*[16AD0]*/ + /** @stable ICU 54 */ + UBLOCK_CAUCASIAN_ALBANIAN = 222, /*[10530]*/ + /** @stable ICU 54 */ + UBLOCK_COPTIC_EPACT_NUMBERS = 223, /*[102E0]*/ + /** @stable ICU 54 */ + UBLOCK_COMBINING_DIACRITICAL_MARKS_EXTENDED = 224, /*[1AB0]*/ + /** @stable ICU 54 */ + UBLOCK_DUPLOYAN = 225, /*[1BC00]*/ + /** @stable ICU 54 */ + UBLOCK_ELBASAN = 226, /*[10500]*/ + /** @stable ICU 54 */ + UBLOCK_GEOMETRIC_SHAPES_EXTENDED = 227, /*[1F780]*/ + /** @stable ICU 54 */ + UBLOCK_GRANTHA = 228, /*[11300]*/ + /** @stable ICU 54 */ + UBLOCK_KHOJKI = 229, /*[11200]*/ + /** @stable ICU 54 */ + UBLOCK_KHUDAWADI = 230, /*[112B0]*/ + /** @stable ICU 54 */ + UBLOCK_LATIN_EXTENDED_E = 231, /*[AB30]*/ + /** @stable ICU 54 */ + UBLOCK_LINEAR_A = 232, /*[10600]*/ + /** @stable ICU 54 */ + UBLOCK_MAHAJANI = 233, /*[11150]*/ + /** @stable ICU 54 */ + UBLOCK_MANICHAEAN = 234, /*[10AC0]*/ + /** @stable ICU 54 */ + UBLOCK_MENDE_KIKAKUI = 235, /*[1E800]*/ + /** @stable ICU 54 */ + UBLOCK_MODI = 236, /*[11600]*/ + /** @stable ICU 54 */ + UBLOCK_MRO = 237, /*[16A40]*/ + /** @stable ICU 54 */ + UBLOCK_MYANMAR_EXTENDED_B = 238, /*[A9E0]*/ + /** @stable ICU 54 */ + UBLOCK_NABATAEAN = 239, /*[10880]*/ + /** @stable ICU 54 */ + UBLOCK_OLD_NORTH_ARABIAN = 240, /*[10A80]*/ + /** @stable ICU 54 */ + UBLOCK_OLD_PERMIC = 241, /*[10350]*/ + /** @stable ICU 54 */ + UBLOCK_ORNAMENTAL_DINGBATS = 242, /*[1F650]*/ + /** @stable ICU 54 */ + UBLOCK_PAHAWH_HMONG = 243, /*[16B00]*/ + /** @stable ICU 54 */ + UBLOCK_PALMYRENE = 244, /*[10860]*/ + /** @stable ICU 54 */ + UBLOCK_PAU_CIN_HAU = 245, /*[11AC0]*/ + /** @stable ICU 54 */ + UBLOCK_PSALTER_PAHLAVI = 246, /*[10B80]*/ + /** @stable ICU 54 */ + UBLOCK_SHORTHAND_FORMAT_CONTROLS = 247, /*[1BCA0]*/ + /** @stable ICU 54 */ + UBLOCK_SIDDHAM = 248, /*[11580]*/ + /** @stable ICU 54 */ + UBLOCK_SINHALA_ARCHAIC_NUMBERS = 249, /*[111E0]*/ + /** @stable ICU 54 */ + UBLOCK_SUPPLEMENTAL_ARROWS_C = 250, /*[1F800]*/ + /** @stable ICU 54 */ + UBLOCK_TIRHUTA = 251, /*[11480]*/ + /** @stable ICU 54 */ + UBLOCK_WARANG_CITI = 252, /*[118A0]*/ + + /* New blocks in Unicode 8.0 */ + + /** @stable ICU 56 */ + UBLOCK_AHOM = 253, /*[11700]*/ + /** @stable ICU 56 */ + UBLOCK_ANATOLIAN_HIEROGLYPHS = 254, /*[14400]*/ + /** @stable ICU 56 */ + UBLOCK_CHEROKEE_SUPPLEMENT = 255, /*[AB70]*/ + /** @stable ICU 56 */ + UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E = 256, /*[2B820]*/ + /** @stable ICU 56 */ + UBLOCK_EARLY_DYNASTIC_CUNEIFORM = 257, /*[12480]*/ + /** @stable ICU 56 */ + UBLOCK_HATRAN = 258, /*[108E0]*/ + /** @stable ICU 56 */ + UBLOCK_MULTANI = 259, /*[11280]*/ + /** @stable ICU 56 */ + UBLOCK_OLD_HUNGARIAN = 260, /*[10C80]*/ + /** @stable ICU 56 */ + UBLOCK_SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS = 261, /*[1F900]*/ + /** @stable ICU 56 */ + UBLOCK_SUTTON_SIGNWRITING = 262, /*[1D800]*/ + + /* New blocks in Unicode 9.0 */ + + /** @stable ICU 58 */ + UBLOCK_ADLAM = 263, /*[1E900]*/ + /** @stable ICU 58 */ + UBLOCK_BHAIKSUKI = 264, /*[11C00]*/ + /** @stable ICU 58 */ + UBLOCK_CYRILLIC_EXTENDED_C = 265, /*[1C80]*/ + /** @stable ICU 58 */ + UBLOCK_GLAGOLITIC_SUPPLEMENT = 266, /*[1E000]*/ + /** @stable ICU 58 */ + UBLOCK_IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION = 267, /*[16FE0]*/ + /** @stable ICU 58 */ + UBLOCK_MARCHEN = 268, /*[11C70]*/ + /** @stable ICU 58 */ + UBLOCK_MONGOLIAN_SUPPLEMENT = 269, /*[11660]*/ + /** @stable ICU 58 */ + UBLOCK_NEWA = 270, /*[11400]*/ + /** @stable ICU 58 */ + UBLOCK_OSAGE = 271, /*[104B0]*/ + /** @stable ICU 58 */ + UBLOCK_TANGUT = 272, /*[17000]*/ + /** @stable ICU 58 */ + UBLOCK_TANGUT_COMPONENTS = 273, /*[18800]*/ + + // New blocks in Unicode 10.0 + + /** @stable ICU 60 */ + UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F = 274, /*[2CEB0]*/ + /** @stable ICU 60 */ + UBLOCK_KANA_EXTENDED_A = 275, /*[1B100]*/ + /** @stable ICU 60 */ + UBLOCK_MASARAM_GONDI = 276, /*[11D00]*/ + /** @stable ICU 60 */ + UBLOCK_NUSHU = 277, /*[1B170]*/ + /** @stable ICU 60 */ + UBLOCK_SOYOMBO = 278, /*[11A50]*/ + /** @stable ICU 60 */ + UBLOCK_SYRIAC_SUPPLEMENT = 279, /*[0860]*/ + /** @stable ICU 60 */ + UBLOCK_ZANABAZAR_SQUARE = 280, /*[11A00]*/ + +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UBlockCode value. + * The highest value is available via u_getIntPropertyMaxValue(UCHAR_BLOCK). + * + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UBLOCK_COUNT = 281, +#endif // U_HIDE_DEPRECATED_API + + /** @stable ICU 2.0 */ + UBLOCK_INVALID_CODE=-1 +}; + +/** @stable ICU 2.0 */ +typedef enum UBlockCode UBlockCode; + +/** + * East Asian Width constants. + * + * @see UCHAR_EAST_ASIAN_WIDTH + * @see u_getIntPropertyValue + * @stable ICU 2.2 + */ +typedef enum UEastAsianWidth { + /* + * Note: UEastAsianWidth constants are parsed by preparseucd.py. + * It matches lines like + * U_EA_<Unicode East_Asian_Width value name> + */ + + U_EA_NEUTRAL, /*[N]*/ + U_EA_AMBIGUOUS, /*[A]*/ + U_EA_HALFWIDTH, /*[H]*/ + U_EA_FULLWIDTH, /*[F]*/ + U_EA_NARROW, /*[Na]*/ + U_EA_WIDE, /*[W]*/ +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UEastAsianWidth value. + * The highest value is available via u_getIntPropertyMaxValue(UCHAR_EAST_ASIAN_WIDTH). + * + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_EA_COUNT +#endif // U_HIDE_DEPRECATED_API +} UEastAsianWidth; + +/** + * Selector constants for u_charName(). + * u_charName() returns the "modern" name of a + * Unicode character; or the name that was defined in + * Unicode version 1.0, before the Unicode standard merged + * with ISO-10646; or an "extended" name that gives each + * Unicode code point a unique name. + * + * @see u_charName + * @stable ICU 2.0 + */ +typedef enum UCharNameChoice { + /** Unicode character name (Name property). @stable ICU 2.0 */ + U_UNICODE_CHAR_NAME, +#ifndef U_HIDE_DEPRECATED_API + /** + * The Unicode_1_Name property value which is of little practical value. + * Beginning with ICU 49, ICU APIs return an empty string for this name choice. + * @deprecated ICU 49 + */ + U_UNICODE_10_CHAR_NAME, +#endif /* U_HIDE_DEPRECATED_API */ + /** Standard or synthetic character name. @stable ICU 2.0 */ + U_EXTENDED_CHAR_NAME = U_UNICODE_CHAR_NAME+2, + /** Corrected name from NameAliases.txt. @stable ICU 4.4 */ + U_CHAR_NAME_ALIAS, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UCharNameChoice value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_CHAR_NAME_CHOICE_COUNT +#endif // U_HIDE_DEPRECATED_API +} UCharNameChoice; + +/** + * Selector constants for u_getPropertyName() and + * u_getPropertyValueName(). These selectors are used to choose which + * name is returned for a given property or value. All properties and + * values have a long name. Most have a short name, but some do not. + * Unicode allows for additional names, beyond the long and short + * name, which would be indicated by U_LONG_PROPERTY_NAME + i, where + * i=1, 2,... + * + * @see u_getPropertyName() + * @see u_getPropertyValueName() + * @stable ICU 2.4 + */ +typedef enum UPropertyNameChoice { + U_SHORT_PROPERTY_NAME, + U_LONG_PROPERTY_NAME, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UPropertyNameChoice value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_PROPERTY_NAME_CHOICE_COUNT +#endif // U_HIDE_DEPRECATED_API +} UPropertyNameChoice; + +/** + * Decomposition Type constants. + * + * @see UCHAR_DECOMPOSITION_TYPE + * @stable ICU 2.2 + */ +typedef enum UDecompositionType { + /* + * Note: UDecompositionType constants are parsed by preparseucd.py. + * It matches lines like + * U_DT_<Unicode Decomposition_Type value name> + */ + + U_DT_NONE, /*[none]*/ + U_DT_CANONICAL, /*[can]*/ + U_DT_COMPAT, /*[com]*/ + U_DT_CIRCLE, /*[enc]*/ + U_DT_FINAL, /*[fin]*/ + U_DT_FONT, /*[font]*/ + U_DT_FRACTION, /*[fra]*/ + U_DT_INITIAL, /*[init]*/ + U_DT_ISOLATED, /*[iso]*/ + U_DT_MEDIAL, /*[med]*/ + U_DT_NARROW, /*[nar]*/ + U_DT_NOBREAK, /*[nb]*/ + U_DT_SMALL, /*[sml]*/ + U_DT_SQUARE, /*[sqr]*/ + U_DT_SUB, /*[sub]*/ + U_DT_SUPER, /*[sup]*/ + U_DT_VERTICAL, /*[vert]*/ + U_DT_WIDE, /*[wide]*/ +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UDecompositionType value. + * The highest value is available via u_getIntPropertyMaxValue(UCHAR_DECOMPOSITION_TYPE). + * + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_DT_COUNT /* 18 */ +#endif // U_HIDE_DEPRECATED_API +} UDecompositionType; + +/** + * Joining Type constants. + * + * @see UCHAR_JOINING_TYPE + * @stable ICU 2.2 + */ +typedef enum UJoiningType { + /* + * Note: UJoiningType constants are parsed by preparseucd.py. + * It matches lines like + * U_JT_<Unicode Joining_Type value name> + */ + + U_JT_NON_JOINING, /*[U]*/ + U_JT_JOIN_CAUSING, /*[C]*/ + U_JT_DUAL_JOINING, /*[D]*/ + U_JT_LEFT_JOINING, /*[L]*/ + U_JT_RIGHT_JOINING, /*[R]*/ + U_JT_TRANSPARENT, /*[T]*/ +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UJoiningType value. + * The highest value is available via u_getIntPropertyMaxValue(UCHAR_JOINING_TYPE). + * + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_JT_COUNT /* 6 */ +#endif // U_HIDE_DEPRECATED_API +} UJoiningType; + +/** + * Joining Group constants. + * + * @see UCHAR_JOINING_GROUP + * @stable ICU 2.2 + */ +typedef enum UJoiningGroup { + /* + * Note: UJoiningGroup constants are parsed by preparseucd.py. + * It matches lines like + * U_JG_<Unicode Joining_Group value name> + */ + + U_JG_NO_JOINING_GROUP, + U_JG_AIN, + U_JG_ALAPH, + U_JG_ALEF, + U_JG_BEH, + U_JG_BETH, + U_JG_DAL, + U_JG_DALATH_RISH, + U_JG_E, + U_JG_FEH, + U_JG_FINAL_SEMKATH, + U_JG_GAF, + U_JG_GAMAL, + U_JG_HAH, + U_JG_TEH_MARBUTA_GOAL, /**< @stable ICU 4.6 */ + U_JG_HAMZA_ON_HEH_GOAL=U_JG_TEH_MARBUTA_GOAL, + U_JG_HE, + U_JG_HEH, + U_JG_HEH_GOAL, + U_JG_HETH, + U_JG_KAF, + U_JG_KAPH, + U_JG_KNOTTED_HEH, + U_JG_LAM, + U_JG_LAMADH, + U_JG_MEEM, + U_JG_MIM, + U_JG_NOON, + U_JG_NUN, + U_JG_PE, + U_JG_QAF, + U_JG_QAPH, + U_JG_REH, + U_JG_REVERSED_PE, + U_JG_SAD, + U_JG_SADHE, + U_JG_SEEN, + U_JG_SEMKATH, + U_JG_SHIN, + U_JG_SWASH_KAF, + U_JG_SYRIAC_WAW, + U_JG_TAH, + U_JG_TAW, + U_JG_TEH_MARBUTA, + U_JG_TETH, + U_JG_WAW, + U_JG_YEH, + U_JG_YEH_BARREE, + U_JG_YEH_WITH_TAIL, + U_JG_YUDH, + U_JG_YUDH_HE, + U_JG_ZAIN, + U_JG_FE, /**< @stable ICU 2.6 */ + U_JG_KHAPH, /**< @stable ICU 2.6 */ + U_JG_ZHAIN, /**< @stable ICU 2.6 */ + U_JG_BURUSHASKI_YEH_BARREE, /**< @stable ICU 4.0 */ + U_JG_FARSI_YEH, /**< @stable ICU 4.4 */ + U_JG_NYA, /**< @stable ICU 4.4 */ + U_JG_ROHINGYA_YEH, /**< @stable ICU 49 */ + U_JG_MANICHAEAN_ALEPH, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_AYIN, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_BETH, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_DALETH, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_DHAMEDH, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_FIVE, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_GIMEL, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_HETH, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_HUNDRED, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_KAPH, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_LAMEDH, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_MEM, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_NUN, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_ONE, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_PE, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_QOPH, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_RESH, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_SADHE, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_SAMEKH, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_TAW, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_TEN, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_TETH, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_THAMEDH, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_TWENTY, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_WAW, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_YODH, /**< @stable ICU 54 */ + U_JG_MANICHAEAN_ZAYIN, /**< @stable ICU 54 */ + U_JG_STRAIGHT_WAW, /**< @stable ICU 54 */ + U_JG_AFRICAN_FEH, /**< @stable ICU 58 */ + U_JG_AFRICAN_NOON, /**< @stable ICU 58 */ + U_JG_AFRICAN_QAF, /**< @stable ICU 58 */ + + U_JG_MALAYALAM_BHA, /**< @stable ICU 60 */ + U_JG_MALAYALAM_JA, /**< @stable ICU 60 */ + U_JG_MALAYALAM_LLA, /**< @stable ICU 60 */ + U_JG_MALAYALAM_LLLA, /**< @stable ICU 60 */ + U_JG_MALAYALAM_NGA, /**< @stable ICU 60 */ + U_JG_MALAYALAM_NNA, /**< @stable ICU 60 */ + U_JG_MALAYALAM_NNNA, /**< @stable ICU 60 */ + U_JG_MALAYALAM_NYA, /**< @stable ICU 60 */ + U_JG_MALAYALAM_RA, /**< @stable ICU 60 */ + U_JG_MALAYALAM_SSA, /**< @stable ICU 60 */ + U_JG_MALAYALAM_TTA, /**< @stable ICU 60 */ + +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UJoiningGroup value. + * The highest value is available via u_getIntPropertyMaxValue(UCHAR_JOINING_GROUP). + * + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_JG_COUNT +#endif // U_HIDE_DEPRECATED_API +} UJoiningGroup; + +/** + * Grapheme Cluster Break constants. + * + * @see UCHAR_GRAPHEME_CLUSTER_BREAK + * @stable ICU 3.4 + */ +typedef enum UGraphemeClusterBreak { + /* + * Note: UGraphemeClusterBreak constants are parsed by preparseucd.py. + * It matches lines like + * U_GCB_<Unicode Grapheme_Cluster_Break value name> + */ + + U_GCB_OTHER = 0, /*[XX]*/ + U_GCB_CONTROL = 1, /*[CN]*/ + U_GCB_CR = 2, /*[CR]*/ + U_GCB_EXTEND = 3, /*[EX]*/ + U_GCB_L = 4, /*[L]*/ + U_GCB_LF = 5, /*[LF]*/ + U_GCB_LV = 6, /*[LV]*/ + U_GCB_LVT = 7, /*[LVT]*/ + U_GCB_T = 8, /*[T]*/ + U_GCB_V = 9, /*[V]*/ + /** @stable ICU 4.0 */ + U_GCB_SPACING_MARK = 10, /*[SM]*/ /* from here on: new in Unicode 5.1/ICU 4.0 */ + /** @stable ICU 4.0 */ + U_GCB_PREPEND = 11, /*[PP]*/ + /** @stable ICU 50 */ + U_GCB_REGIONAL_INDICATOR = 12, /*[RI]*/ /* new in Unicode 6.2/ICU 50 */ + /** @stable ICU 58 */ + U_GCB_E_BASE = 13, /*[EB]*/ /* from here on: new in Unicode 9.0/ICU 58 */ + /** @stable ICU 58 */ + U_GCB_E_BASE_GAZ = 14, /*[EBG]*/ + /** @stable ICU 58 */ + U_GCB_E_MODIFIER = 15, /*[EM]*/ + /** @stable ICU 58 */ + U_GCB_GLUE_AFTER_ZWJ = 16, /*[GAZ]*/ + /** @stable ICU 58 */ + U_GCB_ZWJ = 17, /*[ZWJ]*/ +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UGraphemeClusterBreak value. + * The highest value is available via u_getIntPropertyMaxValue(UCHAR_GRAPHEME_CLUSTER_BREAK). + * + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_GCB_COUNT = 18 +#endif // U_HIDE_DEPRECATED_API +} UGraphemeClusterBreak; + +/** + * Word Break constants. + * (UWordBreak is a pre-existing enum type in ubrk.h for word break status tags.) + * + * @see UCHAR_WORD_BREAK + * @stable ICU 3.4 + */ +typedef enum UWordBreakValues { + /* + * Note: UWordBreakValues constants are parsed by preparseucd.py. + * It matches lines like + * U_WB_<Unicode Word_Break value name> + */ + + U_WB_OTHER = 0, /*[XX]*/ + U_WB_ALETTER = 1, /*[LE]*/ + U_WB_FORMAT = 2, /*[FO]*/ + U_WB_KATAKANA = 3, /*[KA]*/ + U_WB_MIDLETTER = 4, /*[ML]*/ + U_WB_MIDNUM = 5, /*[MN]*/ + U_WB_NUMERIC = 6, /*[NU]*/ + U_WB_EXTENDNUMLET = 7, /*[EX]*/ + /** @stable ICU 4.0 */ + U_WB_CR = 8, /*[CR]*/ /* from here on: new in Unicode 5.1/ICU 4.0 */ + /** @stable ICU 4.0 */ + U_WB_EXTEND = 9, /*[Extend]*/ + /** @stable ICU 4.0 */ + U_WB_LF = 10, /*[LF]*/ + /** @stable ICU 4.0 */ + U_WB_MIDNUMLET =11, /*[MB]*/ + /** @stable ICU 4.0 */ + U_WB_NEWLINE =12, /*[NL]*/ + /** @stable ICU 50 */ + U_WB_REGIONAL_INDICATOR = 13, /*[RI]*/ /* new in Unicode 6.2/ICU 50 */ + /** @stable ICU 52 */ + U_WB_HEBREW_LETTER = 14, /*[HL]*/ /* from here on: new in Unicode 6.3/ICU 52 */ + /** @stable ICU 52 */ + U_WB_SINGLE_QUOTE = 15, /*[SQ]*/ + /** @stable ICU 52 */ + U_WB_DOUBLE_QUOTE = 16, /*[DQ]*/ + /** @stable ICU 58 */ + U_WB_E_BASE = 17, /*[EB]*/ /* from here on: new in Unicode 9.0/ICU 58 */ + /** @stable ICU 58 */ + U_WB_E_BASE_GAZ = 18, /*[EBG]*/ + /** @stable ICU 58 */ + U_WB_E_MODIFIER = 19, /*[EM]*/ + /** @stable ICU 58 */ + U_WB_GLUE_AFTER_ZWJ = 20, /*[GAZ]*/ + /** @stable ICU 58 */ + U_WB_ZWJ = 21, /*[ZWJ]*/ +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UWordBreakValues value. + * The highest value is available via u_getIntPropertyMaxValue(UCHAR_WORD_BREAK). + * + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_WB_COUNT = 22 +#endif // U_HIDE_DEPRECATED_API +} UWordBreakValues; + +/** + * Sentence Break constants. + * + * @see UCHAR_SENTENCE_BREAK + * @stable ICU 3.4 + */ +typedef enum USentenceBreak { + /* + * Note: USentenceBreak constants are parsed by preparseucd.py. + * It matches lines like + * U_SB_<Unicode Sentence_Break value name> + */ + + U_SB_OTHER = 0, /*[XX]*/ + U_SB_ATERM = 1, /*[AT]*/ + U_SB_CLOSE = 2, /*[CL]*/ + U_SB_FORMAT = 3, /*[FO]*/ + U_SB_LOWER = 4, /*[LO]*/ + U_SB_NUMERIC = 5, /*[NU]*/ + U_SB_OLETTER = 6, /*[LE]*/ + U_SB_SEP = 7, /*[SE]*/ + U_SB_SP = 8, /*[SP]*/ + U_SB_STERM = 9, /*[ST]*/ + U_SB_UPPER = 10, /*[UP]*/ + U_SB_CR = 11, /*[CR]*/ /* from here on: new in Unicode 5.1/ICU 4.0 */ + U_SB_EXTEND = 12, /*[EX]*/ + U_SB_LF = 13, /*[LF]*/ + U_SB_SCONTINUE = 14, /*[SC]*/ +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal USentenceBreak value. + * The highest value is available via u_getIntPropertyMaxValue(UCHAR_SENTENCE_BREAK). + * + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_SB_COUNT = 15 +#endif // U_HIDE_DEPRECATED_API +} USentenceBreak; + +/** + * Line Break constants. + * + * @see UCHAR_LINE_BREAK + * @stable ICU 2.2 + */ +typedef enum ULineBreak { + /* + * Note: ULineBreak constants are parsed by preparseucd.py. + * It matches lines like + * U_LB_<Unicode Line_Break value name> + */ + + U_LB_UNKNOWN = 0, /*[XX]*/ + U_LB_AMBIGUOUS = 1, /*[AI]*/ + U_LB_ALPHABETIC = 2, /*[AL]*/ + U_LB_BREAK_BOTH = 3, /*[B2]*/ + U_LB_BREAK_AFTER = 4, /*[BA]*/ + U_LB_BREAK_BEFORE = 5, /*[BB]*/ + U_LB_MANDATORY_BREAK = 6, /*[BK]*/ + U_LB_CONTINGENT_BREAK = 7, /*[CB]*/ + U_LB_CLOSE_PUNCTUATION = 8, /*[CL]*/ + U_LB_COMBINING_MARK = 9, /*[CM]*/ + U_LB_CARRIAGE_RETURN = 10, /*[CR]*/ + U_LB_EXCLAMATION = 11, /*[EX]*/ + U_LB_GLUE = 12, /*[GL]*/ + U_LB_HYPHEN = 13, /*[HY]*/ + U_LB_IDEOGRAPHIC = 14, /*[ID]*/ + /** Renamed from the misspelled "inseperable" in Unicode 4.0.1/ICU 3.0 @stable ICU 3.0 */ + U_LB_INSEPARABLE = 15, /*[IN]*/ + U_LB_INSEPERABLE = U_LB_INSEPARABLE, + U_LB_INFIX_NUMERIC = 16, /*[IS]*/ + U_LB_LINE_FEED = 17, /*[LF]*/ + U_LB_NONSTARTER = 18, /*[NS]*/ + U_LB_NUMERIC = 19, /*[NU]*/ + U_LB_OPEN_PUNCTUATION = 20, /*[OP]*/ + U_LB_POSTFIX_NUMERIC = 21, /*[PO]*/ + U_LB_PREFIX_NUMERIC = 22, /*[PR]*/ + U_LB_QUOTATION = 23, /*[QU]*/ + U_LB_COMPLEX_CONTEXT = 24, /*[SA]*/ + U_LB_SURROGATE = 25, /*[SG]*/ + U_LB_SPACE = 26, /*[SP]*/ + U_LB_BREAK_SYMBOLS = 27, /*[SY]*/ + U_LB_ZWSPACE = 28, /*[ZW]*/ + /** @stable ICU 2.6 */ + U_LB_NEXT_LINE = 29, /*[NL]*/ /* from here on: new in Unicode 4/ICU 2.6 */ + /** @stable ICU 2.6 */ + U_LB_WORD_JOINER = 30, /*[WJ]*/ + /** @stable ICU 3.4 */ + U_LB_H2 = 31, /*[H2]*/ /* from here on: new in Unicode 4.1/ICU 3.4 */ + /** @stable ICU 3.4 */ + U_LB_H3 = 32, /*[H3]*/ + /** @stable ICU 3.4 */ + U_LB_JL = 33, /*[JL]*/ + /** @stable ICU 3.4 */ + U_LB_JT = 34, /*[JT]*/ + /** @stable ICU 3.4 */ + U_LB_JV = 35, /*[JV]*/ + /** @stable ICU 4.4 */ + U_LB_CLOSE_PARENTHESIS = 36, /*[CP]*/ /* new in Unicode 5.2/ICU 4.4 */ + /** @stable ICU 49 */ + U_LB_CONDITIONAL_JAPANESE_STARTER = 37,/*[CJ]*/ /* new in Unicode 6.1/ICU 49 */ + /** @stable ICU 49 */ + U_LB_HEBREW_LETTER = 38, /*[HL]*/ /* new in Unicode 6.1/ICU 49 */ + /** @stable ICU 50 */ + U_LB_REGIONAL_INDICATOR = 39,/*[RI]*/ /* new in Unicode 6.2/ICU 50 */ + /** @stable ICU 58 */ + U_LB_E_BASE = 40, /*[EB]*/ /* from here on: new in Unicode 9.0/ICU 58 */ + /** @stable ICU 58 */ + U_LB_E_MODIFIER = 41, /*[EM]*/ + /** @stable ICU 58 */ + U_LB_ZWJ = 42, /*[ZWJ]*/ +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal ULineBreak value. + * The highest value is available via u_getIntPropertyMaxValue(UCHAR_LINE_BREAK). + * + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_LB_COUNT = 43 +#endif // U_HIDE_DEPRECATED_API +} ULineBreak; + +/** + * Numeric Type constants. + * + * @see UCHAR_NUMERIC_TYPE + * @stable ICU 2.2 + */ +typedef enum UNumericType { + /* + * Note: UNumericType constants are parsed by preparseucd.py. + * It matches lines like + * U_NT_<Unicode Numeric_Type value name> + */ + + U_NT_NONE, /*[None]*/ + U_NT_DECIMAL, /*[de]*/ + U_NT_DIGIT, /*[di]*/ + U_NT_NUMERIC, /*[nu]*/ +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UNumericType value. + * The highest value is available via u_getIntPropertyMaxValue(UCHAR_NUMERIC_TYPE). + * + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_NT_COUNT +#endif // U_HIDE_DEPRECATED_API +} UNumericType; + +/** + * Hangul Syllable Type constants. + * + * @see UCHAR_HANGUL_SYLLABLE_TYPE + * @stable ICU 2.6 + */ +typedef enum UHangulSyllableType { + /* + * Note: UHangulSyllableType constants are parsed by preparseucd.py. + * It matches lines like + * U_HST_<Unicode Hangul_Syllable_Type value name> + */ + + U_HST_NOT_APPLICABLE, /*[NA]*/ + U_HST_LEADING_JAMO, /*[L]*/ + U_HST_VOWEL_JAMO, /*[V]*/ + U_HST_TRAILING_JAMO, /*[T]*/ + U_HST_LV_SYLLABLE, /*[LV]*/ + U_HST_LVT_SYLLABLE, /*[LVT]*/ +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UHangulSyllableType value. + * The highest value is available via u_getIntPropertyMaxValue(UCHAR_HANGUL_SYLLABLE_TYPE). + * + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_HST_COUNT +#endif // U_HIDE_DEPRECATED_API +} UHangulSyllableType; + +/** + * Check a binary Unicode property for a code point. + * + * Unicode, especially in version 3.2, defines many more properties than the + * original set in UnicodeData.txt. + * + * The properties APIs are intended to reflect Unicode properties as defined + * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). + * For details about the properties see http://www.unicode.org/ucd/ . + * For names of Unicode properties see the UCD file PropertyAliases.txt. + * + * Important: If ICU is built with UCD files from Unicode versions below 3.2, + * then properties marked with "new in Unicode 3.2" are not or not fully available. + * + * @param c Code point to test. + * @param which UProperty selector constant, identifies which binary property to check. + * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT. + * @return TRUE or FALSE according to the binary Unicode property value for c. + * Also FALSE if 'which' is out of bounds or if the Unicode version + * does not have data for the property at all, or not for this code point. + * + * @see UProperty + * @see u_getIntPropertyValue + * @see u_getUnicodeVersion + * @stable ICU 2.1 + */ +U_STABLE UBool U_EXPORT2 +u_hasBinaryProperty(UChar32 c, UProperty which); + +/** + * Check if a code point has the Alphabetic Unicode property. + * Same as u_hasBinaryProperty(c, UCHAR_ALPHABETIC). + * This is different from u_isalpha! + * @param c Code point to test + * @return true if the code point has the Alphabetic Unicode property, false otherwise + * + * @see UCHAR_ALPHABETIC + * @see u_isalpha + * @see u_hasBinaryProperty + * @stable ICU 2.1 + */ +U_STABLE UBool U_EXPORT2 +u_isUAlphabetic(UChar32 c); + +/** + * Check if a code point has the Lowercase Unicode property. + * Same as u_hasBinaryProperty(c, UCHAR_LOWERCASE). + * This is different from u_islower! + * @param c Code point to test + * @return true if the code point has the Lowercase Unicode property, false otherwise + * + * @see UCHAR_LOWERCASE + * @see u_islower + * @see u_hasBinaryProperty + * @stable ICU 2.1 + */ +U_STABLE UBool U_EXPORT2 +u_isULowercase(UChar32 c); + +/** + * Check if a code point has the Uppercase Unicode property. + * Same as u_hasBinaryProperty(c, UCHAR_UPPERCASE). + * This is different from u_isupper! + * @param c Code point to test + * @return true if the code point has the Uppercase Unicode property, false otherwise + * + * @see UCHAR_UPPERCASE + * @see u_isupper + * @see u_hasBinaryProperty + * @stable ICU 2.1 + */ +U_STABLE UBool U_EXPORT2 +u_isUUppercase(UChar32 c); + +/** + * Check if a code point has the White_Space Unicode property. + * Same as u_hasBinaryProperty(c, UCHAR_WHITE_SPACE). + * This is different from both u_isspace and u_isWhitespace! + * + * Note: There are several ICU whitespace functions; please see the uchar.h + * file documentation for a detailed comparison. + * + * @param c Code point to test + * @return true if the code point has the White_Space Unicode property, false otherwise. + * + * @see UCHAR_WHITE_SPACE + * @see u_isWhitespace + * @see u_isspace + * @see u_isJavaSpaceChar + * @see u_hasBinaryProperty + * @stable ICU 2.1 + */ +U_STABLE UBool U_EXPORT2 +u_isUWhiteSpace(UChar32 c); + +/** + * Get the property value for an enumerated or integer Unicode property for a code point. + * Also returns binary and mask property values. + * + * Unicode, especially in version 3.2, defines many more properties than the + * original set in UnicodeData.txt. + * + * The properties APIs are intended to reflect Unicode properties as defined + * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). + * For details about the properties see http://www.unicode.org/ . + * For names of Unicode properties see the UCD file PropertyAliases.txt. + * + * Sample usage: + * UEastAsianWidth ea=(UEastAsianWidth)u_getIntPropertyValue(c, UCHAR_EAST_ASIAN_WIDTH); + * UBool b=(UBool)u_getIntPropertyValue(c, UCHAR_IDEOGRAPHIC); + * + * @param c Code point to test. + * @param which UProperty selector constant, identifies which property to check. + * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT + * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT + * or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT. + * @return Numeric value that is directly the property value or, + * for enumerated properties, corresponds to the numeric value of the enumerated + * constant of the respective property value enumeration type + * (cast to enum type if necessary). + * Returns 0 or 1 (for FALSE/TRUE) for binary Unicode properties. + * Returns a bit-mask for mask properties. + * Returns 0 if 'which' is out of bounds or if the Unicode version + * does not have data for the property at all, or not for this code point. + * + * @see UProperty + * @see u_hasBinaryProperty + * @see u_getIntPropertyMinValue + * @see u_getIntPropertyMaxValue + * @see u_getUnicodeVersion + * @stable ICU 2.2 + */ +U_STABLE int32_t U_EXPORT2 +u_getIntPropertyValue(UChar32 c, UProperty which); + +/** + * Get the minimum value for an enumerated/integer/binary Unicode property. + * Can be used together with u_getIntPropertyMaxValue + * to allocate arrays of UnicodeSet or similar. + * + * @param which UProperty selector constant, identifies which binary property to check. + * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT + * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT. + * @return Minimum value returned by u_getIntPropertyValue for a Unicode property. + * 0 if the property selector is out of range. + * + * @see UProperty + * @see u_hasBinaryProperty + * @see u_getUnicodeVersion + * @see u_getIntPropertyMaxValue + * @see u_getIntPropertyValue + * @stable ICU 2.2 + */ +U_STABLE int32_t U_EXPORT2 +u_getIntPropertyMinValue(UProperty which); + +/** + * Get the maximum value for an enumerated/integer/binary Unicode property. + * Can be used together with u_getIntPropertyMinValue + * to allocate arrays of UnicodeSet or similar. + * + * Examples for min/max values (for Unicode 3.2): + * + * - UCHAR_BIDI_CLASS: 0/18 (U_LEFT_TO_RIGHT/U_BOUNDARY_NEUTRAL) + * - UCHAR_SCRIPT: 0/45 (USCRIPT_COMMON/USCRIPT_TAGBANWA) + * - UCHAR_IDEOGRAPHIC: 0/1 (FALSE/TRUE) + * + * For undefined UProperty constant values, min/max values will be 0/-1. + * + * @param which UProperty selector constant, identifies which binary property to check. + * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT + * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT. + * @return Maximum value returned by u_getIntPropertyValue for a Unicode property. + * <=0 if the property selector is out of range. + * + * @see UProperty + * @see u_hasBinaryProperty + * @see u_getUnicodeVersion + * @see u_getIntPropertyMaxValue + * @see u_getIntPropertyValue + * @stable ICU 2.2 + */ +U_STABLE int32_t U_EXPORT2 +u_getIntPropertyMaxValue(UProperty which); + +/** + * Get the numeric value for a Unicode code point as defined in the + * Unicode Character Database. + * + * A "double" return type is necessary because + * some numeric values are fractions, negative, or too large for int32_t. + * + * For characters without any numeric values in the Unicode Character Database, + * this function will return U_NO_NUMERIC_VALUE. + * Note: This is different from the Unicode Standard which specifies NaN as the default value. + * (NaN is not available on all platforms.) + * + * Similar to java.lang.Character.getNumericValue(), but u_getNumericValue() + * also supports negative values, large values, and fractions, + * while Java's getNumericValue() returns values 10..35 for ASCII letters. + * + * @param c Code point to get the numeric value for. + * @return Numeric value of c, or U_NO_NUMERIC_VALUE if none is defined. + * + * @see U_NO_NUMERIC_VALUE + * @stable ICU 2.2 + */ +U_STABLE double U_EXPORT2 +u_getNumericValue(UChar32 c); + +/** + * Special value that is returned by u_getNumericValue when + * no numeric value is defined for a code point. + * + * @see u_getNumericValue + * @stable ICU 2.2 + */ +#define U_NO_NUMERIC_VALUE ((double)-123456789.) + +/** + * Determines whether the specified code point has the general category "Ll" + * (lowercase letter). + * + * Same as java.lang.Character.isLowerCase(). + * + * This misses some characters that are also lowercase but + * have a different general category value. + * In order to include those, use UCHAR_LOWERCASE. + * + * In addition to being equivalent to a Java function, this also serves + * as a C/POSIX migration function. + * See the comments about C/POSIX character classification functions in the + * documentation at the top of this header file. + * + * @param c the code point to be tested + * @return TRUE if the code point is an Ll lowercase letter + * + * @see UCHAR_LOWERCASE + * @see u_isupper + * @see u_istitle + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +u_islower(UChar32 c); + +/** + * Determines whether the specified code point has the general category "Lu" + * (uppercase letter). + * + * Same as java.lang.Character.isUpperCase(). + * + * This misses some characters that are also uppercase but + * have a different general category value. + * In order to include those, use UCHAR_UPPERCASE. + * + * In addition to being equivalent to a Java function, this also serves + * as a C/POSIX migration function. + * See the comments about C/POSIX character classification functions in the + * documentation at the top of this header file. + * + * @param c the code point to be tested + * @return TRUE if the code point is an Lu uppercase letter + * + * @see UCHAR_UPPERCASE + * @see u_islower + * @see u_istitle + * @see u_tolower + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +u_isupper(UChar32 c); + +/** + * Determines whether the specified code point is a titlecase letter. + * True for general category "Lt" (titlecase letter). + * + * Same as java.lang.Character.isTitleCase(). + * + * @param c the code point to be tested + * @return TRUE if the code point is an Lt titlecase letter + * + * @see u_isupper + * @see u_islower + * @see u_totitle + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +u_istitle(UChar32 c); + +/** + * Determines whether the specified code point is a digit character according to Java. + * True for characters with general category "Nd" (decimal digit numbers). + * Beginning with Unicode 4, this is the same as + * testing for the Numeric_Type of Decimal. + * + * Same as java.lang.Character.isDigit(). + * + * In addition to being equivalent to a Java function, this also serves + * as a C/POSIX migration function. + * See the comments about C/POSIX character classification functions in the + * documentation at the top of this header file. + * + * @param c the code point to be tested + * @return TRUE if the code point is a digit character according to Character.isDigit() + * + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +u_isdigit(UChar32 c); + +/** + * Determines whether the specified code point is a letter character. + * True for general categories "L" (letters). + * + * Same as java.lang.Character.isLetter(). + * + * In addition to being equivalent to a Java function, this also serves + * as a C/POSIX migration function. + * See the comments about C/POSIX character classification functions in the + * documentation at the top of this header file. + * + * @param c the code point to be tested + * @return TRUE if the code point is a letter character + * + * @see u_isdigit + * @see u_isalnum + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +u_isalpha(UChar32 c); + +/** + * Determines whether the specified code point is an alphanumeric character + * (letter or digit) according to Java. + * True for characters with general categories + * "L" (letters) and "Nd" (decimal digit numbers). + * + * Same as java.lang.Character.isLetterOrDigit(). + * + * In addition to being equivalent to a Java function, this also serves + * as a C/POSIX migration function. + * See the comments about C/POSIX character classification functions in the + * documentation at the top of this header file. + * + * @param c the code point to be tested + * @return TRUE if the code point is an alphanumeric character according to Character.isLetterOrDigit() + * + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +u_isalnum(UChar32 c); + +/** + * Determines whether the specified code point is a hexadecimal digit. + * This is equivalent to u_digit(c, 16)>=0. + * True for characters with general category "Nd" (decimal digit numbers) + * as well as Latin letters a-f and A-F in both ASCII and Fullwidth ASCII. + * (That is, for letters with code points + * 0041..0046, 0061..0066, FF21..FF26, FF41..FF46.) + * + * In order to narrow the definition of hexadecimal digits to only ASCII + * characters, use (c<=0x7f && u_isxdigit(c)). + * + * This is a C/POSIX migration function. + * See the comments about C/POSIX character classification functions in the + * documentation at the top of this header file. + * + * @param c the code point to be tested + * @return TRUE if the code point is a hexadecimal digit + * + * @stable ICU 2.6 + */ +U_STABLE UBool U_EXPORT2 +u_isxdigit(UChar32 c); + +/** + * Determines whether the specified code point is a punctuation character. + * True for characters with general categories "P" (punctuation). + * + * This is a C/POSIX migration function. + * See the comments about C/POSIX character classification functions in the + * documentation at the top of this header file. + * + * @param c the code point to be tested + * @return TRUE if the code point is a punctuation character + * + * @stable ICU 2.6 + */ +U_STABLE UBool U_EXPORT2 +u_ispunct(UChar32 c); + +/** + * Determines whether the specified code point is a "graphic" character + * (printable, excluding spaces). + * TRUE for all characters except those with general categories + * "Cc" (control codes), "Cf" (format controls), "Cs" (surrogates), + * "Cn" (unassigned), and "Z" (separators). + * + * This is a C/POSIX migration function. + * See the comments about C/POSIX character classification functions in the + * documentation at the top of this header file. + * + * @param c the code point to be tested + * @return TRUE if the code point is a "graphic" character + * + * @stable ICU 2.6 + */ +U_STABLE UBool U_EXPORT2 +u_isgraph(UChar32 c); + +/** + * Determines whether the specified code point is a "blank" or "horizontal space", + * a character that visibly separates words on a line. + * The following are equivalent definitions: + * + * TRUE for Unicode White_Space characters except for "vertical space controls" + * where "vertical space controls" are the following characters: + * U+000A (LF) U+000B (VT) U+000C (FF) U+000D (CR) U+0085 (NEL) U+2028 (LS) U+2029 (PS) + * + * same as + * + * TRUE for U+0009 (TAB) and characters with general category "Zs" (space separators). + * + * Note: There are several ICU whitespace functions; please see the uchar.h + * file documentation for a detailed comparison. + * + * This is a C/POSIX migration function. + * See the comments about C/POSIX character classification functions in the + * documentation at the top of this header file. + * + * @param c the code point to be tested + * @return TRUE if the code point is a "blank" + * + * @stable ICU 2.6 + */ +U_STABLE UBool U_EXPORT2 +u_isblank(UChar32 c); + +/** + * Determines whether the specified code point is "defined", + * which usually means that it is assigned a character. + * True for general categories other than "Cn" (other, not assigned), + * i.e., true for all code points mentioned in UnicodeData.txt. + * + * Note that non-character code points (e.g., U+FDD0) are not "defined" + * (they are Cn), but surrogate code points are "defined" (Cs). + * + * Same as java.lang.Character.isDefined(). + * + * @param c the code point to be tested + * @return TRUE if the code point is assigned a character + * + * @see u_isdigit + * @see u_isalpha + * @see u_isalnum + * @see u_isupper + * @see u_islower + * @see u_istitle + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +u_isdefined(UChar32 c); + +/** + * Determines if the specified character is a space character or not. + * + * Note: There are several ICU whitespace functions; please see the uchar.h + * file documentation for a detailed comparison. + * + * This is a C/POSIX migration function. + * See the comments about C/POSIX character classification functions in the + * documentation at the top of this header file. + * + * @param c the character to be tested + * @return true if the character is a space character; false otherwise. + * + * @see u_isJavaSpaceChar + * @see u_isWhitespace + * @see u_isUWhiteSpace + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +u_isspace(UChar32 c); + +/** + * Determine if the specified code point is a space character according to Java. + * True for characters with general categories "Z" (separators), + * which does not include control codes (e.g., TAB or Line Feed). + * + * Same as java.lang.Character.isSpaceChar(). + * + * Note: There are several ICU whitespace functions; please see the uchar.h + * file documentation for a detailed comparison. + * + * @param c the code point to be tested + * @return TRUE if the code point is a space character according to Character.isSpaceChar() + * + * @see u_isspace + * @see u_isWhitespace + * @see u_isUWhiteSpace + * @stable ICU 2.6 + */ +U_STABLE UBool U_EXPORT2 +u_isJavaSpaceChar(UChar32 c); + +/** + * Determines if the specified code point is a whitespace character according to Java/ICU. + * A character is considered to be a Java whitespace character if and only + * if it satisfies one of the following criteria: + * + * - It is a Unicode Separator character (categories "Z" = "Zs" or "Zl" or "Zp"), but is not + * also a non-breaking space (U+00A0 NBSP or U+2007 Figure Space or U+202F Narrow NBSP). + * - It is U+0009 HORIZONTAL TABULATION. + * - It is U+000A LINE FEED. + * - It is U+000B VERTICAL TABULATION. + * - It is U+000C FORM FEED. + * - It is U+000D CARRIAGE RETURN. + * - It is U+001C FILE SEPARATOR. + * - It is U+001D GROUP SEPARATOR. + * - It is U+001E RECORD SEPARATOR. + * - It is U+001F UNIT SEPARATOR. + * + * This API tries to sync with the semantics of Java's + * java.lang.Character.isWhitespace(), but it may not return + * the exact same results because of the Unicode version + * difference. + * + * Note: Unicode 4.0.1 changed U+200B ZERO WIDTH SPACE from a Space Separator (Zs) + * to a Format Control (Cf). Since then, isWhitespace(0x200b) returns false. + * See http://www.unicode.org/versions/Unicode4.0.1/ + * + * Note: There are several ICU whitespace functions; please see the uchar.h + * file documentation for a detailed comparison. + * + * @param c the code point to be tested + * @return TRUE if the code point is a whitespace character according to Java/ICU + * + * @see u_isspace + * @see u_isJavaSpaceChar + * @see u_isUWhiteSpace + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +u_isWhitespace(UChar32 c); + +/** + * Determines whether the specified code point is a control character + * (as defined by this function). + * A control character is one of the following: + * - ISO 8-bit control character (U+0000..U+001f and U+007f..U+009f) + * - U_CONTROL_CHAR (Cc) + * - U_FORMAT_CHAR (Cf) + * - U_LINE_SEPARATOR (Zl) + * - U_PARAGRAPH_SEPARATOR (Zp) + * + * This is a C/POSIX migration function. + * See the comments about C/POSIX character classification functions in the + * documentation at the top of this header file. + * + * @param c the code point to be tested + * @return TRUE if the code point is a control character + * + * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT + * @see u_isprint + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +u_iscntrl(UChar32 c); + +/** + * Determines whether the specified code point is an ISO control code. + * True for U+0000..U+001f and U+007f..U+009f (general category "Cc"). + * + * Same as java.lang.Character.isISOControl(). + * + * @param c the code point to be tested + * @return TRUE if the code point is an ISO control code + * + * @see u_iscntrl + * @stable ICU 2.6 + */ +U_STABLE UBool U_EXPORT2 +u_isISOControl(UChar32 c); + +/** + * Determines whether the specified code point is a printable character. + * True for general categories <em>other</em> than "C" (controls). + * + * This is a C/POSIX migration function. + * See the comments about C/POSIX character classification functions in the + * documentation at the top of this header file. + * + * @param c the code point to be tested + * @return TRUE if the code point is a printable character + * + * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT + * @see u_iscntrl + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +u_isprint(UChar32 c); + +/** + * Determines whether the specified code point is a base character. + * True for general categories "L" (letters), "N" (numbers), + * "Mc" (spacing combining marks), and "Me" (enclosing marks). + * + * Note that this is different from the Unicode definition in + * chapter 3.5, conformance clause D13, + * which defines base characters to be all characters (not Cn) + * that do not graphically combine with preceding characters (M) + * and that are neither control (Cc) or format (Cf) characters. + * + * @param c the code point to be tested + * @return TRUE if the code point is a base character according to this function + * + * @see u_isalpha + * @see u_isdigit + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +u_isbase(UChar32 c); + +/** + * Returns the bidirectional category value for the code point, + * which is used in the Unicode bidirectional algorithm + * (UAX #9 http://www.unicode.org/reports/tr9/). + * Note that some <em>unassigned</em> code points have bidi values + * of R or AL because they are in blocks that are reserved + * for Right-To-Left scripts. + * + * Same as java.lang.Character.getDirectionality() + * + * @param c the code point to be tested + * @return the bidirectional category (UCharDirection) value + * + * @see UCharDirection + * @stable ICU 2.0 + */ +U_STABLE UCharDirection U_EXPORT2 +u_charDirection(UChar32 c); + +/** + * Determines whether the code point has the Bidi_Mirrored property. + * This property is set for characters that are commonly used in + * Right-To-Left contexts and need to be displayed with a "mirrored" + * glyph. + * + * Same as java.lang.Character.isMirrored(). + * Same as UCHAR_BIDI_MIRRORED + * + * @param c the code point to be tested + * @return TRUE if the character has the Bidi_Mirrored property + * + * @see UCHAR_BIDI_MIRRORED + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +u_isMirrored(UChar32 c); + +/** + * Maps the specified character to a "mirror-image" character. + * For characters with the Bidi_Mirrored property, implementations + * sometimes need a "poor man's" mapping to another Unicode + * character (code point) such that the default glyph may serve + * as the mirror-image of the default glyph of the specified + * character. This is useful for text conversion to and from + * codepages with visual order, and for displays without glyph + * selection capabilities. + * + * @param c the code point to be mapped + * @return another Unicode code point that may serve as a mirror-image + * substitute, or c itself if there is no such mapping or c + * does not have the Bidi_Mirrored property + * + * @see UCHAR_BIDI_MIRRORED + * @see u_isMirrored + * @stable ICU 2.0 + */ +U_STABLE UChar32 U_EXPORT2 +u_charMirror(UChar32 c); + +/** + * Maps the specified character to its paired bracket character. + * For Bidi_Paired_Bracket_Type!=None, this is the same as u_charMirror(). + * Otherwise c itself is returned. + * See http://www.unicode.org/reports/tr9/ + * + * @param c the code point to be mapped + * @return the paired bracket code point, + * or c itself if there is no such mapping + * (Bidi_Paired_Bracket_Type=None) + * + * @see UCHAR_BIDI_PAIRED_BRACKET + * @see UCHAR_BIDI_PAIRED_BRACKET_TYPE + * @see u_charMirror + * @stable ICU 52 + */ +U_STABLE UChar32 U_EXPORT2 +u_getBidiPairedBracket(UChar32 c); + +/** + * Returns the general category value for the code point. + * + * Same as java.lang.Character.getType(). + * + * @param c the code point to be tested + * @return the general category (UCharCategory) value + * + * @see UCharCategory + * @stable ICU 2.0 + */ +U_STABLE int8_t U_EXPORT2 +u_charType(UChar32 c); + +/** + * Get a single-bit bit set for the general category of a character. + * This bit set can be compared bitwise with U_GC_SM_MASK, U_GC_L_MASK, etc. + * Same as U_MASK(u_charType(c)). + * + * @param c the code point to be tested + * @return a single-bit mask corresponding to the general category (UCharCategory) value + * + * @see u_charType + * @see UCharCategory + * @see U_GC_CN_MASK + * @stable ICU 2.1 + */ +#define U_GET_GC_MASK(c) U_MASK(u_charType(c)) + +/** + * Callback from u_enumCharTypes(), is called for each contiguous range + * of code points c (where start<=c<limit) + * with the same Unicode general category ("character type"). + * + * The callback function can stop the enumeration by returning FALSE. + * + * @param context an opaque pointer, as passed into utrie_enum() + * @param start the first code point in a contiguous range with value + * @param limit one past the last code point in a contiguous range with value + * @param type the general category for all code points in [start..limit[ + * @return FALSE to stop the enumeration + * + * @stable ICU 2.1 + * @see UCharCategory + * @see u_enumCharTypes + */ +typedef UBool U_CALLCONV +UCharEnumTypeRange(const void *context, UChar32 start, UChar32 limit, UCharCategory type); + +/** + * Enumerate efficiently all code points with their Unicode general categories. + * + * This is useful for building data structures (e.g., UnicodeSet's), + * for enumerating all assigned code points (type!=U_UNASSIGNED), etc. + * + * For each contiguous range of code points with a given general category ("character type"), + * the UCharEnumTypeRange function is called. + * Adjacent ranges have different types. + * The Unicode Standard guarantees that the numeric value of the type is 0..31. + * + * @param enumRange a pointer to a function that is called for each contiguous range + * of code points with the same general category + * @param context an opaque pointer that is passed on to the callback function + * + * @stable ICU 2.1 + * @see UCharCategory + * @see UCharEnumTypeRange + */ +U_STABLE void U_EXPORT2 +u_enumCharTypes(UCharEnumTypeRange *enumRange, const void *context); + +#if !UCONFIG_NO_NORMALIZATION + +/** + * Returns the combining class of the code point as specified in UnicodeData.txt. + * + * @param c the code point of the character + * @return the combining class of the character + * @stable ICU 2.0 + */ +U_STABLE uint8_t U_EXPORT2 +u_getCombiningClass(UChar32 c); + +#endif + +/** + * Returns the decimal digit value of a decimal digit character. + * Such characters have the general category "Nd" (decimal digit numbers) + * and a Numeric_Type of Decimal. + * + * Unlike ICU releases before 2.6, no digit values are returned for any + * Han characters because Han number characters are often used with a special + * Chinese-style number format (with characters for powers of 10 in between) + * instead of in decimal-positional notation. + * Unicode 4 explicitly assigns Han number characters the Numeric_Type + * Numeric instead of Decimal. + * See Jitterbug 1483 for more details. + * + * Use u_getIntPropertyValue(c, UCHAR_NUMERIC_TYPE) and u_getNumericValue() + * for complete numeric Unicode properties. + * + * @param c the code point for which to get the decimal digit value + * @return the decimal digit value of c, + * or -1 if c is not a decimal digit character + * + * @see u_getNumericValue + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_charDigitValue(UChar32 c); + +/** + * Returns the Unicode allocation block that contains the character. + * + * @param c the code point to be tested + * @return the block value (UBlockCode) for c + * + * @see UBlockCode + * @stable ICU 2.0 + */ +U_STABLE UBlockCode U_EXPORT2 +ublock_getCode(UChar32 c); + +/** + * Retrieve the name of a Unicode character. + * Depending on <code>nameChoice</code>, the character name written + * into the buffer is the "modern" name or the name that was defined + * in Unicode version 1.0. + * The name contains only "invariant" characters + * like A-Z, 0-9, space, and '-'. + * Unicode 1.0 names are only retrieved if they are different from the modern + * names and if the data file contains the data for them. gennames may or may + * not be called with a command line option to include 1.0 names in unames.dat. + * + * @param code The character (code point) for which to get the name. + * It must be <code>0<=code<=0x10ffff</code>. + * @param nameChoice Selector for which name to get. + * @param buffer Destination address for copying the name. + * The name will always be zero-terminated. + * If there is no name, then the buffer will be set to the empty string. + * @param bufferLength <code>==sizeof(buffer)</code> + * @param pErrorCode Pointer to a UErrorCode variable; + * check for <code>U_SUCCESS()</code> after <code>u_charName()</code> + * returns. + * @return The length of the name, or 0 if there is no name for this character. + * If the bufferLength is less than or equal to the length, then the buffer + * contains the truncated name and the returned length indicates the full + * length of the name. + * The length does not include the zero-termination. + * + * @see UCharNameChoice + * @see u_charFromName + * @see u_enumCharNames + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_charName(UChar32 code, UCharNameChoice nameChoice, + char *buffer, int32_t bufferLength, + UErrorCode *pErrorCode); + +#ifndef U_HIDE_DEPRECATED_API +/** + * Returns an empty string. + * Used to return the ISO 10646 comment for a character. + * The Unicode ISO_Comment property is deprecated and has no values. + * + * @param c The character (code point) for which to get the ISO comment. + * It must be <code>0<=c<=0x10ffff</code>. + * @param dest Destination address for copying the comment. + * The comment will be zero-terminated if possible. + * If there is no comment, then the buffer will be set to the empty string. + * @param destCapacity <code>==sizeof(dest)</code> + * @param pErrorCode Pointer to a UErrorCode variable; + * check for <code>U_SUCCESS()</code> after <code>u_getISOComment()</code> + * returns. + * @return 0 + * + * @deprecated ICU 49 + */ +U_DEPRECATED int32_t U_EXPORT2 +u_getISOComment(UChar32 c, + char *dest, int32_t destCapacity, + UErrorCode *pErrorCode); +#endif /* U_HIDE_DEPRECATED_API */ + +/** + * Find a Unicode character by its name and return its code point value. + * The name is matched exactly and completely. + * If the name does not correspond to a code point, <i>pErrorCode</i> + * is set to <code>U_INVALID_CHAR_FOUND</code>. + * A Unicode 1.0 name is matched only if it differs from the modern name. + * Unicode names are all uppercase. Extended names are lowercase followed + * by an uppercase hexadecimal number, and within angle brackets. + * + * @param nameChoice Selector for which name to match. + * @param name The name to match. + * @param pErrorCode Pointer to a UErrorCode variable + * @return The Unicode value of the code point with the given name, + * or an undefined value if there is no such code point. + * + * @see UCharNameChoice + * @see u_charName + * @see u_enumCharNames + * @stable ICU 1.7 + */ +U_STABLE UChar32 U_EXPORT2 +u_charFromName(UCharNameChoice nameChoice, + const char *name, + UErrorCode *pErrorCode); + +/** + * Type of a callback function for u_enumCharNames() that gets called + * for each Unicode character with the code point value and + * the character name. + * If such a function returns FALSE, then the enumeration is stopped. + * + * @param context The context pointer that was passed to u_enumCharNames(). + * @param code The Unicode code point for the character with this name. + * @param nameChoice Selector for which kind of names is enumerated. + * @param name The character's name, zero-terminated. + * @param length The length of the name. + * @return TRUE if the enumeration should continue, FALSE to stop it. + * + * @see UCharNameChoice + * @see u_enumCharNames + * @stable ICU 1.7 + */ +typedef UBool U_CALLCONV UEnumCharNamesFn(void *context, + UChar32 code, + UCharNameChoice nameChoice, + const char *name, + int32_t length); + +/** + * Enumerate all assigned Unicode characters between the start and limit + * code points (start inclusive, limit exclusive) and call a function + * for each, passing the code point value and the character name. + * For Unicode 1.0 names, only those are enumerated that differ from the + * modern names. + * + * @param start The first code point in the enumeration range. + * @param limit One more than the last code point in the enumeration range + * (the first one after the range). + * @param fn The function that is to be called for each character name. + * @param context An arbitrary pointer that is passed to the function. + * @param nameChoice Selector for which kind of names to enumerate. + * @param pErrorCode Pointer to a UErrorCode variable + * + * @see UCharNameChoice + * @see UEnumCharNamesFn + * @see u_charName + * @see u_charFromName + * @stable ICU 1.7 + */ +U_STABLE void U_EXPORT2 +u_enumCharNames(UChar32 start, UChar32 limit, + UEnumCharNamesFn *fn, + void *context, + UCharNameChoice nameChoice, + UErrorCode *pErrorCode); + +/** + * Return the Unicode name for a given property, as given in the + * Unicode database file PropertyAliases.txt. + * + * In addition, this function maps the property + * UCHAR_GENERAL_CATEGORY_MASK to the synthetic names "gcm" / + * "General_Category_Mask". These names are not in + * PropertyAliases.txt. + * + * @param property UProperty selector other than UCHAR_INVALID_CODE. + * If out of range, NULL is returned. + * + * @param nameChoice selector for which name to get. If out of range, + * NULL is returned. All properties have a long name. Most + * have a short name, but some do not. Unicode allows for + * additional names; if present these will be returned by + * U_LONG_PROPERTY_NAME + i, where i=1, 2,... + * + * @return a pointer to the name, or NULL if either the + * property or the nameChoice is out of range. If a given + * nameChoice returns NULL, then all larger values of + * nameChoice will return NULL, with one exception: if NULL is + * returned for U_SHORT_PROPERTY_NAME, then + * U_LONG_PROPERTY_NAME (and higher) may still return a + * non-NULL value. The returned pointer is valid until + * u_cleanup() is called. + * + * @see UProperty + * @see UPropertyNameChoice + * @stable ICU 2.4 + */ +U_STABLE const char* U_EXPORT2 +u_getPropertyName(UProperty property, + UPropertyNameChoice nameChoice); + +/** + * Return the UProperty enum for a given property name, as specified + * in the Unicode database file PropertyAliases.txt. Short, long, and + * any other variants are recognized. + * + * In addition, this function maps the synthetic names "gcm" / + * "General_Category_Mask" to the property + * UCHAR_GENERAL_CATEGORY_MASK. These names are not in + * PropertyAliases.txt. + * + * @param alias the property name to be matched. The name is compared + * using "loose matching" as described in PropertyAliases.txt. + * + * @return a UProperty enum, or UCHAR_INVALID_CODE if the given name + * does not match any property. + * + * @see UProperty + * @stable ICU 2.4 + */ +U_STABLE UProperty U_EXPORT2 +u_getPropertyEnum(const char* alias); + +/** + * Return the Unicode name for a given property value, as given in the + * Unicode database file PropertyValueAliases.txt. + * + * Note: Some of the names in PropertyValueAliases.txt can only be + * retrieved using UCHAR_GENERAL_CATEGORY_MASK, not + * UCHAR_GENERAL_CATEGORY. These include: "C" / "Other", "L" / + * "Letter", "LC" / "Cased_Letter", "M" / "Mark", "N" / "Number", "P" + * / "Punctuation", "S" / "Symbol", and "Z" / "Separator". + * + * @param property UProperty selector constant. + * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT + * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT + * or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT. + * If out of range, NULL is returned. + * + * @param value selector for a value for the given property. If out + * of range, NULL is returned. In general, valid values range + * from 0 up to some maximum. There are a few exceptions: + * (1.) UCHAR_BLOCK values begin at the non-zero value + * UBLOCK_BASIC_LATIN. (2.) UCHAR_CANONICAL_COMBINING_CLASS + * values are not contiguous and range from 0..240. (3.) + * UCHAR_GENERAL_CATEGORY_MASK values are not values of + * UCharCategory, but rather mask values produced by + * U_GET_GC_MASK(). This allows grouped categories such as + * [:L:] to be represented. Mask values range + * non-contiguously from 1..U_GC_P_MASK. + * + * @param nameChoice selector for which name to get. If out of range, + * NULL is returned. All values have a long name. Most have + * a short name, but some do not. Unicode allows for + * additional names; if present these will be returned by + * U_LONG_PROPERTY_NAME + i, where i=1, 2,... + + * @return a pointer to the name, or NULL if either the + * property or the nameChoice is out of range. If a given + * nameChoice returns NULL, then all larger values of + * nameChoice will return NULL, with one exception: if NULL is + * returned for U_SHORT_PROPERTY_NAME, then + * U_LONG_PROPERTY_NAME (and higher) may still return a + * non-NULL value. The returned pointer is valid until + * u_cleanup() is called. + * + * @see UProperty + * @see UPropertyNameChoice + * @stable ICU 2.4 + */ +U_STABLE const char* U_EXPORT2 +u_getPropertyValueName(UProperty property, + int32_t value, + UPropertyNameChoice nameChoice); + +/** + * Return the property value integer for a given value name, as + * specified in the Unicode database file PropertyValueAliases.txt. + * Short, long, and any other variants are recognized. + * + * Note: Some of the names in PropertyValueAliases.txt will only be + * recognized with UCHAR_GENERAL_CATEGORY_MASK, not + * UCHAR_GENERAL_CATEGORY. These include: "C" / "Other", "L" / + * "Letter", "LC" / "Cased_Letter", "M" / "Mark", "N" / "Number", "P" + * / "Punctuation", "S" / "Symbol", and "Z" / "Separator". + * + * @param property UProperty selector constant. + * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT + * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT + * or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT. + * If out of range, UCHAR_INVALID_CODE is returned. + * + * @param alias the value name to be matched. The name is compared + * using "loose matching" as described in + * PropertyValueAliases.txt. + * + * @return a value integer or UCHAR_INVALID_CODE if the given name + * does not match any value of the given property, or if the + * property is invalid. Note: UCHAR_GENERAL_CATEGORY_MASK values + * are not values of UCharCategory, but rather mask values + * produced by U_GET_GC_MASK(). This allows grouped + * categories such as [:L:] to be represented. + * + * @see UProperty + * @stable ICU 2.4 + */ +U_STABLE int32_t U_EXPORT2 +u_getPropertyValueEnum(UProperty property, + const char* alias); + +/** + * Determines if the specified character is permissible as the + * first character in an identifier according to Unicode + * (The Unicode Standard, Version 3.0, chapter 5.16 Identifiers). + * True for characters with general categories "L" (letters) and "Nl" (letter numbers). + * + * Same as java.lang.Character.isUnicodeIdentifierStart(). + * Same as UCHAR_ID_START + * + * @param c the code point to be tested + * @return TRUE if the code point may start an identifier + * + * @see UCHAR_ID_START + * @see u_isalpha + * @see u_isIDPart + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +u_isIDStart(UChar32 c); + +/** + * Determines if the specified character is permissible + * in an identifier according to Java. + * True for characters with general categories "L" (letters), + * "Nl" (letter numbers), "Nd" (decimal digits), + * "Mc" and "Mn" (combining marks), "Pc" (connecting punctuation), and + * u_isIDIgnorable(c). + * + * Same as java.lang.Character.isUnicodeIdentifierPart(). + * Almost the same as Unicode's ID_Continue (UCHAR_ID_CONTINUE) + * except that Unicode recommends to ignore Cf which is less than + * u_isIDIgnorable(c). + * + * @param c the code point to be tested + * @return TRUE if the code point may occur in an identifier according to Java + * + * @see UCHAR_ID_CONTINUE + * @see u_isIDStart + * @see u_isIDIgnorable + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +u_isIDPart(UChar32 c); + +/** + * Determines if the specified character should be regarded + * as an ignorable character in an identifier, + * according to Java. + * True for characters with general category "Cf" (format controls) as well as + * non-whitespace ISO controls + * (U+0000..U+0008, U+000E..U+001B, U+007F..U+009F). + * + * Same as java.lang.Character.isIdentifierIgnorable(). + * + * Note that Unicode just recommends to ignore Cf (format controls). + * + * @param c the code point to be tested + * @return TRUE if the code point is ignorable in identifiers according to Java + * + * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT + * @see u_isIDStart + * @see u_isIDPart + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +u_isIDIgnorable(UChar32 c); + +/** + * Determines if the specified character is permissible as the + * first character in a Java identifier. + * In addition to u_isIDStart(c), true for characters with + * general categories "Sc" (currency symbols) and "Pc" (connecting punctuation). + * + * Same as java.lang.Character.isJavaIdentifierStart(). + * + * @param c the code point to be tested + * @return TRUE if the code point may start a Java identifier + * + * @see u_isJavaIDPart + * @see u_isalpha + * @see u_isIDStart + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +u_isJavaIDStart(UChar32 c); + +/** + * Determines if the specified character is permissible + * in a Java identifier. + * In addition to u_isIDPart(c), true for characters with + * general category "Sc" (currency symbols). + * + * Same as java.lang.Character.isJavaIdentifierPart(). + * + * @param c the code point to be tested + * @return TRUE if the code point may occur in a Java identifier + * + * @see u_isIDIgnorable + * @see u_isJavaIDStart + * @see u_isalpha + * @see u_isdigit + * @see u_isIDPart + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +u_isJavaIDPart(UChar32 c); + +/** + * The given character is mapped to its lowercase equivalent according to + * UnicodeData.txt; if the character has no lowercase equivalent, the character + * itself is returned. + * + * Same as java.lang.Character.toLowerCase(). + * + * This function only returns the simple, single-code point case mapping. + * Full case mappings should be used whenever possible because they produce + * better results by working on whole strings. + * They take into account the string context and the language and can map + * to a result string with a different length as appropriate. + * Full case mappings are applied by the string case mapping functions, + * see ustring.h and the UnicodeString class. + * See also the User Guide chapter on C/POSIX migration: + * http://icu-project.org/userguide/posix.html#case_mappings + * + * @param c the code point to be mapped + * @return the Simple_Lowercase_Mapping of the code point, if any; + * otherwise the code point itself. + * @stable ICU 2.0 + */ +U_STABLE UChar32 U_EXPORT2 +u_tolower(UChar32 c); + +/** + * The given character is mapped to its uppercase equivalent according to UnicodeData.txt; + * if the character has no uppercase equivalent, the character itself is + * returned. + * + * Same as java.lang.Character.toUpperCase(). + * + * This function only returns the simple, single-code point case mapping. + * Full case mappings should be used whenever possible because they produce + * better results by working on whole strings. + * They take into account the string context and the language and can map + * to a result string with a different length as appropriate. + * Full case mappings are applied by the string case mapping functions, + * see ustring.h and the UnicodeString class. + * See also the User Guide chapter on C/POSIX migration: + * http://icu-project.org/userguide/posix.html#case_mappings + * + * @param c the code point to be mapped + * @return the Simple_Uppercase_Mapping of the code point, if any; + * otherwise the code point itself. + * @stable ICU 2.0 + */ +U_STABLE UChar32 U_EXPORT2 +u_toupper(UChar32 c); + +/** + * The given character is mapped to its titlecase equivalent + * according to UnicodeData.txt; + * if none is defined, the character itself is returned. + * + * Same as java.lang.Character.toTitleCase(). + * + * This function only returns the simple, single-code point case mapping. + * Full case mappings should be used whenever possible because they produce + * better results by working on whole strings. + * They take into account the string context and the language and can map + * to a result string with a different length as appropriate. + * Full case mappings are applied by the string case mapping functions, + * see ustring.h and the UnicodeString class. + * See also the User Guide chapter on C/POSIX migration: + * http://icu-project.org/userguide/posix.html#case_mappings + * + * @param c the code point to be mapped + * @return the Simple_Titlecase_Mapping of the code point, if any; + * otherwise the code point itself. + * @stable ICU 2.0 + */ +U_STABLE UChar32 U_EXPORT2 +u_totitle(UChar32 c); + +/** + * The given character is mapped to its case folding equivalent according to + * UnicodeData.txt and CaseFolding.txt; + * if the character has no case folding equivalent, the character + * itself is returned. + * + * This function only returns the simple, single-code point case mapping. + * Full case mappings should be used whenever possible because they produce + * better results by working on whole strings. + * They take into account the string context and the language and can map + * to a result string with a different length as appropriate. + * Full case mappings are applied by the string case mapping functions, + * see ustring.h and the UnicodeString class. + * See also the User Guide chapter on C/POSIX migration: + * http://icu-project.org/userguide/posix.html#case_mappings + * + * @param c the code point to be mapped + * @param options Either U_FOLD_CASE_DEFAULT or U_FOLD_CASE_EXCLUDE_SPECIAL_I + * @return the Simple_Case_Folding of the code point, if any; + * otherwise the code point itself. + * @stable ICU 2.0 + */ +U_STABLE UChar32 U_EXPORT2 +u_foldCase(UChar32 c, uint32_t options); + +/** + * Returns the decimal digit value of the code point in the + * specified radix. + * + * If the radix is not in the range <code>2<=radix<=36</code> or if the + * value of <code>c</code> is not a valid digit in the specified + * radix, <code>-1</code> is returned. A character is a valid digit + * if at least one of the following is true: + * <ul> + * <li>The character has a decimal digit value. + * Such characters have the general category "Nd" (decimal digit numbers) + * and a Numeric_Type of Decimal. + * In this case the value is the character's decimal digit value.</li> + * <li>The character is one of the uppercase Latin letters + * <code>'A'</code> through <code>'Z'</code>. + * In this case the value is <code>c-'A'+10</code>.</li> + * <li>The character is one of the lowercase Latin letters + * <code>'a'</code> through <code>'z'</code>. + * In this case the value is <code>ch-'a'+10</code>.</li> + * <li>Latin letters from both the ASCII range (0061..007A, 0041..005A) + * as well as from the Fullwidth ASCII range (FF41..FF5A, FF21..FF3A) + * are recognized.</li> + * </ul> + * + * Same as java.lang.Character.digit(). + * + * @param ch the code point to be tested. + * @param radix the radix. + * @return the numeric value represented by the character in the + * specified radix, + * or -1 if there is no value or if the value exceeds the radix. + * + * @see UCHAR_NUMERIC_TYPE + * @see u_forDigit + * @see u_charDigitValue + * @see u_isdigit + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_digit(UChar32 ch, int8_t radix); + +/** + * Determines the character representation for a specific digit in + * the specified radix. If the value of <code>radix</code> is not a + * valid radix, or the value of <code>digit</code> is not a valid + * digit in the specified radix, the null character + * (<code>U+0000</code>) is returned. + * <p> + * The <code>radix</code> argument is valid if it is greater than or + * equal to 2 and less than or equal to 36. + * The <code>digit</code> argument is valid if + * <code>0 <= digit < radix</code>. + * <p> + * If the digit is less than 10, then + * <code>'0' + digit</code> is returned. Otherwise, the value + * <code>'a' + digit - 10</code> is returned. + * + * Same as java.lang.Character.forDigit(). + * + * @param digit the number to convert to a character. + * @param radix the radix. + * @return the <code>char</code> representation of the specified digit + * in the specified radix. + * + * @see u_digit + * @see u_charDigitValue + * @see u_isdigit + * @stable ICU 2.0 + */ +U_STABLE UChar32 U_EXPORT2 +u_forDigit(int32_t digit, int8_t radix); + +/** + * Get the "age" of the code point. + * The "age" is the Unicode version when the code point was first + * designated (as a non-character or for Private Use) + * or assigned a character. + * This can be useful to avoid emitting code points to receiving + * processes that do not accept newer characters. + * The data is from the UCD file DerivedAge.txt. + * + * @param c The code point. + * @param versionArray The Unicode version number array, to be filled in. + * + * @stable ICU 2.1 + */ +U_STABLE void U_EXPORT2 +u_charAge(UChar32 c, UVersionInfo versionArray); + +/** + * Gets the Unicode version information. + * The version array is filled in with the version information + * for the Unicode standard that is currently used by ICU. + * For example, Unicode version 3.1.1 is represented as an array with + * the values { 3, 1, 1, 0 }. + * + * @param versionArray an output array that will be filled in with + * the Unicode version number + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +u_getUnicodeVersion(UVersionInfo versionArray); + +#if !UCONFIG_NO_NORMALIZATION +/** + * Get the FC_NFKC_Closure property string for a character. + * See Unicode Standard Annex #15 for details, search for "FC_NFKC_Closure" + * or for "FNC": http://www.unicode.org/reports/tr15/ + * + * @param c The character (code point) for which to get the FC_NFKC_Closure string. + * It must be <code>0<=c<=0x10ffff</code>. + * @param dest Destination address for copying the string. + * The string will be zero-terminated if possible. + * If there is no FC_NFKC_Closure string, + * then the buffer will be set to the empty string. + * @param destCapacity <code>==sizeof(dest)</code> + * @param pErrorCode Pointer to a UErrorCode variable. + * @return The length of the string, or 0 if there is no FC_NFKC_Closure string for this character. + * If the destCapacity is less than or equal to the length, then the buffer + * contains the truncated name and the returned length indicates the full + * length of the name. + * The length does not include the zero-termination. + * + * @stable ICU 2.2 + */ +U_STABLE int32_t U_EXPORT2 +u_getFC_NFKC_Closure(UChar32 c, UChar *dest, int32_t destCapacity, UErrorCode *pErrorCode); + +#endif + + +U_CDECL_END + +#endif /*_UCHAR*/ +/*eof*/ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucharstrie.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucharstrie.h new file mode 100755 index 00000000..dfc93f6d --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucharstrie.h @@ -0,0 +1,578 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2010-2012, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************* +* file name: ucharstrie.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2010nov14 +* created by: Markus W. Scherer +*/ + +#ifndef __UCHARSTRIE_H__ +#define __UCHARSTRIE_H__ + +/** + * \file + * \brief C++ API: Trie for mapping Unicode strings (or 16-bit-unit sequences) + * to integer values. + */ + +#include "unicode/utypes.h" +#include "unicode/unistr.h" +#include "unicode/uobject.h" +#include "unicode/ustringtrie.h" + +U_NAMESPACE_BEGIN + +class Appendable; +class UCharsTrieBuilder; +class UVector32; + +/** + * Light-weight, non-const reader class for a UCharsTrie. + * Traverses a char16_t-serialized data structure with minimal state, + * for mapping strings (16-bit-unit sequences) to non-negative integer values. + * + * This class owns the serialized trie data only if it was constructed by + * the builder's build() method. + * The public constructor and the copy constructor only alias the data (only copy the pointer). + * There is no assignment operator. + * + * This class is not intended for public subclassing. + * @stable ICU 4.8 + */ +class U_COMMON_API UCharsTrie : public UMemory { +public: + /** + * Constructs a UCharsTrie reader instance. + * + * The trieUChars must contain a copy of a char16_t sequence from the UCharsTrieBuilder, + * starting with the first char16_t of that sequence. + * The UCharsTrie object will not read more char16_ts than + * the UCharsTrieBuilder generated in the corresponding build() call. + * + * The array is not copied/cloned and must not be modified while + * the UCharsTrie object is in use. + * + * @param trieUChars The char16_t array that contains the serialized trie. + * @stable ICU 4.8 + */ + UCharsTrie(ConstChar16Ptr trieUChars) + : ownedArray_(NULL), uchars_(trieUChars), + pos_(uchars_), remainingMatchLength_(-1) {} + + /** + * Destructor. + * @stable ICU 4.8 + */ + ~UCharsTrie(); + + /** + * Copy constructor, copies the other trie reader object and its state, + * but not the char16_t array which will be shared. (Shallow copy.) + * @param other Another UCharsTrie object. + * @stable ICU 4.8 + */ + UCharsTrie(const UCharsTrie &other) + : ownedArray_(NULL), uchars_(other.uchars_), + pos_(other.pos_), remainingMatchLength_(other.remainingMatchLength_) {} + + /** + * Resets this trie to its initial state. + * @return *this + * @stable ICU 4.8 + */ + UCharsTrie &reset() { + pos_=uchars_; + remainingMatchLength_=-1; + return *this; + } + + /** + * UCharsTrie state object, for saving a trie's current state + * and resetting the trie back to this state later. + * @stable ICU 4.8 + */ + class State : public UMemory { + public: + /** + * Constructs an empty State. + * @stable ICU 4.8 + */ + State() { uchars=NULL; } + private: + friend class UCharsTrie; + + const char16_t *uchars; + const char16_t *pos; + int32_t remainingMatchLength; + }; + + /** + * Saves the state of this trie. + * @param state The State object to hold the trie's state. + * @return *this + * @see resetToState + * @stable ICU 4.8 + */ + const UCharsTrie &saveState(State &state) const { + state.uchars=uchars_; + state.pos=pos_; + state.remainingMatchLength=remainingMatchLength_; + return *this; + } + + /** + * Resets this trie to the saved state. + * If the state object contains no state, or the state of a different trie, + * then this trie remains unchanged. + * @param state The State object which holds a saved trie state. + * @return *this + * @see saveState + * @see reset + * @stable ICU 4.8 + */ + UCharsTrie &resetToState(const State &state) { + if(uchars_==state.uchars && uchars_!=NULL) { + pos_=state.pos; + remainingMatchLength_=state.remainingMatchLength; + } + return *this; + } + + /** + * Determines whether the string so far matches, whether it has a value, + * and whether another input char16_t can continue a matching string. + * @return The match/value Result. + * @stable ICU 4.8 + */ + UStringTrieResult current() const; + + /** + * Traverses the trie from the initial state for this input char16_t. + * Equivalent to reset().next(uchar). + * @param uchar Input char value. Values below 0 and above 0xffff will never match. + * @return The match/value Result. + * @stable ICU 4.8 + */ + inline UStringTrieResult first(int32_t uchar) { + remainingMatchLength_=-1; + return nextImpl(uchars_, uchar); + } + + /** + * Traverses the trie from the initial state for the + * one or two UTF-16 code units for this input code point. + * Equivalent to reset().nextForCodePoint(cp). + * @param cp A Unicode code point 0..0x10ffff. + * @return The match/value Result. + * @stable ICU 4.8 + */ + UStringTrieResult firstForCodePoint(UChar32 cp); + + /** + * Traverses the trie from the current state for this input char16_t. + * @param uchar Input char value. Values below 0 and above 0xffff will never match. + * @return The match/value Result. + * @stable ICU 4.8 + */ + UStringTrieResult next(int32_t uchar); + + /** + * Traverses the trie from the current state for the + * one or two UTF-16 code units for this input code point. + * @param cp A Unicode code point 0..0x10ffff. + * @return The match/value Result. + * @stable ICU 4.8 + */ + UStringTrieResult nextForCodePoint(UChar32 cp); + + /** + * Traverses the trie from the current state for this string. + * Equivalent to + * \code + * Result result=current(); + * for(each c in s) + * if(!USTRINGTRIE_HAS_NEXT(result)) return USTRINGTRIE_NO_MATCH; + * result=next(c); + * return result; + * \endcode + * @param s A string. Can be NULL if length is 0. + * @param length The length of the string. Can be -1 if NUL-terminated. + * @return The match/value Result. + * @stable ICU 4.8 + */ + UStringTrieResult next(ConstChar16Ptr s, int32_t length); + + /** + * Returns a matching string's value if called immediately after + * current()/first()/next() returned USTRINGTRIE_INTERMEDIATE_VALUE or USTRINGTRIE_FINAL_VALUE. + * getValue() can be called multiple times. + * + * Do not call getValue() after USTRINGTRIE_NO_MATCH or USTRINGTRIE_NO_VALUE! + * @return The value for the string so far. + * @stable ICU 4.8 + */ + inline int32_t getValue() const { + const char16_t *pos=pos_; + int32_t leadUnit=*pos++; + // U_ASSERT(leadUnit>=kMinValueLead); + return leadUnit&kValueIsFinal ? + readValue(pos, leadUnit&0x7fff) : readNodeValue(pos, leadUnit); + } + + /** + * Determines whether all strings reachable from the current state + * map to the same value. + * @param uniqueValue Receives the unique value, if this function returns TRUE. + * (output-only) + * @return TRUE if all strings reachable from the current state + * map to the same value. + * @stable ICU 4.8 + */ + inline UBool hasUniqueValue(int32_t &uniqueValue) const { + const char16_t *pos=pos_; + // Skip the rest of a pending linear-match node. + return pos!=NULL && findUniqueValue(pos+remainingMatchLength_+1, FALSE, uniqueValue); + } + + /** + * Finds each char16_t which continues the string from the current state. + * That is, each char16_t c for which it would be next(c)!=USTRINGTRIE_NO_MATCH now. + * @param out Each next char16_t is appended to this object. + * @return the number of char16_ts which continue the string from here + * @stable ICU 4.8 + */ + int32_t getNextUChars(Appendable &out) const; + + /** + * Iterator for all of the (string, value) pairs in a UCharsTrie. + * @stable ICU 4.8 + */ + class U_COMMON_API Iterator : public UMemory { + public: + /** + * Iterates from the root of a char16_t-serialized UCharsTrie. + * @param trieUChars The trie char16_ts. + * @param maxStringLength If 0, the iterator returns full strings. + * Otherwise, the iterator returns strings with this maximum length. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @stable ICU 4.8 + */ + Iterator(ConstChar16Ptr trieUChars, int32_t maxStringLength, UErrorCode &errorCode); + + /** + * Iterates from the current state of the specified UCharsTrie. + * @param trie The trie whose state will be copied for iteration. + * @param maxStringLength If 0, the iterator returns full strings. + * Otherwise, the iterator returns strings with this maximum length. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @stable ICU 4.8 + */ + Iterator(const UCharsTrie &trie, int32_t maxStringLength, UErrorCode &errorCode); + + /** + * Destructor. + * @stable ICU 4.8 + */ + ~Iterator(); + + /** + * Resets this iterator to its initial state. + * @return *this + * @stable ICU 4.8 + */ + Iterator &reset(); + + /** + * @return TRUE if there are more elements. + * @stable ICU 4.8 + */ + UBool hasNext() const; + + /** + * Finds the next (string, value) pair if there is one. + * + * If the string is truncated to the maximum length and does not + * have a real value, then the value is set to -1. + * In this case, this "not a real value" is indistinguishable from + * a real value of -1. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return TRUE if there is another element. + * @stable ICU 4.8 + */ + UBool next(UErrorCode &errorCode); + + /** + * @return The string for the last successful next(). + * @stable ICU 4.8 + */ + const UnicodeString &getString() const { return str_; } + /** + * @return The value for the last successful next(). + * @stable ICU 4.8 + */ + int32_t getValue() const { return value_; } + + private: + UBool truncateAndStop() { + pos_=NULL; + value_=-1; // no real value for str + return TRUE; + } + + const char16_t *branchNext(const char16_t *pos, int32_t length, UErrorCode &errorCode); + + const char16_t *uchars_; + const char16_t *pos_; + const char16_t *initialPos_; + int32_t remainingMatchLength_; + int32_t initialRemainingMatchLength_; + UBool skipValue_; // Skip intermediate value which was already delivered. + + UnicodeString str_; + int32_t maxLength_; + int32_t value_; + + // The stack stores pairs of integers for backtracking to another + // outbound edge of a branch node. + // The first integer is an offset from uchars_. + // The second integer has the str_.length() from before the node in bits 15..0, + // and the remaining branch length in bits 31..16. + // (We could store the remaining branch length minus 1 in bits 30..16 and not use the sign bit, + // but the code looks more confusing that way.) + UVector32 *stack_; + }; + +private: + friend class UCharsTrieBuilder; + + /** + * Constructs a UCharsTrie reader instance. + * Unlike the public constructor which just aliases an array, + * this constructor adopts the builder's array. + * This constructor is only called by the builder. + */ + UCharsTrie(char16_t *adoptUChars, const char16_t *trieUChars) + : ownedArray_(adoptUChars), uchars_(trieUChars), + pos_(uchars_), remainingMatchLength_(-1) {} + + // No assignment operator. + UCharsTrie &operator=(const UCharsTrie &other); + + inline void stop() { + pos_=NULL; + } + + // Reads a compact 32-bit integer. + // pos is already after the leadUnit, and the lead unit has bit 15 reset. + static inline int32_t readValue(const char16_t *pos, int32_t leadUnit) { + int32_t value; + if(leadUnit<kMinTwoUnitValueLead) { + value=leadUnit; + } else if(leadUnit<kThreeUnitValueLead) { + value=((leadUnit-kMinTwoUnitValueLead)<<16)|*pos; + } else { + value=(pos[0]<<16)|pos[1]; + } + return value; + } + static inline const char16_t *skipValue(const char16_t *pos, int32_t leadUnit) { + if(leadUnit>=kMinTwoUnitValueLead) { + if(leadUnit<kThreeUnitValueLead) { + ++pos; + } else { + pos+=2; + } + } + return pos; + } + static inline const char16_t *skipValue(const char16_t *pos) { + int32_t leadUnit=*pos++; + return skipValue(pos, leadUnit&0x7fff); + } + + static inline int32_t readNodeValue(const char16_t *pos, int32_t leadUnit) { + // U_ASSERT(kMinValueLead<=leadUnit && leadUnit<kValueIsFinal); + int32_t value; + if(leadUnit<kMinTwoUnitNodeValueLead) { + value=(leadUnit>>6)-1; + } else if(leadUnit<kThreeUnitNodeValueLead) { + value=(((leadUnit&0x7fc0)-kMinTwoUnitNodeValueLead)<<10)|*pos; + } else { + value=(pos[0]<<16)|pos[1]; + } + return value; + } + static inline const char16_t *skipNodeValue(const char16_t *pos, int32_t leadUnit) { + // U_ASSERT(kMinValueLead<=leadUnit && leadUnit<kValueIsFinal); + if(leadUnit>=kMinTwoUnitNodeValueLead) { + if(leadUnit<kThreeUnitNodeValueLead) { + ++pos; + } else { + pos+=2; + } + } + return pos; + } + + static inline const char16_t *jumpByDelta(const char16_t *pos) { + int32_t delta=*pos++; + if(delta>=kMinTwoUnitDeltaLead) { + if(delta==kThreeUnitDeltaLead) { + delta=(pos[0]<<16)|pos[1]; + pos+=2; + } else { + delta=((delta-kMinTwoUnitDeltaLead)<<16)|*pos++; + } + } + return pos+delta; + } + + static const char16_t *skipDelta(const char16_t *pos) { + int32_t delta=*pos++; + if(delta>=kMinTwoUnitDeltaLead) { + if(delta==kThreeUnitDeltaLead) { + pos+=2; + } else { + ++pos; + } + } + return pos; + } + + static inline UStringTrieResult valueResult(int32_t node) { + return (UStringTrieResult)(USTRINGTRIE_INTERMEDIATE_VALUE-(node>>15)); + } + + // Handles a branch node for both next(uchar) and next(string). + UStringTrieResult branchNext(const char16_t *pos, int32_t length, int32_t uchar); + + // Requires remainingLength_<0. + UStringTrieResult nextImpl(const char16_t *pos, int32_t uchar); + + // Helper functions for hasUniqueValue(). + // Recursively finds a unique value (or whether there is not a unique one) + // from a branch. + static const char16_t *findUniqueValueFromBranch(const char16_t *pos, int32_t length, + UBool haveUniqueValue, int32_t &uniqueValue); + // Recursively finds a unique value (or whether there is not a unique one) + // starting from a position on a node lead unit. + static UBool findUniqueValue(const char16_t *pos, UBool haveUniqueValue, int32_t &uniqueValue); + + // Helper functions for getNextUChars(). + // getNextUChars() when pos is on a branch node. + static void getNextBranchUChars(const char16_t *pos, int32_t length, Appendable &out); + + // UCharsTrie data structure + // + // The trie consists of a series of char16_t-serialized nodes for incremental + // Unicode string/char16_t sequence matching. (char16_t=16-bit unsigned integer) + // The root node is at the beginning of the trie data. + // + // Types of nodes are distinguished by their node lead unit ranges. + // After each node, except a final-value node, another node follows to + // encode match values or continue matching further units. + // + // Node types: + // - Final-value node: Stores a 32-bit integer in a compact, variable-length format. + // The value is for the string/char16_t sequence so far. + // - Match node, optionally with an intermediate value in a different compact format. + // The value, if present, is for the string/char16_t sequence so far. + // + // Aside from the value, which uses the node lead unit's high bits: + // + // - Linear-match node: Matches a number of units. + // - Branch node: Branches to other nodes according to the current input unit. + // The node unit is the length of the branch (number of units to select from) + // minus 1. It is followed by a sub-node: + // - If the length is at most kMaxBranchLinearSubNodeLength, then + // there are length-1 (key, value) pairs and then one more comparison unit. + // If one of the key units matches, then the value is either a final value for + // the string so far, or a "jump" delta to the next node. + // If the last unit matches, then matching continues with the next node. + // (Values have the same encoding as final-value nodes.) + // - If the length is greater than kMaxBranchLinearSubNodeLength, then + // there is one unit and one "jump" delta. + // If the input unit is less than the sub-node unit, then "jump" by delta to + // the next sub-node which will have a length of length/2. + // (The delta has its own compact encoding.) + // Otherwise, skip the "jump" delta to the next sub-node + // which will have a length of length-length/2. + + // Match-node lead unit values, after masking off intermediate-value bits: + + // 0000..002f: Branch node. If node!=0 then the length is node+1, otherwise + // the length is one more than the next unit. + + // For a branch sub-node with at most this many entries, we drop down + // to a linear search. + static const int32_t kMaxBranchLinearSubNodeLength=5; + + // 0030..003f: Linear-match node, match 1..16 units and continue reading the next node. + static const int32_t kMinLinearMatch=0x30; + static const int32_t kMaxLinearMatchLength=0x10; + + // Match-node lead unit bits 14..6 for the optional intermediate value. + // If these bits are 0, then there is no intermediate value. + // Otherwise, see the *NodeValue* constants below. + static const int32_t kMinValueLead=kMinLinearMatch+kMaxLinearMatchLength; // 0x0040 + static const int32_t kNodeTypeMask=kMinValueLead-1; // 0x003f + + // A final-value node has bit 15 set. + static const int32_t kValueIsFinal=0x8000; + + // Compact value: After testing and masking off bit 15, use the following thresholds. + static const int32_t kMaxOneUnitValue=0x3fff; + + static const int32_t kMinTwoUnitValueLead=kMaxOneUnitValue+1; // 0x4000 + static const int32_t kThreeUnitValueLead=0x7fff; + + static const int32_t kMaxTwoUnitValue=((kThreeUnitValueLead-kMinTwoUnitValueLead)<<16)-1; // 0x3ffeffff + + // Compact intermediate-value integer, lead unit shared with a branch or linear-match node. + static const int32_t kMaxOneUnitNodeValue=0xff; + static const int32_t kMinTwoUnitNodeValueLead=kMinValueLead+((kMaxOneUnitNodeValue+1)<<6); // 0x4040 + static const int32_t kThreeUnitNodeValueLead=0x7fc0; + + static const int32_t kMaxTwoUnitNodeValue= + ((kThreeUnitNodeValueLead-kMinTwoUnitNodeValueLead)<<10)-1; // 0xfdffff + + // Compact delta integers. + static const int32_t kMaxOneUnitDelta=0xfbff; + static const int32_t kMinTwoUnitDeltaLead=kMaxOneUnitDelta+1; // 0xfc00 + static const int32_t kThreeUnitDeltaLead=0xffff; + + static const int32_t kMaxTwoUnitDelta=((kThreeUnitDeltaLead-kMinTwoUnitDeltaLead)<<16)-1; // 0x03feffff + + char16_t *ownedArray_; + + // Fixed value referencing the UCharsTrie words. + const char16_t *uchars_; + + // Iterator variables. + + // Pointer to next trie unit to read. NULL if no more matches. + const char16_t *pos_; + // Remaining length of a linear-match node, minus 1. Negative if not in such a node. + int32_t remainingMatchLength_; +}; + +U_NAMESPACE_END + +#endif // __UCHARSTRIE_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucharstriebuilder.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucharstriebuilder.h new file mode 100755 index 00000000..2aa4757e --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucharstriebuilder.h @@ -0,0 +1,187 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2010-2016, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************* +* file name: ucharstriebuilder.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2010nov14 +* created by: Markus W. Scherer +*/ + +#ifndef __UCHARSTRIEBUILDER_H__ +#define __UCHARSTRIEBUILDER_H__ + +#include "unicode/utypes.h" +#include "unicode/stringtriebuilder.h" +#include "unicode/ucharstrie.h" +#include "unicode/unistr.h" + +/** + * \file + * \brief C++ API: Builder for icu::UCharsTrie + */ + +U_NAMESPACE_BEGIN + +class UCharsTrieElement; + +/** + * Builder class for UCharsTrie. + * + * This class is not intended for public subclassing. + * @stable ICU 4.8 + */ +class U_COMMON_API UCharsTrieBuilder : public StringTrieBuilder { +public: + /** + * Constructs an empty builder. + * @param errorCode Standard ICU error code. + * @stable ICU 4.8 + */ + UCharsTrieBuilder(UErrorCode &errorCode); + + /** + * Destructor. + * @stable ICU 4.8 + */ + virtual ~UCharsTrieBuilder(); + + /** + * Adds a (string, value) pair. + * The string must be unique. + * The string contents will be copied; the builder does not keep + * a reference to the input UnicodeString or its buffer. + * @param s The input string. + * @param value The value associated with this string. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return *this + * @stable ICU 4.8 + */ + UCharsTrieBuilder &add(const UnicodeString &s, int32_t value, UErrorCode &errorCode); + + /** + * Builds a UCharsTrie for the add()ed data. + * Once built, no further data can be add()ed until clear() is called. + * + * A UCharsTrie cannot be empty. At least one (string, value) pair + * must have been add()ed. + * + * This method passes ownership of the builder's internal result array to the new trie object. + * Another call to any build() variant will re-serialize the trie. + * After clear() has been called, a new array will be used as well. + * @param buildOption Build option, see UStringTrieBuildOption. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return A new UCharsTrie for the add()ed data. + * @stable ICU 4.8 + */ + UCharsTrie *build(UStringTrieBuildOption buildOption, UErrorCode &errorCode); + + /** + * Builds a UCharsTrie for the add()ed data and char16_t-serializes it. + * Once built, no further data can be add()ed until clear() is called. + * + * A UCharsTrie cannot be empty. At least one (string, value) pair + * must have been add()ed. + * + * Multiple calls to buildUnicodeString() set the UnicodeStrings to the + * builder's same char16_t array, without rebuilding. + * If buildUnicodeString() is called after build(), the trie will be + * re-serialized into a new array. + * If build() is called after buildUnicodeString(), the trie object will become + * the owner of the previously returned array. + * After clear() has been called, a new array will be used as well. + * @param buildOption Build option, see UStringTrieBuildOption. + * @param result A UnicodeString which will be set to the char16_t-serialized + * UCharsTrie for the add()ed data. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return result + * @stable ICU 4.8 + */ + UnicodeString &buildUnicodeString(UStringTrieBuildOption buildOption, UnicodeString &result, + UErrorCode &errorCode); + + /** + * Removes all (string, value) pairs. + * New data can then be add()ed and a new trie can be built. + * @return *this + * @stable ICU 4.8 + */ + UCharsTrieBuilder &clear() { + strings.remove(); + elementsLength=0; + ucharsLength=0; + return *this; + } + +private: + UCharsTrieBuilder(const UCharsTrieBuilder &other); // no copy constructor + UCharsTrieBuilder &operator=(const UCharsTrieBuilder &other); // no assignment operator + + void buildUChars(UStringTrieBuildOption buildOption, UErrorCode &errorCode); + + virtual int32_t getElementStringLength(int32_t i) const; + virtual char16_t getElementUnit(int32_t i, int32_t unitIndex) const; + virtual int32_t getElementValue(int32_t i) const; + + virtual int32_t getLimitOfLinearMatch(int32_t first, int32_t last, int32_t unitIndex) const; + + virtual int32_t countElementUnits(int32_t start, int32_t limit, int32_t unitIndex) const; + virtual int32_t skipElementsBySomeUnits(int32_t i, int32_t unitIndex, int32_t count) const; + virtual int32_t indexOfElementWithNextUnit(int32_t i, int32_t unitIndex, char16_t unit) const; + + virtual UBool matchNodesCanHaveValues() const { return TRUE; } + + virtual int32_t getMaxBranchLinearSubNodeLength() const { return UCharsTrie::kMaxBranchLinearSubNodeLength; } + virtual int32_t getMinLinearMatch() const { return UCharsTrie::kMinLinearMatch; } + virtual int32_t getMaxLinearMatchLength() const { return UCharsTrie::kMaxLinearMatchLength; } + + class UCTLinearMatchNode : public LinearMatchNode { + public: + UCTLinearMatchNode(const char16_t *units, int32_t len, Node *nextNode); + virtual UBool operator==(const Node &other) const; + virtual void write(StringTrieBuilder &builder); + private: + const char16_t *s; + }; + + virtual Node *createLinearMatchNode(int32_t i, int32_t unitIndex, int32_t length, + Node *nextNode) const; + + UBool ensureCapacity(int32_t length); + virtual int32_t write(int32_t unit); + int32_t write(const char16_t *s, int32_t length); + virtual int32_t writeElementUnits(int32_t i, int32_t unitIndex, int32_t length); + virtual int32_t writeValueAndFinal(int32_t i, UBool isFinal); + virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_t node); + virtual int32_t writeDeltaTo(int32_t jumpTarget); + + UnicodeString strings; + UCharsTrieElement *elements; + int32_t elementsCapacity; + int32_t elementsLength; + + // char16_t serialization of the trie. + // Grows from the back: ucharsLength measures from the end of the buffer! + char16_t *uchars; + int32_t ucharsCapacity; + int32_t ucharsLength; +}; + +U_NAMESPACE_END + +#endif // __UCHARSTRIEBUILDER_H__ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uchriter.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uchriter.h new file mode 100755 index 00000000..efcd263f --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uchriter.h @@ -0,0 +1,387 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 1998-2005, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +*/ + +#ifndef UCHRITER_H +#define UCHRITER_H + +#include "unicode/utypes.h" +#include "unicode/chariter.h" + +/** + * \file + * \brief C++ API: char16_t Character Iterator + */ + +U_NAMESPACE_BEGIN + +/** + * A concrete subclass of CharacterIterator that iterates over the + * characters (code units or code points) in a char16_t array. + * It's possible not only to create an + * iterator that iterates over an entire char16_t array, but also to + * create one that iterates over only a subrange of a char16_t array + * (iterators over different subranges of the same char16_t array don't + * compare equal). + * @see CharacterIterator + * @see ForwardCharacterIterator + * @stable ICU 2.0 + */ +class U_COMMON_API UCharCharacterIterator : public CharacterIterator { +public: + /** + * Create an iterator over the char16_t array referred to by "textPtr". + * The iteration range is 0 to <code>length-1</code>. + * text is only aliased, not adopted (the + * destructor will not delete it). + * @param textPtr The char16_t array to be iterated over + * @param length The length of the char16_t array + * @stable ICU 2.0 + */ + UCharCharacterIterator(ConstChar16Ptr textPtr, int32_t length); + + /** + * Create an iterator over the char16_t array referred to by "textPtr". + * The iteration range is 0 to <code>length-1</code>. + * text is only aliased, not adopted (the + * destructor will not delete it). + * The starting + * position is specified by "position". If "position" is outside the valid + * iteration range, the behavior of this object is undefined. + * @param textPtr The char16_t array to be iteratd over + * @param length The length of the char16_t array + * @param position The starting position of the iteration + * @stable ICU 2.0 + */ + UCharCharacterIterator(ConstChar16Ptr textPtr, int32_t length, + int32_t position); + + /** + * Create an iterator over the char16_t array referred to by "textPtr". + * The iteration range is 0 to <code>end-1</code>. + * text is only aliased, not adopted (the + * destructor will not delete it). + * The starting + * position is specified by "position". If begin and end do not + * form a valid iteration range or "position" is outside the valid + * iteration range, the behavior of this object is undefined. + * @param textPtr The char16_t array to be iterated over + * @param length The length of the char16_t array + * @param textBegin The begin position of the iteration range + * @param textEnd The end position of the iteration range + * @param position The starting position of the iteration + * @stable ICU 2.0 + */ + UCharCharacterIterator(ConstChar16Ptr textPtr, int32_t length, + int32_t textBegin, + int32_t textEnd, + int32_t position); + + /** + * Copy constructor. The new iterator iterates over the same range + * of the same string as "that", and its initial position is the + * same as "that"'s current position. + * @param that The UCharCharacterIterator to be copied + * @stable ICU 2.0 + */ + UCharCharacterIterator(const UCharCharacterIterator& that); + + /** + * Destructor. + * @stable ICU 2.0 + */ + virtual ~UCharCharacterIterator(); + + /** + * Assignment operator. *this is altered to iterate over the sane + * range of the same string as "that", and refers to the same + * character within that string as "that" does. + * @param that The object to be copied + * @return the newly created object + * @stable ICU 2.0 + */ + UCharCharacterIterator& + operator=(const UCharCharacterIterator& that); + + /** + * Returns true if the iterators iterate over the same range of the + * same string and are pointing at the same character. + * @param that The ForwardCharacterIterator used to be compared for equality + * @return true if the iterators iterate over the same range of the + * same string and are pointing at the same character. + * @stable ICU 2.0 + */ + virtual UBool operator==(const ForwardCharacterIterator& that) const; + + /** + * Generates a hash code for this iterator. + * @return the hash code. + * @stable ICU 2.0 + */ + virtual int32_t hashCode(void) const; + + /** + * Returns a new UCharCharacterIterator referring to the same + * character in the same range of the same string as this one. The + * caller must delete the new iterator. + * @return the CharacterIterator newly created + * @stable ICU 2.0 + */ + virtual CharacterIterator* clone(void) const; + + /** + * Sets the iterator to refer to the first code unit in its + * iteration range, and returns that code unit. + * This can be used to begin an iteration with next(). + * @return the first code unit in its iteration range. + * @stable ICU 2.0 + */ + virtual char16_t first(void); + + /** + * Sets the iterator to refer to the first code unit in its + * iteration range, returns that code unit, and moves the position + * to the second code unit. This is an alternative to setToStart() + * for forward iteration with nextPostInc(). + * @return the first code unit in its iteration range + * @stable ICU 2.0 + */ + virtual char16_t firstPostInc(void); + + /** + * Sets the iterator to refer to the first code point in its + * iteration range, and returns that code unit, + * This can be used to begin an iteration with next32(). + * Note that an iteration with next32PostInc(), beginning with, + * e.g., setToStart() or firstPostInc(), is more efficient. + * @return the first code point in its iteration range + * @stable ICU 2.0 + */ + virtual UChar32 first32(void); + + /** + * Sets the iterator to refer to the first code point in its + * iteration range, returns that code point, and moves the position + * to the second code point. This is an alternative to setToStart() + * for forward iteration with next32PostInc(). + * @return the first code point in its iteration range. + * @stable ICU 2.0 + */ + virtual UChar32 first32PostInc(void); + + /** + * Sets the iterator to refer to the last code unit in its + * iteration range, and returns that code unit. + * This can be used to begin an iteration with previous(). + * @return the last code unit in its iteration range. + * @stable ICU 2.0 + */ + virtual char16_t last(void); + + /** + * Sets the iterator to refer to the last code point in its + * iteration range, and returns that code unit. + * This can be used to begin an iteration with previous32(). + * @return the last code point in its iteration range. + * @stable ICU 2.0 + */ + virtual UChar32 last32(void); + + /** + * Sets the iterator to refer to the "position"-th code unit + * in the text-storage object the iterator refers to, and + * returns that code unit. + * @param position the position within the text-storage object + * @return the code unit + * @stable ICU 2.0 + */ + virtual char16_t setIndex(int32_t position); + + /** + * Sets the iterator to refer to the beginning of the code point + * that contains the "position"-th code unit + * in the text-storage object the iterator refers to, and + * returns that code point. + * The current position is adjusted to the beginning of the code point + * (its first code unit). + * @param position the position within the text-storage object + * @return the code unit + * @stable ICU 2.0 + */ + virtual UChar32 setIndex32(int32_t position); + + /** + * Returns the code unit the iterator currently refers to. + * @return the code unit the iterator currently refers to. + * @stable ICU 2.0 + */ + virtual char16_t current(void) const; + + /** + * Returns the code point the iterator currently refers to. + * @return the code point the iterator currently refers to. + * @stable ICU 2.0 + */ + virtual UChar32 current32(void) const; + + /** + * Advances to the next code unit in the iteration range (toward + * endIndex()), and returns that code unit. If there are no more + * code units to return, returns DONE. + * @return the next code unit in the iteration range. + * @stable ICU 2.0 + */ + virtual char16_t next(void); + + /** + * Gets the current code unit for returning and advances to the next code unit + * in the iteration range + * (toward endIndex()). If there are + * no more code units to return, returns DONE. + * @return the current code unit. + * @stable ICU 2.0 + */ + virtual char16_t nextPostInc(void); + + /** + * Advances to the next code point in the iteration range (toward + * endIndex()), and returns that code point. If there are no more + * code points to return, returns DONE. + * Note that iteration with "pre-increment" semantics is less + * efficient than iteration with "post-increment" semantics + * that is provided by next32PostInc(). + * @return the next code point in the iteration range. + * @stable ICU 2.0 + */ + virtual UChar32 next32(void); + + /** + * Gets the current code point for returning and advances to the next code point + * in the iteration range + * (toward endIndex()). If there are + * no more code points to return, returns DONE. + * @return the current point. + * @stable ICU 2.0 + */ + virtual UChar32 next32PostInc(void); + + /** + * Returns FALSE if there are no more code units or code points + * at or after the current position in the iteration range. + * This is used with nextPostInc() or next32PostInc() in forward + * iteration. + * @return FALSE if there are no more code units or code points + * at or after the current position in the iteration range. + * @stable ICU 2.0 + */ + virtual UBool hasNext(); + + /** + * Advances to the previous code unit in the iteration range (toward + * startIndex()), and returns that code unit. If there are no more + * code units to return, returns DONE. + * @return the previous code unit in the iteration range. + * @stable ICU 2.0 + */ + virtual char16_t previous(void); + + /** + * Advances to the previous code point in the iteration range (toward + * startIndex()), and returns that code point. If there are no more + * code points to return, returns DONE. + * @return the previous code point in the iteration range. + * @stable ICU 2.0 + */ + virtual UChar32 previous32(void); + + /** + * Returns FALSE if there are no more code units or code points + * before the current position in the iteration range. + * This is used with previous() or previous32() in backward + * iteration. + * @return FALSE if there are no more code units or code points + * before the current position in the iteration range. + * @stable ICU 2.0 + */ + virtual UBool hasPrevious(); + + /** + * Moves the current position relative to the start or end of the + * iteration range, or relative to the current position itself. + * The movement is expressed in numbers of code units forward + * or backward by specifying a positive or negative delta. + * @param delta the position relative to origin. A positive delta means forward; + * a negative delta means backward. + * @param origin Origin enumeration {kStart, kCurrent, kEnd} + * @return the new position + * @stable ICU 2.0 + */ + virtual int32_t move(int32_t delta, EOrigin origin); + + /** + * Moves the current position relative to the start or end of the + * iteration range, or relative to the current position itself. + * The movement is expressed in numbers of code points forward + * or backward by specifying a positive or negative delta. + * @param delta the position relative to origin. A positive delta means forward; + * a negative delta means backward. + * @param origin Origin enumeration {kStart, kCurrent, kEnd} + * @return the new position + * @stable ICU 2.0 + */ +#ifdef move32 + // One of the system headers right now is sometimes defining a conflicting macro we don't use +#undef move32 +#endif + virtual int32_t move32(int32_t delta, EOrigin origin); + + /** + * Sets the iterator to iterate over a new range of text + * @stable ICU 2.0 + */ + void setText(ConstChar16Ptr newText, int32_t newTextLength); + + /** + * Copies the char16_t array under iteration into the UnicodeString + * referred to by "result". Even if this iterator iterates across + * only a part of this string, the whole string is copied. + * @param result Receives a copy of the text under iteration. + * @stable ICU 2.0 + */ + virtual void getText(UnicodeString& result); + + /** + * Return a class ID for this class (not really public) + * @return a class ID for this class + * @stable ICU 2.0 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Return a class ID for this object (not really public) + * @return a class ID for this object. + * @stable ICU 2.0 + */ + virtual UClassID getDynamicClassID(void) const; + +protected: + /** + * Protected constructor + * @stable ICU 2.0 + */ + UCharCharacterIterator(); + /** + * Protected member text + * @stable ICU 2.0 + */ + const char16_t* text; + +}; + +U_NAMESPACE_END +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uclean.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uclean.h new file mode 100755 index 00000000..7cef6dba --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uclean.h @@ -0,0 +1,262 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* Copyright (C) 2001-2014, International Business Machines +* Corporation and others. All Rights Reserved. +****************************************************************************** +* file name: uclean.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2001July05 +* created by: George Rhoten +*/ + +#ifndef __UCLEAN_H__ +#define __UCLEAN_H__ + +#include "unicode/utypes.h" +/** + * \file + * \brief C API: Initialize and clean up ICU + */ + +/** + * Initialize ICU. + * + * Use of this function is optional. It is OK to simply use ICU + * services and functions without first having initialized + * ICU by calling u_init(). + * + * u_init() will attempt to load some part of ICU's data, and is + * useful as a test for configuration or installation problems that + * leave the ICU data inaccessible. A successful invocation of u_init() + * does not, however, guarantee that all ICU data is accessible. + * + * Multiple calls to u_init() cause no harm, aside from the small amount + * of time required. + * + * In old versions of ICU, u_init() was required in multi-threaded applications + * to ensure the thread safety of ICU. u_init() is no longer needed for this purpose. + * + * @param status An ICU UErrorCode parameter. It must not be <code>NULL</code>. + * An Error will be returned if some required part of ICU data can not + * be loaded or initialized. + * The function returns immediately if the input error code indicates a + * failure, as usual. + * + * @stable ICU 2.6 + */ +U_STABLE void U_EXPORT2 +u_init(UErrorCode *status); + +#ifndef U_HIDE_SYSTEM_API +/** + * Clean up the system resources, such as allocated memory or open files, + * used in all ICU libraries. This will free/delete all memory owned by the + * ICU libraries, and return them to their original load state. All open ICU + * items (collators, resource bundles, converters, etc.) must be closed before + * calling this function, otherwise ICU may not free its allocated memory + * (e.g. close your converters and resource bundles before calling this + * function). Generally, this function should be called once just before + * an application exits. For applications that dynamically load and unload + * the ICU libraries (relatively uncommon), u_cleanup() should be called + * just before the library unload. + * <p> + * u_cleanup() also clears any ICU heap functions, mutex functions or + * trace functions that may have been set for the process. + * This has the effect of restoring ICU to its initial condition, before + * any of these override functions were installed. Refer to + * u_setMemoryFunctions(), u_setMutexFunctions and + * utrace_setFunctions(). If ICU is to be reinitialized after + * calling u_cleanup(), these runtime override functions will need to + * be set up again if they are still required. + * <p> + * u_cleanup() is not thread safe. All other threads should stop using ICU + * before calling this function. + * <p> + * Any open ICU items will be left in an undefined state by u_cleanup(), + * and any subsequent attempt to use such an item will give unpredictable + * results. + * <p> + * After calling u_cleanup(), an application may continue to use ICU by + * calling u_init(). An application must invoke u_init() first from one single + * thread before allowing other threads call u_init(). All threads existing + * at the time of the first thread's call to u_init() must also call + * u_init() themselves before continuing with other ICU operations. + * <p> + * The use of u_cleanup() just before an application terminates is optional, + * but it should be called only once for performance reasons. The primary + * benefit is to eliminate reports of memory or resource leaks originating + * in ICU code from the results generated by heap analysis tools. + * <p> + * <strong>Use this function with great care!</strong> + * </p> + * + * @stable ICU 2.0 + * @system + */ +U_STABLE void U_EXPORT2 +u_cleanup(void); + +U_CDECL_BEGIN +/** + * Pointer type for a user supplied memory allocation function. + * @param context user supplied value, obtained from u_setMemoryFunctions(). + * @param size The number of bytes to be allocated + * @return Pointer to the newly allocated memory, or NULL if the allocation failed. + * @stable ICU 2.8 + * @system + */ +typedef void *U_CALLCONV UMemAllocFn(const void *context, size_t size); +/** + * Pointer type for a user supplied memory re-allocation function. + * @param context user supplied value, obtained from u_setMemoryFunctions(). + * @param size The number of bytes to be allocated + * @return Pointer to the newly allocated memory, or NULL if the allocation failed. + * @stable ICU 2.8 + * @system + */ +typedef void *U_CALLCONV UMemReallocFn(const void *context, void *mem, size_t size); +/** + * Pointer type for a user supplied memory free function. Behavior should be + * similar the standard C library free(). + * @param context user supplied value, obtained from u_setMemoryFunctions(). + * @param mem Pointer to the memory block to be resized + * @param size The new size for the block + * @return Pointer to the resized memory block, or NULL if the resizing failed. + * @stable ICU 2.8 + * @system + */ +typedef void U_CALLCONV UMemFreeFn (const void *context, void *mem); + +/** + * Set the functions that ICU will use for memory allocation. + * Use of this function is optional; by default (without this function), ICU will + * use the standard C library malloc() and free() functions. + * This function can only be used when ICU is in an initial, unused state, before + * u_init() has been called. + * @param context This pointer value will be saved, and then (later) passed as + * a parameter to the memory functions each time they + * are called. + * @param a Pointer to a user-supplied malloc function. + * @param r Pointer to a user-supplied realloc function. + * @param f Pointer to a user-supplied free function. + * @param status Receives error values. + * @stable ICU 2.8 + * @system + */ +U_STABLE void U_EXPORT2 +u_setMemoryFunctions(const void *context, UMemAllocFn * U_CALLCONV_FPTR a, UMemReallocFn * U_CALLCONV_FPTR r, UMemFreeFn * U_CALLCONV_FPTR f, + UErrorCode *status); + +U_CDECL_END + +#ifndef U_HIDE_DEPRECATED_API +/********************************************************************************* + * + * Deprecated Functions + * + * The following functions for user supplied mutexes are no longer supported. + * Any attempt to use them will return a U_UNSUPPORTED_ERROR. + * + **********************************************************************************/ + +/** + * An opaque pointer type that represents an ICU mutex. + * For user-implemented mutexes, the value will typically point to a + * struct or object that implements the mutex. + * @deprecated ICU 52. This type is no longer supported. + * @system + */ +typedef void *UMTX; + +U_CDECL_BEGIN +/** + * Function Pointer type for a user supplied mutex initialization function. + * The user-supplied function will be called by ICU whenever ICU needs to create a + * new mutex. The function implementation should create a mutex, and store a pointer + * to something that uniquely identifies the mutex into the UMTX that is supplied + * as a parameter. + * @param context user supplied value, obtained from u_setMutexFunctions(). + * @param mutex Receives a pointer that identifies the new mutex. + * The mutex init function must set the UMTX to a non-null value. + * Subsequent calls by ICU to lock, unlock, or destroy a mutex will + * identify the mutex by the UMTX value. + * @param status Error status. Report errors back to ICU by setting this variable + * with an error code. + * @deprecated ICU 52. This function is no longer supported. + * @system + */ +typedef void U_CALLCONV UMtxInitFn (const void *context, UMTX *mutex, UErrorCode* status); + + +/** + * Function Pointer type for a user supplied mutex functions. + * One of the user-supplied functions with this signature will be called by ICU + * whenever ICU needs to lock, unlock, or destroy a mutex. + * @param context user supplied value, obtained from u_setMutexFunctions(). + * @param mutex specify the mutex on which to operate. + * @deprecated ICU 52. This function is no longer supported. + * @system + */ +typedef void U_CALLCONV UMtxFn (const void *context, UMTX *mutex); +U_CDECL_END + +/** + * Set the functions that ICU will use for mutex operations + * Use of this function is optional; by default (without this function), ICU will + * directly access system functions for mutex operations + * This function can only be used when ICU is in an initial, unused state, before + * u_init() has been called. + * @param context This pointer value will be saved, and then (later) passed as + * a parameter to the user-supplied mutex functions each time they + * are called. + * @param init Pointer to a mutex initialization function. Must be non-null. + * @param destroy Pointer to the mutex destroy function. Must be non-null. + * @param lock pointer to the mutex lock function. Must be non-null. + * @param unlock Pointer to the mutex unlock function. Must be non-null. + * @param status Receives error values. + * @deprecated ICU 52. This function is no longer supported. + * @system + */ +U_DEPRECATED void U_EXPORT2 +u_setMutexFunctions(const void *context, UMtxInitFn *init, UMtxFn *destroy, UMtxFn *lock, UMtxFn *unlock, + UErrorCode *status); + + +/** + * Pointer type for a user supplied atomic increment or decrement function. + * @param context user supplied value, obtained from u_setAtomicIncDecFunctions(). + * @param p Pointer to a 32 bit int to be incremented or decremented + * @return The value of the variable after the inc or dec operation. + * @deprecated ICU 52. This function is no longer supported. + * @system + */ +typedef int32_t U_CALLCONV UMtxAtomicFn(const void *context, int32_t *p); + +/** + * Set the functions that ICU will use for atomic increment and decrement of int32_t values. + * Use of this function is optional; by default (without this function), ICU will + * use its own internal implementation of atomic increment/decrement. + * This function can only be used when ICU is in an initial, unused state, before + * u_init() has been called. + * @param context This pointer value will be saved, and then (later) passed as + * a parameter to the increment and decrement functions each time they + * are called. This function can only be called + * @param inc Pointer to a function to do an atomic increment operation. Must be non-null. + * @param dec Pointer to a function to do an atomic decrement operation. Must be non-null. + * @param status Receives error values. + * @deprecated ICU 52. This function is no longer supported. + * @system + */ +U_DEPRECATED void U_EXPORT2 +u_setAtomicIncDecFunctions(const void *context, UMtxAtomicFn *inc, UMtxAtomicFn *dec, + UErrorCode *status); + +#endif /* U_HIDE_DEPRECATED_API */ +#endif /* U_HIDE_SYSTEM_API */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucnv.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucnv.h new file mode 100755 index 00000000..53b4c6f0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucnv.h @@ -0,0 +1,2043 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 1999-2014, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** + * ucnv.h: + * External APIs for the ICU's codeset conversion library + * Bertrand A. Damiba + * + * Modification History: + * + * Date Name Description + * 04/04/99 helena Fixed internal header inclusion. + * 05/11/00 helena Added setFallback and usesFallback APIs. + * 06/29/2000 helena Major rewrite of the callback APIs. + * 12/07/2000 srl Update of documentation + */ + +/** + * \file + * \brief C API: Character conversion + * + * <h2>Character Conversion C API</h2> + * + * <p>This API is used to convert codepage or character encoded data to and + * from UTF-16. You can open a converter with {@link ucnv_open() }. With that + * converter, you can get its properties, set options, convert your data and + * close the converter.</p> + * + * <p>Since many software programs recognize different converter names for + * different types of converters, there are other functions in this API to + * iterate over the converter aliases. The functions {@link ucnv_getAvailableName() }, + * {@link ucnv_getAlias() } and {@link ucnv_getStandardName() } are some of the + * more frequently used alias functions to get this information.</p> + * + * <p>When a converter encounters an illegal, irregular, invalid or unmappable character + * its default behavior is to use a substitution character to replace the + * bad byte sequence. This behavior can be changed by using {@link ucnv_setFromUCallBack() } + * or {@link ucnv_setToUCallBack() } on the converter. The header ucnv_err.h defines + * many other callback actions that can be used instead of a character substitution.</p> + * + * <p>More information about this API can be found in our + * <a href="http://icu-project.org/userguide/conversion.html">User's + * Guide</a>.</p> + */ + +#ifndef UCNV_H +#define UCNV_H + +#include "unicode/ucnv_err.h" +#include "unicode/uenum.h" +#include "unicode/localpointer.h" + +#ifndef __USET_H__ + +/** + * USet is the C API type for Unicode sets. + * It is forward-declared here to avoid including the header file if related + * conversion APIs are not used. + * See unicode/uset.h + * + * @see ucnv_getUnicodeSet + * @stable ICU 2.6 + */ +struct USet; +/** @stable ICU 2.6 */ +typedef struct USet USet; + +#endif + +#if !UCONFIG_NO_CONVERSION + +U_CDECL_BEGIN + +/** Maximum length of a converter name including the terminating NULL @stable ICU 2.0 */ +#define UCNV_MAX_CONVERTER_NAME_LENGTH 60 +/** Maximum length of a converter name including path and terminating NULL @stable ICU 2.0 */ +#define UCNV_MAX_FULL_FILE_NAME_LENGTH (600+UCNV_MAX_CONVERTER_NAME_LENGTH) + +/** Shift in for EBDCDIC_STATEFUL and iso2022 states @stable ICU 2.0 */ +#define UCNV_SI 0x0F +/** Shift out for EBDCDIC_STATEFUL and iso2022 states @stable ICU 2.0 */ +#define UCNV_SO 0x0E + +/** + * Enum for specifying basic types of converters + * @see ucnv_getType + * @stable ICU 2.0 + */ +typedef enum { + /** @stable ICU 2.0 */ + UCNV_UNSUPPORTED_CONVERTER = -1, + /** @stable ICU 2.0 */ + UCNV_SBCS = 0, + /** @stable ICU 2.0 */ + UCNV_DBCS = 1, + /** @stable ICU 2.0 */ + UCNV_MBCS = 2, + /** @stable ICU 2.0 */ + UCNV_LATIN_1 = 3, + /** @stable ICU 2.0 */ + UCNV_UTF8 = 4, + /** @stable ICU 2.0 */ + UCNV_UTF16_BigEndian = 5, + /** @stable ICU 2.0 */ + UCNV_UTF16_LittleEndian = 6, + /** @stable ICU 2.0 */ + UCNV_UTF32_BigEndian = 7, + /** @stable ICU 2.0 */ + UCNV_UTF32_LittleEndian = 8, + /** @stable ICU 2.0 */ + UCNV_EBCDIC_STATEFUL = 9, + /** @stable ICU 2.0 */ + UCNV_ISO_2022 = 10, + + /** @stable ICU 2.0 */ + UCNV_LMBCS_1 = 11, + /** @stable ICU 2.0 */ + UCNV_LMBCS_2, + /** @stable ICU 2.0 */ + UCNV_LMBCS_3, + /** @stable ICU 2.0 */ + UCNV_LMBCS_4, + /** @stable ICU 2.0 */ + UCNV_LMBCS_5, + /** @stable ICU 2.0 */ + UCNV_LMBCS_6, + /** @stable ICU 2.0 */ + UCNV_LMBCS_8, + /** @stable ICU 2.0 */ + UCNV_LMBCS_11, + /** @stable ICU 2.0 */ + UCNV_LMBCS_16, + /** @stable ICU 2.0 */ + UCNV_LMBCS_17, + /** @stable ICU 2.0 */ + UCNV_LMBCS_18, + /** @stable ICU 2.0 */ + UCNV_LMBCS_19, + /** @stable ICU 2.0 */ + UCNV_LMBCS_LAST = UCNV_LMBCS_19, + /** @stable ICU 2.0 */ + UCNV_HZ, + /** @stable ICU 2.0 */ + UCNV_SCSU, + /** @stable ICU 2.0 */ + UCNV_ISCII, + /** @stable ICU 2.0 */ + UCNV_US_ASCII, + /** @stable ICU 2.0 */ + UCNV_UTF7, + /** @stable ICU 2.2 */ + UCNV_BOCU1, + /** @stable ICU 2.2 */ + UCNV_UTF16, + /** @stable ICU 2.2 */ + UCNV_UTF32, + /** @stable ICU 2.2 */ + UCNV_CESU8, + /** @stable ICU 2.4 */ + UCNV_IMAP_MAILBOX, + /** @stable ICU 4.8 */ + UCNV_COMPOUND_TEXT, + + /* Number of converter types for which we have conversion routines. */ + UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES +} UConverterType; + +/** + * Enum for specifying which platform a converter ID refers to. + * The use of platform/CCSID is not recommended. See ucnv_openCCSID(). + * + * @see ucnv_getPlatform + * @see ucnv_openCCSID + * @see ucnv_getCCSID + * @stable ICU 2.0 + */ +typedef enum { + UCNV_UNKNOWN = -1, + UCNV_IBM = 0 +} UConverterPlatform; + +/** + * Function pointer for error callback in the codepage to unicode direction. + * Called when an error has occurred in conversion to unicode, or on open/close of the callback (see reason). + * @param context Pointer to the callback's private data + * @param args Information about the conversion in progress + * @param codeUnits Points to 'length' bytes of the concerned codepage sequence + * @param length Size (in bytes) of the concerned codepage sequence + * @param reason Defines the reason the callback was invoked + * @param pErrorCode ICU error code in/out parameter. + * For converter callback functions, set to a conversion error + * before the call, and the callback may reset it to U_ZERO_ERROR. + * @see ucnv_setToUCallBack + * @see UConverterToUnicodeArgs + * @stable ICU 2.0 + */ +typedef void (U_EXPORT2 *UConverterToUCallback) ( + const void* context, + UConverterToUnicodeArgs *args, + const char *codeUnits, + int32_t length, + UConverterCallbackReason reason, + UErrorCode *pErrorCode); + +/** + * Function pointer for error callback in the unicode to codepage direction. + * Called when an error has occurred in conversion from unicode, or on open/close of the callback (see reason). + * @param context Pointer to the callback's private data + * @param args Information about the conversion in progress + * @param codeUnits Points to 'length' UChars of the concerned Unicode sequence + * @param length Size (in bytes) of the concerned codepage sequence + * @param codePoint Single UChar32 (UTF-32) containing the concerend Unicode codepoint. + * @param reason Defines the reason the callback was invoked + * @param pErrorCode ICU error code in/out parameter. + * For converter callback functions, set to a conversion error + * before the call, and the callback may reset it to U_ZERO_ERROR. + * @see ucnv_setFromUCallBack + * @stable ICU 2.0 + */ +typedef void (U_EXPORT2 *UConverterFromUCallback) ( + const void* context, + UConverterFromUnicodeArgs *args, + const UChar* codeUnits, + int32_t length, + UChar32 codePoint, + UConverterCallbackReason reason, + UErrorCode *pErrorCode); + +U_CDECL_END + +/** + * Character that separates converter names from options and options from each other. + * @see ucnv_open + * @stable ICU 2.0 + */ +#define UCNV_OPTION_SEP_CHAR ',' + +/** + * String version of UCNV_OPTION_SEP_CHAR. + * @see ucnv_open + * @stable ICU 2.0 + */ +#define UCNV_OPTION_SEP_STRING "," + +/** + * Character that separates a converter option from its value. + * @see ucnv_open + * @stable ICU 2.0 + */ +#define UCNV_VALUE_SEP_CHAR '=' + +/** + * String version of UCNV_VALUE_SEP_CHAR. + * @see ucnv_open + * @stable ICU 2.0 + */ +#define UCNV_VALUE_SEP_STRING "=" + +/** + * Converter option for specifying a locale. + * For example, ucnv_open("SCSU,locale=ja", &errorCode); + * See convrtrs.txt. + * + * @see ucnv_open + * @stable ICU 2.0 + */ +#define UCNV_LOCALE_OPTION_STRING ",locale=" + +/** + * Converter option for specifying a version selector (0..9) for some converters. + * For example, + * \code + * ucnv_open("UTF-7,version=1", &errorCode); + * \endcode + * See convrtrs.txt. + * + * @see ucnv_open + * @stable ICU 2.4 + */ +#define UCNV_VERSION_OPTION_STRING ",version=" + +/** + * Converter option for EBCDIC SBCS or mixed-SBCS/DBCS (stateful) codepages. + * Swaps Unicode mappings for EBCDIC LF and NL codes, as used on + * S/390 (z/OS) Unix System Services (Open Edition). + * For example, ucnv_open("ibm-1047,swaplfnl", &errorCode); + * See convrtrs.txt. + * + * @see ucnv_open + * @stable ICU 2.4 + */ +#define UCNV_SWAP_LFNL_OPTION_STRING ",swaplfnl" + +/** + * Do a fuzzy compare of two converter/alias names. + * The comparison is case-insensitive, ignores leading zeroes if they are not + * followed by further digits, and ignores all but letters and digits. + * Thus the strings "UTF-8", "utf_8", "u*T@f08" and "Utf 8" are exactly equivalent. + * See section 1.4, Charset Alias Matching in Unicode Technical Standard #22 + * at http://www.unicode.org/reports/tr22/ + * + * @param name1 a converter name or alias, zero-terminated + * @param name2 a converter name or alias, zero-terminated + * @return 0 if the names match, or a negative value if the name1 + * lexically precedes name2, or a positive value if the name1 + * lexically follows name2. + * @stable ICU 2.0 + */ +U_STABLE int U_EXPORT2 +ucnv_compareNames(const char *name1, const char *name2); + + +/** + * Creates a UConverter object with the name of a coded character set specified as a C string. + * The actual name will be resolved with the alias file + * using a case-insensitive string comparison that ignores + * leading zeroes and all non-alphanumeric characters. + * E.g., the names "UTF8", "utf-8", "u*T@f08" and "Utf 8" are all equivalent. + * (See also ucnv_compareNames().) + * If <code>NULL</code> is passed for the converter name, it will create one with the + * getDefaultName return value. + * + * <p>A converter name for ICU 1.5 and above may contain options + * like a locale specification to control the specific behavior of + * the newly instantiated converter. + * The meaning of the options depends on the particular converter. + * If an option is not defined for or recognized by a given converter, then it is ignored.</p> + * + * <p>Options are appended to the converter name string, with a + * <code>UCNV_OPTION_SEP_CHAR</code> between the name and the first option and + * also between adjacent options.</p> + * + * <p>If the alias is ambiguous, then the preferred converter is used + * and the status is set to U_AMBIGUOUS_ALIAS_WARNING.</p> + * + * <p>The conversion behavior and names can vary between platforms. ICU may + * convert some characters differently from other platforms. Details on this topic + * are in the <a href="http://icu-project.org/userguide/conversion.html">User's + * Guide</a>. Aliases starting with a "cp" prefix have no specific meaning + * other than its an alias starting with the letters "cp". Please do not + * associate any meaning to these aliases.</p> + * + * \snippet samples/ucnv/convsamp.cpp ucnv_open + * + * @param converterName Name of the coded character set table. + * This may have options appended to the string. + * IANA alias character set names, IBM CCSIDs starting with "ibm-", + * Windows codepage numbers starting with "windows-" are frequently + * used for this parameter. See ucnv_getAvailableName and + * ucnv_getAlias for a complete list that is available. + * If this parameter is NULL, the default converter will be used. + * @param err outgoing error status <TT>U_MEMORY_ALLOCATION_ERROR, U_FILE_ACCESS_ERROR</TT> + * @return the created Unicode converter object, or <TT>NULL</TT> if an error occurred + * @see ucnv_openU + * @see ucnv_openCCSID + * @see ucnv_getAvailableName + * @see ucnv_getAlias + * @see ucnv_getDefaultName + * @see ucnv_close + * @see ucnv_compareNames + * @stable ICU 2.0 + */ +U_STABLE UConverter* U_EXPORT2 +ucnv_open(const char *converterName, UErrorCode *err); + + +/** + * Creates a Unicode converter with the names specified as unicode string. + * The name should be limited to the ASCII-7 alphanumerics range. + * The actual name will be resolved with the alias file + * using a case-insensitive string comparison that ignores + * leading zeroes and all non-alphanumeric characters. + * E.g., the names "UTF8", "utf-8", "u*T@f08" and "Utf 8" are all equivalent. + * (See also ucnv_compareNames().) + * If <TT>NULL</TT> is passed for the converter name, it will create + * one with the ucnv_getDefaultName() return value. + * If the alias is ambiguous, then the preferred converter is used + * and the status is set to U_AMBIGUOUS_ALIAS_WARNING. + * + * <p>See ucnv_open for the complete details</p> + * @param name Name of the UConverter table in a zero terminated + * Unicode string + * @param err outgoing error status <TT>U_MEMORY_ALLOCATION_ERROR, + * U_FILE_ACCESS_ERROR</TT> + * @return the created Unicode converter object, or <TT>NULL</TT> if an + * error occurred + * @see ucnv_open + * @see ucnv_openCCSID + * @see ucnv_close + * @see ucnv_compareNames + * @stable ICU 2.0 + */ +U_STABLE UConverter* U_EXPORT2 +ucnv_openU(const UChar *name, + UErrorCode *err); + +/** + * Creates a UConverter object from a CCSID number and platform pair. + * Note that the usefulness of this function is limited to platforms with numeric + * encoding IDs. Only IBM and Microsoft platforms use numeric (16-bit) identifiers for + * encodings. + * + * In addition, IBM CCSIDs and Unicode conversion tables are not 1:1 related. + * For many IBM CCSIDs there are multiple (up to six) Unicode conversion tables, and + * for some Unicode conversion tables there are multiple CCSIDs. + * Some "alternate" Unicode conversion tables are provided by the + * IBM CDRA conversion table registry. + * The most prominent example of a systematic modification of conversion tables that is + * not provided in the form of conversion table files in the repository is + * that S/390 Unix System Services swaps the codes for Line Feed and New Line in all + * EBCDIC codepages, which requires such a swap in the Unicode conversion tables as well. + * + * Only IBM default conversion tables are accessible with ucnv_openCCSID(). + * ucnv_getCCSID() will return the same CCSID for all conversion tables that are associated + * with that CCSID. + * + * Currently, the only "platform" supported in the ICU converter API is UCNV_IBM. + * + * In summary, the use of CCSIDs and the associated API functions is not recommended. + * + * In order to open a converter with the default IBM CDRA Unicode conversion table, + * you can use this function or use the prefix "ibm-": + * \code + * char name[20]; + * sprintf(name, "ibm-%hu", ccsid); + * cnv=ucnv_open(name, &errorCode); + * \endcode + * + * In order to open a converter with the IBM S/390 Unix System Services variant + * of a Unicode/EBCDIC conversion table, + * you can use the prefix "ibm-" together with the option string UCNV_SWAP_LFNL_OPTION_STRING: + * \code + * char name[20]; + * sprintf(name, "ibm-%hu" UCNV_SWAP_LFNL_OPTION_STRING, ccsid); + * cnv=ucnv_open(name, &errorCode); + * \endcode + * + * In order to open a converter from a Microsoft codepage number, use the prefix "cp": + * \code + * char name[20]; + * sprintf(name, "cp%hu", codepageID); + * cnv=ucnv_open(name, &errorCode); + * \endcode + * + * If the alias is ambiguous, then the preferred converter is used + * and the status is set to U_AMBIGUOUS_ALIAS_WARNING. + * + * @param codepage codepage number to create + * @param platform the platform in which the codepage number exists + * @param err error status <TT>U_MEMORY_ALLOCATION_ERROR, U_FILE_ACCESS_ERROR</TT> + * @return the created Unicode converter object, or <TT>NULL</TT> if an error + * occurred. + * @see ucnv_open + * @see ucnv_openU + * @see ucnv_close + * @see ucnv_getCCSID + * @see ucnv_getPlatform + * @see UConverterPlatform + * @stable ICU 2.0 + */ +U_STABLE UConverter* U_EXPORT2 +ucnv_openCCSID(int32_t codepage, + UConverterPlatform platform, + UErrorCode * err); + +/** + * <p>Creates a UConverter object specified from a packageName and a converterName.</p> + * + * <p>The packageName and converterName must point to an ICU udata object, as defined by + * <code> udata_open( packageName, "cnv", converterName, err) </code> or equivalent. + * Typically, packageName will refer to a (.dat) file, or to a package registered with + * udata_setAppData(). Using a full file or directory pathname for packageName is deprecated.</p> + * + * <p>The name will NOT be looked up in the alias mechanism, nor will the converter be + * stored in the converter cache or the alias table. The only way to open further converters + * is call this function multiple times, or use the ucnv_safeClone() function to clone a + * 'master' converter.</p> + * + * <p>A future version of ICU may add alias table lookups and/or caching + * to this function.</p> + * + * <p>Example Use: + * <code>cnv = ucnv_openPackage("myapp", "myconverter", &err);</code> + * </p> + * + * @param packageName name of the package (equivalent to 'path' in udata_open() call) + * @param converterName name of the data item to be used, without suffix. + * @param err outgoing error status <TT>U_MEMORY_ALLOCATION_ERROR, U_FILE_ACCESS_ERROR</TT> + * @return the created Unicode converter object, or <TT>NULL</TT> if an error occurred + * @see udata_open + * @see ucnv_open + * @see ucnv_safeClone + * @see ucnv_close + * @stable ICU 2.2 + */ +U_STABLE UConverter* U_EXPORT2 +ucnv_openPackage(const char *packageName, const char *converterName, UErrorCode *err); + +/** + * Thread safe converter cloning operation. + * For most efficient operation, pass in a stackBuffer (and a *pBufferSize) + * with at least U_CNV_SAFECLONE_BUFFERSIZE bytes of space. + * If the buffer size is sufficient, then the clone will use the stack buffer; + * otherwise, it will be allocated, and *pBufferSize will indicate + * the actual size. (This should not occur with U_CNV_SAFECLONE_BUFFERSIZE.) + * + * You must ucnv_close() the clone in any case. + * + * If *pBufferSize==0, (regardless of whether stackBuffer==NULL or not) + * then *pBufferSize will be changed to a sufficient size + * for cloning this converter, + * without actually cloning the converter ("pure pre-flighting"). + * + * If *pBufferSize is greater than zero but not large enough for a stack-based + * clone, then the converter is cloned using newly allocated memory + * and *pBufferSize is changed to the necessary size. + * + * If the converter clone fits into the stack buffer but the stack buffer is not + * sufficiently aligned for the clone, then the clone will use an + * adjusted pointer and use an accordingly smaller buffer size. + * + * @param cnv converter to be cloned + * @param stackBuffer <em>Deprecated functionality as of ICU 52, use NULL.</em><br> + * user allocated space for the new clone. If NULL new memory will be allocated. + * If buffer is not large enough, new memory will be allocated. + * Clients can use the U_CNV_SAFECLONE_BUFFERSIZE. This will probably be enough to avoid memory allocations. + * @param pBufferSize <em>Deprecated functionality as of ICU 52, use NULL or 1.</em><br> + * pointer to size of allocated space. + * @param status to indicate whether the operation went on smoothly or there were errors + * An informational status value, U_SAFECLONE_ALLOCATED_WARNING, + * is used if any allocations were necessary. + * However, it is better to check if *pBufferSize grew for checking for + * allocations because warning codes can be overridden by subsequent + * function calls. + * @return pointer to the new clone + * @stable ICU 2.0 + */ +U_STABLE UConverter * U_EXPORT2 +ucnv_safeClone(const UConverter *cnv, + void *stackBuffer, + int32_t *pBufferSize, + UErrorCode *status); + +#ifndef U_HIDE_DEPRECATED_API + +/** + * \def U_CNV_SAFECLONE_BUFFERSIZE + * Definition of a buffer size that is designed to be large enough for + * converters to be cloned with ucnv_safeClone(). + * @deprecated ICU 52. Do not rely on ucnv_safeClone() cloning into any provided buffer. + */ +#define U_CNV_SAFECLONE_BUFFERSIZE 1024 + +#endif /* U_HIDE_DEPRECATED_API */ + +/** + * Deletes the unicode converter and releases resources associated + * with just this instance. + * Does not free up shared converter tables. + * + * @param converter the converter object to be deleted + * @see ucnv_open + * @see ucnv_openU + * @see ucnv_openCCSID + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_close(UConverter * converter); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUConverterPointer + * "Smart pointer" class, closes a UConverter via ucnv_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUConverterPointer, UConverter, ucnv_close); + +U_NAMESPACE_END + +#endif + +/** + * Fills in the output parameter, subChars, with the substitution characters + * as multiple bytes. + * If ucnv_setSubstString() set a Unicode string because the converter is + * stateful, then subChars will be an empty string. + * + * @param converter the Unicode converter + * @param subChars the substitution characters + * @param len on input the capacity of subChars, on output the number + * of bytes copied to it + * @param err the outgoing error status code. + * If the substitution character array is too small, an + * <TT>U_INDEX_OUTOFBOUNDS_ERROR</TT> will be returned. + * @see ucnv_setSubstString + * @see ucnv_setSubstChars + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_getSubstChars(const UConverter *converter, + char *subChars, + int8_t *len, + UErrorCode *err); + +/** + * Sets the substitution chars when converting from unicode to a codepage. The + * substitution is specified as a string of 1-4 bytes, and may contain + * <TT>NULL</TT> bytes. + * The subChars must represent a single character. The caller needs to know the + * byte sequence of a valid character in the converter's charset. + * For some converters, for example some ISO 2022 variants, only single-byte + * substitution characters may be supported. + * The newer ucnv_setSubstString() function relaxes these limitations. + * + * @param converter the Unicode converter + * @param subChars the substitution character byte sequence we want set + * @param len the number of bytes in subChars + * @param err the error status code. <TT>U_INDEX_OUTOFBOUNDS_ERROR </TT> if + * len is bigger than the maximum number of bytes allowed in subchars + * @see ucnv_setSubstString + * @see ucnv_getSubstChars + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_setSubstChars(UConverter *converter, + const char *subChars, + int8_t len, + UErrorCode *err); + +/** + * Set a substitution string for converting from Unicode to a charset. + * The caller need not know the charset byte sequence for each charset. + * + * Unlike ucnv_setSubstChars() which is designed to set a charset byte sequence + * for a single character, this function takes a Unicode string with + * zero, one or more characters, and immediately verifies that the string can be + * converted to the charset. + * If not, or if the result is too long (more than 32 bytes as of ICU 3.6), + * then the function returns with an error accordingly. + * + * Also unlike ucnv_setSubstChars(), this function works for stateful charsets + * by converting on the fly at the point of substitution rather than setting + * a fixed byte sequence. + * + * @param cnv The UConverter object. + * @param s The Unicode string. + * @param length The number of UChars in s, or -1 for a NUL-terminated string. + * @param err Pointer to a standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * + * @see ucnv_setSubstChars + * @see ucnv_getSubstChars + * @stable ICU 3.6 + */ +U_STABLE void U_EXPORT2 +ucnv_setSubstString(UConverter *cnv, + const UChar *s, + int32_t length, + UErrorCode *err); + +/** + * Fills in the output parameter, errBytes, with the error characters from the + * last failing conversion. + * + * @param converter the Unicode converter + * @param errBytes the codepage bytes which were in error + * @param len on input the capacity of errBytes, on output the number of + * bytes which were copied to it + * @param err the error status code. + * If the substitution character array is too small, an + * <TT>U_INDEX_OUTOFBOUNDS_ERROR</TT> will be returned. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_getInvalidChars(const UConverter *converter, + char *errBytes, + int8_t *len, + UErrorCode *err); + +/** + * Fills in the output parameter, errChars, with the error characters from the + * last failing conversion. + * + * @param converter the Unicode converter + * @param errUChars the UChars which were in error + * @param len on input the capacity of errUChars, on output the number of + * UChars which were copied to it + * @param err the error status code. + * If the substitution character array is too small, an + * <TT>U_INDEX_OUTOFBOUNDS_ERROR</TT> will be returned. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_getInvalidUChars(const UConverter *converter, + UChar *errUChars, + int8_t *len, + UErrorCode *err); + +/** + * Resets the state of a converter to the default state. This is used + * in the case of an error, to restart a conversion from a known default state. + * It will also empty the internal output buffers. + * @param converter the Unicode converter + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_reset(UConverter *converter); + +/** + * Resets the to-Unicode part of a converter state to the default state. + * This is used in the case of an error to restart a conversion to + * Unicode to a known default state. It will also empty the internal + * output buffers used for the conversion to Unicode codepoints. + * @param converter the Unicode converter + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_resetToUnicode(UConverter *converter); + +/** + * Resets the from-Unicode part of a converter state to the default state. + * This is used in the case of an error to restart a conversion from + * Unicode to a known default state. It will also empty the internal output + * buffers used for the conversion from Unicode codepoints. + * @param converter the Unicode converter + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_resetFromUnicode(UConverter *converter); + +/** + * Returns the maximum number of bytes that are output per UChar in conversion + * from Unicode using this converter. + * The returned number can be used with UCNV_GET_MAX_BYTES_FOR_STRING + * to calculate the size of a target buffer for conversion from Unicode. + * + * Note: Before ICU 2.8, this function did not return reliable numbers for + * some stateful converters (EBCDIC_STATEFUL, ISO-2022) and LMBCS. + * + * This number may not be the same as the maximum number of bytes per + * "conversion unit". In other words, it may not be the intuitively expected + * number of bytes per character that would be published for a charset, + * and may not fulfill any other purpose than the allocation of an output + * buffer of guaranteed sufficient size for a given input length and converter. + * + * Examples for special cases that are taken into account: + * - Supplementary code points may convert to more bytes than BMP code points. + * This function returns bytes per UChar (UTF-16 code unit), not per + * Unicode code point, for efficient buffer allocation. + * - State-shifting output (SI/SO, escapes, etc.) from stateful converters. + * - When m input UChars are converted to n output bytes, then the maximum m/n + * is taken into account. + * + * The number returned here does not take into account + * (see UCNV_GET_MAX_BYTES_FOR_STRING): + * - callbacks which output more than one charset character sequence per call, + * like escape callbacks + * - initial and final non-character bytes that are output by some converters + * (automatic BOMs, initial escape sequence, final SI, etc.) + * + * Examples for returned values: + * - SBCS charsets: 1 + * - Shift-JIS: 2 + * - UTF-16: 2 (2 per BMP, 4 per surrogate _pair_, BOM not counted) + * - UTF-8: 3 (3 per BMP, 4 per surrogate _pair_) + * - EBCDIC_STATEFUL (EBCDIC mixed SBCS/DBCS): 3 (SO + DBCS) + * - ISO-2022: 3 (always outputs UTF-8) + * - ISO-2022-JP: 6 (4-byte escape sequences + DBCS) + * - ISO-2022-CN: 8 (4-byte designator sequences + 2-byte SS2/SS3 + DBCS) + * + * @param converter The Unicode converter. + * @return The maximum number of bytes per UChar (16 bit code unit) + * that are output by ucnv_fromUnicode(), + * to be used together with UCNV_GET_MAX_BYTES_FOR_STRING + * for buffer allocation. + * + * @see UCNV_GET_MAX_BYTES_FOR_STRING + * @see ucnv_getMinCharSize + * @stable ICU 2.0 + */ +U_STABLE int8_t U_EXPORT2 +ucnv_getMaxCharSize(const UConverter *converter); + +/** + * Calculates the size of a buffer for conversion from Unicode to a charset. + * The calculated size is guaranteed to be sufficient for this conversion. + * + * It takes into account initial and final non-character bytes that are output + * by some converters. + * It does not take into account callbacks which output more than one charset + * character sequence per call, like escape callbacks. + * The default (substitution) callback only outputs one charset character sequence. + * + * @param length Number of UChars to be converted. + * @param maxCharSize Return value from ucnv_getMaxCharSize() for the converter + * that will be used. + * @return Size of a buffer that will be large enough to hold the output bytes of + * converting length UChars with the converter that returned the maxCharSize. + * + * @see ucnv_getMaxCharSize + * @stable ICU 2.8 + */ +#define UCNV_GET_MAX_BYTES_FOR_STRING(length, maxCharSize) \ + (((int32_t)(length)+10)*(int32_t)(maxCharSize)) + +/** + * Returns the minimum byte length (per codepoint) for characters in this codepage. + * This is usually either 1 or 2. + * @param converter the Unicode converter + * @return the minimum number of bytes per codepoint allowed by this particular converter + * @see ucnv_getMaxCharSize + * @stable ICU 2.0 + */ +U_STABLE int8_t U_EXPORT2 +ucnv_getMinCharSize(const UConverter *converter); + +/** + * Returns the display name of the converter passed in based on the Locale + * passed in. If the locale contains no display name, the internal ASCII + * name will be filled in. + * + * @param converter the Unicode converter. + * @param displayLocale is the specific Locale we want to localized for + * @param displayName user provided buffer to be filled in + * @param displayNameCapacity size of displayName Buffer + * @param err error status code + * @return displayNameLength number of UChar needed in displayName + * @see ucnv_getName + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucnv_getDisplayName(const UConverter *converter, + const char *displayLocale, + UChar *displayName, + int32_t displayNameCapacity, + UErrorCode *err); + +/** + * Gets the internal, canonical name of the converter (zero-terminated). + * The lifetime of the returned string will be that of the converter + * passed to this function. + * @param converter the Unicode converter + * @param err UErrorCode status + * @return the internal name of the converter + * @see ucnv_getDisplayName + * @stable ICU 2.0 + */ +U_STABLE const char * U_EXPORT2 +ucnv_getName(const UConverter *converter, UErrorCode *err); + +/** + * Gets a codepage number associated with the converter. This is not guaranteed + * to be the one used to create the converter. Some converters do not represent + * platform registered codepages and return zero for the codepage number. + * The error code fill-in parameter indicates if the codepage number + * is available. + * Does not check if the converter is <TT>NULL</TT> or if converter's data + * table is <TT>NULL</TT>. + * + * Important: The use of CCSIDs is not recommended because it is limited + * to only two platforms in principle and only one (UCNV_IBM) in the current + * ICU converter API. + * Also, CCSIDs are insufficient to identify IBM Unicode conversion tables precisely. + * For more details see ucnv_openCCSID(). + * + * @param converter the Unicode converter + * @param err the error status code. + * @return If any error occurs, -1 will be returned otherwise, the codepage number + * will be returned + * @see ucnv_openCCSID + * @see ucnv_getPlatform + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucnv_getCCSID(const UConverter *converter, + UErrorCode *err); + +/** + * Gets a codepage platform associated with the converter. Currently, + * only <TT>UCNV_IBM</TT> will be returned. + * Does not test if the converter is <TT>NULL</TT> or if converter's data + * table is <TT>NULL</TT>. + * @param converter the Unicode converter + * @param err the error status code. + * @return The codepage platform + * @stable ICU 2.0 + */ +U_STABLE UConverterPlatform U_EXPORT2 +ucnv_getPlatform(const UConverter *converter, + UErrorCode *err); + +/** + * Gets the type of the converter + * e.g. SBCS, MBCS, DBCS, UTF8, UTF16_BE, UTF16_LE, ISO_2022, + * EBCDIC_STATEFUL, LATIN_1 + * @param converter a valid, opened converter + * @return the type of the converter + * @stable ICU 2.0 + */ +U_STABLE UConverterType U_EXPORT2 +ucnv_getType(const UConverter * converter); + +/** + * Gets the "starter" (lead) bytes for converters of type MBCS. + * Will fill in an <TT>U_ILLEGAL_ARGUMENT_ERROR</TT> if converter passed in + * is not MBCS. Fills in an array of type UBool, with the value of the byte + * as offset to the array. For example, if (starters[0x20] == TRUE) at return, + * it means that the byte 0x20 is a starter byte in this converter. + * Context pointers are always owned by the caller. + * + * @param converter a valid, opened converter of type MBCS + * @param starters an array of size 256 to be filled in + * @param err error status, <TT>U_ILLEGAL_ARGUMENT_ERROR</TT> if the + * converter is not a type which can return starters. + * @see ucnv_getType + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_getStarters(const UConverter* converter, + UBool starters[256], + UErrorCode* err); + + +/** + * Selectors for Unicode sets that can be returned by ucnv_getUnicodeSet(). + * @see ucnv_getUnicodeSet + * @stable ICU 2.6 + */ +typedef enum UConverterUnicodeSet { + /** Select the set of roundtrippable Unicode code points. @stable ICU 2.6 */ + UCNV_ROUNDTRIP_SET, + /** Select the set of Unicode code points with roundtrip or fallback mappings. @stable ICU 4.0 */ + UCNV_ROUNDTRIP_AND_FALLBACK_SET, +#ifndef U_HIDE_DEPRECATED_API + /** + * Number of UConverterUnicodeSet selectors. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UCNV_SET_COUNT +#endif // U_HIDE_DEPRECATED_API +} UConverterUnicodeSet; + + +/** + * Returns the set of Unicode code points that can be converted by an ICU converter. + * + * Returns one of several kinds of set: + * + * 1. UCNV_ROUNDTRIP_SET + * + * The set of all Unicode code points that can be roundtrip-converted + * (converted without any data loss) with the converter (ucnv_fromUnicode()). + * This set will not include code points that have fallback mappings + * or are only the result of reverse fallback mappings. + * This set will also not include PUA code points with fallbacks, although + * ucnv_fromUnicode() will always uses those mappings despite ucnv_setFallback(). + * See UTR #22 "Character Mapping Markup Language" + * at http://www.unicode.org/reports/tr22/ + * + * This is useful for example for + * - checking that a string or document can be roundtrip-converted with a converter, + * without/before actually performing the conversion + * - testing if a converter can be used for text for typical text for a certain locale, + * by comparing its roundtrip set with the set of ExemplarCharacters from + * ICU's locale data or other sources + * + * 2. UCNV_ROUNDTRIP_AND_FALLBACK_SET + * + * The set of all Unicode code points that can be converted with the converter (ucnv_fromUnicode()) + * when fallbacks are turned on (see ucnv_setFallback()). + * This set includes all code points with roundtrips and fallbacks (but not reverse fallbacks). + * + * In the future, there may be more UConverterUnicodeSet choices to select + * sets with different properties. + * + * @param cnv The converter for which a set is requested. + * @param setFillIn A valid USet *. It will be cleared by this function before + * the converter's specific set is filled into the USet. + * @param whichSet A UConverterUnicodeSet selector; + * currently UCNV_ROUNDTRIP_SET is the only supported value. + * @param pErrorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * + * @see UConverterUnicodeSet + * @see uset_open + * @see uset_close + * @stable ICU 2.6 + */ +U_STABLE void U_EXPORT2 +ucnv_getUnicodeSet(const UConverter *cnv, + USet *setFillIn, + UConverterUnicodeSet whichSet, + UErrorCode *pErrorCode); + +/** + * Gets the current calback function used by the converter when an illegal + * or invalid codepage sequence is found. + * Context pointers are always owned by the caller. + * + * @param converter the unicode converter + * @param action fillin: returns the callback function pointer + * @param context fillin: returns the callback's private void* context + * @see ucnv_setToUCallBack + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_getToUCallBack (const UConverter * converter, + UConverterToUCallback *action, + const void **context); + +/** + * Gets the current callback function used by the converter when illegal + * or invalid Unicode sequence is found. + * Context pointers are always owned by the caller. + * + * @param converter the unicode converter + * @param action fillin: returns the callback function pointer + * @param context fillin: returns the callback's private void* context + * @see ucnv_setFromUCallBack + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_getFromUCallBack (const UConverter * converter, + UConverterFromUCallback *action, + const void **context); + +/** + * Changes the callback function used by the converter when + * an illegal or invalid sequence is found. + * Context pointers are always owned by the caller. + * Predefined actions and contexts can be found in the ucnv_err.h header. + * + * @param converter the unicode converter + * @param newAction the new callback function + * @param newContext the new toUnicode callback context pointer. This can be NULL. + * @param oldAction fillin: returns the old callback function pointer. This can be NULL. + * @param oldContext fillin: returns the old callback's private void* context. This can be NULL. + * @param err The error code status + * @see ucnv_getToUCallBack + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_setToUCallBack (UConverter * converter, + UConverterToUCallback newAction, + const void* newContext, + UConverterToUCallback *oldAction, + const void** oldContext, + UErrorCode * err); + +/** + * Changes the current callback function used by the converter when + * an illegal or invalid sequence is found. + * Context pointers are always owned by the caller. + * Predefined actions and contexts can be found in the ucnv_err.h header. + * + * @param converter the unicode converter + * @param newAction the new callback function + * @param newContext the new fromUnicode callback context pointer. This can be NULL. + * @param oldAction fillin: returns the old callback function pointer. This can be NULL. + * @param oldContext fillin: returns the old callback's private void* context. This can be NULL. + * @param err The error code status + * @see ucnv_getFromUCallBack + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_setFromUCallBack (UConverter * converter, + UConverterFromUCallback newAction, + const void *newContext, + UConverterFromUCallback *oldAction, + const void **oldContext, + UErrorCode * err); + +/** + * Converts an array of unicode characters to an array of codepage + * characters. This function is optimized for converting a continuous + * stream of data in buffer-sized chunks, where the entire source and + * target does not fit in available buffers. + * + * The source pointer is an in/out parameter. It starts out pointing where the + * conversion is to begin, and ends up pointing after the last UChar consumed. + * + * Target similarly starts out pointer at the first available byte in the output + * buffer, and ends up pointing after the last byte written to the output. + * + * The converter always attempts to consume the entire source buffer, unless + * (1.) the target buffer is full, or (2.) a failing error is returned from the + * current callback function. When a successful error status has been + * returned, it means that all of the source buffer has been + * consumed. At that point, the caller should reset the source and + * sourceLimit pointers to point to the next chunk. + * + * At the end of the stream (flush==TRUE), the input is completely consumed + * when *source==sourceLimit and no error code is set. + * The converter object is then automatically reset by this function. + * (This means that a converter need not be reset explicitly between data + * streams if it finishes the previous stream without errors.) + * + * This is a <I>stateful</I> conversion. Additionally, even when all source data has + * been consumed, some data may be in the converters' internal state. + * Call this function repeatedly, updating the target pointers with + * the next empty chunk of target in case of a + * <TT>U_BUFFER_OVERFLOW_ERROR</TT>, and updating the source pointers + * with the next chunk of source when a successful error status is + * returned, until there are no more chunks of source data. + * @param converter the Unicode converter + * @param target I/O parameter. Input : Points to the beginning of the buffer to copy + * codepage characters to. Output : points to after the last codepage character copied + * to <TT>target</TT>. + * @param targetLimit the pointer just after last of the <TT>target</TT> buffer + * @param source I/O parameter, pointer to pointer to the source Unicode character buffer. + * @param sourceLimit the pointer just after the last of the source buffer + * @param offsets if NULL is passed, nothing will happen to it, otherwise it needs to have the same number + * of allocated cells as <TT>target</TT>. Will fill in offsets from target to source pointer + * e.g: <TT>offsets[3]</TT> is equal to 6, it means that the <TT>target[3]</TT> was a result of transcoding <TT>source[6]</TT> + * For output data carried across calls, and other data without a specific source character + * (such as from escape sequences or callbacks) -1 will be placed for offsets. + * @param flush set to <TT>TRUE</TT> if the current source buffer is the last available + * chunk of the source, <TT>FALSE</TT> otherwise. Note that if a failing status is returned, + * this function may have to be called multiple times with flush set to <TT>TRUE</TT> until + * the source buffer is consumed. + * @param err the error status. <TT>U_ILLEGAL_ARGUMENT_ERROR</TT> will be set if the + * converter is <TT>NULL</TT>. + * <code>U_BUFFER_OVERFLOW_ERROR</code> will be set if the target is full and there is + * still data to be written to the target. + * @see ucnv_fromUChars + * @see ucnv_convert + * @see ucnv_getMinCharSize + * @see ucnv_setToUCallBack + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_fromUnicode (UConverter * converter, + char **target, + const char *targetLimit, + const UChar ** source, + const UChar * sourceLimit, + int32_t* offsets, + UBool flush, + UErrorCode * err); + +/** + * Converts a buffer of codepage bytes into an array of unicode UChars + * characters. This function is optimized for converting a continuous + * stream of data in buffer-sized chunks, where the entire source and + * target does not fit in available buffers. + * + * The source pointer is an in/out parameter. It starts out pointing where the + * conversion is to begin, and ends up pointing after the last byte of source consumed. + * + * Target similarly starts out pointer at the first available UChar in the output + * buffer, and ends up pointing after the last UChar written to the output. + * It does NOT necessarily keep UChar sequences together. + * + * The converter always attempts to consume the entire source buffer, unless + * (1.) the target buffer is full, or (2.) a failing error is returned from the + * current callback function. When a successful error status has been + * returned, it means that all of the source buffer has been + * consumed. At that point, the caller should reset the source and + * sourceLimit pointers to point to the next chunk. + * + * At the end of the stream (flush==TRUE), the input is completely consumed + * when *source==sourceLimit and no error code is set + * The converter object is then automatically reset by this function. + * (This means that a converter need not be reset explicitly between data + * streams if it finishes the previous stream without errors.) + * + * This is a <I>stateful</I> conversion. Additionally, even when all source data has + * been consumed, some data may be in the converters' internal state. + * Call this function repeatedly, updating the target pointers with + * the next empty chunk of target in case of a + * <TT>U_BUFFER_OVERFLOW_ERROR</TT>, and updating the source pointers + * with the next chunk of source when a successful error status is + * returned, until there are no more chunks of source data. + * @param converter the Unicode converter + * @param target I/O parameter. Input : Points to the beginning of the buffer to copy + * UChars into. Output : points to after the last UChar copied. + * @param targetLimit the pointer just after the end of the <TT>target</TT> buffer + * @param source I/O parameter, pointer to pointer to the source codepage buffer. + * @param sourceLimit the pointer to the byte after the end of the source buffer + * @param offsets if NULL is passed, nothing will happen to it, otherwise it needs to have the same number + * of allocated cells as <TT>target</TT>. Will fill in offsets from target to source pointer + * e.g: <TT>offsets[3]</TT> is equal to 6, it means that the <TT>target[3]</TT> was a result of transcoding <TT>source[6]</TT> + * For output data carried across calls, and other data without a specific source character + * (such as from escape sequences or callbacks) -1 will be placed for offsets. + * @param flush set to <TT>TRUE</TT> if the current source buffer is the last available + * chunk of the source, <TT>FALSE</TT> otherwise. Note that if a failing status is returned, + * this function may have to be called multiple times with flush set to <TT>TRUE</TT> until + * the source buffer is consumed. + * @param err the error status. <TT>U_ILLEGAL_ARGUMENT_ERROR</TT> will be set if the + * converter is <TT>NULL</TT>. + * <code>U_BUFFER_OVERFLOW_ERROR</code> will be set if the target is full and there is + * still data to be written to the target. + * @see ucnv_fromUChars + * @see ucnv_convert + * @see ucnv_getMinCharSize + * @see ucnv_setFromUCallBack + * @see ucnv_getNextUChar + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_toUnicode(UConverter *converter, + UChar **target, + const UChar *targetLimit, + const char **source, + const char *sourceLimit, + int32_t *offsets, + UBool flush, + UErrorCode *err); + +/** + * Convert the Unicode string into a codepage string using an existing UConverter. + * The output string is NUL-terminated if possible. + * + * This function is a more convenient but less powerful version of ucnv_fromUnicode(). + * It is only useful for whole strings, not for streaming conversion. + * + * The maximum output buffer capacity required (barring output from callbacks) will be + * UCNV_GET_MAX_BYTES_FOR_STRING(srcLength, ucnv_getMaxCharSize(cnv)). + * + * @param cnv the converter object to be used (ucnv_resetFromUnicode() will be called) + * @param src the input Unicode string + * @param srcLength the input string length, or -1 if NUL-terminated + * @param dest destination string buffer, can be NULL if destCapacity==0 + * @param destCapacity the number of chars available at dest + * @param pErrorCode normal ICU error code; + * common error codes that may be set by this function include + * U_BUFFER_OVERFLOW_ERROR, U_STRING_NOT_TERMINATED_WARNING, + * U_ILLEGAL_ARGUMENT_ERROR, and conversion errors + * @return the length of the output string, not counting the terminating NUL; + * if the length is greater than destCapacity, then the string will not fit + * and a buffer of the indicated length would need to be passed in + * @see ucnv_fromUnicode + * @see ucnv_convert + * @see UCNV_GET_MAX_BYTES_FOR_STRING + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucnv_fromUChars(UConverter *cnv, + char *dest, int32_t destCapacity, + const UChar *src, int32_t srcLength, + UErrorCode *pErrorCode); + +/** + * Convert the codepage string into a Unicode string using an existing UConverter. + * The output string is NUL-terminated if possible. + * + * This function is a more convenient but less powerful version of ucnv_toUnicode(). + * It is only useful for whole strings, not for streaming conversion. + * + * The maximum output buffer capacity required (barring output from callbacks) will be + * 2*srcLength (each char may be converted into a surrogate pair). + * + * @param cnv the converter object to be used (ucnv_resetToUnicode() will be called) + * @param src the input codepage string + * @param srcLength the input string length, or -1 if NUL-terminated + * @param dest destination string buffer, can be NULL if destCapacity==0 + * @param destCapacity the number of UChars available at dest + * @param pErrorCode normal ICU error code; + * common error codes that may be set by this function include + * U_BUFFER_OVERFLOW_ERROR, U_STRING_NOT_TERMINATED_WARNING, + * U_ILLEGAL_ARGUMENT_ERROR, and conversion errors + * @return the length of the output string, not counting the terminating NUL; + * if the length is greater than destCapacity, then the string will not fit + * and a buffer of the indicated length would need to be passed in + * @see ucnv_toUnicode + * @see ucnv_convert + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucnv_toUChars(UConverter *cnv, + UChar *dest, int32_t destCapacity, + const char *src, int32_t srcLength, + UErrorCode *pErrorCode); + +/** + * Convert a codepage buffer into Unicode one character at a time. + * The input is completely consumed when the U_INDEX_OUTOFBOUNDS_ERROR is set. + * + * Advantage compared to ucnv_toUnicode() or ucnv_toUChars(): + * - Faster for small amounts of data, for most converters, e.g., + * US-ASCII, ISO-8859-1, UTF-8/16/32, and most "normal" charsets. + * (For complex converters, e.g., SCSU, UTF-7 and ISO 2022 variants, + * it uses ucnv_toUnicode() internally.) + * - Convenient. + * + * Limitations compared to ucnv_toUnicode(): + * - Always assumes flush=TRUE. + * This makes ucnv_getNextUChar() unsuitable for "streaming" conversion, + * that is, for where the input is supplied in multiple buffers, + * because ucnv_getNextUChar() will assume the end of the input at the end + * of the first buffer. + * - Does not provide offset output. + * + * It is possible to "mix" ucnv_getNextUChar() and ucnv_toUnicode() because + * ucnv_getNextUChar() uses the current state of the converter + * (unlike ucnv_toUChars() which always resets first). + * However, if ucnv_getNextUChar() is called after ucnv_toUnicode() + * stopped in the middle of a character sequence (with flush=FALSE), + * then ucnv_getNextUChar() will always use the slower ucnv_toUnicode() + * internally until the next character boundary. + * (This is new in ICU 2.6. In earlier releases, ucnv_getNextUChar() had to + * start at a character boundary.) + * + * Instead of using ucnv_getNextUChar(), it is recommended + * to convert using ucnv_toUnicode() or ucnv_toUChars() + * and then iterate over the text using U16_NEXT() or a UCharIterator (uiter.h) + * or a C++ CharacterIterator or similar. + * This allows streaming conversion and offset output, for example. + * + * <p>Handling of surrogate pairs and supplementary-plane code points:<br> + * There are two different kinds of codepages that provide mappings for surrogate characters: + * <ul> + * <li>Codepages like UTF-8, UTF-32, and GB 18030 provide direct representations for Unicode + * code points U+10000-U+10ffff as well as for single surrogates U+d800-U+dfff. + * Each valid sequence will result in exactly one returned code point. + * If a sequence results in a single surrogate, then that will be returned + * by itself, even if a neighboring sequence encodes the matching surrogate.</li> + * <li>Codepages like SCSU and LMBCS (and UTF-16) provide direct representations only for BMP code points + * including surrogates. Code points in supplementary planes are represented with + * two sequences, each encoding a surrogate. + * For these codepages, matching pairs of surrogates will be combined into single + * code points for returning from this function. + * (Note that SCSU is actually a mix of these codepage types.)</li> + * </ul></p> + * + * @param converter an open UConverter + * @param source the address of a pointer to the codepage buffer, will be + * updated to point after the bytes consumed in the conversion call. + * @param sourceLimit points to the end of the input buffer + * @param err fills in error status (see ucnv_toUnicode) + * <code>U_INDEX_OUTOFBOUNDS_ERROR</code> will be set if the input + * is empty or does not convert to any output (e.g.: pure state-change + * codes SI/SO, escape sequences for ISO 2022, + * or if the callback did not output anything, ...). + * This function will not set a <code>U_BUFFER_OVERFLOW_ERROR</code> because + * the "buffer" is the return code. However, there might be subsequent output + * stored in the converter object + * that will be returned in following calls to this function. + * @return a UChar32 resulting from the partial conversion of source + * @see ucnv_toUnicode + * @see ucnv_toUChars + * @see ucnv_convert + * @stable ICU 2.0 + */ +U_STABLE UChar32 U_EXPORT2 +ucnv_getNextUChar(UConverter * converter, + const char **source, + const char * sourceLimit, + UErrorCode * err); + +/** + * Convert from one external charset to another using two existing UConverters. + * Internally, two conversions - ucnv_toUnicode() and ucnv_fromUnicode() - + * are used, "pivoting" through 16-bit Unicode. + * + * Important: For streaming conversion (multiple function calls for successive + * parts of a text stream), the caller must provide a pivot buffer explicitly, + * and must preserve the pivot buffer and associated pointers from one + * call to another. (The buffer may be moved if its contents and the relative + * pointer positions are preserved.) + * + * There is a similar function, ucnv_convert(), + * which has the following limitations: + * - it takes charset names, not converter objects, so that + * - two converters are opened for each call + * - only single-string conversion is possible, not streaming operation + * - it does not provide enough information to find out, + * in case of failure, whether the toUnicode or + * the fromUnicode conversion failed + * + * By contrast, ucnv_convertEx() + * - takes UConverter parameters instead of charset names + * - fully exposes the pivot buffer for streaming conversion and complete error handling + * + * ucnv_convertEx() also provides further convenience: + * - an option to reset the converters at the beginning + * (if reset==TRUE, see parameters; + * also sets *pivotTarget=*pivotSource=pivotStart) + * - allow NUL-terminated input + * (only a single NUL byte, will not work for charsets with multi-byte NULs) + * (if sourceLimit==NULL, see parameters) + * - terminate with a NUL on output + * (only a single NUL byte, not useful for charsets with multi-byte NULs), + * or set U_STRING_NOT_TERMINATED_WARNING if the output exactly fills + * the target buffer + * - the pivot buffer can be provided internally; + * possible only for whole-string conversion, not streaming conversion; + * in this case, the caller will not be able to get details about where an + * error occurred + * (if pivotStart==NULL, see below) + * + * The function returns when one of the following is true: + * - the entire source text has been converted successfully to the target buffer + * - a target buffer overflow occurred (U_BUFFER_OVERFLOW_ERROR) + * - a conversion error occurred + * (other U_FAILURE(), see description of pErrorCode) + * + * Limitation compared to the direct use of + * ucnv_fromUnicode() and ucnv_toUnicode(): + * ucnv_convertEx() does not provide offset information. + * + * Limitation compared to ucnv_fromUChars() and ucnv_toUChars(): + * ucnv_convertEx() does not support preflighting directly. + * + * Sample code for converting a single string from + * one external charset to UTF-8, ignoring the location of errors: + * + * \code + * int32_t + * myToUTF8(UConverter *cnv, + * const char *s, int32_t length, + * char *u8, int32_t capacity, + * UErrorCode *pErrorCode) { + * UConverter *utf8Cnv; + * char *target; + * + * if(U_FAILURE(*pErrorCode)) { + * return 0; + * } + * + * utf8Cnv=myGetCachedUTF8Converter(pErrorCode); + * if(U_FAILURE(*pErrorCode)) { + * return 0; + * } + * + * if(length<0) { + * length=strlen(s); + * } + * target=u8; + * ucnv_convertEx(utf8Cnv, cnv, + * &target, u8+capacity, + * &s, s+length, + * NULL, NULL, NULL, NULL, + * TRUE, TRUE, + * pErrorCode); + * + * myReleaseCachedUTF8Converter(utf8Cnv); + * + * // return the output string length, but without preflighting + * return (int32_t)(target-u8); + * } + * \endcode + * + * @param targetCnv Output converter, used to convert from the UTF-16 pivot + * to the target using ucnv_fromUnicode(). + * @param sourceCnv Input converter, used to convert from the source to + * the UTF-16 pivot using ucnv_toUnicode(). + * @param target I/O parameter, same as for ucnv_fromUChars(). + * Input: *target points to the beginning of the target buffer. + * Output: *target points to the first unit after the last char written. + * @param targetLimit Pointer to the first unit after the target buffer. + * @param source I/O parameter, same as for ucnv_toUChars(). + * Input: *source points to the beginning of the source buffer. + * Output: *source points to the first unit after the last char read. + * @param sourceLimit Pointer to the first unit after the source buffer. + * @param pivotStart Pointer to the UTF-16 pivot buffer. If pivotStart==NULL, + * then an internal buffer is used and the other pivot + * arguments are ignored and can be NULL as well. + * @param pivotSource I/O parameter, same as source in ucnv_fromUChars() for + * conversion from the pivot buffer to the target buffer. + * @param pivotTarget I/O parameter, same as target in ucnv_toUChars() for + * conversion from the source buffer to the pivot buffer. + * It must be pivotStart<=*pivotSource<=*pivotTarget<=pivotLimit + * and pivotStart<pivotLimit (unless pivotStart==NULL). + * @param pivotLimit Pointer to the first unit after the pivot buffer. + * @param reset If TRUE, then ucnv_resetToUnicode(sourceCnv) and + * ucnv_resetFromUnicode(targetCnv) are called, and the + * pivot pointers are reset (*pivotTarget=*pivotSource=pivotStart). + * @param flush If true, indicates the end of the input. + * Passed directly to ucnv_toUnicode(), and carried over to + * ucnv_fromUnicode() when the source is empty as well. + * @param pErrorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * U_BUFFER_OVERFLOW_ERROR always refers to the target buffer + * because overflows into the pivot buffer are handled internally. + * Other conversion errors are from the source-to-pivot + * conversion if *pivotSource==pivotStart, otherwise from + * the pivot-to-target conversion. + * + * @see ucnv_convert + * @see ucnv_fromAlgorithmic + * @see ucnv_toAlgorithmic + * @see ucnv_fromUnicode + * @see ucnv_toUnicode + * @see ucnv_fromUChars + * @see ucnv_toUChars + * @stable ICU 2.6 + */ +U_STABLE void U_EXPORT2 +ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv, + char **target, const char *targetLimit, + const char **source, const char *sourceLimit, + UChar *pivotStart, UChar **pivotSource, + UChar **pivotTarget, const UChar *pivotLimit, + UBool reset, UBool flush, + UErrorCode *pErrorCode); + +/** + * Convert from one external charset to another. + * Internally, two converters are opened according to the name arguments, + * then the text is converted to and from the 16-bit Unicode "pivot" + * using ucnv_convertEx(), then the converters are closed again. + * + * This is a convenience function, not an efficient way to convert a lot of text: + * ucnv_convert() + * - takes charset names, not converter objects, so that + * - two converters are opened for each call + * - only single-string conversion is possible, not streaming operation + * - does not provide enough information to find out, + * in case of failure, whether the toUnicode or + * the fromUnicode conversion failed + * - allows NUL-terminated input + * (only a single NUL byte, will not work for charsets with multi-byte NULs) + * (if sourceLength==-1, see parameters) + * - terminate with a NUL on output + * (only a single NUL byte, not useful for charsets with multi-byte NULs), + * or set U_STRING_NOT_TERMINATED_WARNING if the output exactly fills + * the target buffer + * - a pivot buffer is provided internally + * + * The function returns when one of the following is true: + * - the entire source text has been converted successfully to the target buffer + * and either the target buffer is terminated with a single NUL byte + * or the error code is set to U_STRING_NOT_TERMINATED_WARNING + * - a target buffer overflow occurred (U_BUFFER_OVERFLOW_ERROR) + * and the full output string length is returned ("preflighting") + * - a conversion error occurred + * (other U_FAILURE(), see description of pErrorCode) + * + * @param toConverterName The name of the converter that is used to convert + * from the UTF-16 pivot buffer to the target. + * @param fromConverterName The name of the converter that is used to convert + * from the source to the UTF-16 pivot buffer. + * @param target Pointer to the output buffer. + * @param targetCapacity Capacity of the target, in bytes. + * @param source Pointer to the input buffer. + * @param sourceLength Length of the input text, in bytes, or -1 for NUL-terminated input. + * @param pErrorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return Length of the complete output text in bytes, even if it exceeds the targetCapacity + * and a U_BUFFER_OVERFLOW_ERROR is set. + * + * @see ucnv_convertEx + * @see ucnv_fromAlgorithmic + * @see ucnv_toAlgorithmic + * @see ucnv_fromUnicode + * @see ucnv_toUnicode + * @see ucnv_fromUChars + * @see ucnv_toUChars + * @see ucnv_getNextUChar + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucnv_convert(const char *toConverterName, + const char *fromConverterName, + char *target, + int32_t targetCapacity, + const char *source, + int32_t sourceLength, + UErrorCode *pErrorCode); + +/** + * Convert from one external charset to another. + * Internally, the text is converted to and from the 16-bit Unicode "pivot" + * using ucnv_convertEx(). ucnv_toAlgorithmic() works exactly like ucnv_convert() + * except that the two converters need not be looked up and opened completely. + * + * The source-to-pivot conversion uses the cnv converter parameter. + * The pivot-to-target conversion uses a purely algorithmic converter + * according to the specified type, e.g., UCNV_UTF8 for a UTF-8 converter. + * + * Internally, the algorithmic converter is opened and closed for each + * function call, which is more efficient than using the public ucnv_open() + * but somewhat less efficient than only resetting an existing converter + * and using ucnv_convertEx(). + * + * This function is more convenient than ucnv_convertEx() for single-string + * conversions, especially when "preflighting" is desired (returning the length + * of the complete output even if it does not fit into the target buffer; + * see the User Guide Strings chapter). See ucnv_convert() for details. + * + * @param algorithmicType UConverterType constant identifying the desired target + * charset as a purely algorithmic converter. + * Those are converters for Unicode charsets like + * UTF-8, BOCU-1, SCSU, UTF-7, IMAP-mailbox-name, etc., + * as well as US-ASCII and ISO-8859-1. + * @param cnv The converter that is used to convert + * from the source to the UTF-16 pivot buffer. + * @param target Pointer to the output buffer. + * @param targetCapacity Capacity of the target, in bytes. + * @param source Pointer to the input buffer. + * @param sourceLength Length of the input text, in bytes + * @param pErrorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return Length of the complete output text in bytes, even if it exceeds the targetCapacity + * and a U_BUFFER_OVERFLOW_ERROR is set. + * + * @see ucnv_fromAlgorithmic + * @see ucnv_convert + * @see ucnv_convertEx + * @see ucnv_fromUnicode + * @see ucnv_toUnicode + * @see ucnv_fromUChars + * @see ucnv_toUChars + * @stable ICU 2.6 + */ +U_STABLE int32_t U_EXPORT2 +ucnv_toAlgorithmic(UConverterType algorithmicType, + UConverter *cnv, + char *target, int32_t targetCapacity, + const char *source, int32_t sourceLength, + UErrorCode *pErrorCode); + +/** + * Convert from one external charset to another. + * Internally, the text is converted to and from the 16-bit Unicode "pivot" + * using ucnv_convertEx(). ucnv_fromAlgorithmic() works exactly like ucnv_convert() + * except that the two converters need not be looked up and opened completely. + * + * The source-to-pivot conversion uses a purely algorithmic converter + * according to the specified type, e.g., UCNV_UTF8 for a UTF-8 converter. + * The pivot-to-target conversion uses the cnv converter parameter. + * + * Internally, the algorithmic converter is opened and closed for each + * function call, which is more efficient than using the public ucnv_open() + * but somewhat less efficient than only resetting an existing converter + * and using ucnv_convertEx(). + * + * This function is more convenient than ucnv_convertEx() for single-string + * conversions, especially when "preflighting" is desired (returning the length + * of the complete output even if it does not fit into the target buffer; + * see the User Guide Strings chapter). See ucnv_convert() for details. + * + * @param cnv The converter that is used to convert + * from the UTF-16 pivot buffer to the target. + * @param algorithmicType UConverterType constant identifying the desired source + * charset as a purely algorithmic converter. + * Those are converters for Unicode charsets like + * UTF-8, BOCU-1, SCSU, UTF-7, IMAP-mailbox-name, etc., + * as well as US-ASCII and ISO-8859-1. + * @param target Pointer to the output buffer. + * @param targetCapacity Capacity of the target, in bytes. + * @param source Pointer to the input buffer. + * @param sourceLength Length of the input text, in bytes + * @param pErrorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return Length of the complete output text in bytes, even if it exceeds the targetCapacity + * and a U_BUFFER_OVERFLOW_ERROR is set. + * + * @see ucnv_fromAlgorithmic + * @see ucnv_convert + * @see ucnv_convertEx + * @see ucnv_fromUnicode + * @see ucnv_toUnicode + * @see ucnv_fromUChars + * @see ucnv_toUChars + * @stable ICU 2.6 + */ +U_STABLE int32_t U_EXPORT2 +ucnv_fromAlgorithmic(UConverter *cnv, + UConverterType algorithmicType, + char *target, int32_t targetCapacity, + const char *source, int32_t sourceLength, + UErrorCode *pErrorCode); + +/** + * Frees up memory occupied by unused, cached converter shared data. + * + * @return the number of cached converters successfully deleted + * @see ucnv_close + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucnv_flushCache(void); + +/** + * Returns the number of available converters, as per the alias file. + * + * @return the number of available converters + * @see ucnv_getAvailableName + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucnv_countAvailable(void); + +/** + * Gets the canonical converter name of the specified converter from a list of + * all available converters contaied in the alias file. All converters + * in this list can be opened. + * + * @param n the index to a converter available on the system (in the range <TT>[0..ucnv_countAvaiable()]</TT>) + * @return a pointer a string (library owned), or <TT>NULL</TT> if the index is out of bounds. + * @see ucnv_countAvailable + * @stable ICU 2.0 + */ +U_STABLE const char* U_EXPORT2 +ucnv_getAvailableName(int32_t n); + +/** + * Returns a UEnumeration to enumerate all of the canonical converter + * names, as per the alias file, regardless of the ability to open each + * converter. + * + * @return A UEnumeration object for getting all the recognized canonical + * converter names. + * @see ucnv_getAvailableName + * @see uenum_close + * @see uenum_next + * @stable ICU 2.4 + */ +U_STABLE UEnumeration * U_EXPORT2 +ucnv_openAllNames(UErrorCode *pErrorCode); + +/** + * Gives the number of aliases for a given converter or alias name. + * If the alias is ambiguous, then the preferred converter is used + * and the status is set to U_AMBIGUOUS_ALIAS_WARNING. + * This method only enumerates the listed entries in the alias file. + * @param alias alias name + * @param pErrorCode error status + * @return number of names on alias list for given alias + * @stable ICU 2.0 + */ +U_STABLE uint16_t U_EXPORT2 +ucnv_countAliases(const char *alias, UErrorCode *pErrorCode); + +/** + * Gives the name of the alias at given index of alias list. + * This method only enumerates the listed entries in the alias file. + * If the alias is ambiguous, then the preferred converter is used + * and the status is set to U_AMBIGUOUS_ALIAS_WARNING. + * @param alias alias name + * @param n index in alias list + * @param pErrorCode result of operation + * @return returns the name of the alias at given index + * @see ucnv_countAliases + * @stable ICU 2.0 + */ +U_STABLE const char * U_EXPORT2 +ucnv_getAlias(const char *alias, uint16_t n, UErrorCode *pErrorCode); + +/** + * Fill-up the list of alias names for the given alias. + * This method only enumerates the listed entries in the alias file. + * If the alias is ambiguous, then the preferred converter is used + * and the status is set to U_AMBIGUOUS_ALIAS_WARNING. + * @param alias alias name + * @param aliases fill-in list, aliases is a pointer to an array of + * <code>ucnv_countAliases()</code> string-pointers + * (<code>const char *</code>) that will be filled in. + * The strings themselves are owned by the library. + * @param pErrorCode result of operation + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_getAliases(const char *alias, const char **aliases, UErrorCode *pErrorCode); + +/** + * Return a new UEnumeration object for enumerating all the + * alias names for a given converter that are recognized by a standard. + * This method only enumerates the listed entries in the alias file. + * The convrtrs.txt file can be modified to change the results of + * this function. + * The first result in this list is the same result given by + * <code>ucnv_getStandardName</code>, which is the default alias for + * the specified standard name. The returned object must be closed with + * <code>uenum_close</code> when you are done with the object. + * + * @param convName original converter name + * @param standard name of the standard governing the names; MIME and IANA + * are such standards + * @param pErrorCode The error code + * @return A UEnumeration object for getting all aliases that are recognized + * by a standard. If any of the parameters are invalid, NULL + * is returned. + * @see ucnv_getStandardName + * @see uenum_close + * @see uenum_next + * @stable ICU 2.2 + */ +U_STABLE UEnumeration * U_EXPORT2 +ucnv_openStandardNames(const char *convName, + const char *standard, + UErrorCode *pErrorCode); + +/** + * Gives the number of standards associated to converter names. + * @return number of standards + * @stable ICU 2.0 + */ +U_STABLE uint16_t U_EXPORT2 +ucnv_countStandards(void); + +/** + * Gives the name of the standard at given index of standard list. + * @param n index in standard list + * @param pErrorCode result of operation + * @return returns the name of the standard at given index. Owned by the library. + * @stable ICU 2.0 + */ +U_STABLE const char * U_EXPORT2 +ucnv_getStandard(uint16_t n, UErrorCode *pErrorCode); + +/** + * Returns a standard name for a given converter name. + * <p> + * Example alias table:<br> + * conv alias1 { STANDARD1 } alias2 { STANDARD1* } + * <p> + * Result of ucnv_getStandardName("conv", "STANDARD1") from example + * alias table:<br> + * <b>"alias2"</b> + * + * @param name original converter name + * @param standard name of the standard governing the names; MIME and IANA + * are such standards + * @param pErrorCode result of operation + * @return returns the standard converter name; + * if a standard converter name cannot be determined, + * then <code>NULL</code> is returned. Owned by the library. + * @stable ICU 2.0 + */ +U_STABLE const char * U_EXPORT2 +ucnv_getStandardName(const char *name, const char *standard, UErrorCode *pErrorCode); + +/** + * This function will return the internal canonical converter name of the + * tagged alias. This is the opposite of ucnv_openStandardNames, which + * returns the tagged alias given the canonical name. + * <p> + * Example alias table:<br> + * conv alias1 { STANDARD1 } alias2 { STANDARD1* } + * <p> + * Result of ucnv_getStandardName("alias1", "STANDARD1") from example + * alias table:<br> + * <b>"conv"</b> + * + * @return returns the canonical converter name; + * if a standard or alias name cannot be determined, + * then <code>NULL</code> is returned. The returned string is + * owned by the library. + * @see ucnv_getStandardName + * @stable ICU 2.4 + */ +U_STABLE const char * U_EXPORT2 +ucnv_getCanonicalName(const char *alias, const char *standard, UErrorCode *pErrorCode); + +/** + * Returns the current default converter name. If you want to open + * a default converter, you do not need to use this function. + * It is faster if you pass a NULL argument to ucnv_open the + * default converter. + * + * If U_CHARSET_IS_UTF8 is defined to 1 in utypes.h then this function + * always returns "UTF-8". + * + * @return returns the current default converter name. + * Storage owned by the library + * @see ucnv_setDefaultName + * @stable ICU 2.0 + */ +U_STABLE const char * U_EXPORT2 +ucnv_getDefaultName(void); + +#ifndef U_HIDE_SYSTEM_API +/** + * This function is not thread safe. DO NOT call this function when ANY ICU + * function is being used from more than one thread! This function sets the + * current default converter name. If this function needs to be called, it + * should be called during application initialization. Most of the time, the + * results from ucnv_getDefaultName() or ucnv_open with a NULL string argument + * is sufficient for your application. + * + * If U_CHARSET_IS_UTF8 is defined to 1 in utypes.h then this function + * does nothing. + * + * @param name the converter name to be the default (must be known by ICU). + * @see ucnv_getDefaultName + * @system + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_setDefaultName(const char *name); +#endif /* U_HIDE_SYSTEM_API */ + +/** + * Fixes the backslash character mismapping. For example, in SJIS, the backslash + * character in the ASCII portion is also used to represent the yen currency sign. + * When mapping from Unicode character 0x005C, it's unclear whether to map the + * character back to yen or backslash in SJIS. This function will take the input + * buffer and replace all the yen sign characters with backslash. This is necessary + * when the user tries to open a file with the input buffer on Windows. + * This function will test the converter to see whether such mapping is + * required. You can sometimes avoid using this function by using the correct version + * of Shift-JIS. + * + * @param cnv The converter representing the target codepage. + * @param source the input buffer to be fixed + * @param sourceLen the length of the input buffer + * @see ucnv_isAmbiguous + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_fixFileSeparator(const UConverter *cnv, UChar *source, int32_t sourceLen); + +/** + * Determines if the converter contains ambiguous mappings of the same + * character or not. + * @param cnv the converter to be tested + * @return TRUE if the converter contains ambiguous mapping of the same + * character, FALSE otherwise. + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +ucnv_isAmbiguous(const UConverter *cnv); + +/** + * Sets the converter to use fallback mappings or not. + * Regardless of this flag, the converter will always use + * fallbacks from Unicode Private Use code points, as well as + * reverse fallbacks (to Unicode). + * For details see ".ucm File Format" + * in the Conversion Data chapter of the ICU User Guide: + * http://www.icu-project.org/userguide/conversion-data.html#ucmformat + * + * @param cnv The converter to set the fallback mapping usage on. + * @param usesFallback TRUE if the user wants the converter to take advantage of the fallback + * mapping, FALSE otherwise. + * @stable ICU 2.0 + * @see ucnv_usesFallback + */ +U_STABLE void U_EXPORT2 +ucnv_setFallback(UConverter *cnv, UBool usesFallback); + +/** + * Determines if the converter uses fallback mappings or not. + * This flag has restrictions, see ucnv_setFallback(). + * + * @param cnv The converter to be tested + * @return TRUE if the converter uses fallback, FALSE otherwise. + * @stable ICU 2.0 + * @see ucnv_setFallback + */ +U_STABLE UBool U_EXPORT2 +ucnv_usesFallback(const UConverter *cnv); + +/** + * Detects Unicode signature byte sequences at the start of the byte stream + * and returns the charset name of the indicated Unicode charset. + * NULL is returned when no Unicode signature is recognized. + * The number of bytes in the signature is output as well. + * + * The caller can ucnv_open() a converter using the charset name. + * The first code unit (UChar) from the start of the stream will be U+FEFF + * (the Unicode BOM/signature character) and can usually be ignored. + * + * For most Unicode charsets it is also possible to ignore the indicated + * number of initial stream bytes and start converting after them. + * However, there are stateful Unicode charsets (UTF-7 and BOCU-1) for which + * this will not work. Therefore, it is best to ignore the first output UChar + * instead of the input signature bytes. + * <p> + * Usage: + * \snippet samples/ucnv/convsamp.cpp ucnv_detectUnicodeSignature + * + * @param source The source string in which the signature should be detected. + * @param sourceLength Length of the input string, or -1 if terminated with a NUL byte. + * @param signatureLength A pointer to int32_t to receive the number of bytes that make up the signature + * of the detected UTF. 0 if not detected. + * Can be a NULL pointer. + * @param pErrorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return The name of the encoding detected. NULL if encoding is not detected. + * @stable ICU 2.4 + */ +U_STABLE const char* U_EXPORT2 +ucnv_detectUnicodeSignature(const char* source, + int32_t sourceLength, + int32_t *signatureLength, + UErrorCode *pErrorCode); + +/** + * Returns the number of UChars held in the converter's internal state + * because more input is needed for completing the conversion. This function is + * useful for mapping semantics of ICU's converter interface to those of iconv, + * and this information is not needed for normal conversion. + * @param cnv The converter in which the input is held + * @param status ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return The number of UChars in the state. -1 if an error is encountered. + * @stable ICU 3.4 + */ +U_STABLE int32_t U_EXPORT2 +ucnv_fromUCountPending(const UConverter* cnv, UErrorCode* status); + +/** + * Returns the number of chars held in the converter's internal state + * because more input is needed for completing the conversion. This function is + * useful for mapping semantics of ICU's converter interface to those of iconv, + * and this information is not needed for normal conversion. + * @param cnv The converter in which the input is held as internal state + * @param status ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return The number of chars in the state. -1 if an error is encountered. + * @stable ICU 3.4 + */ +U_STABLE int32_t U_EXPORT2 +ucnv_toUCountPending(const UConverter* cnv, UErrorCode* status); + +/** + * Returns whether or not the charset of the converter has a fixed number of bytes + * per charset character. + * An example of this are converters that are of the type UCNV_SBCS or UCNV_DBCS. + * Another example is UTF-32 which is always 4 bytes per character. + * A Unicode code point may be represented by more than one UTF-8 or UTF-16 code unit + * but a UTF-32 converter encodes each code point with 4 bytes. + * Note: This method is not intended to be used to determine whether the charset has a + * fixed ratio of bytes to Unicode codes <i>units</i> for any particular Unicode encoding form. + * FALSE is returned with the UErrorCode if error occurs or cnv is NULL. + * @param cnv The converter to be tested + * @param status ICU error code in/out paramter + * @return TRUE if the converter is fixed-width + * @stable ICU 4.8 + */ +U_STABLE UBool U_EXPORT2 +ucnv_isFixedWidth(UConverter *cnv, UErrorCode *status); + +#endif + +#endif +/*_UCNV*/ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucnv_cb.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucnv_cb.h new file mode 100755 index 00000000..14169ed6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucnv_cb.h @@ -0,0 +1,164 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 2000-2004, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** + * ucnv_cb.h: + * External APIs for the ICU's codeset conversion library + * Helena Shih + * + * Modification History: + * + * Date Name Description + */ + +/** + * \file + * \brief C UConverter functions to aid the writers of callbacks + * + * <h2> Callback API for UConverter </h2> + * + * These functions are provided here for the convenience of the callback + * writer. If you are just looking for callback functions to use, please + * see ucnv_err.h. DO NOT call these functions directly when you are + * working with converters, unless your code has been called as a callback + * via ucnv_setFromUCallback or ucnv_setToUCallback !! + * + * A note about error codes and overflow. Unlike other ICU functions, + * these functions do not expect the error status to be U_ZERO_ERROR. + * Callbacks must be much more careful about their error codes. + * The error codes used here are in/out parameters, which should be passed + * back in the callback's error parameter. + * + * For example, if you call ucnv_cbfromUWriteBytes to write data out + * to the output codepage, it may return U_BUFFER_OVERFLOW_ERROR if + * the data did not fit in the target. But this isn't a failing error, + * in fact, ucnv_cbfromUWriteBytes may be called AGAIN with the error + * status still U_BUFFER_OVERFLOW_ERROR to attempt to write further bytes, + * which will also go into the internal overflow buffers. + * + * Concerning offsets, the 'offset' parameters here are relative to the start + * of SOURCE. For example, Suppose the string "ABCD" was being converted + * from Unicode into a codepage which doesn't have a mapping for 'B'. + * 'A' will be written out correctly, but + * The FromU Callback will be called on an unassigned character for 'B'. + * At this point, this is the state of the world: + * Target: A [..] [points after A] + * Source: A B [C] D [points to C - B has been consumed] + * 0 1 2 3 + * codePoint = "B" [the unassigned codepoint] + * + * Now, suppose a callback wants to write the substitution character '?' to + * the target. It calls ucnv_cbFromUWriteBytes() to write the ?. + * It should pass ZERO as the offset, because the offset as far as the + * callback is concerned is relative to the SOURCE pointer [which points + * before 'C'.] If the callback goes into the args and consumes 'C' also, + * it would call FromUWriteBytes with an offset of 1 (and advance the source + * pointer). + * + */ + +#ifndef UCNV_CB_H +#define UCNV_CB_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_CONVERSION + +#include "unicode/ucnv.h" +#include "unicode/ucnv_err.h" + +/** + * ONLY used by FromU callback functions. + * Writes out the specified byte output bytes to the target byte buffer or to converter internal buffers. + * + * @param args callback fromUnicode arguments + * @param source source bytes to write + * @param length length of bytes to write + * @param offsetIndex the relative offset index from callback. + * @param err error status. If <TT>U_BUFFER_OVERFLOW</TT> is returned, then U_BUFFER_OVERFLOW <STRONG>must</STRONG> + * be returned to the user, because it means that not all data could be written into the target buffer, and some is + * in the converter error buffer. + * @see ucnv_cbFromUWriteSub + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_cbFromUWriteBytes (UConverterFromUnicodeArgs *args, + const char* source, + int32_t length, + int32_t offsetIndex, + UErrorCode * err); + +/** + * ONLY used by FromU callback functions. + * This function will write out the correct substitution character sequence + * to the target. + * + * @param args callback fromUnicode arguments + * @param offsetIndex the relative offset index from the current source pointer to be used + * @param err error status. If <TT>U_BUFFER_OVERFLOW</TT> is returned, then U_BUFFER_OVERFLOW <STRONG>must</STRONG> + * be returned to the user, because it means that not all data could be written into the target buffer, and some is + * in the converter error buffer. + * @see ucnv_cbFromUWriteBytes + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucnv_cbFromUWriteSub (UConverterFromUnicodeArgs *args, + int32_t offsetIndex, + UErrorCode * err); + +/** + * ONLY used by fromU callback functions. + * This function will write out the error character(s) to the target UChar buffer. + * + * @param args callback fromUnicode arguments + * @param source pointer to pointer to first UChar to write [on exit: 1 after last UChar processed] + * @param sourceLimit pointer after last UChar to write + * @param offsetIndex the relative offset index from callback which will be set + * @param err error status <TT>U_BUFFER_OVERFLOW</TT> + * @see ucnv_cbToUWriteSub + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 ucnv_cbFromUWriteUChars(UConverterFromUnicodeArgs *args, + const UChar** source, + const UChar* sourceLimit, + int32_t offsetIndex, + UErrorCode * err); + +/** + * ONLY used by ToU callback functions. + * This function will write out the specified characters to the target + * UChar buffer. + * + * @param args callback toUnicode arguments + * @param source source string to write + * @param length the length of source string + * @param offsetIndex the relative offset index which will be written. + * @param err error status <TT>U_BUFFER_OVERFLOW</TT> + * @see ucnv_cbToUWriteSub + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 ucnv_cbToUWriteUChars (UConverterToUnicodeArgs *args, + const UChar* source, + int32_t length, + int32_t offsetIndex, + UErrorCode * err); + +/** + * ONLY used by ToU callback functions. + * This function will write out the Unicode substitution character (U+FFFD). + * + * @param args callback fromUnicode arguments + * @param offsetIndex the relative offset index from callback. + * @param err error status <TT>U_BUFFER_OVERFLOW</TT> + * @see ucnv_cbToUWriteUChars + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 ucnv_cbToUWriteSub (UConverterToUnicodeArgs *args, + int32_t offsetIndex, + UErrorCode * err); +#endif + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucnv_err.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucnv_err.h new file mode 100755 index 00000000..d234710a --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucnv_err.h @@ -0,0 +1,465 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 1999-2009, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** + * + * + * ucnv_err.h: + */ + +/** + * \file + * \brief C UConverter predefined error callbacks + * + * <h2>Error Behaviour Functions</h2> + * Defines some error behaviour functions called by ucnv_{from,to}Unicode + * These are provided as part of ICU and many are stable, but they + * can also be considered only as an example of what can be done with + * callbacks. You may of course write your own. + * + * If you want to write your own, you may also find the functions from + * ucnv_cb.h useful when writing your own callbacks. + * + * These functions, although public, should NEVER be called directly. + * They should be used as parameters to the ucnv_setFromUCallback + * and ucnv_setToUCallback functions, to set the behaviour of a converter + * when it encounters ILLEGAL/UNMAPPED/INVALID sequences. + * + * usage example: 'STOP' doesn't need any context, but newContext + * could be set to something other than 'NULL' if needed. The available + * contexts in this header can modify the default behavior of the callback. + * + * \code + * UErrorCode err = U_ZERO_ERROR; + * UConverter *myConverter = ucnv_open("ibm-949", &err); + * const void *oldContext; + * UConverterFromUCallback oldAction; + * + * + * if (U_SUCCESS(err)) + * { + * ucnv_setFromUCallBack(myConverter, + * UCNV_FROM_U_CALLBACK_STOP, + * NULL, + * &oldAction, + * &oldContext, + * &status); + * } + * \endcode + * + * The code above tells "myConverter" to stop when it encounters an + * ILLEGAL/TRUNCATED/INVALID sequences when it is used to convert from + * Unicode -> Codepage. The behavior from Codepage to Unicode is not changed, + * and ucnv_setToUCallBack would need to be called in order to change + * that behavior too. + * + * Here is an example with a context: + * + * \code + * UErrorCode err = U_ZERO_ERROR; + * UConverter *myConverter = ucnv_open("ibm-949", &err); + * const void *oldContext; + * UConverterFromUCallback oldAction; + * + * + * if (U_SUCCESS(err)) + * { + * ucnv_setToUCallBack(myConverter, + * UCNV_TO_U_CALLBACK_SUBSTITUTE, + * UCNV_SUB_STOP_ON_ILLEGAL, + * &oldAction, + * &oldContext, + * &status); + * } + * \endcode + * + * The code above tells "myConverter" to stop when it encounters an + * ILLEGAL/TRUNCATED/INVALID sequences when it is used to convert from + * Codepage -> Unicode. Any unmapped and legal characters will be + * substituted to be the default substitution character. + */ + +#ifndef UCNV_ERR_H +#define UCNV_ERR_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_CONVERSION + +/** Forward declaring the UConverter structure. @stable ICU 2.0 */ +struct UConverter; + +/** @stable ICU 2.0 */ +typedef struct UConverter UConverter; + +/** + * FROM_U, TO_U context options for sub callback + * @stable ICU 2.0 + */ +#define UCNV_SUB_STOP_ON_ILLEGAL "i" + +/** + * FROM_U, TO_U context options for skip callback + * @stable ICU 2.0 + */ +#define UCNV_SKIP_STOP_ON_ILLEGAL "i" + +/** + * FROM_U_CALLBACK_ESCAPE context option to escape the code unit according to ICU (%UXXXX) + * @stable ICU 2.0 + */ +#define UCNV_ESCAPE_ICU NULL +/** + * FROM_U_CALLBACK_ESCAPE context option to escape the code unit according to JAVA (\\uXXXX) + * @stable ICU 2.0 + */ +#define UCNV_ESCAPE_JAVA "J" +/** + * FROM_U_CALLBACK_ESCAPE context option to escape the code unit according to C (\\uXXXX \\UXXXXXXXX) + * TO_U_CALLBACK_ESCAPE option to escape the character value according to C (\\xXXXX) + * @stable ICU 2.0 + */ +#define UCNV_ESCAPE_C "C" +/** + * FROM_U_CALLBACK_ESCAPE context option to escape the code unit according to XML Decimal escape \htmlonly(&#DDDD;)\endhtmlonly + * TO_U_CALLBACK_ESCAPE context option to escape the character value according to XML Decimal escape \htmlonly(&#DDDD;)\endhtmlonly + * @stable ICU 2.0 + */ +#define UCNV_ESCAPE_XML_DEC "D" +/** + * FROM_U_CALLBACK_ESCAPE context option to escape the code unit according to XML Hex escape \htmlonly(&#xXXXX;)\endhtmlonly + * TO_U_CALLBACK_ESCAPE context option to escape the character value according to XML Hex escape \htmlonly(&#xXXXX;)\endhtmlonly + * @stable ICU 2.0 + */ +#define UCNV_ESCAPE_XML_HEX "X" +/** + * FROM_U_CALLBACK_ESCAPE context option to escape the code unit according to Unicode (U+XXXXX) + * @stable ICU 2.0 + */ +#define UCNV_ESCAPE_UNICODE "U" + +/** + * FROM_U_CALLBACK_ESCAPE context option to escape the code unit according to CSS2 conventions (\\HH..H<space>, that is, + * a backslash, 1..6 hex digits, and a space) + * @stable ICU 4.0 + */ +#define UCNV_ESCAPE_CSS2 "S" + +/** + * The process condition code to be used with the callbacks. + * Codes which are greater than UCNV_IRREGULAR should be + * passed on to any chained callbacks. + * @stable ICU 2.0 + */ +typedef enum { + UCNV_UNASSIGNED = 0, /**< The code point is unassigned. + The error code U_INVALID_CHAR_FOUND will be set. */ + UCNV_ILLEGAL = 1, /**< The code point is illegal. For example, + \\x81\\x2E is illegal in SJIS because \\x2E + is not a valid trail byte for the \\x81 + lead byte. + Also, starting with Unicode 3.0.1, non-shortest byte sequences + in UTF-8 (like \\xC1\\xA1 instead of \\x61 for U+0061) + are also illegal, not just irregular. + The error code U_ILLEGAL_CHAR_FOUND will be set. */ + UCNV_IRREGULAR = 2, /**< The codepoint is not a regular sequence in + the encoding. For example, \\xED\\xA0\\x80..\\xED\\xBF\\xBF + are irregular UTF-8 byte sequences for single surrogate + code points. + The error code U_INVALID_CHAR_FOUND will be set. */ + UCNV_RESET = 3, /**< The callback is called with this reason when a + 'reset' has occurred. Callback should reset all + state. */ + UCNV_CLOSE = 4, /**< Called when the converter is closed. The + callback should release any allocated memory.*/ + UCNV_CLONE = 5 /**< Called when ucnv_safeClone() is called on the + converter. the pointer available as the + 'context' is an alias to the original converters' + context pointer. If the context must be owned + by the new converter, the callback must clone + the data and call ucnv_setFromUCallback + (or setToUCallback) with the correct pointer. + @stable ICU 2.2 + */ +} UConverterCallbackReason; + + +/** + * The structure for the fromUnicode callback function parameter. + * @stable ICU 2.0 + */ +typedef struct { + uint16_t size; /**< The size of this struct. @stable ICU 2.0 */ + UBool flush; /**< The internal state of converter will be reset and data flushed if set to TRUE. @stable ICU 2.0 */ + UConverter *converter; /**< Pointer to the converter that is opened and to which this struct is passed as an argument. @stable ICU 2.0 */ + const UChar *source; /**< Pointer to the source source buffer. @stable ICU 2.0 */ + const UChar *sourceLimit; /**< Pointer to the limit (end + 1) of source buffer. @stable ICU 2.0 */ + char *target; /**< Pointer to the target buffer. @stable ICU 2.0 */ + const char *targetLimit; /**< Pointer to the limit (end + 1) of target buffer. @stable ICU 2.0 */ + int32_t *offsets; /**< Pointer to the buffer that receives the offsets. *offset = blah ; offset++;. @stable ICU 2.0 */ +} UConverterFromUnicodeArgs; + + +/** + * The structure for the toUnicode callback function parameter. + * @stable ICU 2.0 + */ +typedef struct { + uint16_t size; /**< The size of this struct @stable ICU 2.0 */ + UBool flush; /**< The internal state of converter will be reset and data flushed if set to TRUE. @stable ICU 2.0 */ + UConverter *converter; /**< Pointer to the converter that is opened and to which this struct is passed as an argument. @stable ICU 2.0 */ + const char *source; /**< Pointer to the source source buffer. @stable ICU 2.0 */ + const char *sourceLimit; /**< Pointer to the limit (end + 1) of source buffer. @stable ICU 2.0 */ + UChar *target; /**< Pointer to the target buffer. @stable ICU 2.0 */ + const UChar *targetLimit; /**< Pointer to the limit (end + 1) of target buffer. @stable ICU 2.0 */ + int32_t *offsets; /**< Pointer to the buffer that receives the offsets. *offset = blah ; offset++;. @stable ICU 2.0 */ +} UConverterToUnicodeArgs; + + +/** + * DO NOT CALL THIS FUNCTION DIRECTLY! + * This From Unicode callback STOPS at the ILLEGAL_SEQUENCE, + * returning the error code back to the caller immediately. + * + * @param context Pointer to the callback's private data + * @param fromUArgs Information about the conversion in progress + * @param codeUnits Points to 'length' UChars of the concerned Unicode sequence + * @param length Size (in bytes) of the concerned codepage sequence + * @param codePoint Single UChar32 (UTF-32) containing the concerend Unicode codepoint. + * @param reason Defines the reason the callback was invoked + * @param err This should always be set to a failure status prior to calling. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_STOP ( + const void *context, + UConverterFromUnicodeArgs *fromUArgs, + const UChar* codeUnits, + int32_t length, + UChar32 codePoint, + UConverterCallbackReason reason, + UErrorCode * err); + + + +/** + * DO NOT CALL THIS FUNCTION DIRECTLY! + * This To Unicode callback STOPS at the ILLEGAL_SEQUENCE, + * returning the error code back to the caller immediately. + * + * @param context Pointer to the callback's private data + * @param toUArgs Information about the conversion in progress + * @param codeUnits Points to 'length' bytes of the concerned codepage sequence + * @param length Size (in bytes) of the concerned codepage sequence + * @param reason Defines the reason the callback was invoked + * @param err This should always be set to a failure status prior to calling. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_STOP ( + const void *context, + UConverterToUnicodeArgs *toUArgs, + const char* codeUnits, + int32_t length, + UConverterCallbackReason reason, + UErrorCode * err); + +/** + * DO NOT CALL THIS FUNCTION DIRECTLY! + * This From Unicode callback skips any ILLEGAL_SEQUENCE, or + * skips only UNASSINGED_SEQUENCE depending on the context parameter + * simply ignoring those characters. + * + * @param context The function currently recognizes the callback options: + * UCNV_SKIP_STOP_ON_ILLEGAL: STOPS at the ILLEGAL_SEQUENCE, + * returning the error code back to the caller immediately. + * NULL: Skips any ILLEGAL_SEQUENCE + * @param fromUArgs Information about the conversion in progress + * @param codeUnits Points to 'length' UChars of the concerned Unicode sequence + * @param length Size (in bytes) of the concerned codepage sequence + * @param codePoint Single UChar32 (UTF-32) containing the concerend Unicode codepoint. + * @param reason Defines the reason the callback was invoked + * @param err Return value will be set to success if the callback was handled, + * otherwise this value will be set to a failure status. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_SKIP ( + const void *context, + UConverterFromUnicodeArgs *fromUArgs, + const UChar* codeUnits, + int32_t length, + UChar32 codePoint, + UConverterCallbackReason reason, + UErrorCode * err); + +/** + * DO NOT CALL THIS FUNCTION DIRECTLY! + * This From Unicode callback will Substitute the ILLEGAL SEQUENCE, or + * UNASSIGNED_SEQUENCE depending on context parameter, with the + * current substitution string for the converter. This is the default + * callback. + * + * @param context The function currently recognizes the callback options: + * UCNV_SUB_STOP_ON_ILLEGAL: STOPS at the ILLEGAL_SEQUENCE, + * returning the error code back to the caller immediately. + * NULL: Substitutes any ILLEGAL_SEQUENCE + * @param fromUArgs Information about the conversion in progress + * @param codeUnits Points to 'length' UChars of the concerned Unicode sequence + * @param length Size (in bytes) of the concerned codepage sequence + * @param codePoint Single UChar32 (UTF-32) containing the concerend Unicode codepoint. + * @param reason Defines the reason the callback was invoked + * @param err Return value will be set to success if the callback was handled, + * otherwise this value will be set to a failure status. + * @see ucnv_setSubstChars + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_SUBSTITUTE ( + const void *context, + UConverterFromUnicodeArgs *fromUArgs, + const UChar* codeUnits, + int32_t length, + UChar32 codePoint, + UConverterCallbackReason reason, + UErrorCode * err); + +/** + * DO NOT CALL THIS FUNCTION DIRECTLY! + * This From Unicode callback will Substitute the ILLEGAL SEQUENCE with the + * hexadecimal representation of the illegal codepoints + * + * @param context The function currently recognizes the callback options: + * <ul> + * <li>UCNV_ESCAPE_ICU: Substitues the ILLEGAL SEQUENCE with the hexadecimal + * representation in the format %UXXXX, e.g. "%uFFFE%u00AC%uC8FE"). + * In the Event the converter doesn't support the characters {%,U}[A-F][0-9], + * it will substitute the illegal sequence with the substitution characters. + * Note that codeUnit(32bit int eg: unit of a surrogate pair) is represented as + * %UD84D%UDC56</li> + * <li>UCNV_ESCAPE_JAVA: Substitues the ILLEGAL SEQUENCE with the hexadecimal + * representation in the format \\uXXXX, e.g. "\\uFFFE\\u00AC\\uC8FE"). + * In the Event the converter doesn't support the characters {\,u}[A-F][0-9], + * it will substitute the illegal sequence with the substitution characters. + * Note that codeUnit(32bit int eg: unit of a surrogate pair) is represented as + * \\uD84D\\uDC56</li> + * <li>UCNV_ESCAPE_C: Substitues the ILLEGAL SEQUENCE with the hexadecimal + * representation in the format \\uXXXX, e.g. "\\uFFFE\\u00AC\\uC8FE"). + * In the Event the converter doesn't support the characters {\,u,U}[A-F][0-9], + * it will substitute the illegal sequence with the substitution characters. + * Note that codeUnit(32bit int eg: unit of a surrogate pair) is represented as + * \\U00023456</li> + * <li>UCNV_ESCAPE_XML_DEC: Substitues the ILLEGAL SEQUENCE with the decimal + * representation in the format \htmlonly&#DDDDDDDD;, e.g. "&#65534;&#172;&#51454;")\endhtmlonly. + * In the Event the converter doesn't support the characters {&,#}[0-9], + * it will substitute the illegal sequence with the substitution characters. + * Note that codeUnit(32bit int eg: unit of a surrogate pair) is represented as + * &#144470; and Zero padding is ignored.</li> + * <li>UCNV_ESCAPE_XML_HEX:Substitues the ILLEGAL SEQUENCE with the decimal + * representation in the format \htmlonly&#xXXXX; e.g. "&#xFFFE;&#x00AC;&#xC8FE;")\endhtmlonly. + * In the Event the converter doesn't support the characters {&,#,x}[0-9], + * it will substitute the illegal sequence with the substitution characters. + * Note that codeUnit(32bit int eg: unit of a surrogate pair) is represented as + * \htmlonly&#x23456;\endhtmlonly</li> + * </ul> + * @param fromUArgs Information about the conversion in progress + * @param codeUnits Points to 'length' UChars of the concerned Unicode sequence + * @param length Size (in bytes) of the concerned codepage sequence + * @param codePoint Single UChar32 (UTF-32) containing the concerend Unicode codepoint. + * @param reason Defines the reason the callback was invoked + * @param err Return value will be set to success if the callback was handled, + * otherwise this value will be set to a failure status. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_ESCAPE ( + const void *context, + UConverterFromUnicodeArgs *fromUArgs, + const UChar* codeUnits, + int32_t length, + UChar32 codePoint, + UConverterCallbackReason reason, + UErrorCode * err); + + +/** + * DO NOT CALL THIS FUNCTION DIRECTLY! + * This To Unicode callback skips any ILLEGAL_SEQUENCE, or + * skips only UNASSINGED_SEQUENCE depending on the context parameter + * simply ignoring those characters. + * + * @param context The function currently recognizes the callback options: + * UCNV_SKIP_STOP_ON_ILLEGAL: STOPS at the ILLEGAL_SEQUENCE, + * returning the error code back to the caller immediately. + * NULL: Skips any ILLEGAL_SEQUENCE + * @param toUArgs Information about the conversion in progress + * @param codeUnits Points to 'length' bytes of the concerned codepage sequence + * @param length Size (in bytes) of the concerned codepage sequence + * @param reason Defines the reason the callback was invoked + * @param err Return value will be set to success if the callback was handled, + * otherwise this value will be set to a failure status. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_SKIP ( + const void *context, + UConverterToUnicodeArgs *toUArgs, + const char* codeUnits, + int32_t length, + UConverterCallbackReason reason, + UErrorCode * err); + +/** + * DO NOT CALL THIS FUNCTION DIRECTLY! + * This To Unicode callback will Substitute the ILLEGAL SEQUENCE,or + * UNASSIGNED_SEQUENCE depending on context parameter, with the + * Unicode substitution character, U+FFFD. + * + * @param context The function currently recognizes the callback options: + * UCNV_SUB_STOP_ON_ILLEGAL: STOPS at the ILLEGAL_SEQUENCE, + * returning the error code back to the caller immediately. + * NULL: Substitutes any ILLEGAL_SEQUENCE + * @param toUArgs Information about the conversion in progress + * @param codeUnits Points to 'length' bytes of the concerned codepage sequence + * @param length Size (in bytes) of the concerned codepage sequence + * @param reason Defines the reason the callback was invoked + * @param err Return value will be set to success if the callback was handled, + * otherwise this value will be set to a failure status. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_SUBSTITUTE ( + const void *context, + UConverterToUnicodeArgs *toUArgs, + const char* codeUnits, + int32_t length, + UConverterCallbackReason reason, + UErrorCode * err); + +/** + * DO NOT CALL THIS FUNCTION DIRECTLY! + * This To Unicode callback will Substitute the ILLEGAL SEQUENCE with the + * hexadecimal representation of the illegal bytes + * (in the format %XNN, e.g. "%XFF%X0A%XC8%X03"). + * + * @param context This function currently recognizes the callback options: + * UCNV_ESCAPE_ICU, UCNV_ESCAPE_JAVA, UCNV_ESCAPE_C, UCNV_ESCAPE_XML_DEC, + * UCNV_ESCAPE_XML_HEX and UCNV_ESCAPE_UNICODE. + * @param toUArgs Information about the conversion in progress + * @param codeUnits Points to 'length' bytes of the concerned codepage sequence + * @param length Size (in bytes) of the concerned codepage sequence + * @param reason Defines the reason the callback was invoked + * @param err Return value will be set to success if the callback was handled, + * otherwise this value will be set to a failure status. + * @stable ICU 2.0 + */ + +U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_ESCAPE ( + const void *context, + UConverterToUnicodeArgs *toUArgs, + const char* codeUnits, + int32_t length, + UConverterCallbackReason reason, + UErrorCode * err); + +#endif + +#endif + +/*UCNV_ERR_H*/ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucnvsel.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucnvsel.h new file mode 100755 index 00000000..d423845c --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucnvsel.h @@ -0,0 +1,189 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 2008-2011, International Business Machines +* Corporation, Google and others. All Rights Reserved. +* +******************************************************************************* +*/ +/* + * Author : eldawy@google.com (Mohamed Eldawy) + * ucnvsel.h + * + * Purpose: To generate a list of encodings capable of handling + * a given Unicode text + * + * Started 09-April-2008 + */ + +#ifndef __ICU_UCNV_SEL_H__ +#define __ICU_UCNV_SEL_H__ + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_CONVERSION + +#include "unicode/uset.h" +#include "unicode/utf16.h" +#include "unicode/uenum.h" +#include "unicode/ucnv.h" +#include "unicode/localpointer.h" + +/** + * \file + * + * A converter selector is built with a set of encoding/charset names + * and given an input string returns the set of names of the + * corresponding converters which can convert the string. + * + * A converter selector can be serialized into a buffer and reopened + * from the serialized form. + */ + +/** + * @{ + * The selector data structure + */ +struct UConverterSelector; +typedef struct UConverterSelector UConverterSelector; +/** @} */ + +/** + * Open a selector. + * If converterListSize is 0, build for all available converters. + * If excludedCodePoints is NULL, don't exclude any code points. + * + * @param converterList a pointer to encoding names needed to be involved. + * Can be NULL if converterListSize==0. + * The list and the names will be cloned, and the caller + * retains ownership of the original. + * @param converterListSize number of encodings in above list. + * If 0, builds a selector for all available converters. + * @param excludedCodePoints a set of code points to be excluded from consideration. + * That is, excluded code points in a string do not change + * the selection result. (They might be handled by a callback.) + * Use NULL to exclude nothing. + * @param whichSet what converter set to use? Use this to determine whether + * to consider only roundtrip mappings or also fallbacks. + * @param status an in/out ICU UErrorCode + * @return the new selector + * + * @stable ICU 4.2 + */ +U_STABLE UConverterSelector* U_EXPORT2 +ucnvsel_open(const char* const* converterList, int32_t converterListSize, + const USet* excludedCodePoints, + const UConverterUnicodeSet whichSet, UErrorCode* status); + +/** + * Closes a selector. + * If any Enumerations were returned by ucnv_select*, they become invalid. + * They can be closed before or after calling ucnv_closeSelector, + * but should never be used after the selector is closed. + * + * @see ucnv_selectForString + * @see ucnv_selectForUTF8 + * + * @param sel selector to close + * + * @stable ICU 4.2 + */ +U_STABLE void U_EXPORT2 +ucnvsel_close(UConverterSelector *sel); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUConverterSelectorPointer + * "Smart pointer" class, closes a UConverterSelector via ucnvsel_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUConverterSelectorPointer, UConverterSelector, ucnvsel_close); + +U_NAMESPACE_END + +#endif + +/** + * Open a selector from its serialized form. + * The buffer must remain valid and unchanged for the lifetime of the selector. + * This is much faster than creating a selector from scratch. + * Using a serialized form from a different machine (endianness/charset) is supported. + * + * @param buffer pointer to the serialized form of a converter selector; + * must be 32-bit-aligned + * @param length the capacity of this buffer (can be equal to or larger than + * the actual data length) + * @param status an in/out ICU UErrorCode + * @return the new selector + * + * @stable ICU 4.2 + */ +U_STABLE UConverterSelector* U_EXPORT2 +ucnvsel_openFromSerialized(const void* buffer, int32_t length, UErrorCode* status); + +/** + * Serialize a selector into a linear buffer. + * The serialized form is portable to different machines. + * + * @param sel selector to consider + * @param buffer pointer to 32-bit-aligned memory to be filled with the + * serialized form of this converter selector + * @param bufferCapacity the capacity of this buffer + * @param status an in/out ICU UErrorCode + * @return the required buffer capacity to hold serialize data (even if the call fails + * with a U_BUFFER_OVERFLOW_ERROR, it will return the required capacity) + * + * @stable ICU 4.2 + */ +U_STABLE int32_t U_EXPORT2 +ucnvsel_serialize(const UConverterSelector* sel, + void* buffer, int32_t bufferCapacity, UErrorCode* status); + +/** + * Select converters that can map all characters in a UTF-16 string, + * ignoring the excluded code points. + * + * @param sel a selector + * @param s UTF-16 string + * @param length length of the string, or -1 if NUL-terminated + * @param status an in/out ICU UErrorCode + * @return an enumeration containing encoding names. + * The returned encoding names and their order will be the same as + * supplied when building the selector. + * + * @stable ICU 4.2 + */ +U_STABLE UEnumeration * U_EXPORT2 +ucnvsel_selectForString(const UConverterSelector* sel, + const UChar *s, int32_t length, UErrorCode *status); + +/** + * Select converters that can map all characters in a UTF-8 string, + * ignoring the excluded code points. + * + * @param sel a selector + * @param s UTF-8 string + * @param length length of the string, or -1 if NUL-terminated + * @param status an in/out ICU UErrorCode + * @return an enumeration containing encoding names. + * The returned encoding names and their order will be the same as + * supplied when building the selector. + * + * @stable ICU 4.2 + */ +U_STABLE UEnumeration * U_EXPORT2 +ucnvsel_selectForUTF8(const UConverterSelector* sel, + const char *s, int32_t length, UErrorCode *status); + +#endif /* !UCONFIG_NO_CONVERSION */ + +#endif /* __ICU_UCNV_SEL_H__ */ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucol.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucol.h new file mode 100755 index 00000000..ecabd9e0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucol.h @@ -0,0 +1,1497 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (c) 1996-2015, International Business Machines Corporation and others. +* All Rights Reserved. +******************************************************************************* +*/ + +#ifndef UCOL_H +#define UCOL_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_COLLATION + +#include "unicode/unorm.h" +#include "unicode/localpointer.h" +#include "unicode/parseerr.h" +#include "unicode/uloc.h" +#include "unicode/uset.h" +#include "unicode/uscript.h" + +/** + * \file + * \brief C API: Collator + * + * <h2> Collator C API </h2> + * + * The C API for Collator performs locale-sensitive + * string comparison. You use this service to build + * searching and sorting routines for natural language text. + * <p> + * For more information about the collation service see + * <a href="http://userguide.icu-project.org/collation">the User Guide</a>. + * <p> + * Collation service provides correct sorting orders for most locales supported in ICU. + * If specific data for a locale is not available, the orders eventually falls back + * to the <a href="http://www.unicode.org/reports/tr35/tr35-collation.html#Root_Collation">CLDR root sort order</a>. + * <p> + * Sort ordering may be customized by providing your own set of rules. For more on + * this subject see the <a href="http://userguide.icu-project.org/collation/customization"> + * Collation Customization</a> section of the User Guide. + * <p> + * @see UCollationResult + * @see UNormalizationMode + * @see UCollationStrength + * @see UCollationElements + */ + +/** A collator. +* For usage in C programs. +*/ +struct UCollator; +/** structure representing a collator object instance + * @stable ICU 2.0 + */ +typedef struct UCollator UCollator; + + +/** + * UCOL_LESS is returned if source string is compared to be less than target + * string in the ucol_strcoll() method. + * UCOL_EQUAL is returned if source string is compared to be equal to target + * string in the ucol_strcoll() method. + * UCOL_GREATER is returned if source string is compared to be greater than + * target string in the ucol_strcoll() method. + * @see ucol_strcoll() + * <p> + * Possible values for a comparison result + * @stable ICU 2.0 + */ +typedef enum { + /** string a == string b */ + UCOL_EQUAL = 0, + /** string a > string b */ + UCOL_GREATER = 1, + /** string a < string b */ + UCOL_LESS = -1 +} UCollationResult ; + + +/** Enum containing attribute values for controling collation behavior. + * Here are all the allowable values. Not every attribute can take every value. The only + * universal value is UCOL_DEFAULT, which resets the attribute value to the predefined + * value for that locale + * @stable ICU 2.0 + */ +typedef enum { + /** accepted by most attributes */ + UCOL_DEFAULT = -1, + + /** Primary collation strength */ + UCOL_PRIMARY = 0, + /** Secondary collation strength */ + UCOL_SECONDARY = 1, + /** Tertiary collation strength */ + UCOL_TERTIARY = 2, + /** Default collation strength */ + UCOL_DEFAULT_STRENGTH = UCOL_TERTIARY, + UCOL_CE_STRENGTH_LIMIT, + /** Quaternary collation strength */ + UCOL_QUATERNARY=3, + /** Identical collation strength */ + UCOL_IDENTICAL=15, + UCOL_STRENGTH_LIMIT, + + /** Turn the feature off - works for UCOL_FRENCH_COLLATION, + UCOL_CASE_LEVEL, UCOL_HIRAGANA_QUATERNARY_MODE + & UCOL_DECOMPOSITION_MODE*/ + UCOL_OFF = 16, + /** Turn the feature on - works for UCOL_FRENCH_COLLATION, + UCOL_CASE_LEVEL, UCOL_HIRAGANA_QUATERNARY_MODE + & UCOL_DECOMPOSITION_MODE*/ + UCOL_ON = 17, + + /** Valid for UCOL_ALTERNATE_HANDLING. Alternate handling will be shifted */ + UCOL_SHIFTED = 20, + /** Valid for UCOL_ALTERNATE_HANDLING. Alternate handling will be non ignorable */ + UCOL_NON_IGNORABLE = 21, + + /** Valid for UCOL_CASE_FIRST - + lower case sorts before upper case */ + UCOL_LOWER_FIRST = 24, + /** upper case sorts before lower case */ + UCOL_UPPER_FIRST = 25, + +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UColAttributeValue value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UCOL_ATTRIBUTE_VALUE_COUNT +#endif /* U_HIDE_DEPRECATED_API */ +} UColAttributeValue; + +/** + * Enum containing the codes for reordering segments of the collation table that are not script + * codes. These reordering codes are to be used in conjunction with the script codes. + * @see ucol_getReorderCodes + * @see ucol_setReorderCodes + * @see ucol_getEquivalentReorderCodes + * @see UScriptCode + * @stable ICU 4.8 + */ + typedef enum { + /** + * A special reordering code that is used to specify the default + * reordering codes for a locale. + * @stable ICU 4.8 + */ + UCOL_REORDER_CODE_DEFAULT = -1, + /** + * A special reordering code that is used to specify no reordering codes. + * @stable ICU 4.8 + */ + UCOL_REORDER_CODE_NONE = USCRIPT_UNKNOWN, + /** + * A special reordering code that is used to specify all other codes used for + * reordering except for the codes lised as UColReorderCode values and those + * listed explicitly in a reordering. + * @stable ICU 4.8 + */ + UCOL_REORDER_CODE_OTHERS = USCRIPT_UNKNOWN, + /** + * Characters with the space property. + * This is equivalent to the rule value "space". + * @stable ICU 4.8 + */ + UCOL_REORDER_CODE_SPACE = 0x1000, + /** + * The first entry in the enumeration of reordering groups. This is intended for use in + * range checking and enumeration of the reorder codes. + * @stable ICU 4.8 + */ + UCOL_REORDER_CODE_FIRST = UCOL_REORDER_CODE_SPACE, + /** + * Characters with the punctuation property. + * This is equivalent to the rule value "punct". + * @stable ICU 4.8 + */ + UCOL_REORDER_CODE_PUNCTUATION = 0x1001, + /** + * Characters with the symbol property. + * This is equivalent to the rule value "symbol". + * @stable ICU 4.8 + */ + UCOL_REORDER_CODE_SYMBOL = 0x1002, + /** + * Characters with the currency property. + * This is equivalent to the rule value "currency". + * @stable ICU 4.8 + */ + UCOL_REORDER_CODE_CURRENCY = 0x1003, + /** + * Characters with the digit property. + * This is equivalent to the rule value "digit". + * @stable ICU 4.8 + */ + UCOL_REORDER_CODE_DIGIT = 0x1004, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UColReorderCode value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UCOL_REORDER_CODE_LIMIT = 0x1005 +#endif /* U_HIDE_DEPRECATED_API */ +} UColReorderCode; + +/** + * Base letter represents a primary difference. Set comparison + * level to UCOL_PRIMARY to ignore secondary and tertiary differences. + * Use this to set the strength of a Collator object. + * Example of primary difference, "abc" < "abd" + * + * Diacritical differences on the same base letter represent a secondary + * difference. Set comparison level to UCOL_SECONDARY to ignore tertiary + * differences. Use this to set the strength of a Collator object. + * Example of secondary difference, "ä" >> "a". + * + * Uppercase and lowercase versions of the same character represents a + * tertiary difference. Set comparison level to UCOL_TERTIARY to include + * all comparison differences. Use this to set the strength of a Collator + * object. + * Example of tertiary difference, "abc" <<< "ABC". + * + * Two characters are considered "identical" when they have the same + * unicode spellings. UCOL_IDENTICAL. + * For example, "ä" == "ä". + * + * UCollationStrength is also used to determine the strength of sort keys + * generated from UCollator objects + * These values can be now found in the UColAttributeValue enum. + * @stable ICU 2.0 + **/ +typedef UColAttributeValue UCollationStrength; + +/** Attributes that collation service understands. All the attributes can take UCOL_DEFAULT + * value, as well as the values specific to each one. + * @stable ICU 2.0 + */ +typedef enum { + /** Attribute for direction of secondary weights - used in Canadian French. + * Acceptable values are UCOL_ON, which results in secondary weights + * being considered backwards and UCOL_OFF which treats secondary + * weights in the order they appear. + * @stable ICU 2.0 + */ + UCOL_FRENCH_COLLATION, + /** Attribute for handling variable elements. + * Acceptable values are UCOL_NON_IGNORABLE (default) + * which treats all the codepoints with non-ignorable + * primary weights in the same way, + * and UCOL_SHIFTED which causes codepoints with primary + * weights that are equal or below the variable top value + * to be ignored on primary level and moved to the quaternary + * level. + * @stable ICU 2.0 + */ + UCOL_ALTERNATE_HANDLING, + /** Controls the ordering of upper and lower case letters. + * Acceptable values are UCOL_OFF (default), which orders + * upper and lower case letters in accordance to their tertiary + * weights, UCOL_UPPER_FIRST which forces upper case letters to + * sort before lower case letters, and UCOL_LOWER_FIRST which does + * the opposite. + * @stable ICU 2.0 + */ + UCOL_CASE_FIRST, + /** Controls whether an extra case level (positioned before the third + * level) is generated or not. Acceptable values are UCOL_OFF (default), + * when case level is not generated, and UCOL_ON which causes the case + * level to be generated. Contents of the case level are affected by + * the value of UCOL_CASE_FIRST attribute. A simple way to ignore + * accent differences in a string is to set the strength to UCOL_PRIMARY + * and enable case level. + * @stable ICU 2.0 + */ + UCOL_CASE_LEVEL, + /** Controls whether the normalization check and necessary normalizations + * are performed. When set to UCOL_OFF (default) no normalization check + * is performed. The correctness of the result is guaranteed only if the + * input data is in so-called FCD form (see users manual for more info). + * When set to UCOL_ON, an incremental check is performed to see whether + * the input data is in the FCD form. If the data is not in the FCD form, + * incremental NFD normalization is performed. + * @stable ICU 2.0 + */ + UCOL_NORMALIZATION_MODE, + /** An alias for UCOL_NORMALIZATION_MODE attribute. + * @stable ICU 2.0 + */ + UCOL_DECOMPOSITION_MODE = UCOL_NORMALIZATION_MODE, + /** The strength attribute. Can be either UCOL_PRIMARY, UCOL_SECONDARY, + * UCOL_TERTIARY, UCOL_QUATERNARY or UCOL_IDENTICAL. The usual strength + * for most locales (except Japanese) is tertiary. + * + * Quaternary strength + * is useful when combined with shifted setting for alternate handling + * attribute and for JIS X 4061 collation, when it is used to distinguish + * between Katakana and Hiragana. + * Otherwise, quaternary level + * is affected only by the number of non-ignorable code points in + * the string. + * + * Identical strength is rarely useful, as it amounts + * to codepoints of the NFD form of the string. + * @stable ICU 2.0 + */ + UCOL_STRENGTH, +#ifndef U_HIDE_DEPRECATED_API + /** When turned on, this attribute positions Hiragana before all + * non-ignorables on quaternary level This is a sneaky way to produce JIS + * sort order. + * + * This attribute was an implementation detail of the CLDR Japanese tailoring. + * Since ICU 50, this attribute is not settable any more via API functions. + * Since CLDR 25/ICU 53, explicit quaternary relations are used + * to achieve the same Japanese sort order. + * + * @deprecated ICU 50 Implementation detail, cannot be set via API, was removed from implementation. + */ + UCOL_HIRAGANA_QUATERNARY_MODE = UCOL_STRENGTH + 1, +#endif /* U_HIDE_DEPRECATED_API */ + /** + * When turned on, this attribute makes + * substrings of digits sort according to their numeric values. + * + * This is a way to get '100' to sort AFTER '2'. Note that the longest + * digit substring that can be treated as a single unit is + * 254 digits (not counting leading zeros). If a digit substring is + * longer than that, the digits beyond the limit will be treated as a + * separate digit substring. + * + * A "digit" in this sense is a code point with General_Category=Nd, + * which does not include circled numbers, roman numerals, etc. + * Only a contiguous digit substring is considered, that is, + * non-negative integers without separators. + * There is no support for plus/minus signs, decimals, exponents, etc. + * + * @stable ICU 2.8 + */ + UCOL_NUMERIC_COLLATION = UCOL_STRENGTH + 2, + + /* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API, + * it is needed for layout of RuleBasedCollator object. */ + /** + * One more than the highest normal UColAttribute value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UCOL_ATTRIBUTE_COUNT +} UColAttribute; + +/** Options for retrieving the rule string + * @stable ICU 2.0 + */ +typedef enum { + /** + * Retrieves the tailoring rules only. + * Same as calling the version of getRules() without UColRuleOption. + * @stable ICU 2.0 + */ + UCOL_TAILORING_ONLY, + /** + * Retrieves the "UCA rules" concatenated with the tailoring rules. + * The "UCA rules" are an <i>approximation</i> of the root collator's sort order. + * They are almost never used or useful at runtime and can be removed from the data. + * See http://userguide.icu-project.org/collation/customization#TOC-Building-on-Existing-Locales + * @stable ICU 2.0 + */ + UCOL_FULL_RULES +} UColRuleOption ; + +/** + * Open a UCollator for comparing strings. + * + * For some languages, multiple collation types are available; + * for example, "de@collation=phonebook". + * Starting with ICU 54, collation attributes can be specified via locale keywords as well, + * in the old locale extension syntax ("el@colCaseFirst=upper") + * or in language tag syntax ("el-u-kf-upper"). + * See <a href="http://userguide.icu-project.org/collation/api">User Guide: Collation API</a>. + * + * The UCollator pointer is used in all the calls to the Collation + * service. After finished, collator must be disposed of by calling + * {@link #ucol_close }. + * @param loc The locale containing the required collation rules. + * Special values for locales can be passed in - + * if NULL is passed for the locale, the default locale + * collation rules will be used. If empty string ("") or + * "root" are passed, the root collator will be returned. + * @param status A pointer to a UErrorCode to receive any errors + * @return A pointer to a UCollator, or 0 if an error occurred. + * @see ucol_openRules + * @see ucol_safeClone + * @see ucol_close + * @stable ICU 2.0 + */ +U_STABLE UCollator* U_EXPORT2 +ucol_open(const char *loc, UErrorCode *status); + +/** + * Produce a UCollator instance according to the rules supplied. + * The rules are used to change the default ordering, defined in the + * UCA in a process called tailoring. The resulting UCollator pointer + * can be used in the same way as the one obtained by {@link #ucol_strcoll }. + * @param rules A string describing the collation rules. For the syntax + * of the rules please see users guide. + * @param rulesLength The length of rules, or -1 if null-terminated. + * @param normalizationMode The normalization mode: One of + * UCOL_OFF (expect the text to not need normalization), + * UCOL_ON (normalize), or + * UCOL_DEFAULT (set the mode according to the rules) + * @param strength The default collation strength; one of UCOL_PRIMARY, UCOL_SECONDARY, + * UCOL_TERTIARY, UCOL_IDENTICAL,UCOL_DEFAULT_STRENGTH - can be also set in the rules. + * @param parseError A pointer to UParseError to recieve information about errors + * occurred during parsing. This argument can currently be set + * to NULL, but at users own risk. Please provide a real structure. + * @param status A pointer to a UErrorCode to receive any errors + * @return A pointer to a UCollator. It is not guaranteed that NULL be returned in case + * of error - please use status argument to check for errors. + * @see ucol_open + * @see ucol_safeClone + * @see ucol_close + * @stable ICU 2.0 + */ +U_STABLE UCollator* U_EXPORT2 +ucol_openRules( const UChar *rules, + int32_t rulesLength, + UColAttributeValue normalizationMode, + UCollationStrength strength, + UParseError *parseError, + UErrorCode *status); + +#ifndef U_HIDE_DEPRECATED_API +/** + * Open a collator defined by a short form string. + * The structure and the syntax of the string is defined in the "Naming collators" + * section of the users guide: + * http://userguide.icu-project.org/collation/concepts#TOC-Collator-naming-scheme + * Attributes are overriden by the subsequent attributes. So, for "S2_S3", final + * strength will be 3. 3066bis locale overrides individual locale parts. + * The call to this function is equivalent to a call to ucol_open, followed by a + * series of calls to ucol_setAttribute and ucol_setVariableTop. + * @param definition A short string containing a locale and a set of attributes. + * Attributes not explicitly mentioned are left at the default + * state for a locale. + * @param parseError if not NULL, structure that will get filled with error's pre + * and post context in case of error. + * @param forceDefaults if FALSE, the settings that are the same as the collator + * default settings will not be applied (for example, setting + * French secondary on a French collator would not be executed). + * If TRUE, all the settings will be applied regardless of the + * collator default value. If the definition + * strings are to be cached, should be set to FALSE. + * @param status Error code. Apart from regular error conditions connected to + * instantiating collators (like out of memory or similar), this + * API will return an error if an invalid attribute or attribute/value + * combination is specified. + * @return A pointer to a UCollator or 0 if an error occured (including an + * invalid attribute). + * @see ucol_open + * @see ucol_setAttribute + * @see ucol_setVariableTop + * @see ucol_getShortDefinitionString + * @see ucol_normalizeShortDefinitionString + * @deprecated ICU 54 Use ucol_open() with language tag collation keywords instead. + */ +U_DEPRECATED UCollator* U_EXPORT2 +ucol_openFromShortString( const char *definition, + UBool forceDefaults, + UParseError *parseError, + UErrorCode *status); +#endif /* U_HIDE_DEPRECATED_API */ + +#ifndef U_HIDE_DEPRECATED_API +/** + * Get a set containing the contractions defined by the collator. The set includes + * both the root collator's contractions and the contractions defined by the collator. This set + * will contain only strings. If a tailoring explicitly suppresses contractions from + * the root collator (like Russian), removed contractions will not be in the resulting set. + * @param coll collator + * @param conts the set to hold the result. It gets emptied before + * contractions are added. + * @param status to hold the error code + * @return the size of the contraction set + * + * @deprecated ICU 3.4, use ucol_getContractionsAndExpansions instead + */ +U_DEPRECATED int32_t U_EXPORT2 +ucol_getContractions( const UCollator *coll, + USet *conts, + UErrorCode *status); +#endif /* U_HIDE_DEPRECATED_API */ + +/** + * Get a set containing the expansions defined by the collator. The set includes + * both the root collator's expansions and the expansions defined by the tailoring + * @param coll collator + * @param contractions if not NULL, the set to hold the contractions + * @param expansions if not NULL, the set to hold the expansions + * @param addPrefixes add the prefix contextual elements to contractions + * @param status to hold the error code + * + * @stable ICU 3.4 + */ +U_STABLE void U_EXPORT2 +ucol_getContractionsAndExpansions( const UCollator *coll, + USet *contractions, USet *expansions, + UBool addPrefixes, UErrorCode *status); + +/** + * Close a UCollator. + * Once closed, a UCollator should not be used. Every open collator should + * be closed. Otherwise, a memory leak will result. + * @param coll The UCollator to close. + * @see ucol_open + * @see ucol_openRules + * @see ucol_safeClone + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucol_close(UCollator *coll); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUCollatorPointer + * "Smart pointer" class, closes a UCollator via ucol_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUCollatorPointer, UCollator, ucol_close); + +U_NAMESPACE_END + +#endif + +/** + * Compare two strings. + * The strings will be compared using the options already specified. + * @param coll The UCollator containing the comparison rules. + * @param source The source string. + * @param sourceLength The length of source, or -1 if null-terminated. + * @param target The target string. + * @param targetLength The length of target, or -1 if null-terminated. + * @return The result of comparing the strings; one of UCOL_EQUAL, + * UCOL_GREATER, UCOL_LESS + * @see ucol_greater + * @see ucol_greaterOrEqual + * @see ucol_equal + * @stable ICU 2.0 + */ +U_STABLE UCollationResult U_EXPORT2 +ucol_strcoll( const UCollator *coll, + const UChar *source, + int32_t sourceLength, + const UChar *target, + int32_t targetLength); + +/** +* Compare two strings in UTF-8. +* The strings will be compared using the options already specified. +* Note: When input string contains malformed a UTF-8 byte sequence, +* this function treats these bytes as REPLACEMENT CHARACTER (U+FFFD). +* @param coll The UCollator containing the comparison rules. +* @param source The source UTF-8 string. +* @param sourceLength The length of source, or -1 if null-terminated. +* @param target The target UTF-8 string. +* @param targetLength The length of target, or -1 if null-terminated. +* @param status A pointer to a UErrorCode to receive any errors +* @return The result of comparing the strings; one of UCOL_EQUAL, +* UCOL_GREATER, UCOL_LESS +* @see ucol_greater +* @see ucol_greaterOrEqual +* @see ucol_equal +* @stable ICU 50 +*/ +U_STABLE UCollationResult U_EXPORT2 +ucol_strcollUTF8( + const UCollator *coll, + const char *source, + int32_t sourceLength, + const char *target, + int32_t targetLength, + UErrorCode *status); + +/** + * Determine if one string is greater than another. + * This function is equivalent to {@link #ucol_strcoll } == UCOL_GREATER + * @param coll The UCollator containing the comparison rules. + * @param source The source string. + * @param sourceLength The length of source, or -1 if null-terminated. + * @param target The target string. + * @param targetLength The length of target, or -1 if null-terminated. + * @return TRUE if source is greater than target, FALSE otherwise. + * @see ucol_strcoll + * @see ucol_greaterOrEqual + * @see ucol_equal + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +ucol_greater(const UCollator *coll, + const UChar *source, int32_t sourceLength, + const UChar *target, int32_t targetLength); + +/** + * Determine if one string is greater than or equal to another. + * This function is equivalent to {@link #ucol_strcoll } != UCOL_LESS + * @param coll The UCollator containing the comparison rules. + * @param source The source string. + * @param sourceLength The length of source, or -1 if null-terminated. + * @param target The target string. + * @param targetLength The length of target, or -1 if null-terminated. + * @return TRUE if source is greater than or equal to target, FALSE otherwise. + * @see ucol_strcoll + * @see ucol_greater + * @see ucol_equal + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +ucol_greaterOrEqual(const UCollator *coll, + const UChar *source, int32_t sourceLength, + const UChar *target, int32_t targetLength); + +/** + * Compare two strings for equality. + * This function is equivalent to {@link #ucol_strcoll } == UCOL_EQUAL + * @param coll The UCollator containing the comparison rules. + * @param source The source string. + * @param sourceLength The length of source, or -1 if null-terminated. + * @param target The target string. + * @param targetLength The length of target, or -1 if null-terminated. + * @return TRUE if source is equal to target, FALSE otherwise + * @see ucol_strcoll + * @see ucol_greater + * @see ucol_greaterOrEqual + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +ucol_equal(const UCollator *coll, + const UChar *source, int32_t sourceLength, + const UChar *target, int32_t targetLength); + +/** + * Compare two UTF-8 encoded trings. + * The strings will be compared using the options already specified. + * @param coll The UCollator containing the comparison rules. + * @param sIter The source string iterator. + * @param tIter The target string iterator. + * @return The result of comparing the strings; one of UCOL_EQUAL, + * UCOL_GREATER, UCOL_LESS + * @param status A pointer to a UErrorCode to receive any errors + * @see ucol_strcoll + * @stable ICU 2.6 + */ +U_STABLE UCollationResult U_EXPORT2 +ucol_strcollIter( const UCollator *coll, + UCharIterator *sIter, + UCharIterator *tIter, + UErrorCode *status); + +/** + * Get the collation strength used in a UCollator. + * The strength influences how strings are compared. + * @param coll The UCollator to query. + * @return The collation strength; one of UCOL_PRIMARY, UCOL_SECONDARY, + * UCOL_TERTIARY, UCOL_QUATERNARY, UCOL_IDENTICAL + * @see ucol_setStrength + * @stable ICU 2.0 + */ +U_STABLE UCollationStrength U_EXPORT2 +ucol_getStrength(const UCollator *coll); + +/** + * Set the collation strength used in a UCollator. + * The strength influences how strings are compared. + * @param coll The UCollator to set. + * @param strength The desired collation strength; one of UCOL_PRIMARY, + * UCOL_SECONDARY, UCOL_TERTIARY, UCOL_QUATERNARY, UCOL_IDENTICAL, UCOL_DEFAULT + * @see ucol_getStrength + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucol_setStrength(UCollator *coll, + UCollationStrength strength); + +/** + * Retrieves the reordering codes for this collator. + * These reordering codes are a combination of UScript codes and UColReorderCode entries. + * @param coll The UCollator to query. + * @param dest The array to fill with the script ordering. + * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function + * will only return the length of the result without writing any codes (pre-flighting). + * @param pErrorCode Must be a valid pointer to an error code value, which must not indicate a + * failure before the function call. + * @return The number of reordering codes written to the dest array. + * @see ucol_setReorderCodes + * @see ucol_getEquivalentReorderCodes + * @see UScriptCode + * @see UColReorderCode + * @stable ICU 4.8 + */ +U_STABLE int32_t U_EXPORT2 +ucol_getReorderCodes(const UCollator* coll, + int32_t* dest, + int32_t destCapacity, + UErrorCode *pErrorCode); +/** + * Sets the reordering codes for this collator. + * Collation reordering allows scripts and some other groups of characters + * to be moved relative to each other. This reordering is done on top of + * the DUCET/CLDR standard collation order. Reordering can specify groups to be placed + * at the start and/or the end of the collation order. These groups are specified using + * UScript codes and UColReorderCode entries. + * + * <p>By default, reordering codes specified for the start of the order are placed in the + * order given after several special non-script blocks. These special groups of characters + * are space, punctuation, symbol, currency, and digit. These special groups are represented with + * UColReorderCode entries. Script groups can be intermingled with + * these special non-script groups if those special groups are explicitly specified in the reordering. + * + * <p>The special code OTHERS stands for any script that is not explicitly + * mentioned in the list of reordering codes given. Anything that is after OTHERS + * will go at the very end of the reordering in the order given. + * + * <p>The special reorder code DEFAULT will reset the reordering for this collator + * to the default for this collator. The default reordering may be the DUCET/CLDR order or may be a reordering that + * was specified when this collator was created from resource data or from rules. The + * DEFAULT code <b>must</b> be the sole code supplied when it is used. + * If not, then U_ILLEGAL_ARGUMENT_ERROR will be set. + * + * <p>The special reorder code NONE will remove any reordering for this collator. + * The result of setting no reordering will be to have the DUCET/CLDR ordering used. The + * NONE code <b>must</b> be the sole code supplied when it is used. + * + * @param coll The UCollator to set. + * @param reorderCodes An array of script codes in the new order. This can be NULL if the + * length is also set to 0. An empty array will clear any reordering codes on the collator. + * @param reorderCodesLength The length of reorderCodes. + * @param pErrorCode Must be a valid pointer to an error code value, which must not indicate a + * failure before the function call. + * @see ucol_getReorderCodes + * @see ucol_getEquivalentReorderCodes + * @see UScriptCode + * @see UColReorderCode + * @stable ICU 4.8 + */ +U_STABLE void U_EXPORT2 +ucol_setReorderCodes(UCollator* coll, + const int32_t* reorderCodes, + int32_t reorderCodesLength, + UErrorCode *pErrorCode); + +/** + * Retrieves the reorder codes that are grouped with the given reorder code. Some reorder + * codes will be grouped and must reorder together. + * Beginning with ICU 55, scripts only reorder together if they are primary-equal, + * for example Hiragana and Katakana. + * + * @param reorderCode The reorder code to determine equivalence for. + * @param dest The array to fill with the script ordering. + * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function + * will only return the length of the result without writing any codes (pre-flighting). + * @param pErrorCode Must be a valid pointer to an error code value, which must not indicate + * a failure before the function call. + * @return The number of reordering codes written to the dest array. + * @see ucol_setReorderCodes + * @see ucol_getReorderCodes + * @see UScriptCode + * @see UColReorderCode + * @stable ICU 4.8 + */ +U_STABLE int32_t U_EXPORT2 +ucol_getEquivalentReorderCodes(int32_t reorderCode, + int32_t* dest, + int32_t destCapacity, + UErrorCode *pErrorCode); + +/** + * Get the display name for a UCollator. + * The display name is suitable for presentation to a user. + * @param objLoc The locale of the collator in question. + * @param dispLoc The locale for display. + * @param result A pointer to a buffer to receive the attribute. + * @param resultLength The maximum size of result. + * @param status A pointer to a UErrorCode to receive any errors + * @return The total buffer size needed; if greater than resultLength, + * the output was truncated. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucol_getDisplayName( const char *objLoc, + const char *dispLoc, + UChar *result, + int32_t resultLength, + UErrorCode *status); + +/** + * Get a locale for which collation rules are available. + * A UCollator in a locale returned by this function will perform the correct + * collation for the locale. + * @param localeIndex The index of the desired locale. + * @return A locale for which collation rules are available, or 0 if none. + * @see ucol_countAvailable + * @stable ICU 2.0 + */ +U_STABLE const char* U_EXPORT2 +ucol_getAvailable(int32_t localeIndex); + +/** + * Determine how many locales have collation rules available. + * This function is most useful as determining the loop ending condition for + * calls to {@link #ucol_getAvailable }. + * @return The number of locales for which collation rules are available. + * @see ucol_getAvailable + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucol_countAvailable(void); + +#if !UCONFIG_NO_SERVICE +/** + * Create a string enumerator of all locales for which a valid + * collator may be opened. + * @param status input-output error code + * @return a string enumeration over locale strings. The caller is + * responsible for closing the result. + * @stable ICU 3.0 + */ +U_STABLE UEnumeration* U_EXPORT2 +ucol_openAvailableLocales(UErrorCode *status); +#endif + +/** + * Create a string enumerator of all possible keywords that are relevant to + * collation. At this point, the only recognized keyword for this + * service is "collation". + * @param status input-output error code + * @return a string enumeration over locale strings. The caller is + * responsible for closing the result. + * @stable ICU 3.0 + */ +U_STABLE UEnumeration* U_EXPORT2 +ucol_getKeywords(UErrorCode *status); + +/** + * Given a keyword, create a string enumeration of all values + * for that keyword that are currently in use. + * @param keyword a particular keyword as enumerated by + * ucol_getKeywords. If any other keyword is passed in, *status is set + * to U_ILLEGAL_ARGUMENT_ERROR. + * @param status input-output error code + * @return a string enumeration over collation keyword values, or NULL + * upon error. The caller is responsible for closing the result. + * @stable ICU 3.0 + */ +U_STABLE UEnumeration* U_EXPORT2 +ucol_getKeywordValues(const char *keyword, UErrorCode *status); + +/** + * Given a key and a locale, returns an array of string values in a preferred + * order that would make a difference. These are all and only those values where + * the open (creation) of the service with the locale formed from the input locale + * plus input keyword and that value has different behavior than creation with the + * input locale alone. + * @param key one of the keys supported by this service. For now, only + * "collation" is supported. + * @param locale the locale + * @param commonlyUsed if set to true it will return only commonly used values + * with the given locale in preferred order. Otherwise, + * it will return all the available values for the locale. + * @param status error status + * @return a string enumeration over keyword values for the given key and the locale. + * @stable ICU 4.2 + */ +U_STABLE UEnumeration* U_EXPORT2 +ucol_getKeywordValuesForLocale(const char* key, + const char* locale, + UBool commonlyUsed, + UErrorCode* status); + +/** + * Return the functionally equivalent locale for the specified + * input locale, with respect to given keyword, for the + * collation service. If two different input locale + keyword + * combinations produce the same result locale, then collators + * instantiated for these two different input locales will behave + * equivalently. The converse is not always true; two collators + * may in fact be equivalent, but return different results, due to + * internal details. The return result has no other meaning than + * that stated above, and implies nothing as to the relationship + * between the two locales. This is intended for use by + * applications who wish to cache collators, or otherwise reuse + * collators when possible. The functional equivalent may change + * over time. For more information, please see the <a + * href="http://userguide.icu-project.org/locale#TOC-Locales-and-Services"> + * Locales and Services</a> section of the ICU User Guide. + * @param result fillin for the functionally equivalent result locale + * @param resultCapacity capacity of the fillin buffer + * @param keyword a particular keyword as enumerated by + * ucol_getKeywords. + * @param locale the specified input locale + * @param isAvailable if non-NULL, pointer to a fillin parameter that + * on return indicates whether the specified input locale was 'available' + * to the collation service. A locale is defined as 'available' if it + * physically exists within the collation locale data. + * @param status pointer to input-output error code + * @return the actual buffer size needed for the locale. If greater + * than resultCapacity, the returned full name will be truncated and + * an error code will be returned. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +ucol_getFunctionalEquivalent(char* result, int32_t resultCapacity, + const char* keyword, const char* locale, + UBool* isAvailable, UErrorCode* status); + +/** + * Get the collation tailoring rules from a UCollator. + * The rules will follow the rule syntax. + * @param coll The UCollator to query. + * @param length + * @return The collation tailoring rules. + * @stable ICU 2.0 + */ +U_STABLE const UChar* U_EXPORT2 +ucol_getRules( const UCollator *coll, + int32_t *length); + +#ifndef U_HIDE_DEPRECATED_API +/** Get the short definition string for a collator. This API harvests the collator's + * locale and the attribute set and produces a string that can be used for opening + * a collator with the same attributes using the ucol_openFromShortString API. + * This string will be normalized. + * The structure and the syntax of the string is defined in the "Naming collators" + * section of the users guide: + * http://userguide.icu-project.org/collation/concepts#TOC-Collator-naming-scheme + * This API supports preflighting. + * @param coll a collator + * @param locale a locale that will appear as a collators locale in the resulting + * short string definition. If NULL, the locale will be harvested + * from the collator. + * @param buffer space to hold the resulting string + * @param capacity capacity of the buffer + * @param status for returning errors. All the preflighting errors are featured + * @return length of the resulting string + * @see ucol_openFromShortString + * @see ucol_normalizeShortDefinitionString + * @deprecated ICU 54 + */ +U_DEPRECATED int32_t U_EXPORT2 +ucol_getShortDefinitionString(const UCollator *coll, + const char *locale, + char *buffer, + int32_t capacity, + UErrorCode *status); + +/** Verifies and normalizes short definition string. + * Normalized short definition string has all the option sorted by the argument name, + * so that equivalent definition strings are the same. + * This API supports preflighting. + * @param source definition string + * @param destination space to hold the resulting string + * @param capacity capacity of the buffer + * @param parseError if not NULL, structure that will get filled with error's pre + * and post context in case of error. + * @param status Error code. This API will return an error if an invalid attribute + * or attribute/value combination is specified. All the preflighting + * errors are also featured + * @return length of the resulting normalized string. + * + * @see ucol_openFromShortString + * @see ucol_getShortDefinitionString + * + * @deprecated ICU 54 + */ + +U_DEPRECATED int32_t U_EXPORT2 +ucol_normalizeShortDefinitionString(const char *source, + char *destination, + int32_t capacity, + UParseError *parseError, + UErrorCode *status); +#endif /* U_HIDE_DEPRECATED_API */ + + +/** + * Get a sort key for a string from a UCollator. + * Sort keys may be compared using <TT>strcmp</TT>. + * + * Note that sort keys are often less efficient than simply doing comparison. + * For more details, see the ICU User Guide. + * + * Like ICU functions that write to an output buffer, the buffer contents + * is undefined if the buffer capacity (resultLength parameter) is too small. + * Unlike ICU functions that write a string to an output buffer, + * the terminating zero byte is counted in the sort key length. + * @param coll The UCollator containing the collation rules. + * @param source The string to transform. + * @param sourceLength The length of source, or -1 if null-terminated. + * @param result A pointer to a buffer to receive the attribute. + * @param resultLength The maximum size of result. + * @return The size needed to fully store the sort key. + * If there was an internal error generating the sort key, + * a zero value is returned. + * @see ucol_keyHashCode + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucol_getSortKey(const UCollator *coll, + const UChar *source, + int32_t sourceLength, + uint8_t *result, + int32_t resultLength); + + +/** Gets the next count bytes of a sort key. Caller needs + * to preserve state array between calls and to provide + * the same type of UCharIterator set with the same string. + * The destination buffer provided must be big enough to store + * the number of requested bytes. + * + * The generated sort key may or may not be compatible with + * sort keys generated using ucol_getSortKey(). + * @param coll The UCollator containing the collation rules. + * @param iter UCharIterator containing the string we need + * the sort key to be calculated for. + * @param state Opaque state of sortkey iteration. + * @param dest Buffer to hold the resulting sortkey part + * @param count number of sort key bytes required. + * @param status error code indicator. + * @return the actual number of bytes of a sortkey. It can be + * smaller than count if we have reached the end of + * the sort key. + * @stable ICU 2.6 + */ +U_STABLE int32_t U_EXPORT2 +ucol_nextSortKeyPart(const UCollator *coll, + UCharIterator *iter, + uint32_t state[2], + uint8_t *dest, int32_t count, + UErrorCode *status); + +/** enum that is taken by ucol_getBound API + * See below for explanation + * do not change the values assigned to the + * members of this enum. Underlying code + * depends on them having these numbers + * @stable ICU 2.0 + */ +typedef enum { + /** lower bound */ + UCOL_BOUND_LOWER = 0, + /** upper bound that will match strings of exact size */ + UCOL_BOUND_UPPER = 1, + /** upper bound that will match all the strings that have the same initial substring as the given string */ + UCOL_BOUND_UPPER_LONG = 2, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UColBoundMode value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UCOL_BOUND_VALUE_COUNT +#endif /* U_HIDE_DEPRECATED_API */ +} UColBoundMode; + +/** + * Produce a bound for a given sortkey and a number of levels. + * Return value is always the number of bytes needed, regardless of + * whether the result buffer was big enough or even valid.<br> + * Resulting bounds can be used to produce a range of strings that are + * between upper and lower bounds. For example, if bounds are produced + * for a sortkey of string "smith", strings between upper and lower + * bounds with one level would include "Smith", "SMITH", "sMiTh".<br> + * There are two upper bounds that can be produced. If UCOL_BOUND_UPPER + * is produced, strings matched would be as above. However, if bound + * produced using UCOL_BOUND_UPPER_LONG is used, the above example will + * also match "Smithsonian" and similar.<br> + * For more on usage, see example in cintltst/capitst.c in procedure + * TestBounds. + * Sort keys may be compared using <TT>strcmp</TT>. + * @param source The source sortkey. + * @param sourceLength The length of source, or -1 if null-terminated. + * (If an unmodified sortkey is passed, it is always null + * terminated). + * @param boundType Type of bound required. It can be UCOL_BOUND_LOWER, which + * produces a lower inclusive bound, UCOL_BOUND_UPPER, that + * produces upper bound that matches strings of the same length + * or UCOL_BOUND_UPPER_LONG that matches strings that have the + * same starting substring as the source string. + * @param noOfLevels Number of levels required in the resulting bound (for most + * uses, the recommended value is 1). See users guide for + * explanation on number of levels a sortkey can have. + * @param result A pointer to a buffer to receive the resulting sortkey. + * @param resultLength The maximum size of result. + * @param status Used for returning error code if something went wrong. If the + * number of levels requested is higher than the number of levels + * in the source key, a warning (U_SORT_KEY_TOO_SHORT_WARNING) is + * issued. + * @return The size needed to fully store the bound. + * @see ucol_keyHashCode + * @stable ICU 2.1 + */ +U_STABLE int32_t U_EXPORT2 +ucol_getBound(const uint8_t *source, + int32_t sourceLength, + UColBoundMode boundType, + uint32_t noOfLevels, + uint8_t *result, + int32_t resultLength, + UErrorCode *status); + +/** + * Gets the version information for a Collator. Version is currently + * an opaque 32-bit number which depends, among other things, on major + * versions of the collator tailoring and UCA. + * @param coll The UCollator to query. + * @param info the version # information, the result will be filled in + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucol_getVersion(const UCollator* coll, UVersionInfo info); + +/** + * Gets the UCA version information for a Collator. Version is the + * UCA version number (3.1.1, 4.0). + * @param coll The UCollator to query. + * @param info the version # information, the result will be filled in + * @stable ICU 2.8 + */ +U_STABLE void U_EXPORT2 +ucol_getUCAVersion(const UCollator* coll, UVersionInfo info); + +/** + * Merges two sort keys. The levels are merged with their corresponding counterparts + * (primaries with primaries, secondaries with secondaries etc.). Between the values + * from the same level a separator is inserted. + * + * This is useful, for example, for combining sort keys from first and last names + * to sort such pairs. + * See http://www.unicode.org/reports/tr10/#Merging_Sort_Keys + * + * The recommended way to achieve "merged" sorting is by + * concatenating strings with U+FFFE between them. + * The concatenation has the same sort order as the merged sort keys, + * but merge(getSortKey(str1), getSortKey(str2)) may differ from getSortKey(str1 + '\uFFFE' + str2). + * Using strings with U+FFFE may yield shorter sort keys. + * + * For details about Sort Key Features see + * http://userguide.icu-project.org/collation/api#TOC-Sort-Key-Features + * + * It is possible to merge multiple sort keys by consecutively merging + * another one with the intermediate result. + * + * The length of the merge result is the sum of the lengths of the input sort keys. + * + * Example (uncompressed): + * <pre>191B1D 01 050505 01 910505 00 + * 1F2123 01 050505 01 910505 00</pre> + * will be merged as + * <pre>191B1D 02 1F2123 01 050505 02 050505 01 910505 02 910505 00</pre> + * + * If the destination buffer is not big enough, then its contents are undefined. + * If any of source lengths are zero or any of the source pointers are NULL/undefined, + * the result is of size zero. + * + * @param src1 the first sort key + * @param src1Length the length of the first sort key, including the zero byte at the end; + * can be -1 if the function is to find the length + * @param src2 the second sort key + * @param src2Length the length of the second sort key, including the zero byte at the end; + * can be -1 if the function is to find the length + * @param dest the buffer where the merged sort key is written, + * can be NULL if destCapacity==0 + * @param destCapacity the number of bytes in the dest buffer + * @return the length of the merged sort key, src1Length+src2Length; + * can be larger than destCapacity, or 0 if an error occurs (only for illegal arguments), + * in which cases the contents of dest is undefined + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucol_mergeSortkeys(const uint8_t *src1, int32_t src1Length, + const uint8_t *src2, int32_t src2Length, + uint8_t *dest, int32_t destCapacity); + +/** + * Universal attribute setter + * @param coll collator which attributes are to be changed + * @param attr attribute type + * @param value attribute value + * @param status to indicate whether the operation went on smoothly or there were errors + * @see UColAttribute + * @see UColAttributeValue + * @see ucol_getAttribute + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucol_setAttribute(UCollator *coll, UColAttribute attr, UColAttributeValue value, UErrorCode *status); + +/** + * Universal attribute getter + * @param coll collator which attributes are to be changed + * @param attr attribute type + * @return attribute value + * @param status to indicate whether the operation went on smoothly or there were errors + * @see UColAttribute + * @see UColAttributeValue + * @see ucol_setAttribute + * @stable ICU 2.0 + */ +U_STABLE UColAttributeValue U_EXPORT2 +ucol_getAttribute(const UCollator *coll, UColAttribute attr, UErrorCode *status); + +/** + * Sets the variable top to the top of the specified reordering group. + * The variable top determines the highest-sorting character + * which is affected by UCOL_ALTERNATE_HANDLING. + * If that attribute is set to UCOL_NON_IGNORABLE, then the variable top has no effect. + * @param coll the collator + * @param group one of UCOL_REORDER_CODE_SPACE, UCOL_REORDER_CODE_PUNCTUATION, + * UCOL_REORDER_CODE_SYMBOL, UCOL_REORDER_CODE_CURRENCY; + * or UCOL_REORDER_CODE_DEFAULT to restore the default max variable group + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @see ucol_getMaxVariable + * @stable ICU 53 + */ +U_STABLE void U_EXPORT2 +ucol_setMaxVariable(UCollator *coll, UColReorderCode group, UErrorCode *pErrorCode); + +/** + * Returns the maximum reordering group whose characters are affected by UCOL_ALTERNATE_HANDLING. + * @param coll the collator + * @return the maximum variable reordering group. + * @see ucol_setMaxVariable + * @stable ICU 53 + */ +U_STABLE UColReorderCode U_EXPORT2 +ucol_getMaxVariable(const UCollator *coll); + +#ifndef U_HIDE_DEPRECATED_API +/** + * Sets the variable top to the primary weight of the specified string. + * + * Beginning with ICU 53, the variable top is pinned to + * the top of one of the supported reordering groups, + * and it must not be beyond the last of those groups. + * See ucol_setMaxVariable(). + * @param coll the collator + * @param varTop one or more (if contraction) UChars to which the variable top should be set + * @param len length of variable top string. If -1 it is considered to be zero terminated. + * @param status error code. If error code is set, the return value is undefined. + * Errors set by this function are:<br> + * U_CE_NOT_FOUND_ERROR if more than one character was passed and there is no such contraction<br> + * U_ILLEGAL_ARGUMENT_ERROR if the variable top is beyond + * the last reordering group supported by ucol_setMaxVariable() + * @return variable top primary weight + * @see ucol_getVariableTop + * @see ucol_restoreVariableTop + * @deprecated ICU 53 Call ucol_setMaxVariable() instead. + */ +U_DEPRECATED uint32_t U_EXPORT2 +ucol_setVariableTop(UCollator *coll, + const UChar *varTop, int32_t len, + UErrorCode *status); +#endif /* U_HIDE_DEPRECATED_API */ + +/** + * Gets the variable top value of a Collator. + * @param coll collator which variable top needs to be retrieved + * @param status error code (not changed by function). If error code is set, + * the return value is undefined. + * @return the variable top primary weight + * @see ucol_getMaxVariable + * @see ucol_setVariableTop + * @see ucol_restoreVariableTop + * @stable ICU 2.0 + */ +U_STABLE uint32_t U_EXPORT2 ucol_getVariableTop(const UCollator *coll, UErrorCode *status); + +#ifndef U_HIDE_DEPRECATED_API +/** + * Sets the variable top to the specified primary weight. + * + * Beginning with ICU 53, the variable top is pinned to + * the top of one of the supported reordering groups, + * and it must not be beyond the last of those groups. + * See ucol_setMaxVariable(). + * @param varTop primary weight, as returned by ucol_setVariableTop or ucol_getVariableTop + * @param status error code + * @see ucol_getVariableTop + * @see ucol_setVariableTop + * @deprecated ICU 53 Call ucol_setMaxVariable() instead. + */ +U_DEPRECATED void U_EXPORT2 +ucol_restoreVariableTop(UCollator *coll, const uint32_t varTop, UErrorCode *status); +#endif /* U_HIDE_DEPRECATED_API */ + +/** + * Thread safe cloning operation. The result is a clone of a given collator. + * @param coll collator to be cloned + * @param stackBuffer <em>Deprecated functionality as of ICU 52, use NULL.</em><br> + * user allocated space for the new clone. + * If NULL new memory will be allocated. + * If buffer is not large enough, new memory will be allocated. + * Clients can use the U_COL_SAFECLONE_BUFFERSIZE. + * @param pBufferSize <em>Deprecated functionality as of ICU 52, use NULL or 1.</em><br> + * pointer to size of allocated space. + * If *pBufferSize == 0, a sufficient size for use in cloning will + * be returned ('pre-flighting') + * If *pBufferSize is not enough for a stack-based safe clone, + * new memory will be allocated. + * @param status to indicate whether the operation went on smoothly or there were errors + * An informational status value, U_SAFECLONE_ALLOCATED_ERROR, is used if any + * allocations were necessary. + * @return pointer to the new clone + * @see ucol_open + * @see ucol_openRules + * @see ucol_close + * @stable ICU 2.0 + */ +U_STABLE UCollator* U_EXPORT2 +ucol_safeClone(const UCollator *coll, + void *stackBuffer, + int32_t *pBufferSize, + UErrorCode *status); + +#ifndef U_HIDE_DEPRECATED_API + +/** default memory size for the new clone. + * @deprecated ICU 52. Do not rely on ucol_safeClone() cloning into any provided buffer. + */ +#define U_COL_SAFECLONE_BUFFERSIZE 1 + +#endif /* U_HIDE_DEPRECATED_API */ + +/** + * Returns current rules. Delta defines whether full rules are returned or just the tailoring. + * Returns number of UChars needed to store rules. If buffer is NULL or bufferLen is not enough + * to store rules, will store up to available space. + * + * ucol_getRules() should normally be used instead. + * See http://userguide.icu-project.org/collation/customization#TOC-Building-on-Existing-Locales + * @param coll collator to get the rules from + * @param delta one of UCOL_TAILORING_ONLY, UCOL_FULL_RULES. + * @param buffer buffer to store the result in. If NULL, you'll get no rules. + * @param bufferLen length of buffer to store rules in. If less than needed you'll get only the part that fits in. + * @return current rules + * @stable ICU 2.0 + * @see UCOL_FULL_RULES + */ +U_STABLE int32_t U_EXPORT2 +ucol_getRulesEx(const UCollator *coll, UColRuleOption delta, UChar *buffer, int32_t bufferLen); + +#ifndef U_HIDE_DEPRECATED_API +/** + * gets the locale name of the collator. If the collator + * is instantiated from the rules, then this function returns + * NULL. + * @param coll The UCollator for which the locale is needed + * @param type You can choose between requested, valid and actual + * locale. For description see the definition of + * ULocDataLocaleType in uloc.h + * @param status error code of the operation + * @return real locale name from which the collation data comes. + * If the collator was instantiated from rules, returns + * NULL. + * @deprecated ICU 2.8 Use ucol_getLocaleByType instead + */ +U_DEPRECATED const char * U_EXPORT2 +ucol_getLocale(const UCollator *coll, ULocDataLocaleType type, UErrorCode *status); +#endif /* U_HIDE_DEPRECATED_API */ + +/** + * gets the locale name of the collator. If the collator + * is instantiated from the rules, then this function returns + * NULL. + * @param coll The UCollator for which the locale is needed + * @param type You can choose between requested, valid and actual + * locale. For description see the definition of + * ULocDataLocaleType in uloc.h + * @param status error code of the operation + * @return real locale name from which the collation data comes. + * If the collator was instantiated from rules, returns + * NULL. + * @stable ICU 2.8 + */ +U_STABLE const char * U_EXPORT2 +ucol_getLocaleByType(const UCollator *coll, ULocDataLocaleType type, UErrorCode *status); + +/** + * Get a Unicode set that contains all the characters and sequences tailored in + * this collator. The result must be disposed of by using uset_close. + * @param coll The UCollator for which we want to get tailored chars + * @param status error code of the operation + * @return a pointer to newly created USet. Must be be disposed by using uset_close + * @see ucol_openRules + * @see uset_close + * @stable ICU 2.4 + */ +U_STABLE USet * U_EXPORT2 +ucol_getTailoredSet(const UCollator *coll, UErrorCode *status); + +#ifndef U_HIDE_INTERNAL_API +/** Calculates the set of unsafe code points, given a collator. + * A character is unsafe if you could append any character and cause the ordering to alter significantly. + * Collation sorts in normalized order, so anything that rearranges in normalization can cause this. + * Thus if you have a character like a_umlaut, and you add a lower_dot to it, + * then it normalizes to a_lower_dot + umlaut, and sorts differently. + * @param coll Collator + * @param unsafe a fill-in set to receive the unsafe points + * @param status for catching errors + * @return number of elements in the set + * @internal ICU 3.0 + */ +U_INTERNAL int32_t U_EXPORT2 +ucol_getUnsafeSet( const UCollator *coll, + USet *unsafe, + UErrorCode *status); + +/** Touches all resources needed for instantiating a collator from a short string definition, + * thus filling up the cache. + * @param definition A short string containing a locale and a set of attributes. + * Attributes not explicitly mentioned are left at the default + * state for a locale. + * @param parseError if not NULL, structure that will get filled with error's pre + * and post context in case of error. + * @param forceDefaults if FALSE, the settings that are the same as the collator + * default settings will not be applied (for example, setting + * French secondary on a French collator would not be executed). + * If TRUE, all the settings will be applied regardless of the + * collator default value. If the definition + * strings are to be cached, should be set to FALSE. + * @param status Error code. Apart from regular error conditions connected to + * instantiating collators (like out of memory or similar), this + * API will return an error if an invalid attribute or attribute/value + * combination is specified. + * @see ucol_openFromShortString + * @internal ICU 3.2.1 + */ +U_INTERNAL void U_EXPORT2 +ucol_prepareShortStringOpen( const char *definition, + UBool forceDefaults, + UParseError *parseError, + UErrorCode *status); +#endif /* U_HIDE_INTERNAL_API */ + +/** Creates a binary image of a collator. This binary image can be stored and + * later used to instantiate a collator using ucol_openBinary. + * This API supports preflighting. + * @param coll Collator + * @param buffer a fill-in buffer to receive the binary image + * @param capacity capacity of the destination buffer + * @param status for catching errors + * @return size of the image + * @see ucol_openBinary + * @stable ICU 3.2 + */ +U_STABLE int32_t U_EXPORT2 +ucol_cloneBinary(const UCollator *coll, + uint8_t *buffer, int32_t capacity, + UErrorCode *status); + +/** Opens a collator from a collator binary image created using + * ucol_cloneBinary. Binary image used in instantiation of the + * collator remains owned by the user and should stay around for + * the lifetime of the collator. The API also takes a base collator + * which must be the root collator. + * @param bin binary image owned by the user and required through the + * lifetime of the collator + * @param length size of the image. If negative, the API will try to + * figure out the length of the image + * @param base Base collator, for lookup of untailored characters. + * Must be the root collator, must not be NULL. + * The base is required to be present through the lifetime of the collator. + * @param status for catching errors + * @return newly created collator + * @see ucol_cloneBinary + * @stable ICU 3.2 + */ +U_STABLE UCollator* U_EXPORT2 +ucol_openBinary(const uint8_t *bin, int32_t length, + const UCollator *base, + UErrorCode *status); + + +#endif /* #if !UCONFIG_NO_COLLATION */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucoleitr.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucoleitr.h new file mode 100755 index 00000000..85ec8383 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucoleitr.h @@ -0,0 +1,268 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2001-2014, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************* +* +* File ucoleitr.h +* +* Modification History: +* +* Date Name Description +* 02/15/2001 synwee Modified all methods to process its own function +* instead of calling the equivalent c++ api (coleitr.h) +*******************************************************************************/ + +#ifndef UCOLEITR_H +#define UCOLEITR_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_COLLATION + +/** + * This indicates an error has occured during processing or if no more CEs is + * to be returned. + * @stable ICU 2.0 + */ +#define UCOL_NULLORDER ((int32_t)0xFFFFFFFF) + +#include "unicode/ucol.h" + +/** + * The UCollationElements struct. + * For usage in C programs. + * @stable ICU 2.0 + */ +typedef struct UCollationElements UCollationElements; + +/** + * \file + * \brief C API: UCollationElements + * + * The UCollationElements API is used as an iterator to walk through each + * character of an international string. Use the iterator to return the + * ordering priority of the positioned character. The ordering priority of a + * character, which we refer to as a key, defines how a character is collated + * in the given collation object. + * For example, consider the following in Slovak and in traditional Spanish collation: + * <pre> + * . "ca" -> the first key is key('c') and second key is key('a'). + * . "cha" -> the first key is key('ch') and second key is key('a'). + * </pre> + * And in German phonebook collation, + * <pre> + * . "<ae ligature>b"-> the first key is key('a'), the second key is key('e'), and + * . the third key is key('b'). + * </pre> + * <p>Example of the iterator usage: (without error checking) + * <pre> + * . void CollationElementIterator_Example() + * . { + * . UChar *s; + * . t_int32 order, primaryOrder; + * . UCollationElements *c; + * . UCollatorOld *coll; + * . UErrorCode success = U_ZERO_ERROR; + * . s=(UChar*)malloc(sizeof(UChar) * (strlen("This is a test")+1) ); + * . u_uastrcpy(s, "This is a test"); + * . coll = ucol_open(NULL, &success); + * . c = ucol_openElements(coll, str, u_strlen(str), &status); + * . order = ucol_next(c, &success); + * . ucol_reset(c); + * . order = ucol_prev(c, &success); + * . free(s); + * . ucol_close(coll); + * . ucol_closeElements(c); + * . } + * </pre> + * <p> + * ucol_next() returns the collation order of the next. + * ucol_prev() returns the collation order of the previous character. + * The Collation Element Iterator moves only in one direction between calls to + * ucol_reset. That is, ucol_next() and ucol_prev can not be inter-used. + * Whenever ucol_prev is to be called after ucol_next() or vice versa, + * ucol_reset has to be called first to reset the status, shifting pointers to + * either the end or the start of the string. Hence at the next call of + * ucol_prev or ucol_next, the first or last collation order will be returned. + * If a change of direction is done without a ucol_reset, the result is + * undefined. + * The result of a forward iterate (ucol_next) and reversed result of the + * backward iterate (ucol_prev) on the same string are equivalent, if + * collation orders with the value 0 are ignored. + * Character based on the comparison level of the collator. A collation order + * consists of primary order, secondary order and tertiary order. The data + * type of the collation order is <strong>int32_t</strong>. + * + * @see UCollator + */ + +/** + * Open the collation elements for a string. + * + * @param coll The collator containing the desired collation rules. + * @param text The text to iterate over. + * @param textLength The number of characters in text, or -1 if null-terminated + * @param status A pointer to a UErrorCode to receive any errors. + * @return a struct containing collation element information + * @stable ICU 2.0 + */ +U_STABLE UCollationElements* U_EXPORT2 +ucol_openElements(const UCollator *coll, + const UChar *text, + int32_t textLength, + UErrorCode *status); + + +/** + * get a hash code for a key... Not very useful! + * @param key the given key. + * @param length the size of the key array. + * @return the hash code. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucol_keyHashCode(const uint8_t* key, int32_t length); + +/** + * Close a UCollationElements. + * Once closed, a UCollationElements may no longer be used. + * @param elems The UCollationElements to close. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucol_closeElements(UCollationElements *elems); + +/** + * Reset the collation elements to their initial state. + * This will move the 'cursor' to the beginning of the text. + * Property settings for collation will be reset to the current status. + * @param elems The UCollationElements to reset. + * @see ucol_next + * @see ucol_previous + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucol_reset(UCollationElements *elems); + +/** + * Get the ordering priority of the next collation element in the text. + * A single character may contain more than one collation element. + * @param elems The UCollationElements containing the text. + * @param status A pointer to a UErrorCode to receive any errors. + * @return The next collation elements ordering, otherwise returns UCOL_NULLORDER + * if an error has occured or if the end of string has been reached + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucol_next(UCollationElements *elems, UErrorCode *status); + +/** + * Get the ordering priority of the previous collation element in the text. + * A single character may contain more than one collation element. + * Note that internally a stack is used to store buffered collation elements. + * @param elems The UCollationElements containing the text. + * @param status A pointer to a UErrorCode to receive any errors. Noteably + * a U_BUFFER_OVERFLOW_ERROR is returned if the internal stack + * buffer has been exhausted. + * @return The previous collation elements ordering, otherwise returns + * UCOL_NULLORDER if an error has occured or if the start of string has + * been reached. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucol_previous(UCollationElements *elems, UErrorCode *status); + +/** + * Get the maximum length of any expansion sequences that end with the + * specified comparison order. + * This is useful for .... ? + * @param elems The UCollationElements containing the text. + * @param order A collation order returned by previous or next. + * @return maximum size of the expansion sequences ending with the collation + * element or 1 if collation element does not occur at the end of any + * expansion sequence + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucol_getMaxExpansion(const UCollationElements *elems, int32_t order); + +/** + * Set the text containing the collation elements. + * Property settings for collation will remain the same. + * In order to reset the iterator to the current collation property settings, + * the API reset() has to be called. + * @param elems The UCollationElements to set. + * @param text The source text containing the collation elements. + * @param textLength The length of text, or -1 if null-terminated. + * @param status A pointer to a UErrorCode to receive any errors. + * @see ucol_getText + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucol_setText( UCollationElements *elems, + const UChar *text, + int32_t textLength, + UErrorCode *status); + +/** + * Get the offset of the current source character. + * This is an offset into the text of the character containing the current + * collation elements. + * @param elems The UCollationElements to query. + * @return The offset of the current source character. + * @see ucol_setOffset + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ucol_getOffset(const UCollationElements *elems); + +/** + * Set the offset of the current source character. + * This is an offset into the text of the character to be processed. + * Property settings for collation will remain the same. + * In order to reset the iterator to the current collation property settings, + * the API reset() has to be called. + * @param elems The UCollationElements to set. + * @param offset The desired character offset. + * @param status A pointer to a UErrorCode to receive any errors. + * @see ucol_getOffset + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ucol_setOffset(UCollationElements *elems, + int32_t offset, + UErrorCode *status); + +/** +* Get the primary order of a collation order. +* @param order the collation order +* @return the primary order of a collation order. +* @stable ICU 2.6 +*/ +U_STABLE int32_t U_EXPORT2 +ucol_primaryOrder (int32_t order); + +/** +* Get the secondary order of a collation order. +* @param order the collation order +* @return the secondary order of a collation order. +* @stable ICU 2.6 +*/ +U_STABLE int32_t U_EXPORT2 +ucol_secondaryOrder (int32_t order); + +/** +* Get the tertiary order of a collation order. +* @param order the collation order +* @return the tertiary order of a collation order. +* @stable ICU 2.6 +*/ +U_STABLE int32_t U_EXPORT2 +ucol_tertiaryOrder (int32_t order); + +#endif /* #if !UCONFIG_NO_COLLATION */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uconfig.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uconfig.h new file mode 100755 index 00000000..7ddf4e6a --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uconfig.h @@ -0,0 +1,455 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 2002-2016, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* file name: uconfig.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2002sep19 +* created by: Markus W. Scherer +*/ + +#ifndef __UCONFIG_H__ +#define __UCONFIG_H__ + + +/*! + * \file + * \brief User-configurable settings + * + * Miscellaneous switches: + * + * A number of macros affect a variety of minor aspects of ICU. + * Most of them used to be defined elsewhere (e.g., in utypes.h or platform.h) + * and moved here to make them easier to find. + * + * Switches for excluding parts of ICU library code modules: + * + * Changing these macros allows building partial, smaller libraries for special purposes. + * By default, all modules are built. + * The switches are fairly coarse, controlling large modules. + * Basic services cannot be turned off. + * + * Building with any of these options does not guarantee that the + * ICU build process will completely work. It is recommended that + * the ICU libraries and data be built using the normal build. + * At that time you should remove the data used by those services. + * After building the ICU data library, you should rebuild the ICU + * libraries with these switches customized to your needs. + * + * @stable ICU 2.4 + */ + +/** + * If this switch is defined, ICU will attempt to load a header file named "uconfig_local.h" + * prior to determining default settings for uconfig variables. + * + * @internal ICU 4.0 + */ +#if defined(UCONFIG_USE_LOCAL) +#include "uconfig_local.h" +#endif + +/** + * \def U_DEBUG + * Determines whether to include debugging code. + * Automatically set on Windows, but most compilers do not have + * related predefined macros. + * @internal + */ +#ifdef U_DEBUG + /* Use the predefined value. */ +#elif defined(_DEBUG) + /* + * _DEBUG is defined by Visual Studio debug compilation. + * Do *not* test for its NDEBUG macro: It is an orthogonal macro + * which disables assert(). + */ +# define U_DEBUG 1 +# else +# define U_DEBUG 0 +#endif + +/** + * Determines whether to enable auto cleanup of libraries. + * @internal + */ +#ifndef UCLN_NO_AUTO_CLEANUP +#define UCLN_NO_AUTO_CLEANUP 1 +#endif + +/** + * \def U_DISABLE_RENAMING + * Determines whether to disable renaming or not. + * @internal + */ +#ifndef U_DISABLE_RENAMING +#define U_DISABLE_RENAMING 0 +#endif + +/** + * \def U_NO_DEFAULT_INCLUDE_UTF_HEADERS + * Determines whether utypes.h includes utf.h, utf8.h, utf16.h and utf_old.h. + * utypes.h includes those headers if this macro is defined to 0. + * Otherwise, each those headers must be included explicitly when using one of their macros. + * Defaults to 0 for backward compatibility, except inside ICU. + * @stable ICU 49 + */ +#ifdef U_NO_DEFAULT_INCLUDE_UTF_HEADERS + /* Use the predefined value. */ +#elif defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || \ + defined(U_IO_IMPLEMENTATION) || defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION) || \ + defined(U_TOOLUTIL_IMPLEMENTATION) +# define U_NO_DEFAULT_INCLUDE_UTF_HEADERS 1 +#else +# define U_NO_DEFAULT_INCLUDE_UTF_HEADERS 0 +#endif + +/** + * \def U_OVERRIDE_CXX_ALLOCATION + * Determines whether to override new and delete. + * ICU is normally built such that all of its C++ classes, via their UMemory base, + * override operators new and delete to use its internal, customizable, + * non-exception-throwing memory allocation functions. (Default value 1 for this macro.) + * + * This is especially important when the application and its libraries use multiple heaps. + * For example, on Windows, this allows the ICU DLL to be used by + * applications that statically link the C Runtime library. + * + * @stable ICU 2.2 + */ +#ifndef U_OVERRIDE_CXX_ALLOCATION +#define U_OVERRIDE_CXX_ALLOCATION 1 +#endif + +/** + * \def U_ENABLE_TRACING + * Determines whether to enable tracing. + * @internal + */ +#ifndef U_ENABLE_TRACING +#define U_ENABLE_TRACING 0 +#endif + +/** + * \def UCONFIG_ENABLE_PLUGINS + * Determines whether to enable ICU plugins. + * @internal + */ +#ifndef UCONFIG_ENABLE_PLUGINS +#define UCONFIG_ENABLE_PLUGINS 0 +#endif + +/** + * \def U_ENABLE_DYLOAD + * Whether to enable Dynamic loading in ICU. + * @internal + */ +#ifndef U_ENABLE_DYLOAD +#define U_ENABLE_DYLOAD 1 +#endif + +/** + * \def U_CHECK_DYLOAD + * Whether to test Dynamic loading as an OS capability. + * @internal + */ +#ifndef U_CHECK_DYLOAD +#define U_CHECK_DYLOAD 1 +#endif + +/** + * \def U_DEFAULT_SHOW_DRAFT + * Do we allow ICU users to use the draft APIs by default? + * @internal + */ +#ifndef U_DEFAULT_SHOW_DRAFT +#define U_DEFAULT_SHOW_DRAFT 1 +#endif + +/*===========================================================================*/ +/* Custom icu entry point renaming */ +/*===========================================================================*/ + +/** + * \def U_HAVE_LIB_SUFFIX + * 1 if a custom library suffix is set. + * @internal + */ +#ifdef U_HAVE_LIB_SUFFIX + /* Use the predefined value. */ +#elif defined(U_LIB_SUFFIX_C_NAME) +# define U_HAVE_LIB_SUFFIX 1 +#endif + +/** + * \def U_LIB_SUFFIX_C_NAME_STRING + * Defines the library suffix as a string with C syntax. + * @internal + */ +#ifdef U_LIB_SUFFIX_C_NAME_STRING + /* Use the predefined value. */ +#elif defined(U_LIB_SUFFIX_C_NAME) +# define CONVERT_TO_STRING(s) #s +# define U_LIB_SUFFIX_C_NAME_STRING CONVERT_TO_STRING(U_LIB_SUFFIX_C_NAME) +#else +# define U_LIB_SUFFIX_C_NAME_STRING "" +#endif + +/* common/i18n library switches --------------------------------------------- */ + +/** + * \def UCONFIG_ONLY_COLLATION + * This switch turns off modules that are not needed for collation. + * + * It does not turn off legacy conversion because that is necessary + * for ICU to work on EBCDIC platforms (for the default converter). + * If you want "only collation" and do not build for EBCDIC, + * then you can define UCONFIG_NO_CONVERSION or UCONFIG_NO_LEGACY_CONVERSION to 1 as well. + * + * @stable ICU 2.4 + */ +#ifndef UCONFIG_ONLY_COLLATION +# define UCONFIG_ONLY_COLLATION 0 +#endif + +#if UCONFIG_ONLY_COLLATION + /* common library */ +# define UCONFIG_NO_BREAK_ITERATION 1 +# define UCONFIG_NO_IDNA 1 + + /* i18n library */ +# if UCONFIG_NO_COLLATION +# error Contradictory collation switches in uconfig.h. +# endif +# define UCONFIG_NO_FORMATTING 1 +# define UCONFIG_NO_TRANSLITERATION 1 +# define UCONFIG_NO_REGULAR_EXPRESSIONS 1 +#endif + +/* common library switches -------------------------------------------------- */ + +/** + * \def UCONFIG_NO_FILE_IO + * This switch turns off all file access in the common library + * where file access is only used for data loading. + * ICU data must then be provided in the form of a data DLL (or with an + * equivalent way to link to the data residing in an executable, + * as in building a combined library with both the common library's code and + * the data), or via udata_setCommonData(). + * Application data must be provided via udata_setAppData() or by using + * "open" functions that take pointers to data, for example ucol_openBinary(). + * + * File access is not used at all in the i18n library. + * + * File access cannot be turned off for the icuio library or for the ICU + * test suites and ICU tools. + * + * @stable ICU 3.6 + */ +#ifndef UCONFIG_NO_FILE_IO +# define UCONFIG_NO_FILE_IO 0 +#endif + +#if UCONFIG_NO_FILE_IO && defined(U_TIMEZONE_FILES_DIR) +# error Contradictory file io switches in uconfig.h. +#endif + +/** + * \def UCONFIG_NO_CONVERSION + * ICU will not completely build (compiling the tools fails) with this + * switch turned on. + * This switch turns off all converters. + * + * You may want to use this together with U_CHARSET_IS_UTF8 defined to 1 + * in utypes.h if char* strings in your environment are always in UTF-8. + * + * @stable ICU 3.2 + * @see U_CHARSET_IS_UTF8 + */ +#ifndef UCONFIG_NO_CONVERSION +# define UCONFIG_NO_CONVERSION 0 +#endif + +#if UCONFIG_NO_CONVERSION +# define UCONFIG_NO_LEGACY_CONVERSION 1 +#endif + +/** + * \def UCONFIG_ONLY_HTML_CONVERSION + * This switch turns off all of the converters NOT listed in + * the HTML encoding standard: + * http://www.w3.org/TR/encoding/#names-and-labels + * + * This is not possible on EBCDIC platforms + * because they need ibm-37 or ibm-1047 default converters. + * + * @stable ICU 55 + */ +#ifndef UCONFIG_ONLY_HTML_CONVERSION +# define UCONFIG_ONLY_HTML_CONVERSION 0 +#endif + +/** + * \def UCONFIG_NO_LEGACY_CONVERSION + * This switch turns off all converters except for + * - Unicode charsets (UTF-7/8/16/32, CESU-8, SCSU, BOCU-1) + * - US-ASCII + * - ISO-8859-1 + * + * Turning off legacy conversion is not possible on EBCDIC platforms + * because they need ibm-37 or ibm-1047 default converters. + * + * @stable ICU 2.4 + */ +#ifndef UCONFIG_NO_LEGACY_CONVERSION +# define UCONFIG_NO_LEGACY_CONVERSION 0 +#endif + +/** + * \def UCONFIG_NO_NORMALIZATION + * This switch turns off normalization. + * It implies turning off several other services as well, for example + * collation and IDNA. + * + * @stable ICU 2.6 + */ +#ifndef UCONFIG_NO_NORMALIZATION +# define UCONFIG_NO_NORMALIZATION 0 +#endif + +#if UCONFIG_NO_NORMALIZATION + /* common library */ + /* ICU 50 CJK dictionary BreakIterator uses normalization */ +# define UCONFIG_NO_BREAK_ITERATION 1 + /* IDNA (UTS #46) is implemented via normalization */ +# define UCONFIG_NO_IDNA 1 + + /* i18n library */ +# if UCONFIG_ONLY_COLLATION +# error Contradictory collation switches in uconfig.h. +# endif +# define UCONFIG_NO_COLLATION 1 +# define UCONFIG_NO_TRANSLITERATION 1 +#endif + +/** + * \def UCONFIG_NO_BREAK_ITERATION + * This switch turns off break iteration. + * + * @stable ICU 2.4 + */ +#ifndef UCONFIG_NO_BREAK_ITERATION +# define UCONFIG_NO_BREAK_ITERATION 0 +#endif + +/** + * \def UCONFIG_NO_IDNA + * This switch turns off IDNA. + * + * @stable ICU 2.6 + */ +#ifndef UCONFIG_NO_IDNA +# define UCONFIG_NO_IDNA 0 +#endif + +/** + * \def UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE + * Determines the default UMessagePatternApostropheMode. + * See the documentation for that enum. + * + * @stable ICU 4.8 + */ +#ifndef UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE +# define UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE UMSGPAT_APOS_DOUBLE_OPTIONAL +#endif + +/* i18n library switches ---------------------------------------------------- */ + +/** + * \def UCONFIG_NO_COLLATION + * This switch turns off collation and collation-based string search. + * + * @stable ICU 2.4 + */ +#ifndef UCONFIG_NO_COLLATION +# define UCONFIG_NO_COLLATION 0 +#endif + +/** + * \def UCONFIG_NO_FORMATTING + * This switch turns off formatting and calendar/timezone services. + * + * @stable ICU 2.4 + */ +#ifndef UCONFIG_NO_FORMATTING +# define UCONFIG_NO_FORMATTING 0 +#endif + +/** + * \def UCONFIG_NO_TRANSLITERATION + * This switch turns off transliteration. + * + * @stable ICU 2.4 + */ +#ifndef UCONFIG_NO_TRANSLITERATION +# define UCONFIG_NO_TRANSLITERATION 0 +#endif + +/** + * \def UCONFIG_NO_REGULAR_EXPRESSIONS + * This switch turns off regular expressions. + * + * @stable ICU 2.4 + */ +#ifndef UCONFIG_NO_REGULAR_EXPRESSIONS +# define UCONFIG_NO_REGULAR_EXPRESSIONS 0 +#endif + +/** + * \def UCONFIG_NO_SERVICE + * This switch turns off service registration. + * + * @stable ICU 3.2 + */ +#ifndef UCONFIG_NO_SERVICE +# define UCONFIG_NO_SERVICE 0 +#endif + +/** + * \def UCONFIG_HAVE_PARSEALLINPUT + * This switch turns on the "parse all input" attribute. Binary incompatible. + * + * @internal + */ +#ifndef UCONFIG_HAVE_PARSEALLINPUT +# define UCONFIG_HAVE_PARSEALLINPUT 1 +#endif + + +/** + * \def UCONFIG_FORMAT_FASTPATHS_49 + * This switch turns on other formatting fastpaths. Binary incompatible in object DecimalFormat and DecimalFormatSymbols + * + * @internal + */ +#ifndef UCONFIG_FORMAT_FASTPATHS_49 +# define UCONFIG_FORMAT_FASTPATHS_49 1 +#endif + +/** + * \def UCONFIG_NO_FILTERED_BREAK_ITERATION + * This switch turns off filtered break iteration code. + * + * @internal + */ +#ifndef UCONFIG_NO_FILTERED_BREAK_ITERATION +# define UCONFIG_NO_FILTERED_BREAK_ITERATION 0 +#endif + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucsdet.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucsdet.h new file mode 100755 index 00000000..52ed5ad0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucsdet.h @@ -0,0 +1,419 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ********************************************************************** + * Copyright (C) 2005-2013, International Business Machines + * Corporation and others. All Rights Reserved. + ********************************************************************** + * file name: ucsdet.h + * encoding: UTF-8 + * indentation:4 + * + * created on: 2005Aug04 + * created by: Andy Heninger + * + * ICU Character Set Detection, API for C + * + * Draft version 18 Oct 2005 + * + */ + +#ifndef __UCSDET_H +#define __UCSDET_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_CONVERSION + +#include "unicode/localpointer.h" +#include "unicode/uenum.h" + +/** + * \file + * \brief C API: Charset Detection API + * + * This API provides a facility for detecting the + * charset or encoding of character data in an unknown text format. + * The input data can be from an array of bytes. + * <p> + * Character set detection is at best an imprecise operation. The detection + * process will attempt to identify the charset that best matches the characteristics + * of the byte data, but the process is partly statistical in nature, and + * the results can not be guaranteed to always be correct. + * <p> + * For best accuracy in charset detection, the input data should be primarily + * in a single language, and a minimum of a few hundred bytes worth of plain text + * in the language are needed. The detection process will attempt to + * ignore html or xml style markup that could otherwise obscure the content. + * <p> + * An alternative to the ICU Charset Detector is the + * Compact Encoding Detector, https://github.com/google/compact_enc_det. + * It often gives more accurate results, especially with short input samples. + */ + + +struct UCharsetDetector; +/** + * Structure representing a charset detector + * @stable ICU 3.6 + */ +typedef struct UCharsetDetector UCharsetDetector; + +struct UCharsetMatch; +/** + * Opaque structure representing a match that was identified + * from a charset detection operation. + * @stable ICU 3.6 + */ +typedef struct UCharsetMatch UCharsetMatch; + +/** + * Open a charset detector. + * + * @param status Any error conditions occurring during the open + * operation are reported back in this variable. + * @return the newly opened charset detector. + * @stable ICU 3.6 + */ +U_STABLE UCharsetDetector * U_EXPORT2 +ucsdet_open(UErrorCode *status); + +/** + * Close a charset detector. All storage and any other resources + * owned by this charset detector will be released. Failure to + * close a charset detector when finished with it can result in + * memory leaks in the application. + * + * @param ucsd The charset detector to be closed. + * @stable ICU 3.6 + */ +U_STABLE void U_EXPORT2 +ucsdet_close(UCharsetDetector *ucsd); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUCharsetDetectorPointer + * "Smart pointer" class, closes a UCharsetDetector via ucsdet_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUCharsetDetectorPointer, UCharsetDetector, ucsdet_close); + +U_NAMESPACE_END + +#endif + +/** + * Set the input byte data whose charset is to detected. + * + * Ownership of the input text byte array remains with the caller. + * The input string must not be altered or deleted until the charset + * detector is either closed or reset to refer to different input text. + * + * @param ucsd the charset detector to be used. + * @param textIn the input text of unknown encoding. . + * @param len the length of the input text, or -1 if the text + * is NUL terminated. + * @param status any error conditions are reported back in this variable. + * + * @stable ICU 3.6 + */ +U_STABLE void U_EXPORT2 +ucsdet_setText(UCharsetDetector *ucsd, const char *textIn, int32_t len, UErrorCode *status); + + +/** Set the declared encoding for charset detection. + * The declared encoding of an input text is an encoding obtained + * by the user from an http header or xml declaration or similar source that + * can be provided as an additional hint to the charset detector. + * + * How and whether the declared encoding will be used during the + * detection process is TBD. + * + * @param ucsd the charset detector to be used. + * @param encoding an encoding for the current data obtained from + * a header or declaration or other source outside + * of the byte data itself. + * @param length the length of the encoding name, or -1 if the name string + * is NUL terminated. + * @param status any error conditions are reported back in this variable. + * + * @stable ICU 3.6 + */ +U_STABLE void U_EXPORT2 +ucsdet_setDeclaredEncoding(UCharsetDetector *ucsd, const char *encoding, int32_t length, UErrorCode *status); + + +/** + * Return the charset that best matches the supplied input data. + * + * Note though, that because the detection + * only looks at the start of the input data, + * there is a possibility that the returned charset will fail to handle + * the full set of input data. + * <p> + * The returned UCharsetMatch object is owned by the UCharsetDetector. + * It will remain valid until the detector input is reset, or until + * the detector is closed. + * <p> + * The function will fail if + * <ul> + * <li>no charset appears to match the data.</li> + * <li>no input text has been provided</li> + * </ul> + * + * @param ucsd the charset detector to be used. + * @param status any error conditions are reported back in this variable. + * @return a UCharsetMatch representing the best matching charset, + * or NULL if no charset matches the byte data. + * + * @stable ICU 3.6 + */ +U_STABLE const UCharsetMatch * U_EXPORT2 +ucsdet_detect(UCharsetDetector *ucsd, UErrorCode *status); + + +/** + * Find all charset matches that appear to be consistent with the input, + * returning an array of results. The results are ordered with the + * best quality match first. + * + * Because the detection only looks at a limited amount of the + * input byte data, some of the returned charsets may fail to handle + * the all of input data. + * <p> + * The returned UCharsetMatch objects are owned by the UCharsetDetector. + * They will remain valid until the detector is closed or modified + * + * <p> + * Return an error if + * <ul> + * <li>no charsets appear to match the input data.</li> + * <li>no input text has been provided</li> + * </ul> + * + * @param ucsd the charset detector to be used. + * @param matchesFound pointer to a variable that will be set to the + * number of charsets identified that are consistent with + * the input data. Output only. + * @param status any error conditions are reported back in this variable. + * @return A pointer to an array of pointers to UCharSetMatch objects. + * This array, and the UCharSetMatch instances to which it refers, + * are owned by the UCharsetDetector, and will remain valid until + * the detector is closed or modified. + * @stable ICU 3.6 + */ +U_STABLE const UCharsetMatch ** U_EXPORT2 +ucsdet_detectAll(UCharsetDetector *ucsd, int32_t *matchesFound, UErrorCode *status); + + + +/** + * Get the name of the charset represented by a UCharsetMatch. + * + * The storage for the returned name string is owned by the + * UCharsetMatch, and will remain valid while the UCharsetMatch + * is valid. + * + * The name returned is suitable for use with the ICU conversion APIs. + * + * @param ucsm The charset match object. + * @param status Any error conditions are reported back in this variable. + * @return The name of the matching charset. + * + * @stable ICU 3.6 + */ +U_STABLE const char * U_EXPORT2 +ucsdet_getName(const UCharsetMatch *ucsm, UErrorCode *status); + +/** + * Get a confidence number for the quality of the match of the byte + * data with the charset. Confidence numbers range from zero to 100, + * with 100 representing complete confidence and zero representing + * no confidence. + * + * The confidence values are somewhat arbitrary. They define an + * an ordering within the results for any single detection operation + * but are not generally comparable between the results for different input. + * + * A confidence value of ten does have a general meaning - it is used + * for charsets that can represent the input data, but for which there + * is no other indication that suggests that the charset is the correct one. + * Pure 7 bit ASCII data, for example, is compatible with a + * great many charsets, most of which will appear as possible matches + * with a confidence of 10. + * + * @param ucsm The charset match object. + * @param status Any error conditions are reported back in this variable. + * @return A confidence number for the charset match. + * + * @stable ICU 3.6 + */ +U_STABLE int32_t U_EXPORT2 +ucsdet_getConfidence(const UCharsetMatch *ucsm, UErrorCode *status); + +/** + * Get the RFC 3066 code for the language of the input data. + * + * The Charset Detection service is intended primarily for detecting + * charsets, not language. For some, but not all, charsets, a language is + * identified as a byproduct of the detection process, and that is what + * is returned by this function. + * + * CAUTION: + * 1. Language information is not available for input data encoded in + * all charsets. In particular, no language is identified + * for UTF-8 input data. + * + * 2. Closely related languages may sometimes be confused. + * + * If more accurate language detection is required, a linguistic + * analysis package should be used. + * + * The storage for the returned name string is owned by the + * UCharsetMatch, and will remain valid while the UCharsetMatch + * is valid. + * + * @param ucsm The charset match object. + * @param status Any error conditions are reported back in this variable. + * @return The RFC 3066 code for the language of the input data, or + * an empty string if the language could not be determined. + * + * @stable ICU 3.6 + */ +U_STABLE const char * U_EXPORT2 +ucsdet_getLanguage(const UCharsetMatch *ucsm, UErrorCode *status); + + +/** + * Get the entire input text as a UChar string, placing it into + * a caller-supplied buffer. A terminating + * NUL character will be appended to the buffer if space is available. + * + * The number of UChars in the output string, not including the terminating + * NUL, is returned. + * + * If the supplied buffer is smaller than required to hold the output, + * the contents of the buffer are undefined. The full output string length + * (in UChars) is returned as always, and can be used to allocate a buffer + * of the correct size. + * + * + * @param ucsm The charset match object. + * @param buf A UChar buffer to be filled with the converted text data. + * @param cap The capacity of the buffer in UChars. + * @param status Any error conditions are reported back in this variable. + * @return The number of UChars in the output string. + * + * @stable ICU 3.6 + */ +U_STABLE int32_t U_EXPORT2 +ucsdet_getUChars(const UCharsetMatch *ucsm, + UChar *buf, int32_t cap, UErrorCode *status); + + + +/** + * Get an iterator over the set of all detectable charsets - + * over the charsets that are known to the charset detection + * service. + * + * The returned UEnumeration provides access to the names of + * the charsets. + * + * <p> + * The state of the Charset detector that is passed in does not + * affect the result of this function, but requiring a valid, open + * charset detector as a parameter insures that the charset detection + * service has been safely initialized and that the required detection + * data is available. + * + * <p> + * <b>Note:</b> Multiple different charset encodings in a same family may use + * a single shared name in this implementation. For example, this method returns + * an array including "ISO-8859-1" (ISO Latin 1), but not including "windows-1252" + * (Windows Latin 1). However, actual detection result could be "windows-1252" + * when the input data matches Latin 1 code points with any points only available + * in "windows-1252". + * + * @param ucsd a Charset detector. + * @param status Any error conditions are reported back in this variable. + * @return an iterator providing access to the detectable charset names. + * @stable ICU 3.6 + */ +U_STABLE UEnumeration * U_EXPORT2 +ucsdet_getAllDetectableCharsets(const UCharsetDetector *ucsd, UErrorCode *status); + +/** + * Test whether input filtering is enabled for this charset detector. + * Input filtering removes text that appears to be HTML or xml + * markup from the input before applying the code page detection + * heuristics. + * + * @param ucsd The charset detector to check. + * @return TRUE if filtering is enabled. + * @stable ICU 3.6 + */ + +U_STABLE UBool U_EXPORT2 +ucsdet_isInputFilterEnabled(const UCharsetDetector *ucsd); + + +/** + * Enable filtering of input text. If filtering is enabled, + * text within angle brackets ("<" and ">") will be removed + * before detection, which will remove most HTML or xml markup. + * + * @param ucsd the charset detector to be modified. + * @param filter <code>true</code> to enable input text filtering. + * @return The previous setting. + * + * @stable ICU 3.6 + */ +U_STABLE UBool U_EXPORT2 +ucsdet_enableInputFilter(UCharsetDetector *ucsd, UBool filter); + +#ifndef U_HIDE_INTERNAL_API +/** + * Get an iterator over the set of detectable charsets - + * over the charsets that are enabled by the specified charset detector. + * + * The returned UEnumeration provides access to the names of + * the charsets. + * + * @param ucsd a Charset detector. + * @param status Any error conditions are reported back in this variable. + * @return an iterator providing access to the detectable charset names by + * the specified charset detector. + * @internal + */ +U_INTERNAL UEnumeration * U_EXPORT2 +ucsdet_getDetectableCharsets(const UCharsetDetector *ucsd, UErrorCode *status); + +/** + * Enable or disable individual charset encoding. + * A name of charset encoding must be included in the names returned by + * {@link #ucsdet_getAllDetectableCharsets()}. + * + * @param ucsd a Charset detector. + * @param encoding encoding the name of charset encoding. + * @param enabled <code>TRUE</code> to enable, or <code>FALSE</code> to disable the + * charset encoding. + * @param status receives the return status. When the name of charset encoding + * is not supported, U_ILLEGAL_ARGUMENT_ERROR is set. + * @internal + */ +U_INTERNAL void U_EXPORT2 +ucsdet_setDetectableCharset(UCharsetDetector *ucsd, const char *encoding, UBool enabled, UErrorCode *status); +#endif /* U_HIDE_INTERNAL_API */ + +#endif +#endif /* __UCSDET_H */ + + diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucurr.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucurr.h new file mode 100755 index 00000000..192bc298 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ucurr.h @@ -0,0 +1,433 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (c) 2002-2016, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +*/ +#ifndef _UCURR_H_ +#define _UCURR_H_ + +#include "unicode/utypes.h" +#include "unicode/uenum.h" + +/** + * \file + * \brief C API: Encapsulates information about a currency. + * + * The ucurr API encapsulates information about a currency, as defined by + * ISO 4217. A currency is represented by a 3-character string + * containing its ISO 4217 code. This API can return various data + * necessary the proper display of a currency: + * + * <ul><li>A display symbol, for a specific locale + * <li>The number of fraction digits to display + * <li>A rounding increment + * </ul> + * + * The <tt>DecimalFormat</tt> class uses these data to display + * currencies. + * @author Alan Liu + * @since ICU 2.2 + */ + +#if !UCONFIG_NO_FORMATTING + +/** + * Currency Usage used for Decimal Format + * @stable ICU 54 + */ +enum UCurrencyUsage { + /** + * a setting to specify currency usage which determines currency digit + * and rounding for standard usage, for example: "50.00 NT$" + * used as DEFAULT value + * @stable ICU 54 + */ + UCURR_USAGE_STANDARD=0, + /** + * a setting to specify currency usage which determines currency digit + * and rounding for cash usage, for example: "50 NT$" + * @stable ICU 54 + */ + UCURR_USAGE_CASH=1, +#ifndef U_HIDE_DEPRECATED_API + /** + * One higher than the last enum UCurrencyUsage constant. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UCURR_USAGE_COUNT=2 +#endif // U_HIDE_DEPRECATED_API +}; +typedef enum UCurrencyUsage UCurrencyUsage; + +/** + * Finds a currency code for the given locale. + * @param locale the locale for which to retrieve a currency code. + * Currency can be specified by the "currency" keyword + * in which case it overrides the default currency code + * @param buff fill in buffer. Can be NULL for preflighting. + * @param buffCapacity capacity of the fill in buffer. Can be 0 for + * preflighting. If it is non-zero, the buff parameter + * must not be NULL. + * @param ec error code + * @return length of the currency string. It should always be 3. If 0, + * currency couldn't be found or the input values are + * invalid. + * @stable ICU 2.8 + */ +U_STABLE int32_t U_EXPORT2 +ucurr_forLocale(const char* locale, + UChar* buff, + int32_t buffCapacity, + UErrorCode* ec); + +/** + * Selector constants for ucurr_getName(). + * + * @see ucurr_getName + * @stable ICU 2.6 + */ +typedef enum UCurrNameStyle { + /** + * Selector for ucurr_getName indicating a symbolic name for a + * currency, such as "$" for USD. + * @stable ICU 2.6 + */ + UCURR_SYMBOL_NAME, + + /** + * Selector for ucurr_getName indicating the long name for a + * currency, such as "US Dollar" for USD. + * @stable ICU 2.6 + */ + UCURR_LONG_NAME + +#ifndef U_HIDE_DRAFT_API + , + /** + * Selector for getName() indicating the narrow currency symbol. + * The narrow currency symbol is similar to the regular currency + * symbol, but it always takes the shortest form: for example, + * "$" instead of "US$" for USD in en-CA. + * + * @draft ICU 61 + */ + UCURR_NARROW_SYMBOL_NAME +#endif // U_HIDE_DRAFT_API +} UCurrNameStyle; + +#if !UCONFIG_NO_SERVICE +/** + * @stable ICU 2.6 + */ +typedef const void* UCurrRegistryKey; + +/** + * Register an (existing) ISO 4217 currency code for the given locale. + * Only the country code and the two variants EURO and PRE_EURO are + * recognized. + * @param isoCode the three-letter ISO 4217 currency code + * @param locale the locale for which to register this currency code + * @param status the in/out status code + * @return a registry key that can be used to unregister this currency code, or NULL + * if there was an error. + * @stable ICU 2.6 + */ +U_STABLE UCurrRegistryKey U_EXPORT2 +ucurr_register(const UChar* isoCode, + const char* locale, + UErrorCode* status); +/** + * Unregister the previously-registered currency definitions using the + * URegistryKey returned from ucurr_register. Key becomes invalid after + * a successful call and should not be used again. Any currency + * that might have been hidden by the original ucurr_register call is + * restored. + * @param key the registry key returned by a previous call to ucurr_register + * @param status the in/out status code, no special meanings are assigned + * @return TRUE if the currency for this key was successfully unregistered + * @stable ICU 2.6 + */ +U_STABLE UBool U_EXPORT2 +ucurr_unregister(UCurrRegistryKey key, UErrorCode* status); +#endif /* UCONFIG_NO_SERVICE */ + +/** + * Returns the display name for the given currency in the + * given locale. For example, the display name for the USD + * currency object in the en_US locale is "$". + * @param currency null-terminated 3-letter ISO 4217 code + * @param locale locale in which to display currency + * @param nameStyle selector for which kind of name to return + * @param isChoiceFormat fill-in set to TRUE if the returned value + * is a ChoiceFormat pattern; otherwise it is a static string + * @param len fill-in parameter to receive length of result + * @param ec error code + * @return pointer to display string of 'len' UChars. If the resource + * data contains no entry for 'currency', then 'currency' itself is + * returned. If *isChoiceFormat is TRUE, then the result is a + * ChoiceFormat pattern. Otherwise it is a static string. + * @stable ICU 2.6 + */ +U_STABLE const UChar* U_EXPORT2 +ucurr_getName(const UChar* currency, + const char* locale, + UCurrNameStyle nameStyle, + UBool* isChoiceFormat, + int32_t* len, + UErrorCode* ec); + +/** + * Returns the plural name for the given currency in the + * given locale. For example, the plural name for the USD + * currency object in the en_US locale is "US dollar" or "US dollars". + * @param currency null-terminated 3-letter ISO 4217 code + * @param locale locale in which to display currency + * @param isChoiceFormat fill-in set to TRUE if the returned value + * is a ChoiceFormat pattern; otherwise it is a static string + * @param pluralCount plural count + * @param len fill-in parameter to receive length of result + * @param ec error code + * @return pointer to display string of 'len' UChars. If the resource + * data contains no entry for 'currency', then 'currency' itself is + * returned. + * @stable ICU 4.2 + */ +U_STABLE const UChar* U_EXPORT2 +ucurr_getPluralName(const UChar* currency, + const char* locale, + UBool* isChoiceFormat, + const char* pluralCount, + int32_t* len, + UErrorCode* ec); + +/** + * Returns the number of the number of fraction digits that should + * be displayed for the given currency. + * This is equivalent to ucurr_getDefaultFractionDigitsForUsage(currency,UCURR_USAGE_STANDARD,ec); + * @param currency null-terminated 3-letter ISO 4217 code + * @param ec input-output error code + * @return a non-negative number of fraction digits to be + * displayed, or 0 if there is an error + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +ucurr_getDefaultFractionDigits(const UChar* currency, + UErrorCode* ec); + +/** + * Returns the number of the number of fraction digits that should + * be displayed for the given currency with usage. + * @param currency null-terminated 3-letter ISO 4217 code + * @param usage enum usage for the currency + * @param ec input-output error code + * @return a non-negative number of fraction digits to be + * displayed, or 0 if there is an error + * @stable ICU 54 + */ +U_STABLE int32_t U_EXPORT2 +ucurr_getDefaultFractionDigitsForUsage(const UChar* currency, + const UCurrencyUsage usage, + UErrorCode* ec); + +/** + * Returns the rounding increment for the given currency, or 0.0 if no + * rounding is done by the currency. + * This is equivalent to ucurr_getRoundingIncrementForUsage(currency,UCURR_USAGE_STANDARD,ec); + * @param currency null-terminated 3-letter ISO 4217 code + * @param ec input-output error code + * @return the non-negative rounding increment, or 0.0 if none, + * or 0.0 if there is an error + * @stable ICU 3.0 + */ +U_STABLE double U_EXPORT2 +ucurr_getRoundingIncrement(const UChar* currency, + UErrorCode* ec); + +/** + * Returns the rounding increment for the given currency, or 0.0 if no + * rounding is done by the currency given usage. + * @param currency null-terminated 3-letter ISO 4217 code + * @param usage enum usage for the currency + * @param ec input-output error code + * @return the non-negative rounding increment, or 0.0 if none, + * or 0.0 if there is an error + * @stable ICU 54 + */ +U_STABLE double U_EXPORT2 +ucurr_getRoundingIncrementForUsage(const UChar* currency, + const UCurrencyUsage usage, + UErrorCode* ec); + +/** + * Selector constants for ucurr_openCurrencies(). + * + * @see ucurr_openCurrencies + * @stable ICU 3.2 + */ +typedef enum UCurrCurrencyType { + /** + * Select all ISO-4217 currency codes. + * @stable ICU 3.2 + */ + UCURR_ALL = INT32_MAX, + /** + * Select only ISO-4217 commonly used currency codes. + * These currencies can be found in common use, and they usually have + * bank notes or coins associated with the currency code. + * This does not include fund codes, precious metals and other + * various ISO-4217 codes limited to special financial products. + * @stable ICU 3.2 + */ + UCURR_COMMON = 1, + /** + * Select ISO-4217 uncommon currency codes. + * These codes respresent fund codes, precious metals and other + * various ISO-4217 codes limited to special financial products. + * A fund code is a monetary resource associated with a currency. + * @stable ICU 3.2 + */ + UCURR_UNCOMMON = 2, + /** + * Select only deprecated ISO-4217 codes. + * These codes are no longer in general public use. + * @stable ICU 3.2 + */ + UCURR_DEPRECATED = 4, + /** + * Select only non-deprecated ISO-4217 codes. + * These codes are in general public use. + * @stable ICU 3.2 + */ + UCURR_NON_DEPRECATED = 8 +} UCurrCurrencyType; + +/** + * Provides a UEnumeration object for listing ISO-4217 codes. + * @param currType You can use one of several UCurrCurrencyType values for this + * variable. You can also | (or) them together to get a specific list of + * currencies. Most people will want to use the (UCURR_CURRENCY|UCURR_NON_DEPRECATED) value to + * get a list of current currencies. + * @param pErrorCode Error code + * @stable ICU 3.2 + */ +U_STABLE UEnumeration * U_EXPORT2 +ucurr_openISOCurrencies(uint32_t currType, UErrorCode *pErrorCode); + +/** + * Queries if the given ISO 4217 3-letter code is available on the specified date range. + * + * Note: For checking availability of a currency on a specific date, specify the date on both 'from' and 'to' + * + * When 'from' is U_DATE_MIN and 'to' is U_DATE_MAX, this method checks if the specified currency is available any time. + * If 'from' and 'to' are same UDate value, this method checks if the specified currency is available on that date. + * + * @param isoCode + * The ISO 4217 3-letter code. + * + * @param from + * The lower bound of the date range, inclusive. When 'from' is U_DATE_MIN, check the availability + * of the currency any date before 'to' + * + * @param to + * The upper bound of the date range, inclusive. When 'to' is U_DATE_MAX, check the availability of + * the currency any date after 'from' + * + * @param errorCode + * ICU error code + * + * @return TRUE if the given ISO 4217 3-letter code is supported on the specified date range. + * + * @stable ICU 4.8 + */ +U_STABLE UBool U_EXPORT2 +ucurr_isAvailable(const UChar* isoCode, + UDate from, + UDate to, + UErrorCode* errorCode); + +/** + * Finds the number of valid currency codes for the + * given locale and date. + * @param locale the locale for which to retrieve the + * currency count. + * @param date the date for which to retrieve the + * currency count for the given locale. + * @param ec error code + * @return the number of currency codes for the + * given locale and date. If 0, currency + * codes couldn't be found for the input + * values are invalid. + * @stable ICU 4.0 + */ +U_STABLE int32_t U_EXPORT2 +ucurr_countCurrencies(const char* locale, + UDate date, + UErrorCode* ec); + +/** + * Finds a currency code for the given locale and date + * @param locale the locale for which to retrieve a currency code. + * Currency can be specified by the "currency" keyword + * in which case it overrides the default currency code + * @param date the date for which to retrieve a currency code for + * the given locale. + * @param index the index within the available list of currency codes + * for the given locale on the given date. + * @param buff fill in buffer. Can be NULL for preflighting. + * @param buffCapacity capacity of the fill in buffer. Can be 0 for + * preflighting. If it is non-zero, the buff parameter + * must not be NULL. + * @param ec error code + * @return length of the currency string. It should always be 3. + * If 0, currency couldn't be found or the input values are + * invalid. + * @stable ICU 4.0 + */ +U_STABLE int32_t U_EXPORT2 +ucurr_forLocaleAndDate(const char* locale, + UDate date, + int32_t index, + UChar* buff, + int32_t buffCapacity, + UErrorCode* ec); + +/** + * Given a key and a locale, returns an array of string values in a preferred + * order that would make a difference. These are all and only those values where + * the open (creation) of the service with the locale formed from the input locale + * plus input keyword and that value has different behavior than creation with the + * input locale alone. + * @param key one of the keys supported by this service. For now, only + * "currency" is supported. + * @param locale the locale + * @param commonlyUsed if set to true it will return only commonly used values + * with the given locale in preferred order. Otherwise, + * it will return all the available values for the locale. + * @param status error status + * @return a string enumeration over keyword values for the given key and the locale. + * @stable ICU 4.2 + */ +U_STABLE UEnumeration* U_EXPORT2 +ucurr_getKeywordValuesForLocale(const char* key, + const char* locale, + UBool commonlyUsed, + UErrorCode* status); + +/** + * Returns the ISO 4217 numeric code for the currency. + * <p>Note: If the ISO 4217 numeric code is not assigned for the currency or + * the currency is unknown, this function returns 0. + * + * @param currency null-terminated 3-letter ISO 4217 code + * @return The ISO 4217 numeric code of the currency + * @stable ICU 49 + */ +U_STABLE int32_t U_EXPORT2 +ucurr_getNumericCode(const UChar* currency); + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/udat.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/udat.h new file mode 100755 index 00000000..90aff20d --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/udat.h @@ -0,0 +1,1660 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ******************************************************************************* + * Copyright (C) 1996-2016, International Business Machines + * Corporation and others. All Rights Reserved. + ******************************************************************************* +*/ + +#ifndef UDAT_H +#define UDAT_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/localpointer.h" +#include "unicode/ucal.h" +#include "unicode/unum.h" +#include "unicode/udisplaycontext.h" +#include "unicode/ufieldpositer.h" +/** + * \file + * \brief C API: DateFormat + * + * <h2> Date Format C API</h2> + * + * Date Format C API consists of functions that convert dates and + * times from their internal representations to textual form and back again in a + * language-independent manner. Converting from the internal representation (milliseconds + * since midnight, January 1, 1970) to text is known as "formatting," and converting + * from text to millis is known as "parsing." We currently define only one concrete + * structure UDateFormat, which can handle pretty much all normal + * date formatting and parsing actions. + * <P> + * Date Format helps you to format and parse dates for any locale. Your code can + * be completely independent of the locale conventions for months, days of the + * week, or even the calendar format: lunar vs. solar. + * <P> + * To format a date for the current Locale with default time and date style, + * use one of the static factory methods: + * <pre> + * \code + * UErrorCode status = U_ZERO_ERROR; + * UChar *myString; + * int32_t myStrlen = 0; + * UDateFormat* dfmt = udat_open(UDAT_DEFAULT, UDAT_DEFAULT, NULL, NULL, -1, NULL, -1, &status); + * myStrlen = udat_format(dfmt, myDate, NULL, myStrlen, NULL, &status); + * if (status==U_BUFFER_OVERFLOW_ERROR){ + * status=U_ZERO_ERROR; + * myString=(UChar*)malloc(sizeof(UChar) * (myStrlen+1) ); + * udat_format(dfmt, myDate, myString, myStrlen+1, NULL, &status); + * } + * \endcode + * </pre> + * If you are formatting multiple numbers, it is more efficient to get the + * format and use it multiple times so that the system doesn't have to fetch the + * information about the local language and country conventions multiple times. + * <pre> + * \code + * UErrorCode status = U_ZERO_ERROR; + * int32_t i, myStrlen = 0; + * UChar* myString; + * char buffer[1024]; + * UDate myDateArr[] = { 0.0, 100000000.0, 2000000000.0 }; // test values + * UDateFormat* df = udat_open(UDAT_DEFAULT, UDAT_DEFAULT, NULL, NULL, -1, NULL, 0, &status); + * for (i = 0; i < 3; i++) { + * myStrlen = udat_format(df, myDateArr[i], NULL, myStrlen, NULL, &status); + * if(status == U_BUFFER_OVERFLOW_ERROR){ + * status = U_ZERO_ERROR; + * myString = (UChar*)malloc(sizeof(UChar) * (myStrlen+1) ); + * udat_format(df, myDateArr[i], myString, myStrlen+1, NULL, &status); + * printf("%s\n", u_austrcpy(buffer, myString) ); + * free(myString); + * } + * } + * \endcode + * </pre> + * To get specific fields of a date, you can use UFieldPosition to + * get specific fields. + * <pre> + * \code + * UErrorCode status = U_ZERO_ERROR; + * UFieldPosition pos; + * UChar *myString; + * int32_t myStrlen = 0; + * char buffer[1024]; + * + * pos.field = 1; // Same as the DateFormat::EField enum + * UDateFormat* dfmt = udat_open(UDAT_DEFAULT, UDAT_DEFAULT, NULL, -1, NULL, 0, &status); + * myStrlen = udat_format(dfmt, myDate, NULL, myStrlen, &pos, &status); + * if (status==U_BUFFER_OVERFLOW_ERROR){ + * status=U_ZERO_ERROR; + * myString=(UChar*)malloc(sizeof(UChar) * (myStrlen+1) ); + * udat_format(dfmt, myDate, myString, myStrlen+1, &pos, &status); + * } + * printf("date format: %s\n", u_austrcpy(buffer, myString)); + * buffer[pos.endIndex] = 0; // NULL terminate the string. + * printf("UFieldPosition position equals %s\n", &buffer[pos.beginIndex]); + * \endcode + * </pre> + * To format a date for a different Locale, specify it in the call to + * udat_open() + * <pre> + * \code + * UDateFormat* df = udat_open(UDAT_SHORT, UDAT_SHORT, "fr_FR", NULL, -1, NULL, 0, &status); + * \endcode + * </pre> + * You can use a DateFormat API udat_parse() to parse. + * <pre> + * \code + * UErrorCode status = U_ZERO_ERROR; + * int32_t parsepos=0; + * UDate myDate = udat_parse(df, myString, u_strlen(myString), &parsepos, &status); + * \endcode + * </pre> + * You can pass in different options for the arguments for date and time style + * to control the length of the result; from SHORT to MEDIUM to LONG to FULL. + * The exact result depends on the locale, but generally: + * see UDateFormatStyle for more details + * <ul type=round> + * <li> UDAT_SHORT is completely numeric, such as 12/13/52 or 3:30pm + * <li> UDAT_MEDIUM is longer, such as Jan 12, 1952 + * <li> UDAT_LONG is longer, such as January 12, 1952 or 3:30:32pm + * <li> UDAT_FULL is pretty completely specified, such as + * Tuesday, April 12, 1952 AD or 3:30:42pm PST. + * </ul> + * You can also set the time zone on the format if you wish. + * <P> + * You can also use forms of the parse and format methods with Parse Position and + * UFieldPosition to allow you to + * <ul type=round> + * <li> Progressively parse through pieces of a string. + * <li> Align any particular field, or find out where it is for selection + * on the screen. + * </ul> + * <p><strong>Date and Time Patterns:</strong></p> + * + * <p>Date and time formats are specified by <em>date and time pattern</em> strings. + * Within date and time pattern strings, all unquoted ASCII letters [A-Za-z] are reserved + * as pattern letters representing calendar fields. <code>UDateFormat</code> supports + * the date and time formatting algorithm and pattern letters defined by + * <a href="http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table">UTS#35 + * Unicode Locale Data Markup Language (LDML)</a> and further documented for ICU in the + * <a href="https://sites.google.com/site/icuprojectuserguide/formatparse/datetime?pli=1#TOC-Date-Field-Symbol-Table">ICU + * User Guide</a>.</p> + */ + +/** A date formatter. + * For usage in C programs. + * @stable ICU 2.6 + */ +typedef void* UDateFormat; + +/** The possible date/time format styles + * @stable ICU 2.6 + */ +typedef enum UDateFormatStyle { + /** Full style */ + UDAT_FULL, + /** Long style */ + UDAT_LONG, + /** Medium style */ + UDAT_MEDIUM, + /** Short style */ + UDAT_SHORT, + /** Default style */ + UDAT_DEFAULT = UDAT_MEDIUM, + + /** Bitfield for relative date */ + UDAT_RELATIVE = (1 << 7), + + UDAT_FULL_RELATIVE = UDAT_FULL | UDAT_RELATIVE, + + UDAT_LONG_RELATIVE = UDAT_LONG | UDAT_RELATIVE, + + UDAT_MEDIUM_RELATIVE = UDAT_MEDIUM | UDAT_RELATIVE, + + UDAT_SHORT_RELATIVE = UDAT_SHORT | UDAT_RELATIVE, + + + /** No style */ + UDAT_NONE = -1, + + /** + * Use the pattern given in the parameter to udat_open + * @see udat_open + * @stable ICU 50 + */ + UDAT_PATTERN = -2, + +#ifndef U_HIDE_INTERNAL_API + /** @internal alias to UDAT_PATTERN */ + UDAT_IGNORE = UDAT_PATTERN +#endif /* U_HIDE_INTERNAL_API */ +} UDateFormatStyle; + +/* Skeletons for dates. */ + +/** + * Constant for date skeleton with year. + * @stable ICU 4.0 + */ +#define UDAT_YEAR "y" +/** + * Constant for date skeleton with quarter. + * @stable ICU 51 + */ +#define UDAT_QUARTER "QQQQ" +/** + * Constant for date skeleton with abbreviated quarter. + * @stable ICU 51 + */ +#define UDAT_ABBR_QUARTER "QQQ" +/** + * Constant for date skeleton with year and quarter. + * @stable ICU 4.0 + */ +#define UDAT_YEAR_QUARTER "yQQQQ" +/** + * Constant for date skeleton with year and abbreviated quarter. + * @stable ICU 4.0 + */ +#define UDAT_YEAR_ABBR_QUARTER "yQQQ" +/** + * Constant for date skeleton with month. + * @stable ICU 4.0 + */ +#define UDAT_MONTH "MMMM" +/** + * Constant for date skeleton with abbreviated month. + * @stable ICU 4.0 + */ +#define UDAT_ABBR_MONTH "MMM" +/** + * Constant for date skeleton with numeric month. + * @stable ICU 4.0 + */ +#define UDAT_NUM_MONTH "M" +/** + * Constant for date skeleton with year and month. + * @stable ICU 4.0 + */ +#define UDAT_YEAR_MONTH "yMMMM" +/** + * Constant for date skeleton with year and abbreviated month. + * @stable ICU 4.0 + */ +#define UDAT_YEAR_ABBR_MONTH "yMMM" +/** + * Constant for date skeleton with year and numeric month. + * @stable ICU 4.0 + */ +#define UDAT_YEAR_NUM_MONTH "yM" +/** + * Constant for date skeleton with day. + * @stable ICU 4.0 + */ +#define UDAT_DAY "d" +/** + * Constant for date skeleton with year, month, and day. + * Used in combinations date + time, date + time + zone, or time + zone. + * @stable ICU 4.0 + */ +#define UDAT_YEAR_MONTH_DAY "yMMMMd" +/** + * Constant for date skeleton with year, abbreviated month, and day. + * Used in combinations date + time, date + time + zone, or time + zone. + * @stable ICU 4.0 + */ +#define UDAT_YEAR_ABBR_MONTH_DAY "yMMMd" +/** + * Constant for date skeleton with year, numeric month, and day. + * Used in combinations date + time, date + time + zone, or time + zone. + * @stable ICU 4.0 + */ +#define UDAT_YEAR_NUM_MONTH_DAY "yMd" +/** + * Constant for date skeleton with weekday. + * @stable ICU 51 + */ +#define UDAT_WEEKDAY "EEEE" +/** + * Constant for date skeleton with abbreviated weekday. + * @stable ICU 51 + */ +#define UDAT_ABBR_WEEKDAY "E" +/** + * Constant for date skeleton with year, month, weekday, and day. + * Used in combinations date + time, date + time + zone, or time + zone. + * @stable ICU 4.0 + */ +#define UDAT_YEAR_MONTH_WEEKDAY_DAY "yMMMMEEEEd" +/** + * Constant for date skeleton with year, abbreviated month, weekday, and day. + * Used in combinations date + time, date + time + zone, or time + zone. + * @stable ICU 4.0 + */ +#define UDAT_YEAR_ABBR_MONTH_WEEKDAY_DAY "yMMMEd" +/** + * Constant for date skeleton with year, numeric month, weekday, and day. + * Used in combinations date + time, date + time + zone, or time + zone. + * @stable ICU 4.0 + */ +#define UDAT_YEAR_NUM_MONTH_WEEKDAY_DAY "yMEd" +/** + * Constant for date skeleton with long month and day. + * Used in combinations date + time, date + time + zone, or time + zone. + * @stable ICU 4.0 + */ +#define UDAT_MONTH_DAY "MMMMd" +/** + * Constant for date skeleton with abbreviated month and day. + * Used in combinations date + time, date + time + zone, or time + zone. + * @stable ICU 4.0 + */ +#define UDAT_ABBR_MONTH_DAY "MMMd" +/** + * Constant for date skeleton with numeric month and day. + * Used in combinations date + time, date + time + zone, or time + zone. + * @stable ICU 4.0 + */ +#define UDAT_NUM_MONTH_DAY "Md" +/** + * Constant for date skeleton with month, weekday, and day. + * Used in combinations date + time, date + time + zone, or time + zone. + * @stable ICU 4.0 + */ +#define UDAT_MONTH_WEEKDAY_DAY "MMMMEEEEd" +/** + * Constant for date skeleton with abbreviated month, weekday, and day. + * Used in combinations date + time, date + time + zone, or time + zone. + * @stable ICU 4.0 + */ +#define UDAT_ABBR_MONTH_WEEKDAY_DAY "MMMEd" +/** + * Constant for date skeleton with numeric month, weekday, and day. + * Used in combinations date + time, date + time + zone, or time + zone. + * @stable ICU 4.0 + */ +#define UDAT_NUM_MONTH_WEEKDAY_DAY "MEd" + +/* Skeletons for times. */ + +/** + * Constant for date skeleton with hour, with the locale's preferred hour format (12 or 24). + * @stable ICU 4.0 + */ +#define UDAT_HOUR "j" +/** + * Constant for date skeleton with hour in 24-hour presentation. + * @stable ICU 51 + */ +#define UDAT_HOUR24 "H" +/** + * Constant for date skeleton with minute. + * @stable ICU 51 + */ +#define UDAT_MINUTE "m" +/** + * Constant for date skeleton with hour and minute, with the locale's preferred hour format (12 or 24). + * Used in combinations date + time, date + time + zone, or time + zone. + * @stable ICU 4.0 + */ +#define UDAT_HOUR_MINUTE "jm" +/** + * Constant for date skeleton with hour and minute in 24-hour presentation. + * Used in combinations date + time, date + time + zone, or time + zone. + * @stable ICU 4.0 + */ +#define UDAT_HOUR24_MINUTE "Hm" +/** + * Constant for date skeleton with second. + * @stable ICU 51 + */ +#define UDAT_SECOND "s" +/** + * Constant for date skeleton with hour, minute, and second, + * with the locale's preferred hour format (12 or 24). + * Used in combinations date + time, date + time + zone, or time + zone. + * @stable ICU 4.0 + */ +#define UDAT_HOUR_MINUTE_SECOND "jms" +/** + * Constant for date skeleton with hour, minute, and second in + * 24-hour presentation. + * Used in combinations date + time, date + time + zone, or time + zone. + * @stable ICU 4.0 + */ +#define UDAT_HOUR24_MINUTE_SECOND "Hms" +/** + * Constant for date skeleton with minute and second. + * Used in combinations date + time, date + time + zone, or time + zone. + * @stable ICU 4.0 + */ +#define UDAT_MINUTE_SECOND "ms" + +/* Skeletons for time zones. */ + +/** + * Constant for <i>generic location format</i>, such as Los Angeles Time; + * used in combinations date + time + zone, or time + zone. + * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a> + * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a> + * @stable ICU 51 + */ +#define UDAT_LOCATION_TZ "VVVV" +/** + * Constant for <i>generic non-location format</i>, such as Pacific Time; + * used in combinations date + time + zone, or time + zone. + * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a> + * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a> + * @stable ICU 51 + */ +#define UDAT_GENERIC_TZ "vvvv" +/** + * Constant for <i>generic non-location format</i>, abbreviated if possible, such as PT; + * used in combinations date + time + zone, or time + zone. + * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a> + * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a> + * @stable ICU 51 + */ +#define UDAT_ABBR_GENERIC_TZ "v" +/** + * Constant for <i>specific non-location format</i>, such as Pacific Daylight Time; + * used in combinations date + time + zone, or time + zone. + * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a> + * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a> + * @stable ICU 51 + */ +#define UDAT_SPECIFIC_TZ "zzzz" +/** + * Constant for <i>specific non-location format</i>, abbreviated if possible, such as PDT; + * used in combinations date + time + zone, or time + zone. + * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a> + * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a> + * @stable ICU 51 + */ +#define UDAT_ABBR_SPECIFIC_TZ "z" +/** + * Constant for <i>localized GMT/UTC format</i>, such as GMT+8:00 or HPG-8:00; + * used in combinations date + time + zone, or time + zone. + * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a> + * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a> + * @stable ICU 51 + */ +#define UDAT_ABBR_UTC_TZ "ZZZZ" + +/* deprecated skeleton constants */ + +#ifndef U_HIDE_DEPRECATED_API +/** + * Constant for date skeleton with standalone month. + * @deprecated ICU 50 Use UDAT_MONTH instead. + */ +#define UDAT_STANDALONE_MONTH "LLLL" +/** + * Constant for date skeleton with standalone abbreviated month. + * @deprecated ICU 50 Use UDAT_ABBR_MONTH instead. + */ +#define UDAT_ABBR_STANDALONE_MONTH "LLL" + +/** + * Constant for date skeleton with hour, minute, and generic timezone. + * @deprecated ICU 50 Use instead UDAT_HOUR_MINUTE UDAT_ABBR_GENERIC_TZ or some other timezone presentation. + */ +#define UDAT_HOUR_MINUTE_GENERIC_TZ "jmv" +/** + * Constant for date skeleton with hour, minute, and timezone. + * @deprecated ICU 50 Use instead UDAT_HOUR_MINUTE UDAT_ABBR_SPECIFIC_TZ or some other timezone presentation. + */ +#define UDAT_HOUR_MINUTE_TZ "jmz" +/** + * Constant for date skeleton with hour and generic timezone. + * @deprecated ICU 50 Use instead UDAT_HOUR UDAT_ABBR_GENERIC_TZ or some other timezone presentation. + */ +#define UDAT_HOUR_GENERIC_TZ "jv" +/** + * Constant for date skeleton with hour and timezone. + * @deprecated ICU 50 Use instead UDAT_HOUR UDAT_ABBR_SPECIFIC_TZ or some other timezone presentation. + */ +#define UDAT_HOUR_TZ "jz" +#endif /* U_HIDE_DEPRECATED_API */ + +/** + * FieldPosition and UFieldPosition selectors for format fields + * defined by DateFormat and UDateFormat. + * @stable ICU 3.0 + */ +typedef enum UDateFormatField { + /** + * FieldPosition and UFieldPosition selector for 'G' field alignment, + * corresponding to the UCAL_ERA field. + * @stable ICU 3.0 + */ + UDAT_ERA_FIELD = 0, + + /** + * FieldPosition and UFieldPosition selector for 'y' field alignment, + * corresponding to the UCAL_YEAR field. + * @stable ICU 3.0 + */ + UDAT_YEAR_FIELD = 1, + + /** + * FieldPosition and UFieldPosition selector for 'M' field alignment, + * corresponding to the UCAL_MONTH field. + * @stable ICU 3.0 + */ + UDAT_MONTH_FIELD = 2, + + /** + * FieldPosition and UFieldPosition selector for 'd' field alignment, + * corresponding to the UCAL_DATE field. + * @stable ICU 3.0 + */ + UDAT_DATE_FIELD = 3, + + /** + * FieldPosition and UFieldPosition selector for 'k' field alignment, + * corresponding to the UCAL_HOUR_OF_DAY field. + * UDAT_HOUR_OF_DAY1_FIELD is used for the one-based 24-hour clock. + * For example, 23:59 + 01:00 results in 24:59. + * @stable ICU 3.0 + */ + UDAT_HOUR_OF_DAY1_FIELD = 4, + + /** + * FieldPosition and UFieldPosition selector for 'H' field alignment, + * corresponding to the UCAL_HOUR_OF_DAY field. + * UDAT_HOUR_OF_DAY0_FIELD is used for the zero-based 24-hour clock. + * For example, 23:59 + 01:00 results in 00:59. + * @stable ICU 3.0 + */ + UDAT_HOUR_OF_DAY0_FIELD = 5, + + /** + * FieldPosition and UFieldPosition selector for 'm' field alignment, + * corresponding to the UCAL_MINUTE field. + * @stable ICU 3.0 + */ + UDAT_MINUTE_FIELD = 6, + + /** + * FieldPosition and UFieldPosition selector for 's' field alignment, + * corresponding to the UCAL_SECOND field. + * @stable ICU 3.0 + */ + UDAT_SECOND_FIELD = 7, + + /** + * FieldPosition and UFieldPosition selector for 'S' field alignment, + * corresponding to the UCAL_MILLISECOND field. + * + * Note: Time formats that use 'S' can display a maximum of three + * significant digits for fractional seconds, corresponding to millisecond + * resolution and a fractional seconds sub-pattern of SSS. If the + * sub-pattern is S or SS, the fractional seconds value will be truncated + * (not rounded) to the number of display places specified. If the + * fractional seconds sub-pattern is longer than SSS, the additional + * display places will be filled with zeros. + * @stable ICU 3.0 + */ + UDAT_FRACTIONAL_SECOND_FIELD = 8, + + /** + * FieldPosition and UFieldPosition selector for 'E' field alignment, + * corresponding to the UCAL_DAY_OF_WEEK field. + * @stable ICU 3.0 + */ + UDAT_DAY_OF_WEEK_FIELD = 9, + + /** + * FieldPosition and UFieldPosition selector for 'D' field alignment, + * corresponding to the UCAL_DAY_OF_YEAR field. + * @stable ICU 3.0 + */ + UDAT_DAY_OF_YEAR_FIELD = 10, + + /** + * FieldPosition and UFieldPosition selector for 'F' field alignment, + * corresponding to the UCAL_DAY_OF_WEEK_IN_MONTH field. + * @stable ICU 3.0 + */ + UDAT_DAY_OF_WEEK_IN_MONTH_FIELD = 11, + + /** + * FieldPosition and UFieldPosition selector for 'w' field alignment, + * corresponding to the UCAL_WEEK_OF_YEAR field. + * @stable ICU 3.0 + */ + UDAT_WEEK_OF_YEAR_FIELD = 12, + + /** + * FieldPosition and UFieldPosition selector for 'W' field alignment, + * corresponding to the UCAL_WEEK_OF_MONTH field. + * @stable ICU 3.0 + */ + UDAT_WEEK_OF_MONTH_FIELD = 13, + + /** + * FieldPosition and UFieldPosition selector for 'a' field alignment, + * corresponding to the UCAL_AM_PM field. + * @stable ICU 3.0 + */ + UDAT_AM_PM_FIELD = 14, + + /** + * FieldPosition and UFieldPosition selector for 'h' field alignment, + * corresponding to the UCAL_HOUR field. + * UDAT_HOUR1_FIELD is used for the one-based 12-hour clock. + * For example, 11:30 PM + 1 hour results in 12:30 AM. + * @stable ICU 3.0 + */ + UDAT_HOUR1_FIELD = 15, + + /** + * FieldPosition and UFieldPosition selector for 'K' field alignment, + * corresponding to the UCAL_HOUR field. + * UDAT_HOUR0_FIELD is used for the zero-based 12-hour clock. + * For example, 11:30 PM + 1 hour results in 00:30 AM. + * @stable ICU 3.0 + */ + UDAT_HOUR0_FIELD = 16, + + /** + * FieldPosition and UFieldPosition selector for 'z' field alignment, + * corresponding to the UCAL_ZONE_OFFSET and + * UCAL_DST_OFFSET fields. + * @stable ICU 3.0 + */ + UDAT_TIMEZONE_FIELD = 17, + + /** + * FieldPosition and UFieldPosition selector for 'Y' field alignment, + * corresponding to the UCAL_YEAR_WOY field. + * @stable ICU 3.0 + */ + UDAT_YEAR_WOY_FIELD = 18, + + /** + * FieldPosition and UFieldPosition selector for 'e' field alignment, + * corresponding to the UCAL_DOW_LOCAL field. + * @stable ICU 3.0 + */ + UDAT_DOW_LOCAL_FIELD = 19, + + /** + * FieldPosition and UFieldPosition selector for 'u' field alignment, + * corresponding to the UCAL_EXTENDED_YEAR field. + * @stable ICU 3.0 + */ + UDAT_EXTENDED_YEAR_FIELD = 20, + + /** + * FieldPosition and UFieldPosition selector for 'g' field alignment, + * corresponding to the UCAL_JULIAN_DAY field. + * @stable ICU 3.0 + */ + UDAT_JULIAN_DAY_FIELD = 21, + + /** + * FieldPosition and UFieldPosition selector for 'A' field alignment, + * corresponding to the UCAL_MILLISECONDS_IN_DAY field. + * @stable ICU 3.0 + */ + UDAT_MILLISECONDS_IN_DAY_FIELD = 22, + + /** + * FieldPosition and UFieldPosition selector for 'Z' field alignment, + * corresponding to the UCAL_ZONE_OFFSET and + * UCAL_DST_OFFSET fields. + * @stable ICU 3.0 + */ + UDAT_TIMEZONE_RFC_FIELD = 23, + + /** + * FieldPosition and UFieldPosition selector for 'v' field alignment, + * corresponding to the UCAL_ZONE_OFFSET field. + * @stable ICU 3.4 + */ + UDAT_TIMEZONE_GENERIC_FIELD = 24, + /** + * FieldPosition selector for 'c' field alignment, + * corresponding to the {@link #UCAL_DOW_LOCAL} field. + * This displays the stand alone day name, if available. + * @stable ICU 3.4 + */ + UDAT_STANDALONE_DAY_FIELD = 25, + + /** + * FieldPosition selector for 'L' field alignment, + * corresponding to the {@link #UCAL_MONTH} field. + * This displays the stand alone month name, if available. + * @stable ICU 3.4 + */ + UDAT_STANDALONE_MONTH_FIELD = 26, + + /** + * FieldPosition selector for "Q" field alignment, + * corresponding to quarters. This is implemented + * using the {@link #UCAL_MONTH} field. This + * displays the quarter. + * @stable ICU 3.6 + */ + UDAT_QUARTER_FIELD = 27, + + /** + * FieldPosition selector for the "q" field alignment, + * corresponding to stand-alone quarters. This is + * implemented using the {@link #UCAL_MONTH} field. + * This displays the stand-alone quarter. + * @stable ICU 3.6 + */ + UDAT_STANDALONE_QUARTER_FIELD = 28, + + /** + * FieldPosition and UFieldPosition selector for 'V' field alignment, + * corresponding to the UCAL_ZONE_OFFSET field. + * @stable ICU 3.8 + */ + UDAT_TIMEZONE_SPECIAL_FIELD = 29, + + /** + * FieldPosition selector for "U" field alignment, + * corresponding to cyclic year names. This is implemented + * using the {@link #UCAL_YEAR} field. This displays + * the cyclic year name, if available. + * @stable ICU 49 + */ + UDAT_YEAR_NAME_FIELD = 30, + + /** + * FieldPosition selector for 'O' field alignment, + * corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OFFSETfields. + * This displays the localized GMT format. + * @stable ICU 51 + */ + UDAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD = 31, + + /** + * FieldPosition selector for 'X' field alignment, + * corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OFFSETfields. + * This displays the ISO 8601 local time offset format or UTC indicator ("Z"). + * @stable ICU 51 + */ + UDAT_TIMEZONE_ISO_FIELD = 32, + + /** + * FieldPosition selector for 'x' field alignment, + * corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OFFSET fields. + * This displays the ISO 8601 local time offset format. + * @stable ICU 51 + */ + UDAT_TIMEZONE_ISO_LOCAL_FIELD = 33, + +#ifndef U_HIDE_INTERNAL_API + /** + * FieldPosition and UFieldPosition selector for 'r' field alignment, + * no directly corresponding UCAL_ field. + * @internal ICU 53 + */ + UDAT_RELATED_YEAR_FIELD = 34, +#endif /* U_HIDE_INTERNAL_API */ + + /** + * FieldPosition selector for 'b' field alignment. + * Displays midnight and noon for 12am and 12pm, respectively, if available; + * otherwise fall back to AM / PM. + * @stable ICU 57 + */ + UDAT_AM_PM_MIDNIGHT_NOON_FIELD = 35, + + /* FieldPosition selector for 'B' field alignment. + * Displays flexible day periods, such as "in the morning", if available. + * @stable ICU 57 + */ + UDAT_FLEXIBLE_DAY_PERIOD_FIELD = 36, + +#ifndef U_HIDE_INTERNAL_API + /** + * FieldPosition and UFieldPosition selector for time separator, + * no corresponding UCAL_ field. No pattern character is currently + * defined for this. + * @internal + */ + UDAT_TIME_SEPARATOR_FIELD = 37, +#endif /* U_HIDE_INTERNAL_API */ + +#ifndef U_HIDE_DEPRECATED_API + /** + * Number of FieldPosition and UFieldPosition selectors for + * DateFormat and UDateFormat. + * Valid selectors range from 0 to UDAT_FIELD_COUNT-1. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UDAT_FIELD_COUNT = 38 +#endif /* U_HIDE_DEPRECATED_API */ +} UDateFormatField; + + +#ifndef U_HIDE_INTERNAL_API +/** + * Is a pattern character defined for UDAT_TIME_SEPARATOR_FIELD? + * In ICU 55 it was COLON, but that was withdrawn in ICU 56. + * @internal ICU 56 + */ +#define UDAT_HAS_PATTERN_CHAR_FOR_TIME_SEPARATOR 0 +#endif /* U_HIDE_INTERNAL_API */ + + +/** + * Maps from a UDateFormatField to the corresponding UCalendarDateFields. + * Note: since the mapping is many-to-one, there is no inverse mapping. + * @param field the UDateFormatField. + * @return the UCalendarDateField. This will be UCAL_FIELD_COUNT in case + * of error (e.g., the input field is UDAT_FIELD_COUNT). + * @stable ICU 4.4 + */ +U_CAPI UCalendarDateFields U_EXPORT2 +udat_toCalendarDateField(UDateFormatField field); + + +/** + * Open a new UDateFormat for formatting and parsing dates and times. + * A UDateFormat may be used to format dates in calls to {@link #udat_format }, + * and to parse dates in calls to {@link #udat_parse }. + * @param timeStyle The style used to format times; one of UDAT_FULL, UDAT_LONG, + * UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, or UDAT_NONE (relative time styles + * are not currently supported). + * When the pattern parameter is used, pass in UDAT_PATTERN for both timeStyle and dateStyle. + * @param dateStyle The style used to format dates; one of UDAT_FULL, UDAT_LONG, + * UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, UDAT_FULL_RELATIVE, UDAT_LONG_RELATIVE, + * UDAT_MEDIUM_RELATIVE, UDAT_SHORT_RELATIVE, or UDAT_NONE. + * When the pattern parameter is used, pass in UDAT_PATTERN for both timeStyle and dateStyle. + * As currently implemented, + * relative date formatting only affects a limited range of calendar days before or + * after the current date, based on the CLDR <field type="day">/<relative> data: For + * example, in English, "Yesterday", "Today", and "Tomorrow". Outside of this range, + * dates are formatted using the corresponding non-relative style. + * @param locale The locale specifying the formatting conventions + * @param tzID A timezone ID specifying the timezone to use. If 0, use + * the default timezone. + * @param tzIDLength The length of tzID, or -1 if null-terminated. + * @param pattern A pattern specifying the format to use. + * @param patternLength The number of characters in the pattern, or -1 if null-terminated. + * @param status A pointer to an UErrorCode to receive any errors + * @return A pointer to a UDateFormat to use for formatting dates and times, or 0 if + * an error occurred. + * @stable ICU 2.0 + */ +U_CAPI UDateFormat* U_EXPORT2 +udat_open(UDateFormatStyle timeStyle, + UDateFormatStyle dateStyle, + const char *locale, + const UChar *tzID, + int32_t tzIDLength, + const UChar *pattern, + int32_t patternLength, + UErrorCode *status); + + +/** +* Close a UDateFormat. +* Once closed, a UDateFormat may no longer be used. +* @param format The formatter to close. +* @stable ICU 2.0 +*/ +U_CAPI void U_EXPORT2 +udat_close(UDateFormat* format); + + +/** + * DateFormat boolean attributes + * + * @stable ICU 53 + */ +typedef enum UDateFormatBooleanAttribute { + /** + * indicates whether whitespace is allowed. Includes trailing dot tolerance. + * @stable ICU 53 + */ + UDAT_PARSE_ALLOW_WHITESPACE = 0, + /** + * indicates tolerance of numeric data when String data may be assumed. eg: UDAT_YEAR_NAME_FIELD, + * UDAT_STANDALONE_MONTH_FIELD, UDAT_DAY_OF_WEEK_FIELD + * @stable ICU 53 + */ + UDAT_PARSE_ALLOW_NUMERIC = 1, + /** + * indicates tolerance of a partial literal match + * e.g. accepting "--mon-02-march-2011" for a pattern of "'--: 'EEE-WW-MMMM-yyyy" + * @stable ICU 56 + */ + UDAT_PARSE_PARTIAL_LITERAL_MATCH = 2, + /** + * indicates tolerance of pattern mismatch between input data and specified format pattern. + * e.g. accepting "September" for a month pattern of MMM ("Sep") + * @stable ICU 56 + */ + UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH = 3, + + /* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API, + * it is needed for layout of DateFormat object. */ + /** + * One more than the highest normal UDateFormatBooleanAttribute value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UDAT_BOOLEAN_ATTRIBUTE_COUNT = 4 +} UDateFormatBooleanAttribute; + +/** + * Get a boolean attribute associated with a UDateFormat. + * An example would be a true value for a key of UDAT_PARSE_ALLOW_WHITESPACE indicating allowing whitespace leniency. + * If the formatter does not understand the attribute, -1 is returned. + * @param fmt The formatter to query. + * @param attr The attribute to query; e.g. UDAT_PARSE_ALLOW_WHITESPACE. + * @param status A pointer to an UErrorCode to receive any errors + * @return The value of attr. + * @stable ICU 53 + */ +U_CAPI UBool U_EXPORT2 +udat_getBooleanAttribute(const UDateFormat* fmt, UDateFormatBooleanAttribute attr, UErrorCode* status); + +/** + * Set a boolean attribute associated with a UDateFormat. + * An example of a boolean attribute is parse leniency control. If the formatter does not understand + * the attribute, the call is ignored. + * @param fmt The formatter to set. + * @param attr The attribute to set; one of UDAT_PARSE_ALLOW_WHITESPACE or UDAT_PARSE_ALLOW_NUMERIC + * @param newValue The new value of attr. + * @param status A pointer to an UErrorCode to receive any errors + * @stable ICU 53 + */ +U_CAPI void U_EXPORT2 +udat_setBooleanAttribute(UDateFormat *fmt, UDateFormatBooleanAttribute attr, UBool newValue, UErrorCode* status); + + + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUDateFormatPointer + * "Smart pointer" class, closes a UDateFormat via udat_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUDateFormatPointer, UDateFormat, udat_close); + +U_NAMESPACE_END + +#endif + +/** + * Open a copy of a UDateFormat. + * This function performs a deep copy. + * @param fmt The format to copy + * @param status A pointer to an UErrorCode to receive any errors. + * @return A pointer to a UDateFormat identical to fmt. + * @stable ICU 2.0 + */ +U_CAPI UDateFormat* U_EXPORT2 +udat_clone(const UDateFormat *fmt, + UErrorCode *status); + +/** +* Format a date using a UDateFormat. +* The date will be formatted using the conventions specified in {@link #udat_open } +* @param format The formatter to use +* @param dateToFormat The date to format +* @param result A pointer to a buffer to receive the formatted number. +* @param resultLength The maximum size of result. +* @param position A pointer to a UFieldPosition. On input, position->field +* is read. On output, position->beginIndex and position->endIndex indicate +* the beginning and ending indices of field number position->field, if such +* a field exists. This parameter may be NULL, in which case no field +* position data is returned. +* @param status A pointer to an UErrorCode to receive any errors +* @return The total buffer size needed; if greater than resultLength, the output was truncated. +* @see udat_parse +* @see UFieldPosition +* @stable ICU 2.0 +*/ +U_CAPI int32_t U_EXPORT2 +udat_format( const UDateFormat* format, + UDate dateToFormat, + UChar* result, + int32_t resultLength, + UFieldPosition* position, + UErrorCode* status); + +/** +* Format a date using an UDateFormat. +* The date will be formatted using the conventions specified in {@link #udat_open } +* @param format The formatter to use +* @param calendar The calendar to format. The calendar instance might be +* mutated if fields are not yet fully calculated, though +* the function won't change the logical date and time held +* by the instance. +* @param result A pointer to a buffer to receive the formatted number. +* @param capacity The maximum size of result. +* @param position A pointer to a UFieldPosition. On input, position->field +* is read. On output, position->beginIndex and position->endIndex indicate +* the beginning and ending indices of field number position->field, if such +* a field exists. This parameter may be NULL, in which case no field +* position data is returned. +* @param status A pointer to an UErrorCode to receive any errors +* @return The total buffer size needed; if greater than resultLength, the output was truncated. +* @see udat_format +* @see udat_parseCalendar +* @see UFieldPosition +* @stable ICU 55 +*/ +U_CAPI int32_t U_EXPORT2 +udat_formatCalendar( const UDateFormat* format, + UCalendar* calendar, + UChar* result, + int32_t capacity, + UFieldPosition* position, + UErrorCode* status); + +/** +* Format a date using a UDateFormat. +* The date will be formatted using the conventions specified in {@link #udat_open} +* @param format +* The formatter to use +* @param dateToFormat +* The date to format +* @param result +* A pointer to a buffer to receive the formatted number. +* @param resultLength +* The maximum size of result. +* @param fpositer +* A pointer to a UFieldPositionIterator created by {@link #ufieldpositer_open} +* (may be NULL if field position information is not needed). Any +* iteration information already present in the UFieldPositionIterator +* will be deleted, and the iterator will be reset to apply to the +* fields in the formatted string created by this function call; the +* field values provided by {@link #ufieldpositer_next} will be from the +* UDateFormatField enum. +* @param status +* A pointer to a UErrorCode to receive any errors +* @return +* The total buffer size needed; if greater than resultLength, the output was truncated. +* @see udat_parse +* @see UFieldPositionIterator +* @stable ICU 55 +*/ +U_CAPI int32_t U_EXPORT2 +udat_formatForFields( const UDateFormat* format, + UDate dateToFormat, + UChar* result, + int32_t resultLength, + UFieldPositionIterator* fpositer, + UErrorCode* status); + +/** +* Format a date using a UDateFormat. +* The date will be formatted using the conventions specified in {@link #udat_open } +* @param format +* The formatter to use +* @param calendar +* The calendar to format. The calendar instance might be mutated if fields +* are not yet fully calculated, though the function won't change the logical +* date and time held by the instance. +* @param result +* A pointer to a buffer to receive the formatted number. +* @param capacity +* The maximum size of result. +* @param fpositer +* A pointer to a UFieldPositionIterator created by {@link #ufieldpositer_open} +* (may be NULL if field position information is not needed). Any +* iteration information already present in the UFieldPositionIterator +* will be deleted, and the iterator will be reset to apply to the +* fields in the formatted string created by this function call; the +* field values provided by {@link #ufieldpositer_next} will be from the +* UDateFormatField enum. +* @param status +* A pointer to a UErrorCode to receive any errors +* @return +* The total buffer size needed; if greater than resultLength, the output was truncated. +* @see udat_format +* @see udat_parseCalendar +* @see UFieldPositionIterator +* @stable ICU 55 +*/ +U_CAPI int32_t U_EXPORT2 +udat_formatCalendarForFields( const UDateFormat* format, + UCalendar* calendar, + UChar* result, + int32_t capacity, + UFieldPositionIterator* fpositer, + UErrorCode* status); + + +/** +* Parse a string into an date/time using a UDateFormat. +* The date will be parsed using the conventions specified in {@link #udat_open }. +* <P> +* Note that the normal date formats associated with some calendars - such +* as the Chinese lunar calendar - do not specify enough fields to enable +* dates to be parsed unambiguously. In the case of the Chinese lunar +* calendar, while the year within the current 60-year cycle is specified, +* the number of such cycles since the start date of the calendar (in the +* UCAL_ERA field of the UCalendar object) is not normally part of the format, +* and parsing may assume the wrong era. For cases such as this it is +* recommended that clients parse using udat_parseCalendar with the UCalendar +* passed in set to the current date, or to a date within the era/cycle that +* should be assumed if absent in the format. +* +* @param format The formatter to use. +* @param text The text to parse. +* @param textLength The length of text, or -1 if null-terminated. +* @param parsePos If not 0, on input a pointer to an integer specifying the offset at which +* to begin parsing. If not 0, on output the offset at which parsing ended. +* @param status A pointer to an UErrorCode to receive any errors +* @return The value of the parsed date/time +* @see udat_format +* @stable ICU 2.0 +*/ +U_CAPI UDate U_EXPORT2 +udat_parse(const UDateFormat* format, + const UChar* text, + int32_t textLength, + int32_t *parsePos, + UErrorCode *status); + +/** +* Parse a string into an date/time using a UDateFormat. +* The date will be parsed using the conventions specified in {@link #udat_open }. +* @param format The formatter to use. +* @param calendar A calendar set on input to the date and time to be used for +* missing values in the date/time string being parsed, and set +* on output to the parsed date/time. When the calendar type is +* different from the internal calendar held by the UDateFormat +* instance, the internal calendar will be cloned to a work +* calendar set to the same milliseconds and time zone as this +* calendar parameter, field values will be parsed based on the +* work calendar, then the result (milliseconds and time zone) +* will be set in this calendar. +* @param text The text to parse. +* @param textLength The length of text, or -1 if null-terminated. +* @param parsePos If not 0, on input a pointer to an integer specifying the offset at which +* to begin parsing. If not 0, on output the offset at which parsing ended. +* @param status A pointer to an UErrorCode to receive any errors +* @see udat_format +* @stable ICU 2.0 +*/ +U_CAPI void U_EXPORT2 +udat_parseCalendar(const UDateFormat* format, + UCalendar* calendar, + const UChar* text, + int32_t textLength, + int32_t *parsePos, + UErrorCode *status); + +/** +* Determine if an UDateFormat will perform lenient parsing. +* With lenient parsing, the parser may use heuristics to interpret inputs that do not +* precisely match the pattern. With strict parsing, inputs must match the pattern. +* @param fmt The formatter to query +* @return TRUE if fmt is set to perform lenient parsing, FALSE otherwise. +* @see udat_setLenient +* @stable ICU 2.0 +*/ +U_CAPI UBool U_EXPORT2 +udat_isLenient(const UDateFormat* fmt); + +/** +* Specify whether an UDateFormat will perform lenient parsing. +* With lenient parsing, the parser may use heuristics to interpret inputs that do not +* precisely match the pattern. With strict parsing, inputs must match the pattern. +* @param fmt The formatter to set +* @param isLenient TRUE if fmt should perform lenient parsing, FALSE otherwise. +* @see dat_isLenient +* @stable ICU 2.0 +*/ +U_CAPI void U_EXPORT2 +udat_setLenient( UDateFormat* fmt, + UBool isLenient); + +/** +* Get the UCalendar associated with an UDateFormat. +* A UDateFormat uses a UCalendar to convert a raw value to, for example, +* the day of the week. +* @param fmt The formatter to query. +* @return A pointer to the UCalendar used by fmt. +* @see udat_setCalendar +* @stable ICU 2.0 +*/ +U_CAPI const UCalendar* U_EXPORT2 +udat_getCalendar(const UDateFormat* fmt); + +/** +* Set the UCalendar associated with an UDateFormat. +* A UDateFormat uses a UCalendar to convert a raw value to, for example, +* the day of the week. +* @param fmt The formatter to set. +* @param calendarToSet A pointer to an UCalendar to be used by fmt. +* @see udat_setCalendar +* @stable ICU 2.0 +*/ +U_CAPI void U_EXPORT2 +udat_setCalendar( UDateFormat* fmt, + const UCalendar* calendarToSet); + +/** +* Get the UNumberFormat associated with an UDateFormat. +* A UDateFormat uses a UNumberFormat to format numbers within a date, +* for example the day number. +* @param fmt The formatter to query. +* @return A pointer to the UNumberFormat used by fmt to format numbers. +* @see udat_setNumberFormat +* @stable ICU 2.0 +*/ +U_CAPI const UNumberFormat* U_EXPORT2 +udat_getNumberFormat(const UDateFormat* fmt); + +/** +* Get the UNumberFormat for specific field associated with an UDateFormat. +* For example: 'y' for year and 'M' for month +* @param fmt The formatter to query. +* @param field the field to query +* @return A pointer to the UNumberFormat used by fmt to format field numbers. +* @see udat_setNumberFormatForField +* @stable ICU 54 +*/ +U_CAPI const UNumberFormat* U_EXPORT2 +udat_getNumberFormatForField(const UDateFormat* fmt, UChar field); + +/** +* Set the UNumberFormat for specific field associated with an UDateFormat. +* It can be a single field like: "y"(year) or "M"(month) +* It can be several field combined together: "yM"(year and month) +* Note: +* 1 symbol field is enough for multiple symbol field (so "y" will override "yy", "yyy") +* If the field is not numeric, then override has no effect (like "MMM" will use abbreviation, not numerical field) +* +* @param fields the fields to set +* @param fmt The formatter to set. +* @param numberFormatToSet A pointer to the UNumberFormat to be used by fmt to format numbers. +* @param status error code passed around (memory allocation or invalid fields) +* @see udat_getNumberFormatForField +* @stable ICU 54 +*/ +U_CAPI void U_EXPORT2 +udat_adoptNumberFormatForFields( UDateFormat* fmt, + const UChar* fields, + UNumberFormat* numberFormatToSet, + UErrorCode* status); +/** +* Set the UNumberFormat associated with an UDateFormat. +* A UDateFormat uses a UNumberFormat to format numbers within a date, +* for example the day number. +* This method also clears per field NumberFormat instances previously +* set by {@see udat_setNumberFormatForField} +* @param fmt The formatter to set. +* @param numberFormatToSet A pointer to the UNumberFormat to be used by fmt to format numbers. +* @see udat_getNumberFormat +* @see udat_setNumberFormatForField +* @stable ICU 2.0 +*/ +U_CAPI void U_EXPORT2 +udat_setNumberFormat( UDateFormat* fmt, + const UNumberFormat* numberFormatToSet); +/** +* Adopt the UNumberFormat associated with an UDateFormat. +* A UDateFormat uses a UNumberFormat to format numbers within a date, +* for example the day number. +* @param fmt The formatter to set. +* @param numberFormatToAdopt A pointer to the UNumberFormat to be used by fmt to format numbers. +* @see udat_getNumberFormat +* @stable ICU 54 +*/ +U_CAPI void U_EXPORT2 +udat_adoptNumberFormat( UDateFormat* fmt, + UNumberFormat* numberFormatToAdopt); +/** +* Get a locale for which date/time formatting patterns are available. +* A UDateFormat in a locale returned by this function will perform the correct +* formatting and parsing for the locale. +* @param localeIndex The index of the desired locale. +* @return A locale for which date/time formatting patterns are available, or 0 if none. +* @see udat_countAvailable +* @stable ICU 2.0 +*/ +U_CAPI const char* U_EXPORT2 +udat_getAvailable(int32_t localeIndex); + +/** +* Determine how many locales have date/time formatting patterns available. +* This function is most useful as determining the loop ending condition for +* calls to {@link #udat_getAvailable }. +* @return The number of locales for which date/time formatting patterns are available. +* @see udat_getAvailable +* @stable ICU 2.0 +*/ +U_CAPI int32_t U_EXPORT2 +udat_countAvailable(void); + +/** +* Get the year relative to which all 2-digit years are interpreted. +* For example, if the 2-digit start year is 2100, the year 99 will be +* interpreted as 2199. +* @param fmt The formatter to query. +* @param status A pointer to an UErrorCode to receive any errors +* @return The year relative to which all 2-digit years are interpreted. +* @see udat_Set2DigitYearStart +* @stable ICU 2.0 +*/ +U_CAPI UDate U_EXPORT2 +udat_get2DigitYearStart( const UDateFormat *fmt, + UErrorCode *status); + +/** +* Set the year relative to which all 2-digit years will be interpreted. +* For example, if the 2-digit start year is 2100, the year 99 will be +* interpreted as 2199. +* @param fmt The formatter to set. +* @param d The year relative to which all 2-digit years will be interpreted. +* @param status A pointer to an UErrorCode to receive any errors +* @see udat_Set2DigitYearStart +* @stable ICU 2.0 +*/ +U_CAPI void U_EXPORT2 +udat_set2DigitYearStart( UDateFormat *fmt, + UDate d, + UErrorCode *status); + +/** +* Extract the pattern from a UDateFormat. +* The pattern will follow the pattern syntax rules. +* @param fmt The formatter to query. +* @param localized TRUE if the pattern should be localized, FALSE otherwise. +* @param result A pointer to a buffer to receive the pattern. +* @param resultLength The maximum size of result. +* @param status A pointer to an UErrorCode to receive any errors +* @return The total buffer size needed; if greater than resultLength, the output was truncated. +* @see udat_applyPattern +* @stable ICU 2.0 +*/ +U_CAPI int32_t U_EXPORT2 +udat_toPattern( const UDateFormat *fmt, + UBool localized, + UChar *result, + int32_t resultLength, + UErrorCode *status); + +/** +* Set the pattern used by an UDateFormat. +* The pattern should follow the pattern syntax rules. +* @param format The formatter to set. +* @param localized TRUE if the pattern is localized, FALSE otherwise. +* @param pattern The new pattern +* @param patternLength The length of pattern, or -1 if null-terminated. +* @see udat_toPattern +* @stable ICU 2.0 +*/ +U_CAPI void U_EXPORT2 +udat_applyPattern( UDateFormat *format, + UBool localized, + const UChar *pattern, + int32_t patternLength); + +/** + * The possible types of date format symbols + * @stable ICU 2.6 + */ +typedef enum UDateFormatSymbolType { + /** The era names, for example AD */ + UDAT_ERAS, + /** The month names, for example February */ + UDAT_MONTHS, + /** The short month names, for example Feb. */ + UDAT_SHORT_MONTHS, + /** The CLDR-style format "wide" weekday names, for example Monday */ + UDAT_WEEKDAYS, + /** + * The CLDR-style format "abbreviated" (not "short") weekday names, for example "Mon." + * For the CLDR-style format "short" weekday names, use UDAT_SHORTER_WEEKDAYS. + */ + UDAT_SHORT_WEEKDAYS, + /** The AM/PM names, for example AM */ + UDAT_AM_PMS, + /** The localized characters */ + UDAT_LOCALIZED_CHARS, + /** The long era names, for example Anno Domini */ + UDAT_ERA_NAMES, + /** The narrow month names, for example F */ + UDAT_NARROW_MONTHS, + /** The CLDR-style format "narrow" weekday names, for example "M" */ + UDAT_NARROW_WEEKDAYS, + /** Standalone context versions of months */ + UDAT_STANDALONE_MONTHS, + UDAT_STANDALONE_SHORT_MONTHS, + UDAT_STANDALONE_NARROW_MONTHS, + /** The CLDR-style stand-alone "wide" weekday names */ + UDAT_STANDALONE_WEEKDAYS, + /** + * The CLDR-style stand-alone "abbreviated" (not "short") weekday names. + * For the CLDR-style stand-alone "short" weekday names, use UDAT_STANDALONE_SHORTER_WEEKDAYS. + */ + UDAT_STANDALONE_SHORT_WEEKDAYS, + /** The CLDR-style stand-alone "narrow" weekday names */ + UDAT_STANDALONE_NARROW_WEEKDAYS, + /** The quarters, for example 1st Quarter */ + UDAT_QUARTERS, + /** The short quarter names, for example Q1 */ + UDAT_SHORT_QUARTERS, + /** Standalone context versions of quarters */ + UDAT_STANDALONE_QUARTERS, + UDAT_STANDALONE_SHORT_QUARTERS, + /** + * The CLDR-style short weekday names, e.g. "Su", Mo", etc. + * These are named "SHORTER" to contrast with the constants using _SHORT_ + * above, which actually get the CLDR-style *abbreviated* versions of the + * corresponding names. + * @stable ICU 51 + */ + UDAT_SHORTER_WEEKDAYS, + /** + * Standalone version of UDAT_SHORTER_WEEKDAYS. + * @stable ICU 51 + */ + UDAT_STANDALONE_SHORTER_WEEKDAYS, + /** + * Cyclic year names (only supported for some calendars, and only for FORMAT usage; + * udat_setSymbols not supported for UDAT_CYCLIC_YEARS_WIDE) + * @stable ICU 54 + */ + UDAT_CYCLIC_YEARS_WIDE, + /** + * Cyclic year names (only supported for some calendars, and only for FORMAT usage) + * @stable ICU 54 + */ + UDAT_CYCLIC_YEARS_ABBREVIATED, + /** + * Cyclic year names (only supported for some calendars, and only for FORMAT usage; + * udat_setSymbols not supported for UDAT_CYCLIC_YEARS_NARROW) + * @stable ICU 54 + */ + UDAT_CYCLIC_YEARS_NARROW, + /** + * Calendar zodiac names (only supported for some calendars, and only for FORMAT usage; + * udat_setSymbols not supported for UDAT_ZODIAC_NAMES_WIDE) + * @stable ICU 54 + */ + UDAT_ZODIAC_NAMES_WIDE, + /** + * Calendar zodiac names (only supported for some calendars, and only for FORMAT usage) + * @stable ICU 54 + */ + UDAT_ZODIAC_NAMES_ABBREVIATED, + /** + * Calendar zodiac names (only supported for some calendars, and only for FORMAT usage; + * udat_setSymbols not supported for UDAT_ZODIAC_NAMES_NARROW) + * @stable ICU 54 + */ + UDAT_ZODIAC_NAMES_NARROW +} UDateFormatSymbolType; + +struct UDateFormatSymbols; +/** Date format symbols. + * For usage in C programs. + * @stable ICU 2.6 + */ +typedef struct UDateFormatSymbols UDateFormatSymbols; + +/** +* Get the symbols associated with an UDateFormat. +* The symbols are what a UDateFormat uses to represent locale-specific data, +* for example month or day names. +* @param fmt The formatter to query. +* @param type The type of symbols to get. One of UDAT_ERAS, UDAT_MONTHS, UDAT_SHORT_MONTHS, +* UDAT_WEEKDAYS, UDAT_SHORT_WEEKDAYS, UDAT_AM_PMS, or UDAT_LOCALIZED_CHARS +* @param symbolIndex The desired symbol of type type. +* @param result A pointer to a buffer to receive the pattern. +* @param resultLength The maximum size of result. +* @param status A pointer to an UErrorCode to receive any errors +* @return The total buffer size needed; if greater than resultLength, the output was truncated. +* @see udat_countSymbols +* @see udat_setSymbols +* @stable ICU 2.0 +*/ +U_CAPI int32_t U_EXPORT2 +udat_getSymbols(const UDateFormat *fmt, + UDateFormatSymbolType type, + int32_t symbolIndex, + UChar *result, + int32_t resultLength, + UErrorCode *status); + +/** +* Count the number of particular symbols for an UDateFormat. +* This function is most useful as for detemining the loop termination condition +* for calls to {@link #udat_getSymbols }. +* @param fmt The formatter to query. +* @param type The type of symbols to count. One of UDAT_ERAS, UDAT_MONTHS, UDAT_SHORT_MONTHS, +* UDAT_WEEKDAYS, UDAT_SHORT_WEEKDAYS, UDAT_AM_PMS, or UDAT_LOCALIZED_CHARS +* @return The number of symbols of type type. +* @see udat_getSymbols +* @see udat_setSymbols +* @stable ICU 2.0 +*/ +U_CAPI int32_t U_EXPORT2 +udat_countSymbols( const UDateFormat *fmt, + UDateFormatSymbolType type); + +/** +* Set the symbols associated with an UDateFormat. +* The symbols are what a UDateFormat uses to represent locale-specific data, +* for example month or day names. +* @param format The formatter to set +* @param type The type of symbols to set. One of UDAT_ERAS, UDAT_MONTHS, UDAT_SHORT_MONTHS, +* UDAT_WEEKDAYS, UDAT_SHORT_WEEKDAYS, UDAT_AM_PMS, or UDAT_LOCALIZED_CHARS +* @param symbolIndex The index of the symbol to set of type type. +* @param value The new value +* @param valueLength The length of value, or -1 if null-terminated +* @param status A pointer to an UErrorCode to receive any errors +* @see udat_getSymbols +* @see udat_countSymbols +* @stable ICU 2.0 +*/ +U_CAPI void U_EXPORT2 +udat_setSymbols( UDateFormat *format, + UDateFormatSymbolType type, + int32_t symbolIndex, + UChar *value, + int32_t valueLength, + UErrorCode *status); + +/** + * Get the locale for this date format object. + * You can choose between valid and actual locale. + * @param fmt The formatter to get the locale from + * @param type type of the locale we're looking for (valid or actual) + * @param status error code for the operation + * @return the locale name + * @stable ICU 2.8 + */ +U_CAPI const char* U_EXPORT2 +udat_getLocaleByType(const UDateFormat *fmt, + ULocDataLocaleType type, + UErrorCode* status); + +/** + * Set a particular UDisplayContext value in the formatter, such as + * UDISPCTX_CAPITALIZATION_FOR_STANDALONE. + * @param fmt The formatter for which to set a UDisplayContext value. + * @param value The UDisplayContext value to set. + * @param status A pointer to an UErrorCode to receive any errors + * @stable ICU 51 + */ +U_CAPI void U_EXPORT2 +udat_setContext(UDateFormat* fmt, UDisplayContext value, UErrorCode* status); + +/** + * Get the formatter's UDisplayContext value for the specified UDisplayContextType, + * such as UDISPCTX_TYPE_CAPITALIZATION. + * @param fmt The formatter to query. + * @param type The UDisplayContextType whose value to return + * @param status A pointer to an UErrorCode to receive any errors + * @return The UDisplayContextValue for the specified type. + * @stable ICU 53 + */ +U_CAPI UDisplayContext U_EXPORT2 +udat_getContext(const UDateFormat* fmt, UDisplayContextType type, UErrorCode* status); + +#ifndef U_HIDE_INTERNAL_API +/** +* Extract the date pattern from a UDateFormat set for relative date formatting. +* The pattern will follow the pattern syntax rules. +* @param fmt The formatter to query. +* @param result A pointer to a buffer to receive the pattern. +* @param resultLength The maximum size of result. +* @param status A pointer to a UErrorCode to receive any errors +* @return The total buffer size needed; if greater than resultLength, the output was truncated. +* @see udat_applyPatternRelative +* @internal ICU 4.2 technology preview +*/ +U_INTERNAL int32_t U_EXPORT2 +udat_toPatternRelativeDate(const UDateFormat *fmt, + UChar *result, + int32_t resultLength, + UErrorCode *status); + +/** +* Extract the time pattern from a UDateFormat set for relative date formatting. +* The pattern will follow the pattern syntax rules. +* @param fmt The formatter to query. +* @param result A pointer to a buffer to receive the pattern. +* @param resultLength The maximum size of result. +* @param status A pointer to a UErrorCode to receive any errors +* @return The total buffer size needed; if greater than resultLength, the output was truncated. +* @see udat_applyPatternRelative +* @internal ICU 4.2 technology preview +*/ +U_INTERNAL int32_t U_EXPORT2 +udat_toPatternRelativeTime(const UDateFormat *fmt, + UChar *result, + int32_t resultLength, + UErrorCode *status); + +/** +* Set the date & time patterns used by a UDateFormat set for relative date formatting. +* The patterns should follow the pattern syntax rules. +* @param format The formatter to set. +* @param datePattern The new date pattern +* @param datePatternLength The length of datePattern, or -1 if null-terminated. +* @param timePattern The new time pattern +* @param timePatternLength The length of timePattern, or -1 if null-terminated. +* @param status A pointer to a UErrorCode to receive any errors +* @see udat_toPatternRelativeDate, udat_toPatternRelativeTime +* @internal ICU 4.2 technology preview +*/ +U_INTERNAL void U_EXPORT2 +udat_applyPatternRelative(UDateFormat *format, + const UChar *datePattern, + int32_t datePatternLength, + const UChar *timePattern, + int32_t timePatternLength, + UErrorCode *status); + +/** + * @internal + * @see udat_open + */ +typedef UDateFormat* (U_EXPORT2 *UDateFormatOpener) (UDateFormatStyle timeStyle, + UDateFormatStyle dateStyle, + const char *locale, + const UChar *tzID, + int32_t tzIDLength, + const UChar *pattern, + int32_t patternLength, + UErrorCode *status); + +/** + * Register a provider factory + * @internal ICU 49 + */ +U_INTERNAL void U_EXPORT2 +udat_registerOpener(UDateFormatOpener opener, UErrorCode *status); + +/** + * Un-Register a provider factory + * @internal ICU 49 + */ +U_INTERNAL UDateFormatOpener U_EXPORT2 +udat_unregisterOpener(UDateFormatOpener opener, UErrorCode *status); +#endif /* U_HIDE_INTERNAL_API */ + + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/udata.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/udata.h new file mode 100755 index 00000000..a0286e1e --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/udata.h @@ -0,0 +1,437 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* +* Copyright (C) 1999-2014, International Business Machines +* Corporation and others. All Rights Reserved. +* +****************************************************************************** +* file name: udata.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 1999oct25 +* created by: Markus W. Scherer +*/ + +#ifndef __UDATA_H__ +#define __UDATA_H__ + +#include "unicode/utypes.h" +#include "unicode/localpointer.h" + +U_CDECL_BEGIN + +/** + * \file + * \brief C API: Data loading interface + * + * <h2>Information about data loading interface</h2> + * + * This API is used to find and efficiently load data for ICU and applications + * using ICU. It provides an abstract interface that specifies a data type and + * name to find and load the data. Normally this API is used by other ICU APIs + * to load required data out of the ICU data library, but it can be used to + * load data out of other places. + * + * See the User Guide Data Management chapter. + */ + +#ifndef U_HIDE_INTERNAL_API +/** + * Character used to separate package names from tree names + * @internal ICU 3.0 + */ +#define U_TREE_SEPARATOR '-' + +/** + * String used to separate package names from tree names + * @internal ICU 3.0 + */ +#define U_TREE_SEPARATOR_STRING "-" + +/** + * Character used to separate parts of entry names + * @internal ICU 3.0 + */ +#define U_TREE_ENTRY_SEP_CHAR '/' + +/** + * String used to separate parts of entry names + * @internal ICU 3.0 + */ +#define U_TREE_ENTRY_SEP_STRING "/" + +/** + * Alias for standard ICU data + * @internal ICU 3.0 + */ +#define U_ICUDATA_ALIAS "ICUDATA" + +#endif /* U_HIDE_INTERNAL_API */ + +/** + * UDataInfo contains the properties about the requested data. + * This is meta data. + * + * <p>This structure may grow in the future, indicated by the + * <code>size</code> field.</p> + * + * <p>ICU data must be at least 8-aligned, and should be 16-aligned. + * The UDataInfo struct begins 4 bytes after the start of the data item, + * so it is 4-aligned. + * + * <p>The platform data property fields help determine if a data + * file can be efficiently used on a given machine. + * The particular fields are of importance only if the data + * is affected by the properties - if there is integer data + * with word sizes > 1 byte, char* text, or UChar* text.</p> + * + * <p>The implementation for the <code>udata_open[Choice]()</code> + * functions may reject data based on the value in <code>isBigEndian</code>. + * No other field is used by the <code>udata</code> API implementation.</p> + * + * <p>The <code>dataFormat</code> may be used to identify + * the kind of data, e.g. a converter table.</p> + * + * <p>The <code>formatVersion</code> field should be used to + * make sure that the format can be interpreted. + * It may be a good idea to check only for the one or two highest + * of the version elements to allow the data memory to + * get more or somewhat rearranged contents, for as long + * as the using code can still interpret the older contents.</p> + * + * <p>The <code>dataVersion</code> field is intended to be a + * common place to store the source version of the data; + * for data from the Unicode character database, this could + * reflect the Unicode version.</p> + * + * @stable ICU 2.0 + */ +typedef struct { + /** sizeof(UDataInfo) + * @stable ICU 2.0 */ + uint16_t size; + + /** unused, set to 0 + * @stable ICU 2.0*/ + uint16_t reservedWord; + + /* platform data properties */ + /** 0 for little-endian machine, 1 for big-endian + * @stable ICU 2.0 */ + uint8_t isBigEndian; + + /** see U_CHARSET_FAMILY values in utypes.h + * @stable ICU 2.0*/ + uint8_t charsetFamily; + + /** sizeof(UChar), one of { 1, 2, 4 } + * @stable ICU 2.0*/ + uint8_t sizeofUChar; + + /** unused, set to 0 + * @stable ICU 2.0*/ + uint8_t reservedByte; + + /** data format identifier + * @stable ICU 2.0*/ + uint8_t dataFormat[4]; + + /** versions: [0] major [1] minor [2] milli [3] micro + * @stable ICU 2.0*/ + uint8_t formatVersion[4]; + + /** versions: [0] major [1] minor [2] milli [3] micro + * @stable ICU 2.0*/ + uint8_t dataVersion[4]; +} UDataInfo; + +/* API for reading data -----------------------------------------------------*/ + +/** + * Forward declaration of the data memory type. + * @stable ICU 2.0 + */ +typedef struct UDataMemory UDataMemory; + +/** + * Callback function for udata_openChoice(). + * @param context parameter passed into <code>udata_openChoice()</code>. + * @param type The type of the data as passed into <code>udata_openChoice()</code>. + * It may be <code>NULL</code>. + * @param name The name of the data as passed into <code>udata_openChoice()</code>. + * @param pInfo A pointer to the <code>UDataInfo</code> structure + * of data that has been loaded and will be returned + * by <code>udata_openChoice()</code> if this function + * returns <code>TRUE</code>. + * @return TRUE if the current data memory is acceptable + * @stable ICU 2.0 + */ +typedef UBool U_CALLCONV +UDataMemoryIsAcceptable(void *context, + const char *type, const char *name, + const UDataInfo *pInfo); + + +/** + * Convenience function. + * This function works the same as <code>udata_openChoice</code> + * except that any data that matches the type and name + * is assumed to be acceptable. + * @param path Specifies an absolute path and/or a basename for the + * finding of the data in the file system. + * <code>NULL</code> for ICU data. + * @param type A string that specifies the type of data to be loaded. + * For example, resource bundles are loaded with type "res", + * conversion tables with type "cnv". + * This may be <code>NULL</code> or empty. + * @param name A string that specifies the name of the data. + * @param pErrorCode An ICU UErrorCode parameter. It must not be <code>NULL</code>. + * @return A pointer (handle) to a data memory object, or <code>NULL</code> + * if an error occurs. Call <code>udata_getMemory()</code> + * to get a pointer to the actual data. + * + * @see udata_openChoice + * @stable ICU 2.0 + */ +U_STABLE UDataMemory * U_EXPORT2 +udata_open(const char *path, const char *type, const char *name, + UErrorCode *pErrorCode); + +/** + * Data loading function. + * This function is used to find and load efficiently data for + * ICU and applications using ICU. + * It provides an abstract interface that allows to specify a data + * type and name to find and load the data. + * + * <p>The implementation depends on platform properties and user preferences + * and may involve loading shared libraries (DLLs), mapping + * files into memory, or fopen()/fread() files. + * It may also involve using static memory or database queries etc. + * Several or all data items may be combined into one entity + * (DLL, memory-mappable file).</p> + * + * <p>The data is always preceded by a header that includes + * a <code>UDataInfo</code> structure. + * The caller's <code>isAcceptable()</code> function is called to make + * sure that the data is useful. It may be called several times if it + * rejects the data and there is more than one location with data + * matching the type and name.</p> + * + * <p>If <code>path==NULL</code>, then ICU data is loaded. + * Otherwise, it is separated into a basename and a basename-less directory string. + * The basename is used as the data package name, and the directory is + * logically prepended to the ICU data directory string.</p> + * + * <p>For details about ICU data loading see the User Guide + * Data Management chapter. (http://icu-project.org/userguide/icudata.html)</p> + * + * @param path Specifies an absolute path and/or a basename for the + * finding of the data in the file system. + * <code>NULL</code> for ICU data. + * @param type A string that specifies the type of data to be loaded. + * For example, resource bundles are loaded with type "res", + * conversion tables with type "cnv". + * This may be <code>NULL</code> or empty. + * @param name A string that specifies the name of the data. + * @param isAcceptable This function is called to verify that loaded data + * is useful for the client code. If it returns FALSE + * for all data items, then <code>udata_openChoice()</code> + * will return with an error. + * @param context Arbitrary parameter to be passed into isAcceptable. + * @param pErrorCode An ICU UErrorCode parameter. It must not be <code>NULL</code>. + * @return A pointer (handle) to a data memory object, or <code>NULL</code> + * if an error occurs. Call <code>udata_getMemory()</code> + * to get a pointer to the actual data. + * @stable ICU 2.0 + */ +U_STABLE UDataMemory * U_EXPORT2 +udata_openChoice(const char *path, const char *type, const char *name, + UDataMemoryIsAcceptable *isAcceptable, void *context, + UErrorCode *pErrorCode); + +/** + * Close the data memory. + * This function must be called to allow the system to + * release resources associated with this data memory. + * @param pData The pointer to data memory object + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +udata_close(UDataMemory *pData); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUDataMemoryPointer + * "Smart pointer" class, closes a UDataMemory via udata_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUDataMemoryPointer, UDataMemory, udata_close); + +U_NAMESPACE_END + +#endif + +/** + * Get the pointer to the actual data inside the data memory. + * The data is read-only. + * + * ICU data must be at least 8-aligned, and should be 16-aligned. + * + * @param pData The pointer to data memory object + * @stable ICU 2.0 + */ +U_STABLE const void * U_EXPORT2 +udata_getMemory(UDataMemory *pData); + +/** + * Get the information from the data memory header. + * This allows to get access to the header containing + * platform data properties etc. which is not part of + * the data itself and can therefore not be accessed + * via the pointer that <code>udata_getMemory()</code> returns. + * + * @param pData pointer to the data memory object + * @param pInfo pointer to a UDataInfo object; + * its <code>size</code> field must be set correctly, + * typically to <code>sizeof(UDataInfo)</code>. + * + * <code>*pInfo</code> will be filled with the UDataInfo structure + * in the data memory object. If this structure is smaller than + * <code>pInfo->size</code>, then the <code>size</code> will be + * adjusted and only part of the structure will be filled. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +udata_getInfo(UDataMemory *pData, UDataInfo *pInfo); + +/** + * This function bypasses the normal ICU data loading process and + * allows you to force ICU's system data to come out of a user-specified + * area in memory. + * + * ICU data must be at least 8-aligned, and should be 16-aligned. + * See http://userguide.icu-project.org/icudata + * + * The format of this data is that of the icu common data file, as is + * generated by the pkgdata tool with mode=common or mode=dll. + * You can read in a whole common mode file and pass the address to the start of the + * data, or (with the appropriate link options) pass in the pointer to + * the data that has been loaded from a dll by the operating system, + * as shown in this code: + * + * extern const char U_IMPORT U_ICUDATA_ENTRY_POINT []; + * // U_ICUDATA_ENTRY_POINT is same as entry point specified to pkgdata tool + * UErrorCode status = U_ZERO_ERROR; + * + * udata_setCommonData(&U_ICUDATA_ENTRY_POINT, &status); + * + * It is important that the declaration be as above. The entry point + * must not be declared as an extern void*. + * + * Starting with ICU 4.4, it is possible to set several data packages, + * one per call to this function. + * udata_open() will look for data in the multiple data packages in the order + * in which they were set. + * The position of the linked-in or default-name ICU .data package in the + * search list depends on when the first data item is loaded that is not contained + * in the already explicitly set packages. + * If data was loaded implicitly before the first call to this function + * (for example, via opening a converter, constructing a UnicodeString + * from default-codepage data, using formatting or collation APIs, etc.), + * then the default data will be first in the list. + * + * This function has no effect on application (non ICU) data. See udata_setAppData() + * for similar functionality for application data. + * + * @param data pointer to ICU common data + * @param err outgoing error status <code>U_USING_DEFAULT_WARNING, U_UNSUPPORTED_ERROR</code> + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +udata_setCommonData(const void *data, UErrorCode *err); + + +/** + * This function bypasses the normal ICU data loading process for application-specific + * data and allows you to force the it to come out of a user-specified + * pointer. + * + * ICU data must be at least 8-aligned, and should be 16-aligned. + * See http://userguide.icu-project.org/icudata + * + * The format of this data is that of the icu common data file, like 'icudt26l.dat' + * or the corresponding shared library (DLL) file. + * The application must read in or otherwise construct an image of the data and then + * pass the address of it to this function. + * + * + * Warning: setAppData will set a U_USING_DEFAULT_WARNING code if + * data with the specifed path that has already been opened, or + * if setAppData with the same path has already been called. + * Any such calls to setAppData will have no effect. + * + * + * @param packageName the package name by which the application will refer + * to (open) this data + * @param data pointer to the data + * @param err outgoing error status <code>U_USING_DEFAULT_WARNING, U_UNSUPPORTED_ERROR</code> + * @see udata_setCommonData + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +udata_setAppData(const char *packageName, const void *data, UErrorCode *err); + +/** + * Possible settings for udata_setFileAccess() + * @see udata_setFileAccess + * @stable ICU 3.4 + */ +typedef enum UDataFileAccess { + /** ICU looks for data in single files first, then in packages. (default) @stable ICU 3.4 */ + UDATA_FILES_FIRST, + /** An alias for the default access mode. @stable ICU 3.4 */ + UDATA_DEFAULT_ACCESS = UDATA_FILES_FIRST, + /** ICU only loads data from packages, not from single files. @stable ICU 3.4 */ + UDATA_ONLY_PACKAGES, + /** ICU loads data from packages first, and only from single files + if the data cannot be found in a package. @stable ICU 3.4 */ + UDATA_PACKAGES_FIRST, + /** ICU does not access the file system for data loading. @stable ICU 3.4 */ + UDATA_NO_FILES, +#ifndef U_HIDE_DEPRECATED_API + /** + * Number of real UDataFileAccess values. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UDATA_FILE_ACCESS_COUNT +#endif // U_HIDE_DEPRECATED_API +} UDataFileAccess; + +/** + * This function may be called to control how ICU loads data. It must be called + * before any ICU data is loaded, including application data loaded with + * ures/ResourceBundle or udata APIs. This function is not multithread safe. + * The results of calling it while other threads are loading data are undefined. + * @param access The type of file access to be used + * @param status Error code. + * @see UDataFileAccess + * @stable ICU 3.4 + */ +U_STABLE void U_EXPORT2 +udata_setFileAccess(UDataFileAccess access, UErrorCode *status); + +U_CDECL_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/udateintervalformat.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/udateintervalformat.h new file mode 100755 index 00000000..9300ddcf --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/udateintervalformat.h @@ -0,0 +1,186 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +***************************************************************************************** +* Copyright (C) 2010-2012,2015 International Business Machines +* Corporation and others. All Rights Reserved. +***************************************************************************************** +*/ + +#ifndef UDATEINTERVALFORMAT_H +#define UDATEINTERVALFORMAT_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/umisc.h" +#include "unicode/localpointer.h" + +/** + * \file + * \brief C API: Format a date interval. + * + * A UDateIntervalFormat is used to format the range between two UDate values + * in a locale-sensitive way, using a skeleton that specifies the precision and + * completeness of the information to show. If the range smaller than the resolution + * specified by the skeleton, a single date format will be produced. If the range + * is larger than the format specified by the skeleton, a locale-specific fallback + * will be used to format the items missing from the skeleton. + * + * For example, if the range is 2010-03-04 07:56 - 2010-03-04 19:56 (12 hours) + * - The skeleton jm will produce + * for en_US, "7:56 AM - 7:56 PM" + * for en_GB, "7:56 - 19:56" + * - The skeleton MMMd will produce + * for en_US, "Mar 4" + * for en_GB, "4 Mar" + * If the range is 2010-03-04 07:56 - 2010-03-08 16:11 (4 days, 8 hours, 15 minutes) + * - The skeleton jm will produce + * for en_US, "3/4/2010 7:56 AM - 3/8/2010 4:11 PM" + * for en_GB, "4/3/2010 7:56 - 8/3/2010 16:11" + * - The skeleton MMMd will produce + * for en_US, "Mar 4-8" + * for en_GB, "4-8 Mar" + * + * Note: the "-" characters in the above sample output will actually be + * Unicode 2013, EN_DASH, in all but the last example. + * + * Note, in ICU 4.4 the standard skeletons for which date interval format data + * is usually available are as follows; best results will be obtained by using + * skeletons from this set, or those formed by combining these standard skeletons + * (note that for these skeletons, the length of digit field such as d, y, or + * M vs MM is irrelevant (but for non-digit fields such as MMM vs MMMM it is + * relevant). Note that a skeleton involving h or H generally explicitly requests + * that time style (12- or 24-hour time respectively). For a skeleton that + * requests the locale's default time style (h or H), use 'j' instead of h or H. + * h, H, hm, Hm, + * hv, Hv, hmv, Hmv, + * d, + * M, MMM, MMMM, + * Md, MMMd, + * MEd, MMMEd, + * y, + * yM, yMMM, yMMMM, + * yMd, yMMMd, + * yMEd, yMMMEd + * + * Locales for which ICU 4.4 seems to have a reasonable amount of this data + * include: + * af, am, ar, be, bg, bn, ca, cs, da, de (_AT), el, en (_AU,_CA,_GB,_IE,_IN...), + * eo, es (_AR,_CL,_CO,...,_US) et, fa, fi, fo, fr (_BE,_CH,_CA), fur, gsw, he, + * hr, hu, hy, is, it (_CH), ja, kk, km, ko, lt, lv, mk, ml, mt, nb, nl )_BE), + * nn, pl, pt (_PT), rm, ro, ru (_UA), sk, sl, so, sq, sr, sr_Latn, sv, th, to, + * tr, uk, ur, vi, zh (_SG), zh_Hant (_HK,_MO) + */ + +/** + * Opaque UDateIntervalFormat object for use in C programs. + * @stable ICU 4.8 + */ +struct UDateIntervalFormat; +typedef struct UDateIntervalFormat UDateIntervalFormat; /**< C typedef for struct UDateIntervalFormat. @stable ICU 4.8 */ + +/** + * Open a new UDateIntervalFormat object using the predefined rules for a + * given locale plus a specified skeleton. + * @param locale + * The locale for whose rules should be used; may be NULL for + * default locale. + * @param skeleton + * A pattern containing only the fields desired for the interval + * format, for example "Hm", "yMMMd", or "yMMMEdHm". + * @param skeletonLength + * The length of skeleton; may be -1 if the skeleton is zero-terminated. + * @param tzID + * A timezone ID specifying the timezone to use. If 0, use the default + * timezone. + * @param tzIDLength + * The length of tzID, or -1 if null-terminated. If 0, use the default + * timezone. + * @param status + * A pointer to a UErrorCode to receive any errors. + * @return + * A pointer to a UDateIntervalFormat object for the specified locale, + * or NULL if an error occurred. + * @stable ICU 4.8 + */ +U_STABLE UDateIntervalFormat* U_EXPORT2 +udtitvfmt_open(const char* locale, + const UChar* skeleton, + int32_t skeletonLength, + const UChar* tzID, + int32_t tzIDLength, + UErrorCode* status); + +/** + * Close a UDateIntervalFormat object. Once closed it may no longer be used. + * @param formatter + * The UDateIntervalFormat object to close. + * @stable ICU 4.8 + */ +U_STABLE void U_EXPORT2 +udtitvfmt_close(UDateIntervalFormat *formatter); + + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUDateIntervalFormatPointer + * "Smart pointer" class, closes a UDateIntervalFormat via udtitvfmt_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.8 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUDateIntervalFormatPointer, UDateIntervalFormat, udtitvfmt_close); + +U_NAMESPACE_END + +#endif + + +/** + * Formats a date/time range using the conventions established for the + * UDateIntervalFormat object. + * @param formatter + * The UDateIntervalFormat object specifying the format conventions. + * @param fromDate + * The starting point of the range. + * @param toDate + * The ending point of the range. + * @param result + * A pointer to a buffer to receive the formatted range. + * @param resultCapacity + * The maximum size of result. + * @param position + * A pointer to a UFieldPosition. On input, position->field is read. + * On output, position->beginIndex and position->endIndex indicate + * the beginning and ending indices of field number position->field, + * if such a field exists. This parameter may be NULL, in which case + * no field position data is returned. + * There may be multiple instances of a given field type in an + * interval format; in this case the position indices refer to the + * first instance. + * @param status + * A pointer to a UErrorCode to receive any errors. + * @return + * The total buffer size needed; if greater than resultLength, the + * output was truncated. + * @stable ICU 4.8 + */ +U_STABLE int32_t U_EXPORT2 +udtitvfmt_format(const UDateIntervalFormat* formatter, + UDate fromDate, + UDate toDate, + UChar* result, + int32_t resultCapacity, + UFieldPosition* position, + UErrorCode* status); + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/udatpg.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/udatpg.h new file mode 100755 index 00000000..beae756d --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/udatpg.h @@ -0,0 +1,656 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 2007-2015, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: udatpg.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2007jul30 +* created by: Markus W. Scherer +*/ + +#ifndef __UDATPG_H__ +#define __UDATPG_H__ + +#include "unicode/utypes.h" +#include "unicode/uenum.h" +#include "unicode/localpointer.h" + +/** + * \file + * \brief C API: Wrapper for icu::DateTimePatternGenerator (unicode/dtptngen.h). + * + * UDateTimePatternGenerator provides flexible generation of date format patterns, + * like "yy-MM-dd". The user can build up the generator by adding successive + * patterns. Once that is done, a query can be made using a "skeleton", which is + * a pattern which just includes the desired fields and lengths. The generator + * will return the "best fit" pattern corresponding to that skeleton. + * <p>The main method people will use is udatpg_getBestPattern, since normally + * UDateTimePatternGenerator is pre-built with data from a particular locale. + * However, generators can be built directly from other data as well. + * <p><i>Issue: may be useful to also have a function that returns the list of + * fields in a pattern, in order, since we have that internally. + * That would be useful for getting the UI order of field elements.</i> + */ + +/** + * Opaque type for a date/time pattern generator object. + * @stable ICU 3.8 + */ +typedef void *UDateTimePatternGenerator; + +/** + * Field number constants for udatpg_getAppendItemFormats() and similar functions. + * These constants are separate from UDateFormatField despite semantic overlap + * because some fields are merged for the date/time pattern generator. + * @stable ICU 3.8 + */ +typedef enum UDateTimePatternField { + /** @stable ICU 3.8 */ + UDATPG_ERA_FIELD, + /** @stable ICU 3.8 */ + UDATPG_YEAR_FIELD, + /** @stable ICU 3.8 */ + UDATPG_QUARTER_FIELD, + /** @stable ICU 3.8 */ + UDATPG_MONTH_FIELD, + /** @stable ICU 3.8 */ + UDATPG_WEEK_OF_YEAR_FIELD, + /** @stable ICU 3.8 */ + UDATPG_WEEK_OF_MONTH_FIELD, + /** @stable ICU 3.8 */ + UDATPG_WEEKDAY_FIELD, + /** @stable ICU 3.8 */ + UDATPG_DAY_OF_YEAR_FIELD, + /** @stable ICU 3.8 */ + UDATPG_DAY_OF_WEEK_IN_MONTH_FIELD, + /** @stable ICU 3.8 */ + UDATPG_DAY_FIELD, + /** @stable ICU 3.8 */ + UDATPG_DAYPERIOD_FIELD, + /** @stable ICU 3.8 */ + UDATPG_HOUR_FIELD, + /** @stable ICU 3.8 */ + UDATPG_MINUTE_FIELD, + /** @stable ICU 3.8 */ + UDATPG_SECOND_FIELD, + /** @stable ICU 3.8 */ + UDATPG_FRACTIONAL_SECOND_FIELD, + /** @stable ICU 3.8 */ + UDATPG_ZONE_FIELD, + + /* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API, + * it is needed for layout of DateTimePatternGenerator object. */ + /** + * One more than the highest normal UDateTimePatternField value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UDATPG_FIELD_COUNT +} UDateTimePatternField; + +#ifndef U_HIDE_DRAFT_API +/** + * Field display name width constants for udatpg_getFieldDisplayName(). + * @draft ICU 61 + */ +typedef enum UDateTimePGDisplayWidth { + /** @draft ICU 61 */ + UDATPG_WIDE, + /** @draft ICU 61 */ + UDATPG_ABBREVIATED, + /** @draft ICU 61 */ + UDATPG_NARROW +} UDateTimePGDisplayWidth; +#endif // U_HIDE_DRAFT_API + +/** + * Masks to control forcing the length of specified fields in the returned + * pattern to match those in the skeleton (when this would not happen + * otherwise). These may be combined to force the length of multiple fields. + * Used with udatpg_getBestPatternWithOptions, udatpg_replaceFieldTypesWithOptions. + * @stable ICU 4.4 + */ +typedef enum UDateTimePatternMatchOptions { + /** @stable ICU 4.4 */ + UDATPG_MATCH_NO_OPTIONS = 0, + /** @stable ICU 4.4 */ + UDATPG_MATCH_HOUR_FIELD_LENGTH = 1 << UDATPG_HOUR_FIELD, +#ifndef U_HIDE_INTERNAL_API + /** @internal ICU 4.4 */ + UDATPG_MATCH_MINUTE_FIELD_LENGTH = 1 << UDATPG_MINUTE_FIELD, + /** @internal ICU 4.4 */ + UDATPG_MATCH_SECOND_FIELD_LENGTH = 1 << UDATPG_SECOND_FIELD, +#endif /* U_HIDE_INTERNAL_API */ + /** @stable ICU 4.4 */ + UDATPG_MATCH_ALL_FIELDS_LENGTH = (1 << UDATPG_FIELD_COUNT) - 1 +} UDateTimePatternMatchOptions; + +/** + * Status return values from udatpg_addPattern(). + * @stable ICU 3.8 + */ +typedef enum UDateTimePatternConflict { + /** @stable ICU 3.8 */ + UDATPG_NO_CONFLICT, + /** @stable ICU 3.8 */ + UDATPG_BASE_CONFLICT, + /** @stable ICU 3.8 */ + UDATPG_CONFLICT, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UDateTimePatternConflict value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UDATPG_CONFLICT_COUNT +#endif // U_HIDE_DEPRECATED_API +} UDateTimePatternConflict; + +/** + * Open a generator according to a given locale. + * @param locale + * @param pErrorCode a pointer to the UErrorCode which must not indicate a + * failure before the function call. + * @return a pointer to UDateTimePatternGenerator. + * @stable ICU 3.8 + */ +U_STABLE UDateTimePatternGenerator * U_EXPORT2 +udatpg_open(const char *locale, UErrorCode *pErrorCode); + +/** + * Open an empty generator, to be constructed with udatpg_addPattern(...) etc. + * @param pErrorCode a pointer to the UErrorCode which must not indicate a + * failure before the function call. + * @return a pointer to UDateTimePatternGenerator. + * @stable ICU 3.8 + */ +U_STABLE UDateTimePatternGenerator * U_EXPORT2 +udatpg_openEmpty(UErrorCode *pErrorCode); + +/** + * Close a generator. + * @param dtpg a pointer to UDateTimePatternGenerator. + * @stable ICU 3.8 + */ +U_STABLE void U_EXPORT2 +udatpg_close(UDateTimePatternGenerator *dtpg); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUDateTimePatternGeneratorPointer + * "Smart pointer" class, closes a UDateTimePatternGenerator via udatpg_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUDateTimePatternGeneratorPointer, UDateTimePatternGenerator, udatpg_close); + +U_NAMESPACE_END + +#endif + +/** + * Create a copy pf a generator. + * @param dtpg a pointer to UDateTimePatternGenerator to be copied. + * @param pErrorCode a pointer to the UErrorCode which must not indicate a + * failure before the function call. + * @return a pointer to a new UDateTimePatternGenerator. + * @stable ICU 3.8 + */ +U_STABLE UDateTimePatternGenerator * U_EXPORT2 +udatpg_clone(const UDateTimePatternGenerator *dtpg, UErrorCode *pErrorCode); + +/** + * Get the best pattern matching the input skeleton. It is guaranteed to + * have all of the fields in the skeleton. + * + * Note that this function uses a non-const UDateTimePatternGenerator: + * It uses a stateful pattern parser which is set up for each generator object, + * rather than creating one for each function call. + * Consecutive calls to this function do not affect each other, + * but this function cannot be used concurrently on a single generator object. + * + * @param dtpg a pointer to UDateTimePatternGenerator. + * @param skeleton + * The skeleton is a pattern containing only the variable fields. + * For example, "MMMdd" and "mmhh" are skeletons. + * @param length the length of skeleton + * @param bestPattern + * The best pattern found from the given skeleton. + * @param capacity the capacity of bestPattern. + * @param pErrorCode a pointer to the UErrorCode which must not indicate a + * failure before the function call. + * @return the length of bestPattern. + * @stable ICU 3.8 + */ +U_STABLE int32_t U_EXPORT2 +udatpg_getBestPattern(UDateTimePatternGenerator *dtpg, + const UChar *skeleton, int32_t length, + UChar *bestPattern, int32_t capacity, + UErrorCode *pErrorCode); + +/** + * Get the best pattern matching the input skeleton. It is guaranteed to + * have all of the fields in the skeleton. + * + * Note that this function uses a non-const UDateTimePatternGenerator: + * It uses a stateful pattern parser which is set up for each generator object, + * rather than creating one for each function call. + * Consecutive calls to this function do not affect each other, + * but this function cannot be used concurrently on a single generator object. + * + * @param dtpg a pointer to UDateTimePatternGenerator. + * @param skeleton + * The skeleton is a pattern containing only the variable fields. + * For example, "MMMdd" and "mmhh" are skeletons. + * @param length the length of skeleton + * @param options + * Options for forcing the length of specified fields in the + * returned pattern to match those in the skeleton (when this + * would not happen otherwise). For default behavior, use + * UDATPG_MATCH_NO_OPTIONS. + * @param bestPattern + * The best pattern found from the given skeleton. + * @param capacity + * the capacity of bestPattern. + * @param pErrorCode + * a pointer to the UErrorCode which must not indicate a + * failure before the function call. + * @return the length of bestPattern. + * @stable ICU 4.4 + */ +U_STABLE int32_t U_EXPORT2 +udatpg_getBestPatternWithOptions(UDateTimePatternGenerator *dtpg, + const UChar *skeleton, int32_t length, + UDateTimePatternMatchOptions options, + UChar *bestPattern, int32_t capacity, + UErrorCode *pErrorCode); + +/** + * Get a unique skeleton from a given pattern. For example, + * both "MMM-dd" and "dd/MMM" produce the skeleton "MMMdd". + * + * Note that this function uses a non-const UDateTimePatternGenerator: + * It uses a stateful pattern parser which is set up for each generator object, + * rather than creating one for each function call. + * Consecutive calls to this function do not affect each other, + * but this function cannot be used concurrently on a single generator object. + * + * @param unusedDtpg a pointer to UDateTimePatternGenerator. + * This parameter is no longer used. Callers may pass NULL. + * @param pattern input pattern, such as "dd/MMM". + * @param length the length of pattern. + * @param skeleton such as "MMMdd" + * @param capacity the capacity of skeleton. + * @param pErrorCode a pointer to the UErrorCode which must not indicate a + * failure before the function call. + * @return the length of skeleton. + * @stable ICU 3.8 + */ +U_STABLE int32_t U_EXPORT2 +udatpg_getSkeleton(UDateTimePatternGenerator *unusedDtpg, + const UChar *pattern, int32_t length, + UChar *skeleton, int32_t capacity, + UErrorCode *pErrorCode); + +/** + * Get a unique base skeleton from a given pattern. This is the same + * as the skeleton, except that differences in length are minimized so + * as to only preserve the difference between string and numeric form. So + * for example, both "MMM-dd" and "d/MMM" produce the skeleton "MMMd" + * (notice the single d). + * + * Note that this function uses a non-const UDateTimePatternGenerator: + * It uses a stateful pattern parser which is set up for each generator object, + * rather than creating one for each function call. + * Consecutive calls to this function do not affect each other, + * but this function cannot be used concurrently on a single generator object. + * + * @param unusedDtpg a pointer to UDateTimePatternGenerator. + * This parameter is no longer used. Callers may pass NULL. + * @param pattern input pattern, such as "dd/MMM". + * @param length the length of pattern. + * @param baseSkeleton such as "Md" + * @param capacity the capacity of base skeleton. + * @param pErrorCode a pointer to the UErrorCode which must not indicate a + * failure before the function call. + * @return the length of baseSkeleton. + * @stable ICU 3.8 + */ +U_STABLE int32_t U_EXPORT2 +udatpg_getBaseSkeleton(UDateTimePatternGenerator *unusedDtpg, + const UChar *pattern, int32_t length, + UChar *baseSkeleton, int32_t capacity, + UErrorCode *pErrorCode); + +/** + * Adds a pattern to the generator. If the pattern has the same skeleton as + * an existing pattern, and the override parameter is set, then the previous + * value is overriden. Otherwise, the previous value is retained. In either + * case, the conflicting status is set and previous vale is stored in + * conflicting pattern. + * <p> + * Note that single-field patterns (like "MMM") are automatically added, and + * don't need to be added explicitly! + * + * @param dtpg a pointer to UDateTimePatternGenerator. + * @param pattern input pattern, such as "dd/MMM" + * @param patternLength the length of pattern. + * @param override When existing values are to be overridden use true, + * otherwise use false. + * @param conflictingPattern Previous pattern with the same skeleton. + * @param capacity the capacity of conflictingPattern. + * @param pLength a pointer to the length of conflictingPattern. + * @param pErrorCode a pointer to the UErrorCode which must not indicate a + * failure before the function call. + * @return conflicting status. The value could be UDATPG_NO_CONFLICT, + * UDATPG_BASE_CONFLICT or UDATPG_CONFLICT. + * @stable ICU 3.8 + */ +U_STABLE UDateTimePatternConflict U_EXPORT2 +udatpg_addPattern(UDateTimePatternGenerator *dtpg, + const UChar *pattern, int32_t patternLength, + UBool override, + UChar *conflictingPattern, int32_t capacity, int32_t *pLength, + UErrorCode *pErrorCode); + +/** + * An AppendItem format is a pattern used to append a field if there is no + * good match. For example, suppose that the input skeleton is "GyyyyMMMd", + * and there is no matching pattern internally, but there is a pattern + * matching "yyyyMMMd", say "d-MM-yyyy". Then that pattern is used, plus the + * G. The way these two are conjoined is by using the AppendItemFormat for G + * (era). So if that value is, say "{0}, {1}" then the final resulting + * pattern is "d-MM-yyyy, G". + * <p> + * There are actually three available variables: {0} is the pattern so far, + * {1} is the element we are adding, and {2} is the name of the element. + * <p> + * This reflects the way that the CLDR data is organized. + * + * @param dtpg a pointer to UDateTimePatternGenerator. + * @param field UDateTimePatternField, such as UDATPG_ERA_FIELD + * @param value pattern, such as "{0}, {1}" + * @param length the length of value. + * @stable ICU 3.8 + */ +U_STABLE void U_EXPORT2 +udatpg_setAppendItemFormat(UDateTimePatternGenerator *dtpg, + UDateTimePatternField field, + const UChar *value, int32_t length); + +/** + * Getter corresponding to setAppendItemFormat. Values below 0 or at or + * above UDATPG_FIELD_COUNT are illegal arguments. + * + * @param dtpg A pointer to UDateTimePatternGenerator. + * @param field UDateTimePatternField, such as UDATPG_ERA_FIELD + * @param pLength A pointer that will receive the length of appendItemFormat. + * @return appendItemFormat for field. + * @stable ICU 3.8 + */ +U_STABLE const UChar * U_EXPORT2 +udatpg_getAppendItemFormat(const UDateTimePatternGenerator *dtpg, + UDateTimePatternField field, + int32_t *pLength); + +/** + * Set the name of field, eg "era" in English for ERA. These are only + * used if the corresponding AppendItemFormat is used, and if it contains a + * {2} variable. + * <p> + * This reflects the way that the CLDR data is organized. + * + * @param dtpg a pointer to UDateTimePatternGenerator. + * @param field UDateTimePatternField + * @param value name for the field. + * @param length the length of value. + * @stable ICU 3.8 + */ +U_STABLE void U_EXPORT2 +udatpg_setAppendItemName(UDateTimePatternGenerator *dtpg, + UDateTimePatternField field, + const UChar *value, int32_t length); + +/** + * Getter corresponding to setAppendItemNames. Values below 0 or at or above + * UDATPG_FIELD_COUNT are illegal arguments. Note: The more general function + * for getting date/time field display names is udatpg_getFieldDisplayName. + * + * @param dtpg a pointer to UDateTimePatternGenerator. + * @param field UDateTimePatternField, such as UDATPG_ERA_FIELD + * @param pLength A pointer that will receive the length of the name for field. + * @return name for field + * @see udatpg_getFieldDisplayName + * @stable ICU 3.8 + */ +U_STABLE const UChar * U_EXPORT2 +udatpg_getAppendItemName(const UDateTimePatternGenerator *dtpg, + UDateTimePatternField field, + int32_t *pLength); + +#ifndef U_HIDE_DRAFT_API +/** + * The general interface to get a display name for a particular date/time field, + * in one of several possible display widths. + * + * @param dtpg + * A pointer to the UDateTimePatternGenerator object with the localized + * display names. + * @param field + * The desired UDateTimePatternField, such as UDATPG_ERA_FIELD. + * @param width + * The desired UDateTimePGDisplayWidth, such as UDATPG_ABBREVIATED. + * @param fieldName + * A pointer to a buffer to receive the NULL-terminated display name. If the name + * fits into fieldName but cannot be NULL-terminated (length == capacity) then + * the error code is set to U_STRING_NOT_TERMINATED_WARNING. If the name doesn't + * fit into fieldName then the error code is set to U_BUFFER_OVERFLOW_ERROR. + * @param capacity + * The size of fieldName (in UChars). + * @param pErrorCode + * A pointer to a UErrorCode to receive any errors + * @return + * The full length of the name; if greater than capacity, fieldName contains a + * truncated result. + * @draft ICU 61 + */ +U_DRAFT int32_t U_EXPORT2 +udatpg_getFieldDisplayName(const UDateTimePatternGenerator *dtpg, + UDateTimePatternField field, + UDateTimePGDisplayWidth width, + UChar *fieldName, int32_t capacity, + UErrorCode *pErrorCode); +#endif // U_HIDE_DRAFT_API + +/** + * The DateTimeFormat is a message format pattern used to compose date and + * time patterns. The default pattern in the root locale is "{1} {0}", where + * {1} will be replaced by the date pattern and {0} will be replaced by the + * time pattern; however, other locales may specify patterns such as + * "{1}, {0}" or "{1} 'at' {0}", etc. + * <p> + * This is used when the input skeleton contains both date and time fields, + * but there is not a close match among the added patterns. For example, + * suppose that this object was created by adding "dd-MMM" and "hh:mm", and + * its DateTimeFormat is the default "{1} {0}". Then if the input skeleton + * is "MMMdhmm", there is not an exact match, so the input skeleton is + * broken up into two components "MMMd" and "hmm". There are close matches + * for those two skeletons, so the result is put together with this pattern, + * resulting in "d-MMM h:mm". + * + * @param dtpg a pointer to UDateTimePatternGenerator. + * @param dtFormat + * message format pattern, here {1} will be replaced by the date + * pattern and {0} will be replaced by the time pattern. + * @param length the length of dtFormat. + * @stable ICU 3.8 + */ +U_STABLE void U_EXPORT2 +udatpg_setDateTimeFormat(const UDateTimePatternGenerator *dtpg, + const UChar *dtFormat, int32_t length); + +/** + * Getter corresponding to setDateTimeFormat. + * @param dtpg a pointer to UDateTimePatternGenerator. + * @param pLength A pointer that will receive the length of the format + * @return dateTimeFormat. + * @stable ICU 3.8 + */ +U_STABLE const UChar * U_EXPORT2 +udatpg_getDateTimeFormat(const UDateTimePatternGenerator *dtpg, + int32_t *pLength); + +/** + * The decimal value is used in formatting fractions of seconds. If the + * skeleton contains fractional seconds, then this is used with the + * fractional seconds. For example, suppose that the input pattern is + * "hhmmssSSSS", and the best matching pattern internally is "H:mm:ss", and + * the decimal string is ",". Then the resulting pattern is modified to be + * "H:mm:ss,SSSS" + * + * @param dtpg a pointer to UDateTimePatternGenerator. + * @param decimal + * @param length the length of decimal. + * @stable ICU 3.8 + */ +U_STABLE void U_EXPORT2 +udatpg_setDecimal(UDateTimePatternGenerator *dtpg, + const UChar *decimal, int32_t length); + +/** + * Getter corresponding to setDecimal. + * + * @param dtpg a pointer to UDateTimePatternGenerator. + * @param pLength A pointer that will receive the length of the decimal string. + * @return corresponding to the decimal point. + * @stable ICU 3.8 + */ +U_STABLE const UChar * U_EXPORT2 +udatpg_getDecimal(const UDateTimePatternGenerator *dtpg, + int32_t *pLength); + +/** + * Adjusts the field types (width and subtype) of a pattern to match what is + * in a skeleton. That is, if you supply a pattern like "d-M H:m", and a + * skeleton of "MMMMddhhmm", then the input pattern is adjusted to be + * "dd-MMMM hh:mm". This is used internally to get the best match for the + * input skeleton, but can also be used externally. + * + * Note that this function uses a non-const UDateTimePatternGenerator: + * It uses a stateful pattern parser which is set up for each generator object, + * rather than creating one for each function call. + * Consecutive calls to this function do not affect each other, + * but this function cannot be used concurrently on a single generator object. + * + * @param dtpg a pointer to UDateTimePatternGenerator. + * @param pattern Input pattern + * @param patternLength the length of input pattern. + * @param skeleton + * @param skeletonLength the length of input skeleton. + * @param dest pattern adjusted to match the skeleton fields widths and subtypes. + * @param destCapacity the capacity of dest. + * @param pErrorCode a pointer to the UErrorCode which must not indicate a + * failure before the function call. + * @return the length of dest. + * @stable ICU 3.8 + */ +U_STABLE int32_t U_EXPORT2 +udatpg_replaceFieldTypes(UDateTimePatternGenerator *dtpg, + const UChar *pattern, int32_t patternLength, + const UChar *skeleton, int32_t skeletonLength, + UChar *dest, int32_t destCapacity, + UErrorCode *pErrorCode); + +/** + * Adjusts the field types (width and subtype) of a pattern to match what is + * in a skeleton. That is, if you supply a pattern like "d-M H:m", and a + * skeleton of "MMMMddhhmm", then the input pattern is adjusted to be + * "dd-MMMM hh:mm". This is used internally to get the best match for the + * input skeleton, but can also be used externally. + * + * Note that this function uses a non-const UDateTimePatternGenerator: + * It uses a stateful pattern parser which is set up for each generator object, + * rather than creating one for each function call. + * Consecutive calls to this function do not affect each other, + * but this function cannot be used concurrently on a single generator object. + * + * @param dtpg a pointer to UDateTimePatternGenerator. + * @param pattern Input pattern + * @param patternLength the length of input pattern. + * @param skeleton + * @param skeletonLength the length of input skeleton. + * @param options + * Options controlling whether the length of specified fields in the + * pattern are adjusted to match those in the skeleton (when this + * would not happen otherwise). For default behavior, use + * UDATPG_MATCH_NO_OPTIONS. + * @param dest pattern adjusted to match the skeleton fields widths and subtypes. + * @param destCapacity the capacity of dest. + * @param pErrorCode a pointer to the UErrorCode which must not indicate a + * failure before the function call. + * @return the length of dest. + * @stable ICU 4.4 + */ +U_STABLE int32_t U_EXPORT2 +udatpg_replaceFieldTypesWithOptions(UDateTimePatternGenerator *dtpg, + const UChar *pattern, int32_t patternLength, + const UChar *skeleton, int32_t skeletonLength, + UDateTimePatternMatchOptions options, + UChar *dest, int32_t destCapacity, + UErrorCode *pErrorCode); + +/** + * Return a UEnumeration list of all the skeletons in canonical form. + * Call udatpg_getPatternForSkeleton() to get the corresponding pattern. + * + * @param dtpg a pointer to UDateTimePatternGenerator. + * @param pErrorCode a pointer to the UErrorCode which must not indicate a + * failure before the function call + * @return a UEnumeration list of all the skeletons + * The caller must close the object. + * @stable ICU 3.8 + */ +U_STABLE UEnumeration * U_EXPORT2 +udatpg_openSkeletons(const UDateTimePatternGenerator *dtpg, UErrorCode *pErrorCode); + +/** + * Return a UEnumeration list of all the base skeletons in canonical form. + * + * @param dtpg a pointer to UDateTimePatternGenerator. + * @param pErrorCode a pointer to the UErrorCode which must not indicate a + * failure before the function call. + * @return a UEnumeration list of all the base skeletons + * The caller must close the object. + * @stable ICU 3.8 + */ +U_STABLE UEnumeration * U_EXPORT2 +udatpg_openBaseSkeletons(const UDateTimePatternGenerator *dtpg, UErrorCode *pErrorCode); + +/** + * Get the pattern corresponding to a given skeleton. + * + * @param dtpg a pointer to UDateTimePatternGenerator. + * @param skeleton + * @param skeletonLength pointer to the length of skeleton. + * @param pLength pointer to the length of return pattern. + * @return pattern corresponding to a given skeleton. + * @stable ICU 3.8 + */ +U_STABLE const UChar * U_EXPORT2 +udatpg_getPatternForSkeleton(const UDateTimePatternGenerator *dtpg, + const UChar *skeleton, int32_t skeletonLength, + int32_t *pLength); + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/udisplaycontext.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/udisplaycontext.h new file mode 100755 index 00000000..398481c6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/udisplaycontext.h @@ -0,0 +1,172 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +***************************************************************************************** +* Copyright (C) 2014-2016, International Business Machines +* Corporation and others. All Rights Reserved. +***************************************************************************************** +*/ + +#ifndef UDISPLAYCONTEXT_H +#define UDISPLAYCONTEXT_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +/** + * \file + * \brief C API: Display context types (enum values) + */ + +/** + * Display context types, for getting values of a particular setting. + * Note, the specific numeric values are internal and may change. + * @stable ICU 51 + */ +enum UDisplayContextType { + /** + * Type to retrieve the dialect handling setting, e.g. + * UDISPCTX_STANDARD_NAMES or UDISPCTX_DIALECT_NAMES. + * @stable ICU 51 + */ + UDISPCTX_TYPE_DIALECT_HANDLING = 0, + /** + * Type to retrieve the capitalization context setting, e.g. + * UDISPCTX_CAPITALIZATION_NONE, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE, + * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, etc. + * @stable ICU 51 + */ + UDISPCTX_TYPE_CAPITALIZATION = 1, + /** + * Type to retrieve the display length setting, e.g. + * UDISPCTX_LENGTH_FULL, UDISPCTX_LENGTH_SHORT. + * @stable ICU 54 + */ + UDISPCTX_TYPE_DISPLAY_LENGTH = 2, + /** + * Type to retrieve the substitute handling setting, e.g. + * UDISPCTX_SUBSTITUTE, UDISPCTX_NO_SUBSTITUTE. + * @stable ICU 58 + */ + UDISPCTX_TYPE_SUBSTITUTE_HANDLING = 3 +}; +/** +* @stable ICU 51 +*/ +typedef enum UDisplayContextType UDisplayContextType; + +/** + * Display context settings. + * Note, the specific numeric values are internal and may change. + * @stable ICU 51 + */ +enum UDisplayContext { + /** + * ================================ + * DIALECT_HANDLING can be set to one of UDISPCTX_STANDARD_NAMES or + * UDISPCTX_DIALECT_NAMES. Use UDisplayContextType UDISPCTX_TYPE_DIALECT_HANDLING + * to get the value. + */ + /** + * A possible setting for DIALECT_HANDLING: + * use standard names when generating a locale name, + * e.g. en_GB displays as 'English (United Kingdom)'. + * @stable ICU 51 + */ + UDISPCTX_STANDARD_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 0, + /** + * A possible setting for DIALECT_HANDLING: + * use dialect names, when generating a locale name, + * e.g. en_GB displays as 'British English'. + * @stable ICU 51 + */ + UDISPCTX_DIALECT_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 1, + /** + * ================================ + * CAPITALIZATION can be set to one of UDISPCTX_CAPITALIZATION_NONE, + * UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE, + * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, + * UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU, or + * UDISPCTX_CAPITALIZATION_FOR_STANDALONE. + * Use UDisplayContextType UDISPCTX_TYPE_CAPITALIZATION to get the value. + */ + /** + * The capitalization context to be used is unknown (this is the default value). + * @stable ICU 51 + */ + UDISPCTX_CAPITALIZATION_NONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 0, + /** + * The capitalization context if a date, date symbol or display name is to be + * formatted with capitalization appropriate for the middle of a sentence. + * @stable ICU 51 + */ + UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 1, + /** + * The capitalization context if a date, date symbol or display name is to be + * formatted with capitalization appropriate for the beginning of a sentence. + * @stable ICU 51 + */ + UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 2, + /** + * The capitalization context if a date, date symbol or display name is to be + * formatted with capitalization appropriate for a user-interface list or menu item. + * @stable ICU 51 + */ + UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 3, + /** + * The capitalization context if a date, date symbol or display name is to be + * formatted with capitalization appropriate for stand-alone usage such as an + * isolated name on a calendar page. + * @stable ICU 51 + */ + UDISPCTX_CAPITALIZATION_FOR_STANDALONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 4, + /** + * ================================ + * DISPLAY_LENGTH can be set to one of UDISPCTX_LENGTH_FULL or + * UDISPCTX_LENGTH_SHORT. Use UDisplayContextType UDISPCTX_TYPE_DISPLAY_LENGTH + * to get the value. + */ + /** + * A possible setting for DISPLAY_LENGTH: + * use full names when generating a locale name, + * e.g. "United States" for US. + * @stable ICU 54 + */ + UDISPCTX_LENGTH_FULL = (UDISPCTX_TYPE_DISPLAY_LENGTH<<8) + 0, + /** + * A possible setting for DISPLAY_LENGTH: + * use short names when generating a locale name, + * e.g. "U.S." for US. + * @stable ICU 54 + */ + UDISPCTX_LENGTH_SHORT = (UDISPCTX_TYPE_DISPLAY_LENGTH<<8) + 1, + /** + * ================================ + * SUBSTITUTE_HANDLING can be set to one of UDISPCTX_SUBSTITUTE or + * UDISPCTX_NO_SUBSTITUTE. Use UDisplayContextType UDISPCTX_TYPE_SUBSTITUTE_HANDLING + * to get the value. + */ + /** + * A possible setting for SUBSTITUTE_HANDLING: + * Returns a fallback value (e.g., the input code) when no data is available. + * This is the default value. + * @stable ICU 58 + */ + UDISPCTX_SUBSTITUTE = (UDISPCTX_TYPE_SUBSTITUTE_HANDLING<<8) + 0, + /** + * A possible setting for SUBSTITUTE_HANDLING: + * Returns a null value when no data is available. + * @stable ICU 58 + */ + UDISPCTX_NO_SUBSTITUTE = (UDISPCTX_TYPE_SUBSTITUTE_HANDLING<<8) + 1 + +}; +/** +* @stable ICU 51 +*/ +typedef enum UDisplayContext UDisplayContext; + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uenum.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uenum.h new file mode 100755 index 00000000..fc6efa24 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uenum.h @@ -0,0 +1,210 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 2002-2013, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: uenum.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:2 +* +* created on: 2002jul08 +* created by: Vladimir Weinstein +*/ + +#ifndef __UENUM_H +#define __UENUM_H + +#include "unicode/utypes.h" +#include "unicode/localpointer.h" + +#if U_SHOW_CPLUSPLUS_API +U_NAMESPACE_BEGIN +class StringEnumeration; +U_NAMESPACE_END +#endif + +/** + * \file + * \brief C API: String Enumeration + */ + +/** + * An enumeration object. + * For usage in C programs. + * @stable ICU 2.2 + */ +struct UEnumeration; +/** structure representing an enumeration object instance @stable ICU 2.2 */ +typedef struct UEnumeration UEnumeration; + +/** + * Disposes of resources in use by the iterator. If en is NULL, + * does nothing. After this call, any char* or UChar* pointer + * returned by uenum_unext() or uenum_next() is invalid. + * @param en UEnumeration structure pointer + * @stable ICU 2.2 + */ +U_STABLE void U_EXPORT2 +uenum_close(UEnumeration* en); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUEnumerationPointer + * "Smart pointer" class, closes a UEnumeration via uenum_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUEnumerationPointer, UEnumeration, uenum_close); + +U_NAMESPACE_END + +#endif + +/** + * Returns the number of elements that the iterator traverses. If + * the iterator is out-of-sync with its service, status is set to + * U_ENUM_OUT_OF_SYNC_ERROR. + * This is a convenience function. It can end up being very + * expensive as all the items might have to be pre-fetched (depending + * on the type of data being traversed). Use with caution and only + * when necessary. + * @param en UEnumeration structure pointer + * @param status error code, can be U_ENUM_OUT_OF_SYNC_ERROR if the + * iterator is out of sync. + * @return number of elements in the iterator + * @stable ICU 2.2 + */ +U_STABLE int32_t U_EXPORT2 +uenum_count(UEnumeration* en, UErrorCode* status); + +/** + * Returns the next element in the iterator's list. If there are + * no more elements, returns NULL. If the iterator is out-of-sync + * with its service, status is set to U_ENUM_OUT_OF_SYNC_ERROR and + * NULL is returned. If the native service string is a char* string, + * it is converted to UChar* with the invariant converter. + * The result is terminated by (UChar)0. + * @param en the iterator object + * @param resultLength pointer to receive the length of the result + * (not including the terminating \\0). + * If the pointer is NULL it is ignored. + * @param status the error code, set to U_ENUM_OUT_OF_SYNC_ERROR if + * the iterator is out of sync with its service. + * @return a pointer to the string. The string will be + * zero-terminated. The return pointer is owned by this iterator + * and must not be deleted by the caller. The pointer is valid + * until the next call to any uenum_... method, including + * uenum_next() or uenum_unext(). When all strings have been + * traversed, returns NULL. + * @stable ICU 2.2 + */ +U_STABLE const UChar* U_EXPORT2 +uenum_unext(UEnumeration* en, + int32_t* resultLength, + UErrorCode* status); + +/** + * Returns the next element in the iterator's list. If there are + * no more elements, returns NULL. If the iterator is out-of-sync + * with its service, status is set to U_ENUM_OUT_OF_SYNC_ERROR and + * NULL is returned. If the native service string is a UChar* + * string, it is converted to char* with the invariant converter. + * The result is terminated by (char)0. If the conversion fails + * (because a character cannot be converted) then status is set to + * U_INVARIANT_CONVERSION_ERROR and the return value is undefined + * (but non-NULL). + * @param en the iterator object + * @param resultLength pointer to receive the length of the result + * (not including the terminating \\0). + * If the pointer is NULL it is ignored. + * @param status the error code, set to U_ENUM_OUT_OF_SYNC_ERROR if + * the iterator is out of sync with its service. Set to + * U_INVARIANT_CONVERSION_ERROR if the underlying native string is + * UChar* and conversion to char* with the invariant converter + * fails. This error pertains only to current string, so iteration + * might be able to continue successfully. + * @return a pointer to the string. The string will be + * zero-terminated. The return pointer is owned by this iterator + * and must not be deleted by the caller. The pointer is valid + * until the next call to any uenum_... method, including + * uenum_next() or uenum_unext(). When all strings have been + * traversed, returns NULL. + * @stable ICU 2.2 + */ +U_STABLE const char* U_EXPORT2 +uenum_next(UEnumeration* en, + int32_t* resultLength, + UErrorCode* status); + +/** + * Resets the iterator to the current list of service IDs. This + * re-establishes sync with the service and rewinds the iterator + * to start at the first element. + * @param en the iterator object + * @param status the error code, set to U_ENUM_OUT_OF_SYNC_ERROR if + * the iterator is out of sync with its service. + * @stable ICU 2.2 + */ +U_STABLE void U_EXPORT2 +uenum_reset(UEnumeration* en, UErrorCode* status); + +#if U_SHOW_CPLUSPLUS_API + +/** + * Given a StringEnumeration, wrap it in a UEnumeration. The + * StringEnumeration is adopted; after this call, the caller must not + * delete it (regardless of error status). + * @param adopted the C++ StringEnumeration to be wrapped in a UEnumeration. + * @param ec the error code. + * @return a UEnumeration wrapping the adopted StringEnumeration. + * @stable ICU 4.2 + */ +U_STABLE UEnumeration* U_EXPORT2 +uenum_openFromStringEnumeration(icu::StringEnumeration* adopted, UErrorCode* ec); + +#endif + +/** + * Given an array of const UChar* strings, return a UEnumeration. String pointers from 0..count-1 must not be null. + * Do not free or modify either the string array or the characters it points to until this object has been destroyed with uenum_close. + * \snippet test/cintltst/uenumtst.c uenum_openUCharStringsEnumeration + * @param strings array of const UChar* strings (each null terminated). All storage is owned by the caller. + * @param count length of the array + * @param ec error code + * @return the new UEnumeration object. Caller is responsible for calling uenum_close to free memory. + * @see uenum_close + * @stable ICU 50 + */ +U_STABLE UEnumeration* U_EXPORT2 +uenum_openUCharStringsEnumeration(const UChar* const strings[], int32_t count, + UErrorCode* ec); + +/* Note: next function is not hidden as draft, as it is used internally (it was formerly an internal function). */ + +/** + * Given an array of const char* strings (invariant chars only), return a UEnumeration. String pointers from 0..count-1 must not be null. + * Do not free or modify either the string array or the characters it points to until this object has been destroyed with uenum_close. + * \snippet test/cintltst/uenumtst.c uenum_openCharStringsEnumeration + * @param strings array of char* strings (each null terminated). All storage is owned by the caller. + * @param count length of the array + * @param ec error code + * @return the new UEnumeration object. Caller is responsible for calling uenum_close to free memory + * @see uenum_close + * @stable ICU 50 + */ +U_STABLE UEnumeration* U_EXPORT2 +uenum_openCharStringsEnumeration(const char* const strings[], int32_t count, + UErrorCode* ec); + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ufieldpositer.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ufieldpositer.h new file mode 100755 index 00000000..3ae73b6d --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ufieldpositer.h @@ -0,0 +1,121 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +***************************************************************************************** +* Copyright (C) 2015-2016, International Business Machines +* Corporation and others. All Rights Reserved. +***************************************************************************************** +*/ + +#ifndef UFIELDPOSITER_H +#define UFIELDPOSITER_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/localpointer.h" + +/** + * \file + * \brief C API: UFieldPositionIterator for use with format APIs. + * + * Usage: + * ufieldpositer_open creates an empty (unset) UFieldPositionIterator. + * This can be passed to format functions such as {@link #udat_formatForFields}, + * which will set it to apply to the fields in a particular formatted string. + * ufieldpositer_next can then be used to iterate over those fields, + * providing for each field its type (using values that are specific to the + * particular format type, such as date or number formats), as well as the + * start and end positions of the field in the formatted string. + * A given UFieldPositionIterator can be re-used for different format calls; + * each such call resets it to apply to that format string. + * ufieldpositer_close should be called to dispose of the UFieldPositionIterator + * when it is no longer needed. + * + * @see FieldPositionIterator + */ + +/** + * Opaque UFieldPositionIterator object for use in C. + * @stable ICU 55 + */ +struct UFieldPositionIterator; +typedef struct UFieldPositionIterator UFieldPositionIterator; /**< C typedef for struct UFieldPositionIterator. @stable ICU 55 */ + +/** + * Open a new, unset UFieldPositionIterator object. + * @param status + * A pointer to a UErrorCode to receive any errors. + * @return + * A pointer to an empty (unset) UFieldPositionIterator object, + * or NULL if an error occurred. + * @stable ICU 55 + */ +U_STABLE UFieldPositionIterator* U_EXPORT2 +ufieldpositer_open(UErrorCode* status); + +/** + * Close a UFieldPositionIterator object. Once closed it may no longer be used. + * @param fpositer + * A pointer to the UFieldPositionIterator object to close. + * @stable ICU 55 + */ +U_STABLE void U_EXPORT2 +ufieldpositer_close(UFieldPositionIterator *fpositer); + + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUFieldPositionIteratorPointer + * "Smart pointer" class, closes a UFieldPositionIterator via ufieldpositer_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 55 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUFieldPositionIteratorPointer, UFieldPositionIterator, ufieldpositer_close); + +U_NAMESPACE_END + +#endif + +/** + * Get information for the next field in the formatted string to which this + * UFieldPositionIterator currently applies, or return a negative value if there + * are no more fields. + * @param fpositer + * A pointer to the UFieldPositionIterator object containing iteration + * state for the format fields. + * @param beginIndex + * A pointer to an int32_t to receive information about the start offset + * of the field in the formatted string (undefined if the function + * returns a negative value). May be NULL if this information is not needed. + * @param endIndex + * A pointer to an int32_t to receive information about the end offset + * of the field in the formatted string (undefined if the function + * returns a negative value). May be NULL if this information is not needed. + * @return + * The field type (non-negative value), or a negative value if there are + * no more fields for which to provide information. If negative, then any + * values pointed to by beginIndex and endIndex are undefined. + * + * The values for field type depend on what type of formatter the + * UFieldPositionIterator has been set by; for a date formatter, the + * values from the UDateFormatField enum. For more information, see the + * descriptions of format functions that take a UFieldPositionIterator* + * parameter, such as {@link #udat_formatForFields}. + * + * @stable ICU 55 + */ +U_STABLE int32_t U_EXPORT2 +ufieldpositer_next(UFieldPositionIterator *fpositer, + int32_t *beginIndex, int32_t *endIndex); + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uformattable.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uformattable.h new file mode 100755 index 00000000..9ba2a369 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uformattable.h @@ -0,0 +1,288 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************** +* Copyright (C) 2013-2014, International Business Machines Corporation and others. +* All Rights Reserved. +******************************************************************************** +* +* File UFORMATTABLE.H +* +* Modification History: +* +* Date Name Description +* 2013 Jun 7 srl New +******************************************************************************** +*/ + +/** + * \file + * \brief C API: UFormattable is a thin wrapper for primitive types used for formatting and parsing. + * + * This is a C interface to the icu::Formattable class. Static functions on this class convert + * to and from this interface (via reinterpret_cast). Note that Formattables (and thus UFormattables) + * are mutable, and many operations (even getters) may actually modify the internal state. For this + * reason, UFormattables are not thread safe, and should not be shared between threads. + * + * See {@link unum_parseToUFormattable} for example code. + */ + +#ifndef UFORMATTABLE_H +#define UFORMATTABLE_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/localpointer.h" + +/** + * Enum designating the type of a UFormattable instance. + * Practically, this indicates which of the getters would return without conversion + * or error. + * @see icu::Formattable::Type + * @stable ICU 52 + */ +typedef enum UFormattableType { + UFMT_DATE = 0, /**< ufmt_getDate() will return without conversion. @see ufmt_getDate*/ + UFMT_DOUBLE, /**< ufmt_getDouble() will return without conversion. @see ufmt_getDouble*/ + UFMT_LONG, /**< ufmt_getLong() will return without conversion. @see ufmt_getLong */ + UFMT_STRING, /**< ufmt_getUChars() will return without conversion. @see ufmt_getUChars*/ + UFMT_ARRAY, /**< ufmt_countArray() and ufmt_getArray() will return the value. @see ufmt_getArrayItemByIndex */ + UFMT_INT64, /**< ufmt_getInt64() will return without conversion. @see ufmt_getInt64 */ + UFMT_OBJECT, /**< ufmt_getObject() will return without conversion. @see ufmt_getObject*/ +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UFormattableType value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UFMT_COUNT +#endif /* U_HIDE_DEPRECATED_API */ +} UFormattableType; + + +/** + * Opaque type representing various types of data which may be used for formatting + * and parsing operations. + * @see icu::Formattable + * @stable ICU 52 + */ +typedef void *UFormattable; + +/** + * Initialize a UFormattable, to type UNUM_LONG, value 0 + * may return error if memory allocation failed. + * parameter status error code. + * See {@link unum_parseToUFormattable} for example code. + * @stable ICU 52 + * @return the new UFormattable + * @see ufmt_close + * @see icu::Formattable::Formattable() + */ +U_STABLE UFormattable* U_EXPORT2 +ufmt_open(UErrorCode* status); + +/** + * Cleanup any additional memory allocated by this UFormattable. + * @param fmt the formatter + * @stable ICU 52 + * @see ufmt_open + */ +U_STABLE void U_EXPORT2 +ufmt_close(UFormattable* fmt); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUFormattablePointer + * "Smart pointer" class, closes a UFormattable via ufmt_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 52 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUFormattablePointer, UFormattable, ufmt_close); + +U_NAMESPACE_END + +#endif + +/** + * Return the type of this object + * @param fmt the UFormattable object + * @param status status code - U_ILLEGAL_ARGUMENT_ERROR is returned if the UFormattable contains data not supported by + * the API + * @return the value as a UFormattableType + * @see ufmt_isNumeric + * @see icu::Formattable::getType() const + * @stable ICU 52 + */ +U_STABLE UFormattableType U_EXPORT2 +ufmt_getType(const UFormattable* fmt, UErrorCode *status); + +/** + * Return whether the object is numeric. + * @param fmt the UFormattable object + * @return true if the object is a double, long, or int64 value, else false. + * @see ufmt_getType + * @see icu::Formattable::isNumeric() const + * @stable ICU 52 + */ +U_STABLE UBool U_EXPORT2 +ufmt_isNumeric(const UFormattable* fmt); + +/** + * Gets the UDate value of this object. If the type is not of type UFMT_DATE, + * status is set to U_INVALID_FORMAT_ERROR and the return value is + * undefined. + * @param fmt the UFormattable object + * @param status the error code - any conversion or format errors + * @return the value + * @stable ICU 52 + * @see icu::Formattable::getDate(UErrorCode&) const + */ +U_STABLE UDate U_EXPORT2 +ufmt_getDate(const UFormattable* fmt, UErrorCode *status); + +/** + * Gets the double value of this object. If the type is not a UFMT_DOUBLE, or + * if there are additional significant digits than fit in a double type, + * a conversion is performed with possible loss of precision. + * If the type is UFMT_OBJECT and the + * object is a Measure, then the result of + * getNumber().getDouble(status) is returned. If this object is + * neither a numeric type nor a Measure, then 0 is returned and + * the status is set to U_INVALID_FORMAT_ERROR. + * @param fmt the UFormattable object + * @param status the error code - any conversion or format errors + * @return the value + * @stable ICU 52 + * @see icu::Formattable::getDouble(UErrorCode&) const + */ +U_STABLE double U_EXPORT2 +ufmt_getDouble(UFormattable* fmt, UErrorCode *status); + +/** + * Gets the long (int32_t) value of this object. If the magnitude is too + * large to fit in a long, then the maximum or minimum long value, + * as appropriate, is returned and the status is set to + * U_INVALID_FORMAT_ERROR. If this object is of type UFMT_INT64 and + * it fits within a long, then no precision is lost. If it is of + * type kDouble or kDecimalNumber, then a conversion is peformed, with + * truncation of any fractional part. If the type is UFMT_OBJECT and + * the object is a Measure, then the result of + * getNumber().getLong(status) is returned. If this object is + * neither a numeric type nor a Measure, then 0 is returned and + * the status is set to U_INVALID_FORMAT_ERROR. + * @param fmt the UFormattable object + * @param status the error code - any conversion or format errors + * @return the value + * @stable ICU 52 + * @see icu::Formattable::getLong(UErrorCode&) const + */ +U_STABLE int32_t U_EXPORT2 +ufmt_getLong(UFormattable* fmt, UErrorCode *status); + + +/** + * Gets the int64_t value of this object. If this object is of a numeric + * type and the magnitude is too large to fit in an int64, then + * the maximum or minimum int64 value, as appropriate, is returned + * and the status is set to U_INVALID_FORMAT_ERROR. If the + * magnitude fits in an int64, then a casting conversion is + * peformed, with truncation of any fractional part. If the type + * is UFMT_OBJECT and the object is a Measure, then the result of + * getNumber().getDouble(status) is returned. If this object is + * neither a numeric type nor a Measure, then 0 is returned and + * the status is set to U_INVALID_FORMAT_ERROR. + * @param fmt the UFormattable object + * @param status the error code - any conversion or format errors + * @return the value + * @stable ICU 52 + * @see icu::Formattable::getInt64(UErrorCode&) const + */ +U_STABLE int64_t U_EXPORT2 +ufmt_getInt64(UFormattable* fmt, UErrorCode *status); + +/** + * Returns a pointer to the UObject contained within this + * formattable (as a const void*), or NULL if this object + * is not of type UFMT_OBJECT. + * @param fmt the UFormattable object + * @param status the error code - any conversion or format errors + * @return the value as a const void*. It is a polymorphic C++ object. + * @stable ICU 52 + * @see icu::Formattable::getObject() const + */ +U_STABLE const void *U_EXPORT2 +ufmt_getObject(const UFormattable* fmt, UErrorCode *status); + +/** + * Gets the string value of this object as a UChar string. If the type is not a + * string, status is set to U_INVALID_FORMAT_ERROR and a NULL pointer is returned. + * This function is not thread safe and may modify the UFormattable if need be to terminate the string. + * The returned pointer is not valid if any other functions are called on this UFormattable, or if the UFormattable is closed. + * @param fmt the UFormattable object + * @param status the error code - any conversion or format errors + * @param len if non null, contains the string length on return + * @return the null terminated string value - must not be referenced after any other functions are called on this UFormattable. + * @stable ICU 52 + * @see icu::Formattable::getString(UnicodeString&)const + */ +U_STABLE const UChar* U_EXPORT2 +ufmt_getUChars(UFormattable* fmt, int32_t *len, UErrorCode *status); + +/** + * Get the number of array objects contained, if an array type UFMT_ARRAY + * @param fmt the UFormattable object + * @param status the error code - any conversion or format errors. U_ILLEGAL_ARGUMENT_ERROR if not an array type. + * @return the number of array objects or undefined if not an array type + * @stable ICU 52 + * @see ufmt_getArrayItemByIndex + */ +U_STABLE int32_t U_EXPORT2 +ufmt_getArrayLength(const UFormattable* fmt, UErrorCode *status); + +/** + * Get the specified value from the array of UFormattables. Invalid if the object is not an array type UFMT_ARRAY + * @param fmt the UFormattable object + * @param n the number of the array to return (0 based). + * @param status the error code - any conversion or format errors. Returns an error if n is out of bounds. + * @return the nth array value, only valid while the containing UFormattable is valid. NULL if not an array. + * @stable ICU 52 + * @see icu::Formattable::getArray(int32_t&, UErrorCode&) const + */ +U_STABLE UFormattable * U_EXPORT2 +ufmt_getArrayItemByIndex(UFormattable* fmt, int32_t n, UErrorCode *status); + +/** + * Returns a numeric string representation of the number contained within this + * formattable, or NULL if this object does not contain numeric type. + * For values obtained by parsing, the returned decimal number retains + * the full precision and range of the original input, unconstrained by + * the limits of a double floating point or a 64 bit int. + * + * This function is not thread safe, and therfore is not declared const, + * even though it is logically const. + * The resulting buffer is owned by the UFormattable and is invalid if any other functions are + * called on the UFormattable. + * + * Possible errors include U_MEMORY_ALLOCATION_ERROR, and + * U_INVALID_STATE if the formattable object has not been set to + * a numeric type. + * @param fmt the UFormattable object + * @param len if non-null, on exit contains the string length (not including the terminating null) + * @param status the error code + * @return the character buffer as a NULL terminated string, which is owned by the object and must not be accessed if any other functions are called on this object. + * @stable ICU 52 + * @see icu::Formattable::getDecimalNumber(UErrorCode&) + */ +U_STABLE const char * U_EXPORT2 +ufmt_getDecNumChars(UFormattable *fmt, int32_t *len, UErrorCode *status); + +#endif + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ugender.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ugender.h new file mode 100755 index 00000000..d015a230 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ugender.h @@ -0,0 +1,84 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +***************************************************************************************** +* Copyright (C) 2010-2013, International Business Machines +* Corporation and others. All Rights Reserved. +***************************************************************************************** +*/ + +#ifndef UGENDER_H +#define UGENDER_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/localpointer.h" + +/** + * \file + * \brief C API: The purpose of this API is to compute the gender of a list as a + * whole given the gender of each element. + * + */ + +/** + * Genders + * @stable ICU 50 + */ +enum UGender { + /** + * Male gender. + * @stable ICU 50 + */ + UGENDER_MALE, + /** + * Female gender. + * @stable ICU 50 + */ + UGENDER_FEMALE, + /** + * Neutral gender. + * @stable ICU 50 + */ + UGENDER_OTHER +}; +/** + * @stable ICU 50 + */ +typedef enum UGender UGender; + +/** + * Opaque UGenderInfo object for use in C programs. + * @stable ICU 50 + */ +struct UGenderInfo; +typedef struct UGenderInfo UGenderInfo; + +/** + * Opens a new UGenderInfo object given locale. + * @param locale The locale for which the rules are desired. + * @param status UErrorCode pointer + * @return A UGenderInfo for the specified locale, or NULL if an error occurred. + * @stable ICU 50 + */ +U_STABLE const UGenderInfo* U_EXPORT2 +ugender_getInstance(const char *locale, UErrorCode *status); + + +/** + * Given a list, returns the gender of the list as a whole. + * @param genderInfo pointer that ugender_getInstance returns. + * @param genders the gender of each element in the list. + * @param size the size of the list. + * @param status A pointer to a UErrorCode to receive any errors. + * @return The gender of the list. + * @stable ICU 50 + */ +U_STABLE UGender U_EXPORT2 +ugender_getListGender(const UGenderInfo* genderinfo, const UGender *genders, int32_t size, UErrorCode *status); + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uidna.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uidna.h new file mode 100755 index 00000000..0dafb762 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uidna.h @@ -0,0 +1,772 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ******************************************************************************* + * + * Copyright (C) 2003-2014, International Business Machines + * Corporation and others. All Rights Reserved. + * + ******************************************************************************* + * file name: uidna.h + * encoding: UTF-8 + * tab size: 8 (not used) + * indentation:4 + * + * created on: 2003feb1 + * created by: Ram Viswanadha + */ + +#ifndef __UIDNA_H__ +#define __UIDNA_H__ + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_IDNA + +#include "unicode/localpointer.h" +#include "unicode/parseerr.h" + +/** + * \file + * \brief C API: Internationalizing Domain Names in Applications (IDNA) + * + * IDNA2008 is implemented according to UTS #46, see the IDNA C++ class in idna.h. + * + * The C API functions which do take a UIDNA * service object pointer + * implement UTS #46 and IDNA2008. + * + * IDNA2003 is obsolete. + * The C API functions which do not take a service object pointer + * implement IDNA2003. They are all deprecated. + */ + +/* + * IDNA option bit set values. + */ +enum { + /** + * Default options value: None of the other options are set. + * For use in static worker and factory methods. + * @stable ICU 2.6 + */ + UIDNA_DEFAULT=0, +#ifndef U_HIDE_DEPRECATED_API + /** + * Option to allow unassigned code points in domain names and labels. + * For use in static worker and factory methods. + * <p>This option is ignored by the UTS46 implementation. + * (UTS #46 disallows unassigned code points.) + * @deprecated ICU 55 Use UTS #46 instead via uidna_openUTS46() or class IDNA. + */ + UIDNA_ALLOW_UNASSIGNED=1, +#endif /* U_HIDE_DEPRECATED_API */ + /** + * Option to check whether the input conforms to the STD3 ASCII rules, + * for example the restriction of labels to LDH characters + * (ASCII Letters, Digits and Hyphen-Minus). + * For use in static worker and factory methods. + * @stable ICU 2.6 + */ + UIDNA_USE_STD3_RULES=2, + /** + * IDNA option to check for whether the input conforms to the BiDi rules. + * For use in static worker and factory methods. + * <p>This option is ignored by the IDNA2003 implementation. + * (IDNA2003 always performs a BiDi check.) + * @stable ICU 4.6 + */ + UIDNA_CHECK_BIDI=4, + /** + * IDNA option to check for whether the input conforms to the CONTEXTJ rules. + * For use in static worker and factory methods. + * <p>This option is ignored by the IDNA2003 implementation. + * (The CONTEXTJ check is new in IDNA2008.) + * @stable ICU 4.6 + */ + UIDNA_CHECK_CONTEXTJ=8, + /** + * IDNA option for nontransitional processing in ToASCII(). + * For use in static worker and factory methods. + * <p>By default, ToASCII() uses transitional processing. + * <p>This option is ignored by the IDNA2003 implementation. + * (This is only relevant for compatibility of newer IDNA implementations with IDNA2003.) + * @stable ICU 4.6 + */ + UIDNA_NONTRANSITIONAL_TO_ASCII=0x10, + /** + * IDNA option for nontransitional processing in ToUnicode(). + * For use in static worker and factory methods. + * <p>By default, ToUnicode() uses transitional processing. + * <p>This option is ignored by the IDNA2003 implementation. + * (This is only relevant for compatibility of newer IDNA implementations with IDNA2003.) + * @stable ICU 4.6 + */ + UIDNA_NONTRANSITIONAL_TO_UNICODE=0x20, + /** + * IDNA option to check for whether the input conforms to the CONTEXTO rules. + * For use in static worker and factory methods. + * <p>This option is ignored by the IDNA2003 implementation. + * (The CONTEXTO check is new in IDNA2008.) + * <p>This is for use by registries for IDNA2008 conformance. + * UTS #46 does not require the CONTEXTO check. + * @stable ICU 49 + */ + UIDNA_CHECK_CONTEXTO=0x40 +}; + +/** + * Opaque C service object type for the new IDNA API. + * @stable ICU 4.6 + */ +struct UIDNA; +typedef struct UIDNA UIDNA; /**< C typedef for struct UIDNA. @stable ICU 4.6 */ + +/** + * Returns a UIDNA instance which implements UTS #46. + * Returns an unmodifiable instance, owned by the caller. + * Cache it for multiple operations, and uidna_close() it when done. + * The instance is thread-safe, that is, it can be used concurrently. + * + * For details about the UTS #46 implementation see the IDNA C++ class in idna.h. + * + * @param options Bit set to modify the processing and error checking. + * See option bit set values in uidna.h. + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the UTS #46 UIDNA instance, if successful + * @stable ICU 4.6 + */ +U_STABLE UIDNA * U_EXPORT2 +uidna_openUTS46(uint32_t options, UErrorCode *pErrorCode); + +/** + * Closes a UIDNA instance. + * @param idna UIDNA instance to be closed + * @stable ICU 4.6 + */ +U_STABLE void U_EXPORT2 +uidna_close(UIDNA *idna); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUIDNAPointer + * "Smart pointer" class, closes a UIDNA via uidna_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.6 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUIDNAPointer, UIDNA, uidna_close); + +U_NAMESPACE_END + +#endif + +/** + * Output container for IDNA processing errors. + * Initialize with UIDNA_INFO_INITIALIZER: + * \code + * UIDNAInfo info = UIDNA_INFO_INITIALIZER; + * int32_t length = uidna_nameToASCII(..., &info, &errorCode); + * if(U_SUCCESS(errorCode) && info.errors!=0) { ... } + * \endcode + * @stable ICU 4.6 + */ +typedef struct UIDNAInfo { + /** sizeof(UIDNAInfo) @stable ICU 4.6 */ + int16_t size; + /** + * Set to TRUE if transitional and nontransitional processing produce different results. + * For details see C++ IDNAInfo::isTransitionalDifferent(). + * @stable ICU 4.6 + */ + UBool isTransitionalDifferent; + UBool reservedB3; /**< Reserved field, do not use. @internal */ + /** + * Bit set indicating IDNA processing errors. 0 if no errors. + * See UIDNA_ERROR_... constants. + * @stable ICU 4.6 + */ + uint32_t errors; + int32_t reservedI2; /**< Reserved field, do not use. @internal */ + int32_t reservedI3; /**< Reserved field, do not use. @internal */ +} UIDNAInfo; + +/** + * Static initializer for a UIDNAInfo struct. + * @stable ICU 4.6 + */ +#define UIDNA_INFO_INITIALIZER { \ + (int16_t)sizeof(UIDNAInfo), \ + FALSE, FALSE, \ + 0, 0, 0 } + +/** + * Converts a single domain name label into its ASCII form for DNS lookup. + * If any processing step fails, then pInfo->errors will be non-zero and + * the result might not be an ASCII string. + * The label might be modified according to the types of errors. + * Labels with severe errors will be left in (or turned into) their Unicode form. + * + * The UErrorCode indicates an error only in exceptional cases, + * such as a U_MEMORY_ALLOCATION_ERROR. + * + * @param idna UIDNA instance + * @param label Input domain name label + * @param length Label length, or -1 if NUL-terminated + * @param dest Destination string buffer + * @param capacity Destination buffer capacity + * @param pInfo Output container of IDNA processing details. + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return destination string length + * @stable ICU 4.6 + */ +U_STABLE int32_t U_EXPORT2 +uidna_labelToASCII(const UIDNA *idna, + const UChar *label, int32_t length, + UChar *dest, int32_t capacity, + UIDNAInfo *pInfo, UErrorCode *pErrorCode); + +/** + * Converts a single domain name label into its Unicode form for human-readable display. + * If any processing step fails, then pInfo->errors will be non-zero. + * The label might be modified according to the types of errors. + * + * The UErrorCode indicates an error only in exceptional cases, + * such as a U_MEMORY_ALLOCATION_ERROR. + * + * @param idna UIDNA instance + * @param label Input domain name label + * @param length Label length, or -1 if NUL-terminated + * @param dest Destination string buffer + * @param capacity Destination buffer capacity + * @param pInfo Output container of IDNA processing details. + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return destination string length + * @stable ICU 4.6 + */ +U_STABLE int32_t U_EXPORT2 +uidna_labelToUnicode(const UIDNA *idna, + const UChar *label, int32_t length, + UChar *dest, int32_t capacity, + UIDNAInfo *pInfo, UErrorCode *pErrorCode); + +/** + * Converts a whole domain name into its ASCII form for DNS lookup. + * If any processing step fails, then pInfo->errors will be non-zero and + * the result might not be an ASCII string. + * The domain name might be modified according to the types of errors. + * Labels with severe errors will be left in (or turned into) their Unicode form. + * + * The UErrorCode indicates an error only in exceptional cases, + * such as a U_MEMORY_ALLOCATION_ERROR. + * + * @param idna UIDNA instance + * @param name Input domain name + * @param length Domain name length, or -1 if NUL-terminated + * @param dest Destination string buffer + * @param capacity Destination buffer capacity + * @param pInfo Output container of IDNA processing details. + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return destination string length + * @stable ICU 4.6 + */ +U_STABLE int32_t U_EXPORT2 +uidna_nameToASCII(const UIDNA *idna, + const UChar *name, int32_t length, + UChar *dest, int32_t capacity, + UIDNAInfo *pInfo, UErrorCode *pErrorCode); + +/** + * Converts a whole domain name into its Unicode form for human-readable display. + * If any processing step fails, then pInfo->errors will be non-zero. + * The domain name might be modified according to the types of errors. + * + * The UErrorCode indicates an error only in exceptional cases, + * such as a U_MEMORY_ALLOCATION_ERROR. + * + * @param idna UIDNA instance + * @param name Input domain name + * @param length Domain name length, or -1 if NUL-terminated + * @param dest Destination string buffer + * @param capacity Destination buffer capacity + * @param pInfo Output container of IDNA processing details. + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return destination string length + * @stable ICU 4.6 + */ +U_STABLE int32_t U_EXPORT2 +uidna_nameToUnicode(const UIDNA *idna, + const UChar *name, int32_t length, + UChar *dest, int32_t capacity, + UIDNAInfo *pInfo, UErrorCode *pErrorCode); + +/* UTF-8 versions of the processing methods --------------------------------- */ + +/** + * Converts a single domain name label into its ASCII form for DNS lookup. + * UTF-8 version of uidna_labelToASCII(), same behavior. + * + * @param idna UIDNA instance + * @param label Input domain name label + * @param length Label length, or -1 if NUL-terminated + * @param dest Destination string buffer + * @param capacity Destination buffer capacity + * @param pInfo Output container of IDNA processing details. + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return destination string length + * @stable ICU 4.6 + */ +U_STABLE int32_t U_EXPORT2 +uidna_labelToASCII_UTF8(const UIDNA *idna, + const char *label, int32_t length, + char *dest, int32_t capacity, + UIDNAInfo *pInfo, UErrorCode *pErrorCode); + +/** + * Converts a single domain name label into its Unicode form for human-readable display. + * UTF-8 version of uidna_labelToUnicode(), same behavior. + * + * @param idna UIDNA instance + * @param label Input domain name label + * @param length Label length, or -1 if NUL-terminated + * @param dest Destination string buffer + * @param capacity Destination buffer capacity + * @param pInfo Output container of IDNA processing details. + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return destination string length + * @stable ICU 4.6 + */ +U_STABLE int32_t U_EXPORT2 +uidna_labelToUnicodeUTF8(const UIDNA *idna, + const char *label, int32_t length, + char *dest, int32_t capacity, + UIDNAInfo *pInfo, UErrorCode *pErrorCode); + +/** + * Converts a whole domain name into its ASCII form for DNS lookup. + * UTF-8 version of uidna_nameToASCII(), same behavior. + * + * @param idna UIDNA instance + * @param name Input domain name + * @param length Domain name length, or -1 if NUL-terminated + * @param dest Destination string buffer + * @param capacity Destination buffer capacity + * @param pInfo Output container of IDNA processing details. + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return destination string length + * @stable ICU 4.6 + */ +U_STABLE int32_t U_EXPORT2 +uidna_nameToASCII_UTF8(const UIDNA *idna, + const char *name, int32_t length, + char *dest, int32_t capacity, + UIDNAInfo *pInfo, UErrorCode *pErrorCode); + +/** + * Converts a whole domain name into its Unicode form for human-readable display. + * UTF-8 version of uidna_nameToUnicode(), same behavior. + * + * @param idna UIDNA instance + * @param name Input domain name + * @param length Domain name length, or -1 if NUL-terminated + * @param dest Destination string buffer + * @param capacity Destination buffer capacity + * @param pInfo Output container of IDNA processing details. + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return destination string length + * @stable ICU 4.6 + */ +U_STABLE int32_t U_EXPORT2 +uidna_nameToUnicodeUTF8(const UIDNA *idna, + const char *name, int32_t length, + char *dest, int32_t capacity, + UIDNAInfo *pInfo, UErrorCode *pErrorCode); + +/* + * IDNA error bit set values. + * When a domain name or label fails a processing step or does not meet the + * validity criteria, then one or more of these error bits are set. + */ +enum { + /** + * A non-final domain name label (or the whole domain name) is empty. + * @stable ICU 4.6 + */ + UIDNA_ERROR_EMPTY_LABEL=1, + /** + * A domain name label is longer than 63 bytes. + * (See STD13/RFC1034 3.1. Name space specifications and terminology.) + * This is only checked in ToASCII operations, and only if the output label is all-ASCII. + * @stable ICU 4.6 + */ + UIDNA_ERROR_LABEL_TOO_LONG=2, + /** + * A domain name is longer than 255 bytes in its storage form. + * (See STD13/RFC1034 3.1. Name space specifications and terminology.) + * This is only checked in ToASCII operations, and only if the output domain name is all-ASCII. + * @stable ICU 4.6 + */ + UIDNA_ERROR_DOMAIN_NAME_TOO_LONG=4, + /** + * A label starts with a hyphen-minus ('-'). + * @stable ICU 4.6 + */ + UIDNA_ERROR_LEADING_HYPHEN=8, + /** + * A label ends with a hyphen-minus ('-'). + * @stable ICU 4.6 + */ + UIDNA_ERROR_TRAILING_HYPHEN=0x10, + /** + * A label contains hyphen-minus ('-') in the third and fourth positions. + * @stable ICU 4.6 + */ + UIDNA_ERROR_HYPHEN_3_4=0x20, + /** + * A label starts with a combining mark. + * @stable ICU 4.6 + */ + UIDNA_ERROR_LEADING_COMBINING_MARK=0x40, + /** + * A label or domain name contains disallowed characters. + * @stable ICU 4.6 + */ + UIDNA_ERROR_DISALLOWED=0x80, + /** + * A label starts with "xn--" but does not contain valid Punycode. + * That is, an xn-- label failed Punycode decoding. + * @stable ICU 4.6 + */ + UIDNA_ERROR_PUNYCODE=0x100, + /** + * A label contains a dot=full stop. + * This can occur in an input string for a single-label function. + * @stable ICU 4.6 + */ + UIDNA_ERROR_LABEL_HAS_DOT=0x200, + /** + * An ACE label does not contain a valid label string. + * The label was successfully ACE (Punycode) decoded but the resulting + * string had severe validation errors. For example, + * it might contain characters that are not allowed in ACE labels, + * or it might not be normalized. + * @stable ICU 4.6 + */ + UIDNA_ERROR_INVALID_ACE_LABEL=0x400, + /** + * A label does not meet the IDNA BiDi requirements (for right-to-left characters). + * @stable ICU 4.6 + */ + UIDNA_ERROR_BIDI=0x800, + /** + * A label does not meet the IDNA CONTEXTJ requirements. + * @stable ICU 4.6 + */ + UIDNA_ERROR_CONTEXTJ=0x1000, + /** + * A label does not meet the IDNA CONTEXTO requirements for punctuation characters. + * Some punctuation characters "Would otherwise have been DISALLOWED" + * but are allowed in certain contexts. (RFC 5892) + * @stable ICU 49 + */ + UIDNA_ERROR_CONTEXTO_PUNCTUATION=0x2000, + /** + * A label does not meet the IDNA CONTEXTO requirements for digits. + * Arabic-Indic Digits (U+066x) must not be mixed with Extended Arabic-Indic Digits (U+06Fx). + * @stable ICU 49 + */ + UIDNA_ERROR_CONTEXTO_DIGITS=0x4000 +}; + +#ifndef U_HIDE_DEPRECATED_API + +/* IDNA2003 API ------------------------------------------------------------- */ + +/** + * IDNA2003: This function implements the ToASCII operation as defined in the IDNA RFC. + * This operation is done on <b>single labels</b> before sending it to something that expects + * ASCII names. A label is an individual part of a domain name. Labels are usually + * separated by dots; e.g. "www.example.com" is composed of 3 labels "www","example", and "com". + * + * IDNA2003 API Overview: + * + * The uidna_ API implements the IDNA protocol as defined in the IDNA RFC + * (http://www.ietf.org/rfc/rfc3490.txt). + * The RFC defines 2 operations: ToASCII and ToUnicode. Domain name labels + * containing non-ASCII code points are processed by the + * ToASCII operation before passing it to resolver libraries. Domain names + * that are obtained from resolver libraries are processed by the + * ToUnicode operation before displaying the domain name to the user. + * IDNA requires that implementations process input strings with Nameprep + * (http://www.ietf.org/rfc/rfc3491.txt), + * which is a profile of Stringprep (http://www.ietf.org/rfc/rfc3454.txt), + * and then with Punycode (http://www.ietf.org/rfc/rfc3492.txt). + * Implementations of IDNA MUST fully implement Nameprep and Punycode; + * neither Nameprep nor Punycode are optional. + * The input and output of ToASCII and ToUnicode operations are Unicode + * and are designed to be chainable, i.e., applying ToASCII or ToUnicode operations + * multiple times to an input string will yield the same result as applying the operation + * once. + * ToUnicode(ToUnicode(ToUnicode...(ToUnicode(string)))) == ToUnicode(string) + * ToASCII(ToASCII(ToASCII...(ToASCII(string))) == ToASCII(string). + * + * @param src Input UChar array containing label in Unicode. + * @param srcLength Number of UChars in src, or -1 if NUL-terminated. + * @param dest Output UChar array with ASCII (ACE encoded) label. + * @param destCapacity Size of dest. + * @param options A bit set of options: + * + * - UIDNA_DEFAULT Use default options, i.e., do not process unassigned code points + * and do not use STD3 ASCII rules + * If unassigned code points are found the operation fails with + * U_UNASSIGNED_ERROR error code. + * + * - UIDNA_ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations + * If this option is set, the unassigned code points are in the input + * are treated as normal Unicode code points. + * + * - UIDNA_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions + * If this option is set and the input does not satisfy STD3 rules, + * the operation will fail with U_IDNA_STD3_ASCII_RULES_ERROR + * + * @param parseError Pointer to UParseError struct to receive information on position + * of error if an error is encountered. Can be NULL. + * @param status ICU in/out error code parameter. + * U_INVALID_CHAR_FOUND if src contains + * unmatched single surrogates. + * U_INDEX_OUTOFBOUNDS_ERROR if src contains + * too many code points. + * U_BUFFER_OVERFLOW_ERROR if destCapacity is not enough + * @return The length of the result string, if successful - or in case of a buffer overflow, + * in which case it will be greater than destCapacity. + * @deprecated ICU 55 Use UTS #46 instead via uidna_openUTS46() or class IDNA. + */ +U_DEPRECATED int32_t U_EXPORT2 +uidna_toASCII(const UChar* src, int32_t srcLength, + UChar* dest, int32_t destCapacity, + int32_t options, + UParseError* parseError, + UErrorCode* status); + + +/** + * IDNA2003: This function implements the ToUnicode operation as defined in the IDNA RFC. + * This operation is done on <b>single labels</b> before sending it to something that expects + * Unicode names. A label is an individual part of a domain name. Labels are usually + * separated by dots; for e.g. "www.example.com" is composed of 3 labels "www","example", and "com". + * + * @param src Input UChar array containing ASCII (ACE encoded) label. + * @param srcLength Number of UChars in src, or -1 if NUL-terminated. + * @param dest Output Converted UChar array containing Unicode equivalent of label. + * @param destCapacity Size of dest. + * @param options A bit set of options: + * + * - UIDNA_DEFAULT Use default options, i.e., do not process unassigned code points + * and do not use STD3 ASCII rules + * If unassigned code points are found the operation fails with + * U_UNASSIGNED_ERROR error code. + * + * - UIDNA_ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations + * If this option is set, the unassigned code points are in the input + * are treated as normal Unicode code points. <b> Note: </b> This option is + * required on toUnicode operation because the RFC mandates + * verification of decoded ACE input by applying toASCII and comparing + * its output with source + * + * - UIDNA_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions + * If this option is set and the input does not satisfy STD3 rules, + * the operation will fail with U_IDNA_STD3_ASCII_RULES_ERROR + * + * @param parseError Pointer to UParseError struct to receive information on position + * of error if an error is encountered. Can be NULL. + * @param status ICU in/out error code parameter. + * U_INVALID_CHAR_FOUND if src contains + * unmatched single surrogates. + * U_INDEX_OUTOFBOUNDS_ERROR if src contains + * too many code points. + * U_BUFFER_OVERFLOW_ERROR if destCapacity is not enough + * @return The length of the result string, if successful - or in case of a buffer overflow, + * in which case it will be greater than destCapacity. + * @deprecated ICU 55 Use UTS #46 instead via uidna_openUTS46() or class IDNA. + */ +U_DEPRECATED int32_t U_EXPORT2 +uidna_toUnicode(const UChar* src, int32_t srcLength, + UChar* dest, int32_t destCapacity, + int32_t options, + UParseError* parseError, + UErrorCode* status); + + +/** + * IDNA2003: Convenience function that implements the IDNToASCII operation as defined in the IDNA RFC. + * This operation is done on complete domain names, e.g: "www.example.com". + * It is important to note that this operation can fail. If it fails, then the input + * domain name cannot be used as an Internationalized Domain Name and the application + * should have methods defined to deal with the failure. + * + * <b>Note:</b> IDNA RFC specifies that a conformant application should divide a domain name + * into separate labels, decide whether to apply allowUnassigned and useSTD3ASCIIRules on each, + * and then convert. This function does not offer that level of granularity. The options once + * set will apply to all labels in the domain name + * + * @param src Input UChar array containing IDN in Unicode. + * @param srcLength Number of UChars in src, or -1 if NUL-terminated. + * @param dest Output UChar array with ASCII (ACE encoded) IDN. + * @param destCapacity Size of dest. + * @param options A bit set of options: + * + * - UIDNA_DEFAULT Use default options, i.e., do not process unassigned code points + * and do not use STD3 ASCII rules + * If unassigned code points are found the operation fails with + * U_UNASSIGNED_CODE_POINT_FOUND error code. + * + * - UIDNA_ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations + * If this option is set, the unassigned code points are in the input + * are treated as normal Unicode code points. + * + * - UIDNA_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions + * If this option is set and the input does not satisfy STD3 rules, + * the operation will fail with U_IDNA_STD3_ASCII_RULES_ERROR + * + * @param parseError Pointer to UParseError struct to receive information on position + * of error if an error is encountered. Can be NULL. + * @param status ICU in/out error code parameter. + * U_INVALID_CHAR_FOUND if src contains + * unmatched single surrogates. + * U_INDEX_OUTOFBOUNDS_ERROR if src contains + * too many code points. + * U_BUFFER_OVERFLOW_ERROR if destCapacity is not enough + * @return The length of the result string, if successful - or in case of a buffer overflow, + * in which case it will be greater than destCapacity. + * @deprecated ICU 55 Use UTS #46 instead via uidna_openUTS46() or class IDNA. + */ +U_DEPRECATED int32_t U_EXPORT2 +uidna_IDNToASCII( const UChar* src, int32_t srcLength, + UChar* dest, int32_t destCapacity, + int32_t options, + UParseError* parseError, + UErrorCode* status); + +/** + * IDNA2003: Convenience function that implements the IDNToUnicode operation as defined in the IDNA RFC. + * This operation is done on complete domain names, e.g: "www.example.com". + * + * <b>Note:</b> IDNA RFC specifies that a conformant application should divide a domain name + * into separate labels, decide whether to apply allowUnassigned and useSTD3ASCIIRules on each, + * and then convert. This function does not offer that level of granularity. The options once + * set will apply to all labels in the domain name + * + * @param src Input UChar array containing IDN in ASCII (ACE encoded) form. + * @param srcLength Number of UChars in src, or -1 if NUL-terminated. + * @param dest Output UChar array containing Unicode equivalent of source IDN. + * @param destCapacity Size of dest. + * @param options A bit set of options: + * + * - UIDNA_DEFAULT Use default options, i.e., do not process unassigned code points + * and do not use STD3 ASCII rules + * If unassigned code points are found the operation fails with + * U_UNASSIGNED_CODE_POINT_FOUND error code. + * + * - UIDNA_ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations + * If this option is set, the unassigned code points are in the input + * are treated as normal Unicode code points. + * + * - UIDNA_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions + * If this option is set and the input does not satisfy STD3 rules, + * the operation will fail with U_IDNA_STD3_ASCII_RULES_ERROR + * + * @param parseError Pointer to UParseError struct to receive information on position + * of error if an error is encountered. Can be NULL. + * @param status ICU in/out error code parameter. + * U_INVALID_CHAR_FOUND if src contains + * unmatched single surrogates. + * U_INDEX_OUTOFBOUNDS_ERROR if src contains + * too many code points. + * U_BUFFER_OVERFLOW_ERROR if destCapacity is not enough + * @return The length of the result string, if successful - or in case of a buffer overflow, + * in which case it will be greater than destCapacity. + * @deprecated ICU 55 Use UTS #46 instead via uidna_openUTS46() or class IDNA. + */ +U_DEPRECATED int32_t U_EXPORT2 +uidna_IDNToUnicode( const UChar* src, int32_t srcLength, + UChar* dest, int32_t destCapacity, + int32_t options, + UParseError* parseError, + UErrorCode* status); + +/** + * IDNA2003: Compare two IDN strings for equivalence. + * This function splits the domain names into labels and compares them. + * According to IDN RFC, whenever two labels are compared, they are + * considered equal if and only if their ASCII forms (obtained by + * applying toASCII) match using an case-insensitive ASCII comparison. + * Two domain names are considered a match if and only if all labels + * match regardless of whether label separators match. + * + * @param s1 First source string. + * @param length1 Length of first source string, or -1 if NUL-terminated. + * + * @param s2 Second source string. + * @param length2 Length of second source string, or -1 if NUL-terminated. + * @param options A bit set of options: + * + * - UIDNA_DEFAULT Use default options, i.e., do not process unassigned code points + * and do not use STD3 ASCII rules + * If unassigned code points are found the operation fails with + * U_UNASSIGNED_CODE_POINT_FOUND error code. + * + * - UIDNA_ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations + * If this option is set, the unassigned code points are in the input + * are treated as normal Unicode code points. + * + * - UIDNA_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions + * If this option is set and the input does not satisfy STD3 rules, + * the operation will fail with U_IDNA_STD3_ASCII_RULES_ERROR + * + * @param status ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return <0 or 0 or >0 as usual for string comparisons + * @deprecated ICU 55 Use UTS #46 instead via uidna_openUTS46() or class IDNA. + */ +U_DEPRECATED int32_t U_EXPORT2 +uidna_compare( const UChar *s1, int32_t length1, + const UChar *s2, int32_t length2, + int32_t options, + UErrorCode* status); + +#endif /* U_HIDE_DEPRECATED_API */ + +#endif /* #if !UCONFIG_NO_IDNA */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uiter.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uiter.h new file mode 100755 index 00000000..11ad75ac --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uiter.h @@ -0,0 +1,709 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 2002-2011 International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: uiter.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2002jan18 +* created by: Markus W. Scherer +*/ + +#ifndef __UITER_H__ +#define __UITER_H__ + +/** + * \file + * \brief C API: Unicode Character Iteration + * + * @see UCharIterator + */ + +#include "unicode/utypes.h" + +#if U_SHOW_CPLUSPLUS_API + U_NAMESPACE_BEGIN + + class CharacterIterator; + class Replaceable; + + U_NAMESPACE_END +#endif + +U_CDECL_BEGIN + +struct UCharIterator; +typedef struct UCharIterator UCharIterator; /**< C typedef for struct UCharIterator. @stable ICU 2.1 */ + +/** + * Origin constants for UCharIterator.getIndex() and UCharIterator.move(). + * @see UCharIteratorMove + * @see UCharIterator + * @stable ICU 2.1 + */ +typedef enum UCharIteratorOrigin { + UITER_START, UITER_CURRENT, UITER_LIMIT, UITER_ZERO, UITER_LENGTH +} UCharIteratorOrigin; + +/** Constants for UCharIterator. @stable ICU 2.6 */ +enum { + /** + * Constant value that may be returned by UCharIteratorMove + * indicating that the final UTF-16 index is not known, but that the move succeeded. + * This can occur when moving relative to limit or length, or + * when moving relative to the current index after a setState() + * when the current UTF-16 index is not known. + * + * It would be very inefficient to have to count from the beginning of the text + * just to get the current/limit/length index after moving relative to it. + * The actual index can be determined with getIndex(UITER_CURRENT) + * which will count the UChars if necessary. + * + * @stable ICU 2.6 + */ + UITER_UNKNOWN_INDEX=-2 +}; + + +/** + * Constant for UCharIterator getState() indicating an error or + * an unknown state. + * Returned by uiter_getState()/UCharIteratorGetState + * when an error occurs. + * Also, some UCharIterator implementations may not be able to return + * a valid state for each position. This will be clearly documented + * for each such iterator (none of the public ones here). + * + * @stable ICU 2.6 + */ +#define UITER_NO_STATE ((uint32_t)0xffffffff) + +/** + * Function type declaration for UCharIterator.getIndex(). + * + * Gets the current position, or the start or limit of the + * iteration range. + * + * This function may perform slowly for UITER_CURRENT after setState() was called, + * or for UITER_LENGTH, because an iterator implementation may have to count + * UChars if the underlying storage is not UTF-16. + * + * @param iter the UCharIterator structure ("this pointer") + * @param origin get the 0, start, limit, length, or current index + * @return the requested index, or U_SENTINEL in an error condition + * + * @see UCharIteratorOrigin + * @see UCharIterator + * @stable ICU 2.1 + */ +typedef int32_t U_CALLCONV +UCharIteratorGetIndex(UCharIterator *iter, UCharIteratorOrigin origin); + +/** + * Function type declaration for UCharIterator.move(). + * + * Use iter->move(iter, index, UITER_ZERO) like CharacterIterator::setIndex(index). + * + * Moves the current position relative to the start or limit of the + * iteration range, or relative to the current position itself. + * The movement is expressed in numbers of code units forward + * or backward by specifying a positive or negative delta. + * Out of bounds movement will be pinned to the start or limit. + * + * This function may perform slowly for moving relative to UITER_LENGTH + * because an iterator implementation may have to count the rest of the + * UChars if the native storage is not UTF-16. + * + * When moving relative to the limit or length, or + * relative to the current position after setState() was called, + * move() may return UITER_UNKNOWN_INDEX (-2) to avoid an inefficient + * determination of the actual UTF-16 index. + * The actual index can be determined with getIndex(UITER_CURRENT) + * which will count the UChars if necessary. + * See UITER_UNKNOWN_INDEX for details. + * + * @param iter the UCharIterator structure ("this pointer") + * @param delta can be positive, zero, or negative + * @param origin move relative to the 0, start, limit, length, or current index + * @return the new index, or U_SENTINEL on an error condition, + * or UITER_UNKNOWN_INDEX when the index is not known. + * + * @see UCharIteratorOrigin + * @see UCharIterator + * @see UITER_UNKNOWN_INDEX + * @stable ICU 2.1 + */ +typedef int32_t U_CALLCONV +UCharIteratorMove(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origin); + +/** + * Function type declaration for UCharIterator.hasNext(). + * + * Check if current() and next() can still + * return another code unit. + * + * @param iter the UCharIterator structure ("this pointer") + * @return boolean value for whether current() and next() can still return another code unit + * + * @see UCharIterator + * @stable ICU 2.1 + */ +typedef UBool U_CALLCONV +UCharIteratorHasNext(UCharIterator *iter); + +/** + * Function type declaration for UCharIterator.hasPrevious(). + * + * Check if previous() can still return another code unit. + * + * @param iter the UCharIterator structure ("this pointer") + * @return boolean value for whether previous() can still return another code unit + * + * @see UCharIterator + * @stable ICU 2.1 + */ +typedef UBool U_CALLCONV +UCharIteratorHasPrevious(UCharIterator *iter); + +/** + * Function type declaration for UCharIterator.current(). + * + * Return the code unit at the current position, + * or U_SENTINEL if there is none (index is at the limit). + * + * @param iter the UCharIterator structure ("this pointer") + * @return the current code unit + * + * @see UCharIterator + * @stable ICU 2.1 + */ +typedef UChar32 U_CALLCONV +UCharIteratorCurrent(UCharIterator *iter); + +/** + * Function type declaration for UCharIterator.next(). + * + * Return the code unit at the current index and increment + * the index (post-increment, like s[i++]), + * or return U_SENTINEL if there is none (index is at the limit). + * + * @param iter the UCharIterator structure ("this pointer") + * @return the current code unit (and post-increment the current index) + * + * @see UCharIterator + * @stable ICU 2.1 + */ +typedef UChar32 U_CALLCONV +UCharIteratorNext(UCharIterator *iter); + +/** + * Function type declaration for UCharIterator.previous(). + * + * Decrement the index and return the code unit from there + * (pre-decrement, like s[--i]), + * or return U_SENTINEL if there is none (index is at the start). + * + * @param iter the UCharIterator structure ("this pointer") + * @return the previous code unit (after pre-decrementing the current index) + * + * @see UCharIterator + * @stable ICU 2.1 + */ +typedef UChar32 U_CALLCONV +UCharIteratorPrevious(UCharIterator *iter); + +/** + * Function type declaration for UCharIterator.reservedFn(). + * Reserved for future use. + * + * @param iter the UCharIterator structure ("this pointer") + * @param something some integer argument + * @return some integer + * + * @see UCharIterator + * @stable ICU 2.1 + */ +typedef int32_t U_CALLCONV +UCharIteratorReserved(UCharIterator *iter, int32_t something); + +/** + * Function type declaration for UCharIterator.getState(). + * + * Get the "state" of the iterator in the form of a single 32-bit word. + * It is recommended that the state value be calculated to be as small as + * is feasible. For strings with limited lengths, fewer than 32 bits may + * be sufficient. + * + * This is used together with setState()/UCharIteratorSetState + * to save and restore the iterator position more efficiently than with + * getIndex()/move(). + * + * The iterator state is defined as a uint32_t value because it is designed + * for use in ucol_nextSortKeyPart() which provides 32 bits to store the state + * of the character iterator. + * + * With some UCharIterator implementations (e.g., UTF-8), + * getting and setting the UTF-16 index with existing functions + * (getIndex(UITER_CURRENT) followed by move(pos, UITER_ZERO)) is possible but + * relatively slow because the iterator has to "walk" from a known index + * to the requested one. + * This takes more time the farther it needs to go. + * + * An opaque state value allows an iterator implementation to provide + * an internal index (UTF-8: the source byte array index) for + * fast, constant-time restoration. + * + * After calling setState(), a getIndex(UITER_CURRENT) may be slow because + * the UTF-16 index may not be restored as well, but the iterator can deliver + * the correct text contents and move relative to the current position + * without performance degradation. + * + * Some UCharIterator implementations may not be able to return + * a valid state for each position, in which case they return UITER_NO_STATE instead. + * This will be clearly documented for each such iterator (none of the public ones here). + * + * @param iter the UCharIterator structure ("this pointer") + * @return the state word + * + * @see UCharIterator + * @see UCharIteratorSetState + * @see UITER_NO_STATE + * @stable ICU 2.6 + */ +typedef uint32_t U_CALLCONV +UCharIteratorGetState(const UCharIterator *iter); + +/** + * Function type declaration for UCharIterator.setState(). + * + * Restore the "state" of the iterator using a state word from a getState() call. + * The iterator object need not be the same one as for which getState() was called, + * but it must be of the same type (set up using the same uiter_setXYZ function) + * and it must iterate over the same string + * (binary identical regardless of memory address). + * For more about the state word see UCharIteratorGetState. + * + * After calling setState(), a getIndex(UITER_CURRENT) may be slow because + * the UTF-16 index may not be restored as well, but the iterator can deliver + * the correct text contents and move relative to the current position + * without performance degradation. + * + * @param iter the UCharIterator structure ("this pointer") + * @param state the state word from a getState() call + * on a same-type, same-string iterator + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * + * @see UCharIterator + * @see UCharIteratorGetState + * @stable ICU 2.6 + */ +typedef void U_CALLCONV +UCharIteratorSetState(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode); + + +/** + * C API for code unit iteration. + * This can be used as a C wrapper around + * CharacterIterator, Replaceable, or implemented using simple strings, etc. + * + * There are two roles for using UCharIterator: + * + * A "provider" sets the necessary function pointers and controls the "protected" + * fields of the UCharIterator structure. A "provider" passes a UCharIterator + * into C APIs that need a UCharIterator as an abstract, flexible string interface. + * + * Implementations of such C APIs are "callers" of UCharIterator functions; + * they only use the "public" function pointers and never access the "protected" + * fields directly. + * + * The current() and next() functions only check the current index against the + * limit, and previous() only checks the current index against the start, + * to see if the iterator already reached the end of the iteration range. + * + * The assumption - in all iterators - is that the index is moved via the API, + * which means it won't go out of bounds, or the index is modified by + * user code that knows enough about the iterator implementation to set valid + * index values. + * + * UCharIterator functions return code unit values 0..0xffff, + * or U_SENTINEL if the iteration bounds are reached. + * + * @stable ICU 2.1 + */ +struct UCharIterator { + /** + * (protected) Pointer to string or wrapped object or similar. + * Not used by caller. + * @stable ICU 2.1 + */ + const void *context; + + /** + * (protected) Length of string or similar. + * Not used by caller. + * @stable ICU 2.1 + */ + int32_t length; + + /** + * (protected) Start index or similar. + * Not used by caller. + * @stable ICU 2.1 + */ + int32_t start; + + /** + * (protected) Current index or similar. + * Not used by caller. + * @stable ICU 2.1 + */ + int32_t index; + + /** + * (protected) Limit index or similar. + * Not used by caller. + * @stable ICU 2.1 + */ + int32_t limit; + + /** + * (protected) Used by UTF-8 iterators and possibly others. + * @stable ICU 2.1 + */ + int32_t reservedField; + + /** + * (public) Returns the current position or the + * start or limit index of the iteration range. + * + * @see UCharIteratorGetIndex + * @stable ICU 2.1 + */ + UCharIteratorGetIndex *getIndex; + + /** + * (public) Moves the current position relative to the start or limit of the + * iteration range, or relative to the current position itself. + * The movement is expressed in numbers of code units forward + * or backward by specifying a positive or negative delta. + * + * @see UCharIteratorMove + * @stable ICU 2.1 + */ + UCharIteratorMove *move; + + /** + * (public) Check if current() and next() can still + * return another code unit. + * + * @see UCharIteratorHasNext + * @stable ICU 2.1 + */ + UCharIteratorHasNext *hasNext; + + /** + * (public) Check if previous() can still return another code unit. + * + * @see UCharIteratorHasPrevious + * @stable ICU 2.1 + */ + UCharIteratorHasPrevious *hasPrevious; + + /** + * (public) Return the code unit at the current position, + * or U_SENTINEL if there is none (index is at the limit). + * + * @see UCharIteratorCurrent + * @stable ICU 2.1 + */ + UCharIteratorCurrent *current; + + /** + * (public) Return the code unit at the current index and increment + * the index (post-increment, like s[i++]), + * or return U_SENTINEL if there is none (index is at the limit). + * + * @see UCharIteratorNext + * @stable ICU 2.1 + */ + UCharIteratorNext *next; + + /** + * (public) Decrement the index and return the code unit from there + * (pre-decrement, like s[--i]), + * or return U_SENTINEL if there is none (index is at the start). + * + * @see UCharIteratorPrevious + * @stable ICU 2.1 + */ + UCharIteratorPrevious *previous; + + /** + * (public) Reserved for future use. Currently NULL. + * + * @see UCharIteratorReserved + * @stable ICU 2.1 + */ + UCharIteratorReserved *reservedFn; + + /** + * (public) Return the state of the iterator, to be restored later with setState(). + * This function pointer is NULL if the iterator does not implement it. + * + * @see UCharIteratorGet + * @stable ICU 2.6 + */ + UCharIteratorGetState *getState; + + /** + * (public) Restore the iterator state from the state word from a call + * to getState(). + * This function pointer is NULL if the iterator does not implement it. + * + * @see UCharIteratorSet + * @stable ICU 2.6 + */ + UCharIteratorSetState *setState; +}; + +/** + * Helper function for UCharIterator to get the code point + * at the current index. + * + * Return the code point that includes the code unit at the current position, + * or U_SENTINEL if there is none (index is at the limit). + * If the current code unit is a lead or trail surrogate, + * then the following or preceding surrogate is used to form + * the code point value. + * + * @param iter the UCharIterator structure ("this pointer") + * @return the current code point + * + * @see UCharIterator + * @see U16_GET + * @see UnicodeString::char32At() + * @stable ICU 2.1 + */ +U_STABLE UChar32 U_EXPORT2 +uiter_current32(UCharIterator *iter); + +/** + * Helper function for UCharIterator to get the next code point. + * + * Return the code point at the current index and increment + * the index (post-increment, like s[i++]), + * or return U_SENTINEL if there is none (index is at the limit). + * + * @param iter the UCharIterator structure ("this pointer") + * @return the current code point (and post-increment the current index) + * + * @see UCharIterator + * @see U16_NEXT + * @stable ICU 2.1 + */ +U_STABLE UChar32 U_EXPORT2 +uiter_next32(UCharIterator *iter); + +/** + * Helper function for UCharIterator to get the previous code point. + * + * Decrement the index and return the code point from there + * (pre-decrement, like s[--i]), + * or return U_SENTINEL if there is none (index is at the start). + * + * @param iter the UCharIterator structure ("this pointer") + * @return the previous code point (after pre-decrementing the current index) + * + * @see UCharIterator + * @see U16_PREV + * @stable ICU 2.1 + */ +U_STABLE UChar32 U_EXPORT2 +uiter_previous32(UCharIterator *iter); + +/** + * Get the "state" of the iterator in the form of a single 32-bit word. + * This is a convenience function that calls iter->getState(iter) + * if iter->getState is not NULL; + * if it is NULL or any other error occurs, then UITER_NO_STATE is returned. + * + * Some UCharIterator implementations may not be able to return + * a valid state for each position, in which case they return UITER_NO_STATE instead. + * This will be clearly documented for each such iterator (none of the public ones here). + * + * @param iter the UCharIterator structure ("this pointer") + * @return the state word + * + * @see UCharIterator + * @see UCharIteratorGetState + * @see UITER_NO_STATE + * @stable ICU 2.6 + */ +U_STABLE uint32_t U_EXPORT2 +uiter_getState(const UCharIterator *iter); + +/** + * Restore the "state" of the iterator using a state word from a getState() call. + * This is a convenience function that calls iter->setState(iter, state, pErrorCode) + * if iter->setState is not NULL; if it is NULL, then U_UNSUPPORTED_ERROR is set. + * + * @param iter the UCharIterator structure ("this pointer") + * @param state the state word from a getState() call + * on a same-type, same-string iterator + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * + * @see UCharIterator + * @see UCharIteratorSetState + * @stable ICU 2.6 + */ +U_STABLE void U_EXPORT2 +uiter_setState(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode); + +/** + * Set up a UCharIterator to iterate over a string. + * + * Sets the UCharIterator function pointers for iteration over the string s + * with iteration boundaries start=index=0 and length=limit=string length. + * The "provider" may set the start, index, and limit values at any time + * within the range 0..length. + * The length field will be ignored. + * + * The string pointer s is set into UCharIterator.context without copying + * or reallocating the string contents. + * + * getState() simply returns the current index. + * move() will always return the final index. + * + * @param iter UCharIterator structure to be set for iteration + * @param s String to iterate over + * @param length Length of s, or -1 if NUL-terminated + * + * @see UCharIterator + * @stable ICU 2.1 + */ +U_STABLE void U_EXPORT2 +uiter_setString(UCharIterator *iter, const UChar *s, int32_t length); + +/** + * Set up a UCharIterator to iterate over a UTF-16BE string + * (byte vector with a big-endian pair of bytes per UChar). + * + * Everything works just like with a normal UChar iterator (uiter_setString), + * except that UChars are assembled from byte pairs, + * and that the length argument here indicates an even number of bytes. + * + * getState() simply returns the current index. + * move() will always return the final index. + * + * @param iter UCharIterator structure to be set for iteration + * @param s UTF-16BE string to iterate over + * @param length Length of s as an even number of bytes, or -1 if NUL-terminated + * (NUL means pair of 0 bytes at even index from s) + * + * @see UCharIterator + * @see uiter_setString + * @stable ICU 2.6 + */ +U_STABLE void U_EXPORT2 +uiter_setUTF16BE(UCharIterator *iter, const char *s, int32_t length); + +/** + * Set up a UCharIterator to iterate over a UTF-8 string. + * + * Sets the UCharIterator function pointers for iteration over the UTF-8 string s + * with UTF-8 iteration boundaries 0 and length. + * The implementation counts the UTF-16 index on the fly and + * lazily evaluates the UTF-16 length of the text. + * + * The start field is used as the UTF-8 offset, the limit field as the UTF-8 length. + * When the reservedField is not 0, then it contains a supplementary code point + * and the UTF-16 index is between the two corresponding surrogates. + * At that point, the UTF-8 index is behind that code point. + * + * The UTF-8 string pointer s is set into UCharIterator.context without copying + * or reallocating the string contents. + * + * getState() returns a state value consisting of + * - the current UTF-8 source byte index (bits 31..1) + * - a flag (bit 0) that indicates whether the UChar position is in the middle + * of a surrogate pair + * (from a 4-byte UTF-8 sequence for the corresponding supplementary code point) + * + * getState() cannot also encode the UTF-16 index in the state value. + * move(relative to limit or length), or + * move(relative to current) after setState(), may return UITER_UNKNOWN_INDEX. + * + * @param iter UCharIterator structure to be set for iteration + * @param s UTF-8 string to iterate over + * @param length Length of s in bytes, or -1 if NUL-terminated + * + * @see UCharIterator + * @stable ICU 2.6 + */ +U_STABLE void U_EXPORT2 +uiter_setUTF8(UCharIterator *iter, const char *s, int32_t length); + +#if U_SHOW_CPLUSPLUS_API + +/** + * Set up a UCharIterator to wrap around a C++ CharacterIterator. + * + * Sets the UCharIterator function pointers for iteration using the + * CharacterIterator charIter. + * + * The CharacterIterator pointer charIter is set into UCharIterator.context + * without copying or cloning the CharacterIterator object. + * The other "protected" UCharIterator fields are set to 0 and will be ignored. + * The iteration index and boundaries are controlled by the CharacterIterator. + * + * getState() simply returns the current index. + * move() will always return the final index. + * + * @param iter UCharIterator structure to be set for iteration + * @param charIter CharacterIterator to wrap + * + * @see UCharIterator + * @stable ICU 2.1 + */ +U_STABLE void U_EXPORT2 +uiter_setCharacterIterator(UCharIterator *iter, icu::CharacterIterator *charIter); + +/** + * Set up a UCharIterator to iterate over a C++ Replaceable. + * + * Sets the UCharIterator function pointers for iteration over the + * Replaceable rep with iteration boundaries start=index=0 and + * length=limit=rep->length(). + * The "provider" may set the start, index, and limit values at any time + * within the range 0..length=rep->length(). + * The length field will be ignored. + * + * The Replaceable pointer rep is set into UCharIterator.context without copying + * or cloning/reallocating the Replaceable object. + * + * getState() simply returns the current index. + * move() will always return the final index. + * + * @param iter UCharIterator structure to be set for iteration + * @param rep Replaceable to iterate over + * + * @see UCharIterator + * @stable ICU 2.1 + */ +U_STABLE void U_EXPORT2 +uiter_setReplaceable(UCharIterator *iter, const icu::Replaceable *rep); + +#endif + +U_CDECL_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uldnames.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uldnames.h new file mode 100755 index 00000000..3ebffa23 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uldnames.h @@ -0,0 +1,304 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2010-2016, International Business Machines Corporation and +* others. All Rights Reserved. +******************************************************************************* +*/ + +#ifndef __ULDNAMES_H__ +#define __ULDNAMES_H__ + +/** + * \file + * \brief C API: Provides display names of Locale ids and their components. + */ + +#include "unicode/utypes.h" +#include "unicode/localpointer.h" +#include "unicode/uscript.h" +#include "unicode/udisplaycontext.h" + +/** + * Enum used in LocaleDisplayNames::createInstance. + * @stable ICU 4.4 + */ +typedef enum { + /** + * Use standard names when generating a locale name, + * e.g. en_GB displays as 'English (United Kingdom)'. + * @stable ICU 4.4 + */ + ULDN_STANDARD_NAMES = 0, + /** + * Use dialect names, when generating a locale name, + * e.g. en_GB displays as 'British English'. + * @stable ICU 4.4 + */ + ULDN_DIALECT_NAMES +} UDialectHandling; + +/** + * Opaque C service object type for the locale display names API + * @stable ICU 4.4 + */ +struct ULocaleDisplayNames; + +/** + * C typedef for struct ULocaleDisplayNames. + * @stable ICU 4.4 + */ +typedef struct ULocaleDisplayNames ULocaleDisplayNames; + +#if !UCONFIG_NO_FORMATTING + +/** + * Returns an instance of LocaleDisplayNames that returns names + * formatted for the provided locale, using the provided + * dialectHandling. The usual value for dialectHandling is + * ULOC_STANDARD_NAMES. + * + * @param locale the display locale + * @param dialectHandling how to select names for locales + * @return a ULocaleDisplayNames instance + * @param pErrorCode the status code + * @stable ICU 4.4 + */ +U_STABLE ULocaleDisplayNames * U_EXPORT2 +uldn_open(const char * locale, + UDialectHandling dialectHandling, + UErrorCode *pErrorCode); + +/** + * Closes a ULocaleDisplayNames instance obtained from uldn_open(). + * @param ldn the ULocaleDisplayNames instance to be closed + * @stable ICU 4.4 + */ +U_STABLE void U_EXPORT2 +uldn_close(ULocaleDisplayNames *ldn); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalULocaleDisplayNamesPointer + * "Smart pointer" class, closes a ULocaleDisplayNames via uldn_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalULocaleDisplayNamesPointer, ULocaleDisplayNames, uldn_close); + +U_NAMESPACE_END + +#endif + +/* getters for state */ + +/** + * Returns the locale used to determine the display names. This is + * not necessarily the same locale passed to {@link #uldn_open}. + * @param ldn the LocaleDisplayNames instance + * @return the display locale + * @stable ICU 4.4 + */ +U_STABLE const char * U_EXPORT2 +uldn_getLocale(const ULocaleDisplayNames *ldn); + +/** + * Returns the dialect handling used in the display names. + * @param ldn the LocaleDisplayNames instance + * @return the dialect handling enum + * @stable ICU 4.4 + */ +U_STABLE UDialectHandling U_EXPORT2 +uldn_getDialectHandling(const ULocaleDisplayNames *ldn); + +/* names for entire locales */ + +/** + * Returns the display name of the provided locale. + * @param ldn the LocaleDisplayNames instance + * @param locale the locale whose display name to return + * @param result receives the display name + * @param maxResultSize the size of the result buffer + * @param pErrorCode the status code + * @return the actual buffer size needed for the display name. If it's + * greater than maxResultSize, the returned name will be truncated. + * @stable ICU 4.4 + */ +U_STABLE int32_t U_EXPORT2 +uldn_localeDisplayName(const ULocaleDisplayNames *ldn, + const char *locale, + UChar *result, + int32_t maxResultSize, + UErrorCode *pErrorCode); + +/* names for components of a locale */ + +/** + * Returns the display name of the provided language code. + * @param ldn the LocaleDisplayNames instance + * @param lang the language code whose display name to return + * @param result receives the display name + * @param maxResultSize the size of the result buffer + * @param pErrorCode the status code + * @return the actual buffer size needed for the display name. If it's + * greater than maxResultSize, the returned name will be truncated. + * @stable ICU 4.4 + */ +U_STABLE int32_t U_EXPORT2 +uldn_languageDisplayName(const ULocaleDisplayNames *ldn, + const char *lang, + UChar *result, + int32_t maxResultSize, + UErrorCode *pErrorCode); + +/** + * Returns the display name of the provided script. + * @param ldn the LocaleDisplayNames instance + * @param script the script whose display name to return + * @param result receives the display name + * @param maxResultSize the size of the result buffer + * @param pErrorCode the status code + * @return the actual buffer size needed for the display name. If it's + * greater than maxResultSize, the returned name will be truncated. + * @stable ICU 4.4 + */ +U_STABLE int32_t U_EXPORT2 +uldn_scriptDisplayName(const ULocaleDisplayNames *ldn, + const char *script, + UChar *result, + int32_t maxResultSize, + UErrorCode *pErrorCode); + +/** + * Returns the display name of the provided script code. + * @param ldn the LocaleDisplayNames instance + * @param scriptCode the script code whose display name to return + * @param result receives the display name + * @param maxResultSize the size of the result buffer + * @param pErrorCode the status code + * @return the actual buffer size needed for the display name. If it's + * greater than maxResultSize, the returned name will be truncated. + * @stable ICU 4.4 + */ +U_STABLE int32_t U_EXPORT2 +uldn_scriptCodeDisplayName(const ULocaleDisplayNames *ldn, + UScriptCode scriptCode, + UChar *result, + int32_t maxResultSize, + UErrorCode *pErrorCode); + +/** + * Returns the display name of the provided region code. + * @param ldn the LocaleDisplayNames instance + * @param region the region code whose display name to return + * @param result receives the display name + * @param maxResultSize the size of the result buffer + * @param pErrorCode the status code + * @return the actual buffer size needed for the display name. If it's + * greater than maxResultSize, the returned name will be truncated. + * @stable ICU 4.4 + */ +U_STABLE int32_t U_EXPORT2 +uldn_regionDisplayName(const ULocaleDisplayNames *ldn, + const char *region, + UChar *result, + int32_t maxResultSize, + UErrorCode *pErrorCode); + +/** + * Returns the display name of the provided variant + * @param ldn the LocaleDisplayNames instance + * @param variant the variant whose display name to return + * @param result receives the display name + * @param maxResultSize the size of the result buffer + * @param pErrorCode the status code + * @return the actual buffer size needed for the display name. If it's + * greater than maxResultSize, the returned name will be truncated. + * @stable ICU 4.4 + */ +U_STABLE int32_t U_EXPORT2 +uldn_variantDisplayName(const ULocaleDisplayNames *ldn, + const char *variant, + UChar *result, + int32_t maxResultSize, + UErrorCode *pErrorCode); + +/** + * Returns the display name of the provided locale key + * @param ldn the LocaleDisplayNames instance + * @param key the locale key whose display name to return + * @param result receives the display name + * @param maxResultSize the size of the result buffer + * @param pErrorCode the status code + * @return the actual buffer size needed for the display name. If it's + * greater than maxResultSize, the returned name will be truncated. + * @stable ICU 4.4 + */ +U_STABLE int32_t U_EXPORT2 +uldn_keyDisplayName(const ULocaleDisplayNames *ldn, + const char *key, + UChar *result, + int32_t maxResultSize, + UErrorCode *pErrorCode); + +/** + * Returns the display name of the provided value (used with the provided key). + * @param ldn the LocaleDisplayNames instance + * @param key the locale key + * @param value the locale key's value + * @param result receives the display name + * @param maxResultSize the size of the result buffer + * @param pErrorCode the status code + * @return the actual buffer size needed for the display name. If it's + * greater than maxResultSize, the returned name will be truncated. + * @stable ICU 4.4 + */ +U_STABLE int32_t U_EXPORT2 +uldn_keyValueDisplayName(const ULocaleDisplayNames *ldn, + const char *key, + const char *value, + UChar *result, + int32_t maxResultSize, + UErrorCode *pErrorCode); + +/** +* Returns an instance of LocaleDisplayNames that returns names formatted +* for the provided locale, using the provided UDisplayContext settings. +* +* @param locale The display locale +* @param contexts List of one or more context settings (e.g. for dialect +* handling, capitalization, etc. +* @param length Number of items in the contexts list +* @param pErrorCode Pointer to UErrorCode input/output status. If at entry this indicates +* a failure status, the function will do nothing; otherwise this will be +* updated with any new status from the function. +* @return a ULocaleDisplayNames instance +* @stable ICU 51 +*/ +U_STABLE ULocaleDisplayNames * U_EXPORT2 +uldn_openForContext(const char * locale, UDisplayContext *contexts, + int32_t length, UErrorCode *pErrorCode); + +/** +* Returns the UDisplayContext value for the specified UDisplayContextType. +* @param ldn the ULocaleDisplayNames instance +* @param type the UDisplayContextType whose value to return +* @param pErrorCode Pointer to UErrorCode input/output status. If at entry this indicates +* a failure status, the function will do nothing; otherwise this will be +* updated with any new status from the function. +* @return the UDisplayContextValue for the specified type. +* @stable ICU 51 +*/ +U_STABLE UDisplayContext U_EXPORT2 +uldn_getContext(const ULocaleDisplayNames *ldn, UDisplayContextType type, + UErrorCode *pErrorCode); + +#endif /* !UCONFIG_NO_FORMATTING */ +#endif /* __ULDNAMES_H__ */ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ulistformatter.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ulistformatter.h new file mode 100755 index 00000000..9fe24f7c --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ulistformatter.h @@ -0,0 +1,130 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +***************************************************************************************** +* Copyright (C) 2015-2016, International Business Machines +* Corporation and others. All Rights Reserved. +***************************************************************************************** +*/ + +#ifndef ULISTFORMATTER_H +#define ULISTFORMATTER_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/localpointer.h" + +/** + * \file + * \brief C API: Format a list in a locale-appropriate way. + * + * A UListFormatter is used to format a list of items in a locale-appropriate way, + * using data from CLDR. + * Example: Input data ["Alice", "Bob", "Charlie", "Delta"] will be formatted + * as "Alice, Bob, Charlie, and Delta" in English. + */ + +/** + * Opaque UListFormatter object for use in C + * @stable ICU 55 + */ +struct UListFormatter; +typedef struct UListFormatter UListFormatter; /**< C typedef for struct UListFormatter. @stable ICU 55 */ + +/** + * Open a new UListFormatter object using the rules for a given locale. + * @param locale + * The locale whose rules should be used; may be NULL for + * default locale. + * @param status + * A pointer to a standard ICU UErrorCode (input/output parameter). + * Its input value must pass the U_SUCCESS() test, or else the + * function returns immediately. The caller should check its output + * value with U_FAILURE(), or use with function chaining (see User + * Guide for details). + * @return + * A pointer to a UListFormatter object for the specified locale, + * or NULL if an error occurred. + * @stable ICU 55 + */ +U_CAPI UListFormatter* U_EXPORT2 +ulistfmt_open(const char* locale, + UErrorCode* status); + +/** + * Close a UListFormatter object. Once closed it may no longer be used. + * @param listfmt + * The UListFormatter object to close. + * @stable ICU 55 + */ +U_CAPI void U_EXPORT2 +ulistfmt_close(UListFormatter *listfmt); + + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUListFormatterPointer + * "Smart pointer" class, closes a UListFormatter via ulistfmt_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 55 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUListFormatterPointer, UListFormatter, ulistfmt_close); + +U_NAMESPACE_END + +#endif + +/** + * Formats a list of strings using the conventions established for the + * UListFormatter object. + * @param listfmt + * The UListFormatter object specifying the list conventions. + * @param strings + * An array of pointers to UChar strings; the array length is + * specified by stringCount. Must be non-NULL if stringCount > 0. + * @param stringLengths + * An array of string lengths corresponding to the strings[] + * parameter; any individual length value may be negative to indicate + * that the corresponding strings[] entry is 0-terminated, or + * stringLengths itself may be NULL if all of the strings are + * 0-terminated. If non-NULL, the stringLengths array must have + * stringCount entries. + * @param stringCount + * the number of entries in strings[], and the number of entries + * in the stringLengths array if it is not NULL. Must be >= 0. + * @param result + * A pointer to a buffer to receive the formatted list. + * @param resultCapacity + * The maximum size of result. + * @param status + * A pointer to a standard ICU UErrorCode (input/output parameter). + * Its input value must pass the U_SUCCESS() test, or else the + * function returns immediately. The caller should check its output + * value with U_FAILURE(), or use with function chaining (see User + * Guide for details). + * @return + * The total buffer size needed; if greater than resultLength, the + * output was truncated. May be <=0 if unable to determine the + * total buffer size needed (e.g. for illegal arguments). + * @stable ICU 55 + */ +U_CAPI int32_t U_EXPORT2 +ulistfmt_format(const UListFormatter* listfmt, + const UChar* const strings[], + const int32_t * stringLengths, + int32_t stringCount, + UChar* result, + int32_t resultCapacity, + UErrorCode* status); + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uloc.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uloc.h new file mode 100755 index 00000000..23a54a99 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uloc.h @@ -0,0 +1,1272 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 1997-2016, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* +* File ULOC.H +* +* Modification History: +* +* Date Name Description +* 04/01/97 aliu Creation. +* 08/22/98 stephen JDK 1.2 sync. +* 12/08/98 rtg New C API for Locale +* 03/30/99 damiba overhaul +* 03/31/99 helena Javadoc for uloc functions. +* 04/15/99 Madhu Updated Javadoc +******************************************************************************** +*/ + +#ifndef ULOC_H +#define ULOC_H + +#include "unicode/utypes.h" +#include "unicode/uenum.h" + +/** + * \file + * \brief C API: Locale + * + * <h2> ULoc C API for Locale </h2> + * A <code>Locale</code> represents a specific geographical, political, + * or cultural region. An operation that requires a <code>Locale</code> to perform + * its task is called <em>locale-sensitive</em> and uses the <code>Locale</code> + * to tailor information for the user. For example, displaying a number + * is a locale-sensitive operation--the number should be formatted + * according to the customs/conventions of the user's native country, + * region, or culture. In the C APIs, a locales is simply a const char string. + * + * <P> + * You create a <code>Locale</code> with one of the three options listed below. + * Each of the component is separated by '_' in the locale string. + * \htmlonly<blockquote>\endhtmlonly + * <pre> + * \code + * newLanguage + * + * newLanguage + newCountry + * + * newLanguage + newCountry + newVariant + * \endcode + * </pre> + * \htmlonly</blockquote>\endhtmlonly + * The first option is a valid <STRONG>ISO + * Language Code.</STRONG> These codes are the lower-case two-letter + * codes as defined by ISO-639. + * You can find a full list of these codes at a number of sites, such as: + * <BR><a href ="http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt"> + * http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt</a> + * + * <P> + * The second option includes an additional <STRONG>ISO Country + * Code.</STRONG> These codes are the upper-case two-letter codes + * as defined by ISO-3166. + * You can find a full list of these codes at a number of sites, such as: + * <BR><a href="http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html"> + * http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html</a> + * + * <P> + * The third option requires another additional information--the + * <STRONG>Variant.</STRONG> + * The Variant codes are vendor and browser-specific. + * For example, use WIN for Windows, MAC for Macintosh, and POSIX for POSIX. + * Where there are two variants, separate them with an underscore, and + * put the most important one first. For + * example, a Traditional Spanish collation might be referenced, with + * "ES", "ES", "Traditional_WIN". + * + * <P> + * Because a <code>Locale</code> is just an identifier for a region, + * no validity check is performed when you specify a <code>Locale</code>. + * If you want to see whether particular resources are available for the + * <code>Locale</code> you asked for, you must query those resources. For + * example, ask the <code>UNumberFormat</code> for the locales it supports + * using its <code>getAvailable</code> method. + * <BR><STRONG>Note:</STRONG> When you ask for a resource for a particular + * locale, you get back the best available match, not necessarily + * precisely what you asked for. For more information, look at + * <code>UResourceBundle</code>. + * + * <P> + * The <code>Locale</code> provides a number of convenient constants + * that you can use to specify the commonly used + * locales. For example, the following refers to a locale + * for the United States: + * \htmlonly<blockquote>\endhtmlonly + * <pre> + * \code + * ULOC_US + * \endcode + * </pre> + * \htmlonly</blockquote>\endhtmlonly + * + * <P> + * Once you've specified a locale you can query it for information about + * itself. Use <code>uloc_getCountry</code> to get the ISO Country Code and + * <code>uloc_getLanguage</code> to get the ISO Language Code. You can + * use <code>uloc_getDisplayCountry</code> to get the + * name of the country suitable for displaying to the user. Similarly, + * you can use <code>uloc_getDisplayLanguage</code> to get the name of + * the language suitable for displaying to the user. Interestingly, + * the <code>uloc_getDisplayXXX</code> methods are themselves locale-sensitive + * and have two versions: one that uses the default locale and one + * that takes a locale as an argument and displays the name or country in + * a language appropriate to that locale. + * + * <P> + * The ICU provides a number of services that perform locale-sensitive + * operations. For example, the <code>unum_xxx</code> functions format + * numbers, currency, or percentages in a locale-sensitive manner. + * </P> + * \htmlonly<blockquote>\endhtmlonly + * <pre> + * \code + * UErrorCode success = U_ZERO_ERROR; + * UNumberFormat *nf; + * const char* myLocale = "fr_FR"; + * + * nf = unum_open( UNUM_DEFAULT, NULL, success ); + * unum_close(nf); + * nf = unum_open( UNUM_CURRENCY, NULL, success ); + * unum_close(nf); + * nf = unum_open( UNUM_PERCENT, NULL, success ); + * unum_close(nf); + * \endcode + * </pre> + * \htmlonly</blockquote>\endhtmlonly + * Each of these methods has two variants; one with an explicit locale + * and one without; the latter using the default locale. + * \htmlonly<blockquote>\endhtmlonly + * <pre> + * \code + * + * nf = unum_open( UNUM_DEFAULT, myLocale, success ); + * unum_close(nf); + * nf = unum_open( UNUM_CURRENCY, myLocale, success ); + * unum_close(nf); + * nf = unum_open( UNUM_PERCENT, myLocale, success ); + * unum_close(nf); + * \endcode + * </pre> + * \htmlonly</blockquote>\endhtmlonly + * A <code>Locale</code> is the mechanism for identifying the kind of services + * (<code>UNumberFormat</code>) that you would like to get. The locale is + * <STRONG>just</STRONG> a mechanism for identifying these services. + * + * <P> + * Each international service that performs locale-sensitive operations + * allows you + * to get all the available objects of that type. You can sift + * through these objects by language, country, or variant, + * and use the display names to present a menu to the user. + * For example, you can create a menu of all the collation objects + * suitable for a given language. Such classes implement these + * three class methods: + * \htmlonly<blockquote>\endhtmlonly + * <pre> + * \code + * const char* uloc_getAvailable(int32_t index); + * int32_t uloc_countAvailable(); + * int32_t + * uloc_getDisplayName(const char* localeID, + * const char* inLocaleID, + * UChar* result, + * int32_t maxResultSize, + * UErrorCode* err); + * + * \endcode + * </pre> + * \htmlonly</blockquote>\endhtmlonly + * <P> + * Concerning POSIX/RFC1766 Locale IDs, + * the getLanguage/getCountry/getVariant/getName functions do understand + * the POSIX type form of language_COUNTRY.ENCODING\@VARIANT + * and if there is not an ICU-stype variant, uloc_getVariant() for example + * will return the one listed after the \@at sign. As well, the hyphen + * "-" is recognized as a country/variant separator similarly to RFC1766. + * So for example, "en-us" will be interpreted as en_US. + * As a result, uloc_getName() is far from a no-op, and will have the + * effect of converting POSIX/RFC1766 IDs into ICU form, although it does + * NOT map any of the actual codes (i.e. russian->ru) in any way. + * Applications should call uloc_getName() at the point where a locale ID + * is coming from an external source (user entry, OS, web browser) + * and pass the resulting string to other ICU functions. For example, + * don't use de-de\@EURO as an argument to resourcebundle. + * + * @see UResourceBundle + */ + +/** Useful constant for this language. @stable ICU 2.0 */ +#define ULOC_CHINESE "zh" +/** Useful constant for this language. @stable ICU 2.0 */ +#define ULOC_ENGLISH "en" +/** Useful constant for this language. @stable ICU 2.0 */ +#define ULOC_FRENCH "fr" +/** Useful constant for this language. @stable ICU 2.0 */ +#define ULOC_GERMAN "de" +/** Useful constant for this language. @stable ICU 2.0 */ +#define ULOC_ITALIAN "it" +/** Useful constant for this language. @stable ICU 2.0 */ +#define ULOC_JAPANESE "ja" +/** Useful constant for this language. @stable ICU 2.0 */ +#define ULOC_KOREAN "ko" +/** Useful constant for this language. @stable ICU 2.0 */ +#define ULOC_SIMPLIFIED_CHINESE "zh_CN" +/** Useful constant for this language. @stable ICU 2.0 */ +#define ULOC_TRADITIONAL_CHINESE "zh_TW" + +/** Useful constant for this country/region. @stable ICU 2.0 */ +#define ULOC_CANADA "en_CA" +/** Useful constant for this country/region. @stable ICU 2.0 */ +#define ULOC_CANADA_FRENCH "fr_CA" +/** Useful constant for this country/region. @stable ICU 2.0 */ +#define ULOC_CHINA "zh_CN" +/** Useful constant for this country/region. @stable ICU 2.0 */ +#define ULOC_PRC "zh_CN" +/** Useful constant for this country/region. @stable ICU 2.0 */ +#define ULOC_FRANCE "fr_FR" +/** Useful constant for this country/region. @stable ICU 2.0 */ +#define ULOC_GERMANY "de_DE" +/** Useful constant for this country/region. @stable ICU 2.0 */ +#define ULOC_ITALY "it_IT" +/** Useful constant for this country/region. @stable ICU 2.0 */ +#define ULOC_JAPAN "ja_JP" +/** Useful constant for this country/region. @stable ICU 2.0 */ +#define ULOC_KOREA "ko_KR" +/** Useful constant for this country/region. @stable ICU 2.0 */ +#define ULOC_TAIWAN "zh_TW" +/** Useful constant for this country/region. @stable ICU 2.0 */ +#define ULOC_UK "en_GB" +/** Useful constant for this country/region. @stable ICU 2.0 */ +#define ULOC_US "en_US" + +/** + * Useful constant for the maximum size of the language part of a locale ID. + * (including the terminating NULL). + * @stable ICU 2.0 + */ +#define ULOC_LANG_CAPACITY 12 + +/** + * Useful constant for the maximum size of the country part of a locale ID + * (including the terminating NULL). + * @stable ICU 2.0 + */ +#define ULOC_COUNTRY_CAPACITY 4 +/** + * Useful constant for the maximum size of the whole locale ID + * (including the terminating NULL and all keywords). + * @stable ICU 2.0 + */ +#define ULOC_FULLNAME_CAPACITY 157 + +/** + * Useful constant for the maximum size of the script part of a locale ID + * (including the terminating NULL). + * @stable ICU 2.8 + */ +#define ULOC_SCRIPT_CAPACITY 6 + +/** + * Useful constant for the maximum size of keywords in a locale + * @stable ICU 2.8 + */ +#define ULOC_KEYWORDS_CAPACITY 96 + +/** + * Useful constant for the maximum total size of keywords and their values in a locale + * @stable ICU 2.8 + */ +#define ULOC_KEYWORD_AND_VALUES_CAPACITY 100 + +/** + * Invariant character separating keywords from the locale string + * @stable ICU 2.8 + */ +#define ULOC_KEYWORD_SEPARATOR '@' + +/** + * Unicode code point for '@' separating keywords from the locale string. + * @see ULOC_KEYWORD_SEPARATOR + * @stable ICU 4.6 + */ +#define ULOC_KEYWORD_SEPARATOR_UNICODE 0x40 + +/** + * Invariant character for assigning value to a keyword + * @stable ICU 2.8 + */ +#define ULOC_KEYWORD_ASSIGN '=' + +/** + * Unicode code point for '=' for assigning value to a keyword. + * @see ULOC_KEYWORD_ASSIGN + * @stable ICU 4.6 + */ +#define ULOC_KEYWORD_ASSIGN_UNICODE 0x3D + +/** + * Invariant character separating keywords + * @stable ICU 2.8 + */ +#define ULOC_KEYWORD_ITEM_SEPARATOR ';' + +/** + * Unicode code point for ';' separating keywords + * @see ULOC_KEYWORD_ITEM_SEPARATOR + * @stable ICU 4.6 + */ +#define ULOC_KEYWORD_ITEM_SEPARATOR_UNICODE 0x3B + +/** + * Constants for *_getLocale() + * Allow user to select whether she wants information on + * requested, valid or actual locale. + * For example, a collator for "en_US_CALIFORNIA" was + * requested. In the current state of ICU (2.0), + * the requested locale is "en_US_CALIFORNIA", + * the valid locale is "en_US" (most specific locale supported by ICU) + * and the actual locale is "root" (the collation data comes unmodified + * from the UCA) + * The locale is considered supported by ICU if there is a core ICU bundle + * for that locale (although it may be empty). + * @stable ICU 2.1 + */ +typedef enum { + /** This is locale the data actually comes from + * @stable ICU 2.1 + */ + ULOC_ACTUAL_LOCALE = 0, + /** This is the most specific locale supported by ICU + * @stable ICU 2.1 + */ + ULOC_VALID_LOCALE = 1, + +#ifndef U_HIDE_DEPRECATED_API + /** This is the requested locale + * @deprecated ICU 2.8 + */ + ULOC_REQUESTED_LOCALE = 2, + + /** + * One more than the highest normal ULocDataLocaleType value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + ULOC_DATA_LOCALE_TYPE_LIMIT = 3 +#endif // U_HIDE_DEPRECATED_API +} ULocDataLocaleType; + +#ifndef U_HIDE_SYSTEM_API +/** + * Gets ICU's default locale. + * The returned string is a snapshot in time, and will remain valid + * and unchanged even when uloc_setDefault() is called. + * The returned storage is owned by ICU, and must not be altered or deleted + * by the caller. + * + * @return the ICU default locale + * @system + * @stable ICU 2.0 + */ +U_STABLE const char* U_EXPORT2 +uloc_getDefault(void); + +/** + * Sets ICU's default locale. + * By default (without calling this function), ICU's default locale will be based + * on information obtained from the underlying system environment. + * <p> + * Changes to ICU's default locale do not propagate back to the + * system environment. + * <p> + * Changes to ICU's default locale to not affect any ICU services that + * may already be open based on the previous default locale value. + * + * @param localeID the new ICU default locale. A value of NULL will try to get + * the system's default locale. + * @param status the error information if the setting of default locale fails + * @system + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +uloc_setDefault(const char* localeID, + UErrorCode* status); +#endif /* U_HIDE_SYSTEM_API */ + +/** + * Gets the language code for the specified locale. + * + * @param localeID the locale to get the ISO language code with + * @param language the language code for localeID + * @param languageCapacity the size of the language buffer to store the + * language code with + * @param err error information if retrieving the language code failed + * @return the actual buffer size needed for the language code. If it's greater + * than languageCapacity, the returned language code will be truncated. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +uloc_getLanguage(const char* localeID, + char* language, + int32_t languageCapacity, + UErrorCode* err); + +/** + * Gets the script code for the specified locale. + * + * @param localeID the locale to get the ISO language code with + * @param script the language code for localeID + * @param scriptCapacity the size of the language buffer to store the + * language code with + * @param err error information if retrieving the language code failed + * @return the actual buffer size needed for the language code. If it's greater + * than scriptCapacity, the returned language code will be truncated. + * @stable ICU 2.8 + */ +U_STABLE int32_t U_EXPORT2 +uloc_getScript(const char* localeID, + char* script, + int32_t scriptCapacity, + UErrorCode* err); + +/** + * Gets the country code for the specified locale. + * + * @param localeID the locale to get the country code with + * @param country the country code for localeID + * @param countryCapacity the size of the country buffer to store the + * country code with + * @param err error information if retrieving the country code failed + * @return the actual buffer size needed for the country code. If it's greater + * than countryCapacity, the returned country code will be truncated. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +uloc_getCountry(const char* localeID, + char* country, + int32_t countryCapacity, + UErrorCode* err); + +/** + * Gets the variant code for the specified locale. + * + * @param localeID the locale to get the variant code with + * @param variant the variant code for localeID + * @param variantCapacity the size of the variant buffer to store the + * variant code with + * @param err error information if retrieving the variant code failed + * @return the actual buffer size needed for the variant code. If it's greater + * than variantCapacity, the returned variant code will be truncated. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +uloc_getVariant(const char* localeID, + char* variant, + int32_t variantCapacity, + UErrorCode* err); + + +/** + * Gets the full name for the specified locale. + * Note: This has the effect of 'canonicalizing' the ICU locale ID to + * a certain extent. Upper and lower case are set as needed. + * It does NOT map aliased names in any way. + * See the top of this header file. + * This API supports preflighting. + * + * @param localeID the locale to get the full name with + * @param name fill in buffer for the name without keywords. + * @param nameCapacity capacity of the fill in buffer. + * @param err error information if retrieving the full name failed + * @return the actual buffer size needed for the full name. If it's greater + * than nameCapacity, the returned full name will be truncated. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +uloc_getName(const char* localeID, + char* name, + int32_t nameCapacity, + UErrorCode* err); + +/** + * Gets the full name for the specified locale. + * Note: This has the effect of 'canonicalizing' the string to + * a certain extent. Upper and lower case are set as needed, + * and if the components were in 'POSIX' format they are changed to + * ICU format. It does NOT map aliased names in any way. + * See the top of this header file. + * + * @param localeID the locale to get the full name with + * @param name the full name for localeID + * @param nameCapacity the size of the name buffer to store the + * full name with + * @param err error information if retrieving the full name failed + * @return the actual buffer size needed for the full name. If it's greater + * than nameCapacity, the returned full name will be truncated. + * @stable ICU 2.8 + */ +U_STABLE int32_t U_EXPORT2 +uloc_canonicalize(const char* localeID, + char* name, + int32_t nameCapacity, + UErrorCode* err); + +/** + * Gets the ISO language code for the specified locale. + * + * @param localeID the locale to get the ISO language code with + * @return language the ISO language code for localeID + * @stable ICU 2.0 + */ +U_STABLE const char* U_EXPORT2 +uloc_getISO3Language(const char* localeID); + + +/** + * Gets the ISO country code for the specified locale. + * + * @param localeID the locale to get the ISO country code with + * @return country the ISO country code for localeID + * @stable ICU 2.0 + */ +U_STABLE const char* U_EXPORT2 +uloc_getISO3Country(const char* localeID); + +/** + * Gets the Win32 LCID value for the specified locale. + * If the ICU locale is not recognized by Windows, 0 will be returned. + * + * LCIDs were deprecated with Windows Vista and Microsoft recommends + * that developers use BCP47 style tags instead (uloc_toLanguageTag). + * + * @param localeID the locale to get the Win32 LCID value with + * @return country the Win32 LCID for localeID + * @stable ICU 2.0 + */ +U_STABLE uint32_t U_EXPORT2 +uloc_getLCID(const char* localeID); + +/** + * Gets the language name suitable for display for the specified locale. + * + * @param locale the locale to get the ISO language code with + * @param displayLocale Specifies the locale to be used to display the name. In other words, + * if the locale's language code is "en", passing Locale::getFrench() for + * inLocale would result in "Anglais", while passing Locale::getGerman() + * for inLocale would result in "Englisch". + * @param language the displayable language code for localeID + * @param languageCapacity the size of the language buffer to store the + * displayable language code with + * @param status error information if retrieving the displayable language code failed + * @return the actual buffer size needed for the displayable language code. If it's greater + * than languageCapacity, the returned language code will be truncated. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +uloc_getDisplayLanguage(const char* locale, + const char* displayLocale, + UChar* language, + int32_t languageCapacity, + UErrorCode* status); + +/** + * Gets the script name suitable for display for the specified locale. + * + * @param locale the locale to get the displayable script code with. NULL may be used to specify the default. + * @param displayLocale Specifies the locale to be used to display the name. In other words, + * if the locale's language code is "en", passing Locale::getFrench() for + * inLocale would result in "", while passing Locale::getGerman() + * for inLocale would result in "". NULL may be used to specify the default. + * @param script the displayable script for the localeID + * @param scriptCapacity the size of the script buffer to store the + * displayable script code with + * @param status error information if retrieving the displayable script code failed + * @return the actual buffer size needed for the displayable script code. If it's greater + * than scriptCapacity, the returned displayable script code will be truncated. + * @stable ICU 2.8 + */ +U_STABLE int32_t U_EXPORT2 +uloc_getDisplayScript(const char* locale, + const char* displayLocale, + UChar* script, + int32_t scriptCapacity, + UErrorCode* status); + +/** + * Gets the country name suitable for display for the specified locale. + * Warning: this is for the region part of a valid locale ID; it cannot just be the region code (like "FR"). + * To get the display name for a region alone, or for other options, use ULocaleDisplayNames instead. + * + * @param locale the locale to get the displayable country code with. NULL may be used to specify the default. + * @param displayLocale Specifies the locale to be used to display the name. In other words, + * if the locale's language code is "en", passing Locale::getFrench() for + * inLocale would result in "Anglais", while passing Locale::getGerman() + * for inLocale would result in "Englisch". NULL may be used to specify the default. + * @param country the displayable country code for localeID + * @param countryCapacity the size of the country buffer to store the + * displayable country code with + * @param status error information if retrieving the displayable country code failed + * @return the actual buffer size needed for the displayable country code. If it's greater + * than countryCapacity, the returned displayable country code will be truncated. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +uloc_getDisplayCountry(const char* locale, + const char* displayLocale, + UChar* country, + int32_t countryCapacity, + UErrorCode* status); + + +/** + * Gets the variant name suitable for display for the specified locale. + * + * @param locale the locale to get the displayable variant code with. NULL may be used to specify the default. + * @param displayLocale Specifies the locale to be used to display the name. In other words, + * if the locale's language code is "en", passing Locale::getFrench() for + * inLocale would result in "Anglais", while passing Locale::getGerman() + * for inLocale would result in "Englisch". NULL may be used to specify the default. + * @param variant the displayable variant code for localeID + * @param variantCapacity the size of the variant buffer to store the + * displayable variant code with + * @param status error information if retrieving the displayable variant code failed + * @return the actual buffer size needed for the displayable variant code. If it's greater + * than variantCapacity, the returned displayable variant code will be truncated. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +uloc_getDisplayVariant(const char* locale, + const char* displayLocale, + UChar* variant, + int32_t variantCapacity, + UErrorCode* status); + +/** + * Gets the keyword name suitable for display for the specified locale. + * E.g: for the locale string de_DE\@collation=PHONEBOOK, this API gets the display + * string for the keyword collation. + * Usage: + * <code> + * UErrorCode status = U_ZERO_ERROR; + * const char* keyword =NULL; + * int32_t keywordLen = 0; + * int32_t keywordCount = 0; + * UChar displayKeyword[256]; + * int32_t displayKeywordLen = 0; + * UEnumeration* keywordEnum = uloc_openKeywords("de_DE@collation=PHONEBOOK;calendar=TRADITIONAL", &status); + * for(keywordCount = uenum_count(keywordEnum, &status); keywordCount > 0 ; keywordCount--){ + * if(U_FAILURE(status)){ + * ...something went wrong so handle the error... + * break; + * } + * // the uenum_next returns NUL terminated string + * keyword = uenum_next(keywordEnum, &keywordLen, &status); + * displayKeywordLen = uloc_getDisplayKeyword(keyword, "en_US", displayKeyword, 256); + * ... do something interesting ..... + * } + * uenum_close(keywordEnum); + * </code> + * @param keyword The keyword whose display string needs to be returned. + * @param displayLocale Specifies the locale to be used to display the name. In other words, + * if the locale's language code is "en", passing Locale::getFrench() for + * inLocale would result in "Anglais", while passing Locale::getGerman() + * for inLocale would result in "Englisch". NULL may be used to specify the default. + * @param dest the buffer to which the displayable keyword should be written. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param status error information if retrieving the displayable string failed. + * Should not be NULL and should not indicate failure on entry. + * @return the actual buffer size needed for the displayable variant code. + * @see #uloc_openKeywords + * @stable ICU 2.8 + */ +U_STABLE int32_t U_EXPORT2 +uloc_getDisplayKeyword(const char* keyword, + const char* displayLocale, + UChar* dest, + int32_t destCapacity, + UErrorCode* status); +/** + * Gets the value of the keyword suitable for display for the specified locale. + * E.g: for the locale string de_DE\@collation=PHONEBOOK, this API gets the display + * string for PHONEBOOK, in the display locale, when "collation" is specified as the keyword. + * + * @param locale The locale to get the displayable variant code with. NULL may be used to specify the default. + * @param keyword The keyword for whose value should be used. + * @param displayLocale Specifies the locale to be used to display the name. In other words, + * if the locale's language code is "en", passing Locale::getFrench() for + * inLocale would result in "Anglais", while passing Locale::getGerman() + * for inLocale would result in "Englisch". NULL may be used to specify the default. + * @param dest the buffer to which the displayable keyword should be written. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param status error information if retrieving the displayable string failed. + * Should not be NULL and must not indicate failure on entry. + * @return the actual buffer size needed for the displayable variant code. + * @stable ICU 2.8 + */ +U_STABLE int32_t U_EXPORT2 +uloc_getDisplayKeywordValue( const char* locale, + const char* keyword, + const char* displayLocale, + UChar* dest, + int32_t destCapacity, + UErrorCode* status); +/** + * Gets the full name suitable for display for the specified locale. + * + * @param localeID the locale to get the displayable name with. NULL may be used to specify the default. + * @param inLocaleID Specifies the locale to be used to display the name. In other words, + * if the locale's language code is "en", passing Locale::getFrench() for + * inLocale would result in "Anglais", while passing Locale::getGerman() + * for inLocale would result in "Englisch". NULL may be used to specify the default. + * @param result the displayable name for localeID + * @param maxResultSize the size of the name buffer to store the + * displayable full name with + * @param err error information if retrieving the displayable name failed + * @return the actual buffer size needed for the displayable name. If it's greater + * than maxResultSize, the returned displayable name will be truncated. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +uloc_getDisplayName(const char* localeID, + const char* inLocaleID, + UChar* result, + int32_t maxResultSize, + UErrorCode* err); + + +/** + * Gets the specified locale from a list of all available locales. + * The return value is a pointer to an item of + * a locale name array. Both this array and the pointers + * it contains are owned by ICU and should not be deleted or written through + * by the caller. The locale name is terminated by a null pointer. + * @param n the specific locale name index of the available locale list + * @return a specified locale name of all available locales + * @stable ICU 2.0 + */ +U_STABLE const char* U_EXPORT2 +uloc_getAvailable(int32_t n); + +/** + * Gets the size of the all available locale list. + * + * @return the size of the locale list + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 uloc_countAvailable(void); + +/** + * + * Gets a list of all available 2-letter language codes defined in ISO 639, + * plus additional 3-letter codes determined to be useful for locale generation as + * defined by Unicode CLDR. This is a pointer + * to an array of pointers to arrays of char. All of these pointers are owned + * by ICU-- do not delete them, and do not write through them. The array is + * terminated with a null pointer. + * @return a list of all available language codes + * @stable ICU 2.0 + */ +U_STABLE const char* const* U_EXPORT2 +uloc_getISOLanguages(void); + +/** + * + * Gets a list of all available 2-letter country codes defined in ISO 639. This is a + * pointer to an array of pointers to arrays of char. All of these pointers are + * owned by ICU-- do not delete them, and do not write through them. The array is + * terminated with a null pointer. + * @return a list of all available country codes + * @stable ICU 2.0 + */ +U_STABLE const char* const* U_EXPORT2 +uloc_getISOCountries(void); + +/** + * Truncate the locale ID string to get the parent locale ID. + * Copies the part of the string before the last underscore. + * The parent locale ID will be an empty string if there is no + * underscore, or if there is only one underscore at localeID[0]. + * + * @param localeID Input locale ID string. + * @param parent Output string buffer for the parent locale ID. + * @param parentCapacity Size of the output buffer. + * @param err A UErrorCode value. + * @return The length of the parent locale ID. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +uloc_getParent(const char* localeID, + char* parent, + int32_t parentCapacity, + UErrorCode* err); + + + + +/** + * Gets the full name for the specified locale, like uloc_getName(), + * but without keywords. + * + * Note: This has the effect of 'canonicalizing' the string to + * a certain extent. Upper and lower case are set as needed, + * and if the components were in 'POSIX' format they are changed to + * ICU format. It does NOT map aliased names in any way. + * See the top of this header file. + * + * This API strips off the keyword part, so "de_DE\@collation=phonebook" + * will become "de_DE". + * This API supports preflighting. + * + * @param localeID the locale to get the full name with + * @param name fill in buffer for the name without keywords. + * @param nameCapacity capacity of the fill in buffer. + * @param err error information if retrieving the full name failed + * @return the actual buffer size needed for the full name. If it's greater + * than nameCapacity, the returned full name will be truncated. + * @stable ICU 2.8 + */ +U_STABLE int32_t U_EXPORT2 +uloc_getBaseName(const char* localeID, + char* name, + int32_t nameCapacity, + UErrorCode* err); + +/** + * Gets an enumeration of keywords for the specified locale. Enumeration + * must get disposed of by the client using uenum_close function. + * + * @param localeID the locale to get the variant code with + * @param status error information if retrieving the keywords failed + * @return enumeration of keywords or NULL if there are no keywords. + * @stable ICU 2.8 + */ +U_STABLE UEnumeration* U_EXPORT2 +uloc_openKeywords(const char* localeID, + UErrorCode* status); + +/** + * Get the value for a keyword. Locale name does not need to be normalized. + * + * @param localeID locale name containing the keyword ("de_DE@currency=EURO;collation=PHONEBOOK") + * @param keywordName name of the keyword for which we want the value; must not be + * NULL or empty, and must consist only of [A-Za-z0-9]. Case insensitive. + * @param buffer receiving buffer + * @param bufferCapacity capacity of receiving buffer + * @param status containing error code: e.g. buffer not big enough or ill-formed localeID + * or keywordName parameters. + * @return the length of keyword value + * @stable ICU 2.8 + */ +U_STABLE int32_t U_EXPORT2 +uloc_getKeywordValue(const char* localeID, + const char* keywordName, + char* buffer, int32_t bufferCapacity, + UErrorCode* status); + + +/** + * Sets or removes the value of the specified keyword. + * + * For removing all keywords, use uloc_getBaseName(). + * + * NOTE: Unlike almost every other ICU function which takes a + * buffer, this function will NOT truncate the output text, and will + * not update the buffer with unterminated text setting a status of + * U_STRING_NOT_TERMINATED_WARNING. If a BUFFER_OVERFLOW_ERROR is received, + * it means a terminated version of the updated locale ID would not fit + * in the buffer, and the original buffer is untouched. This is done to + * prevent incorrect or possibly even malformed locales from being generated + * and used. + * + * @param keywordName name of the keyword to be set; must not be + * NULL or empty, and must consist only of [A-Za-z0-9]. Case insensitive. + * @param keywordValue value of the keyword to be set. If 0-length or + * NULL, will result in the keyword being removed; no error is given if + * that keyword does not exist. Otherwise, must consist only of + * [A-Za-z0-9] and [/_+-]. + * @param buffer input buffer containing well-formed locale ID to be + * modified. + * @param bufferCapacity capacity of receiving buffer + * @param status containing error code: e.g. buffer not big enough + * or ill-formed keywordName or keywordValue parameters, or ill-formed + * locale ID in buffer on input. + * @return the length needed for the buffer + * @see uloc_getKeywordValue + * @stable ICU 3.2 + */ +U_STABLE int32_t U_EXPORT2 +uloc_setKeywordValue(const char* keywordName, + const char* keywordValue, + char* buffer, int32_t bufferCapacity, + UErrorCode* status); + +/** + * Returns whether the locale's script is written right-to-left. + * If there is no script subtag, then the likely script is used, see uloc_addLikelySubtags(). + * If no likely script is known, then FALSE is returned. + * + * A script is right-to-left according to the CLDR script metadata + * which corresponds to whether the script's letters have Bidi_Class=R or AL. + * + * Returns TRUE for "ar" and "en-Hebr", FALSE for "zh" and "fa-Cyrl". + * + * @param locale input locale ID + * @return TRUE if the locale's script is written right-to-left + * @stable ICU 54 + */ +U_STABLE UBool U_EXPORT2 +uloc_isRightToLeft(const char *locale); + +/** + * enums for the return value for the character and line orientation + * functions. + * @stable ICU 4.0 + */ +typedef enum { + ULOC_LAYOUT_LTR = 0, /* left-to-right. */ + ULOC_LAYOUT_RTL = 1, /* right-to-left. */ + ULOC_LAYOUT_TTB = 2, /* top-to-bottom. */ + ULOC_LAYOUT_BTT = 3, /* bottom-to-top. */ + ULOC_LAYOUT_UNKNOWN +} ULayoutType; + +/** + * Get the layout character orientation for the specified locale. + * + * @param localeId locale name + * @param status Error status + * @return an enum indicating the layout orientation for characters. + * @stable ICU 4.0 + */ +U_STABLE ULayoutType U_EXPORT2 +uloc_getCharacterOrientation(const char* localeId, + UErrorCode *status); + +/** + * Get the layout line orientation for the specified locale. + * + * @param localeId locale name + * @param status Error status + * @return an enum indicating the layout orientation for lines. + * @stable ICU 4.0 + */ +U_STABLE ULayoutType U_EXPORT2 +uloc_getLineOrientation(const char* localeId, + UErrorCode *status); + +/** + * enums for the 'outResult' parameter return value + * @see uloc_acceptLanguageFromHTTP + * @see uloc_acceptLanguage + * @stable ICU 3.2 + */ +typedef enum { + ULOC_ACCEPT_FAILED = 0, /* No exact match was found. */ + ULOC_ACCEPT_VALID = 1, /* An exact match was found. */ + ULOC_ACCEPT_FALLBACK = 2 /* A fallback was found, for example, + Accept list contained 'ja_JP' + which matched available locale 'ja'. */ +} UAcceptResult; + + +/** + * Based on a HTTP header from a web browser and a list of available locales, + * determine an acceptable locale for the user. + * @param result - buffer to accept the result locale + * @param resultAvailable the size of the result buffer. + * @param outResult - An out parameter that contains the fallback status + * @param httpAcceptLanguage - "Accept-Language:" header as per HTTP. + * @param availableLocales - list of available locales to match + * @param status Error status, may be BUFFER_OVERFLOW_ERROR + * @return length needed for the locale. + * @stable ICU 3.2 + */ +U_STABLE int32_t U_EXPORT2 +uloc_acceptLanguageFromHTTP(char *result, int32_t resultAvailable, + UAcceptResult *outResult, + const char *httpAcceptLanguage, + UEnumeration* availableLocales, + UErrorCode *status); + +/** + * Based on a list of available locales, + * determine an acceptable locale for the user. + * @param result - buffer to accept the result locale + * @param resultAvailable the size of the result buffer. + * @param outResult - An out parameter that contains the fallback status + * @param acceptList - list of acceptable languages + * @param acceptListCount - count of acceptList items + * @param availableLocales - list of available locales to match + * @param status Error status, may be BUFFER_OVERFLOW_ERROR + * @return length needed for the locale. + * @stable ICU 3.2 + */ +U_STABLE int32_t U_EXPORT2 +uloc_acceptLanguage(char *result, int32_t resultAvailable, + UAcceptResult *outResult, const char **acceptList, + int32_t acceptListCount, + UEnumeration* availableLocales, + UErrorCode *status); + + +/** + * Gets the ICU locale ID for the specified Win32 LCID value. + * + * @param hostID the Win32 LCID to translate + * @param locale the output buffer for the ICU locale ID, which will be NUL-terminated + * if there is room. + * @param localeCapacity the size of the output buffer + * @param status an error is returned if the LCID is unrecognized or the output buffer + * is too small + * @return actual the actual size of the locale ID, not including NUL-termination + * @stable ICU 3.8 + */ +U_STABLE int32_t U_EXPORT2 +uloc_getLocaleForLCID(uint32_t hostID, char *locale, int32_t localeCapacity, + UErrorCode *status); + + +/** + * Add the likely subtags for a provided locale ID, per the algorithm described + * in the following CLDR technical report: + * + * http://www.unicode.org/reports/tr35/#Likely_Subtags + * + * If localeID is already in the maximal form, or there is no data available + * for maximization, it will be copied to the output buffer. For example, + * "und-Zzzz" cannot be maximized, since there is no reasonable maximization. + * + * Examples: + * + * "en" maximizes to "en_Latn_US" + * + * "de" maximizes to "de_Latn_US" + * + * "sr" maximizes to "sr_Cyrl_RS" + * + * "sh" maximizes to "sr_Latn_RS" (Note this will not reverse.) + * + * "zh_Hani" maximizes to "zh_Hans_CN" (Note this will not reverse.) + * + * @param localeID The locale to maximize + * @param maximizedLocaleID The maximized locale + * @param maximizedLocaleIDCapacity The capacity of the maximizedLocaleID buffer + * @param err Error information if maximizing the locale failed. If the length + * of the localeID and the null-terminator is greater than the maximum allowed size, + * or the localeId is not well-formed, the error code is U_ILLEGAL_ARGUMENT_ERROR. + * @return The actual buffer size needed for the maximized locale. If it's + * greater than maximizedLocaleIDCapacity, the returned ID will be truncated. + * On error, the return value is -1. + * @stable ICU 4.0 + */ +U_STABLE int32_t U_EXPORT2 +uloc_addLikelySubtags(const char* localeID, + char* maximizedLocaleID, + int32_t maximizedLocaleIDCapacity, + UErrorCode* err); + + +/** + * Minimize the subtags for a provided locale ID, per the algorithm described + * in the following CLDR technical report: + * + * http://www.unicode.org/reports/tr35/#Likely_Subtags + * + * If localeID is already in the minimal form, or there is no data available + * for minimization, it will be copied to the output buffer. Since the + * minimization algorithm relies on proper maximization, see the comments + * for uloc_addLikelySubtags for reasons why there might not be any data. + * + * Examples: + * + * "en_Latn_US" minimizes to "en" + * + * "de_Latn_US" minimizes to "de" + * + * "sr_Cyrl_RS" minimizes to "sr" + * + * "zh_Hant_TW" minimizes to "zh_TW" (The region is preferred to the + * script, and minimizing to "zh" would imply "zh_Hans_CN".) + * + * @param localeID The locale to minimize + * @param minimizedLocaleID The minimized locale + * @param minimizedLocaleIDCapacity The capacity of the minimizedLocaleID buffer + * @param err Error information if minimizing the locale failed. If the length + * of the localeID and the null-terminator is greater than the maximum allowed size, + * or the localeId is not well-formed, the error code is U_ILLEGAL_ARGUMENT_ERROR. + * @return The actual buffer size needed for the minimized locale. If it's + * greater than minimizedLocaleIDCapacity, the returned ID will be truncated. + * On error, the return value is -1. + * @stable ICU 4.0 + */ +U_STABLE int32_t U_EXPORT2 +uloc_minimizeSubtags(const char* localeID, + char* minimizedLocaleID, + int32_t minimizedLocaleIDCapacity, + UErrorCode* err); + +/** + * Returns a locale ID for the specified BCP47 language tag string. + * If the specified language tag contains any ill-formed subtags, + * the first such subtag and all following subtags are ignored. + * <p> + * This implements the 'Language-Tag' production of BCP47, and so + * supports grandfathered (regular and irregular) as well as private + * use language tags. Private use tags are represented as 'x-whatever', + * and grandfathered tags are converted to their canonical replacements + * where they exist. Note that a few grandfathered tags have no modern + * replacement, these will be converted using the fallback described in + * the first paragraph, so some information might be lost. + * @param langtag the input BCP47 language tag. + * @param localeID the output buffer receiving a locale ID for the + * specified BCP47 language tag. + * @param localeIDCapacity the size of the locale ID output buffer. + * @param parsedLength if not NULL, successfully parsed length + * for the input language tag is set. + * @param err error information if receiving the locald ID + * failed. + * @return the length of the locale ID. + * @stable ICU 4.2 + */ +U_STABLE int32_t U_EXPORT2 +uloc_forLanguageTag(const char* langtag, + char* localeID, + int32_t localeIDCapacity, + int32_t* parsedLength, + UErrorCode* err); + +/** + * Returns a well-formed language tag for this locale ID. + * <p> + * <b>Note</b>: When <code>strict</code> is FALSE, any locale + * fields which do not satisfy the BCP47 syntax requirement will + * be omitted from the result. When <code>strict</code> is + * TRUE, this function sets U_ILLEGAL_ARGUMENT_ERROR to the + * <code>err</code> if any locale fields do not satisfy the + * BCP47 syntax requirement. + * @param localeID the input locale ID + * @param langtag the output buffer receiving BCP47 language + * tag for the locale ID. + * @param langtagCapacity the size of the BCP47 language tag + * output buffer. + * @param strict boolean value indicating if the function returns + * an error for an ill-formed input locale ID. + * @param err error information if receiving the language + * tag failed. + * @return The length of the BCP47 language tag. + * @stable ICU 4.2 + */ +U_STABLE int32_t U_EXPORT2 +uloc_toLanguageTag(const char* localeID, + char* langtag, + int32_t langtagCapacity, + UBool strict, + UErrorCode* err); + +/** + * Converts the specified keyword (legacy key, or BCP 47 Unicode locale + * extension key) to the equivalent BCP 47 Unicode locale extension key. + * For example, BCP 47 Unicode locale extension key "co" is returned for + * the input keyword "collation". + * <p> + * When the specified keyword is unknown, but satisfies the BCP syntax, + * then the pointer to the input keyword itself will be returned. + * For example, + * <code>uloc_toUnicodeLocaleKey("ZZ")</code> returns "ZZ". + * + * @param keyword the input locale keyword (either legacy key + * such as "collation" or BCP 47 Unicode locale extension + * key such as "co"). + * @return the well-formed BCP 47 Unicode locale extension key, + * or NULL if the specified locale keyword cannot be + * mapped to a well-formed BCP 47 Unicode locale extension + * key. + * @see uloc_toLegacyKey + * @stable ICU 54 + */ +U_STABLE const char* U_EXPORT2 +uloc_toUnicodeLocaleKey(const char* keyword); + +/** + * Converts the specified keyword value (legacy type, or BCP 47 + * Unicode locale extension type) to the well-formed BCP 47 Unicode locale + * extension type for the specified keyword (category). For example, BCP 47 + * Unicode locale extension type "phonebk" is returned for the input + * keyword value "phonebook", with the keyword "collation" (or "co"). + * <p> + * When the specified keyword is not recognized, but the specified value + * satisfies the syntax of the BCP 47 Unicode locale extension type, + * or when the specified keyword allows 'variable' type and the specified + * value satisfies the syntax, then the pointer to the input type value itself + * will be returned. + * For example, + * <code>uloc_toUnicodeLocaleType("Foo", "Bar")</code> returns "Bar", + * <code>uloc_toUnicodeLocaleType("variableTop", "00A4")</code> returns "00A4". + * + * @param keyword the locale keyword (either legacy key such as + * "collation" or BCP 47 Unicode locale extension + * key such as "co"). + * @param value the locale keyword value (either legacy type + * such as "phonebook" or BCP 47 Unicode locale extension + * type such as "phonebk"). + * @return the well-formed BCP47 Unicode locale extension type, + * or NULL if the locale keyword value cannot be mapped to + * a well-formed BCP 47 Unicode locale extension type. + * @see uloc_toLegacyType + * @stable ICU 54 + */ +U_STABLE const char* U_EXPORT2 +uloc_toUnicodeLocaleType(const char* keyword, const char* value); + +/** + * Converts the specified keyword (BCP 47 Unicode locale extension key, or + * legacy key) to the legacy key. For example, legacy key "collation" is + * returned for the input BCP 47 Unicode locale extension key "co". + * + * @param keyword the input locale keyword (either BCP 47 Unicode locale + * extension key or legacy key). + * @return the well-formed legacy key, or NULL if the specified + * keyword cannot be mapped to a well-formed legacy key. + * @see toUnicodeLocaleKey + * @stable ICU 54 + */ +U_STABLE const char* U_EXPORT2 +uloc_toLegacyKey(const char* keyword); + +/** + * Converts the specified keyword value (BCP 47 Unicode locale extension type, + * or legacy type or type alias) to the canonical legacy type. For example, + * the legacy type "phonebook" is returned for the input BCP 47 Unicode + * locale extension type "phonebk" with the keyword "collation" (or "co"). + * <p> + * When the specified keyword is not recognized, but the specified value + * satisfies the syntax of legacy key, or when the specified keyword + * allows 'variable' type and the specified value satisfies the syntax, + * then the pointer to the input type value itself will be returned. + * For example, + * <code>uloc_toLegacyType("Foo", "Bar")</code> returns "Bar", + * <code>uloc_toLegacyType("vt", "00A4")</code> returns "00A4". + * + * @param keyword the locale keyword (either legacy keyword such as + * "collation" or BCP 47 Unicode locale extension + * key such as "co"). + * @param value the locale keyword value (either BCP 47 Unicode locale + * extension type such as "phonebk" or legacy keyword value + * such as "phonebook"). + * @return the well-formed legacy type, or NULL if the specified + * keyword value cannot be mapped to a well-formed legacy + * type. + * @see toUnicodeLocaleType + * @stable ICU 54 + */ +U_STABLE const char* U_EXPORT2 +uloc_toLegacyType(const char* keyword, const char* value); + +#endif /*_ULOC*/ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ulocdata.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ulocdata.h new file mode 100755 index 00000000..de8d8539 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ulocdata.h @@ -0,0 +1,296 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* * +* Copyright (C) 2003-2015, International Business Machines * +* Corporation and others. All Rights Reserved. * +* * +****************************************************************************** +* file name: ulocdata.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2003Oct21 +* created by: Ram Viswanadha +*/ + +#ifndef __ULOCDATA_H__ +#define __ULOCDATA_H__ + +#include "unicode/ures.h" +#include "unicode/uloc.h" +#include "unicode/uset.h" +#include "unicode/localpointer.h" + +/** + * \file + * \brief C API: Provides access to locale data. + */ + +/** Forward declaration of the ULocaleData structure. @stable ICU 3.6 */ +struct ULocaleData; + +/** A locale data object. @stable ICU 3.6 */ +typedef struct ULocaleData ULocaleData; + + + +/** The possible types of exemplar character sets. + * @stable ICU 3.4 + */ +typedef enum ULocaleDataExemplarSetType { + /** Basic set @stable ICU 3.4 */ + ULOCDATA_ES_STANDARD=0, + /** Auxiliary set @stable ICU 3.4 */ + ULOCDATA_ES_AUXILIARY=1, + /** Index Character set @stable ICU 4.8 */ + ULOCDATA_ES_INDEX=2, + /** Punctuation set @stable ICU 51 */ + ULOCDATA_ES_PUNCTUATION=3, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal ULocaleDataExemplarSetType value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + ULOCDATA_ES_COUNT=4 +#endif /* U_HIDE_DEPRECATED_API */ +} ULocaleDataExemplarSetType; + +/** The possible types of delimiters. + * @stable ICU 3.4 + */ +typedef enum ULocaleDataDelimiterType { + /** Quotation start @stable ICU 3.4 */ + ULOCDATA_QUOTATION_START = 0, + /** Quotation end @stable ICU 3.4 */ + ULOCDATA_QUOTATION_END = 1, + /** Alternate quotation start @stable ICU 3.4 */ + ULOCDATA_ALT_QUOTATION_START = 2, + /** Alternate quotation end @stable ICU 3.4 */ + ULOCDATA_ALT_QUOTATION_END = 3, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal ULocaleDataDelimiterType value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + ULOCDATA_DELIMITER_COUNT = 4 +#endif /* U_HIDE_DEPRECATED_API */ +} ULocaleDataDelimiterType; + +/** + * Opens a locale data object for the given locale + * + * @param localeID Specifies the locale associated with this locale + * data object. + * @param status Pointer to error status code. + * @stable ICU 3.4 + */ +U_STABLE ULocaleData* U_EXPORT2 +ulocdata_open(const char *localeID, UErrorCode *status); + +/** + * Closes a locale data object. + * + * @param uld The locale data object to close + * @stable ICU 3.4 + */ +U_STABLE void U_EXPORT2 +ulocdata_close(ULocaleData *uld); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalULocaleDataPointer + * "Smart pointer" class, closes a ULocaleData via ulocdata_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalULocaleDataPointer, ULocaleData, ulocdata_close); + +U_NAMESPACE_END + +#endif + +/** + * Sets the "no Substitute" attribute of the locale data + * object. If true, then any methods associated with the + * locale data object will return null when there is no + * data available for that method, given the locale ID + * supplied to ulocdata_open(). + * + * @param uld The locale data object to set. + * @param setting Value of the "no substitute" attribute. + * @stable ICU 3.4 + */ +U_STABLE void U_EXPORT2 +ulocdata_setNoSubstitute(ULocaleData *uld, UBool setting); + +/** + * Retrieves the current "no Substitute" value of the locale data + * object. If true, then any methods associated with the + * locale data object will return null when there is no + * data available for that method, given the locale ID + * supplied to ulocdata_open(). + * + * @param uld Pointer to the The locale data object to set. + * @return UBool Value of the "no substitute" attribute. + * @stable ICU 3.4 + */ +U_STABLE UBool U_EXPORT2 +ulocdata_getNoSubstitute(ULocaleData *uld); + +/** + * Returns the set of exemplar characters for a locale. + * + * @param uld Pointer to the locale data object from which the + * exemplar character set is to be retrieved. + * @param fillIn Pointer to a USet object to receive the + * exemplar character set for the given locale. Previous + * contents of fillIn are lost. <em>If fillIn is NULL, + * then a new USet is created and returned. The caller + * owns the result and must dispose of it by calling + * uset_close.</em> + * @param options Bitmask for options to apply to the exemplar pattern. + * Specify zero to retrieve the exemplar set as it is + * defined in the locale data. Specify + * USET_CASE_INSENSITIVE to retrieve a case-folded + * exemplar set. See uset_applyPattern for a complete + * list of valid options. The USET_IGNORE_SPACE bit is + * always set, regardless of the value of 'options'. + * @param extype Specifies the type of exemplar set to be retrieved. + * @param status Pointer to an input-output error code value; + * must not be NULL. Will be set to U_MISSING_RESOURCE_ERROR + * if the requested data is not available. + * @return USet* Either fillIn, or if fillIn is NULL, a pointer to + * a newly-allocated USet that the user must close. + * In case of error, NULL is returned. + * @stable ICU 3.4 + */ +U_STABLE USet* U_EXPORT2 +ulocdata_getExemplarSet(ULocaleData *uld, USet *fillIn, + uint32_t options, ULocaleDataExemplarSetType extype, UErrorCode *status); + +/** + * Returns one of the delimiter strings associated with a locale. + * + * @param uld Pointer to the locale data object from which the + * delimiter string is to be retrieved. + * @param type the type of delimiter to be retrieved. + * @param result A pointer to a buffer to receive the result. + * @param resultLength The maximum size of result. + * @param status Pointer to an error code value + * @return int32_t The total buffer size needed; if greater than resultLength, + * the output was truncated. + * @stable ICU 3.4 + */ +U_STABLE int32_t U_EXPORT2 +ulocdata_getDelimiter(ULocaleData *uld, ULocaleDataDelimiterType type, UChar *result, int32_t resultLength, UErrorCode *status); + +/** + * Enumeration for representing the measurement systems. + * @stable ICU 2.8 + */ +typedef enum UMeasurementSystem { + UMS_SI, /**< Measurement system specified by SI otherwise known as Metric system. @stable ICU 2.8 */ + UMS_US, /**< Measurement system followed in the United States of America. @stable ICU 2.8 */ + UMS_UK, /**< Mix of metric and imperial units used in Great Britain. @stable ICU 55 */ +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UMeasurementSystem value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UMS_LIMIT +#endif /* U_HIDE_DEPRECATED_API */ +} UMeasurementSystem; + +/** + * Returns the measurement system used in the locale specified by the localeID. + * Please note that this API will change in ICU 3.6 and will use an ulocdata object. + * + * @param localeID The id of the locale for which the measurement system to be retrieved. + * @param status Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return UMeasurementSystem the measurement system used in the locale. + * @stable ICU 2.8 + */ +U_STABLE UMeasurementSystem U_EXPORT2 +ulocdata_getMeasurementSystem(const char *localeID, UErrorCode *status); + +/** + * Returns the element gives the normal business letter size, and customary units. + * The units for the numbers are always in <em>milli-meters</em>. + * For US since 8.5 and 11 do not yeild an integral value when converted to milli-meters, + * the values are rounded off. + * So for A4 size paper the height and width are 297 mm and 210 mm repectively, + * and for US letter size the height and width are 279 mm and 216 mm respectively. + * Please note that this API will change in ICU 3.6 and will use an ulocdata object. + * + * @param localeID The id of the locale for which the paper size information to be retrieved. + * @param height A pointer to int to recieve the height information. + * @param width A pointer to int to recieve the width information. + * @param status Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @stable ICU 2.8 + */ +U_STABLE void U_EXPORT2 +ulocdata_getPaperSize(const char *localeID, int32_t *height, int32_t *width, UErrorCode *status); + +/** + * Return the current CLDR version used by the library. + * @param versionArray fillin that will recieve the version number + * @param status error code - could be U_MISSING_RESOURCE_ERROR if the version was not found. + * @stable ICU 4.2 + */ +U_STABLE void U_EXPORT2 +ulocdata_getCLDRVersion(UVersionInfo versionArray, UErrorCode *status); + +/** + * Returns locale display pattern associated with a locale. + * + * @param uld Pointer to the locale data object from which the + * exemplar character set is to be retrieved. + * @param pattern locale display pattern for locale. + * @param patternCapacity the size of the buffer to store the locale display + * pattern with. + * @param status Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return the actual buffer size needed for localeDisplayPattern. If it's greater + * than patternCapacity, the returned pattern will be truncated. + * + * @stable ICU 4.2 + */ +U_STABLE int32_t U_EXPORT2 +ulocdata_getLocaleDisplayPattern(ULocaleData *uld, + UChar *pattern, + int32_t patternCapacity, + UErrorCode *status); + + +/** + * Returns locale separator associated with a locale. + * + * @param uld Pointer to the locale data object from which the + * exemplar character set is to be retrieved. + * @param separator locale separator for locale. + * @param separatorCapacity the size of the buffer to store the locale + * separator with. + * @param status Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return the actual buffer size needed for localeSeparator. If it's greater + * than separatorCapacity, the returned separator will be truncated. + * + * @stable ICU 4.2 + */ +U_STABLE int32_t U_EXPORT2 +ulocdata_getLocaleSeparator(ULocaleData *uld, + UChar *separator, + int32_t separatorCapacity, + UErrorCode *status); +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/umachine.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/umachine.h new file mode 100755 index 00000000..2bcaaf40 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/umachine.h @@ -0,0 +1,424 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* +* Copyright (C) 1999-2015, International Business Machines +* Corporation and others. All Rights Reserved. +* +****************************************************************************** +* file name: umachine.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 1999sep13 +* created by: Markus W. Scherer +* +* This file defines basic types and constants for ICU to be +* platform-independent. umachine.h and utf.h are included into +* utypes.h to provide all the general definitions for ICU. +* All of these definitions used to be in utypes.h before +* the UTF-handling macros made this unmaintainable. +*/ + +#ifndef __UMACHINE_H__ +#define __UMACHINE_H__ + + +/** + * \file + * \brief Basic types and constants for UTF + * + * <h2> Basic types and constants for UTF </h2> + * This file defines basic types and constants for utf.h to be + * platform-independent. umachine.h and utf.h are included into + * utypes.h to provide all the general definitions for ICU. + * All of these definitions used to be in utypes.h before + * the UTF-handling macros made this unmaintainable. + * + */ +/*==========================================================================*/ +/* Include platform-dependent definitions */ +/* which are contained in the platform-specific file platform.h */ +/*==========================================================================*/ + +#include "unicode/ptypes.h" /* platform.h is included in ptypes.h */ + +/* + * ANSI C headers: + * stddef.h defines wchar_t + */ +#include <stddef.h> + +/*==========================================================================*/ +/* For C wrappers, we use the symbol U_STABLE. */ +/* This works properly if the includer is C or C++. */ +/* Functions are declared U_STABLE return-type U_EXPORT2 function-name()... */ +/*==========================================================================*/ + +/** + * \def U_CFUNC + * This is used in a declaration of a library private ICU C function. + * @stable ICU 2.4 + */ + +/** + * \def U_CDECL_BEGIN + * This is used to begin a declaration of a library private ICU C API. + * @stable ICU 2.4 + */ + +/** + * \def U_CDECL_END + * This is used to end a declaration of a library private ICU C API + * @stable ICU 2.4 + */ + +#ifdef __cplusplus +# define U_CFUNC extern "C" +# define U_CDECL_BEGIN extern "C" { +# define U_CDECL_END } +#else +# define U_CFUNC extern +# define U_CDECL_BEGIN +# define U_CDECL_END +#endif + +#ifndef U_ATTRIBUTE_DEPRECATED +/** + * \def U_ATTRIBUTE_DEPRECATED + * This is used for GCC specific attributes + * @internal + */ +#if U_GCC_MAJOR_MINOR >= 302 +# define U_ATTRIBUTE_DEPRECATED __attribute__ ((deprecated)) +/** + * \def U_ATTRIBUTE_DEPRECATED + * This is used for Visual C++ specific attributes + * @internal + */ +#elif defined(_MSC_VER) && (_MSC_VER >= 1400) +# define U_ATTRIBUTE_DEPRECATED __declspec(deprecated) +#else +# define U_ATTRIBUTE_DEPRECATED +#endif +#endif + +/** This is used to declare a function as a public ICU C API @stable ICU 2.0*/ +#define U_CAPI U_CFUNC U_EXPORT +/** This is used to declare a function as a stable public ICU C API*/ +#define U_STABLE U_CAPI +/** This is used to declare a function as a draft public ICU C API */ +#define U_DRAFT U_CAPI +/** This is used to declare a function as a deprecated public ICU C API */ +#define U_DEPRECATED U_CAPI U_ATTRIBUTE_DEPRECATED +/** This is used to declare a function as an obsolete public ICU C API */ +#define U_OBSOLETE U_CAPI +/** This is used to declare a function as an internal ICU C API */ +#define U_INTERNAL U_CAPI + +/** + * \def U_OVERRIDE + * Defined to the C++11 "override" keyword if available. + * Denotes a class or member which is an override of the base class. + * May result in an error if it applied to something not an override. + * @internal + */ + +/** + * \def U_FINAL + * Defined to the C++11 "final" keyword if available. + * Denotes a class or member which may not be overridden in subclasses. + * May result in an error if subclasses attempt to override. + * @internal + */ + +#if U_CPLUSPLUS_VERSION >= 11 +/* C++11 */ +#ifndef U_OVERRIDE +#define U_OVERRIDE override +#endif +#ifndef U_FINAL +#define U_FINAL final +#endif +#else +/* not C++11 - define to nothing */ +#ifndef U_OVERRIDE +#define U_OVERRIDE +#endif +#ifndef U_FINAL +#define U_FINAL +#endif +#endif + +/*==========================================================================*/ +/* limits for int32_t etc., like in POSIX inttypes.h */ +/*==========================================================================*/ + +#ifndef INT8_MIN +/** The smallest value an 8 bit signed integer can hold @stable ICU 2.0 */ +# define INT8_MIN ((int8_t)(-128)) +#endif +#ifndef INT16_MIN +/** The smallest value a 16 bit signed integer can hold @stable ICU 2.0 */ +# define INT16_MIN ((int16_t)(-32767-1)) +#endif +#ifndef INT32_MIN +/** The smallest value a 32 bit signed integer can hold @stable ICU 2.0 */ +# define INT32_MIN ((int32_t)(-2147483647-1)) +#endif + +#ifndef INT8_MAX +/** The largest value an 8 bit signed integer can hold @stable ICU 2.0 */ +# define INT8_MAX ((int8_t)(127)) +#endif +#ifndef INT16_MAX +/** The largest value a 16 bit signed integer can hold @stable ICU 2.0 */ +# define INT16_MAX ((int16_t)(32767)) +#endif +#ifndef INT32_MAX +/** The largest value a 32 bit signed integer can hold @stable ICU 2.0 */ +# define INT32_MAX ((int32_t)(2147483647)) +#endif + +#ifndef UINT8_MAX +/** The largest value an 8 bit unsigned integer can hold @stable ICU 2.0 */ +# define UINT8_MAX ((uint8_t)(255U)) +#endif +#ifndef UINT16_MAX +/** The largest value a 16 bit unsigned integer can hold @stable ICU 2.0 */ +# define UINT16_MAX ((uint16_t)(65535U)) +#endif +#ifndef UINT32_MAX +/** The largest value a 32 bit unsigned integer can hold @stable ICU 2.0 */ +# define UINT32_MAX ((uint32_t)(4294967295U)) +#endif + +#if defined(U_INT64_T_UNAVAILABLE) +# error int64_t is required for decimal format and rule-based number format. +#else +# ifndef INT64_C +/** + * Provides a platform independent way to specify a signed 64-bit integer constant. + * note: may be wrong for some 64 bit platforms - ensure your compiler provides INT64_C + * @stable ICU 2.8 + */ +# define INT64_C(c) c ## LL +# endif +# ifndef UINT64_C +/** + * Provides a platform independent way to specify an unsigned 64-bit integer constant. + * note: may be wrong for some 64 bit platforms - ensure your compiler provides UINT64_C + * @stable ICU 2.8 + */ +# define UINT64_C(c) c ## ULL +# endif +# ifndef U_INT64_MIN +/** The smallest value a 64 bit signed integer can hold @stable ICU 2.8 */ +# define U_INT64_MIN ((int64_t)(INT64_C(-9223372036854775807)-1)) +# endif +# ifndef U_INT64_MAX +/** The largest value a 64 bit signed integer can hold @stable ICU 2.8 */ +# define U_INT64_MAX ((int64_t)(INT64_C(9223372036854775807))) +# endif +# ifndef U_UINT64_MAX +/** The largest value a 64 bit unsigned integer can hold @stable ICU 2.8 */ +# define U_UINT64_MAX ((uint64_t)(UINT64_C(18446744073709551615))) +# endif +#endif + +/*==========================================================================*/ +/* Boolean data type */ +/*==========================================================================*/ + +/** The ICU boolean type @stable ICU 2.0 */ +typedef int8_t UBool; + +#ifndef TRUE +/** The TRUE value of a UBool @stable ICU 2.0 */ +# define TRUE 1 +#endif +#ifndef FALSE +/** The FALSE value of a UBool @stable ICU 2.0 */ +# define FALSE 0 +#endif + + +/*==========================================================================*/ +/* Unicode data types */ +/*==========================================================================*/ + +/* wchar_t-related definitions -------------------------------------------- */ + +/* + * \def U_WCHAR_IS_UTF16 + * Defined if wchar_t uses UTF-16. + * + * @stable ICU 2.0 + */ +/* + * \def U_WCHAR_IS_UTF32 + * Defined if wchar_t uses UTF-32. + * + * @stable ICU 2.0 + */ +#if !defined(U_WCHAR_IS_UTF16) && !defined(U_WCHAR_IS_UTF32) +# ifdef __STDC_ISO_10646__ +# if (U_SIZEOF_WCHAR_T==2) +# define U_WCHAR_IS_UTF16 +# elif (U_SIZEOF_WCHAR_T==4) +# define U_WCHAR_IS_UTF32 +# endif +# elif defined __UCS2__ +# if (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400) && (U_SIZEOF_WCHAR_T==2) +# define U_WCHAR_IS_UTF16 +# endif +# elif defined(__UCS4__) || (U_PLATFORM == U_PF_OS400 && defined(__UTF32__)) +# if (U_SIZEOF_WCHAR_T==4) +# define U_WCHAR_IS_UTF32 +# endif +# elif U_PLATFORM_IS_DARWIN_BASED || (U_SIZEOF_WCHAR_T==4 && U_PLATFORM_IS_LINUX_BASED) +# define U_WCHAR_IS_UTF32 +# elif U_PLATFORM_HAS_WIN32_API +# define U_WCHAR_IS_UTF16 +# endif +#endif + +/* UChar and UChar32 definitions -------------------------------------------- */ + +/** Number of bytes in a UChar. @stable ICU 2.0 */ +#define U_SIZEOF_UCHAR 2 + +/** + * \def U_CHAR16_IS_TYPEDEF + * If 1, then char16_t is a typedef and not a real type (yet) + * @internal + */ +#if (U_PLATFORM == U_PF_AIX) && defined(__cplusplus) &&(U_CPLUSPLUS_VERSION < 11) +// for AIX, uchar.h needs to be included +# include <uchar.h> +# define U_CHAR16_IS_TYPEDEF 1 +#elif defined(_MSC_VER) && (_MSC_VER < 1900) +// Versions of Visual Studio/MSVC below 2015 do not support char16_t as a real type, +// and instead use a typedef. https://msdn.microsoft.com/library/bb531344.aspx +# define U_CHAR16_IS_TYPEDEF 1 +#else +# define U_CHAR16_IS_TYPEDEF 0 +#endif + + +/** + * \var UChar + * + * The base type for UTF-16 code units and pointers. + * Unsigned 16-bit integer. + * Starting with ICU 59, C++ API uses char16_t directly, while C API continues to use UChar. + * + * UChar is configurable by defining the macro UCHAR_TYPE + * on the preprocessor or compiler command line: + * -DUCHAR_TYPE=uint16_t or -DUCHAR_TYPE=wchar_t (if U_SIZEOF_WCHAR_T==2) etc. + * (The UCHAR_TYPE can also be #defined earlier in this file, for outside the ICU library code.) + * This is for transitional use from application code that uses uint16_t or wchar_t for UTF-16. + * + * The default is UChar=char16_t. + * + * C++11 defines char16_t as bit-compatible with uint16_t, but as a distinct type. + * + * In C, char16_t is a simple typedef of uint_least16_t. + * ICU requires uint_least16_t=uint16_t for data memory mapping. + * On macOS, char16_t is not available because the uchar.h standard header is missing. + * + * @stable ICU 4.4 + */ + +#if 1 + // #if 1 is normal. UChar defaults to char16_t in C++. + // For configuration testing of UChar=uint16_t temporarily change this to #if 0. + // The intltest Makefile #defines UCHAR_TYPE=char16_t, + // so we only #define it to uint16_t if it is undefined so far. +#elif !defined(UCHAR_TYPE) +# define UCHAR_TYPE uint16_t +#endif + +#if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || \ + defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) + // Inside the ICU library code, never configurable. + typedef char16_t UChar; +#elif defined(UCHAR_TYPE) + typedef UCHAR_TYPE UChar; +#elif defined(__cplusplus) + typedef char16_t UChar; +#else + typedef uint16_t UChar; +#endif + +/** + * \var OldUChar + * Default ICU 58 definition of UChar. + * A base type for UTF-16 code units and pointers. + * Unsigned 16-bit integer. + * + * Define OldUChar to be wchar_t if that is 16 bits wide. + * If wchar_t is not 16 bits wide, then define UChar to be uint16_t. + * + * This makes the definition of OldUChar platform-dependent + * but allows direct string type compatibility with platforms with + * 16-bit wchar_t types. + * + * This is how UChar was defined in ICU 58, for transition convenience. + * Exception: ICU 58 UChar was defined to UCHAR_TYPE if that macro was defined. + * The current UChar responds to UCHAR_TYPE but OldUChar does not. + * + * @stable ICU 59 + */ +#if U_SIZEOF_WCHAR_T==2 + typedef wchar_t OldUChar; +#elif defined(__CHAR16_TYPE__) + typedef __CHAR16_TYPE__ OldUChar; +#else + typedef uint16_t OldUChar; +#endif + +/** + * Define UChar32 as a type for single Unicode code points. + * UChar32 is a signed 32-bit integer (same as int32_t). + * + * The Unicode code point range is 0..0x10ffff. + * All other values (negative or >=0x110000) are illegal as Unicode code points. + * They may be used as sentinel values to indicate "done", "error" + * or similar non-code point conditions. + * + * Before ICU 2.4 (Jitterbug 2146), UChar32 was defined + * to be wchar_t if that is 32 bits wide (wchar_t may be signed or unsigned) + * or else to be uint32_t. + * That is, the definition of UChar32 was platform-dependent. + * + * @see U_SENTINEL + * @stable ICU 2.4 + */ +typedef int32_t UChar32; + +/** + * This value is intended for sentinel values for APIs that + * (take or) return single code points (UChar32). + * It is outside of the Unicode code point range 0..0x10ffff. + * + * For example, a "done" or "error" value in a new API + * could be indicated with U_SENTINEL. + * + * ICU APIs designed before ICU 2.4 usually define service-specific "done" + * values, mostly 0xffff. + * Those may need to be distinguished from + * actual U+ffff text contents by calling functions like + * CharacterIterator::hasNext() or UnicodeString::length(). + * + * @return -1 + * @see UChar32 + * @stable ICU 2.4 + */ +#define U_SENTINEL (-1) + +#include "unicode/urename.h" + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/umisc.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/umisc.h new file mode 100755 index 00000000..213290b9 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/umisc.h @@ -0,0 +1,62 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 1999-2006, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* file name: umisc.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 1999oct15 +* created by: Markus W. Scherer +*/ + +#ifndef UMISC_H +#define UMISC_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C API:misc definitions + * + * This file contains miscellaneous definitions for the C APIs. + */ + +U_CDECL_BEGIN + +/** A struct representing a range of text containing a specific field + * @stable ICU 2.0 + */ +typedef struct UFieldPosition { + /** + * The field + * @stable ICU 2.0 + */ + int32_t field; + /** + * The start of the text range containing field + * @stable ICU 2.0 + */ + int32_t beginIndex; + /** + * The limit of the text range containing field + * @stable ICU 2.0 + */ + int32_t endIndex; +} UFieldPosition; + +#if !UCONFIG_NO_SERVICE +/** + * Opaque type returned by registerInstance, registerFactory and unregister for service registration. + * @stable ICU 2.6 + */ +typedef const void* URegistryKey; +#endif + +U_CDECL_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/umsg.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/umsg.h new file mode 100755 index 00000000..5d235e42 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/umsg.h @@ -0,0 +1,625 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/******************************************************************** + * COPYRIGHT: + * Copyright (c) 1997-2011, International Business Machines Corporation and + * others. All Rights Reserved. + * Copyright (C) 2010 , Yahoo! Inc. + ******************************************************************** + * + * file name: umsg.h + * encoding: UTF-8 + * tab size: 8 (not used) + * indentation:4 + * + * Change history: + * + * 08/5/2001 Ram Added C wrappers for C++ API. + ********************************************************************/ + +#ifndef UMSG_H +#define UMSG_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/localpointer.h" +#include "unicode/uloc.h" +#include "unicode/parseerr.h" +#include <stdarg.h> + +/** + * \file + * \brief C API: MessageFormat + * + * <h2>MessageFormat C API </h2> + * + * <p>MessageFormat prepares strings for display to users, + * with optional arguments (variables/placeholders). + * The arguments can occur in any order, which is necessary for translation + * into languages with different grammars. + * + * <p>The opaque UMessageFormat type is a thin C wrapper around + * a C++ MessageFormat. It is constructed from a <em>pattern</em> string + * with arguments in {curly braces} which will be replaced by formatted values. + * + * <p>Currently, the C API supports only numbered arguments. + * + * <p>For details about the pattern syntax and behavior, + * especially about the ASCII apostrophe vs. the + * real apostrophe (single quote) character \htmlonly’\endhtmlonly (U+2019), + * see the C++ MessageFormat class documentation. + * + * <p>Here are some examples of C API usage: + * Example 1: + * <pre> + * \code + * UChar *result, *tzID, *str; + * UChar pattern[100]; + * int32_t resultLengthOut, resultlength; + * UCalendar *cal; + * UDate d1; + * UDateFormat *def1; + * UErrorCode status = U_ZERO_ERROR; + * + * str=(UChar*)malloc(sizeof(UChar) * (strlen("disturbance in force") +1)); + * u_uastrcpy(str, "disturbance in force"); + * tzID=(UChar*)malloc(sizeof(UChar) * 4); + * u_uastrcpy(tzID, "PST"); + * cal=ucal_open(tzID, u_strlen(tzID), "en_US", UCAL_TRADITIONAL, &status); + * ucal_setDateTime(cal, 1999, UCAL_MARCH, 18, 0, 0, 0, &status); + * d1=ucal_getMillis(cal, &status); + * u_uastrcpy(pattern, "On {0, date, long}, there was a {1} on planet {2,number,integer}"); + * resultlength=0; + * resultLengthOut=u_formatMessage( "en_US", pattern, u_strlen(pattern), NULL, resultlength, &status, d1, str, 7); + * if(status==U_BUFFER_OVERFLOW_ERROR){ + * status=U_ZERO_ERROR; + * resultlength=resultLengthOut+1; + * result=(UChar*)realloc(result, sizeof(UChar) * resultlength); + * u_formatMessage( "en_US", pattern, u_strlen(pattern), result, resultlength, &status, d1, str, 7); + * } + * printf("%s\n", austrdup(result) );//austrdup( a function used to convert UChar* to char*) + * //output>: "On March 18, 1999, there was a disturbance in force on planet 7 + * \endcode + * </pre> + * Typically, the message format will come from resources, and the + * arguments will be dynamically set at runtime. + * <P> + * Example 2: + * <pre> + * \code + * UChar* str; + * UErrorCode status = U_ZERO_ERROR; + * UChar *result; + * UChar pattern[100]; + * int32_t resultlength, resultLengthOut, i; + * double testArgs= { 100.0, 1.0, 0.0}; + * + * str=(UChar*)malloc(sizeof(UChar) * 10); + * u_uastrcpy(str, "MyDisk"); + * u_uastrcpy(pattern, "The disk {1} contains {0,choice,0#no files|1#one file|1<{0,number,integer} files}"); + * for(i=0; i<3; i++){ + * resultlength=0; + * resultLengthOut=u_formatMessage( "en_US", pattern, u_strlen(pattern), NULL, resultlength, &status, testArgs[i], str); + * if(status==U_BUFFER_OVERFLOW_ERROR){ + * status=U_ZERO_ERROR; + * resultlength=resultLengthOut+1; + * result=(UChar*)malloc(sizeof(UChar) * resultlength); + * u_formatMessage( "en_US", pattern, u_strlen(pattern), result, resultlength, &status, testArgs[i], str); + * } + * printf("%s\n", austrdup(result) ); //austrdup( a function used to convert UChar* to char*) + * free(result); + * } + * // output, with different testArgs: + * // output: The disk "MyDisk" contains 100 files. + * // output: The disk "MyDisk" contains one file. + * // output: The disk "MyDisk" contains no files. + * \endcode + * </pre> + * + * + * Example 3: + * <pre> + * \code + * UChar* str; + * UChar* str1; + * UErrorCode status = U_ZERO_ERROR; + * UChar *result; + * UChar pattern[100]; + * UChar expected[100]; + * int32_t resultlength,resultLengthOut; + + * str=(UChar*)malloc(sizeof(UChar) * 25); + * u_uastrcpy(str, "Kirti"); + * str1=(UChar*)malloc(sizeof(UChar) * 25); + * u_uastrcpy(str1, "female"); + * log_verbose("Testing message format with Select test #1\n:"); + * u_uastrcpy(pattern, "{0} est {1, select, female {all\\u00E9e} other {all\\u00E9}} \\u00E0 Paris."); + * u_uastrcpy(expected, "Kirti est all\\u00E9e \\u00E0 Paris."); + * resultlength=0; + * resultLengthOut=u_formatMessage( "fr", pattern, u_strlen(pattern), NULL, resultlength, &status, str , str1); + * if(status==U_BUFFER_OVERFLOW_ERROR) + * { + * status=U_ZERO_ERROR; + * resultlength=resultLengthOut+1; + * result=(UChar*)malloc(sizeof(UChar) * resultlength); + * u_formatMessage( "fr", pattern, u_strlen(pattern), result, resultlength, &status, str , str1); + * if(u_strcmp(result, expected)==0) + * log_verbose("PASS: MessagFormat successful on Select test#1\n"); + * else{ + * log_err("FAIL: Error in MessageFormat on Select test#1\n GOT %s EXPECTED %s\n", austrdup(result), + * austrdup(expected) ); + * } + * free(result); + * } + * \endcode + * </pre> + */ + +/** + * Format a message for a locale. + * This function may perform re-ordering of the arguments depending on the + * locale. For all numeric arguments, double is assumed unless the type is + * explicitly integer. All choice format arguments must be of type double. + * @param locale The locale for which the message will be formatted + * @param pattern The pattern specifying the message's format + * @param patternLength The length of pattern + * @param result A pointer to a buffer to receive the formatted message. + * @param resultLength The maximum size of result. + * @param status A pointer to an UErrorCode to receive any errors + * @param ... A variable-length argument list containing the arguments specified + * in pattern. + * @return The total buffer size needed; if greater than resultLength, the + * output was truncated. + * @see u_parseMessage + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_formatMessage(const char *locale, + const UChar *pattern, + int32_t patternLength, + UChar *result, + int32_t resultLength, + UErrorCode *status, + ...); + +/** + * Format a message for a locale. + * This function may perform re-ordering of the arguments depending on the + * locale. For all numeric arguments, double is assumed unless the type is + * explicitly integer. All choice format arguments must be of type double. + * @param locale The locale for which the message will be formatted + * @param pattern The pattern specifying the message's format + * @param patternLength The length of pattern + * @param result A pointer to a buffer to receive the formatted message. + * @param resultLength The maximum size of result. + * @param ap A variable-length argument list containing the arguments specified + * @param status A pointer to an UErrorCode to receive any errors + * in pattern. + * @return The total buffer size needed; if greater than resultLength, the + * output was truncated. + * @see u_parseMessage + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_vformatMessage( const char *locale, + const UChar *pattern, + int32_t patternLength, + UChar *result, + int32_t resultLength, + va_list ap, + UErrorCode *status); + +/** + * Parse a message. + * For numeric arguments, this function will always use doubles. Integer types + * should not be passed. + * This function is not able to parse all output from {@link #u_formatMessage }. + * @param locale The locale for which the message is formatted + * @param pattern The pattern specifying the message's format + * @param patternLength The length of pattern + * @param source The text to parse. + * @param sourceLength The length of source, or -1 if null-terminated. + * @param status A pointer to an UErrorCode to receive any errors + * @param ... A variable-length argument list containing the arguments + * specified in pattern. + * @see u_formatMessage + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +u_parseMessage( const char *locale, + const UChar *pattern, + int32_t patternLength, + const UChar *source, + int32_t sourceLength, + UErrorCode *status, + ...); + +/** + * Parse a message. + * For numeric arguments, this function will always use doubles. Integer types + * should not be passed. + * This function is not able to parse all output from {@link #u_formatMessage }. + * @param locale The locale for which the message is formatted + * @param pattern The pattern specifying the message's format + * @param patternLength The length of pattern + * @param source The text to parse. + * @param sourceLength The length of source, or -1 if null-terminated. + * @param ap A variable-length argument list containing the arguments + * @param status A pointer to an UErrorCode to receive any errors + * specified in pattern. + * @see u_formatMessage + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +u_vparseMessage(const char *locale, + const UChar *pattern, + int32_t patternLength, + const UChar *source, + int32_t sourceLength, + va_list ap, + UErrorCode *status); + +/** + * Format a message for a locale. + * This function may perform re-ordering of the arguments depending on the + * locale. For all numeric arguments, double is assumed unless the type is + * explicitly integer. All choice format arguments must be of type double. + * @param locale The locale for which the message will be formatted + * @param pattern The pattern specifying the message's format + * @param patternLength The length of pattern + * @param result A pointer to a buffer to receive the formatted message. + * @param resultLength The maximum size of result. + * @param status A pointer to an UErrorCode to receive any errors + * @param ... A variable-length argument list containing the arguments specified + * in pattern. + * @param parseError A pointer to UParseError to receive information about errors + * occurred during parsing. + * @return The total buffer size needed; if greater than resultLength, the + * output was truncated. + * @see u_parseMessage + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_formatMessageWithError( const char *locale, + const UChar *pattern, + int32_t patternLength, + UChar *result, + int32_t resultLength, + UParseError *parseError, + UErrorCode *status, + ...); + +/** + * Format a message for a locale. + * This function may perform re-ordering of the arguments depending on the + * locale. For all numeric arguments, double is assumed unless the type is + * explicitly integer. All choice format arguments must be of type double. + * @param locale The locale for which the message will be formatted + * @param pattern The pattern specifying the message's format + * @param patternLength The length of pattern + * @param result A pointer to a buffer to receive the formatted message. + * @param resultLength The maximum size of result. + * @param parseError A pointer to UParseError to receive information about errors + * occurred during parsing. + * @param ap A variable-length argument list containing the arguments specified + * @param status A pointer to an UErrorCode to receive any errors + * in pattern. + * @return The total buffer size needed; if greater than resultLength, the + * output was truncated. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_vformatMessageWithError( const char *locale, + const UChar *pattern, + int32_t patternLength, + UChar *result, + int32_t resultLength, + UParseError* parseError, + va_list ap, + UErrorCode *status); + +/** + * Parse a message. + * For numeric arguments, this function will always use doubles. Integer types + * should not be passed. + * This function is not able to parse all output from {@link #u_formatMessage }. + * @param locale The locale for which the message is formatted + * @param pattern The pattern specifying the message's format + * @param patternLength The length of pattern + * @param source The text to parse. + * @param sourceLength The length of source, or -1 if null-terminated. + * @param parseError A pointer to UParseError to receive information about errors + * occurred during parsing. + * @param status A pointer to an UErrorCode to receive any errors + * @param ... A variable-length argument list containing the arguments + * specified in pattern. + * @see u_formatMessage + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +u_parseMessageWithError(const char *locale, + const UChar *pattern, + int32_t patternLength, + const UChar *source, + int32_t sourceLength, + UParseError *parseError, + UErrorCode *status, + ...); + +/** + * Parse a message. + * For numeric arguments, this function will always use doubles. Integer types + * should not be passed. + * This function is not able to parse all output from {@link #u_formatMessage }. + * @param locale The locale for which the message is formatted + * @param pattern The pattern specifying the message's format + * @param patternLength The length of pattern + * @param source The text to parse. + * @param sourceLength The length of source, or -1 if null-terminated. + * @param ap A variable-length argument list containing the arguments + * @param parseError A pointer to UParseError to receive information about errors + * occurred during parsing. + * @param status A pointer to an UErrorCode to receive any errors + * specified in pattern. + * @see u_formatMessage + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +u_vparseMessageWithError(const char *locale, + const UChar *pattern, + int32_t patternLength, + const UChar *source, + int32_t sourceLength, + va_list ap, + UParseError *parseError, + UErrorCode* status); + +/*----------------------- New experimental API --------------------------- */ +/** + * The message format object + * @stable ICU 2.0 + */ +typedef void* UMessageFormat; + + +/** + * Open a message formatter with given pattern and for the given locale. + * @param pattern A pattern specifying the format to use. + * @param patternLength Length of the pattern to use + * @param locale The locale for which the messages are formatted. + * @param parseError A pointer to UParseError struct to receive any errors + * occured during parsing. Can be NULL. + * @param status A pointer to an UErrorCode to receive any errors. + * @return A pointer to a UMessageFormat to use for formatting + * messages, or 0 if an error occurred. + * @stable ICU 2.0 + */ +U_STABLE UMessageFormat* U_EXPORT2 +umsg_open( const UChar *pattern, + int32_t patternLength, + const char *locale, + UParseError *parseError, + UErrorCode *status); + +/** + * Close a UMessageFormat. + * Once closed, a UMessageFormat may no longer be used. + * @param format The formatter to close. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +umsg_close(UMessageFormat* format); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUMessageFormatPointer + * "Smart pointer" class, closes a UMessageFormat via umsg_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUMessageFormatPointer, UMessageFormat, umsg_close); + +U_NAMESPACE_END + +#endif + +/** + * Open a copy of a UMessageFormat. + * This function performs a deep copy. + * @param fmt The formatter to copy + * @param status A pointer to an UErrorCode to receive any errors. + * @return A pointer to a UDateFormat identical to fmt. + * @stable ICU 2.0 + */ +U_STABLE UMessageFormat U_EXPORT2 +umsg_clone(const UMessageFormat *fmt, + UErrorCode *status); + +/** + * Sets the locale. This locale is used for fetching default number or date + * format information. + * @param fmt The formatter to set + * @param locale The locale the formatter should use. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +umsg_setLocale(UMessageFormat *fmt, + const char* locale); + +/** + * Gets the locale. This locale is used for fetching default number or date + * format information. + * @param fmt The formatter to querry + * @return the locale. + * @stable ICU 2.0 + */ +U_STABLE const char* U_EXPORT2 +umsg_getLocale(const UMessageFormat *fmt); + +/** + * Sets the pattern. + * @param fmt The formatter to use + * @param pattern The pattern to be applied. + * @param patternLength Length of the pattern to use + * @param parseError Struct to receive information on position + * of error if an error is encountered.Can be NULL. + * @param status Output param set to success/failure code on + * exit. If the pattern is invalid, this will be + * set to a failure result. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +umsg_applyPattern( UMessageFormat *fmt, + const UChar* pattern, + int32_t patternLength, + UParseError* parseError, + UErrorCode* status); + +/** + * Gets the pattern. + * @param fmt The formatter to use + * @param result A pointer to a buffer to receive the pattern. + * @param resultLength The maximum size of result. + * @param status Output param set to success/failure code on + * exit. If the pattern is invalid, this will be + * set to a failure result. + * @return the pattern of the format + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +umsg_toPattern(const UMessageFormat *fmt, + UChar* result, + int32_t resultLength, + UErrorCode* status); + +/** + * Format a message for a locale. + * This function may perform re-ordering of the arguments depending on the + * locale. For all numeric arguments, double is assumed unless the type is + * explicitly integer. All choice format arguments must be of type double. + * @param fmt The formatter to use + * @param result A pointer to a buffer to receive the formatted message. + * @param resultLength The maximum size of result. + * @param status A pointer to an UErrorCode to receive any errors + * @param ... A variable-length argument list containing the arguments + * specified in pattern. + * @return The total buffer size needed; if greater than resultLength, + * the output was truncated. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +umsg_format( const UMessageFormat *fmt, + UChar *result, + int32_t resultLength, + UErrorCode *status, + ...); + +/** + * Format a message for a locale. + * This function may perform re-ordering of the arguments depending on the + * locale. For all numeric arguments, double is assumed unless the type is + * explicitly integer. All choice format arguments must be of type double. + * @param fmt The formatter to use + * @param result A pointer to a buffer to receive the formatted message. + * @param resultLength The maximum size of result. + * @param ap A variable-length argument list containing the arguments + * @param status A pointer to an UErrorCode to receive any errors + * specified in pattern. + * @return The total buffer size needed; if greater than resultLength, + * the output was truncated. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +umsg_vformat( const UMessageFormat *fmt, + UChar *result, + int32_t resultLength, + va_list ap, + UErrorCode *status); + +/** + * Parse a message. + * For numeric arguments, this function will always use doubles. Integer types + * should not be passed. + * This function is not able to parse all output from {@link #umsg_format }. + * @param fmt The formatter to use + * @param source The text to parse. + * @param sourceLength The length of source, or -1 if null-terminated. + * @param count Output param to receive number of elements returned. + * @param status A pointer to an UErrorCode to receive any errors + * @param ... A variable-length argument list containing the arguments + * specified in pattern. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +umsg_parse( const UMessageFormat *fmt, + const UChar *source, + int32_t sourceLength, + int32_t *count, + UErrorCode *status, + ...); + +/** + * Parse a message. + * For numeric arguments, this function will always use doubles. Integer types + * should not be passed. + * This function is not able to parse all output from {@link #umsg_format }. + * @param fmt The formatter to use + * @param source The text to parse. + * @param sourceLength The length of source, or -1 if null-terminated. + * @param count Output param to receive number of elements returned. + * @param ap A variable-length argument list containing the arguments + * @param status A pointer to an UErrorCode to receive any errors + * specified in pattern. + * @see u_formatMessage + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +umsg_vparse(const UMessageFormat *fmt, + const UChar *source, + int32_t sourceLength, + int32_t *count, + va_list ap, + UErrorCode *status); + + +/** + * Convert an 'apostrophe-friendly' pattern into a standard + * pattern. Standard patterns treat all apostrophes as + * quotes, which is problematic in some languages, e.g. + * French, where apostrophe is commonly used. This utility + * assumes that only an unpaired apostrophe immediately before + * a brace is a true quote. Other unpaired apostrophes are paired, + * and the resulting standard pattern string is returned. + * + * <p><b>Note</b> it is not guaranteed that the returned pattern + * is indeed a valid pattern. The only effect is to convert + * between patterns having different quoting semantics. + * + * @param pattern the 'apostrophe-friendly' patttern to convert + * @param patternLength the length of pattern, or -1 if unknown and pattern is null-terminated + * @param dest the buffer for the result, or NULL if preflight only + * @param destCapacity the length of the buffer, or 0 if preflighting + * @param ec the error code + * @return the length of the resulting text, not including trailing null + * if buffer has room for the trailing null, it is provided, otherwise + * not + * @stable ICU 3.4 + */ +U_STABLE int32_t U_EXPORT2 +umsg_autoQuoteApostrophe(const UChar* pattern, + int32_t patternLength, + UChar* dest, + int32_t destCapacity, + UErrorCode* ec); + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unifilt.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unifilt.h new file mode 100755 index 00000000..e1052715 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unifilt.h @@ -0,0 +1,122 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 1999-2010, International Business Machines Corporation and others. +* All Rights Reserved. +********************************************************************** +* Date Name Description +* 11/17/99 aliu Creation. +********************************************************************** +*/ +#ifndef UNIFILT_H +#define UNIFILT_H + +#include "unicode/unifunct.h" +#include "unicode/unimatch.h" + +/** + * \file + * \brief C++ API: Unicode Filter + */ + +U_NAMESPACE_BEGIN + +/** + * U_ETHER is used to represent character values for positions outside + * a range. For example, transliterator uses this to represent + * characters outside the range contextStart..contextLimit-1. This + * allows explicit matching by rules and UnicodeSets of text outside a + * defined range. + * @stable ICU 3.0 + */ +#define U_ETHER ((char16_t)0xFFFF) + +/** + * + * <code>UnicodeFilter</code> defines a protocol for selecting a + * subset of the full range (U+0000 to U+10FFFF) of Unicode characters. + * Currently, filters are used in conjunction with classes like {@link + * Transliterator} to only process selected characters through a + * transformation. + * + * <p>Note: UnicodeFilter currently stubs out two pure virtual methods + * of its base class, UnicodeMatcher. These methods are toPattern() + * and matchesIndexValue(). This is done so that filter classes that + * are not actually used as matchers -- specifically, those in the + * UnicodeFilterLogic component, and those in tests -- can continue to + * work without defining these methods. As long as a filter is not + * used in an RBT during real transliteration, these methods will not + * be called. However, this breaks the UnicodeMatcher base class + * protocol, and it is not a correct solution. + * + * <p>In the future we may revisit the UnicodeMatcher / UnicodeFilter + * hierarchy and either redesign it, or simply remove the stubs in + * UnicodeFilter and force subclasses to implement the full + * UnicodeMatcher protocol. + * + * @see UnicodeFilterLogic + * @stable ICU 2.0 + */ +class U_COMMON_API UnicodeFilter : public UnicodeFunctor, public UnicodeMatcher { + +public: + /** + * Destructor + * @stable ICU 2.0 + */ + virtual ~UnicodeFilter(); + + /** + * Returns <tt>true</tt> for characters that are in the selected + * subset. In other words, if a character is <b>to be + * filtered</b>, then <tt>contains()</tt> returns + * <b><tt>false</tt></b>. + * @stable ICU 2.0 + */ + virtual UBool contains(UChar32 c) const = 0; + + /** + * UnicodeFunctor API. Cast 'this' to a UnicodeMatcher* pointer + * and return the pointer. + * @stable ICU 2.4 + */ + virtual UnicodeMatcher* toMatcher() const; + + /** + * Implement UnicodeMatcher API. + * @stable ICU 2.4 + */ + virtual UMatchDegree matches(const Replaceable& text, + int32_t& offset, + int32_t limit, + UBool incremental); + + /** + * UnicodeFunctor API. Nothing to do. + * @stable ICU 2.4 + */ + virtual void setData(const TransliterationRuleData*); + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.2 + */ + static UClassID U_EXPORT2 getStaticClassID(); + +protected: + + /* + * Since this class has pure virtual functions, + * a constructor can't be used. + * @stable ICU 2.0 + */ +/* UnicodeFilter();*/ +}; + +/*inline UnicodeFilter::UnicodeFilter() {}*/ + +U_NAMESPACE_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unifunct.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unifunct.h new file mode 100755 index 00000000..1c507596 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unifunct.h @@ -0,0 +1,127 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (c) 2002-2005, International Business Machines Corporation +* and others. All Rights Reserved. +********************************************************************** +* Date Name Description +* 01/14/2002 aliu Creation. +********************************************************************** +*/ +#ifndef UNIFUNCT_H +#define UNIFUNCT_H + +#include "unicode/utypes.h" +#include "unicode/uobject.h" + +/** + * \file + * \brief C++ API: Unicode Functor + */ + +U_NAMESPACE_BEGIN + +class UnicodeMatcher; +class UnicodeReplacer; +class TransliterationRuleData; + +/** + * <code>UnicodeFunctor</code> is an abstract base class for objects + * that perform match and/or replace operations on Unicode strings. + * @author Alan Liu + * @stable ICU 2.4 + */ +class U_COMMON_API UnicodeFunctor : public UObject { + +public: + + /** + * Destructor + * @stable ICU 2.4 + */ + virtual ~UnicodeFunctor(); + + /** + * Return a copy of this object. All UnicodeFunctor objects + * have to support cloning in order to allow classes using + * UnicodeFunctor to implement cloning. + * @stable ICU 2.4 + */ + virtual UnicodeFunctor* clone() const = 0; + + /** + * Cast 'this' to a UnicodeMatcher* pointer and return the + * pointer, or null if this is not a UnicodeMatcher*. Subclasses + * that mix in UnicodeMatcher as a base class must override this. + * This protocol is required because a pointer to a UnicodeFunctor + * cannot be cast to a pointer to a UnicodeMatcher, since + * UnicodeMatcher is a mixin that does not derive from + * UnicodeFunctor. + * @stable ICU 2.4 + */ + virtual UnicodeMatcher* toMatcher() const; + + /** + * Cast 'this' to a UnicodeReplacer* pointer and return the + * pointer, or null if this is not a UnicodeReplacer*. Subclasses + * that mix in UnicodeReplacer as a base class must override this. + * This protocol is required because a pointer to a UnicodeFunctor + * cannot be cast to a pointer to a UnicodeReplacer, since + * UnicodeReplacer is a mixin that does not derive from + * UnicodeFunctor. + * @stable ICU 2.4 + */ + virtual UnicodeReplacer* toReplacer() const; + + /** + * Return the class ID for this class. This is useful only for + * comparing to a return value from getDynamicClassID(). + * @return The class ID for all objects of this class. + * @stable ICU 2.0 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID <b>polymorphically</b>. This method + * is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and + * clone() methods call this method. + * + * <p>Concrete subclasses of UnicodeFunctor should use the macro + * UOBJECT_DEFINE_RTTI_IMPLEMENTATION from uobject.h to + * provide definitios getStaticClassID and getDynamicClassID. + * + * @return The class ID for this object. All objects of a given + * class have the same class ID. Objects of other classes have + * different class IDs. + * @stable ICU 2.4 + */ + virtual UClassID getDynamicClassID(void) const = 0; + + /** + * Set the data object associated with this functor. The data + * object provides context for functor-to-standin mapping. This + * method is required when assigning a functor to a different data + * object. This function MAY GO AWAY later if the architecture is + * changed to pass data object pointers through the API. + * @internal ICU 2.1 + */ + virtual void setData(const TransliterationRuleData*) = 0; + +protected: + + /** + * Since this class has pure virtual functions, + * a constructor can't be used. + * @stable ICU 2.0 + */ + /*UnicodeFunctor();*/ + +}; + +/*inline UnicodeFunctor::UnicodeFunctor() {}*/ + +U_NAMESPACE_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unimatch.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unimatch.h new file mode 100755 index 00000000..ee4326f9 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unimatch.h @@ -0,0 +1,165 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +* Copyright (C) 2001-2005, International Business Machines Corporation and others. All Rights Reserved. +********************************************************************** +* Date Name Description +* 07/18/01 aliu Creation. +********************************************************************** +*/ +#ifndef UNIMATCH_H +#define UNIMATCH_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Unicode Matcher + */ + + +U_NAMESPACE_BEGIN + +class Replaceable; +class UnicodeString; +class UnicodeSet; + +/** + * Constants returned by <code>UnicodeMatcher::matches()</code> + * indicating the degree of match. + * @stable ICU 2.4 + */ +enum UMatchDegree { + /** + * Constant returned by <code>matches()</code> indicating a + * mismatch between the text and this matcher. The text contains + * a character which does not match, or the text does not contain + * all desired characters for a non-incremental match. + * @stable ICU 2.4 + */ + U_MISMATCH, + + /** + * Constant returned by <code>matches()</code> indicating a + * partial match between the text and this matcher. This value is + * only returned for incremental match operations. All characters + * of the text match, but more characters are required for a + * complete match. Alternatively, for variable-length matchers, + * all characters of the text match, and if more characters were + * supplied at limit, they might also match. + * @stable ICU 2.4 + */ + U_PARTIAL_MATCH, + + /** + * Constant returned by <code>matches()</code> indicating a + * complete match between the text and this matcher. For an + * incremental variable-length match, this value is returned if + * the given text matches, and it is known that additional + * characters would not alter the extent of the match. + * @stable ICU 2.4 + */ + U_MATCH +}; + +/** + * <code>UnicodeMatcher</code> defines a protocol for objects that can + * match a range of characters in a Replaceable string. + * @stable ICU 2.4 + */ +class U_COMMON_API UnicodeMatcher /* not : public UObject because this is an interface/mixin class */ { + +public: + /** + * Destructor. + * @stable ICU 2.4 + */ + virtual ~UnicodeMatcher(); + + /** + * Return a UMatchDegree value indicating the degree of match for + * the given text at the given offset. Zero, one, or more + * characters may be matched. + * + * Matching in the forward direction is indicated by limit > + * offset. Characters from offset forwards to limit-1 will be + * considered for matching. + * + * Matching in the reverse direction is indicated by limit < + * offset. Characters from offset backwards to limit+1 will be + * considered for matching. + * + * If limit == offset then the only match possible is a zero + * character match (which subclasses may implement if desired). + * + * As a side effect, advance the offset parameter to the limit of + * the matched substring. In the forward direction, this will be + * the index of the last matched character plus one. In the + * reverse direction, this will be the index of the last matched + * character minus one. + * + * <p>Note: This method is not const because some classes may + * modify their state as the result of a match. + * + * @param text the text to be matched + * @param offset on input, the index into text at which to begin + * matching. On output, the limit of the matched text. The + * number of matched characters is the output value of offset + * minus the input value. Offset should always point to the + * HIGH SURROGATE (leading code unit) of a pair of surrogates, + * both on entry and upon return. + * @param limit the limit index of text to be matched. Greater + * than offset for a forward direction match, less than offset for + * a backward direction match. The last character to be + * considered for matching will be text.charAt(limit-1) in the + * forward direction or text.charAt(limit+1) in the backward + * direction. + * @param incremental if TRUE, then assume further characters may + * be inserted at limit and check for partial matching. Otherwise + * assume the text as given is complete. + * @return a match degree value indicating a full match, a partial + * match, or a mismatch. If incremental is FALSE then + * U_PARTIAL_MATCH should never be returned. + * @stable ICU 2.4 + */ + virtual UMatchDegree matches(const Replaceable& text, + int32_t& offset, + int32_t limit, + UBool incremental) = 0; + + /** + * Returns a string representation of this matcher. If the result of + * calling this function is passed to the appropriate parser, it + * will produce another matcher that is equal to this one. + * @param result the string to receive the pattern. Previous + * contents will be deleted. + * @param escapeUnprintable if TRUE then convert unprintable + * character to their hex escape representations, \\uxxxx or + * \\Uxxxxxxxx. Unprintable characters are those other than + * U+000A, U+0020..U+007E. + * @stable ICU 2.4 + */ + virtual UnicodeString& toPattern(UnicodeString& result, + UBool escapeUnprintable = FALSE) const = 0; + + /** + * Returns TRUE if this matcher will match a character c, where c + * & 0xFF == v, at offset, in the forward direction (with limit > + * offset). This is used by <tt>RuleBasedTransliterator</tt> for + * indexing. + * @stable ICU 2.4 + */ + virtual UBool matchesIndexValue(uint8_t v) const = 0; + + /** + * Union the set of all characters that may be matched by this object + * into the given set. + * @param toUnionTo the set into which to union the source characters + * @stable ICU 2.4 + */ + virtual void addMatchSetTo(UnicodeSet& toUnionTo) const = 0; +}; + +U_NAMESPACE_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unirepl.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unirepl.h new file mode 100755 index 00000000..ddcb0ad0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unirepl.h @@ -0,0 +1,99 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (c) 2002-2005, International Business Machines Corporation +* and others. All Rights Reserved. +********************************************************************** +* Date Name Description +* 01/14/2002 aliu Creation. +********************************************************************** +*/ +#ifndef UNIREPL_H +#define UNIREPL_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: UnicodeReplacer + */ + +U_NAMESPACE_BEGIN + +class Replaceable; +class UnicodeString; +class UnicodeSet; + +/** + * <code>UnicodeReplacer</code> defines a protocol for objects that + * replace a range of characters in a Replaceable string with output + * text. The replacement is done via the Replaceable API so as to + * preserve out-of-band data. + * + * <p>This is a mixin class. + * @author Alan Liu + * @stable ICU 2.4 + */ +class U_I18N_API UnicodeReplacer /* not : public UObject because this is an interface/mixin class */ { + + public: + + /** + * Destructor. + * @stable ICU 2.4 + */ + virtual ~UnicodeReplacer(); + + /** + * Replace characters in 'text' from 'start' to 'limit' with the + * output text of this object. Update the 'cursor' parameter to + * give the cursor position and return the length of the + * replacement text. + * + * @param text the text to be matched + * @param start inclusive start index of text to be replaced + * @param limit exclusive end index of text to be replaced; + * must be greater than or equal to start + * @param cursor output parameter for the cursor position. + * Not all replacer objects will update this, but in a complete + * tree of replacer objects, representing the entire output side + * of a transliteration rule, at least one must update it. + * @return the number of 16-bit code units in the text replacing + * the characters at offsets start..(limit-1) in text + * @stable ICU 2.4 + */ + virtual int32_t replace(Replaceable& text, + int32_t start, + int32_t limit, + int32_t& cursor) = 0; + + /** + * Returns a string representation of this replacer. If the + * result of calling this function is passed to the appropriate + * parser, typically TransliteratorParser, it will produce another + * replacer that is equal to this one. + * @param result the string to receive the pattern. Previous + * contents will be deleted. + * @param escapeUnprintable if TRUE then convert unprintable + * character to their hex escape representations, \\uxxxx or + * \\Uxxxxxxxx. Unprintable characters are defined by + * Utility.isUnprintable(). + * @return a reference to 'result'. + * @stable ICU 2.4 + */ + virtual UnicodeString& toReplacerPattern(UnicodeString& result, + UBool escapeUnprintable) const = 0; + + /** + * Union the set of all characters that may output by this object + * into the given set. + * @param toUnionTo the set into which to union the output characters + * @stable ICU 2.4 + */ + virtual void addReplacementSetTo(UnicodeSet& toUnionTo) const = 0; +}; + +U_NAMESPACE_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uniset.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uniset.h new file mode 100755 index 00000000..ed9a3eb7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uniset.h @@ -0,0 +1,1716 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +*************************************************************************** +* Copyright (C) 1999-2016, International Business Machines Corporation +* and others. All Rights Reserved. +*************************************************************************** +* Date Name Description +* 10/20/99 alan Creation. +*************************************************************************** +*/ + +#ifndef UNICODESET_H +#define UNICODESET_H + +#include "unicode/unifilt.h" +#include "unicode/unistr.h" +#include "unicode/uset.h" + +/** + * \file + * \brief C++ API: Unicode Set + */ + +U_NAMESPACE_BEGIN + +// Forward Declarations. +void U_CALLCONV UnicodeSet_initInclusion(int32_t src, UErrorCode &status); /**< @internal */ + +class BMPSet; +class ParsePosition; +class RBBIRuleScanner; +class SymbolTable; +class UnicodeSetStringSpan; +class UVector; +class RuleCharacterIterator; + +/** + * A mutable set of Unicode characters and multicharacter strings. Objects of this class + * represent <em>character classes</em> used in regular expressions. + * A character specifies a subset of Unicode code points. Legal + * code points are U+0000 to U+10FFFF, inclusive. + * + * <p>The UnicodeSet class is not designed to be subclassed. + * + * <p><code>UnicodeSet</code> supports two APIs. The first is the + * <em>operand</em> API that allows the caller to modify the value of + * a <code>UnicodeSet</code> object. It conforms to Java 2's + * <code>java.util.Set</code> interface, although + * <code>UnicodeSet</code> does not actually implement that + * interface. All methods of <code>Set</code> are supported, with the + * modification that they take a character range or single character + * instead of an <code>Object</code>, and they take a + * <code>UnicodeSet</code> instead of a <code>Collection</code>. The + * operand API may be thought of in terms of boolean logic: a boolean + * OR is implemented by <code>add</code>, a boolean AND is implemented + * by <code>retain</code>, a boolean XOR is implemented by + * <code>complement</code> taking an argument, and a boolean NOT is + * implemented by <code>complement</code> with no argument. In terms + * of traditional set theory function names, <code>add</code> is a + * union, <code>retain</code> is an intersection, <code>remove</code> + * is an asymmetric difference, and <code>complement</code> with no + * argument is a set complement with respect to the superset range + * <code>MIN_VALUE-MAX_VALUE</code> + * + * <p>The second API is the + * <code>applyPattern()</code>/<code>toPattern()</code> API from the + * <code>java.text.Format</code>-derived classes. Unlike the + * methods that add characters, add categories, and control the logic + * of the set, the method <code>applyPattern()</code> sets all + * attributes of a <code>UnicodeSet</code> at once, based on a + * string pattern. + * + * <p><b>Pattern syntax</b></p> + * + * Patterns are accepted by the constructors and the + * <code>applyPattern()</code> methods and returned by the + * <code>toPattern()</code> method. These patterns follow a syntax + * similar to that employed by version 8 regular expression character + * classes. Here are some simple examples: + * + * \htmlonly<blockquote>\endhtmlonly + * <table> + * <tr align="top"> + * <td nowrap valign="top" align="left"><code>[]</code></td> + * <td valign="top">No characters</td> + * </tr><tr align="top"> + * <td nowrap valign="top" align="left"><code>[a]</code></td> + * <td valign="top">The character 'a'</td> + * </tr><tr align="top"> + * <td nowrap valign="top" align="left"><code>[ae]</code></td> + * <td valign="top">The characters 'a' and 'e'</td> + * </tr> + * <tr> + * <td nowrap valign="top" align="left"><code>[a-e]</code></td> + * <td valign="top">The characters 'a' through 'e' inclusive, in Unicode code + * point order</td> + * </tr> + * <tr> + * <td nowrap valign="top" align="left"><code>[\\u4E01]</code></td> + * <td valign="top">The character U+4E01</td> + * </tr> + * <tr> + * <td nowrap valign="top" align="left"><code>[a{ab}{ac}]</code></td> + * <td valign="top">The character 'a' and the multicharacter strings "ab" and + * "ac"</td> + * </tr> + * <tr> + * <td nowrap valign="top" align="left"><code>[\\p{Lu}]</code></td> + * <td valign="top">All characters in the general category Uppercase Letter</td> + * </tr> + * </table> + * \htmlonly</blockquote>\endhtmlonly + * + * Any character may be preceded by a backslash in order to remove any special + * meaning. White space characters, as defined by UCharacter.isWhitespace(), are + * ignored, unless they are escaped. + * + * <p>Property patterns specify a set of characters having a certain + * property as defined by the Unicode standard. Both the POSIX-like + * "[:Lu:]" and the Perl-like syntax "\\p{Lu}" are recognized. For a + * complete list of supported property patterns, see the User's Guide + * for UnicodeSet at + * <a href="http://icu-project.org/userguide/unicodeSet.html"> + * http://icu-project.org/userguide/unicodeSet.html</a>. + * Actual determination of property data is defined by the underlying + * Unicode database as implemented by UCharacter. + * + * <p>Patterns specify individual characters, ranges of characters, and + * Unicode property sets. When elements are concatenated, they + * specify their union. To complement a set, place a '^' immediately + * after the opening '['. Property patterns are inverted by modifying + * their delimiters; "[:^foo]" and "\\P{foo}". In any other location, + * '^' has no special meaning. + * + * <p>Ranges are indicated by placing two a '-' between two + * characters, as in "a-z". This specifies the range of all + * characters from the left to the right, in Unicode order. If the + * left character is greater than or equal to the + * right character it is a syntax error. If a '-' occurs as the first + * character after the opening '[' or '[^', or if it occurs as the + * last character before the closing ']', then it is taken as a + * literal. Thus "[a\-b]", "[-ab]", and "[ab-]" all indicate the same + * set of three characters, 'a', 'b', and '-'. + * + * <p>Sets may be intersected using the '&' operator or the asymmetric + * set difference may be taken using the '-' operator, for example, + * "[[:L:]&[\\u0000-\\u0FFF]]" indicates the set of all Unicode letters + * with values less than 4096. Operators ('&' and '|') have equal + * precedence and bind left-to-right. Thus + * "[[:L:]-[a-z]-[\\u0100-\\u01FF]]" is equivalent to + * "[[[:L:]-[a-z]]-[\\u0100-\\u01FF]]". This only really matters for + * difference; intersection is commutative. + * + * <table> + * <tr valign=top><td nowrap><code>[a]</code><td>The set containing 'a' + * <tr valign=top><td nowrap><code>[a-z]</code><td>The set containing 'a' + * through 'z' and all letters in between, in Unicode order + * <tr valign=top><td nowrap><code>[^a-z]</code><td>The set containing + * all characters but 'a' through 'z', + * that is, U+0000 through 'a'-1 and 'z'+1 through U+10FFFF + * <tr valign=top><td nowrap><code>[[<em>pat1</em>][<em>pat2</em>]]</code> + * <td>The union of sets specified by <em>pat1</em> and <em>pat2</em> + * <tr valign=top><td nowrap><code>[[<em>pat1</em>]&[<em>pat2</em>]]</code> + * <td>The intersection of sets specified by <em>pat1</em> and <em>pat2</em> + * <tr valign=top><td nowrap><code>[[<em>pat1</em>]-[<em>pat2</em>]]</code> + * <td>The asymmetric difference of sets specified by <em>pat1</em> and + * <em>pat2</em> + * <tr valign=top><td nowrap><code>[:Lu:] or \\p{Lu}</code> + * <td>The set of characters having the specified + * Unicode property; in + * this case, Unicode uppercase letters + * <tr valign=top><td nowrap><code>[:^Lu:] or \\P{Lu}</code> + * <td>The set of characters <em>not</em> having the given + * Unicode property + * </table> + * + * <p><b>Warning</b>: you cannot add an empty string ("") to a UnicodeSet.</p> + * + * <p><b>Formal syntax</b></p> + * + * \htmlonly<blockquote>\endhtmlonly + * <table> + * <tr align="top"> + * <td nowrap valign="top" align="right"><code>pattern :=  </code></td> + * <td valign="top"><code>('[' '^'? item* ']') | + * property</code></td> + * </tr> + * <tr align="top"> + * <td nowrap valign="top" align="right"><code>item :=  </code></td> + * <td valign="top"><code>char | (char '-' char) | pattern-expr<br> + * </code></td> + * </tr> + * <tr align="top"> + * <td nowrap valign="top" align="right"><code>pattern-expr :=  </code></td> + * <td valign="top"><code>pattern | pattern-expr pattern | + * pattern-expr op pattern<br> + * </code></td> + * </tr> + * <tr align="top"> + * <td nowrap valign="top" align="right"><code>op :=  </code></td> + * <td valign="top"><code>'&' | '-'<br> + * </code></td> + * </tr> + * <tr align="top"> + * <td nowrap valign="top" align="right"><code>special :=  </code></td> + * <td valign="top"><code>'[' | ']' | '-'<br> + * </code></td> + * </tr> + * <tr align="top"> + * <td nowrap valign="top" align="right"><code>char :=  </code></td> + * <td valign="top"><em>any character that is not</em><code> special<br> + * | ('\' </code><em>any character</em><code>)<br> + * | ('\\u' hex hex hex hex)<br> + * </code></td> + * </tr> + * <tr align="top"> + * <td nowrap valign="top" align="right"><code>hex :=  </code></td> + * <td valign="top"><em>any character for which + * </em><code>Character.digit(c, 16)</code><em> + * returns a non-negative result</em></td> + * </tr> + * <tr> + * <td nowrap valign="top" align="right"><code>property :=  </code></td> + * <td valign="top"><em>a Unicode property set pattern</em></td> + * </tr> + * </table> + * <br> + * <table border="1"> + * <tr> + * <td>Legend: <table> + * <tr> + * <td nowrap valign="top"><code>a := b</code></td> + * <td width="20" valign="top">  </td> + * <td valign="top"><code>a</code> may be replaced by <code>b</code> </td> + * </tr> + * <tr> + * <td nowrap valign="top"><code>a?</code></td> + * <td valign="top"></td> + * <td valign="top">zero or one instance of <code>a</code><br> + * </td> + * </tr> + * <tr> + * <td nowrap valign="top"><code>a*</code></td> + * <td valign="top"></td> + * <td valign="top">one or more instances of <code>a</code><br> + * </td> + * </tr> + * <tr> + * <td nowrap valign="top"><code>a | b</code></td> + * <td valign="top"></td> + * <td valign="top">either <code>a</code> or <code>b</code><br> + * </td> + * </tr> + * <tr> + * <td nowrap valign="top"><code>'a'</code></td> + * <td valign="top"></td> + * <td valign="top">the literal string between the quotes </td> + * </tr> + * </table> + * </td> + * </tr> + * </table> + * \htmlonly</blockquote>\endhtmlonly + * + * <p>Note: + * - Most UnicodeSet methods do not take a UErrorCode parameter because + * there are usually very few opportunities for failure other than a shortage + * of memory, error codes in low-level C++ string methods would be inconvenient, + * and the error code as the last parameter (ICU convention) would prevent + * the use of default parameter values. + * Instead, such methods set the UnicodeSet into a "bogus" state + * (see isBogus()) if an error occurs. + * + * @author Alan Liu + * @stable ICU 2.0 + */ +class U_COMMON_API UnicodeSet U_FINAL : public UnicodeFilter { + + int32_t len; // length of list used; 0 <= len <= capacity + int32_t capacity; // capacity of list + UChar32* list; // MUST be terminated with HIGH + BMPSet *bmpSet; // The set is frozen iff either bmpSet or stringSpan is not NULL. + UChar32* buffer; // internal buffer, may be NULL + int32_t bufferCapacity; // capacity of buffer + int32_t patLen; + + /** + * The pattern representation of this set. This may not be the + * most economical pattern. It is the pattern supplied to + * applyPattern(), with variables substituted and whitespace + * removed. For sets constructed without applyPattern(), or + * modified using the non-pattern API, this string will be empty, + * indicating that toPattern() must generate a pattern + * representation from the inversion list. + */ + char16_t *pat; + UVector* strings; // maintained in sorted order + UnicodeSetStringSpan *stringSpan; + +private: + enum { // constants + kIsBogus = 1 // This set is bogus (i.e. not valid) + }; + uint8_t fFlags; // Bit flag (see constants above) +public: + /** + * Determine if this object contains a valid set. + * A bogus set has no value. It is different from an empty set. + * It can be used to indicate that no set value is available. + * + * @return TRUE if the set is bogus/invalid, FALSE otherwise + * @see setToBogus() + * @stable ICU 4.0 + */ + inline UBool isBogus(void) const; + + /** + * Make this UnicodeSet object invalid. + * The string will test TRUE with isBogus(). + * + * A bogus set has no value. It is different from an empty set. + * It can be used to indicate that no set value is available. + * + * This utility function is used throughout the UnicodeSet + * implementation to indicate that a UnicodeSet operation failed, + * and may be used in other functions, + * especially but not exclusively when such functions do not + * take a UErrorCode for simplicity. + * + * @see isBogus() + * @stable ICU 4.0 + */ + void setToBogus(); + +public: + + enum { + /** + * Minimum value that can be stored in a UnicodeSet. + * @stable ICU 2.4 + */ + MIN_VALUE = 0, + + /** + * Maximum value that can be stored in a UnicodeSet. + * @stable ICU 2.4 + */ + MAX_VALUE = 0x10ffff + }; + + //---------------------------------------------------------------- + // Constructors &c + //---------------------------------------------------------------- + +public: + + /** + * Constructs an empty set. + * @stable ICU 2.0 + */ + UnicodeSet(); + + /** + * Constructs a set containing the given range. If <code>end < + * start</code> then an empty set is created. + * + * @param start first character, inclusive, of range + * @param end last character, inclusive, of range + * @stable ICU 2.4 + */ + UnicodeSet(UChar32 start, UChar32 end); + +#ifndef U_HIDE_INTERNAL_API + /** + * @internal + */ + enum ESerialization { + kSerialized /* result of serialize() */ + }; + + /** + * Constructs a set from the output of serialize(). + * + * @param buffer the 16 bit array + * @param bufferLen the original length returned from serialize() + * @param serialization the value 'kSerialized' + * @param status error code + * + * @internal + */ + UnicodeSet(const uint16_t buffer[], int32_t bufferLen, + ESerialization serialization, UErrorCode &status); +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Constructs a set from the given pattern. See the class + * description for the syntax of the pattern language. + * @param pattern a string specifying what characters are in the set + * @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the pattern + * contains a syntax error. + * @stable ICU 2.0 + */ + UnicodeSet(const UnicodeString& pattern, + UErrorCode& status); + +#ifndef U_HIDE_INTERNAL_API + /** + * Constructs a set from the given pattern. See the class + * description for the syntax of the pattern language. + * @param pattern a string specifying what characters are in the set + * @param options bitmask for options to apply to the pattern. + * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE. + * @param symbols a symbol table mapping variable names to values + * and stand-in characters to UnicodeSets; may be NULL + * @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the pattern + * contains a syntax error. + * @internal + */ + UnicodeSet(const UnicodeString& pattern, + uint32_t options, + const SymbolTable* symbols, + UErrorCode& status); +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Constructs a set from the given pattern. See the class description + * for the syntax of the pattern language. + * @param pattern a string specifying what characters are in the set + * @param pos on input, the position in pattern at which to start parsing. + * On output, the position after the last character parsed. + * @param options bitmask for options to apply to the pattern. + * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE. + * @param symbols a symbol table mapping variable names to values + * and stand-in characters to UnicodeSets; may be NULL + * @param status input-output error code + * @stable ICU 2.8 + */ + UnicodeSet(const UnicodeString& pattern, ParsePosition& pos, + uint32_t options, + const SymbolTable* symbols, + UErrorCode& status); + + /** + * Constructs a set that is identical to the given UnicodeSet. + * @stable ICU 2.0 + */ + UnicodeSet(const UnicodeSet& o); + + /** + * Destructs the set. + * @stable ICU 2.0 + */ + virtual ~UnicodeSet(); + + /** + * Assigns this object to be a copy of another. + * A frozen set will not be modified. + * @stable ICU 2.0 + */ + UnicodeSet& operator=(const UnicodeSet& o); + + /** + * Compares the specified object with this set for equality. Returns + * <tt>true</tt> if the two sets + * have the same size, and every member of the specified set is + * contained in this set (or equivalently, every member of this set is + * contained in the specified set). + * + * @param o set to be compared for equality with this set. + * @return <tt>true</tt> if the specified set is equal to this set. + * @stable ICU 2.0 + */ + virtual UBool operator==(const UnicodeSet& o) const; + + /** + * Compares the specified object with this set for equality. Returns + * <tt>true</tt> if the specified set is not equal to this set. + * @stable ICU 2.0 + */ + UBool operator!=(const UnicodeSet& o) const; + + /** + * Returns a copy of this object. All UnicodeFunctor objects have + * to support cloning in order to allow classes using + * UnicodeFunctors, such as Transliterator, to implement cloning. + * If this set is frozen, then the clone will be frozen as well. + * Use cloneAsThawed() for a mutable clone of a frozen set. + * @see cloneAsThawed + * @stable ICU 2.0 + */ + virtual UnicodeFunctor* clone() const; + + /** + * Returns the hash code value for this set. + * + * @return the hash code value for this set. + * @see Object#hashCode() + * @stable ICU 2.0 + */ + virtual int32_t hashCode(void) const; + + /** + * Get a UnicodeSet pointer from a USet + * + * @param uset a USet (the ICU plain C type for UnicodeSet) + * @return the corresponding UnicodeSet pointer. + * + * @stable ICU 4.2 + */ + inline static UnicodeSet *fromUSet(USet *uset); + + /** + * Get a UnicodeSet pointer from a const USet + * + * @param uset a const USet (the ICU plain C type for UnicodeSet) + * @return the corresponding UnicodeSet pointer. + * + * @stable ICU 4.2 + */ + inline static const UnicodeSet *fromUSet(const USet *uset); + + /** + * Produce a USet * pointer for this UnicodeSet. + * USet is the plain C type for UnicodeSet + * + * @return a USet pointer for this UnicodeSet + * @stable ICU 4.2 + */ + inline USet *toUSet(); + + + /** + * Produce a const USet * pointer for this UnicodeSet. + * USet is the plain C type for UnicodeSet + * + * @return a const USet pointer for this UnicodeSet + * @stable ICU 4.2 + */ + inline const USet * toUSet() const; + + + //---------------------------------------------------------------- + // Freezable API + //---------------------------------------------------------------- + + /** + * Determines whether the set has been frozen (made immutable) or not. + * See the ICU4J Freezable interface for details. + * @return TRUE/FALSE for whether the set has been frozen + * @see freeze + * @see cloneAsThawed + * @stable ICU 3.8 + */ + inline UBool isFrozen() const; + + /** + * Freeze the set (make it immutable). + * Once frozen, it cannot be unfrozen and is therefore thread-safe + * until it is deleted. + * See the ICU4J Freezable interface for details. + * Freezing the set may also make some operations faster, for example + * contains() and span(). + * A frozen set will not be modified. (It remains frozen.) + * @return this set. + * @see isFrozen + * @see cloneAsThawed + * @stable ICU 3.8 + */ + UnicodeFunctor *freeze(); + + /** + * Clone the set and make the clone mutable. + * See the ICU4J Freezable interface for details. + * @return the mutable clone + * @see freeze + * @see isFrozen + * @stable ICU 3.8 + */ + UnicodeFunctor *cloneAsThawed() const; + + //---------------------------------------------------------------- + // Public API + //---------------------------------------------------------------- + + /** + * Make this object represent the range <code>start - end</code>. + * If <code>end > start</code> then this object is set to an + * an empty range. + * A frozen set will not be modified. + * + * @param start first character in the set, inclusive + * @param end last character in the set, inclusive + * @stable ICU 2.4 + */ + UnicodeSet& set(UChar32 start, UChar32 end); + + /** + * Return true if the given position, in the given pattern, appears + * to be the start of a UnicodeSet pattern. + * @stable ICU 2.4 + */ + static UBool resemblesPattern(const UnicodeString& pattern, + int32_t pos); + + /** + * Modifies this set to represent the set specified by the given + * pattern, ignoring Unicode Pattern_White_Space characters. + * See the class description for the syntax of the pattern language. + * A frozen set will not be modified. + * @param pattern a string specifying what characters are in the set + * @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the pattern + * contains a syntax error. + * <em> Empties the set passed before applying the pattern.</em> + * @return a reference to this + * @stable ICU 2.0 + */ + UnicodeSet& applyPattern(const UnicodeString& pattern, + UErrorCode& status); + +#ifndef U_HIDE_INTERNAL_API + /** + * Modifies this set to represent the set specified by the given + * pattern, optionally ignoring Unicode Pattern_White_Space characters. + * See the class description for the syntax of the pattern language. + * A frozen set will not be modified. + * @param pattern a string specifying what characters are in the set + * @param options bitmask for options to apply to the pattern. + * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE. + * @param symbols a symbol table mapping variable names to + * values and stand-ins to UnicodeSets; may be NULL + * @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the pattern + * contains a syntax error. + *<em> Empties the set passed before applying the pattern.</em> + * @return a reference to this + * @internal + */ + UnicodeSet& applyPattern(const UnicodeString& pattern, + uint32_t options, + const SymbolTable* symbols, + UErrorCode& status); +#endif /* U_HIDE_INTERNAL_API */ + + /** + * Parses the given pattern, starting at the given position. The + * character at pattern.charAt(pos.getIndex()) must be '[', or the + * parse fails. Parsing continues until the corresponding closing + * ']'. If a syntax error is encountered between the opening and + * closing brace, the parse fails. Upon return from a successful + * parse, the ParsePosition is updated to point to the character + * following the closing ']', and a StringBuffer containing a + * pairs list for the parsed pattern is returned. This method calls + * itself recursively to parse embedded subpatterns. + *<em> Empties the set passed before applying the pattern.</em> + * A frozen set will not be modified. + * + * @param pattern the string containing the pattern to be parsed. + * The portion of the string from pos.getIndex(), which must be a + * '[', to the corresponding closing ']', is parsed. + * @param pos upon entry, the position at which to being parsing. + * The character at pattern.charAt(pos.getIndex()) must be a '['. + * Upon return from a successful parse, pos.getIndex() is either + * the character after the closing ']' of the parsed pattern, or + * pattern.length() if the closing ']' is the last character of + * the pattern string. + * @param options bitmask for options to apply to the pattern. + * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE. + * @param symbols a symbol table mapping variable names to + * values and stand-ins to UnicodeSets; may be NULL + * @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the pattern + * contains a syntax error. + * @return a reference to this + * @stable ICU 2.8 + */ + UnicodeSet& applyPattern(const UnicodeString& pattern, + ParsePosition& pos, + uint32_t options, + const SymbolTable* symbols, + UErrorCode& status); + + /** + * Returns a string representation of this set. If the result of + * calling this function is passed to a UnicodeSet constructor, it + * will produce another set that is equal to this one. + * A frozen set will not be modified. + * @param result the string to receive the rules. Previous + * contents will be deleted. + * @param escapeUnprintable if TRUE then convert unprintable + * character to their hex escape representations, \\uxxxx or + * \\Uxxxxxxxx. Unprintable characters are those other than + * U+000A, U+0020..U+007E. + * @stable ICU 2.0 + */ + virtual UnicodeString& toPattern(UnicodeString& result, + UBool escapeUnprintable = FALSE) const; + + /** + * Modifies this set to contain those code points which have the given value + * for the given binary or enumerated property, as returned by + * u_getIntPropertyValue. Prior contents of this set are lost. + * A frozen set will not be modified. + * + * @param prop a property in the range UCHAR_BIN_START..UCHAR_BIN_LIMIT-1 + * or UCHAR_INT_START..UCHAR_INT_LIMIT-1 + * or UCHAR_MASK_START..UCHAR_MASK_LIMIT-1. + * + * @param value a value in the range u_getIntPropertyMinValue(prop).. + * u_getIntPropertyMaxValue(prop), with one exception. If prop is + * UCHAR_GENERAL_CATEGORY_MASK, then value should not be a UCharCategory, but + * rather a mask value produced by U_GET_GC_MASK(). This allows grouped + * categories such as [:L:] to be represented. + * + * @param ec error code input/output parameter + * + * @return a reference to this set + * + * @stable ICU 2.4 + */ + UnicodeSet& applyIntPropertyValue(UProperty prop, + int32_t value, + UErrorCode& ec); + + /** + * Modifies this set to contain those code points which have the + * given value for the given property. Prior contents of this + * set are lost. + * A frozen set will not be modified. + * + * @param prop a property alias, either short or long. The name is matched + * loosely. See PropertyAliases.txt for names and a description of loose + * matching. If the value string is empty, then this string is interpreted + * as either a General_Category value alias, a Script value alias, a binary + * property alias, or a special ID. Special IDs are matched loosely and + * correspond to the following sets: + * + * "ANY" = [\\u0000-\\U0010FFFF], + * "ASCII" = [\\u0000-\\u007F], + * "Assigned" = [:^Cn:]. + * + * @param value a value alias, either short or long. The name is matched + * loosely. See PropertyValueAliases.txt for names and a description of + * loose matching. In addition to aliases listed, numeric values and + * canonical combining classes may be expressed numerically, e.g., ("nv", + * "0.5") or ("ccc", "220"). The value string may also be empty. + * + * @param ec error code input/output parameter + * + * @return a reference to this set + * + * @stable ICU 2.4 + */ + UnicodeSet& applyPropertyAlias(const UnicodeString& prop, + const UnicodeString& value, + UErrorCode& ec); + + /** + * Returns the number of elements in this set (its cardinality). + * Note than the elements of a set may include both individual + * codepoints and strings. + * + * @return the number of elements in this set (its cardinality). + * @stable ICU 2.0 + */ + virtual int32_t size(void) const; + + /** + * Returns <tt>true</tt> if this set contains no elements. + * + * @return <tt>true</tt> if this set contains no elements. + * @stable ICU 2.0 + */ + virtual UBool isEmpty(void) const; + + /** + * Returns true if this set contains the given character. + * This function works faster with a frozen set. + * @param c character to be checked for containment + * @return true if the test condition is met + * @stable ICU 2.0 + */ + virtual UBool contains(UChar32 c) const; + + /** + * Returns true if this set contains every character + * of the given range. + * @param start first character, inclusive, of the range + * @param end last character, inclusive, of the range + * @return true if the test condition is met + * @stable ICU 2.0 + */ + virtual UBool contains(UChar32 start, UChar32 end) const; + + /** + * Returns <tt>true</tt> if this set contains the given + * multicharacter string. + * @param s string to be checked for containment + * @return <tt>true</tt> if this set contains the specified string + * @stable ICU 2.4 + */ + UBool contains(const UnicodeString& s) const; + + /** + * Returns true if this set contains all the characters and strings + * of the given set. + * @param c set to be checked for containment + * @return true if the test condition is met + * @stable ICU 2.4 + */ + virtual UBool containsAll(const UnicodeSet& c) const; + + /** + * Returns true if this set contains all the characters + * of the given string. + * @param s string containing characters to be checked for containment + * @return true if the test condition is met + * @stable ICU 2.4 + */ + UBool containsAll(const UnicodeString& s) const; + + /** + * Returns true if this set contains none of the characters + * of the given range. + * @param start first character, inclusive, of the range + * @param end last character, inclusive, of the range + * @return true if the test condition is met + * @stable ICU 2.4 + */ + UBool containsNone(UChar32 start, UChar32 end) const; + + /** + * Returns true if this set contains none of the characters and strings + * of the given set. + * @param c set to be checked for containment + * @return true if the test condition is met + * @stable ICU 2.4 + */ + UBool containsNone(const UnicodeSet& c) const; + + /** + * Returns true if this set contains none of the characters + * of the given string. + * @param s string containing characters to be checked for containment + * @return true if the test condition is met + * @stable ICU 2.4 + */ + UBool containsNone(const UnicodeString& s) const; + + /** + * Returns true if this set contains one or more of the characters + * in the given range. + * @param start first character, inclusive, of the range + * @param end last character, inclusive, of the range + * @return true if the condition is met + * @stable ICU 2.4 + */ + inline UBool containsSome(UChar32 start, UChar32 end) const; + + /** + * Returns true if this set contains one or more of the characters + * and strings of the given set. + * @param s The set to be checked for containment + * @return true if the condition is met + * @stable ICU 2.4 + */ + inline UBool containsSome(const UnicodeSet& s) const; + + /** + * Returns true if this set contains one or more of the characters + * of the given string. + * @param s string containing characters to be checked for containment + * @return true if the condition is met + * @stable ICU 2.4 + */ + inline UBool containsSome(const UnicodeString& s) const; + + /** + * Returns the length of the initial substring of the input string which + * consists only of characters and strings that are contained in this set + * (USET_SPAN_CONTAINED, USET_SPAN_SIMPLE), + * or only of characters and strings that are not contained + * in this set (USET_SPAN_NOT_CONTAINED). + * See USetSpanCondition for details. + * Similar to the strspn() C library function. + * Unpaired surrogates are treated according to contains() of their surrogate code points. + * This function works faster with a frozen set and with a non-negative string length argument. + * @param s start of the string + * @param length of the string; can be -1 for NUL-terminated + * @param spanCondition specifies the containment condition + * @return the length of the initial substring according to the spanCondition; + * 0 if the start of the string does not fit the spanCondition + * @stable ICU 3.8 + * @see USetSpanCondition + */ + int32_t span(const char16_t *s, int32_t length, USetSpanCondition spanCondition) const; + + /** + * Returns the end of the substring of the input string according to the USetSpanCondition. + * Same as <code>start+span(s.getBuffer()+start, s.length()-start, spanCondition)</code> + * after pinning start to 0<=start<=s.length(). + * @param s the string + * @param start the start index in the string for the span operation + * @param spanCondition specifies the containment condition + * @return the exclusive end of the substring according to the spanCondition; + * the substring s.tempSubStringBetween(start, end) fulfills the spanCondition + * @stable ICU 4.4 + * @see USetSpanCondition + */ + inline int32_t span(const UnicodeString &s, int32_t start, USetSpanCondition spanCondition) const; + + /** + * Returns the start of the trailing substring of the input string which + * consists only of characters and strings that are contained in this set + * (USET_SPAN_CONTAINED, USET_SPAN_SIMPLE), + * or only of characters and strings that are not contained + * in this set (USET_SPAN_NOT_CONTAINED). + * See USetSpanCondition for details. + * Unpaired surrogates are treated according to contains() of their surrogate code points. + * This function works faster with a frozen set and with a non-negative string length argument. + * @param s start of the string + * @param length of the string; can be -1 for NUL-terminated + * @param spanCondition specifies the containment condition + * @return the start of the trailing substring according to the spanCondition; + * the string length if the end of the string does not fit the spanCondition + * @stable ICU 3.8 + * @see USetSpanCondition + */ + int32_t spanBack(const char16_t *s, int32_t length, USetSpanCondition spanCondition) const; + + /** + * Returns the start of the substring of the input string according to the USetSpanCondition. + * Same as <code>spanBack(s.getBuffer(), limit, spanCondition)</code> + * after pinning limit to 0<=end<=s.length(). + * @param s the string + * @param limit the exclusive-end index in the string for the span operation + * (use s.length() or INT32_MAX for spanning back from the end of the string) + * @param spanCondition specifies the containment condition + * @return the start of the substring according to the spanCondition; + * the substring s.tempSubStringBetween(start, limit) fulfills the spanCondition + * @stable ICU 4.4 + * @see USetSpanCondition + */ + inline int32_t spanBack(const UnicodeString &s, int32_t limit, USetSpanCondition spanCondition) const; + + /** + * Returns the length of the initial substring of the input string which + * consists only of characters and strings that are contained in this set + * (USET_SPAN_CONTAINED, USET_SPAN_SIMPLE), + * or only of characters and strings that are not contained + * in this set (USET_SPAN_NOT_CONTAINED). + * See USetSpanCondition for details. + * Similar to the strspn() C library function. + * Malformed byte sequences are treated according to contains(0xfffd). + * This function works faster with a frozen set and with a non-negative string length argument. + * @param s start of the string (UTF-8) + * @param length of the string; can be -1 for NUL-terminated + * @param spanCondition specifies the containment condition + * @return the length of the initial substring according to the spanCondition; + * 0 if the start of the string does not fit the spanCondition + * @stable ICU 3.8 + * @see USetSpanCondition + */ + int32_t spanUTF8(const char *s, int32_t length, USetSpanCondition spanCondition) const; + + /** + * Returns the start of the trailing substring of the input string which + * consists only of characters and strings that are contained in this set + * (USET_SPAN_CONTAINED, USET_SPAN_SIMPLE), + * or only of characters and strings that are not contained + * in this set (USET_SPAN_NOT_CONTAINED). + * See USetSpanCondition for details. + * Malformed byte sequences are treated according to contains(0xfffd). + * This function works faster with a frozen set and with a non-negative string length argument. + * @param s start of the string (UTF-8) + * @param length of the string; can be -1 for NUL-terminated + * @param spanCondition specifies the containment condition + * @return the start of the trailing substring according to the spanCondition; + * the string length if the end of the string does not fit the spanCondition + * @stable ICU 3.8 + * @see USetSpanCondition + */ + int32_t spanBackUTF8(const char *s, int32_t length, USetSpanCondition spanCondition) const; + + /** + * Implement UnicodeMatcher::matches() + * @stable ICU 2.4 + */ + virtual UMatchDegree matches(const Replaceable& text, + int32_t& offset, + int32_t limit, + UBool incremental); + +private: + /** + * Returns the longest match for s in text at the given position. + * If limit > start then match forward from start+1 to limit + * matching all characters except s.charAt(0). If limit < start, + * go backward starting from start-1 matching all characters + * except s.charAt(s.length()-1). This method assumes that the + * first character, text.charAt(start), matches s, so it does not + * check it. + * @param text the text to match + * @param start the first character to match. In the forward + * direction, text.charAt(start) is matched against s.charAt(0). + * In the reverse direction, it is matched against + * s.charAt(s.length()-1). + * @param limit the limit offset for matching, either last+1 in + * the forward direction, or last-1 in the reverse direction, + * where last is the index of the last character to match. + * @param s + * @return If part of s matches up to the limit, return |limit - + * start|. If all of s matches before reaching the limit, return + * s.length(). If there is a mismatch between s and text, return + * 0 + */ + static int32_t matchRest(const Replaceable& text, + int32_t start, int32_t limit, + const UnicodeString& s); + + /** + * Returns the smallest value i such that c < list[i]. Caller + * must ensure that c is a legal value or this method will enter + * an infinite loop. This method performs a binary search. + * @param c a character in the range MIN_VALUE..MAX_VALUE + * inclusive + * @return the smallest integer i in the range 0..len-1, + * inclusive, such that c < list[i] + */ + int32_t findCodePoint(UChar32 c) const; + +public: + + /** + * Implementation of UnicodeMatcher API. Union the set of all + * characters that may be matched by this object into the given + * set. + * @param toUnionTo the set into which to union the source characters + * @stable ICU 2.4 + */ + virtual void addMatchSetTo(UnicodeSet& toUnionTo) const; + + /** + * Returns the index of the given character within this set, where + * the set is ordered by ascending code point. If the character + * is not in this set, return -1. The inverse of this method is + * <code>charAt()</code>. + * @return an index from 0..size()-1, or -1 + * @stable ICU 2.4 + */ + int32_t indexOf(UChar32 c) const; + + /** + * Returns the character at the given index within this set, where + * the set is ordered by ascending code point. If the index is + * out of range, return (UChar32)-1. The inverse of this method is + * <code>indexOf()</code>. + * @param index an index from 0..size()-1 + * @return the character at the given index, or (UChar32)-1. + * @stable ICU 2.4 + */ + UChar32 charAt(int32_t index) const; + + /** + * Adds the specified range to this set if it is not already + * present. If this set already contains the specified range, + * the call leaves this set unchanged. If <code>end > start</code> + * then an empty range is added, leaving the set unchanged. + * This is equivalent to a boolean logic OR, or a set UNION. + * A frozen set will not be modified. + * + * @param start first character, inclusive, of range to be added + * to this set. + * @param end last character, inclusive, of range to be added + * to this set. + * @stable ICU 2.0 + */ + virtual UnicodeSet& add(UChar32 start, UChar32 end); + + /** + * Adds the specified character to this set if it is not already + * present. If this set already contains the specified character, + * the call leaves this set unchanged. + * A frozen set will not be modified. + * @stable ICU 2.0 + */ + UnicodeSet& add(UChar32 c); + + /** + * Adds the specified multicharacter to this set if it is not already + * present. If this set already contains the multicharacter, + * the call leaves this set unchanged. + * Thus "ch" => {"ch"} + * <br><b>Warning: you cannot add an empty string ("") to a UnicodeSet.</b> + * A frozen set will not be modified. + * @param s the source string + * @return this object, for chaining + * @stable ICU 2.4 + */ + UnicodeSet& add(const UnicodeString& s); + + private: + /** + * @return a code point IF the string consists of a single one. + * otherwise returns -1. + * @param s string to test + */ + static int32_t getSingleCP(const UnicodeString& s); + + void _add(const UnicodeString& s); + + public: + /** + * Adds each of the characters in this string to the set. Thus "ch" => {"c", "h"} + * If this set already any particular character, it has no effect on that character. + * A frozen set will not be modified. + * @param s the source string + * @return this object, for chaining + * @stable ICU 2.4 + */ + UnicodeSet& addAll(const UnicodeString& s); + + /** + * Retains EACH of the characters in this string. Note: "ch" == {"c", "h"} + * If this set already any particular character, it has no effect on that character. + * A frozen set will not be modified. + * @param s the source string + * @return this object, for chaining + * @stable ICU 2.4 + */ + UnicodeSet& retainAll(const UnicodeString& s); + + /** + * Complement EACH of the characters in this string. Note: "ch" == {"c", "h"} + * If this set already any particular character, it has no effect on that character. + * A frozen set will not be modified. + * @param s the source string + * @return this object, for chaining + * @stable ICU 2.4 + */ + UnicodeSet& complementAll(const UnicodeString& s); + + /** + * Remove EACH of the characters in this string. Note: "ch" == {"c", "h"} + * If this set already any particular character, it has no effect on that character. + * A frozen set will not be modified. + * @param s the source string + * @return this object, for chaining + * @stable ICU 2.4 + */ + UnicodeSet& removeAll(const UnicodeString& s); + + /** + * Makes a set from a multicharacter string. Thus "ch" => {"ch"} + * <br><b>Warning: you cannot add an empty string ("") to a UnicodeSet.</b> + * @param s the source string + * @return a newly created set containing the given string. + * The caller owns the return object and is responsible for deleting it. + * @stable ICU 2.4 + */ + static UnicodeSet* U_EXPORT2 createFrom(const UnicodeString& s); + + + /** + * Makes a set from each of the characters in the string. Thus "ch" => {"c", "h"} + * @param s the source string + * @return a newly created set containing the given characters + * The caller owns the return object and is responsible for deleting it. + * @stable ICU 2.4 + */ + static UnicodeSet* U_EXPORT2 createFromAll(const UnicodeString& s); + + /** + * Retain only the elements in this set that are contained in the + * specified range. If <code>end > start</code> then an empty range is + * retained, leaving the set empty. This is equivalent to + * a boolean logic AND, or a set INTERSECTION. + * A frozen set will not be modified. + * + * @param start first character, inclusive, of range to be retained + * to this set. + * @param end last character, inclusive, of range to be retained + * to this set. + * @stable ICU 2.0 + */ + virtual UnicodeSet& retain(UChar32 start, UChar32 end); + + + /** + * Retain the specified character from this set if it is present. + * A frozen set will not be modified. + * @stable ICU 2.0 + */ + UnicodeSet& retain(UChar32 c); + + /** + * Removes the specified range from this set if it is present. + * The set will not contain the specified range once the call + * returns. If <code>end > start</code> then an empty range is + * removed, leaving the set unchanged. + * A frozen set will not be modified. + * + * @param start first character, inclusive, of range to be removed + * from this set. + * @param end last character, inclusive, of range to be removed + * from this set. + * @stable ICU 2.0 + */ + virtual UnicodeSet& remove(UChar32 start, UChar32 end); + + /** + * Removes the specified character from this set if it is present. + * The set will not contain the specified range once the call + * returns. + * A frozen set will not be modified. + * @stable ICU 2.0 + */ + UnicodeSet& remove(UChar32 c); + + /** + * Removes the specified string from this set if it is present. + * The set will not contain the specified character once the call + * returns. + * A frozen set will not be modified. + * @param s the source string + * @return this object, for chaining + * @stable ICU 2.4 + */ + UnicodeSet& remove(const UnicodeString& s); + + /** + * Inverts this set. This operation modifies this set so that + * its value is its complement. This is equivalent to + * <code>complement(MIN_VALUE, MAX_VALUE)</code>. + * A frozen set will not be modified. + * @stable ICU 2.0 + */ + virtual UnicodeSet& complement(void); + + /** + * Complements the specified range in this set. Any character in + * the range will be removed if it is in this set, or will be + * added if it is not in this set. If <code>end > start</code> + * then an empty range is complemented, leaving the set unchanged. + * This is equivalent to a boolean logic XOR. + * A frozen set will not be modified. + * + * @param start first character, inclusive, of range to be removed + * from this set. + * @param end last character, inclusive, of range to be removed + * from this set. + * @stable ICU 2.0 + */ + virtual UnicodeSet& complement(UChar32 start, UChar32 end); + + /** + * Complements the specified character in this set. The character + * will be removed if it is in this set, or will be added if it is + * not in this set. + * A frozen set will not be modified. + * @stable ICU 2.0 + */ + UnicodeSet& complement(UChar32 c); + + /** + * Complement the specified string in this set. + * The set will not contain the specified string once the call + * returns. + * <br><b>Warning: you cannot add an empty string ("") to a UnicodeSet.</b> + * A frozen set will not be modified. + * @param s the string to complement + * @return this object, for chaining + * @stable ICU 2.4 + */ + UnicodeSet& complement(const UnicodeString& s); + + /** + * Adds all of the elements in the specified set to this set if + * they're not already present. This operation effectively + * modifies this set so that its value is the <i>union</i> of the two + * sets. The behavior of this operation is unspecified if the specified + * collection is modified while the operation is in progress. + * A frozen set will not be modified. + * + * @param c set whose elements are to be added to this set. + * @see #add(UChar32, UChar32) + * @stable ICU 2.0 + */ + virtual UnicodeSet& addAll(const UnicodeSet& c); + + /** + * Retains only the elements in this set that are contained in the + * specified set. In other words, removes from this set all of + * its elements that are not contained in the specified set. This + * operation effectively modifies this set so that its value is + * the <i>intersection</i> of the two sets. + * A frozen set will not be modified. + * + * @param c set that defines which elements this set will retain. + * @stable ICU 2.0 + */ + virtual UnicodeSet& retainAll(const UnicodeSet& c); + + /** + * Removes from this set all of its elements that are contained in the + * specified set. This operation effectively modifies this + * set so that its value is the <i>asymmetric set difference</i> of + * the two sets. + * A frozen set will not be modified. + * + * @param c set that defines which elements will be removed from + * this set. + * @stable ICU 2.0 + */ + virtual UnicodeSet& removeAll(const UnicodeSet& c); + + /** + * Complements in this set all elements contained in the specified + * set. Any character in the other set will be removed if it is + * in this set, or will be added if it is not in this set. + * A frozen set will not be modified. + * + * @param c set that defines which elements will be xor'ed from + * this set. + * @stable ICU 2.4 + */ + virtual UnicodeSet& complementAll(const UnicodeSet& c); + + /** + * Removes all of the elements from this set. This set will be + * empty after this call returns. + * A frozen set will not be modified. + * @stable ICU 2.0 + */ + virtual UnicodeSet& clear(void); + + /** + * Close this set over the given attribute. For the attribute + * USET_CASE, the result is to modify this set so that: + * + * 1. For each character or string 'a' in this set, all strings or + * characters 'b' such that foldCase(a) == foldCase(b) are added + * to this set. + * + * 2. For each string 'e' in the resulting set, if e != + * foldCase(e), 'e' will be removed. + * + * Example: [aq\\u00DF{Bc}{bC}{Fi}] => [aAqQ\\u00DF\\uFB01{ss}{bc}{fi}] + * + * (Here foldCase(x) refers to the operation u_strFoldCase, and a + * == b denotes that the contents are the same, not pointer + * comparison.) + * + * A frozen set will not be modified. + * + * @param attribute bitmask for attributes to close over. + * Currently only the USET_CASE bit is supported. Any undefined bits + * are ignored. + * @return a reference to this set. + * @stable ICU 4.2 + */ + UnicodeSet& closeOver(int32_t attribute); + + /** + * Remove all strings from this set. + * + * @return a reference to this set. + * @stable ICU 4.2 + */ + virtual UnicodeSet &removeAllStrings(); + + /** + * Iteration method that returns the number of ranges contained in + * this set. + * @see #getRangeStart + * @see #getRangeEnd + * @stable ICU 2.4 + */ + virtual int32_t getRangeCount(void) const; + + /** + * Iteration method that returns the first character in the + * specified range of this set. + * @see #getRangeCount + * @see #getRangeEnd + * @stable ICU 2.4 + */ + virtual UChar32 getRangeStart(int32_t index) const; + + /** + * Iteration method that returns the last character in the + * specified range of this set. + * @see #getRangeStart + * @see #getRangeEnd + * @stable ICU 2.4 + */ + virtual UChar32 getRangeEnd(int32_t index) const; + + /** + * Serializes this set into an array of 16-bit integers. Serialization + * (currently) only records the characters in the set; multicharacter + * strings are ignored. + * + * The array has following format (each line is one 16-bit + * integer): + * + * length = (n+2*m) | (m!=0?0x8000:0) + * bmpLength = n; present if m!=0 + * bmp[0] + * bmp[1] + * ... + * bmp[n-1] + * supp-high[0] + * supp-low[0] + * supp-high[1] + * supp-low[1] + * ... + * supp-high[m-1] + * supp-low[m-1] + * + * The array starts with a header. After the header are n bmp + * code points, then m supplementary code points. Either n or m + * or both may be zero. n+2*m is always <= 0x7FFF. + * + * If there are no supplementary characters (if m==0) then the + * header is one 16-bit integer, 'length', with value n. + * + * If there are supplementary characters (if m!=0) then the header + * is two 16-bit integers. The first, 'length', has value + * (n+2*m)|0x8000. The second, 'bmpLength', has value n. + * + * After the header the code points are stored in ascending order. + * Supplementary code points are stored as most significant 16 + * bits followed by least significant 16 bits. + * + * @param dest pointer to buffer of destCapacity 16-bit integers. + * May be NULL only if destCapacity is zero. + * @param destCapacity size of dest, or zero. Must not be negative. + * @param ec error code. Will be set to U_INDEX_OUTOFBOUNDS_ERROR + * if n+2*m > 0x7FFF. Will be set to U_BUFFER_OVERFLOW_ERROR if + * n+2*m+(m!=0?2:1) > destCapacity. + * @return the total length of the serialized format, including + * the header, that is, n+2*m+(m!=0?2:1), or 0 on error other + * than U_BUFFER_OVERFLOW_ERROR. + * @stable ICU 2.4 + */ + int32_t serialize(uint16_t *dest, int32_t destCapacity, UErrorCode& ec) const; + + /** + * Reallocate this objects internal structures to take up the least + * possible space, without changing this object's value. + * A frozen set will not be modified. + * @stable ICU 2.4 + */ + virtual UnicodeSet& compact(); + + /** + * Return the class ID for this class. This is useful only for + * comparing to a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . Derived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 2.0 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Implement UnicodeFunctor API. + * + * @return The class ID for this object. All objects of a given + * class have the same class ID. Objects of other classes have + * different class IDs. + * @stable ICU 2.4 + */ + virtual UClassID getDynamicClassID(void) const; + +private: + + // Private API for the USet API + + friend class USetAccess; + + int32_t getStringCount() const; + + const UnicodeString* getString(int32_t index) const; + + //---------------------------------------------------------------- + // RuleBasedTransliterator support + //---------------------------------------------------------------- + +private: + + /** + * Returns <tt>true</tt> if this set contains any character whose low byte + * is the given value. This is used by <tt>RuleBasedTransliterator</tt> for + * indexing. + */ + virtual UBool matchesIndexValue(uint8_t v) const; + +private: + friend class RBBIRuleScanner; + + //---------------------------------------------------------------- + // Implementation: Clone as thawed (see ICU4J Freezable) + //---------------------------------------------------------------- + + UnicodeSet(const UnicodeSet& o, UBool /* asThawed */); + + //---------------------------------------------------------------- + // Implementation: Pattern parsing + //---------------------------------------------------------------- + + void applyPatternIgnoreSpace(const UnicodeString& pattern, + ParsePosition& pos, + const SymbolTable* symbols, + UErrorCode& status); + + void applyPattern(RuleCharacterIterator& chars, + const SymbolTable* symbols, + UnicodeString& rebuiltPat, + uint32_t options, + UnicodeSet& (UnicodeSet::*caseClosure)(int32_t attribute), + int32_t depth, + UErrorCode& ec); + + //---------------------------------------------------------------- + // Implementation: Utility methods + //---------------------------------------------------------------- + + void ensureCapacity(int32_t newLen, UErrorCode& ec); + + void ensureBufferCapacity(int32_t newLen, UErrorCode& ec); + + void swapBuffers(void); + + UBool allocateStrings(UErrorCode &status); + + UnicodeString& _toPattern(UnicodeString& result, + UBool escapeUnprintable) const; + + UnicodeString& _generatePattern(UnicodeString& result, + UBool escapeUnprintable) const; + + static void _appendToPat(UnicodeString& buf, const UnicodeString& s, UBool escapeUnprintable); + + static void _appendToPat(UnicodeString& buf, UChar32 c, UBool escapeUnprintable); + + //---------------------------------------------------------------- + // Implementation: Fundamental operators + //---------------------------------------------------------------- + + void exclusiveOr(const UChar32* other, int32_t otherLen, int8_t polarity); + + void add(const UChar32* other, int32_t otherLen, int8_t polarity); + + void retain(const UChar32* other, int32_t otherLen, int8_t polarity); + + /** + * Return true if the given position, in the given pattern, appears + * to be the start of a property set pattern [:foo:], \\p{foo}, or + * \\P{foo}, or \\N{name}. + */ + static UBool resemblesPropertyPattern(const UnicodeString& pattern, + int32_t pos); + + static UBool resemblesPropertyPattern(RuleCharacterIterator& chars, + int32_t iterOpts); + + /** + * Parse the given property pattern at the given parse position + * and set this UnicodeSet to the result. + * + * The original design document is out of date, but still useful. + * Ignore the property and value names: + * http://source.icu-project.org/repos/icu/icuhtml/trunk/design/unicodeset_properties.html + * + * Recognized syntax: + * + * [:foo:] [:^foo:] - white space not allowed within "[:" or ":]" + * \\p{foo} \\P{foo} - white space not allowed within "\\p" or "\\P" + * \\N{name} - white space not allowed within "\\N" + * + * Other than the above restrictions, Unicode Pattern_White_Space characters are ignored. + * Case is ignored except in "\\p" and "\\P" and "\\N". In 'name' leading + * and trailing space is deleted, and internal runs of whitespace + * are collapsed to a single space. + * + * We support binary properties, enumerated properties, and the + * following non-enumerated properties: + * + * Numeric_Value + * Name + * Unicode_1_Name + * + * @param pattern the pattern string + * @param ppos on entry, the position at which to begin parsing. + * This should be one of the locations marked '^': + * + * [:blah:] \\p{blah} \\P{blah} \\N{name} + * ^ % ^ % ^ % ^ % + * + * On return, the position after the last character parsed, that is, + * the locations marked '%'. If the parse fails, ppos is returned + * unchanged. + * @param ec status + * @return a reference to this. + */ + UnicodeSet& applyPropertyPattern(const UnicodeString& pattern, + ParsePosition& ppos, + UErrorCode &ec); + + void applyPropertyPattern(RuleCharacterIterator& chars, + UnicodeString& rebuiltPat, + UErrorCode& ec); + + friend void U_CALLCONV UnicodeSet_initInclusion(int32_t src, UErrorCode &status); + static const UnicodeSet* getInclusions(int32_t src, UErrorCode &status); + + /** + * A filter that returns TRUE if the given code point should be + * included in the UnicodeSet being constructed. + */ + typedef UBool (*Filter)(UChar32 codePoint, void* context); + + /** + * Given a filter, set this UnicodeSet to the code points + * contained by that filter. The filter MUST be + * property-conformant. That is, if it returns value v for one + * code point, then it must return v for all affiliated code + * points, as defined by the inclusions list. See + * getInclusions(). + * src is a UPropertySource value. + */ + void applyFilter(Filter filter, + void* context, + int32_t src, + UErrorCode &status); + + /** + * Set the new pattern to cache. + */ + void setPattern(const UnicodeString& newPat); + /** + * Release existing cached pattern. + */ + void releasePattern(); + + friend class UnicodeSetIterator; +}; + + + +inline UBool UnicodeSet::operator!=(const UnicodeSet& o) const { + return !operator==(o); +} + +inline UBool UnicodeSet::isFrozen() const { + return (UBool)(bmpSet!=NULL || stringSpan!=NULL); +} + +inline UBool UnicodeSet::containsSome(UChar32 start, UChar32 end) const { + return !containsNone(start, end); +} + +inline UBool UnicodeSet::containsSome(const UnicodeSet& s) const { + return !containsNone(s); +} + +inline UBool UnicodeSet::containsSome(const UnicodeString& s) const { + return !containsNone(s); +} + +inline UBool UnicodeSet::isBogus() const { + return (UBool)(fFlags & kIsBogus); +} + +inline UnicodeSet *UnicodeSet::fromUSet(USet *uset) { + return reinterpret_cast<UnicodeSet *>(uset); +} + +inline const UnicodeSet *UnicodeSet::fromUSet(const USet *uset) { + return reinterpret_cast<const UnicodeSet *>(uset); +} + +inline USet *UnicodeSet::toUSet() { + return reinterpret_cast<USet *>(this); +} + +inline const USet *UnicodeSet::toUSet() const { + return reinterpret_cast<const USet *>(this); +} + +inline int32_t UnicodeSet::span(const UnicodeString &s, int32_t start, USetSpanCondition spanCondition) const { + int32_t sLength=s.length(); + if(start<0) { + start=0; + } else if(start>sLength) { + start=sLength; + } + return start+span(s.getBuffer()+start, sLength-start, spanCondition); +} + +inline int32_t UnicodeSet::spanBack(const UnicodeString &s, int32_t limit, USetSpanCondition spanCondition) const { + int32_t sLength=s.length(); + if(limit<0) { + limit=0; + } else if(limit>sLength) { + limit=sLength; + } + return spanBack(s.getBuffer(), limit, spanCondition); +} + +U_NAMESPACE_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unistr.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unistr.h new file mode 100755 index 00000000..d0b27175 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unistr.h @@ -0,0 +1,4771 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 1998-2016, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* +* File unistr.h +* +* Modification History: +* +* Date Name Description +* 09/25/98 stephen Creation. +* 11/11/98 stephen Changed per 11/9 code review. +* 04/20/99 stephen Overhauled per 4/16 code review. +* 11/18/99 aliu Made to inherit from Replaceable. Added method +* handleReplaceBetween(); other methods unchanged. +* 06/25/01 grhoten Remove dependency on iostream. +****************************************************************************** +*/ + +#ifndef UNISTR_H +#define UNISTR_H + +/** + * \file + * \brief C++ API: Unicode String + */ + +#include <cstddef> +#include "unicode/utypes.h" +#include "unicode/char16ptr.h" +#include "unicode/rep.h" +#include "unicode/std_string.h" +#include "unicode/stringpiece.h" +#include "unicode/bytestream.h" + +struct UConverter; // unicode/ucnv.h + +#ifndef USTRING_H +/** + * \ingroup ustring_ustrlen + */ +U_STABLE int32_t U_EXPORT2 +u_strlen(const UChar *s); +#endif + +U_NAMESPACE_BEGIN + +#if !UCONFIG_NO_BREAK_ITERATION +class BreakIterator; // unicode/brkiter.h +#endif +class Edits; + +U_NAMESPACE_END + +// Not #ifndef U_HIDE_INTERNAL_API because UnicodeString needs the UStringCaseMapper. +/** + * Internal string case mapping function type. + * All error checking must be done. + * src and dest must not overlap. + * @internal + */ +typedef int32_t U_CALLCONV +UStringCaseMapper(int32_t caseLocale, uint32_t options, +#if !UCONFIG_NO_BREAK_ITERATION + icu::BreakIterator *iter, +#endif + char16_t *dest, int32_t destCapacity, + const char16_t *src, int32_t srcLength, + icu::Edits *edits, + UErrorCode &errorCode); + +U_NAMESPACE_BEGIN + +class Locale; // unicode/locid.h +class StringCharacterIterator; +class UnicodeStringAppendable; // unicode/appendable.h + +/* The <iostream> include has been moved to unicode/ustream.h */ + +/** + * Constant to be used in the UnicodeString(char *, int32_t, EInvariant) constructor + * which constructs a Unicode string from an invariant-character char * string. + * About invariant characters see utypes.h. + * This constructor has no runtime dependency on conversion code and is + * therefore recommended over ones taking a charset name string + * (where the empty string "" indicates invariant-character conversion). + * + * @stable ICU 3.2 + */ +#define US_INV icu::UnicodeString::kInvariant + +/** + * Unicode String literals in C++. + * + * Note: these macros are not recommended for new code. + * Prior to the availability of C++11 and u"unicode string literals", + * these macros were provided for portability and efficiency when + * initializing UnicodeStrings from literals. + * + * They work only for strings that contain "invariant characters", i.e., + * only latin letters, digits, and some punctuation. + * See utypes.h for details. + * + * The string parameter must be a C string literal. + * The length of the string, not including the terminating + * <code>NUL</code>, must be specified as a constant. + * @stable ICU 2.0 + */ +#if !U_CHAR16_IS_TYPEDEF +# define UNICODE_STRING(cs, _length) icu::UnicodeString(TRUE, u ## cs, _length) +#else +# define UNICODE_STRING(cs, _length) icu::UnicodeString(TRUE, (const char16_t*)u ## cs, _length) +#endif + +/** + * Unicode String literals in C++. + * Dependent on the platform properties, different UnicodeString + * constructors should be used to create a UnicodeString object from + * a string literal. + * The macros are defined for improved performance. + * They work only for strings that contain "invariant characters", i.e., + * only latin letters, digits, and some punctuation. + * See utypes.h for details. + * + * The string parameter must be a C string literal. + * @stable ICU 2.0 + */ +#define UNICODE_STRING_SIMPLE(cs) UNICODE_STRING(cs, -1) + +/** + * \def UNISTR_FROM_CHAR_EXPLICIT + * This can be defined to be empty or "explicit". + * If explicit, then the UnicodeString(char16_t) and UnicodeString(UChar32) + * constructors are marked as explicit, preventing their inadvertent use. + * @stable ICU 49 + */ +#ifndef UNISTR_FROM_CHAR_EXPLICIT +# if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) + // Auto-"explicit" in ICU library code. +# define UNISTR_FROM_CHAR_EXPLICIT explicit +# else + // Empty by default for source code compatibility. +# define UNISTR_FROM_CHAR_EXPLICIT +# endif +#endif + +/** + * \def UNISTR_FROM_STRING_EXPLICIT + * This can be defined to be empty or "explicit". + * If explicit, then the UnicodeString(const char *) and UnicodeString(const char16_t *) + * constructors are marked as explicit, preventing their inadvertent use. + * + * In particular, this helps prevent accidentally depending on ICU conversion code + * by passing a string literal into an API with a const UnicodeString & parameter. + * @stable ICU 49 + */ +#ifndef UNISTR_FROM_STRING_EXPLICIT +# if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) + // Auto-"explicit" in ICU library code. +# define UNISTR_FROM_STRING_EXPLICIT explicit +# else + // Empty by default for source code compatibility. +# define UNISTR_FROM_STRING_EXPLICIT +# endif +#endif + +/** + * \def UNISTR_OBJECT_SIZE + * Desired sizeof(UnicodeString) in bytes. + * It should be a multiple of sizeof(pointer) to avoid unusable space for padding. + * The object size may want to be a multiple of 16 bytes, + * which is a common granularity for heap allocation. + * + * Any space inside the object beyond sizeof(vtable pointer) + 2 + * is available for storing short strings inside the object. + * The bigger the object, the longer a string that can be stored inside the object, + * without additional heap allocation. + * + * Depending on a platform's pointer size, pointer alignment requirements, + * and struct padding, the compiler will usually round up sizeof(UnicodeString) + * to 4 * sizeof(pointer) (or 3 * sizeof(pointer) for P128 data models), + * to hold the fields for heap-allocated strings. + * Such a minimum size also ensures that the object is easily large enough + * to hold at least 2 char16_ts, for one supplementary code point (U16_MAX_LENGTH). + * + * sizeof(UnicodeString) >= 48 should work for all known platforms. + * + * For example, on a 64-bit machine where sizeof(vtable pointer) is 8, + * sizeof(UnicodeString) = 64 would leave space for + * (64 - sizeof(vtable pointer) - 2) / U_SIZEOF_UCHAR = (64 - 8 - 2) / 2 = 27 + * char16_ts stored inside the object. + * + * The minimum object size on a 64-bit machine would be + * 4 * sizeof(pointer) = 4 * 8 = 32 bytes, + * and the internal buffer would hold up to 11 char16_ts in that case. + * + * @see U16_MAX_LENGTH + * @stable ICU 56 + */ +#ifndef UNISTR_OBJECT_SIZE +# define UNISTR_OBJECT_SIZE 64 +#endif + +/** + * UnicodeString is a string class that stores Unicode characters directly and provides + * similar functionality as the Java String and StringBuffer/StringBuilder classes. + * It is a concrete implementation of the abstract class Replaceable (for transliteration). + * + * A UnicodeString may also "alias" an external array of characters + * (that is, point to it, rather than own the array) + * whose lifetime must then at least match the lifetime of the aliasing object. + * This aliasing may be preserved when returning a UnicodeString by value, + * depending on the compiler and the function implementation, + * via Return Value Optimization (RVO) or the move assignment operator. + * (However, the copy assignment operator does not preserve aliasing.) + * For details see the description of storage models at the end of the class API docs + * and in the User Guide chapter linked from there. + * + * The UnicodeString class is not suitable for subclassing. + * + * <p>For an overview of Unicode strings in C and C++ see the + * <a href="http://userguide.icu-project.org/strings#TOC-Strings-in-C-C-">User Guide Strings chapter</a>.</p> + * + * <p>In ICU, a Unicode string consists of 16-bit Unicode <em>code units</em>. + * A Unicode character may be stored with either one code unit + * (the most common case) or with a matched pair of special code units + * ("surrogates"). The data type for code units is char16_t. + * For single-character handling, a Unicode character code <em>point</em> is a value + * in the range 0..0x10ffff. ICU uses the UChar32 type for code points.</p> + * + * <p>Indexes and offsets into and lengths of strings always count code units, not code points. + * This is the same as with multi-byte char* strings in traditional string handling. + * Operations on partial strings typically do not test for code point boundaries. + * If necessary, the user needs to take care of such boundaries by testing for the code unit + * values or by using functions like + * UnicodeString::getChar32Start() and UnicodeString::getChar32Limit() + * (or, in C, the equivalent macros U16_SET_CP_START() and U16_SET_CP_LIMIT(), see utf.h).</p> + * + * UnicodeString methods are more lenient with regard to input parameter values + * than other ICU APIs. In particular: + * - If indexes are out of bounds for a UnicodeString object + * (<0 or >length()) then they are "pinned" to the nearest boundary. + * - If primitive string pointer values (e.g., const char16_t * or char *) + * for input strings are NULL, then those input string parameters are treated + * as if they pointed to an empty string. + * However, this is <em>not</em> the case for char * parameters for charset names + * or other IDs. + * - Most UnicodeString methods do not take a UErrorCode parameter because + * there are usually very few opportunities for failure other than a shortage + * of memory, error codes in low-level C++ string methods would be inconvenient, + * and the error code as the last parameter (ICU convention) would prevent + * the use of default parameter values. + * Instead, such methods set the UnicodeString into a "bogus" state + * (see isBogus()) if an error occurs. + * + * In string comparisons, two UnicodeString objects that are both "bogus" + * compare equal (to be transitive and prevent endless loops in sorting), + * and a "bogus" string compares less than any non-"bogus" one. + * + * Const UnicodeString methods are thread-safe. Multiple threads can use + * const methods on the same UnicodeString object simultaneously, + * but non-const methods must not be called concurrently (in multiple threads) + * with any other (const or non-const) methods. + * + * Similarly, const UnicodeString & parameters are thread-safe. + * One object may be passed in as such a parameter concurrently in multiple threads. + * This includes the const UnicodeString & parameters for + * copy construction, assignment, and cloning. + * + * <p>UnicodeString uses several storage methods. + * String contents can be stored inside the UnicodeString object itself, + * in an allocated and shared buffer, or in an outside buffer that is "aliased". + * Most of this is done transparently, but careful aliasing in particular provides + * significant performance improvements. + * Also, the internal buffer is accessible via special functions. + * For details see the + * <a href="http://userguide.icu-project.org/strings#TOC-Maximizing-Performance-with-the-UnicodeString-Storage-Model">User Guide Strings chapter</a>.</p> + * + * @see utf.h + * @see CharacterIterator + * @stable ICU 2.0 + */ +class U_COMMON_API UnicodeString : public Replaceable +{ +public: + + /** + * Constant to be used in the UnicodeString(char *, int32_t, EInvariant) constructor + * which constructs a Unicode string from an invariant-character char * string. + * Use the macro US_INV instead of the full qualification for this value. + * + * @see US_INV + * @stable ICU 3.2 + */ + enum EInvariant { + /** + * @see EInvariant + * @stable ICU 3.2 + */ + kInvariant + }; + + //======================================== + // Read-only operations + //======================================== + + /* Comparison - bitwise only - for international comparison use collation */ + + /** + * Equality operator. Performs only bitwise comparison. + * @param text The UnicodeString to compare to this one. + * @return TRUE if <TT>text</TT> contains the same characters as this one, + * FALSE otherwise. + * @stable ICU 2.0 + */ + inline UBool operator== (const UnicodeString& text) const; + + /** + * Inequality operator. Performs only bitwise comparison. + * @param text The UnicodeString to compare to this one. + * @return FALSE if <TT>text</TT> contains the same characters as this one, + * TRUE otherwise. + * @stable ICU 2.0 + */ + inline UBool operator!= (const UnicodeString& text) const; + + /** + * Greater than operator. Performs only bitwise comparison. + * @param text The UnicodeString to compare to this one. + * @return TRUE if the characters in this are bitwise + * greater than the characters in <code>text</code>, FALSE otherwise + * @stable ICU 2.0 + */ + inline UBool operator> (const UnicodeString& text) const; + + /** + * Less than operator. Performs only bitwise comparison. + * @param text The UnicodeString to compare to this one. + * @return TRUE if the characters in this are bitwise + * less than the characters in <code>text</code>, FALSE otherwise + * @stable ICU 2.0 + */ + inline UBool operator< (const UnicodeString& text) const; + + /** + * Greater than or equal operator. Performs only bitwise comparison. + * @param text The UnicodeString to compare to this one. + * @return TRUE if the characters in this are bitwise + * greater than or equal to the characters in <code>text</code>, FALSE otherwise + * @stable ICU 2.0 + */ + inline UBool operator>= (const UnicodeString& text) const; + + /** + * Less than or equal operator. Performs only bitwise comparison. + * @param text The UnicodeString to compare to this one. + * @return TRUE if the characters in this are bitwise + * less than or equal to the characters in <code>text</code>, FALSE otherwise + * @stable ICU 2.0 + */ + inline UBool operator<= (const UnicodeString& text) const; + + /** + * Compare the characters bitwise in this UnicodeString to + * the characters in <code>text</code>. + * @param text The UnicodeString to compare to this one. + * @return The result of bitwise character comparison: 0 if this + * contains the same characters as <code>text</code>, -1 if the characters in + * this are bitwise less than the characters in <code>text</code>, +1 if the + * characters in this are bitwise greater than the characters + * in <code>text</code>. + * @stable ICU 2.0 + */ + inline int8_t compare(const UnicodeString& text) const; + + /** + * Compare the characters bitwise in the range + * [<TT>start</TT>, <TT>start + length</TT>) with the characters + * in the <b>entire string</b> <TT>text</TT>. + * (The parameters "start" and "length" are not applied to the other text "text".) + * @param start the offset at which the compare operation begins + * @param length the number of characters of text to compare. + * @param text the other text to be compared against this string. + * @return The result of bitwise character comparison: 0 if this + * contains the same characters as <code>text</code>, -1 if the characters in + * this are bitwise less than the characters in <code>text</code>, +1 if the + * characters in this are bitwise greater than the characters + * in <code>text</code>. + * @stable ICU 2.0 + */ + inline int8_t compare(int32_t start, + int32_t length, + const UnicodeString& text) const; + + /** + * Compare the characters bitwise in the range + * [<TT>start</TT>, <TT>start + length</TT>) with the characters + * in <TT>srcText</TT> in the range + * [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>). + * @param start the offset at which the compare operation begins + * @param length the number of characters in this to compare. + * @param srcText the text to be compared + * @param srcStart the offset into <TT>srcText</TT> to start comparison + * @param srcLength the number of characters in <TT>src</TT> to compare + * @return The result of bitwise character comparison: 0 if this + * contains the same characters as <code>srcText</code>, -1 if the characters in + * this are bitwise less than the characters in <code>srcText</code>, +1 if the + * characters in this are bitwise greater than the characters + * in <code>srcText</code>. + * @stable ICU 2.0 + */ + inline int8_t compare(int32_t start, + int32_t length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const; + + /** + * Compare the characters bitwise in this UnicodeString with the first + * <TT>srcLength</TT> characters in <TT>srcChars</TT>. + * @param srcChars The characters to compare to this UnicodeString. + * @param srcLength the number of characters in <TT>srcChars</TT> to compare + * @return The result of bitwise character comparison: 0 if this + * contains the same characters as <code>srcChars</code>, -1 if the characters in + * this are bitwise less than the characters in <code>srcChars</code>, +1 if the + * characters in this are bitwise greater than the characters + * in <code>srcChars</code>. + * @stable ICU 2.0 + */ + inline int8_t compare(ConstChar16Ptr srcChars, + int32_t srcLength) const; + + /** + * Compare the characters bitwise in the range + * [<TT>start</TT>, <TT>start + length</TT>) with the first + * <TT>length</TT> characters in <TT>srcChars</TT> + * @param start the offset at which the compare operation begins + * @param length the number of characters to compare. + * @param srcChars the characters to be compared + * @return The result of bitwise character comparison: 0 if this + * contains the same characters as <code>srcChars</code>, -1 if the characters in + * this are bitwise less than the characters in <code>srcChars</code>, +1 if the + * characters in this are bitwise greater than the characters + * in <code>srcChars</code>. + * @stable ICU 2.0 + */ + inline int8_t compare(int32_t start, + int32_t length, + const char16_t *srcChars) const; + + /** + * Compare the characters bitwise in the range + * [<TT>start</TT>, <TT>start + length</TT>) with the characters + * in <TT>srcChars</TT> in the range + * [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>). + * @param start the offset at which the compare operation begins + * @param length the number of characters in this to compare + * @param srcChars the characters to be compared + * @param srcStart the offset into <TT>srcChars</TT> to start comparison + * @param srcLength the number of characters in <TT>srcChars</TT> to compare + * @return The result of bitwise character comparison: 0 if this + * contains the same characters as <code>srcChars</code>, -1 if the characters in + * this are bitwise less than the characters in <code>srcChars</code>, +1 if the + * characters in this are bitwise greater than the characters + * in <code>srcChars</code>. + * @stable ICU 2.0 + */ + inline int8_t compare(int32_t start, + int32_t length, + const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength) const; + + /** + * Compare the characters bitwise in the range + * [<TT>start</TT>, <TT>limit</TT>) with the characters + * in <TT>srcText</TT> in the range + * [<TT>srcStart</TT>, <TT>srcLimit</TT>). + * @param start the offset at which the compare operation begins + * @param limit the offset immediately following the compare operation + * @param srcText the text to be compared + * @param srcStart the offset into <TT>srcText</TT> to start comparison + * @param srcLimit the offset into <TT>srcText</TT> to limit comparison + * @return The result of bitwise character comparison: 0 if this + * contains the same characters as <code>srcText</code>, -1 if the characters in + * this are bitwise less than the characters in <code>srcText</code>, +1 if the + * characters in this are bitwise greater than the characters + * in <code>srcText</code>. + * @stable ICU 2.0 + */ + inline int8_t compareBetween(int32_t start, + int32_t limit, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLimit) const; + + /** + * Compare two Unicode strings in code point order. + * The result may be different from the results of compare(), operator<, etc. + * if supplementary characters are present: + * + * In UTF-16, supplementary characters (with code points U+10000 and above) are + * stored with pairs of surrogate code units. These have values from 0xd800 to 0xdfff, + * which means that they compare as less than some other BMP characters like U+feff. + * This function compares Unicode strings in code point order. + * If either of the UTF-16 strings is malformed (i.e., it contains unpaired surrogates), then the result is not defined. + * + * @param text Another string to compare this one to. + * @return a negative/zero/positive integer corresponding to whether + * this string is less than/equal to/greater than the second one + * in code point order + * @stable ICU 2.0 + */ + inline int8_t compareCodePointOrder(const UnicodeString& text) const; + + /** + * Compare two Unicode strings in code point order. + * The result may be different from the results of compare(), operator<, etc. + * if supplementary characters are present: + * + * In UTF-16, supplementary characters (with code points U+10000 and above) are + * stored with pairs of surrogate code units. These have values from 0xd800 to 0xdfff, + * which means that they compare as less than some other BMP characters like U+feff. + * This function compares Unicode strings in code point order. + * If either of the UTF-16 strings is malformed (i.e., it contains unpaired surrogates), then the result is not defined. + * + * @param start The start offset in this string at which the compare operation begins. + * @param length The number of code units from this string to compare. + * @param srcText Another string to compare this one to. + * @return a negative/zero/positive integer corresponding to whether + * this string is less than/equal to/greater than the second one + * in code point order + * @stable ICU 2.0 + */ + inline int8_t compareCodePointOrder(int32_t start, + int32_t length, + const UnicodeString& srcText) const; + + /** + * Compare two Unicode strings in code point order. + * The result may be different from the results of compare(), operator<, etc. + * if supplementary characters are present: + * + * In UTF-16, supplementary characters (with code points U+10000 and above) are + * stored with pairs of surrogate code units. These have values from 0xd800 to 0xdfff, + * which means that they compare as less than some other BMP characters like U+feff. + * This function compares Unicode strings in code point order. + * If either of the UTF-16 strings is malformed (i.e., it contains unpaired surrogates), then the result is not defined. + * + * @param start The start offset in this string at which the compare operation begins. + * @param length The number of code units from this string to compare. + * @param srcText Another string to compare this one to. + * @param srcStart The start offset in that string at which the compare operation begins. + * @param srcLength The number of code units from that string to compare. + * @return a negative/zero/positive integer corresponding to whether + * this string is less than/equal to/greater than the second one + * in code point order + * @stable ICU 2.0 + */ + inline int8_t compareCodePointOrder(int32_t start, + int32_t length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const; + + /** + * Compare two Unicode strings in code point order. + * The result may be different from the results of compare(), operator<, etc. + * if supplementary characters are present: + * + * In UTF-16, supplementary characters (with code points U+10000 and above) are + * stored with pairs of surrogate code units. These have values from 0xd800 to 0xdfff, + * which means that they compare as less than some other BMP characters like U+feff. + * This function compares Unicode strings in code point order. + * If either of the UTF-16 strings is malformed (i.e., it contains unpaired surrogates), then the result is not defined. + * + * @param srcChars A pointer to another string to compare this one to. + * @param srcLength The number of code units from that string to compare. + * @return a negative/zero/positive integer corresponding to whether + * this string is less than/equal to/greater than the second one + * in code point order + * @stable ICU 2.0 + */ + inline int8_t compareCodePointOrder(ConstChar16Ptr srcChars, + int32_t srcLength) const; + + /** + * Compare two Unicode strings in code point order. + * The result may be different from the results of compare(), operator<, etc. + * if supplementary characters are present: + * + * In UTF-16, supplementary characters (with code points U+10000 and above) are + * stored with pairs of surrogate code units. These have values from 0xd800 to 0xdfff, + * which means that they compare as less than some other BMP characters like U+feff. + * This function compares Unicode strings in code point order. + * If either of the UTF-16 strings is malformed (i.e., it contains unpaired surrogates), then the result is not defined. + * + * @param start The start offset in this string at which the compare operation begins. + * @param length The number of code units from this string to compare. + * @param srcChars A pointer to another string to compare this one to. + * @return a negative/zero/positive integer corresponding to whether + * this string is less than/equal to/greater than the second one + * in code point order + * @stable ICU 2.0 + */ + inline int8_t compareCodePointOrder(int32_t start, + int32_t length, + const char16_t *srcChars) const; + + /** + * Compare two Unicode strings in code point order. + * The result may be different from the results of compare(), operator<, etc. + * if supplementary characters are present: + * + * In UTF-16, supplementary characters (with code points U+10000 and above) are + * stored with pairs of surrogate code units. These have values from 0xd800 to 0xdfff, + * which means that they compare as less than some other BMP characters like U+feff. + * This function compares Unicode strings in code point order. + * If either of the UTF-16 strings is malformed (i.e., it contains unpaired surrogates), then the result is not defined. + * + * @param start The start offset in this string at which the compare operation begins. + * @param length The number of code units from this string to compare. + * @param srcChars A pointer to another string to compare this one to. + * @param srcStart The start offset in that string at which the compare operation begins. + * @param srcLength The number of code units from that string to compare. + * @return a negative/zero/positive integer corresponding to whether + * this string is less than/equal to/greater than the second one + * in code point order + * @stable ICU 2.0 + */ + inline int8_t compareCodePointOrder(int32_t start, + int32_t length, + const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength) const; + + /** + * Compare two Unicode strings in code point order. + * The result may be different from the results of compare(), operator<, etc. + * if supplementary characters are present: + * + * In UTF-16, supplementary characters (with code points U+10000 and above) are + * stored with pairs of surrogate code units. These have values from 0xd800 to 0xdfff, + * which means that they compare as less than some other BMP characters like U+feff. + * This function compares Unicode strings in code point order. + * If either of the UTF-16 strings is malformed (i.e., it contains unpaired surrogates), then the result is not defined. + * + * @param start The start offset in this string at which the compare operation begins. + * @param limit The offset after the last code unit from this string to compare. + * @param srcText Another string to compare this one to. + * @param srcStart The start offset in that string at which the compare operation begins. + * @param srcLimit The offset after the last code unit from that string to compare. + * @return a negative/zero/positive integer corresponding to whether + * this string is less than/equal to/greater than the second one + * in code point order + * @stable ICU 2.0 + */ + inline int8_t compareCodePointOrderBetween(int32_t start, + int32_t limit, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLimit) const; + + /** + * Compare two strings case-insensitively using full case folding. + * This is equivalent to this->foldCase(options).compare(text.foldCase(options)). + * + * @param text Another string to compare this one to. + * @param options A bit set of options: + * - U_FOLD_CASE_DEFAULT or 0 is used for default options: + * Comparison in code unit order with default case folding. + * + * - U_COMPARE_CODE_POINT_ORDER + * Set to choose code point order instead of code unit order + * (see u_strCompare for details). + * + * - U_FOLD_CASE_EXCLUDE_SPECIAL_I + * + * @return A negative, zero, or positive integer indicating the comparison result. + * @stable ICU 2.0 + */ + inline int8_t caseCompare(const UnicodeString& text, uint32_t options) const; + + /** + * Compare two strings case-insensitively using full case folding. + * This is equivalent to this->foldCase(options).compare(srcText.foldCase(options)). + * + * @param start The start offset in this string at which the compare operation begins. + * @param length The number of code units from this string to compare. + * @param srcText Another string to compare this one to. + * @param options A bit set of options: + * - U_FOLD_CASE_DEFAULT or 0 is used for default options: + * Comparison in code unit order with default case folding. + * + * - U_COMPARE_CODE_POINT_ORDER + * Set to choose code point order instead of code unit order + * (see u_strCompare for details). + * + * - U_FOLD_CASE_EXCLUDE_SPECIAL_I + * + * @return A negative, zero, or positive integer indicating the comparison result. + * @stable ICU 2.0 + */ + inline int8_t caseCompare(int32_t start, + int32_t length, + const UnicodeString& srcText, + uint32_t options) const; + + /** + * Compare two strings case-insensitively using full case folding. + * This is equivalent to this->foldCase(options).compare(srcText.foldCase(options)). + * + * @param start The start offset in this string at which the compare operation begins. + * @param length The number of code units from this string to compare. + * @param srcText Another string to compare this one to. + * @param srcStart The start offset in that string at which the compare operation begins. + * @param srcLength The number of code units from that string to compare. + * @param options A bit set of options: + * - U_FOLD_CASE_DEFAULT or 0 is used for default options: + * Comparison in code unit order with default case folding. + * + * - U_COMPARE_CODE_POINT_ORDER + * Set to choose code point order instead of code unit order + * (see u_strCompare for details). + * + * - U_FOLD_CASE_EXCLUDE_SPECIAL_I + * + * @return A negative, zero, or positive integer indicating the comparison result. + * @stable ICU 2.0 + */ + inline int8_t caseCompare(int32_t start, + int32_t length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength, + uint32_t options) const; + + /** + * Compare two strings case-insensitively using full case folding. + * This is equivalent to this->foldCase(options).compare(srcChars.foldCase(options)). + * + * @param srcChars A pointer to another string to compare this one to. + * @param srcLength The number of code units from that string to compare. + * @param options A bit set of options: + * - U_FOLD_CASE_DEFAULT or 0 is used for default options: + * Comparison in code unit order with default case folding. + * + * - U_COMPARE_CODE_POINT_ORDER + * Set to choose code point order instead of code unit order + * (see u_strCompare for details). + * + * - U_FOLD_CASE_EXCLUDE_SPECIAL_I + * + * @return A negative, zero, or positive integer indicating the comparison result. + * @stable ICU 2.0 + */ + inline int8_t caseCompare(ConstChar16Ptr srcChars, + int32_t srcLength, + uint32_t options) const; + + /** + * Compare two strings case-insensitively using full case folding. + * This is equivalent to this->foldCase(options).compare(srcChars.foldCase(options)). + * + * @param start The start offset in this string at which the compare operation begins. + * @param length The number of code units from this string to compare. + * @param srcChars A pointer to another string to compare this one to. + * @param options A bit set of options: + * - U_FOLD_CASE_DEFAULT or 0 is used for default options: + * Comparison in code unit order with default case folding. + * + * - U_COMPARE_CODE_POINT_ORDER + * Set to choose code point order instead of code unit order + * (see u_strCompare for details). + * + * - U_FOLD_CASE_EXCLUDE_SPECIAL_I + * + * @return A negative, zero, or positive integer indicating the comparison result. + * @stable ICU 2.0 + */ + inline int8_t caseCompare(int32_t start, + int32_t length, + const char16_t *srcChars, + uint32_t options) const; + + /** + * Compare two strings case-insensitively using full case folding. + * This is equivalent to this->foldCase(options).compare(srcChars.foldCase(options)). + * + * @param start The start offset in this string at which the compare operation begins. + * @param length The number of code units from this string to compare. + * @param srcChars A pointer to another string to compare this one to. + * @param srcStart The start offset in that string at which the compare operation begins. + * @param srcLength The number of code units from that string to compare. + * @param options A bit set of options: + * - U_FOLD_CASE_DEFAULT or 0 is used for default options: + * Comparison in code unit order with default case folding. + * + * - U_COMPARE_CODE_POINT_ORDER + * Set to choose code point order instead of code unit order + * (see u_strCompare for details). + * + * - U_FOLD_CASE_EXCLUDE_SPECIAL_I + * + * @return A negative, zero, or positive integer indicating the comparison result. + * @stable ICU 2.0 + */ + inline int8_t caseCompare(int32_t start, + int32_t length, + const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength, + uint32_t options) const; + + /** + * Compare two strings case-insensitively using full case folding. + * This is equivalent to this->foldCase(options).compareBetween(text.foldCase(options)). + * + * @param start The start offset in this string at which the compare operation begins. + * @param limit The offset after the last code unit from this string to compare. + * @param srcText Another string to compare this one to. + * @param srcStart The start offset in that string at which the compare operation begins. + * @param srcLimit The offset after the last code unit from that string to compare. + * @param options A bit set of options: + * - U_FOLD_CASE_DEFAULT or 0 is used for default options: + * Comparison in code unit order with default case folding. + * + * - U_COMPARE_CODE_POINT_ORDER + * Set to choose code point order instead of code unit order + * (see u_strCompare for details). + * + * - U_FOLD_CASE_EXCLUDE_SPECIAL_I + * + * @return A negative, zero, or positive integer indicating the comparison result. + * @stable ICU 2.0 + */ + inline int8_t caseCompareBetween(int32_t start, + int32_t limit, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLimit, + uint32_t options) const; + + /** + * Determine if this starts with the characters in <TT>text</TT> + * @param text The text to match. + * @return TRUE if this starts with the characters in <TT>text</TT>, + * FALSE otherwise + * @stable ICU 2.0 + */ + inline UBool startsWith(const UnicodeString& text) const; + + /** + * Determine if this starts with the characters in <TT>srcText</TT> + * in the range [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>). + * @param srcText The text to match. + * @param srcStart the offset into <TT>srcText</TT> to start matching + * @param srcLength the number of characters in <TT>srcText</TT> to match + * @return TRUE if this starts with the characters in <TT>text</TT>, + * FALSE otherwise + * @stable ICU 2.0 + */ + inline UBool startsWith(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const; + + /** + * Determine if this starts with the characters in <TT>srcChars</TT> + * @param srcChars The characters to match. + * @param srcLength the number of characters in <TT>srcChars</TT> + * @return TRUE if this starts with the characters in <TT>srcChars</TT>, + * FALSE otherwise + * @stable ICU 2.0 + */ + inline UBool startsWith(ConstChar16Ptr srcChars, + int32_t srcLength) const; + + /** + * Determine if this ends with the characters in <TT>srcChars</TT> + * in the range [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>). + * @param srcChars The characters to match. + * @param srcStart the offset into <TT>srcText</TT> to start matching + * @param srcLength the number of characters in <TT>srcChars</TT> to match + * @return TRUE if this ends with the characters in <TT>srcChars</TT>, FALSE otherwise + * @stable ICU 2.0 + */ + inline UBool startsWith(const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength) const; + + /** + * Determine if this ends with the characters in <TT>text</TT> + * @param text The text to match. + * @return TRUE if this ends with the characters in <TT>text</TT>, + * FALSE otherwise + * @stable ICU 2.0 + */ + inline UBool endsWith(const UnicodeString& text) const; + + /** + * Determine if this ends with the characters in <TT>srcText</TT> + * in the range [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>). + * @param srcText The text to match. + * @param srcStart the offset into <TT>srcText</TT> to start matching + * @param srcLength the number of characters in <TT>srcText</TT> to match + * @return TRUE if this ends with the characters in <TT>text</TT>, + * FALSE otherwise + * @stable ICU 2.0 + */ + inline UBool endsWith(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const; + + /** + * Determine if this ends with the characters in <TT>srcChars</TT> + * @param srcChars The characters to match. + * @param srcLength the number of characters in <TT>srcChars</TT> + * @return TRUE if this ends with the characters in <TT>srcChars</TT>, + * FALSE otherwise + * @stable ICU 2.0 + */ + inline UBool endsWith(ConstChar16Ptr srcChars, + int32_t srcLength) const; + + /** + * Determine if this ends with the characters in <TT>srcChars</TT> + * in the range [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>). + * @param srcChars The characters to match. + * @param srcStart the offset into <TT>srcText</TT> to start matching + * @param srcLength the number of characters in <TT>srcChars</TT> to match + * @return TRUE if this ends with the characters in <TT>srcChars</TT>, + * FALSE otherwise + * @stable ICU 2.0 + */ + inline UBool endsWith(const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength) const; + + + /* Searching - bitwise only */ + + /** + * Locate in this the first occurrence of the characters in <TT>text</TT>, + * using bitwise comparison. + * @param text The text to search for. + * @return The offset into this of the start of <TT>text</TT>, + * or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t indexOf(const UnicodeString& text) const; + + /** + * Locate in this the first occurrence of the characters in <TT>text</TT> + * starting at offset <TT>start</TT>, using bitwise comparison. + * @param text The text to search for. + * @param start The offset at which searching will start. + * @return The offset into this of the start of <TT>text</TT>, + * or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t indexOf(const UnicodeString& text, + int32_t start) const; + + /** + * Locate in this the first occurrence in the range + * [<TT>start</TT>, <TT>start + length</TT>) of the characters + * in <TT>text</TT>, using bitwise comparison. + * @param text The text to search for. + * @param start The offset at which searching will start. + * @param length The number of characters to search + * @return The offset into this of the start of <TT>text</TT>, + * or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t indexOf(const UnicodeString& text, + int32_t start, + int32_t length) const; + + /** + * Locate in this the first occurrence in the range + * [<TT>start</TT>, <TT>start + length</TT>) of the characters + * in <TT>srcText</TT> in the range + * [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>), + * using bitwise comparison. + * @param srcText The text to search for. + * @param srcStart the offset into <TT>srcText</TT> at which + * to start matching + * @param srcLength the number of characters in <TT>srcText</TT> to match + * @param start the offset into this at which to start matching + * @param length the number of characters in this to search + * @return The offset into this of the start of <TT>text</TT>, + * or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t indexOf(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength, + int32_t start, + int32_t length) const; + + /** + * Locate in this the first occurrence of the characters in + * <TT>srcChars</TT> + * starting at offset <TT>start</TT>, using bitwise comparison. + * @param srcChars The text to search for. + * @param srcLength the number of characters in <TT>srcChars</TT> to match + * @param start the offset into this at which to start matching + * @return The offset into this of the start of <TT>text</TT>, + * or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t indexOf(const char16_t *srcChars, + int32_t srcLength, + int32_t start) const; + + /** + * Locate in this the first occurrence in the range + * [<TT>start</TT>, <TT>start + length</TT>) of the characters + * in <TT>srcChars</TT>, using bitwise comparison. + * @param srcChars The text to search for. + * @param srcLength the number of characters in <TT>srcChars</TT> + * @param start The offset at which searching will start. + * @param length The number of characters to search + * @return The offset into this of the start of <TT>srcChars</TT>, + * or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t indexOf(ConstChar16Ptr srcChars, + int32_t srcLength, + int32_t start, + int32_t length) const; + + /** + * Locate in this the first occurrence in the range + * [<TT>start</TT>, <TT>start + length</TT>) of the characters + * in <TT>srcChars</TT> in the range + * [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>), + * using bitwise comparison. + * @param srcChars The text to search for. + * @param srcStart the offset into <TT>srcChars</TT> at which + * to start matching + * @param srcLength the number of characters in <TT>srcChars</TT> to match + * @param start the offset into this at which to start matching + * @param length the number of characters in this to search + * @return The offset into this of the start of <TT>text</TT>, + * or -1 if not found. + * @stable ICU 2.0 + */ + int32_t indexOf(const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength, + int32_t start, + int32_t length) const; + + /** + * Locate in this the first occurrence of the BMP code point <code>c</code>, + * using bitwise comparison. + * @param c The code unit to search for. + * @return The offset into this of <TT>c</TT>, or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t indexOf(char16_t c) const; + + /** + * Locate in this the first occurrence of the code point <TT>c</TT>, + * using bitwise comparison. + * + * @param c The code point to search for. + * @return The offset into this of <TT>c</TT>, or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t indexOf(UChar32 c) const; + + /** + * Locate in this the first occurrence of the BMP code point <code>c</code>, + * starting at offset <TT>start</TT>, using bitwise comparison. + * @param c The code unit to search for. + * @param start The offset at which searching will start. + * @return The offset into this of <TT>c</TT>, or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t indexOf(char16_t c, + int32_t start) const; + + /** + * Locate in this the first occurrence of the code point <TT>c</TT> + * starting at offset <TT>start</TT>, using bitwise comparison. + * + * @param c The code point to search for. + * @param start The offset at which searching will start. + * @return The offset into this of <TT>c</TT>, or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t indexOf(UChar32 c, + int32_t start) const; + + /** + * Locate in this the first occurrence of the BMP code point <code>c</code> + * in the range [<TT>start</TT>, <TT>start + length</TT>), + * using bitwise comparison. + * @param c The code unit to search for. + * @param start the offset into this at which to start matching + * @param length the number of characters in this to search + * @return The offset into this of <TT>c</TT>, or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t indexOf(char16_t c, + int32_t start, + int32_t length) const; + + /** + * Locate in this the first occurrence of the code point <TT>c</TT> + * in the range [<TT>start</TT>, <TT>start + length</TT>), + * using bitwise comparison. + * + * @param c The code point to search for. + * @param start the offset into this at which to start matching + * @param length the number of characters in this to search + * @return The offset into this of <TT>c</TT>, or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t indexOf(UChar32 c, + int32_t start, + int32_t length) const; + + /** + * Locate in this the last occurrence of the characters in <TT>text</TT>, + * using bitwise comparison. + * @param text The text to search for. + * @return The offset into this of the start of <TT>text</TT>, + * or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t lastIndexOf(const UnicodeString& text) const; + + /** + * Locate in this the last occurrence of the characters in <TT>text</TT> + * starting at offset <TT>start</TT>, using bitwise comparison. + * @param text The text to search for. + * @param start The offset at which searching will start. + * @return The offset into this of the start of <TT>text</TT>, + * or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t lastIndexOf(const UnicodeString& text, + int32_t start) const; + + /** + * Locate in this the last occurrence in the range + * [<TT>start</TT>, <TT>start + length</TT>) of the characters + * in <TT>text</TT>, using bitwise comparison. + * @param text The text to search for. + * @param start The offset at which searching will start. + * @param length The number of characters to search + * @return The offset into this of the start of <TT>text</TT>, + * or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t lastIndexOf(const UnicodeString& text, + int32_t start, + int32_t length) const; + + /** + * Locate in this the last occurrence in the range + * [<TT>start</TT>, <TT>start + length</TT>) of the characters + * in <TT>srcText</TT> in the range + * [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>), + * using bitwise comparison. + * @param srcText The text to search for. + * @param srcStart the offset into <TT>srcText</TT> at which + * to start matching + * @param srcLength the number of characters in <TT>srcText</TT> to match + * @param start the offset into this at which to start matching + * @param length the number of characters in this to search + * @return The offset into this of the start of <TT>text</TT>, + * or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t lastIndexOf(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength, + int32_t start, + int32_t length) const; + + /** + * Locate in this the last occurrence of the characters in <TT>srcChars</TT> + * starting at offset <TT>start</TT>, using bitwise comparison. + * @param srcChars The text to search for. + * @param srcLength the number of characters in <TT>srcChars</TT> to match + * @param start the offset into this at which to start matching + * @return The offset into this of the start of <TT>text</TT>, + * or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t lastIndexOf(const char16_t *srcChars, + int32_t srcLength, + int32_t start) const; + + /** + * Locate in this the last occurrence in the range + * [<TT>start</TT>, <TT>start + length</TT>) of the characters + * in <TT>srcChars</TT>, using bitwise comparison. + * @param srcChars The text to search for. + * @param srcLength the number of characters in <TT>srcChars</TT> + * @param start The offset at which searching will start. + * @param length The number of characters to search + * @return The offset into this of the start of <TT>srcChars</TT>, + * or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t lastIndexOf(ConstChar16Ptr srcChars, + int32_t srcLength, + int32_t start, + int32_t length) const; + + /** + * Locate in this the last occurrence in the range + * [<TT>start</TT>, <TT>start + length</TT>) of the characters + * in <TT>srcChars</TT> in the range + * [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>), + * using bitwise comparison. + * @param srcChars The text to search for. + * @param srcStart the offset into <TT>srcChars</TT> at which + * to start matching + * @param srcLength the number of characters in <TT>srcChars</TT> to match + * @param start the offset into this at which to start matching + * @param length the number of characters in this to search + * @return The offset into this of the start of <TT>text</TT>, + * or -1 if not found. + * @stable ICU 2.0 + */ + int32_t lastIndexOf(const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength, + int32_t start, + int32_t length) const; + + /** + * Locate in this the last occurrence of the BMP code point <code>c</code>, + * using bitwise comparison. + * @param c The code unit to search for. + * @return The offset into this of <TT>c</TT>, or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t lastIndexOf(char16_t c) const; + + /** + * Locate in this the last occurrence of the code point <TT>c</TT>, + * using bitwise comparison. + * + * @param c The code point to search for. + * @return The offset into this of <TT>c</TT>, or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t lastIndexOf(UChar32 c) const; + + /** + * Locate in this the last occurrence of the BMP code point <code>c</code> + * starting at offset <TT>start</TT>, using bitwise comparison. + * @param c The code unit to search for. + * @param start The offset at which searching will start. + * @return The offset into this of <TT>c</TT>, or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t lastIndexOf(char16_t c, + int32_t start) const; + + /** + * Locate in this the last occurrence of the code point <TT>c</TT> + * starting at offset <TT>start</TT>, using bitwise comparison. + * + * @param c The code point to search for. + * @param start The offset at which searching will start. + * @return The offset into this of <TT>c</TT>, or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t lastIndexOf(UChar32 c, + int32_t start) const; + + /** + * Locate in this the last occurrence of the BMP code point <code>c</code> + * in the range [<TT>start</TT>, <TT>start + length</TT>), + * using bitwise comparison. + * @param c The code unit to search for. + * @param start the offset into this at which to start matching + * @param length the number of characters in this to search + * @return The offset into this of <TT>c</TT>, or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t lastIndexOf(char16_t c, + int32_t start, + int32_t length) const; + + /** + * Locate in this the last occurrence of the code point <TT>c</TT> + * in the range [<TT>start</TT>, <TT>start + length</TT>), + * using bitwise comparison. + * + * @param c The code point to search for. + * @param start the offset into this at which to start matching + * @param length the number of characters in this to search + * @return The offset into this of <TT>c</TT>, or -1 if not found. + * @stable ICU 2.0 + */ + inline int32_t lastIndexOf(UChar32 c, + int32_t start, + int32_t length) const; + + + /* Character access */ + + /** + * Return the code unit at offset <tt>offset</tt>. + * If the offset is not valid (0..length()-1) then U+ffff is returned. + * @param offset a valid offset into the text + * @return the code unit at offset <tt>offset</tt> + * or 0xffff if the offset is not valid for this string + * @stable ICU 2.0 + */ + inline char16_t charAt(int32_t offset) const; + + /** + * Return the code unit at offset <tt>offset</tt>. + * If the offset is not valid (0..length()-1) then U+ffff is returned. + * @param offset a valid offset into the text + * @return the code unit at offset <tt>offset</tt> + * @stable ICU 2.0 + */ + inline char16_t operator[] (int32_t offset) const; + + /** + * Return the code point that contains the code unit + * at offset <tt>offset</tt>. + * If the offset is not valid (0..length()-1) then U+ffff is returned. + * @param offset a valid offset into the text + * that indicates the text offset of any of the code units + * that will be assembled into a code point (21-bit value) and returned + * @return the code point of text at <tt>offset</tt> + * or 0xffff if the offset is not valid for this string + * @stable ICU 2.0 + */ + UChar32 char32At(int32_t offset) const; + + /** + * Adjust a random-access offset so that + * it points to the beginning of a Unicode character. + * The offset that is passed in points to + * any code unit of a code point, + * while the returned offset will point to the first code unit + * of the same code point. + * In UTF-16, if the input offset points to a second surrogate + * of a surrogate pair, then the returned offset will point + * to the first surrogate. + * @param offset a valid offset into one code point of the text + * @return offset of the first code unit of the same code point + * @see U16_SET_CP_START + * @stable ICU 2.0 + */ + int32_t getChar32Start(int32_t offset) const; + + /** + * Adjust a random-access offset so that + * it points behind a Unicode character. + * The offset that is passed in points behind + * any code unit of a code point, + * while the returned offset will point behind the last code unit + * of the same code point. + * In UTF-16, if the input offset points behind the first surrogate + * (i.e., to the second surrogate) + * of a surrogate pair, then the returned offset will point + * behind the second surrogate (i.e., to the first surrogate). + * @param offset a valid offset after any code unit of a code point of the text + * @return offset of the first code unit after the same code point + * @see U16_SET_CP_LIMIT + * @stable ICU 2.0 + */ + int32_t getChar32Limit(int32_t offset) const; + + /** + * Move the code unit index along the string by delta code points. + * Interpret the input index as a code unit-based offset into the string, + * move the index forward or backward by delta code points, and + * return the resulting index. + * The input index should point to the first code unit of a code point, + * if there is more than one. + * + * Both input and output indexes are code unit-based as for all + * string indexes/offsets in ICU (and other libraries, like MBCS char*). + * If delta<0 then the index is moved backward (toward the start of the string). + * If delta>0 then the index is moved forward (toward the end of the string). + * + * This behaves like CharacterIterator::move32(delta, kCurrent). + * + * Behavior for out-of-bounds indexes: + * <code>moveIndex32</code> pins the input index to 0..length(), i.e., + * if the input index<0 then it is pinned to 0; + * if it is index>length() then it is pinned to length(). + * Afterwards, the index is moved by <code>delta</code> code points + * forward or backward, + * but no further backward than to 0 and no further forward than to length(). + * The resulting index return value will be in between 0 and length(), inclusively. + * + * Examples: + * <pre> + * // s has code points 'a' U+10000 'b' U+10ffff U+2029 + * UnicodeString s=UNICODE_STRING("a\\U00010000b\\U0010ffff\\u2029", 31).unescape(); + * + * // initial index: position of U+10000 + * int32_t index=1; + * + * // the following examples will all result in index==4, position of U+10ffff + * + * // skip 2 code points from some position in the string + * index=s.moveIndex32(index, 2); // skips U+10000 and 'b' + * + * // go to the 3rd code point from the start of s (0-based) + * index=s.moveIndex32(0, 3); // skips 'a', U+10000, and 'b' + * + * // go to the next-to-last code point of s + * index=s.moveIndex32(s.length(), -2); // backward-skips U+2029 and U+10ffff + * </pre> + * + * @param index input code unit index + * @param delta (signed) code point count to move the index forward or backward + * in the string + * @return the resulting code unit index + * @stable ICU 2.0 + */ + int32_t moveIndex32(int32_t index, int32_t delta) const; + + /* Substring extraction */ + + /** + * Copy the characters in the range + * [<tt>start</tt>, <tt>start + length</tt>) into the array <tt>dst</tt>, + * beginning at <tt>dstStart</tt>. + * If the string aliases to <code>dst</code> itself as an external buffer, + * then extract() will not copy the contents. + * + * @param start offset of first character which will be copied into the array + * @param length the number of characters to extract + * @param dst array in which to copy characters. The length of <tt>dst</tt> + * must be at least (<tt>dstStart + length</tt>). + * @param dstStart the offset in <TT>dst</TT> where the first character + * will be extracted + * @stable ICU 2.0 + */ + inline void extract(int32_t start, + int32_t length, + Char16Ptr dst, + int32_t dstStart = 0) const; + + /** + * Copy the contents of the string into dest. + * This is a convenience function that + * checks if there is enough space in dest, + * extracts the entire string if possible, + * and NUL-terminates dest if possible. + * + * If the string fits into dest but cannot be NUL-terminated + * (length()==destCapacity) then the error code is set to U_STRING_NOT_TERMINATED_WARNING. + * If the string itself does not fit into dest + * (length()>destCapacity) then the error code is set to U_BUFFER_OVERFLOW_ERROR. + * + * If the string aliases to <code>dest</code> itself as an external buffer, + * then extract() will not copy the contents. + * + * @param dest Destination string buffer. + * @param destCapacity Number of char16_ts available at dest. + * @param errorCode ICU error code. + * @return length() + * @stable ICU 2.0 + */ + int32_t + extract(Char16Ptr dest, int32_t destCapacity, + UErrorCode &errorCode) const; + + /** + * Copy the characters in the range + * [<tt>start</tt>, <tt>start + length</tt>) into the UnicodeString + * <tt>target</tt>. + * @param start offset of first character which will be copied + * @param length the number of characters to extract + * @param target UnicodeString into which to copy characters. + * @return A reference to <TT>target</TT> + * @stable ICU 2.0 + */ + inline void extract(int32_t start, + int32_t length, + UnicodeString& target) const; + + /** + * Copy the characters in the range [<tt>start</tt>, <tt>limit</tt>) + * into the array <tt>dst</tt>, beginning at <tt>dstStart</tt>. + * @param start offset of first character which will be copied into the array + * @param limit offset immediately following the last character to be copied + * @param dst array in which to copy characters. The length of <tt>dst</tt> + * must be at least (<tt>dstStart + (limit - start)</tt>). + * @param dstStart the offset in <TT>dst</TT> where the first character + * will be extracted + * @stable ICU 2.0 + */ + inline void extractBetween(int32_t start, + int32_t limit, + char16_t *dst, + int32_t dstStart = 0) const; + + /** + * Copy the characters in the range [<tt>start</tt>, <tt>limit</tt>) + * into the UnicodeString <tt>target</tt>. Replaceable API. + * @param start offset of first character which will be copied + * @param limit offset immediately following the last character to be copied + * @param target UnicodeString into which to copy characters. + * @return A reference to <TT>target</TT> + * @stable ICU 2.0 + */ + virtual void extractBetween(int32_t start, + int32_t limit, + UnicodeString& target) const; + + /** + * Copy the characters in the range + * [<tt>start</TT>, <tt>start + startLength</TT>) into an array of characters. + * All characters must be invariant (see utypes.h). + * Use US_INV as the last, signature-distinguishing parameter. + * + * This function does not write any more than <code>targetCapacity</code> + * characters but returns the length of the entire output string + * so that one can allocate a larger buffer and call the function again + * if necessary. + * The output string is NUL-terminated if possible. + * + * @param start offset of first character which will be copied + * @param startLength the number of characters to extract + * @param target the target buffer for extraction, can be NULL + * if targetLength is 0 + * @param targetCapacity the length of the target buffer + * @param inv Signature-distinguishing paramater, use US_INV. + * @return the output string length, not including the terminating NUL + * @stable ICU 3.2 + */ + int32_t extract(int32_t start, + int32_t startLength, + char *target, + int32_t targetCapacity, + enum EInvariant inv) const; + +#if U_CHARSET_IS_UTF8 || !UCONFIG_NO_CONVERSION + + /** + * Copy the characters in the range + * [<tt>start</TT>, <tt>start + length</TT>) into an array of characters + * in the platform's default codepage. + * This function does not write any more than <code>targetLength</code> + * characters but returns the length of the entire output string + * so that one can allocate a larger buffer and call the function again + * if necessary. + * The output string is NUL-terminated if possible. + * + * @param start offset of first character which will be copied + * @param startLength the number of characters to extract + * @param target the target buffer for extraction + * @param targetLength the length of the target buffer + * If <TT>target</TT> is NULL, then the number of bytes required for + * <TT>target</TT> is returned. + * @return the output string length, not including the terminating NUL + * @stable ICU 2.0 + */ + int32_t extract(int32_t start, + int32_t startLength, + char *target, + uint32_t targetLength) const; + +#endif + +#if !UCONFIG_NO_CONVERSION + + /** + * Copy the characters in the range + * [<tt>start</TT>, <tt>start + length</TT>) into an array of characters + * in a specified codepage. + * The output string is NUL-terminated. + * + * Recommendation: For invariant-character strings use + * extract(int32_t start, int32_t length, char *target, int32_t targetCapacity, enum EInvariant inv) const + * because it avoids object code dependencies of UnicodeString on + * the conversion code. + * + * @param start offset of first character which will be copied + * @param startLength the number of characters to extract + * @param target the target buffer for extraction + * @param codepage the desired codepage for the characters. 0 has + * the special meaning of the default codepage + * If <code>codepage</code> is an empty string (<code>""</code>), + * then a simple conversion is performed on the codepage-invariant + * subset ("invariant characters") of the platform encoding. See utypes.h. + * If <TT>target</TT> is NULL, then the number of bytes required for + * <TT>target</TT> is returned. It is assumed that the target is big enough + * to fit all of the characters. + * @return the output string length, not including the terminating NUL + * @stable ICU 2.0 + */ + inline int32_t extract(int32_t start, + int32_t startLength, + char *target, + const char *codepage = 0) const; + + /** + * Copy the characters in the range + * [<tt>start</TT>, <tt>start + length</TT>) into an array of characters + * in a specified codepage. + * This function does not write any more than <code>targetLength</code> + * characters but returns the length of the entire output string + * so that one can allocate a larger buffer and call the function again + * if necessary. + * The output string is NUL-terminated if possible. + * + * Recommendation: For invariant-character strings use + * extract(int32_t start, int32_t length, char *target, int32_t targetCapacity, enum EInvariant inv) const + * because it avoids object code dependencies of UnicodeString on + * the conversion code. + * + * @param start offset of first character which will be copied + * @param startLength the number of characters to extract + * @param target the target buffer for extraction + * @param targetLength the length of the target buffer + * @param codepage the desired codepage for the characters. 0 has + * the special meaning of the default codepage + * If <code>codepage</code> is an empty string (<code>""</code>), + * then a simple conversion is performed on the codepage-invariant + * subset ("invariant characters") of the platform encoding. See utypes.h. + * If <TT>target</TT> is NULL, then the number of bytes required for + * <TT>target</TT> is returned. + * @return the output string length, not including the terminating NUL + * @stable ICU 2.0 + */ + int32_t extract(int32_t start, + int32_t startLength, + char *target, + uint32_t targetLength, + const char *codepage) const; + + /** + * Convert the UnicodeString into a codepage string using an existing UConverter. + * The output string is NUL-terminated if possible. + * + * This function avoids the overhead of opening and closing a converter if + * multiple strings are extracted. + * + * @param dest destination string buffer, can be NULL if destCapacity==0 + * @param destCapacity the number of chars available at dest + * @param cnv the converter object to be used (ucnv_resetFromUnicode() will be called), + * or NULL for the default converter + * @param errorCode normal ICU error code + * @return the length of the output string, not counting the terminating NUL; + * if the length is greater than destCapacity, then the string will not fit + * and a buffer of the indicated length would need to be passed in + * @stable ICU 2.0 + */ + int32_t extract(char *dest, int32_t destCapacity, + UConverter *cnv, + UErrorCode &errorCode) const; + +#endif + + /** + * Create a temporary substring for the specified range. + * Unlike the substring constructor and setTo() functions, + * the object returned here will be a read-only alias (using getBuffer()) + * rather than copying the text. + * As a result, this substring operation is much faster but requires + * that the original string not be modified or deleted during the lifetime + * of the returned substring object. + * @param start offset of the first character visible in the substring + * @param length length of the substring + * @return a read-only alias UnicodeString object for the substring + * @stable ICU 4.4 + */ + UnicodeString tempSubString(int32_t start=0, int32_t length=INT32_MAX) const; + + /** + * Create a temporary substring for the specified range. + * Same as tempSubString(start, length) except that the substring range + * is specified as a (start, limit) pair (with an exclusive limit index) + * rather than a (start, length) pair. + * @param start offset of the first character visible in the substring + * @param limit offset immediately following the last character visible in the substring + * @return a read-only alias UnicodeString object for the substring + * @stable ICU 4.4 + */ + inline UnicodeString tempSubStringBetween(int32_t start, int32_t limit=INT32_MAX) const; + + /** + * Convert the UnicodeString to UTF-8 and write the result + * to a ByteSink. This is called by toUTF8String(). + * Unpaired surrogates are replaced with U+FFFD. + * Calls u_strToUTF8WithSub(). + * + * @param sink A ByteSink to which the UTF-8 version of the string is written. + * sink.Flush() is called at the end. + * @stable ICU 4.2 + * @see toUTF8String + */ + void toUTF8(ByteSink &sink) const; + + /** + * Convert the UnicodeString to UTF-8 and append the result + * to a standard string. + * Unpaired surrogates are replaced with U+FFFD. + * Calls toUTF8(). + * + * @param result A standard string (or a compatible object) + * to which the UTF-8 version of the string is appended. + * @return The string object. + * @stable ICU 4.2 + * @see toUTF8 + */ + template<typename StringClass> + StringClass &toUTF8String(StringClass &result) const { + StringByteSink<StringClass> sbs(&result, length()); + toUTF8(sbs); + return result; + } + + /** + * Convert the UnicodeString to UTF-32. + * Unpaired surrogates are replaced with U+FFFD. + * Calls u_strToUTF32WithSub(). + * + * @param utf32 destination string buffer, can be NULL if capacity==0 + * @param capacity the number of UChar32s available at utf32 + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return The length of the UTF-32 string. + * @see fromUTF32 + * @stable ICU 4.2 + */ + int32_t toUTF32(UChar32 *utf32, int32_t capacity, UErrorCode &errorCode) const; + + /* Length operations */ + + /** + * Return the length of the UnicodeString object. + * The length is the number of char16_t code units are in the UnicodeString. + * If you want the number of code points, please use countChar32(). + * @return the length of the UnicodeString object + * @see countChar32 + * @stable ICU 2.0 + */ + inline int32_t length(void) const; + + /** + * Count Unicode code points in the length char16_t code units of the string. + * A code point may occupy either one or two char16_t code units. + * Counting code points involves reading all code units. + * + * This functions is basically the inverse of moveIndex32(). + * + * @param start the index of the first code unit to check + * @param length the number of char16_t code units to check + * @return the number of code points in the specified code units + * @see length + * @stable ICU 2.0 + */ + int32_t + countChar32(int32_t start=0, int32_t length=INT32_MAX) const; + + /** + * Check if the length char16_t code units of the string + * contain more Unicode code points than a certain number. + * This is more efficient than counting all code points in this part of the string + * and comparing that number with a threshold. + * This function may not need to scan the string at all if the length + * falls within a certain range, and + * never needs to count more than 'number+1' code points. + * Logically equivalent to (countChar32(start, length)>number). + * A Unicode code point may occupy either one or two char16_t code units. + * + * @param start the index of the first code unit to check (0 for the entire string) + * @param length the number of char16_t code units to check + * (use INT32_MAX for the entire string; remember that start/length + * values are pinned) + * @param number The number of code points in the (sub)string is compared against + * the 'number' parameter. + * @return Boolean value for whether the string contains more Unicode code points + * than 'number'. Same as (u_countChar32(s, length)>number). + * @see countChar32 + * @see u_strHasMoreChar32Than + * @stable ICU 2.4 + */ + UBool + hasMoreChar32Than(int32_t start, int32_t length, int32_t number) const; + + /** + * Determine if this string is empty. + * @return TRUE if this string contains 0 characters, FALSE otherwise. + * @stable ICU 2.0 + */ + inline UBool isEmpty(void) const; + + /** + * Return the capacity of the internal buffer of the UnicodeString object. + * This is useful together with the getBuffer functions. + * See there for details. + * + * @return the number of char16_ts available in the internal buffer + * @see getBuffer + * @stable ICU 2.0 + */ + inline int32_t getCapacity(void) const; + + /* Other operations */ + + /** + * Generate a hash code for this object. + * @return The hash code of this UnicodeString. + * @stable ICU 2.0 + */ + inline int32_t hashCode(void) const; + + /** + * Determine if this object contains a valid string. + * A bogus string has no value. It is different from an empty string, + * although in both cases isEmpty() returns TRUE and length() returns 0. + * setToBogus() and isBogus() can be used to indicate that no string value is available. + * For a bogus string, getBuffer() and getTerminatedBuffer() return NULL, and + * length() returns 0. + * + * @return TRUE if the string is bogus/invalid, FALSE otherwise + * @see setToBogus() + * @stable ICU 2.0 + */ + inline UBool isBogus(void) const; + + + //======================================== + // Write operations + //======================================== + + /* Assignment operations */ + + /** + * Assignment operator. Replace the characters in this UnicodeString + * with the characters from <TT>srcText</TT>. + * + * Starting with ICU 2.4, the assignment operator and the copy constructor + * allocate a new buffer and copy the buffer contents even for readonly aliases. + * By contrast, the fastCopyFrom() function implements the old, + * more efficient but less safe behavior + * of making this string also a readonly alias to the same buffer. + * + * If the source object has an "open" buffer from getBuffer(minCapacity), + * then the copy is an empty string. + * + * @param srcText The text containing the characters to replace + * @return a reference to this + * @stable ICU 2.0 + * @see fastCopyFrom + */ + UnicodeString &operator=(const UnicodeString &srcText); + + /** + * Almost the same as the assignment operator. + * Replace the characters in this UnicodeString + * with the characters from <code>srcText</code>. + * + * This function works the same as the assignment operator + * for all strings except for ones that are readonly aliases. + * + * Starting with ICU 2.4, the assignment operator and the copy constructor + * allocate a new buffer and copy the buffer contents even for readonly aliases. + * This function implements the old, more efficient but less safe behavior + * of making this string also a readonly alias to the same buffer. + * + * The fastCopyFrom function must be used only if it is known that the lifetime of + * this UnicodeString does not exceed the lifetime of the aliased buffer + * including its contents, for example for strings from resource bundles + * or aliases to string constants. + * + * If the source object has an "open" buffer from getBuffer(minCapacity), + * then the copy is an empty string. + * + * @param src The text containing the characters to replace. + * @return a reference to this + * @stable ICU 2.4 + */ + UnicodeString &fastCopyFrom(const UnicodeString &src); + + /** + * Move assignment operator, might leave src in bogus state. + * This string will have the same contents and state that the source string had. + * The behavior is undefined if *this and src are the same object. + * @param src source string + * @return *this + * @stable ICU 56 + */ + UnicodeString &operator=(UnicodeString &&src) U_NOEXCEPT { + return moveFrom(src); + } + + // do not use #ifndef U_HIDE_DRAFT_API for moveFrom, needed by non-draft API + /** + * Move assignment, might leave src in bogus state. + * This string will have the same contents and state that the source string had. + * The behavior is undefined if *this and src are the same object. + * + * Can be called explicitly, does not need C++11 support. + * @param src source string + * @return *this + * @draft ICU 56 + */ + UnicodeString &moveFrom(UnicodeString &src) U_NOEXCEPT; + + /** + * Swap strings. + * @param other other string + * @stable ICU 56 + */ + void swap(UnicodeString &other) U_NOEXCEPT; + + /** + * Non-member UnicodeString swap function. + * @param s1 will get s2's contents and state + * @param s2 will get s1's contents and state + * @stable ICU 56 + */ + friend U_COMMON_API inline void U_EXPORT2 + swap(UnicodeString &s1, UnicodeString &s2) U_NOEXCEPT { + s1.swap(s2); + } + + /** + * Assignment operator. Replace the characters in this UnicodeString + * with the code unit <TT>ch</TT>. + * @param ch the code unit to replace + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& operator= (char16_t ch); + + /** + * Assignment operator. Replace the characters in this UnicodeString + * with the code point <TT>ch</TT>. + * @param ch the code point to replace + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& operator= (UChar32 ch); + + /** + * Set the text in the UnicodeString object to the characters + * in <TT>srcText</TT> in the range + * [<TT>srcStart</TT>, <TT>srcText.length()</TT>). + * <TT>srcText</TT> is not modified. + * @param srcText the source for the new characters + * @param srcStart the offset into <TT>srcText</TT> where new characters + * will be obtained + * @return a reference to this + * @stable ICU 2.2 + */ + inline UnicodeString& setTo(const UnicodeString& srcText, + int32_t srcStart); + + /** + * Set the text in the UnicodeString object to the characters + * in <TT>srcText</TT> in the range + * [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>). + * <TT>srcText</TT> is not modified. + * @param srcText the source for the new characters + * @param srcStart the offset into <TT>srcText</TT> where new characters + * will be obtained + * @param srcLength the number of characters in <TT>srcText</TT> in the + * replace string. + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& setTo(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength); + + /** + * Set the text in the UnicodeString object to the characters in + * <TT>srcText</TT>. + * <TT>srcText</TT> is not modified. + * @param srcText the source for the new characters + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& setTo(const UnicodeString& srcText); + + /** + * Set the characters in the UnicodeString object to the characters + * in <TT>srcChars</TT>. <TT>srcChars</TT> is not modified. + * @param srcChars the source for the new characters + * @param srcLength the number of Unicode characters in srcChars. + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& setTo(const char16_t *srcChars, + int32_t srcLength); + + /** + * Set the characters in the UnicodeString object to the code unit + * <TT>srcChar</TT>. + * @param srcChar the code unit which becomes the UnicodeString's character + * content + * @return a reference to this + * @stable ICU 2.0 + */ + UnicodeString& setTo(char16_t srcChar); + + /** + * Set the characters in the UnicodeString object to the code point + * <TT>srcChar</TT>. + * @param srcChar the code point which becomes the UnicodeString's character + * content + * @return a reference to this + * @stable ICU 2.0 + */ + UnicodeString& setTo(UChar32 srcChar); + + /** + * Aliasing setTo() function, analogous to the readonly-aliasing char16_t* constructor. + * The text will be used for the UnicodeString object, but + * it will not be released when the UnicodeString is destroyed. + * This has copy-on-write semantics: + * When the string is modified, then the buffer is first copied into + * newly allocated memory. + * The aliased buffer is never modified. + * + * In an assignment to another UnicodeString, when using the copy constructor + * or the assignment operator, the text will be copied. + * When using fastCopyFrom(), the text will be aliased again, + * so that both strings then alias the same readonly-text. + * + * @param isTerminated specifies if <code>text</code> is <code>NUL</code>-terminated. + * This must be true if <code>textLength==-1</code>. + * @param text The characters to alias for the UnicodeString. + * @param textLength The number of Unicode characters in <code>text</code> to alias. + * If -1, then this constructor will determine the length + * by calling <code>u_strlen()</code>. + * @return a reference to this + * @stable ICU 2.0 + */ + UnicodeString &setTo(UBool isTerminated, + ConstChar16Ptr text, + int32_t textLength); + + /** + * Aliasing setTo() function, analogous to the writable-aliasing char16_t* constructor. + * The text will be used for the UnicodeString object, but + * it will not be released when the UnicodeString is destroyed. + * This has write-through semantics: + * For as long as the capacity of the buffer is sufficient, write operations + * will directly affect the buffer. When more capacity is necessary, then + * a new buffer will be allocated and the contents copied as with regularly + * constructed strings. + * In an assignment to another UnicodeString, the buffer will be copied. + * The extract(Char16Ptr dst) function detects whether the dst pointer is the same + * as the string buffer itself and will in this case not copy the contents. + * + * @param buffer The characters to alias for the UnicodeString. + * @param buffLength The number of Unicode characters in <code>buffer</code> to alias. + * @param buffCapacity The size of <code>buffer</code> in char16_ts. + * @return a reference to this + * @stable ICU 2.0 + */ + UnicodeString &setTo(char16_t *buffer, + int32_t buffLength, + int32_t buffCapacity); + + /** + * Make this UnicodeString object invalid. + * The string will test TRUE with isBogus(). + * + * A bogus string has no value. It is different from an empty string. + * It can be used to indicate that no string value is available. + * getBuffer() and getTerminatedBuffer() return NULL, and + * length() returns 0. + * + * This utility function is used throughout the UnicodeString + * implementation to indicate that a UnicodeString operation failed, + * and may be used in other functions, + * especially but not exclusively when such functions do not + * take a UErrorCode for simplicity. + * + * The following methods, and no others, will clear a string object's bogus flag: + * - remove() + * - remove(0, INT32_MAX) + * - truncate(0) + * - operator=() (assignment operator) + * - setTo(...) + * + * The simplest ways to turn a bogus string into an empty one + * is to use the remove() function. + * Examples for other functions that are equivalent to "set to empty string": + * \code + * if(s.isBogus()) { + * s.remove(); // set to an empty string (remove all), or + * s.remove(0, INT32_MAX); // set to an empty string (remove all), or + * s.truncate(0); // set to an empty string (complete truncation), or + * s=UnicodeString(); // assign an empty string, or + * s.setTo((UChar32)-1); // set to a pseudo code point that is out of range, or + * static const char16_t nul=0; + * s.setTo(&nul, 0); // set to an empty C Unicode string + * } + * \endcode + * + * @see isBogus() + * @stable ICU 2.0 + */ + void setToBogus(); + + /** + * Set the character at the specified offset to the specified character. + * @param offset A valid offset into the text of the character to set + * @param ch The new character + * @return A reference to this + * @stable ICU 2.0 + */ + UnicodeString& setCharAt(int32_t offset, + char16_t ch); + + + /* Append operations */ + + /** + * Append operator. Append the code unit <TT>ch</TT> to the UnicodeString + * object. + * @param ch the code unit to be appended + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& operator+= (char16_t ch); + + /** + * Append operator. Append the code point <TT>ch</TT> to the UnicodeString + * object. + * @param ch the code point to be appended + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& operator+= (UChar32 ch); + + /** + * Append operator. Append the characters in <TT>srcText</TT> to the + * UnicodeString object. <TT>srcText</TT> is not modified. + * @param srcText the source for the new characters + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& operator+= (const UnicodeString& srcText); + + /** + * Append the characters + * in <TT>srcText</TT> in the range + * [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>) to the + * UnicodeString object at offset <TT>start</TT>. <TT>srcText</TT> + * is not modified. + * @param srcText the source for the new characters + * @param srcStart the offset into <TT>srcText</TT> where new characters + * will be obtained + * @param srcLength the number of characters in <TT>srcText</TT> in + * the append string + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& append(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength); + + /** + * Append the characters in <TT>srcText</TT> to the UnicodeString object. + * <TT>srcText</TT> is not modified. + * @param srcText the source for the new characters + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& append(const UnicodeString& srcText); + + /** + * Append the characters in <TT>srcChars</TT> in the range + * [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>) to the UnicodeString + * object at offset + * <TT>start</TT>. <TT>srcChars</TT> is not modified. + * @param srcChars the source for the new characters + * @param srcStart the offset into <TT>srcChars</TT> where new characters + * will be obtained + * @param srcLength the number of characters in <TT>srcChars</TT> in + * the append string; can be -1 if <TT>srcChars</TT> is NUL-terminated + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& append(const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength); + + /** + * Append the characters in <TT>srcChars</TT> to the UnicodeString object + * at offset <TT>start</TT>. <TT>srcChars</TT> is not modified. + * @param srcChars the source for the new characters + * @param srcLength the number of Unicode characters in <TT>srcChars</TT>; + * can be -1 if <TT>srcChars</TT> is NUL-terminated + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& append(ConstChar16Ptr srcChars, + int32_t srcLength); + + /** + * Append the code unit <TT>srcChar</TT> to the UnicodeString object. + * @param srcChar the code unit to append + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& append(char16_t srcChar); + + /** + * Append the code point <TT>srcChar</TT> to the UnicodeString object. + * @param srcChar the code point to append + * @return a reference to this + * @stable ICU 2.0 + */ + UnicodeString& append(UChar32 srcChar); + + + /* Insert operations */ + + /** + * Insert the characters in <TT>srcText</TT> in the range + * [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>) into the UnicodeString + * object at offset <TT>start</TT>. <TT>srcText</TT> is not modified. + * @param start the offset where the insertion begins + * @param srcText the source for the new characters + * @param srcStart the offset into <TT>srcText</TT> where new characters + * will be obtained + * @param srcLength the number of characters in <TT>srcText</TT> in + * the insert string + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& insert(int32_t start, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength); + + /** + * Insert the characters in <TT>srcText</TT> into the UnicodeString object + * at offset <TT>start</TT>. <TT>srcText</TT> is not modified. + * @param start the offset where the insertion begins + * @param srcText the source for the new characters + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& insert(int32_t start, + const UnicodeString& srcText); + + /** + * Insert the characters in <TT>srcChars</TT> in the range + * [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>) into the UnicodeString + * object at offset <TT>start</TT>. <TT>srcChars</TT> is not modified. + * @param start the offset at which the insertion begins + * @param srcChars the source for the new characters + * @param srcStart the offset into <TT>srcChars</TT> where new characters + * will be obtained + * @param srcLength the number of characters in <TT>srcChars</TT> + * in the insert string + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& insert(int32_t start, + const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength); + + /** + * Insert the characters in <TT>srcChars</TT> into the UnicodeString object + * at offset <TT>start</TT>. <TT>srcChars</TT> is not modified. + * @param start the offset where the insertion begins + * @param srcChars the source for the new characters + * @param srcLength the number of Unicode characters in srcChars. + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& insert(int32_t start, + ConstChar16Ptr srcChars, + int32_t srcLength); + + /** + * Insert the code unit <TT>srcChar</TT> into the UnicodeString object at + * offset <TT>start</TT>. + * @param start the offset at which the insertion occurs + * @param srcChar the code unit to insert + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& insert(int32_t start, + char16_t srcChar); + + /** + * Insert the code point <TT>srcChar</TT> into the UnicodeString object at + * offset <TT>start</TT>. + * @param start the offset at which the insertion occurs + * @param srcChar the code point to insert + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& insert(int32_t start, + UChar32 srcChar); + + + /* Replace operations */ + + /** + * Replace the characters in the range + * [<TT>start</TT>, <TT>start + length</TT>) with the characters in + * <TT>srcText</TT> in the range + * [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>). + * <TT>srcText</TT> is not modified. + * @param start the offset at which the replace operation begins + * @param length the number of characters to replace. The character at + * <TT>start + length</TT> is not modified. + * @param srcText the source for the new characters + * @param srcStart the offset into <TT>srcText</TT> where new characters + * will be obtained + * @param srcLength the number of characters in <TT>srcText</TT> in + * the replace string + * @return a reference to this + * @stable ICU 2.0 + */ + UnicodeString& replace(int32_t start, + int32_t length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength); + + /** + * Replace the characters in the range + * [<TT>start</TT>, <TT>start + length</TT>) + * with the characters in <TT>srcText</TT>. <TT>srcText</TT> is + * not modified. + * @param start the offset at which the replace operation begins + * @param length the number of characters to replace. The character at + * <TT>start + length</TT> is not modified. + * @param srcText the source for the new characters + * @return a reference to this + * @stable ICU 2.0 + */ + UnicodeString& replace(int32_t start, + int32_t length, + const UnicodeString& srcText); + + /** + * Replace the characters in the range + * [<TT>start</TT>, <TT>start + length</TT>) with the characters in + * <TT>srcChars</TT> in the range + * [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>). <TT>srcChars</TT> + * is not modified. + * @param start the offset at which the replace operation begins + * @param length the number of characters to replace. The character at + * <TT>start + length</TT> is not modified. + * @param srcChars the source for the new characters + * @param srcStart the offset into <TT>srcChars</TT> where new characters + * will be obtained + * @param srcLength the number of characters in <TT>srcChars</TT> + * in the replace string + * @return a reference to this + * @stable ICU 2.0 + */ + UnicodeString& replace(int32_t start, + int32_t length, + const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength); + + /** + * Replace the characters in the range + * [<TT>start</TT>, <TT>start + length</TT>) with the characters in + * <TT>srcChars</TT>. <TT>srcChars</TT> is not modified. + * @param start the offset at which the replace operation begins + * @param length number of characters to replace. The character at + * <TT>start + length</TT> is not modified. + * @param srcChars the source for the new characters + * @param srcLength the number of Unicode characters in srcChars + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& replace(int32_t start, + int32_t length, + ConstChar16Ptr srcChars, + int32_t srcLength); + + /** + * Replace the characters in the range + * [<TT>start</TT>, <TT>start + length</TT>) with the code unit + * <TT>srcChar</TT>. + * @param start the offset at which the replace operation begins + * @param length the number of characters to replace. The character at + * <TT>start + length</TT> is not modified. + * @param srcChar the new code unit + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& replace(int32_t start, + int32_t length, + char16_t srcChar); + + /** + * Replace the characters in the range + * [<TT>start</TT>, <TT>start + length</TT>) with the code point + * <TT>srcChar</TT>. + * @param start the offset at which the replace operation begins + * @param length the number of characters to replace. The character at + * <TT>start + length</TT> is not modified. + * @param srcChar the new code point + * @return a reference to this + * @stable ICU 2.0 + */ + UnicodeString& replace(int32_t start, int32_t length, UChar32 srcChar); + + /** + * Replace the characters in the range [<TT>start</TT>, <TT>limit</TT>) + * with the characters in <TT>srcText</TT>. <TT>srcText</TT> is not modified. + * @param start the offset at which the replace operation begins + * @param limit the offset immediately following the replace range + * @param srcText the source for the new characters + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& replaceBetween(int32_t start, + int32_t limit, + const UnicodeString& srcText); + + /** + * Replace the characters in the range [<TT>start</TT>, <TT>limit</TT>) + * with the characters in <TT>srcText</TT> in the range + * [<TT>srcStart</TT>, <TT>srcLimit</TT>). <TT>srcText</TT> is not modified. + * @param start the offset at which the replace operation begins + * @param limit the offset immediately following the replace range + * @param srcText the source for the new characters + * @param srcStart the offset into <TT>srcChars</TT> where new characters + * will be obtained + * @param srcLimit the offset immediately following the range to copy + * in <TT>srcText</TT> + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& replaceBetween(int32_t start, + int32_t limit, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLimit); + + /** + * Replace a substring of this object with the given text. + * @param start the beginning index, inclusive; <code>0 <= start + * <= limit</code>. + * @param limit the ending index, exclusive; <code>start <= limit + * <= length()</code>. + * @param text the text to replace characters <code>start</code> + * to <code>limit - 1</code> + * @stable ICU 2.0 + */ + virtual void handleReplaceBetween(int32_t start, + int32_t limit, + const UnicodeString& text); + + /** + * Replaceable API + * @return TRUE if it has MetaData + * @stable ICU 2.4 + */ + virtual UBool hasMetaData() const; + + /** + * Copy a substring of this object, retaining attribute (out-of-band) + * information. This method is used to duplicate or reorder substrings. + * The destination index must not overlap the source range. + * + * @param start the beginning index, inclusive; <code>0 <= start <= + * limit</code>. + * @param limit the ending index, exclusive; <code>start <= limit <= + * length()</code>. + * @param dest the destination index. The characters from + * <code>start..limit-1</code> will be copied to <code>dest</code>. + * Implementations of this method may assume that <code>dest <= start || + * dest >= limit</code>. + * @stable ICU 2.0 + */ + virtual void copy(int32_t start, int32_t limit, int32_t dest); + + /* Search and replace operations */ + + /** + * Replace all occurrences of characters in oldText with the characters + * in newText + * @param oldText the text containing the search text + * @param newText the text containing the replacement text + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& findAndReplace(const UnicodeString& oldText, + const UnicodeString& newText); + + /** + * Replace all occurrences of characters in oldText with characters + * in newText + * in the range [<TT>start</TT>, <TT>start + length</TT>). + * @param start the start of the range in which replace will performed + * @param length the length of the range in which replace will be performed + * @param oldText the text containing the search text + * @param newText the text containing the replacement text + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& findAndReplace(int32_t start, + int32_t length, + const UnicodeString& oldText, + const UnicodeString& newText); + + /** + * Replace all occurrences of characters in oldText in the range + * [<TT>oldStart</TT>, <TT>oldStart + oldLength</TT>) with the characters + * in newText in the range + * [<TT>newStart</TT>, <TT>newStart + newLength</TT>) + * in the range [<TT>start</TT>, <TT>start + length</TT>). + * @param start the start of the range in which replace will performed + * @param length the length of the range in which replace will be performed + * @param oldText the text containing the search text + * @param oldStart the start of the search range in <TT>oldText</TT> + * @param oldLength the length of the search range in <TT>oldText</TT> + * @param newText the text containing the replacement text + * @param newStart the start of the replacement range in <TT>newText</TT> + * @param newLength the length of the replacement range in <TT>newText</TT> + * @return a reference to this + * @stable ICU 2.0 + */ + UnicodeString& findAndReplace(int32_t start, + int32_t length, + const UnicodeString& oldText, + int32_t oldStart, + int32_t oldLength, + const UnicodeString& newText, + int32_t newStart, + int32_t newLength); + + + /* Remove operations */ + + /** + * Remove all characters from the UnicodeString object. + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& remove(void); + + /** + * Remove the characters in the range + * [<TT>start</TT>, <TT>start + length</TT>) from the UnicodeString object. + * @param start the offset of the first character to remove + * @param length the number of characters to remove + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& remove(int32_t start, + int32_t length = (int32_t)INT32_MAX); + + /** + * Remove the characters in the range + * [<TT>start</TT>, <TT>limit</TT>) from the UnicodeString object. + * @param start the offset of the first character to remove + * @param limit the offset immediately following the range to remove + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& removeBetween(int32_t start, + int32_t limit = (int32_t)INT32_MAX); + + /** + * Retain only the characters in the range + * [<code>start</code>, <code>limit</code>) from the UnicodeString object. + * Removes characters before <code>start</code> and at and after <code>limit</code>. + * @param start the offset of the first character to retain + * @param limit the offset immediately following the range to retain + * @return a reference to this + * @stable ICU 4.4 + */ + inline UnicodeString &retainBetween(int32_t start, int32_t limit = INT32_MAX); + + /* Length operations */ + + /** + * Pad the start of this UnicodeString with the character <TT>padChar</TT>. + * If the length of this UnicodeString is less than targetLength, + * length() - targetLength copies of padChar will be added to the + * beginning of this UnicodeString. + * @param targetLength the desired length of the string + * @param padChar the character to use for padding. Defaults to + * space (U+0020) + * @return TRUE if the text was padded, FALSE otherwise. + * @stable ICU 2.0 + */ + UBool padLeading(int32_t targetLength, + char16_t padChar = 0x0020); + + /** + * Pad the end of this UnicodeString with the character <TT>padChar</TT>. + * If the length of this UnicodeString is less than targetLength, + * length() - targetLength copies of padChar will be added to the + * end of this UnicodeString. + * @param targetLength the desired length of the string + * @param padChar the character to use for padding. Defaults to + * space (U+0020) + * @return TRUE if the text was padded, FALSE otherwise. + * @stable ICU 2.0 + */ + UBool padTrailing(int32_t targetLength, + char16_t padChar = 0x0020); + + /** + * Truncate this UnicodeString to the <TT>targetLength</TT>. + * @param targetLength the desired length of this UnicodeString. + * @return TRUE if the text was truncated, FALSE otherwise + * @stable ICU 2.0 + */ + inline UBool truncate(int32_t targetLength); + + /** + * Trims leading and trailing whitespace from this UnicodeString. + * @return a reference to this + * @stable ICU 2.0 + */ + UnicodeString& trim(void); + + + /* Miscellaneous operations */ + + /** + * Reverse this UnicodeString in place. + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& reverse(void); + + /** + * Reverse the range [<TT>start</TT>, <TT>start + length</TT>) in + * this UnicodeString. + * @param start the start of the range to reverse + * @param length the number of characters to to reverse + * @return a reference to this + * @stable ICU 2.0 + */ + inline UnicodeString& reverse(int32_t start, + int32_t length); + + /** + * Convert the characters in this to UPPER CASE following the conventions of + * the default locale. + * @return A reference to this. + * @stable ICU 2.0 + */ + UnicodeString& toUpper(void); + + /** + * Convert the characters in this to UPPER CASE following the conventions of + * a specific locale. + * @param locale The locale containing the conventions to use. + * @return A reference to this. + * @stable ICU 2.0 + */ + UnicodeString& toUpper(const Locale& locale); + + /** + * Convert the characters in this to lower case following the conventions of + * the default locale. + * @return A reference to this. + * @stable ICU 2.0 + */ + UnicodeString& toLower(void); + + /** + * Convert the characters in this to lower case following the conventions of + * a specific locale. + * @param locale The locale containing the conventions to use. + * @return A reference to this. + * @stable ICU 2.0 + */ + UnicodeString& toLower(const Locale& locale); + +#if !UCONFIG_NO_BREAK_ITERATION + + /** + * Titlecase this string, convenience function using the default locale. + * + * Casing is locale-dependent and context-sensitive. + * Titlecasing uses a break iterator to find the first characters of words + * that are to be titlecased. It titlecases those characters and lowercases + * all others. + * + * The titlecase break iterator can be provided to customize for arbitrary + * styles, using rules and dictionaries beyond the standard iterators. + * It may be more efficient to always provide an iterator to avoid + * opening and closing one for each string. + * The standard titlecase iterator for the root locale implements the + * algorithm of Unicode TR 21. + * + * This function uses only the setText(), first() and next() methods of the + * provided break iterator. + * + * @param titleIter A break iterator to find the first characters of words + * that are to be titlecased. + * If none is provided (0), then a standard titlecase + * break iterator is opened. + * Otherwise the provided iterator is set to the string's text. + * @return A reference to this. + * @stable ICU 2.1 + */ + UnicodeString &toTitle(BreakIterator *titleIter); + + /** + * Titlecase this string. + * + * Casing is locale-dependent and context-sensitive. + * Titlecasing uses a break iterator to find the first characters of words + * that are to be titlecased. It titlecases those characters and lowercases + * all others. + * + * The titlecase break iterator can be provided to customize for arbitrary + * styles, using rules and dictionaries beyond the standard iterators. + * It may be more efficient to always provide an iterator to avoid + * opening and closing one for each string. + * The standard titlecase iterator for the root locale implements the + * algorithm of Unicode TR 21. + * + * This function uses only the setText(), first() and next() methods of the + * provided break iterator. + * + * @param titleIter A break iterator to find the first characters of words + * that are to be titlecased. + * If none is provided (0), then a standard titlecase + * break iterator is opened. + * Otherwise the provided iterator is set to the string's text. + * @param locale The locale to consider. + * @return A reference to this. + * @stable ICU 2.1 + */ + UnicodeString &toTitle(BreakIterator *titleIter, const Locale &locale); + + /** + * Titlecase this string, with options. + * + * Casing is locale-dependent and context-sensitive. + * Titlecasing uses a break iterator to find the first characters of words + * that are to be titlecased. It titlecases those characters and lowercases + * all others. (This can be modified with options.) + * + * The titlecase break iterator can be provided to customize for arbitrary + * styles, using rules and dictionaries beyond the standard iterators. + * It may be more efficient to always provide an iterator to avoid + * opening and closing one for each string. + * The standard titlecase iterator for the root locale implements the + * algorithm of Unicode TR 21. + * + * This function uses only the setText(), first() and next() methods of the + * provided break iterator. + * + * @param titleIter A break iterator to find the first characters of words + * that are to be titlecased. + * If none is provided (0), then a standard titlecase + * break iterator is opened. + * Otherwise the provided iterator is set to the string's text. + * @param locale The locale to consider. + * @param options Options bit set, usually 0. See U_TITLECASE_NO_LOWERCASE, + * U_TITLECASE_NO_BREAK_ADJUSTMENT, U_TITLECASE_ADJUST_TO_CASED, + * U_TITLECASE_WHOLE_STRING, U_TITLECASE_SENTENCES. + * @param options Options bit set, see ucasemap_open(). + * @return A reference to this. + * @stable ICU 3.8 + */ + UnicodeString &toTitle(BreakIterator *titleIter, const Locale &locale, uint32_t options); + +#endif + + /** + * Case-folds the characters in this string. + * + * Case-folding is locale-independent and not context-sensitive, + * but there is an option for whether to include or exclude mappings for dotted I + * and dotless i that are marked with 'T' in CaseFolding.txt. + * + * The result may be longer or shorter than the original. + * + * @param options Either U_FOLD_CASE_DEFAULT or U_FOLD_CASE_EXCLUDE_SPECIAL_I + * @return A reference to this. + * @stable ICU 2.0 + */ + UnicodeString &foldCase(uint32_t options=0 /*U_FOLD_CASE_DEFAULT*/); + + //======================================== + // Access to the internal buffer + //======================================== + + /** + * Get a read/write pointer to the internal buffer. + * The buffer is guaranteed to be large enough for at least minCapacity char16_ts, + * writable, and is still owned by the UnicodeString object. + * Calls to getBuffer(minCapacity) must not be nested, and + * must be matched with calls to releaseBuffer(newLength). + * If the string buffer was read-only or shared, + * then it will be reallocated and copied. + * + * An attempted nested call will return 0, and will not further modify the + * state of the UnicodeString object. + * It also returns 0 if the string is bogus. + * + * The actual capacity of the string buffer may be larger than minCapacity. + * getCapacity() returns the actual capacity. + * For many operations, the full capacity should be used to avoid reallocations. + * + * While the buffer is "open" between getBuffer(minCapacity) + * and releaseBuffer(newLength), the following applies: + * - The string length is set to 0. + * - Any read API call on the UnicodeString object will behave like on a 0-length string. + * - Any write API call on the UnicodeString object is disallowed and will have no effect. + * - You can read from and write to the returned buffer. + * - The previous string contents will still be in the buffer; + * if you want to use it, then you need to call length() before getBuffer(minCapacity). + * If the length() was greater than minCapacity, then any contents after minCapacity + * may be lost. + * The buffer contents is not NUL-terminated by getBuffer(). + * If length()<getCapacity() then you can terminate it by writing a NUL + * at index length(). + * - You must call releaseBuffer(newLength) before and in order to + * return to normal UnicodeString operation. + * + * @param minCapacity the minimum number of char16_ts that are to be available + * in the buffer, starting at the returned pointer; + * default to the current string capacity if minCapacity==-1 + * @return a writable pointer to the internal string buffer, + * or nullptr if an error occurs (nested calls, out of memory) + * + * @see releaseBuffer + * @see getTerminatedBuffer() + * @stable ICU 2.0 + */ + char16_t *getBuffer(int32_t minCapacity); + + /** + * Release a read/write buffer on a UnicodeString object with an + * "open" getBuffer(minCapacity). + * This function must be called in a matched pair with getBuffer(minCapacity). + * releaseBuffer(newLength) must be called if and only if a getBuffer(minCapacity) is "open". + * + * It will set the string length to newLength, at most to the current capacity. + * If newLength==-1 then it will set the length according to the + * first NUL in the buffer, or to the capacity if there is no NUL. + * + * After calling releaseBuffer(newLength) the UnicodeString is back to normal operation. + * + * @param newLength the new length of the UnicodeString object; + * defaults to the current capacity if newLength is greater than that; + * if newLength==-1, it defaults to u_strlen(buffer) but not more than + * the current capacity of the string + * + * @see getBuffer(int32_t minCapacity) + * @stable ICU 2.0 + */ + void releaseBuffer(int32_t newLength=-1); + + /** + * Get a read-only pointer to the internal buffer. + * This can be called at any time on a valid UnicodeString. + * + * It returns 0 if the string is bogus, or + * during an "open" getBuffer(minCapacity). + * + * It can be called as many times as desired. + * The pointer that it returns will remain valid until the UnicodeString object is modified, + * at which time the pointer is semantically invalidated and must not be used any more. + * + * The capacity of the buffer can be determined with getCapacity(). + * The part after length() may or may not be initialized and valid, + * depending on the history of the UnicodeString object. + * + * The buffer contents is (probably) not NUL-terminated. + * You can check if it is with + * <code>(s.length()<s.getCapacity() && buffer[s.length()]==0)</code>. + * (See getTerminatedBuffer().) + * + * The buffer may reside in read-only memory. Its contents must not + * be modified. + * + * @return a read-only pointer to the internal string buffer, + * or nullptr if the string is empty or bogus + * + * @see getBuffer(int32_t minCapacity) + * @see getTerminatedBuffer() + * @stable ICU 2.0 + */ + inline const char16_t *getBuffer() const; + + /** + * Get a read-only pointer to the internal buffer, + * making sure that it is NUL-terminated. + * This can be called at any time on a valid UnicodeString. + * + * It returns 0 if the string is bogus, or + * during an "open" getBuffer(minCapacity), or if the buffer cannot + * be NUL-terminated (because memory allocation failed). + * + * It can be called as many times as desired. + * The pointer that it returns will remain valid until the UnicodeString object is modified, + * at which time the pointer is semantically invalidated and must not be used any more. + * + * The capacity of the buffer can be determined with getCapacity(). + * The part after length()+1 may or may not be initialized and valid, + * depending on the history of the UnicodeString object. + * + * The buffer contents is guaranteed to be NUL-terminated. + * getTerminatedBuffer() may reallocate the buffer if a terminating NUL + * is written. + * For this reason, this function is not const, unlike getBuffer(). + * Note that a UnicodeString may also contain NUL characters as part of its contents. + * + * The buffer may reside in read-only memory. Its contents must not + * be modified. + * + * @return a read-only pointer to the internal string buffer, + * or 0 if the string is empty or bogus + * + * @see getBuffer(int32_t minCapacity) + * @see getBuffer() + * @stable ICU 2.2 + */ + const char16_t *getTerminatedBuffer(); + + //======================================== + // Constructors + //======================================== + + /** Construct an empty UnicodeString. + * @stable ICU 2.0 + */ + inline UnicodeString(); + + /** + * Construct a UnicodeString with capacity to hold <TT>capacity</TT> char16_ts + * @param capacity the number of char16_ts this UnicodeString should hold + * before a resize is necessary; if count is greater than 0 and count + * code points c take up more space than capacity, then capacity is adjusted + * accordingly. + * @param c is used to initially fill the string + * @param count specifies how many code points c are to be written in the + * string + * @stable ICU 2.0 + */ + UnicodeString(int32_t capacity, UChar32 c, int32_t count); + + /** + * Single char16_t (code unit) constructor. + * + * It is recommended to mark this constructor "explicit" by + * <code>-DUNISTR_FROM_CHAR_EXPLICIT=explicit</code> + * on the compiler command line or similar. + * @param ch the character to place in the UnicodeString + * @stable ICU 2.0 + */ + UNISTR_FROM_CHAR_EXPLICIT UnicodeString(char16_t ch); + + /** + * Single UChar32 (code point) constructor. + * + * It is recommended to mark this constructor "explicit" by + * <code>-DUNISTR_FROM_CHAR_EXPLICIT=explicit</code> + * on the compiler command line or similar. + * @param ch the character to place in the UnicodeString + * @stable ICU 2.0 + */ + UNISTR_FROM_CHAR_EXPLICIT UnicodeString(UChar32 ch); + + /** + * char16_t* constructor. + * + * It is recommended to mark this constructor "explicit" by + * <code>-DUNISTR_FROM_STRING_EXPLICIT=explicit</code> + * on the compiler command line or similar. + * @param text The characters to place in the UnicodeString. <TT>text</TT> + * must be NULL (U+0000) terminated. + * @stable ICU 2.0 + */ + UNISTR_FROM_STRING_EXPLICIT UnicodeString(const char16_t *text); + +#if !U_CHAR16_IS_TYPEDEF + /** + * uint16_t * constructor. + * Delegates to UnicodeString(const char16_t *). + * + * It is recommended to mark this constructor "explicit" by + * <code>-DUNISTR_FROM_STRING_EXPLICIT=explicit</code> + * on the compiler command line or similar. + * @param text NUL-terminated UTF-16 string + * @stable ICU 59 + */ + UNISTR_FROM_STRING_EXPLICIT UnicodeString(const uint16_t *text) : + UnicodeString(ConstChar16Ptr(text)) {} +#endif + +#if U_SIZEOF_WCHAR_T==2 || defined(U_IN_DOXYGEN) + /** + * wchar_t * constructor. + * (Only defined if U_SIZEOF_WCHAR_T==2.) + * Delegates to UnicodeString(const char16_t *). + * + * It is recommended to mark this constructor "explicit" by + * <code>-DUNISTR_FROM_STRING_EXPLICIT=explicit</code> + * on the compiler command line or similar. + * @param text NUL-terminated UTF-16 string + * @stable ICU 59 + */ + UNISTR_FROM_STRING_EXPLICIT UnicodeString(const wchar_t *text) : + UnicodeString(ConstChar16Ptr(text)) {} +#endif + + /** + * nullptr_t constructor. + * Effectively the same as the default constructor, makes an empty string object. + * + * It is recommended to mark this constructor "explicit" by + * <code>-DUNISTR_FROM_STRING_EXPLICIT=explicit</code> + * on the compiler command line or similar. + * @param text nullptr + * @stable ICU 59 + */ + UNISTR_FROM_STRING_EXPLICIT inline UnicodeString(const std::nullptr_t text); + + /** + * char16_t* constructor. + * @param text The characters to place in the UnicodeString. + * @param textLength The number of Unicode characters in <TT>text</TT> + * to copy. + * @stable ICU 2.0 + */ + UnicodeString(const char16_t *text, + int32_t textLength); + +#if !U_CHAR16_IS_TYPEDEF + /** + * uint16_t * constructor. + * Delegates to UnicodeString(const char16_t *, int32_t). + * @param text UTF-16 string + * @param length string length + * @stable ICU 59 + */ + UnicodeString(const uint16_t *text, int32_t length) : + UnicodeString(ConstChar16Ptr(text), length) {} +#endif + +#if U_SIZEOF_WCHAR_T==2 || defined(U_IN_DOXYGEN) + /** + * wchar_t * constructor. + * (Only defined if U_SIZEOF_WCHAR_T==2.) + * Delegates to UnicodeString(const char16_t *, int32_t). + * @param text NUL-terminated UTF-16 string + * @param length string length + * @stable ICU 59 + */ + UnicodeString(const wchar_t *text, int32_t length) : + UnicodeString(ConstChar16Ptr(text), length) {} +#endif + + /** + * nullptr_t constructor. + * Effectively the same as the default constructor, makes an empty string object. + * @param text nullptr + * @param length ignored + * @stable ICU 59 + */ + inline UnicodeString(const std::nullptr_t text, int32_t length); + + /** + * Readonly-aliasing char16_t* constructor. + * The text will be used for the UnicodeString object, but + * it will not be released when the UnicodeString is destroyed. + * This has copy-on-write semantics: + * When the string is modified, then the buffer is first copied into + * newly allocated memory. + * The aliased buffer is never modified. + * + * In an assignment to another UnicodeString, when using the copy constructor + * or the assignment operator, the text will be copied. + * When using fastCopyFrom(), the text will be aliased again, + * so that both strings then alias the same readonly-text. + * + * @param isTerminated specifies if <code>text</code> is <code>NUL</code>-terminated. + * This must be true if <code>textLength==-1</code>. + * @param text The characters to alias for the UnicodeString. + * @param textLength The number of Unicode characters in <code>text</code> to alias. + * If -1, then this constructor will determine the length + * by calling <code>u_strlen()</code>. + * @stable ICU 2.0 + */ + UnicodeString(UBool isTerminated, + ConstChar16Ptr text, + int32_t textLength); + + /** + * Writable-aliasing char16_t* constructor. + * The text will be used for the UnicodeString object, but + * it will not be released when the UnicodeString is destroyed. + * This has write-through semantics: + * For as long as the capacity of the buffer is sufficient, write operations + * will directly affect the buffer. When more capacity is necessary, then + * a new buffer will be allocated and the contents copied as with regularly + * constructed strings. + * In an assignment to another UnicodeString, the buffer will be copied. + * The extract(Char16Ptr dst) function detects whether the dst pointer is the same + * as the string buffer itself and will in this case not copy the contents. + * + * @param buffer The characters to alias for the UnicodeString. + * @param buffLength The number of Unicode characters in <code>buffer</code> to alias. + * @param buffCapacity The size of <code>buffer</code> in char16_ts. + * @stable ICU 2.0 + */ + UnicodeString(char16_t *buffer, int32_t buffLength, int32_t buffCapacity); + +#if !U_CHAR16_IS_TYPEDEF + /** + * Writable-aliasing uint16_t * constructor. + * Delegates to UnicodeString(const char16_t *, int32_t, int32_t). + * @param buffer writable buffer of/for UTF-16 text + * @param buffLength length of the current buffer contents + * @param buffCapacity buffer capacity + * @stable ICU 59 + */ + UnicodeString(uint16_t *buffer, int32_t buffLength, int32_t buffCapacity) : + UnicodeString(Char16Ptr(buffer), buffLength, buffCapacity) {} +#endif + +#if U_SIZEOF_WCHAR_T==2 || defined(U_IN_DOXYGEN) + /** + * Writable-aliasing wchar_t * constructor. + * (Only defined if U_SIZEOF_WCHAR_T==2.) + * Delegates to UnicodeString(const char16_t *, int32_t, int32_t). + * @param buffer writable buffer of/for UTF-16 text + * @param buffLength length of the current buffer contents + * @param buffCapacity buffer capacity + * @stable ICU 59 + */ + UnicodeString(wchar_t *buffer, int32_t buffLength, int32_t buffCapacity) : + UnicodeString(Char16Ptr(buffer), buffLength, buffCapacity) {} +#endif + + /** + * Writable-aliasing nullptr_t constructor. + * Effectively the same as the default constructor, makes an empty string object. + * @param buffer nullptr + * @param buffLength ignored + * @param buffCapacity ignored + * @stable ICU 59 + */ + inline UnicodeString(std::nullptr_t buffer, int32_t buffLength, int32_t buffCapacity); + +#if U_CHARSET_IS_UTF8 || !UCONFIG_NO_CONVERSION + + /** + * char* constructor. + * Uses the default converter (and thus depends on the ICU conversion code) + * unless U_CHARSET_IS_UTF8 is set to 1. + * + * For ASCII (really "invariant character") strings it is more efficient to use + * the constructor that takes a US_INV (for its enum EInvariant). + * For ASCII (invariant-character) string literals, see UNICODE_STRING and + * UNICODE_STRING_SIMPLE. + * + * It is recommended to mark this constructor "explicit" by + * <code>-DUNISTR_FROM_STRING_EXPLICIT=explicit</code> + * on the compiler command line or similar. + * @param codepageData an array of bytes, null-terminated, + * in the platform's default codepage. + * @stable ICU 2.0 + * @see UNICODE_STRING + * @see UNICODE_STRING_SIMPLE + */ + UNISTR_FROM_STRING_EXPLICIT UnicodeString(const char *codepageData); + + /** + * char* constructor. + * Uses the default converter (and thus depends on the ICU conversion code) + * unless U_CHARSET_IS_UTF8 is set to 1. + * @param codepageData an array of bytes in the platform's default codepage. + * @param dataLength The number of bytes in <TT>codepageData</TT>. + * @stable ICU 2.0 + */ + UnicodeString(const char *codepageData, int32_t dataLength); + +#endif + +#if !UCONFIG_NO_CONVERSION + + /** + * char* constructor. + * @param codepageData an array of bytes, null-terminated + * @param codepage the encoding of <TT>codepageData</TT>. The special + * value 0 for <TT>codepage</TT> indicates that the text is in the + * platform's default codepage. + * + * If <code>codepage</code> is an empty string (<code>""</code>), + * then a simple conversion is performed on the codepage-invariant + * subset ("invariant characters") of the platform encoding. See utypes.h. + * Recommendation: For invariant-character strings use the constructor + * UnicodeString(const char *src, int32_t length, enum EInvariant inv) + * because it avoids object code dependencies of UnicodeString on + * the conversion code. + * + * @stable ICU 2.0 + */ + UnicodeString(const char *codepageData, const char *codepage); + + /** + * char* constructor. + * @param codepageData an array of bytes. + * @param dataLength The number of bytes in <TT>codepageData</TT>. + * @param codepage the encoding of <TT>codepageData</TT>. The special + * value 0 for <TT>codepage</TT> indicates that the text is in the + * platform's default codepage. + * If <code>codepage</code> is an empty string (<code>""</code>), + * then a simple conversion is performed on the codepage-invariant + * subset ("invariant characters") of the platform encoding. See utypes.h. + * Recommendation: For invariant-character strings use the constructor + * UnicodeString(const char *src, int32_t length, enum EInvariant inv) + * because it avoids object code dependencies of UnicodeString on + * the conversion code. + * + * @stable ICU 2.0 + */ + UnicodeString(const char *codepageData, int32_t dataLength, const char *codepage); + + /** + * char * / UConverter constructor. + * This constructor uses an existing UConverter object to + * convert the codepage string to Unicode and construct a UnicodeString + * from that. + * + * The converter is reset at first. + * If the error code indicates a failure before this constructor is called, + * or if an error occurs during conversion or construction, + * then the string will be bogus. + * + * This function avoids the overhead of opening and closing a converter if + * multiple strings are constructed. + * + * @param src input codepage string + * @param srcLength length of the input string, can be -1 for NUL-terminated strings + * @param cnv converter object (ucnv_resetToUnicode() will be called), + * can be NULL for the default converter + * @param errorCode normal ICU error code + * @stable ICU 2.0 + */ + UnicodeString( + const char *src, int32_t srcLength, + UConverter *cnv, + UErrorCode &errorCode); + +#endif + + /** + * Constructs a Unicode string from an invariant-character char * string. + * About invariant characters see utypes.h. + * This constructor has no runtime dependency on conversion code and is + * therefore recommended over ones taking a charset name string + * (where the empty string "" indicates invariant-character conversion). + * + * Use the macro US_INV as the third, signature-distinguishing parameter. + * + * For example: + * \code + * void fn(const char *s) { + * UnicodeString ustr(s, -1, US_INV); + * // use ustr ... + * } + * \endcode + * + * @param src String using only invariant characters. + * @param length Length of src, or -1 if NUL-terminated. + * @param inv Signature-distinguishing paramater, use US_INV. + * + * @see US_INV + * @stable ICU 3.2 + */ + UnicodeString(const char *src, int32_t length, enum EInvariant inv); + + + /** + * Copy constructor. + * + * Starting with ICU 2.4, the assignment operator and the copy constructor + * allocate a new buffer and copy the buffer contents even for readonly aliases. + * By contrast, the fastCopyFrom() function implements the old, + * more efficient but less safe behavior + * of making this string also a readonly alias to the same buffer. + * + * If the source object has an "open" buffer from getBuffer(minCapacity), + * then the copy is an empty string. + * + * @param that The UnicodeString object to copy. + * @stable ICU 2.0 + * @see fastCopyFrom + */ + UnicodeString(const UnicodeString& that); + + /** + * Move constructor, might leave src in bogus state. + * This string will have the same contents and state that the source string had. + * @param src source string + * @stable ICU 56 + */ + UnicodeString(UnicodeString &&src) U_NOEXCEPT; + + /** + * 'Substring' constructor from tail of source string. + * @param src The UnicodeString object to copy. + * @param srcStart The offset into <tt>src</tt> at which to start copying. + * @stable ICU 2.2 + */ + UnicodeString(const UnicodeString& src, int32_t srcStart); + + /** + * 'Substring' constructor from subrange of source string. + * @param src The UnicodeString object to copy. + * @param srcStart The offset into <tt>src</tt> at which to start copying. + * @param srcLength The number of characters from <tt>src</tt> to copy. + * @stable ICU 2.2 + */ + UnicodeString(const UnicodeString& src, int32_t srcStart, int32_t srcLength); + + /** + * Clone this object, an instance of a subclass of Replaceable. + * Clones can be used concurrently in multiple threads. + * If a subclass does not implement clone(), or if an error occurs, + * then NULL is returned. + * The clone functions in all subclasses return a pointer to a Replaceable + * because some compilers do not support covariant (same-as-this) + * return types; cast to the appropriate subclass if necessary. + * The caller must delete the clone. + * + * @return a clone of this object + * + * @see Replaceable::clone + * @see getDynamicClassID + * @stable ICU 2.6 + */ + virtual Replaceable *clone() const; + + /** Destructor. + * @stable ICU 2.0 + */ + virtual ~UnicodeString(); + + /** + * Create a UnicodeString from a UTF-8 string. + * Illegal input is replaced with U+FFFD. Otherwise, errors result in a bogus string. + * Calls u_strFromUTF8WithSub(). + * + * @param utf8 UTF-8 input string. + * Note that a StringPiece can be implicitly constructed + * from a std::string or a NUL-terminated const char * string. + * @return A UnicodeString with equivalent UTF-16 contents. + * @see toUTF8 + * @see toUTF8String + * @stable ICU 4.2 + */ + static UnicodeString fromUTF8(StringPiece utf8); + + /** + * Create a UnicodeString from a UTF-32 string. + * Illegal input is replaced with U+FFFD. Otherwise, errors result in a bogus string. + * Calls u_strFromUTF32WithSub(). + * + * @param utf32 UTF-32 input string. Must not be NULL. + * @param length Length of the input string, or -1 if NUL-terminated. + * @return A UnicodeString with equivalent UTF-16 contents. + * @see toUTF32 + * @stable ICU 4.2 + */ + static UnicodeString fromUTF32(const UChar32 *utf32, int32_t length); + + /* Miscellaneous operations */ + + /** + * Unescape a string of characters and return a string containing + * the result. The following escape sequences are recognized: + * + * \\uhhhh 4 hex digits; h in [0-9A-Fa-f] + * \\Uhhhhhhhh 8 hex digits + * \\xhh 1-2 hex digits + * \\ooo 1-3 octal digits; o in [0-7] + * \\cX control-X; X is masked with 0x1F + * + * as well as the standard ANSI C escapes: + * + * \\a => U+0007, \\b => U+0008, \\t => U+0009, \\n => U+000A, + * \\v => U+000B, \\f => U+000C, \\r => U+000D, \\e => U+001B, + * \\" => U+0022, \\' => U+0027, \\? => U+003F, \\\\ => U+005C + * + * Anything else following a backslash is generically escaped. For + * example, "[a\\-z]" returns "[a-z]". + * + * If an escape sequence is ill-formed, this method returns an empty + * string. An example of an ill-formed sequence is "\\u" followed by + * fewer than 4 hex digits. + * + * This function is similar to u_unescape() but not identical to it. + * The latter takes a source char*, so it does escape recognition + * and also invariant conversion. + * + * @return a string with backslash escapes interpreted, or an + * empty string on error. + * @see UnicodeString#unescapeAt() + * @see u_unescape() + * @see u_unescapeAt() + * @stable ICU 2.0 + */ + UnicodeString unescape() const; + + /** + * Unescape a single escape sequence and return the represented + * character. See unescape() for a listing of the recognized escape + * sequences. The character at offset-1 is assumed (without + * checking) to be a backslash. If the escape sequence is + * ill-formed, or the offset is out of range, U_SENTINEL=-1 is + * returned. + * + * @param offset an input output parameter. On input, it is the + * offset into this string where the escape sequence is located, + * after the initial backslash. On output, it is advanced after the + * last character parsed. On error, it is not advanced at all. + * @return the character represented by the escape sequence at + * offset, or U_SENTINEL=-1 on error. + * @see UnicodeString#unescape() + * @see u_unescape() + * @see u_unescapeAt() + * @stable ICU 2.0 + */ + UChar32 unescapeAt(int32_t &offset) const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.2 + */ + static UClassID U_EXPORT2 getStaticClassID(); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.2 + */ + virtual UClassID getDynamicClassID() const; + + //======================================== + // Implementation methods + //======================================== + +protected: + /** + * Implement Replaceable::getLength() (see jitterbug 1027). + * @stable ICU 2.4 + */ + virtual int32_t getLength() const; + + /** + * The change in Replaceable to use virtual getCharAt() allows + * UnicodeString::charAt() to be inline again (see jitterbug 709). + * @stable ICU 2.4 + */ + virtual char16_t getCharAt(int32_t offset) const; + + /** + * The change in Replaceable to use virtual getChar32At() allows + * UnicodeString::char32At() to be inline again (see jitterbug 709). + * @stable ICU 2.4 + */ + virtual UChar32 getChar32At(int32_t offset) const; + +private: + // For char* constructors. Could be made public. + UnicodeString &setToUTF8(StringPiece utf8); + // For extract(char*). + // We could make a toUTF8(target, capacity, errorCode) public but not + // this version: New API will be cleaner if we make callers create substrings + // rather than having start+length on every method, + // and it should take a UErrorCode&. + int32_t + toUTF8(int32_t start, int32_t len, + char *target, int32_t capacity) const; + + /** + * Internal string contents comparison, called by operator==. + * Requires: this & text not bogus and have same lengths. + */ + UBool doEquals(const UnicodeString &text, int32_t len) const; + + inline int8_t + doCompare(int32_t start, + int32_t length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const; + + int8_t doCompare(int32_t start, + int32_t length, + const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength) const; + + inline int8_t + doCompareCodePointOrder(int32_t start, + int32_t length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const; + + int8_t doCompareCodePointOrder(int32_t start, + int32_t length, + const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength) const; + + inline int8_t + doCaseCompare(int32_t start, + int32_t length, + const UnicodeString &srcText, + int32_t srcStart, + int32_t srcLength, + uint32_t options) const; + + int8_t + doCaseCompare(int32_t start, + int32_t length, + const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength, + uint32_t options) const; + + int32_t doIndexOf(char16_t c, + int32_t start, + int32_t length) const; + + int32_t doIndexOf(UChar32 c, + int32_t start, + int32_t length) const; + + int32_t doLastIndexOf(char16_t c, + int32_t start, + int32_t length) const; + + int32_t doLastIndexOf(UChar32 c, + int32_t start, + int32_t length) const; + + void doExtract(int32_t start, + int32_t length, + char16_t *dst, + int32_t dstStart) const; + + inline void doExtract(int32_t start, + int32_t length, + UnicodeString& target) const; + + inline char16_t doCharAt(int32_t offset) const; + + UnicodeString& doReplace(int32_t start, + int32_t length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength); + + UnicodeString& doReplace(int32_t start, + int32_t length, + const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength); + + UnicodeString& doAppend(const UnicodeString& src, int32_t srcStart, int32_t srcLength); + UnicodeString& doAppend(const char16_t *srcChars, int32_t srcStart, int32_t srcLength); + + UnicodeString& doReverse(int32_t start, + int32_t length); + + // calculate hash code + int32_t doHashCode(void) const; + + // get pointer to start of array + // these do not check for kOpenGetBuffer, unlike the public getBuffer() function + inline char16_t* getArrayStart(void); + inline const char16_t* getArrayStart(void) const; + + inline UBool hasShortLength() const; + inline int32_t getShortLength() const; + + // A UnicodeString object (not necessarily its current buffer) + // is writable unless it isBogus() or it has an "open" getBuffer(minCapacity). + inline UBool isWritable() const; + + // Is the current buffer writable? + inline UBool isBufferWritable() const; + + // None of the following does releaseArray(). + inline void setZeroLength(); + inline void setShortLength(int32_t len); + inline void setLength(int32_t len); + inline void setToEmpty(); + inline void setArray(char16_t *array, int32_t len, int32_t capacity); // sets length but not flags + + // allocate the array; result may be the stack buffer + // sets refCount to 1 if appropriate + // sets fArray, fCapacity, and flags + // sets length to 0 + // returns boolean for success or failure + UBool allocate(int32_t capacity); + + // release the array if owned + void releaseArray(void); + + // turn a bogus string into an empty one + void unBogus(); + + // implements assigment operator, copy constructor, and fastCopyFrom() + UnicodeString ©From(const UnicodeString &src, UBool fastCopy=FALSE); + + // Copies just the fields without memory management. + void copyFieldsFrom(UnicodeString &src, UBool setSrcToBogus) U_NOEXCEPT; + + // Pin start and limit to acceptable values. + inline void pinIndex(int32_t& start) const; + inline void pinIndices(int32_t& start, + int32_t& length) const; + +#if !UCONFIG_NO_CONVERSION + + /* Internal extract() using UConverter. */ + int32_t doExtract(int32_t start, int32_t length, + char *dest, int32_t destCapacity, + UConverter *cnv, + UErrorCode &errorCode) const; + + /* + * Real constructor for converting from codepage data. + * It assumes that it is called with !fRefCounted. + * + * If <code>codepage==0</code>, then the default converter + * is used for the platform encoding. + * If <code>codepage</code> is an empty string (<code>""</code>), + * then a simple conversion is performed on the codepage-invariant + * subset ("invariant characters") of the platform encoding. See utypes.h. + */ + void doCodepageCreate(const char *codepageData, + int32_t dataLength, + const char *codepage); + + /* + * Worker function for creating a UnicodeString from + * a codepage string using a UConverter. + */ + void + doCodepageCreate(const char *codepageData, + int32_t dataLength, + UConverter *converter, + UErrorCode &status); + +#endif + + /* + * This function is called when write access to the array + * is necessary. + * + * We need to make a copy of the array if + * the buffer is read-only, or + * the buffer is refCounted (shared), and refCount>1, or + * the buffer is too small. + * + * Return FALSE if memory could not be allocated. + */ + UBool cloneArrayIfNeeded(int32_t newCapacity = -1, + int32_t growCapacity = -1, + UBool doCopyArray = TRUE, + int32_t **pBufferToDelete = 0, + UBool forceClone = FALSE); + + /** + * Common function for UnicodeString case mappings. + * The stringCaseMapper has the same type UStringCaseMapper + * as in ustr_imp.h for ustrcase_map(). + */ + UnicodeString & + caseMap(int32_t caseLocale, uint32_t options, +#if !UCONFIG_NO_BREAK_ITERATION + BreakIterator *iter, +#endif + UStringCaseMapper *stringCaseMapper); + + // ref counting + void addRef(void); + int32_t removeRef(void); + int32_t refCount(void) const; + + // constants + enum { + /** + * Size of stack buffer for short strings. + * Must be at least U16_MAX_LENGTH for the single-code point constructor to work. + * @see UNISTR_OBJECT_SIZE + */ + US_STACKBUF_SIZE=(int32_t)(UNISTR_OBJECT_SIZE-sizeof(void *)-2)/U_SIZEOF_UCHAR, + kInvalidUChar=0xffff, // U+FFFF returned by charAt(invalid index) + kInvalidHashCode=0, // invalid hash code + kEmptyHashCode=1, // hash code for empty string + + // bit flag values for fLengthAndFlags + kIsBogus=1, // this string is bogus, i.e., not valid or NULL + kUsingStackBuffer=2,// using fUnion.fStackFields instead of fUnion.fFields + kRefCounted=4, // there is a refCount field before the characters in fArray + kBufferIsReadonly=8,// do not write to this buffer + kOpenGetBuffer=16, // getBuffer(minCapacity) was called (is "open"), + // and releaseBuffer(newLength) must be called + kAllStorageFlags=0x1f, + + kLengthShift=5, // remaining 11 bits for non-negative short length, or negative if long + kLength1=1<<kLengthShift, + kMaxShortLength=0x3ff, // max non-negative short length (leaves top bit 0) + kLengthIsLarge=0xffe0, // short length < 0, real length is in fUnion.fFields.fLength + + // combined values for convenience + kShortString=kUsingStackBuffer, + kLongString=kRefCounted, + kReadonlyAlias=kBufferIsReadonly, + kWritableAlias=0 + }; + + friend class UnicodeStringAppendable; + + union StackBufferOrFields; // forward declaration necessary before friend declaration + friend union StackBufferOrFields; // make US_STACKBUF_SIZE visible inside fUnion + + /* + * The following are all the class fields that are stored + * in each UnicodeString object. + * Note that UnicodeString has virtual functions, + * therefore there is an implicit vtable pointer + * as the first real field. + * The fields should be aligned such that no padding is necessary. + * On 32-bit machines, the size should be 32 bytes, + * on 64-bit machines (8-byte pointers), it should be 40 bytes. + * + * We use a hack to achieve this. + * + * With at least some compilers, each of the following is forced to + * a multiple of sizeof(pointer) [the largest field base unit here is a data pointer], + * rounded up with additional padding if the fields do not already fit that requirement: + * - sizeof(class UnicodeString) + * - offsetof(UnicodeString, fUnion) + * - sizeof(fUnion) + * - sizeof(fStackFields) + * + * We optimize for the longest possible internal buffer for short strings. + * fUnion.fStackFields begins with 2 bytes for storage flags + * and the length of relatively short strings, + * followed by the buffer for short string contents. + * There is no padding inside fStackFields. + * + * Heap-allocated and aliased strings use fUnion.fFields. + * Both fStackFields and fFields must begin with the same fields for flags and short length, + * that is, those must have the same memory offsets inside the object, + * because the flags must be inspected in order to decide which half of fUnion is being used. + * We assume that the compiler does not reorder the fields. + * + * (Padding at the end of fFields is ok: + * As long as it is no larger than fStackFields, it is not wasted space.) + * + * For some of the history of the UnicodeString class fields layout, see + * - ICU ticket #11551 "longer UnicodeString contents in stack buffer" + * - ICU ticket #11336 "UnicodeString: recombine stack buffer arrays" + * - ICU ticket #8322 "why is sizeof(UnicodeString)==48?" + */ + // (implicit) *vtable; + union StackBufferOrFields { + // fStackFields is used iff (fLengthAndFlags&kUsingStackBuffer) else fFields is used. + // Each struct of the union must begin with fLengthAndFlags. + struct { + int16_t fLengthAndFlags; // bit fields: see constants above + char16_t fBuffer[US_STACKBUF_SIZE]; // buffer for short strings + } fStackFields; + struct { + int16_t fLengthAndFlags; // bit fields: see constants above + int32_t fLength; // number of characters in fArray if >127; else undefined + int32_t fCapacity; // capacity of fArray (in char16_ts) + // array pointer last to minimize padding for machines with P128 data model + // or pointer sizes that are not a power of 2 + char16_t *fArray; // the Unicode data + } fFields; + } fUnion; +}; + +/** + * Create a new UnicodeString with the concatenation of two others. + * + * @param s1 The first string to be copied to the new one. + * @param s2 The second string to be copied to the new one, after s1. + * @return UnicodeString(s1).append(s2) + * @stable ICU 2.8 + */ +U_COMMON_API UnicodeString U_EXPORT2 +operator+ (const UnicodeString &s1, const UnicodeString &s2); + +//======================================== +// Inline members +//======================================== + +//======================================== +// Privates +//======================================== + +inline void +UnicodeString::pinIndex(int32_t& start) const +{ + // pin index + if(start < 0) { + start = 0; + } else if(start > length()) { + start = length(); + } +} + +inline void +UnicodeString::pinIndices(int32_t& start, + int32_t& _length) const +{ + // pin indices + int32_t len = length(); + if(start < 0) { + start = 0; + } else if(start > len) { + start = len; + } + if(_length < 0) { + _length = 0; + } else if(_length > (len - start)) { + _length = (len - start); + } +} + +inline char16_t* +UnicodeString::getArrayStart() { + return (fUnion.fFields.fLengthAndFlags&kUsingStackBuffer) ? + fUnion.fStackFields.fBuffer : fUnion.fFields.fArray; +} + +inline const char16_t* +UnicodeString::getArrayStart() const { + return (fUnion.fFields.fLengthAndFlags&kUsingStackBuffer) ? + fUnion.fStackFields.fBuffer : fUnion.fFields.fArray; +} + +//======================================== +// Default constructor +//======================================== + +inline +UnicodeString::UnicodeString() { + fUnion.fStackFields.fLengthAndFlags=kShortString; +} + +inline UnicodeString::UnicodeString(const std::nullptr_t /*text*/) { + fUnion.fStackFields.fLengthAndFlags=kShortString; +} + +inline UnicodeString::UnicodeString(const std::nullptr_t /*text*/, int32_t /*length*/) { + fUnion.fStackFields.fLengthAndFlags=kShortString; +} + +inline UnicodeString::UnicodeString(std::nullptr_t /*buffer*/, int32_t /*buffLength*/, int32_t /*buffCapacity*/) { + fUnion.fStackFields.fLengthAndFlags=kShortString; +} + +//======================================== +// Read-only implementation methods +//======================================== +inline UBool +UnicodeString::hasShortLength() const { + return fUnion.fFields.fLengthAndFlags>=0; +} + +inline int32_t +UnicodeString::getShortLength() const { + // fLengthAndFlags must be non-negative -> short length >= 0 + // and arithmetic or logical shift does not matter. + return fUnion.fFields.fLengthAndFlags>>kLengthShift; +} + +inline int32_t +UnicodeString::length() const { + return hasShortLength() ? getShortLength() : fUnion.fFields.fLength; +} + +inline int32_t +UnicodeString::getCapacity() const { + return (fUnion.fFields.fLengthAndFlags&kUsingStackBuffer) ? + US_STACKBUF_SIZE : fUnion.fFields.fCapacity; +} + +inline int32_t +UnicodeString::hashCode() const +{ return doHashCode(); } + +inline UBool +UnicodeString::isBogus() const +{ return (UBool)(fUnion.fFields.fLengthAndFlags & kIsBogus); } + +inline UBool +UnicodeString::isWritable() const +{ return (UBool)!(fUnion.fFields.fLengthAndFlags&(kOpenGetBuffer|kIsBogus)); } + +inline UBool +UnicodeString::isBufferWritable() const +{ + return (UBool)( + !(fUnion.fFields.fLengthAndFlags&(kOpenGetBuffer|kIsBogus|kBufferIsReadonly)) && + (!(fUnion.fFields.fLengthAndFlags&kRefCounted) || refCount()==1)); +} + +inline const char16_t * +UnicodeString::getBuffer() const { + if(fUnion.fFields.fLengthAndFlags&(kIsBogus|kOpenGetBuffer)) { + return nullptr; + } else if(fUnion.fFields.fLengthAndFlags&kUsingStackBuffer) { + return fUnion.fStackFields.fBuffer; + } else { + return fUnion.fFields.fArray; + } +} + +//======================================== +// Read-only alias methods +//======================================== +inline int8_t +UnicodeString::doCompare(int32_t start, + int32_t thisLength, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const +{ + if(srcText.isBogus()) { + return (int8_t)!isBogus(); // 0 if both are bogus, 1 otherwise + } else { + srcText.pinIndices(srcStart, srcLength); + return doCompare(start, thisLength, srcText.getArrayStart(), srcStart, srcLength); + } +} + +inline UBool +UnicodeString::operator== (const UnicodeString& text) const +{ + if(isBogus()) { + return text.isBogus(); + } else { + int32_t len = length(), textLength = text.length(); + return !text.isBogus() && len == textLength && doEquals(text, len); + } +} + +inline UBool +UnicodeString::operator!= (const UnicodeString& text) const +{ return (! operator==(text)); } + +inline UBool +UnicodeString::operator> (const UnicodeString& text) const +{ return doCompare(0, length(), text, 0, text.length()) == 1; } + +inline UBool +UnicodeString::operator< (const UnicodeString& text) const +{ return doCompare(0, length(), text, 0, text.length()) == -1; } + +inline UBool +UnicodeString::operator>= (const UnicodeString& text) const +{ return doCompare(0, length(), text, 0, text.length()) != -1; } + +inline UBool +UnicodeString::operator<= (const UnicodeString& text) const +{ return doCompare(0, length(), text, 0, text.length()) != 1; } + +inline int8_t +UnicodeString::compare(const UnicodeString& text) const +{ return doCompare(0, length(), text, 0, text.length()); } + +inline int8_t +UnicodeString::compare(int32_t start, + int32_t _length, + const UnicodeString& srcText) const +{ return doCompare(start, _length, srcText, 0, srcText.length()); } + +inline int8_t +UnicodeString::compare(ConstChar16Ptr srcChars, + int32_t srcLength) const +{ return doCompare(0, length(), srcChars, 0, srcLength); } + +inline int8_t +UnicodeString::compare(int32_t start, + int32_t _length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const +{ return doCompare(start, _length, srcText, srcStart, srcLength); } + +inline int8_t +UnicodeString::compare(int32_t start, + int32_t _length, + const char16_t *srcChars) const +{ return doCompare(start, _length, srcChars, 0, _length); } + +inline int8_t +UnicodeString::compare(int32_t start, + int32_t _length, + const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength) const +{ return doCompare(start, _length, srcChars, srcStart, srcLength); } + +inline int8_t +UnicodeString::compareBetween(int32_t start, + int32_t limit, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLimit) const +{ return doCompare(start, limit - start, + srcText, srcStart, srcLimit - srcStart); } + +inline int8_t +UnicodeString::doCompareCodePointOrder(int32_t start, + int32_t thisLength, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const +{ + if(srcText.isBogus()) { + return (int8_t)!isBogus(); // 0 if both are bogus, 1 otherwise + } else { + srcText.pinIndices(srcStart, srcLength); + return doCompareCodePointOrder(start, thisLength, srcText.getArrayStart(), srcStart, srcLength); + } +} + +inline int8_t +UnicodeString::compareCodePointOrder(const UnicodeString& text) const +{ return doCompareCodePointOrder(0, length(), text, 0, text.length()); } + +inline int8_t +UnicodeString::compareCodePointOrder(int32_t start, + int32_t _length, + const UnicodeString& srcText) const +{ return doCompareCodePointOrder(start, _length, srcText, 0, srcText.length()); } + +inline int8_t +UnicodeString::compareCodePointOrder(ConstChar16Ptr srcChars, + int32_t srcLength) const +{ return doCompareCodePointOrder(0, length(), srcChars, 0, srcLength); } + +inline int8_t +UnicodeString::compareCodePointOrder(int32_t start, + int32_t _length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const +{ return doCompareCodePointOrder(start, _length, srcText, srcStart, srcLength); } + +inline int8_t +UnicodeString::compareCodePointOrder(int32_t start, + int32_t _length, + const char16_t *srcChars) const +{ return doCompareCodePointOrder(start, _length, srcChars, 0, _length); } + +inline int8_t +UnicodeString::compareCodePointOrder(int32_t start, + int32_t _length, + const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength) const +{ return doCompareCodePointOrder(start, _length, srcChars, srcStart, srcLength); } + +inline int8_t +UnicodeString::compareCodePointOrderBetween(int32_t start, + int32_t limit, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLimit) const +{ return doCompareCodePointOrder(start, limit - start, + srcText, srcStart, srcLimit - srcStart); } + +inline int8_t +UnicodeString::doCaseCompare(int32_t start, + int32_t thisLength, + const UnicodeString &srcText, + int32_t srcStart, + int32_t srcLength, + uint32_t options) const +{ + if(srcText.isBogus()) { + return (int8_t)!isBogus(); // 0 if both are bogus, 1 otherwise + } else { + srcText.pinIndices(srcStart, srcLength); + return doCaseCompare(start, thisLength, srcText.getArrayStart(), srcStart, srcLength, options); + } +} + +inline int8_t +UnicodeString::caseCompare(const UnicodeString &text, uint32_t options) const { + return doCaseCompare(0, length(), text, 0, text.length(), options); +} + +inline int8_t +UnicodeString::caseCompare(int32_t start, + int32_t _length, + const UnicodeString &srcText, + uint32_t options) const { + return doCaseCompare(start, _length, srcText, 0, srcText.length(), options); +} + +inline int8_t +UnicodeString::caseCompare(ConstChar16Ptr srcChars, + int32_t srcLength, + uint32_t options) const { + return doCaseCompare(0, length(), srcChars, 0, srcLength, options); +} + +inline int8_t +UnicodeString::caseCompare(int32_t start, + int32_t _length, + const UnicodeString &srcText, + int32_t srcStart, + int32_t srcLength, + uint32_t options) const { + return doCaseCompare(start, _length, srcText, srcStart, srcLength, options); +} + +inline int8_t +UnicodeString::caseCompare(int32_t start, + int32_t _length, + const char16_t *srcChars, + uint32_t options) const { + return doCaseCompare(start, _length, srcChars, 0, _length, options); +} + +inline int8_t +UnicodeString::caseCompare(int32_t start, + int32_t _length, + const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength, + uint32_t options) const { + return doCaseCompare(start, _length, srcChars, srcStart, srcLength, options); +} + +inline int8_t +UnicodeString::caseCompareBetween(int32_t start, + int32_t limit, + const UnicodeString &srcText, + int32_t srcStart, + int32_t srcLimit, + uint32_t options) const { + return doCaseCompare(start, limit - start, srcText, srcStart, srcLimit - srcStart, options); +} + +inline int32_t +UnicodeString::indexOf(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength, + int32_t start, + int32_t _length) const +{ + if(!srcText.isBogus()) { + srcText.pinIndices(srcStart, srcLength); + if(srcLength > 0) { + return indexOf(srcText.getArrayStart(), srcStart, srcLength, start, _length); + } + } + return -1; +} + +inline int32_t +UnicodeString::indexOf(const UnicodeString& text) const +{ return indexOf(text, 0, text.length(), 0, length()); } + +inline int32_t +UnicodeString::indexOf(const UnicodeString& text, + int32_t start) const { + pinIndex(start); + return indexOf(text, 0, text.length(), start, length() - start); +} + +inline int32_t +UnicodeString::indexOf(const UnicodeString& text, + int32_t start, + int32_t _length) const +{ return indexOf(text, 0, text.length(), start, _length); } + +inline int32_t +UnicodeString::indexOf(const char16_t *srcChars, + int32_t srcLength, + int32_t start) const { + pinIndex(start); + return indexOf(srcChars, 0, srcLength, start, length() - start); +} + +inline int32_t +UnicodeString::indexOf(ConstChar16Ptr srcChars, + int32_t srcLength, + int32_t start, + int32_t _length) const +{ return indexOf(srcChars, 0, srcLength, start, _length); } + +inline int32_t +UnicodeString::indexOf(char16_t c, + int32_t start, + int32_t _length) const +{ return doIndexOf(c, start, _length); } + +inline int32_t +UnicodeString::indexOf(UChar32 c, + int32_t start, + int32_t _length) const +{ return doIndexOf(c, start, _length); } + +inline int32_t +UnicodeString::indexOf(char16_t c) const +{ return doIndexOf(c, 0, length()); } + +inline int32_t +UnicodeString::indexOf(UChar32 c) const +{ return indexOf(c, 0, length()); } + +inline int32_t +UnicodeString::indexOf(char16_t c, + int32_t start) const { + pinIndex(start); + return doIndexOf(c, start, length() - start); +} + +inline int32_t +UnicodeString::indexOf(UChar32 c, + int32_t start) const { + pinIndex(start); + return indexOf(c, start, length() - start); +} + +inline int32_t +UnicodeString::lastIndexOf(ConstChar16Ptr srcChars, + int32_t srcLength, + int32_t start, + int32_t _length) const +{ return lastIndexOf(srcChars, 0, srcLength, start, _length); } + +inline int32_t +UnicodeString::lastIndexOf(const char16_t *srcChars, + int32_t srcLength, + int32_t start) const { + pinIndex(start); + return lastIndexOf(srcChars, 0, srcLength, start, length() - start); +} + +inline int32_t +UnicodeString::lastIndexOf(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength, + int32_t start, + int32_t _length) const +{ + if(!srcText.isBogus()) { + srcText.pinIndices(srcStart, srcLength); + if(srcLength > 0) { + return lastIndexOf(srcText.getArrayStart(), srcStart, srcLength, start, _length); + } + } + return -1; +} + +inline int32_t +UnicodeString::lastIndexOf(const UnicodeString& text, + int32_t start, + int32_t _length) const +{ return lastIndexOf(text, 0, text.length(), start, _length); } + +inline int32_t +UnicodeString::lastIndexOf(const UnicodeString& text, + int32_t start) const { + pinIndex(start); + return lastIndexOf(text, 0, text.length(), start, length() - start); +} + +inline int32_t +UnicodeString::lastIndexOf(const UnicodeString& text) const +{ return lastIndexOf(text, 0, text.length(), 0, length()); } + +inline int32_t +UnicodeString::lastIndexOf(char16_t c, + int32_t start, + int32_t _length) const +{ return doLastIndexOf(c, start, _length); } + +inline int32_t +UnicodeString::lastIndexOf(UChar32 c, + int32_t start, + int32_t _length) const { + return doLastIndexOf(c, start, _length); +} + +inline int32_t +UnicodeString::lastIndexOf(char16_t c) const +{ return doLastIndexOf(c, 0, length()); } + +inline int32_t +UnicodeString::lastIndexOf(UChar32 c) const { + return lastIndexOf(c, 0, length()); +} + +inline int32_t +UnicodeString::lastIndexOf(char16_t c, + int32_t start) const { + pinIndex(start); + return doLastIndexOf(c, start, length() - start); +} + +inline int32_t +UnicodeString::lastIndexOf(UChar32 c, + int32_t start) const { + pinIndex(start); + return lastIndexOf(c, start, length() - start); +} + +inline UBool +UnicodeString::startsWith(const UnicodeString& text) const +{ return compare(0, text.length(), text, 0, text.length()) == 0; } + +inline UBool +UnicodeString::startsWith(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const +{ return doCompare(0, srcLength, srcText, srcStart, srcLength) == 0; } + +inline UBool +UnicodeString::startsWith(ConstChar16Ptr srcChars, int32_t srcLength) const { + if(srcLength < 0) { + srcLength = u_strlen(toUCharPtr(srcChars)); + } + return doCompare(0, srcLength, srcChars, 0, srcLength) == 0; +} + +inline UBool +UnicodeString::startsWith(const char16_t *srcChars, int32_t srcStart, int32_t srcLength) const { + if(srcLength < 0) { + srcLength = u_strlen(toUCharPtr(srcChars)); + } + return doCompare(0, srcLength, srcChars, srcStart, srcLength) == 0; +} + +inline UBool +UnicodeString::endsWith(const UnicodeString& text) const +{ return doCompare(length() - text.length(), text.length(), + text, 0, text.length()) == 0; } + +inline UBool +UnicodeString::endsWith(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const { + srcText.pinIndices(srcStart, srcLength); + return doCompare(length() - srcLength, srcLength, + srcText, srcStart, srcLength) == 0; +} + +inline UBool +UnicodeString::endsWith(ConstChar16Ptr srcChars, + int32_t srcLength) const { + if(srcLength < 0) { + srcLength = u_strlen(toUCharPtr(srcChars)); + } + return doCompare(length() - srcLength, srcLength, + srcChars, 0, srcLength) == 0; +} + +inline UBool +UnicodeString::endsWith(const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength) const { + if(srcLength < 0) { + srcLength = u_strlen(toUCharPtr(srcChars + srcStart)); + } + return doCompare(length() - srcLength, srcLength, + srcChars, srcStart, srcLength) == 0; +} + +//======================================== +// replace +//======================================== +inline UnicodeString& +UnicodeString::replace(int32_t start, + int32_t _length, + const UnicodeString& srcText) +{ return doReplace(start, _length, srcText, 0, srcText.length()); } + +inline UnicodeString& +UnicodeString::replace(int32_t start, + int32_t _length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) +{ return doReplace(start, _length, srcText, srcStart, srcLength); } + +inline UnicodeString& +UnicodeString::replace(int32_t start, + int32_t _length, + ConstChar16Ptr srcChars, + int32_t srcLength) +{ return doReplace(start, _length, srcChars, 0, srcLength); } + +inline UnicodeString& +UnicodeString::replace(int32_t start, + int32_t _length, + const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength) +{ return doReplace(start, _length, srcChars, srcStart, srcLength); } + +inline UnicodeString& +UnicodeString::replace(int32_t start, + int32_t _length, + char16_t srcChar) +{ return doReplace(start, _length, &srcChar, 0, 1); } + +inline UnicodeString& +UnicodeString::replaceBetween(int32_t start, + int32_t limit, + const UnicodeString& srcText) +{ return doReplace(start, limit - start, srcText, 0, srcText.length()); } + +inline UnicodeString& +UnicodeString::replaceBetween(int32_t start, + int32_t limit, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLimit) +{ return doReplace(start, limit - start, srcText, srcStart, srcLimit - srcStart); } + +inline UnicodeString& +UnicodeString::findAndReplace(const UnicodeString& oldText, + const UnicodeString& newText) +{ return findAndReplace(0, length(), oldText, 0, oldText.length(), + newText, 0, newText.length()); } + +inline UnicodeString& +UnicodeString::findAndReplace(int32_t start, + int32_t _length, + const UnicodeString& oldText, + const UnicodeString& newText) +{ return findAndReplace(start, _length, oldText, 0, oldText.length(), + newText, 0, newText.length()); } + +// ============================ +// extract +// ============================ +inline void +UnicodeString::doExtract(int32_t start, + int32_t _length, + UnicodeString& target) const +{ target.replace(0, target.length(), *this, start, _length); } + +inline void +UnicodeString::extract(int32_t start, + int32_t _length, + Char16Ptr target, + int32_t targetStart) const +{ doExtract(start, _length, target, targetStart); } + +inline void +UnicodeString::extract(int32_t start, + int32_t _length, + UnicodeString& target) const +{ doExtract(start, _length, target); } + +#if !UCONFIG_NO_CONVERSION + +inline int32_t +UnicodeString::extract(int32_t start, + int32_t _length, + char *dst, + const char *codepage) const + +{ + // This dstSize value will be checked explicitly + return extract(start, _length, dst, dst!=0 ? 0xffffffff : 0, codepage); +} + +#endif + +inline void +UnicodeString::extractBetween(int32_t start, + int32_t limit, + char16_t *dst, + int32_t dstStart) const { + pinIndex(start); + pinIndex(limit); + doExtract(start, limit - start, dst, dstStart); +} + +inline UnicodeString +UnicodeString::tempSubStringBetween(int32_t start, int32_t limit) const { + return tempSubString(start, limit - start); +} + +inline char16_t +UnicodeString::doCharAt(int32_t offset) const +{ + if((uint32_t)offset < (uint32_t)length()) { + return getArrayStart()[offset]; + } else { + return kInvalidUChar; + } +} + +inline char16_t +UnicodeString::charAt(int32_t offset) const +{ return doCharAt(offset); } + +inline char16_t +UnicodeString::operator[] (int32_t offset) const +{ return doCharAt(offset); } + +inline UBool +UnicodeString::isEmpty() const { + // Arithmetic or logical right shift does not matter: only testing for 0. + return (fUnion.fFields.fLengthAndFlags>>kLengthShift) == 0; +} + +//======================================== +// Write implementation methods +//======================================== +inline void +UnicodeString::setZeroLength() { + fUnion.fFields.fLengthAndFlags &= kAllStorageFlags; +} + +inline void +UnicodeString::setShortLength(int32_t len) { + // requires 0 <= len <= kMaxShortLength + fUnion.fFields.fLengthAndFlags = + (int16_t)((fUnion.fFields.fLengthAndFlags & kAllStorageFlags) | (len << kLengthShift)); +} + +inline void +UnicodeString::setLength(int32_t len) { + if(len <= kMaxShortLength) { + setShortLength(len); + } else { + fUnion.fFields.fLengthAndFlags |= kLengthIsLarge; + fUnion.fFields.fLength = len; + } +} + +inline void +UnicodeString::setToEmpty() { + fUnion.fFields.fLengthAndFlags = kShortString; +} + +inline void +UnicodeString::setArray(char16_t *array, int32_t len, int32_t capacity) { + setLength(len); + fUnion.fFields.fArray = array; + fUnion.fFields.fCapacity = capacity; +} + +inline UnicodeString& +UnicodeString::operator= (char16_t ch) +{ return doReplace(0, length(), &ch, 0, 1); } + +inline UnicodeString& +UnicodeString::operator= (UChar32 ch) +{ return replace(0, length(), ch); } + +inline UnicodeString& +UnicodeString::setTo(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) +{ + unBogus(); + return doReplace(0, length(), srcText, srcStart, srcLength); +} + +inline UnicodeString& +UnicodeString::setTo(const UnicodeString& srcText, + int32_t srcStart) +{ + unBogus(); + srcText.pinIndex(srcStart); + return doReplace(0, length(), srcText, srcStart, srcText.length() - srcStart); +} + +inline UnicodeString& +UnicodeString::setTo(const UnicodeString& srcText) +{ + return copyFrom(srcText); +} + +inline UnicodeString& +UnicodeString::setTo(const char16_t *srcChars, + int32_t srcLength) +{ + unBogus(); + return doReplace(0, length(), srcChars, 0, srcLength); +} + +inline UnicodeString& +UnicodeString::setTo(char16_t srcChar) +{ + unBogus(); + return doReplace(0, length(), &srcChar, 0, 1); +} + +inline UnicodeString& +UnicodeString::setTo(UChar32 srcChar) +{ + unBogus(); + return replace(0, length(), srcChar); +} + +inline UnicodeString& +UnicodeString::append(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) +{ return doAppend(srcText, srcStart, srcLength); } + +inline UnicodeString& +UnicodeString::append(const UnicodeString& srcText) +{ return doAppend(srcText, 0, srcText.length()); } + +inline UnicodeString& +UnicodeString::append(const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength) +{ return doAppend(srcChars, srcStart, srcLength); } + +inline UnicodeString& +UnicodeString::append(ConstChar16Ptr srcChars, + int32_t srcLength) +{ return doAppend(srcChars, 0, srcLength); } + +inline UnicodeString& +UnicodeString::append(char16_t srcChar) +{ return doAppend(&srcChar, 0, 1); } + +inline UnicodeString& +UnicodeString::operator+= (char16_t ch) +{ return doAppend(&ch, 0, 1); } + +inline UnicodeString& +UnicodeString::operator+= (UChar32 ch) { + return append(ch); +} + +inline UnicodeString& +UnicodeString::operator+= (const UnicodeString& srcText) +{ return doAppend(srcText, 0, srcText.length()); } + +inline UnicodeString& +UnicodeString::insert(int32_t start, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) +{ return doReplace(start, 0, srcText, srcStart, srcLength); } + +inline UnicodeString& +UnicodeString::insert(int32_t start, + const UnicodeString& srcText) +{ return doReplace(start, 0, srcText, 0, srcText.length()); } + +inline UnicodeString& +UnicodeString::insert(int32_t start, + const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength) +{ return doReplace(start, 0, srcChars, srcStart, srcLength); } + +inline UnicodeString& +UnicodeString::insert(int32_t start, + ConstChar16Ptr srcChars, + int32_t srcLength) +{ return doReplace(start, 0, srcChars, 0, srcLength); } + +inline UnicodeString& +UnicodeString::insert(int32_t start, + char16_t srcChar) +{ return doReplace(start, 0, &srcChar, 0, 1); } + +inline UnicodeString& +UnicodeString::insert(int32_t start, + UChar32 srcChar) +{ return replace(start, 0, srcChar); } + + +inline UnicodeString& +UnicodeString::remove() +{ + // remove() of a bogus string makes the string empty and non-bogus + if(isBogus()) { + setToEmpty(); + } else { + setZeroLength(); + } + return *this; +} + +inline UnicodeString& +UnicodeString::remove(int32_t start, + int32_t _length) +{ + if(start <= 0 && _length == INT32_MAX) { + // remove(guaranteed everything) of a bogus string makes the string empty and non-bogus + return remove(); + } + return doReplace(start, _length, NULL, 0, 0); +} + +inline UnicodeString& +UnicodeString::removeBetween(int32_t start, + int32_t limit) +{ return doReplace(start, limit - start, NULL, 0, 0); } + +inline UnicodeString & +UnicodeString::retainBetween(int32_t start, int32_t limit) { + truncate(limit); + return doReplace(0, start, NULL, 0, 0); +} + +inline UBool +UnicodeString::truncate(int32_t targetLength) +{ + if(isBogus() && targetLength == 0) { + // truncate(0) of a bogus string makes the string empty and non-bogus + unBogus(); + return FALSE; + } else if((uint32_t)targetLength < (uint32_t)length()) { + setLength(targetLength); + return TRUE; + } else { + return FALSE; + } +} + +inline UnicodeString& +UnicodeString::reverse() +{ return doReverse(0, length()); } + +inline UnicodeString& +UnicodeString::reverse(int32_t start, + int32_t _length) +{ return doReverse(start, _length); } + +U_NAMESPACE_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unorm.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unorm.h new file mode 100755 index 00000000..3839de12 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unorm.h @@ -0,0 +1,472 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (c) 1996-2016, International Business Machines Corporation +* and others. All Rights Reserved. +******************************************************************************* +* File unorm.h +* +* Created by: Vladimir Weinstein 12052000 +* +* Modification history : +* +* Date Name Description +* 02/01/01 synwee Added normalization quickcheck enum and method. +*/ +#ifndef UNORM_H +#define UNORM_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_NORMALIZATION + +#include "unicode/uiter.h" +#include "unicode/unorm2.h" + +/** + * \file + * \brief C API: Unicode Normalization + * + * Old Unicode normalization API. + * + * This API has been replaced by the unorm2.h API and is only available + * for backward compatibility. The functions here simply delegate to the + * unorm2.h functions, for example unorm2_getInstance() and unorm2_normalize(). + * There is one exception: The new API does not provide a replacement for unorm_compare(). + * Its declaration has been moved to unorm2.h. + * + * <code>unorm_normalize</code> transforms Unicode text into an equivalent composed or + * decomposed form, allowing for easier sorting and searching of text. + * <code>unorm_normalize</code> supports the standard normalization forms described in + * <a href="http://www.unicode.org/unicode/reports/tr15/" target="unicode"> + * Unicode Standard Annex #15: Unicode Normalization Forms</a>. + * + * Characters with accents or other adornments can be encoded in + * several different ways in Unicode. For example, take the character A-acute. + * In Unicode, this can be encoded as a single character (the + * "composed" form): + * + * \code + * 00C1 LATIN CAPITAL LETTER A WITH ACUTE + * \endcode + * + * or as two separate characters (the "decomposed" form): + * + * \code + * 0041 LATIN CAPITAL LETTER A + * 0301 COMBINING ACUTE ACCENT + * \endcode + * + * To a user of your program, however, both of these sequences should be + * treated as the same "user-level" character "A with acute accent". When you are searching or + * comparing text, you must ensure that these two sequences are treated + * equivalently. In addition, you must handle characters with more than one + * accent. Sometimes the order of a character's combining accents is + * significant, while in other cases accent sequences in different orders are + * really equivalent. + * + * Similarly, the string "ffi" can be encoded as three separate letters: + * + * \code + * 0066 LATIN SMALL LETTER F + * 0066 LATIN SMALL LETTER F + * 0069 LATIN SMALL LETTER I + * \endcode + * + * or as the single character + * + * \code + * FB03 LATIN SMALL LIGATURE FFI + * \endcode + * + * The ffi ligature is not a distinct semantic character, and strictly speaking + * it shouldn't be in Unicode at all, but it was included for compatibility + * with existing character sets that already provided it. The Unicode standard + * identifies such characters by giving them "compatibility" decompositions + * into the corresponding semantic characters. When sorting and searching, you + * will often want to use these mappings. + * + * <code>unorm_normalize</code> helps solve these problems by transforming text into the + * canonical composed and decomposed forms as shown in the first example above. + * In addition, you can have it perform compatibility decompositions so that + * you can treat compatibility characters the same as their equivalents. + * Finally, <code>unorm_normalize</code> rearranges accents into the proper canonical + * order, so that you do not have to worry about accent rearrangement on your + * own. + * + * Form FCD, "Fast C or D", is also designed for collation. + * It allows to work on strings that are not necessarily normalized + * with an algorithm (like in collation) that works under "canonical closure", i.e., it treats precomposed + * characters and their decomposed equivalents the same. + * + * It is not a normalization form because it does not provide for uniqueness of representation. Multiple strings + * may be canonically equivalent (their NFDs are identical) and may all conform to FCD without being identical + * themselves. + * + * The form is defined such that the "raw decomposition", the recursive canonical decomposition of each character, + * results in a string that is canonically ordered. This means that precomposed characters are allowed for as long + * as their decompositions do not need canonical reordering. + * + * Its advantage for a process like collation is that all NFD and most NFC texts - and many unnormalized texts - + * already conform to FCD and do not need to be normalized (NFD) for such a process. The FCD quick check will + * return UNORM_YES for most strings in practice. + * + * unorm_normalize(UNORM_FCD) may be implemented with UNORM_NFD. + * + * For more details on FCD see the collation design document: + * http://source.icu-project.org/repos/icu/icuhtml/trunk/design/collation/ICU_collation_design.htm + * + * ICU collation performs either NFD or FCD normalization automatically if normalization + * is turned on for the collator object. + * Beyond collation and string search, normalized strings may be useful for string equivalence comparisons, + * transliteration/transcription, unique representations, etc. + * + * The W3C generally recommends to exchange texts in NFC. + * Note also that most legacy character encodings use only precomposed forms and often do not + * encode any combining marks by themselves. For conversion to such character encodings the + * Unicode text needs to be normalized to NFC. + * For more usage examples, see the Unicode Standard Annex. + */ + +// Do not conditionalize the following enum with #ifndef U_HIDE_DEPRECATED_API, +// it is needed for layout of Normalizer object. +/** + * Constants for normalization modes. + * @deprecated ICU 56 Use unorm2.h instead. + */ +typedef enum { + /** No decomposition/composition. @deprecated ICU 56 Use unorm2.h instead. */ + UNORM_NONE = 1, + /** Canonical decomposition. @deprecated ICU 56 Use unorm2.h instead. */ + UNORM_NFD = 2, + /** Compatibility decomposition. @deprecated ICU 56 Use unorm2.h instead. */ + UNORM_NFKD = 3, + /** Canonical decomposition followed by canonical composition. @deprecated ICU 56 Use unorm2.h instead. */ + UNORM_NFC = 4, + /** Default normalization. @deprecated ICU 56 Use unorm2.h instead. */ + UNORM_DEFAULT = UNORM_NFC, + /** Compatibility decomposition followed by canonical composition. @deprecated ICU 56 Use unorm2.h instead. */ + UNORM_NFKC =5, + /** "Fast C or D" form. @deprecated ICU 56 Use unorm2.h instead. */ + UNORM_FCD = 6, + + /** One more than the highest normalization mode constant. @deprecated ICU 56 Use unorm2.h instead. */ + UNORM_MODE_COUNT +} UNormalizationMode; + +#ifndef U_HIDE_DEPRECATED_API + +/** + * Constants for options flags for normalization. + * Use 0 for default options, + * including normalization according to the Unicode version + * that is currently supported by ICU (see u_getUnicodeVersion). + * @deprecated ICU 56 Use unorm2.h instead. + */ +enum { + /** + * Options bit set value to select Unicode 3.2 normalization + * (except NormalizationCorrections). + * At most one Unicode version can be selected at a time. + * @deprecated ICU 56 Use unorm2.h instead. + */ + UNORM_UNICODE_3_2=0x20 +}; + +/** + * Lowest-order bit number of unorm_compare() options bits corresponding to + * normalization options bits. + * + * The options parameter for unorm_compare() uses most bits for + * itself and for various comparison and folding flags. + * The most significant bits, however, are shifted down and passed on + * to the normalization implementation. + * (That is, from unorm_compare(..., options, ...), + * options>>UNORM_COMPARE_NORM_OPTIONS_SHIFT will be passed on to the + * internal normalization functions.) + * + * @see unorm_compare + * @deprecated ICU 56 Use unorm2.h instead. + */ +#define UNORM_COMPARE_NORM_OPTIONS_SHIFT 20 + +/** + * Normalize a string. + * The string will be normalized according the specified normalization mode + * and options. + * The source and result buffers must not be the same, nor overlap. + * + * @param source The string to normalize. + * @param sourceLength The length of source, or -1 if NUL-terminated. + * @param mode The normalization mode; one of UNORM_NONE, + * UNORM_NFD, UNORM_NFC, UNORM_NFKC, UNORM_NFKD, UNORM_DEFAULT. + * @param options The normalization options, ORed together (0 for no options). + * @param result A pointer to a buffer to receive the result string. + * The result string is NUL-terminated if possible. + * @param resultLength The maximum size of result. + * @param status A pointer to a UErrorCode to receive any errors. + * @return The total buffer size needed; if greater than resultLength, + * the output was truncated, and the error code is set to U_BUFFER_OVERFLOW_ERROR. + * @deprecated ICU 56 Use unorm2.h instead. + */ +U_DEPRECATED int32_t U_EXPORT2 +unorm_normalize(const UChar *source, int32_t sourceLength, + UNormalizationMode mode, int32_t options, + UChar *result, int32_t resultLength, + UErrorCode *status); + +/** + * Performing quick check on a string, to quickly determine if the string is + * in a particular normalization format. + * Three types of result can be returned UNORM_YES, UNORM_NO or + * UNORM_MAYBE. Result UNORM_YES indicates that the argument + * string is in the desired normalized format, UNORM_NO determines that + * argument string is not in the desired normalized format. A + * UNORM_MAYBE result indicates that a more thorough check is required, + * the user may have to put the string in its normalized form and compare the + * results. + * + * @param source string for determining if it is in a normalized format + * @param sourcelength length of source to test, or -1 if NUL-terminated + * @param mode which normalization form to test for + * @param status a pointer to a UErrorCode to receive any errors + * @return UNORM_YES, UNORM_NO or UNORM_MAYBE + * + * @see unorm_isNormalized + * @deprecated ICU 56 Use unorm2.h instead. + */ +U_DEPRECATED UNormalizationCheckResult U_EXPORT2 +unorm_quickCheck(const UChar *source, int32_t sourcelength, + UNormalizationMode mode, + UErrorCode *status); + +/** + * Performing quick check on a string; same as unorm_quickCheck but + * takes an extra options parameter like most normalization functions. + * + * @param src String that is to be tested if it is in a normalization format. + * @param srcLength Length of source to test, or -1 if NUL-terminated. + * @param mode Which normalization form to test for. + * @param options The normalization options, ORed together (0 for no options). + * @param pErrorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return UNORM_YES, UNORM_NO or UNORM_MAYBE + * + * @see unorm_quickCheck + * @see unorm_isNormalized + * @deprecated ICU 56 Use unorm2.h instead. + */ +U_DEPRECATED UNormalizationCheckResult U_EXPORT2 +unorm_quickCheckWithOptions(const UChar *src, int32_t srcLength, + UNormalizationMode mode, int32_t options, + UErrorCode *pErrorCode); + +/** + * Test if a string is in a given normalization form. + * This is semantically equivalent to source.equals(normalize(source, mode)) . + * + * Unlike unorm_quickCheck(), this function returns a definitive result, + * never a "maybe". + * For NFD, NFKD, and FCD, both functions work exactly the same. + * For NFC and NFKC where quickCheck may return "maybe", this function will + * perform further tests to arrive at a TRUE/FALSE result. + * + * @param src String that is to be tested if it is in a normalization format. + * @param srcLength Length of source to test, or -1 if NUL-terminated. + * @param mode Which normalization form to test for. + * @param pErrorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return Boolean value indicating whether the source string is in the + * "mode" normalization form. + * + * @see unorm_quickCheck + * @deprecated ICU 56 Use unorm2.h instead. + */ +U_DEPRECATED UBool U_EXPORT2 +unorm_isNormalized(const UChar *src, int32_t srcLength, + UNormalizationMode mode, + UErrorCode *pErrorCode); + +/** + * Test if a string is in a given normalization form; same as unorm_isNormalized but + * takes an extra options parameter like most normalization functions. + * + * @param src String that is to be tested if it is in a normalization format. + * @param srcLength Length of source to test, or -1 if NUL-terminated. + * @param mode Which normalization form to test for. + * @param options The normalization options, ORed together (0 for no options). + * @param pErrorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return Boolean value indicating whether the source string is in the + * "mode/options" normalization form. + * + * @see unorm_quickCheck + * @see unorm_isNormalized + * @deprecated ICU 56 Use unorm2.h instead. + */ +U_DEPRECATED UBool U_EXPORT2 +unorm_isNormalizedWithOptions(const UChar *src, int32_t srcLength, + UNormalizationMode mode, int32_t options, + UErrorCode *pErrorCode); + +/** + * Iterative normalization forward. + * This function (together with unorm_previous) is somewhat + * similar to the C++ Normalizer class (see its non-static functions). + * + * Iterative normalization is useful when only a small portion of a longer + * string/text needs to be processed. + * + * For example, the likelihood may be high that processing the first 10% of some + * text will be sufficient to find certain data. + * Another example: When one wants to concatenate two normalized strings and get a + * normalized result, it is much more efficient to normalize just a small part of + * the result around the concatenation place instead of re-normalizing everything. + * + * The input text is an instance of the C character iteration API UCharIterator. + * It may wrap around a simple string, a CharacterIterator, a Replaceable, or any + * other kind of text object. + * + * If a buffer overflow occurs, then the caller needs to reset the iterator to the + * old index and call the function again with a larger buffer - if the caller cares + * for the actual output. + * Regardless of the output buffer, the iterator will always be moved to the next + * normalization boundary. + * + * This function (like unorm_previous) serves two purposes: + * + * 1) To find the next boundary so that the normalization of the part of the text + * from the current position to that boundary does not affect and is not affected + * by the part of the text beyond that boundary. + * + * 2) To normalize the text up to the boundary. + * + * The second step is optional, per the doNormalize parameter. + * It is omitted for operations like string concatenation, where the two adjacent + * string ends need to be normalized together. + * In such a case, the output buffer will just contain a copy of the text up to the + * boundary. + * + * pNeededToNormalize is an output-only parameter. Its output value is only defined + * if normalization was requested (doNormalize) and successful (especially, no + * buffer overflow). + * It is useful for operations like a normalizing transliterator, where one would + * not want to replace a piece of text if it is not modified. + * + * If doNormalize==TRUE and pNeededToNormalize!=NULL then *pNeeded... is set TRUE + * if the normalization was necessary. + * + * If doNormalize==FALSE then *pNeededToNormalize will be set to FALSE. + * + * If the buffer overflows, then *pNeededToNormalize will be undefined; + * essentially, whenever U_FAILURE is true (like in buffer overflows), this result + * will be undefined. + * + * @param src The input text in the form of a C character iterator. + * @param dest The output buffer; can be NULL if destCapacity==0 for pure preflighting. + * @param destCapacity The number of UChars that fit into dest. + * @param mode The normalization mode. + * @param options The normalization options, ORed together (0 for no options). + * @param doNormalize Indicates if the source text up to the next boundary + * is to be normalized (TRUE) or just copied (FALSE). + * @param pNeededToNormalize Output flag indicating if the normalization resulted in + * different text from the input. + * Not defined if an error occurs including buffer overflow. + * Always FALSE if !doNormalize. + * @param pErrorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return Length of output (number of UChars) when successful or buffer overflow. + * + * @see unorm_previous + * @see unorm_normalize + * + * @deprecated ICU 56 Use unorm2.h instead. + */ +U_DEPRECATED int32_t U_EXPORT2 +unorm_next(UCharIterator *src, + UChar *dest, int32_t destCapacity, + UNormalizationMode mode, int32_t options, + UBool doNormalize, UBool *pNeededToNormalize, + UErrorCode *pErrorCode); + +/** + * Iterative normalization backward. + * This function (together with unorm_next) is somewhat + * similar to the C++ Normalizer class (see its non-static functions). + * For all details see unorm_next. + * + * @param src The input text in the form of a C character iterator. + * @param dest The output buffer; can be NULL if destCapacity==0 for pure preflighting. + * @param destCapacity The number of UChars that fit into dest. + * @param mode The normalization mode. + * @param options The normalization options, ORed together (0 for no options). + * @param doNormalize Indicates if the source text up to the next boundary + * is to be normalized (TRUE) or just copied (FALSE). + * @param pNeededToNormalize Output flag indicating if the normalization resulted in + * different text from the input. + * Not defined if an error occurs including buffer overflow. + * Always FALSE if !doNormalize. + * @param pErrorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return Length of output (number of UChars) when successful or buffer overflow. + * + * @see unorm_next + * @see unorm_normalize + * + * @deprecated ICU 56 Use unorm2.h instead. + */ +U_DEPRECATED int32_t U_EXPORT2 +unorm_previous(UCharIterator *src, + UChar *dest, int32_t destCapacity, + UNormalizationMode mode, int32_t options, + UBool doNormalize, UBool *pNeededToNormalize, + UErrorCode *pErrorCode); + +/** + * Concatenate normalized strings, making sure that the result is normalized as well. + * + * If both the left and the right strings are in + * the normalization form according to "mode/options", + * then the result will be + * + * \code + * dest=normalize(left+right, mode, options) + * \endcode + * + * With the input strings already being normalized, + * this function will use unorm_next() and unorm_previous() + * to find the adjacent end pieces of the input strings. + * Only the concatenation of these end pieces will be normalized and + * then concatenated with the remaining parts of the input strings. + * + * It is allowed to have dest==left to avoid copying the entire left string. + * + * @param left Left source string, may be same as dest. + * @param leftLength Length of left source string, or -1 if NUL-terminated. + * @param right Right source string. Must not be the same as dest, nor overlap. + * @param rightLength Length of right source string, or -1 if NUL-terminated. + * @param dest The output buffer; can be NULL if destCapacity==0 for pure preflighting. + * @param destCapacity The number of UChars that fit into dest. + * @param mode The normalization mode. + * @param options The normalization options, ORed together (0 for no options). + * @param pErrorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return Length of output (number of UChars) when successful or buffer overflow. + * + * @see unorm_normalize + * @see unorm_next + * @see unorm_previous + * + * @deprecated ICU 56 Use unorm2.h instead. + */ +U_DEPRECATED int32_t U_EXPORT2 +unorm_concatenate(const UChar *left, int32_t leftLength, + const UChar *right, int32_t rightLength, + UChar *dest, int32_t destCapacity, + UNormalizationMode mode, int32_t options, + UErrorCode *pErrorCode); + +#endif /* U_HIDE_DEPRECATED_API */ +#endif /* #if !UCONFIG_NO_NORMALIZATION */ +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unorm2.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unorm2.h new file mode 100755 index 00000000..a9bd02f2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unorm2.h @@ -0,0 +1,603 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 2009-2015, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: unorm2.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2009dec15 +* created by: Markus W. Scherer +*/ + +#ifndef __UNORM2_H__ +#define __UNORM2_H__ + +/** + * \file + * \brief C API: New API for Unicode Normalization. + * + * Unicode normalization functionality for standard Unicode normalization or + * for using custom mapping tables. + * All instances of UNormalizer2 are unmodifiable/immutable. + * Instances returned by unorm2_getInstance() are singletons that must not be deleted by the caller. + * For more details see the Normalizer2 C++ class. + */ + +#include "unicode/utypes.h" +#include "unicode/localpointer.h" +#include "unicode/stringoptions.h" +#include "unicode/uset.h" + +/** + * Constants for normalization modes. + * For details about standard Unicode normalization forms + * and about the algorithms which are also used with custom mapping tables + * see http://www.unicode.org/unicode/reports/tr15/ + * @stable ICU 4.4 + */ +typedef enum { + /** + * Decomposition followed by composition. + * Same as standard NFC when using an "nfc" instance. + * Same as standard NFKC when using an "nfkc" instance. + * For details about standard Unicode normalization forms + * see http://www.unicode.org/unicode/reports/tr15/ + * @stable ICU 4.4 + */ + UNORM2_COMPOSE, + /** + * Map, and reorder canonically. + * Same as standard NFD when using an "nfc" instance. + * Same as standard NFKD when using an "nfkc" instance. + * For details about standard Unicode normalization forms + * see http://www.unicode.org/unicode/reports/tr15/ + * @stable ICU 4.4 + */ + UNORM2_DECOMPOSE, + /** + * "Fast C or D" form. + * If a string is in this form, then further decomposition <i>without reordering</i> + * would yield the same form as DECOMPOSE. + * Text in "Fast C or D" form can be processed efficiently with data tables + * that are "canonically closed", that is, that provide equivalent data for + * equivalent text, without having to be fully normalized. + * Not a standard Unicode normalization form. + * Not a unique form: Different FCD strings can be canonically equivalent. + * For details see http://www.unicode.org/notes/tn5/#FCD + * @stable ICU 4.4 + */ + UNORM2_FCD, + /** + * Compose only contiguously. + * Also known as "FCC" or "Fast C Contiguous". + * The result will often but not always be in NFC. + * The result will conform to FCD which is useful for processing. + * Not a standard Unicode normalization form. + * For details see http://www.unicode.org/notes/tn5/#FCC + * @stable ICU 4.4 + */ + UNORM2_COMPOSE_CONTIGUOUS +} UNormalization2Mode; + +/** + * Result values for normalization quick check functions. + * For details see http://www.unicode.org/reports/tr15/#Detecting_Normalization_Forms + * @stable ICU 2.0 + */ +typedef enum UNormalizationCheckResult { + /** + * The input string is not in the normalization form. + * @stable ICU 2.0 + */ + UNORM_NO, + /** + * The input string is in the normalization form. + * @stable ICU 2.0 + */ + UNORM_YES, + /** + * The input string may or may not be in the normalization form. + * This value is only returned for composition forms like NFC and FCC, + * when a backward-combining character is found for which the surrounding text + * would have to be analyzed further. + * @stable ICU 2.0 + */ + UNORM_MAYBE +} UNormalizationCheckResult; + +/** + * Opaque C service object type for the new normalization API. + * @stable ICU 4.4 + */ +struct UNormalizer2; +typedef struct UNormalizer2 UNormalizer2; /**< C typedef for struct UNormalizer2. @stable ICU 4.4 */ + +#if !UCONFIG_NO_NORMALIZATION + +/** + * Returns a UNormalizer2 instance for Unicode NFC normalization. + * Same as unorm2_getInstance(NULL, "nfc", UNORM2_COMPOSE, pErrorCode). + * Returns an unmodifiable singleton instance. Do not delete it. + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the requested Normalizer2, if successful + * @stable ICU 49 + */ +U_STABLE const UNormalizer2 * U_EXPORT2 +unorm2_getNFCInstance(UErrorCode *pErrorCode); + +/** + * Returns a UNormalizer2 instance for Unicode NFD normalization. + * Same as unorm2_getInstance(NULL, "nfc", UNORM2_DECOMPOSE, pErrorCode). + * Returns an unmodifiable singleton instance. Do not delete it. + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the requested Normalizer2, if successful + * @stable ICU 49 + */ +U_STABLE const UNormalizer2 * U_EXPORT2 +unorm2_getNFDInstance(UErrorCode *pErrorCode); + +/** + * Returns a UNormalizer2 instance for Unicode NFKC normalization. + * Same as unorm2_getInstance(NULL, "nfkc", UNORM2_COMPOSE, pErrorCode). + * Returns an unmodifiable singleton instance. Do not delete it. + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the requested Normalizer2, if successful + * @stable ICU 49 + */ +U_STABLE const UNormalizer2 * U_EXPORT2 +unorm2_getNFKCInstance(UErrorCode *pErrorCode); + +/** + * Returns a UNormalizer2 instance for Unicode NFKD normalization. + * Same as unorm2_getInstance(NULL, "nfkc", UNORM2_DECOMPOSE, pErrorCode). + * Returns an unmodifiable singleton instance. Do not delete it. + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the requested Normalizer2, if successful + * @stable ICU 49 + */ +U_STABLE const UNormalizer2 * U_EXPORT2 +unorm2_getNFKDInstance(UErrorCode *pErrorCode); + +/** + * Returns a UNormalizer2 instance for Unicode NFKC_Casefold normalization. + * Same as unorm2_getInstance(NULL, "nfkc_cf", UNORM2_COMPOSE, pErrorCode). + * Returns an unmodifiable singleton instance. Do not delete it. + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the requested Normalizer2, if successful + * @stable ICU 49 + */ +U_STABLE const UNormalizer2 * U_EXPORT2 +unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode); + +/** + * Returns a UNormalizer2 instance which uses the specified data file + * (packageName/name similar to ucnv_openPackage() and ures_open()/ResourceBundle) + * and which composes or decomposes text according to the specified mode. + * Returns an unmodifiable singleton instance. Do not delete it. + * + * Use packageName=NULL for data files that are part of ICU's own data. + * Use name="nfc" and UNORM2_COMPOSE/UNORM2_DECOMPOSE for Unicode standard NFC/NFD. + * Use name="nfkc" and UNORM2_COMPOSE/UNORM2_DECOMPOSE for Unicode standard NFKC/NFKD. + * Use name="nfkc_cf" and UNORM2_COMPOSE for Unicode standard NFKC_CF=NFKC_Casefold. + * + * @param packageName NULL for ICU built-in data, otherwise application data package name + * @param name "nfc" or "nfkc" or "nfkc_cf" or name of custom data file + * @param mode normalization mode (compose or decompose etc.) + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the requested UNormalizer2, if successful + * @stable ICU 4.4 + */ +U_STABLE const UNormalizer2 * U_EXPORT2 +unorm2_getInstance(const char *packageName, + const char *name, + UNormalization2Mode mode, + UErrorCode *pErrorCode); + +/** + * Constructs a filtered normalizer wrapping any UNormalizer2 instance + * and a filter set. + * Both are aliased and must not be modified or deleted while this object + * is used. + * The filter set should be frozen; otherwise the performance will suffer greatly. + * @param norm2 wrapped UNormalizer2 instance + * @param filterSet USet which determines the characters to be normalized + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the requested UNormalizer2, if successful + * @stable ICU 4.4 + */ +U_STABLE UNormalizer2 * U_EXPORT2 +unorm2_openFiltered(const UNormalizer2 *norm2, const USet *filterSet, UErrorCode *pErrorCode); + +/** + * Closes a UNormalizer2 instance from unorm2_openFiltered(). + * Do not close instances from unorm2_getInstance()! + * @param norm2 UNormalizer2 instance to be closed + * @stable ICU 4.4 + */ +U_STABLE void U_EXPORT2 +unorm2_close(UNormalizer2 *norm2); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUNormalizer2Pointer + * "Smart pointer" class, closes a UNormalizer2 via unorm2_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUNormalizer2Pointer, UNormalizer2, unorm2_close); + +U_NAMESPACE_END + +#endif + +/** + * Writes the normalized form of the source string to the destination string + * (replacing its contents) and returns the length of the destination string. + * The source and destination strings must be different buffers. + * @param norm2 UNormalizer2 instance + * @param src source string + * @param length length of the source string, or -1 if NUL-terminated + * @param dest destination string; its contents is replaced with normalized src + * @param capacity number of UChars that can be written to dest + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return dest + * @stable ICU 4.4 + */ +U_STABLE int32_t U_EXPORT2 +unorm2_normalize(const UNormalizer2 *norm2, + const UChar *src, int32_t length, + UChar *dest, int32_t capacity, + UErrorCode *pErrorCode); +/** + * Appends the normalized form of the second string to the first string + * (merging them at the boundary) and returns the length of the first string. + * The result is normalized if the first string was normalized. + * The first and second strings must be different buffers. + * @param norm2 UNormalizer2 instance + * @param first string, should be normalized + * @param firstLength length of the first string, or -1 if NUL-terminated + * @param firstCapacity number of UChars that can be written to first + * @param second string, will be normalized + * @param secondLength length of the source string, or -1 if NUL-terminated + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return first + * @stable ICU 4.4 + */ +U_STABLE int32_t U_EXPORT2 +unorm2_normalizeSecondAndAppend(const UNormalizer2 *norm2, + UChar *first, int32_t firstLength, int32_t firstCapacity, + const UChar *second, int32_t secondLength, + UErrorCode *pErrorCode); +/** + * Appends the second string to the first string + * (merging them at the boundary) and returns the length of the first string. + * The result is normalized if both the strings were normalized. + * The first and second strings must be different buffers. + * @param norm2 UNormalizer2 instance + * @param first string, should be normalized + * @param firstLength length of the first string, or -1 if NUL-terminated + * @param firstCapacity number of UChars that can be written to first + * @param second string, should be normalized + * @param secondLength length of the source string, or -1 if NUL-terminated + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return first + * @stable ICU 4.4 + */ +U_STABLE int32_t U_EXPORT2 +unorm2_append(const UNormalizer2 *norm2, + UChar *first, int32_t firstLength, int32_t firstCapacity, + const UChar *second, int32_t secondLength, + UErrorCode *pErrorCode); + +/** + * Gets the decomposition mapping of c. + * Roughly equivalent to normalizing the String form of c + * on a UNORM2_DECOMPOSE UNormalizer2 instance, but much faster, and except that this function + * returns a negative value and does not write a string + * if c does not have a decomposition mapping in this instance's data. + * This function is independent of the mode of the UNormalizer2. + * @param norm2 UNormalizer2 instance + * @param c code point + * @param decomposition String buffer which will be set to c's + * decomposition mapping, if there is one. + * @param capacity number of UChars that can be written to decomposition + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the non-negative length of c's decomposition, if there is one; otherwise a negative value + * @stable ICU 4.6 + */ +U_STABLE int32_t U_EXPORT2 +unorm2_getDecomposition(const UNormalizer2 *norm2, + UChar32 c, UChar *decomposition, int32_t capacity, + UErrorCode *pErrorCode); + +/** + * Gets the raw decomposition mapping of c. + * + * This is similar to the unorm2_getDecomposition() function but returns the + * raw decomposition mapping as specified in UnicodeData.txt or + * (for custom data) in the mapping files processed by the gennorm2 tool. + * By contrast, unorm2_getDecomposition() returns the processed, + * recursively-decomposed version of this mapping. + * + * When used on a standard NFKC Normalizer2 instance, + * unorm2_getRawDecomposition() returns the Unicode Decomposition_Mapping (dm) property. + * + * When used on a standard NFC Normalizer2 instance, + * it returns the Decomposition_Mapping only if the Decomposition_Type (dt) is Canonical (Can); + * in this case, the result contains either one or two code points (=1..4 UChars). + * + * This function is independent of the mode of the UNormalizer2. + * @param norm2 UNormalizer2 instance + * @param c code point + * @param decomposition String buffer which will be set to c's + * raw decomposition mapping, if there is one. + * @param capacity number of UChars that can be written to decomposition + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the non-negative length of c's raw decomposition, if there is one; otherwise a negative value + * @stable ICU 49 + */ +U_STABLE int32_t U_EXPORT2 +unorm2_getRawDecomposition(const UNormalizer2 *norm2, + UChar32 c, UChar *decomposition, int32_t capacity, + UErrorCode *pErrorCode); + +/** + * Performs pairwise composition of a & b and returns the composite if there is one. + * + * Returns a composite code point c only if c has a two-way mapping to a+b. + * In standard Unicode normalization, this means that + * c has a canonical decomposition to a+b + * and c does not have the Full_Composition_Exclusion property. + * + * This function is independent of the mode of the UNormalizer2. + * @param norm2 UNormalizer2 instance + * @param a A (normalization starter) code point. + * @param b Another code point. + * @return The non-negative composite code point if there is one; otherwise a negative value. + * @stable ICU 49 + */ +U_STABLE UChar32 U_EXPORT2 +unorm2_composePair(const UNormalizer2 *norm2, UChar32 a, UChar32 b); + +/** + * Gets the combining class of c. + * The default implementation returns 0 + * but all standard implementations return the Unicode Canonical_Combining_Class value. + * @param norm2 UNormalizer2 instance + * @param c code point + * @return c's combining class + * @stable ICU 49 + */ +U_STABLE uint8_t U_EXPORT2 +unorm2_getCombiningClass(const UNormalizer2 *norm2, UChar32 c); + +/** + * Tests if the string is normalized. + * Internally, in cases where the quickCheck() method would return "maybe" + * (which is only possible for the two COMPOSE modes) this method + * resolves to "yes" or "no" to provide a definitive result, + * at the cost of doing more work in those cases. + * @param norm2 UNormalizer2 instance + * @param s input string + * @param length length of the string, or -1 if NUL-terminated + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return TRUE if s is normalized + * @stable ICU 4.4 + */ +U_STABLE UBool U_EXPORT2 +unorm2_isNormalized(const UNormalizer2 *norm2, + const UChar *s, int32_t length, + UErrorCode *pErrorCode); + +/** + * Tests if the string is normalized. + * For the two COMPOSE modes, the result could be "maybe" in cases that + * would take a little more work to resolve definitively. + * Use spanQuickCheckYes() and normalizeSecondAndAppend() for a faster + * combination of quick check + normalization, to avoid + * re-checking the "yes" prefix. + * @param norm2 UNormalizer2 instance + * @param s input string + * @param length length of the string, or -1 if NUL-terminated + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return UNormalizationCheckResult + * @stable ICU 4.4 + */ +U_STABLE UNormalizationCheckResult U_EXPORT2 +unorm2_quickCheck(const UNormalizer2 *norm2, + const UChar *s, int32_t length, + UErrorCode *pErrorCode); + +/** + * Returns the end of the normalized substring of the input string. + * In other words, with <code>end=spanQuickCheckYes(s, ec);</code> + * the substring <code>UnicodeString(s, 0, end)</code> + * will pass the quick check with a "yes" result. + * + * The returned end index is usually one or more characters before the + * "no" or "maybe" character: The end index is at a normalization boundary. + * (See the class documentation for more about normalization boundaries.) + * + * When the goal is a normalized string and most input strings are expected + * to be normalized already, then call this method, + * and if it returns a prefix shorter than the input string, + * copy that prefix and use normalizeSecondAndAppend() for the remainder. + * @param norm2 UNormalizer2 instance + * @param s input string + * @param length length of the string, or -1 if NUL-terminated + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return "yes" span end index + * @stable ICU 4.4 + */ +U_STABLE int32_t U_EXPORT2 +unorm2_spanQuickCheckYes(const UNormalizer2 *norm2, + const UChar *s, int32_t length, + UErrorCode *pErrorCode); + +/** + * Tests if the character always has a normalization boundary before it, + * regardless of context. + * For details see the Normalizer2 base class documentation. + * @param norm2 UNormalizer2 instance + * @param c character to test + * @return TRUE if c has a normalization boundary before it + * @stable ICU 4.4 + */ +U_STABLE UBool U_EXPORT2 +unorm2_hasBoundaryBefore(const UNormalizer2 *norm2, UChar32 c); + +/** + * Tests if the character always has a normalization boundary after it, + * regardless of context. + * For details see the Normalizer2 base class documentation. + * @param norm2 UNormalizer2 instance + * @param c character to test + * @return TRUE if c has a normalization boundary after it + * @stable ICU 4.4 + */ +U_STABLE UBool U_EXPORT2 +unorm2_hasBoundaryAfter(const UNormalizer2 *norm2, UChar32 c); + +/** + * Tests if the character is normalization-inert. + * For details see the Normalizer2 base class documentation. + * @param norm2 UNormalizer2 instance + * @param c character to test + * @return TRUE if c is normalization-inert + * @stable ICU 4.4 + */ +U_STABLE UBool U_EXPORT2 +unorm2_isInert(const UNormalizer2 *norm2, UChar32 c); + +/** + * Compares two strings for canonical equivalence. + * Further options include case-insensitive comparison and + * code point order (as opposed to code unit order). + * + * Canonical equivalence between two strings is defined as their normalized + * forms (NFD or NFC) being identical. + * This function compares strings incrementally instead of normalizing + * (and optionally case-folding) both strings entirely, + * improving performance significantly. + * + * Bulk normalization is only necessary if the strings do not fulfill the FCD + * conditions. Only in this case, and only if the strings are relatively long, + * is memory allocated temporarily. + * For FCD strings and short non-FCD strings there is no memory allocation. + * + * Semantically, this is equivalent to + * strcmp[CodePointOrder](NFD(foldCase(NFD(s1))), NFD(foldCase(NFD(s2)))) + * where code point order and foldCase are all optional. + * + * UAX 21 2.5 Caseless Matching specifies that for a canonical caseless match + * the case folding must be performed first, then the normalization. + * + * @param s1 First source string. + * @param length1 Length of first source string, or -1 if NUL-terminated. + * + * @param s2 Second source string. + * @param length2 Length of second source string, or -1 if NUL-terminated. + * + * @param options A bit set of options: + * - U_FOLD_CASE_DEFAULT or 0 is used for default options: + * Case-sensitive comparison in code unit order, and the input strings + * are quick-checked for FCD. + * + * - UNORM_INPUT_IS_FCD + * Set if the caller knows that both s1 and s2 fulfill the FCD conditions. + * If not set, the function will quickCheck for FCD + * and normalize if necessary. + * + * - U_COMPARE_CODE_POINT_ORDER + * Set to choose code point order instead of code unit order + * (see u_strCompare for details). + * + * - U_COMPARE_IGNORE_CASE + * Set to compare strings case-insensitively using case folding, + * instead of case-sensitively. + * If set, then the following case folding options are used. + * + * - Options as used with case-insensitive comparisons, currently: + * + * - U_FOLD_CASE_EXCLUDE_SPECIAL_I + * (see u_strCaseCompare for details) + * + * - regular normalization options shifted left by UNORM_COMPARE_NORM_OPTIONS_SHIFT + * + * @param pErrorCode ICU error code in/out parameter. + * Must fulfill U_SUCCESS before the function call. + * @return <0 or 0 or >0 as usual for string comparisons + * + * @see unorm_normalize + * @see UNORM_FCD + * @see u_strCompare + * @see u_strCaseCompare + * + * @stable ICU 2.2 + */ +U_STABLE int32_t U_EXPORT2 +unorm_compare(const UChar *s1, int32_t length1, + const UChar *s2, int32_t length2, + uint32_t options, + UErrorCode *pErrorCode); + +#endif /* !UCONFIG_NO_NORMALIZATION */ +#endif /* __UNORM2_H__ */ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unum.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unum.h new file mode 100755 index 00000000..ff251ff2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unum.h @@ -0,0 +1,1440 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 1997-2015, International Business Machines Corporation and others. +* All Rights Reserved. +* Modification History: +* +* Date Name Description +* 06/24/99 helena Integrated Alan's NF enhancements and Java2 bug fixes +******************************************************************************* +*/ + +#ifndef _UNUM +#define _UNUM + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/localpointer.h" +#include "unicode/uloc.h" +#include "unicode/ucurr.h" +#include "unicode/umisc.h" +#include "unicode/parseerr.h" +#include "unicode/uformattable.h" +#include "unicode/udisplaycontext.h" +#include "unicode/ufieldpositer.h" + +/** + * \file + * \brief C API: NumberFormat + * + * <h2> Number Format C API </h2> + * + * <p><strong>IMPORTANT:</strong> New users with C++ capabilities are + * strongly encouraged to see if numberformatter.h fits their use case. + * + * Number Format C API Provides functions for + * formatting and parsing a number. Also provides methods for + * determining which locales have number formats, and what their names + * are. + * <P> + * UNumberFormat helps you to format and parse numbers for any locale. + * Your code can be completely independent of the locale conventions + * for decimal points, thousands-separators, or even the particular + * decimal digits used, or whether the number format is even decimal. + * There are different number format styles like decimal, currency, + * percent and spellout. + * <P> + * To format a number for the current Locale, use one of the static + * factory methods: + * <pre> + * \code + * UChar myString[20]; + * double myNumber = 7.0; + * UErrorCode status = U_ZERO_ERROR; + * UNumberFormat* nf = unum_open(UNUM_DEFAULT, NULL, -1, NULL, NULL, &status); + * unum_formatDouble(nf, myNumber, myString, 20, NULL, &status); + * printf(" Example 1: %s\n", austrdup(myString) ); //austrdup( a function used to convert UChar* to char*) + * \endcode + * </pre> + * If you are formatting multiple numbers, it is more efficient to get + * the format and use it multiple times so that the system doesn't + * have to fetch the information about the local language and country + * conventions multiple times. + * <pre> + * \code + * uint32_t i, resultlength, reslenneeded; + * UErrorCode status = U_ZERO_ERROR; + * UFieldPosition pos; + * uint32_t a[] = { 123, 3333, -1234567 }; + * const uint32_t a_len = sizeof(a) / sizeof(a[0]); + * UNumberFormat* nf; + * UChar* result = NULL; + * + * nf = unum_open(UNUM_DEFAULT, NULL, -1, NULL, NULL, &status); + * for (i = 0; i < a_len; i++) { + * resultlength=0; + * reslenneeded=unum_format(nf, a[i], NULL, resultlength, &pos, &status); + * result = NULL; + * if(status==U_BUFFER_OVERFLOW_ERROR){ + * status=U_ZERO_ERROR; + * resultlength=reslenneeded+1; + * result=(UChar*)malloc(sizeof(UChar) * resultlength); + * unum_format(nf, a[i], result, resultlength, &pos, &status); + * } + * printf( " Example 2: %s\n", austrdup(result)); + * free(result); + * } + * \endcode + * </pre> + * To format a number for a different Locale, specify it in the + * call to unum_open(). + * <pre> + * \code + * UNumberFormat* nf = unum_open(UNUM_DEFAULT, NULL, -1, "fr_FR", NULL, &success) + * \endcode + * </pre> + * You can use a NumberFormat API unum_parse() to parse. + * <pre> + * \code + * UErrorCode status = U_ZERO_ERROR; + * int32_t pos=0; + * int32_t num; + * num = unum_parse(nf, str, u_strlen(str), &pos, &status); + * \endcode + * </pre> + * Use UNUM_DECIMAL to get the normal number format for that country. + * There are other static options available. Use UNUM_CURRENCY + * to get the currency number format for that country. Use UNUM_PERCENT + * to get a format for displaying percentages. With this format, a + * fraction from 0.53 is displayed as 53%. + * <P> + * Use a pattern to create either a DecimalFormat or a RuleBasedNumberFormat + * formatter. The pattern must conform to the syntax defined for those + * formatters. + * <P> + * You can also control the display of numbers with such function as + * unum_getAttributes() and unum_setAttributes(), which let you set the + * minimum fraction digits, grouping, etc. + * @see UNumberFormatAttributes for more details + * <P> + * You can also use forms of the parse and format methods with + * ParsePosition and UFieldPosition to allow you to: + * <ul type=round> + * <li>(a) progressively parse through pieces of a string. + * <li>(b) align the decimal point and other areas. + * </ul> + * <p> + * It is also possible to change or set the symbols used for a particular + * locale like the currency symbol, the grouping separator , monetary separator + * etc by making use of functions unum_setSymbols() and unum_getSymbols(). + */ + +/** A number formatter. + * For usage in C programs. + * @stable ICU 2.0 + */ +typedef void* UNumberFormat; + +/** The possible number format styles. + * @stable ICU 2.0 + */ +typedef enum UNumberFormatStyle { + /** + * Decimal format defined by a pattern string. + * @stable ICU 3.0 + */ + UNUM_PATTERN_DECIMAL=0, + /** + * Decimal format ("normal" style). + * @stable ICU 2.0 + */ + UNUM_DECIMAL=1, + /** + * Currency format (generic). + * Defaults to UNUM_CURRENCY_STANDARD style + * (using currency symbol, e.g., "$1.00", with non-accounting + * style for negative values e.g. using minus sign). + * The specific style may be specified using the -cf- locale key. + * @stable ICU 2.0 + */ + UNUM_CURRENCY=2, + /** + * Percent format + * @stable ICU 2.0 + */ + UNUM_PERCENT=3, + /** + * Scientific format + * @stable ICU 2.1 + */ + UNUM_SCIENTIFIC=4, + /** + * Spellout rule-based format. The default ruleset can be specified/changed using + * unum_setTextAttribute with UNUM_DEFAULT_RULESET; the available public rulesets + * can be listed using unum_getTextAttribute with UNUM_PUBLIC_RULESETS. + * @stable ICU 2.0 + */ + UNUM_SPELLOUT=5, + /** + * Ordinal rule-based format . The default ruleset can be specified/changed using + * unum_setTextAttribute with UNUM_DEFAULT_RULESET; the available public rulesets + * can be listed using unum_getTextAttribute with UNUM_PUBLIC_RULESETS. + * @stable ICU 3.0 + */ + UNUM_ORDINAL=6, + /** + * Duration rule-based format + * @stable ICU 3.0 + */ + UNUM_DURATION=7, + /** + * Numbering system rule-based format + * @stable ICU 4.2 + */ + UNUM_NUMBERING_SYSTEM=8, + /** + * Rule-based format defined by a pattern string. + * @stable ICU 3.0 + */ + UNUM_PATTERN_RULEBASED=9, + /** + * Currency format with an ISO currency code, e.g., "USD1.00". + * @stable ICU 4.8 + */ + UNUM_CURRENCY_ISO=10, + /** + * Currency format with a pluralized currency name, + * e.g., "1.00 US dollar" and "3.00 US dollars". + * @stable ICU 4.8 + */ + UNUM_CURRENCY_PLURAL=11, + /** + * Currency format for accounting, e.g., "($3.00)" for + * negative currency amount instead of "-$3.00" ({@link #UNUM_CURRENCY}). + * Overrides any style specified using -cf- key in locale. + * @stable ICU 53 + */ + UNUM_CURRENCY_ACCOUNTING=12, + /** + * Currency format with a currency symbol given CASH usage, e.g., + * "NT$3" instead of "NT$3.23". + * @stable ICU 54 + */ + UNUM_CASH_CURRENCY=13, + /** + * Decimal format expressed using compact notation + * (short form, corresponds to UNumberCompactStyle=UNUM_SHORT) + * e.g. "23K", "45B" + * @stable ICU 56 + */ + UNUM_DECIMAL_COMPACT_SHORT=14, + /** + * Decimal format expressed using compact notation + * (long form, corresponds to UNumberCompactStyle=UNUM_LONG) + * e.g. "23 thousand", "45 billion" + * @stable ICU 56 + */ + UNUM_DECIMAL_COMPACT_LONG=15, + /** + * Currency format with a currency symbol, e.g., "$1.00", + * using non-accounting style for negative values (e.g. minus sign). + * Overrides any style specified using -cf- key in locale. + * @stable ICU 56 + */ + UNUM_CURRENCY_STANDARD=16, + +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UNumberFormatStyle value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UNUM_FORMAT_STYLE_COUNT=17, +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Default format + * @stable ICU 2.0 + */ + UNUM_DEFAULT = UNUM_DECIMAL, + /** + * Alias for UNUM_PATTERN_DECIMAL + * @stable ICU 3.0 + */ + UNUM_IGNORE = UNUM_PATTERN_DECIMAL +} UNumberFormatStyle; + +/** The possible number format rounding modes. + * + * <p> + * For more detail on rounding modes, see: + * http://userguide.icu-project.org/formatparse/numbers/rounding-modes + * + * @stable ICU 2.0 + */ +typedef enum UNumberFormatRoundingMode { + UNUM_ROUND_CEILING, + UNUM_ROUND_FLOOR, + UNUM_ROUND_DOWN, + UNUM_ROUND_UP, + /** + * Half-even rounding + * @stable, ICU 3.8 + */ + UNUM_ROUND_HALFEVEN, +#ifndef U_HIDE_DEPRECATED_API + /** + * Half-even rounding, misspelled name + * @deprecated, ICU 3.8 + */ + UNUM_FOUND_HALFEVEN = UNUM_ROUND_HALFEVEN, +#endif /* U_HIDE_DEPRECATED_API */ + UNUM_ROUND_HALFDOWN = UNUM_ROUND_HALFEVEN + 1, + UNUM_ROUND_HALFUP, + /** + * ROUND_UNNECESSARY reports an error if formatted result is not exact. + * @stable ICU 4.8 + */ + UNUM_ROUND_UNNECESSARY +} UNumberFormatRoundingMode; + +/** The possible number format pad positions. + * @stable ICU 2.0 + */ +typedef enum UNumberFormatPadPosition { + UNUM_PAD_BEFORE_PREFIX, + UNUM_PAD_AFTER_PREFIX, + UNUM_PAD_BEFORE_SUFFIX, + UNUM_PAD_AFTER_SUFFIX +} UNumberFormatPadPosition; + +/** + * Constants for specifying short or long format. + * @stable ICU 51 + */ +typedef enum UNumberCompactStyle { + /** @stable ICU 51 */ + UNUM_SHORT, + /** @stable ICU 51 */ + UNUM_LONG + /** @stable ICU 51 */ +} UNumberCompactStyle; + +/** + * Constants for specifying currency spacing + * @stable ICU 4.8 + */ +enum UCurrencySpacing { + /** @stable ICU 4.8 */ + UNUM_CURRENCY_MATCH, + /** @stable ICU 4.8 */ + UNUM_CURRENCY_SURROUNDING_MATCH, + /** @stable ICU 4.8 */ + UNUM_CURRENCY_INSERT, + + /* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API, + * it is needed for layout of DecimalFormatSymbols object. */ + /** + * One more than the highest normal UCurrencySpacing value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UNUM_CURRENCY_SPACING_COUNT +}; +typedef enum UCurrencySpacing UCurrencySpacing; /**< @stable ICU 4.8 */ + + +/** + * FieldPosition and UFieldPosition selectors for format fields + * defined by NumberFormat and UNumberFormat. + * @stable ICU 49 + */ +typedef enum UNumberFormatFields { + /** @stable ICU 49 */ + UNUM_INTEGER_FIELD, + /** @stable ICU 49 */ + UNUM_FRACTION_FIELD, + /** @stable ICU 49 */ + UNUM_DECIMAL_SEPARATOR_FIELD, + /** @stable ICU 49 */ + UNUM_EXPONENT_SYMBOL_FIELD, + /** @stable ICU 49 */ + UNUM_EXPONENT_SIGN_FIELD, + /** @stable ICU 49 */ + UNUM_EXPONENT_FIELD, + /** @stable ICU 49 */ + UNUM_GROUPING_SEPARATOR_FIELD, + /** @stable ICU 49 */ + UNUM_CURRENCY_FIELD, + /** @stable ICU 49 */ + UNUM_PERCENT_FIELD, + /** @stable ICU 49 */ + UNUM_PERMILL_FIELD, + /** @stable ICU 49 */ + UNUM_SIGN_FIELD, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UNumberFormatFields value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UNUM_FIELD_COUNT +#endif /* U_HIDE_DEPRECATED_API */ +} UNumberFormatFields; + + +/** + * Create and return a new UNumberFormat for formatting and parsing + * numbers. A UNumberFormat may be used to format numbers by calling + * {@link #unum_format }, and to parse numbers by calling {@link #unum_parse }. + * The caller must call {@link #unum_close } when done to release resources + * used by this object. + * @param style The type of number format to open: one of + * UNUM_DECIMAL, UNUM_CURRENCY, UNUM_PERCENT, UNUM_SCIENTIFIC, + * UNUM_CURRENCY_ISO, UNUM_CURRENCY_PLURAL, UNUM_SPELLOUT, + * UNUM_ORDINAL, UNUM_DURATION, UNUM_NUMBERING_SYSTEM, + * UNUM_PATTERN_DECIMAL, UNUM_PATTERN_RULEBASED, or UNUM_DEFAULT. + * If UNUM_PATTERN_DECIMAL or UNUM_PATTERN_RULEBASED is passed then the + * number format is opened using the given pattern, which must conform + * to the syntax described in DecimalFormat or RuleBasedNumberFormat, + * respectively. + * @param pattern A pattern specifying the format to use. + * This parameter is ignored unless the style is + * UNUM_PATTERN_DECIMAL or UNUM_PATTERN_RULEBASED. + * @param patternLength The number of characters in the pattern, or -1 + * if null-terminated. This parameter is ignored unless the style is + * UNUM_PATTERN. + * @param locale A locale identifier to use to determine formatting + * and parsing conventions, or NULL to use the default locale. + * @param parseErr A pointer to a UParseError struct to receive the + * details of any parsing errors, or NULL if no parsing error details + * are desired. + * @param status A pointer to an input-output UErrorCode. + * @return A pointer to a newly created UNumberFormat, or NULL if an + * error occurred. + * @see unum_close + * @see DecimalFormat + * @stable ICU 2.0 + */ +U_STABLE UNumberFormat* U_EXPORT2 +unum_open( UNumberFormatStyle style, + const UChar* pattern, + int32_t patternLength, + const char* locale, + UParseError* parseErr, + UErrorCode* status); + + +/** +* Close a UNumberFormat. +* Once closed, a UNumberFormat may no longer be used. +* @param fmt The formatter to close. +* @stable ICU 2.0 +*/ +U_STABLE void U_EXPORT2 +unum_close(UNumberFormat* fmt); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUNumberFormatPointer + * "Smart pointer" class, closes a UNumberFormat via unum_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUNumberFormatPointer, UNumberFormat, unum_close); + +U_NAMESPACE_END + +#endif + +/** + * Open a copy of a UNumberFormat. + * This function performs a deep copy. + * @param fmt The format to copy + * @param status A pointer to an UErrorCode to receive any errors. + * @return A pointer to a UNumberFormat identical to fmt. + * @stable ICU 2.0 + */ +U_STABLE UNumberFormat* U_EXPORT2 +unum_clone(const UNumberFormat *fmt, + UErrorCode *status); + +/** +* Format an integer using a UNumberFormat. +* The integer will be formatted according to the UNumberFormat's locale. +* @param fmt The formatter to use. +* @param number The number to format. +* @param result A pointer to a buffer to receive the NULL-terminated formatted number. If +* the formatted number fits into dest but cannot be NULL-terminated (length == resultLength) +* then the error code is set to U_STRING_NOT_TERMINATED_WARNING. If the formatted number +* doesn't fit into result then the error code is set to U_BUFFER_OVERFLOW_ERROR. +* @param resultLength The maximum size of result. +* @param pos A pointer to a UFieldPosition. On input, position->field +* is read. On output, position->beginIndex and position->endIndex indicate +* the beginning and ending indices of field number position->field, if such +* a field exists. This parameter may be NULL, in which case no field +* @param status A pointer to an UErrorCode to receive any errors +* @return The total buffer size needed; if greater than resultLength, the output was truncated. +* @see unum_formatInt64 +* @see unum_formatDouble +* @see unum_parse +* @see unum_parseInt64 +* @see unum_parseDouble +* @see UFieldPosition +* @stable ICU 2.0 +*/ +U_STABLE int32_t U_EXPORT2 +unum_format( const UNumberFormat* fmt, + int32_t number, + UChar* result, + int32_t resultLength, + UFieldPosition *pos, + UErrorCode* status); + +/** +* Format an int64 using a UNumberFormat. +* The int64 will be formatted according to the UNumberFormat's locale. +* @param fmt The formatter to use. +* @param number The number to format. +* @param result A pointer to a buffer to receive the NULL-terminated formatted number. If +* the formatted number fits into dest but cannot be NULL-terminated (length == resultLength) +* then the error code is set to U_STRING_NOT_TERMINATED_WARNING. If the formatted number +* doesn't fit into result then the error code is set to U_BUFFER_OVERFLOW_ERROR. +* @param resultLength The maximum size of result. +* @param pos A pointer to a UFieldPosition. On input, position->field +* is read. On output, position->beginIndex and position->endIndex indicate +* the beginning and ending indices of field number position->field, if such +* a field exists. This parameter may be NULL, in which case no field +* @param status A pointer to an UErrorCode to receive any errors +* @return The total buffer size needed; if greater than resultLength, the output was truncated. +* @see unum_format +* @see unum_formatDouble +* @see unum_parse +* @see unum_parseInt64 +* @see unum_parseDouble +* @see UFieldPosition +* @stable ICU 2.0 +*/ +U_STABLE int32_t U_EXPORT2 +unum_formatInt64(const UNumberFormat *fmt, + int64_t number, + UChar* result, + int32_t resultLength, + UFieldPosition *pos, + UErrorCode* status); + +/** +* Format a double using a UNumberFormat. +* The double will be formatted according to the UNumberFormat's locale. +* @param fmt The formatter to use. +* @param number The number to format. +* @param result A pointer to a buffer to receive the NULL-terminated formatted number. If +* the formatted number fits into dest but cannot be NULL-terminated (length == resultLength) +* then the error code is set to U_STRING_NOT_TERMINATED_WARNING. If the formatted number +* doesn't fit into result then the error code is set to U_BUFFER_OVERFLOW_ERROR. +* @param resultLength The maximum size of result. +* @param pos A pointer to a UFieldPosition. On input, position->field +* is read. On output, position->beginIndex and position->endIndex indicate +* the beginning and ending indices of field number position->field, if such +* a field exists. This parameter may be NULL, in which case no field +* @param status A pointer to an UErrorCode to receive any errors +* @return The total buffer size needed; if greater than resultLength, the output was truncated. +* @see unum_format +* @see unum_formatInt64 +* @see unum_parse +* @see unum_parseInt64 +* @see unum_parseDouble +* @see UFieldPosition +* @stable ICU 2.0 +*/ +U_STABLE int32_t U_EXPORT2 +unum_formatDouble( const UNumberFormat* fmt, + double number, + UChar* result, + int32_t resultLength, + UFieldPosition *pos, /* 0 if ignore */ + UErrorCode* status); + +/** +* Format a double using a UNumberFormat according to the UNumberFormat's locale, +* and initialize a UFieldPositionIterator that enumerates the subcomponents of +* the resulting string. +* +* @param format +* The formatter to use. +* @param number +* The number to format. +* @param result +* A pointer to a buffer to receive the NULL-terminated formatted +* number. If the formatted number fits into dest but cannot be +* NULL-terminated (length == resultLength) then the error code is set +* to U_STRING_NOT_TERMINATED_WARNING. If the formatted number doesn't +* fit into result then the error code is set to +* U_BUFFER_OVERFLOW_ERROR. +* @param resultLength +* The maximum size of result. +* @param fpositer +* A pointer to a UFieldPositionIterator created by {@link #ufieldpositer_open} +* (may be NULL if field position information is not needed, but in this +* case it's preferable to use {@link #unum_formatDouble}). Iteration +* information already present in the UFieldPositionIterator is deleted, +* and the iterator is reset to apply to the fields in the formatted +* string created by this function call. The field values and indexes +* returned by {@link #ufieldpositer_next} represent fields denoted by +* the UNumberFormatFields enum. Fields are not returned in a guaranteed +* order. Fields cannot overlap, but they may nest. For example, 1234 +* could format as "1,234" which might consist of a grouping separator +* field for ',' and an integer field encompassing the entire string. +* @param status +* A pointer to an UErrorCode to receive any errors +* @return +* The total buffer size needed; if greater than resultLength, the +* output was truncated. +* @see unum_formatDouble +* @see unum_parse +* @see unum_parseDouble +* @see UFieldPositionIterator +* @see UNumberFormatFields +* @stable ICU 59 +*/ +U_STABLE int32_t U_EXPORT2 +unum_formatDoubleForFields(const UNumberFormat* format, + double number, + UChar* result, + int32_t resultLength, + UFieldPositionIterator* fpositer, + UErrorCode* status); + + +/** +* Format a decimal number using a UNumberFormat. +* The number will be formatted according to the UNumberFormat's locale. +* The syntax of the input number is a "numeric string" +* as defined in the Decimal Arithmetic Specification, available at +* http://speleotrove.com/decimal +* @param fmt The formatter to use. +* @param number The number to format. +* @param length The length of the input number, or -1 if the input is nul-terminated. +* @param result A pointer to a buffer to receive the NULL-terminated formatted number. If +* the formatted number fits into dest but cannot be NULL-terminated (length == resultLength) +* then the error code is set to U_STRING_NOT_TERMINATED_WARNING. If the formatted number +* doesn't fit into result then the error code is set to U_BUFFER_OVERFLOW_ERROR. +* @param resultLength The maximum size of result. +* @param pos A pointer to a UFieldPosition. On input, position->field +* is read. On output, position->beginIndex and position->endIndex indicate +* the beginning and ending indices of field number position->field, if such +* a field exists. This parameter may be NULL, in which case it is ignored. +* @param status A pointer to an UErrorCode to receive any errors +* @return The total buffer size needed; if greater than resultLength, the output was truncated. +* @see unum_format +* @see unum_formatInt64 +* @see unum_parse +* @see unum_parseInt64 +* @see unum_parseDouble +* @see UFieldPosition +* @stable ICU 4.4 +*/ +U_STABLE int32_t U_EXPORT2 +unum_formatDecimal( const UNumberFormat* fmt, + const char * number, + int32_t length, + UChar* result, + int32_t resultLength, + UFieldPosition *pos, /* 0 if ignore */ + UErrorCode* status); + +/** + * Format a double currency amount using a UNumberFormat. + * The double will be formatted according to the UNumberFormat's locale. + * @param fmt the formatter to use + * @param number the number to format + * @param currency the 3-letter null-terminated ISO 4217 currency code + * @param result A pointer to a buffer to receive the NULL-terminated formatted number. If + * the formatted number fits into dest but cannot be NULL-terminated (length == resultLength) + * then the error code is set to U_STRING_NOT_TERMINATED_WARNING. If the formatted number + * doesn't fit into result then the error code is set to U_BUFFER_OVERFLOW_ERROR. + * @param resultLength the maximum number of UChars to write to result + * @param pos a pointer to a UFieldPosition. On input, + * position->field is read. On output, position->beginIndex and + * position->endIndex indicate the beginning and ending indices of + * field number position->field, if such a field exists. This + * parameter may be NULL, in which case it is ignored. + * @param status a pointer to an input-output UErrorCode + * @return the total buffer size needed; if greater than resultLength, + * the output was truncated. + * @see unum_formatDouble + * @see unum_parseDoubleCurrency + * @see UFieldPosition + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +unum_formatDoubleCurrency(const UNumberFormat* fmt, + double number, + UChar* currency, + UChar* result, + int32_t resultLength, + UFieldPosition* pos, + UErrorCode* status); + +/** + * Format a UFormattable into a string. + * @param fmt the formatter to use + * @param number the number to format, as a UFormattable + * @param result A pointer to a buffer to receive the NULL-terminated formatted number. If + * the formatted number fits into dest but cannot be NULL-terminated (length == resultLength) + * then the error code is set to U_STRING_NOT_TERMINATED_WARNING. If the formatted number + * doesn't fit into result then the error code is set to U_BUFFER_OVERFLOW_ERROR. + * @param resultLength the maximum number of UChars to write to result + * @param pos a pointer to a UFieldPosition. On input, + * position->field is read. On output, position->beginIndex and + * position->endIndex indicate the beginning and ending indices of + * field number position->field, if such a field exists. This + * parameter may be NULL, in which case it is ignored. + * @param status a pointer to an input-output UErrorCode + * @return the total buffer size needed; if greater than resultLength, + * the output was truncated. Will return 0 on error. + * @see unum_parseToUFormattable + * @stable ICU 52 + */ +U_STABLE int32_t U_EXPORT2 +unum_formatUFormattable(const UNumberFormat* fmt, + const UFormattable *number, + UChar *result, + int32_t resultLength, + UFieldPosition *pos, + UErrorCode *status); + +/** +* Parse a string into an integer using a UNumberFormat. +* The string will be parsed according to the UNumberFormat's locale. +* Note: parsing is not supported for styles UNUM_DECIMAL_COMPACT_SHORT +* and UNUM_DECIMAL_COMPACT_LONG. +* @param fmt The formatter to use. +* @param text The text to parse. +* @param textLength The length of text, or -1 if null-terminated. +* @param parsePos If not NULL, on input a pointer to an integer specifying the offset at which +* to begin parsing. If not NULL, on output the offset at which parsing ended. +* @param status A pointer to an UErrorCode to receive any errors +* @return The value of the parsed integer +* @see unum_parseInt64 +* @see unum_parseDouble +* @see unum_format +* @see unum_formatInt64 +* @see unum_formatDouble +* @stable ICU 2.0 +*/ +U_STABLE int32_t U_EXPORT2 +unum_parse( const UNumberFormat* fmt, + const UChar* text, + int32_t textLength, + int32_t *parsePos /* 0 = start */, + UErrorCode *status); + +/** +* Parse a string into an int64 using a UNumberFormat. +* The string will be parsed according to the UNumberFormat's locale. +* Note: parsing is not supported for styles UNUM_DECIMAL_COMPACT_SHORT +* and UNUM_DECIMAL_COMPACT_LONG. +* @param fmt The formatter to use. +* @param text The text to parse. +* @param textLength The length of text, or -1 if null-terminated. +* @param parsePos If not NULL, on input a pointer to an integer specifying the offset at which +* to begin parsing. If not NULL, on output the offset at which parsing ended. +* @param status A pointer to an UErrorCode to receive any errors +* @return The value of the parsed integer +* @see unum_parse +* @see unum_parseDouble +* @see unum_format +* @see unum_formatInt64 +* @see unum_formatDouble +* @stable ICU 2.8 +*/ +U_STABLE int64_t U_EXPORT2 +unum_parseInt64(const UNumberFormat* fmt, + const UChar* text, + int32_t textLength, + int32_t *parsePos /* 0 = start */, + UErrorCode *status); + +/** +* Parse a string into a double using a UNumberFormat. +* The string will be parsed according to the UNumberFormat's locale. +* Note: parsing is not supported for styles UNUM_DECIMAL_COMPACT_SHORT +* and UNUM_DECIMAL_COMPACT_LONG. +* @param fmt The formatter to use. +* @param text The text to parse. +* @param textLength The length of text, or -1 if null-terminated. +* @param parsePos If not NULL, on input a pointer to an integer specifying the offset at which +* to begin parsing. If not NULL, on output the offset at which parsing ended. +* @param status A pointer to an UErrorCode to receive any errors +* @return The value of the parsed double +* @see unum_parse +* @see unum_parseInt64 +* @see unum_format +* @see unum_formatInt64 +* @see unum_formatDouble +* @stable ICU 2.0 +*/ +U_STABLE double U_EXPORT2 +unum_parseDouble( const UNumberFormat* fmt, + const UChar* text, + int32_t textLength, + int32_t *parsePos /* 0 = start */, + UErrorCode *status); + + +/** +* Parse a number from a string into an unformatted numeric string using a UNumberFormat. +* The input string will be parsed according to the UNumberFormat's locale. +* The syntax of the output is a "numeric string" +* as defined in the Decimal Arithmetic Specification, available at +* http://speleotrove.com/decimal +* Note: parsing is not supported for styles UNUM_DECIMAL_COMPACT_SHORT +* and UNUM_DECIMAL_COMPACT_LONG. +* @param fmt The formatter to use. +* @param text The text to parse. +* @param textLength The length of text, or -1 if null-terminated. +* @param parsePos If not NULL, on input a pointer to an integer specifying the offset at which +* to begin parsing. If not NULL, on output the offset at which parsing ended. +* @param outBuf A (char *) buffer to receive the parsed number as a string. The output string +* will be nul-terminated if there is sufficient space. +* @param outBufLength The size of the output buffer. May be zero, in which case +* the outBuf pointer may be NULL, and the function will return the +* size of the output string. +* @param status A pointer to an UErrorCode to receive any errors +* @return the length of the output string, not including any terminating nul. +* @see unum_parse +* @see unum_parseInt64 +* @see unum_format +* @see unum_formatInt64 +* @see unum_formatDouble +* @stable ICU 4.4 +*/ +U_STABLE int32_t U_EXPORT2 +unum_parseDecimal(const UNumberFormat* fmt, + const UChar* text, + int32_t textLength, + int32_t *parsePos /* 0 = start */, + char *outBuf, + int32_t outBufLength, + UErrorCode *status); + +/** + * Parse a string into a double and a currency using a UNumberFormat. + * The string will be parsed according to the UNumberFormat's locale. + * @param fmt the formatter to use + * @param text the text to parse + * @param textLength the length of text, or -1 if null-terminated + * @param parsePos a pointer to an offset index into text at which to + * begin parsing. On output, *parsePos will point after the last + * parsed character. This parameter may be NULL, in which case parsing + * begins at offset 0. + * @param currency a pointer to the buffer to receive the parsed null- + * terminated currency. This buffer must have a capacity of at least + * 4 UChars. + * @param status a pointer to an input-output UErrorCode + * @return the parsed double + * @see unum_parseDouble + * @see unum_formatDoubleCurrency + * @stable ICU 3.0 + */ +U_STABLE double U_EXPORT2 +unum_parseDoubleCurrency(const UNumberFormat* fmt, + const UChar* text, + int32_t textLength, + int32_t* parsePos, /* 0 = start */ + UChar* currency, + UErrorCode* status); + +/** + * Parse a UChar string into a UFormattable. + * Example code: + * \snippet test/cintltst/cnumtst.c unum_parseToUFormattable + * Note: parsing is not supported for styles UNUM_DECIMAL_COMPACT_SHORT + * and UNUM_DECIMAL_COMPACT_LONG. + * @param fmt the formatter to use + * @param result the UFormattable to hold the result. If NULL, a new UFormattable will be allocated (which the caller must close with ufmt_close). + * @param text the text to parse + * @param textLength the length of text, or -1 if null-terminated + * @param parsePos a pointer to an offset index into text at which to + * begin parsing. On output, *parsePos will point after the last + * parsed character. This parameter may be NULL in which case parsing + * begins at offset 0. + * @param status a pointer to an input-output UErrorCode + * @return the UFormattable. Will be ==result unless NULL was passed in for result, in which case it will be the newly opened UFormattable. + * @see ufmt_getType + * @see ufmt_close + * @stable ICU 52 + */ +U_STABLE UFormattable* U_EXPORT2 +unum_parseToUFormattable(const UNumberFormat* fmt, + UFormattable *result, + const UChar* text, + int32_t textLength, + int32_t* parsePos, /* 0 = start */ + UErrorCode* status); + +/** + * Set the pattern used by a UNumberFormat. This can only be used + * on a DecimalFormat, other formats return U_UNSUPPORTED_ERROR + * in the status. + * @param format The formatter to set. + * @param localized TRUE if the pattern is localized, FALSE otherwise. + * @param pattern The new pattern + * @param patternLength The length of pattern, or -1 if null-terminated. + * @param parseError A pointer to UParseError to receive information + * about errors occurred during parsing, or NULL if no parse error + * information is desired. + * @param status A pointer to an input-output UErrorCode. + * @see unum_toPattern + * @see DecimalFormat + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +unum_applyPattern( UNumberFormat *format, + UBool localized, + const UChar *pattern, + int32_t patternLength, + UParseError *parseError, + UErrorCode *status + ); + +/** +* Get a locale for which decimal formatting patterns are available. +* A UNumberFormat in a locale returned by this function will perform the correct +* formatting and parsing for the locale. The results of this call are not +* valid for rule-based number formats. +* @param localeIndex The index of the desired locale. +* @return A locale for which number formatting patterns are available, or 0 if none. +* @see unum_countAvailable +* @stable ICU 2.0 +*/ +U_STABLE const char* U_EXPORT2 +unum_getAvailable(int32_t localeIndex); + +/** +* Determine how many locales have decimal formatting patterns available. The +* results of this call are not valid for rule-based number formats. +* This function is useful for determining the loop ending condition for +* calls to {@link #unum_getAvailable }. +* @return The number of locales for which decimal formatting patterns are available. +* @see unum_getAvailable +* @stable ICU 2.0 +*/ +U_STABLE int32_t U_EXPORT2 +unum_countAvailable(void); + +#if UCONFIG_HAVE_PARSEALLINPUT +/* The UNumberFormatAttributeValue type cannot be #ifndef U_HIDE_INTERNAL_API, needed for .h variable declaration */ +/** + * @internal + */ +typedef enum UNumberFormatAttributeValue { +#ifndef U_HIDE_INTERNAL_API + /** @internal */ + UNUM_NO = 0, + /** @internal */ + UNUM_YES = 1, + /** @internal */ + UNUM_MAYBE = 2 +#else + /** @internal */ + UNUM_FORMAT_ATTRIBUTE_VALUE_HIDDEN +#endif /* U_HIDE_INTERNAL_API */ +} UNumberFormatAttributeValue; +#endif + +/** The possible UNumberFormat numeric attributes @stable ICU 2.0 */ +typedef enum UNumberFormatAttribute { + /** Parse integers only */ + UNUM_PARSE_INT_ONLY, + /** Use grouping separator */ + UNUM_GROUPING_USED, + /** Always show decimal point */ + UNUM_DECIMAL_ALWAYS_SHOWN, + /** Maximum integer digits */ + UNUM_MAX_INTEGER_DIGITS, + /** Minimum integer digits */ + UNUM_MIN_INTEGER_DIGITS, + /** Integer digits */ + UNUM_INTEGER_DIGITS, + /** Maximum fraction digits */ + UNUM_MAX_FRACTION_DIGITS, + /** Minimum fraction digits */ + UNUM_MIN_FRACTION_DIGITS, + /** Fraction digits */ + UNUM_FRACTION_DIGITS, + /** Multiplier */ + UNUM_MULTIPLIER, + /** Grouping size */ + UNUM_GROUPING_SIZE, + /** Rounding Mode */ + UNUM_ROUNDING_MODE, + /** Rounding increment */ + UNUM_ROUNDING_INCREMENT, + /** The width to which the output of <code>format()</code> is padded. */ + UNUM_FORMAT_WIDTH, + /** The position at which padding will take place. */ + UNUM_PADDING_POSITION, + /** Secondary grouping size */ + UNUM_SECONDARY_GROUPING_SIZE, + /** Use significant digits + * @stable ICU 3.0 */ + UNUM_SIGNIFICANT_DIGITS_USED, + /** Minimum significant digits + * @stable ICU 3.0 */ + UNUM_MIN_SIGNIFICANT_DIGITS, + /** Maximum significant digits + * @stable ICU 3.0 */ + UNUM_MAX_SIGNIFICANT_DIGITS, + /** Lenient parse mode used by rule-based formats. + * @stable ICU 3.0 + */ + UNUM_LENIENT_PARSE, +#if UCONFIG_HAVE_PARSEALLINPUT + /** Consume all input. (may use fastpath). Set to UNUM_YES (require fastpath), UNUM_NO (skip fastpath), or UNUM_MAYBE (heuristic). + * This is an internal ICU API. Do not use. + * @internal + */ + UNUM_PARSE_ALL_INPUT = 20, +#endif + /** + * Scale, which adjusts the position of the + * decimal point when formatting. Amounts will be multiplied by 10 ^ (scale) + * before they are formatted. The default value for the scale is 0 ( no adjustment ). + * + * <p>Example: setting the scale to 3, 123 formats as "123,000" + * <p>Example: setting the scale to -4, 123 formats as "0.0123" + * + * @stable ICU 51 */ + UNUM_SCALE = 21, +#ifndef U_HIDE_INTERNAL_API + /** + * Minimum grouping digits, technology preview. + * See DecimalFormat::getMinimumGroupingDigits(). + * + * @internal technology preview + */ + UNUM_MINIMUM_GROUPING_DIGITS = 22, + /* TODO: test C API when it becomes @draft */ +#endif /* U_HIDE_INTERNAL_API */ + + /** + * if this attribute is set to 0, it is set to UNUM_CURRENCY_STANDARD purpose, + * otherwise it is UNUM_CURRENCY_CASH purpose + * Default: 0 (UNUM_CURRENCY_STANDARD purpose) + * @stable ICU 54 + */ + UNUM_CURRENCY_USAGE = 23, + + /* The following cannot be #ifndef U_HIDE_INTERNAL_API, needed in .h file variable declararions */ + /** One below the first bitfield-boolean item. + * All items after this one are stored in boolean form. + * @internal */ + UNUM_MAX_NONBOOLEAN_ATTRIBUTE = 0x0FFF, + + /** If 1, specifies that if setting the "max integer digits" attribute would truncate a value, set an error status rather than silently truncating. + * For example, formatting the value 1234 with 4 max int digits would succeed, but formatting 12345 would fail. There is no effect on parsing. + * Default: 0 (not set) + * @stable ICU 50 + */ + UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS = 0x1000, + /** + * if this attribute is set to 1, specifies that, if the pattern doesn't contain an exponent, the exponent will not be parsed. If the pattern does contain an exponent, this attribute has no effect. + * Has no effect on formatting. + * Default: 0 (unset) + * @stable ICU 50 + */ + UNUM_PARSE_NO_EXPONENT, + + /** + * if this attribute is set to 1, specifies that, if the pattern contains a + * decimal mark the input is required to have one. If this attribute is set to 0, + * specifies that input does not have to contain a decimal mark. + * Has no effect on formatting. + * Default: 0 (unset) + * @stable ICU 54 + */ + UNUM_PARSE_DECIMAL_MARK_REQUIRED = 0x1002, + + /* The following cannot be #ifndef U_HIDE_INTERNAL_API, needed in .h file variable declararions */ + /** Limit of boolean attributes. + * @internal */ + UNUM_LIMIT_BOOLEAN_ATTRIBUTE = 0x1003 +} UNumberFormatAttribute; + +/** +* Get a numeric attribute associated with a UNumberFormat. +* An example of a numeric attribute is the number of integer digits a formatter will produce. +* @param fmt The formatter to query. +* @param attr The attribute to query; one of UNUM_PARSE_INT_ONLY, UNUM_GROUPING_USED, +* UNUM_DECIMAL_ALWAYS_SHOWN, UNUM_MAX_INTEGER_DIGITS, UNUM_MIN_INTEGER_DIGITS, UNUM_INTEGER_DIGITS, +* UNUM_MAX_FRACTION_DIGITS, UNUM_MIN_FRACTION_DIGITS, UNUM_FRACTION_DIGITS, UNUM_MULTIPLIER, +* UNUM_GROUPING_SIZE, UNUM_ROUNDING_MODE, UNUM_FORMAT_WIDTH, UNUM_PADDING_POSITION, UNUM_SECONDARY_GROUPING_SIZE, +* UNUM_SCALE, UNUM_MINIMUM_GROUPING_DIGITS. +* @return The value of attr. +* @see unum_setAttribute +* @see unum_getDoubleAttribute +* @see unum_setDoubleAttribute +* @see unum_getTextAttribute +* @see unum_setTextAttribute +* @stable ICU 2.0 +*/ +U_STABLE int32_t U_EXPORT2 +unum_getAttribute(const UNumberFormat* fmt, + UNumberFormatAttribute attr); + +/** +* Set a numeric attribute associated with a UNumberFormat. +* An example of a numeric attribute is the number of integer digits a formatter will produce. If the +* formatter does not understand the attribute, the call is ignored. Rule-based formatters only understand +* the lenient-parse attribute. +* @param fmt The formatter to set. +* @param attr The attribute to set; one of UNUM_PARSE_INT_ONLY, UNUM_GROUPING_USED, +* UNUM_DECIMAL_ALWAYS_SHOWN, UNUM_MAX_INTEGER_DIGITS, UNUM_MIN_INTEGER_DIGITS, UNUM_INTEGER_DIGITS, +* UNUM_MAX_FRACTION_DIGITS, UNUM_MIN_FRACTION_DIGITS, UNUM_FRACTION_DIGITS, UNUM_MULTIPLIER, +* UNUM_GROUPING_SIZE, UNUM_ROUNDING_MODE, UNUM_FORMAT_WIDTH, UNUM_PADDING_POSITION, UNUM_SECONDARY_GROUPING_SIZE, +* UNUM_LENIENT_PARSE, UNUM_SCALE, UNUM_MINIMUM_GROUPING_DIGITS. +* @param newValue The new value of attr. +* @see unum_getAttribute +* @see unum_getDoubleAttribute +* @see unum_setDoubleAttribute +* @see unum_getTextAttribute +* @see unum_setTextAttribute +* @stable ICU 2.0 +*/ +U_STABLE void U_EXPORT2 +unum_setAttribute( UNumberFormat* fmt, + UNumberFormatAttribute attr, + int32_t newValue); + + +/** +* Get a numeric attribute associated with a UNumberFormat. +* An example of a numeric attribute is the number of integer digits a formatter will produce. +* If the formatter does not understand the attribute, -1 is returned. +* @param fmt The formatter to query. +* @param attr The attribute to query; e.g. UNUM_ROUNDING_INCREMENT. +* @return The value of attr. +* @see unum_getAttribute +* @see unum_setAttribute +* @see unum_setDoubleAttribute +* @see unum_getTextAttribute +* @see unum_setTextAttribute +* @stable ICU 2.0 +*/ +U_STABLE double U_EXPORT2 +unum_getDoubleAttribute(const UNumberFormat* fmt, + UNumberFormatAttribute attr); + +/** +* Set a numeric attribute associated with a UNumberFormat. +* An example of a numeric attribute is the number of integer digits a formatter will produce. +* If the formatter does not understand the attribute, this call is ignored. +* @param fmt The formatter to set. +* @param attr The attribute to set; e.g. UNUM_ROUNDING_INCREMENT. +* @param newValue The new value of attr. +* @see unum_getAttribute +* @see unum_setAttribute +* @see unum_getDoubleAttribute +* @see unum_getTextAttribute +* @see unum_setTextAttribute +* @stable ICU 2.0 +*/ +U_STABLE void U_EXPORT2 +unum_setDoubleAttribute( UNumberFormat* fmt, + UNumberFormatAttribute attr, + double newValue); + +/** The possible UNumberFormat text attributes @stable ICU 2.0*/ +typedef enum UNumberFormatTextAttribute { + /** Positive prefix */ + UNUM_POSITIVE_PREFIX, + /** Positive suffix */ + UNUM_POSITIVE_SUFFIX, + /** Negative prefix */ + UNUM_NEGATIVE_PREFIX, + /** Negative suffix */ + UNUM_NEGATIVE_SUFFIX, + /** The character used to pad to the format width. */ + UNUM_PADDING_CHARACTER, + /** The ISO currency code */ + UNUM_CURRENCY_CODE, + /** + * The default rule set, such as "%spellout-numbering-year:", "%spellout-cardinal:", + * "%spellout-ordinal-masculine-plural:", "%spellout-ordinal-feminine:", or + * "%spellout-ordinal-neuter:". The available public rulesets can be listed using + * unum_getTextAttribute with UNUM_PUBLIC_RULESETS. This is only available with + * rule-based formatters. + * @stable ICU 3.0 + */ + UNUM_DEFAULT_RULESET, + /** + * The public rule sets. This is only available with rule-based formatters. + * This is a read-only attribute. The public rulesets are returned as a + * single string, with each ruleset name delimited by ';' (semicolon). See the + * CLDR LDML spec for more information about RBNF rulesets: + * http://www.unicode.org/reports/tr35/tr35-numbers.html#Rule-Based_Number_Formatting + * @stable ICU 3.0 + */ + UNUM_PUBLIC_RULESETS +} UNumberFormatTextAttribute; + +/** +* Get a text attribute associated with a UNumberFormat. +* An example of a text attribute is the suffix for positive numbers. If the formatter +* does not understand the attribute, U_UNSUPPORTED_ERROR is returned as the status. +* Rule-based formatters only understand UNUM_DEFAULT_RULESET and UNUM_PUBLIC_RULESETS. +* @param fmt The formatter to query. +* @param tag The attribute to query; one of UNUM_POSITIVE_PREFIX, UNUM_POSITIVE_SUFFIX, +* UNUM_NEGATIVE_PREFIX, UNUM_NEGATIVE_SUFFIX, UNUM_PADDING_CHARACTER, UNUM_CURRENCY_CODE, +* UNUM_DEFAULT_RULESET, or UNUM_PUBLIC_RULESETS. +* @param result A pointer to a buffer to receive the attribute. +* @param resultLength The maximum size of result. +* @param status A pointer to an UErrorCode to receive any errors +* @return The total buffer size needed; if greater than resultLength, the output was truncated. +* @see unum_setTextAttribute +* @see unum_getAttribute +* @see unum_setAttribute +* @stable ICU 2.0 +*/ +U_STABLE int32_t U_EXPORT2 +unum_getTextAttribute( const UNumberFormat* fmt, + UNumberFormatTextAttribute tag, + UChar* result, + int32_t resultLength, + UErrorCode* status); + +/** +* Set a text attribute associated with a UNumberFormat. +* An example of a text attribute is the suffix for positive numbers. Rule-based formatters +* only understand UNUM_DEFAULT_RULESET. +* @param fmt The formatter to set. +* @param tag The attribute to set; one of UNUM_POSITIVE_PREFIX, UNUM_POSITIVE_SUFFIX, +* UNUM_NEGATIVE_PREFIX, UNUM_NEGATIVE_SUFFIX, UNUM_PADDING_CHARACTER, UNUM_CURRENCY_CODE, +* or UNUM_DEFAULT_RULESET. +* @param newValue The new value of attr. +* @param newValueLength The length of newValue, or -1 if null-terminated. +* @param status A pointer to an UErrorCode to receive any errors +* @see unum_getTextAttribute +* @see unum_getAttribute +* @see unum_setAttribute +* @stable ICU 2.0 +*/ +U_STABLE void U_EXPORT2 +unum_setTextAttribute( UNumberFormat* fmt, + UNumberFormatTextAttribute tag, + const UChar* newValue, + int32_t newValueLength, + UErrorCode *status); + +/** + * Extract the pattern from a UNumberFormat. The pattern will follow + * the DecimalFormat pattern syntax. + * @param fmt The formatter to query. + * @param isPatternLocalized TRUE if the pattern should be localized, + * FALSE otherwise. This is ignored if the formatter is a rule-based + * formatter. + * @param result A pointer to a buffer to receive the pattern. + * @param resultLength The maximum size of result. + * @param status A pointer to an input-output UErrorCode. + * @return The total buffer size needed; if greater than resultLength, + * the output was truncated. + * @see unum_applyPattern + * @see DecimalFormat + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +unum_toPattern( const UNumberFormat* fmt, + UBool isPatternLocalized, + UChar* result, + int32_t resultLength, + UErrorCode* status); + + +/** + * Constants for specifying a number format symbol. + * @stable ICU 2.0 + */ +typedef enum UNumberFormatSymbol { + /** The decimal separator */ + UNUM_DECIMAL_SEPARATOR_SYMBOL = 0, + /** The grouping separator */ + UNUM_GROUPING_SEPARATOR_SYMBOL = 1, + /** The pattern separator */ + UNUM_PATTERN_SEPARATOR_SYMBOL = 2, + /** The percent sign */ + UNUM_PERCENT_SYMBOL = 3, + /** Zero*/ + UNUM_ZERO_DIGIT_SYMBOL = 4, + /** Character representing a digit in the pattern */ + UNUM_DIGIT_SYMBOL = 5, + /** The minus sign */ + UNUM_MINUS_SIGN_SYMBOL = 6, + /** The plus sign */ + UNUM_PLUS_SIGN_SYMBOL = 7, + /** The currency symbol */ + UNUM_CURRENCY_SYMBOL = 8, + /** The international currency symbol */ + UNUM_INTL_CURRENCY_SYMBOL = 9, + /** The monetary separator */ + UNUM_MONETARY_SEPARATOR_SYMBOL = 10, + /** The exponential symbol */ + UNUM_EXPONENTIAL_SYMBOL = 11, + /** Per mill symbol */ + UNUM_PERMILL_SYMBOL = 12, + /** Escape padding character */ + UNUM_PAD_ESCAPE_SYMBOL = 13, + /** Infinity symbol */ + UNUM_INFINITY_SYMBOL = 14, + /** Nan symbol */ + UNUM_NAN_SYMBOL = 15, + /** Significant digit symbol + * @stable ICU 3.0 */ + UNUM_SIGNIFICANT_DIGIT_SYMBOL = 16, + /** The monetary grouping separator + * @stable ICU 3.6 + */ + UNUM_MONETARY_GROUPING_SEPARATOR_SYMBOL = 17, + /** One + * @stable ICU 4.6 + */ + UNUM_ONE_DIGIT_SYMBOL = 18, + /** Two + * @stable ICU 4.6 + */ + UNUM_TWO_DIGIT_SYMBOL = 19, + /** Three + * @stable ICU 4.6 + */ + UNUM_THREE_DIGIT_SYMBOL = 20, + /** Four + * @stable ICU 4.6 + */ + UNUM_FOUR_DIGIT_SYMBOL = 21, + /** Five + * @stable ICU 4.6 + */ + UNUM_FIVE_DIGIT_SYMBOL = 22, + /** Six + * @stable ICU 4.6 + */ + UNUM_SIX_DIGIT_SYMBOL = 23, + /** Seven + * @stable ICU 4.6 + */ + UNUM_SEVEN_DIGIT_SYMBOL = 24, + /** Eight + * @stable ICU 4.6 + */ + UNUM_EIGHT_DIGIT_SYMBOL = 25, + /** Nine + * @stable ICU 4.6 + */ + UNUM_NINE_DIGIT_SYMBOL = 26, + + /** Multiplication sign + * @stable ICU 54 + */ + UNUM_EXPONENT_MULTIPLICATION_SYMBOL = 27, + +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UNumberFormatSymbol value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UNUM_FORMAT_SYMBOL_COUNT = 28 +#endif /* U_HIDE_DEPRECATED_API */ +} UNumberFormatSymbol; + +/** +* Get a symbol associated with a UNumberFormat. +* A UNumberFormat uses symbols to represent the special locale-dependent +* characters in a number, for example the percent sign. This API is not +* supported for rule-based formatters. +* @param fmt The formatter to query. +* @param symbol The UNumberFormatSymbol constant for the symbol to get +* @param buffer The string buffer that will receive the symbol string; +* if it is NULL, then only the length of the symbol is returned +* @param size The size of the string buffer +* @param status A pointer to an UErrorCode to receive any errors +* @return The length of the symbol; the buffer is not modified if +* <code>length>=size</code> +* @see unum_setSymbol +* @stable ICU 2.0 +*/ +U_STABLE int32_t U_EXPORT2 +unum_getSymbol(const UNumberFormat *fmt, + UNumberFormatSymbol symbol, + UChar *buffer, + int32_t size, + UErrorCode *status); + +/** +* Set a symbol associated with a UNumberFormat. +* A UNumberFormat uses symbols to represent the special locale-dependent +* characters in a number, for example the percent sign. This API is not +* supported for rule-based formatters. +* @param fmt The formatter to set. +* @param symbol The UNumberFormatSymbol constant for the symbol to set +* @param value The string to set the symbol to +* @param length The length of the string, or -1 for a zero-terminated string +* @param status A pointer to an UErrorCode to receive any errors. +* @see unum_getSymbol +* @stable ICU 2.0 +*/ +U_STABLE void U_EXPORT2 +unum_setSymbol(UNumberFormat *fmt, + UNumberFormatSymbol symbol, + const UChar *value, + int32_t length, + UErrorCode *status); + + +/** + * Get the locale for this number format object. + * You can choose between valid and actual locale. + * @param fmt The formatter to get the locale from + * @param type type of the locale we're looking for (valid or actual) + * @param status error code for the operation + * @return the locale name + * @stable ICU 2.8 + */ +U_STABLE const char* U_EXPORT2 +unum_getLocaleByType(const UNumberFormat *fmt, + ULocDataLocaleType type, + UErrorCode* status); + +/** + * Set a particular UDisplayContext value in the formatter, such as + * UDISPCTX_CAPITALIZATION_FOR_STANDALONE. + * @param fmt The formatter for which to set a UDisplayContext value. + * @param value The UDisplayContext value to set. + * @param status A pointer to an UErrorCode to receive any errors + * @stable ICU 53 + */ +U_STABLE void U_EXPORT2 +unum_setContext(UNumberFormat* fmt, UDisplayContext value, UErrorCode* status); + +/** + * Get the formatter's UDisplayContext value for the specified UDisplayContextType, + * such as UDISPCTX_TYPE_CAPITALIZATION. + * @param fmt The formatter to query. + * @param type The UDisplayContextType whose value to return + * @param status A pointer to an UErrorCode to receive any errors + * @return The UDisplayContextValue for the specified type. + * @stable ICU 53 + */ +U_STABLE UDisplayContext U_EXPORT2 +unum_getContext(const UNumberFormat *fmt, UDisplayContextType type, UErrorCode* status); + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unumsys.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unumsys.h new file mode 100755 index 00000000..795ec602 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/unumsys.h @@ -0,0 +1,172 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +***************************************************************************************** +* Copyright (C) 2013-2014, International Business Machines +* Corporation and others. All Rights Reserved. +***************************************************************************************** +*/ + +#ifndef UNUMSYS_H +#define UNUMSYS_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/uenum.h" +#include "unicode/localpointer.h" + +/** + * \file + * \brief C API: UNumberingSystem, information about numbering systems + * + * Defines numbering systems. A numbering system describes the scheme by which + * numbers are to be presented to the end user. In its simplest form, a numbering + * system describes the set of digit characters that are to be used to display + * numbers, such as Western digits, Thai digits, Arabic-Indic digits, etc., in a + * positional numbering system with a specified radix (typically 10). + * More complicated numbering systems are algorithmic in nature, and require use + * of an RBNF formatter (rule based number formatter), in order to calculate + * the characters to be displayed for a given number. Examples of algorithmic + * numbering systems include Roman numerals, Chinese numerals, and Hebrew numerals. + * Formatting rules for many commonly used numbering systems are included in + * the ICU package, based on the numbering system rules defined in CLDR. + * Alternate numbering systems can be specified to a locale by using the + * numbers locale keyword. + */ + +/** + * Opaque UNumberingSystem object for use in C programs. + * @stable ICU 52 + */ +struct UNumberingSystem; +typedef struct UNumberingSystem UNumberingSystem; /**< C typedef for struct UNumberingSystem. @stable ICU 52 */ + +/** + * Opens a UNumberingSystem object using the default numbering system for the specified + * locale. + * @param locale The locale for which the default numbering system should be opened. + * @param status A pointer to a UErrorCode to receive any errors. For example, this + * may be U_UNSUPPORTED_ERROR for a locale such as "en@numbers=xyz" that + * specifies a numbering system unknown to ICU. + * @return A UNumberingSystem for the specified locale, or NULL if an error + * occurred. + * @stable ICU 52 + */ +U_STABLE UNumberingSystem * U_EXPORT2 +unumsys_open(const char *locale, UErrorCode *status); + +/** + * Opens a UNumberingSystem object using the name of one of the predefined numbering + * systems specified by CLDR and known to ICU, such as "latn", "arabext", or "hanidec"; + * the full list is returned by unumsys_openAvailableNames. Note that some of the names + * listed at http://unicode.org/repos/cldr/tags/latest/common/bcp47/number.xml - e.g. + * default, native, traditional, finance - do not identify specific numbering systems, + * but rather key values that may only be used as part of a locale, which in turn + * defines how they are mapped to a specific numbering system such as "latn" or "hant". + * + * @param name The name of the numbering system for which a UNumberingSystem object + * should be opened. + * @param status A pointer to a UErrorCode to receive any errors. For example, this + * may be U_UNSUPPORTED_ERROR for a numbering system such as "xyz" that + * is unknown to ICU. + * @return A UNumberingSystem for the specified name, or NULL if an error + * occurred. + * @stable ICU 52 + */ +U_STABLE UNumberingSystem * U_EXPORT2 +unumsys_openByName(const char *name, UErrorCode *status); + +/** + * Close a UNumberingSystem object. Once closed it may no longer be used. + * @param unumsys The UNumberingSystem object to close. + * @stable ICU 52 + */ +U_STABLE void U_EXPORT2 +unumsys_close(UNumberingSystem *unumsys); + +#if U_SHOW_CPLUSPLUS_API +U_NAMESPACE_BEGIN + +/** + * \class LocalUNumberingSystemPointer + * "Smart pointer" class, closes a UNumberingSystem via unumsys_close(). + * For most methods see the LocalPointerBase base class. + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 52 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUNumberingSystemPointer, UNumberingSystem, unumsys_close); + +U_NAMESPACE_END +#endif + +/** + * Returns an enumeration over the names of all of the predefined numbering systems known + * to ICU. + * @param status A pointer to a UErrorCode to receive any errors. + * @return A pointer to a UEnumeration that must be closed with uenum_close(), + * or NULL if an error occurred. + * @stable ICU 52 + */ +U_STABLE UEnumeration * U_EXPORT2 +unumsys_openAvailableNames(UErrorCode *status); + +/** + * Returns the name of the specified UNumberingSystem object (if it is one of the + * predefined names known to ICU). + * @param unumsys The UNumberingSystem whose name is desired. + * @return A pointer to the name of the specified UNumberingSystem object, or + * NULL if the name is not one of the ICU predefined names. The pointer + * is only valid for the lifetime of the UNumberingSystem object. + * @stable ICU 52 + */ +U_STABLE const char * U_EXPORT2 +unumsys_getName(const UNumberingSystem *unumsys); + +/** + * Returns whether the given UNumberingSystem object is for an algorithmic (not purely + * positional) system. + * @param unumsys The UNumberingSystem whose algorithmic status is desired. + * @return TRUE if the specified UNumberingSystem object is for an algorithmic + * system. + * @stable ICU 52 + */ +U_STABLE UBool U_EXPORT2 +unumsys_isAlgorithmic(const UNumberingSystem *unumsys); + +/** + * Returns the radix of the specified UNumberingSystem object. Simple positional + * numbering systems typically have radix 10, but might have a radix of e.g. 16 for + * hexadecimal. The radix is less well-defined for non-positional algorithmic systems. + * @param unumsys The UNumberingSystem whose radix is desired. + * @return The radix of the specified UNumberingSystem object. + * @stable ICU 52 + */ +U_STABLE int32_t U_EXPORT2 +unumsys_getRadix(const UNumberingSystem *unumsys); + +/** + * Get the description string of the specified UNumberingSystem object. For simple + * positional systems this is the ordered string of digits (with length matching + * the radix), e.g. "\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D" + * for "hanidec"; it would be "0123456789ABCDEF" for hexadecimal. For + * algorithmic systems this is the name of the RBNF ruleset used for formatting, + * e.g. "zh/SpelloutRules/%spellout-cardinal" for "hans" or "%greek-upper" for + * "grek". + * @param unumsys The UNumberingSystem whose description string is desired. + * @param result A pointer to a buffer to receive the description string. + * @param resultLength The maximum size of result. + * @param status A pointer to a UErrorCode to receive any errors. + * @return The total buffer size needed; if greater than resultLength, the + * output was truncated. + * @stable ICU 52 + */ +U_STABLE int32_t U_EXPORT2 +unumsys_getDescription(const UNumberingSystem *unumsys, UChar *result, + int32_t resultLength, UErrorCode *status); + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uobject.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uobject.h new file mode 100755 index 00000000..9782f272 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uobject.h @@ -0,0 +1,322 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* +* Copyright (C) 2002-2012, International Business Machines +* Corporation and others. All Rights Reserved. +* +****************************************************************************** +* file name: uobject.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2002jun26 +* created by: Markus W. Scherer +*/ + +#ifndef __UOBJECT_H__ +#define __UOBJECT_H__ + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: Common ICU base class UObject. + */ + +/** + * @{ + * \def U_NO_THROW + * Define this to define the throw() specification so + * certain functions do not throw any exceptions + * + * UMemory operator new methods should have the throw() specification + * appended to them, so that the compiler adds the additional NULL check + * before calling constructors. Without, if <code>operator new</code> returns NULL the + * constructor is still called, and if the constructor references member + * data, (which it typically does), the result is a segmentation violation. + * + * @stable ICU 4.2 + */ +#ifndef U_NO_THROW +#define U_NO_THROW throw() +#endif + +/** @} */ + +/*===========================================================================*/ +/* UClassID-based RTTI */ +/*===========================================================================*/ + +/** + * UClassID is used to identify classes without using the compiler's RTTI. + * This was used before C++ compilers consistently supported RTTI. + * ICU 4.6 requires compiler RTTI to be turned on. + * + * Each class hierarchy which needs + * to implement polymorphic clone() or operator==() defines two methods, + * described in detail below. UClassID values can be compared using + * operator==(). Nothing else should be done with them. + * + * \par + * In class hierarchies that implement "poor man's RTTI", + * each concrete subclass implements getDynamicClassID() in the same way: + * + * \code + * class Derived { + * public: + * virtual UClassID getDynamicClassID() const + * { return Derived::getStaticClassID(); } + * } + * \endcode + * + * Each concrete class implements getStaticClassID() as well, which allows + * clients to test for a specific type. + * + * \code + * class Derived { + * public: + * static UClassID U_EXPORT2 getStaticClassID(); + * private: + * static char fgClassID; + * } + * + * // In Derived.cpp: + * UClassID Derived::getStaticClassID() + * { return (UClassID)&Derived::fgClassID; } + * char Derived::fgClassID = 0; // Value is irrelevant + * \endcode + * @stable ICU 2.0 + */ +typedef void* UClassID; + +U_NAMESPACE_BEGIN + +/** + * UMemory is the common ICU base class. + * All other ICU C++ classes are derived from UMemory (starting with ICU 2.4). + * + * This is primarily to make it possible and simple to override the + * C++ memory management by adding new/delete operators to this base class. + * + * To override ALL ICU memory management, including that from plain C code, + * replace the allocation functions declared in cmemory.h + * + * UMemory does not contain any virtual functions. + * Common "boilerplate" functions are defined in UObject. + * + * @stable ICU 2.4 + */ +class U_COMMON_API UMemory { +public: + +/* test versions for debugging shaper heap memory problems */ +#ifdef SHAPER_MEMORY_DEBUG + static void * NewArray(int size, int count); + static void * GrowArray(void * array, int newSize ); + static void FreeArray(void * array ); +#endif + +#if U_OVERRIDE_CXX_ALLOCATION + /** + * Override for ICU4C C++ memory management. + * simple, non-class types are allocated using the macros in common/cmemory.h + * (uprv_malloc(), uprv_free(), uprv_realloc()); + * they or something else could be used here to implement C++ new/delete + * for ICU4C C++ classes + * @stable ICU 2.4 + */ + static void * U_EXPORT2 operator new(size_t size) U_NO_THROW; + + /** + * Override for ICU4C C++ memory management. + * See new(). + * @stable ICU 2.4 + */ + static void * U_EXPORT2 operator new[](size_t size) U_NO_THROW; + + /** + * Override for ICU4C C++ memory management. + * simple, non-class types are allocated using the macros in common/cmemory.h + * (uprv_malloc(), uprv_free(), uprv_realloc()); + * they or something else could be used here to implement C++ new/delete + * for ICU4C C++ classes + * @stable ICU 2.4 + */ + static void U_EXPORT2 operator delete(void *p) U_NO_THROW; + + /** + * Override for ICU4C C++ memory management. + * See delete(). + * @stable ICU 2.4 + */ + static void U_EXPORT2 operator delete[](void *p) U_NO_THROW; + +#if U_HAVE_PLACEMENT_NEW + /** + * Override for ICU4C C++ memory management for STL. + * See new(). + * @stable ICU 2.6 + */ + static inline void * U_EXPORT2 operator new(size_t, void *ptr) U_NO_THROW { return ptr; } + + /** + * Override for ICU4C C++ memory management for STL. + * See delete(). + * @stable ICU 2.6 + */ + static inline void U_EXPORT2 operator delete(void *, void *) U_NO_THROW {} +#endif /* U_HAVE_PLACEMENT_NEW */ +#if U_HAVE_DEBUG_LOCATION_NEW + /** + * This method overrides the MFC debug version of the operator new + * + * @param size The requested memory size + * @param file The file where the allocation was requested + * @param line The line where the allocation was requested + */ + static void * U_EXPORT2 operator new(size_t size, const char* file, int line) U_NO_THROW; + /** + * This method provides a matching delete for the MFC debug new + * + * @param p The pointer to the allocated memory + * @param file The file where the allocation was requested + * @param line The line where the allocation was requested + */ + static void U_EXPORT2 operator delete(void* p, const char* file, int line) U_NO_THROW; +#endif /* U_HAVE_DEBUG_LOCATION_NEW */ +#endif /* U_OVERRIDE_CXX_ALLOCATION */ + + /* + * Assignment operator not declared. The compiler will provide one + * which does nothing since this class does not contain any data members. + * API/code coverage may show the assignment operator as present and + * untested - ignore. + * Subclasses need this assignment operator if they use compiler-provided + * assignment operators of their own. An alternative to not declaring one + * here would be to declare and empty-implement a protected or public one. + UMemory &UMemory::operator=(const UMemory &); + */ +}; + +/** + * UObject is the common ICU "boilerplate" class. + * UObject inherits UMemory (starting with ICU 2.4), + * and all other public ICU C++ classes + * are derived from UObject (starting with ICU 2.2). + * + * UObject contains common virtual functions, in particular a virtual destructor. + * + * The clone() function is not available in UObject because it is not + * implemented by all ICU classes. + * Many ICU services provide a clone() function for their class trees, + * defined on the service's C++ base class, and all subclasses within that + * service class tree return a pointer to the service base class + * (which itself is a subclass of UObject). + * This is because some compilers do not support covariant (same-as-this) + * return types; cast to the appropriate subclass if necessary. + * + * @stable ICU 2.2 + */ +class U_COMMON_API UObject : public UMemory { +public: + /** + * Destructor. + * + * @stable ICU 2.2 + */ + virtual ~UObject(); + + /** + * ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class. + * The base class implementation returns a dummy value. + * + * Use compiler RTTI rather than ICU's "poor man's RTTI". + * Since ICU 4.6, new ICU C++ class hierarchies do not implement "poor man's RTTI". + * + * @stable ICU 2.2 + */ + virtual UClassID getDynamicClassID() const; + +protected: + // the following functions are protected to prevent instantiation and + // direct use of UObject itself + + // default constructor + // inline UObject() {} + + // copy constructor + // inline UObject(const UObject &other) {} + +#if 0 + // TODO Sometime in the future. Implement operator==(). + // (This comment inserted in 2.2) + // some or all of the following "boilerplate" functions may be made public + // in a future ICU4C release when all subclasses implement them + + // assignment operator + // (not virtual, see "Taligent's Guide to Designing Programs" pp.73..74) + // commented out because the implementation is the same as a compiler's default + // UObject &operator=(const UObject &other) { return *this; } + + // comparison operators + virtual inline UBool operator==(const UObject &other) const { return this==&other; } + inline UBool operator!=(const UObject &other) const { return !operator==(other); } + + // clone() commented out from the base class: + // some compilers do not support co-variant return types + // (i.e., subclasses would have to return UObject * as well, instead of SubClass *) + // see also UObject class documentation. + // virtual UObject *clone() const; +#endif + + /* + * Assignment operator not declared. The compiler will provide one + * which does nothing since this class does not contain any data members. + * API/code coverage may show the assignment operator as present and + * untested - ignore. + * Subclasses need this assignment operator if they use compiler-provided + * assignment operators of their own. An alternative to not declaring one + * here would be to declare and empty-implement a protected or public one. + UObject &UObject::operator=(const UObject &); + */ +}; + +#ifndef U_HIDE_INTERNAL_API +/** + * This is a simple macro to add ICU RTTI to an ICU object implementation. + * This does not go into the header. This should only be used in *.cpp files. + * + * @param myClass The name of the class that needs RTTI defined. + * @internal + */ +#define UOBJECT_DEFINE_RTTI_IMPLEMENTATION(myClass) \ + UClassID U_EXPORT2 myClass::getStaticClassID() { \ + static char classID = 0; \ + return (UClassID)&classID; \ + } \ + UClassID myClass::getDynamicClassID() const \ + { return myClass::getStaticClassID(); } + + +/** + * This macro adds ICU RTTI to an ICU abstract class implementation. + * This macro should be invoked in *.cpp files. The corresponding + * header should declare getStaticClassID. + * + * @param myClass The name of the class that needs RTTI defined. + * @internal + */ +#define UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(myClass) \ + UClassID U_EXPORT2 myClass::getStaticClassID() { \ + static char classID = 0; \ + return (UClassID)&classID; \ + } + +#endif /* U_HIDE_INTERNAL_API */ + +U_NAMESPACE_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/upluralrules.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/upluralrules.h new file mode 100755 index 00000000..690846bc --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/upluralrules.h @@ -0,0 +1,194 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +***************************************************************************************** +* Copyright (C) 2010-2013, International Business Machines +* Corporation and others. All Rights Reserved. +***************************************************************************************** +*/ + +#ifndef UPLURALRULES_H +#define UPLURALRULES_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/localpointer.h" +#include "unicode/uenum.h" +#ifndef U_HIDE_INTERNAL_API +#include "unicode/unum.h" +#endif /* U_HIDE_INTERNAL_API */ + +/** + * \file + * \brief C API: Plural rules, select plural keywords for numeric values. + * + * A UPluralRules object defines rules for mapping non-negative numeric + * values onto a small set of keywords. Rules are constructed from a text + * description, consisting of a series of keywords and conditions. + * The uplrules_select function examines each condition in order and + * returns the keyword for the first condition that matches the number. + * If none match, the default rule(other) is returned. + * + * For more information, see the LDML spec, C.11 Language Plural Rules: + * http://www.unicode.org/reports/tr35/#Language_Plural_Rules + * + * Keywords: ICU locale data has 6 predefined values - + * 'zero', 'one', 'two', 'few', 'many' and 'other'. Callers need to check + * the value of keyword returned by the uplrules_select function. + * + * These are based on CLDR <i>Language Plural Rules</i>. For these + * predefined rules, see the CLDR page at + * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html + */ + +/** + * Type of plurals and PluralRules. + * @stable ICU 50 + */ +enum UPluralType { + /** + * Plural rules for cardinal numbers: 1 file vs. 2 files. + * @stable ICU 50 + */ + UPLURAL_TYPE_CARDINAL, + /** + * Plural rules for ordinal numbers: 1st file, 2nd file, 3rd file, 4th file, etc. + * @stable ICU 50 + */ + UPLURAL_TYPE_ORDINAL, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UPluralType value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UPLURAL_TYPE_COUNT +#endif /* U_HIDE_DEPRECATED_API */ +}; +/** + * @stable ICU 50 + */ +typedef enum UPluralType UPluralType; + +/** + * Opaque UPluralRules object for use in C programs. + * @stable ICU 4.8 + */ +struct UPluralRules; +typedef struct UPluralRules UPluralRules; /**< C typedef for struct UPluralRules. @stable ICU 4.8 */ + +/** + * Opens a new UPluralRules object using the predefined cardinal-number plural rules for a + * given locale. + * Same as uplrules_openForType(locale, UPLURAL_TYPE_CARDINAL, status). + * @param locale The locale for which the rules are desired. + * @param status A pointer to a UErrorCode to receive any errors. + * @return A UPluralRules for the specified locale, or NULL if an error occurred. + * @stable ICU 4.8 + */ +U_CAPI UPluralRules* U_EXPORT2 +uplrules_open(const char *locale, UErrorCode *status); + +/** + * Opens a new UPluralRules object using the predefined plural rules for a + * given locale and the plural type. + * @param locale The locale for which the rules are desired. + * @param type The plural type (e.g., cardinal or ordinal). + * @param status A pointer to a UErrorCode to receive any errors. + * @return A UPluralRules for the specified locale, or NULL if an error occurred. + * @stable ICU 50 + */ +U_CAPI UPluralRules* U_EXPORT2 +uplrules_openForType(const char *locale, UPluralType type, UErrorCode *status); + +/** + * Closes a UPluralRules object. Once closed it may no longer be used. + * @param uplrules The UPluralRules object to close. + * @stable ICU 4.8 + */ +U_CAPI void U_EXPORT2 +uplrules_close(UPluralRules *uplrules); + + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUPluralRulesPointer + * "Smart pointer" class, closes a UPluralRules via uplrules_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.8 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUPluralRulesPointer, UPluralRules, uplrules_close); + +U_NAMESPACE_END + +#endif + + +/** + * Given a number, returns the keyword of the first rule that + * applies to the number, according to the supplied UPluralRules object. + * @param uplrules The UPluralRules object specifying the rules. + * @param number The number for which the rule has to be determined. + * @param keyword The keyword of the rule that applies to number. + * @param capacity The capacity of keyword. + * @param status A pointer to a UErrorCode to receive any errors. + * @return The length of keyword. + * @stable ICU 4.8 + */ +U_CAPI int32_t U_EXPORT2 +uplrules_select(const UPluralRules *uplrules, + double number, + UChar *keyword, int32_t capacity, + UErrorCode *status); + +#ifndef U_HIDE_INTERNAL_API +/** + * Given a number, returns the keyword of the first rule that applies to the + * number, according to the UPluralRules object and given the number format + * specified by the UNumberFormat object. + * Note: This internal preview interface may be removed in the future if + * an architecturally cleaner solution reaches stable status. + * @param uplrules The UPluralRules object specifying the rules. + * @param number The number for which the rule has to be determined. + * @param fmt The UNumberFormat specifying how the number will be formatted + * (this can affect the plural form, e.g. "1 dollar" vs "1.0 dollars"). + * If this is NULL, the function behaves like uplrules_select. + * @param keyword The keyword of the rule that applies to number. + * @param capacity The capacity of the keyword buffer. + * @param status A pointer to a UErrorCode to receive any errors. + * @return The length of keyword. + * @internal ICU 59 technology preview, may be removed in the future + */ +U_INTERNAL int32_t U_EXPORT2 +uplrules_selectWithFormat(const UPluralRules *uplrules, + double number, + const UNumberFormat *fmt, + UChar *keyword, int32_t capacity, + UErrorCode *status); + +#endif /* U_HIDE_INTERNAL_API */ + +/** + * Creates a string enumeration of all plural rule keywords used in this + * UPluralRules object. The rule "other" is always present by default. + * @param uplrules The UPluralRules object specifying the rules for + * a given locale. + * @param status A pointer to a UErrorCode to receive any errors. + * @return a string enumeration over plural rule keywords, or NULL + * upon error. The caller is responsible for closing the result. + * @stable ICU 59 + */ +U_STABLE UEnumeration* U_EXPORT2 +uplrules_getKeywords(const UPluralRules *uplrules, + UErrorCode *status); + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uregex.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uregex.h new file mode 100755 index 00000000..f3e82149 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uregex.h @@ -0,0 +1,1614 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 2004-2016, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* file name: uregex.h +* encoding: UTF-8 +* indentation:4 +* +* created on: 2004mar09 +* created by: Andy Heninger +* +* ICU Regular Expressions, API for C +*/ + +/** + * \file + * \brief C API: Regular Expressions + * + * <p>This is a C wrapper around the C++ RegexPattern and RegexMatcher classes.</p> + */ + +#ifndef UREGEX_H +#define UREGEX_H + +#include "unicode/utext.h" +#include "unicode/utypes.h" + +#if !UCONFIG_NO_REGULAR_EXPRESSIONS + +#include "unicode/localpointer.h" +#include "unicode/parseerr.h" + +struct URegularExpression; +/** + * Structure representing a compiled regular expression, plus the results + * of a match operation. + * @stable ICU 3.0 + */ +typedef struct URegularExpression URegularExpression; + + +/** + * Constants for Regular Expression Match Modes. + * @stable ICU 2.4 + */ +typedef enum URegexpFlag{ + +#ifndef U_HIDE_DRAFT_API + /** Forces normalization of pattern and strings. + Not implemented yet, just a placeholder, hence draft. + @draft ICU 2.4 */ + UREGEX_CANON_EQ = 128, +#endif /* U_HIDE_DRAFT_API */ + /** Enable case insensitive matching. @stable ICU 2.4 */ + UREGEX_CASE_INSENSITIVE = 2, + + /** Allow white space and comments within patterns @stable ICU 2.4 */ + UREGEX_COMMENTS = 4, + + /** If set, '.' matches line terminators, otherwise '.' matching stops at line end. + * @stable ICU 2.4 */ + UREGEX_DOTALL = 32, + + /** If set, treat the entire pattern as a literal string. + * Metacharacters or escape sequences in the input sequence will be given + * no special meaning. + * + * The flag UREGEX_CASE_INSENSITIVE retains its impact + * on matching when used in conjunction with this flag. + * The other flags become superfluous. + * + * @stable ICU 4.0 + */ + UREGEX_LITERAL = 16, + + /** Control behavior of "$" and "^" + * If set, recognize line terminators within string, + * otherwise, match only at start and end of input string. + * @stable ICU 2.4 */ + UREGEX_MULTILINE = 8, + + /** Unix-only line endings. + * When this mode is enabled, only \\u000a is recognized as a line ending + * in the behavior of ., ^, and $. + * @stable ICU 4.0 + */ + UREGEX_UNIX_LINES = 1, + + /** Unicode word boundaries. + * If set, \b uses the Unicode TR 29 definition of word boundaries. + * Warning: Unicode word boundaries are quite different from + * traditional regular expression word boundaries. See + * http://unicode.org/reports/tr29/#Word_Boundaries + * @stable ICU 2.8 + */ + UREGEX_UWORD = 256, + + /** Error on Unrecognized backslash escapes. + * If set, fail with an error on patterns that contain + * backslash-escaped ASCII letters without a known special + * meaning. If this flag is not set, these + * escaped letters represent themselves. + * @stable ICU 4.0 + */ + UREGEX_ERROR_ON_UNKNOWN_ESCAPES = 512 + +} URegexpFlag; + +/** + * Open (compile) an ICU regular expression. Compiles the regular expression in + * string form into an internal representation using the specified match mode flags. + * The resulting regular expression handle can then be used to perform various + * matching operations. + * + * + * @param pattern The Regular Expression pattern to be compiled. + * @param patternLength The length of the pattern, or -1 if the pattern is + * NUL terminated. + * @param flags Flags that alter the default matching behavior for + * the regular expression, UREGEX_CASE_INSENSITIVE, for + * example. For default behavior, set this parameter to zero. + * See <code>enum URegexpFlag</code>. All desired flags + * are bitwise-ORed together. + * @param pe Receives the position (line and column numbers) of any syntax + * error within the source regular expression string. If this + * information is not wanted, pass NULL for this parameter. + * @param status Receives error detected by this function. + * @stable ICU 3.0 + * + */ +U_STABLE URegularExpression * U_EXPORT2 +uregex_open( const UChar *pattern, + int32_t patternLength, + uint32_t flags, + UParseError *pe, + UErrorCode *status); + +/** + * Open (compile) an ICU regular expression. Compiles the regular expression in + * string form into an internal representation using the specified match mode flags. + * The resulting regular expression handle can then be used to perform various + * matching operations. + * <p> + * The contents of the pattern UText will be extracted and saved. Ownership of the + * UText struct itself remains with the caller. This is to match the behavior of + * uregex_open(). + * + * @param pattern The Regular Expression pattern to be compiled. + * @param flags Flags that alter the default matching behavior for + * the regular expression, UREGEX_CASE_INSENSITIVE, for + * example. For default behavior, set this parameter to zero. + * See <code>enum URegexpFlag</code>. All desired flags + * are bitwise-ORed together. + * @param pe Receives the position (line and column numbers) of any syntax + * error within the source regular expression string. If this + * information is not wanted, pass NULL for this parameter. + * @param status Receives error detected by this function. + * + * @stable ICU 4.6 + */ +U_STABLE URegularExpression * U_EXPORT2 +uregex_openUText(UText *pattern, + uint32_t flags, + UParseError *pe, + UErrorCode *status); + +/** + * Open (compile) an ICU regular expression. The resulting regular expression + * handle can then be used to perform various matching operations. + * <p> + * This function is the same as uregex_open, except that the pattern + * is supplied as an 8 bit char * string in the default code page. + * + * @param pattern The Regular Expression pattern to be compiled, + * NUL terminated. + * @param flags Flags that alter the default matching behavior for + * the regular expression, UREGEX_CASE_INSENSITIVE, for + * example. For default behavior, set this parameter to zero. + * See <code>enum URegexpFlag</code>. All desired flags + * are bitwise-ORed together. + * @param pe Receives the position (line and column numbers) of any syntax + * error within the source regular expression string. If this + * information is not wanted, pass NULL for this parameter. + * @param status Receives errors detected by this function. + * @return The URegularExpression object representing the compiled + * pattern. + * + * @stable ICU 3.0 + */ +#if !UCONFIG_NO_CONVERSION +U_STABLE URegularExpression * U_EXPORT2 +uregex_openC( const char *pattern, + uint32_t flags, + UParseError *pe, + UErrorCode *status); +#endif + + + +/** + * Close the regular expression, recovering all resources (memory) it + * was holding. + * + * @param regexp The regular expression to be closed. + * @stable ICU 3.0 + */ +U_STABLE void U_EXPORT2 +uregex_close(URegularExpression *regexp); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalURegularExpressionPointer + * "Smart pointer" class, closes a URegularExpression via uregex_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalURegularExpressionPointer, URegularExpression, uregex_close); + +U_NAMESPACE_END + +#endif + +/** + * Make a copy of a compiled regular expression. Cloning a regular + * expression is faster than opening a second instance from the source + * form of the expression, and requires less memory. + * <p> + * Note that the current input string and the position of any matched text + * within it are not cloned; only the pattern itself and the + * match mode flags are copied. + * <p> + * Cloning can be particularly useful to threaded applications that perform + * multiple match operations in parallel. Each concurrent RE + * operation requires its own instance of a URegularExpression. + * + * @param regexp The compiled regular expression to be cloned. + * @param status Receives indication of any errors encountered + * @return the cloned copy of the compiled regular expression. + * @stable ICU 3.0 + */ +U_STABLE URegularExpression * U_EXPORT2 +uregex_clone(const URegularExpression *regexp, UErrorCode *status); + +/** + * Returns a pointer to the source form of the pattern for this regular expression. + * This function will work even if the pattern was originally specified as a UText. + * + * @param regexp The compiled regular expression. + * @param patLength This output parameter will be set to the length of the + * pattern string. A NULL pointer may be used here if the + * pattern length is not needed, as would be the case if + * the pattern is known in advance to be a NUL terminated + * string. + * @param status Receives errors detected by this function. + * @return a pointer to the pattern string. The storage for the string is + * owned by the regular expression object, and must not be + * altered or deleted by the application. The returned string + * will remain valid until the regular expression is closed. + * @stable ICU 3.0 + */ +U_STABLE const UChar * U_EXPORT2 +uregex_pattern(const URegularExpression *regexp, + int32_t *patLength, + UErrorCode *status); + +/** + * Returns the source text of the pattern for this regular expression. + * This function will work even if the pattern was originally specified as a UChar string. + * + * @param regexp The compiled regular expression. + * @param status Receives errors detected by this function. + * @return the pattern text. The storage for the text is owned by the regular expression + * object, and must not be altered or deleted. + * + * @stable ICU 4.6 + */ +U_STABLE UText * U_EXPORT2 +uregex_patternUText(const URegularExpression *regexp, + UErrorCode *status); + +/** + * Get the match mode flags that were specified when compiling this regular expression. + * @param status Receives errors detected by this function. + * @param regexp The compiled regular expression. + * @return The match mode flags + * @see URegexpFlag + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +uregex_flags(const URegularExpression *regexp, + UErrorCode *status); + + +/** + * Set the subject text string upon which the regular expression will look for matches. + * This function may be called any number of times, allowing the regular + * expression pattern to be applied to different strings. + * <p> + * Regular expression matching operations work directly on the application's + * string data. No copy is made. The subject string data must not be + * altered after calling this function until after all regular expression + * operations involving this string data are completed. + * <p> + * Zero length strings are permitted. In this case, no subsequent match + * operation will dereference the text string pointer. + * + * @param regexp The compiled regular expression. + * @param text The subject text string. + * @param textLength The length of the subject text, or -1 if the string + * is NUL terminated. + * @param status Receives errors detected by this function. + * @stable ICU 3.0 + */ +U_STABLE void U_EXPORT2 +uregex_setText(URegularExpression *regexp, + const UChar *text, + int32_t textLength, + UErrorCode *status); + + +/** + * Set the subject text string upon which the regular expression will look for matches. + * This function may be called any number of times, allowing the regular + * expression pattern to be applied to different strings. + * <p> + * Regular expression matching operations work directly on the application's + * string data; only a shallow clone is made. The subject string data must not be + * altered after calling this function until after all regular expression + * operations involving this string data are completed. + * + * @param regexp The compiled regular expression. + * @param text The subject text string. + * @param status Receives errors detected by this function. + * + * @stable ICU 4.6 + */ +U_STABLE void U_EXPORT2 +uregex_setUText(URegularExpression *regexp, + UText *text, + UErrorCode *status); + +/** + * Get the subject text that is currently associated with this + * regular expression object. If the input was supplied using uregex_setText(), + * that pointer will be returned. Otherwise, the characters in the input will + * be extracted to a buffer and returned. In either case, ownership remains + * with the regular expression object. + * + * This function will work even if the input was originally specified as a UText. + * + * @param regexp The compiled regular expression. + * @param textLength The length of the string is returned in this output parameter. + * A NULL pointer may be used here if the + * text length is not needed, as would be the case if + * the text is known in advance to be a NUL terminated + * string. + * @param status Receives errors detected by this function. + * @return Pointer to the subject text string currently associated with + * this regular expression. + * @stable ICU 3.0 + */ +U_STABLE const UChar * U_EXPORT2 +uregex_getText(URegularExpression *regexp, + int32_t *textLength, + UErrorCode *status); + +/** + * Get the subject text that is currently associated with this + * regular expression object. + * + * This function will work even if the input was originally specified as a UChar string. + * + * @param regexp The compiled regular expression. + * @param dest A mutable UText in which to store the current input. + * If NULL, a new UText will be created as an immutable shallow clone + * of the actual input string. + * @param status Receives errors detected by this function. + * @return The subject text currently associated with this regular expression. + * If a pre-allocated UText was provided, it will always be used and returned. + * + * @stable ICU 4.6 + */ +U_STABLE UText * U_EXPORT2 +uregex_getUText(URegularExpression *regexp, + UText *dest, + UErrorCode *status); + +/** + * Set the subject text string upon which the regular expression is looking for matches + * without changing any other aspect of the matching state. + * The new and previous text strings must have the same content. + * + * This function is intended for use in environments where ICU is operating on + * strings that may move around in memory. It provides a mechanism for notifying + * ICU that the string has been relocated, and providing a new UText to access the + * string in its new position. + * + * Note that the regular expression implementation never copies the underlying text + * of a string being matched, but always operates directly on the original text + * provided by the user. Refreshing simply drops the references to the old text + * and replaces them with references to the new. + * + * Caution: this function is normally used only by very specialized + * system-level code. One example use case is with garbage collection + * that moves the text in memory. + * + * @param regexp The compiled regular expression. + * @param text The new (moved) text string. + * @param status Receives errors detected by this function. + * + * @stable ICU 4.8 + */ +U_STABLE void U_EXPORT2 +uregex_refreshUText(URegularExpression *regexp, + UText *text, + UErrorCode *status); + +/** + * Attempts to match the input string against the pattern. + * To succeed, the match must extend to the end of the string, + * or cover the complete match region. + * + * If startIndex >= zero the match operation starts at the specified + * index and must extend to the end of the input string. Any region + * that has been specified is reset. + * + * If startIndex == -1 the match must cover the input region, or the entire + * input string if no region has been set. This directly corresponds to + * Matcher.matches() in Java + * + * @param regexp The compiled regular expression. + * @param startIndex The input string (native) index at which to begin matching, or -1 + * to match the input Region. + * @param status Receives errors detected by this function. + * @return TRUE if there is a match + * @stable ICU 3.0 + */ +U_STABLE UBool U_EXPORT2 +uregex_matches(URegularExpression *regexp, + int32_t startIndex, + UErrorCode *status); + +/** + * 64bit version of uregex_matches. + * Attempts to match the input string against the pattern. + * To succeed, the match must extend to the end of the string, + * or cover the complete match region. + * + * If startIndex >= zero the match operation starts at the specified + * index and must extend to the end of the input string. Any region + * that has been specified is reset. + * + * If startIndex == -1 the match must cover the input region, or the entire + * input string if no region has been set. This directly corresponds to + * Matcher.matches() in Java + * + * @param regexp The compiled regular expression. + * @param startIndex The input string (native) index at which to begin matching, or -1 + * to match the input Region. + * @param status Receives errors detected by this function. + * @return TRUE if there is a match + * @stable ICU 4.6 + */ +U_STABLE UBool U_EXPORT2 +uregex_matches64(URegularExpression *regexp, + int64_t startIndex, + UErrorCode *status); + +/** + * Attempts to match the input string, starting from the specified index, against the pattern. + * The match may be of any length, and is not required to extend to the end + * of the input string. Contrast with uregex_matches(). + * + * <p>If startIndex is >= 0 any input region that was set for this + * URegularExpression is reset before the operation begins. + * + * <p>If the specified starting index == -1 the match begins at the start of the input + * region, or at the start of the full string if no region has been specified. + * This corresponds directly with Matcher.lookingAt() in Java. + * + * <p>If the match succeeds then more information can be obtained via the + * <code>uregexp_start()</code>, <code>uregexp_end()</code>, + * and <code>uregex_group()</code> functions.</p> + * + * @param regexp The compiled regular expression. + * @param startIndex The input string (native) index at which to begin matching, or + * -1 to match the Input Region + * @param status A reference to a UErrorCode to receive any errors. + * @return TRUE if there is a match. + * @stable ICU 3.0 + */ +U_STABLE UBool U_EXPORT2 +uregex_lookingAt(URegularExpression *regexp, + int32_t startIndex, + UErrorCode *status); + +/** + * 64bit version of uregex_lookingAt. + * Attempts to match the input string, starting from the specified index, against the pattern. + * The match may be of any length, and is not required to extend to the end + * of the input string. Contrast with uregex_matches(). + * + * <p>If startIndex is >= 0 any input region that was set for this + * URegularExpression is reset before the operation begins. + * + * <p>If the specified starting index == -1 the match begins at the start of the input + * region, or at the start of the full string if no region has been specified. + * This corresponds directly with Matcher.lookingAt() in Java. + * + * <p>If the match succeeds then more information can be obtained via the + * <code>uregexp_start()</code>, <code>uregexp_end()</code>, + * and <code>uregex_group()</code> functions.</p> + * + * @param regexp The compiled regular expression. + * @param startIndex The input string (native) index at which to begin matching, or + * -1 to match the Input Region + * @param status A reference to a UErrorCode to receive any errors. + * @return TRUE if there is a match. + * @stable ICU 4.6 + */ +U_STABLE UBool U_EXPORT2 +uregex_lookingAt64(URegularExpression *regexp, + int64_t startIndex, + UErrorCode *status); + +/** + * Find the first matching substring of the input string that matches the pattern. + * If startIndex is >= zero the search for a match begins at the specified index, + * and any match region is reset. This corresponds directly with + * Matcher.find(startIndex) in Java. + * + * If startIndex == -1 the search begins at the start of the input region, + * or at the start of the full string if no region has been specified. + * + * If a match is found, <code>uregex_start(), uregex_end()</code>, and + * <code>uregex_group()</code> will provide more information regarding the match. + * + * @param regexp The compiled regular expression. + * @param startIndex The position (native) in the input string to begin the search, or + * -1 to search within the Input Region. + * @param status A reference to a UErrorCode to receive any errors. + * @return TRUE if a match is found. + * @stable ICU 3.0 + */ +U_STABLE UBool U_EXPORT2 +uregex_find(URegularExpression *regexp, + int32_t startIndex, + UErrorCode *status); + +/** + * 64bit version of uregex_find. + * Find the first matching substring of the input string that matches the pattern. + * If startIndex is >= zero the search for a match begins at the specified index, + * and any match region is reset. This corresponds directly with + * Matcher.find(startIndex) in Java. + * + * If startIndex == -1 the search begins at the start of the input region, + * or at the start of the full string if no region has been specified. + * + * If a match is found, <code>uregex_start(), uregex_end()</code>, and + * <code>uregex_group()</code> will provide more information regarding the match. + * + * @param regexp The compiled regular expression. + * @param startIndex The position (native) in the input string to begin the search, or + * -1 to search within the Input Region. + * @param status A reference to a UErrorCode to receive any errors. + * @return TRUE if a match is found. + * @stable ICU 4.6 + */ +U_STABLE UBool U_EXPORT2 +uregex_find64(URegularExpression *regexp, + int64_t startIndex, + UErrorCode *status); + +/** + * Find the next pattern match in the input string. Begin searching + * the input at the location following the end of he previous match, + * or at the start of the string (or region) if there is no + * previous match. If a match is found, <code>uregex_start(), uregex_end()</code>, and + * <code>uregex_group()</code> will provide more information regarding the match. + * + * @param regexp The compiled regular expression. + * @param status A reference to a UErrorCode to receive any errors. + * @return TRUE if a match is found. + * @see uregex_reset + * @stable ICU 3.0 + */ +U_STABLE UBool U_EXPORT2 +uregex_findNext(URegularExpression *regexp, + UErrorCode *status); + +/** + * Get the number of capturing groups in this regular expression's pattern. + * @param regexp The compiled regular expression. + * @param status A reference to a UErrorCode to receive any errors. + * @return the number of capture groups + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +uregex_groupCount(URegularExpression *regexp, + UErrorCode *status); + +/** + * Get the group number corresponding to a named capture group. + * The returned number can be used with any function that access + * capture groups by number. + * + * The function returns an error status if the specified name does not + * appear in the pattern. + * + * @param regexp The compiled regular expression. + * @param groupName The capture group name. + * @param nameLength The length of the name, or -1 if the name is a + * nul-terminated string. + * @param status A pointer to a UErrorCode to receive any errors. + * + * @stable ICU 55 + */ +U_STABLE int32_t U_EXPORT2 +uregex_groupNumberFromName(URegularExpression *regexp, + const UChar *groupName, + int32_t nameLength, + UErrorCode *status); + + +/** + * Get the group number corresponding to a named capture group. + * The returned number can be used with any function that access + * capture groups by number. + * + * The function returns an error status if the specified name does not + * appear in the pattern. + * + * @param regexp The compiled regular expression. + * @param groupName The capture group name, + * platform invariant characters only. + * @param nameLength The length of the name, or -1 if the name is + * nul-terminated. + * @param status A pointer to a UErrorCode to receive any errors. + * + * @stable ICU 55 + */ +U_STABLE int32_t U_EXPORT2 +uregex_groupNumberFromCName(URegularExpression *regexp, + const char *groupName, + int32_t nameLength, + UErrorCode *status); + +/** Extract the string for the specified matching expression or subexpression. + * Group #0 is the complete string of matched text. + * Group #1 is the text matched by the first set of capturing parentheses. + * + * @param regexp The compiled regular expression. + * @param groupNum The capture group to extract. Group 0 is the complete + * match. The value of this parameter must be + * less than or equal to the number of capture groups in + * the pattern. + * @param dest Buffer to receive the matching string data + * @param destCapacity Capacity of the dest buffer. + * @param status A reference to a UErrorCode to receive any errors. + * @return Length of matching data, + * or -1 if no applicable match. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +uregex_group(URegularExpression *regexp, + int32_t groupNum, + UChar *dest, + int32_t destCapacity, + UErrorCode *status); + +/** Returns a shallow immutable clone of the entire input string with the current index set + * to the beginning of the requested capture group. The capture group length is also + * returned via groupLength. + * Group #0 is the complete string of matched text. + * Group #1 is the text matched by the first set of capturing parentheses. + * + * @param regexp The compiled regular expression. + * @param groupNum The capture group to extract. Group 0 is the complete + * match. The value of this parameter must be + * less than or equal to the number of capture groups in + * the pattern. + * @param dest A mutable UText in which to store the current input. + * If NULL, a new UText will be created as an immutable shallow clone + * of the entire input string. + * @param groupLength The group length of the desired capture group. Output parameter. + * @param status A reference to a UErrorCode to receive any errors. + * @return The subject text currently associated with this regular expression. + * If a pre-allocated UText was provided, it will always be used and returned. + + * + * @stable ICU 4.6 + */ +U_STABLE UText * U_EXPORT2 +uregex_groupUText(URegularExpression *regexp, + int32_t groupNum, + UText *dest, + int64_t *groupLength, + UErrorCode *status); + +/** + * Returns the index in the input string of the start of the text matched by the + * specified capture group during the previous match operation. Return -1 if + * the capture group was not part of the last match. + * Group #0 refers to the complete range of matched text. + * Group #1 refers to the text matched by the first set of capturing parentheses. + * + * @param regexp The compiled regular expression. + * @param groupNum The capture group number + * @param status A reference to a UErrorCode to receive any errors. + * @return the starting (native) position in the input of the text matched + * by the specified group. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +uregex_start(URegularExpression *regexp, + int32_t groupNum, + UErrorCode *status); + +/** + * 64bit version of uregex_start. + * Returns the index in the input string of the start of the text matched by the + * specified capture group during the previous match operation. Return -1 if + * the capture group was not part of the last match. + * Group #0 refers to the complete range of matched text. + * Group #1 refers to the text matched by the first set of capturing parentheses. + * + * @param regexp The compiled regular expression. + * @param groupNum The capture group number + * @param status A reference to a UErrorCode to receive any errors. + * @return the starting (native) position in the input of the text matched + * by the specified group. + * @stable ICU 4.6 + */ +U_STABLE int64_t U_EXPORT2 +uregex_start64(URegularExpression *regexp, + int32_t groupNum, + UErrorCode *status); + +/** + * Returns the index in the input string of the position following the end + * of the text matched by the specified capture group. + * Return -1 if the capture group was not part of the last match. + * Group #0 refers to the complete range of matched text. + * Group #1 refers to the text matched by the first set of capturing parentheses. + * + * @param regexp The compiled regular expression. + * @param groupNum The capture group number + * @param status A reference to a UErrorCode to receive any errors. + * @return the (native) index of the position following the last matched character. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +uregex_end(URegularExpression *regexp, + int32_t groupNum, + UErrorCode *status); + +/** + * 64bit version of uregex_end. + * Returns the index in the input string of the position following the end + * of the text matched by the specified capture group. + * Return -1 if the capture group was not part of the last match. + * Group #0 refers to the complete range of matched text. + * Group #1 refers to the text matched by the first set of capturing parentheses. + * + * @param regexp The compiled regular expression. + * @param groupNum The capture group number + * @param status A reference to a UErrorCode to receive any errors. + * @return the (native) index of the position following the last matched character. + * @stable ICU 4.6 + */ +U_STABLE int64_t U_EXPORT2 +uregex_end64(URegularExpression *regexp, + int32_t groupNum, + UErrorCode *status); + +/** + * Reset any saved state from the previous match. Has the effect of + * causing uregex_findNext to begin at the specified index, and causing + * uregex_start(), uregex_end() and uregex_group() to return an error + * indicating that there is no match information available. Clears any + * match region that may have been set. + * + * @param regexp The compiled regular expression. + * @param index The position (native) in the text at which a + * uregex_findNext() should begin searching. + * @param status A reference to a UErrorCode to receive any errors. + * @stable ICU 3.0 + */ +U_STABLE void U_EXPORT2 +uregex_reset(URegularExpression *regexp, + int32_t index, + UErrorCode *status); + +/** + * 64bit version of uregex_reset. + * Reset any saved state from the previous match. Has the effect of + * causing uregex_findNext to begin at the specified index, and causing + * uregex_start(), uregex_end() and uregex_group() to return an error + * indicating that there is no match information available. Clears any + * match region that may have been set. + * + * @param regexp The compiled regular expression. + * @param index The position (native) in the text at which a + * uregex_findNext() should begin searching. + * @param status A reference to a UErrorCode to receive any errors. + * @stable ICU 4.6 + */ +U_STABLE void U_EXPORT2 +uregex_reset64(URegularExpression *regexp, + int64_t index, + UErrorCode *status); + +/** + * Sets the limits of the matching region for this URegularExpression. + * The region is the part of the input string that will be considered when matching. + * Invoking this method resets any saved state from the previous match, + * then sets the region to start at the index specified by the start parameter + * and end at the index specified by the end parameter. + * + * Depending on the transparency and anchoring being used (see useTransparentBounds + * and useAnchoringBounds), certain constructs such as anchors may behave differently + * at or around the boundaries of the region + * + * The function will fail if start is greater than limit, or if either index + * is less than zero or greater than the length of the string being matched. + * + * @param regexp The compiled regular expression. + * @param regionStart The (native) index to begin searches at. + * @param regionLimit The (native) index to end searches at (exclusive). + * @param status A pointer to a UErrorCode to receive any errors. + * @stable ICU 4.0 + */ +U_STABLE void U_EXPORT2 +uregex_setRegion(URegularExpression *regexp, + int32_t regionStart, + int32_t regionLimit, + UErrorCode *status); + +/** + * 64bit version of uregex_setRegion. + * Sets the limits of the matching region for this URegularExpression. + * The region is the part of the input string that will be considered when matching. + * Invoking this method resets any saved state from the previous match, + * then sets the region to start at the index specified by the start parameter + * and end at the index specified by the end parameter. + * + * Depending on the transparency and anchoring being used (see useTransparentBounds + * and useAnchoringBounds), certain constructs such as anchors may behave differently + * at or around the boundaries of the region + * + * The function will fail if start is greater than limit, or if either index + * is less than zero or greater than the length of the string being matched. + * + * @param regexp The compiled regular expression. + * @param regionStart The (native) index to begin searches at. + * @param regionLimit The (native) index to end searches at (exclusive). + * @param status A pointer to a UErrorCode to receive any errors. + * @stable ICU 4.6 + */ +U_STABLE void U_EXPORT2 +uregex_setRegion64(URegularExpression *regexp, + int64_t regionStart, + int64_t regionLimit, + UErrorCode *status); + +/** + * Set the matching region and the starting index for subsequent matches + * in a single operation. + * This is useful because the usual function for setting the starting + * index, urgex_reset(), also resets any region limits. + * + * @param regexp The compiled regular expression. + * @param regionStart The (native) index to begin searches at. + * @param regionLimit The (native) index to end searches at (exclusive). + * @param startIndex The index in the input text at which the next + * match operation should begin. + * @param status A pointer to a UErrorCode to receive any errors. + * @stable ICU 4.6 + */ +U_STABLE void U_EXPORT2 +uregex_setRegionAndStart(URegularExpression *regexp, + int64_t regionStart, + int64_t regionLimit, + int64_t startIndex, + UErrorCode *status); + +/** + * Reports the start index of the matching region. Any matches found are limited to + * to the region bounded by regionStart (inclusive) and regionEnd (exclusive). + * + * @param regexp The compiled regular expression. + * @param status A pointer to a UErrorCode to receive any errors. + * @return The starting (native) index of this matcher's region. + * @stable ICU 4.0 + */ +U_STABLE int32_t U_EXPORT2 +uregex_regionStart(const URegularExpression *regexp, + UErrorCode *status); + +/** + * 64bit version of uregex_regionStart. + * Reports the start index of the matching region. Any matches found are limited to + * to the region bounded by regionStart (inclusive) and regionEnd (exclusive). + * + * @param regexp The compiled regular expression. + * @param status A pointer to a UErrorCode to receive any errors. + * @return The starting (native) index of this matcher's region. + * @stable ICU 4.6 + */ +U_STABLE int64_t U_EXPORT2 +uregex_regionStart64(const URegularExpression *regexp, + UErrorCode *status); + +/** + * Reports the end index (exclusive) of the matching region for this URegularExpression. + * Any matches found are limited to to the region bounded by regionStart (inclusive) + * and regionEnd (exclusive). + * + * @param regexp The compiled regular expression. + * @param status A pointer to a UErrorCode to receive any errors. + * @return The ending point (native) of this matcher's region. + * @stable ICU 4.0 + */ +U_STABLE int32_t U_EXPORT2 +uregex_regionEnd(const URegularExpression *regexp, + UErrorCode *status); + +/** + * 64bit version of uregex_regionEnd. + * Reports the end index (exclusive) of the matching region for this URegularExpression. + * Any matches found are limited to to the region bounded by regionStart (inclusive) + * and regionEnd (exclusive). + * + * @param regexp The compiled regular expression. + * @param status A pointer to a UErrorCode to receive any errors. + * @return The ending point (native) of this matcher's region. + * @stable ICU 4.6 + */ +U_STABLE int64_t U_EXPORT2 +uregex_regionEnd64(const URegularExpression *regexp, + UErrorCode *status); + +/** + * Queries the transparency of region bounds for this URegularExpression. + * See useTransparentBounds for a description of transparent and opaque bounds. + * By default, matching boundaries are opaque. + * + * @param regexp The compiled regular expression. + * @param status A pointer to a UErrorCode to receive any errors. + * @return TRUE if this matcher is using opaque bounds, false if it is not. + * @stable ICU 4.0 + */ +U_STABLE UBool U_EXPORT2 +uregex_hasTransparentBounds(const URegularExpression *regexp, + UErrorCode *status); + + +/** + * Sets the transparency of region bounds for this URegularExpression. + * Invoking this function with an argument of TRUE will set matches to use transparent bounds. + * If the boolean argument is FALSE, then opaque bounds will be used. + * + * Using transparent bounds, the boundaries of the matching region are transparent + * to lookahead, lookbehind, and boundary matching constructs. Those constructs can + * see text beyond the boundaries of the region while checking for a match. + * + * With opaque bounds, no text outside of the matching region is visible to lookahead, + * lookbehind, and boundary matching constructs. + * + * By default, opaque bounds are used. + * + * @param regexp The compiled regular expression. + * @param b TRUE for transparent bounds; FALSE for opaque bounds + * @param status A pointer to a UErrorCode to receive any errors. + * @stable ICU 4.0 + **/ +U_STABLE void U_EXPORT2 +uregex_useTransparentBounds(URegularExpression *regexp, + UBool b, + UErrorCode *status); + + +/** + * Return true if this URegularExpression is using anchoring bounds. + * By default, anchoring region bounds are used. + * + * @param regexp The compiled regular expression. + * @param status A pointer to a UErrorCode to receive any errors. + * @return TRUE if this matcher is using anchoring bounds. + * @stable ICU 4.0 + */ +U_STABLE UBool U_EXPORT2 +uregex_hasAnchoringBounds(const URegularExpression *regexp, + UErrorCode *status); + + +/** + * Set whether this URegularExpression is using Anchoring Bounds for its region. + * With anchoring bounds, pattern anchors such as ^ and $ will match at the start + * and end of the region. Without Anchoring Bounds, anchors will only match at + * the positions they would in the complete text. + * + * Anchoring Bounds are the default for regions. + * + * @param regexp The compiled regular expression. + * @param b TRUE if to enable anchoring bounds; FALSE to disable them. + * @param status A pointer to a UErrorCode to receive any errors. + * @stable ICU 4.0 + */ +U_STABLE void U_EXPORT2 +uregex_useAnchoringBounds(URegularExpression *regexp, + UBool b, + UErrorCode *status); + +/** + * Return TRUE if the most recent matching operation touched the + * end of the text being processed. In this case, additional input text could + * change the results of that match. + * + * @param regexp The compiled regular expression. + * @param status A pointer to a UErrorCode to receive any errors. + * @return TRUE if the most recent match hit the end of input + * @stable ICU 4.0 + */ +U_STABLE UBool U_EXPORT2 +uregex_hitEnd(const URegularExpression *regexp, + UErrorCode *status); + +/** + * Return TRUE the most recent match succeeded and additional input could cause + * it to fail. If this function returns false and a match was found, then more input + * might change the match but the match won't be lost. If a match was not found, + * then requireEnd has no meaning. + * + * @param regexp The compiled regular expression. + * @param status A pointer to a UErrorCode to receive any errors. + * @return TRUE if more input could cause the most recent match to no longer match. + * @stable ICU 4.0 + */ +U_STABLE UBool U_EXPORT2 +uregex_requireEnd(const URegularExpression *regexp, + UErrorCode *status); + + + + + +/** + * Replaces every substring of the input that matches the pattern + * with the given replacement string. This is a convenience function that + * provides a complete find-and-replace-all operation. + * + * This method scans the input string looking for matches of the pattern. + * Input that is not part of any match is copied unchanged to the + * destination buffer. Matched regions are replaced in the output + * buffer by the replacement string. The replacement string may contain + * references to capture groups; these take the form of $1, $2, etc. + * + * @param regexp The compiled regular expression. + * @param replacementText A string containing the replacement text. + * @param replacementLength The length of the replacement string, or + * -1 if it is NUL terminated. + * @param destBuf A (UChar *) buffer that will receive the result. + * @param destCapacity The capacity of the destination buffer. + * @param status A reference to a UErrorCode to receive any errors. + * @return The length of the string resulting from the find + * and replace operation. In the event that the + * destination capacity is inadequate, the return value + * is still the full length of the untruncated string. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +uregex_replaceAll(URegularExpression *regexp, + const UChar *replacementText, + int32_t replacementLength, + UChar *destBuf, + int32_t destCapacity, + UErrorCode *status); + +/** + * Replaces every substring of the input that matches the pattern + * with the given replacement string. This is a convenience function that + * provides a complete find-and-replace-all operation. + * + * This method scans the input string looking for matches of the pattern. + * Input that is not part of any match is copied unchanged to the + * destination buffer. Matched regions are replaced in the output + * buffer by the replacement string. The replacement string may contain + * references to capture groups; these take the form of $1, $2, etc. + * + * @param regexp The compiled regular expression. + * @param replacement A string containing the replacement text. + * @param dest A mutable UText that will receive the result. + * If NULL, a new UText will be created (which may not be mutable). + * @param status A reference to a UErrorCode to receive any errors. + * @return A UText containing the results of the find and replace. + * If a pre-allocated UText was provided, it will always be used and returned. + * + * @stable ICU 4.6 + */ +U_STABLE UText * U_EXPORT2 +uregex_replaceAllUText(URegularExpression *regexp, + UText *replacement, + UText *dest, + UErrorCode *status); + +/** + * Replaces the first substring of the input that matches the pattern + * with the given replacement string. This is a convenience function that + * provides a complete find-and-replace operation. + * + * This method scans the input string looking for a match of the pattern. + * All input that is not part of the match is copied unchanged to the + * destination buffer. The matched region is replaced in the output + * buffer by the replacement string. The replacement string may contain + * references to capture groups; these take the form of $1, $2, etc. + * + * @param regexp The compiled regular expression. + * @param replacementText A string containing the replacement text. + * @param replacementLength The length of the replacement string, or + * -1 if it is NUL terminated. + * @param destBuf A (UChar *) buffer that will receive the result. + * @param destCapacity The capacity of the destination buffer. + * @param status a reference to a UErrorCode to receive any errors. + * @return The length of the string resulting from the find + * and replace operation. In the event that the + * destination capacity is inadequate, the return value + * is still the full length of the untruncated string. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +uregex_replaceFirst(URegularExpression *regexp, + const UChar *replacementText, + int32_t replacementLength, + UChar *destBuf, + int32_t destCapacity, + UErrorCode *status); + +/** + * Replaces the first substring of the input that matches the pattern + * with the given replacement string. This is a convenience function that + * provides a complete find-and-replace operation. + * + * This method scans the input string looking for a match of the pattern. + * All input that is not part of the match is copied unchanged to the + * destination buffer. The matched region is replaced in the output + * buffer by the replacement string. The replacement string may contain + * references to capture groups; these take the form of $1, $2, etc. + * + * @param regexp The compiled regular expression. + * @param replacement A string containing the replacement text. + * @param dest A mutable UText that will receive the result. + * If NULL, a new UText will be created (which may not be mutable). + * @param status A reference to a UErrorCode to receive any errors. + * @return A UText containing the results of the find and replace. + * If a pre-allocated UText was provided, it will always be used and returned. + * + * @stable ICU 4.6 + */ +U_STABLE UText * U_EXPORT2 +uregex_replaceFirstUText(URegularExpression *regexp, + UText *replacement, + UText *dest, + UErrorCode *status); + +/** + * Implements a replace operation intended to be used as part of an + * incremental find-and-replace. + * + * <p>The input string, starting from the end of the previous match and ending at + * the start of the current match, is appended to the destination string. Then the + * replacement string is appended to the output string, + * including handling any substitutions of captured text.</p> + * + * <p>A note on preflight computation of buffersize and error handling: + * Calls to uregex_appendReplacement() and uregex_appendTail() are + * designed to be chained, one after another, with the destination + * buffer pointer and buffer capacity updated after each in preparation + * to for the next. If the destination buffer is exhausted partway through such a + * sequence, a U_BUFFER_OVERFLOW_ERROR status will be returned. Normal + * ICU conventions are for a function to perform no action if it is + * called with an error status, but for this one case, uregex_appendRepacement() + * will operate normally so that buffer size computations will complete + * correctly. + * + * <p>For simple, prepackaged, non-incremental find-and-replace + * operations, see replaceFirst() or replaceAll().</p> + * + * @param regexp The regular expression object. + * @param replacementText The string that will replace the matched portion of the + * input string as it is copied to the destination buffer. + * The replacement text may contain references ($1, for + * example) to capture groups from the match. + * @param replacementLength The length of the replacement text string, + * or -1 if the string is NUL terminated. + * @param destBuf The buffer into which the results of the + * find-and-replace are placed. On return, this pointer + * will be updated to refer to the beginning of the + * unused portion of buffer, leaving it in position for + * a subsequent call to this function. + * @param destCapacity The size of the output buffer, On return, this + * parameter will be updated to reflect the space remaining + * unused in the output buffer. + * @param status A reference to a UErrorCode to receive any errors. + * @return The length of the result string. In the event that + * destCapacity is inadequate, the full length of the + * untruncated output string is returned. + * + * @stable ICU 3.0 + * + */ +U_STABLE int32_t U_EXPORT2 +uregex_appendReplacement(URegularExpression *regexp, + const UChar *replacementText, + int32_t replacementLength, + UChar **destBuf, + int32_t *destCapacity, + UErrorCode *status); + +/** + * Implements a replace operation intended to be used as part of an + * incremental find-and-replace. + * + * <p>The input string, starting from the end of the previous match and ending at + * the start of the current match, is appended to the destination string. Then the + * replacement string is appended to the output string, + * including handling any substitutions of captured text.</p> + * + * <p>For simple, prepackaged, non-incremental find-and-replace + * operations, see replaceFirst() or replaceAll().</p> + * + * @param regexp The regular expression object. + * @param replacementText The string that will replace the matched portion of the + * input string as it is copied to the destination buffer. + * The replacement text may contain references ($1, for + * example) to capture groups from the match. + * @param dest A mutable UText that will receive the result. Must not be NULL. + * @param status A reference to a UErrorCode to receive any errors. + * + * @stable ICU 4.6 + */ +U_STABLE void U_EXPORT2 +uregex_appendReplacementUText(URegularExpression *regexp, + UText *replacementText, + UText *dest, + UErrorCode *status); + +/** + * As the final step in a find-and-replace operation, append the remainder + * of the input string, starting at the position following the last match, + * to the destination string. <code>uregex_appendTail()</code> is intended + * to be invoked after one or more invocations of the + * <code>uregex_appendReplacement()</code> function. + * + * @param regexp The regular expression object. This is needed to + * obtain the input string and with the position + * of the last match within it. + * @param destBuf The buffer in which the results of the + * find-and-replace are placed. On return, the pointer + * will be updated to refer to the beginning of the + * unused portion of buffer. + * @param destCapacity The size of the output buffer, On return, this + * value will be updated to reflect the space remaining + * unused in the output buffer. + * @param status A reference to a UErrorCode to receive any errors. + * @return The length of the result string. In the event that + * destCapacity is inadequate, the full length of the + * untruncated output string is returned. + * + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +uregex_appendTail(URegularExpression *regexp, + UChar **destBuf, + int32_t *destCapacity, + UErrorCode *status); + +/** + * As the final step in a find-and-replace operation, append the remainder + * of the input string, starting at the position following the last match, + * to the destination string. <code>uregex_appendTailUText()</code> is intended + * to be invoked after one or more invocations of the + * <code>uregex_appendReplacementUText()</code> function. + * + * @param regexp The regular expression object. This is needed to + * obtain the input string and with the position + * of the last match within it. + * @param dest A mutable UText that will receive the result. Must not be NULL. + * + * @param status Error code + * + * @return The destination UText. + * + * @stable ICU 4.6 + */ +U_STABLE UText * U_EXPORT2 +uregex_appendTailUText(URegularExpression *regexp, + UText *dest, + UErrorCode *status); + + /** + * Split a string into fields. Somewhat like split() from Perl. + * The pattern matches identify delimiters that separate the input + * into fields. The input data between the matches becomes the + * fields themselves. + * + * Each of the fields is copied from the input string to the destination + * buffer, and NUL terminated. The position of each field within + * the destination buffer is returned in the destFields array. + * + * If the delimiter pattern includes capture groups, the captured text will + * also appear in the destination array of output strings, interspersed + * with the fields. This is similar to Perl, but differs from Java, + * which ignores the presence of capture groups in the pattern. + * + * Trailing empty fields will always be returned, assuming sufficient + * destination capacity. This differs from the default behavior for Java + * and Perl where trailing empty fields are not returned. + * + * The number of strings produced by the split operation is returned. + * This count includes the strings from capture groups in the delimiter pattern. + * This behavior differs from Java, which ignores capture groups. + * + * @param regexp The compiled regular expression. + * @param destBuf A (UChar *) buffer to receive the fields that + * are extracted from the input string. These + * field pointers will refer to positions within the + * destination buffer supplied by the caller. Any + * extra positions within the destFields array will be + * set to NULL. + * @param destCapacity The capacity of the destBuf. + * @param requiredCapacity The actual capacity required of the destBuf. + * If destCapacity is too small, requiredCapacity will return + * the total capacity required to hold all of the output, and + * a U_BUFFER_OVERFLOW_ERROR will be returned. + * @param destFields An array to be filled with the position of each + * of the extracted fields within destBuf. + * @param destFieldsCapacity The number of elements in the destFields array. + * If the number of fields found is less than destFieldsCapacity, + * the extra destFields elements are set to zero. + * If destFieldsCapacity is too small, the trailing part of the + * input, including any field delimiters, is treated as if it + * were the last field - it is copied to the destBuf, and + * its position is in the destBuf is stored in the last element + * of destFields. This behavior mimics that of Perl. It is not + * an error condition, and no error status is returned when all destField + * positions are used. + * @param status A reference to a UErrorCode to receive any errors. + * @return The number of fields into which the input string was split. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +uregex_split( URegularExpression *regexp, + UChar *destBuf, + int32_t destCapacity, + int32_t *requiredCapacity, + UChar *destFields[], + int32_t destFieldsCapacity, + UErrorCode *status); + + /** + * Split a string into fields. Somewhat like split() from Perl. + * The pattern matches identify delimiters that separate the input + * into fields. The input data between the matches becomes the + * fields themselves. + * <p> + * The behavior of this function is not very closely aligned with uregex_split(); + * instead, it is based on (and implemented directly on top of) the C++ split method. + * + * @param regexp The compiled regular expression. + * @param destFields An array of mutable UText structs to receive the results of the split. + * If a field is NULL, a new UText is allocated to contain the results for + * that field. This new UText is not guaranteed to be mutable. + * @param destFieldsCapacity The number of elements in the destination array. + * If the number of fields found is less than destCapacity, the + * extra strings in the destination array are not altered. + * If the number of destination strings is less than the number + * of fields, the trailing part of the input string, including any + * field delimiters, is placed in the last destination string. + * This behavior mimics that of Perl. It is not an error condition, and no + * error status is returned when all destField positions are used. + * @param status A reference to a UErrorCode to receive any errors. + * @return The number of fields into which the input string was split. + * + * @stable ICU 4.6 + */ +U_STABLE int32_t U_EXPORT2 +uregex_splitUText(URegularExpression *regexp, + UText *destFields[], + int32_t destFieldsCapacity, + UErrorCode *status); + +/** + * Set a processing time limit for match operations with this URegularExpression. + * + * Some patterns, when matching certain strings, can run in exponential time. + * For practical purposes, the match operation may appear to be in an + * infinite loop. + * When a limit is set a match operation will fail with an error if the + * limit is exceeded. + * <p> + * The units of the limit are steps of the match engine. + * Correspondence with actual processor time will depend on the speed + * of the processor and the details of the specific pattern, but will + * typically be on the order of milliseconds. + * <p> + * By default, the matching time is not limited. + * <p> + * + * @param regexp The compiled regular expression. + * @param limit The limit value, or 0 for no limit. + * @param status A reference to a UErrorCode to receive any errors. + * @stable ICU 4.0 + */ +U_STABLE void U_EXPORT2 +uregex_setTimeLimit(URegularExpression *regexp, + int32_t limit, + UErrorCode *status); + +/** + * Get the time limit for for matches with this URegularExpression. + * A return value of zero indicates that there is no limit. + * + * @param regexp The compiled regular expression. + * @param status A reference to a UErrorCode to receive any errors. + * @return the maximum allowed time for a match, in units of processing steps. + * @stable ICU 4.0 + */ +U_STABLE int32_t U_EXPORT2 +uregex_getTimeLimit(const URegularExpression *regexp, + UErrorCode *status); + +/** + * Set the amount of heap storage available for use by the match backtracking stack. + * <p> + * ICU uses a backtracking regular expression engine, with the backtrack stack + * maintained on the heap. This function sets the limit to the amount of memory + * that can be used for this purpose. A backtracking stack overflow will + * result in an error from the match operation that caused it. + * <p> + * A limit is desirable because a malicious or poorly designed pattern can use + * excessive memory, potentially crashing the process. A limit is enabled + * by default. + * <p> + * @param regexp The compiled regular expression. + * @param limit The maximum size, in bytes, of the matching backtrack stack. + * A value of zero means no limit. + * The limit must be greater than or equal to zero. + * @param status A reference to a UErrorCode to receive any errors. + * + * @stable ICU 4.0 + */ +U_STABLE void U_EXPORT2 +uregex_setStackLimit(URegularExpression *regexp, + int32_t limit, + UErrorCode *status); + +/** + * Get the size of the heap storage available for use by the back tracking stack. + * + * @return the maximum backtracking stack size, in bytes, or zero if the + * stack size is unlimited. + * @stable ICU 4.0 + */ +U_STABLE int32_t U_EXPORT2 +uregex_getStackLimit(const URegularExpression *regexp, + UErrorCode *status); + + +/** + * Function pointer for a regular expression matching callback function. + * When set, a callback function will be called periodically during matching + * operations. If the call back function returns FALSE, the matching + * operation will be terminated early. + * + * Note: the callback function must not call other functions on this + * URegularExpression. + * + * @param context context pointer. The callback function will be invoked + * with the context specified at the time that + * uregex_setMatchCallback() is called. + * @param steps the accumulated processing time, in match steps, + * for this matching operation. + * @return TRUE to continue the matching operation. + * FALSE to terminate the matching operation. + * @stable ICU 4.0 + */ +U_CDECL_BEGIN +typedef UBool U_CALLCONV URegexMatchCallback ( + const void *context, + int32_t steps); +U_CDECL_END + +/** + * Set a callback function for this URegularExpression. + * During matching operations the function will be called periodically, + * giving the application the opportunity to terminate a long-running + * match. + * + * @param regexp The compiled regular expression. + * @param callback A pointer to the user-supplied callback function. + * @param context User context pointer. The value supplied at the + * time the callback function is set will be saved + * and passed to the callback each time that it is called. + * @param status A reference to a UErrorCode to receive any errors. + * @stable ICU 4.0 + */ +U_STABLE void U_EXPORT2 +uregex_setMatchCallback(URegularExpression *regexp, + URegexMatchCallback *callback, + const void *context, + UErrorCode *status); + + +/** + * Get the callback function for this URegularExpression. + * + * @param regexp The compiled regular expression. + * @param callback Out parameter, receives a pointer to the user-supplied + * callback function. + * @param context Out parameter, receives the user context pointer that + * was set when uregex_setMatchCallback() was called. + * @param status A reference to a UErrorCode to receive any errors. + * @stable ICU 4.0 + */ +U_STABLE void U_EXPORT2 +uregex_getMatchCallback(const URegularExpression *regexp, + URegexMatchCallback **callback, + const void **context, + UErrorCode *status); + +/** + * Function pointer for a regular expression find callback function. + * + * When set, a callback function will be called during a find operation + * and for operations that depend on find, such as findNext, split and some replace + * operations like replaceFirst. + * The callback will usually be called after each attempt at a match, but this is not a + * guarantee that the callback will be invoked at each character. For finds where the + * match engine is invoked at each character, this may be close to true, but less likely + * for more optimized loops where the pattern is known to only start, and the match + * engine invoked, at certain characters. + * When invoked, this callback will specify the index at which a match operation is about + * to be attempted, giving the application the opportunity to terminate a long-running + * find operation. + * + * If the call back function returns FALSE, the find operation will be terminated early. + * + * Note: the callback function must not call other functions on this + * URegularExpression + * + * @param context context pointer. The callback function will be invoked + * with the context specified at the time that + * uregex_setFindProgressCallback() is called. + * @param matchIndex the next index at which a match attempt will be attempted for this + * find operation. If this callback interrupts the search, this is the + * index at which a find/findNext operation may be re-initiated. + * @return TRUE to continue the matching operation. + * FALSE to terminate the matching operation. + * @stable ICU 4.6 + */ +U_CDECL_BEGIN +typedef UBool U_CALLCONV URegexFindProgressCallback ( + const void *context, + int64_t matchIndex); +U_CDECL_END + + +/** + * Set the find progress callback function for this URegularExpression. + * + * @param regexp The compiled regular expression. + * @param callback A pointer to the user-supplied callback function. + * @param context User context pointer. The value supplied at the + * time the callback function is set will be saved + * and passed to the callback each time that it is called. + * @param status A reference to a UErrorCode to receive any errors. + * @stable ICU 4.6 + */ +U_STABLE void U_EXPORT2 +uregex_setFindProgressCallback(URegularExpression *regexp, + URegexFindProgressCallback *callback, + const void *context, + UErrorCode *status); + +/** + * Get the find progress callback function for this URegularExpression. + * + * @param regexp The compiled regular expression. + * @param callback Out parameter, receives a pointer to the user-supplied + * callback function. + * @param context Out parameter, receives the user context pointer that + * was set when uregex_setFindProgressCallback() was called. + * @param status A reference to a UErrorCode to receive any errors. + * @stable ICU 4.6 + */ +U_STABLE void U_EXPORT2 +uregex_getFindProgressCallback(const URegularExpression *regexp, + URegexFindProgressCallback **callback, + const void **context, + UErrorCode *status); + +#endif /* !UCONFIG_NO_REGULAR_EXPRESSIONS */ +#endif /* UREGEX_H */ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uregion.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uregion.h new file mode 100755 index 00000000..a5de4967 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uregion.h @@ -0,0 +1,252 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +***************************************************************************************** +* Copyright (C) 2014, International Business Machines +* Corporation and others. All Rights Reserved. +***************************************************************************************** +*/ + +#ifndef UREGION_H +#define UREGION_H + +#include "unicode/utypes.h" +#include "unicode/uenum.h" + +/** + * \file + * \brief C API: URegion (territory containment and mapping) + * + * URegion objects represent data associated with a particular Unicode Region Code, also known as a + * Unicode Region Subtag, which is defined based upon the BCP 47 standard. These include: + * * Two-letter codes defined by ISO 3166-1, with special LDML treatment of certain private-use or + * reserved codes; + * * A subset of 3-digit numeric codes defined by UN M.49. + * URegion objects can also provide mappings to and from additional codes. There are different types + * of regions that are important to distinguish: + * <p> + * Macroregion - A code for a "macro geographical (continental) region, geographical sub-region, or + * selected economic and other grouping" as defined in UN M.49. These are typically 3-digit codes, + * but contain some 2-letter codes for LDML extensions, such as "QO" for Outlying Oceania. + * Macroregions are represented in ICU by one of three region types: WORLD (code 001), + * CONTINENTS (regions contained directly by WORLD), and SUBCONTINENTS (regions contained directly + * by a continent ). + * <p> + * TERRITORY - A Region that is not a Macroregion. These are typically codes for countries, but also + * include areas that are not separate countries, such as the code "AQ" for Antarctica or the code + * "HK" for Hong Kong (SAR China). Overseas dependencies of countries may or may not have separate + * codes. The codes are typically 2-letter codes aligned with ISO 3166, but BCP47 allows for the use + * of 3-digit codes in the future. + * <p> + * UNKNOWN - The code ZZ is defined by Unicode LDML for use in indicating that region is unknown, + * or that the value supplied as a region was invalid. + * <p> + * DEPRECATED - Region codes that have been defined in the past but are no longer in modern usage, + * usually due to a country splitting into multiple territories or changing its name. + * <p> + * GROUPING - A widely understood grouping of territories that has a well defined membership such + * that a region code has been assigned for it. Some of these are UN M.49 codes that don't fall into + * the world/continent/sub-continent hierarchy, while others are just well-known groupings that have + * their own region code. Region "EU" (European Union) is one such region code that is a grouping. + * Groupings will never be returned by the uregion_getContainingRegion, since a different type of region + * (WORLD, CONTINENT, or SUBCONTINENT) will always be the containing region instead. + * + * URegion objects are const/immutable, owned and maintained by ICU itself, so there are not functions + * to open or close them. + */ + +/** + * URegionType is an enumeration defining the different types of regions. Current possible + * values are URGN_WORLD, URGN_CONTINENT, URGN_SUBCONTINENT, URGN_TERRITORY, URGN_GROUPING, + * URGN_DEPRECATED, and URGN_UNKNOWN. + * + * @stable ICU 51 + */ +typedef enum URegionType { + /** + * Type representing the unknown region. + * @stable ICU 51 + */ + URGN_UNKNOWN, + + /** + * Type representing a territory. + * @stable ICU 51 + */ + URGN_TERRITORY, + + /** + * Type representing the whole world. + * @stable ICU 51 + */ + URGN_WORLD, + + /** + * Type representing a continent. + * @stable ICU 51 + */ + URGN_CONTINENT, + + /** + * Type representing a sub-continent. + * @stable ICU 51 + */ + URGN_SUBCONTINENT, + + /** + * Type representing a grouping of territories that is not to be used in + * the normal WORLD/CONTINENT/SUBCONTINENT/TERRITORY containment tree. + * @stable ICU 51 + */ + URGN_GROUPING, + + /** + * Type representing a region whose code has been deprecated, usually + * due to a country splitting into multiple territories or changing its name. + * @stable ICU 51 + */ + URGN_DEPRECATED, + +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal URegionType value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + URGN_LIMIT +#endif /* U_HIDE_DEPRECATED_API */ +} URegionType; + +#if !UCONFIG_NO_FORMATTING + +/** + * Opaque URegion object for use in C programs. + * @stable ICU 52 + */ +struct URegion; +typedef struct URegion URegion; /**< @stable ICU 52 */ + +/** + * Returns a pointer to a URegion for the specified region code: A 2-letter or 3-letter ISO 3166 + * code, UN M.49 numeric code (superset of ISO 3166 numeric codes), or other valid Unicode Region + * Code as defined by the LDML specification. The code will be canonicalized internally. If the + * region code is NULL or not recognized, the appropriate error code will be set + * (U_ILLEGAL_ARGUMENT_ERROR). + * @stable ICU 52 + */ +U_STABLE const URegion* U_EXPORT2 +uregion_getRegionFromCode(const char *regionCode, UErrorCode *status); + +/** + * Returns a pointer to a URegion for the specified numeric region code. If the numeric region + * code is not recognized, the appropriate error code will be set (U_ILLEGAL_ARGUMENT_ERROR). + * @stable ICU 52 + */ +U_STABLE const URegion* U_EXPORT2 +uregion_getRegionFromNumericCode (int32_t code, UErrorCode *status); + +/** + * Returns an enumeration over the canonical codes of all known regions that match the given type. + * The enumeration must be closed with with uenum_close(). + * @stable ICU 52 + */ +U_STABLE UEnumeration* U_EXPORT2 +uregion_getAvailable(URegionType type, UErrorCode *status); + +/** + * Returns true if the specified uregion is equal to the specified otherRegion. + * @stable ICU 52 + */ +U_STABLE UBool U_EXPORT2 +uregion_areEqual(const URegion* uregion, const URegion* otherRegion); + +/** + * Returns a pointer to the URegion that contains the specified uregion. Returns NULL if the + * specified uregion is code "001" (World) or "ZZ" (Unknown region). For example, calling + * this method with region "IT" (Italy) returns the URegion for "039" (Southern Europe). + * @stable ICU 52 + */ +U_STABLE const URegion* U_EXPORT2 +uregion_getContainingRegion(const URegion* uregion); + +/** + * Return a pointer to the URegion that geographically contains this uregion and matches the + * specified type, moving multiple steps up the containment chain if necessary. Returns NULL if no + * containing region can be found that matches the specified type. Will return NULL if URegionType + * is URGN_GROUPING, URGN_DEPRECATED, or URGN_UNKNOWN which are not appropriate for this API. + * For example, calling this method with uregion "IT" (Italy) for type URGN_CONTINENT returns the + * URegion "150" (Europe). + * @stable ICU 52 + */ +U_STABLE const URegion* U_EXPORT2 +uregion_getContainingRegionOfType(const URegion* uregion, URegionType type); + +/** + * Return an enumeration over the canonical codes of all the regions that are immediate children + * of the specified uregion in the region hierarchy. These returned regions could be either macro + * regions, territories, or a mixture of the two, depending on the containment data as defined in + * CLDR. This API returns NULL if this uregion doesn't have any sub-regions. For example, calling + * this function for uregion "150" (Europe) returns an enumeration containing the various + * sub-regions of Europe: "039" (Southern Europe), "151" (Eastern Europe), "154" (Northern Europe), + * and "155" (Western Europe). The enumeration must be closed with with uenum_close(). + * @stable ICU 52 + */ +U_STABLE UEnumeration* U_EXPORT2 +uregion_getContainedRegions(const URegion* uregion, UErrorCode *status); + +/** + * Returns an enumeration over the canonical codes of all the regions that are children of the + * specified uregion anywhere in the region hierarchy and match the given type. This API may return + * an empty enumeration if this uregion doesn't have any sub-regions that match the given type. + * For example, calling this method with region "150" (Europe) and type URGN_TERRITORY" returns an + * enumeration containing all the territories in Europe: "FR" (France), "IT" (Italy), "DE" (Germany), + * etc. The enumeration must be closed with with uenum_close(). + * @stable ICU 52 + */ +U_STABLE UEnumeration* U_EXPORT2 +uregion_getContainedRegionsOfType(const URegion* uregion, URegionType type, UErrorCode *status); + +/** + * Returns true if the specified uregion contains the specified otherRegion anywhere in the region + * hierarchy. + * @stable ICU 52 + */ +U_STABLE UBool U_EXPORT2 +uregion_contains(const URegion* uregion, const URegion* otherRegion); + +/** + * If the specified uregion is deprecated, returns an enumeration over the canonical codes of the + * regions that are the preferred replacement regions for the specified uregion. If the specified + * uregion is not deprecated, returns NULL. For example, calling this method with uregion + * "SU" (Soviet Union) returns a list of the regions containing "RU" (Russia), "AM" (Armenia), + * "AZ" (Azerbaijan), etc... The enumeration must be closed with with uenum_close(). + * @stable ICU 52 + */ +U_STABLE UEnumeration* U_EXPORT2 +uregion_getPreferredValues(const URegion* uregion, UErrorCode *status); + +/** + * Returns the specified uregion's canonical code. + * @stable ICU 52 + */ +U_STABLE const char* U_EXPORT2 +uregion_getRegionCode(const URegion* uregion); + +/** + * Returns the specified uregion's numeric code, or a negative value if there is no numeric code + * for the specified uregion. + * @stable ICU 52 + */ +U_STABLE int32_t U_EXPORT2 +uregion_getNumericCode(const URegion* uregion); + +/** + * Returns the URegionType of the specified uregion. + * @stable ICU 52 + */ +U_STABLE URegionType U_EXPORT2 +uregion_getType(const URegion* uregion); + + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ureldatefmt.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ureldatefmt.h new file mode 100755 index 00000000..0fde188d --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ureldatefmt.h @@ -0,0 +1,365 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +***************************************************************************************** +* Copyright (C) 2016, International Business Machines +* Corporation and others. All Rights Reserved. +***************************************************************************************** +*/ + +#ifndef URELDATEFMT_H +#define URELDATEFMT_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION + +#include "unicode/unum.h" +#include "unicode/udisplaycontext.h" +#include "unicode/localpointer.h" + +/** + * \file + * \brief C API: URelativeDateTimeFormatter, relative date formatting of unit + numeric offset. + * + * Provides simple formatting of relative dates, in two ways + * <ul> + * <li>relative dates with a quantity e.g "in 5 days"</li> + * <li>relative dates without a quantity e.g "next Tuesday"</li> + * </ul> + * <p> + * This does not provide compound formatting for multiple units, + * other than the ability to combine a time string with a relative date, + * as in "next Tuesday at 3:45 PM". It also does not provide support + * for determining which unit to use, such as deciding between "in 7 days" + * and "in 1 week". + * + * @stable ICU 57 + */ + +/** + * The formatting style + * @stable ICU 54 + */ +typedef enum UDateRelativeDateTimeFormatterStyle { + /** + * Everything spelled out. + * @stable ICU 54 + */ + UDAT_STYLE_LONG, + + /** + * Abbreviations used when possible. + * @stable ICU 54 + */ + UDAT_STYLE_SHORT, + + /** + * Use the shortest possible form. + * @stable ICU 54 + */ + UDAT_STYLE_NARROW, + +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UDateRelativeDateTimeFormatterStyle value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UDAT_STYLE_COUNT +#endif /* U_HIDE_DEPRECATED_API */ +} UDateRelativeDateTimeFormatterStyle; + +/** + * Represents the unit for formatting a relative date. e.g "in 5 days" + * or "next year" + * @stable ICU 57 + */ +typedef enum URelativeDateTimeUnit { + /** + * Specifies that relative unit is year, e.g. "last year", + * "in 5 years". + * @stable ICU 57 + */ + UDAT_REL_UNIT_YEAR, + /** + * Specifies that relative unit is quarter, e.g. "last quarter", + * "in 5 quarters". + * @stable ICU 57 + */ + UDAT_REL_UNIT_QUARTER, + /** + * Specifies that relative unit is month, e.g. "last month", + * "in 5 months". + * @stable ICU 57 + */ + UDAT_REL_UNIT_MONTH, + /** + * Specifies that relative unit is week, e.g. "last week", + * "in 5 weeks". + * @stable ICU 57 + */ + UDAT_REL_UNIT_WEEK, + /** + * Specifies that relative unit is day, e.g. "yesterday", + * "in 5 days". + * @stable ICU 57 + */ + UDAT_REL_UNIT_DAY, + /** + * Specifies that relative unit is hour, e.g. "1 hour ago", + * "in 5 hours". + * @stable ICU 57 + */ + UDAT_REL_UNIT_HOUR, + /** + * Specifies that relative unit is minute, e.g. "1 minute ago", + * "in 5 minutes". + * @stable ICU 57 + */ + UDAT_REL_UNIT_MINUTE, + /** + * Specifies that relative unit is second, e.g. "1 second ago", + * "in 5 seconds". + * @stable ICU 57 + */ + UDAT_REL_UNIT_SECOND, + /** + * Specifies that relative unit is Sunday, e.g. "last Sunday", + * "this Sunday", "next Sunday", "in 5 Sundays". + * @stable ICU 57 + */ + UDAT_REL_UNIT_SUNDAY, + /** + * Specifies that relative unit is Monday, e.g. "last Monday", + * "this Monday", "next Monday", "in 5 Mondays". + * @stable ICU 57 + */ + UDAT_REL_UNIT_MONDAY, + /** + * Specifies that relative unit is Tuesday, e.g. "last Tuesday", + * "this Tuesday", "next Tuesday", "in 5 Tuesdays". + * @stable ICU 57 + */ + UDAT_REL_UNIT_TUESDAY, + /** + * Specifies that relative unit is Wednesday, e.g. "last Wednesday", + * "this Wednesday", "next Wednesday", "in 5 Wednesdays". + * @stable ICU 57 + */ + UDAT_REL_UNIT_WEDNESDAY, + /** + * Specifies that relative unit is Thursday, e.g. "last Thursday", + * "this Thursday", "next Thursday", "in 5 Thursdays". + * @stable ICU 57 + */ + UDAT_REL_UNIT_THURSDAY, + /** + * Specifies that relative unit is Friday, e.g. "last Friday", + * "this Friday", "next Friday", "in 5 Fridays". + * @stable ICU 57 + */ + UDAT_REL_UNIT_FRIDAY, + /** + * Specifies that relative unit is Saturday, e.g. "last Saturday", + * "this Saturday", "next Saturday", "in 5 Saturdays". + * @stable ICU 57 + */ + UDAT_REL_UNIT_SATURDAY, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal URelativeDateTimeUnit value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UDAT_REL_UNIT_COUNT +#endif /* U_HIDE_DEPRECATED_API */ +} URelativeDateTimeUnit; + +/** + * Opaque URelativeDateTimeFormatter object for use in C programs. + * @stable ICU 57 + */ +struct URelativeDateTimeFormatter; +typedef struct URelativeDateTimeFormatter URelativeDateTimeFormatter; /**< C typedef for struct URelativeDateTimeFormatter. @stable ICU 57 */ + + +/** + * Open a new URelativeDateTimeFormatter object for a given locale using the + * specified width and capitalizationContext, along with a number formatter + * (if desired) to override the default formatter that would be used for + * display of numeric field offsets. The default formatter typically rounds + * toward 0 and has a minimum of 0 fraction digits and a maximum of 3 + * fraction digits (i.e. it will show as many decimal places as necessary + * up to 3, without showing trailing 0s). + * + * @param locale + * The locale + * @param nfToAdopt + * A number formatter to set for this URelativeDateTimeFormatter + * object (instead of the default decimal formatter). Ownership of + * this UNumberFormat object will pass to the URelativeDateTimeFormatter + * object (the URelativeDateTimeFormatter adopts the UNumberFormat), + * which becomes responsible for closing it. If the caller wishes to + * retain ownership of the UNumberFormat object, the caller must clone + * it (with unum_clone) and pass the clone to ureldatefmt_open. May be + * NULL to use the default decimal formatter. + * @param width + * The width - wide, short, narrow, etc. + * @param capitalizationContext + * A value from UDisplayContext that pertains to capitalization, e.g. + * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE. + * @param status + * A pointer to a UErrorCode to receive any errors. + * @return + * A pointer to a URelativeDateTimeFormatter object for the specified locale, + * or NULL if an error occurred. + * @stable ICU 57 + */ +U_STABLE URelativeDateTimeFormatter* U_EXPORT2 +ureldatefmt_open( const char* locale, + UNumberFormat* nfToAdopt, + UDateRelativeDateTimeFormatterStyle width, + UDisplayContext capitalizationContext, + UErrorCode* status ); + +/** + * Close a URelativeDateTimeFormatter object. Once closed it may no longer be used. + * @param reldatefmt + * The URelativeDateTimeFormatter object to close. + * @stable ICU 57 + */ +U_STABLE void U_EXPORT2 +ureldatefmt_close(URelativeDateTimeFormatter *reldatefmt); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalURelativeDateTimeFormatterPointer + * "Smart pointer" class, closes a URelativeDateTimeFormatter via ureldatefmt_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 57 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalURelativeDateTimeFormatterPointer, URelativeDateTimeFormatter, ureldatefmt_close); + +U_NAMESPACE_END + +#endif + +/** + * Format a combination of URelativeDateTimeUnit and numeric + * offset using a numeric style, e.g. "1 week ago", "in 1 week", + * "5 weeks ago", "in 5 weeks". + * + * @param reldatefmt + * The URelativeDateTimeFormatter object specifying the + * format conventions. + * @param offset + * The signed offset for the specified unit. This will + * be formatted according to this object's UNumberFormat + * object. + * @param unit + * The unit to use when formatting the relative + * date, e.g. UDAT_REL_UNIT_WEEK, UDAT_REL_UNIT_FRIDAY. + * @param result + * A pointer to a buffer to receive the formatted result. + * @param resultCapacity + * The maximum size of result. + * @param status + * A pointer to a UErrorCode to receive any errors. In + * case of error status, the contents of result are + * undefined. + * @return + * The length of the formatted result; may be greater + * than resultCapacity, in which case an error is returned. + * @stable ICU 57 + */ +U_STABLE int32_t U_EXPORT2 +ureldatefmt_formatNumeric( const URelativeDateTimeFormatter* reldatefmt, + double offset, + URelativeDateTimeUnit unit, + UChar* result, + int32_t resultCapacity, + UErrorCode* status); + +/** + * Format a combination of URelativeDateTimeUnit and numeric offset + * using a text style if possible, e.g. "last week", "this week", + * "next week", "yesterday", "tomorrow". Falls back to numeric + * style if no appropriate text term is available for the specified + * offset in the object's locale. + * + * @param reldatefmt + * The URelativeDateTimeFormatter object specifying the + * format conventions. + * @param offset + * The signed offset for the specified unit. + * @param unit + * The unit to use when formatting the relative + * date, e.g. UDAT_REL_UNIT_WEEK, UDAT_REL_UNIT_FRIDAY. + * @param result + * A pointer to a buffer to receive the formatted result. + * @param resultCapacity + * The maximum size of result. + * @param status + * A pointer to a UErrorCode to receive any errors. In + * case of error status, the contents of result are + * undefined. + * @return + * The length of the formatted result; may be greater + * than resultCapacity, in which case an error is returned. + * @stable ICU 57 + */ +U_STABLE int32_t U_EXPORT2 +ureldatefmt_format( const URelativeDateTimeFormatter* reldatefmt, + double offset, + URelativeDateTimeUnit unit, + UChar* result, + int32_t resultCapacity, + UErrorCode* status); + +/** + * Combines a relative date string and a time string in this object's + * locale. This is done with the same date-time separator used for the + * default calendar in this locale to produce a result such as + * "yesterday at 3:45 PM". + * + * @param reldatefmt + * The URelativeDateTimeFormatter object specifying the format conventions. + * @param relativeDateString + * The relative date string. + * @param relativeDateStringLen + * The length of relativeDateString; may be -1 if relativeDateString + * is zero-terminated. + * @param timeString + * The time string. + * @param timeStringLen + * The length of timeString; may be -1 if timeString is zero-terminated. + * @param result + * A pointer to a buffer to receive the formatted result. + * @param resultCapacity + * The maximum size of result. + * @param status + * A pointer to a UErrorCode to receive any errors. In case of error status, + * the contents of result are undefined. + * @return + * The length of the formatted result; may be greater than resultCapacity, + * in which case an error is returned. + * @stable ICU 57 + */ +U_STABLE int32_t U_EXPORT2 +ureldatefmt_combineDateAndTime( const URelativeDateTimeFormatter* reldatefmt, + const UChar * relativeDateString, + int32_t relativeDateStringLen, + const UChar * timeString, + int32_t timeStringLen, + UChar* result, + int32_t resultCapacity, + UErrorCode* status ); + +#endif /* !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/urename.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/urename.h new file mode 100755 index 00000000..d8ab8509 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/urename.h @@ -0,0 +1,1819 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2002-2016, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************* +* +* file name: urename.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* Created by: Perl script tools/genren.pl written by Vladimir Weinstein +* +* Contains data for renaming ICU exports. +* Gets included by umachine.h +* +* THIS FILE IS MACHINE-GENERATED, DON'T PLAY WITH IT IF YOU DON'T KNOW WHAT +* YOU ARE DOING, OTHERWISE VERY BAD THINGS WILL HAPPEN! +*/ + +#ifndef URENAME_H +#define URENAME_H + +/* U_DISABLE_RENAMING can be defined in the following ways: + * - when running configure, e.g. + * runConfigureICU Linux --disable-renaming + * - by changing the default setting of U_DISABLE_RENAMING in uconfig.h + */ + +#include "unicode/uconfig.h" + +#if !U_DISABLE_RENAMING + +/* We need the U_ICU_ENTRY_POINT_RENAME definition. There's a default one in unicode/uvernum.h we can use, but we will give + the platform a chance to define it first. + Normally (if utypes.h or umachine.h was included first) this will not be necessary as it will already be defined. + */ + +#ifndef U_ICU_ENTRY_POINT_RENAME +#include "unicode/umachine.h" +#endif + +/* If we still don't have U_ICU_ENTRY_POINT_RENAME use the default. */ +#ifndef U_ICU_ENTRY_POINT_RENAME +#include "unicode/uvernum.h" +#endif + +/* Error out before the following defines cause very strange and unexpected code breakage */ +#ifndef U_ICU_ENTRY_POINT_RENAME +#error U_ICU_ENTRY_POINT_RENAME is not defined - cannot continue. Consider defining U_DISABLE_RENAMING if renaming should not be used. +#endif + + +/* C exports renaming data */ + +#define T_CString_int64ToString U_ICU_ENTRY_POINT_RENAME(T_CString_int64ToString) +#define T_CString_integerToString U_ICU_ENTRY_POINT_RENAME(T_CString_integerToString) +#define T_CString_stringToInteger U_ICU_ENTRY_POINT_RENAME(T_CString_stringToInteger) +#define T_CString_toLowerCase U_ICU_ENTRY_POINT_RENAME(T_CString_toLowerCase) +#define T_CString_toUpperCase U_ICU_ENTRY_POINT_RENAME(T_CString_toUpperCase) +#define UCNV_FROM_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALLBACK_ESCAPE) +#define UCNV_FROM_U_CALLBACK_SKIP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALLBACK_SKIP) +#define UCNV_FROM_U_CALLBACK_STOP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALLBACK_STOP) +#define UCNV_FROM_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALLBACK_SUBSTITUTE) +#define UCNV_TO_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK_ESCAPE) +#define UCNV_TO_U_CALLBACK_SKIP U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK_SKIP) +#define UCNV_TO_U_CALLBACK_STOP U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK_STOP) +#define UCNV_TO_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK_SUBSTITUTE) +#define UDataMemory_createNewInstance U_ICU_ENTRY_POINT_RENAME(UDataMemory_createNewInstance) +#define UDataMemory_init U_ICU_ENTRY_POINT_RENAME(UDataMemory_init) +#define UDataMemory_isLoaded U_ICU_ENTRY_POINT_RENAME(UDataMemory_isLoaded) +#define UDataMemory_normalizeDataPointer U_ICU_ENTRY_POINT_RENAME(UDataMemory_normalizeDataPointer) +#define UDataMemory_setData U_ICU_ENTRY_POINT_RENAME(UDataMemory_setData) +#define UDatamemory_assign U_ICU_ENTRY_POINT_RENAME(UDatamemory_assign) +#define _ASCIIData U_ICU_ENTRY_POINT_RENAME(_ASCIIData) +#define _Bocu1Data U_ICU_ENTRY_POINT_RENAME(_Bocu1Data) +#define _CESU8Data U_ICU_ENTRY_POINT_RENAME(_CESU8Data) +#define _CompoundTextData U_ICU_ENTRY_POINT_RENAME(_CompoundTextData) +#define _HZData U_ICU_ENTRY_POINT_RENAME(_HZData) +#define _IMAPData U_ICU_ENTRY_POINT_RENAME(_IMAPData) +#define _ISCIIData U_ICU_ENTRY_POINT_RENAME(_ISCIIData) +#define _ISO2022Data U_ICU_ENTRY_POINT_RENAME(_ISO2022Data) +#define _LMBCSData1 U_ICU_ENTRY_POINT_RENAME(_LMBCSData1) +#define _LMBCSData11 U_ICU_ENTRY_POINT_RENAME(_LMBCSData11) +#define _LMBCSData16 U_ICU_ENTRY_POINT_RENAME(_LMBCSData16) +#define _LMBCSData17 U_ICU_ENTRY_POINT_RENAME(_LMBCSData17) +#define _LMBCSData18 U_ICU_ENTRY_POINT_RENAME(_LMBCSData18) +#define _LMBCSData19 U_ICU_ENTRY_POINT_RENAME(_LMBCSData19) +#define _LMBCSData2 U_ICU_ENTRY_POINT_RENAME(_LMBCSData2) +#define _LMBCSData3 U_ICU_ENTRY_POINT_RENAME(_LMBCSData3) +#define _LMBCSData4 U_ICU_ENTRY_POINT_RENAME(_LMBCSData4) +#define _LMBCSData5 U_ICU_ENTRY_POINT_RENAME(_LMBCSData5) +#define _LMBCSData6 U_ICU_ENTRY_POINT_RENAME(_LMBCSData6) +#define _LMBCSData8 U_ICU_ENTRY_POINT_RENAME(_LMBCSData8) +#define _Latin1Data U_ICU_ENTRY_POINT_RENAME(_Latin1Data) +#define _MBCSData U_ICU_ENTRY_POINT_RENAME(_MBCSData) +#define _SCSUData U_ICU_ENTRY_POINT_RENAME(_SCSUData) +#define _UTF16BEData U_ICU_ENTRY_POINT_RENAME(_UTF16BEData) +#define _UTF16Data U_ICU_ENTRY_POINT_RENAME(_UTF16Data) +#define _UTF16LEData U_ICU_ENTRY_POINT_RENAME(_UTF16LEData) +#define _UTF16v2Data U_ICU_ENTRY_POINT_RENAME(_UTF16v2Data) +#define _UTF32BEData U_ICU_ENTRY_POINT_RENAME(_UTF32BEData) +#define _UTF32Data U_ICU_ENTRY_POINT_RENAME(_UTF32Data) +#define _UTF32LEData U_ICU_ENTRY_POINT_RENAME(_UTF32LEData) +#define _UTF7Data U_ICU_ENTRY_POINT_RENAME(_UTF7Data) +#define _UTF8Data U_ICU_ENTRY_POINT_RENAME(_UTF8Data) +#define allowedHourFormatsCleanup U_ICU_ENTRY_POINT_RENAME(allowedHourFormatsCleanup) +#define cmemory_cleanup U_ICU_ENTRY_POINT_RENAME(cmemory_cleanup) +#define dayPeriodRulesCleanup U_ICU_ENTRY_POINT_RENAME(dayPeriodRulesCleanup) +#define deleteAllowedHourFormats U_ICU_ENTRY_POINT_RENAME(deleteAllowedHourFormats) +#define gTimeZoneFilesInitOnce U_ICU_ENTRY_POINT_RENAME(gTimeZoneFilesInitOnce) +#define izrule_clone U_ICU_ENTRY_POINT_RENAME(izrule_clone) +#define izrule_close U_ICU_ENTRY_POINT_RENAME(izrule_close) +#define izrule_equals U_ICU_ENTRY_POINT_RENAME(izrule_equals) +#define izrule_getDSTSavings U_ICU_ENTRY_POINT_RENAME(izrule_getDSTSavings) +#define izrule_getDynamicClassID U_ICU_ENTRY_POINT_RENAME(izrule_getDynamicClassID) +#define izrule_getFinalStart U_ICU_ENTRY_POINT_RENAME(izrule_getFinalStart) +#define izrule_getFirstStart U_ICU_ENTRY_POINT_RENAME(izrule_getFirstStart) +#define izrule_getName U_ICU_ENTRY_POINT_RENAME(izrule_getName) +#define izrule_getNextStart U_ICU_ENTRY_POINT_RENAME(izrule_getNextStart) +#define izrule_getPreviousStart U_ICU_ENTRY_POINT_RENAME(izrule_getPreviousStart) +#define izrule_getRawOffset U_ICU_ENTRY_POINT_RENAME(izrule_getRawOffset) +#define izrule_getStaticClassID U_ICU_ENTRY_POINT_RENAME(izrule_getStaticClassID) +#define izrule_isEquivalentTo U_ICU_ENTRY_POINT_RENAME(izrule_isEquivalentTo) +#define izrule_open U_ICU_ENTRY_POINT_RENAME(izrule_open) +#define locale_getKeywords U_ICU_ENTRY_POINT_RENAME(locale_getKeywords) +#define locale_getKeywordsStart U_ICU_ENTRY_POINT_RENAME(locale_getKeywordsStart) +#define locale_get_default U_ICU_ENTRY_POINT_RENAME(locale_get_default) +#define locale_set_default U_ICU_ENTRY_POINT_RENAME(locale_set_default) +#define pl_addFontRun U_ICU_ENTRY_POINT_RENAME(pl_addFontRun) +#define pl_addLocaleRun U_ICU_ENTRY_POINT_RENAME(pl_addLocaleRun) +#define pl_addValueRun U_ICU_ENTRY_POINT_RENAME(pl_addValueRun) +#define pl_close U_ICU_ENTRY_POINT_RENAME(pl_close) +#define pl_closeFontRuns U_ICU_ENTRY_POINT_RENAME(pl_closeFontRuns) +#define pl_closeLine U_ICU_ENTRY_POINT_RENAME(pl_closeLine) +#define pl_closeLocaleRuns U_ICU_ENTRY_POINT_RENAME(pl_closeLocaleRuns) +#define pl_closeValueRuns U_ICU_ENTRY_POINT_RENAME(pl_closeValueRuns) +#define pl_countLineRuns U_ICU_ENTRY_POINT_RENAME(pl_countLineRuns) +#define pl_create U_ICU_ENTRY_POINT_RENAME(pl_create) +#define pl_getAscent U_ICU_ENTRY_POINT_RENAME(pl_getAscent) +#define pl_getDescent U_ICU_ENTRY_POINT_RENAME(pl_getDescent) +#define pl_getFontRunCount U_ICU_ENTRY_POINT_RENAME(pl_getFontRunCount) +#define pl_getFontRunFont U_ICU_ENTRY_POINT_RENAME(pl_getFontRunFont) +#define pl_getFontRunLastLimit U_ICU_ENTRY_POINT_RENAME(pl_getFontRunLastLimit) +#define pl_getFontRunLimit U_ICU_ENTRY_POINT_RENAME(pl_getFontRunLimit) +#define pl_getLeading U_ICU_ENTRY_POINT_RENAME(pl_getLeading) +#define pl_getLineAscent U_ICU_ENTRY_POINT_RENAME(pl_getLineAscent) +#define pl_getLineDescent U_ICU_ENTRY_POINT_RENAME(pl_getLineDescent) +#define pl_getLineLeading U_ICU_ENTRY_POINT_RENAME(pl_getLineLeading) +#define pl_getLineVisualRun U_ICU_ENTRY_POINT_RENAME(pl_getLineVisualRun) +#define pl_getLineWidth U_ICU_ENTRY_POINT_RENAME(pl_getLineWidth) +#define pl_getLocaleRunCount U_ICU_ENTRY_POINT_RENAME(pl_getLocaleRunCount) +#define pl_getLocaleRunLastLimit U_ICU_ENTRY_POINT_RENAME(pl_getLocaleRunLastLimit) +#define pl_getLocaleRunLimit U_ICU_ENTRY_POINT_RENAME(pl_getLocaleRunLimit) +#define pl_getLocaleRunLocale U_ICU_ENTRY_POINT_RENAME(pl_getLocaleRunLocale) +#define pl_getParagraphLevel U_ICU_ENTRY_POINT_RENAME(pl_getParagraphLevel) +#define pl_getTextDirection U_ICU_ENTRY_POINT_RENAME(pl_getTextDirection) +#define pl_getValueRunCount U_ICU_ENTRY_POINT_RENAME(pl_getValueRunCount) +#define pl_getValueRunLastLimit U_ICU_ENTRY_POINT_RENAME(pl_getValueRunLastLimit) +#define pl_getValueRunLimit U_ICU_ENTRY_POINT_RENAME(pl_getValueRunLimit) +#define pl_getValueRunValue U_ICU_ENTRY_POINT_RENAME(pl_getValueRunValue) +#define pl_getVisualRunAscent U_ICU_ENTRY_POINT_RENAME(pl_getVisualRunAscent) +#define pl_getVisualRunDescent U_ICU_ENTRY_POINT_RENAME(pl_getVisualRunDescent) +#define pl_getVisualRunDirection U_ICU_ENTRY_POINT_RENAME(pl_getVisualRunDirection) +#define pl_getVisualRunFont U_ICU_ENTRY_POINT_RENAME(pl_getVisualRunFont) +#define pl_getVisualRunGlyphCount U_ICU_ENTRY_POINT_RENAME(pl_getVisualRunGlyphCount) +#define pl_getVisualRunGlyphToCharMap U_ICU_ENTRY_POINT_RENAME(pl_getVisualRunGlyphToCharMap) +#define pl_getVisualRunGlyphs U_ICU_ENTRY_POINT_RENAME(pl_getVisualRunGlyphs) +#define pl_getVisualRunLeading U_ICU_ENTRY_POINT_RENAME(pl_getVisualRunLeading) +#define pl_getVisualRunPositions U_ICU_ENTRY_POINT_RENAME(pl_getVisualRunPositions) +#define pl_isComplex U_ICU_ENTRY_POINT_RENAME(pl_isComplex) +#define pl_nextLine U_ICU_ENTRY_POINT_RENAME(pl_nextLine) +#define pl_openEmptyFontRuns U_ICU_ENTRY_POINT_RENAME(pl_openEmptyFontRuns) +#define pl_openEmptyLocaleRuns U_ICU_ENTRY_POINT_RENAME(pl_openEmptyLocaleRuns) +#define pl_openEmptyValueRuns U_ICU_ENTRY_POINT_RENAME(pl_openEmptyValueRuns) +#define pl_openFontRuns U_ICU_ENTRY_POINT_RENAME(pl_openFontRuns) +#define pl_openLocaleRuns U_ICU_ENTRY_POINT_RENAME(pl_openLocaleRuns) +#define pl_openValueRuns U_ICU_ENTRY_POINT_RENAME(pl_openValueRuns) +#define pl_reflow U_ICU_ENTRY_POINT_RENAME(pl_reflow) +#define pl_resetFontRuns U_ICU_ENTRY_POINT_RENAME(pl_resetFontRuns) +#define pl_resetLocaleRuns U_ICU_ENTRY_POINT_RENAME(pl_resetLocaleRuns) +#define pl_resetValueRuns U_ICU_ENTRY_POINT_RENAME(pl_resetValueRuns) +#define res_countArrayItems U_ICU_ENTRY_POINT_RENAME(res_countArrayItems) +#define res_findResource U_ICU_ENTRY_POINT_RENAME(res_findResource) +#define res_getAlias U_ICU_ENTRY_POINT_RENAME(res_getAlias) +#define res_getArrayItem U_ICU_ENTRY_POINT_RENAME(res_getArrayItem) +#define res_getBinary U_ICU_ENTRY_POINT_RENAME(res_getBinary) +#define res_getIntVector U_ICU_ENTRY_POINT_RENAME(res_getIntVector) +#define res_getPublicType U_ICU_ENTRY_POINT_RENAME(res_getPublicType) +#define res_getResource U_ICU_ENTRY_POINT_RENAME(res_getResource) +#define res_getString U_ICU_ENTRY_POINT_RENAME(res_getString) +#define res_getTableItemByIndex U_ICU_ENTRY_POINT_RENAME(res_getTableItemByIndex) +#define res_getTableItemByKey U_ICU_ENTRY_POINT_RENAME(res_getTableItemByKey) +#define res_load U_ICU_ENTRY_POINT_RENAME(res_load) +#define res_read U_ICU_ENTRY_POINT_RENAME(res_read) +#define res_unload U_ICU_ENTRY_POINT_RENAME(res_unload) +#define u_UCharsToChars U_ICU_ENTRY_POINT_RENAME(u_UCharsToChars) +#define u_austrcpy U_ICU_ENTRY_POINT_RENAME(u_austrcpy) +#define u_austrncpy U_ICU_ENTRY_POINT_RENAME(u_austrncpy) +#define u_caseInsensitivePrefixMatch U_ICU_ENTRY_POINT_RENAME(u_caseInsensitivePrefixMatch) +#define u_catclose U_ICU_ENTRY_POINT_RENAME(u_catclose) +#define u_catgets U_ICU_ENTRY_POINT_RENAME(u_catgets) +#define u_catopen U_ICU_ENTRY_POINT_RENAME(u_catopen) +#define u_charAge U_ICU_ENTRY_POINT_RENAME(u_charAge) +#define u_charDigitValue U_ICU_ENTRY_POINT_RENAME(u_charDigitValue) +#define u_charDirection U_ICU_ENTRY_POINT_RENAME(u_charDirection) +#define u_charFromName U_ICU_ENTRY_POINT_RENAME(u_charFromName) +#define u_charMirror U_ICU_ENTRY_POINT_RENAME(u_charMirror) +#define u_charName U_ICU_ENTRY_POINT_RENAME(u_charName) +#define u_charType U_ICU_ENTRY_POINT_RENAME(u_charType) +#define u_charsToUChars U_ICU_ENTRY_POINT_RENAME(u_charsToUChars) +#define u_cleanup U_ICU_ENTRY_POINT_RENAME(u_cleanup) +#define u_countChar32 U_ICU_ENTRY_POINT_RENAME(u_countChar32) +#define u_digit U_ICU_ENTRY_POINT_RENAME(u_digit) +#define u_enumCharNames U_ICU_ENTRY_POINT_RENAME(u_enumCharNames) +#define u_enumCharTypes U_ICU_ENTRY_POINT_RENAME(u_enumCharTypes) +#define u_errorName U_ICU_ENTRY_POINT_RENAME(u_errorName) +#define u_fadopt U_ICU_ENTRY_POINT_RENAME(u_fadopt) +#define u_fclose U_ICU_ENTRY_POINT_RENAME(u_fclose) +#define u_feof U_ICU_ENTRY_POINT_RENAME(u_feof) +#define u_fflush U_ICU_ENTRY_POINT_RENAME(u_fflush) +#define u_fgetConverter U_ICU_ENTRY_POINT_RENAME(u_fgetConverter) +#define u_fgetNumberFormat U_ICU_ENTRY_POINT_RENAME(u_fgetNumberFormat) +#define u_fgetc U_ICU_ENTRY_POINT_RENAME(u_fgetc) +#define u_fgetcodepage U_ICU_ENTRY_POINT_RENAME(u_fgetcodepage) +#define u_fgetcx U_ICU_ENTRY_POINT_RENAME(u_fgetcx) +#define u_fgetfile U_ICU_ENTRY_POINT_RENAME(u_fgetfile) +#define u_fgetlocale U_ICU_ENTRY_POINT_RENAME(u_fgetlocale) +#define u_fgets U_ICU_ENTRY_POINT_RENAME(u_fgets) +#define u_file_read U_ICU_ENTRY_POINT_RENAME(u_file_read) +#define u_file_write U_ICU_ENTRY_POINT_RENAME(u_file_write) +#define u_file_write_flush U_ICU_ENTRY_POINT_RENAME(u_file_write_flush) +#define u_finit U_ICU_ENTRY_POINT_RENAME(u_finit) +#define u_flushDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_flushDefaultConverter) +#define u_foldCase U_ICU_ENTRY_POINT_RENAME(u_foldCase) +#define u_fopen U_ICU_ENTRY_POINT_RENAME(u_fopen) +#define u_fopen_u U_ICU_ENTRY_POINT_RENAME(u_fopen_u) +#define u_forDigit U_ICU_ENTRY_POINT_RENAME(u_forDigit) +#define u_formatMessage U_ICU_ENTRY_POINT_RENAME(u_formatMessage) +#define u_formatMessageWithError U_ICU_ENTRY_POINT_RENAME(u_formatMessageWithError) +#define u_fprintf U_ICU_ENTRY_POINT_RENAME(u_fprintf) +#define u_fprintf_u U_ICU_ENTRY_POINT_RENAME(u_fprintf_u) +#define u_fputc U_ICU_ENTRY_POINT_RENAME(u_fputc) +#define u_fputs U_ICU_ENTRY_POINT_RENAME(u_fputs) +#define u_frewind U_ICU_ENTRY_POINT_RENAME(u_frewind) +#define u_fscanf U_ICU_ENTRY_POINT_RENAME(u_fscanf) +#define u_fscanf_u U_ICU_ENTRY_POINT_RENAME(u_fscanf_u) +#define u_fsetcodepage U_ICU_ENTRY_POINT_RENAME(u_fsetcodepage) +#define u_fsetlocale U_ICU_ENTRY_POINT_RENAME(u_fsetlocale) +#define u_fsettransliterator U_ICU_ENTRY_POINT_RENAME(u_fsettransliterator) +#define u_fstropen U_ICU_ENTRY_POINT_RENAME(u_fstropen) +#define u_fungetc U_ICU_ENTRY_POINT_RENAME(u_fungetc) +#define u_getBidiPairedBracket U_ICU_ENTRY_POINT_RENAME(u_getBidiPairedBracket) +#define u_getCombiningClass U_ICU_ENTRY_POINT_RENAME(u_getCombiningClass) +#define u_getDataDirectory U_ICU_ENTRY_POINT_RENAME(u_getDataDirectory) +#define u_getDataVersion U_ICU_ENTRY_POINT_RENAME(u_getDataVersion) +#define u_getDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_getDefaultConverter) +#define u_getFC_NFKC_Closure U_ICU_ENTRY_POINT_RENAME(u_getFC_NFKC_Closure) +#define u_getISOComment U_ICU_ENTRY_POINT_RENAME(u_getISOComment) +#define u_getIntPropertyMaxValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyMaxValue) +#define u_getIntPropertyMinValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyMinValue) +#define u_getIntPropertyValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyValue) +#define u_getMainProperties U_ICU_ENTRY_POINT_RENAME(u_getMainProperties) +#define u_getNumericValue U_ICU_ENTRY_POINT_RENAME(u_getNumericValue) +#define u_getPropertyEnum U_ICU_ENTRY_POINT_RENAME(u_getPropertyEnum) +#define u_getPropertyName U_ICU_ENTRY_POINT_RENAME(u_getPropertyName) +#define u_getPropertyValueEnum U_ICU_ENTRY_POINT_RENAME(u_getPropertyValueEnum) +#define u_getPropertyValueName U_ICU_ENTRY_POINT_RENAME(u_getPropertyValueName) +#define u_getTimeZoneFilesDirectory U_ICU_ENTRY_POINT_RENAME(u_getTimeZoneFilesDirectory) +#define u_getUnicodeProperties U_ICU_ENTRY_POINT_RENAME(u_getUnicodeProperties) +#define u_getUnicodeVersion U_ICU_ENTRY_POINT_RENAME(u_getUnicodeVersion) +#define u_getVersion U_ICU_ENTRY_POINT_RENAME(u_getVersion) +#define u_get_stdout U_ICU_ENTRY_POINT_RENAME(u_get_stdout) +#define u_hasBinaryProperty U_ICU_ENTRY_POINT_RENAME(u_hasBinaryProperty) +#define u_init U_ICU_ENTRY_POINT_RENAME(u_init) +#define u_isIDIgnorable U_ICU_ENTRY_POINT_RENAME(u_isIDIgnorable) +#define u_isIDPart U_ICU_ENTRY_POINT_RENAME(u_isIDPart) +#define u_isIDStart U_ICU_ENTRY_POINT_RENAME(u_isIDStart) +#define u_isISOControl U_ICU_ENTRY_POINT_RENAME(u_isISOControl) +#define u_isJavaIDPart U_ICU_ENTRY_POINT_RENAME(u_isJavaIDPart) +#define u_isJavaIDStart U_ICU_ENTRY_POINT_RENAME(u_isJavaIDStart) +#define u_isJavaSpaceChar U_ICU_ENTRY_POINT_RENAME(u_isJavaSpaceChar) +#define u_isMirrored U_ICU_ENTRY_POINT_RENAME(u_isMirrored) +#define u_isUAlphabetic U_ICU_ENTRY_POINT_RENAME(u_isUAlphabetic) +#define u_isULowercase U_ICU_ENTRY_POINT_RENAME(u_isULowercase) +#define u_isUUppercase U_ICU_ENTRY_POINT_RENAME(u_isUUppercase) +#define u_isUWhiteSpace U_ICU_ENTRY_POINT_RENAME(u_isUWhiteSpace) +#define u_isWhitespace U_ICU_ENTRY_POINT_RENAME(u_isWhitespace) +#define u_isalnum U_ICU_ENTRY_POINT_RENAME(u_isalnum) +#define u_isalnumPOSIX U_ICU_ENTRY_POINT_RENAME(u_isalnumPOSIX) +#define u_isalpha U_ICU_ENTRY_POINT_RENAME(u_isalpha) +#define u_isbase U_ICU_ENTRY_POINT_RENAME(u_isbase) +#define u_isblank U_ICU_ENTRY_POINT_RENAME(u_isblank) +#define u_iscntrl U_ICU_ENTRY_POINT_RENAME(u_iscntrl) +#define u_isdefined U_ICU_ENTRY_POINT_RENAME(u_isdefined) +#define u_isdigit U_ICU_ENTRY_POINT_RENAME(u_isdigit) +#define u_isgraph U_ICU_ENTRY_POINT_RENAME(u_isgraph) +#define u_isgraphPOSIX U_ICU_ENTRY_POINT_RENAME(u_isgraphPOSIX) +#define u_islower U_ICU_ENTRY_POINT_RENAME(u_islower) +#define u_isprint U_ICU_ENTRY_POINT_RENAME(u_isprint) +#define u_isprintPOSIX U_ICU_ENTRY_POINT_RENAME(u_isprintPOSIX) +#define u_ispunct U_ICU_ENTRY_POINT_RENAME(u_ispunct) +#define u_isspace U_ICU_ENTRY_POINT_RENAME(u_isspace) +#define u_istitle U_ICU_ENTRY_POINT_RENAME(u_istitle) +#define u_isupper U_ICU_ENTRY_POINT_RENAME(u_isupper) +#define u_isxdigit U_ICU_ENTRY_POINT_RENAME(u_isxdigit) +#define u_locbund_close U_ICU_ENTRY_POINT_RENAME(u_locbund_close) +#define u_locbund_getNumberFormat U_ICU_ENTRY_POINT_RENAME(u_locbund_getNumberFormat) +#define u_locbund_init U_ICU_ENTRY_POINT_RENAME(u_locbund_init) +#define u_memcasecmp U_ICU_ENTRY_POINT_RENAME(u_memcasecmp) +#define u_memchr U_ICU_ENTRY_POINT_RENAME(u_memchr) +#define u_memchr32 U_ICU_ENTRY_POINT_RENAME(u_memchr32) +#define u_memcmp U_ICU_ENTRY_POINT_RENAME(u_memcmp) +#define u_memcmpCodePointOrder U_ICU_ENTRY_POINT_RENAME(u_memcmpCodePointOrder) +#define u_memcpy U_ICU_ENTRY_POINT_RENAME(u_memcpy) +#define u_memmove U_ICU_ENTRY_POINT_RENAME(u_memmove) +#define u_memrchr U_ICU_ENTRY_POINT_RENAME(u_memrchr) +#define u_memrchr32 U_ICU_ENTRY_POINT_RENAME(u_memrchr32) +#define u_memset U_ICU_ENTRY_POINT_RENAME(u_memset) +#define u_parseMessage U_ICU_ENTRY_POINT_RENAME(u_parseMessage) +#define u_parseMessageWithError U_ICU_ENTRY_POINT_RENAME(u_parseMessageWithError) +#define u_printf U_ICU_ENTRY_POINT_RENAME(u_printf) +#define u_printf_parse U_ICU_ENTRY_POINT_RENAME(u_printf_parse) +#define u_printf_u U_ICU_ENTRY_POINT_RENAME(u_printf_u) +#define u_releaseDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_releaseDefaultConverter) +#define u_scanf_parse U_ICU_ENTRY_POINT_RENAME(u_scanf_parse) +#define u_setAtomicIncDecFunctions U_ICU_ENTRY_POINT_RENAME(u_setAtomicIncDecFunctions) +#define u_setDataDirectory U_ICU_ENTRY_POINT_RENAME(u_setDataDirectory) +#define u_setMemoryFunctions U_ICU_ENTRY_POINT_RENAME(u_setMemoryFunctions) +#define u_setMutexFunctions U_ICU_ENTRY_POINT_RENAME(u_setMutexFunctions) +#define u_setTimeZoneFilesDirectory U_ICU_ENTRY_POINT_RENAME(u_setTimeZoneFilesDirectory) +#define u_shapeArabic U_ICU_ENTRY_POINT_RENAME(u_shapeArabic) +#define u_snprintf U_ICU_ENTRY_POINT_RENAME(u_snprintf) +#define u_snprintf_u U_ICU_ENTRY_POINT_RENAME(u_snprintf_u) +#define u_sprintf U_ICU_ENTRY_POINT_RENAME(u_sprintf) +#define u_sprintf_u U_ICU_ENTRY_POINT_RENAME(u_sprintf_u) +#define u_sscanf U_ICU_ENTRY_POINT_RENAME(u_sscanf) +#define u_sscanf_u U_ICU_ENTRY_POINT_RENAME(u_sscanf_u) +#define u_strCaseCompare U_ICU_ENTRY_POINT_RENAME(u_strCaseCompare) +#define u_strCompare U_ICU_ENTRY_POINT_RENAME(u_strCompare) +#define u_strCompareIter U_ICU_ENTRY_POINT_RENAME(u_strCompareIter) +#define u_strFindFirst U_ICU_ENTRY_POINT_RENAME(u_strFindFirst) +#define u_strFindLast U_ICU_ENTRY_POINT_RENAME(u_strFindLast) +#define u_strFoldCase U_ICU_ENTRY_POINT_RENAME(u_strFoldCase) +#define u_strFromJavaModifiedUTF8WithSub U_ICU_ENTRY_POINT_RENAME(u_strFromJavaModifiedUTF8WithSub) +#define u_strFromPunycode U_ICU_ENTRY_POINT_RENAME(u_strFromPunycode) +#define u_strFromUTF32 U_ICU_ENTRY_POINT_RENAME(u_strFromUTF32) +#define u_strFromUTF32WithSub U_ICU_ENTRY_POINT_RENAME(u_strFromUTF32WithSub) +#define u_strFromUTF8 U_ICU_ENTRY_POINT_RENAME(u_strFromUTF8) +#define u_strFromUTF8Lenient U_ICU_ENTRY_POINT_RENAME(u_strFromUTF8Lenient) +#define u_strFromUTF8WithSub U_ICU_ENTRY_POINT_RENAME(u_strFromUTF8WithSub) +#define u_strFromWCS U_ICU_ENTRY_POINT_RENAME(u_strFromWCS) +#define u_strHasMoreChar32Than U_ICU_ENTRY_POINT_RENAME(u_strHasMoreChar32Than) +#define u_strToJavaModifiedUTF8 U_ICU_ENTRY_POINT_RENAME(u_strToJavaModifiedUTF8) +#define u_strToLower U_ICU_ENTRY_POINT_RENAME(u_strToLower) +#define u_strToPunycode U_ICU_ENTRY_POINT_RENAME(u_strToPunycode) +#define u_strToTitle U_ICU_ENTRY_POINT_RENAME(u_strToTitle) +#define u_strToUTF32 U_ICU_ENTRY_POINT_RENAME(u_strToUTF32) +#define u_strToUTF32WithSub U_ICU_ENTRY_POINT_RENAME(u_strToUTF32WithSub) +#define u_strToUTF8 U_ICU_ENTRY_POINT_RENAME(u_strToUTF8) +#define u_strToUTF8WithSub U_ICU_ENTRY_POINT_RENAME(u_strToUTF8WithSub) +#define u_strToUpper U_ICU_ENTRY_POINT_RENAME(u_strToUpper) +#define u_strToWCS U_ICU_ENTRY_POINT_RENAME(u_strToWCS) +#define u_strcasecmp U_ICU_ENTRY_POINT_RENAME(u_strcasecmp) +#define u_strcat U_ICU_ENTRY_POINT_RENAME(u_strcat) +#define u_strchr U_ICU_ENTRY_POINT_RENAME(u_strchr) +#define u_strchr32 U_ICU_ENTRY_POINT_RENAME(u_strchr32) +#define u_strcmp U_ICU_ENTRY_POINT_RENAME(u_strcmp) +#define u_strcmpCodePointOrder U_ICU_ENTRY_POINT_RENAME(u_strcmpCodePointOrder) +#define u_strcmpFold U_ICU_ENTRY_POINT_RENAME(u_strcmpFold) +#define u_strcpy U_ICU_ENTRY_POINT_RENAME(u_strcpy) +#define u_strcspn U_ICU_ENTRY_POINT_RENAME(u_strcspn) +#define u_strlen U_ICU_ENTRY_POINT_RENAME(u_strlen) +#define u_strncasecmp U_ICU_ENTRY_POINT_RENAME(u_strncasecmp) +#define u_strncat U_ICU_ENTRY_POINT_RENAME(u_strncat) +#define u_strncmp U_ICU_ENTRY_POINT_RENAME(u_strncmp) +#define u_strncmpCodePointOrder U_ICU_ENTRY_POINT_RENAME(u_strncmpCodePointOrder) +#define u_strncpy U_ICU_ENTRY_POINT_RENAME(u_strncpy) +#define u_strpbrk U_ICU_ENTRY_POINT_RENAME(u_strpbrk) +#define u_strrchr U_ICU_ENTRY_POINT_RENAME(u_strrchr) +#define u_strrchr32 U_ICU_ENTRY_POINT_RENAME(u_strrchr32) +#define u_strrstr U_ICU_ENTRY_POINT_RENAME(u_strrstr) +#define u_strspn U_ICU_ENTRY_POINT_RENAME(u_strspn) +#define u_strstr U_ICU_ENTRY_POINT_RENAME(u_strstr) +#define u_strtok_r U_ICU_ENTRY_POINT_RENAME(u_strtok_r) +#define u_terminateChars U_ICU_ENTRY_POINT_RENAME(u_terminateChars) +#define u_terminateUChar32s U_ICU_ENTRY_POINT_RENAME(u_terminateUChar32s) +#define u_terminateUChars U_ICU_ENTRY_POINT_RENAME(u_terminateUChars) +#define u_terminateWChars U_ICU_ENTRY_POINT_RENAME(u_terminateWChars) +#define u_tolower U_ICU_ENTRY_POINT_RENAME(u_tolower) +#define u_totitle U_ICU_ENTRY_POINT_RENAME(u_totitle) +#define u_toupper U_ICU_ENTRY_POINT_RENAME(u_toupper) +#define u_uastrcpy U_ICU_ENTRY_POINT_RENAME(u_uastrcpy) +#define u_uastrncpy U_ICU_ENTRY_POINT_RENAME(u_uastrncpy) +#define u_unescape U_ICU_ENTRY_POINT_RENAME(u_unescape) +#define u_unescapeAt U_ICU_ENTRY_POINT_RENAME(u_unescapeAt) +#define u_versionFromString U_ICU_ENTRY_POINT_RENAME(u_versionFromString) +#define u_versionFromUString U_ICU_ENTRY_POINT_RENAME(u_versionFromUString) +#define u_versionToString U_ICU_ENTRY_POINT_RENAME(u_versionToString) +#define u_vformatMessage U_ICU_ENTRY_POINT_RENAME(u_vformatMessage) +#define u_vformatMessageWithError U_ICU_ENTRY_POINT_RENAME(u_vformatMessageWithError) +#define u_vfprintf U_ICU_ENTRY_POINT_RENAME(u_vfprintf) +#define u_vfprintf_u U_ICU_ENTRY_POINT_RENAME(u_vfprintf_u) +#define u_vfscanf U_ICU_ENTRY_POINT_RENAME(u_vfscanf) +#define u_vfscanf_u U_ICU_ENTRY_POINT_RENAME(u_vfscanf_u) +#define u_vparseMessage U_ICU_ENTRY_POINT_RENAME(u_vparseMessage) +#define u_vparseMessageWithError U_ICU_ENTRY_POINT_RENAME(u_vparseMessageWithError) +#define u_vsnprintf U_ICU_ENTRY_POINT_RENAME(u_vsnprintf) +#define u_vsnprintf_u U_ICU_ENTRY_POINT_RENAME(u_vsnprintf_u) +#define u_vsprintf U_ICU_ENTRY_POINT_RENAME(u_vsprintf) +#define u_vsprintf_u U_ICU_ENTRY_POINT_RENAME(u_vsprintf_u) +#define u_vsscanf U_ICU_ENTRY_POINT_RENAME(u_vsscanf) +#define u_vsscanf_u U_ICU_ENTRY_POINT_RENAME(u_vsscanf_u) +#define u_writeIdenticalLevelRun U_ICU_ENTRY_POINT_RENAME(u_writeIdenticalLevelRun) +#define ubidi_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(ubidi_addPropertyStarts) +#define ubidi_close U_ICU_ENTRY_POINT_RENAME(ubidi_close) +#define ubidi_countParagraphs U_ICU_ENTRY_POINT_RENAME(ubidi_countParagraphs) +#define ubidi_countRuns U_ICU_ENTRY_POINT_RENAME(ubidi_countRuns) +#define ubidi_getBaseDirection U_ICU_ENTRY_POINT_RENAME(ubidi_getBaseDirection) +#define ubidi_getClass U_ICU_ENTRY_POINT_RENAME(ubidi_getClass) +#define ubidi_getClassCallback U_ICU_ENTRY_POINT_RENAME(ubidi_getClassCallback) +#define ubidi_getCustomizedClass U_ICU_ENTRY_POINT_RENAME(ubidi_getCustomizedClass) +#define ubidi_getDirection U_ICU_ENTRY_POINT_RENAME(ubidi_getDirection) +#define ubidi_getJoiningGroup U_ICU_ENTRY_POINT_RENAME(ubidi_getJoiningGroup) +#define ubidi_getJoiningType U_ICU_ENTRY_POINT_RENAME(ubidi_getJoiningType) +#define ubidi_getLength U_ICU_ENTRY_POINT_RENAME(ubidi_getLength) +#define ubidi_getLevelAt U_ICU_ENTRY_POINT_RENAME(ubidi_getLevelAt) +#define ubidi_getLevels U_ICU_ENTRY_POINT_RENAME(ubidi_getLevels) +#define ubidi_getLogicalIndex U_ICU_ENTRY_POINT_RENAME(ubidi_getLogicalIndex) +#define ubidi_getLogicalMap U_ICU_ENTRY_POINT_RENAME(ubidi_getLogicalMap) +#define ubidi_getLogicalRun U_ICU_ENTRY_POINT_RENAME(ubidi_getLogicalRun) +#define ubidi_getMaxValue U_ICU_ENTRY_POINT_RENAME(ubidi_getMaxValue) +#define ubidi_getMemory U_ICU_ENTRY_POINT_RENAME(ubidi_getMemory) +#define ubidi_getMirror U_ICU_ENTRY_POINT_RENAME(ubidi_getMirror) +#define ubidi_getPairedBracket U_ICU_ENTRY_POINT_RENAME(ubidi_getPairedBracket) +#define ubidi_getPairedBracketType U_ICU_ENTRY_POINT_RENAME(ubidi_getPairedBracketType) +#define ubidi_getParaLevel U_ICU_ENTRY_POINT_RENAME(ubidi_getParaLevel) +#define ubidi_getParaLevelAtIndex U_ICU_ENTRY_POINT_RENAME(ubidi_getParaLevelAtIndex) +#define ubidi_getParagraph U_ICU_ENTRY_POINT_RENAME(ubidi_getParagraph) +#define ubidi_getParagraphByIndex U_ICU_ENTRY_POINT_RENAME(ubidi_getParagraphByIndex) +#define ubidi_getProcessedLength U_ICU_ENTRY_POINT_RENAME(ubidi_getProcessedLength) +#define ubidi_getReorderingMode U_ICU_ENTRY_POINT_RENAME(ubidi_getReorderingMode) +#define ubidi_getReorderingOptions U_ICU_ENTRY_POINT_RENAME(ubidi_getReorderingOptions) +#define ubidi_getResultLength U_ICU_ENTRY_POINT_RENAME(ubidi_getResultLength) +#define ubidi_getRuns U_ICU_ENTRY_POINT_RENAME(ubidi_getRuns) +#define ubidi_getText U_ICU_ENTRY_POINT_RENAME(ubidi_getText) +#define ubidi_getVisualIndex U_ICU_ENTRY_POINT_RENAME(ubidi_getVisualIndex) +#define ubidi_getVisualMap U_ICU_ENTRY_POINT_RENAME(ubidi_getVisualMap) +#define ubidi_getVisualRun U_ICU_ENTRY_POINT_RENAME(ubidi_getVisualRun) +#define ubidi_invertMap U_ICU_ENTRY_POINT_RENAME(ubidi_invertMap) +#define ubidi_isBidiControl U_ICU_ENTRY_POINT_RENAME(ubidi_isBidiControl) +#define ubidi_isInverse U_ICU_ENTRY_POINT_RENAME(ubidi_isInverse) +#define ubidi_isJoinControl U_ICU_ENTRY_POINT_RENAME(ubidi_isJoinControl) +#define ubidi_isMirrored U_ICU_ENTRY_POINT_RENAME(ubidi_isMirrored) +#define ubidi_isOrderParagraphsLTR U_ICU_ENTRY_POINT_RENAME(ubidi_isOrderParagraphsLTR) +#define ubidi_open U_ICU_ENTRY_POINT_RENAME(ubidi_open) +#define ubidi_openSized U_ICU_ENTRY_POINT_RENAME(ubidi_openSized) +#define ubidi_orderParagraphsLTR U_ICU_ENTRY_POINT_RENAME(ubidi_orderParagraphsLTR) +#define ubidi_reorderLogical U_ICU_ENTRY_POINT_RENAME(ubidi_reorderLogical) +#define ubidi_reorderVisual U_ICU_ENTRY_POINT_RENAME(ubidi_reorderVisual) +#define ubidi_setClassCallback U_ICU_ENTRY_POINT_RENAME(ubidi_setClassCallback) +#define ubidi_setContext U_ICU_ENTRY_POINT_RENAME(ubidi_setContext) +#define ubidi_setInverse U_ICU_ENTRY_POINT_RENAME(ubidi_setInverse) +#define ubidi_setLine U_ICU_ENTRY_POINT_RENAME(ubidi_setLine) +#define ubidi_setPara U_ICU_ENTRY_POINT_RENAME(ubidi_setPara) +#define ubidi_setReorderingMode U_ICU_ENTRY_POINT_RENAME(ubidi_setReorderingMode) +#define ubidi_setReorderingOptions U_ICU_ENTRY_POINT_RENAME(ubidi_setReorderingOptions) +#define ubidi_writeReordered U_ICU_ENTRY_POINT_RENAME(ubidi_writeReordered) +#define ubidi_writeReverse U_ICU_ENTRY_POINT_RENAME(ubidi_writeReverse) +#define ubiditransform_close U_ICU_ENTRY_POINT_RENAME(ubiditransform_close) +#define ubiditransform_open U_ICU_ENTRY_POINT_RENAME(ubiditransform_open) +#define ubiditransform_transform U_ICU_ENTRY_POINT_RENAME(ubiditransform_transform) +#define ublock_getCode U_ICU_ENTRY_POINT_RENAME(ublock_getCode) +#define ubrk_close U_ICU_ENTRY_POINT_RENAME(ubrk_close) +#define ubrk_countAvailable U_ICU_ENTRY_POINT_RENAME(ubrk_countAvailable) +#define ubrk_current U_ICU_ENTRY_POINT_RENAME(ubrk_current) +#define ubrk_first U_ICU_ENTRY_POINT_RENAME(ubrk_first) +#define ubrk_following U_ICU_ENTRY_POINT_RENAME(ubrk_following) +#define ubrk_getAvailable U_ICU_ENTRY_POINT_RENAME(ubrk_getAvailable) +#define ubrk_getBinaryRules U_ICU_ENTRY_POINT_RENAME(ubrk_getBinaryRules) +#define ubrk_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ubrk_getLocaleByType) +#define ubrk_getRuleStatus U_ICU_ENTRY_POINT_RENAME(ubrk_getRuleStatus) +#define ubrk_getRuleStatusVec U_ICU_ENTRY_POINT_RENAME(ubrk_getRuleStatusVec) +#define ubrk_isBoundary U_ICU_ENTRY_POINT_RENAME(ubrk_isBoundary) +#define ubrk_last U_ICU_ENTRY_POINT_RENAME(ubrk_last) +#define ubrk_next U_ICU_ENTRY_POINT_RENAME(ubrk_next) +#define ubrk_open U_ICU_ENTRY_POINT_RENAME(ubrk_open) +#define ubrk_openBinaryRules U_ICU_ENTRY_POINT_RENAME(ubrk_openBinaryRules) +#define ubrk_openRules U_ICU_ENTRY_POINT_RENAME(ubrk_openRules) +#define ubrk_preceding U_ICU_ENTRY_POINT_RENAME(ubrk_preceding) +#define ubrk_previous U_ICU_ENTRY_POINT_RENAME(ubrk_previous) +#define ubrk_refreshUText U_ICU_ENTRY_POINT_RENAME(ubrk_refreshUText) +#define ubrk_safeClone U_ICU_ENTRY_POINT_RENAME(ubrk_safeClone) +#define ubrk_setText U_ICU_ENTRY_POINT_RENAME(ubrk_setText) +#define ubrk_setUText U_ICU_ENTRY_POINT_RENAME(ubrk_setUText) +#define ubrk_swap U_ICU_ENTRY_POINT_RENAME(ubrk_swap) +#define ucache_compareKeys U_ICU_ENTRY_POINT_RENAME(ucache_compareKeys) +#define ucache_deleteKey U_ICU_ENTRY_POINT_RENAME(ucache_deleteKey) +#define ucache_hashKeys U_ICU_ENTRY_POINT_RENAME(ucache_hashKeys) +#define ucal_add U_ICU_ENTRY_POINT_RENAME(ucal_add) +#define ucal_clear U_ICU_ENTRY_POINT_RENAME(ucal_clear) +#define ucal_clearField U_ICU_ENTRY_POINT_RENAME(ucal_clearField) +#define ucal_clone U_ICU_ENTRY_POINT_RENAME(ucal_clone) +#define ucal_close U_ICU_ENTRY_POINT_RENAME(ucal_close) +#define ucal_countAvailable U_ICU_ENTRY_POINT_RENAME(ucal_countAvailable) +#define ucal_equivalentTo U_ICU_ENTRY_POINT_RENAME(ucal_equivalentTo) +#define ucal_get U_ICU_ENTRY_POINT_RENAME(ucal_get) +#define ucal_getAttribute U_ICU_ENTRY_POINT_RENAME(ucal_getAttribute) +#define ucal_getAvailable U_ICU_ENTRY_POINT_RENAME(ucal_getAvailable) +#define ucal_getCanonicalTimeZoneID U_ICU_ENTRY_POINT_RENAME(ucal_getCanonicalTimeZoneID) +#define ucal_getDSTSavings U_ICU_ENTRY_POINT_RENAME(ucal_getDSTSavings) +#define ucal_getDayOfWeekType U_ICU_ENTRY_POINT_RENAME(ucal_getDayOfWeekType) +#define ucal_getDefaultTimeZone U_ICU_ENTRY_POINT_RENAME(ucal_getDefaultTimeZone) +#define ucal_getFieldDifference U_ICU_ENTRY_POINT_RENAME(ucal_getFieldDifference) +#define ucal_getGregorianChange U_ICU_ENTRY_POINT_RENAME(ucal_getGregorianChange) +#define ucal_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucal_getKeywordValuesForLocale) +#define ucal_getLimit U_ICU_ENTRY_POINT_RENAME(ucal_getLimit) +#define ucal_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ucal_getLocaleByType) +#define ucal_getMillis U_ICU_ENTRY_POINT_RENAME(ucal_getMillis) +#define ucal_getNow U_ICU_ENTRY_POINT_RENAME(ucal_getNow) +#define ucal_getTZDataVersion U_ICU_ENTRY_POINT_RENAME(ucal_getTZDataVersion) +#define ucal_getTimeZoneDisplayName U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZoneDisplayName) +#define ucal_getTimeZoneID U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZoneID) +#define ucal_getTimeZoneIDForWindowsID U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZoneIDForWindowsID) +#define ucal_getTimeZoneTransitionDate U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZoneTransitionDate) +#define ucal_getType U_ICU_ENTRY_POINT_RENAME(ucal_getType) +#define ucal_getWeekendTransition U_ICU_ENTRY_POINT_RENAME(ucal_getWeekendTransition) +#define ucal_getWindowsTimeZoneID U_ICU_ENTRY_POINT_RENAME(ucal_getWindowsTimeZoneID) +#define ucal_inDaylightTime U_ICU_ENTRY_POINT_RENAME(ucal_inDaylightTime) +#define ucal_isSet U_ICU_ENTRY_POINT_RENAME(ucal_isSet) +#define ucal_isWeekend U_ICU_ENTRY_POINT_RENAME(ucal_isWeekend) +#define ucal_open U_ICU_ENTRY_POINT_RENAME(ucal_open) +#define ucal_openCountryTimeZones U_ICU_ENTRY_POINT_RENAME(ucal_openCountryTimeZones) +#define ucal_openTimeZoneIDEnumeration U_ICU_ENTRY_POINT_RENAME(ucal_openTimeZoneIDEnumeration) +#define ucal_openTimeZones U_ICU_ENTRY_POINT_RENAME(ucal_openTimeZones) +#define ucal_roll U_ICU_ENTRY_POINT_RENAME(ucal_roll) +#define ucal_set U_ICU_ENTRY_POINT_RENAME(ucal_set) +#define ucal_setAttribute U_ICU_ENTRY_POINT_RENAME(ucal_setAttribute) +#define ucal_setDate U_ICU_ENTRY_POINT_RENAME(ucal_setDate) +#define ucal_setDateTime U_ICU_ENTRY_POINT_RENAME(ucal_setDateTime) +#define ucal_setDefaultTimeZone U_ICU_ENTRY_POINT_RENAME(ucal_setDefaultTimeZone) +#define ucal_setGregorianChange U_ICU_ENTRY_POINT_RENAME(ucal_setGregorianChange) +#define ucal_setMillis U_ICU_ENTRY_POINT_RENAME(ucal_setMillis) +#define ucal_setTimeZone U_ICU_ENTRY_POINT_RENAME(ucal_setTimeZone) +#define ucase_addCaseClosure U_ICU_ENTRY_POINT_RENAME(ucase_addCaseClosure) +#define ucase_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(ucase_addPropertyStarts) +#define ucase_addStringCaseClosure U_ICU_ENTRY_POINT_RENAME(ucase_addStringCaseClosure) +#define ucase_fold U_ICU_ENTRY_POINT_RENAME(ucase_fold) +#define ucase_getCaseLocale U_ICU_ENTRY_POINT_RENAME(ucase_getCaseLocale) +#define ucase_getTrie U_ICU_ENTRY_POINT_RENAME(ucase_getTrie) +#define ucase_getType U_ICU_ENTRY_POINT_RENAME(ucase_getType) +#define ucase_getTypeOrIgnorable U_ICU_ENTRY_POINT_RENAME(ucase_getTypeOrIgnorable) +#define ucase_hasBinaryProperty U_ICU_ENTRY_POINT_RENAME(ucase_hasBinaryProperty) +#define ucase_isCaseSensitive U_ICU_ENTRY_POINT_RENAME(ucase_isCaseSensitive) +#define ucase_isSoftDotted U_ICU_ENTRY_POINT_RENAME(ucase_isSoftDotted) +#define ucase_toFullFolding U_ICU_ENTRY_POINT_RENAME(ucase_toFullFolding) +#define ucase_toFullLower U_ICU_ENTRY_POINT_RENAME(ucase_toFullLower) +#define ucase_toFullTitle U_ICU_ENTRY_POINT_RENAME(ucase_toFullTitle) +#define ucase_toFullUpper U_ICU_ENTRY_POINT_RENAME(ucase_toFullUpper) +#define ucase_tolower U_ICU_ENTRY_POINT_RENAME(ucase_tolower) +#define ucase_totitle U_ICU_ENTRY_POINT_RENAME(ucase_totitle) +#define ucase_toupper U_ICU_ENTRY_POINT_RENAME(ucase_toupper) +#define ucasemap_close U_ICU_ENTRY_POINT_RENAME(ucasemap_close) +#define ucasemap_getBreakIterator U_ICU_ENTRY_POINT_RENAME(ucasemap_getBreakIterator) +#define ucasemap_getLocale U_ICU_ENTRY_POINT_RENAME(ucasemap_getLocale) +#define ucasemap_getOptions U_ICU_ENTRY_POINT_RENAME(ucasemap_getOptions) +#define ucasemap_internalUTF8ToTitle U_ICU_ENTRY_POINT_RENAME(ucasemap_internalUTF8ToTitle) +#define ucasemap_mapUTF8 U_ICU_ENTRY_POINT_RENAME(ucasemap_mapUTF8) +#define ucasemap_open U_ICU_ENTRY_POINT_RENAME(ucasemap_open) +#define ucasemap_setBreakIterator U_ICU_ENTRY_POINT_RENAME(ucasemap_setBreakIterator) +#define ucasemap_setLocale U_ICU_ENTRY_POINT_RENAME(ucasemap_setLocale) +#define ucasemap_setOptions U_ICU_ENTRY_POINT_RENAME(ucasemap_setOptions) +#define ucasemap_toTitle U_ICU_ENTRY_POINT_RENAME(ucasemap_toTitle) +#define ucasemap_utf8FoldCase U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8FoldCase) +#define ucasemap_utf8ToLower U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToLower) +#define ucasemap_utf8ToTitle U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToTitle) +#define ucasemap_utf8ToUpper U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToUpper) +#define uchar_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(uchar_addPropertyStarts) +#define uchar_swapNames U_ICU_ENTRY_POINT_RENAME(uchar_swapNames) +#define ucln_cleanupOne U_ICU_ENTRY_POINT_RENAME(ucln_cleanupOne) +#define ucln_common_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_common_registerCleanup) +#define ucln_i18n_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_i18n_registerCleanup) +#define ucln_io_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_io_registerCleanup) +#define ucln_lib_cleanup U_ICU_ENTRY_POINT_RENAME(ucln_lib_cleanup) +#define ucln_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_registerCleanup) +#define ucnv_MBCSFromUChar32 U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSFromUChar32) +#define ucnv_MBCSFromUnicodeWithOffsets U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSFromUnicodeWithOffsets) +#define ucnv_MBCSGetFilteredUnicodeSetForUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSGetFilteredUnicodeSetForUnicode) +#define ucnv_MBCSGetType U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSGetType) +#define ucnv_MBCSGetUnicodeSetForUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSGetUnicodeSetForUnicode) +#define ucnv_MBCSIsLeadByte U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSIsLeadByte) +#define ucnv_MBCSSimpleGetNextUChar U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSSimpleGetNextUChar) +#define ucnv_MBCSToUnicodeWithOffsets U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSToUnicodeWithOffsets) +#define ucnv_bld_countAvailableConverters U_ICU_ENTRY_POINT_RENAME(ucnv_bld_countAvailableConverters) +#define ucnv_bld_getAvailableConverter U_ICU_ENTRY_POINT_RENAME(ucnv_bld_getAvailableConverter) +#define ucnv_canCreateConverter U_ICU_ENTRY_POINT_RENAME(ucnv_canCreateConverter) +#define ucnv_cbFromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_cbFromUWriteBytes) +#define ucnv_cbFromUWriteSub U_ICU_ENTRY_POINT_RENAME(ucnv_cbFromUWriteSub) +#define ucnv_cbFromUWriteUChars U_ICU_ENTRY_POINT_RENAME(ucnv_cbFromUWriteUChars) +#define ucnv_cbToUWriteSub U_ICU_ENTRY_POINT_RENAME(ucnv_cbToUWriteSub) +#define ucnv_cbToUWriteUChars U_ICU_ENTRY_POINT_RENAME(ucnv_cbToUWriteUChars) +#define ucnv_close U_ICU_ENTRY_POINT_RENAME(ucnv_close) +#define ucnv_compareNames U_ICU_ENTRY_POINT_RENAME(ucnv_compareNames) +#define ucnv_convert U_ICU_ENTRY_POINT_RENAME(ucnv_convert) +#define ucnv_convertEx U_ICU_ENTRY_POINT_RENAME(ucnv_convertEx) +#define ucnv_countAliases U_ICU_ENTRY_POINT_RENAME(ucnv_countAliases) +#define ucnv_countAvailable U_ICU_ENTRY_POINT_RENAME(ucnv_countAvailable) +#define ucnv_countStandards U_ICU_ENTRY_POINT_RENAME(ucnv_countStandards) +#define ucnv_createAlgorithmicConverter U_ICU_ENTRY_POINT_RENAME(ucnv_createAlgorithmicConverter) +#define ucnv_createConverter U_ICU_ENTRY_POINT_RENAME(ucnv_createConverter) +#define ucnv_createConverterFromPackage U_ICU_ENTRY_POINT_RENAME(ucnv_createConverterFromPackage) +#define ucnv_createConverterFromSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_createConverterFromSharedData) +#define ucnv_detectUnicodeSignature U_ICU_ENTRY_POINT_RENAME(ucnv_detectUnicodeSignature) +#define ucnv_extContinueMatchFromU U_ICU_ENTRY_POINT_RENAME(ucnv_extContinueMatchFromU) +#define ucnv_extContinueMatchToU U_ICU_ENTRY_POINT_RENAME(ucnv_extContinueMatchToU) +#define ucnv_extGetUnicodeSet U_ICU_ENTRY_POINT_RENAME(ucnv_extGetUnicodeSet) +#define ucnv_extInitialMatchFromU U_ICU_ENTRY_POINT_RENAME(ucnv_extInitialMatchFromU) +#define ucnv_extInitialMatchToU U_ICU_ENTRY_POINT_RENAME(ucnv_extInitialMatchToU) +#define ucnv_extSimpleMatchFromU U_ICU_ENTRY_POINT_RENAME(ucnv_extSimpleMatchFromU) +#define ucnv_extSimpleMatchToU U_ICU_ENTRY_POINT_RENAME(ucnv_extSimpleMatchToU) +#define ucnv_fixFileSeparator U_ICU_ENTRY_POINT_RENAME(ucnv_fixFileSeparator) +#define ucnv_flushCache U_ICU_ENTRY_POINT_RENAME(ucnv_flushCache) +#define ucnv_fromAlgorithmic U_ICU_ENTRY_POINT_RENAME(ucnv_fromAlgorithmic) +#define ucnv_fromUChars U_ICU_ENTRY_POINT_RENAME(ucnv_fromUChars) +#define ucnv_fromUCountPending U_ICU_ENTRY_POINT_RENAME(ucnv_fromUCountPending) +#define ucnv_fromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_fromUWriteBytes) +#define ucnv_fromUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_fromUnicode) +#define ucnv_fromUnicode_UTF8 U_ICU_ENTRY_POINT_RENAME(ucnv_fromUnicode_UTF8) +#define ucnv_fromUnicode_UTF8_OFFSETS_LOGIC U_ICU_ENTRY_POINT_RENAME(ucnv_fromUnicode_UTF8_OFFSETS_LOGIC) +#define ucnv_getAlias U_ICU_ENTRY_POINT_RENAME(ucnv_getAlias) +#define ucnv_getAliases U_ICU_ENTRY_POINT_RENAME(ucnv_getAliases) +#define ucnv_getAvailableName U_ICU_ENTRY_POINT_RENAME(ucnv_getAvailableName) +#define ucnv_getCCSID U_ICU_ENTRY_POINT_RENAME(ucnv_getCCSID) +#define ucnv_getCanonicalName U_ICU_ENTRY_POINT_RENAME(ucnv_getCanonicalName) +#define ucnv_getCompleteUnicodeSet U_ICU_ENTRY_POINT_RENAME(ucnv_getCompleteUnicodeSet) +#define ucnv_getDefaultName U_ICU_ENTRY_POINT_RENAME(ucnv_getDefaultName) +#define ucnv_getDisplayName U_ICU_ENTRY_POINT_RENAME(ucnv_getDisplayName) +#define ucnv_getFromUCallBack U_ICU_ENTRY_POINT_RENAME(ucnv_getFromUCallBack) +#define ucnv_getInvalidChars U_ICU_ENTRY_POINT_RENAME(ucnv_getInvalidChars) +#define ucnv_getInvalidUChars U_ICU_ENTRY_POINT_RENAME(ucnv_getInvalidUChars) +#define ucnv_getMaxCharSize U_ICU_ENTRY_POINT_RENAME(ucnv_getMaxCharSize) +#define ucnv_getMinCharSize U_ICU_ENTRY_POINT_RENAME(ucnv_getMinCharSize) +#define ucnv_getName U_ICU_ENTRY_POINT_RENAME(ucnv_getName) +#define ucnv_getNextUChar U_ICU_ENTRY_POINT_RENAME(ucnv_getNextUChar) +#define ucnv_getNonSurrogateUnicodeSet U_ICU_ENTRY_POINT_RENAME(ucnv_getNonSurrogateUnicodeSet) +#define ucnv_getPlatform U_ICU_ENTRY_POINT_RENAME(ucnv_getPlatform) +#define ucnv_getStandard U_ICU_ENTRY_POINT_RENAME(ucnv_getStandard) +#define ucnv_getStandardName U_ICU_ENTRY_POINT_RENAME(ucnv_getStandardName) +#define ucnv_getStarters U_ICU_ENTRY_POINT_RENAME(ucnv_getStarters) +#define ucnv_getSubstChars U_ICU_ENTRY_POINT_RENAME(ucnv_getSubstChars) +#define ucnv_getToUCallBack U_ICU_ENTRY_POINT_RENAME(ucnv_getToUCallBack) +#define ucnv_getType U_ICU_ENTRY_POINT_RENAME(ucnv_getType) +#define ucnv_getUnicodeSet U_ICU_ENTRY_POINT_RENAME(ucnv_getUnicodeSet) +#define ucnv_incrementRefCount U_ICU_ENTRY_POINT_RENAME(ucnv_incrementRefCount) +#define ucnv_io_countKnownConverters U_ICU_ENTRY_POINT_RENAME(ucnv_io_countKnownConverters) +#define ucnv_io_getConverterName U_ICU_ENTRY_POINT_RENAME(ucnv_io_getConverterName) +#define ucnv_io_stripASCIIForCompare U_ICU_ENTRY_POINT_RENAME(ucnv_io_stripASCIIForCompare) +#define ucnv_io_stripEBCDICForCompare U_ICU_ENTRY_POINT_RENAME(ucnv_io_stripEBCDICForCompare) +#define ucnv_isAmbiguous U_ICU_ENTRY_POINT_RENAME(ucnv_isAmbiguous) +#define ucnv_isFixedWidth U_ICU_ENTRY_POINT_RENAME(ucnv_isFixedWidth) +#define ucnv_load U_ICU_ENTRY_POINT_RENAME(ucnv_load) +#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData) +#define ucnv_open U_ICU_ENTRY_POINT_RENAME(ucnv_open) +#define ucnv_openAllNames U_ICU_ENTRY_POINT_RENAME(ucnv_openAllNames) +#define ucnv_openCCSID U_ICU_ENTRY_POINT_RENAME(ucnv_openCCSID) +#define ucnv_openPackage U_ICU_ENTRY_POINT_RENAME(ucnv_openPackage) +#define ucnv_openStandardNames U_ICU_ENTRY_POINT_RENAME(ucnv_openStandardNames) +#define ucnv_openU U_ICU_ENTRY_POINT_RENAME(ucnv_openU) +#define ucnv_reset U_ICU_ENTRY_POINT_RENAME(ucnv_reset) +#define ucnv_resetFromUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_resetFromUnicode) +#define ucnv_resetToUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_resetToUnicode) +#define ucnv_safeClone U_ICU_ENTRY_POINT_RENAME(ucnv_safeClone) +#define ucnv_setDefaultName U_ICU_ENTRY_POINT_RENAME(ucnv_setDefaultName) +#define ucnv_setFallback U_ICU_ENTRY_POINT_RENAME(ucnv_setFallback) +#define ucnv_setFromUCallBack U_ICU_ENTRY_POINT_RENAME(ucnv_setFromUCallBack) +#define ucnv_setSubstChars U_ICU_ENTRY_POINT_RENAME(ucnv_setSubstChars) +#define ucnv_setSubstString U_ICU_ENTRY_POINT_RENAME(ucnv_setSubstString) +#define ucnv_setToUCallBack U_ICU_ENTRY_POINT_RENAME(ucnv_setToUCallBack) +#define ucnv_swap U_ICU_ENTRY_POINT_RENAME(ucnv_swap) +#define ucnv_swapAliases U_ICU_ENTRY_POINT_RENAME(ucnv_swapAliases) +#define ucnv_toAlgorithmic U_ICU_ENTRY_POINT_RENAME(ucnv_toAlgorithmic) +#define ucnv_toUChars U_ICU_ENTRY_POINT_RENAME(ucnv_toUChars) +#define ucnv_toUCountPending U_ICU_ENTRY_POINT_RENAME(ucnv_toUCountPending) +#define ucnv_toUWriteCodePoint U_ICU_ENTRY_POINT_RENAME(ucnv_toUWriteCodePoint) +#define ucnv_toUWriteUChars U_ICU_ENTRY_POINT_RENAME(ucnv_toUWriteUChars) +#define ucnv_toUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_toUnicode) +#define ucnv_unload U_ICU_ENTRY_POINT_RENAME(ucnv_unload) +#define ucnv_unloadSharedDataIfReady U_ICU_ENTRY_POINT_RENAME(ucnv_unloadSharedDataIfReady) +#define ucnv_usesFallback U_ICU_ENTRY_POINT_RENAME(ucnv_usesFallback) +#define ucnvsel_close U_ICU_ENTRY_POINT_RENAME(ucnvsel_close) +#define ucnvsel_open U_ICU_ENTRY_POINT_RENAME(ucnvsel_open) +#define ucnvsel_openFromSerialized U_ICU_ENTRY_POINT_RENAME(ucnvsel_openFromSerialized) +#define ucnvsel_selectForString U_ICU_ENTRY_POINT_RENAME(ucnvsel_selectForString) +#define ucnvsel_selectForUTF8 U_ICU_ENTRY_POINT_RENAME(ucnvsel_selectForUTF8) +#define ucnvsel_serialize U_ICU_ENTRY_POINT_RENAME(ucnvsel_serialize) +#define ucol_cloneBinary U_ICU_ENTRY_POINT_RENAME(ucol_cloneBinary) +#define ucol_close U_ICU_ENTRY_POINT_RENAME(ucol_close) +#define ucol_closeElements U_ICU_ENTRY_POINT_RENAME(ucol_closeElements) +#define ucol_countAvailable U_ICU_ENTRY_POINT_RENAME(ucol_countAvailable) +#define ucol_equal U_ICU_ENTRY_POINT_RENAME(ucol_equal) +#define ucol_equals U_ICU_ENTRY_POINT_RENAME(ucol_equals) +#define ucol_getAttribute U_ICU_ENTRY_POINT_RENAME(ucol_getAttribute) +#define ucol_getAvailable U_ICU_ENTRY_POINT_RENAME(ucol_getAvailable) +#define ucol_getBound U_ICU_ENTRY_POINT_RENAME(ucol_getBound) +#define ucol_getContractions U_ICU_ENTRY_POINT_RENAME(ucol_getContractions) +#define ucol_getContractionsAndExpansions U_ICU_ENTRY_POINT_RENAME(ucol_getContractionsAndExpansions) +#define ucol_getDisplayName U_ICU_ENTRY_POINT_RENAME(ucol_getDisplayName) +#define ucol_getEquivalentReorderCodes U_ICU_ENTRY_POINT_RENAME(ucol_getEquivalentReorderCodes) +#define ucol_getFunctionalEquivalent U_ICU_ENTRY_POINT_RENAME(ucol_getFunctionalEquivalent) +#define ucol_getKeywordValues U_ICU_ENTRY_POINT_RENAME(ucol_getKeywordValues) +#define ucol_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucol_getKeywordValuesForLocale) +#define ucol_getKeywords U_ICU_ENTRY_POINT_RENAME(ucol_getKeywords) +#define ucol_getLocale U_ICU_ENTRY_POINT_RENAME(ucol_getLocale) +#define ucol_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ucol_getLocaleByType) +#define ucol_getMaxExpansion U_ICU_ENTRY_POINT_RENAME(ucol_getMaxExpansion) +#define ucol_getMaxVariable U_ICU_ENTRY_POINT_RENAME(ucol_getMaxVariable) +#define ucol_getOffset U_ICU_ENTRY_POINT_RENAME(ucol_getOffset) +#define ucol_getReorderCodes U_ICU_ENTRY_POINT_RENAME(ucol_getReorderCodes) +#define ucol_getRules U_ICU_ENTRY_POINT_RENAME(ucol_getRules) +#define ucol_getRulesEx U_ICU_ENTRY_POINT_RENAME(ucol_getRulesEx) +#define ucol_getShortDefinitionString U_ICU_ENTRY_POINT_RENAME(ucol_getShortDefinitionString) +#define ucol_getSortKey U_ICU_ENTRY_POINT_RENAME(ucol_getSortKey) +#define ucol_getStrength U_ICU_ENTRY_POINT_RENAME(ucol_getStrength) +#define ucol_getTailoredSet U_ICU_ENTRY_POINT_RENAME(ucol_getTailoredSet) +#define ucol_getUCAVersion U_ICU_ENTRY_POINT_RENAME(ucol_getUCAVersion) +#define ucol_getUnsafeSet U_ICU_ENTRY_POINT_RENAME(ucol_getUnsafeSet) +#define ucol_getVariableTop U_ICU_ENTRY_POINT_RENAME(ucol_getVariableTop) +#define ucol_getVersion U_ICU_ENTRY_POINT_RENAME(ucol_getVersion) +#define ucol_greater U_ICU_ENTRY_POINT_RENAME(ucol_greater) +#define ucol_greaterOrEqual U_ICU_ENTRY_POINT_RENAME(ucol_greaterOrEqual) +#define ucol_keyHashCode U_ICU_ENTRY_POINT_RENAME(ucol_keyHashCode) +#define ucol_looksLikeCollationBinary U_ICU_ENTRY_POINT_RENAME(ucol_looksLikeCollationBinary) +#define ucol_mergeSortkeys U_ICU_ENTRY_POINT_RENAME(ucol_mergeSortkeys) +#define ucol_next U_ICU_ENTRY_POINT_RENAME(ucol_next) +#define ucol_nextSortKeyPart U_ICU_ENTRY_POINT_RENAME(ucol_nextSortKeyPart) +#define ucol_normalizeShortDefinitionString U_ICU_ENTRY_POINT_RENAME(ucol_normalizeShortDefinitionString) +#define ucol_open U_ICU_ENTRY_POINT_RENAME(ucol_open) +#define ucol_openAvailableLocales U_ICU_ENTRY_POINT_RENAME(ucol_openAvailableLocales) +#define ucol_openBinary U_ICU_ENTRY_POINT_RENAME(ucol_openBinary) +#define ucol_openElements U_ICU_ENTRY_POINT_RENAME(ucol_openElements) +#define ucol_openFromShortString U_ICU_ENTRY_POINT_RENAME(ucol_openFromShortString) +#define ucol_openRules U_ICU_ENTRY_POINT_RENAME(ucol_openRules) +#define ucol_prepareShortStringOpen U_ICU_ENTRY_POINT_RENAME(ucol_prepareShortStringOpen) +#define ucol_previous U_ICU_ENTRY_POINT_RENAME(ucol_previous) +#define ucol_primaryOrder U_ICU_ENTRY_POINT_RENAME(ucol_primaryOrder) +#define ucol_reset U_ICU_ENTRY_POINT_RENAME(ucol_reset) +#define ucol_restoreVariableTop U_ICU_ENTRY_POINT_RENAME(ucol_restoreVariableTop) +#define ucol_safeClone U_ICU_ENTRY_POINT_RENAME(ucol_safeClone) +#define ucol_secondaryOrder U_ICU_ENTRY_POINT_RENAME(ucol_secondaryOrder) +#define ucol_setAttribute U_ICU_ENTRY_POINT_RENAME(ucol_setAttribute) +#define ucol_setMaxVariable U_ICU_ENTRY_POINT_RENAME(ucol_setMaxVariable) +#define ucol_setOffset U_ICU_ENTRY_POINT_RENAME(ucol_setOffset) +#define ucol_setReorderCodes U_ICU_ENTRY_POINT_RENAME(ucol_setReorderCodes) +#define ucol_setStrength U_ICU_ENTRY_POINT_RENAME(ucol_setStrength) +#define ucol_setText U_ICU_ENTRY_POINT_RENAME(ucol_setText) +#define ucol_setVariableTop U_ICU_ENTRY_POINT_RENAME(ucol_setVariableTop) +#define ucol_strcoll U_ICU_ENTRY_POINT_RENAME(ucol_strcoll) +#define ucol_strcollIter U_ICU_ENTRY_POINT_RENAME(ucol_strcollIter) +#define ucol_strcollUTF8 U_ICU_ENTRY_POINT_RENAME(ucol_strcollUTF8) +#define ucol_swap U_ICU_ENTRY_POINT_RENAME(ucol_swap) +#define ucol_swapInverseUCA U_ICU_ENTRY_POINT_RENAME(ucol_swapInverseUCA) +#define ucol_tertiaryOrder U_ICU_ENTRY_POINT_RENAME(ucol_tertiaryOrder) +#define ucsdet_close U_ICU_ENTRY_POINT_RENAME(ucsdet_close) +#define ucsdet_detect U_ICU_ENTRY_POINT_RENAME(ucsdet_detect) +#define ucsdet_detectAll U_ICU_ENTRY_POINT_RENAME(ucsdet_detectAll) +#define ucsdet_enableInputFilter U_ICU_ENTRY_POINT_RENAME(ucsdet_enableInputFilter) +#define ucsdet_getAllDetectableCharsets U_ICU_ENTRY_POINT_RENAME(ucsdet_getAllDetectableCharsets) +#define ucsdet_getConfidence U_ICU_ENTRY_POINT_RENAME(ucsdet_getConfidence) +#define ucsdet_getDetectableCharsets U_ICU_ENTRY_POINT_RENAME(ucsdet_getDetectableCharsets) +#define ucsdet_getLanguage U_ICU_ENTRY_POINT_RENAME(ucsdet_getLanguage) +#define ucsdet_getName U_ICU_ENTRY_POINT_RENAME(ucsdet_getName) +#define ucsdet_getUChars U_ICU_ENTRY_POINT_RENAME(ucsdet_getUChars) +#define ucsdet_isInputFilterEnabled U_ICU_ENTRY_POINT_RENAME(ucsdet_isInputFilterEnabled) +#define ucsdet_open U_ICU_ENTRY_POINT_RENAME(ucsdet_open) +#define ucsdet_setDeclaredEncoding U_ICU_ENTRY_POINT_RENAME(ucsdet_setDeclaredEncoding) +#define ucsdet_setDetectableCharset U_ICU_ENTRY_POINT_RENAME(ucsdet_setDetectableCharset) +#define ucsdet_setText U_ICU_ENTRY_POINT_RENAME(ucsdet_setText) +#define ucurr_countCurrencies U_ICU_ENTRY_POINT_RENAME(ucurr_countCurrencies) +#define ucurr_forLocale U_ICU_ENTRY_POINT_RENAME(ucurr_forLocale) +#define ucurr_forLocaleAndDate U_ICU_ENTRY_POINT_RENAME(ucurr_forLocaleAndDate) +#define ucurr_getDefaultFractionDigits U_ICU_ENTRY_POINT_RENAME(ucurr_getDefaultFractionDigits) +#define ucurr_getDefaultFractionDigitsForUsage U_ICU_ENTRY_POINT_RENAME(ucurr_getDefaultFractionDigitsForUsage) +#define ucurr_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucurr_getKeywordValuesForLocale) +#define ucurr_getName U_ICU_ENTRY_POINT_RENAME(ucurr_getName) +#define ucurr_getNumericCode U_ICU_ENTRY_POINT_RENAME(ucurr_getNumericCode) +#define ucurr_getPluralName U_ICU_ENTRY_POINT_RENAME(ucurr_getPluralName) +#define ucurr_getRoundingIncrement U_ICU_ENTRY_POINT_RENAME(ucurr_getRoundingIncrement) +#define ucurr_getRoundingIncrementForUsage U_ICU_ENTRY_POINT_RENAME(ucurr_getRoundingIncrementForUsage) +#define ucurr_isAvailable U_ICU_ENTRY_POINT_RENAME(ucurr_isAvailable) +#define ucurr_openISOCurrencies U_ICU_ENTRY_POINT_RENAME(ucurr_openISOCurrencies) +#define ucurr_register U_ICU_ENTRY_POINT_RENAME(ucurr_register) +#define ucurr_unregister U_ICU_ENTRY_POINT_RENAME(ucurr_unregister) +#define udat_adoptNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_adoptNumberFormat) +#define udat_adoptNumberFormatForFields U_ICU_ENTRY_POINT_RENAME(udat_adoptNumberFormatForFields) +#define udat_applyPattern U_ICU_ENTRY_POINT_RENAME(udat_applyPattern) +#define udat_applyPatternRelative U_ICU_ENTRY_POINT_RENAME(udat_applyPatternRelative) +#define udat_clone U_ICU_ENTRY_POINT_RENAME(udat_clone) +#define udat_close U_ICU_ENTRY_POINT_RENAME(udat_close) +#define udat_countAvailable U_ICU_ENTRY_POINT_RENAME(udat_countAvailable) +#define udat_countSymbols U_ICU_ENTRY_POINT_RENAME(udat_countSymbols) +#define udat_format U_ICU_ENTRY_POINT_RENAME(udat_format) +#define udat_formatCalendar U_ICU_ENTRY_POINT_RENAME(udat_formatCalendar) +#define udat_formatCalendarForFields U_ICU_ENTRY_POINT_RENAME(udat_formatCalendarForFields) +#define udat_formatForFields U_ICU_ENTRY_POINT_RENAME(udat_formatForFields) +#define udat_get2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_get2DigitYearStart) +#define udat_getAvailable U_ICU_ENTRY_POINT_RENAME(udat_getAvailable) +#define udat_getBooleanAttribute U_ICU_ENTRY_POINT_RENAME(udat_getBooleanAttribute) +#define udat_getCalendar U_ICU_ENTRY_POINT_RENAME(udat_getCalendar) +#define udat_getContext U_ICU_ENTRY_POINT_RENAME(udat_getContext) +#define udat_getLocaleByType U_ICU_ENTRY_POINT_RENAME(udat_getLocaleByType) +#define udat_getNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_getNumberFormat) +#define udat_getNumberFormatForField U_ICU_ENTRY_POINT_RENAME(udat_getNumberFormatForField) +#define udat_getSymbols U_ICU_ENTRY_POINT_RENAME(udat_getSymbols) +#define udat_isLenient U_ICU_ENTRY_POINT_RENAME(udat_isLenient) +#define udat_open U_ICU_ENTRY_POINT_RENAME(udat_open) +#define udat_parse U_ICU_ENTRY_POINT_RENAME(udat_parse) +#define udat_parseCalendar U_ICU_ENTRY_POINT_RENAME(udat_parseCalendar) +#define udat_registerOpener U_ICU_ENTRY_POINT_RENAME(udat_registerOpener) +#define udat_set2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_set2DigitYearStart) +#define udat_setBooleanAttribute U_ICU_ENTRY_POINT_RENAME(udat_setBooleanAttribute) +#define udat_setCalendar U_ICU_ENTRY_POINT_RENAME(udat_setCalendar) +#define udat_setContext U_ICU_ENTRY_POINT_RENAME(udat_setContext) +#define udat_setLenient U_ICU_ENTRY_POINT_RENAME(udat_setLenient) +#define udat_setNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_setNumberFormat) +#define udat_setSymbols U_ICU_ENTRY_POINT_RENAME(udat_setSymbols) +#define udat_toCalendarDateField U_ICU_ENTRY_POINT_RENAME(udat_toCalendarDateField) +#define udat_toPattern U_ICU_ENTRY_POINT_RENAME(udat_toPattern) +#define udat_toPatternRelativeDate U_ICU_ENTRY_POINT_RENAME(udat_toPatternRelativeDate) +#define udat_toPatternRelativeTime U_ICU_ENTRY_POINT_RENAME(udat_toPatternRelativeTime) +#define udat_unregisterOpener U_ICU_ENTRY_POINT_RENAME(udat_unregisterOpener) +#define udata_checkCommonData U_ICU_ENTRY_POINT_RENAME(udata_checkCommonData) +#define udata_close U_ICU_ENTRY_POINT_RENAME(udata_close) +#define udata_closeSwapper U_ICU_ENTRY_POINT_RENAME(udata_closeSwapper) +#define udata_getHeaderSize U_ICU_ENTRY_POINT_RENAME(udata_getHeaderSize) +#define udata_getInfo U_ICU_ENTRY_POINT_RENAME(udata_getInfo) +#define udata_getInfoSize U_ICU_ENTRY_POINT_RENAME(udata_getInfoSize) +#define udata_getLength U_ICU_ENTRY_POINT_RENAME(udata_getLength) +#define udata_getMemory U_ICU_ENTRY_POINT_RENAME(udata_getMemory) +#define udata_getRawMemory U_ICU_ENTRY_POINT_RENAME(udata_getRawMemory) +#define udata_open U_ICU_ENTRY_POINT_RENAME(udata_open) +#define udata_openChoice U_ICU_ENTRY_POINT_RENAME(udata_openChoice) +#define udata_openSwapper U_ICU_ENTRY_POINT_RENAME(udata_openSwapper) +#define udata_openSwapperForInputData U_ICU_ENTRY_POINT_RENAME(udata_openSwapperForInputData) +#define udata_printError U_ICU_ENTRY_POINT_RENAME(udata_printError) +#define udata_readInt16 U_ICU_ENTRY_POINT_RENAME(udata_readInt16) +#define udata_readInt32 U_ICU_ENTRY_POINT_RENAME(udata_readInt32) +#define udata_setAppData U_ICU_ENTRY_POINT_RENAME(udata_setAppData) +#define udata_setCommonData U_ICU_ENTRY_POINT_RENAME(udata_setCommonData) +#define udata_setFileAccess U_ICU_ENTRY_POINT_RENAME(udata_setFileAccess) +#define udata_swapDataHeader U_ICU_ENTRY_POINT_RENAME(udata_swapDataHeader) +#define udata_swapInvStringBlock U_ICU_ENTRY_POINT_RENAME(udata_swapInvStringBlock) +#define udatpg_addPattern U_ICU_ENTRY_POINT_RENAME(udatpg_addPattern) +#define udatpg_clone U_ICU_ENTRY_POINT_RENAME(udatpg_clone) +#define udatpg_close U_ICU_ENTRY_POINT_RENAME(udatpg_close) +#define udatpg_getAppendItemFormat U_ICU_ENTRY_POINT_RENAME(udatpg_getAppendItemFormat) +#define udatpg_getAppendItemName U_ICU_ENTRY_POINT_RENAME(udatpg_getAppendItemName) +#define udatpg_getBaseSkeleton U_ICU_ENTRY_POINT_RENAME(udatpg_getBaseSkeleton) +#define udatpg_getBestPattern U_ICU_ENTRY_POINT_RENAME(udatpg_getBestPattern) +#define udatpg_getBestPatternWithOptions U_ICU_ENTRY_POINT_RENAME(udatpg_getBestPatternWithOptions) +#define udatpg_getDateTimeFormat U_ICU_ENTRY_POINT_RENAME(udatpg_getDateTimeFormat) +#define udatpg_getDecimal U_ICU_ENTRY_POINT_RENAME(udatpg_getDecimal) +#define udatpg_getFieldDisplayName U_ICU_ENTRY_POINT_RENAME(udatpg_getFieldDisplayName) +#define udatpg_getPatternForSkeleton U_ICU_ENTRY_POINT_RENAME(udatpg_getPatternForSkeleton) +#define udatpg_getSkeleton U_ICU_ENTRY_POINT_RENAME(udatpg_getSkeleton) +#define udatpg_open U_ICU_ENTRY_POINT_RENAME(udatpg_open) +#define udatpg_openBaseSkeletons U_ICU_ENTRY_POINT_RENAME(udatpg_openBaseSkeletons) +#define udatpg_openEmpty U_ICU_ENTRY_POINT_RENAME(udatpg_openEmpty) +#define udatpg_openSkeletons U_ICU_ENTRY_POINT_RENAME(udatpg_openSkeletons) +#define udatpg_replaceFieldTypes U_ICU_ENTRY_POINT_RENAME(udatpg_replaceFieldTypes) +#define udatpg_replaceFieldTypesWithOptions U_ICU_ENTRY_POINT_RENAME(udatpg_replaceFieldTypesWithOptions) +#define udatpg_setAppendItemFormat U_ICU_ENTRY_POINT_RENAME(udatpg_setAppendItemFormat) +#define udatpg_setAppendItemName U_ICU_ENTRY_POINT_RENAME(udatpg_setAppendItemName) +#define udatpg_setDateTimeFormat U_ICU_ENTRY_POINT_RENAME(udatpg_setDateTimeFormat) +#define udatpg_setDecimal U_ICU_ENTRY_POINT_RENAME(udatpg_setDecimal) +#define udict_swap U_ICU_ENTRY_POINT_RENAME(udict_swap) +#define udtitvfmt_close U_ICU_ENTRY_POINT_RENAME(udtitvfmt_close) +#define udtitvfmt_format U_ICU_ENTRY_POINT_RENAME(udtitvfmt_format) +#define udtitvfmt_open U_ICU_ENTRY_POINT_RENAME(udtitvfmt_open) +#define uenum_close U_ICU_ENTRY_POINT_RENAME(uenum_close) +#define uenum_count U_ICU_ENTRY_POINT_RENAME(uenum_count) +#define uenum_next U_ICU_ENTRY_POINT_RENAME(uenum_next) +#define uenum_nextDefault U_ICU_ENTRY_POINT_RENAME(uenum_nextDefault) +#define uenum_openCharStringsEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_openCharStringsEnumeration) +#define uenum_openFromStringEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_openFromStringEnumeration) +#define uenum_openUCharStringsEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_openUCharStringsEnumeration) +#define uenum_reset U_ICU_ENTRY_POINT_RENAME(uenum_reset) +#define uenum_unext U_ICU_ENTRY_POINT_RENAME(uenum_unext) +#define uenum_unextDefault U_ICU_ENTRY_POINT_RENAME(uenum_unextDefault) +#define ufieldpositer_close U_ICU_ENTRY_POINT_RENAME(ufieldpositer_close) +#define ufieldpositer_next U_ICU_ENTRY_POINT_RENAME(ufieldpositer_next) +#define ufieldpositer_open U_ICU_ENTRY_POINT_RENAME(ufieldpositer_open) +#define ufile_close_translit U_ICU_ENTRY_POINT_RENAME(ufile_close_translit) +#define ufile_fill_uchar_buffer U_ICU_ENTRY_POINT_RENAME(ufile_fill_uchar_buffer) +#define ufile_flush_io U_ICU_ENTRY_POINT_RENAME(ufile_flush_io) +#define ufile_flush_translit U_ICU_ENTRY_POINT_RENAME(ufile_flush_translit) +#define ufile_getch U_ICU_ENTRY_POINT_RENAME(ufile_getch) +#define ufile_getch32 U_ICU_ENTRY_POINT_RENAME(ufile_getch32) +#define ufmt_64tou U_ICU_ENTRY_POINT_RENAME(ufmt_64tou) +#define ufmt_close U_ICU_ENTRY_POINT_RENAME(ufmt_close) +#define ufmt_defaultCPToUnicode U_ICU_ENTRY_POINT_RENAME(ufmt_defaultCPToUnicode) +#define ufmt_digitvalue U_ICU_ENTRY_POINT_RENAME(ufmt_digitvalue) +#define ufmt_getArrayItemByIndex U_ICU_ENTRY_POINT_RENAME(ufmt_getArrayItemByIndex) +#define ufmt_getArrayLength U_ICU_ENTRY_POINT_RENAME(ufmt_getArrayLength) +#define ufmt_getDate U_ICU_ENTRY_POINT_RENAME(ufmt_getDate) +#define ufmt_getDecNumChars U_ICU_ENTRY_POINT_RENAME(ufmt_getDecNumChars) +#define ufmt_getDouble U_ICU_ENTRY_POINT_RENAME(ufmt_getDouble) +#define ufmt_getInt64 U_ICU_ENTRY_POINT_RENAME(ufmt_getInt64) +#define ufmt_getLong U_ICU_ENTRY_POINT_RENAME(ufmt_getLong) +#define ufmt_getObject U_ICU_ENTRY_POINT_RENAME(ufmt_getObject) +#define ufmt_getType U_ICU_ENTRY_POINT_RENAME(ufmt_getType) +#define ufmt_getUChars U_ICU_ENTRY_POINT_RENAME(ufmt_getUChars) +#define ufmt_isNumeric U_ICU_ENTRY_POINT_RENAME(ufmt_isNumeric) +#define ufmt_isdigit U_ICU_ENTRY_POINT_RENAME(ufmt_isdigit) +#define ufmt_open U_ICU_ENTRY_POINT_RENAME(ufmt_open) +#define ufmt_ptou U_ICU_ENTRY_POINT_RENAME(ufmt_ptou) +#define ufmt_uto64 U_ICU_ENTRY_POINT_RENAME(ufmt_uto64) +#define ufmt_utop U_ICU_ENTRY_POINT_RENAME(ufmt_utop) +#define ugender_getInstance U_ICU_ENTRY_POINT_RENAME(ugender_getInstance) +#define ugender_getListGender U_ICU_ENTRY_POINT_RENAME(ugender_getListGender) +#define uhash_close U_ICU_ENTRY_POINT_RENAME(uhash_close) +#define uhash_compareCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_compareCaselessUnicodeString) +#define uhash_compareChars U_ICU_ENTRY_POINT_RENAME(uhash_compareChars) +#define uhash_compareIChars U_ICU_ENTRY_POINT_RENAME(uhash_compareIChars) +#define uhash_compareLong U_ICU_ENTRY_POINT_RENAME(uhash_compareLong) +#define uhash_compareScriptSet U_ICU_ENTRY_POINT_RENAME(uhash_compareScriptSet) +#define uhash_compareUChars U_ICU_ENTRY_POINT_RENAME(uhash_compareUChars) +#define uhash_compareUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_compareUnicodeString) +#define uhash_count U_ICU_ENTRY_POINT_RENAME(uhash_count) +#define uhash_deleteHashtable U_ICU_ENTRY_POINT_RENAME(uhash_deleteHashtable) +#define uhash_deleteScriptSet U_ICU_ENTRY_POINT_RENAME(uhash_deleteScriptSet) +#define uhash_equals U_ICU_ENTRY_POINT_RENAME(uhash_equals) +#define uhash_equalsScriptSet U_ICU_ENTRY_POINT_RENAME(uhash_equalsScriptSet) +#define uhash_find U_ICU_ENTRY_POINT_RENAME(uhash_find) +#define uhash_get U_ICU_ENTRY_POINT_RENAME(uhash_get) +#define uhash_geti U_ICU_ENTRY_POINT_RENAME(uhash_geti) +#define uhash_hashCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_hashCaselessUnicodeString) +#define uhash_hashChars U_ICU_ENTRY_POINT_RENAME(uhash_hashChars) +#define uhash_hashIChars U_ICU_ENTRY_POINT_RENAME(uhash_hashIChars) +#define uhash_hashLong U_ICU_ENTRY_POINT_RENAME(uhash_hashLong) +#define uhash_hashScriptSet U_ICU_ENTRY_POINT_RENAME(uhash_hashScriptSet) +#define uhash_hashUChars U_ICU_ENTRY_POINT_RENAME(uhash_hashUChars) +#define uhash_hashUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_hashUnicodeString) +#define uhash_iget U_ICU_ENTRY_POINT_RENAME(uhash_iget) +#define uhash_igeti U_ICU_ENTRY_POINT_RENAME(uhash_igeti) +#define uhash_init U_ICU_ENTRY_POINT_RENAME(uhash_init) +#define uhash_initSize U_ICU_ENTRY_POINT_RENAME(uhash_initSize) +#define uhash_iput U_ICU_ENTRY_POINT_RENAME(uhash_iput) +#define uhash_iputi U_ICU_ENTRY_POINT_RENAME(uhash_iputi) +#define uhash_iremove U_ICU_ENTRY_POINT_RENAME(uhash_iremove) +#define uhash_iremovei U_ICU_ENTRY_POINT_RENAME(uhash_iremovei) +#define uhash_nextElement U_ICU_ENTRY_POINT_RENAME(uhash_nextElement) +#define uhash_open U_ICU_ENTRY_POINT_RENAME(uhash_open) +#define uhash_openSize U_ICU_ENTRY_POINT_RENAME(uhash_openSize) +#define uhash_put U_ICU_ENTRY_POINT_RENAME(uhash_put) +#define uhash_puti U_ICU_ENTRY_POINT_RENAME(uhash_puti) +#define uhash_remove U_ICU_ENTRY_POINT_RENAME(uhash_remove) +#define uhash_removeAll U_ICU_ENTRY_POINT_RENAME(uhash_removeAll) +#define uhash_removeElement U_ICU_ENTRY_POINT_RENAME(uhash_removeElement) +#define uhash_removei U_ICU_ENTRY_POINT_RENAME(uhash_removei) +#define uhash_setKeyComparator U_ICU_ENTRY_POINT_RENAME(uhash_setKeyComparator) +#define uhash_setKeyDeleter U_ICU_ENTRY_POINT_RENAME(uhash_setKeyDeleter) +#define uhash_setKeyHasher U_ICU_ENTRY_POINT_RENAME(uhash_setKeyHasher) +#define uhash_setResizePolicy U_ICU_ENTRY_POINT_RENAME(uhash_setResizePolicy) +#define uhash_setValueComparator U_ICU_ENTRY_POINT_RENAME(uhash_setValueComparator) +#define uhash_setValueDeleter U_ICU_ENTRY_POINT_RENAME(uhash_setValueDeleter) +#define uidna_IDNToASCII U_ICU_ENTRY_POINT_RENAME(uidna_IDNToASCII) +#define uidna_IDNToUnicode U_ICU_ENTRY_POINT_RENAME(uidna_IDNToUnicode) +#define uidna_close U_ICU_ENTRY_POINT_RENAME(uidna_close) +#define uidna_compare U_ICU_ENTRY_POINT_RENAME(uidna_compare) +#define uidna_labelToASCII U_ICU_ENTRY_POINT_RENAME(uidna_labelToASCII) +#define uidna_labelToASCII_UTF8 U_ICU_ENTRY_POINT_RENAME(uidna_labelToASCII_UTF8) +#define uidna_labelToUnicode U_ICU_ENTRY_POINT_RENAME(uidna_labelToUnicode) +#define uidna_labelToUnicodeUTF8 U_ICU_ENTRY_POINT_RENAME(uidna_labelToUnicodeUTF8) +#define uidna_nameToASCII U_ICU_ENTRY_POINT_RENAME(uidna_nameToASCII) +#define uidna_nameToASCII_UTF8 U_ICU_ENTRY_POINT_RENAME(uidna_nameToASCII_UTF8) +#define uidna_nameToUnicode U_ICU_ENTRY_POINT_RENAME(uidna_nameToUnicode) +#define uidna_nameToUnicodeUTF8 U_ICU_ENTRY_POINT_RENAME(uidna_nameToUnicodeUTF8) +#define uidna_openUTS46 U_ICU_ENTRY_POINT_RENAME(uidna_openUTS46) +#define uidna_toASCII U_ICU_ENTRY_POINT_RENAME(uidna_toASCII) +#define uidna_toUnicode U_ICU_ENTRY_POINT_RENAME(uidna_toUnicode) +#define uiter_current32 U_ICU_ENTRY_POINT_RENAME(uiter_current32) +#define uiter_getState U_ICU_ENTRY_POINT_RENAME(uiter_getState) +#define uiter_next32 U_ICU_ENTRY_POINT_RENAME(uiter_next32) +#define uiter_previous32 U_ICU_ENTRY_POINT_RENAME(uiter_previous32) +#define uiter_setCharacterIterator U_ICU_ENTRY_POINT_RENAME(uiter_setCharacterIterator) +#define uiter_setReplaceable U_ICU_ENTRY_POINT_RENAME(uiter_setReplaceable) +#define uiter_setState U_ICU_ENTRY_POINT_RENAME(uiter_setState) +#define uiter_setString U_ICU_ENTRY_POINT_RENAME(uiter_setString) +#define uiter_setUTF16BE U_ICU_ENTRY_POINT_RENAME(uiter_setUTF16BE) +#define uiter_setUTF8 U_ICU_ENTRY_POINT_RENAME(uiter_setUTF8) +#define uldn_close U_ICU_ENTRY_POINT_RENAME(uldn_close) +#define uldn_getContext U_ICU_ENTRY_POINT_RENAME(uldn_getContext) +#define uldn_getDialectHandling U_ICU_ENTRY_POINT_RENAME(uldn_getDialectHandling) +#define uldn_getLocale U_ICU_ENTRY_POINT_RENAME(uldn_getLocale) +#define uldn_keyDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_keyDisplayName) +#define uldn_keyValueDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_keyValueDisplayName) +#define uldn_languageDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_languageDisplayName) +#define uldn_localeDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_localeDisplayName) +#define uldn_open U_ICU_ENTRY_POINT_RENAME(uldn_open) +#define uldn_openForContext U_ICU_ENTRY_POINT_RENAME(uldn_openForContext) +#define uldn_regionDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_regionDisplayName) +#define uldn_scriptCodeDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_scriptCodeDisplayName) +#define uldn_scriptDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_scriptDisplayName) +#define uldn_variantDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_variantDisplayName) +#define ulist_addItemBeginList U_ICU_ENTRY_POINT_RENAME(ulist_addItemBeginList) +#define ulist_addItemEndList U_ICU_ENTRY_POINT_RENAME(ulist_addItemEndList) +#define ulist_close_keyword_values_iterator U_ICU_ENTRY_POINT_RENAME(ulist_close_keyword_values_iterator) +#define ulist_containsString U_ICU_ENTRY_POINT_RENAME(ulist_containsString) +#define ulist_count_keyword_values U_ICU_ENTRY_POINT_RENAME(ulist_count_keyword_values) +#define ulist_createEmptyList U_ICU_ENTRY_POINT_RENAME(ulist_createEmptyList) +#define ulist_deleteList U_ICU_ENTRY_POINT_RENAME(ulist_deleteList) +#define ulist_getListFromEnum U_ICU_ENTRY_POINT_RENAME(ulist_getListFromEnum) +#define ulist_getListSize U_ICU_ENTRY_POINT_RENAME(ulist_getListSize) +#define ulist_getNext U_ICU_ENTRY_POINT_RENAME(ulist_getNext) +#define ulist_next_keyword_value U_ICU_ENTRY_POINT_RENAME(ulist_next_keyword_value) +#define ulist_removeString U_ICU_ENTRY_POINT_RENAME(ulist_removeString) +#define ulist_resetList U_ICU_ENTRY_POINT_RENAME(ulist_resetList) +#define ulist_reset_keyword_values_iterator U_ICU_ENTRY_POINT_RENAME(ulist_reset_keyword_values_iterator) +#define ulistfmt_close U_ICU_ENTRY_POINT_RENAME(ulistfmt_close) +#define ulistfmt_format U_ICU_ENTRY_POINT_RENAME(ulistfmt_format) +#define ulistfmt_open U_ICU_ENTRY_POINT_RENAME(ulistfmt_open) +#define uloc_acceptLanguage U_ICU_ENTRY_POINT_RENAME(uloc_acceptLanguage) +#define uloc_acceptLanguageFromHTTP U_ICU_ENTRY_POINT_RENAME(uloc_acceptLanguageFromHTTP) +#define uloc_addLikelySubtags U_ICU_ENTRY_POINT_RENAME(uloc_addLikelySubtags) +#define uloc_canonicalize U_ICU_ENTRY_POINT_RENAME(uloc_canonicalize) +#define uloc_countAvailable U_ICU_ENTRY_POINT_RENAME(uloc_countAvailable) +#define uloc_forLanguageTag U_ICU_ENTRY_POINT_RENAME(uloc_forLanguageTag) +#define uloc_getAvailable U_ICU_ENTRY_POINT_RENAME(uloc_getAvailable) +#define uloc_getBaseName U_ICU_ENTRY_POINT_RENAME(uloc_getBaseName) +#define uloc_getCharacterOrientation U_ICU_ENTRY_POINT_RENAME(uloc_getCharacterOrientation) +#define uloc_getCountry U_ICU_ENTRY_POINT_RENAME(uloc_getCountry) +#define uloc_getCurrentCountryID U_ICU_ENTRY_POINT_RENAME(uloc_getCurrentCountryID) +#define uloc_getCurrentLanguageID U_ICU_ENTRY_POINT_RENAME(uloc_getCurrentLanguageID) +#define uloc_getDefault U_ICU_ENTRY_POINT_RENAME(uloc_getDefault) +#define uloc_getDisplayCountry U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayCountry) +#define uloc_getDisplayKeyword U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayKeyword) +#define uloc_getDisplayKeywordValue U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayKeywordValue) +#define uloc_getDisplayLanguage U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayLanguage) +#define uloc_getDisplayName U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayName) +#define uloc_getDisplayScript U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayScript) +#define uloc_getDisplayScriptInContext U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayScriptInContext) +#define uloc_getDisplayVariant U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayVariant) +#define uloc_getISO3Country U_ICU_ENTRY_POINT_RENAME(uloc_getISO3Country) +#define uloc_getISO3Language U_ICU_ENTRY_POINT_RENAME(uloc_getISO3Language) +#define uloc_getISOCountries U_ICU_ENTRY_POINT_RENAME(uloc_getISOCountries) +#define uloc_getISOLanguages U_ICU_ENTRY_POINT_RENAME(uloc_getISOLanguages) +#define uloc_getKeywordValue U_ICU_ENTRY_POINT_RENAME(uloc_getKeywordValue) +#define uloc_getLCID U_ICU_ENTRY_POINT_RENAME(uloc_getLCID) +#define uloc_getLanguage U_ICU_ENTRY_POINT_RENAME(uloc_getLanguage) +#define uloc_getLineOrientation U_ICU_ENTRY_POINT_RENAME(uloc_getLineOrientation) +#define uloc_getLocaleForLCID U_ICU_ENTRY_POINT_RENAME(uloc_getLocaleForLCID) +#define uloc_getName U_ICU_ENTRY_POINT_RENAME(uloc_getName) +#define uloc_getParent U_ICU_ENTRY_POINT_RENAME(uloc_getParent) +#define uloc_getScript U_ICU_ENTRY_POINT_RENAME(uloc_getScript) +#define uloc_getTableStringWithFallback U_ICU_ENTRY_POINT_RENAME(uloc_getTableStringWithFallback) +#define uloc_getVariant U_ICU_ENTRY_POINT_RENAME(uloc_getVariant) +#define uloc_isRightToLeft U_ICU_ENTRY_POINT_RENAME(uloc_isRightToLeft) +#define uloc_minimizeSubtags U_ICU_ENTRY_POINT_RENAME(uloc_minimizeSubtags) +#define uloc_openKeywordList U_ICU_ENTRY_POINT_RENAME(uloc_openKeywordList) +#define uloc_openKeywords U_ICU_ENTRY_POINT_RENAME(uloc_openKeywords) +#define uloc_setDefault U_ICU_ENTRY_POINT_RENAME(uloc_setDefault) +#define uloc_setKeywordValue U_ICU_ENTRY_POINT_RENAME(uloc_setKeywordValue) +#define uloc_toLanguageTag U_ICU_ENTRY_POINT_RENAME(uloc_toLanguageTag) +#define uloc_toLegacyKey U_ICU_ENTRY_POINT_RENAME(uloc_toLegacyKey) +#define uloc_toLegacyType U_ICU_ENTRY_POINT_RENAME(uloc_toLegacyType) +#define uloc_toUnicodeLocaleKey U_ICU_ENTRY_POINT_RENAME(uloc_toUnicodeLocaleKey) +#define uloc_toUnicodeLocaleType U_ICU_ENTRY_POINT_RENAME(uloc_toUnicodeLocaleType) +#define ulocdata_close U_ICU_ENTRY_POINT_RENAME(ulocdata_close) +#define ulocdata_getCLDRVersion U_ICU_ENTRY_POINT_RENAME(ulocdata_getCLDRVersion) +#define ulocdata_getDelimiter U_ICU_ENTRY_POINT_RENAME(ulocdata_getDelimiter) +#define ulocdata_getExemplarSet U_ICU_ENTRY_POINT_RENAME(ulocdata_getExemplarSet) +#define ulocdata_getLocaleDisplayPattern U_ICU_ENTRY_POINT_RENAME(ulocdata_getLocaleDisplayPattern) +#define ulocdata_getLocaleSeparator U_ICU_ENTRY_POINT_RENAME(ulocdata_getLocaleSeparator) +#define ulocdata_getMeasurementSystem U_ICU_ENTRY_POINT_RENAME(ulocdata_getMeasurementSystem) +#define ulocdata_getNoSubstitute U_ICU_ENTRY_POINT_RENAME(ulocdata_getNoSubstitute) +#define ulocdata_getPaperSize U_ICU_ENTRY_POINT_RENAME(ulocdata_getPaperSize) +#define ulocdata_open U_ICU_ENTRY_POINT_RENAME(ulocdata_open) +#define ulocdata_setNoSubstitute U_ICU_ENTRY_POINT_RENAME(ulocdata_setNoSubstitute) +#define ulocimp_getCountry U_ICU_ENTRY_POINT_RENAME(ulocimp_getCountry) +#define ulocimp_getLanguage U_ICU_ENTRY_POINT_RENAME(ulocimp_getLanguage) +#define ulocimp_getRegionForSupplementalData U_ICU_ENTRY_POINT_RENAME(ulocimp_getRegionForSupplementalData) +#define ulocimp_getScript U_ICU_ENTRY_POINT_RENAME(ulocimp_getScript) +#define ulocimp_toBcpKey U_ICU_ENTRY_POINT_RENAME(ulocimp_toBcpKey) +#define ulocimp_toBcpType U_ICU_ENTRY_POINT_RENAME(ulocimp_toBcpType) +#define ulocimp_toLegacyKey U_ICU_ENTRY_POINT_RENAME(ulocimp_toLegacyKey) +#define ulocimp_toLegacyType U_ICU_ENTRY_POINT_RENAME(ulocimp_toLegacyType) +#define ultag_isUnicodeLocaleKey U_ICU_ENTRY_POINT_RENAME(ultag_isUnicodeLocaleKey) +#define ultag_isUnicodeLocaleType U_ICU_ENTRY_POINT_RENAME(ultag_isUnicodeLocaleType) +#define umsg_applyPattern U_ICU_ENTRY_POINT_RENAME(umsg_applyPattern) +#define umsg_autoQuoteApostrophe U_ICU_ENTRY_POINT_RENAME(umsg_autoQuoteApostrophe) +#define umsg_clone U_ICU_ENTRY_POINT_RENAME(umsg_clone) +#define umsg_close U_ICU_ENTRY_POINT_RENAME(umsg_close) +#define umsg_format U_ICU_ENTRY_POINT_RENAME(umsg_format) +#define umsg_getLocale U_ICU_ENTRY_POINT_RENAME(umsg_getLocale) +#define umsg_open U_ICU_ENTRY_POINT_RENAME(umsg_open) +#define umsg_parse U_ICU_ENTRY_POINT_RENAME(umsg_parse) +#define umsg_setLocale U_ICU_ENTRY_POINT_RENAME(umsg_setLocale) +#define umsg_toPattern U_ICU_ENTRY_POINT_RENAME(umsg_toPattern) +#define umsg_vformat U_ICU_ENTRY_POINT_RENAME(umsg_vformat) +#define umsg_vparse U_ICU_ENTRY_POINT_RENAME(umsg_vparse) +#define umtx_condBroadcast U_ICU_ENTRY_POINT_RENAME(umtx_condBroadcast) +#define umtx_condSignal U_ICU_ENTRY_POINT_RENAME(umtx_condSignal) +#define umtx_condWait U_ICU_ENTRY_POINT_RENAME(umtx_condWait) +#define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock) +#define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock) +#define uniset_getUnicode32Instance U_ICU_ENTRY_POINT_RENAME(uniset_getUnicode32Instance) +#define unorm2_append U_ICU_ENTRY_POINT_RENAME(unorm2_append) +#define unorm2_close U_ICU_ENTRY_POINT_RENAME(unorm2_close) +#define unorm2_composePair U_ICU_ENTRY_POINT_RENAME(unorm2_composePair) +#define unorm2_getCombiningClass U_ICU_ENTRY_POINT_RENAME(unorm2_getCombiningClass) +#define unorm2_getDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getDecomposition) +#define unorm2_getInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getInstance) +#define unorm2_getNFCInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFCInstance) +#define unorm2_getNFDInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFDInstance) +#define unorm2_getNFKCCasefoldInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKCCasefoldInstance) +#define unorm2_getNFKCInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKCInstance) +#define unorm2_getNFKDInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKDInstance) +#define unorm2_getRawDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getRawDecomposition) +#define unorm2_hasBoundaryAfter U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundaryAfter) +#define unorm2_hasBoundaryBefore U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundaryBefore) +#define unorm2_isInert U_ICU_ENTRY_POINT_RENAME(unorm2_isInert) +#define unorm2_isNormalized U_ICU_ENTRY_POINT_RENAME(unorm2_isNormalized) +#define unorm2_normalize U_ICU_ENTRY_POINT_RENAME(unorm2_normalize) +#define unorm2_normalizeSecondAndAppend U_ICU_ENTRY_POINT_RENAME(unorm2_normalizeSecondAndAppend) +#define unorm2_openFiltered U_ICU_ENTRY_POINT_RENAME(unorm2_openFiltered) +#define unorm2_quickCheck U_ICU_ENTRY_POINT_RENAME(unorm2_quickCheck) +#define unorm2_spanQuickCheckYes U_ICU_ENTRY_POINT_RENAME(unorm2_spanQuickCheckYes) +#define unorm2_swap U_ICU_ENTRY_POINT_RENAME(unorm2_swap) +#define unorm_compare U_ICU_ENTRY_POINT_RENAME(unorm_compare) +#define unorm_concatenate U_ICU_ENTRY_POINT_RENAME(unorm_concatenate) +#define unorm_getFCD16 U_ICU_ENTRY_POINT_RENAME(unorm_getFCD16) +#define unorm_getQuickCheck U_ICU_ENTRY_POINT_RENAME(unorm_getQuickCheck) +#define unorm_isNormalized U_ICU_ENTRY_POINT_RENAME(unorm_isNormalized) +#define unorm_isNormalizedWithOptions U_ICU_ENTRY_POINT_RENAME(unorm_isNormalizedWithOptions) +#define unorm_next U_ICU_ENTRY_POINT_RENAME(unorm_next) +#define unorm_normalize U_ICU_ENTRY_POINT_RENAME(unorm_normalize) +#define unorm_previous U_ICU_ENTRY_POINT_RENAME(unorm_previous) +#define unorm_quickCheck U_ICU_ENTRY_POINT_RENAME(unorm_quickCheck) +#define unorm_quickCheckWithOptions U_ICU_ENTRY_POINT_RENAME(unorm_quickCheckWithOptions) +#define unum_applyPattern U_ICU_ENTRY_POINT_RENAME(unum_applyPattern) +#define unum_clone U_ICU_ENTRY_POINT_RENAME(unum_clone) +#define unum_close U_ICU_ENTRY_POINT_RENAME(unum_close) +#define unum_countAvailable U_ICU_ENTRY_POINT_RENAME(unum_countAvailable) +#define unum_format U_ICU_ENTRY_POINT_RENAME(unum_format) +#define unum_formatDecimal U_ICU_ENTRY_POINT_RENAME(unum_formatDecimal) +#define unum_formatDouble U_ICU_ENTRY_POINT_RENAME(unum_formatDouble) +#define unum_formatDoubleCurrency U_ICU_ENTRY_POINT_RENAME(unum_formatDoubleCurrency) +#define unum_formatDoubleForFields U_ICU_ENTRY_POINT_RENAME(unum_formatDoubleForFields) +#define unum_formatInt64 U_ICU_ENTRY_POINT_RENAME(unum_formatInt64) +#define unum_formatUFormattable U_ICU_ENTRY_POINT_RENAME(unum_formatUFormattable) +#define unum_getAttribute U_ICU_ENTRY_POINT_RENAME(unum_getAttribute) +#define unum_getAvailable U_ICU_ENTRY_POINT_RENAME(unum_getAvailable) +#define unum_getContext U_ICU_ENTRY_POINT_RENAME(unum_getContext) +#define unum_getDoubleAttribute U_ICU_ENTRY_POINT_RENAME(unum_getDoubleAttribute) +#define unum_getLocaleByType U_ICU_ENTRY_POINT_RENAME(unum_getLocaleByType) +#define unum_getSymbol U_ICU_ENTRY_POINT_RENAME(unum_getSymbol) +#define unum_getTextAttribute U_ICU_ENTRY_POINT_RENAME(unum_getTextAttribute) +#define unum_open U_ICU_ENTRY_POINT_RENAME(unum_open) +#define unum_parse U_ICU_ENTRY_POINT_RENAME(unum_parse) +#define unum_parseDecimal U_ICU_ENTRY_POINT_RENAME(unum_parseDecimal) +#define unum_parseDouble U_ICU_ENTRY_POINT_RENAME(unum_parseDouble) +#define unum_parseDoubleCurrency U_ICU_ENTRY_POINT_RENAME(unum_parseDoubleCurrency) +#define unum_parseInt64 U_ICU_ENTRY_POINT_RENAME(unum_parseInt64) +#define unum_parseToUFormattable U_ICU_ENTRY_POINT_RENAME(unum_parseToUFormattable) +#define unum_setAttribute U_ICU_ENTRY_POINT_RENAME(unum_setAttribute) +#define unum_setContext U_ICU_ENTRY_POINT_RENAME(unum_setContext) +#define unum_setDoubleAttribute U_ICU_ENTRY_POINT_RENAME(unum_setDoubleAttribute) +#define unum_setSymbol U_ICU_ENTRY_POINT_RENAME(unum_setSymbol) +#define unum_setTextAttribute U_ICU_ENTRY_POINT_RENAME(unum_setTextAttribute) +#define unum_toPattern U_ICU_ENTRY_POINT_RENAME(unum_toPattern) +#define unumsys_close U_ICU_ENTRY_POINT_RENAME(unumsys_close) +#define unumsys_getDescription U_ICU_ENTRY_POINT_RENAME(unumsys_getDescription) +#define unumsys_getName U_ICU_ENTRY_POINT_RENAME(unumsys_getName) +#define unumsys_getRadix U_ICU_ENTRY_POINT_RENAME(unumsys_getRadix) +#define unumsys_isAlgorithmic U_ICU_ENTRY_POINT_RENAME(unumsys_isAlgorithmic) +#define unumsys_open U_ICU_ENTRY_POINT_RENAME(unumsys_open) +#define unumsys_openAvailableNames U_ICU_ENTRY_POINT_RENAME(unumsys_openAvailableNames) +#define unumsys_openByName U_ICU_ENTRY_POINT_RENAME(unumsys_openByName) +#define uplrules_close U_ICU_ENTRY_POINT_RENAME(uplrules_close) +#define uplrules_getKeywords U_ICU_ENTRY_POINT_RENAME(uplrules_getKeywords) +#define uplrules_open U_ICU_ENTRY_POINT_RENAME(uplrules_open) +#define uplrules_openForType U_ICU_ENTRY_POINT_RENAME(uplrules_openForType) +#define uplrules_select U_ICU_ENTRY_POINT_RENAME(uplrules_select) +#define uplrules_selectWithFormat U_ICU_ENTRY_POINT_RENAME(uplrules_selectWithFormat) +#define uplug_closeLibrary U_ICU_ENTRY_POINT_RENAME(uplug_closeLibrary) +#define uplug_findLibrary U_ICU_ENTRY_POINT_RENAME(uplug_findLibrary) +#define uplug_getConfiguration U_ICU_ENTRY_POINT_RENAME(uplug_getConfiguration) +#define uplug_getContext U_ICU_ENTRY_POINT_RENAME(uplug_getContext) +#define uplug_getCurrentLevel U_ICU_ENTRY_POINT_RENAME(uplug_getCurrentLevel) +#define uplug_getLibrary U_ICU_ENTRY_POINT_RENAME(uplug_getLibrary) +#define uplug_getLibraryName U_ICU_ENTRY_POINT_RENAME(uplug_getLibraryName) +#define uplug_getPlugInternal U_ICU_ENTRY_POINT_RENAME(uplug_getPlugInternal) +#define uplug_getPlugLevel U_ICU_ENTRY_POINT_RENAME(uplug_getPlugLevel) +#define uplug_getPlugLoadStatus U_ICU_ENTRY_POINT_RENAME(uplug_getPlugLoadStatus) +#define uplug_getPlugName U_ICU_ENTRY_POINT_RENAME(uplug_getPlugName) +#define uplug_getPluginFile U_ICU_ENTRY_POINT_RENAME(uplug_getPluginFile) +#define uplug_getSymbolName U_ICU_ENTRY_POINT_RENAME(uplug_getSymbolName) +#define uplug_init U_ICU_ENTRY_POINT_RENAME(uplug_init) +#define uplug_loadPlugFromEntrypoint U_ICU_ENTRY_POINT_RENAME(uplug_loadPlugFromEntrypoint) +#define uplug_loadPlugFromLibrary U_ICU_ENTRY_POINT_RENAME(uplug_loadPlugFromLibrary) +#define uplug_nextPlug U_ICU_ENTRY_POINT_RENAME(uplug_nextPlug) +#define uplug_openLibrary U_ICU_ENTRY_POINT_RENAME(uplug_openLibrary) +#define uplug_removePlug U_ICU_ENTRY_POINT_RENAME(uplug_removePlug) +#define uplug_setContext U_ICU_ENTRY_POINT_RENAME(uplug_setContext) +#define uplug_setPlugLevel U_ICU_ENTRY_POINT_RENAME(uplug_setPlugLevel) +#define uplug_setPlugName U_ICU_ENTRY_POINT_RENAME(uplug_setPlugName) +#define uplug_setPlugNoUnload U_ICU_ENTRY_POINT_RENAME(uplug_setPlugNoUnload) +#define uprops_getSource U_ICU_ENTRY_POINT_RENAME(uprops_getSource) +#define upropsvec_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(upropsvec_addPropertyStarts) +#define uprv_aestrncpy U_ICU_ENTRY_POINT_RENAME(uprv_aestrncpy) +#define uprv_asciiFromEbcdic U_ICU_ENTRY_POINT_RENAME(uprv_asciiFromEbcdic) +#define uprv_asciitolower U_ICU_ENTRY_POINT_RENAME(uprv_asciitolower) +#define uprv_calloc U_ICU_ENTRY_POINT_RENAME(uprv_calloc) +#define uprv_ceil U_ICU_ENTRY_POINT_RENAME(uprv_ceil) +#define uprv_compareASCIIPropertyNames U_ICU_ENTRY_POINT_RENAME(uprv_compareASCIIPropertyNames) +#define uprv_compareEBCDICPropertyNames U_ICU_ENTRY_POINT_RENAME(uprv_compareEBCDICPropertyNames) +#define uprv_compareInvAscii U_ICU_ENTRY_POINT_RENAME(uprv_compareInvAscii) +#define uprv_compareInvEbcdic U_ICU_ENTRY_POINT_RENAME(uprv_compareInvEbcdic) +#define uprv_compareInvEbcdicAsAscii U_ICU_ENTRY_POINT_RENAME(uprv_compareInvEbcdicAsAscii) +#define uprv_convertToLCID U_ICU_ENTRY_POINT_RENAME(uprv_convertToLCID) +#define uprv_convertToLCIDPlatform U_ICU_ENTRY_POINT_RENAME(uprv_convertToLCIDPlatform) +#define uprv_convertToPosix U_ICU_ENTRY_POINT_RENAME(uprv_convertToPosix) +#define uprv_copyAscii U_ICU_ENTRY_POINT_RENAME(uprv_copyAscii) +#define uprv_copyEbcdic U_ICU_ENTRY_POINT_RENAME(uprv_copyEbcdic) +#define uprv_decContextClearStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextClearStatus) +#define uprv_decContextDefault U_ICU_ENTRY_POINT_RENAME(uprv_decContextDefault) +#define uprv_decContextGetRounding U_ICU_ENTRY_POINT_RENAME(uprv_decContextGetRounding) +#define uprv_decContextGetStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextGetStatus) +#define uprv_decContextRestoreStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextRestoreStatus) +#define uprv_decContextSaveStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextSaveStatus) +#define uprv_decContextSetRounding U_ICU_ENTRY_POINT_RENAME(uprv_decContextSetRounding) +#define uprv_decContextSetStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextSetStatus) +#define uprv_decContextSetStatusFromString U_ICU_ENTRY_POINT_RENAME(uprv_decContextSetStatusFromString) +#define uprv_decContextSetStatusFromStringQuiet U_ICU_ENTRY_POINT_RENAME(uprv_decContextSetStatusFromStringQuiet) +#define uprv_decContextSetStatusQuiet U_ICU_ENTRY_POINT_RENAME(uprv_decContextSetStatusQuiet) +#define uprv_decContextStatusToString U_ICU_ENTRY_POINT_RENAME(uprv_decContextStatusToString) +#define uprv_decContextTestSavedStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextTestSavedStatus) +#define uprv_decContextTestStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextTestStatus) +#define uprv_decContextZeroStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextZeroStatus) +#define uprv_decNumberAbs U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAbs) +#define uprv_decNumberAdd U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAdd) +#define uprv_decNumberAnd U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAnd) +#define uprv_decNumberClass U_ICU_ENTRY_POINT_RENAME(uprv_decNumberClass) +#define uprv_decNumberClassToString U_ICU_ENTRY_POINT_RENAME(uprv_decNumberClassToString) +#define uprv_decNumberCompare U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCompare) +#define uprv_decNumberCompareSignal U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCompareSignal) +#define uprv_decNumberCompareTotal U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCompareTotal) +#define uprv_decNumberCompareTotalMag U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCompareTotalMag) +#define uprv_decNumberCopy U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCopy) +#define uprv_decNumberCopyAbs U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCopyAbs) +#define uprv_decNumberCopyNegate U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCopyNegate) +#define uprv_decNumberCopySign U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCopySign) +#define uprv_decNumberDivide U_ICU_ENTRY_POINT_RENAME(uprv_decNumberDivide) +#define uprv_decNumberDivideInteger U_ICU_ENTRY_POINT_RENAME(uprv_decNumberDivideInteger) +#define uprv_decNumberExp U_ICU_ENTRY_POINT_RENAME(uprv_decNumberExp) +#define uprv_decNumberFMA U_ICU_ENTRY_POINT_RENAME(uprv_decNumberFMA) +#define uprv_decNumberFromInt32 U_ICU_ENTRY_POINT_RENAME(uprv_decNumberFromInt32) +#define uprv_decNumberFromString U_ICU_ENTRY_POINT_RENAME(uprv_decNumberFromString) +#define uprv_decNumberFromUInt32 U_ICU_ENTRY_POINT_RENAME(uprv_decNumberFromUInt32) +#define uprv_decNumberGetBCD U_ICU_ENTRY_POINT_RENAME(uprv_decNumberGetBCD) +#define uprv_decNumberInvert U_ICU_ENTRY_POINT_RENAME(uprv_decNumberInvert) +#define uprv_decNumberIsNormal U_ICU_ENTRY_POINT_RENAME(uprv_decNumberIsNormal) +#define uprv_decNumberIsSubnormal U_ICU_ENTRY_POINT_RENAME(uprv_decNumberIsSubnormal) +#define uprv_decNumberLn U_ICU_ENTRY_POINT_RENAME(uprv_decNumberLn) +#define uprv_decNumberLog10 U_ICU_ENTRY_POINT_RENAME(uprv_decNumberLog10) +#define uprv_decNumberLogB U_ICU_ENTRY_POINT_RENAME(uprv_decNumberLogB) +#define uprv_decNumberMax U_ICU_ENTRY_POINT_RENAME(uprv_decNumberMax) +#define uprv_decNumberMaxMag U_ICU_ENTRY_POINT_RENAME(uprv_decNumberMaxMag) +#define uprv_decNumberMin U_ICU_ENTRY_POINT_RENAME(uprv_decNumberMin) +#define uprv_decNumberMinMag U_ICU_ENTRY_POINT_RENAME(uprv_decNumberMinMag) +#define uprv_decNumberMinus U_ICU_ENTRY_POINT_RENAME(uprv_decNumberMinus) +#define uprv_decNumberMultiply U_ICU_ENTRY_POINT_RENAME(uprv_decNumberMultiply) +#define uprv_decNumberNextMinus U_ICU_ENTRY_POINT_RENAME(uprv_decNumberNextMinus) +#define uprv_decNumberNextPlus U_ICU_ENTRY_POINT_RENAME(uprv_decNumberNextPlus) +#define uprv_decNumberNextToward U_ICU_ENTRY_POINT_RENAME(uprv_decNumberNextToward) +#define uprv_decNumberNormalize U_ICU_ENTRY_POINT_RENAME(uprv_decNumberNormalize) +#define uprv_decNumberOr U_ICU_ENTRY_POINT_RENAME(uprv_decNumberOr) +#define uprv_decNumberPlus U_ICU_ENTRY_POINT_RENAME(uprv_decNumberPlus) +#define uprv_decNumberPower U_ICU_ENTRY_POINT_RENAME(uprv_decNumberPower) +#define uprv_decNumberQuantize U_ICU_ENTRY_POINT_RENAME(uprv_decNumberQuantize) +#define uprv_decNumberReduce U_ICU_ENTRY_POINT_RENAME(uprv_decNumberReduce) +#define uprv_decNumberRemainder U_ICU_ENTRY_POINT_RENAME(uprv_decNumberRemainder) +#define uprv_decNumberRemainderNear U_ICU_ENTRY_POINT_RENAME(uprv_decNumberRemainderNear) +#define uprv_decNumberRescale U_ICU_ENTRY_POINT_RENAME(uprv_decNumberRescale) +#define uprv_decNumberRotate U_ICU_ENTRY_POINT_RENAME(uprv_decNumberRotate) +#define uprv_decNumberSameQuantum U_ICU_ENTRY_POINT_RENAME(uprv_decNumberSameQuantum) +#define uprv_decNumberScaleB U_ICU_ENTRY_POINT_RENAME(uprv_decNumberScaleB) +#define uprv_decNumberSetBCD U_ICU_ENTRY_POINT_RENAME(uprv_decNumberSetBCD) +#define uprv_decNumberShift U_ICU_ENTRY_POINT_RENAME(uprv_decNumberShift) +#define uprv_decNumberSquareRoot U_ICU_ENTRY_POINT_RENAME(uprv_decNumberSquareRoot) +#define uprv_decNumberSubtract U_ICU_ENTRY_POINT_RENAME(uprv_decNumberSubtract) +#define uprv_decNumberToEngString U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToEngString) +#define uprv_decNumberToInt32 U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToInt32) +#define uprv_decNumberToIntegralExact U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToIntegralExact) +#define uprv_decNumberToIntegralValue U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToIntegralValue) +#define uprv_decNumberToString U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToString) +#define uprv_decNumberToUInt32 U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToUInt32) +#define uprv_decNumberTrim U_ICU_ENTRY_POINT_RENAME(uprv_decNumberTrim) +#define uprv_decNumberVersion U_ICU_ENTRY_POINT_RENAME(uprv_decNumberVersion) +#define uprv_decNumberXor U_ICU_ENTRY_POINT_RENAME(uprv_decNumberXor) +#define uprv_decNumberZero U_ICU_ENTRY_POINT_RENAME(uprv_decNumberZero) +#define uprv_deleteConditionalCE32 U_ICU_ENTRY_POINT_RENAME(uprv_deleteConditionalCE32) +#define uprv_deleteUObject U_ICU_ENTRY_POINT_RENAME(uprv_deleteUObject) +#define uprv_dl_close U_ICU_ENTRY_POINT_RENAME(uprv_dl_close) +#define uprv_dl_open U_ICU_ENTRY_POINT_RENAME(uprv_dl_open) +#define uprv_dlsym_func U_ICU_ENTRY_POINT_RENAME(uprv_dlsym_func) +#define uprv_eastrncpy U_ICU_ENTRY_POINT_RENAME(uprv_eastrncpy) +#define uprv_ebcdicFromAscii U_ICU_ENTRY_POINT_RENAME(uprv_ebcdicFromAscii) +#define uprv_ebcdicToLowercaseAscii U_ICU_ENTRY_POINT_RENAME(uprv_ebcdicToLowercaseAscii) +#define uprv_ebcdictolower U_ICU_ENTRY_POINT_RENAME(uprv_ebcdictolower) +#define uprv_fabs U_ICU_ENTRY_POINT_RENAME(uprv_fabs) +#define uprv_floor U_ICU_ENTRY_POINT_RENAME(uprv_floor) +#define uprv_fmax U_ICU_ENTRY_POINT_RENAME(uprv_fmax) +#define uprv_fmin U_ICU_ENTRY_POINT_RENAME(uprv_fmin) +#define uprv_fmod U_ICU_ENTRY_POINT_RENAME(uprv_fmod) +#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free) +#define uprv_getCharNameCharacters U_ICU_ENTRY_POINT_RENAME(uprv_getCharNameCharacters) +#define uprv_getDefaultCodepage U_ICU_ENTRY_POINT_RENAME(uprv_getDefaultCodepage) +#define uprv_getDefaultLocaleID U_ICU_ENTRY_POINT_RENAME(uprv_getDefaultLocaleID) +#define uprv_getInfinity U_ICU_ENTRY_POINT_RENAME(uprv_getInfinity) +#define uprv_getMaxCharNameLength U_ICU_ENTRY_POINT_RENAME(uprv_getMaxCharNameLength) +#define uprv_getMaxValues U_ICU_ENTRY_POINT_RENAME(uprv_getMaxValues) +#define uprv_getNaN U_ICU_ENTRY_POINT_RENAME(uprv_getNaN) +#define uprv_getRawUTCtime U_ICU_ENTRY_POINT_RENAME(uprv_getRawUTCtime) +#define uprv_getStaticCurrencyName U_ICU_ENTRY_POINT_RENAME(uprv_getStaticCurrencyName) +#define uprv_getUTCtime U_ICU_ENTRY_POINT_RENAME(uprv_getUTCtime) +#define uprv_int32Comparator U_ICU_ENTRY_POINT_RENAME(uprv_int32Comparator) +#define uprv_isASCIILetter U_ICU_ENTRY_POINT_RENAME(uprv_isASCIILetter) +#define uprv_isInfinite U_ICU_ENTRY_POINT_RENAME(uprv_isInfinite) +#define uprv_isInvariantString U_ICU_ENTRY_POINT_RENAME(uprv_isInvariantString) +#define uprv_isInvariantUString U_ICU_ENTRY_POINT_RENAME(uprv_isInvariantUString) +#define uprv_isNaN U_ICU_ENTRY_POINT_RENAME(uprv_isNaN) +#define uprv_isNegativeInfinity U_ICU_ENTRY_POINT_RENAME(uprv_isNegativeInfinity) +#define uprv_isPositiveInfinity U_ICU_ENTRY_POINT_RENAME(uprv_isPositiveInfinity) +#define uprv_itou U_ICU_ENTRY_POINT_RENAME(uprv_itou) +#define uprv_log U_ICU_ENTRY_POINT_RENAME(uprv_log) +#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc) +#define uprv_mapFile U_ICU_ENTRY_POINT_RENAME(uprv_mapFile) +#define uprv_max U_ICU_ENTRY_POINT_RENAME(uprv_max) +#define uprv_maxMantissa U_ICU_ENTRY_POINT_RENAME(uprv_maxMantissa) +#define uprv_maximumPtr U_ICU_ENTRY_POINT_RENAME(uprv_maximumPtr) +#define uprv_min U_ICU_ENTRY_POINT_RENAME(uprv_min) +#define uprv_modf U_ICU_ENTRY_POINT_RENAME(uprv_modf) +#define uprv_parseCurrency U_ICU_ENTRY_POINT_RENAME(uprv_parseCurrency) +#define uprv_pathIsAbsolute U_ICU_ENTRY_POINT_RENAME(uprv_pathIsAbsolute) +#define uprv_pow U_ICU_ENTRY_POINT_RENAME(uprv_pow) +#define uprv_pow10 U_ICU_ENTRY_POINT_RENAME(uprv_pow10) +#define uprv_realloc U_ICU_ENTRY_POINT_RENAME(uprv_realloc) +#define uprv_round U_ICU_ENTRY_POINT_RENAME(uprv_round) +#define uprv_sortArray U_ICU_ENTRY_POINT_RENAME(uprv_sortArray) +#define uprv_stableBinarySearch U_ICU_ENTRY_POINT_RENAME(uprv_stableBinarySearch) +#define uprv_strCompare U_ICU_ENTRY_POINT_RENAME(uprv_strCompare) +#define uprv_strdup U_ICU_ENTRY_POINT_RENAME(uprv_strdup) +#define uprv_stricmp U_ICU_ENTRY_POINT_RENAME(uprv_stricmp) +#define uprv_strndup U_ICU_ENTRY_POINT_RENAME(uprv_strndup) +#define uprv_strnicmp U_ICU_ENTRY_POINT_RENAME(uprv_strnicmp) +#define uprv_syntaxError U_ICU_ENTRY_POINT_RENAME(uprv_syntaxError) +#define uprv_timezone U_ICU_ENTRY_POINT_RENAME(uprv_timezone) +#define uprv_toupper U_ICU_ENTRY_POINT_RENAME(uprv_toupper) +#define uprv_trunc U_ICU_ENTRY_POINT_RENAME(uprv_trunc) +#define uprv_tzname U_ICU_ENTRY_POINT_RENAME(uprv_tzname) +#define uprv_tzname_clear_cache U_ICU_ENTRY_POINT_RENAME(uprv_tzname_clear_cache) +#define uprv_tzset U_ICU_ENTRY_POINT_RENAME(uprv_tzset) +#define uprv_uint16Comparator U_ICU_ENTRY_POINT_RENAME(uprv_uint16Comparator) +#define uprv_uint32Comparator U_ICU_ENTRY_POINT_RENAME(uprv_uint32Comparator) +#define uprv_unmapFile U_ICU_ENTRY_POINT_RENAME(uprv_unmapFile) +#define upvec_cloneArray U_ICU_ENTRY_POINT_RENAME(upvec_cloneArray) +#define upvec_close U_ICU_ENTRY_POINT_RENAME(upvec_close) +#define upvec_compact U_ICU_ENTRY_POINT_RENAME(upvec_compact) +#define upvec_compactToUTrie2Handler U_ICU_ENTRY_POINT_RENAME(upvec_compactToUTrie2Handler) +#define upvec_compactToUTrie2WithRowIndexes U_ICU_ENTRY_POINT_RENAME(upvec_compactToUTrie2WithRowIndexes) +#define upvec_getArray U_ICU_ENTRY_POINT_RENAME(upvec_getArray) +#define upvec_getRow U_ICU_ENTRY_POINT_RENAME(upvec_getRow) +#define upvec_getValue U_ICU_ENTRY_POINT_RENAME(upvec_getValue) +#define upvec_open U_ICU_ENTRY_POINT_RENAME(upvec_open) +#define upvec_setValue U_ICU_ENTRY_POINT_RENAME(upvec_setValue) +#define uregex_appendReplacement U_ICU_ENTRY_POINT_RENAME(uregex_appendReplacement) +#define uregex_appendReplacementUText U_ICU_ENTRY_POINT_RENAME(uregex_appendReplacementUText) +#define uregex_appendTail U_ICU_ENTRY_POINT_RENAME(uregex_appendTail) +#define uregex_appendTailUText U_ICU_ENTRY_POINT_RENAME(uregex_appendTailUText) +#define uregex_clone U_ICU_ENTRY_POINT_RENAME(uregex_clone) +#define uregex_close U_ICU_ENTRY_POINT_RENAME(uregex_close) +#define uregex_end U_ICU_ENTRY_POINT_RENAME(uregex_end) +#define uregex_end64 U_ICU_ENTRY_POINT_RENAME(uregex_end64) +#define uregex_find U_ICU_ENTRY_POINT_RENAME(uregex_find) +#define uregex_find64 U_ICU_ENTRY_POINT_RENAME(uregex_find64) +#define uregex_findNext U_ICU_ENTRY_POINT_RENAME(uregex_findNext) +#define uregex_flags U_ICU_ENTRY_POINT_RENAME(uregex_flags) +#define uregex_getFindProgressCallback U_ICU_ENTRY_POINT_RENAME(uregex_getFindProgressCallback) +#define uregex_getMatchCallback U_ICU_ENTRY_POINT_RENAME(uregex_getMatchCallback) +#define uregex_getStackLimit U_ICU_ENTRY_POINT_RENAME(uregex_getStackLimit) +#define uregex_getText U_ICU_ENTRY_POINT_RENAME(uregex_getText) +#define uregex_getTimeLimit U_ICU_ENTRY_POINT_RENAME(uregex_getTimeLimit) +#define uregex_getUText U_ICU_ENTRY_POINT_RENAME(uregex_getUText) +#define uregex_group U_ICU_ENTRY_POINT_RENAME(uregex_group) +#define uregex_groupCount U_ICU_ENTRY_POINT_RENAME(uregex_groupCount) +#define uregex_groupNumberFromCName U_ICU_ENTRY_POINT_RENAME(uregex_groupNumberFromCName) +#define uregex_groupNumberFromName U_ICU_ENTRY_POINT_RENAME(uregex_groupNumberFromName) +#define uregex_groupUText U_ICU_ENTRY_POINT_RENAME(uregex_groupUText) +#define uregex_hasAnchoringBounds U_ICU_ENTRY_POINT_RENAME(uregex_hasAnchoringBounds) +#define uregex_hasTransparentBounds U_ICU_ENTRY_POINT_RENAME(uregex_hasTransparentBounds) +#define uregex_hitEnd U_ICU_ENTRY_POINT_RENAME(uregex_hitEnd) +#define uregex_lookingAt U_ICU_ENTRY_POINT_RENAME(uregex_lookingAt) +#define uregex_lookingAt64 U_ICU_ENTRY_POINT_RENAME(uregex_lookingAt64) +#define uregex_matches U_ICU_ENTRY_POINT_RENAME(uregex_matches) +#define uregex_matches64 U_ICU_ENTRY_POINT_RENAME(uregex_matches64) +#define uregex_open U_ICU_ENTRY_POINT_RENAME(uregex_open) +#define uregex_openC U_ICU_ENTRY_POINT_RENAME(uregex_openC) +#define uregex_openUText U_ICU_ENTRY_POINT_RENAME(uregex_openUText) +#define uregex_pattern U_ICU_ENTRY_POINT_RENAME(uregex_pattern) +#define uregex_patternUText U_ICU_ENTRY_POINT_RENAME(uregex_patternUText) +#define uregex_refreshUText U_ICU_ENTRY_POINT_RENAME(uregex_refreshUText) +#define uregex_regionEnd U_ICU_ENTRY_POINT_RENAME(uregex_regionEnd) +#define uregex_regionEnd64 U_ICU_ENTRY_POINT_RENAME(uregex_regionEnd64) +#define uregex_regionStart U_ICU_ENTRY_POINT_RENAME(uregex_regionStart) +#define uregex_regionStart64 U_ICU_ENTRY_POINT_RENAME(uregex_regionStart64) +#define uregex_replaceAll U_ICU_ENTRY_POINT_RENAME(uregex_replaceAll) +#define uregex_replaceAllUText U_ICU_ENTRY_POINT_RENAME(uregex_replaceAllUText) +#define uregex_replaceFirst U_ICU_ENTRY_POINT_RENAME(uregex_replaceFirst) +#define uregex_replaceFirstUText U_ICU_ENTRY_POINT_RENAME(uregex_replaceFirstUText) +#define uregex_requireEnd U_ICU_ENTRY_POINT_RENAME(uregex_requireEnd) +#define uregex_reset U_ICU_ENTRY_POINT_RENAME(uregex_reset) +#define uregex_reset64 U_ICU_ENTRY_POINT_RENAME(uregex_reset64) +#define uregex_setFindProgressCallback U_ICU_ENTRY_POINT_RENAME(uregex_setFindProgressCallback) +#define uregex_setMatchCallback U_ICU_ENTRY_POINT_RENAME(uregex_setMatchCallback) +#define uregex_setRegion U_ICU_ENTRY_POINT_RENAME(uregex_setRegion) +#define uregex_setRegion64 U_ICU_ENTRY_POINT_RENAME(uregex_setRegion64) +#define uregex_setRegionAndStart U_ICU_ENTRY_POINT_RENAME(uregex_setRegionAndStart) +#define uregex_setStackLimit U_ICU_ENTRY_POINT_RENAME(uregex_setStackLimit) +#define uregex_setText U_ICU_ENTRY_POINT_RENAME(uregex_setText) +#define uregex_setTimeLimit U_ICU_ENTRY_POINT_RENAME(uregex_setTimeLimit) +#define uregex_setUText U_ICU_ENTRY_POINT_RENAME(uregex_setUText) +#define uregex_split U_ICU_ENTRY_POINT_RENAME(uregex_split) +#define uregex_splitUText U_ICU_ENTRY_POINT_RENAME(uregex_splitUText) +#define uregex_start U_ICU_ENTRY_POINT_RENAME(uregex_start) +#define uregex_start64 U_ICU_ENTRY_POINT_RENAME(uregex_start64) +#define uregex_ucstr_unescape_charAt U_ICU_ENTRY_POINT_RENAME(uregex_ucstr_unescape_charAt) +#define uregex_useAnchoringBounds U_ICU_ENTRY_POINT_RENAME(uregex_useAnchoringBounds) +#define uregex_useTransparentBounds U_ICU_ENTRY_POINT_RENAME(uregex_useTransparentBounds) +#define uregex_utext_unescape_charAt U_ICU_ENTRY_POINT_RENAME(uregex_utext_unescape_charAt) +#define uregion_areEqual U_ICU_ENTRY_POINT_RENAME(uregion_areEqual) +#define uregion_contains U_ICU_ENTRY_POINT_RENAME(uregion_contains) +#define uregion_getAvailable U_ICU_ENTRY_POINT_RENAME(uregion_getAvailable) +#define uregion_getContainedRegions U_ICU_ENTRY_POINT_RENAME(uregion_getContainedRegions) +#define uregion_getContainedRegionsOfType U_ICU_ENTRY_POINT_RENAME(uregion_getContainedRegionsOfType) +#define uregion_getContainingRegion U_ICU_ENTRY_POINT_RENAME(uregion_getContainingRegion) +#define uregion_getContainingRegionOfType U_ICU_ENTRY_POINT_RENAME(uregion_getContainingRegionOfType) +#define uregion_getNumericCode U_ICU_ENTRY_POINT_RENAME(uregion_getNumericCode) +#define uregion_getPreferredValues U_ICU_ENTRY_POINT_RENAME(uregion_getPreferredValues) +#define uregion_getRegionCode U_ICU_ENTRY_POINT_RENAME(uregion_getRegionCode) +#define uregion_getRegionFromCode U_ICU_ENTRY_POINT_RENAME(uregion_getRegionFromCode) +#define uregion_getRegionFromNumericCode U_ICU_ENTRY_POINT_RENAME(uregion_getRegionFromNumericCode) +#define uregion_getType U_ICU_ENTRY_POINT_RENAME(uregion_getType) +#define ureldatefmt_close U_ICU_ENTRY_POINT_RENAME(ureldatefmt_close) +#define ureldatefmt_combineDateAndTime U_ICU_ENTRY_POINT_RENAME(ureldatefmt_combineDateAndTime) +#define ureldatefmt_format U_ICU_ENTRY_POINT_RENAME(ureldatefmt_format) +#define ureldatefmt_formatNumeric U_ICU_ENTRY_POINT_RENAME(ureldatefmt_formatNumeric) +#define ureldatefmt_open U_ICU_ENTRY_POINT_RENAME(ureldatefmt_open) +#define ures_close U_ICU_ENTRY_POINT_RENAME(ures_close) +#define ures_copyResb U_ICU_ENTRY_POINT_RENAME(ures_copyResb) +#define ures_countArrayItems U_ICU_ENTRY_POINT_RENAME(ures_countArrayItems) +#define ures_findResource U_ICU_ENTRY_POINT_RENAME(ures_findResource) +#define ures_findSubResource U_ICU_ENTRY_POINT_RENAME(ures_findSubResource) +#define ures_getAllItemsWithFallback U_ICU_ENTRY_POINT_RENAME(ures_getAllItemsWithFallback) +#define ures_getBinary U_ICU_ENTRY_POINT_RENAME(ures_getBinary) +#define ures_getByIndex U_ICU_ENTRY_POINT_RENAME(ures_getByIndex) +#define ures_getByKey U_ICU_ENTRY_POINT_RENAME(ures_getByKey) +#define ures_getByKeyWithFallback U_ICU_ENTRY_POINT_RENAME(ures_getByKeyWithFallback) +#define ures_getFunctionalEquivalent U_ICU_ENTRY_POINT_RENAME(ures_getFunctionalEquivalent) +#define ures_getInt U_ICU_ENTRY_POINT_RENAME(ures_getInt) +#define ures_getIntVector U_ICU_ENTRY_POINT_RENAME(ures_getIntVector) +#define ures_getKey U_ICU_ENTRY_POINT_RENAME(ures_getKey) +#define ures_getKeywordValues U_ICU_ENTRY_POINT_RENAME(ures_getKeywordValues) +#define ures_getLocale U_ICU_ENTRY_POINT_RENAME(ures_getLocale) +#define ures_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ures_getLocaleByType) +#define ures_getLocaleInternal U_ICU_ENTRY_POINT_RENAME(ures_getLocaleInternal) +#define ures_getName U_ICU_ENTRY_POINT_RENAME(ures_getName) +#define ures_getNextResource U_ICU_ENTRY_POINT_RENAME(ures_getNextResource) +#define ures_getNextString U_ICU_ENTRY_POINT_RENAME(ures_getNextString) +#define ures_getSize U_ICU_ENTRY_POINT_RENAME(ures_getSize) +#define ures_getString U_ICU_ENTRY_POINT_RENAME(ures_getString) +#define ures_getStringByIndex U_ICU_ENTRY_POINT_RENAME(ures_getStringByIndex) +#define ures_getStringByKey U_ICU_ENTRY_POINT_RENAME(ures_getStringByKey) +#define ures_getStringByKeyWithFallback U_ICU_ENTRY_POINT_RENAME(ures_getStringByKeyWithFallback) +#define ures_getType U_ICU_ENTRY_POINT_RENAME(ures_getType) +#define ures_getUInt U_ICU_ENTRY_POINT_RENAME(ures_getUInt) +#define ures_getUTF8String U_ICU_ENTRY_POINT_RENAME(ures_getUTF8String) +#define ures_getUTF8StringByIndex U_ICU_ENTRY_POINT_RENAME(ures_getUTF8StringByIndex) +#define ures_getUTF8StringByKey U_ICU_ENTRY_POINT_RENAME(ures_getUTF8StringByKey) +#define ures_getVersion U_ICU_ENTRY_POINT_RENAME(ures_getVersion) +#define ures_getVersionByKey U_ICU_ENTRY_POINT_RENAME(ures_getVersionByKey) +#define ures_getVersionNumber U_ICU_ENTRY_POINT_RENAME(ures_getVersionNumber) +#define ures_getVersionNumberInternal U_ICU_ENTRY_POINT_RENAME(ures_getVersionNumberInternal) +#define ures_hasNext U_ICU_ENTRY_POINT_RENAME(ures_hasNext) +#define ures_initStackObject U_ICU_ENTRY_POINT_RENAME(ures_initStackObject) +#define ures_open U_ICU_ENTRY_POINT_RENAME(ures_open) +#define ures_openAvailableLocales U_ICU_ENTRY_POINT_RENAME(ures_openAvailableLocales) +#define ures_openDirect U_ICU_ENTRY_POINT_RENAME(ures_openDirect) +#define ures_openFillIn U_ICU_ENTRY_POINT_RENAME(ures_openFillIn) +#define ures_openNoDefault U_ICU_ENTRY_POINT_RENAME(ures_openNoDefault) +#define ures_openU U_ICU_ENTRY_POINT_RENAME(ures_openU) +#define ures_resetIterator U_ICU_ENTRY_POINT_RENAME(ures_resetIterator) +#define ures_swap U_ICU_ENTRY_POINT_RENAME(ures_swap) +#define uscript_breaksBetweenLetters U_ICU_ENTRY_POINT_RENAME(uscript_breaksBetweenLetters) +#define uscript_closeRun U_ICU_ENTRY_POINT_RENAME(uscript_closeRun) +#define uscript_getCode U_ICU_ENTRY_POINT_RENAME(uscript_getCode) +#define uscript_getName U_ICU_ENTRY_POINT_RENAME(uscript_getName) +#define uscript_getSampleString U_ICU_ENTRY_POINT_RENAME(uscript_getSampleString) +#define uscript_getSampleUnicodeString U_ICU_ENTRY_POINT_RENAME(uscript_getSampleUnicodeString) +#define uscript_getScript U_ICU_ENTRY_POINT_RENAME(uscript_getScript) +#define uscript_getScriptExtensions U_ICU_ENTRY_POINT_RENAME(uscript_getScriptExtensions) +#define uscript_getShortName U_ICU_ENTRY_POINT_RENAME(uscript_getShortName) +#define uscript_getUsage U_ICU_ENTRY_POINT_RENAME(uscript_getUsage) +#define uscript_hasScript U_ICU_ENTRY_POINT_RENAME(uscript_hasScript) +#define uscript_isCased U_ICU_ENTRY_POINT_RENAME(uscript_isCased) +#define uscript_isRightToLeft U_ICU_ENTRY_POINT_RENAME(uscript_isRightToLeft) +#define uscript_nextRun U_ICU_ENTRY_POINT_RENAME(uscript_nextRun) +#define uscript_openRun U_ICU_ENTRY_POINT_RENAME(uscript_openRun) +#define uscript_resetRun U_ICU_ENTRY_POINT_RENAME(uscript_resetRun) +#define uscript_setRunText U_ICU_ENTRY_POINT_RENAME(uscript_setRunText) +#define usearch_close U_ICU_ENTRY_POINT_RENAME(usearch_close) +#define usearch_first U_ICU_ENTRY_POINT_RENAME(usearch_first) +#define usearch_following U_ICU_ENTRY_POINT_RENAME(usearch_following) +#define usearch_getAttribute U_ICU_ENTRY_POINT_RENAME(usearch_getAttribute) +#define usearch_getBreakIterator U_ICU_ENTRY_POINT_RENAME(usearch_getBreakIterator) +#define usearch_getCollator U_ICU_ENTRY_POINT_RENAME(usearch_getCollator) +#define usearch_getMatchedLength U_ICU_ENTRY_POINT_RENAME(usearch_getMatchedLength) +#define usearch_getMatchedStart U_ICU_ENTRY_POINT_RENAME(usearch_getMatchedStart) +#define usearch_getMatchedText U_ICU_ENTRY_POINT_RENAME(usearch_getMatchedText) +#define usearch_getOffset U_ICU_ENTRY_POINT_RENAME(usearch_getOffset) +#define usearch_getPattern U_ICU_ENTRY_POINT_RENAME(usearch_getPattern) +#define usearch_getText U_ICU_ENTRY_POINT_RENAME(usearch_getText) +#define usearch_handleNextCanonical U_ICU_ENTRY_POINT_RENAME(usearch_handleNextCanonical) +#define usearch_handleNextExact U_ICU_ENTRY_POINT_RENAME(usearch_handleNextExact) +#define usearch_handlePreviousCanonical U_ICU_ENTRY_POINT_RENAME(usearch_handlePreviousCanonical) +#define usearch_handlePreviousExact U_ICU_ENTRY_POINT_RENAME(usearch_handlePreviousExact) +#define usearch_last U_ICU_ENTRY_POINT_RENAME(usearch_last) +#define usearch_next U_ICU_ENTRY_POINT_RENAME(usearch_next) +#define usearch_open U_ICU_ENTRY_POINT_RENAME(usearch_open) +#define usearch_openFromCollator U_ICU_ENTRY_POINT_RENAME(usearch_openFromCollator) +#define usearch_preceding U_ICU_ENTRY_POINT_RENAME(usearch_preceding) +#define usearch_previous U_ICU_ENTRY_POINT_RENAME(usearch_previous) +#define usearch_reset U_ICU_ENTRY_POINT_RENAME(usearch_reset) +#define usearch_search U_ICU_ENTRY_POINT_RENAME(usearch_search) +#define usearch_searchBackwards U_ICU_ENTRY_POINT_RENAME(usearch_searchBackwards) +#define usearch_setAttribute U_ICU_ENTRY_POINT_RENAME(usearch_setAttribute) +#define usearch_setBreakIterator U_ICU_ENTRY_POINT_RENAME(usearch_setBreakIterator) +#define usearch_setCollator U_ICU_ENTRY_POINT_RENAME(usearch_setCollator) +#define usearch_setOffset U_ICU_ENTRY_POINT_RENAME(usearch_setOffset) +#define usearch_setPattern U_ICU_ENTRY_POINT_RENAME(usearch_setPattern) +#define usearch_setText U_ICU_ENTRY_POINT_RENAME(usearch_setText) +#define uset_add U_ICU_ENTRY_POINT_RENAME(uset_add) +#define uset_addAll U_ICU_ENTRY_POINT_RENAME(uset_addAll) +#define uset_addAllCodePoints U_ICU_ENTRY_POINT_RENAME(uset_addAllCodePoints) +#define uset_addRange U_ICU_ENTRY_POINT_RENAME(uset_addRange) +#define uset_addString U_ICU_ENTRY_POINT_RENAME(uset_addString) +#define uset_applyIntPropertyValue U_ICU_ENTRY_POINT_RENAME(uset_applyIntPropertyValue) +#define uset_applyPattern U_ICU_ENTRY_POINT_RENAME(uset_applyPattern) +#define uset_applyPropertyAlias U_ICU_ENTRY_POINT_RENAME(uset_applyPropertyAlias) +#define uset_charAt U_ICU_ENTRY_POINT_RENAME(uset_charAt) +#define uset_clear U_ICU_ENTRY_POINT_RENAME(uset_clear) +#define uset_clone U_ICU_ENTRY_POINT_RENAME(uset_clone) +#define uset_cloneAsThawed U_ICU_ENTRY_POINT_RENAME(uset_cloneAsThawed) +#define uset_close U_ICU_ENTRY_POINT_RENAME(uset_close) +#define uset_closeOver U_ICU_ENTRY_POINT_RENAME(uset_closeOver) +#define uset_compact U_ICU_ENTRY_POINT_RENAME(uset_compact) +#define uset_complement U_ICU_ENTRY_POINT_RENAME(uset_complement) +#define uset_complementAll U_ICU_ENTRY_POINT_RENAME(uset_complementAll) +#define uset_contains U_ICU_ENTRY_POINT_RENAME(uset_contains) +#define uset_containsAll U_ICU_ENTRY_POINT_RENAME(uset_containsAll) +#define uset_containsAllCodePoints U_ICU_ENTRY_POINT_RENAME(uset_containsAllCodePoints) +#define uset_containsNone U_ICU_ENTRY_POINT_RENAME(uset_containsNone) +#define uset_containsRange U_ICU_ENTRY_POINT_RENAME(uset_containsRange) +#define uset_containsSome U_ICU_ENTRY_POINT_RENAME(uset_containsSome) +#define uset_containsString U_ICU_ENTRY_POINT_RENAME(uset_containsString) +#define uset_equals U_ICU_ENTRY_POINT_RENAME(uset_equals) +#define uset_freeze U_ICU_ENTRY_POINT_RENAME(uset_freeze) +#define uset_getItem U_ICU_ENTRY_POINT_RENAME(uset_getItem) +#define uset_getItemCount U_ICU_ENTRY_POINT_RENAME(uset_getItemCount) +#define uset_getSerializedRange U_ICU_ENTRY_POINT_RENAME(uset_getSerializedRange) +#define uset_getSerializedRangeCount U_ICU_ENTRY_POINT_RENAME(uset_getSerializedRangeCount) +#define uset_getSerializedSet U_ICU_ENTRY_POINT_RENAME(uset_getSerializedSet) +#define uset_indexOf U_ICU_ENTRY_POINT_RENAME(uset_indexOf) +#define uset_isEmpty U_ICU_ENTRY_POINT_RENAME(uset_isEmpty) +#define uset_isFrozen U_ICU_ENTRY_POINT_RENAME(uset_isFrozen) +#define uset_open U_ICU_ENTRY_POINT_RENAME(uset_open) +#define uset_openEmpty U_ICU_ENTRY_POINT_RENAME(uset_openEmpty) +#define uset_openPattern U_ICU_ENTRY_POINT_RENAME(uset_openPattern) +#define uset_openPatternOptions U_ICU_ENTRY_POINT_RENAME(uset_openPatternOptions) +#define uset_remove U_ICU_ENTRY_POINT_RENAME(uset_remove) +#define uset_removeAll U_ICU_ENTRY_POINT_RENAME(uset_removeAll) +#define uset_removeAllStrings U_ICU_ENTRY_POINT_RENAME(uset_removeAllStrings) +#define uset_removeRange U_ICU_ENTRY_POINT_RENAME(uset_removeRange) +#define uset_removeString U_ICU_ENTRY_POINT_RENAME(uset_removeString) +#define uset_resemblesPattern U_ICU_ENTRY_POINT_RENAME(uset_resemblesPattern) +#define uset_retain U_ICU_ENTRY_POINT_RENAME(uset_retain) +#define uset_retainAll U_ICU_ENTRY_POINT_RENAME(uset_retainAll) +#define uset_serialize U_ICU_ENTRY_POINT_RENAME(uset_serialize) +#define uset_serializedContains U_ICU_ENTRY_POINT_RENAME(uset_serializedContains) +#define uset_set U_ICU_ENTRY_POINT_RENAME(uset_set) +#define uset_setSerializedToOne U_ICU_ENTRY_POINT_RENAME(uset_setSerializedToOne) +#define uset_size U_ICU_ENTRY_POINT_RENAME(uset_size) +#define uset_span U_ICU_ENTRY_POINT_RENAME(uset_span) +#define uset_spanBack U_ICU_ENTRY_POINT_RENAME(uset_spanBack) +#define uset_spanBackUTF8 U_ICU_ENTRY_POINT_RENAME(uset_spanBackUTF8) +#define uset_spanUTF8 U_ICU_ENTRY_POINT_RENAME(uset_spanUTF8) +#define uset_toPattern U_ICU_ENTRY_POINT_RENAME(uset_toPattern) +#define uspoof_areConfusable U_ICU_ENTRY_POINT_RENAME(uspoof_areConfusable) +#define uspoof_areConfusableUTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_areConfusableUTF8) +#define uspoof_areConfusableUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_areConfusableUnicodeString) +#define uspoof_check U_ICU_ENTRY_POINT_RENAME(uspoof_check) +#define uspoof_check2 U_ICU_ENTRY_POINT_RENAME(uspoof_check2) +#define uspoof_check2UTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_check2UTF8) +#define uspoof_check2UnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_check2UnicodeString) +#define uspoof_checkUTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_checkUTF8) +#define uspoof_checkUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_checkUnicodeString) +#define uspoof_clone U_ICU_ENTRY_POINT_RENAME(uspoof_clone) +#define uspoof_close U_ICU_ENTRY_POINT_RENAME(uspoof_close) +#define uspoof_closeCheckResult U_ICU_ENTRY_POINT_RENAME(uspoof_closeCheckResult) +#define uspoof_getAllowedChars U_ICU_ENTRY_POINT_RENAME(uspoof_getAllowedChars) +#define uspoof_getAllowedLocales U_ICU_ENTRY_POINT_RENAME(uspoof_getAllowedLocales) +#define uspoof_getAllowedUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_getAllowedUnicodeSet) +#define uspoof_getCheckResultChecks U_ICU_ENTRY_POINT_RENAME(uspoof_getCheckResultChecks) +#define uspoof_getCheckResultNumerics U_ICU_ENTRY_POINT_RENAME(uspoof_getCheckResultNumerics) +#define uspoof_getCheckResultRestrictionLevel U_ICU_ENTRY_POINT_RENAME(uspoof_getCheckResultRestrictionLevel) +#define uspoof_getChecks U_ICU_ENTRY_POINT_RENAME(uspoof_getChecks) +#define uspoof_getInclusionSet U_ICU_ENTRY_POINT_RENAME(uspoof_getInclusionSet) +#define uspoof_getInclusionUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_getInclusionUnicodeSet) +#define uspoof_getRecommendedSet U_ICU_ENTRY_POINT_RENAME(uspoof_getRecommendedSet) +#define uspoof_getRecommendedUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_getRecommendedUnicodeSet) +#define uspoof_getRestrictionLevel U_ICU_ENTRY_POINT_RENAME(uspoof_getRestrictionLevel) +#define uspoof_getSkeleton U_ICU_ENTRY_POINT_RENAME(uspoof_getSkeleton) +#define uspoof_getSkeletonUTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_getSkeletonUTF8) +#define uspoof_getSkeletonUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_getSkeletonUnicodeString) +#define uspoof_internalInitStatics U_ICU_ENTRY_POINT_RENAME(uspoof_internalInitStatics) +#define uspoof_open U_ICU_ENTRY_POINT_RENAME(uspoof_open) +#define uspoof_openCheckResult U_ICU_ENTRY_POINT_RENAME(uspoof_openCheckResult) +#define uspoof_openFromSerialized U_ICU_ENTRY_POINT_RENAME(uspoof_openFromSerialized) +#define uspoof_openFromSource U_ICU_ENTRY_POINT_RENAME(uspoof_openFromSource) +#define uspoof_serialize U_ICU_ENTRY_POINT_RENAME(uspoof_serialize) +#define uspoof_setAllowedChars U_ICU_ENTRY_POINT_RENAME(uspoof_setAllowedChars) +#define uspoof_setAllowedLocales U_ICU_ENTRY_POINT_RENAME(uspoof_setAllowedLocales) +#define uspoof_setAllowedUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_setAllowedUnicodeSet) +#define uspoof_setChecks U_ICU_ENTRY_POINT_RENAME(uspoof_setChecks) +#define uspoof_setRestrictionLevel U_ICU_ENTRY_POINT_RENAME(uspoof_setRestrictionLevel) +#define uspoof_swap U_ICU_ENTRY_POINT_RENAME(uspoof_swap) +#define usprep_close U_ICU_ENTRY_POINT_RENAME(usprep_close) +#define usprep_open U_ICU_ENTRY_POINT_RENAME(usprep_open) +#define usprep_openByType U_ICU_ENTRY_POINT_RENAME(usprep_openByType) +#define usprep_prepare U_ICU_ENTRY_POINT_RENAME(usprep_prepare) +#define usprep_swap U_ICU_ENTRY_POINT_RENAME(usprep_swap) +#define ustr_hashCharsN U_ICU_ENTRY_POINT_RENAME(ustr_hashCharsN) +#define ustr_hashICharsN U_ICU_ENTRY_POINT_RENAME(ustr_hashICharsN) +#define ustr_hashUCharsN U_ICU_ENTRY_POINT_RENAME(ustr_hashUCharsN) +#define ustrcase_getCaseLocale U_ICU_ENTRY_POINT_RENAME(ustrcase_getCaseLocale) +#define ustrcase_getTitleBreakIterator U_ICU_ENTRY_POINT_RENAME(ustrcase_getTitleBreakIterator) +#define ustrcase_internalFold U_ICU_ENTRY_POINT_RENAME(ustrcase_internalFold) +#define ustrcase_internalToLower U_ICU_ENTRY_POINT_RENAME(ustrcase_internalToLower) +#define ustrcase_internalToTitle U_ICU_ENTRY_POINT_RENAME(ustrcase_internalToTitle) +#define ustrcase_internalToUpper U_ICU_ENTRY_POINT_RENAME(ustrcase_internalToUpper) +#define ustrcase_map U_ICU_ENTRY_POINT_RENAME(ustrcase_map) +#define ustrcase_mapWithOverlap U_ICU_ENTRY_POINT_RENAME(ustrcase_mapWithOverlap) +#define utext_char32At U_ICU_ENTRY_POINT_RENAME(utext_char32At) +#define utext_clone U_ICU_ENTRY_POINT_RENAME(utext_clone) +#define utext_close U_ICU_ENTRY_POINT_RENAME(utext_close) +#define utext_copy U_ICU_ENTRY_POINT_RENAME(utext_copy) +#define utext_current32 U_ICU_ENTRY_POINT_RENAME(utext_current32) +#define utext_equals U_ICU_ENTRY_POINT_RENAME(utext_equals) +#define utext_extract U_ICU_ENTRY_POINT_RENAME(utext_extract) +#define utext_freeze U_ICU_ENTRY_POINT_RENAME(utext_freeze) +#define utext_getNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_getNativeIndex) +#define utext_getPreviousNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_getPreviousNativeIndex) +#define utext_hasMetaData U_ICU_ENTRY_POINT_RENAME(utext_hasMetaData) +#define utext_isLengthExpensive U_ICU_ENTRY_POINT_RENAME(utext_isLengthExpensive) +#define utext_isWritable U_ICU_ENTRY_POINT_RENAME(utext_isWritable) +#define utext_moveIndex32 U_ICU_ENTRY_POINT_RENAME(utext_moveIndex32) +#define utext_nativeLength U_ICU_ENTRY_POINT_RENAME(utext_nativeLength) +#define utext_next32 U_ICU_ENTRY_POINT_RENAME(utext_next32) +#define utext_next32From U_ICU_ENTRY_POINT_RENAME(utext_next32From) +#define utext_openCharacterIterator U_ICU_ENTRY_POINT_RENAME(utext_openCharacterIterator) +#define utext_openConstUnicodeString U_ICU_ENTRY_POINT_RENAME(utext_openConstUnicodeString) +#define utext_openReplaceable U_ICU_ENTRY_POINT_RENAME(utext_openReplaceable) +#define utext_openUChars U_ICU_ENTRY_POINT_RENAME(utext_openUChars) +#define utext_openUTF8 U_ICU_ENTRY_POINT_RENAME(utext_openUTF8) +#define utext_openUnicodeString U_ICU_ENTRY_POINT_RENAME(utext_openUnicodeString) +#define utext_previous32 U_ICU_ENTRY_POINT_RENAME(utext_previous32) +#define utext_previous32From U_ICU_ENTRY_POINT_RENAME(utext_previous32From) +#define utext_replace U_ICU_ENTRY_POINT_RENAME(utext_replace) +#define utext_setNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_setNativeIndex) +#define utext_setup U_ICU_ENTRY_POINT_RENAME(utext_setup) +#define utf8_appendCharSafeBody U_ICU_ENTRY_POINT_RENAME(utf8_appendCharSafeBody) +#define utf8_back1SafeBody U_ICU_ENTRY_POINT_RENAME(utf8_back1SafeBody) +#define utf8_countTrailBytes U_ICU_ENTRY_POINT_RENAME(utf8_countTrailBytes) +#define utf8_nextCharSafeBody U_ICU_ENTRY_POINT_RENAME(utf8_nextCharSafeBody) +#define utf8_prevCharSafeBody U_ICU_ENTRY_POINT_RENAME(utf8_prevCharSafeBody) +#define utmscale_fromInt64 U_ICU_ENTRY_POINT_RENAME(utmscale_fromInt64) +#define utmscale_getTimeScaleValue U_ICU_ENTRY_POINT_RENAME(utmscale_getTimeScaleValue) +#define utmscale_toInt64 U_ICU_ENTRY_POINT_RENAME(utmscale_toInt64) +#define utrace_cleanup U_ICU_ENTRY_POINT_RENAME(utrace_cleanup) +#define utrace_data U_ICU_ENTRY_POINT_RENAME(utrace_data) +#define utrace_entry U_ICU_ENTRY_POINT_RENAME(utrace_entry) +#define utrace_exit U_ICU_ENTRY_POINT_RENAME(utrace_exit) +#define utrace_format U_ICU_ENTRY_POINT_RENAME(utrace_format) +#define utrace_functionName U_ICU_ENTRY_POINT_RENAME(utrace_functionName) +#define utrace_getFunctions U_ICU_ENTRY_POINT_RENAME(utrace_getFunctions) +#define utrace_getLevel U_ICU_ENTRY_POINT_RENAME(utrace_getLevel) +#define utrace_setFunctions U_ICU_ENTRY_POINT_RENAME(utrace_setFunctions) +#define utrace_setLevel U_ICU_ENTRY_POINT_RENAME(utrace_setLevel) +#define utrace_vformat U_ICU_ENTRY_POINT_RENAME(utrace_vformat) +#define utrans_clone U_ICU_ENTRY_POINT_RENAME(utrans_clone) +#define utrans_close U_ICU_ENTRY_POINT_RENAME(utrans_close) +#define utrans_countAvailableIDs U_ICU_ENTRY_POINT_RENAME(utrans_countAvailableIDs) +#define utrans_getAvailableID U_ICU_ENTRY_POINT_RENAME(utrans_getAvailableID) +#define utrans_getID U_ICU_ENTRY_POINT_RENAME(utrans_getID) +#define utrans_getSourceSet U_ICU_ENTRY_POINT_RENAME(utrans_getSourceSet) +#define utrans_getUnicodeID U_ICU_ENTRY_POINT_RENAME(utrans_getUnicodeID) +#define utrans_open U_ICU_ENTRY_POINT_RENAME(utrans_open) +#define utrans_openIDs U_ICU_ENTRY_POINT_RENAME(utrans_openIDs) +#define utrans_openInverse U_ICU_ENTRY_POINT_RENAME(utrans_openInverse) +#define utrans_openU U_ICU_ENTRY_POINT_RENAME(utrans_openU) +#define utrans_register U_ICU_ENTRY_POINT_RENAME(utrans_register) +#define utrans_rep_caseContextIterator U_ICU_ENTRY_POINT_RENAME(utrans_rep_caseContextIterator) +#define utrans_setFilter U_ICU_ENTRY_POINT_RENAME(utrans_setFilter) +#define utrans_stripRules U_ICU_ENTRY_POINT_RENAME(utrans_stripRules) +#define utrans_toRules U_ICU_ENTRY_POINT_RENAME(utrans_toRules) +#define utrans_trans U_ICU_ENTRY_POINT_RENAME(utrans_trans) +#define utrans_transIncremental U_ICU_ENTRY_POINT_RENAME(utrans_transIncremental) +#define utrans_transIncrementalUChars U_ICU_ENTRY_POINT_RENAME(utrans_transIncrementalUChars) +#define utrans_transUChars U_ICU_ENTRY_POINT_RENAME(utrans_transUChars) +#define utrans_transliterator_cleanup U_ICU_ENTRY_POINT_RENAME(utrans_transliterator_cleanup) +#define utrans_unregister U_ICU_ENTRY_POINT_RENAME(utrans_unregister) +#define utrans_unregisterID U_ICU_ENTRY_POINT_RENAME(utrans_unregisterID) +#define utrie2_clone U_ICU_ENTRY_POINT_RENAME(utrie2_clone) +#define utrie2_cloneAsThawed U_ICU_ENTRY_POINT_RENAME(utrie2_cloneAsThawed) +#define utrie2_close U_ICU_ENTRY_POINT_RENAME(utrie2_close) +#define utrie2_enum U_ICU_ENTRY_POINT_RENAME(utrie2_enum) +#define utrie2_enumForLeadSurrogate U_ICU_ENTRY_POINT_RENAME(utrie2_enumForLeadSurrogate) +#define utrie2_freeze U_ICU_ENTRY_POINT_RENAME(utrie2_freeze) +#define utrie2_fromUTrie U_ICU_ENTRY_POINT_RENAME(utrie2_fromUTrie) +#define utrie2_get32 U_ICU_ENTRY_POINT_RENAME(utrie2_get32) +#define utrie2_get32FromLeadSurrogateCodeUnit U_ICU_ENTRY_POINT_RENAME(utrie2_get32FromLeadSurrogateCodeUnit) +#define utrie2_getVersion U_ICU_ENTRY_POINT_RENAME(utrie2_getVersion) +#define utrie2_internalU8NextIndex U_ICU_ENTRY_POINT_RENAME(utrie2_internalU8NextIndex) +#define utrie2_internalU8PrevIndex U_ICU_ENTRY_POINT_RENAME(utrie2_internalU8PrevIndex) +#define utrie2_isFrozen U_ICU_ENTRY_POINT_RENAME(utrie2_isFrozen) +#define utrie2_open U_ICU_ENTRY_POINT_RENAME(utrie2_open) +#define utrie2_openDummy U_ICU_ENTRY_POINT_RENAME(utrie2_openDummy) +#define utrie2_openFromSerialized U_ICU_ENTRY_POINT_RENAME(utrie2_openFromSerialized) +#define utrie2_serialize U_ICU_ENTRY_POINT_RENAME(utrie2_serialize) +#define utrie2_set32 U_ICU_ENTRY_POINT_RENAME(utrie2_set32) +#define utrie2_set32ForLeadSurrogateCodeUnit U_ICU_ENTRY_POINT_RENAME(utrie2_set32ForLeadSurrogateCodeUnit) +#define utrie2_setRange32 U_ICU_ENTRY_POINT_RENAME(utrie2_setRange32) +#define utrie2_swap U_ICU_ENTRY_POINT_RENAME(utrie2_swap) +#define utrie2_swapAnyVersion U_ICU_ENTRY_POINT_RENAME(utrie2_swapAnyVersion) +#define utrie_clone U_ICU_ENTRY_POINT_RENAME(utrie_clone) +#define utrie_close U_ICU_ENTRY_POINT_RENAME(utrie_close) +#define utrie_defaultGetFoldingOffset U_ICU_ENTRY_POINT_RENAME(utrie_defaultGetFoldingOffset) +#define utrie_enum U_ICU_ENTRY_POINT_RENAME(utrie_enum) +#define utrie_get32 U_ICU_ENTRY_POINT_RENAME(utrie_get32) +#define utrie_getData U_ICU_ENTRY_POINT_RENAME(utrie_getData) +#define utrie_open U_ICU_ENTRY_POINT_RENAME(utrie_open) +#define utrie_serialize U_ICU_ENTRY_POINT_RENAME(utrie_serialize) +#define utrie_set32 U_ICU_ENTRY_POINT_RENAME(utrie_set32) +#define utrie_setRange32 U_ICU_ENTRY_POINT_RENAME(utrie_setRange32) +#define utrie_swap U_ICU_ENTRY_POINT_RENAME(utrie_swap) +#define utrie_unserialize U_ICU_ENTRY_POINT_RENAME(utrie_unserialize) +#define utrie_unserializeDummy U_ICU_ENTRY_POINT_RENAME(utrie_unserializeDummy) +#define vzone_clone U_ICU_ENTRY_POINT_RENAME(vzone_clone) +#define vzone_close U_ICU_ENTRY_POINT_RENAME(vzone_close) +#define vzone_countTransitionRules U_ICU_ENTRY_POINT_RENAME(vzone_countTransitionRules) +#define vzone_equals U_ICU_ENTRY_POINT_RENAME(vzone_equals) +#define vzone_getDynamicClassID U_ICU_ENTRY_POINT_RENAME(vzone_getDynamicClassID) +#define vzone_getLastModified U_ICU_ENTRY_POINT_RENAME(vzone_getLastModified) +#define vzone_getNextTransition U_ICU_ENTRY_POINT_RENAME(vzone_getNextTransition) +#define vzone_getOffset U_ICU_ENTRY_POINT_RENAME(vzone_getOffset) +#define vzone_getOffset2 U_ICU_ENTRY_POINT_RENAME(vzone_getOffset2) +#define vzone_getOffset3 U_ICU_ENTRY_POINT_RENAME(vzone_getOffset3) +#define vzone_getPreviousTransition U_ICU_ENTRY_POINT_RENAME(vzone_getPreviousTransition) +#define vzone_getRawOffset U_ICU_ENTRY_POINT_RENAME(vzone_getRawOffset) +#define vzone_getStaticClassID U_ICU_ENTRY_POINT_RENAME(vzone_getStaticClassID) +#define vzone_getTZURL U_ICU_ENTRY_POINT_RENAME(vzone_getTZURL) +#define vzone_hasSameRules U_ICU_ENTRY_POINT_RENAME(vzone_hasSameRules) +#define vzone_inDaylightTime U_ICU_ENTRY_POINT_RENAME(vzone_inDaylightTime) +#define vzone_openData U_ICU_ENTRY_POINT_RENAME(vzone_openData) +#define vzone_openID U_ICU_ENTRY_POINT_RENAME(vzone_openID) +#define vzone_setLastModified U_ICU_ENTRY_POINT_RENAME(vzone_setLastModified) +#define vzone_setRawOffset U_ICU_ENTRY_POINT_RENAME(vzone_setRawOffset) +#define vzone_setTZURL U_ICU_ENTRY_POINT_RENAME(vzone_setTZURL) +#define vzone_useDaylightTime U_ICU_ENTRY_POINT_RENAME(vzone_useDaylightTime) +#define vzone_write U_ICU_ENTRY_POINT_RENAME(vzone_write) +#define vzone_writeFromStart U_ICU_ENTRY_POINT_RENAME(vzone_writeFromStart) +#define vzone_writeSimple U_ICU_ENTRY_POINT_RENAME(vzone_writeSimple) +#define zrule_close U_ICU_ENTRY_POINT_RENAME(zrule_close) +#define zrule_equals U_ICU_ENTRY_POINT_RENAME(zrule_equals) +#define zrule_getDSTSavings U_ICU_ENTRY_POINT_RENAME(zrule_getDSTSavings) +#define zrule_getName U_ICU_ENTRY_POINT_RENAME(zrule_getName) +#define zrule_getRawOffset U_ICU_ENTRY_POINT_RENAME(zrule_getRawOffset) +#define zrule_isEquivalentTo U_ICU_ENTRY_POINT_RENAME(zrule_isEquivalentTo) +#define ztrans_adoptFrom U_ICU_ENTRY_POINT_RENAME(ztrans_adoptFrom) +#define ztrans_adoptTo U_ICU_ENTRY_POINT_RENAME(ztrans_adoptTo) +#define ztrans_clone U_ICU_ENTRY_POINT_RENAME(ztrans_clone) +#define ztrans_close U_ICU_ENTRY_POINT_RENAME(ztrans_close) +#define ztrans_equals U_ICU_ENTRY_POINT_RENAME(ztrans_equals) +#define ztrans_getDynamicClassID U_ICU_ENTRY_POINT_RENAME(ztrans_getDynamicClassID) +#define ztrans_getFrom U_ICU_ENTRY_POINT_RENAME(ztrans_getFrom) +#define ztrans_getStaticClassID U_ICU_ENTRY_POINT_RENAME(ztrans_getStaticClassID) +#define ztrans_getTime U_ICU_ENTRY_POINT_RENAME(ztrans_getTime) +#define ztrans_getTo U_ICU_ENTRY_POINT_RENAME(ztrans_getTo) +#define ztrans_open U_ICU_ENTRY_POINT_RENAME(ztrans_open) +#define ztrans_openEmpty U_ICU_ENTRY_POINT_RENAME(ztrans_openEmpty) +#define ztrans_setFrom U_ICU_ENTRY_POINT_RENAME(ztrans_setFrom) +#define ztrans_setTime U_ICU_ENTRY_POINT_RENAME(ztrans_setTime) +#define ztrans_setTo U_ICU_ENTRY_POINT_RENAME(ztrans_setTo) + +#endif + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/urep.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/urep.h new file mode 100755 index 00000000..932202dd --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/urep.h @@ -0,0 +1,157 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* Copyright (C) 1997-2010, International Business Machines +* Corporation and others. All Rights Reserved. +****************************************************************************** +* Date Name Description +* 06/23/00 aliu Creation. +****************************************************************************** +*/ + +#ifndef __UREP_H +#define __UREP_H + +#include "unicode/utypes.h" + +U_CDECL_BEGIN + +/******************************************************************** + * General Notes + ******************************************************************** + * TODO + * Add usage scenario + * Add test code + * Talk about pinning + * Talk about "can truncate result if out of memory" + */ + +/******************************************************************** + * Data Structures + ********************************************************************/ +/** + * \file + * \brief C API: Callbacks for UReplaceable + */ +/** + * An opaque replaceable text object. This will be manipulated only + * through the caller-supplied UReplaceableFunctor struct. Related + * to the C++ class Replaceable. + * This is currently only used in the Transliterator C API, see utrans.h . + * @stable ICU 2.0 + */ +typedef void* UReplaceable; + +/** + * A set of function pointers that transliterators use to manipulate a + * UReplaceable. The caller should supply the required functions to + * manipulate their text appropriately. Related to the C++ class + * Replaceable. + * @stable ICU 2.0 + */ +typedef struct UReplaceableCallbacks { + + /** + * Function pointer that returns the number of UChar code units in + * this text. + * + * @param rep A pointer to "this" UReplaceable object. + * @return The length of the text. + * @stable ICU 2.0 + */ + int32_t (*length)(const UReplaceable* rep); + + /** + * Function pointer that returns a UChar code units at the given + * offset into this text; 0 <= offset < n, where n is the value + * returned by (*length)(rep). See unistr.h for a description of + * charAt() vs. char32At(). + * + * @param rep A pointer to "this" UReplaceable object. + * @param offset The index at which to fetch the UChar (code unit). + * @return The UChar (code unit) at offset, or U+FFFF if the offset is out of bounds. + * @stable ICU 2.0 + */ + UChar (*charAt)(const UReplaceable* rep, + int32_t offset); + + /** + * Function pointer that returns a UChar32 code point at the given + * offset into this text. See unistr.h for a description of + * charAt() vs. char32At(). + * + * @param rep A pointer to "this" UReplaceable object. + * @param offset The index at which to fetch the UChar32 (code point). + * @return The UChar32 (code point) at offset, or U+FFFF if the offset is out of bounds. + * @stable ICU 2.0 + */ + UChar32 (*char32At)(const UReplaceable* rep, + int32_t offset); + + /** + * Function pointer that replaces text between start and limit in + * this text with the given text. Attributes (out of band info) + * should be retained. + * + * @param rep A pointer to "this" UReplaceable object. + * @param start the starting index of the text to be replaced, + * inclusive. + * @param limit the ending index of the text to be replaced, + * exclusive. + * @param text the new text to replace the UChars from + * start..limit-1. + * @param textLength the number of UChars at text, or -1 if text + * is null-terminated. + * @stable ICU 2.0 + */ + void (*replace)(UReplaceable* rep, + int32_t start, + int32_t limit, + const UChar* text, + int32_t textLength); + + /** + * Function pointer that copies the characters in the range + * [<tt>start</tt>, <tt>limit</tt>) into the array <tt>dst</tt>. + * + * @param rep A pointer to "this" UReplaceable object. + * @param start offset of first character which will be copied + * into the array + * @param limit offset immediately following the last character to + * be copied + * @param dst array in which to copy characters. The length of + * <tt>dst</tt> must be at least <tt>(limit - start)</tt>. + * @stable ICU 2.1 + */ + void (*extract)(UReplaceable* rep, + int32_t start, + int32_t limit, + UChar* dst); + + /** + * Function pointer that copies text between start and limit in + * this text to another index in the text. Attributes (out of + * band info) should be retained. After this call, there will be + * (at least) two copies of the characters originally located at + * start..limit-1. + * + * @param rep A pointer to "this" UReplaceable object. + * @param start the starting index of the text to be copied, + * inclusive. + * @param limit the ending index of the text to be copied, + * exclusive. + * @param dest the index at which the copy of the UChars should be + * inserted. + * @stable ICU 2.0 + */ + void (*copy)(UReplaceable* rep, + int32_t start, + int32_t limit, + int32_t dest); + +} UReplaceableCallbacks; + +U_CDECL_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ures.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ures.h new file mode 100755 index 00000000..af0ce76f --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ures.h @@ -0,0 +1,908 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 1997-2016, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* +* File URES.H (formerly CRESBUND.H) +* +* Modification History: +* +* Date Name Description +* 04/01/97 aliu Creation. +* 02/22/99 damiba overhaul. +* 04/04/99 helena Fixed internal header inclusion. +* 04/15/99 Madhu Updated Javadoc +* 06/14/99 stephen Removed functions taking a filename suffix. +* 07/20/99 stephen Language-independent typedef to void* +* 11/09/99 weiv Added ures_getLocale() +* 06/24/02 weiv Added support for resource sharing +****************************************************************************** +*/ + +#ifndef URES_H +#define URES_H + +#include "unicode/utypes.h" +#include "unicode/uloc.h" +#include "unicode/localpointer.h" + +/** + * \file + * \brief C API: Resource Bundle + * + * <h2>C API: Resource Bundle</h2> + * + * C API representing a collection of resource information pertaining to a given + * locale. A resource bundle provides a way of accessing locale- specific information in + * a data file. You create a resource bundle that manages the resources for a given + * locale and then ask it for individual resources. + * <P> + * Resource bundles in ICU4C are currently defined using text files which conform to the following + * <a href="http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt">BNF definition</a>. + * More on resource bundle concepts and syntax can be found in the + * <a href="http://icu-project.org/userguide/ResourceManagement.html">Users Guide</a>. + * <P> + */ + +/** + * UResourceBundle is an opaque type for handles for resource bundles in C APIs. + * @stable ICU 2.0 + */ +struct UResourceBundle; + +/** + * @stable ICU 2.0 + */ +typedef struct UResourceBundle UResourceBundle; + +/** + * Numeric constants for types of resource items. + * @see ures_getType + * @stable ICU 2.0 + */ +typedef enum { + /** Resource type constant for "no resource". @stable ICU 2.6 */ + URES_NONE=-1, + + /** Resource type constant for 16-bit Unicode strings. @stable ICU 2.6 */ + URES_STRING=0, + + /** Resource type constant for binary data. @stable ICU 2.6 */ + URES_BINARY=1, + + /** Resource type constant for tables of key-value pairs. @stable ICU 2.6 */ + URES_TABLE=2, + + /** + * Resource type constant for aliases; + * internally stores a string which identifies the actual resource + * storing the data (can be in a different resource bundle). + * Resolved internally before delivering the actual resource through the API. + * @stable ICU 2.6 + */ + URES_ALIAS=3, + + /** + * Resource type constant for a single 28-bit integer, interpreted as + * signed or unsigned by the ures_getInt() or ures_getUInt() function. + * @see ures_getInt + * @see ures_getUInt + * @stable ICU 2.6 + */ + URES_INT=7, + + /** Resource type constant for arrays of resources. @stable ICU 2.6 */ + URES_ARRAY=8, + + /** + * Resource type constant for vectors of 32-bit integers. + * @see ures_getIntVector + * @stable ICU 2.6 + */ + URES_INT_VECTOR = 14, +#ifndef U_HIDE_DEPRECATED_API + /** @deprecated ICU 2.6 Use the URES_ constant instead. */ + RES_NONE=URES_NONE, + /** @deprecated ICU 2.6 Use the URES_ constant instead. */ + RES_STRING=URES_STRING, + /** @deprecated ICU 2.6 Use the URES_ constant instead. */ + RES_BINARY=URES_BINARY, + /** @deprecated ICU 2.6 Use the URES_ constant instead. */ + RES_TABLE=URES_TABLE, + /** @deprecated ICU 2.6 Use the URES_ constant instead. */ + RES_ALIAS=URES_ALIAS, + /** @deprecated ICU 2.6 Use the URES_ constant instead. */ + RES_INT=URES_INT, + /** @deprecated ICU 2.6 Use the URES_ constant instead. */ + RES_ARRAY=URES_ARRAY, + /** @deprecated ICU 2.6 Use the URES_ constant instead. */ + RES_INT_VECTOR=URES_INT_VECTOR, + /** @deprecated ICU 2.6 Not used. */ + RES_RESERVED=15, + + /** + * One more than the highest normal UResType value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + URES_LIMIT = 16 +#endif // U_HIDE_DEPRECATED_API +} UResType; + +/* + * Functions to create and destroy resource bundles. + */ + +/** + * Opens a UResourceBundle, from which users can extract strings by using + * their corresponding keys. + * Note that the caller is responsible of calling <TT>ures_close</TT> on each successfully + * opened resource bundle. + * @param packageName The packageName and locale together point to an ICU udata object, + * as defined by <code> udata_open( packageName, "res", locale, err) </code> + * or equivalent. Typically, packageName will refer to a (.dat) file, or to + * a package registered with udata_setAppData(). Using a full file or directory + * pathname for packageName is deprecated. If NULL, ICU data will be used. + * @param locale specifies the locale for which we want to open the resource + * if NULL, the default locale will be used. If strlen(locale) == 0 + * root locale will be used. + * + * @param status fills in the outgoing error code. + * The UErrorCode err parameter is used to return status information to the user. To + * check whether the construction succeeded or not, you should check the value of + * U_SUCCESS(err). If you wish more detailed information, you can check for + * informational status results which still indicate success. U_USING_FALLBACK_WARNING + * indicates that a fall back locale was used. For example, 'de_CH' was requested, + * but nothing was found there, so 'de' was used. U_USING_DEFAULT_WARNING indicates that + * the default locale data or root locale data was used; neither the requested locale + * nor any of its fall back locales could be found. Please see the users guide for more + * information on this topic. + * @return a newly allocated resource bundle. + * @see ures_close + * @stable ICU 2.0 + */ +U_STABLE UResourceBundle* U_EXPORT2 +ures_open(const char* packageName, + const char* locale, + UErrorCode* status); + + +/** This function does not care what kind of localeID is passed in. It simply opens a bundle with + * that name. Fallback mechanism is disabled for the new bundle. If the requested bundle contains + * an %%ALIAS directive, the results are undefined. + * @param packageName The packageName and locale together point to an ICU udata object, + * as defined by <code> udata_open( packageName, "res", locale, err) </code> + * or equivalent. Typically, packageName will refer to a (.dat) file, or to + * a package registered with udata_setAppData(). Using a full file or directory + * pathname for packageName is deprecated. If NULL, ICU data will be used. + * @param locale specifies the locale for which we want to open the resource + * if NULL, the default locale will be used. If strlen(locale) == 0 + * root locale will be used. + * + * @param status fills in the outgoing error code. Either U_ZERO_ERROR or U_MISSING_RESOURCE_ERROR + * @return a newly allocated resource bundle or NULL if it doesn't exist. + * @see ures_close + * @stable ICU 2.0 + */ +U_STABLE UResourceBundle* U_EXPORT2 +ures_openDirect(const char* packageName, + const char* locale, + UErrorCode* status); + +/** + * Same as ures_open() but takes a const UChar *path. + * This path will be converted to char * using the default converter, + * then ures_open() is called. + * + * @param packageName The packageName and locale together point to an ICU udata object, + * as defined by <code> udata_open( packageName, "res", locale, err) </code> + * or equivalent. Typically, packageName will refer to a (.dat) file, or to + * a package registered with udata_setAppData(). Using a full file or directory + * pathname for packageName is deprecated. If NULL, ICU data will be used. + * @param locale specifies the locale for which we want to open the resource + * if NULL, the default locale will be used. If strlen(locale) == 0 + * root locale will be used. + * @param status fills in the outgoing error code. + * @return a newly allocated resource bundle. + * @see ures_open + * @stable ICU 2.0 + */ +U_STABLE UResourceBundle* U_EXPORT2 +ures_openU(const UChar* packageName, + const char* locale, + UErrorCode* status); + +#ifndef U_HIDE_DEPRECATED_API +/** + * Returns the number of strings/arrays in resource bundles. + * Better to use ures_getSize, as this function will be deprecated. + * + *@param resourceBundle resource bundle containing the desired strings + *@param resourceKey key tagging the resource + *@param err fills in the outgoing error code + * could be <TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not found + * could be a non-failing error + * e.g.: <TT>U_USING_FALLBACK_WARNING</TT>,<TT>U_USING_FALLBACK_WARNING </TT> + *@return: for <STRONG>Arrays</STRONG>: returns the number of resources in the array + * <STRONG>Tables</STRONG>: returns the number of resources in the table + * <STRONG>single string</STRONG>: returns 1 + *@see ures_getSize + * @deprecated ICU 2.8 User ures_getSize instead + */ +U_DEPRECATED int32_t U_EXPORT2 +ures_countArrayItems(const UResourceBundle* resourceBundle, + const char* resourceKey, + UErrorCode* err); +#endif /* U_HIDE_DEPRECATED_API */ + +/** + * Close a resource bundle, all pointers returned from the various ures_getXXX calls + * on this particular bundle should be considered invalid henceforth. + * + * @param resourceBundle a pointer to a resourceBundle struct. Can be NULL. + * @see ures_open + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ures_close(UResourceBundle* resourceBundle); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUResourceBundlePointer + * "Smart pointer" class, closes a UResourceBundle via ures_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUResourceBundlePointer, UResourceBundle, ures_close); + +U_NAMESPACE_END + +#endif + +#ifndef U_HIDE_DEPRECATED_API +/** + * Return the version number associated with this ResourceBundle as a string. Please + * use ures_getVersion as this function is going to be deprecated. + * + * @param resourceBundle The resource bundle for which the version is checked. + * @return A version number string as specified in the resource bundle or its parent. + * The caller does not own this string. + * @see ures_getVersion + * @deprecated ICU 2.8 Use ures_getVersion instead. + */ +U_DEPRECATED const char* U_EXPORT2 +ures_getVersionNumber(const UResourceBundle* resourceBundle); +#endif /* U_HIDE_DEPRECATED_API */ + +/** + * Return the version number associated with this ResourceBundle as an + * UVersionInfo array. + * + * @param resB The resource bundle for which the version is checked. + * @param versionInfo A UVersionInfo array that is filled with the version number + * as specified in the resource bundle or its parent. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ures_getVersion(const UResourceBundle* resB, + UVersionInfo versionInfo); + +#ifndef U_HIDE_DEPRECATED_API +/** + * Return the name of the Locale associated with this ResourceBundle. This API allows + * you to query for the real locale of the resource. For example, if you requested + * "en_US_CALIFORNIA" and only "en_US" bundle exists, "en_US" will be returned. + * For subresources, the locale where this resource comes from will be returned. + * If fallback has occurred, getLocale will reflect this. + * + * @param resourceBundle resource bundle in question + * @param status just for catching illegal arguments + * @return A Locale name + * @deprecated ICU 2.8 Use ures_getLocaleByType instead. + */ +U_DEPRECATED const char* U_EXPORT2 +ures_getLocale(const UResourceBundle* resourceBundle, + UErrorCode* status); +#endif /* U_HIDE_DEPRECATED_API */ + +/** + * Return the name of the Locale associated with this ResourceBundle. + * You can choose between requested, valid and real locale. + * + * @param resourceBundle resource bundle in question + * @param type You can choose between requested, valid and actual + * locale. For description see the definition of + * ULocDataLocaleType in uloc.h + * @param status just for catching illegal arguments + * @return A Locale name + * @stable ICU 2.8 + */ +U_STABLE const char* U_EXPORT2 +ures_getLocaleByType(const UResourceBundle* resourceBundle, + ULocDataLocaleType type, + UErrorCode* status); + + +#ifndef U_HIDE_INTERNAL_API +/** + * Same as ures_open() but uses the fill-in parameter instead of allocating + * a bundle, if r!=NULL. + * TODO need to revisit usefulness of this function + * and usage model for fillIn parameters without knowing sizeof(UResourceBundle) + * @param r The resourcebundle to open + * @param packageName The packageName and locale together point to an ICU udata object, + * as defined by <code> udata_open( packageName, "res", locale, err) </code> + * or equivalent. Typically, packageName will refer to a (.dat) file, or to + * a package registered with udata_setAppData(). Using a full file or directory + * pathname for packageName is deprecated. If NULL, ICU data will be used. + * @param localeID specifies the locale for which we want to open the resource + * @param status The error code + * @return a newly allocated resource bundle or NULL if it doesn't exist. + * @internal + */ +U_INTERNAL void U_EXPORT2 +ures_openFillIn(UResourceBundle *r, + const char* packageName, + const char* localeID, + UErrorCode* status); +#endif /* U_HIDE_INTERNAL_API */ + +/** + * Returns a string from a string resource type + * + * @param resourceBundle a string resource + * @param len fills in the length of resulting string + * @param status fills in the outgoing error code + * could be <TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not found + * Always check the value of status. Don't count on returning NULL. + * could be a non-failing error + * e.g.: <TT>U_USING_FALLBACK_WARNING</TT>,<TT>U_USING_DEFAULT_WARNING </TT> + * @return a pointer to a zero-terminated UChar array which lives in a memory mapped/DLL file. + * @see ures_getBinary + * @see ures_getIntVector + * @see ures_getInt + * @see ures_getUInt + * @stable ICU 2.0 + */ +U_STABLE const UChar* U_EXPORT2 +ures_getString(const UResourceBundle* resourceBundle, + int32_t* len, + UErrorCode* status); + +/** + * Returns a UTF-8 string from a string resource. + * The UTF-8 string may be returnable directly as a pointer, or + * it may need to be copied, or transformed from UTF-16 using u_strToUTF8() + * or equivalent. + * + * If forceCopy==TRUE, then the string is always written to the dest buffer + * and dest is returned. + * + * If forceCopy==FALSE, then the string is returned as a pointer if possible, + * without needing a dest buffer (it can be NULL). If the string needs to be + * copied or transformed, then it may be placed into dest at an arbitrary offset. + * + * If the string is to be written to dest, then U_BUFFER_OVERFLOW_ERROR and + * U_STRING_NOT_TERMINATED_WARNING are set if appropriate, as usual. + * + * If the string is transformed from UTF-16, then a conversion error may occur + * if an unpaired surrogate is encountered. If the function is successful, then + * the output UTF-8 string is always well-formed. + * + * @param resB Resource bundle. + * @param dest Destination buffer. Can be NULL only if capacity=*length==0. + * @param length Input: Capacity of destination buffer. + * Output: Actual length of the UTF-8 string, not counting the + * terminating NUL, even in case of U_BUFFER_OVERFLOW_ERROR. + * Can be NULL, meaning capacity=0 and the string length is not + * returned to the caller. + * @param forceCopy If TRUE, then the output string will always be written to + * dest, with U_BUFFER_OVERFLOW_ERROR and + * U_STRING_NOT_TERMINATED_WARNING set if appropriate. + * If FALSE, then the dest buffer may or may not contain a + * copy of the string. dest may or may not be modified. + * If a copy needs to be written, then the UErrorCode parameter + * indicates overflow etc. as usual. + * @param status Pointer to a standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return The pointer to the UTF-8 string. It may be dest, or at some offset + * from dest (only if !forceCopy), or in unrelated memory. + * Always NUL-terminated unless the string was written to dest and + * length==capacity (in which case U_STRING_NOT_TERMINATED_WARNING is set). + * + * @see ures_getString + * @see u_strToUTF8 + * @stable ICU 3.6 + */ +U_STABLE const char * U_EXPORT2 +ures_getUTF8String(const UResourceBundle *resB, + char *dest, int32_t *length, + UBool forceCopy, + UErrorCode *status); + +/** + * Returns a binary data from a binary resource. + * + * @param resourceBundle a string resource + * @param len fills in the length of resulting byte chunk + * @param status fills in the outgoing error code + * could be <TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not found + * Always check the value of status. Don't count on returning NULL. + * could be a non-failing error + * e.g.: <TT>U_USING_FALLBACK_WARNING</TT>,<TT>U_USING_DEFAULT_WARNING </TT> + * @return a pointer to a chunk of unsigned bytes which live in a memory mapped/DLL file. + * @see ures_getString + * @see ures_getIntVector + * @see ures_getInt + * @see ures_getUInt + * @stable ICU 2.0 + */ +U_STABLE const uint8_t* U_EXPORT2 +ures_getBinary(const UResourceBundle* resourceBundle, + int32_t* len, + UErrorCode* status); + +/** + * Returns a 32 bit integer array from a resource. + * + * @param resourceBundle an int vector resource + * @param len fills in the length of resulting byte chunk + * @param status fills in the outgoing error code + * could be <TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not found + * Always check the value of status. Don't count on returning NULL. + * could be a non-failing error + * e.g.: <TT>U_USING_FALLBACK_WARNING</TT>,<TT>U_USING_DEFAULT_WARNING </TT> + * @return a pointer to a chunk of integers which live in a memory mapped/DLL file. + * @see ures_getBinary + * @see ures_getString + * @see ures_getInt + * @see ures_getUInt + * @stable ICU 2.0 + */ +U_STABLE const int32_t* U_EXPORT2 +ures_getIntVector(const UResourceBundle* resourceBundle, + int32_t* len, + UErrorCode* status); + +/** + * Returns an unsigned integer from a resource. + * This integer is originally 28 bits. + * + * @param resourceBundle a string resource + * @param status fills in the outgoing error code + * could be <TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not found + * could be a non-failing error + * e.g.: <TT>U_USING_FALLBACK_WARNING</TT>,<TT>U_USING_DEFAULT_WARNING </TT> + * @return an integer value + * @see ures_getInt + * @see ures_getIntVector + * @see ures_getBinary + * @see ures_getString + * @stable ICU 2.0 + */ +U_STABLE uint32_t U_EXPORT2 +ures_getUInt(const UResourceBundle* resourceBundle, + UErrorCode *status); + +/** + * Returns a signed integer from a resource. + * This integer is originally 28 bit and the sign gets propagated. + * + * @param resourceBundle a string resource + * @param status fills in the outgoing error code + * could be <TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not found + * could be a non-failing error + * e.g.: <TT>U_USING_FALLBACK_WARNING</TT>,<TT>U_USING_DEFAULT_WARNING </TT> + * @return an integer value + * @see ures_getUInt + * @see ures_getIntVector + * @see ures_getBinary + * @see ures_getString + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ures_getInt(const UResourceBundle* resourceBundle, + UErrorCode *status); + +/** + * Returns the size of a resource. Size for scalar types is always 1, + * and for vector/table types is the number of child resources. + * @warning Integer array is treated as a scalar type. There are no + * APIs to access individual members of an integer array. It + * is always returned as a whole. + * @param resourceBundle a resource + * @return number of resources in a given resource. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +ures_getSize(const UResourceBundle *resourceBundle); + +/** + * Returns the type of a resource. Available types are defined in enum UResType + * + * @param resourceBundle a resource + * @return type of the given resource. + * @see UResType + * @stable ICU 2.0 + */ +U_STABLE UResType U_EXPORT2 +ures_getType(const UResourceBundle *resourceBundle); + +/** + * Returns the key associated with a given resource. Not all the resources have a key - only + * those that are members of a table. + * + * @param resourceBundle a resource + * @return a key associated to this resource, or NULL if it doesn't have a key + * @stable ICU 2.0 + */ +U_STABLE const char * U_EXPORT2 +ures_getKey(const UResourceBundle *resourceBundle); + +/* ITERATION API + This API provides means for iterating through a resource +*/ + +/** + * Resets the internal context of a resource so that iteration starts from the first element. + * + * @param resourceBundle a resource + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +ures_resetIterator(UResourceBundle *resourceBundle); + +/** + * Checks whether the given resource has another element to iterate over. + * + * @param resourceBundle a resource + * @return TRUE if there are more elements, FALSE if there is no more elements + * @stable ICU 2.0 + */ +U_STABLE UBool U_EXPORT2 +ures_hasNext(const UResourceBundle *resourceBundle); + +/** + * Returns the next resource in a given resource or NULL if there are no more resources + * to iterate over. Features a fill-in parameter. + * + * @param resourceBundle a resource + * @param fillIn if NULL a new UResourceBundle struct is allocated and must be closed by the caller. + * Alternatively, you can supply a struct to be filled by this function. + * @param status fills in the outgoing error code. You may still get a non NULL result even if an + * error occurred. Check status instead. + * @return a pointer to a UResourceBundle struct. If fill in param was NULL, caller must close it + * @stable ICU 2.0 + */ +U_STABLE UResourceBundle* U_EXPORT2 +ures_getNextResource(UResourceBundle *resourceBundle, + UResourceBundle *fillIn, + UErrorCode *status); + +/** + * Returns the next string in a given resource or NULL if there are no more resources + * to iterate over. + * + * @param resourceBundle a resource + * @param len fill in length of the string + * @param key fill in for key associated with this string. NULL if no key + * @param status fills in the outgoing error code. If an error occurred, we may return NULL, but don't + * count on it. Check status instead! + * @return a pointer to a zero-terminated UChar array which lives in a memory mapped/DLL file. + * @stable ICU 2.0 + */ +U_STABLE const UChar* U_EXPORT2 +ures_getNextString(UResourceBundle *resourceBundle, + int32_t* len, + const char ** key, + UErrorCode *status); + +/** + * Returns the resource in a given resource at the specified index. Features a fill-in parameter. + * + * @param resourceBundle the resource bundle from which to get a sub-resource + * @param indexR an index to the wanted resource. + * @param fillIn if NULL a new UResourceBundle struct is allocated and must be closed by the caller. + * Alternatively, you can supply a struct to be filled by this function. + * @param status fills in the outgoing error code. Don't count on NULL being returned if an error has + * occurred. Check status instead. + * @return a pointer to a UResourceBundle struct. If fill in param was NULL, caller must close it + * @stable ICU 2.0 + */ +U_STABLE UResourceBundle* U_EXPORT2 +ures_getByIndex(const UResourceBundle *resourceBundle, + int32_t indexR, + UResourceBundle *fillIn, + UErrorCode *status); + +/** + * Returns the string in a given resource at the specified index. + * + * @param resourceBundle a resource + * @param indexS an index to the wanted string. + * @param len fill in length of the string + * @param status fills in the outgoing error code. If an error occurred, we may return NULL, but don't + * count on it. Check status instead! + * @return a pointer to a zero-terminated UChar array which lives in a memory mapped/DLL file. + * @stable ICU 2.0 + */ +U_STABLE const UChar* U_EXPORT2 +ures_getStringByIndex(const UResourceBundle *resourceBundle, + int32_t indexS, + int32_t* len, + UErrorCode *status); + +/** + * Returns a UTF-8 string from a resource at the specified index. + * The UTF-8 string may be returnable directly as a pointer, or + * it may need to be copied, or transformed from UTF-16 using u_strToUTF8() + * or equivalent. + * + * If forceCopy==TRUE, then the string is always written to the dest buffer + * and dest is returned. + * + * If forceCopy==FALSE, then the string is returned as a pointer if possible, + * without needing a dest buffer (it can be NULL). If the string needs to be + * copied or transformed, then it may be placed into dest at an arbitrary offset. + * + * If the string is to be written to dest, then U_BUFFER_OVERFLOW_ERROR and + * U_STRING_NOT_TERMINATED_WARNING are set if appropriate, as usual. + * + * If the string is transformed from UTF-16, then a conversion error may occur + * if an unpaired surrogate is encountered. If the function is successful, then + * the output UTF-8 string is always well-formed. + * + * @param resB Resource bundle. + * @param stringIndex An index to the wanted string. + * @param dest Destination buffer. Can be NULL only if capacity=*length==0. + * @param pLength Input: Capacity of destination buffer. + * Output: Actual length of the UTF-8 string, not counting the + * terminating NUL, even in case of U_BUFFER_OVERFLOW_ERROR. + * Can be NULL, meaning capacity=0 and the string length is not + * returned to the caller. + * @param forceCopy If TRUE, then the output string will always be written to + * dest, with U_BUFFER_OVERFLOW_ERROR and + * U_STRING_NOT_TERMINATED_WARNING set if appropriate. + * If FALSE, then the dest buffer may or may not contain a + * copy of the string. dest may or may not be modified. + * If a copy needs to be written, then the UErrorCode parameter + * indicates overflow etc. as usual. + * @param status Pointer to a standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return The pointer to the UTF-8 string. It may be dest, or at some offset + * from dest (only if !forceCopy), or in unrelated memory. + * Always NUL-terminated unless the string was written to dest and + * length==capacity (in which case U_STRING_NOT_TERMINATED_WARNING is set). + * + * @see ures_getStringByIndex + * @see u_strToUTF8 + * @stable ICU 3.6 + */ +U_STABLE const char * U_EXPORT2 +ures_getUTF8StringByIndex(const UResourceBundle *resB, + int32_t stringIndex, + char *dest, int32_t *pLength, + UBool forceCopy, + UErrorCode *status); + +/** + * Returns a resource in a given resource that has a given key. This procedure works only with table + * resources. Features a fill-in parameter. + * + * @param resourceBundle a resource + * @param key a key associated with the wanted resource + * @param fillIn if NULL a new UResourceBundle struct is allocated and must be closed by the caller. + * Alternatively, you can supply a struct to be filled by this function. + * @param status fills in the outgoing error code. + * @return a pointer to a UResourceBundle struct. If fill in param was NULL, caller must close it + * @stable ICU 2.0 + */ +U_STABLE UResourceBundle* U_EXPORT2 +ures_getByKey(const UResourceBundle *resourceBundle, + const char* key, + UResourceBundle *fillIn, + UErrorCode *status); + +/** + * Returns a string in a given resource that has a given key. This procedure works only with table + * resources. + * + * @param resB a resource + * @param key a key associated with the wanted string + * @param len fill in length of the string + * @param status fills in the outgoing error code. If an error occurred, we may return NULL, but don't + * count on it. Check status instead! + * @return a pointer to a zero-terminated UChar array which lives in a memory mapped/DLL file. + * @stable ICU 2.0 + */ +U_STABLE const UChar* U_EXPORT2 +ures_getStringByKey(const UResourceBundle *resB, + const char* key, + int32_t* len, + UErrorCode *status); + +/** + * Returns a UTF-8 string from a resource and a key. + * This function works only with table resources. + * + * The UTF-8 string may be returnable directly as a pointer, or + * it may need to be copied, or transformed from UTF-16 using u_strToUTF8() + * or equivalent. + * + * If forceCopy==TRUE, then the string is always written to the dest buffer + * and dest is returned. + * + * If forceCopy==FALSE, then the string is returned as a pointer if possible, + * without needing a dest buffer (it can be NULL). If the string needs to be + * copied or transformed, then it may be placed into dest at an arbitrary offset. + * + * If the string is to be written to dest, then U_BUFFER_OVERFLOW_ERROR and + * U_STRING_NOT_TERMINATED_WARNING are set if appropriate, as usual. + * + * If the string is transformed from UTF-16, then a conversion error may occur + * if an unpaired surrogate is encountered. If the function is successful, then + * the output UTF-8 string is always well-formed. + * + * @param resB Resource bundle. + * @param key A key associated with the wanted resource + * @param dest Destination buffer. Can be NULL only if capacity=*length==0. + * @param pLength Input: Capacity of destination buffer. + * Output: Actual length of the UTF-8 string, not counting the + * terminating NUL, even in case of U_BUFFER_OVERFLOW_ERROR. + * Can be NULL, meaning capacity=0 and the string length is not + * returned to the caller. + * @param forceCopy If TRUE, then the output string will always be written to + * dest, with U_BUFFER_OVERFLOW_ERROR and + * U_STRING_NOT_TERMINATED_WARNING set if appropriate. + * If FALSE, then the dest buffer may or may not contain a + * copy of the string. dest may or may not be modified. + * If a copy needs to be written, then the UErrorCode parameter + * indicates overflow etc. as usual. + * @param status Pointer to a standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return The pointer to the UTF-8 string. It may be dest, or at some offset + * from dest (only if !forceCopy), or in unrelated memory. + * Always NUL-terminated unless the string was written to dest and + * length==capacity (in which case U_STRING_NOT_TERMINATED_WARNING is set). + * + * @see ures_getStringByKey + * @see u_strToUTF8 + * @stable ICU 3.6 + */ +U_STABLE const char * U_EXPORT2 +ures_getUTF8StringByKey(const UResourceBundle *resB, + const char *key, + char *dest, int32_t *pLength, + UBool forceCopy, + UErrorCode *status); + +#if U_SHOW_CPLUSPLUS_API +#include "unicode/unistr.h" + +U_NAMESPACE_BEGIN +/** + * Returns the string value from a string resource bundle. + * + * @param resB a resource, should have type URES_STRING + * @param status: fills in the outgoing error code + * could be <TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not found + * could be a non-failing error + * e.g.: <TT>U_USING_FALLBACK_WARNING</TT>,<TT>U_USING_DEFAULT_WARNING </TT> + * @return The string value, or a bogus string if there is a failure UErrorCode. + * @stable ICU 2.0 + */ +inline UnicodeString +ures_getUnicodeString(const UResourceBundle *resB, UErrorCode* status) { + UnicodeString result; + int32_t len = 0; + const UChar *r = ures_getString(resB, &len, status); + if(U_SUCCESS(*status)) { + result.setTo(TRUE, r, len); + } else { + result.setToBogus(); + } + return result; +} + +/** + * Returns the next string in a resource, or an empty string if there are no more resources + * to iterate over. + * Use ures_getNextString() instead to distinguish between + * the end of the iteration and a real empty string value. + * + * @param resB a resource + * @param key fill in for key associated with this string + * @param status fills in the outgoing error code + * @return The string value, or a bogus string if there is a failure UErrorCode. + * @stable ICU 2.0 + */ +inline UnicodeString +ures_getNextUnicodeString(UResourceBundle *resB, const char ** key, UErrorCode* status) { + UnicodeString result; + int32_t len = 0; + const UChar* r = ures_getNextString(resB, &len, key, status); + if(U_SUCCESS(*status)) { + result.setTo(TRUE, r, len); + } else { + result.setToBogus(); + } + return result; +} + +/** + * Returns the string in a given resource array or table at the specified index. + * + * @param resB a resource + * @param indexS an index to the wanted string. + * @param status fills in the outgoing error code + * @return The string value, or a bogus string if there is a failure UErrorCode. + * @stable ICU 2.0 + */ +inline UnicodeString +ures_getUnicodeStringByIndex(const UResourceBundle *resB, int32_t indexS, UErrorCode* status) { + UnicodeString result; + int32_t len = 0; + const UChar* r = ures_getStringByIndex(resB, indexS, &len, status); + if(U_SUCCESS(*status)) { + result.setTo(TRUE, r, len); + } else { + result.setToBogus(); + } + return result; +} + +/** + * Returns a string in a resource that has a given key. + * This procedure works only with table resources. + * + * @param resB a resource + * @param key a key associated with the wanted string + * @param status fills in the outgoing error code + * @return The string value, or a bogus string if there is a failure UErrorCode. + * @stable ICU 2.0 + */ +inline UnicodeString +ures_getUnicodeStringByKey(const UResourceBundle *resB, const char* key, UErrorCode* status) { + UnicodeString result; + int32_t len = 0; + const UChar* r = ures_getStringByKey(resB, key, &len, status); + if(U_SUCCESS(*status)) { + result.setTo(TRUE, r, len); + } else { + result.setToBogus(); + } + return result; +} + +U_NAMESPACE_END + +#endif + +/** + * Create a string enumerator, owned by the caller, of all locales located within + * the specified resource tree. + * @param packageName name of the tree, such as (NULL) or U_ICUDATA_ALIAS or or "ICUDATA-coll" + * This call is similar to uloc_getAvailable(). + * @param status error code + * @stable ICU 3.2 + */ +U_STABLE UEnumeration* U_EXPORT2 +ures_openAvailableLocales(const char *packageName, UErrorCode *status); + + +#endif /*_URES*/ +/*eof*/ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uscript.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uscript.h new file mode 100755 index 00000000..0befa1cd --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uscript.h @@ -0,0 +1,675 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ********************************************************************** + * Copyright (C) 1997-2016, International Business Machines + * Corporation and others. All Rights Reserved. + ********************************************************************** + * + * File USCRIPT.H + * + * Modification History: + * + * Date Name Description + * 07/06/2001 Ram Creation. + ****************************************************************************** + */ + +#ifndef USCRIPT_H +#define USCRIPT_H +#include "unicode/utypes.h" + +/** + * \file + * \brief C API: Unicode Script Information + */ + +/** + * Constants for ISO 15924 script codes. + * + * The current set of script code constants supports at least all scripts + * that are encoded in the version of Unicode which ICU currently supports. + * The names of the constants are usually derived from the + * Unicode script property value aliases. + * See UAX #24 Unicode Script Property (http://www.unicode.org/reports/tr24/) + * and http://www.unicode.org/Public/UCD/latest/ucd/PropertyValueAliases.txt . + * + * In addition, constants for many ISO 15924 script codes + * are included, for use with language tags, CLDR data, and similar. + * Some of those codes are not used in the Unicode Character Database (UCD). + * For example, there are no characters that have a UCD script property value of + * Hans or Hant. All Han ideographs have the Hani script property value in Unicode. + * + * Private-use codes Qaaa..Qabx are not included, except as used in the UCD or in CLDR. + * + * Starting with ICU 55, script codes are only added when their scripts + * have been or will certainly be encoded in Unicode, + * and have been assigned Unicode script property value aliases, + * to ensure that their script names are stable and match the names of the constants. + * Script codes like Latf and Aran that are not subject to separate encoding + * may be added at any time. + * + * @stable ICU 2.2 + */ +typedef enum UScriptCode { + /* + * Note: UScriptCode constants and their ISO script code comments + * are parsed by preparseucd.py. + * It matches lines like + * USCRIPT_<Unicode Script value name> = <integer>, / * <ISO script code> * / + */ + + /** @stable ICU 2.2 */ + USCRIPT_INVALID_CODE = -1, + /** @stable ICU 2.2 */ + USCRIPT_COMMON = 0, /* Zyyy */ + /** @stable ICU 2.2 */ + USCRIPT_INHERITED = 1, /* Zinh */ /* "Code for inherited script", for non-spacing combining marks; also Qaai */ + /** @stable ICU 2.2 */ + USCRIPT_ARABIC = 2, /* Arab */ + /** @stable ICU 2.2 */ + USCRIPT_ARMENIAN = 3, /* Armn */ + /** @stable ICU 2.2 */ + USCRIPT_BENGALI = 4, /* Beng */ + /** @stable ICU 2.2 */ + USCRIPT_BOPOMOFO = 5, /* Bopo */ + /** @stable ICU 2.2 */ + USCRIPT_CHEROKEE = 6, /* Cher */ + /** @stable ICU 2.2 */ + USCRIPT_COPTIC = 7, /* Copt */ + /** @stable ICU 2.2 */ + USCRIPT_CYRILLIC = 8, /* Cyrl */ + /** @stable ICU 2.2 */ + USCRIPT_DESERET = 9, /* Dsrt */ + /** @stable ICU 2.2 */ + USCRIPT_DEVANAGARI = 10, /* Deva */ + /** @stable ICU 2.2 */ + USCRIPT_ETHIOPIC = 11, /* Ethi */ + /** @stable ICU 2.2 */ + USCRIPT_GEORGIAN = 12, /* Geor */ + /** @stable ICU 2.2 */ + USCRIPT_GOTHIC = 13, /* Goth */ + /** @stable ICU 2.2 */ + USCRIPT_GREEK = 14, /* Grek */ + /** @stable ICU 2.2 */ + USCRIPT_GUJARATI = 15, /* Gujr */ + /** @stable ICU 2.2 */ + USCRIPT_GURMUKHI = 16, /* Guru */ + /** @stable ICU 2.2 */ + USCRIPT_HAN = 17, /* Hani */ + /** @stable ICU 2.2 */ + USCRIPT_HANGUL = 18, /* Hang */ + /** @stable ICU 2.2 */ + USCRIPT_HEBREW = 19, /* Hebr */ + /** @stable ICU 2.2 */ + USCRIPT_HIRAGANA = 20, /* Hira */ + /** @stable ICU 2.2 */ + USCRIPT_KANNADA = 21, /* Knda */ + /** @stable ICU 2.2 */ + USCRIPT_KATAKANA = 22, /* Kana */ + /** @stable ICU 2.2 */ + USCRIPT_KHMER = 23, /* Khmr */ + /** @stable ICU 2.2 */ + USCRIPT_LAO = 24, /* Laoo */ + /** @stable ICU 2.2 */ + USCRIPT_LATIN = 25, /* Latn */ + /** @stable ICU 2.2 */ + USCRIPT_MALAYALAM = 26, /* Mlym */ + /** @stable ICU 2.2 */ + USCRIPT_MONGOLIAN = 27, /* Mong */ + /** @stable ICU 2.2 */ + USCRIPT_MYANMAR = 28, /* Mymr */ + /** @stable ICU 2.2 */ + USCRIPT_OGHAM = 29, /* Ogam */ + /** @stable ICU 2.2 */ + USCRIPT_OLD_ITALIC = 30, /* Ital */ + /** @stable ICU 2.2 */ + USCRIPT_ORIYA = 31, /* Orya */ + /** @stable ICU 2.2 */ + USCRIPT_RUNIC = 32, /* Runr */ + /** @stable ICU 2.2 */ + USCRIPT_SINHALA = 33, /* Sinh */ + /** @stable ICU 2.2 */ + USCRIPT_SYRIAC = 34, /* Syrc */ + /** @stable ICU 2.2 */ + USCRIPT_TAMIL = 35, /* Taml */ + /** @stable ICU 2.2 */ + USCRIPT_TELUGU = 36, /* Telu */ + /** @stable ICU 2.2 */ + USCRIPT_THAANA = 37, /* Thaa */ + /** @stable ICU 2.2 */ + USCRIPT_THAI = 38, /* Thai */ + /** @stable ICU 2.2 */ + USCRIPT_TIBETAN = 39, /* Tibt */ + /** Canadian_Aboriginal script. @stable ICU 2.6 */ + USCRIPT_CANADIAN_ABORIGINAL = 40, /* Cans */ + /** Canadian_Aboriginal script (alias). @stable ICU 2.2 */ + USCRIPT_UCAS = USCRIPT_CANADIAN_ABORIGINAL, + /** @stable ICU 2.2 */ + USCRIPT_YI = 41, /* Yiii */ + /* New scripts in Unicode 3.2 */ + /** @stable ICU 2.2 */ + USCRIPT_TAGALOG = 42, /* Tglg */ + /** @stable ICU 2.2 */ + USCRIPT_HANUNOO = 43, /* Hano */ + /** @stable ICU 2.2 */ + USCRIPT_BUHID = 44, /* Buhd */ + /** @stable ICU 2.2 */ + USCRIPT_TAGBANWA = 45, /* Tagb */ + + /* New scripts in Unicode 4 */ + /** @stable ICU 2.6 */ + USCRIPT_BRAILLE = 46, /* Brai */ + /** @stable ICU 2.6 */ + USCRIPT_CYPRIOT = 47, /* Cprt */ + /** @stable ICU 2.6 */ + USCRIPT_LIMBU = 48, /* Limb */ + /** @stable ICU 2.6 */ + USCRIPT_LINEAR_B = 49, /* Linb */ + /** @stable ICU 2.6 */ + USCRIPT_OSMANYA = 50, /* Osma */ + /** @stable ICU 2.6 */ + USCRIPT_SHAVIAN = 51, /* Shaw */ + /** @stable ICU 2.6 */ + USCRIPT_TAI_LE = 52, /* Tale */ + /** @stable ICU 2.6 */ + USCRIPT_UGARITIC = 53, /* Ugar */ + + /** New script code in Unicode 4.0.1 @stable ICU 3.0 */ + USCRIPT_KATAKANA_OR_HIRAGANA = 54,/*Hrkt */ + + /* New scripts in Unicode 4.1 */ + /** @stable ICU 3.4 */ + USCRIPT_BUGINESE = 55, /* Bugi */ + /** @stable ICU 3.4 */ + USCRIPT_GLAGOLITIC = 56, /* Glag */ + /** @stable ICU 3.4 */ + USCRIPT_KHAROSHTHI = 57, /* Khar */ + /** @stable ICU 3.4 */ + USCRIPT_SYLOTI_NAGRI = 58, /* Sylo */ + /** @stable ICU 3.4 */ + USCRIPT_NEW_TAI_LUE = 59, /* Talu */ + /** @stable ICU 3.4 */ + USCRIPT_TIFINAGH = 60, /* Tfng */ + /** @stable ICU 3.4 */ + USCRIPT_OLD_PERSIAN = 61, /* Xpeo */ + + /* New script codes from Unicode and ISO 15924 */ + /** @stable ICU 3.6 */ + USCRIPT_BALINESE = 62, /* Bali */ + /** @stable ICU 3.6 */ + USCRIPT_BATAK = 63, /* Batk */ + /** @stable ICU 3.6 */ + USCRIPT_BLISSYMBOLS = 64, /* Blis */ + /** @stable ICU 3.6 */ + USCRIPT_BRAHMI = 65, /* Brah */ + /** @stable ICU 3.6 */ + USCRIPT_CHAM = 66, /* Cham */ + /** @stable ICU 3.6 */ + USCRIPT_CIRTH = 67, /* Cirt */ + /** @stable ICU 3.6 */ + USCRIPT_OLD_CHURCH_SLAVONIC_CYRILLIC = 68, /* Cyrs */ + /** @stable ICU 3.6 */ + USCRIPT_DEMOTIC_EGYPTIAN = 69, /* Egyd */ + /** @stable ICU 3.6 */ + USCRIPT_HIERATIC_EGYPTIAN = 70, /* Egyh */ + /** @stable ICU 3.6 */ + USCRIPT_EGYPTIAN_HIEROGLYPHS = 71, /* Egyp */ + /** @stable ICU 3.6 */ + USCRIPT_KHUTSURI = 72, /* Geok */ + /** @stable ICU 3.6 */ + USCRIPT_SIMPLIFIED_HAN = 73, /* Hans */ + /** @stable ICU 3.6 */ + USCRIPT_TRADITIONAL_HAN = 74, /* Hant */ + /** @stable ICU 3.6 */ + USCRIPT_PAHAWH_HMONG = 75, /* Hmng */ + /** @stable ICU 3.6 */ + USCRIPT_OLD_HUNGARIAN = 76, /* Hung */ + /** @stable ICU 3.6 */ + USCRIPT_HARAPPAN_INDUS = 77, /* Inds */ + /** @stable ICU 3.6 */ + USCRIPT_JAVANESE = 78, /* Java */ + /** @stable ICU 3.6 */ + USCRIPT_KAYAH_LI = 79, /* Kali */ + /** @stable ICU 3.6 */ + USCRIPT_LATIN_FRAKTUR = 80, /* Latf */ + /** @stable ICU 3.6 */ + USCRIPT_LATIN_GAELIC = 81, /* Latg */ + /** @stable ICU 3.6 */ + USCRIPT_LEPCHA = 82, /* Lepc */ + /** @stable ICU 3.6 */ + USCRIPT_LINEAR_A = 83, /* Lina */ + /** @stable ICU 4.6 */ + USCRIPT_MANDAIC = 84, /* Mand */ + /** @stable ICU 3.6 */ + USCRIPT_MANDAEAN = USCRIPT_MANDAIC, + /** @stable ICU 3.6 */ + USCRIPT_MAYAN_HIEROGLYPHS = 85, /* Maya */ + /** @stable ICU 4.6 */ + USCRIPT_MEROITIC_HIEROGLYPHS = 86, /* Mero */ + /** @stable ICU 3.6 */ + USCRIPT_MEROITIC = USCRIPT_MEROITIC_HIEROGLYPHS, + /** @stable ICU 3.6 */ + USCRIPT_NKO = 87, /* Nkoo */ + /** @stable ICU 3.6 */ + USCRIPT_ORKHON = 88, /* Orkh */ + /** @stable ICU 3.6 */ + USCRIPT_OLD_PERMIC = 89, /* Perm */ + /** @stable ICU 3.6 */ + USCRIPT_PHAGS_PA = 90, /* Phag */ + /** @stable ICU 3.6 */ + USCRIPT_PHOENICIAN = 91, /* Phnx */ + /** @stable ICU 52 */ + USCRIPT_MIAO = 92, /* Plrd */ + /** @stable ICU 3.6 */ + USCRIPT_PHONETIC_POLLARD = USCRIPT_MIAO, + /** @stable ICU 3.6 */ + USCRIPT_RONGORONGO = 93, /* Roro */ + /** @stable ICU 3.6 */ + USCRIPT_SARATI = 94, /* Sara */ + /** @stable ICU 3.6 */ + USCRIPT_ESTRANGELO_SYRIAC = 95, /* Syre */ + /** @stable ICU 3.6 */ + USCRIPT_WESTERN_SYRIAC = 96, /* Syrj */ + /** @stable ICU 3.6 */ + USCRIPT_EASTERN_SYRIAC = 97, /* Syrn */ + /** @stable ICU 3.6 */ + USCRIPT_TENGWAR = 98, /* Teng */ + /** @stable ICU 3.6 */ + USCRIPT_VAI = 99, /* Vaii */ + /** @stable ICU 3.6 */ + USCRIPT_VISIBLE_SPEECH = 100,/* Visp */ + /** @stable ICU 3.6 */ + USCRIPT_CUNEIFORM = 101,/* Xsux */ + /** @stable ICU 3.6 */ + USCRIPT_UNWRITTEN_LANGUAGES = 102,/* Zxxx */ + /** @stable ICU 3.6 */ + USCRIPT_UNKNOWN = 103,/* Zzzz */ /* Unknown="Code for uncoded script", for unassigned code points */ + + /** @stable ICU 3.8 */ + USCRIPT_CARIAN = 104,/* Cari */ + /** @stable ICU 3.8 */ + USCRIPT_JAPANESE = 105,/* Jpan */ + /** @stable ICU 3.8 */ + USCRIPT_LANNA = 106,/* Lana */ + /** @stable ICU 3.8 */ + USCRIPT_LYCIAN = 107,/* Lyci */ + /** @stable ICU 3.8 */ + USCRIPT_LYDIAN = 108,/* Lydi */ + /** @stable ICU 3.8 */ + USCRIPT_OL_CHIKI = 109,/* Olck */ + /** @stable ICU 3.8 */ + USCRIPT_REJANG = 110,/* Rjng */ + /** @stable ICU 3.8 */ + USCRIPT_SAURASHTRA = 111,/* Saur */ + /** Sutton SignWriting @stable ICU 3.8 */ + USCRIPT_SIGN_WRITING = 112,/* Sgnw */ + /** @stable ICU 3.8 */ + USCRIPT_SUNDANESE = 113,/* Sund */ + /** @stable ICU 3.8 */ + USCRIPT_MOON = 114,/* Moon */ + /** @stable ICU 3.8 */ + USCRIPT_MEITEI_MAYEK = 115,/* Mtei */ + + /** @stable ICU 4.0 */ + USCRIPT_IMPERIAL_ARAMAIC = 116,/* Armi */ + /** @stable ICU 4.0 */ + USCRIPT_AVESTAN = 117,/* Avst */ + /** @stable ICU 4.0 */ + USCRIPT_CHAKMA = 118,/* Cakm */ + /** @stable ICU 4.0 */ + USCRIPT_KOREAN = 119,/* Kore */ + /** @stable ICU 4.0 */ + USCRIPT_KAITHI = 120,/* Kthi */ + /** @stable ICU 4.0 */ + USCRIPT_MANICHAEAN = 121,/* Mani */ + /** @stable ICU 4.0 */ + USCRIPT_INSCRIPTIONAL_PAHLAVI = 122,/* Phli */ + /** @stable ICU 4.0 */ + USCRIPT_PSALTER_PAHLAVI = 123,/* Phlp */ + /** @stable ICU 4.0 */ + USCRIPT_BOOK_PAHLAVI = 124,/* Phlv */ + /** @stable ICU 4.0 */ + USCRIPT_INSCRIPTIONAL_PARTHIAN = 125,/* Prti */ + /** @stable ICU 4.0 */ + USCRIPT_SAMARITAN = 126,/* Samr */ + /** @stable ICU 4.0 */ + USCRIPT_TAI_VIET = 127,/* Tavt */ + /** @stable ICU 4.0 */ + USCRIPT_MATHEMATICAL_NOTATION = 128,/* Zmth */ + /** @stable ICU 4.0 */ + USCRIPT_SYMBOLS = 129,/* Zsym */ + + /** @stable ICU 4.4 */ + USCRIPT_BAMUM = 130,/* Bamu */ + /** @stable ICU 4.4 */ + USCRIPT_LISU = 131,/* Lisu */ + /** @stable ICU 4.4 */ + USCRIPT_NAKHI_GEBA = 132,/* Nkgb */ + /** @stable ICU 4.4 */ + USCRIPT_OLD_SOUTH_ARABIAN = 133,/* Sarb */ + + /** @stable ICU 4.6 */ + USCRIPT_BASSA_VAH = 134,/* Bass */ + /** @stable ICU 54 */ + USCRIPT_DUPLOYAN = 135,/* Dupl */ +#ifndef U_HIDE_DEPRECATED_API + /** @deprecated ICU 54 Typo, use USCRIPT_DUPLOYAN */ + USCRIPT_DUPLOYAN_SHORTAND = USCRIPT_DUPLOYAN, +#endif /* U_HIDE_DEPRECATED_API */ + /** @stable ICU 4.6 */ + USCRIPT_ELBASAN = 136,/* Elba */ + /** @stable ICU 4.6 */ + USCRIPT_GRANTHA = 137,/* Gran */ + /** @stable ICU 4.6 */ + USCRIPT_KPELLE = 138,/* Kpel */ + /** @stable ICU 4.6 */ + USCRIPT_LOMA = 139,/* Loma */ + /** Mende Kikakui @stable ICU 4.6 */ + USCRIPT_MENDE = 140,/* Mend */ + /** @stable ICU 4.6 */ + USCRIPT_MEROITIC_CURSIVE = 141,/* Merc */ + /** @stable ICU 4.6 */ + USCRIPT_OLD_NORTH_ARABIAN = 142,/* Narb */ + /** @stable ICU 4.6 */ + USCRIPT_NABATAEAN = 143,/* Nbat */ + /** @stable ICU 4.6 */ + USCRIPT_PALMYRENE = 144,/* Palm */ + /** @stable ICU 54 */ + USCRIPT_KHUDAWADI = 145,/* Sind */ + /** @stable ICU 4.6 */ + USCRIPT_SINDHI = USCRIPT_KHUDAWADI, + /** @stable ICU 4.6 */ + USCRIPT_WARANG_CITI = 146,/* Wara */ + + /** @stable ICU 4.8 */ + USCRIPT_AFAKA = 147,/* Afak */ + /** @stable ICU 4.8 */ + USCRIPT_JURCHEN = 148,/* Jurc */ + /** @stable ICU 4.8 */ + USCRIPT_MRO = 149,/* Mroo */ + /** @stable ICU 4.8 */ + USCRIPT_NUSHU = 150,/* Nshu */ + /** @stable ICU 4.8 */ + USCRIPT_SHARADA = 151,/* Shrd */ + /** @stable ICU 4.8 */ + USCRIPT_SORA_SOMPENG = 152,/* Sora */ + /** @stable ICU 4.8 */ + USCRIPT_TAKRI = 153,/* Takr */ + /** @stable ICU 4.8 */ + USCRIPT_TANGUT = 154,/* Tang */ + /** @stable ICU 4.8 */ + USCRIPT_WOLEAI = 155,/* Wole */ + + /** @stable ICU 49 */ + USCRIPT_ANATOLIAN_HIEROGLYPHS = 156,/* Hluw */ + /** @stable ICU 49 */ + USCRIPT_KHOJKI = 157,/* Khoj */ + /** @stable ICU 49 */ + USCRIPT_TIRHUTA = 158,/* Tirh */ + + /** @stable ICU 52 */ + USCRIPT_CAUCASIAN_ALBANIAN = 159,/* Aghb */ + /** @stable ICU 52 */ + USCRIPT_MAHAJANI = 160,/* Mahj */ + + /** @stable ICU 54 */ + USCRIPT_AHOM = 161,/* Ahom */ + /** @stable ICU 54 */ + USCRIPT_HATRAN = 162,/* Hatr */ + /** @stable ICU 54 */ + USCRIPT_MODI = 163,/* Modi */ + /** @stable ICU 54 */ + USCRIPT_MULTANI = 164,/* Mult */ + /** @stable ICU 54 */ + USCRIPT_PAU_CIN_HAU = 165,/* Pauc */ + /** @stable ICU 54 */ + USCRIPT_SIDDHAM = 166,/* Sidd */ + + /** @stable ICU 58 */ + USCRIPT_ADLAM = 167,/* Adlm */ + /** @stable ICU 58 */ + USCRIPT_BHAIKSUKI = 168,/* Bhks */ + /** @stable ICU 58 */ + USCRIPT_MARCHEN = 169,/* Marc */ + /** @stable ICU 58 */ + USCRIPT_NEWA = 170,/* Newa */ + /** @stable ICU 58 */ + USCRIPT_OSAGE = 171,/* Osge */ + + /** @stable ICU 58 */ + USCRIPT_HAN_WITH_BOPOMOFO = 172,/* Hanb */ + /** @stable ICU 58 */ + USCRIPT_JAMO = 173,/* Jamo */ + /** @stable ICU 58 */ + USCRIPT_SYMBOLS_EMOJI = 174,/* Zsye */ + + /** @stable ICU 60 */ + USCRIPT_MASARAM_GONDI = 175,/* Gonm */ + /** @stable ICU 60 */ + USCRIPT_SOYOMBO = 176,/* Soyo */ + /** @stable ICU 60 */ + USCRIPT_ZANABAZAR_SQUARE = 177,/* Zanb */ + +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UScriptCode value. + * The highest value is available via u_getIntPropertyMaxValue(UCHAR_SCRIPT). + * + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + USCRIPT_CODE_LIMIT = 178 +#endif // U_HIDE_DEPRECATED_API +} UScriptCode; + +/** + * Gets the script codes associated with the given locale or ISO 15924 abbreviation or name. + * Fills in USCRIPT_MALAYALAM given "Malayam" OR "Mlym". + * Fills in USCRIPT_LATIN given "en" OR "en_US" + * If the required capacity is greater than the capacity of the destination buffer, + * then the error code is set to U_BUFFER_OVERFLOW_ERROR and the required capacity is returned. + * + * <p>Note: To search by short or long script alias only, use + * u_getPropertyValueEnum(UCHAR_SCRIPT, alias) instead. That does + * a fast lookup with no access of the locale data. + * + * @param nameOrAbbrOrLocale name of the script, as given in + * PropertyValueAliases.txt, or ISO 15924 code or locale + * @param fillIn the UScriptCode buffer to fill in the script code + * @param capacity the capacity (size) of UScriptCode buffer passed in. + * @param err the error status code. + * @return The number of script codes filled in the buffer passed in + * @stable ICU 2.4 + */ +U_STABLE int32_t U_EXPORT2 +uscript_getCode(const char* nameOrAbbrOrLocale,UScriptCode* fillIn,int32_t capacity,UErrorCode *err); + +/** + * Returns the long Unicode script name, if there is one. + * Otherwise returns the 4-letter ISO 15924 script code. + * Returns "Malayam" given USCRIPT_MALAYALAM. + * + * @param scriptCode UScriptCode enum + * @return long script name as given in PropertyValueAliases.txt, or the 4-letter code, + * or NULL if scriptCode is invalid + * @stable ICU 2.4 + */ +U_STABLE const char* U_EXPORT2 +uscript_getName(UScriptCode scriptCode); + +/** + * Returns the 4-letter ISO 15924 script code, + * which is the same as the short Unicode script name if Unicode has names for the script. + * Returns "Mlym" given USCRIPT_MALAYALAM. + * + * @param scriptCode UScriptCode enum + * @return short script name (4-letter code), or NULL if scriptCode is invalid + * @stable ICU 2.4 + */ +U_STABLE const char* U_EXPORT2 +uscript_getShortName(UScriptCode scriptCode); + +/** + * Gets the script code associated with the given codepoint. + * Returns USCRIPT_MALAYALAM given 0x0D02 + * @param codepoint UChar32 codepoint + * @param err the error status code. + * @return The UScriptCode, or 0 if codepoint is invalid + * @stable ICU 2.4 + */ +U_STABLE UScriptCode U_EXPORT2 +uscript_getScript(UChar32 codepoint, UErrorCode *err); + +/** + * Do the Script_Extensions of code point c contain script sc? + * If c does not have explicit Script_Extensions, then this tests whether + * c has the Script property value sc. + * + * Some characters are commonly used in multiple scripts. + * For more information, see UAX #24: http://www.unicode.org/reports/tr24/. + * @param c code point + * @param sc script code + * @return TRUE if sc is in Script_Extensions(c) + * @stable ICU 49 + */ +U_STABLE UBool U_EXPORT2 +uscript_hasScript(UChar32 c, UScriptCode sc); + +/** + * Writes code point c's Script_Extensions as a list of UScriptCode values + * to the output scripts array and returns the number of script codes. + * - If c does have Script_Extensions, then the Script property value + * (normally Common or Inherited) is not included. + * - If c does not have Script_Extensions, then the one Script code is written to the output array. + * - If c is not a valid code point, then the one USCRIPT_UNKNOWN code is written. + * In other words, if the return value is 1, + * then the output array contains exactly c's single Script code. + * If the return value is n>=2, then the output array contains c's n Script_Extensions script codes. + * + * Some characters are commonly used in multiple scripts. + * For more information, see UAX #24: http://www.unicode.org/reports/tr24/. + * + * If there are more than capacity script codes to be written, then + * U_BUFFER_OVERFLOW_ERROR is set and the number of Script_Extensions is returned. + * (Usual ICU buffer handling behavior.) + * + * @param c code point + * @param scripts output script code array + * @param capacity capacity of the scripts array + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return number of script codes in c's Script_Extensions, or 1 for the single Script value, + * written to scripts unless U_BUFFER_OVERFLOW_ERROR indicates insufficient capacity + * @stable ICU 49 + */ +U_STABLE int32_t U_EXPORT2 +uscript_getScriptExtensions(UChar32 c, + UScriptCode *scripts, int32_t capacity, + UErrorCode *errorCode); + +/** + * Script usage constants. + * See UAX #31 Unicode Identifier and Pattern Syntax. + * http://www.unicode.org/reports/tr31/#Table_Candidate_Characters_for_Exclusion_from_Identifiers + * + * @stable ICU 51 + */ +typedef enum UScriptUsage { + /** Not encoded in Unicode. @stable ICU 51 */ + USCRIPT_USAGE_NOT_ENCODED, + /** Unknown script usage. @stable ICU 51 */ + USCRIPT_USAGE_UNKNOWN, + /** Candidate for Exclusion from Identifiers. @stable ICU 51 */ + USCRIPT_USAGE_EXCLUDED, + /** Limited Use script. @stable ICU 51 */ + USCRIPT_USAGE_LIMITED_USE, + /** Aspirational Use script. @stable ICU 51 */ + USCRIPT_USAGE_ASPIRATIONAL, + /** Recommended script. @stable ICU 51 */ + USCRIPT_USAGE_RECOMMENDED +} UScriptUsage; + +/** + * Writes the script sample character string. + * This string normally consists of one code point but might be longer. + * The string is empty if the script is not encoded. + * + * @param script script code + * @param dest output string array + * @param capacity number of UChars in the dest array + * @param pErrorCode standard ICU in/out error code, must pass U_SUCCESS() on input + * @return the string length, even if U_BUFFER_OVERFLOW_ERROR + * @stable ICU 51 + */ +U_STABLE int32_t U_EXPORT2 +uscript_getSampleString(UScriptCode script, UChar *dest, int32_t capacity, UErrorCode *pErrorCode); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN +class UnicodeString; +U_NAMESPACE_END + +/** + * Returns the script sample character string. + * This string normally consists of one code point but might be longer. + * The string is empty if the script is not encoded. + * + * @param script script code + * @return the sample character string + * @stable ICU 51 + */ +U_COMMON_API icu::UnicodeString U_EXPORT2 +uscript_getSampleUnicodeString(UScriptCode script); + +#endif + +/** + * Returns the script usage according to UAX #31 Unicode Identifier and Pattern Syntax. + * Returns USCRIPT_USAGE_NOT_ENCODED if the script is not encoded in Unicode. + * + * @param script script code + * @return script usage + * @see UScriptUsage + * @stable ICU 51 + */ +U_STABLE UScriptUsage U_EXPORT2 +uscript_getUsage(UScriptCode script); + +/** + * Returns TRUE if the script is written right-to-left. + * For example, Arab and Hebr. + * + * @param script script code + * @return TRUE if the script is right-to-left + * @stable ICU 51 + */ +U_STABLE UBool U_EXPORT2 +uscript_isRightToLeft(UScriptCode script); + +/** + * Returns TRUE if the script allows line breaks between letters (excluding hyphenation). + * Such a script typically requires dictionary-based line breaking. + * For example, Hani and Thai. + * + * @param script script code + * @return TRUE if the script allows line breaks between letters + * @stable ICU 51 + */ +U_STABLE UBool U_EXPORT2 +uscript_breaksBetweenLetters(UScriptCode script); + +/** + * Returns TRUE if in modern (or most recent) usage of the script case distinctions are customary. + * For example, Latn and Cyrl. + * + * @param script script code + * @return TRUE if the script is cased + * @stable ICU 51 + */ +U_STABLE UBool U_EXPORT2 +uscript_isCased(UScriptCode script); + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/usearch.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/usearch.h new file mode 100755 index 00000000..ebfcdf7e --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/usearch.h @@ -0,0 +1,891 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 2001-2011,2014 IBM and others. All rights reserved. +********************************************************************** +* Date Name Description +* 06/28/2001 synwee Creation. +********************************************************************** +*/ +#ifndef USEARCH_H +#define USEARCH_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION + +#include "unicode/localpointer.h" +#include "unicode/ucol.h" +#include "unicode/ucoleitr.h" +#include "unicode/ubrk.h" + +/** + * \file + * \brief C API: StringSearch + * + * C Apis for an engine that provides language-sensitive text searching based + * on the comparison rules defined in a <tt>UCollator</tt> data struct, + * see <tt>ucol.h</tt>. This ensures that language eccentricity can be + * handled, e.g. for the German collator, characters ß and SS will be matched + * if case is chosen to be ignored. + * See the <a href="http://source.icu-project.org/repos/icu/icuhtml/trunk/design/collation/ICU_collation_design.htm"> + * "ICU Collation Design Document"</a> for more information. + * <p> + * The implementation may use a linear search or a modified form of the Boyer-Moore + * search; for more information on the latter see + * <a href="http://icu-project.org/docs/papers/efficient_text_searching_in_java.html"> + * "Efficient Text Searching in Java"</a>, published in <i>Java Report</i> + * in February, 1999. + * <p> + * There are 2 match options for selection:<br> + * Let S' be the sub-string of a text string S between the offsets start and + * end <start, end>. + * <br> + * A pattern string P matches a text string S at the offsets <start, end> + * if + * <pre> + * option 1. Some canonical equivalent of P matches some canonical equivalent + * of S' + * option 2. P matches S' and if P starts or ends with a combining mark, + * there exists no non-ignorable combining mark before or after S' + * in S respectively. + * </pre> + * Option 2. will be the default. + * <p> + * This search has APIs similar to that of other text iteration mechanisms + * such as the break iterators in <tt>ubrk.h</tt>. Using these + * APIs, it is easy to scan through text looking for all occurances of + * a given pattern. This search iterator allows changing of direction by + * calling a <tt>reset</tt> followed by a <tt>next</tt> or <tt>previous</tt>. + * Though a direction change can occur without calling <tt>reset</tt> first, + * this operation comes with some speed penalty. + * Generally, match results in the forward direction will match the result + * matches in the backwards direction in the reverse order + * <p> + * <tt>usearch.h</tt> provides APIs to specify the starting position + * within the text string to be searched, e.g. <tt>usearch_setOffset</tt>, + * <tt>usearch_preceding</tt> and <tt>usearch_following</tt>. Since the + * starting position will be set as it is specified, please take note that + * there are some dangerous positions which the search may render incorrect + * results: + * <ul> + * <li> The midst of a substring that requires normalization. + * <li> If the following match is to be found, the position should not be the + * second character which requires to be swapped with the preceding + * character. Vice versa, if the preceding match is to be found, + * position to search from should not be the first character which + * requires to be swapped with the next character. E.g certain Thai and + * Lao characters require swapping. + * <li> If a following pattern match is to be found, any position within a + * contracting sequence except the first will fail. Vice versa if a + * preceding pattern match is to be found, a invalid starting point + * would be any character within a contracting sequence except the last. + * </ul> + * <p> + * A breakiterator can be used if only matches at logical breaks are desired. + * Using a breakiterator will only give you results that exactly matches the + * boundaries given by the breakiterator. For instance the pattern "e" will + * not be found in the string "\u00e9" if a character break iterator is used. + * <p> + * Options are provided to handle overlapping matches. + * E.g. In English, overlapping matches produces the result 0 and 2 + * for the pattern "abab" in the text "ababab", where else mutually + * exclusive matches only produce the result of 0. + * <p> + * Options are also provided to implement "asymmetric search" as described in + * <a href="http://www.unicode.org/reports/tr10/#Asymmetric_Search"> + * UTS #10 Unicode Collation Algorithm</a>, specifically the USearchAttribute + * USEARCH_ELEMENT_COMPARISON and its values. + * <p> + * Though collator attributes will be taken into consideration while + * performing matches, there are no APIs here for setting and getting the + * attributes. These attributes can be set by getting the collator + * from <tt>usearch_getCollator</tt> and using the APIs in <tt>ucol.h</tt>. + * Lastly to update String Search to the new collator attributes, + * usearch_reset() has to be called. + * <p> + * Restriction: <br> + * Currently there are no composite characters that consists of a + * character with combining class > 0 before a character with combining + * class == 0. However, if such a character exists in the future, the + * search mechanism does not guarantee the results for option 1. + * + * <p> + * Example of use:<br> + * <pre><code> + * char *tgtstr = "The quick brown fox jumped over the lazy fox"; + * char *patstr = "fox"; + * UChar target[64]; + * UChar pattern[16]; + * UErrorCode status = U_ZERO_ERROR; + * u_uastrcpy(target, tgtstr); + * u_uastrcpy(pattern, patstr); + * + * UStringSearch *search = usearch_open(pattern, -1, target, -1, "en_US", + * NULL, &status); + * if (U_SUCCESS(status)) { + * for (int pos = usearch_first(search, &status); + * pos != USEARCH_DONE; + * pos = usearch_next(search, &status)) + * { + * printf("Found match at %d pos, length is %d\n", pos, + * usearch_getMatchLength(search)); + * } + * } + * + * usearch_close(search); + * </code></pre> + * @stable ICU 2.4 + */ + +/** +* DONE is returned by previous() and next() after all valid matches have +* been returned, and by first() and last() if there are no matches at all. +* @stable ICU 2.4 +*/ +#define USEARCH_DONE -1 + +/** +* Data structure for searching +* @stable ICU 2.4 +*/ +struct UStringSearch; +/** +* Data structure for searching +* @stable ICU 2.4 +*/ +typedef struct UStringSearch UStringSearch; + +/** +* @stable ICU 2.4 +*/ +typedef enum { + /** + * Option for overlapping matches + * @stable ICU 2.4 + */ + USEARCH_OVERLAP = 0, +#ifndef U_HIDE_DEPRECATED_API + /** + * Option for canonical matches; option 1 in header documentation. + * The default value will be USEARCH_OFF. + * Note: Setting this option to USEARCH_ON currently has no effect on + * search behavior, and this option is deprecated. Instead, to control + * canonical match behavior, you must set UCOL_NORMALIZATION_MODE + * appropriately (to UCOL_OFF or UCOL_ON) in the UCollator used by + * the UStringSearch object. + * @see usearch_openFromCollator + * @see usearch_getCollator + * @see usearch_setCollator + * @see ucol_getAttribute + * @deprecated ICU 53 + */ + USEARCH_CANONICAL_MATCH = 1, +#endif /* U_HIDE_DEPRECATED_API */ + /** + * Option to control how collation elements are compared. + * The default value will be USEARCH_STANDARD_ELEMENT_COMPARISON. + * @stable ICU 4.4 + */ + USEARCH_ELEMENT_COMPARISON = 2, + +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal USearchAttribute value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + USEARCH_ATTRIBUTE_COUNT = 3 +#endif /* U_HIDE_DEPRECATED_API */ +} USearchAttribute; + +/** +* @stable ICU 2.4 +*/ +typedef enum { + /** + * Default value for any USearchAttribute + * @stable ICU 2.4 + */ + USEARCH_DEFAULT = -1, + /** + * Value for USEARCH_OVERLAP and USEARCH_CANONICAL_MATCH + * @stable ICU 2.4 + */ + USEARCH_OFF, + /** + * Value for USEARCH_OVERLAP and USEARCH_CANONICAL_MATCH + * @stable ICU 2.4 + */ + USEARCH_ON, + /** + * Value (default) for USEARCH_ELEMENT_COMPARISON; + * standard collation element comparison at the specified collator + * strength. + * @stable ICU 4.4 + */ + USEARCH_STANDARD_ELEMENT_COMPARISON, + /** + * Value for USEARCH_ELEMENT_COMPARISON; + * collation element comparison is modified to effectively provide + * behavior between the specified strength and strength - 1. Collation + * elements in the pattern that have the base weight for the specified + * strength are treated as "wildcards" that match an element with any + * other weight at that collation level in the searched text. For + * example, with a secondary-strength English collator, a plain 'e' in + * the pattern will match a plain e or an e with any diacritic in the + * searched text, but an e with diacritic in the pattern will only + * match an e with the same diacritic in the searched text. + * + * This supports "asymmetric search" as described in + * <a href="http://www.unicode.org/reports/tr10/#Asymmetric_Search"> + * UTS #10 Unicode Collation Algorithm</a>. + * + * @stable ICU 4.4 + */ + USEARCH_PATTERN_BASE_WEIGHT_IS_WILDCARD, + /** + * Value for USEARCH_ELEMENT_COMPARISON. + * collation element comparison is modified to effectively provide + * behavior between the specified strength and strength - 1. Collation + * elements in either the pattern or the searched text that have the + * base weight for the specified strength are treated as "wildcards" + * that match an element with any other weight at that collation level. + * For example, with a secondary-strength English collator, a plain 'e' + * in the pattern will match a plain e or an e with any diacritic in the + * searched text, but an e with diacritic in the pattern will only + * match an e with the same diacritic or a plain e in the searched text. + * + * This option is similar to "asymmetric search" as described in + * <a href="http://www.unicode.org/reports/tr10/#Asymmetric_Search"> + * UTS #10 Unicode Collation Algorithm</a, but also allows unmarked + * characters in the searched text to match marked or unmarked versions of + * that character in the pattern. + * + * @stable ICU 4.4 + */ + USEARCH_ANY_BASE_WEIGHT_IS_WILDCARD, + +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal USearchAttributeValue value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + USEARCH_ATTRIBUTE_VALUE_COUNT +#endif /* U_HIDE_DEPRECATED_API */ +} USearchAttributeValue; + +/* open and close ------------------------------------------------------ */ + +/** +* Creating a search iterator data struct using the argument locale language +* rule set. A collator will be created in the process, which will be owned by +* this search and will be deleted in <tt>usearch_close</tt>. +* @param pattern for matching +* @param patternlength length of the pattern, -1 for null-termination +* @param text text string +* @param textlength length of the text string, -1 for null-termination +* @param locale name of locale for the rules to be used +* @param breakiter A BreakIterator that will be used to restrict the points +* at which matches are detected. If a match is found, but +* the match's start or end index is not a boundary as +* determined by the <tt>BreakIterator</tt>, the match will +* be rejected and another will be searched for. +* If this parameter is <tt>NULL</tt>, no break detection is +* attempted. +* @param status for errors if it occurs. If pattern or text is NULL, or if +* patternlength or textlength is 0 then an +* U_ILLEGAL_ARGUMENT_ERROR is returned. +* @return search iterator data structure, or NULL if there is an error. +* @stable ICU 2.4 +*/ +U_STABLE UStringSearch * U_EXPORT2 usearch_open(const UChar *pattern, + int32_t patternlength, + const UChar *text, + int32_t textlength, + const char *locale, + UBreakIterator *breakiter, + UErrorCode *status); + +/** +* Creating a search iterator data struct using the argument collator language +* rule set. Note, user retains the ownership of this collator, thus the +* responsibility of deletion lies with the user. +* NOTE: string search cannot be instantiated from a collator that has +* collate digits as numbers (CODAN) turned on. +* @param pattern for matching +* @param patternlength length of the pattern, -1 for null-termination +* @param text text string +* @param textlength length of the text string, -1 for null-termination +* @param collator used for the language rules +* @param breakiter A BreakIterator that will be used to restrict the points +* at which matches are detected. If a match is found, but +* the match's start or end index is not a boundary as +* determined by the <tt>BreakIterator</tt>, the match will +* be rejected and another will be searched for. +* If this parameter is <tt>NULL</tt>, no break detection is +* attempted. +* @param status for errors if it occurs. If collator, pattern or text is NULL, +* or if patternlength or textlength is 0 then an +* U_ILLEGAL_ARGUMENT_ERROR is returned. +* @return search iterator data structure, or NULL if there is an error. +* @stable ICU 2.4 +*/ +U_STABLE UStringSearch * U_EXPORT2 usearch_openFromCollator( + const UChar *pattern, + int32_t patternlength, + const UChar *text, + int32_t textlength, + const UCollator *collator, + UBreakIterator *breakiter, + UErrorCode *status); + +/** +* Destroying and cleaning up the search iterator data struct. +* If a collator is created in <tt>usearch_open</tt>, it will be destroyed here. +* @param searchiter data struct to clean up +* @stable ICU 2.4 +*/ +U_STABLE void U_EXPORT2 usearch_close(UStringSearch *searchiter); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUStringSearchPointer + * "Smart pointer" class, closes a UStringSearch via usearch_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUStringSearchPointer, UStringSearch, usearch_close); + +U_NAMESPACE_END + +#endif + +/* get and set methods -------------------------------------------------- */ + +/** +* Sets the current position in the text string which the next search will +* start from. Clears previous states. +* This method takes the argument index and sets the position in the text +* string accordingly without checking if the index is pointing to a +* valid starting point to begin searching. +* Search positions that may render incorrect results are highlighted in the +* header comments +* @param strsrch search iterator data struct +* @param position position to start next search from. If position is less +* than or greater than the text range for searching, +* an U_INDEX_OUTOFBOUNDS_ERROR will be returned +* @param status error status if any. +* @stable ICU 2.4 +*/ +U_STABLE void U_EXPORT2 usearch_setOffset(UStringSearch *strsrch, + int32_t position, + UErrorCode *status); + +/** +* Return the current index in the string text being searched. +* If the iteration has gone past the end of the text (or past the beginning +* for a backwards search), <tt>USEARCH_DONE</tt> is returned. +* @param strsrch search iterator data struct +* @see #USEARCH_DONE +* @stable ICU 2.4 +*/ +U_STABLE int32_t U_EXPORT2 usearch_getOffset(const UStringSearch *strsrch); + +/** +* Sets the text searching attributes located in the enum USearchAttribute +* with values from the enum USearchAttributeValue. +* <tt>USEARCH_DEFAULT</tt> can be used for all attributes for resetting. +* @param strsrch search iterator data struct +* @param attribute text attribute to be set +* @param value text attribute value +* @param status for errors if it occurs +* @see #usearch_getAttribute +* @stable ICU 2.4 +*/ +U_STABLE void U_EXPORT2 usearch_setAttribute(UStringSearch *strsrch, + USearchAttribute attribute, + USearchAttributeValue value, + UErrorCode *status); + +/** +* Gets the text searching attributes. +* @param strsrch search iterator data struct +* @param attribute text attribute to be retrieve +* @return text attribute value +* @see #usearch_setAttribute +* @stable ICU 2.4 +*/ +U_STABLE USearchAttributeValue U_EXPORT2 usearch_getAttribute( + const UStringSearch *strsrch, + USearchAttribute attribute); + +/** +* Returns the index to the match in the text string that was searched. +* This call returns a valid result only after a successful call to +* <tt>usearch_first</tt>, <tt>usearch_next</tt>, <tt>usearch_previous</tt>, +* or <tt>usearch_last</tt>. +* Just after construction, or after a searching method returns +* <tt>USEARCH_DONE</tt>, this method will return <tt>USEARCH_DONE</tt>. +* <p> +* Use <tt>usearch_getMatchedLength</tt> to get the matched string length. +* @param strsrch search iterator data struct +* @return index to a substring within the text string that is being +* searched. +* @see #usearch_first +* @see #usearch_next +* @see #usearch_previous +* @see #usearch_last +* @see #USEARCH_DONE +* @stable ICU 2.4 +*/ +U_STABLE int32_t U_EXPORT2 usearch_getMatchedStart( + const UStringSearch *strsrch); + +/** +* Returns the length of text in the string which matches the search pattern. +* This call returns a valid result only after a successful call to +* <tt>usearch_first</tt>, <tt>usearch_next</tt>, <tt>usearch_previous</tt>, +* or <tt>usearch_last</tt>. +* Just after construction, or after a searching method returns +* <tt>USEARCH_DONE</tt>, this method will return 0. +* @param strsrch search iterator data struct +* @return The length of the match in the string text, or 0 if there is no +* match currently. +* @see #usearch_first +* @see #usearch_next +* @see #usearch_previous +* @see #usearch_last +* @see #USEARCH_DONE +* @stable ICU 2.4 +*/ +U_STABLE int32_t U_EXPORT2 usearch_getMatchedLength( + const UStringSearch *strsrch); + +/** +* Returns the text that was matched by the most recent call to +* <tt>usearch_first</tt>, <tt>usearch_next</tt>, <tt>usearch_previous</tt>, +* or <tt>usearch_last</tt>. +* If the iterator is not pointing at a valid match (e.g. just after +* construction or after <tt>USEARCH_DONE</tt> has been returned, returns +* an empty string. If result is not large enough to store the matched text, +* result will be filled with the partial text and an U_BUFFER_OVERFLOW_ERROR +* will be returned in status. result will be null-terminated whenever +* possible. If the buffer fits the matched text exactly, a null-termination +* is not possible, then a U_STRING_NOT_TERMINATED_ERROR set in status. +* Pre-flighting can be either done with length = 0 or the API +* <tt>usearch_getMatchLength</tt>. +* @param strsrch search iterator data struct +* @param result UChar buffer to store the matched string +* @param resultCapacity length of the result buffer +* @param status error returned if result is not large enough +* @return exact length of the matched text, not counting the null-termination +* @see #usearch_first +* @see #usearch_next +* @see #usearch_previous +* @see #usearch_last +* @see #USEARCH_DONE +* @stable ICU 2.4 +*/ +U_STABLE int32_t U_EXPORT2 usearch_getMatchedText(const UStringSearch *strsrch, + UChar *result, + int32_t resultCapacity, + UErrorCode *status); + +#if !UCONFIG_NO_BREAK_ITERATION + +/** +* Set the BreakIterator that will be used to restrict the points at which +* matches are detected. +* @param strsrch search iterator data struct +* @param breakiter A BreakIterator that will be used to restrict the points +* at which matches are detected. If a match is found, but +* the match's start or end index is not a boundary as +* determined by the <tt>BreakIterator</tt>, the match will +* be rejected and another will be searched for. +* If this parameter is <tt>NULL</tt>, no break detection is +* attempted. +* @param status for errors if it occurs +* @see #usearch_getBreakIterator +* @stable ICU 2.4 +*/ +U_STABLE void U_EXPORT2 usearch_setBreakIterator(UStringSearch *strsrch, + UBreakIterator *breakiter, + UErrorCode *status); + +/** +* Returns the BreakIterator that is used to restrict the points at which +* matches are detected. This will be the same object that was passed to the +* constructor or to <tt>usearch_setBreakIterator</tt>. Note that +* <tt>NULL</tt> +* is a legal value; it means that break detection should not be attempted. +* @param strsrch search iterator data struct +* @return break iterator used +* @see #usearch_setBreakIterator +* @stable ICU 2.4 +*/ +U_STABLE const UBreakIterator * U_EXPORT2 usearch_getBreakIterator( + const UStringSearch *strsrch); + +#endif + +/** +* Set the string text to be searched. Text iteration will hence begin at the +* start of the text string. This method is useful if you want to re-use an +* iterator to search for the same pattern within a different body of text. +* @param strsrch search iterator data struct +* @param text new string to look for match +* @param textlength length of the new string, -1 for null-termination +* @param status for errors if it occurs. If text is NULL, or textlength is 0 +* then an U_ILLEGAL_ARGUMENT_ERROR is returned with no change +* done to strsrch. +* @see #usearch_getText +* @stable ICU 2.4 +*/ +U_STABLE void U_EXPORT2 usearch_setText( UStringSearch *strsrch, + const UChar *text, + int32_t textlength, + UErrorCode *status); + +/** +* Return the string text to be searched. +* @param strsrch search iterator data struct +* @param length returned string text length +* @return string text +* @see #usearch_setText +* @stable ICU 2.4 +*/ +U_STABLE const UChar * U_EXPORT2 usearch_getText(const UStringSearch *strsrch, + int32_t *length); + +/** +* Gets the collator used for the language rules. +* <p> +* Deleting the returned <tt>UCollator</tt> before calling +* <tt>usearch_close</tt> would cause the string search to fail. +* <tt>usearch_close</tt> will delete the collator if this search owns it. +* @param strsrch search iterator data struct +* @return collator +* @stable ICU 2.4 +*/ +U_STABLE UCollator * U_EXPORT2 usearch_getCollator( + const UStringSearch *strsrch); + +/** +* Sets the collator used for the language rules. User retains the ownership +* of this collator, thus the responsibility of deletion lies with the user. +* This method causes internal data such as Boyer-Moore shift tables to +* be recalculated, but the iterator's position is unchanged. +* @param strsrch search iterator data struct +* @param collator to be used +* @param status for errors if it occurs +* @stable ICU 2.4 +*/ +U_STABLE void U_EXPORT2 usearch_setCollator( UStringSearch *strsrch, + const UCollator *collator, + UErrorCode *status); + +/** +* Sets the pattern used for matching. +* Internal data like the Boyer Moore table will be recalculated, but the +* iterator's position is unchanged. +* @param strsrch search iterator data struct +* @param pattern string +* @param patternlength pattern length, -1 for null-terminated string +* @param status for errors if it occurs. If text is NULL, or textlength is 0 +* then an U_ILLEGAL_ARGUMENT_ERROR is returned with no change +* done to strsrch. +* @stable ICU 2.4 +*/ +U_STABLE void U_EXPORT2 usearch_setPattern( UStringSearch *strsrch, + const UChar *pattern, + int32_t patternlength, + UErrorCode *status); + +/** +* Gets the search pattern +* @param strsrch search iterator data struct +* @param length return length of the pattern, -1 indicates that the pattern +* is null-terminated +* @return pattern string +* @stable ICU 2.4 +*/ +U_STABLE const UChar * U_EXPORT2 usearch_getPattern( + const UStringSearch *strsrch, + int32_t *length); + +/* methods ------------------------------------------------------------- */ + +/** +* Returns the first index at which the string text matches the search +* pattern. +* The iterator is adjusted so that its current index (as returned by +* <tt>usearch_getOffset</tt>) is the match position if one was found. +* If a match is not found, <tt>USEARCH_DONE</tt> will be returned and +* the iterator will be adjusted to the index <tt>USEARCH_DONE</tt>. +* @param strsrch search iterator data struct +* @param status for errors if it occurs +* @return The character index of the first match, or +* <tt>USEARCH_DONE</tt> if there are no matches. +* @see #usearch_getOffset +* @see #USEARCH_DONE +* @stable ICU 2.4 +*/ +U_STABLE int32_t U_EXPORT2 usearch_first(UStringSearch *strsrch, + UErrorCode *status); + +/** +* Returns the first index equal or greater than <tt>position</tt> at which +* the string text +* matches the search pattern. The iterator is adjusted so that its current +* index (as returned by <tt>usearch_getOffset</tt>) is the match position if +* one was found. +* If a match is not found, <tt>USEARCH_DONE</tt> will be returned and +* the iterator will be adjusted to the index <tt>USEARCH_DONE</tt> +* <p> +* Search positions that may render incorrect results are highlighted in the +* header comments. If position is less than or greater than the text range +* for searching, an U_INDEX_OUTOFBOUNDS_ERROR will be returned +* @param strsrch search iterator data struct +* @param position to start the search at +* @param status for errors if it occurs +* @return The character index of the first match following <tt>pos</tt>, +* or <tt>USEARCH_DONE</tt> if there are no matches. +* @see #usearch_getOffset +* @see #USEARCH_DONE +* @stable ICU 2.4 +*/ +U_STABLE int32_t U_EXPORT2 usearch_following(UStringSearch *strsrch, + int32_t position, + UErrorCode *status); + +/** +* Returns the last index in the target text at which it matches the search +* pattern. The iterator is adjusted so that its current +* index (as returned by <tt>usearch_getOffset</tt>) is the match position if +* one was found. +* If a match is not found, <tt>USEARCH_DONE</tt> will be returned and +* the iterator will be adjusted to the index <tt>USEARCH_DONE</tt>. +* @param strsrch search iterator data struct +* @param status for errors if it occurs +* @return The index of the first match, or <tt>USEARCH_DONE</tt> if there +* are no matches. +* @see #usearch_getOffset +* @see #USEARCH_DONE +* @stable ICU 2.4 +*/ +U_STABLE int32_t U_EXPORT2 usearch_last(UStringSearch *strsrch, + UErrorCode *status); + +/** +* Returns the first index less than <tt>position</tt> at which the string text +* matches the search pattern. The iterator is adjusted so that its current +* index (as returned by <tt>usearch_getOffset</tt>) is the match position if +* one was found. +* If a match is not found, <tt>USEARCH_DONE</tt> will be returned and +* the iterator will be adjusted to the index <tt>USEARCH_DONE</tt> +* <p> +* Search positions that may render incorrect results are highlighted in the +* header comments. If position is less than or greater than the text range +* for searching, an U_INDEX_OUTOFBOUNDS_ERROR will be returned. +* <p> +* When <tt>USEARCH_OVERLAP</tt> option is off, the last index of the +* result match is always less than <tt>position</tt>. +* When <tt>USERARCH_OVERLAP</tt> is on, the result match may span across +* <tt>position</tt>. +* @param strsrch search iterator data struct +* @param position index position the search is to begin at +* @param status for errors if it occurs +* @return The character index of the first match preceding <tt>pos</tt>, +* or <tt>USEARCH_DONE</tt> if there are no matches. +* @see #usearch_getOffset +* @see #USEARCH_DONE +* @stable ICU 2.4 +*/ +U_STABLE int32_t U_EXPORT2 usearch_preceding(UStringSearch *strsrch, + int32_t position, + UErrorCode *status); + +/** +* Returns the index of the next point at which the string text matches the +* search pattern, starting from the current position. +* The iterator is adjusted so that its current +* index (as returned by <tt>usearch_getOffset</tt>) is the match position if +* one was found. +* If a match is not found, <tt>USEARCH_DONE</tt> will be returned and +* the iterator will be adjusted to the index <tt>USEARCH_DONE</tt> +* @param strsrch search iterator data struct +* @param status for errors if it occurs +* @return The index of the next match after the current position, or +* <tt>USEARCH_DONE</tt> if there are no more matches. +* @see #usearch_first +* @see #usearch_getOffset +* @see #USEARCH_DONE +* @stable ICU 2.4 +*/ +U_STABLE int32_t U_EXPORT2 usearch_next(UStringSearch *strsrch, + UErrorCode *status); + +/** +* Returns the index of the previous point at which the string text matches +* the search pattern, starting at the current position. +* The iterator is adjusted so that its current +* index (as returned by <tt>usearch_getOffset</tt>) is the match position if +* one was found. +* If a match is not found, <tt>USEARCH_DONE</tt> will be returned and +* the iterator will be adjusted to the index <tt>USEARCH_DONE</tt> +* @param strsrch search iterator data struct +* @param status for errors if it occurs +* @return The index of the previous match before the current position, +* or <tt>USEARCH_DONE</tt> if there are no more matches. +* @see #usearch_last +* @see #usearch_getOffset +* @see #USEARCH_DONE +* @stable ICU 2.4 +*/ +U_STABLE int32_t U_EXPORT2 usearch_previous(UStringSearch *strsrch, + UErrorCode *status); + +/** +* Reset the iteration. +* Search will begin at the start of the text string if a forward iteration +* is initiated before a backwards iteration. Otherwise if a backwards +* iteration is initiated before a forwards iteration, the search will begin +* at the end of the text string. +* @param strsrch search iterator data struct +* @see #usearch_first +* @stable ICU 2.4 +*/ +U_STABLE void U_EXPORT2 usearch_reset(UStringSearch *strsrch); + +#ifndef U_HIDE_INTERNAL_API +/** + * Simple forward search for the pattern, starting at a specified index, + * and using using a default set search options. + * + * This is an experimental function, and is not an official part of the + * ICU API. + * + * The collator options, such as UCOL_STRENGTH and UCOL_NORMALIZTION, are honored. + * + * The UStringSearch options USEARCH_CANONICAL_MATCH, USEARCH_OVERLAP and + * any Break Iterator are ignored. + * + * Matches obey the following constraints: + * + * Characters at the start or end positions of a match that are ignorable + * for collation are not included as part of the match, unless they + * are part of a combining sequence, as described below. + * + * A match will not include a partial combining sequence. Combining + * character sequences are considered to be inseperable units, + * and either match the pattern completely, or are considered to not match + * at all. Thus, for example, an A followed a combining accent mark will + * not be found when searching for a plain (unaccented) A. (unless + * the collation strength has been set to ignore all accents). + * + * When beginning a search, the initial starting position, startIdx, + * is assumed to be an acceptable match boundary with respect to + * combining characters. A combining sequence that spans across the + * starting point will not supress a match beginning at startIdx. + * + * Characters that expand to multiple collation elements + * (German sharp-S becoming 'ss', or the composed forms of accented + * characters, for example) also must match completely. + * Searching for a single 's' in a string containing only a sharp-s will + * find no match. + * + * + * @param strsrch the UStringSearch struct, which references both + * the text to be searched and the pattern being sought. + * @param startIdx The index into the text to begin the search. + * @param matchStart An out parameter, the starting index of the matched text. + * This parameter may be NULL. + * A value of -1 will be returned if no match was found. + * @param matchLimit Out parameter, the index of the first position following the matched text. + * The matchLimit will be at a suitable position for beginning a subsequent search + * in the input text. + * This parameter may be NULL. + * A value of -1 will be returned if no match was found. + * + * @param status Report any errors. Note that no match found is not an error. + * @return TRUE if a match was found, FALSE otherwise. + * + * @internal + */ +U_INTERNAL UBool U_EXPORT2 usearch_search(UStringSearch *strsrch, + int32_t startIdx, + int32_t *matchStart, + int32_t *matchLimit, + UErrorCode *status); + +/** + * Simple backwards search for the pattern, starting at a specified index, + * and using using a default set search options. + * + * This is an experimental function, and is not an official part of the + * ICU API. + * + * The collator options, such as UCOL_STRENGTH and UCOL_NORMALIZTION, are honored. + * + * The UStringSearch options USEARCH_CANONICAL_MATCH, USEARCH_OVERLAP and + * any Break Iterator are ignored. + * + * Matches obey the following constraints: + * + * Characters at the start or end positions of a match that are ignorable + * for collation are not included as part of the match, unless they + * are part of a combining sequence, as described below. + * + * A match will not include a partial combining sequence. Combining + * character sequences are considered to be inseperable units, + * and either match the pattern completely, or are considered to not match + * at all. Thus, for example, an A followed a combining accent mark will + * not be found when searching for a plain (unaccented) A. (unless + * the collation strength has been set to ignore all accents). + * + * When beginning a search, the initial starting position, startIdx, + * is assumed to be an acceptable match boundary with respect to + * combining characters. A combining sequence that spans across the + * starting point will not supress a match beginning at startIdx. + * + * Characters that expand to multiple collation elements + * (German sharp-S becoming 'ss', or the composed forms of accented + * characters, for example) also must match completely. + * Searching for a single 's' in a string containing only a sharp-s will + * find no match. + * + * + * @param strsrch the UStringSearch struct, which references both + * the text to be searched and the pattern being sought. + * @param startIdx The index into the text to begin the search. + * @param matchStart An out parameter, the starting index of the matched text. + * This parameter may be NULL. + * A value of -1 will be returned if no match was found. + * @param matchLimit Out parameter, the index of the first position following the matched text. + * The matchLimit will be at a suitable position for beginning a subsequent search + * in the input text. + * This parameter may be NULL. + * A value of -1 will be returned if no match was found. + * + * @param status Report any errors. Note that no match found is not an error. + * @return TRUE if a match was found, FALSE otherwise. + * + * @internal + */ +U_INTERNAL UBool U_EXPORT2 usearch_searchBackwards(UStringSearch *strsrch, + int32_t startIdx, + int32_t *matchStart, + int32_t *matchLimit, + UErrorCode *status); +#endif /* U_HIDE_INTERNAL_API */ + +#endif /* #if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uset.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uset.h new file mode 100755 index 00000000..59f46507 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uset.h @@ -0,0 +1,1130 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 2002-2014, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: uset.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2002mar07 +* created by: Markus W. Scherer +* +* C version of UnicodeSet. +*/ + + +/** + * \file + * \brief C API: Unicode Set + * + * <p>This is a C wrapper around the C++ UnicodeSet class.</p> + */ + +#ifndef __USET_H__ +#define __USET_H__ + +#include "unicode/utypes.h" +#include "unicode/uchar.h" +#include "unicode/localpointer.h" + +#ifndef UCNV_H +struct USet; +/** + * A UnicodeSet. Use the uset_* API to manipulate. Create with + * uset_open*, and destroy with uset_close. + * @stable ICU 2.4 + */ +typedef struct USet USet; +#endif + +/** + * Bitmask values to be passed to uset_openPatternOptions() or + * uset_applyPattern() taking an option parameter. + * @stable ICU 2.4 + */ +enum { + /** + * Ignore white space within patterns unless quoted or escaped. + * @stable ICU 2.4 + */ + USET_IGNORE_SPACE = 1, + + /** + * Enable case insensitive matching. E.g., "[ab]" with this flag + * will match 'a', 'A', 'b', and 'B'. "[^ab]" with this flag will + * match all except 'a', 'A', 'b', and 'B'. This performs a full + * closure over case mappings, e.g. U+017F for s. + * + * The resulting set is a superset of the input for the code points but + * not for the strings. + * It performs a case mapping closure of the code points and adds + * full case folding strings for the code points, and reduces strings of + * the original set to their full case folding equivalents. + * + * This is designed for case-insensitive matches, for example + * in regular expressions. The full code point case closure allows checking of + * an input character directly against the closure set. + * Strings are matched by comparing the case-folded form from the closure + * set with an incremental case folding of the string in question. + * + * The closure set will also contain single code points if the original + * set contained case-equivalent strings (like U+00DF for "ss" or "Ss" etc.). + * This is not necessary (that is, redundant) for the above matching method + * but results in the same closure sets regardless of whether the original + * set contained the code point or a string. + * + * @stable ICU 2.4 + */ + USET_CASE_INSENSITIVE = 2, + + /** + * Enable case insensitive matching. E.g., "[ab]" with this flag + * will match 'a', 'A', 'b', and 'B'. "[^ab]" with this flag will + * match all except 'a', 'A', 'b', and 'B'. This adds the lower-, + * title-, and uppercase mappings as well as the case folding + * of each existing element in the set. + * @stable ICU 3.2 + */ + USET_ADD_CASE_MAPPINGS = 4 +}; + +/** + * Argument values for whether span() and similar functions continue while + * the current character is contained vs. not contained in the set. + * + * The functionality is straightforward for sets with only single code points, + * without strings (which is the common case): + * - USET_SPAN_CONTAINED and USET_SPAN_SIMPLE work the same. + * - USET_SPAN_CONTAINED and USET_SPAN_SIMPLE are inverses of USET_SPAN_NOT_CONTAINED. + * - span() and spanBack() partition any string the same way when + * alternating between span(USET_SPAN_NOT_CONTAINED) and + * span(either "contained" condition). + * - Using a complemented (inverted) set and the opposite span conditions + * yields the same results. + * + * When a set contains multi-code point strings, then these statements may not + * be true, depending on the strings in the set (for example, whether they + * overlap with each other) and the string that is processed. + * For a set with strings: + * - The complement of the set contains the opposite set of code points, + * but the same set of strings. + * Therefore, complementing both the set and the span conditions + * may yield different results. + * - When starting spans at different positions in a string + * (span(s, ...) vs. span(s+1, ...)) the ends of the spans may be different + * because a set string may start before the later position. + * - span(USET_SPAN_SIMPLE) may be shorter than + * span(USET_SPAN_CONTAINED) because it will not recursively try + * all possible paths. + * For example, with a set which contains the three strings "xy", "xya" and "ax", + * span("xyax", USET_SPAN_CONTAINED) will return 4 but + * span("xyax", USET_SPAN_SIMPLE) will return 3. + * span(USET_SPAN_SIMPLE) will never be longer than + * span(USET_SPAN_CONTAINED). + * - With either "contained" condition, span() and spanBack() may partition + * a string in different ways. + * For example, with a set which contains the two strings "ab" and "ba", + * and when processing the string "aba", + * span() will yield contained/not-contained boundaries of { 0, 2, 3 } + * while spanBack() will yield boundaries of { 0, 1, 3 }. + * + * Note: If it is important to get the same boundaries whether iterating forward + * or backward through a string, then either only span() should be used and + * the boundaries cached for backward operation, or an ICU BreakIterator + * could be used. + * + * Note: Unpaired surrogates are treated like surrogate code points. + * Similarly, set strings match only on code point boundaries, + * never in the middle of a surrogate pair. + * Illegal UTF-8 sequences are treated like U+FFFD. + * When processing UTF-8 strings, malformed set strings + * (strings with unpaired surrogates which cannot be converted to UTF-8) + * are ignored. + * + * @stable ICU 3.8 + */ +typedef enum USetSpanCondition { + /** + * Continues a span() while there is no set element at the current position. + * Increments by one code point at a time. + * Stops before the first set element (character or string). + * (For code points only, this is like while contains(current)==FALSE). + * + * When span() returns, the substring between where it started and the position + * it returned consists only of characters that are not in the set, + * and none of its strings overlap with the span. + * + * @stable ICU 3.8 + */ + USET_SPAN_NOT_CONTAINED = 0, + /** + * Spans the longest substring that is a concatenation of set elements (characters or strings). + * (For characters only, this is like while contains(current)==TRUE). + * + * When span() returns, the substring between where it started and the position + * it returned consists only of set elements (characters or strings) that are in the set. + * + * If a set contains strings, then the span will be the longest substring for which there + * exists at least one non-overlapping concatenation of set elements (characters or strings). + * This is equivalent to a POSIX regular expression for <code>(OR of each set element)*</code>. + * (Java/ICU/Perl regex stops at the first match of an OR.) + * + * @stable ICU 3.8 + */ + USET_SPAN_CONTAINED = 1, + /** + * Continues a span() while there is a set element at the current position. + * Increments by the longest matching element at each position. + * (For characters only, this is like while contains(current)==TRUE). + * + * When span() returns, the substring between where it started and the position + * it returned consists only of set elements (characters or strings) that are in the set. + * + * If a set only contains single characters, then this is the same + * as USET_SPAN_CONTAINED. + * + * If a set contains strings, then the span will be the longest substring + * with a match at each position with the longest single set element (character or string). + * + * Use this span condition together with other longest-match algorithms, + * such as ICU converters (ucnv_getUnicodeSet()). + * + * @stable ICU 3.8 + */ + USET_SPAN_SIMPLE = 2, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the last span condition. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + USET_SPAN_CONDITION_COUNT +#endif // U_HIDE_DEPRECATED_API +} USetSpanCondition; + +enum { + /** + * Capacity of USerializedSet::staticArray. + * Enough for any single-code point set. + * Also provides padding for nice sizeof(USerializedSet). + * @stable ICU 2.4 + */ + USET_SERIALIZED_STATIC_ARRAY_CAPACITY=8 +}; + +/** + * A serialized form of a Unicode set. Limited manipulations are + * possible directly on a serialized set. See below. + * @stable ICU 2.4 + */ +typedef struct USerializedSet { + /** + * The serialized Unicode Set. + * @stable ICU 2.4 + */ + const uint16_t *array; + /** + * The length of the array that contains BMP characters. + * @stable ICU 2.4 + */ + int32_t bmpLength; + /** + * The total length of the array. + * @stable ICU 2.4 + */ + int32_t length; + /** + * A small buffer for the array to reduce memory allocations. + * @stable ICU 2.4 + */ + uint16_t staticArray[USET_SERIALIZED_STATIC_ARRAY_CAPACITY]; +} USerializedSet; + +/********************************************************************* + * USet API + *********************************************************************/ + +/** + * Create an empty USet object. + * Equivalent to uset_open(1, 0). + * @return a newly created USet. The caller must call uset_close() on + * it when done. + * @stable ICU 4.2 + */ +U_STABLE USet* U_EXPORT2 +uset_openEmpty(void); + +/** + * Creates a USet object that contains the range of characters + * start..end, inclusive. If <code>start > end</code> + * then an empty set is created (same as using uset_openEmpty()). + * @param start first character of the range, inclusive + * @param end last character of the range, inclusive + * @return a newly created USet. The caller must call uset_close() on + * it when done. + * @stable ICU 2.4 + */ +U_STABLE USet* U_EXPORT2 +uset_open(UChar32 start, UChar32 end); + +/** + * Creates a set from the given pattern. See the UnicodeSet class + * description for the syntax of the pattern language. + * @param pattern a string specifying what characters are in the set + * @param patternLength the length of the pattern, or -1 if null + * terminated + * @param ec the error code + * @stable ICU 2.4 + */ +U_STABLE USet* U_EXPORT2 +uset_openPattern(const UChar* pattern, int32_t patternLength, + UErrorCode* ec); + +/** + * Creates a set from the given pattern. See the UnicodeSet class + * description for the syntax of the pattern language. + * @param pattern a string specifying what characters are in the set + * @param patternLength the length of the pattern, or -1 if null + * terminated + * @param options bitmask for options to apply to the pattern. + * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE. + * @param ec the error code + * @stable ICU 2.4 + */ +U_STABLE USet* U_EXPORT2 +uset_openPatternOptions(const UChar* pattern, int32_t patternLength, + uint32_t options, + UErrorCode* ec); + +/** + * Disposes of the storage used by a USet object. This function should + * be called exactly once for objects returned by uset_open(). + * @param set the object to dispose of + * @stable ICU 2.4 + */ +U_STABLE void U_EXPORT2 +uset_close(USet* set); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUSetPointer + * "Smart pointer" class, closes a USet via uset_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUSetPointer, USet, uset_close); + +U_NAMESPACE_END + +#endif + +/** + * Returns a copy of this object. + * If this set is frozen, then the clone will be frozen as well. + * Use uset_cloneAsThawed() for a mutable clone of a frozen set. + * @param set the original set + * @return the newly allocated copy of the set + * @see uset_cloneAsThawed + * @stable ICU 3.8 + */ +U_STABLE USet * U_EXPORT2 +uset_clone(const USet *set); + +/** + * Determines whether the set has been frozen (made immutable) or not. + * See the ICU4J Freezable interface for details. + * @param set the set + * @return TRUE/FALSE for whether the set has been frozen + * @see uset_freeze + * @see uset_cloneAsThawed + * @stable ICU 3.8 + */ +U_STABLE UBool U_EXPORT2 +uset_isFrozen(const USet *set); + +/** + * Freeze the set (make it immutable). + * Once frozen, it cannot be unfrozen and is therefore thread-safe + * until it is deleted. + * See the ICU4J Freezable interface for details. + * Freezing the set may also make some operations faster, for example + * uset_contains() and uset_span(). + * A frozen set will not be modified. (It remains frozen.) + * @param set the set + * @return the same set, now frozen + * @see uset_isFrozen + * @see uset_cloneAsThawed + * @stable ICU 3.8 + */ +U_STABLE void U_EXPORT2 +uset_freeze(USet *set); + +/** + * Clone the set and make the clone mutable. + * See the ICU4J Freezable interface for details. + * @param set the set + * @return the mutable clone + * @see uset_freeze + * @see uset_isFrozen + * @see uset_clone + * @stable ICU 3.8 + */ +U_STABLE USet * U_EXPORT2 +uset_cloneAsThawed(const USet *set); + +/** + * Causes the USet object to represent the range <code>start - end</code>. + * If <code>start > end</code> then this USet is set to an empty range. + * A frozen set will not be modified. + * @param set the object to set to the given range + * @param start first character in the set, inclusive + * @param end last character in the set, inclusive + * @stable ICU 3.2 + */ +U_STABLE void U_EXPORT2 +uset_set(USet* set, + UChar32 start, UChar32 end); + +/** + * Modifies the set to represent the set specified by the given + * pattern. See the UnicodeSet class description for the syntax of + * the pattern language. See also the User Guide chapter about UnicodeSet. + * <em>Empties the set passed before applying the pattern.</em> + * A frozen set will not be modified. + * @param set The set to which the pattern is to be applied. + * @param pattern A pointer to UChar string specifying what characters are in the set. + * The character at pattern[0] must be a '['. + * @param patternLength The length of the UChar string. -1 if NUL terminated. + * @param options A bitmask for options to apply to the pattern. + * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE. + * @param status Returns an error if the pattern cannot be parsed. + * @return Upon successful parse, the value is either + * the index of the character after the closing ']' + * of the parsed pattern. + * If the status code indicates failure, then the return value + * is the index of the error in the source. + * + * @stable ICU 2.8 + */ +U_STABLE int32_t U_EXPORT2 +uset_applyPattern(USet *set, + const UChar *pattern, int32_t patternLength, + uint32_t options, + UErrorCode *status); + +/** + * Modifies the set to contain those code points which have the given value + * for the given binary or enumerated property, as returned by + * u_getIntPropertyValue. Prior contents of this set are lost. + * A frozen set will not be modified. + * + * @param set the object to contain the code points defined by the property + * + * @param prop a property in the range UCHAR_BIN_START..UCHAR_BIN_LIMIT-1 + * or UCHAR_INT_START..UCHAR_INT_LIMIT-1 + * or UCHAR_MASK_START..UCHAR_MASK_LIMIT-1. + * + * @param value a value in the range u_getIntPropertyMinValue(prop).. + * u_getIntPropertyMaxValue(prop), with one exception. If prop is + * UCHAR_GENERAL_CATEGORY_MASK, then value should not be a UCharCategory, but + * rather a mask value produced by U_GET_GC_MASK(). This allows grouped + * categories such as [:L:] to be represented. + * + * @param ec error code input/output parameter + * + * @stable ICU 3.2 + */ +U_STABLE void U_EXPORT2 +uset_applyIntPropertyValue(USet* set, + UProperty prop, int32_t value, UErrorCode* ec); + +/** + * Modifies the set to contain those code points which have the + * given value for the given property. Prior contents of this + * set are lost. + * A frozen set will not be modified. + * + * @param set the object to contain the code points defined by the given + * property and value alias + * + * @param prop a string specifying a property alias, either short or long. + * The name is matched loosely. See PropertyAliases.txt for names and a + * description of loose matching. If the value string is empty, then this + * string is interpreted as either a General_Category value alias, a Script + * value alias, a binary property alias, or a special ID. Special IDs are + * matched loosely and correspond to the following sets: + * + * "ANY" = [\\u0000-\\U0010FFFF], + * "ASCII" = [\\u0000-\\u007F], + * "Assigned" = [:^Cn:]. + * + * @param propLength the length of the prop, or -1 if NULL + * + * @param value a string specifying a value alias, either short or long. + * The name is matched loosely. See PropertyValueAliases.txt for names + * and a description of loose matching. In addition to aliases listed, + * numeric values and canonical combining classes may be expressed + * numerically, e.g., ("nv", "0.5") or ("ccc", "220"). The value string + * may also be empty. + * + * @param valueLength the length of the value, or -1 if NULL + * + * @param ec error code input/output parameter + * + * @stable ICU 3.2 + */ +U_STABLE void U_EXPORT2 +uset_applyPropertyAlias(USet* set, + const UChar *prop, int32_t propLength, + const UChar *value, int32_t valueLength, + UErrorCode* ec); + +/** + * Return true if the given position, in the given pattern, appears + * to be the start of a UnicodeSet pattern. + * + * @param pattern a string specifying the pattern + * @param patternLength the length of the pattern, or -1 if NULL + * @param pos the given position + * @stable ICU 3.2 + */ +U_STABLE UBool U_EXPORT2 +uset_resemblesPattern(const UChar *pattern, int32_t patternLength, + int32_t pos); + +/** + * Returns a string representation of this set. If the result of + * calling this function is passed to a uset_openPattern(), it + * will produce another set that is equal to this one. + * @param set the set + * @param result the string to receive the rules, may be NULL + * @param resultCapacity the capacity of result, may be 0 if result is NULL + * @param escapeUnprintable if TRUE then convert unprintable + * character to their hex escape representations, \\uxxxx or + * \\Uxxxxxxxx. Unprintable characters are those other than + * U+000A, U+0020..U+007E. + * @param ec error code. + * @return length of string, possibly larger than resultCapacity + * @stable ICU 2.4 + */ +U_STABLE int32_t U_EXPORT2 +uset_toPattern(const USet* set, + UChar* result, int32_t resultCapacity, + UBool escapeUnprintable, + UErrorCode* ec); + +/** + * Adds the given character to the given USet. After this call, + * uset_contains(set, c) will return TRUE. + * A frozen set will not be modified. + * @param set the object to which to add the character + * @param c the character to add + * @stable ICU 2.4 + */ +U_STABLE void U_EXPORT2 +uset_add(USet* set, UChar32 c); + +/** + * Adds all of the elements in the specified set to this set if + * they're not already present. This operation effectively + * modifies this set so that its value is the <i>union</i> of the two + * sets. The behavior of this operation is unspecified if the specified + * collection is modified while the operation is in progress. + * A frozen set will not be modified. + * + * @param set the object to which to add the set + * @param additionalSet the source set whose elements are to be added to this set. + * @stable ICU 2.6 + */ +U_STABLE void U_EXPORT2 +uset_addAll(USet* set, const USet *additionalSet); + +/** + * Adds the given range of characters to the given USet. After this call, + * uset_contains(set, start, end) will return TRUE. + * A frozen set will not be modified. + * @param set the object to which to add the character + * @param start the first character of the range to add, inclusive + * @param end the last character of the range to add, inclusive + * @stable ICU 2.2 + */ +U_STABLE void U_EXPORT2 +uset_addRange(USet* set, UChar32 start, UChar32 end); + +/** + * Adds the given string to the given USet. After this call, + * uset_containsString(set, str, strLen) will return TRUE. + * A frozen set will not be modified. + * @param set the object to which to add the character + * @param str the string to add + * @param strLen the length of the string or -1 if null terminated. + * @stable ICU 2.4 + */ +U_STABLE void U_EXPORT2 +uset_addString(USet* set, const UChar* str, int32_t strLen); + +/** + * Adds each of the characters in this string to the set. Thus "ch" => {"c", "h"} + * If this set already any particular character, it has no effect on that character. + * A frozen set will not be modified. + * @param set the object to which to add the character + * @param str the source string + * @param strLen the length of the string or -1 if null terminated. + * @stable ICU 3.4 + */ +U_STABLE void U_EXPORT2 +uset_addAllCodePoints(USet* set, const UChar *str, int32_t strLen); + +/** + * Removes the given character from the given USet. After this call, + * uset_contains(set, c) will return FALSE. + * A frozen set will not be modified. + * @param set the object from which to remove the character + * @param c the character to remove + * @stable ICU 2.4 + */ +U_STABLE void U_EXPORT2 +uset_remove(USet* set, UChar32 c); + +/** + * Removes the given range of characters from the given USet. After this call, + * uset_contains(set, start, end) will return FALSE. + * A frozen set will not be modified. + * @param set the object to which to add the character + * @param start the first character of the range to remove, inclusive + * @param end the last character of the range to remove, inclusive + * @stable ICU 2.2 + */ +U_STABLE void U_EXPORT2 +uset_removeRange(USet* set, UChar32 start, UChar32 end); + +/** + * Removes the given string to the given USet. After this call, + * uset_containsString(set, str, strLen) will return FALSE. + * A frozen set will not be modified. + * @param set the object to which to add the character + * @param str the string to remove + * @param strLen the length of the string or -1 if null terminated. + * @stable ICU 2.4 + */ +U_STABLE void U_EXPORT2 +uset_removeString(USet* set, const UChar* str, int32_t strLen); + +/** + * Removes from this set all of its elements that are contained in the + * specified set. This operation effectively modifies this + * set so that its value is the <i>asymmetric set difference</i> of + * the two sets. + * A frozen set will not be modified. + * @param set the object from which the elements are to be removed + * @param removeSet the object that defines which elements will be + * removed from this set + * @stable ICU 3.2 + */ +U_STABLE void U_EXPORT2 +uset_removeAll(USet* set, const USet* removeSet); + +/** + * Retain only the elements in this set that are contained in the + * specified range. If <code>start > end</code> then an empty range is + * retained, leaving the set empty. This is equivalent to + * a boolean logic AND, or a set INTERSECTION. + * A frozen set will not be modified. + * + * @param set the object for which to retain only the specified range + * @param start first character, inclusive, of range to be retained + * to this set. + * @param end last character, inclusive, of range to be retained + * to this set. + * @stable ICU 3.2 + */ +U_STABLE void U_EXPORT2 +uset_retain(USet* set, UChar32 start, UChar32 end); + +/** + * Retains only the elements in this set that are contained in the + * specified set. In other words, removes from this set all of + * its elements that are not contained in the specified set. This + * operation effectively modifies this set so that its value is + * the <i>intersection</i> of the two sets. + * A frozen set will not be modified. + * + * @param set the object on which to perform the retain + * @param retain set that defines which elements this set will retain + * @stable ICU 3.2 + */ +U_STABLE void U_EXPORT2 +uset_retainAll(USet* set, const USet* retain); + +/** + * Reallocate this objects internal structures to take up the least + * possible space, without changing this object's value. + * A frozen set will not be modified. + * + * @param set the object on which to perfrom the compact + * @stable ICU 3.2 + */ +U_STABLE void U_EXPORT2 +uset_compact(USet* set); + +/** + * Inverts this set. This operation modifies this set so that + * its value is its complement. This operation does not affect + * the multicharacter strings, if any. + * A frozen set will not be modified. + * @param set the set + * @stable ICU 2.4 + */ +U_STABLE void U_EXPORT2 +uset_complement(USet* set); + +/** + * Complements in this set all elements contained in the specified + * set. Any character in the other set will be removed if it is + * in this set, or will be added if it is not in this set. + * A frozen set will not be modified. + * + * @param set the set with which to complement + * @param complement set that defines which elements will be xor'ed + * from this set. + * @stable ICU 3.2 + */ +U_STABLE void U_EXPORT2 +uset_complementAll(USet* set, const USet* complement); + +/** + * Removes all of the elements from this set. This set will be + * empty after this call returns. + * A frozen set will not be modified. + * @param set the set + * @stable ICU 2.4 + */ +U_STABLE void U_EXPORT2 +uset_clear(USet* set); + +/** + * Close this set over the given attribute. For the attribute + * USET_CASE, the result is to modify this set so that: + * + * 1. For each character or string 'a' in this set, all strings or + * characters 'b' such that foldCase(a) == foldCase(b) are added + * to this set. + * + * 2. For each string 'e' in the resulting set, if e != + * foldCase(e), 'e' will be removed. + * + * Example: [aq\\u00DF{Bc}{bC}{Fi}] => [aAqQ\\u00DF\\uFB01{ss}{bc}{fi}] + * + * (Here foldCase(x) refers to the operation u_strFoldCase, and a + * == b denotes that the contents are the same, not pointer + * comparison.) + * + * A frozen set will not be modified. + * + * @param set the set + * + * @param attributes bitmask for attributes to close over. + * Currently only the USET_CASE bit is supported. Any undefined bits + * are ignored. + * @stable ICU 4.2 + */ +U_STABLE void U_EXPORT2 +uset_closeOver(USet* set, int32_t attributes); + +/** + * Remove all strings from this set. + * + * @param set the set + * @stable ICU 4.2 + */ +U_STABLE void U_EXPORT2 +uset_removeAllStrings(USet* set); + +/** + * Returns TRUE if the given USet contains no characters and no + * strings. + * @param set the set + * @return true if set is empty + * @stable ICU 2.4 + */ +U_STABLE UBool U_EXPORT2 +uset_isEmpty(const USet* set); + +/** + * Returns TRUE if the given USet contains the given character. + * This function works faster with a frozen set. + * @param set the set + * @param c The codepoint to check for within the set + * @return true if set contains c + * @stable ICU 2.4 + */ +U_STABLE UBool U_EXPORT2 +uset_contains(const USet* set, UChar32 c); + +/** + * Returns TRUE if the given USet contains all characters c + * where start <= c && c <= end. + * @param set the set + * @param start the first character of the range to test, inclusive + * @param end the last character of the range to test, inclusive + * @return TRUE if set contains the range + * @stable ICU 2.2 + */ +U_STABLE UBool U_EXPORT2 +uset_containsRange(const USet* set, UChar32 start, UChar32 end); + +/** + * Returns TRUE if the given USet contains the given string. + * @param set the set + * @param str the string + * @param strLen the length of the string or -1 if null terminated. + * @return true if set contains str + * @stable ICU 2.4 + */ +U_STABLE UBool U_EXPORT2 +uset_containsString(const USet* set, const UChar* str, int32_t strLen); + +/** + * Returns the index of the given character within this set, where + * the set is ordered by ascending code point. If the character + * is not in this set, return -1. The inverse of this method is + * <code>charAt()</code>. + * @param set the set + * @param c the character to obtain the index for + * @return an index from 0..size()-1, or -1 + * @stable ICU 3.2 + */ +U_STABLE int32_t U_EXPORT2 +uset_indexOf(const USet* set, UChar32 c); + +/** + * Returns the character at the given index within this set, where + * the set is ordered by ascending code point. If the index is + * out of range, return (UChar32)-1. The inverse of this method is + * <code>indexOf()</code>. + * @param set the set + * @param charIndex an index from 0..size()-1 to obtain the char for + * @return the character at the given index, or (UChar32)-1. + * @stable ICU 3.2 + */ +U_STABLE UChar32 U_EXPORT2 +uset_charAt(const USet* set, int32_t charIndex); + +/** + * Returns the number of characters and strings contained in the given + * USet. + * @param set the set + * @return a non-negative integer counting the characters and strings + * contained in set + * @stable ICU 2.4 + */ +U_STABLE int32_t U_EXPORT2 +uset_size(const USet* set); + +/** + * Returns the number of items in this set. An item is either a range + * of characters or a single multicharacter string. + * @param set the set + * @return a non-negative integer counting the character ranges + * and/or strings contained in set + * @stable ICU 2.4 + */ +U_STABLE int32_t U_EXPORT2 +uset_getItemCount(const USet* set); + +/** + * Returns an item of this set. An item is either a range of + * characters or a single multicharacter string. + * @param set the set + * @param itemIndex a non-negative integer in the range 0.. + * uset_getItemCount(set)-1 + * @param start pointer to variable to receive first character + * in range, inclusive + * @param end pointer to variable to receive last character in range, + * inclusive + * @param str buffer to receive the string, may be NULL + * @param strCapacity capacity of str, or 0 if str is NULL + * @param ec error code + * @return the length of the string (>= 2), or 0 if the item is a + * range, in which case it is the range *start..*end, or -1 if + * itemIndex is out of range + * @stable ICU 2.4 + */ +U_STABLE int32_t U_EXPORT2 +uset_getItem(const USet* set, int32_t itemIndex, + UChar32* start, UChar32* end, + UChar* str, int32_t strCapacity, + UErrorCode* ec); + +/** + * Returns true if set1 contains all the characters and strings + * of set2. It answers the question, 'Is set1 a superset of set2?' + * @param set1 set to be checked for containment + * @param set2 set to be checked for containment + * @return true if the test condition is met + * @stable ICU 3.2 + */ +U_STABLE UBool U_EXPORT2 +uset_containsAll(const USet* set1, const USet* set2); + +/** + * Returns true if this set contains all the characters + * of the given string. This is does not check containment of grapheme + * clusters, like uset_containsString. + * @param set set of characters to be checked for containment + * @param str string containing codepoints to be checked for containment + * @param strLen the length of the string or -1 if null terminated. + * @return true if the test condition is met + * @stable ICU 3.4 + */ +U_STABLE UBool U_EXPORT2 +uset_containsAllCodePoints(const USet* set, const UChar *str, int32_t strLen); + +/** + * Returns true if set1 contains none of the characters and strings + * of set2. It answers the question, 'Is set1 a disjoint set of set2?' + * @param set1 set to be checked for containment + * @param set2 set to be checked for containment + * @return true if the test condition is met + * @stable ICU 3.2 + */ +U_STABLE UBool U_EXPORT2 +uset_containsNone(const USet* set1, const USet* set2); + +/** + * Returns true if set1 contains some of the characters and strings + * of set2. It answers the question, 'Does set1 and set2 have an intersection?' + * @param set1 set to be checked for containment + * @param set2 set to be checked for containment + * @return true if the test condition is met + * @stable ICU 3.2 + */ +U_STABLE UBool U_EXPORT2 +uset_containsSome(const USet* set1, const USet* set2); + +/** + * Returns the length of the initial substring of the input string which + * consists only of characters and strings that are contained in this set + * (USET_SPAN_CONTAINED, USET_SPAN_SIMPLE), + * or only of characters and strings that are not contained + * in this set (USET_SPAN_NOT_CONTAINED). + * See USetSpanCondition for details. + * Similar to the strspn() C library function. + * Unpaired surrogates are treated according to contains() of their surrogate code points. + * This function works faster with a frozen set and with a non-negative string length argument. + * @param set the set + * @param s start of the string + * @param length of the string; can be -1 for NUL-terminated + * @param spanCondition specifies the containment condition + * @return the length of the initial substring according to the spanCondition; + * 0 if the start of the string does not fit the spanCondition + * @stable ICU 3.8 + * @see USetSpanCondition + */ +U_STABLE int32_t U_EXPORT2 +uset_span(const USet *set, const UChar *s, int32_t length, USetSpanCondition spanCondition); + +/** + * Returns the start of the trailing substring of the input string which + * consists only of characters and strings that are contained in this set + * (USET_SPAN_CONTAINED, USET_SPAN_SIMPLE), + * or only of characters and strings that are not contained + * in this set (USET_SPAN_NOT_CONTAINED). + * See USetSpanCondition for details. + * Unpaired surrogates are treated according to contains() of their surrogate code points. + * This function works faster with a frozen set and with a non-negative string length argument. + * @param set the set + * @param s start of the string + * @param length of the string; can be -1 for NUL-terminated + * @param spanCondition specifies the containment condition + * @return the start of the trailing substring according to the spanCondition; + * the string length if the end of the string does not fit the spanCondition + * @stable ICU 3.8 + * @see USetSpanCondition + */ +U_STABLE int32_t U_EXPORT2 +uset_spanBack(const USet *set, const UChar *s, int32_t length, USetSpanCondition spanCondition); + +/** + * Returns the length of the initial substring of the input string which + * consists only of characters and strings that are contained in this set + * (USET_SPAN_CONTAINED, USET_SPAN_SIMPLE), + * or only of characters and strings that are not contained + * in this set (USET_SPAN_NOT_CONTAINED). + * See USetSpanCondition for details. + * Similar to the strspn() C library function. + * Malformed byte sequences are treated according to contains(0xfffd). + * This function works faster with a frozen set and with a non-negative string length argument. + * @param set the set + * @param s start of the string (UTF-8) + * @param length of the string; can be -1 for NUL-terminated + * @param spanCondition specifies the containment condition + * @return the length of the initial substring according to the spanCondition; + * 0 if the start of the string does not fit the spanCondition + * @stable ICU 3.8 + * @see USetSpanCondition + */ +U_STABLE int32_t U_EXPORT2 +uset_spanUTF8(const USet *set, const char *s, int32_t length, USetSpanCondition spanCondition); + +/** + * Returns the start of the trailing substring of the input string which + * consists only of characters and strings that are contained in this set + * (USET_SPAN_CONTAINED, USET_SPAN_SIMPLE), + * or only of characters and strings that are not contained + * in this set (USET_SPAN_NOT_CONTAINED). + * See USetSpanCondition for details. + * Malformed byte sequences are treated according to contains(0xfffd). + * This function works faster with a frozen set and with a non-negative string length argument. + * @param set the set + * @param s start of the string (UTF-8) + * @param length of the string; can be -1 for NUL-terminated + * @param spanCondition specifies the containment condition + * @return the start of the trailing substring according to the spanCondition; + * the string length if the end of the string does not fit the spanCondition + * @stable ICU 3.8 + * @see USetSpanCondition + */ +U_STABLE int32_t U_EXPORT2 +uset_spanBackUTF8(const USet *set, const char *s, int32_t length, USetSpanCondition spanCondition); + +/** + * Returns true if set1 contains all of the characters and strings + * of set2, and vis versa. It answers the question, 'Is set1 equal to set2?' + * @param set1 set to be checked for containment + * @param set2 set to be checked for containment + * @return true if the test condition is met + * @stable ICU 3.2 + */ +U_STABLE UBool U_EXPORT2 +uset_equals(const USet* set1, const USet* set2); + +/********************************************************************* + * Serialized set API + *********************************************************************/ + +/** + * Serializes this set into an array of 16-bit integers. Serialization + * (currently) only records the characters in the set; multicharacter + * strings are ignored. + * + * The array + * has following format (each line is one 16-bit integer): + * + * length = (n+2*m) | (m!=0?0x8000:0) + * bmpLength = n; present if m!=0 + * bmp[0] + * bmp[1] + * ... + * bmp[n-1] + * supp-high[0] + * supp-low[0] + * supp-high[1] + * supp-low[1] + * ... + * supp-high[m-1] + * supp-low[m-1] + * + * The array starts with a header. After the header are n bmp + * code points, then m supplementary code points. Either n or m + * or both may be zero. n+2*m is always <= 0x7FFF. + * + * If there are no supplementary characters (if m==0) then the + * header is one 16-bit integer, 'length', with value n. + * + * If there are supplementary characters (if m!=0) then the header + * is two 16-bit integers. The first, 'length', has value + * (n+2*m)|0x8000. The second, 'bmpLength', has value n. + * + * After the header the code points are stored in ascending order. + * Supplementary code points are stored as most significant 16 + * bits followed by least significant 16 bits. + * + * @param set the set + * @param dest pointer to buffer of destCapacity 16-bit integers. + * May be NULL only if destCapacity is zero. + * @param destCapacity size of dest, or zero. Must not be negative. + * @param pErrorCode pointer to the error code. Will be set to + * U_INDEX_OUTOFBOUNDS_ERROR if n+2*m > 0x7FFF. Will be set to + * U_BUFFER_OVERFLOW_ERROR if n+2*m+(m!=0?2:1) > destCapacity. + * @return the total length of the serialized format, including + * the header, that is, n+2*m+(m!=0?2:1), or 0 on error other + * than U_BUFFER_OVERFLOW_ERROR. + * @stable ICU 2.4 + */ +U_STABLE int32_t U_EXPORT2 +uset_serialize(const USet* set, uint16_t* dest, int32_t destCapacity, UErrorCode* pErrorCode); + +/** + * Given a serialized array, fill in the given serialized set object. + * @param fillSet pointer to result + * @param src pointer to start of array + * @param srcLength length of array + * @return true if the given array is valid, otherwise false + * @stable ICU 2.4 + */ +U_STABLE UBool U_EXPORT2 +uset_getSerializedSet(USerializedSet* fillSet, const uint16_t* src, int32_t srcLength); + +/** + * Set the USerializedSet to contain the given character (and nothing + * else). + * @param fillSet pointer to result + * @param c The codepoint to set + * @stable ICU 2.4 + */ +U_STABLE void U_EXPORT2 +uset_setSerializedToOne(USerializedSet* fillSet, UChar32 c); + +/** + * Returns TRUE if the given USerializedSet contains the given + * character. + * @param set the serialized set + * @param c The codepoint to check for within the set + * @return true if set contains c + * @stable ICU 2.4 + */ +U_STABLE UBool U_EXPORT2 +uset_serializedContains(const USerializedSet* set, UChar32 c); + +/** + * Returns the number of disjoint ranges of characters contained in + * the given serialized set. Ignores any strings contained in the + * set. + * @param set the serialized set + * @return a non-negative integer counting the character ranges + * contained in set + * @stable ICU 2.4 + */ +U_STABLE int32_t U_EXPORT2 +uset_getSerializedRangeCount(const USerializedSet* set); + +/** + * Returns a range of characters contained in the given serialized + * set. + * @param set the serialized set + * @param rangeIndex a non-negative integer in the range 0.. + * uset_getSerializedRangeCount(set)-1 + * @param pStart pointer to variable to receive first character + * in range, inclusive + * @param pEnd pointer to variable to receive last character in range, + * inclusive + * @return true if rangeIndex is valid, otherwise false + * @stable ICU 2.4 + */ +U_STABLE UBool U_EXPORT2 +uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex, + UChar32* pStart, UChar32* pEnd); + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/usetiter.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/usetiter.h new file mode 100755 index 00000000..d0d99185 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/usetiter.h @@ -0,0 +1,320 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (c) 2002-2014, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +*/ +#ifndef USETITER_H +#define USETITER_H + +#include "unicode/utypes.h" +#include "unicode/uobject.h" +#include "unicode/unistr.h" + +/** + * \file + * \brief C++ API: UnicodeSetIterator iterates over the contents of a UnicodeSet. + */ + +U_NAMESPACE_BEGIN + +class UnicodeSet; +class UnicodeString; + +/** + * + * UnicodeSetIterator iterates over the contents of a UnicodeSet. It + * iterates over either code points or code point ranges. After all + * code points or ranges have been returned, it returns the + * multicharacter strings of the UnicodeSet, if any. + * + * This class is not intended to be subclassed. Consider any fields + * or methods declared as "protected" to be private. The use of + * protected in this class is an artifact of history. + * + * <p>To iterate over code points and strings, use a loop like this: + * <pre> + * UnicodeSetIterator it(set); + * while (it.next()) { + * processItem(it.getString()); + * } + * </pre> + * <p>Each item in the set is accessed as a string. Set elements + * consisting of single code points are returned as strings containing + * just the one code point. + * + * <p>To iterate over code point ranges, instead of individual code points, + * use a loop like this: + * <pre> + * UnicodeSetIterator it(set); + * while (it.nextRange()) { + * if (it.isString()) { + * processString(it.getString()); + * } else { + * processCodepointRange(it.getCodepoint(), it.getCodepointEnd()); + * } + * } + * </pre> + * @author M. Davis + * @stable ICU 2.4 + */ +class U_COMMON_API UnicodeSetIterator : public UObject { + + protected: + + /** + * Value of <tt>codepoint</tt> if the iterator points to a string. + * If <tt>codepoint == IS_STRING</tt>, then examine + * <tt>string</tt> for the current iteration result. + * @stable ICU 2.4 + */ + enum { IS_STRING = -1 }; + + /** + * Current code point, or the special value <tt>IS_STRING</tt>, if + * the iterator points to a string. + * @stable ICU 2.4 + */ + UChar32 codepoint; + + /** + * When iterating over ranges using <tt>nextRange()</tt>, + * <tt>codepointEnd</tt> contains the inclusive end of the + * iteration range, if <tt>codepoint != IS_STRING</tt>. If + * iterating over code points using <tt>next()</tt>, or if + * <tt>codepoint == IS_STRING</tt>, then the value of + * <tt>codepointEnd</tt> is undefined. + * @stable ICU 2.4 + */ + UChar32 codepointEnd; + + /** + * If <tt>codepoint == IS_STRING</tt>, then <tt>string</tt> points + * to the current string. If <tt>codepoint != IS_STRING</tt>, the + * value of <tt>string</tt> is undefined. + * @stable ICU 2.4 + */ + const UnicodeString* string; + + public: + + /** + * Create an iterator over the given set. The iterator is valid + * only so long as <tt>set</tt> is valid. + * @param set set to iterate over + * @stable ICU 2.4 + */ + UnicodeSetIterator(const UnicodeSet& set); + + /** + * Create an iterator over nothing. <tt>next()</tt> and + * <tt>nextRange()</tt> return false. This is a convenience + * constructor allowing the target to be set later. + * @stable ICU 2.4 + */ + UnicodeSetIterator(); + + /** + * Destructor. + * @stable ICU 2.4 + */ + virtual ~UnicodeSetIterator(); + + /** + * Returns true if the current element is a string. If so, the + * caller can retrieve it with <tt>getString()</tt>. If this + * method returns false, the current element is a code point or + * code point range, depending on whether <tt>next()</tt> or + * <tt>nextRange()</tt> was called. + * Elements of types string and codepoint can both be retrieved + * with the function <tt>getString()</tt>. + * Elements of type codepoint can also be retrieved with + * <tt>getCodepoint()</tt>. + * For ranges, <tt>getCodepoint()</tt> returns the starting codepoint + * of the range, and <tt>getCodepointEnd()</tt> returns the end + * of the range. + * @stable ICU 2.4 + */ + inline UBool isString() const; + + /** + * Returns the current code point, if <tt>isString()</tt> returned + * false. Otherwise returns an undefined result. + * @stable ICU 2.4 + */ + inline UChar32 getCodepoint() const; + + /** + * Returns the end of the current code point range, if + * <tt>isString()</tt> returned false and <tt>nextRange()</tt> was + * called. Otherwise returns an undefined result. + * @stable ICU 2.4 + */ + inline UChar32 getCodepointEnd() const; + + /** + * Returns the current string, if <tt>isString()</tt> returned + * true. If the current iteration item is a code point, a UnicodeString + * containing that single code point is returned. + * + * Ownership of the returned string remains with the iterator. + * The string is guaranteed to remain valid only until the iterator is + * advanced to the next item, or until the iterator is deleted. + * + * @stable ICU 2.4 + */ + const UnicodeString& getString(); + + /** + * Advances the iteration position to the next element in the set, + * which can be either a single code point or a string. + * If there are no more elements in the set, return false. + * + * <p> + * If <tt>isString() == TRUE</tt>, the value is a + * string, otherwise the value is a + * single code point. Elements of either type can be retrieved + * with the function <tt>getString()</tt>, while elements of + * consisting of a single code point can be retrieved with + * <tt>getCodepoint()</tt> + * + * <p>The order of iteration is all code points in sorted order, + * followed by all strings sorted order. Do not mix + * calls to <tt>next()</tt> and <tt>nextRange()</tt> without + * calling <tt>reset()</tt> between them. The results of doing so + * are undefined. + * + * @return true if there was another element in the set. + * @stable ICU 2.4 + */ + UBool next(); + + /** + * Returns the next element in the set, either a code point range + * or a string. If there are no more elements in the set, return + * false. If <tt>isString() == TRUE</tt>, the value is a + * string and can be accessed with <tt>getString()</tt>. Otherwise the value is a + * range of one or more code points from <tt>getCodepoint()</tt> to + * <tt>getCodepointeEnd()</tt> inclusive. + * + * <p>The order of iteration is all code points ranges in sorted + * order, followed by all strings sorted order. Ranges are + * disjoint and non-contiguous. The value returned from <tt>getString()</tt> + * is undefined unless <tt>isString() == TRUE</tt>. Do not mix calls to + * <tt>next()</tt> and <tt>nextRange()</tt> without calling + * <tt>reset()</tt> between them. The results of doing so are + * undefined. + * + * @return true if there was another element in the set. + * @stable ICU 2.4 + */ + UBool nextRange(); + + /** + * Sets this iterator to visit the elements of the given set and + * resets it to the start of that set. The iterator is valid only + * so long as <tt>set</tt> is valid. + * @param set the set to iterate over. + * @stable ICU 2.4 + */ + void reset(const UnicodeSet& set); + + /** + * Resets this iterator to the start of the set. + * @stable ICU 2.4 + */ + void reset(); + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.4 + */ + static UClassID U_EXPORT2 getStaticClassID(); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.4 + */ + virtual UClassID getDynamicClassID() const; + + // ======================= PRIVATES =========================== + + protected: + + // endElement and nextElements are really UChar32's, but we keep + // them as signed int32_t's so we can do comparisons with + // endElement set to -1. Leave them as int32_t's. + /** The set + * @stable ICU 2.4 + */ + const UnicodeSet* set; + /** End range + * @stable ICU 2.4 + */ + int32_t endRange; + /** Range + * @stable ICU 2.4 + */ + int32_t range; + /** End element + * @stable ICU 2.4 + */ + int32_t endElement; + /** Next element + * @stable ICU 2.4 + */ + int32_t nextElement; + //UBool abbreviated; + /** Next string + * @stable ICU 2.4 + */ + int32_t nextString; + /** String count + * @stable ICU 2.4 + */ + int32_t stringCount; + + /** + * Points to the string to use when the caller asks for a + * string and the current iteration item is a code point, not a string. + * @internal + */ + UnicodeString *cpString; + + /** Copy constructor. Disallowed. + * @stable ICU 2.4 + */ + UnicodeSetIterator(const UnicodeSetIterator&); // disallow + + /** Assignment operator. Disallowed. + * @stable ICU 2.4 + */ + UnicodeSetIterator& operator=(const UnicodeSetIterator&); // disallow + + /** Load range + * @stable ICU 2.4 + */ + virtual void loadRange(int32_t range); + +}; + +inline UBool UnicodeSetIterator::isString() const { + return codepoint == (UChar32)IS_STRING; +} + +inline UChar32 UnicodeSetIterator::getCodepoint() const { + return codepoint; +} + +inline UChar32 UnicodeSetIterator::getCodepointEnd() const { + return codepointEnd; +} + + +U_NAMESPACE_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ushape.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ushape.h new file mode 100755 index 00000000..78b4d027 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ushape.h @@ -0,0 +1,476 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* +* Copyright (C) 2000-2012, International Business Machines +* Corporation and others. All Rights Reserved. +* +****************************************************************************** +* file name: ushape.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2000jun29 +* created by: Markus W. Scherer +*/ + +#ifndef __USHAPE_H__ +#define __USHAPE_H__ + +#include "unicode/utypes.h" + +/** + * \file + * \brief C API: Arabic shaping + * + */ + +/** + * Shape Arabic text on a character basis. + * + * <p>This function performs basic operations for "shaping" Arabic text. It is most + * useful for use with legacy data formats and legacy display technology + * (simple terminals). All operations are performed on Unicode characters.</p> + * + * <p>Text-based shaping means that some character code points in the text are + * replaced by others depending on the context. It transforms one kind of text + * into another. In comparison, modern displays for Arabic text select + * appropriate, context-dependent font glyphs for each text element, which means + * that they transform text into a glyph vector.</p> + * + * <p>Text transformations are necessary when modern display technology is not + * available or when text needs to be transformed to or from legacy formats that + * use "shaped" characters. Since the Arabic script is cursive, connecting + * adjacent letters to each other, computers select images for each letter based + * on the surrounding letters. This usually results in four images per Arabic + * letter: initial, middle, final, and isolated forms. In Unicode, on the other + * hand, letters are normally stored abstract, and a display system is expected + * to select the necessary glyphs. (This makes searching and other text + * processing easier because the same letter has only one code.) It is possible + * to mimic this with text transformations because there are characters in + * Unicode that are rendered as letters with a specific shape + * (or cursive connectivity). They were included for interoperability with + * legacy systems and codepages, and for unsophisticated display systems.</p> + * + * <p>A second kind of text transformations is supported for Arabic digits: + * For compatibility with legacy codepages that only include European digits, + * it is possible to replace one set of digits by another, changing the + * character code points. These operations can be performed for either + * Arabic-Indic Digits (U+0660...U+0669) or Eastern (Extended) Arabic-Indic + * digits (U+06f0...U+06f9).</p> + * + * <p>Some replacements may result in more or fewer characters (code points). + * By default, this means that the destination buffer may receive text with a + * length different from the source length. Some legacy systems rely on the + * length of the text to be constant. They expect extra spaces to be added + * or consumed either next to the affected character or at the end of the + * text.</p> + * + * <p>For details about the available operations, see the description of the + * <code>U_SHAPE_...</code> options.</p> + * + * @param source The input text. + * + * @param sourceLength The number of UChars in <code>source</code>. + * + * @param dest The destination buffer that will receive the results of the + * requested operations. It may be <code>NULL</code> only if + * <code>destSize</code> is 0. The source and destination must not + * overlap. + * + * @param destSize The size (capacity) of the destination buffer in UChars. + * If <code>destSize</code> is 0, then no output is produced, + * but the necessary buffer size is returned ("preflighting"). + * + * @param options This is a 32-bit set of flags that specify the operations + * that are performed on the input text. If no error occurs, + * then the result will always be written to the destination + * buffer. + * + * @param pErrorCode must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * + * @return The number of UChars written to the destination buffer. + * If an error occurred, then no output was written, or it may be + * incomplete. If <code>U_BUFFER_OVERFLOW_ERROR</code> is set, then + * the return value indicates the necessary destination buffer size. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_shapeArabic(const UChar *source, int32_t sourceLength, + UChar *dest, int32_t destSize, + uint32_t options, + UErrorCode *pErrorCode); + +/** + * Memory option: allow the result to have a different length than the source. + * Affects: LamAlef options + * @stable ICU 2.0 + */ +#define U_SHAPE_LENGTH_GROW_SHRINK 0 + +/** + * Memory option: allow the result to have a different length than the source. + * Affects: LamAlef options + * This option is an alias to U_SHAPE_LENGTH_GROW_SHRINK + * @stable ICU 4.2 + */ +#define U_SHAPE_LAMALEF_RESIZE 0 + +/** + * Memory option: the result must have the same length as the source. + * If more room is necessary, then try to consume spaces next to modified characters. + * @stable ICU 2.0 + */ +#define U_SHAPE_LENGTH_FIXED_SPACES_NEAR 1 + +/** + * Memory option: the result must have the same length as the source. + * If more room is necessary, then try to consume spaces next to modified characters. + * Affects: LamAlef options + * This option is an alias to U_SHAPE_LENGTH_FIXED_SPACES_NEAR + * @stable ICU 4.2 + */ +#define U_SHAPE_LAMALEF_NEAR 1 + +/** + * Memory option: the result must have the same length as the source. + * If more room is necessary, then try to consume spaces at the end of the text. + * @stable ICU 2.0 + */ +#define U_SHAPE_LENGTH_FIXED_SPACES_AT_END 2 + +/** + * Memory option: the result must have the same length as the source. + * If more room is necessary, then try to consume spaces at the end of the text. + * Affects: LamAlef options + * This option is an alias to U_SHAPE_LENGTH_FIXED_SPACES_AT_END + * @stable ICU 4.2 + */ +#define U_SHAPE_LAMALEF_END 2 + +/** + * Memory option: the result must have the same length as the source. + * If more room is necessary, then try to consume spaces at the beginning of the text. + * @stable ICU 2.0 + */ +#define U_SHAPE_LENGTH_FIXED_SPACES_AT_BEGINNING 3 + +/** + * Memory option: the result must have the same length as the source. + * If more room is necessary, then try to consume spaces at the beginning of the text. + * Affects: LamAlef options + * This option is an alias to U_SHAPE_LENGTH_FIXED_SPACES_AT_BEGINNING + * @stable ICU 4.2 + */ +#define U_SHAPE_LAMALEF_BEGIN 3 + + +/** + * Memory option: the result must have the same length as the source. + * Shaping Mode: For each LAMALEF character found, expand LAMALEF using space at end. + * If there is no space at end, use spaces at beginning of the buffer. If there + * is no space at beginning of the buffer, use spaces at the near (i.e. the space + * after the LAMALEF character). + * If there are no spaces found, an error U_NO_SPACE_AVAILABLE (as defined in utypes.h) + * will be set in pErrorCode + * + * Deshaping Mode: Perform the same function as the flag equals U_SHAPE_LAMALEF_END. + * Affects: LamAlef options + * @stable ICU 4.2 + */ +#define U_SHAPE_LAMALEF_AUTO 0x10000 + +/** Bit mask for memory options. @stable ICU 2.0 */ +#define U_SHAPE_LENGTH_MASK 0x10003 /* Changed old value 3 */ + + +/** + * Bit mask for LamAlef memory options. + * @stable ICU 4.2 + */ +#define U_SHAPE_LAMALEF_MASK 0x10003 /* updated */ + +/** Direction indicator: the source is in logical (keyboard) order. @stable ICU 2.0 */ +#define U_SHAPE_TEXT_DIRECTION_LOGICAL 0 + +/** + * Direction indicator: + * the source is in visual RTL order, + * the rightmost displayed character stored first. + * This option is an alias to U_SHAPE_TEXT_DIRECTION_LOGICAL + * @stable ICU 4.2 + */ +#define U_SHAPE_TEXT_DIRECTION_VISUAL_RTL 0 + +/** + * Direction indicator: + * the source is in visual LTR order, + * the leftmost displayed character stored first. + * @stable ICU 2.0 + */ +#define U_SHAPE_TEXT_DIRECTION_VISUAL_LTR 4 + +/** Bit mask for direction indicators. @stable ICU 2.0 */ +#define U_SHAPE_TEXT_DIRECTION_MASK 4 + + +/** Letter shaping option: do not perform letter shaping. @stable ICU 2.0 */ +#define U_SHAPE_LETTERS_NOOP 0 + +/** Letter shaping option: replace abstract letter characters by "shaped" ones. @stable ICU 2.0 */ +#define U_SHAPE_LETTERS_SHAPE 8 + +/** Letter shaping option: replace "shaped" letter characters by abstract ones. @stable ICU 2.0 */ +#define U_SHAPE_LETTERS_UNSHAPE 0x10 + +/** + * Letter shaping option: replace abstract letter characters by "shaped" ones. + * The only difference with U_SHAPE_LETTERS_SHAPE is that Tashkeel letters + * are always "shaped" into the isolated form instead of the medial form + * (selecting code points from the Arabic Presentation Forms-B block). + * @stable ICU 2.0 + */ +#define U_SHAPE_LETTERS_SHAPE_TASHKEEL_ISOLATED 0x18 + + +/** Bit mask for letter shaping options. @stable ICU 2.0 */ +#define U_SHAPE_LETTERS_MASK 0x18 + + +/** Digit shaping option: do not perform digit shaping. @stable ICU 2.0 */ +#define U_SHAPE_DIGITS_NOOP 0 + +/** + * Digit shaping option: + * Replace European digits (U+0030...) by Arabic-Indic digits. + * @stable ICU 2.0 + */ +#define U_SHAPE_DIGITS_EN2AN 0x20 + +/** + * Digit shaping option: + * Replace Arabic-Indic digits by European digits (U+0030...). + * @stable ICU 2.0 + */ +#define U_SHAPE_DIGITS_AN2EN 0x40 + +/** + * Digit shaping option: + * Replace European digits (U+0030...) by Arabic-Indic digits if the most recent + * strongly directional character is an Arabic letter + * (<code>u_charDirection()</code> result <code>U_RIGHT_TO_LEFT_ARABIC</code> [AL]).<br> + * The direction of "preceding" depends on the direction indicator option. + * For the first characters, the preceding strongly directional character + * (initial state) is assumed to be not an Arabic letter + * (it is <code>U_LEFT_TO_RIGHT</code> [L] or <code>U_RIGHT_TO_LEFT</code> [R]). + * @stable ICU 2.0 + */ +#define U_SHAPE_DIGITS_ALEN2AN_INIT_LR 0x60 + +/** + * Digit shaping option: + * Replace European digits (U+0030...) by Arabic-Indic digits if the most recent + * strongly directional character is an Arabic letter + * (<code>u_charDirection()</code> result <code>U_RIGHT_TO_LEFT_ARABIC</code> [AL]).<br> + * The direction of "preceding" depends on the direction indicator option. + * For the first characters, the preceding strongly directional character + * (initial state) is assumed to be an Arabic letter. + * @stable ICU 2.0 + */ +#define U_SHAPE_DIGITS_ALEN2AN_INIT_AL 0x80 + +/** Not a valid option value. May be replaced by a new option. @stable ICU 2.0 */ +#define U_SHAPE_DIGITS_RESERVED 0xa0 + +/** Bit mask for digit shaping options. @stable ICU 2.0 */ +#define U_SHAPE_DIGITS_MASK 0xe0 + + +/** Digit type option: Use Arabic-Indic digits (U+0660...U+0669). @stable ICU 2.0 */ +#define U_SHAPE_DIGIT_TYPE_AN 0 + +/** Digit type option: Use Eastern (Extended) Arabic-Indic digits (U+06f0...U+06f9). @stable ICU 2.0 */ +#define U_SHAPE_DIGIT_TYPE_AN_EXTENDED 0x100 + +/** Not a valid option value. May be replaced by a new option. @stable ICU 2.0 */ +#define U_SHAPE_DIGIT_TYPE_RESERVED 0x200 + +/** Bit mask for digit type options. @stable ICU 2.0 */ +#define U_SHAPE_DIGIT_TYPE_MASK 0x300 /* I need to change this from 0x3f00 to 0x300 */ + +/** + * Tashkeel aggregation option: + * Replaces any combination of U+0651 with one of + * U+064C, U+064D, U+064E, U+064F, U+0650 with + * U+FC5E, U+FC5F, U+FC60, U+FC61, U+FC62 consecutively. + * @stable ICU 3.6 + */ +#define U_SHAPE_AGGREGATE_TASHKEEL 0x4000 +/** Tashkeel aggregation option: do not aggregate tashkeels. @stable ICU 3.6 */ +#define U_SHAPE_AGGREGATE_TASHKEEL_NOOP 0 +/** Bit mask for tashkeel aggregation. @stable ICU 3.6 */ +#define U_SHAPE_AGGREGATE_TASHKEEL_MASK 0x4000 + +/** + * Presentation form option: + * Don't replace Arabic Presentation Forms-A and Arabic Presentation Forms-B + * characters with 0+06xx characters, before shaping. + * @stable ICU 3.6 + */ +#define U_SHAPE_PRESERVE_PRESENTATION 0x8000 +/** Presentation form option: + * Replace Arabic Presentation Forms-A and Arabic Presentationo Forms-B with + * their unshaped correspondants in range 0+06xx, before shaping. + * @stable ICU 3.6 + */ +#define U_SHAPE_PRESERVE_PRESENTATION_NOOP 0 +/** Bit mask for preserve presentation form. @stable ICU 3.6 */ +#define U_SHAPE_PRESERVE_PRESENTATION_MASK 0x8000 + +/* Seen Tail option */ +/** + * Memory option: the result must have the same length as the source. + * Shaping mode: The SEEN family character will expand into two characters using space near + * the SEEN family character(i.e. the space after the character). + * If there are no spaces found, an error U_NO_SPACE_AVAILABLE (as defined in utypes.h) + * will be set in pErrorCode + * + * De-shaping mode: Any Seen character followed by Tail character will be + * replaced by one cell Seen and a space will replace the Tail. + * Affects: Seen options + * @stable ICU 4.2 + */ +#define U_SHAPE_SEEN_TWOCELL_NEAR 0x200000 + +/** + * Bit mask for Seen memory options. + * @stable ICU 4.2 + */ +#define U_SHAPE_SEEN_MASK 0x700000 + +/* YehHamza option */ +/** + * Memory option: the result must have the same length as the source. + * Shaping mode: The YEHHAMZA character will expand into two characters using space near it + * (i.e. the space after the character + * If there are no spaces found, an error U_NO_SPACE_AVAILABLE (as defined in utypes.h) + * will be set in pErrorCode + * + * De-shaping mode: Any Yeh (final or isolated) character followed by Hamza character will be + * replaced by one cell YehHamza and space will replace the Hamza. + * Affects: YehHamza options + * @stable ICU 4.2 + */ +#define U_SHAPE_YEHHAMZA_TWOCELL_NEAR 0x1000000 + + +/** + * Bit mask for YehHamza memory options. + * @stable ICU 4.2 + */ +#define U_SHAPE_YEHHAMZA_MASK 0x3800000 + +/* New Tashkeel options */ +/** + * Memory option: the result must have the same length as the source. + * Shaping mode: Tashkeel characters will be replaced by spaces. + * Spaces will be placed at beginning of the buffer + * + * De-shaping mode: N/A + * Affects: Tashkeel options + * @stable ICU 4.2 + */ +#define U_SHAPE_TASHKEEL_BEGIN 0x40000 + +/** + * Memory option: the result must have the same length as the source. + * Shaping mode: Tashkeel characters will be replaced by spaces. + * Spaces will be placed at end of the buffer + * + * De-shaping mode: N/A + * Affects: Tashkeel options + * @stable ICU 4.2 + */ +#define U_SHAPE_TASHKEEL_END 0x60000 + +/** + * Memory option: allow the result to have a different length than the source. + * Shaping mode: Tashkeel characters will be removed, buffer length will shrink. + * De-shaping mode: N/A + * + * Affect: Tashkeel options + * @stable ICU 4.2 + */ +#define U_SHAPE_TASHKEEL_RESIZE 0x80000 + +/** + * Memory option: the result must have the same length as the source. + * Shaping mode: Tashkeel characters will be replaced by Tatweel if it is connected to adjacent + * characters (i.e. shaped on Tatweel) or replaced by space if it is not connected. + * + * De-shaping mode: N/A + * Affects: YehHamza options + * @stable ICU 4.2 + */ +#define U_SHAPE_TASHKEEL_REPLACE_BY_TATWEEL 0xC0000 + +/** + * Bit mask for Tashkeel replacement with Space or Tatweel memory options. + * @stable ICU 4.2 + */ +#define U_SHAPE_TASHKEEL_MASK 0xE0000 + + +/* Space location Control options */ +/** + * This option affect the meaning of BEGIN and END options. if this option is not used the default + * for BEGIN and END will be as following: + * The Default (for both Visual LTR, Visual RTL and Logical Text) + * 1. BEGIN always refers to the start address of physical memory. + * 2. END always refers to the end address of physical memory. + * + * If this option is used it will swap the meaning of BEGIN and END only for Visual LTR text. + * + * The effect on BEGIN and END Memory Options will be as following: + * A. BEGIN For Visual LTR text: This will be the beginning (right side) of the visual text( + * corresponding to the physical memory address end for Visual LTR text, Same as END in + * default behavior) + * B. BEGIN For Logical text: Same as BEGIN in default behavior. + * C. END For Visual LTR text: This will be the end (left side) of the visual text (corresponding + * to the physical memory address beginning for Visual LTR text, Same as BEGIN in default behavior. + * D. END For Logical text: Same as END in default behavior). + * Affects: All LamAlef BEGIN, END and AUTO options. + * @stable ICU 4.2 + */ +#define U_SHAPE_SPACES_RELATIVE_TO_TEXT_BEGIN_END 0x4000000 + +/** + * Bit mask for swapping BEGIN and END for Visual LTR text + * @stable ICU 4.2 + */ +#define U_SHAPE_SPACES_RELATIVE_TO_TEXT_MASK 0x4000000 + +/** + * If this option is used, shaping will use the new Unicode code point for TAIL (i.e. 0xFE73). + * If this option is not specified (Default), old unofficial Unicode TAIL code point is used (i.e. 0x200B) + * De-shaping will not use this option as it will always search for both the new Unicode code point for the + * TAIL (i.e. 0xFE73) or the old unofficial Unicode TAIL code point (i.e. 0x200B) and de-shape the + * Seen-Family letter accordingly. + * + * Shaping Mode: Only shaping. + * De-shaping Mode: N/A. + * Affects: All Seen options + * @stable ICU 4.8 + */ +#define U_SHAPE_TAIL_NEW_UNICODE 0x8000000 + +/** + * Bit mask for new Unicode Tail option + * @stable ICU 4.8 + */ +#define U_SHAPE_TAIL_TYPE_MASK 0x8000000 + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uspoof.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uspoof.h new file mode 100755 index 00000000..9fcfcd3e --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uspoof.h @@ -0,0 +1,1576 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +*************************************************************************** +* Copyright (C) 2008-2016, International Business Machines Corporation +* and others. All Rights Reserved. +*************************************************************************** +* file name: uspoof.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2008Feb13 +* created by: Andy Heninger +* +* Unicode Spoof Detection +*/ + +#ifndef USPOOF_H +#define USPOOF_H + +#include "unicode/utypes.h" +#include "unicode/uset.h" +#include "unicode/parseerr.h" +#include "unicode/localpointer.h" + +#if !UCONFIG_NO_NORMALIZATION + + +#if U_SHOW_CPLUSPLUS_API +#include "unicode/unistr.h" +#include "unicode/uniset.h" +#endif + + +/** + * \file + * \brief Unicode Security and Spoofing Detection, C API. + * + * <p> + * This class, based on <a href="http://unicode.org/reports/tr36">Unicode Technical Report #36</a> and + * <a href="http://unicode.org/reports/tr39">Unicode Technical Standard #39</a>, has two main functions: + * + * <ol> + * <li>Checking whether two strings are visually <em>confusable</em> with each other, such as "Harvest" and + * "Ηarvest", where the second string starts with the Greek capital letter Eta.</li> + * <li>Checking whether an individual string is likely to be an attempt at confusing the reader (<em>spoof + * detection</em>), such as "paypal" with some Latin characters substituted with Cyrillic look-alikes.</li> + * </ol> + * + * <p> + * Although originally designed as a method for flagging suspicious identifier strings such as URLs, + * <code>USpoofChecker</code> has a number of other practical use cases, such as preventing attempts to evade bad-word + * content filters. + * + * <p> + * The functions of this class are exposed as C API, with a handful of syntactical conveniences for C++. + * + * <h2>Confusables</h2> + * + * <p> + * The following example shows how to use <code>USpoofChecker</code> to check for confusability between two strings: + * + * \code{.c} + * UErrorCode status = U_ZERO_ERROR; + * UChar* str1 = (UChar*) u"Harvest"; + * UChar* str2 = (UChar*) u"\u0397arvest"; // with U+0397 GREEK CAPITAL LETTER ETA + * + * USpoofChecker* sc = uspoof_open(&status); + * uspoof_setChecks(sc, USPOOF_CONFUSABLE, &status); + * + * int32_t bitmask = uspoof_areConfusable(sc, str1, -1, str2, -1, &status); + * UBool result = bitmask != 0; + * // areConfusable: 1 (status: U_ZERO_ERROR) + * printf("areConfusable: %d (status: %s)\n", result, u_errorName(status)); + * uspoof_close(sc); + * \endcode + * + * <p> + * The call to {@link uspoof_open} creates a <code>USpoofChecker</code> object; the call to {@link uspoof_setChecks} + * enables confusable checking and disables all other checks; the call to {@link uspoof_areConfusable} performs the + * confusability test; and the following line extracts the result out of the return value. For best performance, + * the instance should be created once (e.g., upon application startup), and the efficient + * {@link uspoof_areConfusable} method can be used at runtime. + * + * <p> + * The type {@link LocalUSpoofCheckerPointer} is exposed for C++ programmers. It will automatically call + * {@link uspoof_close} when the object goes out of scope: + * + * \code{.cpp} + * UErrorCode status = U_ZERO_ERROR; + * LocalUSpoofCheckerPointer sc(uspoof_open(&status)); + * uspoof_setChecks(sc.getAlias(), USPOOF_CONFUSABLE, &status); + * // ... + * \endcode + * + * <p> + * UTS 39 defines two strings to be <em>confusable</em> if they map to the same <em>skeleton string</em>. A skeleton can + * be thought of as a "hash code". {@link uspoof_getSkeleton} computes the skeleton for a particular string, so + * the following snippet is equivalent to the example above: + * + * \code{.c} + * UErrorCode status = U_ZERO_ERROR; + * UChar* str1 = (UChar*) u"Harvest"; + * UChar* str2 = (UChar*) u"\u0397arvest"; // with U+0397 GREEK CAPITAL LETTER ETA + * + * USpoofChecker* sc = uspoof_open(&status); + * uspoof_setChecks(sc, USPOOF_CONFUSABLE, &status); + * + * // Get skeleton 1 + * int32_t skel1Len = uspoof_getSkeleton(sc, 0, str1, -1, NULL, 0, &status); + * UChar* skel1 = (UChar*) malloc(++skel1Len * sizeof(UChar)); + * status = U_ZERO_ERROR; + * uspoof_getSkeleton(sc, 0, str1, -1, skel1, skel1Len, &status); + * + * // Get skeleton 2 + * int32_t skel2Len = uspoof_getSkeleton(sc, 0, str2, -1, NULL, 0, &status); + * UChar* skel2 = (UChar*) malloc(++skel2Len * sizeof(UChar)); + * status = U_ZERO_ERROR; + * uspoof_getSkeleton(sc, 0, str2, -1, skel2, skel2Len, &status); + * + * // Are the skeletons the same? + * UBool result = u_strcmp(skel1, skel2) == 0; + * // areConfusable: 1 (status: U_ZERO_ERROR) + * printf("areConfusable: %d (status: %s)\n", result, u_errorName(status)); + * uspoof_close(sc); + * free(skel1); + * free(skel2); + * \endcode + * + * <p> + * If you need to check if a string is confusable with any string in a dictionary of many strings, rather than calling + * {@link uspoof_areConfusable} many times in a loop, {@link uspoof_getSkeleton} can be used instead, as shown below: + * + * \code{.c} + * UErrorCode status = U_ZERO_ERROR; + * #define DICTIONARY_LENGTH 2 + * UChar* dictionary[DICTIONARY_LENGTH] = { (UChar*) u"lorem", (UChar*) u"ipsum" }; + * UChar* skeletons[DICTIONARY_LENGTH]; + * UChar* str = (UChar*) u"1orern"; + * + * // Setup: + * USpoofChecker* sc = uspoof_open(&status); + * uspoof_setChecks(sc, USPOOF_CONFUSABLE, &status); + * for (size_t i=0; i<DICTIONARY_LENGTH; i++) { + * UChar* word = dictionary[i]; + * int32_t len = uspoof_getSkeleton(sc, 0, word, -1, NULL, 0, &status); + * skeletons[i] = (UChar*) malloc(++len * sizeof(UChar)); + * status = U_ZERO_ERROR; + * uspoof_getSkeleton(sc, 0, word, -1, skeletons[i], len, &status); + * } + * + * // Live Check: + * { + * int32_t len = uspoof_getSkeleton(sc, 0, str, -1, NULL, 0, &status); + * UChar* skel = (UChar*) malloc(++len * sizeof(UChar)); + * status = U_ZERO_ERROR; + * uspoof_getSkeleton(sc, 0, str, -1, skel, len, &status); + * UBool result = FALSE; + * for (size_t i=0; i<DICTIONARY_LENGTH; i++) { + * result = u_strcmp(skel, skeletons[i]) == 0; + * if (result == TRUE) { break; } + * } + * // Has confusable in dictionary: 1 (status: U_ZERO_ERROR) + * printf("Has confusable in dictionary: %d (status: %s)\n", result, u_errorName(status)); + * free(skel); + * } + * + * for (size_t i=0; i<DICTIONARY_LENGTH; i++) { + * free(skeletons[i]); + * } + * uspoof_close(sc); + * \endcode + * + * <p> + * <b>Note:</b> Since the Unicode confusables mapping table is frequently updated, confusable skeletons are <em>not</em> + * guaranteed to be the same between ICU releases. We therefore recommend that you always compute confusable skeletons + * at runtime and do not rely on creating a permanent, or difficult to update, database of skeletons. + * + * <h2>Spoof Detection</h2> + * + * <p> + * The following snippet shows a minimal example of using <code>USpoofChecker</code> to perform spoof detection on a + * string: + * + * \code{.c} + * UErrorCode status = U_ZERO_ERROR; + * UChar* str = (UChar*) u"p\u0430ypal"; // with U+0430 CYRILLIC SMALL LETTER A + * + * // Get the default set of allowable characters: + * USet* allowed = uset_openEmpty(); + * uset_addAll(allowed, uspoof_getRecommendedSet(&status)); + * uset_addAll(allowed, uspoof_getInclusionSet(&status)); + * + * USpoofChecker* sc = uspoof_open(&status); + * uspoof_setAllowedChars(sc, allowed, &status); + * uspoof_setRestrictionLevel(sc, USPOOF_MODERATELY_RESTRICTIVE); + * + * int32_t bitmask = uspoof_check(sc, str, -1, NULL, &status); + * UBool result = bitmask != 0; + * // fails checks: 1 (status: U_ZERO_ERROR) + * printf("fails checks: %d (status: %s)\n", result, u_errorName(status)); + * uspoof_close(sc); + * uset_close(allowed); + * \endcode + * + * <p> + * As in the case for confusability checking, it is good practice to create one <code>USpoofChecker</code> instance at + * startup, and call the cheaper {@link uspoof_check} online. We specify the set of + * allowed characters to be those with type RECOMMENDED or INCLUSION, according to the recommendation in UTS 39. + * + * <p> + * In addition to {@link uspoof_check}, the function {@link uspoof_checkUTF8} is exposed for UTF8-encoded char* strings, + * and {@link uspoof_checkUnicodeString} is exposed for C++ programmers. + * + * <p> + * If the {@link USPOOF_AUX_INFO} check is enabled, a limited amount of information on why a string failed the checks + * is available in the returned bitmask. For complete information, use the {@link uspoof_check2} class of functions + * with a {@link USpoofCheckResult} parameter: + * + * \code{.c} + * UErrorCode status = U_ZERO_ERROR; + * UChar* str = (UChar*) u"p\u0430ypal"; // with U+0430 CYRILLIC SMALL LETTER A + * + * // Get the default set of allowable characters: + * USet* allowed = uset_openEmpty(); + * uset_addAll(allowed, uspoof_getRecommendedSet(&status)); + * uset_addAll(allowed, uspoof_getInclusionSet(&status)); + * + * USpoofChecker* sc = uspoof_open(&status); + * uspoof_setAllowedChars(sc, allowed, &status); + * uspoof_setRestrictionLevel(sc, USPOOF_MODERATELY_RESTRICTIVE); + * + * USpoofCheckResult* checkResult = uspoof_openCheckResult(&status); + * int32_t bitmask = uspoof_check2(sc, str, -1, checkResult, &status); + * + * int32_t failures1 = bitmask; + * int32_t failures2 = uspoof_getCheckResultChecks(checkResult, &status); + * assert(failures1 == failures2); + * // checks that failed: 0x00000010 (status: U_ZERO_ERROR) + * printf("checks that failed: %#010x (status: %s)\n", failures1, u_errorName(status)); + * + * // Cleanup: + * uspoof_close(sc); + * uset_close(allowed); + * uspoof_closeCheckResult(checkResult); + * \endcode + * + * C++ users can take advantage of a few syntactical conveniences. The following snippet is functionally + * equivalent to the one above: + * + * \code{.cpp} + * UErrorCode status = U_ZERO_ERROR; + * UnicodeString str((UChar*) u"p\u0430ypal"); // with U+0430 CYRILLIC SMALL LETTER A + * + * // Get the default set of allowable characters: + * UnicodeSet allowed; + * allowed.addAll(*uspoof_getRecommendedUnicodeSet(&status)); + * allowed.addAll(*uspoof_getInclusionUnicodeSet(&status)); + * + * LocalUSpoofCheckerPointer sc(uspoof_open(&status)); + * uspoof_setAllowedChars(sc.getAlias(), allowed.toUSet(), &status); + * uspoof_setRestrictionLevel(sc.getAlias(), USPOOF_MODERATELY_RESTRICTIVE); + * + * LocalUSpoofCheckResultPointer checkResult(uspoof_openCheckResult(&status)); + * int32_t bitmask = uspoof_check2UnicodeString(sc.getAlias(), str, checkResult.getAlias(), &status); + * + * int32_t failures1 = bitmask; + * int32_t failures2 = uspoof_getCheckResultChecks(checkResult.getAlias(), &status); + * assert(failures1 == failures2); + * // checks that failed: 0x00000010 (status: U_ZERO_ERROR) + * printf("checks that failed: %#010x (status: %s)\n", failures1, u_errorName(status)); + * + * // Explicit cleanup not necessary. + * \endcode + * + * <p> + * The return value is a bitmask of the checks that failed. In this case, there was one check that failed: + * {@link USPOOF_RESTRICTION_LEVEL}, corresponding to the fifth bit (16). The possible checks are: + * + * <ul> + * <li><code>RESTRICTION_LEVEL</code>: flags strings that violate the + * <a href="http://unicode.org/reports/tr39/#Restriction_Level_Detection">Restriction Level</a> test as specified in UTS + * 39; in most cases, this means flagging strings that contain characters from multiple different scripts.</li> + * <li><code>INVISIBLE</code>: flags strings that contain invisible characters, such as zero-width spaces, or character + * sequences that are likely not to display, such as multiple occurrences of the same non-spacing mark.</li> + * <li><code>CHAR_LIMIT</code>: flags strings that contain characters outside of a specified set of acceptable + * characters. See {@link uspoof_setAllowedChars} and {@link uspoof_setAllowedLocales}.</li> + * <li><code>MIXED_NUMBERS</code>: flags strings that contain digits from multiple different numbering systems.</li> + * </ul> + * + * <p> + * These checks can be enabled independently of each other. For example, if you were interested in checking for only the + * INVISIBLE and MIXED_NUMBERS conditions, you could do: + * + * \code{.c} + * UErrorCode status = U_ZERO_ERROR; + * UChar* str = (UChar*) u"8\u09EA"; // 8 mixed with U+09EA BENGALI DIGIT FOUR + * + * USpoofChecker* sc = uspoof_open(&status); + * uspoof_setChecks(sc, USPOOF_INVISIBLE | USPOOF_MIXED_NUMBERS, &status); + * + * int32_t bitmask = uspoof_check2(sc, str, -1, NULL, &status); + * UBool result = bitmask != 0; + * // fails checks: 1 (status: U_ZERO_ERROR) + * printf("fails checks: %d (status: %s)\n", result, u_errorName(status)); + * uspoof_close(sc); + * \endcode + * + * <p> + * Here is an example in C++ showing how to compute the restriction level of a string: + * + * \code{.cpp} + * UErrorCode status = U_ZERO_ERROR; + * UnicodeString str((UChar*) u"p\u0430ypal"); // with U+0430 CYRILLIC SMALL LETTER A + * + * // Get the default set of allowable characters: + * UnicodeSet allowed; + * allowed.addAll(*uspoof_getRecommendedUnicodeSet(&status)); + * allowed.addAll(*uspoof_getInclusionUnicodeSet(&status)); + * + * LocalUSpoofCheckerPointer sc(uspoof_open(&status)); + * uspoof_setAllowedChars(sc.getAlias(), allowed.toUSet(), &status); + * uspoof_setRestrictionLevel(sc.getAlias(), USPOOF_MODERATELY_RESTRICTIVE); + * uspoof_setChecks(sc.getAlias(), USPOOF_RESTRICTION_LEVEL | USPOOF_AUX_INFO, &status); + * + * LocalUSpoofCheckResultPointer checkResult(uspoof_openCheckResult(&status)); + * int32_t bitmask = uspoof_check2UnicodeString(sc.getAlias(), str, checkResult.getAlias(), &status); + * + * URestrictionLevel restrictionLevel = uspoof_getCheckResultRestrictionLevel(checkResult.getAlias(), &status); + * // Since USPOOF_AUX_INFO was enabled, the restriction level is also available in the upper bits of the bitmask: + * assert((restrictionLevel & bitmask) == restrictionLevel); + * // Restriction level: 0x50000000 (status: U_ZERO_ERROR) + * printf("Restriction level: %#010x (status: %s)\n", restrictionLevel, u_errorName(status)); + * \endcode + * + * <p> + * The code '0x50000000' corresponds to the restriction level USPOOF_MINIMALLY_RESTRICTIVE. Since + * USPOOF_MINIMALLY_RESTRICTIVE is weaker than USPOOF_MODERATELY_RESTRICTIVE, the string fails the check. + * + * <p> + * <b>Note:</b> The Restriction Level is the most powerful of the checks. The full logic is documented in + * <a href="http://unicode.org/reports/tr39/#Restriction_Level_Detection">UTS 39</a>, but the basic idea is that strings + * are restricted to contain characters from only a single script, <em>except</em> that most scripts are allowed to have + * Latin characters interspersed. Although the default restriction level is <code>HIGHLY_RESTRICTIVE</code>, it is + * recommended that users set their restriction level to <code>MODERATELY_RESTRICTIVE</code>, which allows Latin mixed + * with all other scripts except Cyrillic, Greek, and Cherokee, with which it is often confusable. For more details on + * the levels, see UTS 39 or {@link URestrictionLevel}. The Restriction Level test is aware of the set of + * allowed characters set in {@link uspoof_setAllowedChars}. Note that characters which have script code + * COMMON or INHERITED, such as numbers and punctuation, are ignored when computing whether a string has multiple + * scripts. + * + * <h2>Additional Information</h2> + * + * <p> + * A <code>USpoofChecker</code> instance may be used repeatedly to perform checks on any number of identifiers. + * + * <p> + * <b>Thread Safety:</b> The test functions for checking a single identifier, or for testing whether + * two identifiers are possible confusable, are thread safe. They may called concurrently, from multiple threads, + * using the same USpoofChecker instance. + * + * <p> + * More generally, the standard ICU thread safety rules apply: functions that take a const USpoofChecker parameter are + * thread safe. Those that take a non-const USpoofChecker are not thread safe.. + * + * @stable ICU 4.6 + */ + +struct USpoofChecker; +/** + * @stable ICU 4.2 + */ +typedef struct USpoofChecker USpoofChecker; /**< typedef for C of USpoofChecker */ + +struct USpoofCheckResult; +/** + * @see uspoof_openCheckResult + * @stable ICU 58 + */ +typedef struct USpoofCheckResult USpoofCheckResult; + +/** + * Enum for the kinds of checks that USpoofChecker can perform. + * These enum values are used both to select the set of checks that + * will be performed, and to report results from the check function. + * + * @stable ICU 4.2 + */ +typedef enum USpoofChecks { + /** + * When performing the two-string {@link uspoof_areConfusable} test, this flag in the return value indicates + * that the two strings are visually confusable and that they are from the same script, according to UTS 39 section + * 4. + * + * @see uspoof_areConfusable + * @stable ICU 4.2 + */ + USPOOF_SINGLE_SCRIPT_CONFUSABLE = 1, + + /** + * When performing the two-string {@link uspoof_areConfusable} test, this flag in the return value indicates + * that the two strings are visually confusable and that they are <b>not</b> from the same script, according to UTS + * 39 section 4. + * + * @see uspoof_areConfusable + * @stable ICU 4.2 + */ + USPOOF_MIXED_SCRIPT_CONFUSABLE = 2, + + /** + * When performing the two-string {@link uspoof_areConfusable} test, this flag in the return value indicates + * that the two strings are visually confusable and that they are not from the same script but both of them are + * single-script strings, according to UTS 39 section 4. + * + * @see uspoof_areConfusable + * @stable ICU 4.2 + */ + USPOOF_WHOLE_SCRIPT_CONFUSABLE = 4, + + /** + * Enable this flag in {@link uspoof_setChecks} to turn on all types of confusables. You may set + * the checks to some subset of SINGLE_SCRIPT_CONFUSABLE, MIXED_SCRIPT_CONFUSABLE, or WHOLE_SCRIPT_CONFUSABLE to + * make {@link uspoof_areConfusable} return only those types of confusables. + * + * @see uspoof_areConfusable + * @see uspoof_getSkeleton + * @stable ICU 58 + */ + USPOOF_CONFUSABLE = USPOOF_SINGLE_SCRIPT_CONFUSABLE | USPOOF_MIXED_SCRIPT_CONFUSABLE | USPOOF_WHOLE_SCRIPT_CONFUSABLE, + +#ifndef U_HIDE_DEPRECATED_API + /** + * This flag is deprecated and no longer affects the behavior of SpoofChecker. + * + * @deprecated ICU 58 Any case confusable mappings were removed from UTS 39; the corresponding ICU API was deprecated. + */ + USPOOF_ANY_CASE = 8, +#endif /* U_HIDE_DEPRECATED_API */ + + /** + * Check that an identifier is no looser than the specified RestrictionLevel. + * The default if {@link uspoof_setRestrictionLevel} is not called is HIGHLY_RESTRICTIVE. + * + * If USPOOF_AUX_INFO is enabled the actual restriction level of the + * identifier being tested will also be returned by uspoof_check(). + * + * @see URestrictionLevel + * @see uspoof_setRestrictionLevel + * @see USPOOF_AUX_INFO + * + * @stable ICU 51 + */ + USPOOF_RESTRICTION_LEVEL = 16, + +#ifndef U_HIDE_DEPRECATED_API + /** Check that an identifier contains only characters from a + * single script (plus chars from the common and inherited scripts.) + * Applies to checks of a single identifier check only. + * @deprecated ICU 51 Use RESTRICTION_LEVEL instead. + */ + USPOOF_SINGLE_SCRIPT = USPOOF_RESTRICTION_LEVEL, +#endif /* U_HIDE_DEPRECATED_API */ + + /** Check an identifier for the presence of invisible characters, + * such as zero-width spaces, or character sequences that are + * likely not to display, such as multiple occurrences of the same + * non-spacing mark. This check does not test the input string as a whole + * for conformance to any particular syntax for identifiers. + */ + USPOOF_INVISIBLE = 32, + + /** Check that an identifier contains only characters from a specified set + * of acceptable characters. See {@link uspoof_setAllowedChars} and + * {@link uspoof_setAllowedLocales}. Note that a string that fails this check + * will also fail the {@link USPOOF_RESTRICTION_LEVEL} check. + */ + USPOOF_CHAR_LIMIT = 64, + + /** + * Check that an identifier does not mix numbers from different numbering systems. + * For more information, see UTS 39 section 5.3. + * + * @stable ICU 51 + */ + USPOOF_MIXED_NUMBERS = 128, + + /** + * Enable all spoof checks. + * + * @stable ICU 4.6 + */ + USPOOF_ALL_CHECKS = 0xFFFF, + + /** + * Enable the return of auxillary (non-error) information in the + * upper bits of the check results value. + * + * If this "check" is not enabled, the results of {@link uspoof_check} will be + * zero when an identifier passes all of the enabled checks. + * + * If this "check" is enabled, (uspoof_check() & {@link USPOOF_ALL_CHECKS}) will + * be zero when an identifier passes all checks. + * + * @stable ICU 51 + */ + USPOOF_AUX_INFO = 0x40000000 + + } USpoofChecks; + + + /** + * Constants from UAX #39 for use in {@link uspoof_setRestrictionLevel}, and + * for returned identifier restriction levels in check results. + * + * @stable ICU 51 + * + * @see uspoof_setRestrictionLevel + * @see uspoof_check + */ + typedef enum URestrictionLevel { + /** + * All characters in the string are in the identifier profile and all characters in the string are in the + * ASCII range. + * + * @stable ICU 51 + */ + USPOOF_ASCII = 0x10000000, + /** + * The string classifies as ASCII-Only, or all characters in the string are in the identifier profile and + * the string is single-script, according to the definition in UTS 39 section 5.1. + * + * @stable ICU 53 + */ + USPOOF_SINGLE_SCRIPT_RESTRICTIVE = 0x20000000, + /** + * The string classifies as Single Script, or all characters in the string are in the identifier profile and + * the string is covered by any of the following sets of scripts, according to the definition in UTS 39 + * section 5.1: + * <ul> + * <li>Latin + Han + Bopomofo (or equivalently: Latn + Hanb)</li> + * <li>Latin + Han + Hiragana + Katakana (or equivalently: Latn + Jpan)</li> + * <li>Latin + Han + Hangul (or equivalently: Latn +Kore)</li> + * </ul> + * This is the default restriction in ICU. + * + * @stable ICU 51 + */ + USPOOF_HIGHLY_RESTRICTIVE = 0x30000000, + /** + * The string classifies as Highly Restrictive, or all characters in the string are in the identifier profile + * and the string is covered by Latin and any one other Recommended or Aspirational script, except Cyrillic, + * Greek, and Cherokee. + * + * @stable ICU 51 + */ + USPOOF_MODERATELY_RESTRICTIVE = 0x40000000, + /** + * All characters in the string are in the identifier profile. Allow arbitrary mixtures of scripts. + * + * @stable ICU 51 + */ + USPOOF_MINIMALLY_RESTRICTIVE = 0x50000000, + /** + * Any valid identifiers, including characters outside of the Identifier Profile. + * + * @stable ICU 51 + */ + USPOOF_UNRESTRICTIVE = 0x60000000, + /** + * Mask for selecting the Restriction Level bits from the return value of {@link uspoof_check}. + * + * @stable ICU 53 + */ + USPOOF_RESTRICTION_LEVEL_MASK = 0x7F000000, +#ifndef U_HIDE_INTERNAL_API + /** + * An undefined restriction level. + * @internal + */ + USPOOF_UNDEFINED_RESTRICTIVE = -1 +#endif /* U_HIDE_INTERNAL_API */ + } URestrictionLevel; + +/** + * Create a Unicode Spoof Checker, configured to perform all + * checks except for USPOOF_LOCALE_LIMIT and USPOOF_CHAR_LIMIT. + * Note that additional checks may be added in the future, + * resulting in the changes to the default checking behavior. + * + * @param status The error code, set if this function encounters a problem. + * @return the newly created Spoof Checker + * @stable ICU 4.2 + */ +U_STABLE USpoofChecker * U_EXPORT2 +uspoof_open(UErrorCode *status); + + +/** + * Open a Spoof checker from its serialized form, stored in 32-bit-aligned memory. + * Inverse of uspoof_serialize(). + * The memory containing the serialized data must remain valid and unchanged + * as long as the spoof checker, or any cloned copies of the spoof checker, + * are in use. Ownership of the memory remains with the caller. + * The spoof checker (and any clones) must be closed prior to deleting the + * serialized data. + * + * @param data a pointer to 32-bit-aligned memory containing the serialized form of spoof data + * @param length the number of bytes available at data; + * can be more than necessary + * @param pActualLength receives the actual number of bytes at data taken up by the data; + * can be NULL + * @param pErrorCode ICU error code + * @return the spoof checker. + * + * @see uspoof_open + * @see uspoof_serialize + * @stable ICU 4.2 + */ +U_STABLE USpoofChecker * U_EXPORT2 +uspoof_openFromSerialized(const void *data, int32_t length, int32_t *pActualLength, + UErrorCode *pErrorCode); + +/** + * Open a Spoof Checker from the source form of the spoof data. + * The input corresponds to the Unicode data file confusables.txt + * as described in Unicode UAX #39. The syntax of the source data + * is as described in UAX #39 for this file, and the content of + * this file is acceptable input. + * + * The character encoding of the (char *) input text is UTF-8. + * + * @param confusables a pointer to the confusable characters definitions, + * as found in file confusables.txt from unicode.org. + * @param confusablesLen The length of the confusables text, or -1 if the + * input string is zero terminated. + * @param confusablesWholeScript + * Deprecated in ICU 58. No longer used. + * @param confusablesWholeScriptLen + * Deprecated in ICU 58. No longer used. + * @param errType In the event of an error in the input, indicates + * which of the input files contains the error. + * The value is one of USPOOF_SINGLE_SCRIPT_CONFUSABLE or + * USPOOF_WHOLE_SCRIPT_CONFUSABLE, or + * zero if no errors are found. + * @param pe In the event of an error in the input, receives the position + * in the input text (line, offset) of the error. + * @param status an in/out ICU UErrorCode. Among the possible errors is + * U_PARSE_ERROR, which is used to report syntax errors + * in the input. + * @return A spoof checker that uses the rules from the input files. + * @stable ICU 4.2 + */ +U_STABLE USpoofChecker * U_EXPORT2 +uspoof_openFromSource(const char *confusables, int32_t confusablesLen, + const char *confusablesWholeScript, int32_t confusablesWholeScriptLen, + int32_t *errType, UParseError *pe, UErrorCode *status); + + +/** + * Close a Spoof Checker, freeing any memory that was being held by + * its implementation. + * @stable ICU 4.2 + */ +U_STABLE void U_EXPORT2 +uspoof_close(USpoofChecker *sc); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUSpoofCheckerPointer + * "Smart pointer" class, closes a USpoofChecker via uspoof_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUSpoofCheckerPointer, USpoofChecker, uspoof_close); + +U_NAMESPACE_END + +#endif + +/** + * Clone a Spoof Checker. The clone will be set to perform the same checks + * as the original source. + * + * @param sc The source USpoofChecker + * @param status The error code, set if this function encounters a problem. + * @return + * @stable ICU 4.2 + */ +U_STABLE USpoofChecker * U_EXPORT2 +uspoof_clone(const USpoofChecker *sc, UErrorCode *status); + + +/** + * Specify the bitmask of checks that will be performed by {@link uspoof_check}. Calling this method + * overwrites any checks that may have already been enabled. By default, all checks are enabled. + * + * To enable specific checks and disable all others, the "whitelisted" checks should be ORed together. For + * example, to fail strings containing characters outside of the set specified by {@link uspoof_setAllowedChars} and + * also strings that contain digits from mixed numbering systems: + * + * <pre> + * {@code + * uspoof_setChecks(USPOOF_CHAR_LIMIT | USPOOF_MIXED_NUMBERS); + * } + * </pre> + * + * To disable specific checks and enable all others, the "blacklisted" checks should be ANDed away from + * ALL_CHECKS. For example, if you are not planning to use the {@link uspoof_areConfusable} functionality, + * it is good practice to disable the CONFUSABLE check: + * + * <pre> + * {@code + * uspoof_setChecks(USPOOF_ALL_CHECKS & ~USPOOF_CONFUSABLE); + * } + * </pre> + * + * Note that methods such as {@link uspoof_setAllowedChars}, {@link uspoof_setAllowedLocales}, and + * {@link uspoof_setRestrictionLevel} will enable certain checks when called. Those methods will OR the check they + * enable onto the existing bitmask specified by this method. For more details, see the documentation of those + * methods. + * + * @param sc The USpoofChecker + * @param checks The set of checks that this spoof checker will perform. + * The value is a bit set, obtained by OR-ing together + * values from enum USpoofChecks. + * @param status The error code, set if this function encounters a problem. + * @stable ICU 4.2 + * + */ +U_STABLE void U_EXPORT2 +uspoof_setChecks(USpoofChecker *sc, int32_t checks, UErrorCode *status); + +/** + * Get the set of checks that this Spoof Checker has been configured to perform. + * + * @param sc The USpoofChecker + * @param status The error code, set if this function encounters a problem. + * @return The set of checks that this spoof checker will perform. + * The value is a bit set, obtained by OR-ing together + * values from enum USpoofChecks. + * @stable ICU 4.2 + * + */ +U_STABLE int32_t U_EXPORT2 +uspoof_getChecks(const USpoofChecker *sc, UErrorCode *status); + +/** + * Set the loosest restriction level allowed for strings. The default if this is not called is + * {@link USPOOF_HIGHLY_RESTRICTIVE}. Calling this method enables the {@link USPOOF_RESTRICTION_LEVEL} and + * {@link USPOOF_MIXED_NUMBERS} checks, corresponding to Sections 5.1 and 5.2 of UTS 39. To customize which checks are + * to be performed by {@link uspoof_check}, see {@link uspoof_setChecks}. + * + * @param sc The USpoofChecker + * @param restrictionLevel The loosest restriction level allowed. + * @see URestrictionLevel + * @stable ICU 51 + */ +U_STABLE void U_EXPORT2 +uspoof_setRestrictionLevel(USpoofChecker *sc, URestrictionLevel restrictionLevel); + + +/** + * Get the Restriction Level that will be tested if the checks include {@link USPOOF_RESTRICTION_LEVEL}. + * + * @return The restriction level + * @see URestrictionLevel + * @stable ICU 51 + */ +U_STABLE URestrictionLevel U_EXPORT2 +uspoof_getRestrictionLevel(const USpoofChecker *sc); + +/** + * Limit characters that are acceptable in identifiers being checked to those + * normally used with the languages associated with the specified locales. + * Any previously specified list of locales is replaced by the new settings. + * + * A set of languages is determined from the locale(s), and + * from those a set of acceptable Unicode scripts is determined. + * Characters from this set of scripts, along with characters from + * the "common" and "inherited" Unicode Script categories + * will be permitted. + * + * Supplying an empty string removes all restrictions; + * characters from any script will be allowed. + * + * The {@link USPOOF_CHAR_LIMIT} test is automatically enabled for this + * USpoofChecker when calling this function with a non-empty list + * of locales. + * + * The Unicode Set of characters that will be allowed is accessible + * via the uspoof_getAllowedChars() function. uspoof_setAllowedLocales() + * will <i>replace</i> any previously applied set of allowed characters. + * + * Adjustments, such as additions or deletions of certain classes of characters, + * can be made to the result of uspoof_setAllowedLocales() by + * fetching the resulting set with uspoof_getAllowedChars(), + * manipulating it with the Unicode Set API, then resetting the + * spoof detectors limits with uspoof_setAllowedChars(). + * + * @param sc The USpoofChecker + * @param localesList A list list of locales, from which the language + * and associated script are extracted. The locales + * are comma-separated if there is more than one. + * White space may not appear within an individual locale, + * but is ignored otherwise. + * The locales are syntactically like those from the + * HTTP Accept-Language header. + * If the localesList is empty, no restrictions will be placed on + * the allowed characters. + * + * @param status The error code, set if this function encounters a problem. + * @stable ICU 4.2 + */ +U_STABLE void U_EXPORT2 +uspoof_setAllowedLocales(USpoofChecker *sc, const char *localesList, UErrorCode *status); + +/** + * Get a list of locales for the scripts that are acceptable in strings + * to be checked. If no limitations on scripts have been specified, + * an empty string will be returned. + * + * uspoof_setAllowedChars() will reset the list of allowed to be empty. + * + * The format of the returned list is the same as that supplied to + * uspoof_setAllowedLocales(), but returned list may not be identical + * to the originally specified string; the string may be reformatted, + * and information other than languages from + * the originally specified locales may be omitted. + * + * @param sc The USpoofChecker + * @param status The error code, set if this function encounters a problem. + * @return A string containing a list of locales corresponding + * to the acceptable scripts, formatted like an + * HTTP Accept Language value. + * + * @stable ICU 4.2 + */ +U_STABLE const char * U_EXPORT2 +uspoof_getAllowedLocales(USpoofChecker *sc, UErrorCode *status); + + +/** + * Limit the acceptable characters to those specified by a Unicode Set. + * Any previously specified character limit is + * is replaced by the new settings. This includes limits on + * characters that were set with the uspoof_setAllowedLocales() function. + * + * The USPOOF_CHAR_LIMIT test is automatically enabled for this + * USpoofChecker by this function. + * + * @param sc The USpoofChecker + * @param chars A Unicode Set containing the list of + * characters that are permitted. Ownership of the set + * remains with the caller. The incoming set is cloned by + * this function, so there are no restrictions on modifying + * or deleting the USet after calling this function. + * @param status The error code, set if this function encounters a problem. + * @stable ICU 4.2 + */ +U_STABLE void U_EXPORT2 +uspoof_setAllowedChars(USpoofChecker *sc, const USet *chars, UErrorCode *status); + + +/** + * Get a USet for the characters permitted in an identifier. + * This corresponds to the limits imposed by the Set Allowed Characters + * functions. Limitations imposed by other checks will not be + * reflected in the set returned by this function. + * + * The returned set will be frozen, meaning that it cannot be modified + * by the caller. + * + * Ownership of the returned set remains with the Spoof Detector. The + * returned set will become invalid if the spoof detector is closed, + * or if a new set of allowed characters is specified. + * + * + * @param sc The USpoofChecker + * @param status The error code, set if this function encounters a problem. + * @return A USet containing the characters that are permitted by + * the USPOOF_CHAR_LIMIT test. + * @stable ICU 4.2 + */ +U_STABLE const USet * U_EXPORT2 +uspoof_getAllowedChars(const USpoofChecker *sc, UErrorCode *status); + + +#if U_SHOW_CPLUSPLUS_API +/** + * Limit the acceptable characters to those specified by a Unicode Set. + * Any previously specified character limit is + * is replaced by the new settings. This includes limits on + * characters that were set with the uspoof_setAllowedLocales() function. + * + * The USPOOF_CHAR_LIMIT test is automatically enabled for this + * USoofChecker by this function. + * + * @param sc The USpoofChecker + * @param chars A Unicode Set containing the list of + * characters that are permitted. Ownership of the set + * remains with the caller. The incoming set is cloned by + * this function, so there are no restrictions on modifying + * or deleting the UnicodeSet after calling this function. + * @param status The error code, set if this function encounters a problem. + * @stable ICU 4.2 + */ +U_STABLE void U_EXPORT2 +uspoof_setAllowedUnicodeSet(USpoofChecker *sc, const icu::UnicodeSet *chars, UErrorCode *status); + + +/** + * Get a UnicodeSet for the characters permitted in an identifier. + * This corresponds to the limits imposed by the Set Allowed Characters / + * UnicodeSet functions. Limitations imposed by other checks will not be + * reflected in the set returned by this function. + * + * The returned set will be frozen, meaning that it cannot be modified + * by the caller. + * + * Ownership of the returned set remains with the Spoof Detector. The + * returned set will become invalid if the spoof detector is closed, + * or if a new set of allowed characters is specified. + * + * + * @param sc The USpoofChecker + * @param status The error code, set if this function encounters a problem. + * @return A UnicodeSet containing the characters that are permitted by + * the USPOOF_CHAR_LIMIT test. + * @stable ICU 4.2 + */ +U_STABLE const icu::UnicodeSet * U_EXPORT2 +uspoof_getAllowedUnicodeSet(const USpoofChecker *sc, UErrorCode *status); +#endif + + +/** + * Check the specified string for possible security issues. + * The text to be checked will typically be an identifier of some sort. + * The set of checks to be performed is specified with uspoof_setChecks(). + * + * \note + * Consider using the newer API, {@link uspoof_check2}, instead. + * The newer API exposes additional information from the check procedure + * and is otherwise identical to this method. + * + * @param sc The USpoofChecker + * @param id The identifier to be checked for possible security issues, + * in UTF-16 format. + * @param length the length of the string to be checked, expressed in + * 16 bit UTF-16 code units, or -1 if the string is + * zero terminated. + * @param position Deprecated in ICU 51. Always returns zero. + * Originally, an out parameter for the index of the first + * string position that failed a check. + * This parameter may be NULL. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * Spoofing or security issues detected with the input string are + * not reported here, but through the function's return value. + * @return An integer value with bits set for any potential security + * or spoofing issues detected. The bits are defined by + * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) + * will be zero if the input string passes all of the + * enabled checks. + * @see uspoof_check2 + * @stable ICU 4.2 + */ +U_STABLE int32_t U_EXPORT2 +uspoof_check(const USpoofChecker *sc, + const UChar *id, int32_t length, + int32_t *position, + UErrorCode *status); + + +/** + * Check the specified string for possible security issues. + * The text to be checked will typically be an identifier of some sort. + * The set of checks to be performed is specified with uspoof_setChecks(). + * + * \note + * Consider using the newer API, {@link uspoof_check2UTF8}, instead. + * The newer API exposes additional information from the check procedure + * and is otherwise identical to this method. + * + * @param sc The USpoofChecker + * @param id A identifier to be checked for possible security issues, in UTF8 format. + * @param length the length of the string to be checked, or -1 if the string is + * zero terminated. + * @param position Deprecated in ICU 51. Always returns zero. + * Originally, an out parameter for the index of the first + * string position that failed a check. + * This parameter may be NULL. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * Spoofing or security issues detected with the input string are + * not reported here, but through the function's return value. + * If the input contains invalid UTF-8 sequences, + * a status of U_INVALID_CHAR_FOUND will be returned. + * @return An integer value with bits set for any potential security + * or spoofing issues detected. The bits are defined by + * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) + * will be zero if the input string passes all of the + * enabled checks. + * @see uspoof_check2UTF8 + * @stable ICU 4.2 + */ +U_STABLE int32_t U_EXPORT2 +uspoof_checkUTF8(const USpoofChecker *sc, + const char *id, int32_t length, + int32_t *position, + UErrorCode *status); + + +#if U_SHOW_CPLUSPLUS_API +/** + * Check the specified string for possible security issues. + * The text to be checked will typically be an identifier of some sort. + * The set of checks to be performed is specified with uspoof_setChecks(). + * + * \note + * Consider using the newer API, {@link uspoof_check2UnicodeString}, instead. + * The newer API exposes additional information from the check procedure + * and is otherwise identical to this method. + * + * @param sc The USpoofChecker + * @param id A identifier to be checked for possible security issues. + * @param position Deprecated in ICU 51. Always returns zero. + * Originally, an out parameter for the index of the first + * string position that failed a check. + * This parameter may be NULL. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * Spoofing or security issues detected with the input string are + * not reported here, but through the function's return value. + * @return An integer value with bits set for any potential security + * or spoofing issues detected. The bits are defined by + * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) + * will be zero if the input string passes all of the + * enabled checks. + * @see uspoof_check2UnicodeString + * @stable ICU 4.2 + */ +U_STABLE int32_t U_EXPORT2 +uspoof_checkUnicodeString(const USpoofChecker *sc, + const icu::UnicodeString &id, + int32_t *position, + UErrorCode *status); +#endif + + +/** + * Check the specified string for possible security issues. + * The text to be checked will typically be an identifier of some sort. + * The set of checks to be performed is specified with uspoof_setChecks(). + * + * @param sc The USpoofChecker + * @param id The identifier to be checked for possible security issues, + * in UTF-16 format. + * @param length the length of the string to be checked, or -1 if the string is + * zero terminated. + * @param checkResult An instance of USpoofCheckResult to be filled with + * details about the identifier. Can be NULL. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * Spoofing or security issues detected with the input string are + * not reported here, but through the function's return value. + * @return An integer value with bits set for any potential security + * or spoofing issues detected. The bits are defined by + * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) + * will be zero if the input string passes all of the + * enabled checks. Any information in this bitmask will be + * consistent with the information saved in the optional + * checkResult parameter. + * @see uspoof_openCheckResult + * @see uspoof_check2UTF8 + * @see uspoof_check2UnicodeString + * @stable ICU 58 + */ +U_STABLE int32_t U_EXPORT2 +uspoof_check2(const USpoofChecker *sc, + const UChar* id, int32_t length, + USpoofCheckResult* checkResult, + UErrorCode *status); + +/** + * Check the specified string for possible security issues. + * The text to be checked will typically be an identifier of some sort. + * The set of checks to be performed is specified with uspoof_setChecks(). + * + * This version of {@link uspoof_check} accepts a USpoofCheckResult, which + * returns additional information about the identifier. For more + * information, see {@link uspoof_openCheckResult}. + * + * @param sc The USpoofChecker + * @param id A identifier to be checked for possible security issues, in UTF8 format. + * @param length the length of the string to be checked, or -1 if the string is + * zero terminated. + * @param checkResult An instance of USpoofCheckResult to be filled with + * details about the identifier. Can be NULL. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * Spoofing or security issues detected with the input string are + * not reported here, but through the function's return value. + * @return An integer value with bits set for any potential security + * or spoofing issues detected. The bits are defined by + * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) + * will be zero if the input string passes all of the + * enabled checks. Any information in this bitmask will be + * consistent with the information saved in the optional + * checkResult parameter. + * @see uspoof_openCheckResult + * @see uspoof_check2 + * @see uspoof_check2UnicodeString + * @stable ICU 58 + */ +U_STABLE int32_t U_EXPORT2 +uspoof_check2UTF8(const USpoofChecker *sc, + const char *id, int32_t length, + USpoofCheckResult* checkResult, + UErrorCode *status); + +#if U_SHOW_CPLUSPLUS_API +/** + * Check the specified string for possible security issues. + * The text to be checked will typically be an identifier of some sort. + * The set of checks to be performed is specified with uspoof_setChecks(). + * + * @param sc The USpoofChecker + * @param id A identifier to be checked for possible security issues. + * @param checkResult An instance of USpoofCheckResult to be filled with + * details about the identifier. Can be NULL. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * Spoofing or security issues detected with the input string are + * not reported here, but through the function's return value. + * @return An integer value with bits set for any potential security + * or spoofing issues detected. The bits are defined by + * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) + * will be zero if the input string passes all of the + * enabled checks. Any information in this bitmask will be + * consistent with the information saved in the optional + * checkResult parameter. + * @see uspoof_openCheckResult + * @see uspoof_check2 + * @see uspoof_check2UTF8 + * @stable ICU 58 + */ +U_STABLE int32_t U_EXPORT2 +uspoof_check2UnicodeString(const USpoofChecker *sc, + const icu::UnicodeString &id, + USpoofCheckResult* checkResult, + UErrorCode *status); +#endif + +/** + * Create a USpoofCheckResult, used by the {@link uspoof_check2} class of functions to return + * information about the identifier. Information includes: + * <ul> + * <li>A bitmask of the checks that failed</li> + * <li>The identifier's restriction level (UTS 39 section 5.2)</li> + * <li>The set of numerics in the string (UTS 39 section 5.3)</li> + * </ul> + * The data held in a USpoofCheckResult is cleared whenever it is passed into a new call + * of {@link uspoof_check2}. + * + * @param status The error code, set if this function encounters a problem. + * @return the newly created USpoofCheckResult + * @see uspoof_check2 + * @see uspoof_check2UTF8 + * @see uspoof_check2UnicodeString + * @stable ICU 58 + */ +U_STABLE USpoofCheckResult* U_EXPORT2 +uspoof_openCheckResult(UErrorCode *status); + +/** + * Close a USpoofCheckResult, freeing any memory that was being held by + * its implementation. + * + * @param checkResult The instance of USpoofCheckResult to close + * @stable ICU 58 + */ +U_STABLE void U_EXPORT2 +uspoof_closeCheckResult(USpoofCheckResult *checkResult); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUSpoofCheckResultPointer + * "Smart pointer" class, closes a USpoofCheckResult via {@link uspoof_closeCheckResult}. + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 58 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUSpoofCheckResultPointer, USpoofCheckResult, uspoof_closeCheckResult); + +U_NAMESPACE_END + +#endif + +/** + * Indicates which of the spoof check(s) have failed. The value is a bitwise OR of the constants for the tests + * in question: USPOOF_RESTRICTION_LEVEL, USPOOF_CHAR_LIMIT, and so on. + * + * @param checkResult The instance of USpoofCheckResult created by {@link uspoof_openCheckResult} + * @param status The error code, set if an error occurred. + * @return An integer value with bits set for any potential security + * or spoofing issues detected. The bits are defined by + * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) + * will be zero if the input string passes all of the + * enabled checks. + * @see uspoof_setChecks + * @stable ICU 58 + */ +U_STABLE int32_t U_EXPORT2 +uspoof_getCheckResultChecks(const USpoofCheckResult *checkResult, UErrorCode *status); + +/** + * Gets the restriction level that the text meets, if the USPOOF_RESTRICTION_LEVEL check + * was enabled; otherwise, undefined. + * + * @param checkResult The instance of USpoofCheckResult created by {@link uspoof_openCheckResult} + * @param status The error code, set if an error occurred. + * @return The restriction level contained in the USpoofCheckResult + * @see uspoof_setRestrictionLevel + * @stable ICU 58 + */ +U_STABLE URestrictionLevel U_EXPORT2 +uspoof_getCheckResultRestrictionLevel(const USpoofCheckResult *checkResult, UErrorCode *status); + +/** + * Gets the set of numerics found in the string, if the USPOOF_MIXED_NUMBERS check was enabled; + * otherwise, undefined. The set will contain the zero digit from each decimal number system found + * in the input string. Ownership of the returned USet remains with the USpoofCheckResult. + * The USet will be free'd when {@link uspoof_closeCheckResult} is called. + * + * @param checkResult The instance of USpoofCheckResult created by {@link uspoof_openCheckResult} + * @return The set of numerics contained in the USpoofCheckResult + * @param status The error code, set if an error occurred. + * @stable ICU 58 + */ +U_STABLE const USet* U_EXPORT2 +uspoof_getCheckResultNumerics(const USpoofCheckResult *checkResult, UErrorCode *status); + + +/** + * Check the whether two specified strings are visually confusable. + * + * If the strings are confusable, the return value will be nonzero, as long as + * {@link USPOOF_CONFUSABLE} was enabled in uspoof_setChecks(). + * + * The bits in the return value correspond to flags for each of the classes of + * confusables applicable to the two input strings. According to UTS 39 + * section 4, the possible flags are: + * + * <ul> + * <li>{@link USPOOF_SINGLE_SCRIPT_CONFUSABLE}</li> + * <li>{@link USPOOF_MIXED_SCRIPT_CONFUSABLE}</li> + * <li>{@link USPOOF_WHOLE_SCRIPT_CONFUSABLE}</li> + * </ul> + * + * If one or more of the above flags were not listed in uspoof_setChecks(), this + * function will never report that class of confusable. The check + * {@link USPOOF_CONFUSABLE} enables all three flags. + * + * + * @param sc The USpoofChecker + * @param id1 The first of the two identifiers to be compared for + * confusability. The strings are in UTF-16 format. + * @param length1 the length of the first identifer, expressed in + * 16 bit UTF-16 code units, or -1 if the string is + * nul terminated. + * @param id2 The second of the two identifiers to be compared for + * confusability. The identifiers are in UTF-16 format. + * @param length2 The length of the second identifiers, expressed in + * 16 bit UTF-16 code units, or -1 if the string is + * nul terminated. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * Confusability of the identifiers is not reported here, + * but through this function's return value. + * @return An integer value with bit(s) set corresponding to + * the type of confusability found, as defined by + * enum USpoofChecks. Zero is returned if the identifiers + * are not confusable. + * + * @stable ICU 4.2 + */ +U_STABLE int32_t U_EXPORT2 +uspoof_areConfusable(const USpoofChecker *sc, + const UChar *id1, int32_t length1, + const UChar *id2, int32_t length2, + UErrorCode *status); + + + +/** + * A version of {@link uspoof_areConfusable} accepting strings in UTF-8 format. + * + * @param sc The USpoofChecker + * @param id1 The first of the two identifiers to be compared for + * confusability. The strings are in UTF-8 format. + * @param length1 the length of the first identifiers, in bytes, or -1 + * if the string is nul terminated. + * @param id2 The second of the two identifiers to be compared for + * confusability. The strings are in UTF-8 format. + * @param length2 The length of the second string in bytes, or -1 + * if the string is nul terminated. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * Confusability of the strings is not reported here, + * but through this function's return value. + * @return An integer value with bit(s) set corresponding to + * the type of confusability found, as defined by + * enum USpoofChecks. Zero is returned if the strings + * are not confusable. + * + * @stable ICU 4.2 + * + * @see uspoof_areConfusable + */ +U_STABLE int32_t U_EXPORT2 +uspoof_areConfusableUTF8(const USpoofChecker *sc, + const char *id1, int32_t length1, + const char *id2, int32_t length2, + UErrorCode *status); + + + + +#if U_SHOW_CPLUSPLUS_API +/** + * A version of {@link uspoof_areConfusable} accepting UnicodeStrings. + * + * @param sc The USpoofChecker + * @param s1 The first of the two identifiers to be compared for + * confusability. The strings are in UTF-8 format. + * @param s2 The second of the two identifiers to be compared for + * confusability. The strings are in UTF-8 format. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * Confusability of the identifiers is not reported here, + * but through this function's return value. + * @return An integer value with bit(s) set corresponding to + * the type of confusability found, as defined by + * enum USpoofChecks. Zero is returned if the identifiers + * are not confusable. + * + * @stable ICU 4.2 + * + * @see uspoof_areConfusable + */ +U_STABLE int32_t U_EXPORT2 +uspoof_areConfusableUnicodeString(const USpoofChecker *sc, + const icu::UnicodeString &s1, + const icu::UnicodeString &s2, + UErrorCode *status); +#endif + + +/** + * Get the "skeleton" for an identifier. + * Skeletons are a transformation of the input identifier; + * Two identifiers are confusable if their skeletons are identical. + * See Unicode UAX #39 for additional information. + * + * Using skeletons directly makes it possible to quickly check + * whether an identifier is confusable with any of some large + * set of existing identifiers, by creating an efficiently + * searchable collection of the skeletons. + * + * @param sc The USpoofChecker + * @param type Deprecated in ICU 58. You may pass any number. + * Originally, controlled which of the Unicode confusable data + * tables to use. + * @param id The input identifier whose skeleton will be computed. + * @param length The length of the input identifier, expressed in 16 bit + * UTF-16 code units, or -1 if the string is zero terminated. + * @param dest The output buffer, to receive the skeleton string. + * @param destCapacity The length of the output buffer, in 16 bit units. + * The destCapacity may be zero, in which case the function will + * return the actual length of the skeleton. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * @return The length of the skeleton string. The returned length + * is always that of the complete skeleton, even when the + * supplied buffer is too small (or of zero length) + * + * @stable ICU 4.2 + * @see uspoof_areConfusable + */ +U_STABLE int32_t U_EXPORT2 +uspoof_getSkeleton(const USpoofChecker *sc, + uint32_t type, + const UChar *id, int32_t length, + UChar *dest, int32_t destCapacity, + UErrorCode *status); + +/** + * Get the "skeleton" for an identifier. + * Skeletons are a transformation of the input identifier; + * Two identifiers are confusable if their skeletons are identical. + * See Unicode UAX #39 for additional information. + * + * Using skeletons directly makes it possible to quickly check + * whether an identifier is confusable with any of some large + * set of existing identifiers, by creating an efficiently + * searchable collection of the skeletons. + * + * @param sc The USpoofChecker + * @param type Deprecated in ICU 58. You may pass any number. + * Originally, controlled which of the Unicode confusable data + * tables to use. + * @param id The UTF-8 format identifier whose skeleton will be computed. + * @param length The length of the input string, in bytes, + * or -1 if the string is zero terminated. + * @param dest The output buffer, to receive the skeleton string. + * @param destCapacity The length of the output buffer, in bytes. + * The destCapacity may be zero, in which case the function will + * return the actual length of the skeleton. + * @param status The error code, set if an error occurred while attempting to + * perform the check. Possible Errors include U_INVALID_CHAR_FOUND + * for invalid UTF-8 sequences, and + * U_BUFFER_OVERFLOW_ERROR if the destination buffer is too small + * to hold the complete skeleton. + * @return The length of the skeleton string, in bytes. The returned length + * is always that of the complete skeleton, even when the + * supplied buffer is too small (or of zero length) + * + * @stable ICU 4.2 + */ +U_STABLE int32_t U_EXPORT2 +uspoof_getSkeletonUTF8(const USpoofChecker *sc, + uint32_t type, + const char *id, int32_t length, + char *dest, int32_t destCapacity, + UErrorCode *status); + +#if U_SHOW_CPLUSPLUS_API +/** + * Get the "skeleton" for an identifier. + * Skeletons are a transformation of the input identifier; + * Two identifiers are confusable if their skeletons are identical. + * See Unicode UAX #39 for additional information. + * + * Using skeletons directly makes it possible to quickly check + * whether an identifier is confusable with any of some large + * set of existing identifiers, by creating an efficiently + * searchable collection of the skeletons. + * + * @param sc The USpoofChecker. + * @param type Deprecated in ICU 58. You may pass any number. + * Originally, controlled which of the Unicode confusable data + * tables to use. + * @param id The input identifier whose skeleton will be computed. + * @param dest The output identifier, to receive the skeleton string. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * @return A reference to the destination (skeleton) string. + * + * @stable ICU 4.2 + */ +U_I18N_API icu::UnicodeString & U_EXPORT2 +uspoof_getSkeletonUnicodeString(const USpoofChecker *sc, + uint32_t type, + const icu::UnicodeString &id, + icu::UnicodeString &dest, + UErrorCode *status); +#endif /* U_SHOW_CPLUSPLUS_API */ + +/** + * Get the set of Candidate Characters for Inclusion in Identifiers, as defined + * in http://unicode.org/Public/security/latest/xidmodifications.txt + * and documented in http://www.unicode.org/reports/tr39/, Unicode Security Mechanisms. + * + * The returned set is frozen. Ownership of the set remains with the ICU library; it must not + * be deleted by the caller. + * + * @param status The error code, set if a problem occurs while creating the set. + * + * @stable ICU 51 + */ +U_STABLE const USet * U_EXPORT2 +uspoof_getInclusionSet(UErrorCode *status); + +/** + * Get the set of characters from Recommended Scripts for Inclusion in Identifiers, as defined + * in http://unicode.org/Public/security/latest/xidmodifications.txt + * and documented in http://www.unicode.org/reports/tr39/, Unicode Security Mechanisms. + * + * The returned set is frozen. Ownership of the set remains with the ICU library; it must not + * be deleted by the caller. + * + * @param status The error code, set if a problem occurs while creating the set. + * + * @stable ICU 51 + */ +U_STABLE const USet * U_EXPORT2 +uspoof_getRecommendedSet(UErrorCode *status); + +#if U_SHOW_CPLUSPLUS_API + +/** + * Get the set of Candidate Characters for Inclusion in Identifiers, as defined + * in http://unicode.org/Public/security/latest/xidmodifications.txt + * and documented in http://www.unicode.org/reports/tr39/, Unicode Security Mechanisms. + * + * The returned set is frozen. Ownership of the set remains with the ICU library; it must not + * be deleted by the caller. + * + * @param status The error code, set if a problem occurs while creating the set. + * + * @stable ICU 51 + */ +U_STABLE const icu::UnicodeSet * U_EXPORT2 +uspoof_getInclusionUnicodeSet(UErrorCode *status); + +/** + * Get the set of characters from Recommended Scripts for Inclusion in Identifiers, as defined + * in http://unicode.org/Public/security/latest/xidmodifications.txt + * and documented in http://www.unicode.org/reports/tr39/, Unicode Security Mechanisms. + * + * The returned set is frozen. Ownership of the set remains with the ICU library; it must not + * be deleted by the caller. + * + * @param status The error code, set if a problem occurs while creating the set. + * + * @stable ICU 51 + */ +U_STABLE const icu::UnicodeSet * U_EXPORT2 +uspoof_getRecommendedUnicodeSet(UErrorCode *status); + +#endif /* U_SHOW_CPLUSPLUS_API */ + +/** + * Serialize the data for a spoof detector into a chunk of memory. + * The flattened spoof detection tables can later be used to efficiently + * instantiate a new Spoof Detector. + * + * The serialized spoof checker includes only the data compiled from the + * Unicode data tables by uspoof_openFromSource(); it does not include + * include any other state or configuration that may have been set. + * + * @param sc the Spoof Detector whose data is to be serialized. + * @param data a pointer to 32-bit-aligned memory to be filled with the data, + * can be NULL if capacity==0 + * @param capacity the number of bytes available at data, + * or 0 for preflighting + * @param status an in/out ICU UErrorCode; possible errors include: + * - U_BUFFER_OVERFLOW_ERROR if the data storage block is too small for serialization + * - U_ILLEGAL_ARGUMENT_ERROR the data or capacity parameters are bad + * @return the number of bytes written or needed for the spoof data + * + * @see utrie2_openFromSerialized() + * @stable ICU 4.2 + */ +U_STABLE int32_t U_EXPORT2 +uspoof_serialize(USpoofChecker *sc, + void *data, int32_t capacity, + UErrorCode *status); + + +#endif + +#endif /* USPOOF_H */ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/usprep.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/usprep.h new file mode 100755 index 00000000..914eb848 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/usprep.h @@ -0,0 +1,271 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ******************************************************************************* + * + * Copyright (C) 2003-2014, International Business Machines + * Corporation and others. All Rights Reserved. + * + ******************************************************************************* + * file name: usprep.h + * encoding: UTF-8 + * tab size: 8 (not used) + * indentation:4 + * + * created on: 2003jul2 + * created by: Ram Viswanadha + */ + +#ifndef __USPREP_H__ +#define __USPREP_H__ + +/** + * \file + * \brief C API: Implements the StringPrep algorithm. + */ + +#include "unicode/utypes.h" +#include "unicode/localpointer.h" + +/** + * + * StringPrep API implements the StingPrep framework as described by RFC 3454. + * StringPrep prepares Unicode strings for use in network protocols. + * Profiles of StingPrep are set of rules and data according to with the + * Unicode Strings are prepared. Each profiles contains tables which describe + * how a code point should be treated. The tables are broadly classified into + * <ul> + * <li> Unassigned Table: Contains code points that are unassigned + * in the Unicode Version supported by StringPrep. Currently + * RFC 3454 supports Unicode 3.2. </li> + * <li> Prohibited Table: Contains code points that are prohibited from + * the output of the StringPrep processing function. </li> + * <li> Mapping Table: Contains code points that are deleted from the output or case mapped. </li> + * </ul> + * + * The procedure for preparing Unicode strings: + * <ol> + * <li> Map: For each character in the input, check if it has a mapping + * and, if so, replace it with its mapping. </li> + * <li> Normalize: Possibly normalize the result of step 1 using Unicode + * normalization. </li> + * <li> Prohibit: Check for any characters that are not allowed in the + * output. If any are found, return an error.</li> + * <li> Check bidi: Possibly check for right-to-left characters, and if + * any are found, make sure that the whole string satisfies the + * requirements for bidirectional strings. If the string does not + * satisfy the requirements for bidirectional strings, return an + * error. </li> + * </ol> + * @author Ram Viswanadha + */ +#if !UCONFIG_NO_IDNA + +#include "unicode/parseerr.h" + +/** + * The StringPrep profile + * @stable ICU 2.8 + */ +typedef struct UStringPrepProfile UStringPrepProfile; + + +/** + * Option to prohibit processing of unassigned code points in the input + * + * @see usprep_prepare + * @stable ICU 2.8 + */ +#define USPREP_DEFAULT 0x0000 + +/** + * Option to allow processing of unassigned code points in the input + * + * @see usprep_prepare + * @stable ICU 2.8 + */ +#define USPREP_ALLOW_UNASSIGNED 0x0001 + +/** + * enums for the standard stringprep profile types + * supported by usprep_openByType. + * @see usprep_openByType + * @stable ICU 4.2 + */ +typedef enum UStringPrepProfileType { + /** + * RFC3491 Nameprep + * @stable ICU 4.2 + */ + USPREP_RFC3491_NAMEPREP, + /** + * RFC3530 nfs4_cs_prep + * @stable ICU 4.2 + */ + USPREP_RFC3530_NFS4_CS_PREP, + /** + * RFC3530 nfs4_cs_prep with case insensitive option + * @stable ICU 4.2 + */ + USPREP_RFC3530_NFS4_CS_PREP_CI, + /** + * RFC3530 nfs4_cis_prep + * @stable ICU 4.2 + */ + USPREP_RFC3530_NFS4_CIS_PREP, + /** + * RFC3530 nfs4_mixed_prep for prefix + * @stable ICU 4.2 + */ + USPREP_RFC3530_NFS4_MIXED_PREP_PREFIX, + /** + * RFC3530 nfs4_mixed_prep for suffix + * @stable ICU 4.2 + */ + USPREP_RFC3530_NFS4_MIXED_PREP_SUFFIX, + /** + * RFC3722 iSCSI + * @stable ICU 4.2 + */ + USPREP_RFC3722_ISCSI, + /** + * RFC3920 XMPP Nodeprep + * @stable ICU 4.2 + */ + USPREP_RFC3920_NODEPREP, + /** + * RFC3920 XMPP Resourceprep + * @stable ICU 4.2 + */ + USPREP_RFC3920_RESOURCEPREP, + /** + * RFC4011 Policy MIB Stringprep + * @stable ICU 4.2 + */ + USPREP_RFC4011_MIB, + /** + * RFC4013 SASLprep + * @stable ICU 4.2 + */ + USPREP_RFC4013_SASLPREP, + /** + * RFC4505 trace + * @stable ICU 4.2 + */ + USPREP_RFC4505_TRACE, + /** + * RFC4518 LDAP + * @stable ICU 4.2 + */ + USPREP_RFC4518_LDAP, + /** + * RFC4518 LDAP for case ignore, numeric and stored prefix + * matching rules + * @stable ICU 4.2 + */ + USPREP_RFC4518_LDAP_CI +} UStringPrepProfileType; + +/** + * Creates a StringPrep profile from the data file. + * + * @param path string containing the full path pointing to the directory + * where the profile reside followed by the package name + * e.g. "/usr/resource/my_app/profiles/mydata" on a Unix system. + * if NULL, ICU default data files will be used. + * @param fileName name of the profile file to be opened + * @param status ICU error code in/out parameter. Must not be NULL. + * Must fulfill U_SUCCESS before the function call. + * @return Pointer to UStringPrepProfile that is opened. Should be closed by + * calling usprep_close() + * @see usprep_close() + * @stable ICU 2.8 + */ +U_STABLE UStringPrepProfile* U_EXPORT2 +usprep_open(const char* path, + const char* fileName, + UErrorCode* status); + +/** + * Creates a StringPrep profile for the specified profile type. + * + * @param type The profile type + * @param status ICU error code in/out parameter. Must not be NULL. + * Must fulfill U_SUCCESS before the function call. + * @return Pointer to UStringPrepProfile that is opened. Should be closed by + * calling usprep_close() + * @see usprep_close() + * @stable ICU 4.2 + */ +U_STABLE UStringPrepProfile* U_EXPORT2 +usprep_openByType(UStringPrepProfileType type, + UErrorCode* status); + +/** + * Closes the profile + * @param profile The profile to close + * @stable ICU 2.8 + */ +U_STABLE void U_EXPORT2 +usprep_close(UStringPrepProfile* profile); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUStringPrepProfilePointer + * "Smart pointer" class, closes a UStringPrepProfile via usprep_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUStringPrepProfilePointer, UStringPrepProfile, usprep_close); + +U_NAMESPACE_END + +#endif + +/** + * Prepare the input buffer for use in applications with the given profile. This operation maps, normalizes(NFKC), + * checks for prohibited and BiDi characters in the order defined by RFC 3454 + * depending on the options specified in the profile. + * + * @param prep The profile to use + * @param src Pointer to UChar buffer containing the string to prepare + * @param srcLength Number of characters in the source string + * @param dest Pointer to the destination buffer to receive the output + * @param destCapacity The capacity of destination array + * @param options A bit set of options: + * + * - USPREP_DEFAULT Prohibit processing of unassigned code points in the input + * + * - USPREP_ALLOW_UNASSIGNED Treat the unassigned code points are in the input + * as normal Unicode code points. + * + * @param parseError Pointer to UParseError struct to receive information on position + * of error if an error is encountered. Can be NULL. + * @param status ICU in/out error code parameter. + * U_INVALID_CHAR_FOUND if src contains + * unmatched single surrogates. + * U_INDEX_OUTOFBOUNDS_ERROR if src contains + * too many code points. + * U_BUFFER_OVERFLOW_ERROR if destCapacity is not enough + * @return The number of UChars in the destination buffer + * @stable ICU 2.8 + */ + +U_STABLE int32_t U_EXPORT2 +usprep_prepare( const UStringPrepProfile* prep, + const UChar* src, int32_t srcLength, + UChar* dest, int32_t destCapacity, + int32_t options, + UParseError* parseError, + UErrorCode* status ); + + +#endif /* #if !UCONFIG_NO_IDNA */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ustdio.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ustdio.h new file mode 100755 index 00000000..342c2b46 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ustdio.h @@ -0,0 +1,1018 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* +* Copyright (C) 1998-2015, International Business Machines +* Corporation and others. All Rights Reserved. +* +****************************************************************************** +* +* File ustdio.h +* +* Modification History: +* +* Date Name Description +* 10/16/98 stephen Creation. +* 11/06/98 stephen Modified per code review. +* 03/12/99 stephen Modified for new C API. +* 07/19/99 stephen Minor doc update. +* 02/01/01 george Added sprintf & sscanf with all of its variants +****************************************************************************** +*/ + +#ifndef USTDIO_H +#define USTDIO_H + +#include <stdio.h> +#include <stdarg.h> + +#include "unicode/utypes.h" +#include "unicode/ucnv.h" +#include "unicode/utrans.h" +#include "unicode/localpointer.h" +#include "unicode/unum.h" + +#if !UCONFIG_NO_CONVERSION + +/* + TODO + The following is a small list as to what is currently wrong/suggestions for + ustdio. + + * Make sure that * in the scanf format specification works for all formats. + * Each UFILE takes up at least 2KB. + Look into adding setvbuf() for configurable buffers. + * This library does buffering. The OS should do this for us already. Check on + this, and remove it from this library, if this is the case. Double buffering + wastes a lot of time and space. + * Test stdin and stdout with the u_f* functions + * Testing should be done for reading and writing multi-byte encodings, + and make sure that a character that is contained across buffer boundries + works even for incomplete characters. + * Make sure that the last character is flushed when the file/string is closed. + * snprintf should follow the C99 standard for the return value, which is + return the number of characters (excluding the trailing '\0') + which would have been written to the destination string regardless + of available space. This is like pre-flighting. + * Everything that uses %s should do what operator>> does for UnicodeString. + It should convert one byte at a time, and once a character is + converted then check to see if it's whitespace or in the scanset. + If it's whitespace or in the scanset, put all the bytes back (do nothing + for sprintf/sscanf). + * If bad string data is encountered, make sure that the function fails + without memory leaks and the unconvertable characters are valid + substitution or are escaped characters. + * u_fungetc() can't unget a character when it's at the beginning of the + internal conversion buffer. For example, read the buffer size # of + characters, and then ungetc to get the previous character that was + at the end of the last buffer. + * u_fflush() and u_fclose should return an int32_t like C99 functions. + 0 is returned if the operation was successful and EOF otherwise. + * u_fsettransliterator does not support U_READ side of transliteration. + * The format specifier should limit the size of a format or honor it in + order to prevent buffer overruns. (e.g. %256.256d). + * u_fread and u_fwrite don't exist. They're needed for reading and writing + data structures without any conversion. + * u_file_read and u_file_write are used for writing strings. u_fgets and + u_fputs or u_fread and u_fwrite should be used to do this. + * The width parameter for all scanf formats, including scanset, needs + better testing. This prevents buffer overflows. + * Figure out what is suppose to happen when a codepage is changed midstream. + Maybe a flush or a rewind are good enough. + * Make sure that a UFile opened with "rw" can be used after using + u_fflush with a u_frewind. + * scanf(%i) should detect what type of number to use. + * Add more testing of the alternate format, %# + * Look at newline handling of fputs/puts + * Think more about codeunit/codepoint error handling/support in %S,%s,%C,%c,%[] + * Complete the file documentation with proper doxygen formatting. + See http://oss.software.ibm.com/pipermail/icu/2003-July/005647.html +*/ + +/** + * \file + * \brief C API: Unicode stdio-like API + * + * <h2>Unicode stdio-like C API</h2> + * + * <p>This API provides an stdio-like API wrapper around ICU's other + * formatting and parsing APIs. It is meant to ease the transition of adding + * Unicode support to a preexisting applications using stdio. The following + * is a small list of noticable differences between stdio and ICU I/O's + * ustdio implementation.</p> + * + * <ul> + * <li>Locale specific formatting and parsing is only done with file IO.</li> + * <li>u_fstropen can be used to simulate file IO with strings. + * This is similar to the iostream API, and it allows locale specific + * formatting and parsing to be used.</li> + * <li>This API provides uniform formatting and parsing behavior between + * platforms (unlike the standard stdio implementations found on various + * platforms).</li> + * <li>This API is better suited for text data handling than binary data + * handling when compared to the typical stdio implementation.</li> + * <li>You can specify a Transliterator while using the file IO.</li> + * <li>You can specify a file's codepage separately from the default + * system codepage.</li> + * </ul> + * + * <h2>Formatting and Parsing Specification</h2> + * + * General printf format:<br> + * %[format modifier][width][.precision][type modifier][format] + * + * General scanf format:<br> + * %[*][format modifier][width][type modifier][format] + * +<table cellspacing="3"> +<tr><td>format</td><td>default<br>printf<br>type</td><td>default<br>scanf<br>type</td><td>description</td></tr> +<tr><td>%E</td><td>double</td><td>float</td><td>Scientific with an uppercase exponent</td></tr> +<tr><td>%e</td><td>double</td><td>float</td><td>Scientific with a lowercase exponent</td></tr> +<tr><td>%G</td><td>double</td><td>float</td><td>Use %E or %f for best format</td></tr> +<tr><td>%g</td><td>double</td><td>float</td><td>Use %e or %f for best format</td></tr> +<tr><td>%f</td><td>double</td><td>float</td><td>Simple floating point without the exponent</td></tr> +<tr><td>%X</td><td>int32_t</td><td>int32_t</td><td>ustdio special uppercase hex radix formatting</td></tr> +<tr><td>%x</td><td>int32_t</td><td>int32_t</td><td>ustdio special lowercase hex radix formatting</td></tr> +<tr><td>%d</td><td>int32_t</td><td>int32_t</td><td>Decimal format</td></tr> +<tr><td>%i</td><td>int32_t</td><td>int32_t</td><td>Same as %d</td></tr> +<tr><td>%n</td><td>int32_t</td><td>int32_t</td><td>count (write the number of UTF-16 codeunits read/written)</td></tr> +<tr><td>%o</td><td>int32_t</td><td>int32_t</td><td>ustdio special octal radix formatting</td></tr> +<tr><td>%u</td><td>uint32_t</td><td>uint32_t</td><td>Decimal format</td></tr> +<tr><td>%p</td><td>void *</td><td>void *</td><td>Prints the pointer value</td></tr> +<tr><td>%s</td><td>char *</td><td>char *</td><td>Use default converter or specified converter from fopen</td></tr> +<tr><td>%c</td><td>char</td><td>char</td><td>Use default converter or specified converter from fopen<br> +When width is specified for scanf, this acts like a non-NULL-terminated char * string.<br> +By default, only one char is written.</td></tr> +<tr><td>%S</td><td>UChar *</td><td>UChar *</td><td>Null terminated UTF-16 string</td></tr> +<tr><td>%C</td><td>UChar</td><td>UChar</td><td>16-bit Unicode code unit<br> +When width is specified for scanf, this acts like a non-NULL-terminated UChar * string<br> +By default, only one codepoint is written.</td></tr> +<tr><td>%[]</td><td> </td><td>UChar *</td><td>Null terminated UTF-16 string which contains the filtered set of characters specified by the UnicodeSet</td></tr> +<tr><td>%%</td><td> </td><td> </td><td>Show a percent sign</td></tr> +</table> + +Format modifiers +<table> +<tr><td>modifier</td><td>formats</td><td>type</td><td>comments</td></tr> +<tr><td>%h</td><td>%d, %i, %o, %x</td><td>int16_t</td><td>short format</td></tr> +<tr><td>%h</td><td>%u</td><td>uint16_t</td><td>short format</td></tr> +<tr><td>%h</td><td>c</td><td>char</td><td><b>(Unimplemented)</b> Use invariant converter</td></tr> +<tr><td>%h</td><td>s</td><td>char *</td><td><b>(Unimplemented)</b> Use invariant converter</td></tr> +<tr><td>%h</td><td>C</td><td>char</td><td><b>(Unimplemented)</b> 8-bit Unicode code unit</td></tr> +<tr><td>%h</td><td>S</td><td>char *</td><td><b>(Unimplemented)</b> Null terminated UTF-8 string</td></tr> +<tr><td>%l</td><td>%d, %i, %o, %x</td><td>int32_t</td><td>long format (no effect)</td></tr> +<tr><td>%l</td><td>%u</td><td>uint32_t</td><td>long format (no effect)</td></tr> +<tr><td>%l</td><td>c</td><td>N/A</td><td><b>(Unimplemented)</b> Reserved for future implementation</td></tr> +<tr><td>%l</td><td>s</td><td>N/A</td><td><b>(Unimplemented)</b> Reserved for future implementation</td></tr> +<tr><td>%l</td><td>C</td><td>UChar32</td><td><b>(Unimplemented)</b> 32-bit Unicode code unit</td></tr> +<tr><td>%l</td><td>S</td><td>UChar32 *</td><td><b>(Unimplemented)</b> Null terminated UTF-32 string</td></tr> +<tr><td>%ll</td><td>%d, %i, %o, %x</td><td>int64_t</td><td>long long format</td></tr> +<tr><td>%ll</td><td>%u</td><td>uint64_t</td><td><b>(Unimplemented)</b> long long format</td></tr> +<tr><td>%-</td><td><i>all</i></td><td>N/A</td><td>Left justify</td></tr> +<tr><td>%+</td><td>%d, %i, %o, %x, %e, %f, %g, %E, %G</td><td>N/A</td><td>Always show the plus or minus sign. Needs data for plus sign.</td></tr> +<tr><td>% </td><td>%d, %i, %o, %x, %e, %f, %g, %E, %G</td><td>N/A</td><td>Instead of a "+" output a blank character for positive numbers.</td></tr> +<tr><td>%#</td><td>%d, %i, %o, %x, %e, %f, %g, %E, %G</td><td>N/A</td><td>Precede octal value with 0, hex with 0x and show the + decimal point for floats.</td></tr> +<tr><td>%<i>n</i></td><td><i>all</i></td><td>N/A</td><td>Width of input/output. num is an actual number from 0 to + some large number.</td></tr> +<tr><td>%.<i>n</i></td><td>%e, %f, %g, %E, %F, %G</td><td>N/A</td><td>Significant digits precision. num is an actual number from + 0 to some large number.<br>If * is used in printf, then the precision is passed in as an argument before the number to be formatted.</td></tr> +</table> + +printf modifier +%* int32_t Next argument after this one specifies the width + +scanf modifier +%* N/A This field is scanned, but not stored + +<p>If you are using this C API instead of the ustream.h API for C++, +you can use one of the following u_fprintf examples to display a UnicodeString.</p> + +<pre><code> + UFILE *out = u_finit(stdout, NULL, NULL); + UnicodeString string1("string 1"); + UnicodeString string2("string 2"); + u_fprintf(out, "%S\n", string1.getTerminatedBuffer()); + u_fprintf(out, "%.*S\n", string2.length(), string2.getBuffer()); + u_fclose(out); +</code></pre> + + */ + + +/** + * When an end of file is encountered, this value can be returned. + * @see u_fgetc + * @stable 3.0 + */ +#define U_EOF 0xFFFF + +/** Forward declaration of a Unicode-aware file @stable 3.0 */ +typedef struct UFILE UFILE; + +/** + * Enum for which direction of stream a transliterator applies to. + * @see u_fsettransliterator + * @stable ICU 3.0 + */ +typedef enum { + U_READ = 1, + U_WRITE = 2, + U_READWRITE =3 /* == (U_READ | U_WRITE) */ +} UFileDirection; + +/** + * Open a UFILE. + * A UFILE is a wrapper around a FILE* that is locale and codepage aware. + * That is, data written to a UFILE will be formatted using the conventions + * specified by that UFILE's Locale; this data will be in the character set + * specified by that UFILE's codepage. + * @param filename The name of the file to open. + * @param perm The read/write permission for the UFILE; one of "r", "w", "rw" + * @param locale The locale whose conventions will be used to format + * and parse output. If this parameter is NULL, the default locale will + * be used. + * @param codepage The codepage in which data will be written to and + * read from the file. If this paramter is NULL the system default codepage + * will be used. + * @return A new UFILE, or NULL if an error occurred. + * @stable ICU 3.0 + */ +U_STABLE UFILE* U_EXPORT2 +u_fopen(const char *filename, + const char *perm, + const char *locale, + const char *codepage); + +/** + * Open a UFILE with a UChar* filename + * A UFILE is a wrapper around a FILE* that is locale and codepage aware. + * That is, data written to a UFILE will be formatted using the conventions + * specified by that UFILE's Locale; this data will be in the character set + * specified by that UFILE's codepage. + * @param filename The name of the file to open. + * @param perm The read/write permission for the UFILE; one of "r", "w", "rw" + * @param locale The locale whose conventions will be used to format + * and parse output. If this parameter is NULL, the default locale will + * be used. + * @param codepage The codepage in which data will be written to and + * read from the file. If this paramter is NULL the system default codepage + * will be used. + * @return A new UFILE, or NULL if an error occurred. + * @stable ICU 54 + */ +U_STABLE UFILE* U_EXPORT2 +u_fopen_u(const UChar *filename, + const char *perm, + const char *locale, + const char *codepage); + +/** + * Open a UFILE on top of an existing FILE* stream. The FILE* stream + * ownership remains with the caller. To have the UFILE take over + * ownership and responsibility for the FILE* stream, use the + * function u_fadopt. + * @param f The FILE* to which this UFILE will attach and use. + * @param locale The locale whose conventions will be used to format + * and parse output. If this parameter is NULL, the default locale will + * be used. + * @param codepage The codepage in which data will be written to and + * read from the file. If this paramter is NULL, data will be written and + * read using the default codepage for <TT>locale</TT>, unless <TT>locale</TT> + * is NULL, in which case the system default codepage will be used. + * @return A new UFILE, or NULL if an error occurred. + * @stable ICU 3.0 + */ +U_STABLE UFILE* U_EXPORT2 +u_finit(FILE *f, + const char *locale, + const char *codepage); + +/** + * Open a UFILE on top of an existing FILE* stream. The FILE* stream + * ownership is transferred to the new UFILE. It will be closed when the + * UFILE is closed. + * @param f The FILE* which this UFILE will take ownership of. + * @param locale The locale whose conventions will be used to format + * and parse output. If this parameter is NULL, the default locale will + * be used. + * @param codepage The codepage in which data will be written to and + * read from the file. If this paramter is NULL, data will be written and + * read using the default codepage for <TT>locale</TT>, unless <TT>locale</TT> + * is NULL, in which case the system default codepage will be used. + * @return A new UFILE, or NULL if an error occurred. If an error occurs + * the ownership of the FILE* stream remains with the caller. + * @stable ICU 4.4 + */ +U_STABLE UFILE* U_EXPORT2 +u_fadopt(FILE *f, + const char *locale, + const char *codepage); + +/** + * Create a UFILE that can be used for localized formatting or parsing. + * The u_sprintf and u_sscanf functions do not read or write numbers for a + * specific locale. The ustdio.h file functions can be used on this UFILE. + * The string is usable once u_fclose or u_fflush has been called on the + * returned UFILE. + * @param stringBuf The string used for reading or writing. + * @param capacity The number of code units available for use in stringBuf + * @param locale The locale whose conventions will be used to format + * and parse output. If this parameter is NULL, the default locale will + * be used. + * @return A new UFILE, or NULL if an error occurred. + * @stable ICU 3.0 + */ +U_STABLE UFILE* U_EXPORT2 +u_fstropen(UChar *stringBuf, + int32_t capacity, + const char *locale); + +/** + * Close a UFILE. Implies u_fflush first. + * @param file The UFILE to close. + * @stable ICU 3.0 + * @see u_fflush + */ +U_STABLE void U_EXPORT2 +u_fclose(UFILE *file); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUFILEPointer + * "Smart pointer" class, closes a UFILE via u_fclose(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUFILEPointer, UFILE, u_fclose); + +U_NAMESPACE_END + +#endif + +/** + * Tests if the UFILE is at the end of the file stream. + * @param f The UFILE from which to read. + * @return Returns TRUE after the first read operation that attempts to + * read past the end of the file. It returns FALSE if the current position is + * not end of file. + * @stable ICU 3.0 +*/ +U_STABLE UBool U_EXPORT2 +u_feof(UFILE *f); + +/** + * Flush output of a UFILE. Implies a flush of + * converter/transliterator state. (That is, a logical break is + * made in the output stream - for example if a different type of + * output is desired.) The underlying OS level file is also flushed. + * Note that for a stateful encoding, the converter may write additional + * bytes to return the stream to default state. + * @param file The UFILE to flush. + * @stable ICU 3.0 + */ +U_STABLE void U_EXPORT2 +u_fflush(UFILE *file); + +/** + * Rewind the file pointer to the beginning of the file. + * @param file The UFILE to rewind. + * @stable ICU 3.0 + */ +U_STABLE void +u_frewind(UFILE *file); + +/** + * Get the FILE* associated with a UFILE. + * @param f The UFILE + * @return A FILE*, owned by the UFILE. (The FILE <EM>must not</EM> be modified or closed) + * @stable ICU 3.0 + */ +U_STABLE FILE* U_EXPORT2 +u_fgetfile(UFILE *f); + +#if !UCONFIG_NO_FORMATTING + +/** + * Get the locale whose conventions are used to format and parse output. + * This is the same locale passed in the preceding call to<TT>u_fsetlocale</TT> + * or <TT>u_fopen</TT>. + * @param file The UFILE to set. + * @return The locale whose conventions are used to format and parse output. + * @stable ICU 3.0 + */ +U_STABLE const char* U_EXPORT2 +u_fgetlocale(UFILE *file); + +/** + * Set the locale whose conventions will be used to format and parse output. + * @param locale The locale whose conventions will be used to format + * and parse output. + * @param file The UFILE to query. + * @return NULL if successful, otherwise a negative number. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_fsetlocale(UFILE *file, + const char *locale); + +#endif + +/** + * Get the codepage in which data is written to and read from the UFILE. + * This is the same codepage passed in the preceding call to + * <TT>u_fsetcodepage</TT> or <TT>u_fopen</TT>. + * @param file The UFILE to query. + * @return The codepage in which data is written to and read from the UFILE, + * or NULL if an error occurred. + * @stable ICU 3.0 + */ +U_STABLE const char* U_EXPORT2 +u_fgetcodepage(UFILE *file); + +/** + * Set the codepage in which data will be written to and read from the UFILE. + * All Unicode data written to the UFILE will be converted to this codepage + * before it is written to the underlying FILE*. It it generally a bad idea to + * mix codepages within a file. This should only be called right + * after opening the <TT>UFile</TT>, or after calling <TT>u_frewind</TT>. + * @param codepage The codepage in which data will be written to + * and read from the file. For example <TT>"latin-1"</TT> or <TT>"ibm-943"</TT>. + * A value of NULL means the default codepage for the UFILE's current + * locale will be used. + * @param file The UFILE to set. + * @return 0 if successful, otherwise a negative number. + * @see u_frewind + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_fsetcodepage(const char *codepage, + UFILE *file); + + +/** + * Returns an alias to the converter being used for this file. + * @param f The UFILE to get the value from + * @return alias to the converter (The converter <EM>must not</EM> be modified or closed) + * @stable ICU 3.0 + */ +U_STABLE UConverter* U_EXPORT2 u_fgetConverter(UFILE *f); + +#if !UCONFIG_NO_FORMATTING +/** + * Returns an alias to the number formatter being used for this file. + * @param f The UFILE to get the value from + * @return alias to the number formatter (The formatter <EM>must not</EM> be modified or closed) + * @stable ICU 51 +*/ + U_STABLE const UNumberFormat* U_EXPORT2 u_fgetNumberFormat(UFILE *f); + +/* Output functions */ + +/** + * Write formatted data to <TT>stdout</TT>. + * @param patternSpecification A pattern specifying how <TT>u_printf</TT> will + * interpret the variable arguments received and format the data. + * @return The number of Unicode characters written to <TT>stdout</TT> + * @stable ICU 49 + */ +U_STABLE int32_t U_EXPORT2 +u_printf(const char *patternSpecification, + ... ); + +/** + * Write formatted data to a UFILE. + * @param f The UFILE to which to write. + * @param patternSpecification A pattern specifying how <TT>u_fprintf</TT> will + * interpret the variable arguments received and format the data. + * @return The number of Unicode characters written to <TT>f</TT>. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_fprintf(UFILE *f, + const char *patternSpecification, + ... ); + +/** + * Write formatted data to a UFILE. + * This is identical to <TT>u_fprintf</TT>, except that it will + * <EM>not</EM> call <TT>va_start</TT> and <TT>va_end</TT>. + * @param f The UFILE to which to write. + * @param patternSpecification A pattern specifying how <TT>u_fprintf</TT> will + * interpret the variable arguments received and format the data. + * @param ap The argument list to use. + * @return The number of Unicode characters written to <TT>f</TT>. + * @see u_fprintf + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_vfprintf(UFILE *f, + const char *patternSpecification, + va_list ap); + +/** + * Write formatted data to <TT>stdout</TT>. + * @param patternSpecification A pattern specifying how <TT>u_printf_u</TT> will + * interpret the variable arguments received and format the data. + * @return The number of Unicode characters written to <TT>stdout</TT> + * @stable ICU 49 + */ +U_STABLE int32_t U_EXPORT2 +u_printf_u(const UChar *patternSpecification, + ... ); + +/** + * Get a UFILE for <TT>stdout</TT>. + * @return UFILE that writes to <TT>stdout</TT> + * @stable ICU 49 + */ +U_STABLE UFILE * U_EXPORT2 +u_get_stdout(void); + +/** + * Write formatted data to a UFILE. + * @param f The UFILE to which to write. + * @param patternSpecification A pattern specifying how <TT>u_fprintf</TT> will + * interpret the variable arguments received and format the data. + * @return The number of Unicode characters written to <TT>f</TT>. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_fprintf_u(UFILE *f, + const UChar *patternSpecification, + ... ); + +/** + * Write formatted data to a UFILE. + * This is identical to <TT>u_fprintf_u</TT>, except that it will + * <EM>not</EM> call <TT>va_start</TT> and <TT>va_end</TT>. + * @param f The UFILE to which to write. + * @param patternSpecification A pattern specifying how <TT>u_fprintf</TT> will + * interpret the variable arguments received and format the data. + * @param ap The argument list to use. + * @return The number of Unicode characters written to <TT>f</TT>. + * @see u_fprintf_u + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_vfprintf_u(UFILE *f, + const UChar *patternSpecification, + va_list ap); +#endif +/** + * Write a Unicode to a UFILE. The null (U+0000) terminated UChar* + * <TT>s</TT> will be written to <TT>f</TT>, excluding the NULL terminator. + * A newline will be added to <TT>f</TT>. + * @param s The UChar* to write. + * @param f The UFILE to which to write. + * @return A non-negative number if successful, EOF otherwise. + * @see u_file_write + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_fputs(const UChar *s, + UFILE *f); + +/** + * Write a UChar to a UFILE. + * @param uc The UChar to write. + * @param f The UFILE to which to write. + * @return The character written if successful, EOF otherwise. + * @stable ICU 3.0 + */ +U_STABLE UChar32 U_EXPORT2 +u_fputc(UChar32 uc, + UFILE *f); + +/** + * Write Unicode to a UFILE. + * The ustring passed in will be converted to the UFILE's underlying + * codepage before it is written. + * @param ustring A pointer to the Unicode data to write. + * @param count The number of Unicode characters to write + * @param f The UFILE to which to write. + * @return The number of Unicode characters written. + * @see u_fputs + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_file_write(const UChar *ustring, + int32_t count, + UFILE *f); + + +/* Input functions */ +#if !UCONFIG_NO_FORMATTING + +/** + * Read formatted data from a UFILE. + * @param f The UFILE from which to read. + * @param patternSpecification A pattern specifying how <TT>u_fscanf</TT> will + * interpret the variable arguments received and parse the data. + * @return The number of items successfully converted and assigned, or EOF + * if an error occurred. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_fscanf(UFILE *f, + const char *patternSpecification, + ... ); + +/** + * Read formatted data from a UFILE. + * This is identical to <TT>u_fscanf</TT>, except that it will + * <EM>not</EM> call <TT>va_start</TT> and <TT>va_end</TT>. + * @param f The UFILE from which to read. + * @param patternSpecification A pattern specifying how <TT>u_fscanf</TT> will + * interpret the variable arguments received and parse the data. + * @param ap The argument list to use. + * @return The number of items successfully converted and assigned, or EOF + * if an error occurred. + * @see u_fscanf + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_vfscanf(UFILE *f, + const char *patternSpecification, + va_list ap); + +/** + * Read formatted data from a UFILE. + * @param f The UFILE from which to read. + * @param patternSpecification A pattern specifying how <TT>u_fscanf</TT> will + * interpret the variable arguments received and parse the data. + * @return The number of items successfully converted and assigned, or EOF + * if an error occurred. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_fscanf_u(UFILE *f, + const UChar *patternSpecification, + ... ); + +/** + * Read formatted data from a UFILE. + * This is identical to <TT>u_fscanf_u</TT>, except that it will + * <EM>not</EM> call <TT>va_start</TT> and <TT>va_end</TT>. + * @param f The UFILE from which to read. + * @param patternSpecification A pattern specifying how <TT>u_fscanf</TT> will + * interpret the variable arguments received and parse the data. + * @param ap The argument list to use. + * @return The number of items successfully converted and assigned, or EOF + * if an error occurred. + * @see u_fscanf_u + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_vfscanf_u(UFILE *f, + const UChar *patternSpecification, + va_list ap); +#endif + +/** + * Read one line of text into a UChar* string from a UFILE. The newline + * at the end of the line is read into the string. The string is always + * null terminated + * @param f The UFILE from which to read. + * @param n The maximum number of characters - 1 to read. + * @param s The UChar* to receive the read data. Characters will be + * stored successively in <TT>s</TT> until a newline or EOF is + * reached. A null character (U+0000) will be appended to <TT>s</TT>. + * @return A pointer to <TT>s</TT>, or NULL if no characters were available. + * @stable ICU 3.0 + */ +U_STABLE UChar* U_EXPORT2 +u_fgets(UChar *s, + int32_t n, + UFILE *f); + +/** + * Read a UChar from a UFILE. It is recommended that <TT>u_fgetcx</TT> + * used instead for proper parsing functions, but sometimes reading + * code units is needed instead of codepoints. + * + * @param f The UFILE from which to read. + * @return The UChar value read, or U+FFFF if no character was available. + * @stable ICU 3.0 + */ +U_STABLE UChar U_EXPORT2 +u_fgetc(UFILE *f); + +/** + * Read a UChar32 from a UFILE. + * + * @param f The UFILE from which to read. + * @return The UChar32 value read, or U_EOF if no character was + * available, or U+FFFFFFFF if an ill-formed character was + * encountered. + * @see u_unescape() + * @stable ICU 3.0 + */ +U_STABLE UChar32 U_EXPORT2 +u_fgetcx(UFILE *f); + +/** + * Unget a UChar from a UFILE. + * If this function is not the first to operate on <TT>f</TT> after a call + * to <TT>u_fgetc</TT>, the results are undefined. + * If this function is passed a character that was not recieved from the + * previous <TT>u_fgetc</TT> or <TT>u_fgetcx</TT> call, the results are undefined. + * @param c The UChar to put back on the stream. + * @param f The UFILE to receive <TT>c</TT>. + * @return The UChar32 value put back if successful, U_EOF otherwise. + * @stable ICU 3.0 + */ +U_STABLE UChar32 U_EXPORT2 +u_fungetc(UChar32 c, + UFILE *f); + +/** + * Read Unicode from a UFILE. + * Bytes will be converted from the UFILE's underlying codepage, with + * subsequent conversion to Unicode. The data will not be NULL terminated. + * @param chars A pointer to receive the Unicode data. + * @param count The number of Unicode characters to read. + * @param f The UFILE from which to read. + * @return The number of Unicode characters read. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_file_read(UChar *chars, + int32_t count, + UFILE *f); + +#if !UCONFIG_NO_TRANSLITERATION + +/** + * Set a transliterator on the UFILE. The transliterator will be owned by the + * UFILE. + * @param file The UFILE to set transliteration on + * @param adopt The UTransliterator to set. Can be NULL, which will + * mean that no transliteration is used. + * @param direction either U_READ, U_WRITE, or U_READWRITE - sets + * which direction the transliterator is to be applied to. If + * U_READWRITE, the "Read" transliteration will be in the inverse + * direction. + * @param status ICU error code. + * @return The previously set transliterator, owned by the + * caller. If U_READWRITE is specified, only the WRITE transliterator + * is returned. In most cases, the caller should call utrans_close() + * on the result of this function. + * @stable ICU 3.0 + */ +U_STABLE UTransliterator* U_EXPORT2 +u_fsettransliterator(UFILE *file, UFileDirection direction, + UTransliterator *adopt, UErrorCode *status); + +#endif + + +/* Output string functions */ +#if !UCONFIG_NO_FORMATTING + + +/** + * Write formatted data to a Unicode string. + * + * @param buffer The Unicode String to which to write. + * @param patternSpecification A pattern specifying how <TT>u_sprintf</TT> will + * interpret the variable arguments received and format the data. + * @return The number of Unicode code units written to <TT>buffer</TT>. This + * does not include the terminating null character. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_sprintf(UChar *buffer, + const char *patternSpecification, + ... ); + +/** + * Write formatted data to a Unicode string. When the number of code units + * required to store the data exceeds <TT>count</TT>, then <TT>count</TT> code + * units of data are stored in <TT>buffer</TT> and a negative value is + * returned. When the number of code units required to store the data equals + * <TT>count</TT>, the string is not null terminated and <TT>count</TT> is + * returned. + * + * @param buffer The Unicode String to which to write. + * @param count The number of code units to read. + * @param patternSpecification A pattern specifying how <TT>u_sprintf</TT> will + * interpret the variable arguments received and format the data. + * @return The number of Unicode characters that would have been written to + * <TT>buffer</TT> had count been sufficiently large. This does not include + * the terminating null character. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_snprintf(UChar *buffer, + int32_t count, + const char *patternSpecification, + ... ); + +/** + * Write formatted data to a Unicode string. + * This is identical to <TT>u_sprintf</TT>, except that it will + * <EM>not</EM> call <TT>va_start</TT> and <TT>va_end</TT>. + * + * @param buffer The Unicode string to which to write. + * @param patternSpecification A pattern specifying how <TT>u_sprintf</TT> will + * interpret the variable arguments received and format the data. + * @param ap The argument list to use. + * @return The number of Unicode characters written to <TT>buffer</TT>. + * @see u_sprintf + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_vsprintf(UChar *buffer, + const char *patternSpecification, + va_list ap); + +/** + * Write formatted data to a Unicode string. + * This is identical to <TT>u_snprintf</TT>, except that it will + * <EM>not</EM> call <TT>va_start</TT> and <TT>va_end</TT>.<br><br> + * When the number of code units required to store the data exceeds + * <TT>count</TT>, then <TT>count</TT> code units of data are stored in + * <TT>buffer</TT> and a negative value is returned. When the number of code + * units required to store the data equals <TT>count</TT>, the string is not + * null terminated and <TT>count</TT> is returned. + * + * @param buffer The Unicode string to which to write. + * @param count The number of code units to read. + * @param patternSpecification A pattern specifying how <TT>u_sprintf</TT> will + * interpret the variable arguments received and format the data. + * @param ap The argument list to use. + * @return The number of Unicode characters that would have been written to + * <TT>buffer</TT> had count been sufficiently large. + * @see u_sprintf + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_vsnprintf(UChar *buffer, + int32_t count, + const char *patternSpecification, + va_list ap); + +/** + * Write formatted data to a Unicode string. + * + * @param buffer The Unicode string to which to write. + * @param patternSpecification A pattern specifying how <TT>u_sprintf</TT> will + * interpret the variable arguments received and format the data. + * @return The number of Unicode characters written to <TT>buffer</TT>. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_sprintf_u(UChar *buffer, + const UChar *patternSpecification, + ... ); + +/** + * Write formatted data to a Unicode string. When the number of code units + * required to store the data exceeds <TT>count</TT>, then <TT>count</TT> code + * units of data are stored in <TT>buffer</TT> and a negative value is + * returned. When the number of code units required to store the data equals + * <TT>count</TT>, the string is not null terminated and <TT>count</TT> is + * returned. + * + * @param buffer The Unicode string to which to write. + * @param count The number of code units to read. + * @param patternSpecification A pattern specifying how <TT>u_sprintf</TT> will + * interpret the variable arguments received and format the data. + * @return The number of Unicode characters that would have been written to + * <TT>buffer</TT> had count been sufficiently large. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_snprintf_u(UChar *buffer, + int32_t count, + const UChar *patternSpecification, + ... ); + +/** + * Write formatted data to a Unicode string. + * This is identical to <TT>u_sprintf_u</TT>, except that it will + * <EM>not</EM> call <TT>va_start</TT> and <TT>va_end</TT>. + * + * @param buffer The Unicode string to which to write. + * @param patternSpecification A pattern specifying how <TT>u_sprintf</TT> will + * interpret the variable arguments received and format the data. + * @param ap The argument list to use. + * @return The number of Unicode characters written to <TT>f</TT>. + * @see u_sprintf_u + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_vsprintf_u(UChar *buffer, + const UChar *patternSpecification, + va_list ap); + +/** + * Write formatted data to a Unicode string. + * This is identical to <TT>u_snprintf_u</TT>, except that it will + * <EM>not</EM> call <TT>va_start</TT> and <TT>va_end</TT>. + * When the number of code units required to store the data exceeds + * <TT>count</TT>, then <TT>count</TT> code units of data are stored in + * <TT>buffer</TT> and a negative value is returned. When the number of code + * units required to store the data equals <TT>count</TT>, the string is not + * null terminated and <TT>count</TT> is returned. + * + * @param buffer The Unicode string to which to write. + * @param count The number of code units to read. + * @param patternSpecification A pattern specifying how <TT>u_sprintf</TT> will + * interpret the variable arguments received and format the data. + * @param ap The argument list to use. + * @return The number of Unicode characters that would have been written to + * <TT>f</TT> had count been sufficiently large. + * @see u_sprintf_u + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_vsnprintf_u(UChar *buffer, + int32_t count, + const UChar *patternSpecification, + va_list ap); + +/* Input string functions */ + +/** + * Read formatted data from a Unicode string. + * + * @param buffer The Unicode string from which to read. + * @param patternSpecification A pattern specifying how <TT>u_sscanf</TT> will + * interpret the variable arguments received and parse the data. + * @return The number of items successfully converted and assigned, or EOF + * if an error occurred. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_sscanf(const UChar *buffer, + const char *patternSpecification, + ... ); + +/** + * Read formatted data from a Unicode string. + * This is identical to <TT>u_sscanf</TT>, except that it will + * <EM>not</EM> call <TT>va_start</TT> and <TT>va_end</TT>. + * + * @param buffer The Unicode string from which to read. + * @param patternSpecification A pattern specifying how <TT>u_sscanf</TT> will + * interpret the variable arguments received and parse the data. + * @param ap The argument list to use. + * @return The number of items successfully converted and assigned, or EOF + * if an error occurred. + * @see u_sscanf + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_vsscanf(const UChar *buffer, + const char *patternSpecification, + va_list ap); + +/** + * Read formatted data from a Unicode string. + * + * @param buffer The Unicode string from which to read. + * @param patternSpecification A pattern specifying how <TT>u_sscanf</TT> will + * interpret the variable arguments received and parse the data. + * @return The number of items successfully converted and assigned, or EOF + * if an error occurred. + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_sscanf_u(const UChar *buffer, + const UChar *patternSpecification, + ... ); + +/** + * Read formatted data from a Unicode string. + * This is identical to <TT>u_sscanf_u</TT>, except that it will + * <EM>not</EM> call <TT>va_start</TT> and <TT>va_end</TT>. + * + * @param buffer The Unicode string from which to read. + * @param patternSpecification A pattern specifying how <TT>u_sscanf</TT> will + * interpret the variable arguments received and parse the data. + * @param ap The argument list to use. + * @return The number of items successfully converted and assigned, or EOF + * if an error occurred. + * @see u_sscanf_u + * @stable ICU 3.0 + */ +U_STABLE int32_t U_EXPORT2 +u_vsscanf_u(const UChar *buffer, + const UChar *patternSpecification, + va_list ap); + + +#endif +#endif +#endif + + diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ustream.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ustream.h new file mode 100755 index 00000000..c10ce6a2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ustream.h @@ -0,0 +1,63 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 2001-2014 International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* FILE NAME : ustream.h +* +* Modification History: +* +* Date Name Description +* 06/25/2001 grhoten Move iostream from unistr.h +****************************************************************************** +*/ + +#ifndef USTREAM_H +#define USTREAM_H + +#include "unicode/unistr.h" + +#if !UCONFIG_NO_CONVERSION // not available without conversion + +/** + * \file + * \brief C++ API: Unicode iostream like API + * + * At this time, this API is very limited. It contains + * operator<< and operator>> for UnicodeString manipulation with the + * C++ I/O stream API. + */ + +#if defined(__GLIBCXX__) +namespace std { class type_info; } // WORKAROUND: http://llvm.org/bugs/show_bug.cgi?id=13364 +#endif + +#include <iostream> + +U_NAMESPACE_BEGIN + +/** + * Write the contents of a UnicodeString to a C++ ostream. This functions writes + * the characters in a UnicodeString to an ostream. The UChars in the + * UnicodeString are converted to the char based ostream with the default + * converter. + * @stable 3.0 + */ +U_IO_API std::ostream & U_EXPORT2 operator<<(std::ostream& stream, const UnicodeString& s); + +/** + * Write the contents from a C++ istream to a UnicodeString. The UChars in the + * UnicodeString are converted from the char based istream with the default + * converter. + * @stable 3.0 + */ +U_IO_API std::istream & U_EXPORT2 operator>>(std::istream& stream, UnicodeString& s); +U_NAMESPACE_END + +#endif + +/* No operator for UChar because it can conflict with wchar_t */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ustring.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ustring.h new file mode 100755 index 00000000..f9fc41a1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ustring.h @@ -0,0 +1,1692 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 1998-2014, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* +* File ustring.h +* +* Modification History: +* +* Date Name Description +* 12/07/98 bertrand Creation. +****************************************************************************** +*/ + +#ifndef USTRING_H +#define USTRING_H + +#include "unicode/utypes.h" +#include "unicode/putil.h" +#include "unicode/uiter.h" + +/** + * \def UBRK_TYPEDEF_UBREAK_ITERATOR + * @internal + */ + +#ifndef UBRK_TYPEDEF_UBREAK_ITERATOR +# define UBRK_TYPEDEF_UBREAK_ITERATOR +/** Simple declaration for u_strToTitle() to avoid including unicode/ubrk.h. @stable ICU 2.1*/ + typedef struct UBreakIterator UBreakIterator; +#endif + +/** + * \file + * \brief C API: Unicode string handling functions + * + * These C API functions provide general Unicode string handling. + * + * Some functions are equivalent in name, signature, and behavior to the ANSI C <string.h> + * functions. (For example, they do not check for bad arguments like NULL string pointers.) + * In some cases, only the thread-safe variant of such a function is implemented here + * (see u_strtok_r()). + * + * Other functions provide more Unicode-specific functionality like locale-specific + * upper/lower-casing and string comparison in code point order. + * + * ICU uses 16-bit Unicode (UTF-16) in the form of arrays of UChar code units. + * UTF-16 encodes each Unicode code point with either one or two UChar code units. + * (This is the default form of Unicode, and a forward-compatible extension of the original, + * fixed-width form that was known as UCS-2. UTF-16 superseded UCS-2 with Unicode 2.0 + * in 1996.) + * + * Some APIs accept a 32-bit UChar32 value for a single code point. + * + * ICU also handles 16-bit Unicode text with unpaired surrogates. + * Such text is not well-formed UTF-16. + * Code-point-related functions treat unpaired surrogates as surrogate code points, + * i.e., as separate units. + * + * Although UTF-16 is a variable-width encoding form (like some legacy multi-byte encodings), + * it is much more efficient even for random access because the code unit values + * for single-unit characters vs. lead units vs. trail units are completely disjoint. + * This means that it is easy to determine character (code point) boundaries from + * random offsets in the string. + * + * Unicode (UTF-16) string processing is optimized for the single-unit case. + * Although it is important to support supplementary characters + * (which use pairs of lead/trail code units called "surrogates"), + * their occurrence is rare. Almost all characters in modern use require only + * a single UChar code unit (i.e., their code point values are <=0xffff). + * + * For more details see the User Guide Strings chapter (http://icu-project.org/userguide/strings.html). + * For a discussion of the handling of unpaired surrogates see also + * Jitterbug 2145 and its icu mailing list proposal on 2002-sep-18. + */ + +/** + * \defgroup ustring_ustrlen String Length + * \ingroup ustring_strlen + */ +/*@{*/ +/** + * Determine the length of an array of UChar. + * + * @param s The array of UChars, NULL (U+0000) terminated. + * @return The number of UChars in <code>chars</code>, minus the terminator. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_strlen(const UChar *s); +/*@}*/ + +/** + * Count Unicode code points in the length UChar code units of the string. + * A code point may occupy either one or two UChar code units. + * Counting code points involves reading all code units. + * + * This functions is basically the inverse of the U16_FWD_N() macro (see utf.h). + * + * @param s The input string. + * @param length The number of UChar code units to be checked, or -1 to count all + * code points before the first NUL (U+0000). + * @return The number of code points in the specified code units. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_countChar32(const UChar *s, int32_t length); + +/** + * Check if the string contains more Unicode code points than a certain number. + * This is more efficient than counting all code points in the entire string + * and comparing that number with a threshold. + * This function may not need to scan the string at all if the length is known + * (not -1 for NUL-termination) and falls within a certain range, and + * never needs to count more than 'number+1' code points. + * Logically equivalent to (u_countChar32(s, length)>number). + * A Unicode code point may occupy either one or two UChar code units. + * + * @param s The input string. + * @param length The length of the string, or -1 if it is NUL-terminated. + * @param number The number of code points in the string is compared against + * the 'number' parameter. + * @return Boolean value for whether the string contains more Unicode code points + * than 'number'. Same as (u_countChar32(s, length)>number). + * @stable ICU 2.4 + */ +U_STABLE UBool U_EXPORT2 +u_strHasMoreChar32Than(const UChar *s, int32_t length, int32_t number); + +/** + * Concatenate two ustrings. Appends a copy of <code>src</code>, + * including the null terminator, to <code>dst</code>. The initial copied + * character from <code>src</code> overwrites the null terminator in <code>dst</code>. + * + * @param dst The destination string. + * @param src The source string. + * @return A pointer to <code>dst</code>. + * @stable ICU 2.0 + */ +U_STABLE UChar* U_EXPORT2 +u_strcat(UChar *dst, + const UChar *src); + +/** + * Concatenate two ustrings. + * Appends at most <code>n</code> characters from <code>src</code> to <code>dst</code>. + * Adds a terminating NUL. + * If src is too long, then only <code>n-1</code> characters will be copied + * before the terminating NUL. + * If <code>n<=0</code> then dst is not modified. + * + * @param dst The destination string. + * @param src The source string (can be NULL/invalid if n<=0). + * @param n The maximum number of characters to append; no-op if <=0. + * @return A pointer to <code>dst</code>. + * @stable ICU 2.0 + */ +U_STABLE UChar* U_EXPORT2 +u_strncat(UChar *dst, + const UChar *src, + int32_t n); + +/** + * Find the first occurrence of a substring in a string. + * The substring is found at code point boundaries. + * That means that if the substring begins with + * a trail surrogate or ends with a lead surrogate, + * then it is found only if these surrogates stand alone in the text. + * Otherwise, the substring edge units would be matched against + * halves of surrogate pairs. + * + * @param s The string to search (NUL-terminated). + * @param substring The substring to find (NUL-terminated). + * @return A pointer to the first occurrence of <code>substring</code> in <code>s</code>, + * or <code>s</code> itself if the <code>substring</code> is empty, + * or <code>NULL</code> if <code>substring</code> is not in <code>s</code>. + * @stable ICU 2.0 + * + * @see u_strrstr + * @see u_strFindFirst + * @see u_strFindLast + */ +U_STABLE UChar * U_EXPORT2 +u_strstr(const UChar *s, const UChar *substring); + +/** + * Find the first occurrence of a substring in a string. + * The substring is found at code point boundaries. + * That means that if the substring begins with + * a trail surrogate or ends with a lead surrogate, + * then it is found only if these surrogates stand alone in the text. + * Otherwise, the substring edge units would be matched against + * halves of surrogate pairs. + * + * @param s The string to search. + * @param length The length of s (number of UChars), or -1 if it is NUL-terminated. + * @param substring The substring to find (NUL-terminated). + * @param subLength The length of substring (number of UChars), or -1 if it is NUL-terminated. + * @return A pointer to the first occurrence of <code>substring</code> in <code>s</code>, + * or <code>s</code> itself if the <code>substring</code> is empty, + * or <code>NULL</code> if <code>substring</code> is not in <code>s</code>. + * @stable ICU 2.4 + * + * @see u_strstr + * @see u_strFindLast + */ +U_STABLE UChar * U_EXPORT2 +u_strFindFirst(const UChar *s, int32_t length, const UChar *substring, int32_t subLength); + +/** + * Find the first occurrence of a BMP code point in a string. + * A surrogate code point is found only if its match in the text is not + * part of a surrogate pair. + * A NUL character is found at the string terminator. + * + * @param s The string to search (NUL-terminated). + * @param c The BMP code point to find. + * @return A pointer to the first occurrence of <code>c</code> in <code>s</code> + * or <code>NULL</code> if <code>c</code> is not in <code>s</code>. + * @stable ICU 2.0 + * + * @see u_strchr32 + * @see u_memchr + * @see u_strstr + * @see u_strFindFirst + */ +U_STABLE UChar * U_EXPORT2 +u_strchr(const UChar *s, UChar c); + +/** + * Find the first occurrence of a code point in a string. + * A surrogate code point is found only if its match in the text is not + * part of a surrogate pair. + * A NUL character is found at the string terminator. + * + * @param s The string to search (NUL-terminated). + * @param c The code point to find. + * @return A pointer to the first occurrence of <code>c</code> in <code>s</code> + * or <code>NULL</code> if <code>c</code> is not in <code>s</code>. + * @stable ICU 2.0 + * + * @see u_strchr + * @see u_memchr32 + * @see u_strstr + * @see u_strFindFirst + */ +U_STABLE UChar * U_EXPORT2 +u_strchr32(const UChar *s, UChar32 c); + +/** + * Find the last occurrence of a substring in a string. + * The substring is found at code point boundaries. + * That means that if the substring begins with + * a trail surrogate or ends with a lead surrogate, + * then it is found only if these surrogates stand alone in the text. + * Otherwise, the substring edge units would be matched against + * halves of surrogate pairs. + * + * @param s The string to search (NUL-terminated). + * @param substring The substring to find (NUL-terminated). + * @return A pointer to the last occurrence of <code>substring</code> in <code>s</code>, + * or <code>s</code> itself if the <code>substring</code> is empty, + * or <code>NULL</code> if <code>substring</code> is not in <code>s</code>. + * @stable ICU 2.4 + * + * @see u_strstr + * @see u_strFindFirst + * @see u_strFindLast + */ +U_STABLE UChar * U_EXPORT2 +u_strrstr(const UChar *s, const UChar *substring); + +/** + * Find the last occurrence of a substring in a string. + * The substring is found at code point boundaries. + * That means that if the substring begins with + * a trail surrogate or ends with a lead surrogate, + * then it is found only if these surrogates stand alone in the text. + * Otherwise, the substring edge units would be matched against + * halves of surrogate pairs. + * + * @param s The string to search. + * @param length The length of s (number of UChars), or -1 if it is NUL-terminated. + * @param substring The substring to find (NUL-terminated). + * @param subLength The length of substring (number of UChars), or -1 if it is NUL-terminated. + * @return A pointer to the last occurrence of <code>substring</code> in <code>s</code>, + * or <code>s</code> itself if the <code>substring</code> is empty, + * or <code>NULL</code> if <code>substring</code> is not in <code>s</code>. + * @stable ICU 2.4 + * + * @see u_strstr + * @see u_strFindLast + */ +U_STABLE UChar * U_EXPORT2 +u_strFindLast(const UChar *s, int32_t length, const UChar *substring, int32_t subLength); + +/** + * Find the last occurrence of a BMP code point in a string. + * A surrogate code point is found only if its match in the text is not + * part of a surrogate pair. + * A NUL character is found at the string terminator. + * + * @param s The string to search (NUL-terminated). + * @param c The BMP code point to find. + * @return A pointer to the last occurrence of <code>c</code> in <code>s</code> + * or <code>NULL</code> if <code>c</code> is not in <code>s</code>. + * @stable ICU 2.4 + * + * @see u_strrchr32 + * @see u_memrchr + * @see u_strrstr + * @see u_strFindLast + */ +U_STABLE UChar * U_EXPORT2 +u_strrchr(const UChar *s, UChar c); + +/** + * Find the last occurrence of a code point in a string. + * A surrogate code point is found only if its match in the text is not + * part of a surrogate pair. + * A NUL character is found at the string terminator. + * + * @param s The string to search (NUL-terminated). + * @param c The code point to find. + * @return A pointer to the last occurrence of <code>c</code> in <code>s</code> + * or <code>NULL</code> if <code>c</code> is not in <code>s</code>. + * @stable ICU 2.4 + * + * @see u_strrchr + * @see u_memchr32 + * @see u_strrstr + * @see u_strFindLast + */ +U_STABLE UChar * U_EXPORT2 +u_strrchr32(const UChar *s, UChar32 c); + +/** + * Locates the first occurrence in the string <code>string</code> of any of the characters + * in the string <code>matchSet</code>. + * Works just like C's strpbrk but with Unicode. + * + * @param string The string in which to search, NUL-terminated. + * @param matchSet A NUL-terminated string defining a set of code points + * for which to search in the text string. + * @return A pointer to the character in <code>string</code> that matches one of the + * characters in <code>matchSet</code>, or NULL if no such character is found. + * @stable ICU 2.0 + */ +U_STABLE UChar * U_EXPORT2 +u_strpbrk(const UChar *string, const UChar *matchSet); + +/** + * Returns the number of consecutive characters in <code>string</code>, + * beginning with the first, that do not occur somewhere in <code>matchSet</code>. + * Works just like C's strcspn but with Unicode. + * + * @param string The string in which to search, NUL-terminated. + * @param matchSet A NUL-terminated string defining a set of code points + * for which to search in the text string. + * @return The number of initial characters in <code>string</code> that do not + * occur in <code>matchSet</code>. + * @see u_strspn + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_strcspn(const UChar *string, const UChar *matchSet); + +/** + * Returns the number of consecutive characters in <code>string</code>, + * beginning with the first, that occur somewhere in <code>matchSet</code>. + * Works just like C's strspn but with Unicode. + * + * @param string The string in which to search, NUL-terminated. + * @param matchSet A NUL-terminated string defining a set of code points + * for which to search in the text string. + * @return The number of initial characters in <code>string</code> that do + * occur in <code>matchSet</code>. + * @see u_strcspn + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_strspn(const UChar *string, const UChar *matchSet); + +/** + * The string tokenizer API allows an application to break a string into + * tokens. Unlike strtok(), the saveState (the current pointer within the + * original string) is maintained in saveState. In the first call, the + * argument src is a pointer to the string. In subsequent calls to + * return successive tokens of that string, src must be specified as + * NULL. The value saveState is set by this function to maintain the + * function's position within the string, and on each subsequent call + * you must give this argument the same variable. This function does + * handle surrogate pairs. This function is similar to the strtok_r() + * the POSIX Threads Extension (1003.1c-1995) version. + * + * @param src String containing token(s). This string will be modified. + * After the first call to u_strtok_r(), this argument must + * be NULL to get to the next token. + * @param delim Set of delimiter characters (Unicode code points). + * @param saveState The current pointer within the original string, + * which is set by this function. The saveState + * parameter should the address of a local variable of type + * UChar *. (i.e. defined "UChar *myLocalSaveState" and use + * &myLocalSaveState for this parameter). + * @return A pointer to the next token found in src, or NULL + * when there are no more tokens. + * @stable ICU 2.0 + */ +U_STABLE UChar * U_EXPORT2 +u_strtok_r(UChar *src, + const UChar *delim, + UChar **saveState); + +/** + * Compare two Unicode strings for bitwise equality (code unit order). + * + * @param s1 A string to compare. + * @param s2 A string to compare. + * @return 0 if <code>s1</code> and <code>s2</code> are bitwise equal; a negative + * value if <code>s1</code> is bitwise less than <code>s2,</code>; a positive + * value if <code>s1</code> is bitwise greater than <code>s2</code>. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_strcmp(const UChar *s1, + const UChar *s2); + +/** + * Compare two Unicode strings in code point order. + * See u_strCompare for details. + * + * @param s1 A string to compare. + * @param s2 A string to compare. + * @return a negative/zero/positive integer corresponding to whether + * the first string is less than/equal to/greater than the second one + * in code point order + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_strcmpCodePointOrder(const UChar *s1, const UChar *s2); + +/** + * Compare two Unicode strings (binary order). + * + * The comparison can be done in code unit order or in code point order. + * They differ only in UTF-16 when + * comparing supplementary code points (U+10000..U+10ffff) + * to BMP code points near the end of the BMP (i.e., U+e000..U+ffff). + * In code unit order, high BMP code points sort after supplementary code points + * because they are stored as pairs of surrogates which are at U+d800..U+dfff. + * + * This functions works with strings of different explicitly specified lengths + * unlike the ANSI C-like u_strcmp() and u_memcmp() etc. + * NUL-terminated strings are possible with length arguments of -1. + * + * @param s1 First source string. + * @param length1 Length of first source string, or -1 if NUL-terminated. + * + * @param s2 Second source string. + * @param length2 Length of second source string, or -1 if NUL-terminated. + * + * @param codePointOrder Choose between code unit order (FALSE) + * and code point order (TRUE). + * + * @return <0 or 0 or >0 as usual for string comparisons + * + * @stable ICU 2.2 + */ +U_STABLE int32_t U_EXPORT2 +u_strCompare(const UChar *s1, int32_t length1, + const UChar *s2, int32_t length2, + UBool codePointOrder); + +/** + * Compare two Unicode strings (binary order) + * as presented by UCharIterator objects. + * Works otherwise just like u_strCompare(). + * + * Both iterators are reset to their start positions. + * When the function returns, it is undefined where the iterators + * have stopped. + * + * @param iter1 First source string iterator. + * @param iter2 Second source string iterator. + * @param codePointOrder Choose between code unit order (FALSE) + * and code point order (TRUE). + * + * @return <0 or 0 or >0 as usual for string comparisons + * + * @see u_strCompare + * + * @stable ICU 2.6 + */ +U_STABLE int32_t U_EXPORT2 +u_strCompareIter(UCharIterator *iter1, UCharIterator *iter2, UBool codePointOrder); + +/** + * Compare two strings case-insensitively using full case folding. + * This is equivalent to + * u_strCompare(u_strFoldCase(s1, options), + * u_strFoldCase(s2, options), + * (options&U_COMPARE_CODE_POINT_ORDER)!=0). + * + * The comparison can be done in UTF-16 code unit order or in code point order. + * They differ only when comparing supplementary code points (U+10000..U+10ffff) + * to BMP code points near the end of the BMP (i.e., U+e000..U+ffff). + * In code unit order, high BMP code points sort after supplementary code points + * because they are stored as pairs of surrogates which are at U+d800..U+dfff. + * + * This functions works with strings of different explicitly specified lengths + * unlike the ANSI C-like u_strcmp() and u_memcmp() etc. + * NUL-terminated strings are possible with length arguments of -1. + * + * @param s1 First source string. + * @param length1 Length of first source string, or -1 if NUL-terminated. + * + * @param s2 Second source string. + * @param length2 Length of second source string, or -1 if NUL-terminated. + * + * @param options A bit set of options: + * - U_FOLD_CASE_DEFAULT or 0 is used for default options: + * Comparison in code unit order with default case folding. + * + * - U_COMPARE_CODE_POINT_ORDER + * Set to choose code point order instead of code unit order + * (see u_strCompare for details). + * + * - U_FOLD_CASE_EXCLUDE_SPECIAL_I + * + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * + * @return <0 or 0 or >0 as usual for string comparisons + * + * @stable ICU 2.2 + */ +U_STABLE int32_t U_EXPORT2 +u_strCaseCompare(const UChar *s1, int32_t length1, + const UChar *s2, int32_t length2, + uint32_t options, + UErrorCode *pErrorCode); + +/** + * Compare two ustrings for bitwise equality. + * Compares at most <code>n</code> characters. + * + * @param ucs1 A string to compare (can be NULL/invalid if n<=0). + * @param ucs2 A string to compare (can be NULL/invalid if n<=0). + * @param n The maximum number of characters to compare; always returns 0 if n<=0. + * @return 0 if <code>s1</code> and <code>s2</code> are bitwise equal; a negative + * value if <code>s1</code> is bitwise less than <code>s2</code>; a positive + * value if <code>s1</code> is bitwise greater than <code>s2</code>. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_strncmp(const UChar *ucs1, + const UChar *ucs2, + int32_t n); + +/** + * Compare two Unicode strings in code point order. + * This is different in UTF-16 from u_strncmp() if supplementary characters are present. + * For details, see u_strCompare(). + * + * @param s1 A string to compare. + * @param s2 A string to compare. + * @param n The maximum number of characters to compare. + * @return a negative/zero/positive integer corresponding to whether + * the first string is less than/equal to/greater than the second one + * in code point order + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_strncmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t n); + +/** + * Compare two strings case-insensitively using full case folding. + * This is equivalent to u_strcmp(u_strFoldCase(s1, options), u_strFoldCase(s2, options)). + * + * @param s1 A string to compare. + * @param s2 A string to compare. + * @param options A bit set of options: + * - U_FOLD_CASE_DEFAULT or 0 is used for default options: + * Comparison in code unit order with default case folding. + * + * - U_COMPARE_CODE_POINT_ORDER + * Set to choose code point order instead of code unit order + * (see u_strCompare for details). + * + * - U_FOLD_CASE_EXCLUDE_SPECIAL_I + * + * @return A negative, zero, or positive integer indicating the comparison result. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_strcasecmp(const UChar *s1, const UChar *s2, uint32_t options); + +/** + * Compare two strings case-insensitively using full case folding. + * This is equivalent to u_strcmp(u_strFoldCase(s1, at most n, options), + * u_strFoldCase(s2, at most n, options)). + * + * @param s1 A string to compare. + * @param s2 A string to compare. + * @param n The maximum number of characters each string to case-fold and then compare. + * @param options A bit set of options: + * - U_FOLD_CASE_DEFAULT or 0 is used for default options: + * Comparison in code unit order with default case folding. + * + * - U_COMPARE_CODE_POINT_ORDER + * Set to choose code point order instead of code unit order + * (see u_strCompare for details). + * + * - U_FOLD_CASE_EXCLUDE_SPECIAL_I + * + * @return A negative, zero, or positive integer indicating the comparison result. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_strncasecmp(const UChar *s1, const UChar *s2, int32_t n, uint32_t options); + +/** + * Compare two strings case-insensitively using full case folding. + * This is equivalent to u_strcmp(u_strFoldCase(s1, n, options), + * u_strFoldCase(s2, n, options)). + * + * @param s1 A string to compare. + * @param s2 A string to compare. + * @param length The number of characters in each string to case-fold and then compare. + * @param options A bit set of options: + * - U_FOLD_CASE_DEFAULT or 0 is used for default options: + * Comparison in code unit order with default case folding. + * + * - U_COMPARE_CODE_POINT_ORDER + * Set to choose code point order instead of code unit order + * (see u_strCompare for details). + * + * - U_FOLD_CASE_EXCLUDE_SPECIAL_I + * + * @return A negative, zero, or positive integer indicating the comparison result. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_memcasecmp(const UChar *s1, const UChar *s2, int32_t length, uint32_t options); + +/** + * Copy a ustring. Adds a null terminator. + * + * @param dst The destination string. + * @param src The source string. + * @return A pointer to <code>dst</code>. + * @stable ICU 2.0 + */ +U_STABLE UChar* U_EXPORT2 +u_strcpy(UChar *dst, + const UChar *src); + +/** + * Copy a ustring. + * Copies at most <code>n</code> characters. The result will be null terminated + * if the length of <code>src</code> is less than <code>n</code>. + * + * @param dst The destination string. + * @param src The source string (can be NULL/invalid if n<=0). + * @param n The maximum number of characters to copy; no-op if <=0. + * @return A pointer to <code>dst</code>. + * @stable ICU 2.0 + */ +U_STABLE UChar* U_EXPORT2 +u_strncpy(UChar *dst, + const UChar *src, + int32_t n); + +#if !UCONFIG_NO_CONVERSION + +/** + * Copy a byte string encoded in the default codepage to a ustring. + * Adds a null terminator. + * Performs a host byte to UChar conversion + * + * @param dst The destination string. + * @param src The source string. + * @return A pointer to <code>dst</code>. + * @stable ICU 2.0 + */ +U_STABLE UChar* U_EXPORT2 u_uastrcpy(UChar *dst, + const char *src ); + +/** + * Copy a byte string encoded in the default codepage to a ustring. + * Copies at most <code>n</code> characters. The result will be null terminated + * if the length of <code>src</code> is less than <code>n</code>. + * Performs a host byte to UChar conversion + * + * @param dst The destination string. + * @param src The source string. + * @param n The maximum number of characters to copy. + * @return A pointer to <code>dst</code>. + * @stable ICU 2.0 + */ +U_STABLE UChar* U_EXPORT2 u_uastrncpy(UChar *dst, + const char *src, + int32_t n); + +/** + * Copy ustring to a byte string encoded in the default codepage. + * Adds a null terminator. + * Performs a UChar to host byte conversion + * + * @param dst The destination string. + * @param src The source string. + * @return A pointer to <code>dst</code>. + * @stable ICU 2.0 + */ +U_STABLE char* U_EXPORT2 u_austrcpy(char *dst, + const UChar *src ); + +/** + * Copy ustring to a byte string encoded in the default codepage. + * Copies at most <code>n</code> characters. The result will be null terminated + * if the length of <code>src</code> is less than <code>n</code>. + * Performs a UChar to host byte conversion + * + * @param dst The destination string. + * @param src The source string. + * @param n The maximum number of characters to copy. + * @return A pointer to <code>dst</code>. + * @stable ICU 2.0 + */ +U_STABLE char* U_EXPORT2 u_austrncpy(char *dst, + const UChar *src, + int32_t n ); + +#endif + +/** + * Synonym for memcpy(), but with UChars only. + * @param dest The destination string + * @param src The source string (can be NULL/invalid if count<=0) + * @param count The number of characters to copy; no-op if <=0 + * @return A pointer to <code>dest</code> + * @stable ICU 2.0 + */ +U_STABLE UChar* U_EXPORT2 +u_memcpy(UChar *dest, const UChar *src, int32_t count); + +/** + * Synonym for memmove(), but with UChars only. + * @param dest The destination string + * @param src The source string (can be NULL/invalid if count<=0) + * @param count The number of characters to move; no-op if <=0 + * @return A pointer to <code>dest</code> + * @stable ICU 2.0 + */ +U_STABLE UChar* U_EXPORT2 +u_memmove(UChar *dest, const UChar *src, int32_t count); + +/** + * Initialize <code>count</code> characters of <code>dest</code> to <code>c</code>. + * + * @param dest The destination string. + * @param c The character to initialize the string. + * @param count The maximum number of characters to set. + * @return A pointer to <code>dest</code>. + * @stable ICU 2.0 + */ +U_STABLE UChar* U_EXPORT2 +u_memset(UChar *dest, UChar c, int32_t count); + +/** + * Compare the first <code>count</code> UChars of each buffer. + * + * @param buf1 The first string to compare. + * @param buf2 The second string to compare. + * @param count The maximum number of UChars to compare. + * @return When buf1 < buf2, a negative number is returned. + * When buf1 == buf2, 0 is returned. + * When buf1 > buf2, a positive number is returned. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_memcmp(const UChar *buf1, const UChar *buf2, int32_t count); + +/** + * Compare two Unicode strings in code point order. + * This is different in UTF-16 from u_memcmp() if supplementary characters are present. + * For details, see u_strCompare(). + * + * @param s1 A string to compare. + * @param s2 A string to compare. + * @param count The maximum number of characters to compare. + * @return a negative/zero/positive integer corresponding to whether + * the first string is less than/equal to/greater than the second one + * in code point order + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_memcmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t count); + +/** + * Find the first occurrence of a BMP code point in a string. + * A surrogate code point is found only if its match in the text is not + * part of a surrogate pair. + * A NUL character is found at the string terminator. + * + * @param s The string to search (contains <code>count</code> UChars). + * @param c The BMP code point to find. + * @param count The length of the string. + * @return A pointer to the first occurrence of <code>c</code> in <code>s</code> + * or <code>NULL</code> if <code>c</code> is not in <code>s</code>. + * @stable ICU 2.0 + * + * @see u_strchr + * @see u_memchr32 + * @see u_strFindFirst + */ +U_STABLE UChar* U_EXPORT2 +u_memchr(const UChar *s, UChar c, int32_t count); + +/** + * Find the first occurrence of a code point in a string. + * A surrogate code point is found only if its match in the text is not + * part of a surrogate pair. + * A NUL character is found at the string terminator. + * + * @param s The string to search (contains <code>count</code> UChars). + * @param c The code point to find. + * @param count The length of the string. + * @return A pointer to the first occurrence of <code>c</code> in <code>s</code> + * or <code>NULL</code> if <code>c</code> is not in <code>s</code>. + * @stable ICU 2.0 + * + * @see u_strchr32 + * @see u_memchr + * @see u_strFindFirst + */ +U_STABLE UChar* U_EXPORT2 +u_memchr32(const UChar *s, UChar32 c, int32_t count); + +/** + * Find the last occurrence of a BMP code point in a string. + * A surrogate code point is found only if its match in the text is not + * part of a surrogate pair. + * A NUL character is found at the string terminator. + * + * @param s The string to search (contains <code>count</code> UChars). + * @param c The BMP code point to find. + * @param count The length of the string. + * @return A pointer to the last occurrence of <code>c</code> in <code>s</code> + * or <code>NULL</code> if <code>c</code> is not in <code>s</code>. + * @stable ICU 2.4 + * + * @see u_strrchr + * @see u_memrchr32 + * @see u_strFindLast + */ +U_STABLE UChar* U_EXPORT2 +u_memrchr(const UChar *s, UChar c, int32_t count); + +/** + * Find the last occurrence of a code point in a string. + * A surrogate code point is found only if its match in the text is not + * part of a surrogate pair. + * A NUL character is found at the string terminator. + * + * @param s The string to search (contains <code>count</code> UChars). + * @param c The code point to find. + * @param count The length of the string. + * @return A pointer to the last occurrence of <code>c</code> in <code>s</code> + * or <code>NULL</code> if <code>c</code> is not in <code>s</code>. + * @stable ICU 2.4 + * + * @see u_strrchr32 + * @see u_memrchr + * @see u_strFindLast + */ +U_STABLE UChar* U_EXPORT2 +u_memrchr32(const UChar *s, UChar32 c, int32_t count); + +/** + * Unicode String literals in C. + * We need one macro to declare a variable for the string + * and to statically preinitialize it if possible, + * and a second macro to dynamically initialize such a string variable if necessary. + * + * The macros are defined for maximum performance. + * They work only for strings that contain "invariant characters", i.e., + * only latin letters, digits, and some punctuation. + * See utypes.h for details. + * + * A pair of macros for a single string must be used with the same + * parameters. + * The string parameter must be a C string literal. + * The length of the string, not including the terminating + * <code>NUL</code>, must be specified as a constant. + * The U_STRING_DECL macro should be invoked exactly once for one + * such string variable before it is used. + * + * Usage: + * <pre> + * U_STRING_DECL(ustringVar1, "Quick-Fox 2", 11); + * U_STRING_DECL(ustringVar2, "jumps 5%", 8); + * static UBool didInit=FALSE; + * + * int32_t function() { + * if(!didInit) { + * U_STRING_INIT(ustringVar1, "Quick-Fox 2", 11); + * U_STRING_INIT(ustringVar2, "jumps 5%", 8); + * didInit=TRUE; + * } + * return u_strcmp(ustringVar1, ustringVar2); + * } + * </pre> + * + * Note that the macros will NOT consistently work if their argument is another <code>#define</code>. + * The following will not work on all platforms, don't use it. + * + * <pre> + * #define GLUCK "Mr. Gluck" + * U_STRING_DECL(var, GLUCK, 9) + * U_STRING_INIT(var, GLUCK, 9) + * </pre> + * + * Instead, use the string literal "Mr. Gluck" as the argument to both macro + * calls. + * + * + * @stable ICU 2.0 + */ +#if defined(U_DECLARE_UTF16) +# define U_STRING_DECL(var, cs, length) static const UChar *var=(const UChar *)U_DECLARE_UTF16(cs) + /**@stable ICU 2.0 */ +# define U_STRING_INIT(var, cs, length) +#elif U_SIZEOF_WCHAR_T==U_SIZEOF_UCHAR && (U_CHARSET_FAMILY==U_ASCII_FAMILY || (U_SIZEOF_UCHAR == 2 && defined(U_WCHAR_IS_UTF16))) +# define U_STRING_DECL(var, cs, length) static const UChar var[(length)+1]=L ## cs + /**@stable ICU 2.0 */ +# define U_STRING_INIT(var, cs, length) +#elif U_SIZEOF_UCHAR==1 && U_CHARSET_FAMILY==U_ASCII_FAMILY +# define U_STRING_DECL(var, cs, length) static const UChar var[(length)+1]=cs + /**@stable ICU 2.0 */ +# define U_STRING_INIT(var, cs, length) +#else +# define U_STRING_DECL(var, cs, length) static UChar var[(length)+1] + /**@stable ICU 2.0 */ +# define U_STRING_INIT(var, cs, length) u_charsToUChars(cs, var, length+1) +#endif + +/** + * Unescape a string of characters and write the resulting + * Unicode characters to the destination buffer. The following escape + * sequences are recognized: + * + * \\uhhhh 4 hex digits; h in [0-9A-Fa-f] + * \\Uhhhhhhhh 8 hex digits + * \\xhh 1-2 hex digits + * \\x{h...} 1-8 hex digits + * \\ooo 1-3 octal digits; o in [0-7] + * \\cX control-X; X is masked with 0x1F + * + * as well as the standard ANSI C escapes: + * + * \\a => U+0007, \\b => U+0008, \\t => U+0009, \\n => U+000A, + * \\v => U+000B, \\f => U+000C, \\r => U+000D, \\e => U+001B, + * \\" => U+0022, \\' => U+0027, \\? => U+003F, \\\\ => U+005C + * + * Anything else following a backslash is generically escaped. For + * example, "[a\\-z]" returns "[a-z]". + * + * If an escape sequence is ill-formed, this method returns an empty + * string. An example of an ill-formed sequence is "\\u" followed by + * fewer than 4 hex digits. + * + * The above characters are recognized in the compiler's codepage, + * that is, they are coded as 'u', '\\', etc. Characters that are + * not parts of escape sequences are converted using u_charsToUChars(). + * + * This function is similar to UnicodeString::unescape() but not + * identical to it. The latter takes a source UnicodeString, so it + * does escape recognition but no conversion. + * + * @param src a zero-terminated string of invariant characters + * @param dest pointer to buffer to receive converted and unescaped + * text and, if there is room, a zero terminator. May be NULL for + * preflighting, in which case no UChars will be written, but the + * return value will still be valid. On error, an empty string is + * stored here (if possible). + * @param destCapacity the number of UChars that may be written at + * dest. Ignored if dest == NULL. + * @return the length of unescaped string. + * @see u_unescapeAt + * @see UnicodeString#unescape() + * @see UnicodeString#unescapeAt() + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_unescape(const char *src, + UChar *dest, int32_t destCapacity); + +U_CDECL_BEGIN +/** + * Callback function for u_unescapeAt() that returns a character of + * the source text given an offset and a context pointer. The context + * pointer will be whatever is passed into u_unescapeAt(). + * + * @param offset pointer to the offset that will be passed to u_unescapeAt(). + * @param context an opaque pointer passed directly into u_unescapeAt() + * @return the character represented by the escape sequence at + * offset + * @see u_unescapeAt + * @stable ICU 2.0 + */ +typedef UChar (U_CALLCONV *UNESCAPE_CHAR_AT)(int32_t offset, void *context); +U_CDECL_END + +/** + * Unescape a single sequence. The character at offset-1 is assumed + * (without checking) to be a backslash. This method takes a callback + * pointer to a function that returns the UChar at a given offset. By + * varying this callback, ICU functions are able to unescape char* + * strings, UnicodeString objects, and UFILE pointers. + * + * If offset is out of range, or if the escape sequence is ill-formed, + * (UChar32)0xFFFFFFFF is returned. See documentation of u_unescape() + * for a list of recognized sequences. + * + * @param charAt callback function that returns a UChar of the source + * text given an offset and a context pointer. + * @param offset pointer to the offset that will be passed to charAt. + * The offset value will be updated upon return to point after the + * last parsed character of the escape sequence. On error the offset + * is unchanged. + * @param length the number of characters in the source text. The + * last character of the source text is considered to be at offset + * length-1. + * @param context an opaque pointer passed directly into charAt. + * @return the character represented by the escape sequence at + * offset, or (UChar32)0xFFFFFFFF on error. + * @see u_unescape() + * @see UnicodeString#unescape() + * @see UnicodeString#unescapeAt() + * @stable ICU 2.0 + */ +U_STABLE UChar32 U_EXPORT2 +u_unescapeAt(UNESCAPE_CHAR_AT charAt, + int32_t *offset, + int32_t length, + void *context); + +/** + * Uppercase the characters in a string. + * Casing is locale-dependent and context-sensitive. + * The result may be longer or shorter than the original. + * The source string and the destination buffer are allowed to overlap. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param src The original string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param locale The locale to consider, or "" for the root locale or NULL for the default locale. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The length of the result string. It may be greater than destCapacity. In that case, + * only some of the result was written to the destination buffer. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_strToUpper(UChar *dest, int32_t destCapacity, + const UChar *src, int32_t srcLength, + const char *locale, + UErrorCode *pErrorCode); + +/** + * Lowercase the characters in a string. + * Casing is locale-dependent and context-sensitive. + * The result may be longer or shorter than the original. + * The source string and the destination buffer are allowed to overlap. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param src The original string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param locale The locale to consider, or "" for the root locale or NULL for the default locale. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The length of the result string. It may be greater than destCapacity. In that case, + * only some of the result was written to the destination buffer. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_strToLower(UChar *dest, int32_t destCapacity, + const UChar *src, int32_t srcLength, + const char *locale, + UErrorCode *pErrorCode); + +#if !UCONFIG_NO_BREAK_ITERATION + +/** + * Titlecase a string. + * Casing is locale-dependent and context-sensitive. + * Titlecasing uses a break iterator to find the first characters of words + * that are to be titlecased. It titlecases those characters and lowercases + * all others. + * + * The titlecase break iterator can be provided to customize for arbitrary + * styles, using rules and dictionaries beyond the standard iterators. + * It may be more efficient to always provide an iterator to avoid + * opening and closing one for each string. + * The standard titlecase iterator for the root locale implements the + * algorithm of Unicode TR 21. + * + * This function uses only the setText(), first() and next() methods of the + * provided break iterator. + * + * The result may be longer or shorter than the original. + * The source string and the destination buffer are allowed to overlap. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param src The original string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param titleIter A break iterator to find the first characters of words + * that are to be titlecased. + * If none is provided (NULL), then a standard titlecase + * break iterator is opened. + * @param locale The locale to consider, or "" for the root locale or NULL for the default locale. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The length of the result string. It may be greater than destCapacity. In that case, + * only some of the result was written to the destination buffer. + * @stable ICU 2.1 + */ +U_STABLE int32_t U_EXPORT2 +u_strToTitle(UChar *dest, int32_t destCapacity, + const UChar *src, int32_t srcLength, + UBreakIterator *titleIter, + const char *locale, + UErrorCode *pErrorCode); + +#endif + +/** + * Case-folds the characters in a string. + * + * Case-folding is locale-independent and not context-sensitive, + * but there is an option for whether to include or exclude mappings for dotted I + * and dotless i that are marked with 'T' in CaseFolding.txt. + * + * The result may be longer or shorter than the original. + * The source string and the destination buffer are allowed to overlap. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param src The original string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param options Either U_FOLD_CASE_DEFAULT or U_FOLD_CASE_EXCLUDE_SPECIAL_I + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The length of the result string. It may be greater than destCapacity. In that case, + * only some of the result was written to the destination buffer. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +u_strFoldCase(UChar *dest, int32_t destCapacity, + const UChar *src, int32_t srcLength, + uint32_t options, + UErrorCode *pErrorCode); + +#if defined(U_WCHAR_IS_UTF16) || defined(U_WCHAR_IS_UTF32) || !UCONFIG_NO_CONVERSION +/** + * Convert a UTF-16 string to a wchar_t string. + * If it is known at compile time that wchar_t strings are in UTF-16 or UTF-32, then + * this function simply calls the fast, dedicated function for that. + * Otherwise, two conversions UTF-16 -> default charset -> wchar_t* are performed. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of wchar_t's). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * @param src The original source string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The pointer to destination buffer. + * @stable ICU 2.0 + */ +U_STABLE wchar_t* U_EXPORT2 +u_strToWCS(wchar_t *dest, + int32_t destCapacity, + int32_t *pDestLength, + const UChar *src, + int32_t srcLength, + UErrorCode *pErrorCode); +/** + * Convert a wchar_t string to UTF-16. + * If it is known at compile time that wchar_t strings are in UTF-16 or UTF-32, then + * this function simply calls the fast, dedicated function for that. + * Otherwise, two conversions wchar_t* -> default charset -> UTF-16 are performed. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * @param src The original source string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The pointer to destination buffer. + * @stable ICU 2.0 + */ +U_STABLE UChar* U_EXPORT2 +u_strFromWCS(UChar *dest, + int32_t destCapacity, + int32_t *pDestLength, + const wchar_t *src, + int32_t srcLength, + UErrorCode *pErrorCode); +#endif /* defined(U_WCHAR_IS_UTF16) || defined(U_WCHAR_IS_UTF32) || !UCONFIG_NO_CONVERSION */ + +/** + * Convert a UTF-16 string to UTF-8. + * If the input string is not well-formed, then the U_INVALID_CHAR_FOUND error code is set. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of chars). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * @param src The original source string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The pointer to destination buffer. + * @stable ICU 2.0 + * @see u_strToUTF8WithSub + * @see u_strFromUTF8 + */ +U_STABLE char* U_EXPORT2 +u_strToUTF8(char *dest, + int32_t destCapacity, + int32_t *pDestLength, + const UChar *src, + int32_t srcLength, + UErrorCode *pErrorCode); + +/** + * Convert a UTF-8 string to UTF-16. + * If the input string is not well-formed, then the U_INVALID_CHAR_FOUND error code is set. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * @param src The original source string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The pointer to destination buffer. + * @stable ICU 2.0 + * @see u_strFromUTF8WithSub + * @see u_strFromUTF8Lenient + */ +U_STABLE UChar* U_EXPORT2 +u_strFromUTF8(UChar *dest, + int32_t destCapacity, + int32_t *pDestLength, + const char *src, + int32_t srcLength, + UErrorCode *pErrorCode); + +/** + * Convert a UTF-16 string to UTF-8. + * + * Same as u_strToUTF8() except for the additional subchar which is output for + * illegal input sequences, instead of stopping with the U_INVALID_CHAR_FOUND error code. + * With subchar==U_SENTINEL, this function behaves exactly like u_strToUTF8(). + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of chars). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * @param src The original source string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param subchar The substitution character to use in place of an illegal input sequence, + * or U_SENTINEL if the function is to return with U_INVALID_CHAR_FOUND instead. + * A substitution character can be any valid Unicode code point (up to U+10FFFF) + * except for surrogate code points (U+D800..U+DFFF). + * The recommended value is U+FFFD "REPLACEMENT CHARACTER". + * @param pNumSubstitutions Output parameter receiving the number of substitutions if subchar>=0. + * Set to 0 if no substitutions occur or subchar<0. + * pNumSubstitutions can be NULL. + * @param pErrorCode Pointer to a standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return The pointer to destination buffer. + * @see u_strToUTF8 + * @see u_strFromUTF8WithSub + * @stable ICU 3.6 + */ +U_STABLE char* U_EXPORT2 +u_strToUTF8WithSub(char *dest, + int32_t destCapacity, + int32_t *pDestLength, + const UChar *src, + int32_t srcLength, + UChar32 subchar, int32_t *pNumSubstitutions, + UErrorCode *pErrorCode); + +/** + * Convert a UTF-8 string to UTF-16. + * + * Same as u_strFromUTF8() except for the additional subchar which is output for + * illegal input sequences, instead of stopping with the U_INVALID_CHAR_FOUND error code. + * With subchar==U_SENTINEL, this function behaves exactly like u_strFromUTF8(). + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * @param src The original source string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param subchar The substitution character to use in place of an illegal input sequence, + * or U_SENTINEL if the function is to return with U_INVALID_CHAR_FOUND instead. + * A substitution character can be any valid Unicode code point (up to U+10FFFF) + * except for surrogate code points (U+D800..U+DFFF). + * The recommended value is U+FFFD "REPLACEMENT CHARACTER". + * @param pNumSubstitutions Output parameter receiving the number of substitutions if subchar>=0. + * Set to 0 if no substitutions occur or subchar<0. + * pNumSubstitutions can be NULL. + * @param pErrorCode Pointer to a standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return The pointer to destination buffer. + * @see u_strFromUTF8 + * @see u_strFromUTF8Lenient + * @see u_strToUTF8WithSub + * @stable ICU 3.6 + */ +U_STABLE UChar* U_EXPORT2 +u_strFromUTF8WithSub(UChar *dest, + int32_t destCapacity, + int32_t *pDestLength, + const char *src, + int32_t srcLength, + UChar32 subchar, int32_t *pNumSubstitutions, + UErrorCode *pErrorCode); + +/** + * Convert a UTF-8 string to UTF-16. + * + * Same as u_strFromUTF8() except that this function is designed to be very fast, + * which it achieves by being lenient about malformed UTF-8 sequences. + * This function is intended for use in environments where UTF-8 text is + * expected to be well-formed. + * + * Its semantics are: + * - Well-formed UTF-8 text is correctly converted to well-formed UTF-16 text. + * - The function will not read beyond the input string, nor write beyond + * the destCapacity. + * - Malformed UTF-8 results in "garbage" 16-bit Unicode strings which may not + * be well-formed UTF-16. + * The function will resynchronize to valid code point boundaries + * within a small number of code points after an illegal sequence. + * - Non-shortest forms are not detected and will result in "spoofing" output. + * + * For further performance improvement, if srcLength is given (>=0), + * then it must be destCapacity>=srcLength. + * + * There is no inverse u_strToUTF8Lenient() function because there is practically + * no performance gain from not checking that a UTF-16 string is well-formed. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * Unlike for other ICU functions, if srcLength>=0 then it + * must be destCapacity>=srcLength. + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * Unlike for other ICU functions, if srcLength>=0 but + * destCapacity<srcLength, then *pDestLength will be set to srcLength + * (and U_BUFFER_OVERFLOW_ERROR will be set) + * regardless of the actual result length. + * @param src The original source string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param pErrorCode Pointer to a standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return The pointer to destination buffer. + * @see u_strFromUTF8 + * @see u_strFromUTF8WithSub + * @see u_strToUTF8WithSub + * @stable ICU 3.6 + */ +U_STABLE UChar * U_EXPORT2 +u_strFromUTF8Lenient(UChar *dest, + int32_t destCapacity, + int32_t *pDestLength, + const char *src, + int32_t srcLength, + UErrorCode *pErrorCode); + +/** + * Convert a UTF-16 string to UTF-32. + * If the input string is not well-formed, then the U_INVALID_CHAR_FOUND error code is set. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChar32s). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * @param src The original source string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The pointer to destination buffer. + * @see u_strToUTF32WithSub + * @see u_strFromUTF32 + * @stable ICU 2.0 + */ +U_STABLE UChar32* U_EXPORT2 +u_strToUTF32(UChar32 *dest, + int32_t destCapacity, + int32_t *pDestLength, + const UChar *src, + int32_t srcLength, + UErrorCode *pErrorCode); + +/** + * Convert a UTF-32 string to UTF-16. + * If the input string is not well-formed, then the U_INVALID_CHAR_FOUND error code is set. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * @param src The original source string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The pointer to destination buffer. + * @see u_strFromUTF32WithSub + * @see u_strToUTF32 + * @stable ICU 2.0 + */ +U_STABLE UChar* U_EXPORT2 +u_strFromUTF32(UChar *dest, + int32_t destCapacity, + int32_t *pDestLength, + const UChar32 *src, + int32_t srcLength, + UErrorCode *pErrorCode); + +/** + * Convert a UTF-16 string to UTF-32. + * + * Same as u_strToUTF32() except for the additional subchar which is output for + * illegal input sequences, instead of stopping with the U_INVALID_CHAR_FOUND error code. + * With subchar==U_SENTINEL, this function behaves exactly like u_strToUTF32(). + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChar32s). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * @param src The original source string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param subchar The substitution character to use in place of an illegal input sequence, + * or U_SENTINEL if the function is to return with U_INVALID_CHAR_FOUND instead. + * A substitution character can be any valid Unicode code point (up to U+10FFFF) + * except for surrogate code points (U+D800..U+DFFF). + * The recommended value is U+FFFD "REPLACEMENT CHARACTER". + * @param pNumSubstitutions Output parameter receiving the number of substitutions if subchar>=0. + * Set to 0 if no substitutions occur or subchar<0. + * pNumSubstitutions can be NULL. + * @param pErrorCode Pointer to a standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return The pointer to destination buffer. + * @see u_strToUTF32 + * @see u_strFromUTF32WithSub + * @stable ICU 4.2 + */ +U_STABLE UChar32* U_EXPORT2 +u_strToUTF32WithSub(UChar32 *dest, + int32_t destCapacity, + int32_t *pDestLength, + const UChar *src, + int32_t srcLength, + UChar32 subchar, int32_t *pNumSubstitutions, + UErrorCode *pErrorCode); + +/** + * Convert a UTF-32 string to UTF-16. + * + * Same as u_strFromUTF32() except for the additional subchar which is output for + * illegal input sequences, instead of stopping with the U_INVALID_CHAR_FOUND error code. + * With subchar==U_SENTINEL, this function behaves exactly like u_strFromUTF32(). + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * @param src The original source string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param subchar The substitution character to use in place of an illegal input sequence, + * or U_SENTINEL if the function is to return with U_INVALID_CHAR_FOUND instead. + * A substitution character can be any valid Unicode code point (up to U+10FFFF) + * except for surrogate code points (U+D800..U+DFFF). + * The recommended value is U+FFFD "REPLACEMENT CHARACTER". + * @param pNumSubstitutions Output parameter receiving the number of substitutions if subchar>=0. + * Set to 0 if no substitutions occur or subchar<0. + * pNumSubstitutions can be NULL. + * @param pErrorCode Pointer to a standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return The pointer to destination buffer. + * @see u_strFromUTF32 + * @see u_strToUTF32WithSub + * @stable ICU 4.2 + */ +U_STABLE UChar* U_EXPORT2 +u_strFromUTF32WithSub(UChar *dest, + int32_t destCapacity, + int32_t *pDestLength, + const UChar32 *src, + int32_t srcLength, + UChar32 subchar, int32_t *pNumSubstitutions, + UErrorCode *pErrorCode); + +/** + * Convert a 16-bit Unicode string to Java Modified UTF-8. + * See http://java.sun.com/javase/6/docs/api/java/io/DataInput.html#modified-utf-8 + * + * This function behaves according to the documentation for Java DataOutput.writeUTF() + * except that it does not encode the output length in the destination buffer + * and does not have an output length restriction. + * See http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html#writeUTF(java.lang.String) + * + * The input string need not be well-formed UTF-16. + * (Therefore there is no subchar parameter.) + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of chars). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * @param src The original source string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param pErrorCode Pointer to a standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return The pointer to destination buffer. + * @stable ICU 4.4 + * @see u_strToUTF8WithSub + * @see u_strFromJavaModifiedUTF8WithSub + */ +U_STABLE char* U_EXPORT2 +u_strToJavaModifiedUTF8( + char *dest, + int32_t destCapacity, + int32_t *pDestLength, + const UChar *src, + int32_t srcLength, + UErrorCode *pErrorCode); + +/** + * Convert a Java Modified UTF-8 string to a 16-bit Unicode string. + * If the input string is not well-formed and no substitution char is specified, + * then the U_INVALID_CHAR_FOUND error code is set. + * + * This function behaves according to the documentation for Java DataInput.readUTF() + * except that it takes a length parameter rather than + * interpreting the first two input bytes as the length. + * See http://java.sun.com/javase/6/docs/api/java/io/DataInput.html#readUTF() + * + * The output string may not be well-formed UTF-16. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * @param src The original source string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param subchar The substitution character to use in place of an illegal input sequence, + * or U_SENTINEL if the function is to return with U_INVALID_CHAR_FOUND instead. + * A substitution character can be any valid Unicode code point (up to U+10FFFF) + * except for surrogate code points (U+D800..U+DFFF). + * The recommended value is U+FFFD "REPLACEMENT CHARACTER". + * @param pNumSubstitutions Output parameter receiving the number of substitutions if subchar>=0. + * Set to 0 if no substitutions occur or subchar<0. + * pNumSubstitutions can be NULL. + * @param pErrorCode Pointer to a standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return The pointer to destination buffer. + * @see u_strFromUTF8WithSub + * @see u_strFromUTF8Lenient + * @see u_strToJavaModifiedUTF8 + * @stable ICU 4.4 + */ +U_STABLE UChar* U_EXPORT2 +u_strFromJavaModifiedUTF8WithSub( + UChar *dest, + int32_t destCapacity, + int32_t *pDestLength, + const char *src, + int32_t srcLength, + UChar32 subchar, int32_t *pNumSubstitutions, + UErrorCode *pErrorCode); + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ustringtrie.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ustringtrie.h new file mode 100755 index 00000000..fd856482 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/ustringtrie.h @@ -0,0 +1,97 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2010-2012, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************* +* file name: udicttrie.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2010dec17 +* created by: Markus W. Scherer +*/ + +#ifndef __USTRINGTRIE_H__ +#define __USTRINGTRIE_H__ + +/** + * \file + * \brief C API: Helper definitions for dictionary trie APIs. + */ + +#include "unicode/utypes.h" + + +/** + * Return values for BytesTrie::next(), UCharsTrie::next() and similar methods. + * @see USTRINGTRIE_MATCHES + * @see USTRINGTRIE_HAS_VALUE + * @see USTRINGTRIE_HAS_NEXT + * @stable ICU 4.8 + */ +enum UStringTrieResult { + /** + * The input unit(s) did not continue a matching string. + * Once current()/next() return USTRINGTRIE_NO_MATCH, + * all further calls to current()/next() will also return USTRINGTRIE_NO_MATCH, + * until the trie is reset to its original state or to a saved state. + * @stable ICU 4.8 + */ + USTRINGTRIE_NO_MATCH, + /** + * The input unit(s) continued a matching string + * but there is no value for the string so far. + * (It is a prefix of a longer string.) + * @stable ICU 4.8 + */ + USTRINGTRIE_NO_VALUE, + /** + * The input unit(s) continued a matching string + * and there is a value for the string so far. + * This value will be returned by getValue(). + * No further input byte/unit can continue a matching string. + * @stable ICU 4.8 + */ + USTRINGTRIE_FINAL_VALUE, + /** + * The input unit(s) continued a matching string + * and there is a value for the string so far. + * This value will be returned by getValue(). + * Another input byte/unit can continue a matching string. + * @stable ICU 4.8 + */ + USTRINGTRIE_INTERMEDIATE_VALUE +}; + +/** + * Same as (result!=USTRINGTRIE_NO_MATCH). + * @param result A result from BytesTrie::first(), UCharsTrie::next() etc. + * @return true if the input bytes/units so far are part of a matching string/byte sequence. + * @stable ICU 4.8 + */ +#define USTRINGTRIE_MATCHES(result) ((result)!=USTRINGTRIE_NO_MATCH) + +/** + * Equivalent to (result==USTRINGTRIE_INTERMEDIATE_VALUE || result==USTRINGTRIE_FINAL_VALUE) but + * this macro evaluates result exactly once. + * @param result A result from BytesTrie::first(), UCharsTrie::next() etc. + * @return true if there is a value for the input bytes/units so far. + * @see BytesTrie::getValue + * @see UCharsTrie::getValue + * @stable ICU 4.8 + */ +#define USTRINGTRIE_HAS_VALUE(result) ((result)>=USTRINGTRIE_FINAL_VALUE) + +/** + * Equivalent to (result==USTRINGTRIE_NO_VALUE || result==USTRINGTRIE_INTERMEDIATE_VALUE) but + * this macro evaluates result exactly once. + * @param result A result from BytesTrie::first(), UCharsTrie::next() etc. + * @return true if another input byte/unit can continue a matching string. + * @stable ICU 4.8 + */ +#define USTRINGTRIE_HAS_NEXT(result) ((result)&1) + +#endif /* __USTRINGTRIE_H__ */ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utext.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utext.h new file mode 100755 index 00000000..ad21d70a --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utext.h @@ -0,0 +1,1602 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 2004-2012, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: utext.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2004oct06 +* created by: Markus W. Scherer +*/ + +#ifndef __UTEXT_H__ +#define __UTEXT_H__ + +/** + * \file + * \brief C API: Abstract Unicode Text API + * + * The Text Access API provides a means to allow text that is stored in alternative + * formats to work with ICU services. ICU normally operates on text that is + * stored in UTF-16 format, in (UChar *) arrays for the C APIs or as type + * UnicodeString for C++ APIs. + * + * ICU Text Access allows other formats, such as UTF-8 or non-contiguous + * UTF-16 strings, to be placed in a UText wrapper and then passed to ICU services. + * + * There are three general classes of usage for UText: + * + * Application Level Use. This is the simplest usage - applications would + * use one of the utext_open() functions on their input text, and pass + * the resulting UText to the desired ICU service. + * + * Second is usage in ICU Services, such as break iteration, that will need to + * operate on input presented to them as a UText. These implementations + * will need to use the iteration and related UText functions to gain + * access to the actual text. + * + * The third class of UText users are "text providers." These are the + * UText implementations for the various text storage formats. An application + * or system with a unique text storage format can implement a set of + * UText provider functions for that format, which will then allow + * ICU services to operate on that format. + * + * + * <em>Iterating over text</em> + * + * Here is sample code for a forward iteration over the contents of a UText + * + * \code + * UChar32 c; + * UText *ut = whatever(); + * + * for (c=utext_next32From(ut, 0); c>=0; c=utext_next32(ut)) { + * // do whatever with the codepoint c here. + * } + * \endcode + * + * And here is similar code to iterate in the reverse direction, from the end + * of the text towards the beginning. + * + * \code + * UChar32 c; + * UText *ut = whatever(); + * int textLength = utext_nativeLength(ut); + * for (c=utext_previous32From(ut, textLength); c>=0; c=utext_previous32(ut)) { + * // do whatever with the codepoint c here. + * } + * \endcode + * + * <em>Characters and Indexing</em> + * + * Indexing into text by UText functions is nearly always in terms of the native + * indexing of the underlying text storage. The storage format could be UTF-8 + * or UTF-32, for example. When coding to the UText access API, no assumptions + * can be made regarding the size of characters, or how far an index + * may move when iterating between characters. + * + * All indices supplied to UText functions are pinned to the length of the + * text. An out-of-bounds index is not considered to be an error, but is + * adjusted to be in the range 0 <= index <= length of input text. + * + * + * When an index position is returned from a UText function, it will be + * a native index to the underlying text. In the case of multi-unit characters, + * it will always refer to the first position of the character, + * never to the interior. This is essentially the same thing as saying that + * a returned index will always point to a boundary between characters. + * + * When a native index is supplied to a UText function, all indices that + * refer to any part of a multi-unit character representation are considered + * to be equivalent. In the case of multi-unit characters, an incoming index + * will be logically normalized to refer to the start of the character. + * + * It is possible to test whether a native index is on a code point boundary + * by doing a utext_setNativeIndex() followed by a utext_getNativeIndex(). + * If the index is returned unchanged, it was on a code point boundary. If + * an adjusted index is returned, the original index referred to the + * interior of a character. + * + * <em>Conventions for calling UText functions</em> + * + * Most UText access functions have as their first parameter a (UText *) pointer, + * which specifies the UText to be used. Unless otherwise noted, the + * pointer must refer to a valid, open UText. Attempting to + * use a closed UText or passing a NULL pointer is a programming error and + * will produce undefined results or NULL pointer exceptions. + * + * The UText_Open family of functions can either open an existing (closed) + * UText, or heap allocate a new UText. Here is sample code for creating + * a stack-allocated UText. + * + * \code + * char *s = whatever(); // A utf-8 string + * U_ErrorCode status = U_ZERO_ERROR; + * UText ut = UTEXT_INITIALIZER; + * utext_openUTF8(ut, s, -1, &status); + * if (U_FAILURE(status)) { + * // error handling + * } else { + * // work with the UText + * } + * \endcode + * + * Any existing UText passed to an open function _must_ have been initialized, + * either by the UTEXT_INITIALIZER, or by having been originally heap-allocated + * by an open function. Passing NULL will cause the open function to + * heap-allocate and fully initialize a new UText. + * + */ + + + +#include "unicode/utypes.h" +#include "unicode/uchar.h" +#if U_SHOW_CPLUSPLUS_API +#include "unicode/localpointer.h" +#include "unicode/rep.h" +#include "unicode/unistr.h" +#include "unicode/chariter.h" +#endif + + +U_CDECL_BEGIN + +struct UText; +typedef struct UText UText; /**< C typedef for struct UText. @stable ICU 3.6 */ + + +/*************************************************************************************** + * + * C Functions for creating UText wrappers around various kinds of text strings. + * + ****************************************************************************************/ + + +/** + * Close function for UText instances. + * Cleans up, releases any resources being held by an open UText. + * <p> + * If the UText was originally allocated by one of the utext_open functions, + * the storage associated with the utext will also be freed. + * If the UText storage originated with the application, as it would with + * a local or static instance, the storage will not be deleted. + * + * An open UText can be reset to refer to new string by using one of the utext_open() + * functions without first closing the UText. + * + * @param ut The UText to be closed. + * @return NULL if the UText struct was deleted by the close. If the UText struct + * was originally provided by the caller to the open function, it is + * returned by this function, and may be safely used again in + * a subsequent utext_open. + * + * @stable ICU 3.4 + */ +U_STABLE UText * U_EXPORT2 +utext_close(UText *ut); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUTextPointer + * "Smart pointer" class, closes a UText via utext_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUTextPointer, UText, utext_close); + +U_NAMESPACE_END + +#endif + +/** + * Open a read-only UText implementation for UTF-8 strings. + * + * \htmlonly + * Any invalid UTF-8 in the input will be handled in this way: + * a sequence of bytes that has the form of a truncated, but otherwise valid, + * UTF-8 sequence will be replaced by a single unicode replacement character, \uFFFD. + * Any other illegal bytes will each be replaced by a \uFFFD. + * \endhtmlonly + * + * @param ut Pointer to a UText struct. If NULL, a new UText will be created. + * If non-NULL, must refer to an initialized UText struct, which will then + * be reset to reference the specified UTF-8 string. + * @param s A UTF-8 string. Must not be NULL. + * @param length The length of the UTF-8 string in bytes, or -1 if the string is + * zero terminated. + * @param status Errors are returned here. + * @return A pointer to the UText. If a pre-allocated UText was provided, it + * will always be used and returned. + * @stable ICU 3.4 + */ +U_STABLE UText * U_EXPORT2 +utext_openUTF8(UText *ut, const char *s, int64_t length, UErrorCode *status); + + +/** + * Open a read-only UText for UChar * string. + * + * @param ut Pointer to a UText struct. If NULL, a new UText will be created. + * If non-NULL, must refer to an initialized UText struct, which will then + * be reset to reference the specified UChar string. + * @param s A UChar (UTF-16) string + * @param length The number of UChars in the input string, or -1 if the string is + * zero terminated. + * @param status Errors are returned here. + * @return A pointer to the UText. If a pre-allocated UText was provided, it + * will always be used and returned. + * @stable ICU 3.4 + */ +U_STABLE UText * U_EXPORT2 +utext_openUChars(UText *ut, const UChar *s, int64_t length, UErrorCode *status); + + +#if U_SHOW_CPLUSPLUS_API +/** + * Open a writable UText for a non-const UnicodeString. + * + * @param ut Pointer to a UText struct. If NULL, a new UText will be created. + * If non-NULL, must refer to an initialized UText struct, which will then + * be reset to reference the specified input string. + * @param s A UnicodeString. + * @param status Errors are returned here. + * @return Pointer to the UText. If a UText was supplied as input, this + * will always be used and returned. + * @stable ICU 3.4 + */ +U_STABLE UText * U_EXPORT2 +utext_openUnicodeString(UText *ut, icu::UnicodeString *s, UErrorCode *status); + + +/** + * Open a UText for a const UnicodeString. The resulting UText will not be writable. + * + * @param ut Pointer to a UText struct. If NULL, a new UText will be created. + * If non-NULL, must refer to an initialized UText struct, which will then + * be reset to reference the specified input string. + * @param s A const UnicodeString to be wrapped. + * @param status Errors are returned here. + * @return Pointer to the UText. If a UText was supplied as input, this + * will always be used and returned. + * @stable ICU 3.4 + */ +U_STABLE UText * U_EXPORT2 +utext_openConstUnicodeString(UText *ut, const icu::UnicodeString *s, UErrorCode *status); + + +/** + * Open a writable UText implementation for an ICU Replaceable object. + * @param ut Pointer to a UText struct. If NULL, a new UText will be created. + * If non-NULL, must refer to an already existing UText, which will then + * be reset to reference the specified replaceable text. + * @param rep A Replaceable text object. + * @param status Errors are returned here. + * @return Pointer to the UText. If a UText was supplied as input, this + * will always be used and returned. + * @see Replaceable + * @stable ICU 3.4 + */ +U_STABLE UText * U_EXPORT2 +utext_openReplaceable(UText *ut, icu::Replaceable *rep, UErrorCode *status); + +/** + * Open a UText implementation over an ICU CharacterIterator. + * @param ut Pointer to a UText struct. If NULL, a new UText will be created. + * If non-NULL, must refer to an already existing UText, which will then + * be reset to reference the specified replaceable text. + * @param ci A Character Iterator. + * @param status Errors are returned here. + * @return Pointer to the UText. If a UText was supplied as input, this + * will always be used and returned. + * @see Replaceable + * @stable ICU 3.4 + */ +U_STABLE UText * U_EXPORT2 +utext_openCharacterIterator(UText *ut, icu::CharacterIterator *ci, UErrorCode *status); + +#endif + + +/** + * Clone a UText. This is much like opening a UText where the source text is itself + * another UText. + * + * A deep clone will copy both the UText data structures and the underlying text. + * The original and cloned UText will operate completely independently; modifications + * made to the text in one will not affect the other. Text providers are not + * required to support deep clones. The user of clone() must check the status return + * and be prepared to handle failures. + * + * The standard UText implementations for UTF8, UChar *, UnicodeString and + * Replaceable all support deep cloning. + * + * The UText returned from a deep clone will be writable, assuming that the text + * provider is able to support writing, even if the source UText had been made + * non-writable by means of UText_freeze(). + * + * A shallow clone replicates only the UText data structures; it does not make + * a copy of the underlying text. Shallow clones can be used as an efficient way to + * have multiple iterators active in a single text string that is not being + * modified. + * + * A shallow clone operation will not fail, barring truly exceptional conditions such + * as memory allocation failures. + * + * Shallow UText clones should be avoided if the UText functions that modify the + * text are expected to be used, either on the original or the cloned UText. + * Any such modifications can cause unpredictable behavior. Read Only + * shallow clones provide some protection against errors of this type by + * disabling text modification via the cloned UText. + * + * A shallow clone made with the readOnly parameter == FALSE will preserve the + * utext_isWritable() state of the source object. Note, however, that + * write operations must be avoided while more than one UText exists that refer + * to the same underlying text. + * + * A UText and its clone may be safely concurrently accessed by separate threads. + * This is true for read access only with shallow clones, and for both read and + * write access with deep clones. + * It is the responsibility of the Text Provider to ensure that this thread safety + * constraint is met. + * + * @param dest A UText struct to be filled in with the result of the clone operation, + * or NULL if the clone function should heap-allocate a new UText struct. + * If non-NULL, must refer to an already existing UText, which will then + * be reset to become the clone. + * @param src The UText to be cloned. + * @param deep TRUE to request a deep clone, FALSE for a shallow clone. + * @param readOnly TRUE to request that the cloned UText have read only access to the + * underlying text. + + * @param status Errors are returned here. For deep clones, U_UNSUPPORTED_ERROR + * will be returned if the text provider is unable to clone the + * original text. + * @return The newly created clone, or NULL if the clone operation failed. + * @stable ICU 3.4 + */ +U_STABLE UText * U_EXPORT2 +utext_clone(UText *dest, const UText *src, UBool deep, UBool readOnly, UErrorCode *status); + + +/** + * Compare two UText objects for equality. + * UTexts are equal if they are iterating over the same text, and + * have the same iteration position within the text. + * If either or both of the parameters are NULL, the comparison is FALSE. + * + * @param a The first of the two UTexts to compare. + * @param b The other UText to be compared. + * @return TRUE if the two UTexts are equal. + * @stable ICU 3.6 + */ +U_STABLE UBool U_EXPORT2 +utext_equals(const UText *a, const UText *b); + + +/***************************************************************************** + * + * Functions to work with the text represented by a UText wrapper + * + *****************************************************************************/ + +/** + * Get the length of the text. Depending on the characteristics + * of the underlying text representation, this may be expensive. + * @see utext_isLengthExpensive() + * + * + * @param ut the text to be accessed. + * @return the length of the text, expressed in native units. + * + * @stable ICU 3.4 + */ +U_STABLE int64_t U_EXPORT2 +utext_nativeLength(UText *ut); + +/** + * Return TRUE if calculating the length of the text could be expensive. + * Finding the length of NUL terminated strings is considered to be expensive. + * + * Note that the value of this function may change + * as the result of other operations on a UText. + * Once the length of a string has been discovered, it will no longer + * be expensive to report it. + * + * @param ut the text to be accessed. + * @return TRUE if determining the length of the text could be time consuming. + * @stable ICU 3.4 + */ +U_STABLE UBool U_EXPORT2 +utext_isLengthExpensive(const UText *ut); + +/** + * Returns the code point at the requested index, + * or U_SENTINEL (-1) if it is out of bounds. + * + * If the specified index points to the interior of a multi-unit + * character - one of the trail bytes of a UTF-8 sequence, for example - + * the complete code point will be returned. + * + * The iteration position will be set to the start of the returned code point. + * + * This function is roughly equivalent to the sequence + * utext_setNativeIndex(index); + * utext_current32(); + * (There is a subtle difference if the index is out of bounds by being less than zero - + * utext_setNativeIndex(negative value) sets the index to zero, after which utext_current() + * will return the char at zero. utext_char32At(negative index), on the other hand, will + * return the U_SENTINEL value of -1.) + * + * @param ut the text to be accessed + * @param nativeIndex the native index of the character to be accessed. If the index points + * to other than the first unit of a multi-unit character, it will be adjusted + * to the start of the character. + * @return the code point at the specified index. + * @stable ICU 3.4 + */ +U_STABLE UChar32 U_EXPORT2 +utext_char32At(UText *ut, int64_t nativeIndex); + + +/** + * + * Get the code point at the current iteration position, + * or U_SENTINEL (-1) if the iteration has reached the end of + * the input text. + * + * @param ut the text to be accessed. + * @return the Unicode code point at the current iterator position. + * @stable ICU 3.4 + */ +U_STABLE UChar32 U_EXPORT2 +utext_current32(UText *ut); + + +/** + * Get the code point at the current iteration position of the UText, and + * advance the position to the first index following the character. + * + * If the position is at the end of the text (the index following + * the last character, which is also the length of the text), + * return U_SENTINEL (-1) and do not advance the index. + * + * This is a post-increment operation. + * + * An inline macro version of this function, UTEXT_NEXT32(), + * is available for performance critical use. + * + * @param ut the text to be accessed. + * @return the Unicode code point at the iteration position. + * @see UTEXT_NEXT32 + * @stable ICU 3.4 + */ +U_STABLE UChar32 U_EXPORT2 +utext_next32(UText *ut); + + +/** + * Move the iterator position to the character (code point) whose + * index precedes the current position, and return that character. + * This is a pre-decrement operation. + * + * If the initial position is at the start of the text (index of 0) + * return U_SENTINEL (-1), and leave the position unchanged. + * + * An inline macro version of this function, UTEXT_PREVIOUS32(), + * is available for performance critical use. + * + * @param ut the text to be accessed. + * @return the previous UChar32 code point, or U_SENTINEL (-1) + * if the iteration has reached the start of the text. + * @see UTEXT_PREVIOUS32 + * @stable ICU 3.4 + */ +U_STABLE UChar32 U_EXPORT2 +utext_previous32(UText *ut); + + +/** + * Set the iteration index and return the code point at that index. + * Leave the iteration index at the start of the following code point. + * + * This function is the most efficient and convenient way to + * begin a forward iteration. The results are identical to the those + * from the sequence + * \code + * utext_setIndex(); + * utext_next32(); + * \endcode + * + * @param ut the text to be accessed. + * @param nativeIndex Iteration index, in the native units of the text provider. + * @return Code point which starts at or before index, + * or U_SENTINEL (-1) if it is out of bounds. + * @stable ICU 3.4 + */ +U_STABLE UChar32 U_EXPORT2 +utext_next32From(UText *ut, int64_t nativeIndex); + + + +/** + * Set the iteration index, and return the code point preceding the + * one specified by the initial index. Leave the iteration position + * at the start of the returned code point. + * + * This function is the most efficient and convenient way to + * begin a backwards iteration. + * + * @param ut the text to be accessed. + * @param nativeIndex Iteration index in the native units of the text provider. + * @return Code point preceding the one at the initial index, + * or U_SENTINEL (-1) if it is out of bounds. + * + * @stable ICU 3.4 + */ +U_STABLE UChar32 U_EXPORT2 +utext_previous32From(UText *ut, int64_t nativeIndex); + +/** + * Get the current iterator position, which can range from 0 to + * the length of the text. + * The position is a native index into the input text, in whatever format it + * may have (possibly UTF-8 for example), and may not always be the same as + * the corresponding UChar (UTF-16) index. + * The returned position will always be aligned to a code point boundary. + * + * @param ut the text to be accessed. + * @return the current index position, in the native units of the text provider. + * @stable ICU 3.4 + */ +U_STABLE int64_t U_EXPORT2 +utext_getNativeIndex(const UText *ut); + +/** + * Set the current iteration position to the nearest code point + * boundary at or preceding the specified index. + * The index is in the native units of the original input text. + * If the index is out of range, it will be pinned to be within + * the range of the input text. + * <p> + * It will usually be more efficient to begin an iteration + * using the functions utext_next32From() or utext_previous32From() + * rather than setIndex(). + * <p> + * Moving the index position to an adjacent character is best done + * with utext_next32(), utext_previous32() or utext_moveIndex32(). + * Attempting to do direct arithmetic on the index position is + * complicated by the fact that the size (in native units) of a + * character depends on the underlying representation of the character + * (UTF-8, UTF-16, UTF-32, arbitrary codepage), and is not + * easily knowable. + * + * @param ut the text to be accessed. + * @param nativeIndex the native unit index of the new iteration position. + * @stable ICU 3.4 + */ +U_STABLE void U_EXPORT2 +utext_setNativeIndex(UText *ut, int64_t nativeIndex); + +/** + * Move the iterator position by delta code points. The number of code points + * is a signed number; a negative delta will move the iterator backwards, + * towards the start of the text. + * <p> + * The index is moved by <code>delta</code> code points + * forward or backward, but no further backward than to 0 and + * no further forward than to utext_nativeLength(). + * The resulting index value will be in between 0 and length, inclusive. + * + * @param ut the text to be accessed. + * @param delta the signed number of code points to move the iteration position. + * @return TRUE if the position could be moved the requested number of positions while + * staying within the range [0 - text length]. + * @stable ICU 3.4 + */ +U_STABLE UBool U_EXPORT2 +utext_moveIndex32(UText *ut, int32_t delta); + +/** + * Get the native index of the character preceding the current position. + * If the iteration position is already at the start of the text, zero + * is returned. + * The value returned is the same as that obtained from the following sequence, + * but without the side effect of changing the iteration position. + * + * \code + * UText *ut = whatever; + * ... + * utext_previous(ut) + * utext_getNativeIndex(ut); + * \endcode + * + * This function is most useful during forwards iteration, where it will get the + * native index of the character most recently returned from utext_next(). + * + * @param ut the text to be accessed + * @return the native index of the character preceding the current index position, + * or zero if the current position is at the start of the text. + * @stable ICU 3.6 + */ +U_STABLE int64_t U_EXPORT2 +utext_getPreviousNativeIndex(UText *ut); + + +/** + * + * Extract text from a UText into a UChar buffer. The range of text to be extracted + * is specified in the native indices of the UText provider. These may not necessarily + * be UTF-16 indices. + * <p> + * The size (number of 16 bit UChars) of the data to be extracted is returned. The + * full number of UChars is returned, even when the extracted text is truncated + * because the specified buffer size is too small. + * <p> + * The extracted string will (if you are a user) / must (if you are a text provider) + * be NUL-terminated if there is sufficient space in the destination buffer. This + * terminating NUL is not included in the returned length. + * <p> + * The iteration index is left at the position following the last extracted character. + * + * @param ut the UText from which to extract data. + * @param nativeStart the native index of the first character to extract.\ + * If the specified index is out of range, + * it will be pinned to be within 0 <= index <= textLength + * @param nativeLimit the native string index of the position following the last + * character to extract. If the specified index is out of range, + * it will be pinned to be within 0 <= index <= textLength. + * nativeLimit must be >= nativeStart. + * @param dest the UChar (UTF-16) buffer into which the extracted text is placed + * @param destCapacity The size, in UChars, of the destination buffer. May be zero + * for precomputing the required size. + * @param status receives any error status. + * U_BUFFER_OVERFLOW_ERROR: the extracted text was truncated because the + * buffer was too small. Returns number of UChars for preflighting. + * @return Number of UChars in the data to be extracted. Does not include a trailing NUL. + * + * @stable ICU 3.4 + */ +U_STABLE int32_t U_EXPORT2 +utext_extract(UText *ut, + int64_t nativeStart, int64_t nativeLimit, + UChar *dest, int32_t destCapacity, + UErrorCode *status); + + + +/************************************************************************************ + * + * #define inline versions of selected performance-critical text access functions + * Caution: do not use auto increment++ or decrement-- expressions + * as parameters to these macros. + * + * For most use, where there is no extreme performance constraint, the + * normal, non-inline functions are a better choice. The resulting code + * will be smaller, and, if the need ever arises, easier to debug. + * + * These are implemented as #defines rather than real functions + * because there is no fully portable way to do inline functions in plain C. + * + ************************************************************************************/ + +#ifndef U_HIDE_INTERNAL_API +/** + * inline version of utext_current32(), for performance-critical situations. + * + * Get the code point at the current iteration position of the UText. + * Returns U_SENTINEL (-1) if the position is at the end of the + * text. + * + * @internal ICU 4.4 technology preview + */ +#define UTEXT_CURRENT32(ut) \ + ((ut)->chunkOffset < (ut)->chunkLength && ((ut)->chunkContents)[(ut)->chunkOffset]<0xd800 ? \ + ((ut)->chunkContents)[((ut)->chunkOffset)] : utext_current32(ut)) +#endif /* U_HIDE_INTERNAL_API */ + +/** + * inline version of utext_next32(), for performance-critical situations. + * + * Get the code point at the current iteration position of the UText, and + * advance the position to the first index following the character. + * This is a post-increment operation. + * Returns U_SENTINEL (-1) if the position is at the end of the + * text. + * + * @stable ICU 3.4 + */ +#define UTEXT_NEXT32(ut) \ + ((ut)->chunkOffset < (ut)->chunkLength && ((ut)->chunkContents)[(ut)->chunkOffset]<0xd800 ? \ + ((ut)->chunkContents)[((ut)->chunkOffset)++] : utext_next32(ut)) + +/** + * inline version of utext_previous32(), for performance-critical situations. + * + * Move the iterator position to the character (code point) whose + * index precedes the current position, and return that character. + * This is a pre-decrement operation. + * Returns U_SENTINEL (-1) if the position is at the start of the text. + * + * @stable ICU 3.4 + */ +#define UTEXT_PREVIOUS32(ut) \ + ((ut)->chunkOffset > 0 && \ + (ut)->chunkContents[(ut)->chunkOffset-1] < 0xd800 ? \ + (ut)->chunkContents[--((ut)->chunkOffset)] : utext_previous32(ut)) + +/** + * inline version of utext_getNativeIndex(), for performance-critical situations. + * + * Get the current iterator position, which can range from 0 to + * the length of the text. + * The position is a native index into the input text, in whatever format it + * may have (possibly UTF-8 for example), and may not always be the same as + * the corresponding UChar (UTF-16) index. + * The returned position will always be aligned to a code point boundary. + * + * @stable ICU 3.6 + */ +#define UTEXT_GETNATIVEINDEX(ut) \ + ((ut)->chunkOffset <= (ut)->nativeIndexingLimit? \ + (ut)->chunkNativeStart+(ut)->chunkOffset : \ + (ut)->pFuncs->mapOffsetToNative(ut)) + +/** + * inline version of utext_setNativeIndex(), for performance-critical situations. + * + * Set the current iteration position to the nearest code point + * boundary at or preceding the specified index. + * The index is in the native units of the original input text. + * If the index is out of range, it will be pinned to be within + * the range of the input text. + * + * @stable ICU 3.8 + */ +#define UTEXT_SETNATIVEINDEX(ut, ix) \ + { int64_t __offset = (ix) - (ut)->chunkNativeStart; \ + if (__offset>=0 && __offset<(int64_t)(ut)->nativeIndexingLimit && (ut)->chunkContents[__offset]<0xdc00) { \ + (ut)->chunkOffset=(int32_t)__offset; \ + } else { \ + utext_setNativeIndex((ut), (ix)); } } + + + +/************************************************************************************ + * + * Functions related to writing or modifying the text. + * These will work only with modifiable UTexts. Attempting to + * modify a read-only UText will return an error status. + * + ************************************************************************************/ + + +/** + * Return TRUE if the text can be written (modified) with utext_replace() or + * utext_copy(). For the text to be writable, the text provider must + * be of a type that supports writing and the UText must not be frozen. + * + * Attempting to modify text when utext_isWriteable() is FALSE will fail - + * the text will not be modified, and an error will be returned from the function + * that attempted the modification. + * + * @param ut the UText to be tested. + * @return TRUE if the text is modifiable. + * + * @see utext_freeze() + * @see utext_replace() + * @see utext_copy() + * @stable ICU 3.4 + * + */ +U_STABLE UBool U_EXPORT2 +utext_isWritable(const UText *ut); + + +/** + * Test whether there is meta data associated with the text. + * @see Replaceable::hasMetaData() + * + * @param ut The UText to be tested + * @return TRUE if the underlying text includes meta data. + * @stable ICU 3.4 + */ +U_STABLE UBool U_EXPORT2 +utext_hasMetaData(const UText *ut); + + +/** + * Replace a range of the original text with a replacement text. + * + * Leaves the current iteration position at the position following the + * newly inserted replacement text. + * + * This function is only available on UText types that support writing, + * that is, ones where utext_isWritable() returns TRUE. + * + * When using this function, there should be only a single UText opened onto the + * underlying native text string. Behavior after a replace operation + * on a UText is undefined for any other additional UTexts that refer to the + * modified string. + * + * @param ut the UText representing the text to be operated on. + * @param nativeStart the native index of the start of the region to be replaced + * @param nativeLimit the native index of the character following the region to be replaced. + * @param replacementText pointer to the replacement text + * @param replacementLength length of the replacement text, or -1 if the text is NUL terminated. + * @param status receives any error status. Possible errors include + * U_NO_WRITE_PERMISSION + * + * @return The signed number of (native) storage units by which + * the length of the text expanded or contracted. + * + * @stable ICU 3.4 + */ +U_STABLE int32_t U_EXPORT2 +utext_replace(UText *ut, + int64_t nativeStart, int64_t nativeLimit, + const UChar *replacementText, int32_t replacementLength, + UErrorCode *status); + + + +/** + * + * Copy or move a substring from one position to another within the text, + * while retaining any metadata associated with the text. + * This function is used to duplicate or reorder substrings. + * The destination index must not overlap the source range. + * + * The text to be copied or moved is inserted at destIndex; + * it does not replace or overwrite any existing text. + * + * The iteration position is left following the newly inserted text + * at the destination position. + * + * This function is only available on UText types that support writing, + * that is, ones where utext_isWritable() returns TRUE. + * + * When using this function, there should be only a single UText opened onto the + * underlying native text string. Behavior after a copy operation + * on a UText is undefined in any other additional UTexts that refer to the + * modified string. + * + * @param ut The UText representing the text to be operated on. + * @param nativeStart The native index of the start of the region to be copied or moved + * @param nativeLimit The native index of the character position following the region + * to be copied. + * @param destIndex The native destination index to which the source substring is + * copied or moved. + * @param move If TRUE, then the substring is moved, not copied/duplicated. + * @param status receives any error status. Possible errors include U_NO_WRITE_PERMISSION + * + * @stable ICU 3.4 + */ +U_STABLE void U_EXPORT2 +utext_copy(UText *ut, + int64_t nativeStart, int64_t nativeLimit, + int64_t destIndex, + UBool move, + UErrorCode *status); + + +/** + * <p> + * Freeze a UText. This prevents any modification to the underlying text itself + * by means of functions operating on this UText. + * </p> + * <p> + * Once frozen, a UText can not be unfrozen. The intent is to ensure + * that a the text underlying a frozen UText wrapper cannot be modified via that UText. + * </p> + * <p> + * Caution: freezing a UText will disable changes made via the specific + * frozen UText wrapper only; it will not have any effect on the ability to + * directly modify the text by bypassing the UText. Any such backdoor modifications + * are always an error while UText access is occurring because the underlying + * text can get out of sync with UText's buffering. + * </p> + * + * @param ut The UText to be frozen. + * @see utext_isWritable() + * @stable ICU 3.6 + */ +U_STABLE void U_EXPORT2 +utext_freeze(UText *ut); + + +/** + * UText provider properties (bit field indexes). + * + * @see UText + * @stable ICU 3.4 + */ +enum { + /** + * It is potentially time consuming for the provider to determine the length of the text. + * @stable ICU 3.4 + */ + UTEXT_PROVIDER_LENGTH_IS_EXPENSIVE = 1, + /** + * Text chunks remain valid and usable until the text object is modified or + * deleted, not just until the next time the access() function is called + * (which is the default). + * @stable ICU 3.4 + */ + UTEXT_PROVIDER_STABLE_CHUNKS = 2, + /** + * The provider supports modifying the text via the replace() and copy() + * functions. + * @see Replaceable + * @stable ICU 3.4 + */ + UTEXT_PROVIDER_WRITABLE = 3, + /** + * There is meta data associated with the text. + * @see Replaceable::hasMetaData() + * @stable ICU 3.4 + */ + UTEXT_PROVIDER_HAS_META_DATA = 4, + /** + * Text provider owns the text storage. + * Generally occurs as the result of a deep clone of the UText. + * When closing the UText, the associated text must + * also be closed/deleted/freed/ whatever is appropriate. + * @stable ICU 3.6 + */ + UTEXT_PROVIDER_OWNS_TEXT = 5 +}; + +/** + * Function type declaration for UText.clone(). + * + * clone a UText. Much like opening a UText where the source text is itself + * another UText. + * + * A deep clone will copy both the UText data structures and the underlying text. + * The original and cloned UText will operate completely independently; modifications + * made to the text in one will not effect the other. Text providers are not + * required to support deep clones. The user of clone() must check the status return + * and be prepared to handle failures. + * + * A shallow clone replicates only the UText data structures; it does not make + * a copy of the underlying text. Shallow clones can be used as an efficient way to + * have multiple iterators active in a single text string that is not being + * modified. + * + * A shallow clone operation must not fail except for truly exceptional conditions such + * as memory allocation failures. + * + * A UText and its clone may be safely concurrently accessed by separate threads. + * This is true for both shallow and deep clones. + * It is the responsibility of the Text Provider to ensure that this thread safety + * constraint is met. + + * + * @param dest A UText struct to be filled in with the result of the clone operation, + * or NULL if the clone function should heap-allocate a new UText struct. + * @param src The UText to be cloned. + * @param deep TRUE to request a deep clone, FALSE for a shallow clone. + * @param status Errors are returned here. For deep clones, U_UNSUPPORTED_ERROR + * should be returned if the text provider is unable to clone the + * original text. + * @return The newly created clone, or NULL if the clone operation failed. + * + * @stable ICU 3.4 + */ +typedef UText * U_CALLCONV +UTextClone(UText *dest, const UText *src, UBool deep, UErrorCode *status); + + +/** + * Function type declaration for UText.nativeLength(). + * + * @param ut the UText to get the length of. + * @return the length, in the native units of the original text string. + * @see UText + * @stable ICU 3.4 + */ +typedef int64_t U_CALLCONV +UTextNativeLength(UText *ut); + +/** + * Function type declaration for UText.access(). Get the description of the text chunk + * containing the text at a requested native index. The UText's iteration + * position will be left at the requested index. If the index is out + * of bounds, the iteration position will be left at the start or end + * of the string, as appropriate. + * + * Chunks must begin and end on code point boundaries. A single code point + * comprised of multiple storage units must never span a chunk boundary. + * + * + * @param ut the UText being accessed. + * @param nativeIndex Requested index of the text to be accessed. + * @param forward If TRUE, then the returned chunk must contain text + * starting from the index, so that start<=index<limit. + * If FALSE, then the returned chunk must contain text + * before the index, so that start<index<=limit. + * @return True if the requested index could be accessed. The chunk + * will contain the requested text. + * False value if a chunk cannot be accessed + * (the requested index is out of bounds). + * + * @see UText + * @stable ICU 3.4 + */ +typedef UBool U_CALLCONV +UTextAccess(UText *ut, int64_t nativeIndex, UBool forward); + +/** + * Function type declaration for UText.extract(). + * + * Extract text from a UText into a UChar buffer. The range of text to be extracted + * is specified in the native indices of the UText provider. These may not necessarily + * be UTF-16 indices. + * <p> + * The size (number of 16 bit UChars) in the data to be extracted is returned. The + * full amount is returned, even when the specified buffer size is smaller. + * <p> + * The extracted string will (if you are a user) / must (if you are a text provider) + * be NUL-terminated if there is sufficient space in the destination buffer. + * + * @param ut the UText from which to extract data. + * @param nativeStart the native index of the first character to extract. + * @param nativeLimit the native string index of the position following the last + * character to extract. + * @param dest the UChar (UTF-16) buffer into which the extracted text is placed + * @param destCapacity The size, in UChars, of the destination buffer. May be zero + * for precomputing the required size. + * @param status receives any error status. + * If U_BUFFER_OVERFLOW_ERROR: Returns number of UChars for + * preflighting. + * @return Number of UChars in the data. Does not include a trailing NUL. + * + * @stable ICU 3.4 + */ +typedef int32_t U_CALLCONV +UTextExtract(UText *ut, + int64_t nativeStart, int64_t nativeLimit, + UChar *dest, int32_t destCapacity, + UErrorCode *status); + +/** + * Function type declaration for UText.replace(). + * + * Replace a range of the original text with a replacement text. + * + * Leaves the current iteration position at the position following the + * newly inserted replacement text. + * + * This function need only be implemented on UText types that support writing. + * + * When using this function, there should be only a single UText opened onto the + * underlying native text string. The function is responsible for updating the + * text chunk within the UText to reflect the updated iteration position, + * taking into account any changes to the underlying string's structure caused + * by the replace operation. + * + * @param ut the UText representing the text to be operated on. + * @param nativeStart the index of the start of the region to be replaced + * @param nativeLimit the index of the character following the region to be replaced. + * @param replacementText pointer to the replacement text + * @param replacmentLength length of the replacement text in UChars, or -1 if the text is NUL terminated. + * @param status receives any error status. Possible errors include + * U_NO_WRITE_PERMISSION + * + * @return The signed number of (native) storage units by which + * the length of the text expanded or contracted. + * + * @stable ICU 3.4 + */ +typedef int32_t U_CALLCONV +UTextReplace(UText *ut, + int64_t nativeStart, int64_t nativeLimit, + const UChar *replacementText, int32_t replacmentLength, + UErrorCode *status); + +/** + * Function type declaration for UText.copy(). + * + * Copy or move a substring from one position to another within the text, + * while retaining any metadata associated with the text. + * This function is used to duplicate or reorder substrings. + * The destination index must not overlap the source range. + * + * The text to be copied or moved is inserted at destIndex; + * it does not replace or overwrite any existing text. + * + * This function need only be implemented for UText types that support writing. + * + * When using this function, there should be only a single UText opened onto the + * underlying native text string. The function is responsible for updating the + * text chunk within the UText to reflect the updated iteration position, + * taking into account any changes to the underlying string's structure caused + * by the replace operation. + * + * @param ut The UText representing the text to be operated on. + * @param nativeStart The index of the start of the region to be copied or moved + * @param nativeLimit The index of the character following the region to be replaced. + * @param nativeDest The destination index to which the source substring is copied or moved. + * @param move If TRUE, then the substring is moved, not copied/duplicated. + * @param status receives any error status. Possible errors include U_NO_WRITE_PERMISSION + * + * @stable ICU 3.4 + */ +typedef void U_CALLCONV +UTextCopy(UText *ut, + int64_t nativeStart, int64_t nativeLimit, + int64_t nativeDest, + UBool move, + UErrorCode *status); + +/** + * Function type declaration for UText.mapOffsetToNative(). + * Map from the current UChar offset within the current text chunk to + * the corresponding native index in the original source text. + * + * This is required only for text providers that do not use native UTF-16 indexes. + * + * @param ut the UText. + * @return Absolute (native) index corresponding to chunkOffset in the current chunk. + * The returned native index should always be to a code point boundary. + * + * @stable ICU 3.4 + */ +typedef int64_t U_CALLCONV +UTextMapOffsetToNative(const UText *ut); + +/** + * Function type declaration for UText.mapIndexToUTF16(). + * Map from a native index to a UChar offset within a text chunk. + * Behavior is undefined if the native index does not fall within the + * current chunk. + * + * This function is required only for text providers that do not use native UTF-16 indexes. + * + * @param ut The UText containing the text chunk. + * @param nativeIndex Absolute (native) text index, chunk->start<=index<=chunk->limit. + * @return Chunk-relative UTF-16 offset corresponding to the specified native + * index. + * + * @stable ICU 3.4 + */ +typedef int32_t U_CALLCONV +UTextMapNativeIndexToUTF16(const UText *ut, int64_t nativeIndex); + + +/** + * Function type declaration for UText.utextClose(). + * + * A Text Provider close function is only required for provider types that make + * allocations in their open function (or other functions) that must be + * cleaned when the UText is closed. + * + * The allocation of the UText struct itself and any "extra" storage + * associated with the UText is handled by the common UText implementation + * and does not require provider specific cleanup in a close function. + * + * Most UText provider implementations do not need to implement this function. + * + * @param ut A UText object to be closed. + * + * @stable ICU 3.4 + */ +typedef void U_CALLCONV +UTextClose(UText *ut); + + +/** + * (public) Function dispatch table for UText. + * Conceptually very much like a C++ Virtual Function Table. + * This struct defines the organization of the table. + * Each text provider implementation must provide an + * actual table that is initialized with the appropriate functions + * for the type of text being handled. + * @stable ICU 3.6 + */ +struct UTextFuncs { + /** + * (public) Function table size, sizeof(UTextFuncs) + * Intended for use should the table grow to accommodate added + * functions in the future, to allow tests for older format + * function tables that do not contain the extensions. + * + * Fields are placed for optimal alignment on + * 32/64/128-bit-pointer machines, by normally grouping together + * 4 32-bit fields, + * 4 pointers, + * 2 64-bit fields + * in sequence. + * @stable ICU 3.6 + */ + int32_t tableSize; + + /** + * (private) Alignment padding. + * Do not use, reserved for use by the UText framework only. + * @internal + */ + int32_t reserved1, /** @internal */ reserved2, /** @internal */ reserved3; + + + /** + * (public) Function pointer for UTextClone + * + * @see UTextClone + * @stable ICU 3.6 + */ + UTextClone *clone; + + /** + * (public) function pointer for UTextLength + * May be expensive to compute! + * + * @see UTextLength + * @stable ICU 3.6 + */ + UTextNativeLength *nativeLength; + + /** + * (public) Function pointer for UTextAccess. + * + * @see UTextAccess + * @stable ICU 3.6 + */ + UTextAccess *access; + + /** + * (public) Function pointer for UTextExtract. + * + * @see UTextExtract + * @stable ICU 3.6 + */ + UTextExtract *extract; + + /** + * (public) Function pointer for UTextReplace. + * + * @see UTextReplace + * @stable ICU 3.6 + */ + UTextReplace *replace; + + /** + * (public) Function pointer for UTextCopy. + * + * @see UTextCopy + * @stable ICU 3.6 + */ + UTextCopy *copy; + + /** + * (public) Function pointer for UTextMapOffsetToNative. + * + * @see UTextMapOffsetToNative + * @stable ICU 3.6 + */ + UTextMapOffsetToNative *mapOffsetToNative; + + /** + * (public) Function pointer for UTextMapNativeIndexToUTF16. + * + * @see UTextMapNativeIndexToUTF16 + * @stable ICU 3.6 + */ + UTextMapNativeIndexToUTF16 *mapNativeIndexToUTF16; + + /** + * (public) Function pointer for UTextClose. + * + * @see UTextClose + * @stable ICU 3.6 + */ + UTextClose *close; + + /** + * (private) Spare function pointer + * @internal + */ + UTextClose *spare1; + + /** + * (private) Spare function pointer + * @internal + */ + UTextClose *spare2; + + /** + * (private) Spare function pointer + * @internal + */ + UTextClose *spare3; + +}; +/** + * Function dispatch table for UText + * @see UTextFuncs + */ +typedef struct UTextFuncs UTextFuncs; + + /** + * UText struct. Provides the interface between the generic UText access code + * and the UText provider code that works on specific kinds of + * text (UTF-8, noncontiguous UTF-16, whatever.) + * + * Applications that are using predefined types of text providers + * to pass text data to ICU services will have no need to view the + * internals of the UText structs that they open. + * + * @stable ICU 3.6 + */ +struct UText { + /** + * (private) Magic. Used to help detect when UText functions are handed + * invalid or uninitialized UText structs. + * utext_openXYZ() functions take an initialized, + * but not necessarily open, UText struct as an + * optional fill-in parameter. This magic field + * is used to check for that initialization. + * Text provider close functions must NOT clear + * the magic field because that would prevent + * reuse of the UText struct. + * @internal + */ + uint32_t magic; + + + /** + * (private) Flags for managing the allocation and freeing of + * memory associated with this UText. + * @internal + */ + int32_t flags; + + + /** + * Text provider properties. This set of flags is maintained by the + * text provider implementation. + * @stable ICU 3.4 + */ + int32_t providerProperties; + + /** + * (public) sizeOfStruct=sizeof(UText) + * Allows possible backward compatible extension. + * + * @stable ICU 3.4 + */ + int32_t sizeOfStruct; + + /* ------ 16 byte alignment boundary ----------- */ + + + /** + * (protected) Native index of the first character position following + * the current chunk. + * @stable ICU 3.6 + */ + int64_t chunkNativeLimit; + + /** + * (protected) Size in bytes of the extra space (pExtra). + * @stable ICU 3.4 + */ + int32_t extraSize; + + /** + * (protected) The highest chunk offset where native indexing and + * chunk (UTF-16) indexing correspond. For UTF-16 sources, value + * will be equal to chunkLength. + * + * @stable ICU 3.6 + */ + int32_t nativeIndexingLimit; + + /* ---- 16 byte alignment boundary------ */ + + /** + * (protected) Native index of the first character in the text chunk. + * @stable ICU 3.6 + */ + int64_t chunkNativeStart; + + /** + * (protected) Current iteration position within the text chunk (UTF-16 buffer). + * This is the index to the character that will be returned by utext_next32(). + * @stable ICU 3.6 + */ + int32_t chunkOffset; + + /** + * (protected) Length the text chunk (UTF-16 buffer), in UChars. + * @stable ICU 3.6 + */ + int32_t chunkLength; + + /* ---- 16 byte alignment boundary-- */ + + + /** + * (protected) pointer to a chunk of text in UTF-16 format. + * May refer either to original storage of the source of the text, or + * if conversion was required, to a buffer owned by the UText. + * @stable ICU 3.6 + */ + const UChar *chunkContents; + + /** + * (public) Pointer to Dispatch table for accessing functions for this UText. + * @stable ICU 3.6 + */ + const UTextFuncs *pFuncs; + + /** + * (protected) Pointer to additional space requested by the + * text provider during the utext_open operation. + * @stable ICU 3.4 + */ + void *pExtra; + + /** + * (protected) Pointer to string or text-containing object or similar. + * This is the source of the text that this UText is wrapping, in a format + * that is known to the text provider functions. + * @stable ICU 3.4 + */ + const void *context; + + /* --- 16 byte alignment boundary--- */ + + /** + * (protected) Pointer fields available for use by the text provider. + * Not used by UText common code. + * @stable ICU 3.6 + */ + const void *p; + /** + * (protected) Pointer fields available for use by the text provider. + * Not used by UText common code. + * @stable ICU 3.6 + */ + const void *q; + /** + * (protected) Pointer fields available for use by the text provider. + * Not used by UText common code. + * @stable ICU 3.6 + */ + const void *r; + + /** + * Private field reserved for future use by the UText framework + * itself. This is not to be touched by the text providers. + * @internal ICU 3.4 + */ + void *privP; + + + /* --- 16 byte alignment boundary--- */ + + + /** + * (protected) Integer field reserved for use by the text provider. + * Not used by the UText framework, or by the client (user) of the UText. + * @stable ICU 3.4 + */ + int64_t a; + + /** + * (protected) Integer field reserved for use by the text provider. + * Not used by the UText framework, or by the client (user) of the UText. + * @stable ICU 3.4 + */ + int32_t b; + + /** + * (protected) Integer field reserved for use by the text provider. + * Not used by the UText framework, or by the client (user) of the UText. + * @stable ICU 3.4 + */ + int32_t c; + + /* ---- 16 byte alignment boundary---- */ + + + /** + * Private field reserved for future use by the UText framework + * itself. This is not to be touched by the text providers. + * @internal ICU 3.4 + */ + int64_t privA; + /** + * Private field reserved for future use by the UText framework + * itself. This is not to be touched by the text providers. + * @internal ICU 3.4 + */ + int32_t privB; + /** + * Private field reserved for future use by the UText framework + * itself. This is not to be touched by the text providers. + * @internal ICU 3.4 + */ + int32_t privC; +}; + + +/** + * Common function for use by Text Provider implementations to allocate and/or initialize + * a new UText struct. To be called in the implementation of utext_open() functions. + * If the supplied UText parameter is null, a new UText struct will be allocated on the heap. + * If the supplied UText is already open, the provider's close function will be called + * so that the struct can be reused by the open that is in progress. + * + * @param ut pointer to a UText struct to be re-used, or null if a new UText + * should be allocated. + * @param extraSpace The amount of additional space to be allocated as part + * of this UText, for use by types of providers that require + * additional storage. + * @param status Errors are returned here. + * @return pointer to the UText, allocated if necessary, with extra space set up if requested. + * @stable ICU 3.4 + */ +U_STABLE UText * U_EXPORT2 +utext_setup(UText *ut, int32_t extraSpace, UErrorCode *status); + +#ifndef U_HIDE_INTERNAL_API +/** + * @internal + * Value used to help identify correctly initialized UText structs. + * Note: must be publicly visible so that UTEXT_INITIALIZER can access it. + */ +enum { + UTEXT_MAGIC = 0x345ad82c +}; +#endif /* U_HIDE_INTERNAL_API */ + +/** + * initializer to be used with local (stack) instances of a UText + * struct. UText structs must be initialized before passing + * them to one of the utext_open functions. + * + * @stable ICU 3.6 + */ +#define UTEXT_INITIALIZER { \ + UTEXT_MAGIC, /* magic */ \ + 0, /* flags */ \ + 0, /* providerProps */ \ + sizeof(UText), /* sizeOfStruct */ \ + 0, /* chunkNativeLimit */ \ + 0, /* extraSize */ \ + 0, /* nativeIndexingLimit */ \ + 0, /* chunkNativeStart */ \ + 0, /* chunkOffset */ \ + 0, /* chunkLength */ \ + NULL, /* chunkContents */ \ + NULL, /* pFuncs */ \ + NULL, /* pExtra */ \ + NULL, /* context */ \ + NULL, NULL, NULL, /* p, q, r */ \ + NULL, /* privP */ \ + 0, 0, 0, /* a, b, c */ \ + 0, 0, 0 /* privA,B,C, */ \ + } + + +U_CDECL_END + + + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utf.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utf.h new file mode 100755 index 00000000..ef512997 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utf.h @@ -0,0 +1,225 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 1999-2011, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: utf.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 1999sep09 +* created by: Markus W. Scherer +*/ + +/** + * \file + * \brief C API: Code point macros + * + * This file defines macros for checking whether a code point is + * a surrogate or a non-character etc. + * + * If U_NO_DEFAULT_INCLUDE_UTF_HEADERS is 0 then utf.h is included by utypes.h + * and itself includes utf8.h and utf16.h after some + * common definitions. + * If U_NO_DEFAULT_INCLUDE_UTF_HEADERS is 1 then each of these headers must be + * included explicitly if their definitions are used. + * + * utf8.h and utf16.h define macros for efficiently getting code points + * in and out of UTF-8/16 strings. + * utf16.h macros have "U16_" prefixes. + * utf8.h defines similar macros with "U8_" prefixes for UTF-8 string handling. + * + * ICU mostly processes 16-bit Unicode strings. + * Most of the time, such strings are well-formed UTF-16. + * Single, unpaired surrogates must be handled as well, and are treated in ICU + * like regular code points where possible. + * (Pairs of surrogate code points are indistinguishable from supplementary + * code points encoded as pairs of supplementary code units.) + * + * In fact, almost all Unicode code points in normal text (>99%) + * are on the BMP (<=U+ffff) and even <=U+d7ff. + * ICU functions handle supplementary code points (U+10000..U+10ffff) + * but are optimized for the much more frequently occurring BMP code points. + * + * umachine.h defines UChar to be an unsigned 16-bit integer. + * Since ICU 59, ICU uses char16_t in C++, UChar only in C, + * and defines UChar=char16_t by default. See the UChar API docs for details. + * + * UChar32 is defined to be a signed 32-bit integer (int32_t), large enough for a 21-bit + * Unicode code point (Unicode scalar value, 0..0x10ffff) and U_SENTINEL (-1). + * Before ICU 2.4, the definition of UChar32 was similarly platform-dependent as + * the definition of UChar. For details see the documentation for UChar32 itself. + * + * utf.h defines a small number of C macros for single Unicode code points. + * These are simple checks for surrogates and non-characters. + * For actual Unicode character properties see uchar.h. + * + * By default, string operations must be done with error checking in case + * a string is not well-formed UTF-16 or UTF-8. + * + * The U16_ macros detect if a surrogate code unit is unpaired + * (lead unit without trail unit or vice versa) and just return the unit itself + * as the code point. + * + * The U8_ macros detect illegal byte sequences and return a negative value. + * Starting with ICU 60, the observable length of a single illegal byte sequence + * skipped by one of these macros follows the Unicode 6+ recommendation + * which is consistent with the W3C Encoding Standard. + * + * There are ..._OR_FFFD versions of both U16_ and U8_ macros + * that return U+FFFD for illegal code unit sequences. + * + * The regular "safe" macros require that the initial, passed-in string index + * is within bounds. They only check the index when they read more than one + * code unit. This is usually done with code similar to the following loop: + * <pre>while(i<length) { + * U16_NEXT(s, i, length, c); + * // use c + * }</pre> + * + * When it is safe to assume that text is well-formed UTF-16 + * (does not contain single, unpaired surrogates), then one can use + * U16_..._UNSAFE macros. + * These do not check for proper code unit sequences or truncated text and may + * yield wrong results or even cause a crash if they are used with "malformed" + * text. + * In practice, U16_..._UNSAFE macros will produce slightly less code but + * should not be faster because the processing is only different when a + * surrogate code unit is detected, which will be rare. + * + * Similarly for UTF-8, there are "safe" macros without a suffix, + * and U8_..._UNSAFE versions. + * The performance differences are much larger here because UTF-8 provides so + * many opportunities for malformed sequences. + * The unsafe UTF-8 macros are entirely implemented inside the macro definitions + * and are fast, while the safe UTF-8 macros call functions for some complicated cases. + * + * Unlike with UTF-16, malformed sequences cannot be expressed with distinct + * code point values (0..U+10ffff). They are indicated with negative values instead. + * + * For more information see the ICU User Guide Strings chapter + * (http://userguide.icu-project.org/strings). + * + * <em>Usage:</em> + * ICU coding guidelines for if() statements should be followed when using these macros. + * Compound statements (curly braces {}) must be used for if-else-while... + * bodies and all macro statements should be terminated with semicolon. + * + * @stable ICU 2.4 + */ + +#ifndef __UTF_H__ +#define __UTF_H__ + +#include "unicode/umachine.h" +/* include the utfXX.h after the following definitions */ + +/* single-code point definitions -------------------------------------------- */ + +/** + * Is this code point a Unicode noncharacter? + * @param c 32-bit code point + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U_IS_UNICODE_NONCHAR(c) \ + ((c)>=0xfdd0 && \ + ((c)<=0xfdef || ((c)&0xfffe)==0xfffe) && (c)<=0x10ffff) + +/** + * Is c a Unicode code point value (0..U+10ffff) + * that can be assigned a character? + * + * Code points that are not characters include: + * - single surrogate code points (U+d800..U+dfff, 2048 code points) + * - the last two code points on each plane (U+__fffe and U+__ffff, 34 code points) + * - U+fdd0..U+fdef (new with Unicode 3.1, 32 code points) + * - the highest Unicode code point value is U+10ffff + * + * This means that all code points below U+d800 are character code points, + * and that boundary is tested first for performance. + * + * @param c 32-bit code point + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U_IS_UNICODE_CHAR(c) \ + ((uint32_t)(c)<0xd800 || \ + (0xdfff<(c) && (c)<=0x10ffff && !U_IS_UNICODE_NONCHAR(c))) + +/** + * Is this code point a BMP code point (U+0000..U+ffff)? + * @param c 32-bit code point + * @return TRUE or FALSE + * @stable ICU 2.8 + */ +#define U_IS_BMP(c) ((uint32_t)(c)<=0xffff) + +/** + * Is this code point a supplementary code point (U+10000..U+10ffff)? + * @param c 32-bit code point + * @return TRUE or FALSE + * @stable ICU 2.8 + */ +#define U_IS_SUPPLEMENTARY(c) ((uint32_t)((c)-0x10000)<=0xfffff) + +/** + * Is this code point a lead surrogate (U+d800..U+dbff)? + * @param c 32-bit code point + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U_IS_LEAD(c) (((c)&0xfffffc00)==0xd800) + +/** + * Is this code point a trail surrogate (U+dc00..U+dfff)? + * @param c 32-bit code point + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00) + +/** + * Is this code point a surrogate (U+d800..U+dfff)? + * @param c 32-bit code point + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800) + +/** + * Assuming c is a surrogate code point (U_IS_SURROGATE(c)), + * is it a lead surrogate? + * @param c 32-bit code point + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U_IS_SURROGATE_LEAD(c) (((c)&0x400)==0) + +/** + * Assuming c is a surrogate code point (U_IS_SURROGATE(c)), + * is it a trail surrogate? + * @param c 32-bit code point + * @return TRUE or FALSE + * @stable ICU 4.2 + */ +#define U_IS_SURROGATE_TRAIL(c) (((c)&0x400)!=0) + +/* include the utfXX.h ------------------------------------------------------ */ + +#if !U_NO_DEFAULT_INCLUDE_UTF_HEADERS + +#include "unicode/utf8.h" +#include "unicode/utf16.h" + +/* utf_old.h contains deprecated, pre-ICU 2.4 definitions */ +#include "unicode/utf_old.h" + +#endif /* !U_NO_DEFAULT_INCLUDE_UTF_HEADERS */ + +#endif /* __UTF_H__ */ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utf16.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utf16.h new file mode 100755 index 00000000..35fd0986 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utf16.h @@ -0,0 +1,745 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 1999-2012, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: utf16.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 1999sep09 +* created by: Markus W. Scherer +*/ + +/** + * \file + * \brief C API: 16-bit Unicode handling macros + * + * This file defines macros to deal with 16-bit Unicode (UTF-16) code units and strings. + * + * For more information see utf.h and the ICU User Guide Strings chapter + * (http://userguide.icu-project.org/strings). + * + * <em>Usage:</em> + * ICU coding guidelines for if() statements should be followed when using these macros. + * Compound statements (curly braces {}) must be used for if-else-while... + * bodies and all macro statements should be terminated with semicolon. + */ + +#ifndef __UTF16_H__ +#define __UTF16_H__ + +#include "unicode/umachine.h" +#ifndef __UTF_H__ +# include "unicode/utf.h" +#endif + +/* single-code point definitions -------------------------------------------- */ + +/** + * Does this code unit alone encode a code point (BMP, not a surrogate)? + * @param c 16-bit code unit + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U16_IS_SINGLE(c) !U_IS_SURROGATE(c) + +/** + * Is this code unit a lead surrogate (U+d800..U+dbff)? + * @param c 16-bit code unit + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U16_IS_LEAD(c) (((c)&0xfffffc00)==0xd800) + +/** + * Is this code unit a trail surrogate (U+dc00..U+dfff)? + * @param c 16-bit code unit + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00) + +/** + * Is this code unit a surrogate (U+d800..U+dfff)? + * @param c 16-bit code unit + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c) + +/** + * Assuming c is a surrogate code point (U16_IS_SURROGATE(c)), + * is it a lead surrogate? + * @param c 16-bit code unit + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0) + +/** + * Assuming c is a surrogate code point (U16_IS_SURROGATE(c)), + * is it a trail surrogate? + * @param c 16-bit code unit + * @return TRUE or FALSE + * @stable ICU 4.2 + */ +#define U16_IS_SURROGATE_TRAIL(c) (((c)&0x400)!=0) + +/** + * Helper constant for U16_GET_SUPPLEMENTARY. + * @internal + */ +#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000) + +/** + * Get a supplementary code point value (U+10000..U+10ffff) + * from its lead and trail surrogates. + * The result is undefined if the input values are not + * lead and trail surrogates. + * + * @param lead lead surrogate (U+d800..U+dbff) + * @param trail trail surrogate (U+dc00..U+dfff) + * @return supplementary code point (U+10000..U+10ffff) + * @stable ICU 2.4 + */ +#define U16_GET_SUPPLEMENTARY(lead, trail) \ + (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET) + + +/** + * Get the lead surrogate (0xd800..0xdbff) for a + * supplementary code point (0x10000..0x10ffff). + * @param supplementary 32-bit code point (U+10000..U+10ffff) + * @return lead surrogate (U+d800..U+dbff) for supplementary + * @stable ICU 2.4 + */ +#define U16_LEAD(supplementary) (UChar)(((supplementary)>>10)+0xd7c0) + +/** + * Get the trail surrogate (0xdc00..0xdfff) for a + * supplementary code point (0x10000..0x10ffff). + * @param supplementary 32-bit code point (U+10000..U+10ffff) + * @return trail surrogate (U+dc00..U+dfff) for supplementary + * @stable ICU 2.4 + */ +#define U16_TRAIL(supplementary) (UChar)(((supplementary)&0x3ff)|0xdc00) + +/** + * How many 16-bit code units are used to encode this Unicode code point? (1 or 2) + * The result is not defined if c is not a Unicode code point (U+0000..U+10ffff). + * @param c 32-bit code point + * @return 1 or 2 + * @stable ICU 2.4 + */ +#define U16_LENGTH(c) ((uint32_t)(c)<=0xffff ? 1 : 2) + +/** + * The maximum number of 16-bit code units per Unicode code point (U+0000..U+10ffff). + * @return 2 + * @stable ICU 2.4 + */ +#define U16_MAX_LENGTH 2 + +/** + * Get a code point from a string at a random-access offset, + * without changing the offset. + * "Unsafe" macro, assumes well-formed UTF-16. + * + * The offset may point to either the lead or trail surrogate unit + * for a supplementary code point, in which case the macro will read + * the adjacent matching surrogate as well. + * The result is undefined if the offset points to a single, unpaired surrogate. + * Iteration through a string is more efficient with U16_NEXT_UNSAFE or U16_NEXT. + * + * @param s const UChar * string + * @param i string offset + * @param c output UChar32 variable + * @see U16_GET + * @stable ICU 2.4 + */ +#define U16_GET_UNSAFE(s, i, c) { \ + (c)=(s)[i]; \ + if(U16_IS_SURROGATE(c)) { \ + if(U16_IS_SURROGATE_LEAD(c)) { \ + (c)=U16_GET_SUPPLEMENTARY((c), (s)[(i)+1]); \ + } else { \ + (c)=U16_GET_SUPPLEMENTARY((s)[(i)-1], (c)); \ + } \ + } \ +} + +/** + * Get a code point from a string at a random-access offset, + * without changing the offset. + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * The offset may point to either the lead or trail surrogate unit + * for a supplementary code point, in which case the macro will read + * the adjacent matching surrogate as well. + * + * The length can be negative for a NUL-terminated string. + * + * If the offset points to a single, unpaired surrogate, then + * c is set to that unpaired surrogate. + * Iteration through a string is more efficient with U16_NEXT_UNSAFE or U16_NEXT. + * + * @param s const UChar * string + * @param start starting string offset (usually 0) + * @param i string offset, must be start<=i<length + * @param length string length + * @param c output UChar32 variable + * @see U16_GET_UNSAFE + * @stable ICU 2.4 + */ +#define U16_GET(s, start, i, length, c) { \ + (c)=(s)[i]; \ + if(U16_IS_SURROGATE(c)) { \ + uint16_t __c2; \ + if(U16_IS_SURROGATE_LEAD(c)) { \ + if((i)+1!=(length) && U16_IS_TRAIL(__c2=(s)[(i)+1])) { \ + (c)=U16_GET_SUPPLEMENTARY((c), __c2); \ + } \ + } else { \ + if((i)>(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \ + (c)=U16_GET_SUPPLEMENTARY(__c2, (c)); \ + } \ + } \ + } \ +} + +#ifndef U_HIDE_DRAFT_API + +/** + * Get a code point from a string at a random-access offset, + * without changing the offset. + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * The offset may point to either the lead or trail surrogate unit + * for a supplementary code point, in which case the macro will read + * the adjacent matching surrogate as well. + * + * The length can be negative for a NUL-terminated string. + * + * If the offset points to a single, unpaired surrogate, then + * c is set to U+FFFD. + * Iteration through a string is more efficient with U16_NEXT_UNSAFE or U16_NEXT_OR_FFFD. + * + * @param s const UChar * string + * @param start starting string offset (usually 0) + * @param i string offset, must be start<=i<length + * @param length string length + * @param c output UChar32 variable + * @see U16_GET_UNSAFE + * @draft ICU 60 + */ +#define U16_GET_OR_FFFD(s, start, i, length, c) { \ + (c)=(s)[i]; \ + if(U16_IS_SURROGATE(c)) { \ + uint16_t __c2; \ + if(U16_IS_SURROGATE_LEAD(c)) { \ + if((i)+1!=(length) && U16_IS_TRAIL(__c2=(s)[(i)+1])) { \ + (c)=U16_GET_SUPPLEMENTARY((c), __c2); \ + } else { \ + (c)=0xfffd; \ + } \ + } else { \ + if((i)>(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \ + (c)=U16_GET_SUPPLEMENTARY(__c2, (c)); \ + } else { \ + (c)=0xfffd; \ + } \ + } \ + } \ +} + +#endif // U_HIDE_DRAFT_API + +/* definitions with forward iteration --------------------------------------- */ + +/** + * Get a code point from a string at a code point boundary offset, + * and advance the offset to the next code point boundary. + * (Post-incrementing forward iteration.) + * "Unsafe" macro, assumes well-formed UTF-16. + * + * The offset may point to the lead surrogate unit + * for a supplementary code point, in which case the macro will read + * the following trail surrogate as well. + * If the offset points to a trail surrogate, then that itself + * will be returned as the code point. + * The result is undefined if the offset points to a single, unpaired lead surrogate. + * + * @param s const UChar * string + * @param i string offset + * @param c output UChar32 variable + * @see U16_NEXT + * @stable ICU 2.4 + */ +#define U16_NEXT_UNSAFE(s, i, c) { \ + (c)=(s)[(i)++]; \ + if(U16_IS_LEAD(c)) { \ + (c)=U16_GET_SUPPLEMENTARY((c), (s)[(i)++]); \ + } \ +} + +/** + * Get a code point from a string at a code point boundary offset, + * and advance the offset to the next code point boundary. + * (Post-incrementing forward iteration.) + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * The length can be negative for a NUL-terminated string. + * + * The offset may point to the lead surrogate unit + * for a supplementary code point, in which case the macro will read + * the following trail surrogate as well. + * If the offset points to a trail surrogate or + * to a single, unpaired lead surrogate, then c is set to that unpaired surrogate. + * + * @param s const UChar * string + * @param i string offset, must be i<length + * @param length string length + * @param c output UChar32 variable + * @see U16_NEXT_UNSAFE + * @stable ICU 2.4 + */ +#define U16_NEXT(s, i, length, c) { \ + (c)=(s)[(i)++]; \ + if(U16_IS_LEAD(c)) { \ + uint16_t __c2; \ + if((i)!=(length) && U16_IS_TRAIL(__c2=(s)[(i)])) { \ + ++(i); \ + (c)=U16_GET_SUPPLEMENTARY((c), __c2); \ + } \ + } \ +} + +#ifndef U_HIDE_DRAFT_API + +/** + * Get a code point from a string at a code point boundary offset, + * and advance the offset to the next code point boundary. + * (Post-incrementing forward iteration.) + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * The length can be negative for a NUL-terminated string. + * + * The offset may point to the lead surrogate unit + * for a supplementary code point, in which case the macro will read + * the following trail surrogate as well. + * If the offset points to a trail surrogate or + * to a single, unpaired lead surrogate, then c is set to U+FFFD. + * + * @param s const UChar * string + * @param i string offset, must be i<length + * @param length string length + * @param c output UChar32 variable + * @see U16_NEXT_UNSAFE + * @draft ICU 60 + */ +#define U16_NEXT_OR_FFFD(s, i, length, c) { \ + (c)=(s)[(i)++]; \ + if(U16_IS_SURROGATE(c)) { \ + uint16_t __c2; \ + if(U16_IS_SURROGATE_LEAD(c) && (i)!=(length) && U16_IS_TRAIL(__c2=(s)[(i)])) { \ + ++(i); \ + (c)=U16_GET_SUPPLEMENTARY((c), __c2); \ + } else { \ + (c)=0xfffd; \ + } \ + } \ +} + +#endif // U_HIDE_DRAFT_API + +/** + * Append a code point to a string, overwriting 1 or 2 code units. + * The offset points to the current end of the string contents + * and is advanced (post-increment). + * "Unsafe" macro, assumes a valid code point and sufficient space in the string. + * Otherwise, the result is undefined. + * + * @param s const UChar * string buffer + * @param i string offset + * @param c code point to append + * @see U16_APPEND + * @stable ICU 2.4 + */ +#define U16_APPEND_UNSAFE(s, i, c) { \ + if((uint32_t)(c)<=0xffff) { \ + (s)[(i)++]=(uint16_t)(c); \ + } else { \ + (s)[(i)++]=(uint16_t)(((c)>>10)+0xd7c0); \ + (s)[(i)++]=(uint16_t)(((c)&0x3ff)|0xdc00); \ + } \ +} + +/** + * Append a code point to a string, overwriting 1 or 2 code units. + * The offset points to the current end of the string contents + * and is advanced (post-increment). + * "Safe" macro, checks for a valid code point. + * If a surrogate pair is written, checks for sufficient space in the string. + * If the code point is not valid or a trail surrogate does not fit, + * then isError is set to TRUE. + * + * @param s const UChar * string buffer + * @param i string offset, must be i<capacity + * @param capacity size of the string buffer + * @param c code point to append + * @param isError output UBool set to TRUE if an error occurs, otherwise not modified + * @see U16_APPEND_UNSAFE + * @stable ICU 2.4 + */ +#define U16_APPEND(s, i, capacity, c, isError) { \ + if((uint32_t)(c)<=0xffff) { \ + (s)[(i)++]=(uint16_t)(c); \ + } else if((uint32_t)(c)<=0x10ffff && (i)+1<(capacity)) { \ + (s)[(i)++]=(uint16_t)(((c)>>10)+0xd7c0); \ + (s)[(i)++]=(uint16_t)(((c)&0x3ff)|0xdc00); \ + } else /* c>0x10ffff or not enough space */ { \ + (isError)=TRUE; \ + } \ +} + +/** + * Advance the string offset from one code point boundary to the next. + * (Post-incrementing iteration.) + * "Unsafe" macro, assumes well-formed UTF-16. + * + * @param s const UChar * string + * @param i string offset + * @see U16_FWD_1 + * @stable ICU 2.4 + */ +#define U16_FWD_1_UNSAFE(s, i) { \ + if(U16_IS_LEAD((s)[(i)++])) { \ + ++(i); \ + } \ +} + +/** + * Advance the string offset from one code point boundary to the next. + * (Post-incrementing iteration.) + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * The length can be negative for a NUL-terminated string. + * + * @param s const UChar * string + * @param i string offset, must be i<length + * @param length string length + * @see U16_FWD_1_UNSAFE + * @stable ICU 2.4 + */ +#define U16_FWD_1(s, i, length) { \ + if(U16_IS_LEAD((s)[(i)++]) && (i)!=(length) && U16_IS_TRAIL((s)[i])) { \ + ++(i); \ + } \ +} + +/** + * Advance the string offset from one code point boundary to the n-th next one, + * i.e., move forward by n code points. + * (Post-incrementing iteration.) + * "Unsafe" macro, assumes well-formed UTF-16. + * + * @param s const UChar * string + * @param i string offset + * @param n number of code points to skip + * @see U16_FWD_N + * @stable ICU 2.4 + */ +#define U16_FWD_N_UNSAFE(s, i, n) { \ + int32_t __N=(n); \ + while(__N>0) { \ + U16_FWD_1_UNSAFE(s, i); \ + --__N; \ + } \ +} + +/** + * Advance the string offset from one code point boundary to the n-th next one, + * i.e., move forward by n code points. + * (Post-incrementing iteration.) + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * The length can be negative for a NUL-terminated string. + * + * @param s const UChar * string + * @param i int32_t string offset, must be i<length + * @param length int32_t string length + * @param n number of code points to skip + * @see U16_FWD_N_UNSAFE + * @stable ICU 2.4 + */ +#define U16_FWD_N(s, i, length, n) { \ + int32_t __N=(n); \ + while(__N>0 && ((i)<(length) || ((length)<0 && (s)[i]!=0))) { \ + U16_FWD_1(s, i, length); \ + --__N; \ + } \ +} + +/** + * Adjust a random-access offset to a code point boundary + * at the start of a code point. + * If the offset points to the trail surrogate of a surrogate pair, + * then the offset is decremented. + * Otherwise, it is not modified. + * "Unsafe" macro, assumes well-formed UTF-16. + * + * @param s const UChar * string + * @param i string offset + * @see U16_SET_CP_START + * @stable ICU 2.4 + */ +#define U16_SET_CP_START_UNSAFE(s, i) { \ + if(U16_IS_TRAIL((s)[i])) { \ + --(i); \ + } \ +} + +/** + * Adjust a random-access offset to a code point boundary + * at the start of a code point. + * If the offset points to the trail surrogate of a surrogate pair, + * then the offset is decremented. + * Otherwise, it is not modified. + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * @param s const UChar * string + * @param start starting string offset (usually 0) + * @param i string offset, must be start<=i + * @see U16_SET_CP_START_UNSAFE + * @stable ICU 2.4 + */ +#define U16_SET_CP_START(s, start, i) { \ + if(U16_IS_TRAIL((s)[i]) && (i)>(start) && U16_IS_LEAD((s)[(i)-1])) { \ + --(i); \ + } \ +} + +/* definitions with backward iteration -------------------------------------- */ + +/** + * Move the string offset from one code point boundary to the previous one + * and get the code point between them. + * (Pre-decrementing backward iteration.) + * "Unsafe" macro, assumes well-formed UTF-16. + * + * The input offset may be the same as the string length. + * If the offset is behind a trail surrogate unit + * for a supplementary code point, then the macro will read + * the preceding lead surrogate as well. + * If the offset is behind a lead surrogate, then that itself + * will be returned as the code point. + * The result is undefined if the offset is behind a single, unpaired trail surrogate. + * + * @param s const UChar * string + * @param i string offset + * @param c output UChar32 variable + * @see U16_PREV + * @stable ICU 2.4 + */ +#define U16_PREV_UNSAFE(s, i, c) { \ + (c)=(s)[--(i)]; \ + if(U16_IS_TRAIL(c)) { \ + (c)=U16_GET_SUPPLEMENTARY((s)[--(i)], (c)); \ + } \ +} + +/** + * Move the string offset from one code point boundary to the previous one + * and get the code point between them. + * (Pre-decrementing backward iteration.) + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * The input offset may be the same as the string length. + * If the offset is behind a trail surrogate unit + * for a supplementary code point, then the macro will read + * the preceding lead surrogate as well. + * If the offset is behind a lead surrogate or behind a single, unpaired + * trail surrogate, then c is set to that unpaired surrogate. + * + * @param s const UChar * string + * @param start starting string offset (usually 0) + * @param i string offset, must be start<i + * @param c output UChar32 variable + * @see U16_PREV_UNSAFE + * @stable ICU 2.4 + */ +#define U16_PREV(s, start, i, c) { \ + (c)=(s)[--(i)]; \ + if(U16_IS_TRAIL(c)) { \ + uint16_t __c2; \ + if((i)>(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \ + --(i); \ + (c)=U16_GET_SUPPLEMENTARY(__c2, (c)); \ + } \ + } \ +} + +#ifndef U_HIDE_DRAFT_API + +/** + * Move the string offset from one code point boundary to the previous one + * and get the code point between them. + * (Pre-decrementing backward iteration.) + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * The input offset may be the same as the string length. + * If the offset is behind a trail surrogate unit + * for a supplementary code point, then the macro will read + * the preceding lead surrogate as well. + * If the offset is behind a lead surrogate or behind a single, unpaired + * trail surrogate, then c is set to U+FFFD. + * + * @param s const UChar * string + * @param start starting string offset (usually 0) + * @param i string offset, must be start<i + * @param c output UChar32 variable + * @see U16_PREV_UNSAFE + * @draft ICU 60 + */ +#define U16_PREV_OR_FFFD(s, start, i, c) { \ + (c)=(s)[--(i)]; \ + if(U16_IS_SURROGATE(c)) { \ + uint16_t __c2; \ + if(U16_IS_SURROGATE_TRAIL(c) && (i)>(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \ + --(i); \ + (c)=U16_GET_SUPPLEMENTARY(__c2, (c)); \ + } else { \ + (c)=0xfffd; \ + } \ + } \ +} + +#endif // U_HIDE_DRAFT_API + +/** + * Move the string offset from one code point boundary to the previous one. + * (Pre-decrementing backward iteration.) + * The input offset may be the same as the string length. + * "Unsafe" macro, assumes well-formed UTF-16. + * + * @param s const UChar * string + * @param i string offset + * @see U16_BACK_1 + * @stable ICU 2.4 + */ +#define U16_BACK_1_UNSAFE(s, i) { \ + if(U16_IS_TRAIL((s)[--(i)])) { \ + --(i); \ + } \ +} + +/** + * Move the string offset from one code point boundary to the previous one. + * (Pre-decrementing backward iteration.) + * The input offset may be the same as the string length. + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * @param s const UChar * string + * @param start starting string offset (usually 0) + * @param i string offset, must be start<i + * @see U16_BACK_1_UNSAFE + * @stable ICU 2.4 + */ +#define U16_BACK_1(s, start, i) { \ + if(U16_IS_TRAIL((s)[--(i)]) && (i)>(start) && U16_IS_LEAD((s)[(i)-1])) { \ + --(i); \ + } \ +} + +/** + * Move the string offset from one code point boundary to the n-th one before it, + * i.e., move backward by n code points. + * (Pre-decrementing backward iteration.) + * The input offset may be the same as the string length. + * "Unsafe" macro, assumes well-formed UTF-16. + * + * @param s const UChar * string + * @param i string offset + * @param n number of code points to skip + * @see U16_BACK_N + * @stable ICU 2.4 + */ +#define U16_BACK_N_UNSAFE(s, i, n) { \ + int32_t __N=(n); \ + while(__N>0) { \ + U16_BACK_1_UNSAFE(s, i); \ + --__N; \ + } \ +} + +/** + * Move the string offset from one code point boundary to the n-th one before it, + * i.e., move backward by n code points. + * (Pre-decrementing backward iteration.) + * The input offset may be the same as the string length. + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * @param s const UChar * string + * @param start start of string + * @param i string offset, must be start<i + * @param n number of code points to skip + * @see U16_BACK_N_UNSAFE + * @stable ICU 2.4 + */ +#define U16_BACK_N(s, start, i, n) { \ + int32_t __N=(n); \ + while(__N>0 && (i)>(start)) { \ + U16_BACK_1(s, start, i); \ + --__N; \ + } \ +} + +/** + * Adjust a random-access offset to a code point boundary after a code point. + * If the offset is behind the lead surrogate of a surrogate pair, + * then the offset is incremented. + * Otherwise, it is not modified. + * The input offset may be the same as the string length. + * "Unsafe" macro, assumes well-formed UTF-16. + * + * @param s const UChar * string + * @param i string offset + * @see U16_SET_CP_LIMIT + * @stable ICU 2.4 + */ +#define U16_SET_CP_LIMIT_UNSAFE(s, i) { \ + if(U16_IS_LEAD((s)[(i)-1])) { \ + ++(i); \ + } \ +} + +/** + * Adjust a random-access offset to a code point boundary after a code point. + * If the offset is behind the lead surrogate of a surrogate pair, + * then the offset is incremented. + * Otherwise, it is not modified. + * The input offset may be the same as the string length. + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * The length can be negative for a NUL-terminated string. + * + * @param s const UChar * string + * @param start int32_t starting string offset (usually 0) + * @param i int32_t string offset, start<=i<=length + * @param length int32_t string length + * @see U16_SET_CP_LIMIT_UNSAFE + * @stable ICU 2.4 + */ +#define U16_SET_CP_LIMIT(s, start, i, length) { \ + if((start)<(i) && ((i)<(length) || (length)<0) && U16_IS_LEAD((s)[(i)-1]) && U16_IS_TRAIL((s)[i])) { \ + ++(i); \ + } \ +} + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utf32.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utf32.h new file mode 100755 index 00000000..8822c4dd --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utf32.h @@ -0,0 +1,25 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 1999-2001, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: utf32.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 1999sep20 +* created by: Markus W. Scherer +*/ +/** + * \file + * \brief C API: UTF-32 macros + * + * This file is obsolete and its contents moved to utf_old.h. + * See utf_old.h and Jitterbug 2150 and its discussion on the ICU mailing list + * in September 2002. + */ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utf8.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utf8.h new file mode 100755 index 00000000..4bb063c5 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utf8.h @@ -0,0 +1,882 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 1999-2015, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: utf8.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 1999sep13 +* created by: Markus W. Scherer +*/ + +/** + * \file + * \brief C API: 8-bit Unicode handling macros + * + * This file defines macros to deal with 8-bit Unicode (UTF-8) code units (bytes) and strings. + * + * For more information see utf.h and the ICU User Guide Strings chapter + * (http://userguide.icu-project.org/strings). + * + * <em>Usage:</em> + * ICU coding guidelines for if() statements should be followed when using these macros. + * Compound statements (curly braces {}) must be used for if-else-while... + * bodies and all macro statements should be terminated with semicolon. + */ + +#ifndef __UTF8_H__ +#define __UTF8_H__ + +#include "unicode/umachine.h" +#ifndef __UTF_H__ +# include "unicode/utf.h" +#endif + +/* internal definitions ----------------------------------------------------- */ + +/** + * Counts the trail bytes for a UTF-8 lead byte. + * Returns 0 for 0..0xc1 as well as for 0xf5..0xff. + * leadByte might be evaluated multiple times. + * + * This is internal since it is not meant to be called directly by external clients; + * however it is called by public macros in this file and thus must remain stable. + * + * @param leadByte The first byte of a UTF-8 sequence. Must be 0..0xff. + * @internal + */ +#define U8_COUNT_TRAIL_BYTES(leadByte) \ + (U8_IS_LEAD(leadByte) ? \ + ((uint8_t)(leadByte)>=0xe0)+((uint8_t)(leadByte)>=0xf0)+1 : 0) + +/** + * Counts the trail bytes for a UTF-8 lead byte of a valid UTF-8 sequence. + * Returns 0 for 0..0xc1. Undefined for 0xf5..0xff. + * leadByte might be evaluated multiple times. + * + * This is internal since it is not meant to be called directly by external clients; + * however it is called by public macros in this file and thus must remain stable. + * + * @param leadByte The first byte of a UTF-8 sequence. Must be 0..0xff. + * @internal + */ +#define U8_COUNT_TRAIL_BYTES_UNSAFE(leadByte) \ + (((uint8_t)(leadByte)>=0xc2)+((uint8_t)(leadByte)>=0xe0)+((uint8_t)(leadByte)>=0xf0)) + +/** + * Mask a UTF-8 lead byte, leave only the lower bits that form part of the code point value. + * + * This is internal since it is not meant to be called directly by external clients; + * however it is called by public macros in this file and thus must remain stable. + * @internal + */ +#define U8_MASK_LEAD_BYTE(leadByte, countTrailBytes) ((leadByte)&=(1<<(6-(countTrailBytes)))-1) + +/** + * Internal bit vector for 3-byte UTF-8 validity check, for use in U8_IS_VALID_LEAD3_AND_T1. + * Each bit indicates whether one lead byte + first trail byte pair starts a valid sequence. + * Lead byte E0..EF bits 3..0 are used as byte index, + * first trail byte bits 7..5 are used as bit index into that byte. + * @see U8_IS_VALID_LEAD3_AND_T1 + * @internal + */ +#define U8_LEAD3_T1_BITS "\x20\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x10\x30\x30" + +/** + * Internal 3-byte UTF-8 validity check. + * Non-zero if lead byte E0..EF and first trail byte 00..FF start a valid sequence. + * @internal + */ +#define U8_IS_VALID_LEAD3_AND_T1(lead, t1) (U8_LEAD3_T1_BITS[(lead)&0xf]&(1<<((uint8_t)(t1)>>5))) + +/** + * Internal bit vector for 4-byte UTF-8 validity check, for use in U8_IS_VALID_LEAD4_AND_T1. + * Each bit indicates whether one lead byte + first trail byte pair starts a valid sequence. + * First trail byte bits 7..4 are used as byte index, + * lead byte F0..F4 bits 2..0 are used as bit index into that byte. + * @see U8_IS_VALID_LEAD4_AND_T1 + * @internal + */ +#define U8_LEAD4_T1_BITS "\x00\x00\x00\x00\x00\x00\x00\x00\x1E\x0F\x0F\x0F\x00\x00\x00\x00" + +/** + * Internal 4-byte UTF-8 validity check. + * Non-zero if lead byte F0..F4 and first trail byte 00..FF start a valid sequence. + * @internal + */ +#define U8_IS_VALID_LEAD4_AND_T1(lead, t1) (U8_LEAD4_T1_BITS[(uint8_t)(t1)>>4]&(1<<((lead)&7))) + +/** + * Function for handling "next code point" with error-checking. + * + * This is internal since it is not meant to be called directly by external clients; + * however it is U_STABLE (not U_INTERNAL) since it is called by public macros in this + * file and thus must remain stable, and should not be hidden when other internal + * functions are hidden (otherwise public macros would fail to compile). + * @internal + */ +U_STABLE UChar32 U_EXPORT2 +utf8_nextCharSafeBody(const uint8_t *s, int32_t *pi, int32_t length, UChar32 c, UBool strict); + +/** + * Function for handling "append code point" with error-checking. + * + * This is internal since it is not meant to be called directly by external clients; + * however it is U_STABLE (not U_INTERNAL) since it is called by public macros in this + * file and thus must remain stable, and should not be hidden when other internal + * functions are hidden (otherwise public macros would fail to compile). + * @internal + */ +U_STABLE int32_t U_EXPORT2 +utf8_appendCharSafeBody(uint8_t *s, int32_t i, int32_t length, UChar32 c, UBool *pIsError); + +/** + * Function for handling "previous code point" with error-checking. + * + * This is internal since it is not meant to be called directly by external clients; + * however it is U_STABLE (not U_INTERNAL) since it is called by public macros in this + * file and thus must remain stable, and should not be hidden when other internal + * functions are hidden (otherwise public macros would fail to compile). + * @internal + */ +U_STABLE UChar32 U_EXPORT2 +utf8_prevCharSafeBody(const uint8_t *s, int32_t start, int32_t *pi, UChar32 c, UBool strict); + +/** + * Function for handling "skip backward one code point" with error-checking. + * + * This is internal since it is not meant to be called directly by external clients; + * however it is U_STABLE (not U_INTERNAL) since it is called by public macros in this + * file and thus must remain stable, and should not be hidden when other internal + * functions are hidden (otherwise public macros would fail to compile). + * @internal + */ +U_STABLE int32_t U_EXPORT2 +utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i); + +/* single-code point definitions -------------------------------------------- */ + +/** + * Does this code unit (byte) encode a code point by itself (US-ASCII 0..0x7f)? + * @param c 8-bit code unit (byte) + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U8_IS_SINGLE(c) (((c)&0x80)==0) + +/** + * Is this code unit (byte) a UTF-8 lead byte? (0xC2..0xF4) + * @param c 8-bit code unit (byte) + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U8_IS_LEAD(c) ((uint8_t)((c)-0xc2)<=0x32) +// 0x32=0xf4-0xc2 + +/** + * Is this code unit (byte) a UTF-8 trail byte? (0x80..0xBF) + * @param c 8-bit code unit (byte) + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U8_IS_TRAIL(c) ((int8_t)(c)<-0x40) + +/** + * How many code units (bytes) are used for the UTF-8 encoding + * of this Unicode code point? + * @param c 32-bit code point + * @return 1..4, or 0 if c is a surrogate or not a Unicode code point + * @stable ICU 2.4 + */ +#define U8_LENGTH(c) \ + ((uint32_t)(c)<=0x7f ? 1 : \ + ((uint32_t)(c)<=0x7ff ? 2 : \ + ((uint32_t)(c)<=0xd7ff ? 3 : \ + ((uint32_t)(c)<=0xdfff || (uint32_t)(c)>0x10ffff ? 0 : \ + ((uint32_t)(c)<=0xffff ? 3 : 4)\ + ) \ + ) \ + ) \ + ) + +/** + * The maximum number of UTF-8 code units (bytes) per Unicode code point (U+0000..U+10ffff). + * @return 4 + * @stable ICU 2.4 + */ +#define U8_MAX_LENGTH 4 + +/** + * Get a code point from a string at a random-access offset, + * without changing the offset. + * The offset may point to either the lead byte or one of the trail bytes + * for a code point, in which case the macro will read all of the bytes + * for the code point. + * The result is undefined if the offset points to an illegal UTF-8 + * byte sequence. + * Iteration through a string is more efficient with U8_NEXT_UNSAFE or U8_NEXT. + * + * @param s const uint8_t * string + * @param i string offset + * @param c output UChar32 variable + * @see U8_GET + * @stable ICU 2.4 + */ +#define U8_GET_UNSAFE(s, i, c) { \ + int32_t _u8_get_unsafe_index=(int32_t)(i); \ + U8_SET_CP_START_UNSAFE(s, _u8_get_unsafe_index); \ + U8_NEXT_UNSAFE(s, _u8_get_unsafe_index, c); \ +} + +/** + * Get a code point from a string at a random-access offset, + * without changing the offset. + * The offset may point to either the lead byte or one of the trail bytes + * for a code point, in which case the macro will read all of the bytes + * for the code point. + * + * The length can be negative for a NUL-terminated string. + * + * If the offset points to an illegal UTF-8 byte sequence, then + * c is set to a negative value. + * Iteration through a string is more efficient with U8_NEXT_UNSAFE or U8_NEXT. + * + * @param s const uint8_t * string + * @param start int32_t starting string offset + * @param i int32_t string offset, must be start<=i<length + * @param length int32_t string length + * @param c output UChar32 variable, set to <0 in case of an error + * @see U8_GET_UNSAFE + * @stable ICU 2.4 + */ +#define U8_GET(s, start, i, length, c) { \ + int32_t _u8_get_index=(i); \ + U8_SET_CP_START(s, start, _u8_get_index); \ + U8_NEXT(s, _u8_get_index, length, c); \ +} + +/** + * Get a code point from a string at a random-access offset, + * without changing the offset. + * The offset may point to either the lead byte or one of the trail bytes + * for a code point, in which case the macro will read all of the bytes + * for the code point. + * + * The length can be negative for a NUL-terminated string. + * + * If the offset points to an illegal UTF-8 byte sequence, then + * c is set to U+FFFD. + * Iteration through a string is more efficient with U8_NEXT_UNSAFE or U8_NEXT_OR_FFFD. + * + * This macro does not distinguish between a real U+FFFD in the text + * and U+FFFD returned for an ill-formed sequence. + * Use U8_GET() if that distinction is important. + * + * @param s const uint8_t * string + * @param start int32_t starting string offset + * @param i int32_t string offset, must be start<=i<length + * @param length int32_t string length + * @param c output UChar32 variable, set to U+FFFD in case of an error + * @see U8_GET + * @stable ICU 51 + */ +#define U8_GET_OR_FFFD(s, start, i, length, c) { \ + int32_t _u8_get_index=(i); \ + U8_SET_CP_START(s, start, _u8_get_index); \ + U8_NEXT_OR_FFFD(s, _u8_get_index, length, c); \ +} + +/* definitions with forward iteration --------------------------------------- */ + +/** + * Get a code point from a string at a code point boundary offset, + * and advance the offset to the next code point boundary. + * (Post-incrementing forward iteration.) + * "Unsafe" macro, assumes well-formed UTF-8. + * + * The offset may point to the lead byte of a multi-byte sequence, + * in which case the macro will read the whole sequence. + * The result is undefined if the offset points to a trail byte + * or an illegal UTF-8 sequence. + * + * @param s const uint8_t * string + * @param i string offset + * @param c output UChar32 variable + * @see U8_NEXT + * @stable ICU 2.4 + */ +#define U8_NEXT_UNSAFE(s, i, c) { \ + (c)=(uint8_t)(s)[(i)++]; \ + if(!U8_IS_SINGLE(c)) { \ + if((c)<0xe0) { \ + (c)=(((c)&0x1f)<<6)|((s)[(i)++]&0x3f); \ + } else if((c)<0xf0) { \ + /* no need for (c&0xf) because the upper bits are truncated after <<12 in the cast to (UChar) */ \ + (c)=(UChar)(((c)<<12)|(((s)[i]&0x3f)<<6)|((s)[(i)+1]&0x3f)); \ + (i)+=2; \ + } else { \ + (c)=(((c)&7)<<18)|(((s)[i]&0x3f)<<12)|(((s)[(i)+1]&0x3f)<<6)|((s)[(i)+2]&0x3f); \ + (i)+=3; \ + } \ + } \ +} + +/** + * Get a code point from a string at a code point boundary offset, + * and advance the offset to the next code point boundary. + * (Post-incrementing forward iteration.) + * "Safe" macro, checks for illegal sequences and for string boundaries. + * + * The length can be negative for a NUL-terminated string. + * + * The offset may point to the lead byte of a multi-byte sequence, + * in which case the macro will read the whole sequence. + * If the offset points to a trail byte or an illegal UTF-8 sequence, then + * c is set to a negative value. + * + * @param s const uint8_t * string + * @param i int32_t string offset, must be i<length + * @param length int32_t string length + * @param c output UChar32 variable, set to <0 in case of an error + * @see U8_NEXT_UNSAFE + * @stable ICU 2.4 + */ +#define U8_NEXT(s, i, length, c) U8_INTERNAL_NEXT_OR_SUB(s, i, length, c, U_SENTINEL) + +/** + * Get a code point from a string at a code point boundary offset, + * and advance the offset to the next code point boundary. + * (Post-incrementing forward iteration.) + * "Safe" macro, checks for illegal sequences and for string boundaries. + * + * The length can be negative for a NUL-terminated string. + * + * The offset may point to the lead byte of a multi-byte sequence, + * in which case the macro will read the whole sequence. + * If the offset points to a trail byte or an illegal UTF-8 sequence, then + * c is set to U+FFFD. + * + * This macro does not distinguish between a real U+FFFD in the text + * and U+FFFD returned for an ill-formed sequence. + * Use U8_NEXT() if that distinction is important. + * + * @param s const uint8_t * string + * @param i int32_t string offset, must be i<length + * @param length int32_t string length + * @param c output UChar32 variable, set to U+FFFD in case of an error + * @see U8_NEXT + * @stable ICU 51 + */ +#define U8_NEXT_OR_FFFD(s, i, length, c) U8_INTERNAL_NEXT_OR_SUB(s, i, length, c, 0xfffd) + +/** @internal */ +#define U8_INTERNAL_NEXT_OR_SUB(s, i, length, c, sub) { \ + (c)=(uint8_t)(s)[(i)++]; \ + if(!U8_IS_SINGLE(c)) { \ + uint8_t __t = 0; \ + if((i)!=(length) && \ + /* fetch/validate/assemble all but last trail byte */ \ + ((c)>=0xe0 ? \ + ((c)<0xf0 ? /* U+0800..U+FFFF except surrogates */ \ + U8_LEAD3_T1_BITS[(c)&=0xf]&(1<<((__t=(s)[i])>>5)) && \ + (__t&=0x3f, 1) \ + : /* U+10000..U+10FFFF */ \ + ((c)-=0xf0)<=4 && \ + U8_LEAD4_T1_BITS[(__t=(s)[i])>>4]&(1<<(c)) && \ + ((c)=((c)<<6)|(__t&0x3f), ++(i)!=(length)) && \ + (__t=(s)[i]-0x80)<=0x3f) && \ + /* valid second-to-last trail byte */ \ + ((c)=((c)<<6)|__t, ++(i)!=(length)) \ + : /* U+0080..U+07FF */ \ + (c)>=0xc2 && ((c)&=0x1f, 1)) && \ + /* last trail byte */ \ + (__t=(s)[i]-0x80)<=0x3f && \ + ((c)=((c)<<6)|__t, ++(i), 1)) { \ + } else { \ + (c)=(sub); /* ill-formed*/ \ + } \ + } \ +} + +/** + * Append a code point to a string, overwriting 1 to 4 bytes. + * The offset points to the current end of the string contents + * and is advanced (post-increment). + * "Unsafe" macro, assumes a valid code point and sufficient space in the string. + * Otherwise, the result is undefined. + * + * @param s const uint8_t * string buffer + * @param i string offset + * @param c code point to append + * @see U8_APPEND + * @stable ICU 2.4 + */ +#define U8_APPEND_UNSAFE(s, i, c) { \ + uint32_t __uc=(c); \ + if(__uc<=0x7f) { \ + (s)[(i)++]=(uint8_t)__uc; \ + } else { \ + if(__uc<=0x7ff) { \ + (s)[(i)++]=(uint8_t)((__uc>>6)|0xc0); \ + } else { \ + if(__uc<=0xffff) { \ + (s)[(i)++]=(uint8_t)((__uc>>12)|0xe0); \ + } else { \ + (s)[(i)++]=(uint8_t)((__uc>>18)|0xf0); \ + (s)[(i)++]=(uint8_t)(((__uc>>12)&0x3f)|0x80); \ + } \ + (s)[(i)++]=(uint8_t)(((__uc>>6)&0x3f)|0x80); \ + } \ + (s)[(i)++]=(uint8_t)((__uc&0x3f)|0x80); \ + } \ +} + +/** + * Append a code point to a string, overwriting 1 to 4 bytes. + * The offset points to the current end of the string contents + * and is advanced (post-increment). + * "Safe" macro, checks for a valid code point. + * If a non-ASCII code point is written, checks for sufficient space in the string. + * If the code point is not valid or trail bytes do not fit, + * then isError is set to TRUE. + * + * @param s const uint8_t * string buffer + * @param i int32_t string offset, must be i<capacity + * @param capacity int32_t size of the string buffer + * @param c UChar32 code point to append + * @param isError output UBool set to TRUE if an error occurs, otherwise not modified + * @see U8_APPEND_UNSAFE + * @stable ICU 2.4 + */ +#define U8_APPEND(s, i, capacity, c, isError) { \ + uint32_t __uc=(c); \ + if(__uc<=0x7f) { \ + (s)[(i)++]=(uint8_t)__uc; \ + } else if(__uc<=0x7ff && (i)+1<(capacity)) { \ + (s)[(i)++]=(uint8_t)((__uc>>6)|0xc0); \ + (s)[(i)++]=(uint8_t)((__uc&0x3f)|0x80); \ + } else if((__uc<=0xd7ff || (0xe000<=__uc && __uc<=0xffff)) && (i)+2<(capacity)) { \ + (s)[(i)++]=(uint8_t)((__uc>>12)|0xe0); \ + (s)[(i)++]=(uint8_t)(((__uc>>6)&0x3f)|0x80); \ + (s)[(i)++]=(uint8_t)((__uc&0x3f)|0x80); \ + } else if(0xffff<__uc && __uc<=0x10ffff && (i)+3<(capacity)) { \ + (s)[(i)++]=(uint8_t)((__uc>>18)|0xf0); \ + (s)[(i)++]=(uint8_t)(((__uc>>12)&0x3f)|0x80); \ + (s)[(i)++]=(uint8_t)(((__uc>>6)&0x3f)|0x80); \ + (s)[(i)++]=(uint8_t)((__uc&0x3f)|0x80); \ + } else { \ + (isError)=TRUE; \ + } \ +} + +/** + * Advance the string offset from one code point boundary to the next. + * (Post-incrementing iteration.) + * "Unsafe" macro, assumes well-formed UTF-8. + * + * @param s const uint8_t * string + * @param i string offset + * @see U8_FWD_1 + * @stable ICU 2.4 + */ +#define U8_FWD_1_UNSAFE(s, i) { \ + (i)+=1+U8_COUNT_TRAIL_BYTES_UNSAFE((s)[i]); \ +} + +/** + * Advance the string offset from one code point boundary to the next. + * (Post-incrementing iteration.) + * "Safe" macro, checks for illegal sequences and for string boundaries. + * + * The length can be negative for a NUL-terminated string. + * + * @param s const uint8_t * string + * @param i int32_t string offset, must be i<length + * @param length int32_t string length + * @see U8_FWD_1_UNSAFE + * @stable ICU 2.4 + */ +#define U8_FWD_1(s, i, length) { \ + uint8_t __b=(s)[(i)++]; \ + if(U8_IS_LEAD(__b) && (i)!=(length)) { \ + uint8_t __t1=(s)[i]; \ + if((0xe0<=__b && __b<0xf0)) { \ + if(U8_IS_VALID_LEAD3_AND_T1(__b, __t1) && \ + ++(i)!=(length) && U8_IS_TRAIL((s)[i])) { \ + ++(i); \ + } \ + } else if(__b<0xe0) { \ + if(U8_IS_TRAIL(__t1)) { \ + ++(i); \ + } \ + } else /* c>=0xf0 */ { \ + if(U8_IS_VALID_LEAD4_AND_T1(__b, __t1) && \ + ++(i)!=(length) && U8_IS_TRAIL((s)[i]) && \ + ++(i)!=(length) && U8_IS_TRAIL((s)[i])) { \ + ++(i); \ + } \ + } \ + } \ +} + +/** + * Advance the string offset from one code point boundary to the n-th next one, + * i.e., move forward by n code points. + * (Post-incrementing iteration.) + * "Unsafe" macro, assumes well-formed UTF-8. + * + * @param s const uint8_t * string + * @param i string offset + * @param n number of code points to skip + * @see U8_FWD_N + * @stable ICU 2.4 + */ +#define U8_FWD_N_UNSAFE(s, i, n) { \ + int32_t __N=(n); \ + while(__N>0) { \ + U8_FWD_1_UNSAFE(s, i); \ + --__N; \ + } \ +} + +/** + * Advance the string offset from one code point boundary to the n-th next one, + * i.e., move forward by n code points. + * (Post-incrementing iteration.) + * "Safe" macro, checks for illegal sequences and for string boundaries. + * + * The length can be negative for a NUL-terminated string. + * + * @param s const uint8_t * string + * @param i int32_t string offset, must be i<length + * @param length int32_t string length + * @param n number of code points to skip + * @see U8_FWD_N_UNSAFE + * @stable ICU 2.4 + */ +#define U8_FWD_N(s, i, length, n) { \ + int32_t __N=(n); \ + while(__N>0 && ((i)<(length) || ((length)<0 && (s)[i]!=0))) { \ + U8_FWD_1(s, i, length); \ + --__N; \ + } \ +} + +/** + * Adjust a random-access offset to a code point boundary + * at the start of a code point. + * If the offset points to a UTF-8 trail byte, + * then the offset is moved backward to the corresponding lead byte. + * Otherwise, it is not modified. + * "Unsafe" macro, assumes well-formed UTF-8. + * + * @param s const uint8_t * string + * @param i string offset + * @see U8_SET_CP_START + * @stable ICU 2.4 + */ +#define U8_SET_CP_START_UNSAFE(s, i) { \ + while(U8_IS_TRAIL((s)[i])) { --(i); } \ +} + +/** + * Adjust a random-access offset to a code point boundary + * at the start of a code point. + * If the offset points to a UTF-8 trail byte, + * then the offset is moved backward to the corresponding lead byte. + * Otherwise, it is not modified. + * + * "Safe" macro, checks for illegal sequences and for string boundaries. + * Unlike U8_TRUNCATE_IF_INCOMPLETE(), this macro always reads s[i]. + * + * @param s const uint8_t * string + * @param start int32_t starting string offset (usually 0) + * @param i int32_t string offset, must be start<=i + * @see U8_SET_CP_START_UNSAFE + * @see U8_TRUNCATE_IF_INCOMPLETE + * @stable ICU 2.4 + */ +#define U8_SET_CP_START(s, start, i) { \ + if(U8_IS_TRAIL((s)[(i)])) { \ + (i)=utf8_back1SafeBody(s, start, (i)); \ + } \ +} + +#ifndef U_HIDE_DRAFT_API +/** + * If the string ends with a UTF-8 byte sequence that is valid so far + * but incomplete, then reduce the length of the string to end before + * the lead byte of that incomplete sequence. + * For example, if the string ends with E1 80, the length is reduced by 2. + * + * In all other cases (the string ends with a complete sequence, or it is not + * possible for any further trail byte to extend the trailing sequence) + * the length remains unchanged. + * + * Useful for processing text split across multiple buffers + * (save the incomplete sequence for later) + * and for optimizing iteration + * (check for string length only once per character). + * + * "Safe" macro, checks for illegal sequences and for string boundaries. + * Unlike U8_SET_CP_START(), this macro never reads s[length]. + * + * (In UTF-16, simply check for U16_IS_LEAD(last code unit).) + * + * @param s const uint8_t * string + * @param start int32_t starting string offset (usually 0) + * @param length int32_t string length (usually start<=length) + * @see U8_SET_CP_START + * @draft ICU 61 + */ +#define U8_TRUNCATE_IF_INCOMPLETE(s, start, length) \ + if((length)>(start)) { \ + uint8_t __b1=s[(length)-1]; \ + if(U8_IS_SINGLE(__b1)) { \ + /* common ASCII character */ \ + } else if(U8_IS_LEAD(__b1)) { \ + --(length); \ + } else if(U8_IS_TRAIL(__b1) && ((length)-2)>=(start)) { \ + uint8_t __b2=s[(length)-2]; \ + if(0xe0<=__b2 && __b2<=0xf4) { \ + if(__b2<0xf0 ? U8_IS_VALID_LEAD3_AND_T1(__b2, __b1) : \ + U8_IS_VALID_LEAD4_AND_T1(__b2, __b1)) { \ + (length)-=2; \ + } \ + } else if(U8_IS_TRAIL(__b2) && ((length)-3)>=(start)) { \ + uint8_t __b3=s[(length)-3]; \ + if(0xf0<=__b3 && __b3<=0xf4 && U8_IS_VALID_LEAD4_AND_T1(__b3, __b2)) { \ + (length)-=3; \ + } \ + } \ + } \ + } +#endif // U_HIDE_DRAFT_API + +/* definitions with backward iteration -------------------------------------- */ + +/** + * Move the string offset from one code point boundary to the previous one + * and get the code point between them. + * (Pre-decrementing backward iteration.) + * "Unsafe" macro, assumes well-formed UTF-8. + * + * The input offset may be the same as the string length. + * If the offset is behind a multi-byte sequence, then the macro will read + * the whole sequence. + * If the offset is behind a lead byte, then that itself + * will be returned as the code point. + * The result is undefined if the offset is behind an illegal UTF-8 sequence. + * + * @param s const uint8_t * string + * @param i string offset + * @param c output UChar32 variable + * @see U8_PREV + * @stable ICU 2.4 + */ +#define U8_PREV_UNSAFE(s, i, c) { \ + (c)=(uint8_t)(s)[--(i)]; \ + if(U8_IS_TRAIL(c)) { \ + uint8_t __b, __count=1, __shift=6; \ +\ + /* c is a trail byte */ \ + (c)&=0x3f; \ + for(;;) { \ + __b=(s)[--(i)]; \ + if(__b>=0xc0) { \ + U8_MASK_LEAD_BYTE(__b, __count); \ + (c)|=(UChar32)__b<<__shift; \ + break; \ + } else { \ + (c)|=(UChar32)(__b&0x3f)<<__shift; \ + ++__count; \ + __shift+=6; \ + } \ + } \ + } \ +} + +/** + * Move the string offset from one code point boundary to the previous one + * and get the code point between them. + * (Pre-decrementing backward iteration.) + * "Safe" macro, checks for illegal sequences and for string boundaries. + * + * The input offset may be the same as the string length. + * If the offset is behind a multi-byte sequence, then the macro will read + * the whole sequence. + * If the offset is behind a lead byte, then that itself + * will be returned as the code point. + * If the offset is behind an illegal UTF-8 sequence, then c is set to a negative value. + * + * @param s const uint8_t * string + * @param start int32_t starting string offset (usually 0) + * @param i int32_t string offset, must be start<i + * @param c output UChar32 variable, set to <0 in case of an error + * @see U8_PREV_UNSAFE + * @stable ICU 2.4 + */ +#define U8_PREV(s, start, i, c) { \ + (c)=(uint8_t)(s)[--(i)]; \ + if(!U8_IS_SINGLE(c)) { \ + (c)=utf8_prevCharSafeBody((const uint8_t *)s, start, &(i), c, -1); \ + } \ +} + +/** + * Move the string offset from one code point boundary to the previous one + * and get the code point between them. + * (Pre-decrementing backward iteration.) + * "Safe" macro, checks for illegal sequences and for string boundaries. + * + * The input offset may be the same as the string length. + * If the offset is behind a multi-byte sequence, then the macro will read + * the whole sequence. + * If the offset is behind a lead byte, then that itself + * will be returned as the code point. + * If the offset is behind an illegal UTF-8 sequence, then c is set to U+FFFD. + * + * This macro does not distinguish between a real U+FFFD in the text + * and U+FFFD returned for an ill-formed sequence. + * Use U8_PREV() if that distinction is important. + * + * @param s const uint8_t * string + * @param start int32_t starting string offset (usually 0) + * @param i int32_t string offset, must be start<i + * @param c output UChar32 variable, set to U+FFFD in case of an error + * @see U8_PREV + * @stable ICU 51 + */ +#define U8_PREV_OR_FFFD(s, start, i, c) { \ + (c)=(uint8_t)(s)[--(i)]; \ + if(!U8_IS_SINGLE(c)) { \ + (c)=utf8_prevCharSafeBody((const uint8_t *)s, start, &(i), c, -3); \ + } \ +} + +/** + * Move the string offset from one code point boundary to the previous one. + * (Pre-decrementing backward iteration.) + * The input offset may be the same as the string length. + * "Unsafe" macro, assumes well-formed UTF-8. + * + * @param s const uint8_t * string + * @param i string offset + * @see U8_BACK_1 + * @stable ICU 2.4 + */ +#define U8_BACK_1_UNSAFE(s, i) { \ + while(U8_IS_TRAIL((s)[--(i)])) {} \ +} + +/** + * Move the string offset from one code point boundary to the previous one. + * (Pre-decrementing backward iteration.) + * The input offset may be the same as the string length. + * "Safe" macro, checks for illegal sequences and for string boundaries. + * + * @param s const uint8_t * string + * @param start int32_t starting string offset (usually 0) + * @param i int32_t string offset, must be start<i + * @see U8_BACK_1_UNSAFE + * @stable ICU 2.4 + */ +#define U8_BACK_1(s, start, i) { \ + if(U8_IS_TRAIL((s)[--(i)])) { \ + (i)=utf8_back1SafeBody(s, start, (i)); \ + } \ +} + +/** + * Move the string offset from one code point boundary to the n-th one before it, + * i.e., move backward by n code points. + * (Pre-decrementing backward iteration.) + * The input offset may be the same as the string length. + * "Unsafe" macro, assumes well-formed UTF-8. + * + * @param s const uint8_t * string + * @param i string offset + * @param n number of code points to skip + * @see U8_BACK_N + * @stable ICU 2.4 + */ +#define U8_BACK_N_UNSAFE(s, i, n) { \ + int32_t __N=(n); \ + while(__N>0) { \ + U8_BACK_1_UNSAFE(s, i); \ + --__N; \ + } \ +} + +/** + * Move the string offset from one code point boundary to the n-th one before it, + * i.e., move backward by n code points. + * (Pre-decrementing backward iteration.) + * The input offset may be the same as the string length. + * "Safe" macro, checks for illegal sequences and for string boundaries. + * + * @param s const uint8_t * string + * @param start int32_t index of the start of the string + * @param i int32_t string offset, must be start<i + * @param n number of code points to skip + * @see U8_BACK_N_UNSAFE + * @stable ICU 2.4 + */ +#define U8_BACK_N(s, start, i, n) { \ + int32_t __N=(n); \ + while(__N>0 && (i)>(start)) { \ + U8_BACK_1(s, start, i); \ + --__N; \ + } \ +} + +/** + * Adjust a random-access offset to a code point boundary after a code point. + * If the offset is behind a partial multi-byte sequence, + * then the offset is incremented to behind the whole sequence. + * Otherwise, it is not modified. + * The input offset may be the same as the string length. + * "Unsafe" macro, assumes well-formed UTF-8. + * + * @param s const uint8_t * string + * @param i string offset + * @see U8_SET_CP_LIMIT + * @stable ICU 2.4 + */ +#define U8_SET_CP_LIMIT_UNSAFE(s, i) { \ + U8_BACK_1_UNSAFE(s, i); \ + U8_FWD_1_UNSAFE(s, i); \ +} + +/** + * Adjust a random-access offset to a code point boundary after a code point. + * If the offset is behind a partial multi-byte sequence, + * then the offset is incremented to behind the whole sequence. + * Otherwise, it is not modified. + * The input offset may be the same as the string length. + * "Safe" macro, checks for illegal sequences and for string boundaries. + * + * The length can be negative for a NUL-terminated string. + * + * @param s const uint8_t * string + * @param start int32_t starting string offset (usually 0) + * @param i int32_t string offset, must be start<=i<=length + * @param length int32_t string length + * @see U8_SET_CP_LIMIT_UNSAFE + * @stable ICU 2.4 + */ +#define U8_SET_CP_LIMIT(s, start, i, length) { \ + if((start)<(i) && ((i)<(length) || (length)<0)) { \ + U8_BACK_1(s, start, i); \ + U8_FWD_1(s, i, length); \ + } \ +} + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utf_old.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utf_old.h new file mode 100755 index 00000000..55c17c01 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utf_old.h @@ -0,0 +1,1204 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 2002-2012, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: utf_old.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2002sep21 +* created by: Markus W. Scherer +*/ + +/** + * \file + * \brief C API: Deprecated macros for Unicode string handling + */ + +/** + * + * The macros in utf_old.h are all deprecated and their use discouraged. + * Some of the design principles behind the set of UTF macros + * have changed or proved impractical. + * Almost all of the old "UTF macros" are at least renamed. + * If you are looking for a new equivalent to an old macro, please see the + * comment at the old one. + * + * Brief summary of reasons for deprecation: + * - Switch on UTF_SIZE (selection of UTF-8/16/32 default string processing) + * was impractical. + * - Switch on UTF_SAFE etc. (selection of unsafe/safe/strict default string processing) + * was of little use and impractical. + * - Whole classes of macros became obsolete outside of the UTF_SIZE/UTF_SAFE + * selection framework: UTF32_ macros (all trivial) + * and UTF_ default and intermediate macros (all aliases). + * - The selection framework also caused many macro aliases. + * - Change in Unicode standard: "irregular" sequences (3.0) became illegal (3.2). + * - Change of language in Unicode standard: + * Growing distinction between internal x-bit Unicode strings and external UTF-x + * forms, with the former more lenient. + * Suggests renaming of UTF16_ macros to U16_. + * - The prefix "UTF_" without a width number confused some users. + * - "Safe" append macros needed the addition of an error indicator output. + * - "Safe" UTF-8 macros used legitimate (if rarely used) code point values + * to indicate error conditions. + * - The use of the "_CHAR" infix for code point operations confused some users. + * + * More details: + * + * Until ICU 2.2, utf.h theoretically allowed to choose among UTF-8/16/32 + * for string processing, and among unsafe/safe/strict default macros for that. + * + * It proved nearly impossible to write non-trivial, high-performance code + * that is UTF-generic. + * Unsafe default macros would be dangerous for default string processing, + * and the main reason for the "strict" versions disappeared: + * Between Unicode 3.0 and 3.2 all "irregular" UTF-8 sequences became illegal. + * The only other conditions that "strict" checked for were non-characters, + * which are valid during processing. Only during text input/output should they + * be checked, and at that time other well-formedness checks may be + * necessary or useful as well. + * This can still be done by using U16_NEXT and U_IS_UNICODE_NONCHAR + * or U_IS_UNICODE_CHAR. + * + * The old UTF8_..._SAFE macros also used some normal Unicode code points + * to indicate malformed sequences. + * The new UTF8_ macros without suffix use negative values instead. + * + * The entire contents of utf32.h was moved here without replacement + * because all those macros were trivial and + * were meaningful only in the framework of choosing the UTF size. + * + * See Jitterbug 2150 and its discussion on the ICU mailing list + * in September 2002. + * + * <hr> + * + * <em>Obsolete part</em> of pre-ICU 2.4 utf.h file documentation: + * + * <p>The original concept for these files was for ICU to allow + * in principle to set which UTF (UTF-8/16/32) is used internally + * by defining UTF_SIZE to either 8, 16, or 32. utf.h would then define the UChar type + * accordingly. UTF-16 was the default.</p> + * + * <p>This concept has been abandoned. + * A lot of the ICU source code assumes UChar strings are in UTF-16. + * This is especially true for low-level code like + * conversion, normalization, and collation. + * The utf.h header enforces the default of UTF-16. + * The UTF-8 and UTF-32 macros remain for now for completeness and backward compatibility.</p> + * + * <p>Accordingly, utf.h defines UChar to be an unsigned 16-bit integer. If this matches wchar_t, then + * UChar is defined to be exactly wchar_t, otherwise uint16_t.</p> + * + * <p>UChar32 is defined to be a signed 32-bit integer (int32_t), large enough for a 21-bit + * Unicode code point (Unicode scalar value, 0..0x10ffff). + * Before ICU 2.4, the definition of UChar32 was similarly platform-dependent as + * the definition of UChar. For details see the documentation for UChar32 itself.</p> + * + * <p>utf.h also defines a number of C macros for handling single Unicode code points and + * for using UTF Unicode strings. It includes utf8.h, utf16.h, and utf32.h for the actual + * implementations of those macros and then aliases one set of them (for UTF-16) for general use. + * The UTF-specific macros have the UTF size in the macro name prefixes (UTF16_...), while + * the general alias macros always begin with UTF_...</p> + * + * <p>Many string operations can be done with or without error checking. + * Where such a distinction is useful, there are two versions of the macros, "unsafe" and "safe" + * ones with ..._UNSAFE and ..._SAFE suffixes. The unsafe macros are fast but may cause + * program failures if the strings are not well-formed. The safe macros have an additional, boolean + * parameter "strict". If strict is FALSE, then only illegal sequences are detected. + * Otherwise, irregular sequences and non-characters are detected as well (like single surrogates). + * Safe macros return special error code points for illegal/irregular sequences: + * Typically, U+ffff, or values that would result in a code unit sequence of the same length + * as the erroneous input sequence.<br> + * Note that _UNSAFE macros have fewer parameters: They do not have the strictness parameter, and + * they do not have start/length parameters for boundary checking.</p> + * + * <p>Here, the macros are aliased in two steps: + * In the first step, the UTF-specific macros with UTF16_ prefix and _UNSAFE and _SAFE suffixes are + * aliased according to the UTF_SIZE to macros with UTF_ prefix and the same suffixes and signatures. + * Then, in a second step, the default, general alias macros are set to use either the unsafe or + * the safe/not strict (default) or the safe/strict macro; + * these general macros do not have a strictness parameter.</p> + * + * <p>It is possible to change the default choice for the general alias macros to be unsafe, safe/not strict or safe/strict. + * The default is safe/not strict. It is not recommended to select the unsafe macros as the basis for + * Unicode string handling in ICU! To select this, define UTF_SAFE, UTF_STRICT, or UTF_UNSAFE.</p> + * + * <p>For general use, one should use the default, general macros with UTF_ prefix and no _SAFE/_UNSAFE suffix. + * Only in some cases it may be necessary to control the choice of macro directly and use a less generic alias. + * For example, if it can be assumed that a string is well-formed and the index will stay within the bounds, + * then the _UNSAFE version may be used. + * If a UTF-8 string is to be processed, then the macros with UTF8_ prefixes need to be used.</p> + * + * <hr> + * + * @deprecated ICU 2.4. Use the macros in utf.h, utf16.h, utf8.h instead. + */ + +#ifndef __UTF_OLD_H__ +#define __UTF_OLD_H__ + +/** + * \def U_HIDE_OBSOLETE_UTF_OLD_H + * + * Hides the obsolete definitions in unicode/utf_old.h. + * Recommended to be set to 1 at compile time to make sure + * the long-deprecated macros are no longer used. + * + * For reasons for the deprecation see the utf_old.h file comments. + * + * @internal + */ +#ifndef U_HIDE_OBSOLETE_UTF_OLD_H +# define U_HIDE_OBSOLETE_UTF_OLD_H 0 +#endif + +#if !defined(U_HIDE_DEPRECATED_API) && !U_HIDE_OBSOLETE_UTF_OLD_H + +#include "unicode/utf.h" +#include "unicode/utf8.h" +#include "unicode/utf16.h" + +/* Formerly utf.h, part 1 --------------------------------------------------- */ + +#ifdef U_USE_UTF_DEPRECATES +/** + * Unicode string and array offset and index type. + * ICU always counts Unicode code units (UChars) for + * string offsets, indexes, and lengths, not Unicode code points. + * + * @obsolete ICU 2.6. Use int32_t directly instead since this API will be removed in that release. + */ +typedef int32_t UTextOffset; +#endif + +/** Number of bits in a Unicode string code unit - ICU uses 16-bit Unicode. @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF_SIZE 16 + +/** + * The default choice for general Unicode string macros is to use the ..._SAFE macro implementations + * with strict=FALSE. + * + * @deprecated ICU 2.4. Obsolete, see utf_old.h. + */ +#define UTF_SAFE +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#undef UTF_UNSAFE +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#undef UTF_STRICT + +/** + * UTF8_ERROR_VALUE_1 and UTF8_ERROR_VALUE_2 are special error values for UTF-8, + * which need 1 or 2 bytes in UTF-8: + * \code + * U+0015 = NAK = Negative Acknowledge, C0 control character + * U+009f = highest C1 control character + * \endcode + * + * These are used by UTF8_..._SAFE macros so that they can return an error value + * that needs the same number of code units (bytes) as were seen by + * a macro. They should be tested with UTF_IS_ERROR() or UTF_IS_VALID(). + * + * @deprecated ICU 2.4. Obsolete, see utf_old.h. + */ +#define UTF8_ERROR_VALUE_1 0x15 + +/** + * See documentation on UTF8_ERROR_VALUE_1 for details. + * + * @deprecated ICU 2.4. Obsolete, see utf_old.h. + */ +#define UTF8_ERROR_VALUE_2 0x9f + +/** + * Error value for all UTFs. This code point value will be set by macros with error + * checking if an error is detected. + * + * @deprecated ICU 2.4. Obsolete, see utf_old.h. + */ +#define UTF_ERROR_VALUE 0xffff + +/** + * Is a given 32-bit code an error value + * as returned by one of the macros for any UTF? + * + * @deprecated ICU 2.4. Obsolete, see utf_old.h. + */ +#define UTF_IS_ERROR(c) \ + (((c)&0xfffe)==0xfffe || (c)==UTF8_ERROR_VALUE_1 || (c)==UTF8_ERROR_VALUE_2) + +/** + * This is a combined macro: Is c a valid Unicode value _and_ not an error code? + * + * @deprecated ICU 2.4. Obsolete, see utf_old.h. + */ +#define UTF_IS_VALID(c) \ + (UTF_IS_UNICODE_CHAR(c) && \ + (c)!=UTF8_ERROR_VALUE_1 && (c)!=UTF8_ERROR_VALUE_2) + +/** + * Is this code unit or code point a surrogate (U+d800..U+dfff)? + * @deprecated ICU 2.4. Renamed to U_IS_SURROGATE and U16_IS_SURROGATE, see utf_old.h. + */ +#define UTF_IS_SURROGATE(uchar) (((uchar)&0xfffff800)==0xd800) + +/** + * Is a given 32-bit code point a Unicode noncharacter? + * + * @deprecated ICU 2.4. Renamed to U_IS_UNICODE_NONCHAR, see utf_old.h. + */ +#define UTF_IS_UNICODE_NONCHAR(c) \ + ((c)>=0xfdd0 && \ + ((uint32_t)(c)<=0xfdef || ((c)&0xfffe)==0xfffe) && \ + (uint32_t)(c)<=0x10ffff) + +/** + * Is a given 32-bit value a Unicode code point value (0..U+10ffff) + * that can be assigned a character? + * + * Code points that are not characters include: + * - single surrogate code points (U+d800..U+dfff, 2048 code points) + * - the last two code points on each plane (U+__fffe and U+__ffff, 34 code points) + * - U+fdd0..U+fdef (new with Unicode 3.1, 32 code points) + * - the highest Unicode code point value is U+10ffff + * + * This means that all code points below U+d800 are character code points, + * and that boundary is tested first for performance. + * + * @deprecated ICU 2.4. Renamed to U_IS_UNICODE_CHAR, see utf_old.h. + */ +#define UTF_IS_UNICODE_CHAR(c) \ + ((uint32_t)(c)<0xd800 || \ + ((uint32_t)(c)>0xdfff && \ + (uint32_t)(c)<=0x10ffff && \ + !UTF_IS_UNICODE_NONCHAR(c))) + +/* Formerly utf8.h ---------------------------------------------------------- */ + +/** +* \var utf8_countTrailBytes +* Internal array with numbers of trail bytes for any given byte used in +* lead byte position. +* +* This is internal since it is not meant to be called directly by external clients; +* however it is called by public macros in this file and thus must remain stable, +* and should not be hidden when other internal functions are hidden (otherwise +* public macros would fail to compile). +* @internal +*/ +#ifdef U_UTF8_IMPL +// No forward declaration if compiling utf_impl.cpp, which defines utf8_countTrailBytes. +#elif defined(U_STATIC_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) +U_CFUNC const uint8_t utf8_countTrailBytes[]; +#else +U_CFUNC U_IMPORT const uint8_t utf8_countTrailBytes[]; /* U_IMPORT2? */ /*U_IMPORT*/ +#endif + +/** + * Count the trail bytes for a UTF-8 lead byte. + * @deprecated ICU 2.4. Renamed to U8_COUNT_TRAIL_BYTES, see utf_old.h. + */ +#define UTF8_COUNT_TRAIL_BYTES(leadByte) (utf8_countTrailBytes[(uint8_t)leadByte]) + +/** + * Mask a UTF-8 lead byte, leave only the lower bits that form part of the code point value. + * @deprecated ICU 2.4. Renamed to U8_MASK_LEAD_BYTE, see utf_old.h. + */ +#define UTF8_MASK_LEAD_BYTE(leadByte, countTrailBytes) ((leadByte)&=(1<<(6-(countTrailBytes)))-1) + +/** Is this this code point a single code unit (byte)? @deprecated ICU 2.4. Renamed to U8_IS_SINGLE, see utf_old.h. */ +#define UTF8_IS_SINGLE(uchar) (((uchar)&0x80)==0) +/** Is this this code unit the lead code unit (byte) of a code point? @deprecated ICU 2.4. Renamed to U8_IS_LEAD, see utf_old.h. */ +#define UTF8_IS_LEAD(uchar) ((uint8_t)((uchar)-0xc0)<0x3e) +/** Is this this code unit a trailing code unit (byte) of a code point? @deprecated ICU 2.4. Renamed to U8_IS_TRAIL, see utf_old.h. */ +#define UTF8_IS_TRAIL(uchar) (((uchar)&0xc0)==0x80) + +/** Does this scalar Unicode value need multiple code units for storage? @deprecated ICU 2.4. Use U8_LENGTH or test ((uint32_t)(c)>0x7f) instead, see utf_old.h. */ +#define UTF8_NEED_MULTIPLE_UCHAR(c) ((uint32_t)(c)>0x7f) + +/** + * Given the lead character, how many bytes are taken by this code point. + * ICU does not deal with code points >0x10ffff + * unless necessary for advancing in the byte stream. + * + * These length macros take into account that for values >0x10ffff + * the UTF8_APPEND_CHAR_SAFE macros would write the error code point 0xffff + * with 3 bytes. + * Code point comparisons need to be in uint32_t because UChar32 + * may be a signed type, and negative values must be recognized. + * + * @deprecated ICU 2.4. Use U8_LENGTH instead, see utf.h. + */ +#if 1 +# define UTF8_CHAR_LENGTH(c) \ + ((uint32_t)(c)<=0x7f ? 1 : \ + ((uint32_t)(c)<=0x7ff ? 2 : \ + ((uint32_t)((c)-0x10000)>0xfffff ? 3 : 4) \ + ) \ + ) +#else +# define UTF8_CHAR_LENGTH(c) \ + ((uint32_t)(c)<=0x7f ? 1 : \ + ((uint32_t)(c)<=0x7ff ? 2 : \ + ((uint32_t)(c)<=0xffff ? 3 : \ + ((uint32_t)(c)<=0x10ffff ? 4 : \ + ((uint32_t)(c)<=0x3ffffff ? 5 : \ + ((uint32_t)(c)<=0x7fffffff ? 6 : 3) \ + ) \ + ) \ + ) \ + ) \ + ) +#endif + +/** The maximum number of bytes per code point. @deprecated ICU 2.4. Renamed to U8_MAX_LENGTH, see utf_old.h. */ +#define UTF8_MAX_CHAR_LENGTH 4 + +/** Average number of code units compared to UTF-16. @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF8_ARRAY_SIZE(size) ((5*(size))/2) + +/** @deprecated ICU 2.4. Renamed to U8_GET_UNSAFE, see utf_old.h. */ +#define UTF8_GET_CHAR_UNSAFE(s, i, c) { \ + int32_t _utf8_get_char_unsafe_index=(int32_t)(i); \ + UTF8_SET_CHAR_START_UNSAFE(s, _utf8_get_char_unsafe_index); \ + UTF8_NEXT_CHAR_UNSAFE(s, _utf8_get_char_unsafe_index, c); \ +} + +/** @deprecated ICU 2.4. Use U8_GET instead, see utf_old.h. */ +#define UTF8_GET_CHAR_SAFE(s, start, i, length, c, strict) { \ + int32_t _utf8_get_char_safe_index=(int32_t)(i); \ + UTF8_SET_CHAR_START_SAFE(s, start, _utf8_get_char_safe_index); \ + UTF8_NEXT_CHAR_SAFE(s, _utf8_get_char_safe_index, length, c, strict); \ +} + +/** @deprecated ICU 2.4. Renamed to U8_NEXT_UNSAFE, see utf_old.h. */ +#define UTF8_NEXT_CHAR_UNSAFE(s, i, c) { \ + (c)=(s)[(i)++]; \ + if((uint8_t)((c)-0xc0)<0x35) { \ + uint8_t __count=UTF8_COUNT_TRAIL_BYTES(c); \ + UTF8_MASK_LEAD_BYTE(c, __count); \ + switch(__count) { \ + /* each following branch falls through to the next one */ \ + case 3: \ + (c)=((c)<<6)|((s)[(i)++]&0x3f); \ + case 2: \ + (c)=((c)<<6)|((s)[(i)++]&0x3f); \ + case 1: \ + (c)=((c)<<6)|((s)[(i)++]&0x3f); \ + /* no other branches to optimize switch() */ \ + break; \ + } \ + } \ +} + +/** @deprecated ICU 2.4. Renamed to U8_APPEND_UNSAFE, see utf_old.h. */ +#define UTF8_APPEND_CHAR_UNSAFE(s, i, c) { \ + if((uint32_t)(c)<=0x7f) { \ + (s)[(i)++]=(uint8_t)(c); \ + } else { \ + if((uint32_t)(c)<=0x7ff) { \ + (s)[(i)++]=(uint8_t)(((c)>>6)|0xc0); \ + } else { \ + if((uint32_t)(c)<=0xffff) { \ + (s)[(i)++]=(uint8_t)(((c)>>12)|0xe0); \ + } else { \ + (s)[(i)++]=(uint8_t)(((c)>>18)|0xf0); \ + (s)[(i)++]=(uint8_t)((((c)>>12)&0x3f)|0x80); \ + } \ + (s)[(i)++]=(uint8_t)((((c)>>6)&0x3f)|0x80); \ + } \ + (s)[(i)++]=(uint8_t)(((c)&0x3f)|0x80); \ + } \ +} + +/** @deprecated ICU 2.4. Renamed to U8_FWD_1_UNSAFE, see utf_old.h. */ +#define UTF8_FWD_1_UNSAFE(s, i) { \ + (i)+=1+UTF8_COUNT_TRAIL_BYTES((s)[i]); \ +} + +/** @deprecated ICU 2.4. Renamed to U8_FWD_N_UNSAFE, see utf_old.h. */ +#define UTF8_FWD_N_UNSAFE(s, i, n) { \ + int32_t __N=(n); \ + while(__N>0) { \ + UTF8_FWD_1_UNSAFE(s, i); \ + --__N; \ + } \ +} + +/** @deprecated ICU 2.4. Renamed to U8_SET_CP_START_UNSAFE, see utf_old.h. */ +#define UTF8_SET_CHAR_START_UNSAFE(s, i) { \ + while(UTF8_IS_TRAIL((s)[i])) { --(i); } \ +} + +/** @deprecated ICU 2.4. Use U8_NEXT instead, see utf_old.h. */ +#define UTF8_NEXT_CHAR_SAFE(s, i, length, c, strict) { \ + (c)=(s)[(i)++]; \ + if((c)>=0x80) { \ + if(UTF8_IS_LEAD(c)) { \ + (c)=utf8_nextCharSafeBody(s, &(i), (int32_t)(length), c, strict); \ + } else { \ + (c)=UTF8_ERROR_VALUE_1; \ + } \ + } \ +} + +/** @deprecated ICU 2.4. Use U8_APPEND instead, see utf_old.h. */ +#define UTF8_APPEND_CHAR_SAFE(s, i, length, c) { \ + if((uint32_t)(c)<=0x7f) { \ + (s)[(i)++]=(uint8_t)(c); \ + } else { \ + (i)=utf8_appendCharSafeBody(s, (int32_t)(i), (int32_t)(length), c, NULL); \ + } \ +} + +/** @deprecated ICU 2.4. Renamed to U8_FWD_1, see utf_old.h. */ +#define UTF8_FWD_1_SAFE(s, i, length) U8_FWD_1(s, i, length) + +/** @deprecated ICU 2.4. Renamed to U8_FWD_N, see utf_old.h. */ +#define UTF8_FWD_N_SAFE(s, i, length, n) U8_FWD_N(s, i, length, n) + +/** @deprecated ICU 2.4. Renamed to U8_SET_CP_START, see utf_old.h. */ +#define UTF8_SET_CHAR_START_SAFE(s, start, i) U8_SET_CP_START(s, start, i) + +/** @deprecated ICU 2.4. Renamed to U8_PREV_UNSAFE, see utf_old.h. */ +#define UTF8_PREV_CHAR_UNSAFE(s, i, c) { \ + (c)=(s)[--(i)]; \ + if(UTF8_IS_TRAIL(c)) { \ + uint8_t __b, __count=1, __shift=6; \ +\ + /* c is a trail byte */ \ + (c)&=0x3f; \ + for(;;) { \ + __b=(s)[--(i)]; \ + if(__b>=0xc0) { \ + UTF8_MASK_LEAD_BYTE(__b, __count); \ + (c)|=(UChar32)__b<<__shift; \ + break; \ + } else { \ + (c)|=(UChar32)(__b&0x3f)<<__shift; \ + ++__count; \ + __shift+=6; \ + } \ + } \ + } \ +} + +/** @deprecated ICU 2.4. Renamed to U8_BACK_1_UNSAFE, see utf_old.h. */ +#define UTF8_BACK_1_UNSAFE(s, i) { \ + while(UTF8_IS_TRAIL((s)[--(i)])) {} \ +} + +/** @deprecated ICU 2.4. Renamed to U8_BACK_N_UNSAFE, see utf_old.h. */ +#define UTF8_BACK_N_UNSAFE(s, i, n) { \ + int32_t __N=(n); \ + while(__N>0) { \ + UTF8_BACK_1_UNSAFE(s, i); \ + --__N; \ + } \ +} + +/** @deprecated ICU 2.4. Renamed to U8_SET_CP_LIMIT_UNSAFE, see utf_old.h. */ +#define UTF8_SET_CHAR_LIMIT_UNSAFE(s, i) { \ + UTF8_BACK_1_UNSAFE(s, i); \ + UTF8_FWD_1_UNSAFE(s, i); \ +} + +/** @deprecated ICU 2.4. Use U8_PREV instead, see utf_old.h. */ +#define UTF8_PREV_CHAR_SAFE(s, start, i, c, strict) { \ + (c)=(s)[--(i)]; \ + if((c)>=0x80) { \ + if((c)<=0xbf) { \ + (c)=utf8_prevCharSafeBody(s, start, &(i), c, strict); \ + } else { \ + (c)=UTF8_ERROR_VALUE_1; \ + } \ + } \ +} + +/** @deprecated ICU 2.4. Renamed to U8_BACK_1, see utf_old.h. */ +#define UTF8_BACK_1_SAFE(s, start, i) U8_BACK_1(s, start, i) + +/** @deprecated ICU 2.4. Renamed to U8_BACK_N, see utf_old.h. */ +#define UTF8_BACK_N_SAFE(s, start, i, n) U8_BACK_N(s, start, i, n) + +/** @deprecated ICU 2.4. Renamed to U8_SET_CP_LIMIT, see utf_old.h. */ +#define UTF8_SET_CHAR_LIMIT_SAFE(s, start, i, length) U8_SET_CP_LIMIT(s, start, i, length) + +/* Formerly utf16.h --------------------------------------------------------- */ + +/** Is uchar a first/lead surrogate? @deprecated ICU 2.4. Renamed to U_IS_LEAD and U16_IS_LEAD, see utf_old.h. */ +#define UTF_IS_FIRST_SURROGATE(uchar) (((uchar)&0xfffffc00)==0xd800) + +/** Is uchar a second/trail surrogate? @deprecated ICU 2.4. Renamed to U_IS_TRAIL and U16_IS_TRAIL, see utf_old.h. */ +#define UTF_IS_SECOND_SURROGATE(uchar) (((uchar)&0xfffffc00)==0xdc00) + +/** Assuming c is a surrogate, is it a first/lead surrogate? @deprecated ICU 2.4. Renamed to U_IS_SURROGATE_LEAD and U16_IS_SURROGATE_LEAD, see utf_old.h. */ +#define UTF_IS_SURROGATE_FIRST(c) (((c)&0x400)==0) + +/** Helper constant for UTF16_GET_PAIR_VALUE. @deprecated ICU 2.4. Renamed to U16_SURROGATE_OFFSET, see utf_old.h. */ +#define UTF_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000) + +/** Get the UTF-32 value from the surrogate code units. @deprecated ICU 2.4. Renamed to U16_GET_SUPPLEMENTARY, see utf_old.h. */ +#define UTF16_GET_PAIR_VALUE(first, second) \ + (((first)<<10UL)+(second)-UTF_SURROGATE_OFFSET) + +/** @deprecated ICU 2.4. Renamed to U16_LEAD, see utf_old.h. */ +#define UTF_FIRST_SURROGATE(supplementary) (UChar)(((supplementary)>>10)+0xd7c0) + +/** @deprecated ICU 2.4. Renamed to U16_TRAIL, see utf_old.h. */ +#define UTF_SECOND_SURROGATE(supplementary) (UChar)(((supplementary)&0x3ff)|0xdc00) + +/** @deprecated ICU 2.4. Renamed to U16_LEAD, see utf_old.h. */ +#define UTF16_LEAD(supplementary) UTF_FIRST_SURROGATE(supplementary) + +/** @deprecated ICU 2.4. Renamed to U16_TRAIL, see utf_old.h. */ +#define UTF16_TRAIL(supplementary) UTF_SECOND_SURROGATE(supplementary) + +/** @deprecated ICU 2.4. Renamed to U16_IS_SINGLE, see utf_old.h. */ +#define UTF16_IS_SINGLE(uchar) !UTF_IS_SURROGATE(uchar) + +/** @deprecated ICU 2.4. Renamed to U16_IS_LEAD, see utf_old.h. */ +#define UTF16_IS_LEAD(uchar) UTF_IS_FIRST_SURROGATE(uchar) + +/** @deprecated ICU 2.4. Renamed to U16_IS_TRAIL, see utf_old.h. */ +#define UTF16_IS_TRAIL(uchar) UTF_IS_SECOND_SURROGATE(uchar) + +/** Does this scalar Unicode value need multiple code units for storage? @deprecated ICU 2.4. Use U16_LENGTH or test ((uint32_t)(c)>0xffff) instead, see utf_old.h. */ +#define UTF16_NEED_MULTIPLE_UCHAR(c) ((uint32_t)(c)>0xffff) + +/** @deprecated ICU 2.4. Renamed to U16_LENGTH, see utf_old.h. */ +#define UTF16_CHAR_LENGTH(c) ((uint32_t)(c)<=0xffff ? 1 : 2) + +/** @deprecated ICU 2.4. Renamed to U16_MAX_LENGTH, see utf_old.h. */ +#define UTF16_MAX_CHAR_LENGTH 2 + +/** Average number of code units compared to UTF-16. @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF16_ARRAY_SIZE(size) (size) + +/** + * Get a single code point from an offset that points to any + * of the code units that belong to that code point. + * Assume 0<=i<length. + * + * This could be used for iteration together with + * UTF16_CHAR_LENGTH() and UTF_IS_ERROR(), + * but the use of UTF16_NEXT_CHAR[_UNSAFE]() and + * UTF16_PREV_CHAR[_UNSAFE]() is more efficient for that. + * @deprecated ICU 2.4. Renamed to U16_GET_UNSAFE, see utf_old.h. + */ +#define UTF16_GET_CHAR_UNSAFE(s, i, c) { \ + (c)=(s)[i]; \ + if(UTF_IS_SURROGATE(c)) { \ + if(UTF_IS_SURROGATE_FIRST(c)) { \ + (c)=UTF16_GET_PAIR_VALUE((c), (s)[(i)+1]); \ + } else { \ + (c)=UTF16_GET_PAIR_VALUE((s)[(i)-1], (c)); \ + } \ + } \ +} + +/** @deprecated ICU 2.4. Use U16_GET instead, see utf_old.h. */ +#define UTF16_GET_CHAR_SAFE(s, start, i, length, c, strict) { \ + (c)=(s)[i]; \ + if(UTF_IS_SURROGATE(c)) { \ + uint16_t __c2; \ + if(UTF_IS_SURROGATE_FIRST(c)) { \ + if((i)+1<(length) && UTF_IS_SECOND_SURROGATE(__c2=(s)[(i)+1])) { \ + (c)=UTF16_GET_PAIR_VALUE((c), __c2); \ + /* strict: ((c)&0xfffe)==0xfffe is caught by UTF_IS_ERROR() and UTF_IS_UNICODE_CHAR() */ \ + } else if(strict) {\ + /* unmatched first surrogate */ \ + (c)=UTF_ERROR_VALUE; \ + } \ + } else { \ + if((i)-1>=(start) && UTF_IS_FIRST_SURROGATE(__c2=(s)[(i)-1])) { \ + (c)=UTF16_GET_PAIR_VALUE(__c2, (c)); \ + /* strict: ((c)&0xfffe)==0xfffe is caught by UTF_IS_ERROR() and UTF_IS_UNICODE_CHAR() */ \ + } else if(strict) {\ + /* unmatched second surrogate */ \ + (c)=UTF_ERROR_VALUE; \ + } \ + } \ + } else if((strict) && !UTF_IS_UNICODE_CHAR(c)) { \ + (c)=UTF_ERROR_VALUE; \ + } \ +} + +/** @deprecated ICU 2.4. Renamed to U16_NEXT_UNSAFE, see utf_old.h. */ +#define UTF16_NEXT_CHAR_UNSAFE(s, i, c) { \ + (c)=(s)[(i)++]; \ + if(UTF_IS_FIRST_SURROGATE(c)) { \ + (c)=UTF16_GET_PAIR_VALUE((c), (s)[(i)++]); \ + } \ +} + +/** @deprecated ICU 2.4. Renamed to U16_APPEND_UNSAFE, see utf_old.h. */ +#define UTF16_APPEND_CHAR_UNSAFE(s, i, c) { \ + if((uint32_t)(c)<=0xffff) { \ + (s)[(i)++]=(uint16_t)(c); \ + } else { \ + (s)[(i)++]=(uint16_t)(((c)>>10)+0xd7c0); \ + (s)[(i)++]=(uint16_t)(((c)&0x3ff)|0xdc00); \ + } \ +} + +/** @deprecated ICU 2.4. Renamed to U16_FWD_1_UNSAFE, see utf_old.h. */ +#define UTF16_FWD_1_UNSAFE(s, i) { \ + if(UTF_IS_FIRST_SURROGATE((s)[(i)++])) { \ + ++(i); \ + } \ +} + +/** @deprecated ICU 2.4. Renamed to U16_FWD_N_UNSAFE, see utf_old.h. */ +#define UTF16_FWD_N_UNSAFE(s, i, n) { \ + int32_t __N=(n); \ + while(__N>0) { \ + UTF16_FWD_1_UNSAFE(s, i); \ + --__N; \ + } \ +} + +/** @deprecated ICU 2.4. Renamed to U16_SET_CP_START_UNSAFE, see utf_old.h. */ +#define UTF16_SET_CHAR_START_UNSAFE(s, i) { \ + if(UTF_IS_SECOND_SURROGATE((s)[i])) { \ + --(i); \ + } \ +} + +/** @deprecated ICU 2.4. Use U16_NEXT instead, see utf_old.h. */ +#define UTF16_NEXT_CHAR_SAFE(s, i, length, c, strict) { \ + (c)=(s)[(i)++]; \ + if(UTF_IS_FIRST_SURROGATE(c)) { \ + uint16_t __c2; \ + if((i)<(length) && UTF_IS_SECOND_SURROGATE(__c2=(s)[(i)])) { \ + ++(i); \ + (c)=UTF16_GET_PAIR_VALUE((c), __c2); \ + /* strict: ((c)&0xfffe)==0xfffe is caught by UTF_IS_ERROR() and UTF_IS_UNICODE_CHAR() */ \ + } else if(strict) {\ + /* unmatched first surrogate */ \ + (c)=UTF_ERROR_VALUE; \ + } \ + } else if((strict) && !UTF_IS_UNICODE_CHAR(c)) { \ + /* unmatched second surrogate or other non-character */ \ + (c)=UTF_ERROR_VALUE; \ + } \ +} + +/** @deprecated ICU 2.4. Use U16_APPEND instead, see utf_old.h. */ +#define UTF16_APPEND_CHAR_SAFE(s, i, length, c) { \ + if((uint32_t)(c)<=0xffff) { \ + (s)[(i)++]=(uint16_t)(c); \ + } else if((uint32_t)(c)<=0x10ffff) { \ + if((i)+1<(length)) { \ + (s)[(i)++]=(uint16_t)(((c)>>10)+0xd7c0); \ + (s)[(i)++]=(uint16_t)(((c)&0x3ff)|0xdc00); \ + } else /* not enough space */ { \ + (s)[(i)++]=UTF_ERROR_VALUE; \ + } \ + } else /* c>0x10ffff, write error value */ { \ + (s)[(i)++]=UTF_ERROR_VALUE; \ + } \ +} + +/** @deprecated ICU 2.4. Renamed to U16_FWD_1, see utf_old.h. */ +#define UTF16_FWD_1_SAFE(s, i, length) U16_FWD_1(s, i, length) + +/** @deprecated ICU 2.4. Renamed to U16_FWD_N, see utf_old.h. */ +#define UTF16_FWD_N_SAFE(s, i, length, n) U16_FWD_N(s, i, length, n) + +/** @deprecated ICU 2.4. Renamed to U16_SET_CP_START, see utf_old.h. */ +#define UTF16_SET_CHAR_START_SAFE(s, start, i) U16_SET_CP_START(s, start, i) + +/** @deprecated ICU 2.4. Renamed to U16_PREV_UNSAFE, see utf_old.h. */ +#define UTF16_PREV_CHAR_UNSAFE(s, i, c) { \ + (c)=(s)[--(i)]; \ + if(UTF_IS_SECOND_SURROGATE(c)) { \ + (c)=UTF16_GET_PAIR_VALUE((s)[--(i)], (c)); \ + } \ +} + +/** @deprecated ICU 2.4. Renamed to U16_BACK_1_UNSAFE, see utf_old.h. */ +#define UTF16_BACK_1_UNSAFE(s, i) { \ + if(UTF_IS_SECOND_SURROGATE((s)[--(i)])) { \ + --(i); \ + } \ +} + +/** @deprecated ICU 2.4. Renamed to U16_BACK_N_UNSAFE, see utf_old.h. */ +#define UTF16_BACK_N_UNSAFE(s, i, n) { \ + int32_t __N=(n); \ + while(__N>0) { \ + UTF16_BACK_1_UNSAFE(s, i); \ + --__N; \ + } \ +} + +/** @deprecated ICU 2.4. Renamed to U16_SET_CP_LIMIT_UNSAFE, see utf_old.h. */ +#define UTF16_SET_CHAR_LIMIT_UNSAFE(s, i) { \ + if(UTF_IS_FIRST_SURROGATE((s)[(i)-1])) { \ + ++(i); \ + } \ +} + +/** @deprecated ICU 2.4. Use U16_PREV instead, see utf_old.h. */ +#define UTF16_PREV_CHAR_SAFE(s, start, i, c, strict) { \ + (c)=(s)[--(i)]; \ + if(UTF_IS_SECOND_SURROGATE(c)) { \ + uint16_t __c2; \ + if((i)>(start) && UTF_IS_FIRST_SURROGATE(__c2=(s)[(i)-1])) { \ + --(i); \ + (c)=UTF16_GET_PAIR_VALUE(__c2, (c)); \ + /* strict: ((c)&0xfffe)==0xfffe is caught by UTF_IS_ERROR() and UTF_IS_UNICODE_CHAR() */ \ + } else if(strict) {\ + /* unmatched second surrogate */ \ + (c)=UTF_ERROR_VALUE; \ + } \ + } else if((strict) && !UTF_IS_UNICODE_CHAR(c)) { \ + /* unmatched first surrogate or other non-character */ \ + (c)=UTF_ERROR_VALUE; \ + } \ +} + +/** @deprecated ICU 2.4. Renamed to U16_BACK_1, see utf_old.h. */ +#define UTF16_BACK_1_SAFE(s, start, i) U16_BACK_1(s, start, i) + +/** @deprecated ICU 2.4. Renamed to U16_BACK_N, see utf_old.h. */ +#define UTF16_BACK_N_SAFE(s, start, i, n) U16_BACK_N(s, start, i, n) + +/** @deprecated ICU 2.4. Renamed to U16_SET_CP_LIMIT, see utf_old.h. */ +#define UTF16_SET_CHAR_LIMIT_SAFE(s, start, i, length) U16_SET_CP_LIMIT(s, start, i, length) + +/* Formerly utf32.h --------------------------------------------------------- */ + +/* +* Old documentation: +* +* This file defines macros to deal with UTF-32 code units and code points. +* Signatures and semantics are the same as for the similarly named macros +* in utf16.h. +* utf32.h is included by utf.h after unicode/umachine.h</p> +* and some common definitions. +* <p><b>Usage:</b> ICU coding guidelines for if() statements should be followed when using these macros. +* Compound statements (curly braces {}) must be used for if-else-while... +* bodies and all macro statements should be terminated with semicolon.</p> +*/ + +/* internal definitions ----------------------------------------------------- */ + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_IS_SAFE(c, strict) \ + (!(strict) ? \ + (uint32_t)(c)<=0x10ffff : \ + UTF_IS_UNICODE_CHAR(c)) + +/* + * For the semantics of all of these macros, see utf16.h. + * The UTF-32 versions are trivial because any code point is + * encoded using exactly one code unit. + */ + +/* single-code point definitions -------------------------------------------- */ + +/* classes of code unit values */ + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_IS_SINGLE(uchar) 1 +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_IS_LEAD(uchar) 0 +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_IS_TRAIL(uchar) 0 + +/* number of code units per code point */ + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_NEED_MULTIPLE_UCHAR(c) 0 +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_CHAR_LENGTH(c) 1 +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_MAX_CHAR_LENGTH 1 + +/* average number of code units compared to UTF-16 */ + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_ARRAY_SIZE(size) (size) + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_GET_CHAR_UNSAFE(s, i, c) { \ + (c)=(s)[i]; \ +} + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_GET_CHAR_SAFE(s, start, i, length, c, strict) { \ + (c)=(s)[i]; \ + if(!UTF32_IS_SAFE(c, strict)) { \ + (c)=UTF_ERROR_VALUE; \ + } \ +} + +/* definitions with forward iteration --------------------------------------- */ + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_NEXT_CHAR_UNSAFE(s, i, c) { \ + (c)=(s)[(i)++]; \ +} + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_APPEND_CHAR_UNSAFE(s, i, c) { \ + (s)[(i)++]=(c); \ +} + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_FWD_1_UNSAFE(s, i) { \ + ++(i); \ +} + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_FWD_N_UNSAFE(s, i, n) { \ + (i)+=(n); \ +} + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_SET_CHAR_START_UNSAFE(s, i) { \ +} + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_NEXT_CHAR_SAFE(s, i, length, c, strict) { \ + (c)=(s)[(i)++]; \ + if(!UTF32_IS_SAFE(c, strict)) { \ + (c)=UTF_ERROR_VALUE; \ + } \ +} + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_APPEND_CHAR_SAFE(s, i, length, c) { \ + if((uint32_t)(c)<=0x10ffff) { \ + (s)[(i)++]=(c); \ + } else /* c>0x10ffff, write 0xfffd */ { \ + (s)[(i)++]=0xfffd; \ + } \ +} + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_FWD_1_SAFE(s, i, length) { \ + ++(i); \ +} + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_FWD_N_SAFE(s, i, length, n) { \ + if(((i)+=(n))>(length)) { \ + (i)=(length); \ + } \ +} + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_SET_CHAR_START_SAFE(s, start, i) { \ +} + +/* definitions with backward iteration -------------------------------------- */ + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_PREV_CHAR_UNSAFE(s, i, c) { \ + (c)=(s)[--(i)]; \ +} + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_BACK_1_UNSAFE(s, i) { \ + --(i); \ +} + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_BACK_N_UNSAFE(s, i, n) { \ + (i)-=(n); \ +} + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_SET_CHAR_LIMIT_UNSAFE(s, i) { \ +} + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_PREV_CHAR_SAFE(s, start, i, c, strict) { \ + (c)=(s)[--(i)]; \ + if(!UTF32_IS_SAFE(c, strict)) { \ + (c)=UTF_ERROR_VALUE; \ + } \ +} + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_BACK_1_SAFE(s, start, i) { \ + --(i); \ +} + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_BACK_N_SAFE(s, start, i, n) { \ + (i)-=(n); \ + if((i)<(start)) { \ + (i)=(start); \ + } \ +} + +/** @deprecated ICU 2.4. Obsolete, see utf_old.h. */ +#define UTF32_SET_CHAR_LIMIT_SAFE(s, i, length) { \ +} + +/* Formerly utf.h, part 2 --------------------------------------------------- */ + +/** + * Estimate the number of code units for a string based on the number of UTF-16 code units. + * + * @deprecated ICU 2.4. Obsolete, see utf_old.h. + */ +#define UTF_ARRAY_SIZE(size) UTF16_ARRAY_SIZE(size) + +/** @deprecated ICU 2.4. Renamed to U16_GET_UNSAFE, see utf_old.h. */ +#define UTF_GET_CHAR_UNSAFE(s, i, c) UTF16_GET_CHAR_UNSAFE(s, i, c) + +/** @deprecated ICU 2.4. Use U16_GET instead, see utf_old.h. */ +#define UTF_GET_CHAR_SAFE(s, start, i, length, c, strict) UTF16_GET_CHAR_SAFE(s, start, i, length, c, strict) + + +/** @deprecated ICU 2.4. Renamed to U16_NEXT_UNSAFE, see utf_old.h. */ +#define UTF_NEXT_CHAR_UNSAFE(s, i, c) UTF16_NEXT_CHAR_UNSAFE(s, i, c) + +/** @deprecated ICU 2.4. Use U16_NEXT instead, see utf_old.h. */ +#define UTF_NEXT_CHAR_SAFE(s, i, length, c, strict) UTF16_NEXT_CHAR_SAFE(s, i, length, c, strict) + + +/** @deprecated ICU 2.4. Renamed to U16_APPEND_UNSAFE, see utf_old.h. */ +#define UTF_APPEND_CHAR_UNSAFE(s, i, c) UTF16_APPEND_CHAR_UNSAFE(s, i, c) + +/** @deprecated ICU 2.4. Use U16_APPEND instead, see utf_old.h. */ +#define UTF_APPEND_CHAR_SAFE(s, i, length, c) UTF16_APPEND_CHAR_SAFE(s, i, length, c) + + +/** @deprecated ICU 2.4. Renamed to U16_FWD_1_UNSAFE, see utf_old.h. */ +#define UTF_FWD_1_UNSAFE(s, i) UTF16_FWD_1_UNSAFE(s, i) + +/** @deprecated ICU 2.4. Renamed to U16_FWD_1, see utf_old.h. */ +#define UTF_FWD_1_SAFE(s, i, length) UTF16_FWD_1_SAFE(s, i, length) + + +/** @deprecated ICU 2.4. Renamed to U16_FWD_N_UNSAFE, see utf_old.h. */ +#define UTF_FWD_N_UNSAFE(s, i, n) UTF16_FWD_N_UNSAFE(s, i, n) + +/** @deprecated ICU 2.4. Renamed to U16_FWD_N, see utf_old.h. */ +#define UTF_FWD_N_SAFE(s, i, length, n) UTF16_FWD_N_SAFE(s, i, length, n) + + +/** @deprecated ICU 2.4. Renamed to U16_SET_CP_START_UNSAFE, see utf_old.h. */ +#define UTF_SET_CHAR_START_UNSAFE(s, i) UTF16_SET_CHAR_START_UNSAFE(s, i) + +/** @deprecated ICU 2.4. Renamed to U16_SET_CP_START, see utf_old.h. */ +#define UTF_SET_CHAR_START_SAFE(s, start, i) UTF16_SET_CHAR_START_SAFE(s, start, i) + + +/** @deprecated ICU 2.4. Renamed to U16_PREV_UNSAFE, see utf_old.h. */ +#define UTF_PREV_CHAR_UNSAFE(s, i, c) UTF16_PREV_CHAR_UNSAFE(s, i, c) + +/** @deprecated ICU 2.4. Use U16_PREV instead, see utf_old.h. */ +#define UTF_PREV_CHAR_SAFE(s, start, i, c, strict) UTF16_PREV_CHAR_SAFE(s, start, i, c, strict) + + +/** @deprecated ICU 2.4. Renamed to U16_BACK_1_UNSAFE, see utf_old.h. */ +#define UTF_BACK_1_UNSAFE(s, i) UTF16_BACK_1_UNSAFE(s, i) + +/** @deprecated ICU 2.4. Renamed to U16_BACK_1, see utf_old.h. */ +#define UTF_BACK_1_SAFE(s, start, i) UTF16_BACK_1_SAFE(s, start, i) + + +/** @deprecated ICU 2.4. Renamed to U16_BACK_N_UNSAFE, see utf_old.h. */ +#define UTF_BACK_N_UNSAFE(s, i, n) UTF16_BACK_N_UNSAFE(s, i, n) + +/** @deprecated ICU 2.4. Renamed to U16_BACK_N, see utf_old.h. */ +#define UTF_BACK_N_SAFE(s, start, i, n) UTF16_BACK_N_SAFE(s, start, i, n) + + +/** @deprecated ICU 2.4. Renamed to U16_SET_CP_LIMIT_UNSAFE, see utf_old.h. */ +#define UTF_SET_CHAR_LIMIT_UNSAFE(s, i) UTF16_SET_CHAR_LIMIT_UNSAFE(s, i) + +/** @deprecated ICU 2.4. Renamed to U16_SET_CP_LIMIT, see utf_old.h. */ +#define UTF_SET_CHAR_LIMIT_SAFE(s, start, i, length) UTF16_SET_CHAR_LIMIT_SAFE(s, start, i, length) + +/* Define default macros (UTF-16 "safe") ------------------------------------ */ + +/** + * Does this code unit alone encode a code point (BMP, not a surrogate)? + * Same as UTF16_IS_SINGLE. + * @deprecated ICU 2.4. Renamed to U_IS_SINGLE and U16_IS_SINGLE, see utf_old.h. + */ +#define UTF_IS_SINGLE(uchar) U16_IS_SINGLE(uchar) + +/** + * Is this code unit the first one of several (a lead surrogate)? + * Same as UTF16_IS_LEAD. + * @deprecated ICU 2.4. Renamed to U_IS_LEAD and U16_IS_LEAD, see utf_old.h. + */ +#define UTF_IS_LEAD(uchar) U16_IS_LEAD(uchar) + +/** + * Is this code unit one of several but not the first one (a trail surrogate)? + * Same as UTF16_IS_TRAIL. + * @deprecated ICU 2.4. Renamed to U_IS_TRAIL and U16_IS_TRAIL, see utf_old.h. + */ +#define UTF_IS_TRAIL(uchar) U16_IS_TRAIL(uchar) + +/** + * Does this code point require multiple code units (is it a supplementary code point)? + * Same as UTF16_NEED_MULTIPLE_UCHAR. + * @deprecated ICU 2.4. Use U16_LENGTH or test ((uint32_t)(c)>0xffff) instead. + */ +#define UTF_NEED_MULTIPLE_UCHAR(c) UTF16_NEED_MULTIPLE_UCHAR(c) + +/** + * How many code units are used to encode this code point (1 or 2)? + * Same as UTF16_CHAR_LENGTH. + * @deprecated ICU 2.4. Renamed to U16_LENGTH, see utf_old.h. + */ +#define UTF_CHAR_LENGTH(c) U16_LENGTH(c) + +/** + * How many code units are used at most for any Unicode code point (2)? + * Same as UTF16_MAX_CHAR_LENGTH. + * @deprecated ICU 2.4. Renamed to U16_MAX_LENGTH, see utf_old.h. + */ +#define UTF_MAX_CHAR_LENGTH U16_MAX_LENGTH + +/** + * Set c to the code point that contains the code unit i. + * i could point to the lead or the trail surrogate for the code point. + * i is not modified. + * Same as UTF16_GET_CHAR. + * \pre 0<=i<length + * + * @deprecated ICU 2.4. Renamed to U16_GET, see utf_old.h. + */ +#define UTF_GET_CHAR(s, start, i, length, c) U16_GET(s, start, i, length, c) + +/** + * Set c to the code point that starts at code unit i + * and advance i to beyond the code units of this code point (post-increment). + * i must point to the first code unit of a code point. + * Otherwise c is set to the trail unit (surrogate) itself. + * Same as UTF16_NEXT_CHAR. + * \pre 0<=i<length + * \post 0<i<=length + * + * @deprecated ICU 2.4. Renamed to U16_NEXT, see utf_old.h. + */ +#define UTF_NEXT_CHAR(s, i, length, c) U16_NEXT(s, i, length, c) + +/** + * Append the code units of code point c to the string at index i + * and advance i to beyond the new code units (post-increment). + * The code units beginning at index i will be overwritten. + * Same as UTF16_APPEND_CHAR. + * \pre 0<=c<=0x10ffff + * \pre 0<=i<length + * \post 0<i<=length + * + * @deprecated ICU 2.4. Use U16_APPEND instead, see utf_old.h. + */ +#define UTF_APPEND_CHAR(s, i, length, c) UTF16_APPEND_CHAR_SAFE(s, i, length, c) + +/** + * Advance i to beyond the code units of the code point that begins at i. + * I.e., advance i by one code point. + * Same as UTF16_FWD_1. + * \pre 0<=i<length + * \post 0<i<=length + * + * @deprecated ICU 2.4. Renamed to U16_FWD_1, see utf_old.h. + */ +#define UTF_FWD_1(s, i, length) U16_FWD_1(s, i, length) + +/** + * Advance i to beyond the code units of the n code points where the first one begins at i. + * I.e., advance i by n code points. + * Same as UT16_FWD_N. + * \pre 0<=i<length + * \post 0<i<=length + * + * @deprecated ICU 2.4. Renamed to U16_FWD_N, see utf_old.h. + */ +#define UTF_FWD_N(s, i, length, n) U16_FWD_N(s, i, length, n) + +/** + * Take the random-access index i and adjust it so that it points to the beginning + * of a code point. + * The input index points to any code unit of a code point and is moved to point to + * the first code unit of the same code point. i is never incremented. + * In other words, if i points to a trail surrogate that is preceded by a matching + * lead surrogate, then i is decremented. Otherwise it is not modified. + * This can be used to start an iteration with UTF_NEXT_CHAR() from a random index. + * Same as UTF16_SET_CHAR_START. + * \pre start<=i<length + * \post start<=i<length + * + * @deprecated ICU 2.4. Renamed to U16_SET_CP_START, see utf_old.h. + */ +#define UTF_SET_CHAR_START(s, start, i) U16_SET_CP_START(s, start, i) + +/** + * Set c to the code point that has code units before i + * and move i backward (towards the beginning of the string) + * to the first code unit of this code point (pre-increment). + * i must point to the first code unit after the last unit of a code point (i==length is allowed). + * Same as UTF16_PREV_CHAR. + * \pre start<i<=length + * \post start<=i<length + * + * @deprecated ICU 2.4. Renamed to U16_PREV, see utf_old.h. + */ +#define UTF_PREV_CHAR(s, start, i, c) U16_PREV(s, start, i, c) + +/** + * Move i backward (towards the beginning of the string) + * to the first code unit of the code point that has code units before i. + * I.e., move i backward by one code point. + * i must point to the first code unit after the last unit of a code point (i==length is allowed). + * Same as UTF16_BACK_1. + * \pre start<i<=length + * \post start<=i<length + * + * @deprecated ICU 2.4. Renamed to U16_BACK_1, see utf_old.h. + */ +#define UTF_BACK_1(s, start, i) U16_BACK_1(s, start, i) + +/** + * Move i backward (towards the beginning of the string) + * to the first code unit of the n code points that have code units before i. + * I.e., move i backward by n code points. + * i must point to the first code unit after the last unit of a code point (i==length is allowed). + * Same as UTF16_BACK_N. + * \pre start<i<=length + * \post start<=i<length + * + * @deprecated ICU 2.4. Renamed to U16_BACK_N, see utf_old.h. + */ +#define UTF_BACK_N(s, start, i, n) U16_BACK_N(s, start, i, n) + +/** + * Take the random-access index i and adjust it so that it points beyond + * a code point. The input index points beyond any code unit + * of a code point and is moved to point beyond the last code unit of the same + * code point. i is never decremented. + * In other words, if i points to a trail surrogate that is preceded by a matching + * lead surrogate, then i is incremented. Otherwise it is not modified. + * This can be used to start an iteration with UTF_PREV_CHAR() from a random index. + * Same as UTF16_SET_CHAR_LIMIT. + * \pre start<i<=length + * \post start<i<=length + * + * @deprecated ICU 2.4. Renamed to U16_SET_CP_LIMIT, see utf_old.h. + */ +#define UTF_SET_CHAR_LIMIT(s, start, i, length) U16_SET_CP_LIMIT(s, start, i, length) + +#endif // !U_HIDE_DEPRECATED_API && !U_HIDE_OBSOLETE_UTF_OLD_H + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utmscale.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utmscale.h new file mode 100755 index 00000000..d8b8a2e6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utmscale.h @@ -0,0 +1,490 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2004 - 2008, International Business Machines Corporation and +* others. All Rights Reserved. +******************************************************************************* +*/ + +#ifndef UTMSCALE_H +#define UTMSCALE_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +/** + * \file + * \brief C API: Universal Time Scale + * + * There are quite a few different conventions for binary datetime, depending on different + * platforms and protocols. Some of these have severe drawbacks. For example, people using + * Unix time (seconds since Jan 1, 1970) think that they are safe until near the year 2038. + * But cases can and do arise where arithmetic manipulations causes serious problems. Consider + * the computation of the average of two datetimes, for example: if one calculates them with + * <code>averageTime = (time1 + time2)/2</code>, there will be overflow even with dates + * around the present. Moreover, even if these problems don't occur, there is the issue of + * conversion back and forth between different systems. + * + * <p> + * Binary datetimes differ in a number of ways: the datatype, the unit, + * and the epoch (origin). We'll refer to these as time scales. For example: + * + * <table border="1" cellspacing="0" cellpadding="4"> + * <caption>Table 1: Binary Time Scales</caption> + * <tr> + * <th align="left">Source</th> + * <th align="left">Datatype</th> + * <th align="left">Unit</th> + * <th align="left">Epoch</th> + * </tr> + * + * <tr> + * <td>UDTS_JAVA_TIME</td> + * <td>int64_t</td> + * <td>milliseconds</td> + * <td>Jan 1, 1970</td> + * </tr> + * <tr> + * + * <td>UDTS_UNIX_TIME</td> + * <td>int32_t or int64_t</td> + * <td>seconds</td> + * <td>Jan 1, 1970</td> + * </tr> + * <tr> + * <td>UDTS_ICU4C_TIME</td> + * + * <td>double</td> + * <td>milliseconds</td> + * <td>Jan 1, 1970</td> + * </tr> + * <tr> + * <td>UDTS_WINDOWS_FILE_TIME</td> + * <td>int64_t</td> + * + * <td>ticks (100 nanoseconds)</td> + * <td>Jan 1, 1601</td> + * </tr> + * <tr> + * <td>UDTS_DOTNET_DATE_TIME</td> + * <td>int64_t</td> + * <td>ticks (100 nanoseconds)</td> + * + * <td>Jan 1, 0001</td> + * </tr> + * <tr> + * <td>UDTS_MAC_OLD_TIME</td> + * <td>int32_t or int64_t</td> + * <td>seconds</td> + * <td>Jan 1, 1904</td> + * + * </tr> + * <tr> + * <td>UDTS_MAC_TIME</td> + * <td>double</td> + * <td>seconds</td> + * <td>Jan 1, 2001</td> + * </tr> + * + * <tr> + * <td>UDTS_EXCEL_TIME</td> + * <td>?</td> + * <td>days</td> + * <td>Dec 31, 1899</td> + * </tr> + * <tr> + * + * <td>UDTS_DB2_TIME</td> + * <td>?</td> + * <td>days</td> + * <td>Dec 31, 1899</td> + * </tr> + * + * <tr> + * <td>UDTS_UNIX_MICROSECONDS_TIME</td> + * <td>int64_t</td> + * <td>microseconds</td> + * <td>Jan 1, 1970</td> + * </tr> + * </table> + * + * <p> + * All of the epochs start at 00:00 am (the earliest possible time on the day in question), + * and are assumed to be UTC. + * + * <p> + * The ranges for different datatypes are given in the following table (all values in years). + * The range of years includes the entire range expressible with positive and negative + * values of the datatype. The range of years for double is the range that would be allowed + * without losing precision to the corresponding unit. + * + * <table border="1" cellspacing="0" cellpadding="4"> + * <tr> + * <th align="left">Units</th> + * <th align="left">int64_t</th> + * <th align="left">double</th> + * <th align="left">int32_t</th> + * </tr> + * + * <tr> + * <td>1 sec</td> + * <td align="right">5.84542x10<sup>11</sup></td> + * <td align="right">285,420,920.94</td> + * <td align="right">136.10</td> + * </tr> + * <tr> + * + * <td>1 millisecond</td> + * <td align="right">584,542,046.09</td> + * <td align="right">285,420.92</td> + * <td align="right">0.14</td> + * </tr> + * <tr> + * <td>1 microsecond</td> + * + * <td align="right">584,542.05</td> + * <td align="right">285.42</td> + * <td align="right">0.00</td> + * </tr> + * <tr> + * <td>100 nanoseconds (tick)</td> + * <td align="right">58,454.20</td> + * <td align="right">28.54</td> + * <td align="right">0.00</td> + * </tr> + * <tr> + * <td>1 nanosecond</td> + * <td align="right">584.5420461</td> + * <td align="right">0.2854</td> + * <td align="right">0.00</td> + * </tr> + * </table> + * + * <p> + * These functions implement a universal time scale which can be used as a 'pivot', + * and provide conversion functions to and from all other major time scales. + * This datetimes to be converted to the pivot time, safely manipulated, + * and converted back to any other datetime time scale. + * + *<p> + * So what to use for this pivot? Java time has plenty of range, but cannot represent + * .NET <code>System.DateTime</code> values without severe loss of precision. ICU4C time addresses this by using a + * <code>double</code> that is otherwise equivalent to the Java time. However, there are disadvantages + * with <code>doubles</code>. They provide for much more graceful degradation in arithmetic operations. + * But they only have 53 bits of accuracy, which means that they will lose precision when + * converting back and forth to ticks. What would really be nice would be a + * <code>long double</code> (80 bits -- 64 bit mantissa), but that is not supported on most systems. + * + *<p> + * The Unix extended time uses a structure with two components: time in seconds and a + * fractional field (microseconds). However, this is clumsy, slow, and + * prone to error (you always have to keep track of overflow and underflow in the + * fractional field). <code>BigDecimal</code> would allow for arbitrary precision and arbitrary range, + * but we do not want to use this as the normal type, because it is slow and does not + * have a fixed size. + * + *<p> + * Because of these issues, we ended up concluding that the .NET framework's + * <code>System.DateTime</code> would be the best pivot. However, we use the full range + * allowed by the datatype, allowing for datetimes back to 29,000 BC and up to 29,000 AD. + * This time scale is very fine grained, does not lose precision, and covers a range that + * will meet almost all requirements. It will not handle the range that Java times do, + * but frankly, being able to handle dates before 29,000 BC or after 29,000 AD is of very limited interest. + * + */ + +/** + * <code>UDateTimeScale</code> values are used to specify the time scale used for + * conversion into or out if the universal time scale. + * + * @stable ICU 3.2 + */ +typedef enum UDateTimeScale { + /** + * Used in the JDK. Data is a Java <code>long</code> (<code>int64_t</code>). Value + * is milliseconds since January 1, 1970. + * + * @stable ICU 3.2 + */ + UDTS_JAVA_TIME = 0, + + /** + * Used on Unix systems. Data is <code>int32_t</code> or <code>int64_t</code>. Value + * is seconds since January 1, 1970. + * + * @stable ICU 3.2 + */ + UDTS_UNIX_TIME, + + /** + * Used in IUC4C. Data is a <code>double</code>. Value + * is milliseconds since January 1, 1970. + * + * @stable ICU 3.2 + */ + UDTS_ICU4C_TIME, + + /** + * Used in Windows for file times. Data is an <code>int64_t</code>. Value + * is ticks (1 tick == 100 nanoseconds) since January 1, 1601. + * + * @stable ICU 3.2 + */ + UDTS_WINDOWS_FILE_TIME, + + /** + * Used in the .NET framework's <code>System.DateTime</code> structure. Data is an <code>int64_t</code>. Value + * is ticks (1 tick == 100 nanoseconds) since January 1, 0001. + * + * @stable ICU 3.2 + */ + UDTS_DOTNET_DATE_TIME, + + /** + * Used in older Macintosh systems. Data is <code>int32_t</code> or <code>int64_t</code>. Value + * is seconds since January 1, 1904. + * + * @stable ICU 3.2 + */ + UDTS_MAC_OLD_TIME, + + /** + * Used in newer Macintosh systems. Data is a <code>double</code>. Value + * is seconds since January 1, 2001. + * + * @stable ICU 3.2 + */ + UDTS_MAC_TIME, + + /** + * Used in Excel. Data is an <code>?unknown?</code>. Value + * is days since December 31, 1899. + * + * @stable ICU 3.2 + */ + UDTS_EXCEL_TIME, + + /** + * Used in DB2. Data is an <code>?unknown?</code>. Value + * is days since December 31, 1899. + * + * @stable ICU 3.2 + */ + UDTS_DB2_TIME, + + /** + * Data is a <code>long</code>. Value is microseconds since January 1, 1970. + * Similar to Unix time (linear value from 1970) and struct timeval + * (microseconds resolution). + * + * @stable ICU 3.8 + */ + UDTS_UNIX_MICROSECONDS_TIME, + +#ifndef U_HIDE_DEPRECATED_API + /** + * The first unused time scale value. The limit of this enum + * @deprecated ICU 59 The numeric value may change over time, see ICU ticket #12420. + */ + UDTS_MAX_SCALE +#endif /* U_HIDE_DEPRECATED_API */ + +} UDateTimeScale; + +/** + * <code>UTimeScaleValue</code> values are used to specify the time scale values + * to <code>utmscale_getTimeScaleValue</code>. + * + * @see utmscale_getTimeScaleValue + * + * @stable ICU 3.2 + */ +typedef enum UTimeScaleValue { + /** + * The constant used to select the units vale + * for a time scale. + * + * @see utmscale_getTimeScaleValue + * + * @stable ICU 3.2 + */ + UTSV_UNITS_VALUE = 0, + + /** + * The constant used to select the epoch offset value + * for a time scale. + * + * @see utmscale_getTimeScaleValue + * + * @stable ICU 3.2 + */ + UTSV_EPOCH_OFFSET_VALUE=1, + + /** + * The constant used to select the minimum from value + * for a time scale. + * + * @see utmscale_getTimeScaleValue + * + * @stable ICU 3.2 + */ + UTSV_FROM_MIN_VALUE=2, + + /** + * The constant used to select the maximum from value + * for a time scale. + * + * @see utmscale_getTimeScaleValue + * + * @stable ICU 3.2 + */ + UTSV_FROM_MAX_VALUE=3, + + /** + * The constant used to select the minimum to value + * for a time scale. + * + * @see utmscale_getTimeScaleValue + * + * @stable ICU 3.2 + */ + UTSV_TO_MIN_VALUE=4, + + /** + * The constant used to select the maximum to value + * for a time scale. + * + * @see utmscale_getTimeScaleValue + * + * @stable ICU 3.2 + */ + UTSV_TO_MAX_VALUE=5, + +#ifndef U_HIDE_INTERNAL_API + /** + * The constant used to select the epoch plus one value + * for a time scale. + * + * NOTE: This is an internal value. DO NOT USE IT. May not + * actually be equal to the epoch offset value plus one. + * + * @see utmscale_getTimeScaleValue + * + * @internal ICU 3.2 + */ + UTSV_EPOCH_OFFSET_PLUS_1_VALUE=6, + + /** + * The constant used to select the epoch plus one value + * for a time scale. + * + * NOTE: This is an internal value. DO NOT USE IT. May not + * actually be equal to the epoch offset value plus one. + * + * @see utmscale_getTimeScaleValue + * + * @internal ICU 3.2 + */ + UTSV_EPOCH_OFFSET_MINUS_1_VALUE=7, + + /** + * The constant used to select the units round value + * for a time scale. + * + * NOTE: This is an internal value. DO NOT USE IT. + * + * @see utmscale_getTimeScaleValue + * + * @internal ICU 3.2 + */ + UTSV_UNITS_ROUND_VALUE=8, + + /** + * The constant used to select the minimum safe rounding value + * for a time scale. + * + * NOTE: This is an internal value. DO NOT USE IT. + * + * @see utmscale_getTimeScaleValue + * + * @internal ICU 3.2 + */ + UTSV_MIN_ROUND_VALUE=9, + + /** + * The constant used to select the maximum safe rounding value + * for a time scale. + * + * NOTE: This is an internal value. DO NOT USE IT. + * + * @see utmscale_getTimeScaleValue + * + * @internal ICU 3.2 + */ + UTSV_MAX_ROUND_VALUE=10, + +#endif /* U_HIDE_INTERNAL_API */ + +#ifndef U_HIDE_DEPRECATED_API + /** + * The number of time scale values, in other words limit of this enum. + * + * @see utmscale_getTimeScaleValue + * @deprecated ICU 59 The numeric value may change over time, see ICU ticket #12420. + */ + UTSV_MAX_SCALE_VALUE=11 +#endif /* U_HIDE_DEPRECATED_API */ + +} UTimeScaleValue; + +/** + * Get a value associated with a particular time scale. + * + * @param timeScale The time scale + * @param value A constant representing the value to get + * @param status The status code. Set to <code>U_ILLEGAL_ARGUMENT_ERROR</code> if arguments are invalid. + * @return - the value. + * + * @stable ICU 3.2 + */ +U_STABLE int64_t U_EXPORT2 + utmscale_getTimeScaleValue(UDateTimeScale timeScale, UTimeScaleValue value, UErrorCode *status); + +/* Conversion to 'universal time scale' */ + +/** + * Convert a <code>int64_t</code> datetime from the given time scale to the universal time scale. + * + * @param otherTime The <code>int64_t</code> datetime + * @param timeScale The time scale to convert from + * @param status The status code. Set to <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the conversion is out of range. + * + * @return The datetime converted to the universal time scale + * + * @stable ICU 3.2 + */ +U_STABLE int64_t U_EXPORT2 + utmscale_fromInt64(int64_t otherTime, UDateTimeScale timeScale, UErrorCode *status); + +/* Conversion from 'universal time scale' */ + +/** + * Convert a datetime from the universal time scale to a <code>int64_t</code> in the given time scale. + * + * @param universalTime The datetime in the universal time scale + * @param timeScale The time scale to convert to + * @param status The status code. Set to <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the conversion is out of range. + * + * @return The datetime converted to the given time scale + * + * @stable ICU 3.2 + */ +U_STABLE int64_t U_EXPORT2 + utmscale_toInt64(int64_t universalTime, UDateTimeScale timeScale, UErrorCode *status); + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif + diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utrace.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utrace.h new file mode 100755 index 00000000..66269784 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utrace.h @@ -0,0 +1,379 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 2003-2013, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: utrace.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2003aug06 +* created by: Markus W. Scherer +* +* Definitions for ICU tracing/logging. +* +*/ + +#ifndef __UTRACE_H__ +#define __UTRACE_H__ + +#include <stdarg.h> +#include "unicode/utypes.h" + +/** + * \file + * \brief C API: Definitions for ICU tracing/logging. + * + * This provides API for debugging the internals of ICU without the use of + * a traditional debugger. + * + * By default, tracing is disabled in ICU. If you need to debug ICU with + * tracing, please compile ICU with the --enable-tracing configure option. + */ + +U_CDECL_BEGIN + +/** + * Trace severity levels. Higher levels increase the verbosity of the trace output. + * @see utrace_setLevel + * @stable ICU 2.8 + */ +typedef enum UTraceLevel { + /** Disable all tracing @stable ICU 2.8*/ + UTRACE_OFF=-1, + /** Trace error conditions only @stable ICU 2.8*/ + UTRACE_ERROR=0, + /** Trace errors and warnings @stable ICU 2.8*/ + UTRACE_WARNING=3, + /** Trace opens and closes of ICU services @stable ICU 2.8*/ + UTRACE_OPEN_CLOSE=5, + /** Trace an intermediate number of ICU operations @stable ICU 2.8*/ + UTRACE_INFO=7, + /** Trace the maximum number of ICU operations @stable ICU 2.8*/ + UTRACE_VERBOSE=9 +} UTraceLevel; + +/** + * These are the ICU functions that will be traced when tracing is enabled. + * @stable ICU 2.8 + */ +typedef enum UTraceFunctionNumber { + UTRACE_FUNCTION_START=0, + UTRACE_U_INIT=UTRACE_FUNCTION_START, + UTRACE_U_CLEANUP, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal collation trace location. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UTRACE_FUNCTION_LIMIT, +#endif // U_HIDE_DEPRECATED_API + + UTRACE_CONVERSION_START=0x1000, + UTRACE_UCNV_OPEN=UTRACE_CONVERSION_START, + UTRACE_UCNV_OPEN_PACKAGE, + UTRACE_UCNV_OPEN_ALGORITHMIC, + UTRACE_UCNV_CLONE, + UTRACE_UCNV_CLOSE, + UTRACE_UCNV_FLUSH_CACHE, + UTRACE_UCNV_LOAD, + UTRACE_UCNV_UNLOAD, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal collation trace location. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UTRACE_CONVERSION_LIMIT, +#endif // U_HIDE_DEPRECATED_API + + UTRACE_COLLATION_START=0x2000, + UTRACE_UCOL_OPEN=UTRACE_COLLATION_START, + UTRACE_UCOL_CLOSE, + UTRACE_UCOL_STRCOLL, + UTRACE_UCOL_GET_SORTKEY, + UTRACE_UCOL_GETLOCALE, + UTRACE_UCOL_NEXTSORTKEYPART, + UTRACE_UCOL_STRCOLLITER, + UTRACE_UCOL_OPEN_FROM_SHORT_STRING, + UTRACE_UCOL_STRCOLLUTF8, /**< @stable ICU 50 */ +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal collation trace location. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + UTRACE_COLLATION_LIMIT +#endif // U_HIDE_DEPRECATED_API +} UTraceFunctionNumber; + +/** + * Setter for the trace level. + * @param traceLevel A UTraceLevel value. + * @stable ICU 2.8 + */ +U_STABLE void U_EXPORT2 +utrace_setLevel(int32_t traceLevel); + +/** + * Getter for the trace level. + * @return The UTraceLevel value being used by ICU. + * @stable ICU 2.8 + */ +U_STABLE int32_t U_EXPORT2 +utrace_getLevel(void); + +/* Trace function pointers types ----------------------------- */ + +/** + * Type signature for the trace function to be called when entering a function. + * @param context value supplied at the time the trace functions are set. + * @param fnNumber Enum value indicating the ICU function being entered. + * @stable ICU 2.8 + */ +typedef void U_CALLCONV +UTraceEntry(const void *context, int32_t fnNumber); + +/** + * Type signature for the trace function to be called when exiting from a function. + * @param context value supplied at the time the trace functions are set. + * @param fnNumber Enum value indicating the ICU function being exited. + * @param fmt A formatting string that describes the number and types + * of arguments included with the variable args. The fmt + * string has the same form as the utrace_vformat format + * string. + * @param args A variable arguments list. Contents are described by + * the fmt parameter. + * @see utrace_vformat + * @stable ICU 2.8 + */ +typedef void U_CALLCONV +UTraceExit(const void *context, int32_t fnNumber, + const char *fmt, va_list args); + +/** + * Type signature for the trace function to be called from within an ICU function + * to display data or messages. + * @param context value supplied at the time the trace functions are set. + * @param fnNumber Enum value indicating the ICU function being exited. + * @param level The current tracing level + * @param fmt A format string describing the tracing data that is supplied + * as variable args + * @param args The data being traced, passed as variable args. + * @stable ICU 2.8 + */ +typedef void U_CALLCONV +UTraceData(const void *context, int32_t fnNumber, int32_t level, + const char *fmt, va_list args); + +/** + * Set ICU Tracing functions. Installs application-provided tracing + * functions into ICU. After doing this, subsequent ICU operations + * will call back to the installed functions, providing a trace + * of the use of ICU. Passing a NULL pointer for a tracing function + * is allowed, and inhibits tracing action at points where that function + * would be called. + * <p> + * Tracing and Threads: Tracing functions are global to a process, and + * will be called in response to ICU operations performed by any + * thread. If tracing of an individual thread is desired, the + * tracing functions must themselves filter by checking that the + * current thread is the desired thread. + * + * @param context an uninterpreted pointer. Whatever is passed in + * here will in turn be passed to each of the tracing + * functions UTraceEntry, UTraceExit and UTraceData. + * ICU does not use or alter this pointer. + * @param e Callback function to be called on entry to a + * a traced ICU function. + * @param x Callback function to be called on exit from a + * traced ICU function. + * @param d Callback function to be called from within a + * traced ICU function, for the purpose of providing + * data to the trace. + * + * @stable ICU 2.8 + */ +U_STABLE void U_EXPORT2 +utrace_setFunctions(const void *context, + UTraceEntry *e, UTraceExit *x, UTraceData *d); + +/** + * Get the currently installed ICU tracing functions. Note that a null function + * pointer will be returned if no trace function has been set. + * + * @param context The currently installed tracing context. + * @param e The currently installed UTraceEntry function. + * @param x The currently installed UTraceExit function. + * @param d The currently installed UTraceData function. + * @stable ICU 2.8 + */ +U_STABLE void U_EXPORT2 +utrace_getFunctions(const void **context, + UTraceEntry **e, UTraceExit **x, UTraceData **d); + + + +/* + * + * ICU trace format string syntax + * + * Format Strings are passed to UTraceData functions, and define the + * number and types of the trace data being passed on each call. + * + * The UTraceData function, which is supplied by the application, + * not by ICU, can either forward the trace data (passed via + * varargs) and the format string back to ICU for formatting into + * a displayable string, or it can interpret the format itself, + * and do as it wishes with the trace data. + * + * + * Goals for the format string + * - basic data output + * - easy to use for trace programmer + * - sufficient provision for data types for trace output readability + * - well-defined types and binary portable APIs + * + * Non-goals + * - printf compatibility + * - fancy formatting + * - argument reordering and other internationalization features + * + * ICU trace format strings contain plain text with argument inserts, + * much like standard printf format strings. + * Each insert begins with a '%', then optionally contains a 'v', + * then exactly one type character. + * Two '%' in a row represent a '%' instead of an insert. + * The trace format strings need not have \n at the end. + * + * + * Types + * ----- + * + * Type characters: + * - c A char character in the default codepage. + * - s A NUL-terminated char * string in the default codepage. + * - S A UChar * string. Requires two params, (ptr, length). Length=-1 for nul term. + * - b A byte (8-bit integer). + * - h A 16-bit integer. Also a 16 bit Unicode code unit. + * - d A 32-bit integer. Also a 20 bit Unicode code point value. + * - l A 64-bit integer. + * - p A data pointer. + * + * Vectors + * ------- + * + * If the 'v' is not specified, then one item of the specified type + * is passed in. + * If the 'v' (for "vector") is specified, then a vector of items of the + * specified type is passed in, via a pointer to the first item + * and an int32_t value for the length of the vector. + * Length==-1 means zero or NUL termination. Works for vectors of all types. + * + * Note: %vS is a vector of (UChar *) strings. The strings must + * be nul terminated as there is no way to provide a + * separate length parameter for each string. The length + * parameter (required for all vectors) is the number of + * strings, not the length of the strings. + * + * Examples + * -------- + * + * These examples show the parameters that will be passed to an application's + * UTraceData() function for various formats. + * + * - the precise formatting is up to the application! + * - the examples use type casts for arguments only to _show_ the types of + * arguments without needing variable declarations in the examples; + * the type casts will not be necessary in actual code + * + * UTraceDataFunc(context, fnNumber, level, + * "There is a character %c in the string %s.", // Format String + * (char)c, (const char *)s); // varargs parameters + * -> There is a character 0x42 'B' in the string "Bravo". + * + * UTraceDataFunc(context, fnNumber, level, + * "Vector of bytes %vb vector of chars %vc", + * (const uint8_t *)bytes, (int32_t)bytesLength, + * (const char *)chars, (int32_t)charsLength); + * -> Vector of bytes + * 42 63 64 3f [4] + * vector of chars + * "Bcd?"[4] + * + * UTraceDataFunc(context, fnNumber, level, + * "An int32_t %d and a whole bunch of them %vd", + * (int32_t)-5, (const int32_t *)ints, (int32_t)intsLength); + * -> An int32_t 0xfffffffb and a whole bunch of them + * fffffffb 00000005 0000010a [3] + * + */ + + + +/** + * Trace output Formatter. An application's UTraceData tracing functions may call + * back to this function to format the trace output in a + * human readable form. Note that a UTraceData function may choose + * to not format the data; it could, for example, save it in + * in the raw form it was received (more compact), leaving + * formatting for a later trace analysis tool. + * @param outBuf pointer to a buffer to receive the formatted output. Output + * will be nul terminated if there is space in the buffer - + * if the length of the requested output < the output buffer size. + * @param capacity Length of the output buffer. + * @param indent Number of spaces to indent the output. Intended to allow + * data displayed from nested functions to be indented for readability. + * @param fmt Format specification for the data to output + * @param args Data to be formatted. + * @return Length of formatted output, including the terminating NUL. + * If buffer capacity is insufficient, the required capacity is returned. + * @stable ICU 2.8 + */ +U_STABLE int32_t U_EXPORT2 +utrace_vformat(char *outBuf, int32_t capacity, + int32_t indent, const char *fmt, va_list args); + +/** + * Trace output Formatter. An application's UTraceData tracing functions may call + * this function to format any additional trace data, beyond that + * provided by default, in human readable form with the same + * formatting conventions used by utrace_vformat(). + * @param outBuf pointer to a buffer to receive the formatted output. Output + * will be nul terminated if there is space in the buffer - + * if the length of the requested output < the output buffer size. + * @param capacity Length of the output buffer. + * @param indent Number of spaces to indent the output. Intended to allow + * data displayed from nested functions to be indented for readability. + * @param fmt Format specification for the data to output + * @param ... Data to be formatted. + * @return Length of formatted output, including the terminating NUL. + * If buffer capacity is insufficient, the required capacity is returned. + * @stable ICU 2.8 + */ +U_STABLE int32_t U_EXPORT2 +utrace_format(char *outBuf, int32_t capacity, + int32_t indent, const char *fmt, ...); + + + +/* Trace function numbers --------------------------------------------------- */ + +/** + * Get the name of a function from its trace function number. + * + * @param fnNumber The trace number for an ICU function. + * @return The name string for the function. + * + * @see UTraceFunctionNumber + * @stable ICU 2.8 + */ +U_STABLE const char * U_EXPORT2 +utrace_functionName(int32_t fnNumber); + +U_CDECL_END + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utrans.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utrans.h new file mode 100755 index 00000000..697681ae --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utrans.h @@ -0,0 +1,658 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 1997-2011,2014-2015 International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************* +* Date Name Description +* 06/21/00 aliu Creation. +******************************************************************************* +*/ + +#ifndef UTRANS_H +#define UTRANS_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_TRANSLITERATION + +#include "unicode/localpointer.h" +#include "unicode/urep.h" +#include "unicode/parseerr.h" +#include "unicode/uenum.h" +#include "unicode/uset.h" + +/******************************************************************** + * General Notes + ******************************************************************** + */ +/** + * \file + * \brief C API: Transliterator + * + * <h2> Transliteration </h2> + * The data structures and functions described in this header provide + * transliteration services. Transliteration services are implemented + * as C++ classes. The comments and documentation in this header + * assume the reader is familiar with the C++ headers translit.h and + * associated documentation. + * + * A significant but incomplete subset of the C++ transliteration + * services are available to C code through this header. In order to + * access more complex transliteration services, refer to the C++ + * headers and documentation. + * + * There are two sets of functions for working with transliterator IDs: + * + * An old, deprecated set uses char * IDs, which works for true and pure + * identifiers that these APIs were designed for, + * for example "Cyrillic-Latin". + * It does not work when the ID contains filters ("[:Script=Cyrl:]") + * or even a complete set of rules because then the ID string contains more + * than just "invariant" characters (see utypes.h). + * + * A new set of functions replaces the old ones and uses UChar * IDs, + * paralleling the UnicodeString IDs in the C++ API. (New in ICU 2.8.) + */ + +/******************************************************************** + * Data Structures + ********************************************************************/ + +/** + * An opaque transliterator for use in C. Open with utrans_openxxx() + * and close with utrans_close() when done. Equivalent to the C++ class + * Transliterator and its subclasses. + * @see Transliterator + * @stable ICU 2.0 + */ +typedef void* UTransliterator; + +/** + * Direction constant indicating the direction in a transliterator, + * e.g., the forward or reverse rules of a RuleBasedTransliterator. + * Specified when a transliterator is opened. An "A-B" transliterator + * transliterates A to B when operating in the forward direction, and + * B to A when operating in the reverse direction. + * @stable ICU 2.0 + */ +typedef enum UTransDirection { + + /** + * UTRANS_FORWARD means from <source> to <target> for a + * transliterator with ID <source>-<target>. For a transliterator + * opened using a rule, it means forward direction rules, e.g., + * "A > B". + */ + UTRANS_FORWARD, + + /** + * UTRANS_REVERSE means from <target> to <source> for a + * transliterator with ID <source>-<target>. For a transliterator + * opened using a rule, it means reverse direction rules, e.g., + * "A < B". + */ + UTRANS_REVERSE + +} UTransDirection; + +/** + * Position structure for utrans_transIncremental() incremental + * transliteration. This structure defines two substrings of the text + * being transliterated. The first region, [contextStart, + * contextLimit), defines what characters the transliterator will read + * as context. The second region, [start, limit), defines what + * characters will actually be transliterated. The second region + * should be a subset of the first. + * + * <p>After a transliteration operation, some of the indices in this + * structure will be modified. See the field descriptions for + * details. + * + * <p>contextStart <= start <= limit <= contextLimit + * + * <p>Note: All index values in this structure must be at code point + * boundaries. That is, none of them may occur between two code units + * of a surrogate pair. If any index does split a surrogate pair, + * results are unspecified. + * + * @stable ICU 2.0 + */ +typedef struct UTransPosition { + + /** + * Beginning index, inclusive, of the context to be considered for + * a transliteration operation. The transliterator will ignore + * anything before this index. INPUT/OUTPUT parameter: This parameter + * is updated by a transliteration operation to reflect the maximum + * amount of antecontext needed by a transliterator. + * @stable ICU 2.4 + */ + int32_t contextStart; + + /** + * Ending index, exclusive, of the context to be considered for a + * transliteration operation. The transliterator will ignore + * anything at or after this index. INPUT/OUTPUT parameter: This + * parameter is updated to reflect changes in the length of the + * text, but points to the same logical position in the text. + * @stable ICU 2.4 + */ + int32_t contextLimit; + + /** + * Beginning index, inclusive, of the text to be transliteratd. + * INPUT/OUTPUT parameter: This parameter is advanced past + * characters that have already been transliterated by a + * transliteration operation. + * @stable ICU 2.4 + */ + int32_t start; + + /** + * Ending index, exclusive, of the text to be transliteratd. + * INPUT/OUTPUT parameter: This parameter is updated to reflect + * changes in the length of the text, but points to the same + * logical position in the text. + * @stable ICU 2.4 + */ + int32_t limit; + +} UTransPosition; + +/******************************************************************** + * General API + ********************************************************************/ + +/** + * Open a custom transliterator, given a custom rules string + * OR + * a system transliterator, given its ID. + * Any non-NULL result from this function should later be closed with + * utrans_close(). + * + * @param id a valid transliterator ID + * @param idLength the length of the ID string, or -1 if NUL-terminated + * @param dir the desired direction + * @param rules the transliterator rules. See the C++ header rbt.h for + * rules syntax. If NULL then a system transliterator matching + * the ID is returned. + * @param rulesLength the length of the rules, or -1 if the rules + * are NUL-terminated. + * @param parseError a pointer to a UParseError struct to receive the details + * of any parsing errors. This parameter may be NULL if no + * parsing error details are desired. + * @param pErrorCode a pointer to the UErrorCode + * @return a transliterator pointer that may be passed to other + * utrans_xxx() functions, or NULL if the open call fails. + * @stable ICU 2.8 + */ +U_STABLE UTransliterator* U_EXPORT2 +utrans_openU(const UChar *id, + int32_t idLength, + UTransDirection dir, + const UChar *rules, + int32_t rulesLength, + UParseError *parseError, + UErrorCode *pErrorCode); + +/** + * Open an inverse of an existing transliterator. For this to work, + * the inverse must be registered with the system. For example, if + * the Transliterator "A-B" is opened, and then its inverse is opened, + * the result is the Transliterator "B-A", if such a transliterator is + * registered with the system. Otherwise the result is NULL and a + * failing UErrorCode is set. Any non-NULL result from this function + * should later be closed with utrans_close(). + * + * @param trans the transliterator to open the inverse of. + * @param status a pointer to the UErrorCode + * @return a pointer to a newly-opened transliterator that is the + * inverse of trans, or NULL if the open call fails. + * @stable ICU 2.0 + */ +U_STABLE UTransliterator* U_EXPORT2 +utrans_openInverse(const UTransliterator* trans, + UErrorCode* status); + +/** + * Create a copy of a transliterator. Any non-NULL result from this + * function should later be closed with utrans_close(). + * + * @param trans the transliterator to be copied. + * @param status a pointer to the UErrorCode + * @return a transliterator pointer that may be passed to other + * utrans_xxx() functions, or NULL if the clone call fails. + * @stable ICU 2.0 + */ +U_STABLE UTransliterator* U_EXPORT2 +utrans_clone(const UTransliterator* trans, + UErrorCode* status); + +/** + * Close a transliterator. Any non-NULL pointer returned by + * utrans_openXxx() or utrans_clone() should eventually be closed. + * @param trans the transliterator to be closed. + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +utrans_close(UTransliterator* trans); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUTransliteratorPointer + * "Smart pointer" class, closes a UTransliterator via utrans_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUTransliteratorPointer, UTransliterator, utrans_close); + +U_NAMESPACE_END + +#endif + +/** + * Return the programmatic identifier for this transliterator. + * If this identifier is passed to utrans_openU(), it will open + * a transliterator equivalent to this one, if the ID has been + * registered. + * + * @param trans the transliterator to return the ID of. + * @param resultLength pointer to an output variable receiving the length + * of the ID string; can be NULL + * @return the NUL-terminated ID string. This pointer remains + * valid until utrans_close() is called on this transliterator. + * + * @stable ICU 2.8 + */ +U_STABLE const UChar * U_EXPORT2 +utrans_getUnicodeID(const UTransliterator *trans, + int32_t *resultLength); + +/** + * Register an open transliterator with the system. When + * utrans_open() is called with an ID string that is equal to that + * returned by utrans_getID(adoptedTrans,...), then + * utrans_clone(adoptedTrans,...) is returned. + * + * <p>NOTE: After this call the system owns the adoptedTrans and will + * close it. The user must not call utrans_close() on adoptedTrans. + * + * @param adoptedTrans a transliterator, typically the result of + * utrans_openRules(), to be registered with the system. + * @param status a pointer to the UErrorCode + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +utrans_register(UTransliterator* adoptedTrans, + UErrorCode* status); + +/** + * Unregister a transliterator from the system. After this call the + * system will no longer recognize the given ID when passed to + * utrans_open(). If the ID is invalid then nothing is done. + * + * @param id an ID to unregister + * @param idLength the length of id, or -1 if id is zero-terminated + * @stable ICU 2.8 + */ +U_STABLE void U_EXPORT2 +utrans_unregisterID(const UChar* id, int32_t idLength); + +/** + * Set the filter used by a transliterator. A filter can be used to + * make the transliterator pass certain characters through untouched. + * The filter is expressed using a UnicodeSet pattern. If the + * filterPattern is NULL or the empty string, then the transliterator + * will be reset to use no filter. + * + * @param trans the transliterator + * @param filterPattern a pattern string, in the form accepted by + * UnicodeSet, specifying which characters to apply the + * transliteration to. May be NULL or the empty string to indicate no + * filter. + * @param filterPatternLen the length of filterPattern, or -1 if + * filterPattern is zero-terminated + * @param status a pointer to the UErrorCode + * @see UnicodeSet + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +utrans_setFilter(UTransliterator* trans, + const UChar* filterPattern, + int32_t filterPatternLen, + UErrorCode* status); + +/** + * Return the number of system transliterators. + * It is recommended to use utrans_openIDs() instead. + * + * @return the number of system transliterators. + * @stable ICU 2.0 + */ +U_STABLE int32_t U_EXPORT2 +utrans_countAvailableIDs(void); + +/** + * Return a UEnumeration for the available transliterators. + * + * @param pErrorCode Pointer to the UErrorCode in/out parameter. + * @return UEnumeration for the available transliterators. + * Close with uenum_close(). + * + * @stable ICU 2.8 + */ +U_STABLE UEnumeration * U_EXPORT2 +utrans_openIDs(UErrorCode *pErrorCode); + +/******************************************************************** + * Transliteration API + ********************************************************************/ + +/** + * Transliterate a segment of a UReplaceable string. The string is + * passed in as a UReplaceable pointer rep and a UReplaceableCallbacks + * function pointer struct repFunc. Functions in the repFunc struct + * will be called in order to modify the rep string. + * + * @param trans the transliterator + * @param rep a pointer to the string. This will be passed to the + * repFunc functions. + * @param repFunc a set of function pointers that will be used to + * modify the string pointed to by rep. + * @param start the beginning index, inclusive; <code>0 <= start <= + * limit</code>. + * @param limit pointer to the ending index, exclusive; <code>start <= + * limit <= repFunc->length(rep)</code>. Upon return, *limit will + * contain the new limit index. The text previously occupying + * <code>[start, limit)</code> has been transliterated, possibly to a + * string of a different length, at <code>[start, + * </code><em>new-limit</em><code>)</code>, where <em>new-limit</em> + * is the return value. + * @param status a pointer to the UErrorCode + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +utrans_trans(const UTransliterator* trans, + UReplaceable* rep, + const UReplaceableCallbacks* repFunc, + int32_t start, + int32_t* limit, + UErrorCode* status); + +/** + * Transliterate the portion of the UReplaceable text buffer that can + * be transliterated unambiguosly. This method is typically called + * after new text has been inserted, e.g. as a result of a keyboard + * event. The transliterator will try to transliterate characters of + * <code>rep</code> between <code>index.cursor</code> and + * <code>index.limit</code>. Characters before + * <code>index.cursor</code> will not be changed. + * + * <p>Upon return, values in <code>index</code> will be updated. + * <code>index.start</code> will be advanced to the first + * character that future calls to this method will read. + * <code>index.cursor</code> and <code>index.limit</code> will + * be adjusted to delimit the range of text that future calls to + * this method may change. + * + * <p>Typical usage of this method begins with an initial call + * with <code>index.start</code> and <code>index.limit</code> + * set to indicate the portion of <code>text</code> to be + * transliterated, and <code>index.cursor == index.start</code>. + * Thereafter, <code>index</code> can be used without + * modification in future calls, provided that all changes to + * <code>text</code> are made via this method. + * + * <p>This method assumes that future calls may be made that will + * insert new text into the buffer. As a result, it only performs + * unambiguous transliterations. After the last call to this method, + * there may be untransliterated text that is waiting for more input + * to resolve an ambiguity. In order to perform these pending + * transliterations, clients should call utrans_trans() with a start + * of index.start and a limit of index.end after the last call to this + * method has been made. + * + * @param trans the transliterator + * @param rep a pointer to the string. This will be passed to the + * repFunc functions. + * @param repFunc a set of function pointers that will be used to + * modify the string pointed to by rep. + * @param pos a struct containing the start and limit indices of the + * text to be read and the text to be transliterated + * @param status a pointer to the UErrorCode + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +utrans_transIncremental(const UTransliterator* trans, + UReplaceable* rep, + const UReplaceableCallbacks* repFunc, + UTransPosition* pos, + UErrorCode* status); + +/** + * Transliterate a segment of a UChar* string. The string is passed + * in in a UChar* buffer. The string is modified in place. If the + * result is longer than textCapacity, it is truncated. The actual + * length of the result is returned in *textLength, if textLength is + * non-NULL. *textLength may be greater than textCapacity, but only + * textCapacity UChars will be written to *text, including the zero + * terminator. + * + * @param trans the transliterator + * @param text a pointer to a buffer containing the text to be + * transliterated on input and the result text on output. + * @param textLength a pointer to the length of the string in text. + * If the length is -1 then the string is assumed to be + * zero-terminated. Upon return, the new length is stored in + * *textLength. If textLength is NULL then the string is assumed to + * be zero-terminated. + * @param textCapacity a pointer to the length of the text buffer. + * Upon return, + * @param start the beginning index, inclusive; <code>0 <= start <= + * limit</code>. + * @param limit pointer to the ending index, exclusive; <code>start <= + * limit <= repFunc->length(rep)</code>. Upon return, *limit will + * contain the new limit index. The text previously occupying + * <code>[start, limit)</code> has been transliterated, possibly to a + * string of a different length, at <code>[start, + * </code><em>new-limit</em><code>)</code>, where <em>new-limit</em> + * is the return value. + * @param status a pointer to the UErrorCode + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +utrans_transUChars(const UTransliterator* trans, + UChar* text, + int32_t* textLength, + int32_t textCapacity, + int32_t start, + int32_t* limit, + UErrorCode* status); + +/** + * Transliterate the portion of the UChar* text buffer that can be + * transliterated unambiguosly. See utrans_transIncremental(). The + * string is passed in in a UChar* buffer. The string is modified in + * place. If the result is longer than textCapacity, it is truncated. + * The actual length of the result is returned in *textLength, if + * textLength is non-NULL. *textLength may be greater than + * textCapacity, but only textCapacity UChars will be written to + * *text, including the zero terminator. See utrans_transIncremental() + * for usage details. + * + * @param trans the transliterator + * @param text a pointer to a buffer containing the text to be + * transliterated on input and the result text on output. + * @param textLength a pointer to the length of the string in text. + * If the length is -1 then the string is assumed to be + * zero-terminated. Upon return, the new length is stored in + * *textLength. If textLength is NULL then the string is assumed to + * be zero-terminated. + * @param textCapacity the length of the text buffer + * @param pos a struct containing the start and limit indices of the + * text to be read and the text to be transliterated + * @param status a pointer to the UErrorCode + * @see utrans_transIncremental + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +utrans_transIncrementalUChars(const UTransliterator* trans, + UChar* text, + int32_t* textLength, + int32_t textCapacity, + UTransPosition* pos, + UErrorCode* status); + +/** + * Create a rule string that can be passed to utrans_openU to recreate this + * transliterator. + * + * @param trans The transliterator + * @param escapeUnprintable if TRUE then convert unprintable characters to their + * hex escape representations, \\uxxxx or \\Uxxxxxxxx. + * Unprintable characters are those other than + * U+000A, U+0020..U+007E. + * @param result A pointer to a buffer to receive the rules. + * @param resultLength The maximum size of result. + * @param status A pointer to the UErrorCode. In case of error status, the + * contents of result are undefined. + * @return int32_t The length of the rule string (may be greater than resultLength, + * in which case an error is returned). + * @stable ICU 53 + */ +U_STABLE int32_t U_EXPORT2 +utrans_toRules( const UTransliterator* trans, + UBool escapeUnprintable, + UChar* result, int32_t resultLength, + UErrorCode* status); + +/** + * Returns the set of all characters that may be modified in the input text by + * this UTransliterator, optionally ignoring the transliterator's current filter. + * @param trans The transliterator. + * @param ignoreFilter If FALSE, the returned set incorporates the + * UTransliterator's current filter; if the filter is changed, + * the return value of this function will change. If TRUE, the + * returned set ignores the effect of the UTransliterator's + * current filter. + * @param fillIn Pointer to a USet object to receive the modifiable characters + * set. Previous contents of fillIn are lost. <em>If fillIn is + * NULL, then a new USet is created and returned. The caller + * owns the result and must dispose of it by calling uset_close.</em> + * @param status A pointer to the UErrorCode. + * @return USet* Either fillIn, or if fillIn is NULL, a pointer to a + * newly-allocated USet that the user must close. In case of + * error, NULL is returned. + * @stable ICU 53 + */ +U_STABLE USet* U_EXPORT2 +utrans_getSourceSet(const UTransliterator* trans, + UBool ignoreFilter, + USet* fillIn, + UErrorCode* status); + +/* deprecated API ----------------------------------------------------------- */ + +#ifndef U_HIDE_DEPRECATED_API + +/* see utrans.h documentation for why these functions are deprecated */ + +/** + * Deprecated, use utrans_openU() instead. + * Open a custom transliterator, given a custom rules string + * OR + * a system transliterator, given its ID. + * Any non-NULL result from this function should later be closed with + * utrans_close(). + * + * @param id a valid ID, as returned by utrans_getAvailableID() + * @param dir the desired direction + * @param rules the transliterator rules. See the C++ header rbt.h + * for rules syntax. If NULL then a system transliterator matching + * the ID is returned. + * @param rulesLength the length of the rules, or -1 if the rules + * are zero-terminated. + * @param parseError a pointer to a UParseError struct to receive the + * details of any parsing errors. This parameter may be NULL if no + * parsing error details are desired. + * @param status a pointer to the UErrorCode + * @return a transliterator pointer that may be passed to other + * utrans_xxx() functions, or NULL if the open call fails. + * @deprecated ICU 2.8 Use utrans_openU() instead, see utrans.h + */ +U_DEPRECATED UTransliterator* U_EXPORT2 +utrans_open(const char* id, + UTransDirection dir, + const UChar* rules, /* may be Null */ + int32_t rulesLength, /* -1 if null-terminated */ + UParseError* parseError, /* may be Null */ + UErrorCode* status); + +/** + * Deprecated, use utrans_getUnicodeID() instead. + * Return the programmatic identifier for this transliterator. + * If this identifier is passed to utrans_open(), it will open + * a transliterator equivalent to this one, if the ID has been + * registered. + * @param trans the transliterator to return the ID of. + * @param buf the buffer in which to receive the ID. This may be + * NULL, in which case no characters are copied. + * @param bufCapacity the capacity of the buffer. Ignored if buf is + * NULL. + * @return the actual length of the ID, not including + * zero-termination. This may be greater than bufCapacity. + * @deprecated ICU 2.8 Use utrans_getUnicodeID() instead, see utrans.h + */ +U_DEPRECATED int32_t U_EXPORT2 +utrans_getID(const UTransliterator* trans, + char* buf, + int32_t bufCapacity); + +/** + * Deprecated, use utrans_unregisterID() instead. + * Unregister a transliterator from the system. After this call the + * system will no longer recognize the given ID when passed to + * utrans_open(). If the id is invalid then nothing is done. + * + * @param id a zero-terminated ID + * @deprecated ICU 2.8 Use utrans_unregisterID() instead, see utrans.h + */ +U_DEPRECATED void U_EXPORT2 +utrans_unregister(const char* id); + +/** + * Deprecated, use utrans_openIDs() instead. + * Return the ID of the index-th system transliterator. The result + * is placed in the given buffer. If the given buffer is too small, + * the initial substring is copied to buf. The result in buf is + * always zero-terminated. + * + * @param index the number of the transliterator to return. Must + * satisfy 0 <= index < utrans_countAvailableIDs(). If index is out + * of range then it is treated as if it were 0. + * @param buf the buffer in which to receive the ID. This may be + * NULL, in which case no characters are copied. + * @param bufCapacity the capacity of the buffer. Ignored if buf is + * NULL. + * @return the actual length of the index-th ID, not including + * zero-termination. This may be greater than bufCapacity. + * @deprecated ICU 2.8 Use utrans_openIDs() instead, see utrans.h + */ +U_DEPRECATED int32_t U_EXPORT2 +utrans_getAvailableID(int32_t index, + char* buf, + int32_t bufCapacity); + +#endif /* U_HIDE_DEPRECATED_API */ + +#endif /* #if !UCONFIG_NO_TRANSLITERATION */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utypes.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utypes.h new file mode 100755 index 00000000..dd89f39a --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/utypes.h @@ -0,0 +1,704 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 1996-2016, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* +* FILE NAME : UTYPES.H (formerly ptypes.h) +* +* Date Name Description +* 12/11/96 helena Creation. +* 02/27/97 aliu Added typedefs for UClassID, int8, int16, int32, +* uint8, uint16, and uint32. +* 04/01/97 aliu Added XP_CPLUSPLUS and modified to work under C as +* well as C++. +* Modified to use memcpy() for uprv_arrayCopy() fns. +* 04/14/97 aliu Added TPlatformUtilities. +* 05/07/97 aliu Added import/export specifiers (replacing the old +* broken EXT_CLASS). Added version number for our +* code. Cleaned up header. +* 6/20/97 helena Java class name change. +* 08/11/98 stephen UErrorCode changed from typedef to enum +* 08/12/98 erm Changed T_ANALYTIC_PACKAGE_VERSION to 3 +* 08/14/98 stephen Added uprv_arrayCopy() for int8_t, int16_t, int32_t +* 12/09/98 jfitz Added BUFFER_OVERFLOW_ERROR (bug 1100066) +* 04/20/99 stephen Cleaned up & reworked for autoconf. +* Renamed to utypes.h. +* 05/05/99 stephen Changed to use <inttypes.h> +* 12/07/99 helena Moved copyright notice string from ucnv_bld.h here. +******************************************************************************* +*/ + +#ifndef UTYPES_H +#define UTYPES_H + + +#include "unicode/umachine.h" +#include "unicode/uversion.h" +#include "unicode/uconfig.h" +#include <float.h> + +#if !U_NO_DEFAULT_INCLUDE_UTF_HEADERS +# include "unicode/utf.h" +#endif + +/*! + * \file + * \brief Basic definitions for ICU, for both C and C++ APIs + * + * This file defines basic types, constants, and enumerations directly or + * indirectly by including other header files, especially utf.h for the + * basic character and string definitions and umachine.h for consistent + * integer and other types. + */ + + +/** + * \def U_SHOW_CPLUSPLUS_API + * @internal + */ +#ifdef __cplusplus +# ifndef U_SHOW_CPLUSPLUS_API +# define U_SHOW_CPLUSPLUS_API 1 +# endif +#else +# undef U_SHOW_CPLUSPLUS_API +# define U_SHOW_CPLUSPLUS_API 0 +#endif + +/** @{ API visibility control */ + +/** + * \def U_HIDE_DRAFT_API + * Define this to 1 to request that draft API be "hidden" + * @internal + */ +/** + * \def U_HIDE_INTERNAL_API + * Define this to 1 to request that internal API be "hidden" + * @internal + */ +#if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_DRAFT_API) +#define U_HIDE_DRAFT_API 1 +#endif +#if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_INTERNAL_API) +#define U_HIDE_INTERNAL_API 1 +#endif + +/** @} */ + +/*===========================================================================*/ +/* ICUDATA naming scheme */ +/*===========================================================================*/ + +/** + * \def U_ICUDATA_TYPE_LETTER + * + * This is a platform-dependent string containing one letter: + * - b for big-endian, ASCII-family platforms + * - l for little-endian, ASCII-family platforms + * - e for big-endian, EBCDIC-family platforms + * This letter is part of the common data file name. + * @stable ICU 2.0 + */ + +/** + * \def U_ICUDATA_TYPE_LITLETTER + * The non-string form of U_ICUDATA_TYPE_LETTER + * @stable ICU 2.0 + */ +#if U_CHARSET_FAMILY +# if U_IS_BIG_ENDIAN + /* EBCDIC - should always be BE */ +# define U_ICUDATA_TYPE_LETTER "e" +# define U_ICUDATA_TYPE_LITLETTER e +# else +# error "Don't know what to do with little endian EBCDIC!" +# define U_ICUDATA_TYPE_LETTER "x" +# define U_ICUDATA_TYPE_LITLETTER x +# endif +#else +# if U_IS_BIG_ENDIAN + /* Big-endian ASCII */ +# define U_ICUDATA_TYPE_LETTER "b" +# define U_ICUDATA_TYPE_LITLETTER b +# else + /* Little-endian ASCII */ +# define U_ICUDATA_TYPE_LETTER "l" +# define U_ICUDATA_TYPE_LITLETTER l +# endif +#endif + +/** + * A single string literal containing the icudata stub name. i.e. 'icudt18e' for + * ICU 1.8.x on EBCDIC, etc.. + * @stable ICU 2.0 + */ +#define U_ICUDATA_NAME "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER +#ifndef U_HIDE_INTERNAL_API +#define U_USRDATA_NAME "usrdt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER /**< @internal */ +#define U_USE_USRDATA 0 /**< @internal */ +#endif /* U_HIDE_INTERNAL_API */ + +/** + * U_ICU_ENTRY_POINT is the name of the DLL entry point to the ICU data library. + * Defined as a literal, not a string. + * Tricky Preprocessor use - ## operator replaces macro parameters with the literal string + * from the corresponding macro invocation, _before_ other macro substitutions. + * Need a nested \#defines to get the actual version numbers rather than + * the literal text U_ICU_VERSION_MAJOR_NUM into the name. + * The net result will be something of the form + * \#define U_ICU_ENTRY_POINT icudt19_dat + * @stable ICU 2.4 + */ +#define U_ICUDATA_ENTRY_POINT U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJOR_NUM,U_LIB_SUFFIX_C_NAME) + +#ifndef U_HIDE_INTERNAL_API +/** + * Do not use. Note that it's OK for the 2nd argument to be undefined (literal). + * @internal + */ +#define U_DEF2_ICUDATA_ENTRY_POINT(major,suff) U_DEF_ICUDATA_ENTRY_POINT(major,suff) + +/** + * Do not use. + * @internal + */ +#ifndef U_DEF_ICUDATA_ENTRY_POINT +/* affected by symbol renaming. See platform.h */ +#ifndef U_LIB_SUFFIX_C_NAME +#define U_DEF_ICUDATA_ENTRY_POINT(major, suff) icudt##major##_dat +#else +#define U_DEF_ICUDATA_ENTRY_POINT(major, suff) icudt##suff ## major##_dat +#endif +#endif +#endif /* U_HIDE_INTERNAL_API */ + +/** + * \def NULL + * Define NULL if necessary, to nullptr for C++ and to ((void *)0) for C. + * @stable ICU 2.0 + */ +#ifndef NULL +#ifdef __cplusplus +#define NULL nullptr +#else +#define NULL ((void *)0) +#endif +#endif + +/*===========================================================================*/ +/* Calendar/TimeZone data types */ +/*===========================================================================*/ + +/** + * Date and Time data type. + * This is a primitive data type that holds the date and time + * as the number of milliseconds since 1970-jan-01, 00:00 UTC. + * UTC leap seconds are ignored. + * @stable ICU 2.0 + */ +typedef double UDate; + +/** The number of milliseconds per second @stable ICU 2.0 */ +#define U_MILLIS_PER_SECOND (1000) +/** The number of milliseconds per minute @stable ICU 2.0 */ +#define U_MILLIS_PER_MINUTE (60000) +/** The number of milliseconds per hour @stable ICU 2.0 */ +#define U_MILLIS_PER_HOUR (3600000) +/** The number of milliseconds per day @stable ICU 2.0 */ +#define U_MILLIS_PER_DAY (86400000) + +/** + * Maximum UDate value + * @stable ICU 4.8 + */ +#define U_DATE_MAX DBL_MAX + +/** + * Minimum UDate value + * @stable ICU 4.8 + */ +#define U_DATE_MIN -U_DATE_MAX + +/*===========================================================================*/ +/* Shared library/DLL import-export API control */ +/*===========================================================================*/ + +/* + * Control of symbol import/export. + * ICU is separated into three libraries. + */ + +/** + * \def U_COMBINED_IMPLEMENTATION + * Set to export library symbols from inside the ICU library + * when all of ICU is in a single library. + * This can be set as a compiler option while building ICU, and it + * needs to be the first one tested to override U_COMMON_API, U_I18N_API, etc. + * @stable ICU 2.0 + */ + +/** + * \def U_DATA_API + * Set to export library symbols from inside the stubdata library, + * and to import them from outside. + * @stable ICU 3.0 + */ + +/** + * \def U_COMMON_API + * Set to export library symbols from inside the common library, + * and to import them from outside. + * @stable ICU 2.0 + */ + +/** + * \def U_I18N_API + * Set to export library symbols from inside the i18n library, + * and to import them from outside. + * @stable ICU 2.0 + */ + +/** + * \def U_LAYOUT_API + * Set to export library symbols from inside the layout engine library, + * and to import them from outside. + * @stable ICU 2.0 + */ + +/** + * \def U_LAYOUTEX_API + * Set to export library symbols from inside the layout extensions library, + * and to import them from outside. + * @stable ICU 2.6 + */ + +/** + * \def U_IO_API + * Set to export library symbols from inside the ustdio library, + * and to import them from outside. + * @stable ICU 2.0 + */ + +/** + * \def U_TOOLUTIL_API + * Set to export library symbols from inside the toolutil library, + * and to import them from outside. + * @stable ICU 3.4 + */ + +#if defined(U_COMBINED_IMPLEMENTATION) +#define U_DATA_API U_EXPORT +#define U_COMMON_API U_EXPORT +#define U_I18N_API U_EXPORT +#define U_LAYOUT_API U_EXPORT +#define U_LAYOUTEX_API U_EXPORT +#define U_IO_API U_EXPORT +#define U_TOOLUTIL_API U_EXPORT +#elif defined(U_STATIC_IMPLEMENTATION) +#define U_DATA_API +#define U_COMMON_API +#define U_I18N_API +#define U_LAYOUT_API +#define U_LAYOUTEX_API +#define U_IO_API +#define U_TOOLUTIL_API +#elif defined(U_COMMON_IMPLEMENTATION) +#define U_DATA_API U_IMPORT +#define U_COMMON_API U_EXPORT +#define U_I18N_API U_IMPORT +#define U_LAYOUT_API U_IMPORT +#define U_LAYOUTEX_API U_IMPORT +#define U_IO_API U_IMPORT +#define U_TOOLUTIL_API U_IMPORT +#elif defined(U_I18N_IMPLEMENTATION) +#define U_DATA_API U_IMPORT +#define U_COMMON_API U_IMPORT +#define U_I18N_API U_EXPORT +#define U_LAYOUT_API U_IMPORT +#define U_LAYOUTEX_API U_IMPORT +#define U_IO_API U_IMPORT +#define U_TOOLUTIL_API U_IMPORT +#elif defined(U_LAYOUT_IMPLEMENTATION) +#define U_DATA_API U_IMPORT +#define U_COMMON_API U_IMPORT +#define U_I18N_API U_IMPORT +#define U_LAYOUT_API U_EXPORT +#define U_LAYOUTEX_API U_IMPORT +#define U_IO_API U_IMPORT +#define U_TOOLUTIL_API U_IMPORT +#elif defined(U_LAYOUTEX_IMPLEMENTATION) +#define U_DATA_API U_IMPORT +#define U_COMMON_API U_IMPORT +#define U_I18N_API U_IMPORT +#define U_LAYOUT_API U_IMPORT +#define U_LAYOUTEX_API U_EXPORT +#define U_IO_API U_IMPORT +#define U_TOOLUTIL_API U_IMPORT +#elif defined(U_IO_IMPLEMENTATION) +#define U_DATA_API U_IMPORT +#define U_COMMON_API U_IMPORT +#define U_I18N_API U_IMPORT +#define U_LAYOUT_API U_IMPORT +#define U_LAYOUTEX_API U_IMPORT +#define U_IO_API U_EXPORT +#define U_TOOLUTIL_API U_IMPORT +#elif defined(U_TOOLUTIL_IMPLEMENTATION) +#define U_DATA_API U_IMPORT +#define U_COMMON_API U_IMPORT +#define U_I18N_API U_IMPORT +#define U_LAYOUT_API U_IMPORT +#define U_LAYOUTEX_API U_IMPORT +#define U_IO_API U_IMPORT +#define U_TOOLUTIL_API U_EXPORT +#else +#define U_DATA_API U_IMPORT +#define U_COMMON_API U_IMPORT +#define U_I18N_API U_IMPORT +#define U_LAYOUT_API U_IMPORT +#define U_LAYOUTEX_API U_IMPORT +#define U_IO_API U_IMPORT +#define U_TOOLUTIL_API U_IMPORT +#endif + +/** + * \def U_STANDARD_CPP_NAMESPACE + * Control of C++ Namespace + * @stable ICU 2.0 + */ +#ifdef __cplusplus +#define U_STANDARD_CPP_NAMESPACE :: +#else +#define U_STANDARD_CPP_NAMESPACE +#endif + +/*===========================================================================*/ +/* UErrorCode */ +/*===========================================================================*/ + +/** + * Error code to replace exception handling, so that the code is compatible with all C++ compilers, + * and to use the same mechanism for C and C++. + * + * \par + * ICU functions that take a reference (C++) or a pointer (C) to a UErrorCode + * first test if(U_FAILURE(errorCode)) { return immediately; } + * so that in a chain of such functions the first one that sets an error code + * causes the following ones to not perform any operations. + * + * \par + * Error codes should be tested using U_FAILURE() and U_SUCCESS(). + * @stable ICU 2.0 + */ +typedef enum UErrorCode { + /* The ordering of U_ERROR_INFO_START Vs U_USING_FALLBACK_WARNING looks weird + * and is that way because VC++ debugger displays first encountered constant, + * which is not the what the code is used for + */ + + U_USING_FALLBACK_WARNING = -128, /**< A resource bundle lookup returned a fallback result (not an error) */ + + U_ERROR_WARNING_START = -128, /**< Start of information results (semantically successful) */ + + U_USING_DEFAULT_WARNING = -127, /**< A resource bundle lookup returned a result from the root locale (not an error) */ + + U_SAFECLONE_ALLOCATED_WARNING = -126, /**< A SafeClone operation required allocating memory (informational only) */ + + U_STATE_OLD_WARNING = -125, /**< ICU has to use compatibility layer to construct the service. Expect performance/memory usage degradation. Consider upgrading */ + + U_STRING_NOT_TERMINATED_WARNING = -124,/**< An output string could not be NUL-terminated because output length==destCapacity. */ + + U_SORT_KEY_TOO_SHORT_WARNING = -123, /**< Number of levels requested in getBound is higher than the number of levels in the sort key */ + + U_AMBIGUOUS_ALIAS_WARNING = -122, /**< This converter alias can go to different converter implementations */ + + U_DIFFERENT_UCA_VERSION = -121, /**< ucol_open encountered a mismatch between UCA version and collator image version, so the collator was constructed from rules. No impact to further function */ + + U_PLUGIN_CHANGED_LEVEL_WARNING = -120, /**< A plugin caused a level change. May not be an error, but later plugins may not load. */ + +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal UErrorCode warning value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_ERROR_WARNING_LIMIT, +#endif // U_HIDE_DEPRECATED_API + + U_ZERO_ERROR = 0, /**< No error, no warning. */ + + U_ILLEGAL_ARGUMENT_ERROR = 1, /**< Start of codes indicating failure */ + U_MISSING_RESOURCE_ERROR = 2, /**< The requested resource cannot be found */ + U_INVALID_FORMAT_ERROR = 3, /**< Data format is not what is expected */ + U_FILE_ACCESS_ERROR = 4, /**< The requested file cannot be found */ + U_INTERNAL_PROGRAM_ERROR = 5, /**< Indicates a bug in the library code */ + U_MESSAGE_PARSE_ERROR = 6, /**< Unable to parse a message (message format) */ + U_MEMORY_ALLOCATION_ERROR = 7, /**< Memory allocation error */ + U_INDEX_OUTOFBOUNDS_ERROR = 8, /**< Trying to access the index that is out of bounds */ + U_PARSE_ERROR = 9, /**< Equivalent to Java ParseException */ + U_INVALID_CHAR_FOUND = 10, /**< Character conversion: Unmappable input sequence. In other APIs: Invalid character. */ + U_TRUNCATED_CHAR_FOUND = 11, /**< Character conversion: Incomplete input sequence. */ + U_ILLEGAL_CHAR_FOUND = 12, /**< Character conversion: Illegal input sequence/combination of input units. */ + U_INVALID_TABLE_FORMAT = 13, /**< Conversion table file found, but corrupted */ + U_INVALID_TABLE_FILE = 14, /**< Conversion table file not found */ + U_BUFFER_OVERFLOW_ERROR = 15, /**< A result would not fit in the supplied buffer */ + U_UNSUPPORTED_ERROR = 16, /**< Requested operation not supported in current context */ + U_RESOURCE_TYPE_MISMATCH = 17, /**< an operation is requested over a resource that does not support it */ + U_ILLEGAL_ESCAPE_SEQUENCE = 18, /**< ISO-2022 illegal escape sequence */ + U_UNSUPPORTED_ESCAPE_SEQUENCE = 19, /**< ISO-2022 unsupported escape sequence */ + U_NO_SPACE_AVAILABLE = 20, /**< No space available for in-buffer expansion for Arabic shaping */ + U_CE_NOT_FOUND_ERROR = 21, /**< Currently used only while setting variable top, but can be used generally */ + U_PRIMARY_TOO_LONG_ERROR = 22, /**< User tried to set variable top to a primary that is longer than two bytes */ + U_STATE_TOO_OLD_ERROR = 23, /**< ICU cannot construct a service from this state, as it is no longer supported */ + U_TOO_MANY_ALIASES_ERROR = 24, /**< There are too many aliases in the path to the requested resource. + It is very possible that a circular alias definition has occurred */ + U_ENUM_OUT_OF_SYNC_ERROR = 25, /**< UEnumeration out of sync with underlying collection */ + U_INVARIANT_CONVERSION_ERROR = 26, /**< Unable to convert a UChar* string to char* with the invariant converter. */ + U_INVALID_STATE_ERROR = 27, /**< Requested operation can not be completed with ICU in its current state */ + U_COLLATOR_VERSION_MISMATCH = 28, /**< Collator version is not compatible with the base version */ + U_USELESS_COLLATOR_ERROR = 29, /**< Collator is options only and no base is specified */ + U_NO_WRITE_PERMISSION = 30, /**< Attempt to modify read-only or constant data. */ + +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest standard error code. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_STANDARD_ERROR_LIMIT, +#endif // U_HIDE_DEPRECATED_API + + /* + * Error codes in the range 0x10000 0x10100 are reserved for Transliterator. + */ + U_BAD_VARIABLE_DEFINITION=0x10000,/**< Missing '$' or duplicate variable name */ + U_PARSE_ERROR_START = 0x10000, /**< Start of Transliterator errors */ + U_MALFORMED_RULE, /**< Elements of a rule are misplaced */ + U_MALFORMED_SET, /**< A UnicodeSet pattern is invalid*/ + U_MALFORMED_SYMBOL_REFERENCE, /**< UNUSED as of ICU 2.4 */ + U_MALFORMED_UNICODE_ESCAPE, /**< A Unicode escape pattern is invalid*/ + U_MALFORMED_VARIABLE_DEFINITION, /**< A variable definition is invalid */ + U_MALFORMED_VARIABLE_REFERENCE, /**< A variable reference is invalid */ + U_MISMATCHED_SEGMENT_DELIMITERS, /**< UNUSED as of ICU 2.4 */ + U_MISPLACED_ANCHOR_START, /**< A start anchor appears at an illegal position */ + U_MISPLACED_CURSOR_OFFSET, /**< A cursor offset occurs at an illegal position */ + U_MISPLACED_QUANTIFIER, /**< A quantifier appears after a segment close delimiter */ + U_MISSING_OPERATOR, /**< A rule contains no operator */ + U_MISSING_SEGMENT_CLOSE, /**< UNUSED as of ICU 2.4 */ + U_MULTIPLE_ANTE_CONTEXTS, /**< More than one ante context */ + U_MULTIPLE_CURSORS, /**< More than one cursor */ + U_MULTIPLE_POST_CONTEXTS, /**< More than one post context */ + U_TRAILING_BACKSLASH, /**< A dangling backslash */ + U_UNDEFINED_SEGMENT_REFERENCE, /**< A segment reference does not correspond to a defined segment */ + U_UNDEFINED_VARIABLE, /**< A variable reference does not correspond to a defined variable */ + U_UNQUOTED_SPECIAL, /**< A special character was not quoted or escaped */ + U_UNTERMINATED_QUOTE, /**< A closing single quote is missing */ + U_RULE_MASK_ERROR, /**< A rule is hidden by an earlier more general rule */ + U_MISPLACED_COMPOUND_FILTER, /**< A compound filter is in an invalid location */ + U_MULTIPLE_COMPOUND_FILTERS, /**< More than one compound filter */ + U_INVALID_RBT_SYNTAX, /**< A "::id" rule was passed to the RuleBasedTransliterator parser */ + U_INVALID_PROPERTY_PATTERN, /**< UNUSED as of ICU 2.4 */ + U_MALFORMED_PRAGMA, /**< A 'use' pragma is invalid */ + U_UNCLOSED_SEGMENT, /**< A closing ')' is missing */ + U_ILLEGAL_CHAR_IN_SEGMENT, /**< UNUSED as of ICU 2.4 */ + U_VARIABLE_RANGE_EXHAUSTED, /**< Too many stand-ins generated for the given variable range */ + U_VARIABLE_RANGE_OVERLAP, /**< The variable range overlaps characters used in rules */ + U_ILLEGAL_CHARACTER, /**< A special character is outside its allowed context */ + U_INTERNAL_TRANSLITERATOR_ERROR, /**< Internal transliterator system error */ + U_INVALID_ID, /**< A "::id" rule specifies an unknown transliterator */ + U_INVALID_FUNCTION, /**< A "&fn()" rule specifies an unknown transliterator */ +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal Transliterator error code. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_PARSE_ERROR_LIMIT, +#endif // U_HIDE_DEPRECATED_API + + /* + * Error codes in the range 0x10100 0x10200 are reserved for the formatting API. + */ + U_UNEXPECTED_TOKEN=0x10100, /**< Syntax error in format pattern */ + U_FMT_PARSE_ERROR_START=0x10100, /**< Start of format library errors */ + U_MULTIPLE_DECIMAL_SEPARATORS, /**< More than one decimal separator in number pattern */ + U_MULTIPLE_DECIMAL_SEPERATORS = U_MULTIPLE_DECIMAL_SEPARATORS, /**< Typo: kept for backward compatibility. Use U_MULTIPLE_DECIMAL_SEPARATORS */ + U_MULTIPLE_EXPONENTIAL_SYMBOLS, /**< More than one exponent symbol in number pattern */ + U_MALFORMED_EXPONENTIAL_PATTERN, /**< Grouping symbol in exponent pattern */ + U_MULTIPLE_PERCENT_SYMBOLS, /**< More than one percent symbol in number pattern */ + U_MULTIPLE_PERMILL_SYMBOLS, /**< More than one permill symbol in number pattern */ + U_MULTIPLE_PAD_SPECIFIERS, /**< More than one pad symbol in number pattern */ + U_PATTERN_SYNTAX_ERROR, /**< Syntax error in format pattern */ + U_ILLEGAL_PAD_POSITION, /**< Pad symbol misplaced in number pattern */ + U_UNMATCHED_BRACES, /**< Braces do not match in message pattern */ + U_UNSUPPORTED_PROPERTY, /**< UNUSED as of ICU 2.4 */ + U_UNSUPPORTED_ATTRIBUTE, /**< UNUSED as of ICU 2.4 */ + U_ARGUMENT_TYPE_MISMATCH, /**< Argument name and argument index mismatch in MessageFormat functions */ + U_DUPLICATE_KEYWORD, /**< Duplicate keyword in PluralFormat */ + U_UNDEFINED_KEYWORD, /**< Undefined Plural keyword */ + U_DEFAULT_KEYWORD_MISSING, /**< Missing DEFAULT rule in plural rules */ + U_DECIMAL_NUMBER_SYNTAX_ERROR, /**< Decimal number syntax error */ + U_FORMAT_INEXACT_ERROR, /**< Cannot format a number exactly and rounding mode is ROUND_UNNECESSARY @stable ICU 4.8 */ +#ifndef U_HIDE_DRAFT_API + U_NUMBER_ARG_OUTOFBOUNDS_ERROR, /**< The argument to a NumberFormatter helper method was out of bounds; the bounds are usually 0 to 999. @draft ICU 61 */ +#endif // U_HIDE_DRAFT_API +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal formatting API error code. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_FMT_PARSE_ERROR_LIMIT = 0x10113, +#endif // U_HIDE_DEPRECATED_API + + /* + * Error codes in the range 0x10200 0x102ff are reserved for BreakIterator. + */ + U_BRK_INTERNAL_ERROR=0x10200, /**< An internal error (bug) was detected. */ + U_BRK_ERROR_START=0x10200, /**< Start of codes indicating Break Iterator failures */ + U_BRK_HEX_DIGITS_EXPECTED, /**< Hex digits expected as part of a escaped char in a rule. */ + U_BRK_SEMICOLON_EXPECTED, /**< Missing ';' at the end of a RBBI rule. */ + U_BRK_RULE_SYNTAX, /**< Syntax error in RBBI rule. */ + U_BRK_UNCLOSED_SET, /**< UnicodeSet writing an RBBI rule missing a closing ']'. */ + U_BRK_ASSIGN_ERROR, /**< Syntax error in RBBI rule assignment statement. */ + U_BRK_VARIABLE_REDFINITION, /**< RBBI rule $Variable redefined. */ + U_BRK_MISMATCHED_PAREN, /**< Mis-matched parentheses in an RBBI rule. */ + U_BRK_NEW_LINE_IN_QUOTED_STRING, /**< Missing closing quote in an RBBI rule. */ + U_BRK_UNDEFINED_VARIABLE, /**< Use of an undefined $Variable in an RBBI rule. */ + U_BRK_INIT_ERROR, /**< Initialization failure. Probable missing ICU Data. */ + U_BRK_RULE_EMPTY_SET, /**< Rule contains an empty Unicode Set. */ + U_BRK_UNRECOGNIZED_OPTION, /**< !!option in RBBI rules not recognized. */ + U_BRK_MALFORMED_RULE_TAG, /**< The {nnn} tag on a rule is malformed */ +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal BreakIterator error code. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_BRK_ERROR_LIMIT, +#endif // U_HIDE_DEPRECATED_API + + /* + * Error codes in the range 0x10300-0x103ff are reserved for regular expression related errors. + */ + U_REGEX_INTERNAL_ERROR=0x10300, /**< An internal error (bug) was detected. */ + U_REGEX_ERROR_START=0x10300, /**< Start of codes indicating Regexp failures */ + U_REGEX_RULE_SYNTAX, /**< Syntax error in regexp pattern. */ + U_REGEX_INVALID_STATE, /**< RegexMatcher in invalid state for requested operation */ + U_REGEX_BAD_ESCAPE_SEQUENCE, /**< Unrecognized backslash escape sequence in pattern */ + U_REGEX_PROPERTY_SYNTAX, /**< Incorrect Unicode property */ + U_REGEX_UNIMPLEMENTED, /**< Use of regexp feature that is not yet implemented. */ + U_REGEX_MISMATCHED_PAREN, /**< Incorrectly nested parentheses in regexp pattern. */ + U_REGEX_NUMBER_TOO_BIG, /**< Decimal number is too large. */ + U_REGEX_BAD_INTERVAL, /**< Error in {min,max} interval */ + U_REGEX_MAX_LT_MIN, /**< In {min,max}, max is less than min. */ + U_REGEX_INVALID_BACK_REF, /**< Back-reference to a non-existent capture group. */ + U_REGEX_INVALID_FLAG, /**< Invalid value for match mode flags. */ + U_REGEX_LOOK_BEHIND_LIMIT, /**< Look-Behind pattern matches must have a bounded maximum length. */ + U_REGEX_SET_CONTAINS_STRING, /**< Regexps cannot have UnicodeSets containing strings.*/ +#ifndef U_HIDE_DEPRECATED_API + U_REGEX_OCTAL_TOO_BIG, /**< Octal character constants must be <= 0377. @deprecated ICU 54. This error cannot occur. */ +#endif /* U_HIDE_DEPRECATED_API */ + U_REGEX_MISSING_CLOSE_BRACKET=U_REGEX_SET_CONTAINS_STRING+2, /**< Missing closing bracket on a bracket expression. */ + U_REGEX_INVALID_RANGE, /**< In a character range [x-y], x is greater than y. */ + U_REGEX_STACK_OVERFLOW, /**< Regular expression backtrack stack overflow. */ + U_REGEX_TIME_OUT, /**< Maximum allowed match time exceeded */ + U_REGEX_STOPPED_BY_CALLER, /**< Matching operation aborted by user callback fn. */ + U_REGEX_PATTERN_TOO_BIG, /**< Pattern exceeds limits on size or complexity. @stable ICU 55 */ + U_REGEX_INVALID_CAPTURE_GROUP_NAME, /**< Invalid capture group name. @stable ICU 55 */ +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal regular expression error code. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_REGEX_ERROR_LIMIT=U_REGEX_STOPPED_BY_CALLER+3, +#endif // U_HIDE_DEPRECATED_API + + /* + * Error codes in the range 0x10400-0x104ff are reserved for IDNA related error codes. + */ + U_IDNA_PROHIBITED_ERROR=0x10400, + U_IDNA_ERROR_START=0x10400, + U_IDNA_UNASSIGNED_ERROR, + U_IDNA_CHECK_BIDI_ERROR, + U_IDNA_STD3_ASCII_RULES_ERROR, + U_IDNA_ACE_PREFIX_ERROR, + U_IDNA_VERIFICATION_ERROR, + U_IDNA_LABEL_TOO_LONG_ERROR, + U_IDNA_ZERO_LENGTH_LABEL_ERROR, + U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal IDNA error code. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_IDNA_ERROR_LIMIT, +#endif // U_HIDE_DEPRECATED_API + /* + * Aliases for StringPrep + */ + U_STRINGPREP_PROHIBITED_ERROR = U_IDNA_PROHIBITED_ERROR, + U_STRINGPREP_UNASSIGNED_ERROR = U_IDNA_UNASSIGNED_ERROR, + U_STRINGPREP_CHECK_BIDI_ERROR = U_IDNA_CHECK_BIDI_ERROR, + + /* + * Error codes in the range 0x10500-0x105ff are reserved for Plugin related error codes. + */ + U_PLUGIN_ERROR_START=0x10500, /**< Start of codes indicating plugin failures */ + U_PLUGIN_TOO_HIGH=0x10500, /**< The plugin's level is too high to be loaded right now. */ + U_PLUGIN_DIDNT_SET_LEVEL, /**< The plugin didn't call uplug_setPlugLevel in response to a QUERY */ +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal plug-in error code. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_PLUGIN_ERROR_LIMIT, +#endif // U_HIDE_DEPRECATED_API + +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal error code. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + U_ERROR_LIMIT=U_PLUGIN_ERROR_LIMIT +#endif // U_HIDE_DEPRECATED_API +} UErrorCode; + +/* Use the following to determine if an UErrorCode represents */ +/* operational success or failure. */ + +#ifdef __cplusplus + /** + * Does the error code indicate success? + * @stable ICU 2.0 + */ + static + inline UBool U_SUCCESS(UErrorCode code) { return (UBool)(code<=U_ZERO_ERROR); } + /** + * Does the error code indicate a failure? + * @stable ICU 2.0 + */ + static + inline UBool U_FAILURE(UErrorCode code) { return (UBool)(code>U_ZERO_ERROR); } +#else + /** + * Does the error code indicate success? + * @stable ICU 2.0 + */ +# define U_SUCCESS(x) ((x)<=U_ZERO_ERROR) + /** + * Does the error code indicate a failure? + * @stable ICU 2.0 + */ +# define U_FAILURE(x) ((x)>U_ZERO_ERROR) +#endif + +/** + * Return a string for a UErrorCode value. + * The string will be the same as the name of the error code constant + * in the UErrorCode enum above. + * @stable ICU 2.0 + */ +U_STABLE const char * U_EXPORT2 +u_errorName(UErrorCode code); + + +#endif /* _UTYPES */ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uvernum.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uvernum.h new file mode 100755 index 00000000..0427bcb0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uvernum.h @@ -0,0 +1,178 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2000-2016, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************* +* +* file name: uvernum.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* Created by: Vladimir Weinstein +* Updated by: Steven R. Loomis +* +*/ + +/** + * \file + * \brief C API: definitions of ICU version numbers + * + * This file is included by uversion.h and other files. This file contains only + * macros and definitions. The actual version numbers are defined here. + */ + + /* + * IMPORTANT: When updating version, the following things need to be done: + * source/common/unicode/uvernum.h - this file: update major, minor, + * patchlevel, suffix, version, short version constants, namespace, + * renaming macro, and copyright + * + * The following files need to be updated as well, which can be done + * by running the UNIX makefile target 'update-windows-makefiles' in icu/source. + * + * + * source/common/common.vcxproj - update 'Output file name' on the link tab so + * that it contains the new major/minor combination + * source/i18n/i18n.vcxproj - same as for the common.vcxproj + * source/layoutex/layoutex.vcproj - same + * source/stubdata/stubdata.vcproj - same as for the common.vcxproj + * source/io/io.vcproj - same as for the common.vcxproj + * source/data/makedata.mak - change U_ICUDATA_NAME so that it contains + * the new major/minor combination and the Unicode version. + */ + +#ifndef UVERNUM_H +#define UVERNUM_H + +/** The standard copyright notice that gets compiled into each library. + * This value will change in the subsequent releases of ICU + * @stable ICU 2.4 + */ +#define U_COPYRIGHT_STRING \ + " Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html " + +/** The current ICU major version as an integer. + * This value will change in the subsequent releases of ICU + * @stable ICU 2.4 + */ +#define U_ICU_VERSION_MAJOR_NUM 61 + +/** The current ICU minor version as an integer. + * This value will change in the subsequent releases of ICU + * @stable ICU 2.6 + */ +#define U_ICU_VERSION_MINOR_NUM 1 + +/** The current ICU patchlevel version as an integer. + * This value will change in the subsequent releases of ICU + * @stable ICU 2.4 + */ +#define U_ICU_VERSION_PATCHLEVEL_NUM 0 + +/** The current ICU build level version as an integer. + * This value is for use by ICU clients. It defaults to 0. + * @stable ICU 4.0 + */ +#ifndef U_ICU_VERSION_BUILDLEVEL_NUM +#define U_ICU_VERSION_BUILDLEVEL_NUM 0 +#endif + +/** Glued version suffix for renamers + * This value will change in the subsequent releases of ICU + * @stable ICU 2.6 + */ +#define U_ICU_VERSION_SUFFIX _61 + +/** + * \def U_DEF2_ICU_ENTRY_POINT_RENAME + * @internal + */ +/** + * \def U_DEF_ICU_ENTRY_POINT_RENAME + * @internal + */ +/** Glued version suffix function for renamers + * This value will change in the subsequent releases of ICU. + * If a custom suffix (such as matching library suffixes) is desired, this can be modified. + * Note that if present, platform.h may contain an earlier definition of this macro. + * \def U_ICU_ENTRY_POINT_RENAME + * @stable ICU 4.2 + */ + +#ifndef U_ICU_ENTRY_POINT_RENAME +#ifdef U_HAVE_LIB_SUFFIX +#define U_DEF_ICU_ENTRY_POINT_RENAME(x,y,z) x ## y ## z +#define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y,z) U_DEF_ICU_ENTRY_POINT_RENAME(x,y,z) +#define U_ICU_ENTRY_POINT_RENAME(x) U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX,U_LIB_SUFFIX_C_NAME) +#else +#define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y +#define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y) +#define U_ICU_ENTRY_POINT_RENAME(x) U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX) +#endif +#endif + +/** The current ICU library version as a dotted-decimal string. The patchlevel + * only appears in this string if it non-zero. + * This value will change in the subsequent releases of ICU + * @stable ICU 2.4 + */ +#define U_ICU_VERSION "61.1" + +/** + * The current ICU library major version number as a string, for library name suffixes. + * This value will change in subsequent releases of ICU. + * + * Until ICU 4.8, this was the combination of the single-digit major and minor ICU version numbers + * into one string without dots ("48"). + * Since ICU 49, it is the double-digit major ICU version number. + * See http://userguide.icu-project.org/design#TOC-Version-Numbers-in-ICU + * + * @stable ICU 2.6 + */ +#define U_ICU_VERSION_SHORT "61" + +#ifndef U_HIDE_INTERNAL_API +/** Data version in ICU4C. + * @internal ICU 4.4 Internal Use Only + **/ +#define U_ICU_DATA_VERSION "61.1" +#endif /* U_HIDE_INTERNAL_API */ + +/*=========================================================================== + * ICU collation framework version information + * Version info that can be obtained from a collator is affected by these + * numbers in a secret and magic way. Please use collator version as whole + *=========================================================================== + */ + +/** + * Collation runtime version (sort key generator, strcoll). + * If the version is different, sort keys for the same string could be different. + * This value may change in subsequent releases of ICU. + * @stable ICU 2.4 + */ +#define UCOL_RUNTIME_VERSION 9 + +/** + * Collation builder code version. + * When this is different, the same tailoring might result + * in assigning different collation elements to code points. + * This value may change in subsequent releases of ICU. + * @stable ICU 2.4 + */ +#define UCOL_BUILDER_VERSION 9 + +#ifndef U_HIDE_DEPRECATED_API +/** + * Constant 1. + * This was intended to be the version of collation tailorings, + * but instead the tailoring data carries a version number. + * @deprecated ICU 54 + */ +#define UCOL_TAILORINGS_VERSION 1 +#endif /* U_HIDE_DEPRECATED_API */ + +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uversion.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uversion.h new file mode 100755 index 00000000..4aaa8b4d --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/uversion.h @@ -0,0 +1,201 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2000-2011, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************* +* +* file name: uversion.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* Created by: Vladimir Weinstein +* +* Gets included by utypes.h and Windows .rc files +*/ + +/** + * \file + * \brief C API: API for accessing ICU version numbers. + */ +/*===========================================================================*/ +/* Main ICU version information */ +/*===========================================================================*/ + +#ifndef UVERSION_H +#define UVERSION_H + +#include "unicode/umachine.h" + +/* Actual version info lives in uvernum.h */ +#include "unicode/uvernum.h" + +/** Maximum length of the copyright string. + * @stable ICU 2.4 + */ +#define U_COPYRIGHT_STRING_LENGTH 128 + +/** An ICU version consists of up to 4 numbers from 0..255. + * @stable ICU 2.4 + */ +#define U_MAX_VERSION_LENGTH 4 + +/** In a string, ICU version fields are delimited by dots. + * @stable ICU 2.4 + */ +#define U_VERSION_DELIMITER '.' + +/** The maximum length of an ICU version string. + * @stable ICU 2.4 + */ +#define U_MAX_VERSION_STRING_LENGTH 20 + +/** The binary form of a version on ICU APIs is an array of 4 uint8_t. + * To compare two versions, use memcmp(v1,v2,sizeof(UVersionInfo)). + * @stable ICU 2.4 + */ +typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]; + +/*===========================================================================*/ +/* C++ namespace if supported. Versioned unless versioning is disabled. */ +/*===========================================================================*/ + +/** + * \def U_NAMESPACE_BEGIN + * This is used to begin a declaration of a public ICU C++ API. + * When not compiling for C++, it does nothing. + * When compiling for C++, it begins an extern "C++" linkage block (to protect + * against cases in which an external client includes ICU header files inside + * an extern "C" linkage block). + * + * It also begins a versioned-ICU-namespace block. + * @stable ICU 2.4 + */ + +/** + * \def U_NAMESPACE_END + * This is used to end a declaration of a public ICU C++ API. + * When not compiling for C++, it does nothing. + * When compiling for C++, it ends the extern "C++" block begun by + * U_NAMESPACE_BEGIN. + * + * It also ends the versioned-ICU-namespace block begun by U_NAMESPACE_BEGIN. + * @stable ICU 2.4 + */ + +/** + * \def U_NAMESPACE_USE + * This is used to specify that the rest of the code uses the + * public ICU C++ API namespace. + * This is invoked by default; we recommend that you turn it off: + * See the "Recommended Build Options" section of the ICU4C readme + * (http://source.icu-project.org/repos/icu/icu/trunk/readme.html#RecBuild) + * @stable ICU 2.4 + */ + +/** + * \def U_NAMESPACE_QUALIFIER + * This is used to qualify that a function or class is part of + * the public ICU C++ API namespace. + * + * This macro is unnecessary since ICU 49 requires namespace support. + * You can just use "icu::" instead. + * @stable ICU 2.4 + */ + +/* Define C++ namespace symbols. */ +#ifdef __cplusplus +# if U_DISABLE_RENAMING +# define U_ICU_NAMESPACE icu + namespace U_ICU_NAMESPACE { } +# else +# define U_ICU_NAMESPACE U_ICU_ENTRY_POINT_RENAME(icu) + namespace U_ICU_NAMESPACE { } + namespace icu = U_ICU_NAMESPACE; +# endif + +# define U_NAMESPACE_BEGIN extern "C++" { namespace U_ICU_NAMESPACE { +# define U_NAMESPACE_END } } +# define U_NAMESPACE_USE using namespace U_ICU_NAMESPACE; +# define U_NAMESPACE_QUALIFIER U_ICU_NAMESPACE:: + +# ifndef U_USING_ICU_NAMESPACE +# if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || \ + defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) || \ + defined(U_LAYOUTEX_IMPLEMENTATION) || defined(U_TOOLUTIL_IMPLEMENTATION) +# define U_USING_ICU_NAMESPACE 0 +# else +# define U_USING_ICU_NAMESPACE 0 +# endif +# endif +# if U_USING_ICU_NAMESPACE + U_NAMESPACE_USE +# endif +#else +# define U_NAMESPACE_BEGIN +# define U_NAMESPACE_END +# define U_NAMESPACE_USE +# define U_NAMESPACE_QUALIFIER +#endif + +/*===========================================================================*/ +/* General version helper functions. Definitions in putil.c */ +/*===========================================================================*/ + +/** + * Parse a string with dotted-decimal version information and + * fill in a UVersionInfo structure with the result. + * Definition of this function lives in putil.c + * + * @param versionArray The destination structure for the version information. + * @param versionString A string with dotted-decimal version information, + * with up to four non-negative number fields with + * values of up to 255 each. + * @stable ICU 2.4 + */ +U_STABLE void U_EXPORT2 +u_versionFromString(UVersionInfo versionArray, const char *versionString); + +/** + * Parse a Unicode string with dotted-decimal version information and + * fill in a UVersionInfo structure with the result. + * Definition of this function lives in putil.c + * + * @param versionArray The destination structure for the version information. + * @param versionString A Unicode string with dotted-decimal version + * information, with up to four non-negative number + * fields with values of up to 255 each. + * @stable ICU 4.2 + */ +U_STABLE void U_EXPORT2 +u_versionFromUString(UVersionInfo versionArray, const UChar *versionString); + + +/** + * Write a string with dotted-decimal version information according + * to the input UVersionInfo. + * Definition of this function lives in putil.c + * + * @param versionArray The version information to be written as a string. + * @param versionString A string buffer that will be filled in with + * a string corresponding to the numeric version + * information in versionArray. + * The buffer size must be at least U_MAX_VERSION_STRING_LENGTH. + * @stable ICU 2.4 + */ +U_STABLE void U_EXPORT2 +u_versionToString(const UVersionInfo versionArray, char *versionString); + +/** + * Gets the ICU release version. The version array stores the version information + * for ICU. For example, release "1.3.31.2" is then represented as 0x01031F02. + * Definition of this function lives in putil.c + * + * @param versionArray the version # information, the result will be filled in + * @stable ICU 2.0 + */ +U_STABLE void U_EXPORT2 +u_getVersion(UVersionInfo versionArray); +#endif diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/vtzone.h b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/vtzone.h new file mode 100755 index 00000000..18265d34 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/include/unicode/vtzone.h @@ -0,0 +1,457 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* Copyright (C) 2007-2013, International Business Machines Corporation and +* others. All Rights Reserved. +******************************************************************************* +*/ +#ifndef VTZONE_H +#define VTZONE_H + +#include "unicode/utypes.h" + +/** + * \file + * \brief C++ API: RFC2445 VTIMEZONE support + */ + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/basictz.h" + +U_NAMESPACE_BEGIN + +class VTZWriter; +class VTZReader; +class UVector; + +/** + * <code>VTimeZone</code> is a class implementing RFC2445 VTIMEZONE. You can create a + * <code>VTimeZone</code> instance from a time zone ID supported by <code>TimeZone</code>. + * With the <code>VTimeZone</code> instance created from the ID, you can write out the rule + * in RFC2445 VTIMEZONE format. Also, you can create a <code>VTimeZone</code> instance + * from RFC2445 VTIMEZONE data stream, which allows you to calculate time + * zone offset by the rules defined by the data. Or, you can create a + * <code>VTimeZone</code> from any other ICU <code>BasicTimeZone</code>. + * <br><br> + * Note: The consumer of this class reading or writing VTIMEZONE data is responsible to + * decode or encode Non-ASCII text. Methods reading/writing VTIMEZONE data in this class + * do nothing with MIME encoding. + * @stable ICU 3.8 + */ +class U_I18N_API VTimeZone : public BasicTimeZone { +public: + /** + * Copy constructor. + * @param source The <code>VTimeZone</code> object to be copied. + * @stable ICU 3.8 + */ + VTimeZone(const VTimeZone& source); + + /** + * Destructor. + * @stable ICU 3.8 + */ + virtual ~VTimeZone(); + + /** + * Assignment operator. + * @param right The object to be copied. + * @stable ICU 3.8 + */ + VTimeZone& operator=(const VTimeZone& right); + + /** + * Return true if the given <code>TimeZone</code> objects are + * semantically equal. Objects of different subclasses are considered unequal. + * @param that The object to be compared with. + * @return true if the given <code>TimeZone</code> objects are + *semantically equal. + * @stable ICU 3.8 + */ + virtual UBool operator==(const TimeZone& that) const; + + /** + * Return true if the given <code>TimeZone</code> objects are + * semantically unequal. Objects of different subclasses are considered unequal. + * @param that The object to be compared with. + * @return true if the given <code>TimeZone</code> objects are + * semantically unequal. + * @stable ICU 3.8 + */ + virtual UBool operator!=(const TimeZone& that) const; + + /** + * Create a <code>VTimeZone</code> instance by the time zone ID. + * @param ID The time zone ID, such as America/New_York + * @return A <code>VTimeZone</code> object initialized by the time zone ID, + * or NULL when the ID is unknown. + * @stable ICU 3.8 + */ + static VTimeZone* createVTimeZoneByID(const UnicodeString& ID); + + /** + * Create a <code>VTimeZone</code> instance using a basic time zone. + * @param basicTZ The basic time zone instance + * @param status Output param to filled in with a success or an error. + * @return A <code>VTimeZone</code> object initialized by the basic time zone. + * @stable ICU 4.6 + */ + static VTimeZone* createVTimeZoneFromBasicTimeZone(const BasicTimeZone& basicTZ, + UErrorCode &status); + + /** + * Create a <code>VTimeZone</code> instance by RFC2445 VTIMEZONE data + * + * @param vtzdata The string including VTIMEZONE data block + * @param status Output param to filled in with a success or an error. + * @return A <code>VTimeZone</code> initialized by the VTIMEZONE data or + * NULL if failed to load the rule from the VTIMEZONE data. + * @stable ICU 3.8 + */ + static VTimeZone* createVTimeZone(const UnicodeString& vtzdata, UErrorCode& status); + + /** + * Gets the RFC2445 TZURL property value. When a <code>VTimeZone</code> instance was + * created from VTIMEZONE data, the initial value is set by the TZURL property value + * in the data. Otherwise, the initial value is not set. + * @param url Receives the RFC2445 TZURL property value. + * @return TRUE if TZURL attribute is available and value is set. + * @stable ICU 3.8 + */ + UBool getTZURL(UnicodeString& url) const; + + /** + * Sets the RFC2445 TZURL property value. + * @param url The TZURL property value. + * @stable ICU 3.8 + */ + void setTZURL(const UnicodeString& url); + + /** + * Gets the RFC2445 LAST-MODIFIED property value. When a <code>VTimeZone</code> instance + * was created from VTIMEZONE data, the initial value is set by the LAST-MODIFIED property + * value in the data. Otherwise, the initial value is not set. + * @param lastModified Receives the last modified date. + * @return TRUE if lastModified attribute is available and value is set. + * @stable ICU 3.8 + */ + UBool getLastModified(UDate& lastModified) const; + + /** + * Sets the RFC2445 LAST-MODIFIED property value. + * @param lastModified The LAST-MODIFIED date. + * @stable ICU 3.8 + */ + void setLastModified(UDate lastModified); + + /** + * Writes RFC2445 VTIMEZONE data for this time zone + * @param result Output param to filled in with the VTIMEZONE data. + * @param status Output param to filled in with a success or an error. + * @stable ICU 3.8 + */ + void write(UnicodeString& result, UErrorCode& status) const; + + /** + * Writes RFC2445 VTIMEZONE data for this time zone applicalbe + * for dates after the specified start time. + * @param start The start date. + * @param result Output param to filled in with the VTIMEZONE data. + * @param status Output param to filled in with a success or an error. + * @stable ICU 3.8 + */ + void write(UDate start, UnicodeString& result, UErrorCode& status) const; + + /** + * Writes RFC2445 VTIMEZONE data applicalbe for the specified date. + * Some common iCalendar implementations can only handle a single time + * zone property or a pair of standard and daylight time properties using + * BYDAY rule with day of week (such as BYDAY=1SUN). This method produce + * the VTIMEZONE data which can be handled these implementations. The rules + * produced by this method can be used only for calculating time zone offset + * around the specified date. + * @param time The date used for rule extraction. + * @param result Output param to filled in with the VTIMEZONE data. + * @param status Output param to filled in with a success or an error. + * @stable ICU 3.8 + */ + void writeSimple(UDate time, UnicodeString& result, UErrorCode& status) const; + + /** + * Clones TimeZone objects polymorphically. Clients are responsible for deleting + * the TimeZone object cloned. + * @return A new copy of this TimeZone object. + * @stable ICU 3.8 + */ + virtual TimeZone* clone(void) const; + + /** + * Returns the TimeZone's adjusted GMT offset (i.e., the number of milliseconds to add + * to GMT to get local time in this time zone, taking daylight savings time into + * account) as of a particular reference date. The reference date is used to determine + * whether daylight savings time is in effect and needs to be figured into the offset + * that is returned (in other words, what is the adjusted GMT offset in this time zone + * at this particular date and time?). For the time zones produced by createTimeZone(), + * the reference data is specified according to the Gregorian calendar, and the date + * and time fields are local standard time. + * + * <p>Note: Don't call this method. Instead, call the getOffset(UDate...) overload, + * which returns both the raw and the DST offset for a given time. This method + * is retained only for backward compatibility. + * + * @param era The reference date's era + * @param year The reference date's year + * @param month The reference date's month (0-based; 0 is January) + * @param day The reference date's day-in-month (1-based) + * @param dayOfWeek The reference date's day-of-week (1-based; 1 is Sunday) + * @param millis The reference date's milliseconds in day, local standard time + * @param status Output param to filled in with a success or an error. + * @return The offset in milliseconds to add to GMT to get local time. + * @stable ICU 3.8 + */ + virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, + uint8_t dayOfWeek, int32_t millis, UErrorCode& status) const; + + /** + * Gets the time zone offset, for current date, modified in case of + * daylight savings. This is the offset to add *to* UTC to get local time. + * + * <p>Note: Don't call this method. Instead, call the getOffset(UDate...) overload, + * which returns both the raw and the DST offset for a given time. This method + * is retained only for backward compatibility. + * + * @param era The reference date's era + * @param year The reference date's year + * @param month The reference date's month (0-based; 0 is January) + * @param day The reference date's day-in-month (1-based) + * @param dayOfWeek The reference date's day-of-week (1-based; 1 is Sunday) + * @param millis The reference date's milliseconds in day, local standard time + * @param monthLength The length of the given month in days. + * @param status Output param to filled in with a success or an error. + * @return The offset in milliseconds to add to GMT to get local time. + * @stable ICU 3.8 + */ + virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, + uint8_t dayOfWeek, int32_t millis, + int32_t monthLength, UErrorCode& status) const; + + /** + * Returns the time zone raw and GMT offset for the given moment + * in time. Upon return, local-millis = GMT-millis + rawOffset + + * dstOffset. All computations are performed in the proleptic + * Gregorian calendar. The default implementation in the TimeZone + * class delegates to the 8-argument getOffset(). + * + * @param date moment in time for which to return offsets, in + * units of milliseconds from January 1, 1970 0:00 GMT, either GMT + * time or local wall time, depending on `local'. + * @param local if true, `date' is local wall time; otherwise it + * is in GMT time. + * @param rawOffset output parameter to receive the raw offset, that + * is, the offset not including DST adjustments + * @param dstOffset output parameter to receive the DST offset, + * that is, the offset to be added to `rawOffset' to obtain the + * total offset between local and GMT time. If DST is not in + * effect, this value is zero; otherwise it is a positive value, + * typically one hour. + * @param ec input-output error code + * @stable ICU 3.8 + */ + virtual void getOffset(UDate date, UBool local, int32_t& rawOffset, + int32_t& dstOffset, UErrorCode& ec) const; + + /** + * Sets the TimeZone's raw GMT offset (i.e., the number of milliseconds to add + * to GMT to get local time, before taking daylight savings time into account). + * + * @param offsetMillis The new raw GMT offset for this time zone. + * @stable ICU 3.8 + */ + virtual void setRawOffset(int32_t offsetMillis); + + /** + * Returns the TimeZone's raw GMT offset (i.e., the number of milliseconds to add + * to GMT to get local time, before taking daylight savings time into account). + * + * @return The TimeZone's raw GMT offset. + * @stable ICU 3.8 + */ + virtual int32_t getRawOffset(void) const; + + /** + * Queries if this time zone uses daylight savings time. + * @return true if this time zone uses daylight savings time, + * false, otherwise. + * @stable ICU 3.8 + */ + virtual UBool useDaylightTime(void) const; + + /** + * Queries if the given date is in daylight savings time in + * this time zone. + * This method is wasteful since it creates a new GregorianCalendar and + * deletes it each time it is called. This is a deprecated method + * and provided only for Java compatibility. + * + * @param date the given UDate. + * @param status Output param filled in with success/error code. + * @return true if the given date is in daylight savings time, + * false, otherwise. + * @deprecated ICU 2.4. Use Calendar::inDaylightTime() instead. + */ + virtual UBool inDaylightTime(UDate date, UErrorCode& status) const; + + /** + * Returns true if this zone has the same rule and offset as another zone. + * That is, if this zone differs only in ID, if at all. + * @param other the <code>TimeZone</code> object to be compared with + * @return true if the given zone is the same as this one, + * with the possible exception of the ID + * @stable ICU 3.8 + */ + virtual UBool hasSameRules(const TimeZone& other) const; + + /** + * Gets the first time zone transition after the base time. + * @param base The base time. + * @param inclusive Whether the base time is inclusive or not. + * @param result Receives the first transition after the base time. + * @return TRUE if the transition is found. + * @stable ICU 3.8 + */ + virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const; + + /** + * Gets the most recent time zone transition before the base time. + * @param base The base time. + * @param inclusive Whether the base time is inclusive or not. + * @param result Receives the most recent transition before the base time. + * @return TRUE if the transition is found. + * @stable ICU 3.8 + */ + virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const; + + /** + * Returns the number of <code>TimeZoneRule</code>s which represents time transitions, + * for this time zone, that is, all <code>TimeZoneRule</code>s for this time zone except + * <code>InitialTimeZoneRule</code>. The return value range is 0 or any positive value. + * @param status Receives error status code. + * @return The number of <code>TimeZoneRule</code>s representing time transitions. + * @stable ICU 3.8 + */ + virtual int32_t countTransitionRules(UErrorCode& status) const; + + /** + * Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZoneRule</code> + * which represent time transitions for this time zone. On successful return, + * the argument initial points to non-NULL <code>InitialTimeZoneRule</code> and + * the array trsrules is filled with 0 or multiple <code>TimeZoneRule</code> + * instances up to the size specified by trscount. The results are referencing the + * rule instance held by this time zone instance. Therefore, after this time zone + * is destructed, they are no longer available. + * @param initial Receives the initial timezone rule + * @param trsrules Receives the timezone transition rules + * @param trscount On input, specify the size of the array 'transitions' receiving + * the timezone transition rules. On output, actual number of + * rules filled in the array will be set. + * @param status Receives error status code. + * @stable ICU 3.8 + */ + virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial, + const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) const; + +private: + enum { DEFAULT_VTIMEZONE_LINES = 100 }; + + /** + * Default constructor. + */ + VTimeZone(); + static VTimeZone* createVTimeZone(VTZReader* reader); + void write(VTZWriter& writer, UErrorCode& status) const; + void write(UDate start, VTZWriter& writer, UErrorCode& status) const; + void writeSimple(UDate time, VTZWriter& writer, UErrorCode& status) const; + void load(VTZReader& reader, UErrorCode& status); + void parse(UErrorCode& status); + + void writeZone(VTZWriter& w, BasicTimeZone& basictz, UVector* customProps, + UErrorCode& status) const; + + void writeHeaders(VTZWriter& w, UErrorCode& status) const; + void writeFooter(VTZWriter& writer, UErrorCode& status) const; + + void writeZonePropsByTime(VTZWriter& writer, UBool isDst, const UnicodeString& zonename, + int32_t fromOffset, int32_t toOffset, UDate time, UBool withRDATE, + UErrorCode& status) const; + void writeZonePropsByDOM(VTZWriter& writer, UBool isDst, const UnicodeString& zonename, + int32_t fromOffset, int32_t toOffset, + int32_t month, int32_t dayOfMonth, UDate startTime, UDate untilTime, + UErrorCode& status) const; + void writeZonePropsByDOW(VTZWriter& writer, UBool isDst, const UnicodeString& zonename, + int32_t fromOffset, int32_t toOffset, + int32_t month, int32_t weekInMonth, int32_t dayOfWeek, + UDate startTime, UDate untilTime, UErrorCode& status) const; + void writeZonePropsByDOW_GEQ_DOM(VTZWriter& writer, UBool isDst, const UnicodeString& zonename, + int32_t fromOffset, int32_t toOffset, + int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, + UDate startTime, UDate untilTime, UErrorCode& status) const; + void writeZonePropsByDOW_GEQ_DOM_sub(VTZWriter& writer, int32_t month, int32_t dayOfMonth, + int32_t dayOfWeek, int32_t numDays, + UDate untilTime, int32_t fromOffset, UErrorCode& status) const; + void writeZonePropsByDOW_LEQ_DOM(VTZWriter& writer, UBool isDst, const UnicodeString& zonename, + int32_t fromOffset, int32_t toOffset, + int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, + UDate startTime, UDate untilTime, UErrorCode& status) const; + void writeFinalRule(VTZWriter& writer, UBool isDst, const AnnualTimeZoneRule* rule, + int32_t fromRawOffset, int32_t fromDSTSavings, + UDate startTime, UErrorCode& status) const; + + void beginZoneProps(VTZWriter& writer, UBool isDst, const UnicodeString& zonename, + int32_t fromOffset, int32_t toOffset, UDate startTime, UErrorCode& status) const; + void endZoneProps(VTZWriter& writer, UBool isDst, UErrorCode& status) const; + void beginRRULE(VTZWriter& writer, int32_t month, UErrorCode& status) const; + void appendUNTIL(VTZWriter& writer, const UnicodeString& until, UErrorCode& status) const; + + BasicTimeZone *tz; + UVector *vtzlines; + UnicodeString tzurl; + UDate lastmod; + UnicodeString olsonzid; + UnicodeString icutzver; + +public: + /** + * Return the class ID for this class. This is useful only for comparing to + * a return value from getDynamicClassID(). For example: + * <pre> + * . Base* polymorphic_pointer = createPolymorphicObject(); + * . if (polymorphic_pointer->getDynamicClassID() == + * . erived::getStaticClassID()) ... + * </pre> + * @return The class ID for all objects of this class. + * @stable ICU 3.8 + */ + static UClassID U_EXPORT2 getStaticClassID(void); + + /** + * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This + * method is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and clone() + * methods call this method. + * + * @return The class ID for this object. All objects of a + * given class have the same class ID. Objects of + * other classes have different class IDs. + * @stable ICU 3.8 + */ + virtual UClassID getDynamicClassID(void) const; +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // VTZONE_H +//eof diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicudata.61.1.dylib b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicudata.61.1.dylib new file mode 100755 index 00000000..598b2aad Binary files /dev/null and b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicudata.61.1.dylib differ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicudata.61.dylib b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicudata.61.dylib new file mode 120000 index 00000000..821c6032 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicudata.61.dylib @@ -0,0 +1 @@ +libicudata.61.1.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicudata.dylib b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicudata.dylib new file mode 120000 index 00000000..821c6032 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicudata.dylib @@ -0,0 +1 @@ +libicudata.61.1.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicui18n.61.1.dylib b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicui18n.61.1.dylib new file mode 100755 index 00000000..581708e5 Binary files /dev/null and b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicui18n.61.1.dylib differ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicui18n.61.dylib b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicui18n.61.dylib new file mode 120000 index 00000000..8db864fd --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicui18n.61.dylib @@ -0,0 +1 @@ +libicui18n.61.1.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicui18n.dylib b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicui18n.dylib new file mode 120000 index 00000000..8db864fd --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicui18n.dylib @@ -0,0 +1 @@ +libicui18n.61.1.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicuio.61.1.dylib b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicuio.61.1.dylib new file mode 100755 index 00000000..c8e0ad2e Binary files /dev/null and b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicuio.61.1.dylib differ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicuio.61.dylib b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicuio.61.dylib new file mode 120000 index 00000000..9d0a6c95 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicuio.61.dylib @@ -0,0 +1 @@ +libicuio.61.1.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicuio.dylib b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicuio.dylib new file mode 120000 index 00000000..9d0a6c95 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicuio.dylib @@ -0,0 +1 @@ +libicuio.61.1.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicutest.61.1.dylib b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicutest.61.1.dylib new file mode 100755 index 00000000..6437b058 Binary files /dev/null and b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicutest.61.1.dylib differ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicutest.61.dylib b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicutest.61.dylib new file mode 120000 index 00000000..ee3d6f65 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicutest.61.dylib @@ -0,0 +1 @@ +libicutest.61.1.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicutest.dylib b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicutest.dylib new file mode 120000 index 00000000..ee3d6f65 --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicutest.dylib @@ -0,0 +1 @@ +libicutest.61.1.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicutu.61.1.dylib b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicutu.61.1.dylib new file mode 100755 index 00000000..864eae15 Binary files /dev/null and b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicutu.61.1.dylib differ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicutu.61.dylib b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicutu.61.dylib new file mode 120000 index 00000000..9e6b35bf --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicutu.61.dylib @@ -0,0 +1 @@ +libicutu.61.1.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicutu.dylib b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicutu.dylib new file mode 120000 index 00000000..9e6b35bf --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicutu.dylib @@ -0,0 +1 @@ +libicutu.61.1.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicuuc.61.1.dylib b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicuuc.61.1.dylib new file mode 100755 index 00000000..c260b7bd Binary files /dev/null and b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicuuc.61.1.dylib differ diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicuuc.61.dylib b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicuuc.61.dylib new file mode 120000 index 00000000..c7c72dcc --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicuuc.61.dylib @@ -0,0 +1 @@ +libicuuc.61.1.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicuuc.dylib b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicuuc.dylib new file mode 120000 index 00000000..c7c72dcc --- /dev/null +++ b/frameworks/cairosvg/dependencies/icu4c/61.1/lib/libicuuc.dylib @@ -0,0 +1 @@ +libicuuc.61.1.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-additional-sel.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-additional-sel.h new file mode 100755 index 00000000..7ca3e07d --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-additional-sel.h @@ -0,0 +1,98 @@ +/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * Author: Dodji Seketeli + * See the COPYRIGHTS file for copyright information. + */ + + +#ifndef __CR_ADD_SEL_H__ +#define __CR_ADD_SEL_H__ + +#include <stdio.h> +#include <glib.h> +#include "cr-utils.h" +#include "cr-attr-sel.h" +#include "cr-pseudo.h" +#include "cr-additional-sel.h" + +G_BEGIN_DECLS + +enum AddSelectorType +{ + NO_ADD_SELECTOR = 0 , + CLASS_ADD_SELECTOR = 1 , + PSEUDO_CLASS_ADD_SELECTOR = 1 << 1, + ID_ADD_SELECTOR = 1 << 3, + ATTRIBUTE_ADD_SELECTOR = 1 << 4 +} ; + +union CRAdditionalSelectorContent +{ + CRString *class_name ; + CRString *id_name ; + CRPseudo *pseudo ; + CRAttrSel *attr_sel ; +} ; + +typedef struct _CRAdditionalSel CRAdditionalSel ; + +struct _CRAdditionalSel +{ + enum AddSelectorType type ; + union CRAdditionalSelectorContent content ; + + CRAdditionalSel * next ; + CRAdditionalSel * prev ; + CRParsingLocation location ; +} ; + +CRAdditionalSel * cr_additional_sel_new (void) ; + +CRAdditionalSel * cr_additional_sel_new_with_type (enum AddSelectorType a_sel_type) ; + +CRAdditionalSel * cr_additional_sel_append (CRAdditionalSel *a_this, + CRAdditionalSel *a_sel) ; + +void cr_additional_sel_set_class_name (CRAdditionalSel *a_this, + CRString *a_class_name) ; + +void cr_additional_sel_set_id_name (CRAdditionalSel *a_this, + CRString *a_id) ; + +void cr_additional_sel_set_pseudo (CRAdditionalSel *a_this, + CRPseudo *a_pseudo) ; + +void cr_additional_sel_set_attr_sel (CRAdditionalSel *a_this, + CRAttrSel *a_sel) ; + +CRAdditionalSel * cr_additional_sel_prepend (CRAdditionalSel *a_this, + CRAdditionalSel *a_sel) ; + +guchar * cr_additional_sel_to_string (CRAdditionalSel const *a_this) ; + +guchar * cr_additional_sel_one_to_string (CRAdditionalSel const *a_this) ; + +void cr_additional_sel_dump (CRAdditionalSel const *a_this, FILE *a_fp) ; + +void cr_additional_sel_destroy (CRAdditionalSel *a_this) ; + +G_END_DECLS + +#endif /*__CR_ADD_SEL_H*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-attr-sel.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-attr-sel.h new file mode 100755 index 00000000..82d5a87d --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-attr-sel.h @@ -0,0 +1,74 @@ +/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * Author: Dodji Seketeli + * See COPYRIGHTS file for copyright information. + */ + +#ifndef __CR_ATTR_SEL_H__ +#define __CR_ATTR_SEL_H__ + +#include <stdio.h> +#include <glib.h> +#include "cr-utils.h" +#include "cr-parsing-location.h" +#include "cr-string.h" + +G_BEGIN_DECLS + + +struct _CRAttrSel ; +typedef struct _CRAttrSel CRAttrSel ; + +enum AttrMatchWay +{ + NO_MATCH = 0, + SET, + EQUALS, + INCLUDES, + DASHMATCH +} ; + +struct _CRAttrSel +{ + CRString *name ; + CRString *value ; + enum AttrMatchWay match_way ; + CRAttrSel *next ; + CRAttrSel *prev ; + CRParsingLocation location ; +} ; + +CRAttrSel * cr_attr_sel_new (void) ; + +enum CRStatus cr_attr_sel_append_attr_sel (CRAttrSel * a_this, + CRAttrSel *a_attr_sel) ; + +enum CRStatus cr_attr_sel_prepend_attr_sel (CRAttrSel *a_this, + CRAttrSel *a_attr_sel) ; + +guchar * cr_attr_sel_to_string (CRAttrSel const *a_this) ; + +void cr_attr_sel_dump (CRAttrSel const *a_this, FILE *a_fp) ; + +void cr_attr_sel_destroy (CRAttrSel *a_this) ; + +G_END_DECLS + +#endif /*__CR_ATTR_SEL_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-cascade.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-cascade.h new file mode 100755 index 00000000..3119ae85 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-cascade.h @@ -0,0 +1,74 @@ +/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the + * GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the + * GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + */ + +/* + *$Id$ + */ + +#ifndef __CR_CASCADE_H__ +#define __CR_CASCADE_H__ + +#include "cr-stylesheet.h" + +/** + *@file + *the declaration of the #CRCascade class. + */ + +G_BEGIN_DECLS + + +typedef struct _CRCascadePriv CRCascadePriv ; + +/** + *An abstraction of the "Cascade" defined + *in the css2 spec, chapter 6.4. + */ +typedef struct _CRCascade CRCascade ; + +struct _CRCascade +{ + CRCascadePriv *priv ; +}; + + +CRCascade * cr_cascade_new (CRStyleSheet *a_author_sheet, + CRStyleSheet *a_user_sheet, + CRStyleSheet *a_ua_sheet) ; + +CRStyleSheet * cr_cascade_get_sheet (CRCascade *a_this, + enum CRStyleOrigin a_origin) ; + +enum CRStatus cr_cascade_set_sheet (CRCascade *a_this, + CRStyleSheet *a_sheet, + enum CRStyleOrigin a_origin) ; + +void cr_cascade_ref (CRCascade *a_this) ; + +void cr_cascade_unref (CRCascade *a_this) ; + +void cr_cascade_destroy (CRCascade *a_this) ; + +G_END_DECLS + +#endif /*__CR_CASCADE_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-declaration.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-declaration.h new file mode 100755 index 00000000..eee8be32 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-declaration.h @@ -0,0 +1,136 @@ +/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * See the COPYRIGHTS file for copyright information. + */ + +#ifndef __CR_DECLARATION_H__ +#define __CR_DECLARATION_H__ + +#include <stdio.h> +#include "cr-utils.h" +#include "cr-term.h" +#include "cr-parsing-location.h" + +G_BEGIN_DECLS + +/** + *@file + *The declaration of the #CRDeclaration class. + */ + +/*forward declaration of what is defined in cr-statement.h*/ +typedef struct _CRStatement CRStatement ; + +/** + *The abstraction of a css declaration defined by the + *css2 spec in chapter 4. + *It is actually a chained list of property/value pairs. + */ +typedef struct _CRDeclaration CRDeclaration ; +struct _CRDeclaration +{ + /**The property.*/ + CRString *property ; + + /**The value of the property.*/ + CRTerm *value ; + + /*the ruleset that contains this declaration*/ + CRStatement *parent_statement ; + + /*the next declaration*/ + CRDeclaration *next ; + + /*the previous one declaration*/ + CRDeclaration *prev ; + + /*does the declaration have the important keyword ?*/ + gboolean important ; + + glong ref_count ; + + CRParsingLocation location ; + /*reserved for future usage*/ + gpointer rfu0 ; + gpointer rfu1 ; + gpointer rfu2 ; + gpointer rfu3 ; +} ; + + +CRDeclaration * cr_declaration_new (CRStatement *a_statement, + CRString *a_property, + CRTerm *a_value) ; + + +CRDeclaration * cr_declaration_parse_from_buf (CRStatement *a_statement, + const guchar *a_str, + enum CREncoding a_enc) ; + +CRDeclaration * cr_declaration_parse_list_from_buf (const guchar *a_str, + enum CREncoding a_enc) ; + +CRDeclaration * cr_declaration_append (CRDeclaration *a_this, + CRDeclaration *a_new) ; + +CRDeclaration * cr_declaration_append2 (CRDeclaration *a_this, + CRString *a_prop, + CRTerm *a_value) ; + +CRDeclaration * cr_declaration_prepend (CRDeclaration *a_this, + CRDeclaration *a_new) ; + +CRDeclaration * cr_declaration_unlink (CRDeclaration * a_decl) ; + +void +cr_declaration_dump (CRDeclaration const *a_this, + FILE *a_fp, glong a_indent, + gboolean a_one_per_line) ; + +void cr_declaration_dump_one (CRDeclaration const *a_this, + FILE *a_fp, glong a_indent) ; + +gint cr_declaration_nr_props (CRDeclaration const *a_this) ; + +CRDeclaration * cr_declaration_get_from_list (CRDeclaration *a_this, + int itemnr) ; + +CRDeclaration * cr_declaration_get_by_prop_name (CRDeclaration *a_this, + const guchar *a_str) ; + +gchar * cr_declaration_to_string (CRDeclaration const *a_this, + gulong a_indent) ; + +guchar * cr_declaration_list_to_string (CRDeclaration const *a_this, + gulong a_indent) ; + +guchar * cr_declaration_list_to_string2 (CRDeclaration const *a_this, + gulong a_indent, + gboolean a_one_decl_per_line) ; + +void cr_declaration_ref (CRDeclaration *a_this) ; + +gboolean cr_declaration_unref (CRDeclaration *a_this) ; + +void cr_declaration_destroy (CRDeclaration *a_this) ; + +G_END_DECLS + +#endif /*__CR_DECLARATION_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-doc-handler.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-doc-handler.h new file mode 100755 index 00000000..d12673f3 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-doc-handler.h @@ -0,0 +1,298 @@ +/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * See the COPYRIGHTS file for copyright information. + */ + +#ifndef __CR_DOC_HANDLER_H__ +#define __CR_DOC_HANDLER_H__ + +/** + *@file + *The declaration of the #CRDocumentHandler class. + *This class is actually the parsing events handler. + */ + +#include <glib.h> +#include "cr-utils.h" +#include "cr-input.h" +#include "cr-stylesheet.h" + +G_BEGIN_DECLS + + +typedef struct _CRDocHandler CRDocHandler ; + +struct _CRDocHandlerPriv ; +typedef struct _CRDocHandlerPriv CRDocHandlerPriv ; + + +/** + *The SAC document handler. + *An instance of this class is to + *be passed to a parser. Then, during the parsing + *the parser calls the convenient function pointer + *whenever a particular event (a css construction) occurs. + */ +struct _CRDocHandler +{ + CRDocHandlerPriv *priv ; + + /** + *This pointer is to be used by the application for + *it custom needs. It is there to extend the doc handler. + */ + gpointer app_data ; + + /** + *Is called at the beginning of the parsing of the document. + *@param a_this a pointer to the current instance of + *#CRDocHandler. + */ + void (*start_document) (CRDocHandler *a_this) ; + + /** + *Is called to notify the end of the parsing of the document. + *@param a_this a pointer to the current instance of + *#CRDocHandler. + */ + void (*end_document) (CRDocHandler *a_this) ; + + /** + *Is called to notify an at charset rule. + *@param a_this the document handler. + *@param a_charset the declared charset. + */ + void (*charset) (CRDocHandler *a_this, + CRString *a_charset, + CRParsingLocation *a_charset_sym_location) ; + + /** + *Is called to notify an import statement in + *the stylesheet. + *@param a_this the current instance of #CRDocHandler. + *@param a_media_list a doubly linked list of GString objects. + *Each GString object contains a string which is the + *destination media for style information. + *@param a_uri the uri of the imported style sheet. + *@param a_uri_default_ns the default namespace of URI + *@param a_location the parsing location of the '\@import' + *keyword. + *of the imported style sheet. + */ + void (*import_style) (CRDocHandler *a_this, + GList *a_media_list, + CRString *a_uri, + CRString *a_uri_default_ns, + CRParsingLocation *a_location) ; + + void (*import_style_result) (CRDocHandler *a_this, + GList *a_media_list, + CRString *a_uri, + CRString *a_uri_default_ns, + CRStyleSheet *a_sheet) ; + + /** + *Is called to notify a namespace declaration. + *Not used yet. + *@param a_this the current instance of #CRDocHandler. + *@param a_prefix the prefix of the namespace. + *@param a_uri the uri of the namespace. + *@param a_location the location of the "@namespace" keyword. + */ + void (*namespace_declaration) (CRDocHandler *a_this, + CRString *a_prefix, + CRString *a_uri, + CRParsingLocation *a_location) ; + + /** + *Is called to notify a comment. + *@param a_this a pointer to the current instance + *of #CRDocHandler. + *@param a_comment the comment. + */ + void (*comment) (CRDocHandler *a_this, + CRString *a_comment) ; + + /** + *Is called to notify the beginning of a rule + *statement. + *@param a_this the current instance of #CRDocHandler. + *@param a_selector_list the list of selectors that precedes + *the rule declarations. + */ + void (*start_selector) (CRDocHandler * a_this, + CRSelector *a_selector_list) ; + + /** + *Is called to notify the end of a rule statement. + *@param a_this the current instance of #CRDocHandler. + *@param a_selector_list the list of selectors that precedes + *the rule declarations. This pointer is the same as + *the one passed to start_selector() ; + */ + void (*end_selector) (CRDocHandler *a_this, + CRSelector *a_selector_list) ; + + + /** + *Is called to notify a declaration. + *@param a_this a pointer to the current instance + *of #CRDocHandler. + *@param a_name the name of the parsed property. + *@param a_expression a css expression that represents + *the value of the property. A css expression is + *actually a linked list of 'terms'. Each term can + *be linked to other using operators. + * + */ + void (*property) (CRDocHandler *a_this, + CRString *a_name, + CRTerm *a_expression, + gboolean a_is_important) ; + /** + *Is called to notify the start of a font face statement. + *The parser invokes this method at the beginning of every + *font face statement in the style sheet. There will + *be a corresponding end_font_face () event for every + *start_font_face () event. + * + *@param a_this a pointer to the current instance of + *#CRDocHandler. + *@param a_location the parsing location of the "\@font-face" + *keyword. + */ + void (*start_font_face) (CRDocHandler *a_this, + CRParsingLocation *a_location) ; + + /** + *Is called to notify the end of a font face statement. + *@param a_this a pointer to the current instance of + *#CRDocHandler. + */ + void (*end_font_face) (CRDocHandler *a_this) ; + + + /** + *Is called to notify the beginning of a media statement. + *The parser will invoke this method at the beginning of + *every media statement in the style sheet. There will be + *a corresponding end_media() event for every start_media() + *event. + *@param a_this a pointer to the current instance of + *#CRDocHandler. + *@param a_media_list a double linked list of + #CRString * objects. + *Each CRString objects is actually a destination media for + *the style information. + */ + void (*start_media) (CRDocHandler *a_this, + GList *a_media_list, + CRParsingLocation *a_location) ; + + /** + *Is called to notify the end of a media statement. + *@param a_this a pointer to the current instance + *of #CRDocHandler. + *@param a_media_list a double linked list of GString * objects. + *Each GString objects is actually a destination media for + *the style information. + */ + void (*end_media) (CRDocHandler *a_this, + GList *a_media_list) ; + + /** + *Is called to notify the beginning of a page statement. + *The parser invokes this function at the beginning of + *every page statement in the style sheet. There will be + *a corresponding end_page() event for every single + *start_page() event. + *@param a_this a pointer to the current instance of + *#CRDocHandler. + *@param a_name the name of the page (if any, null otherwise). + *@param a_pseudo_page the pseudo page (if any, null otherwise). + *@param a_location the parsing location of the "\@page" keyword. + */ + void (*start_page) (CRDocHandler *a_this, + CRString *a_name, + CRString *a_pseudo_page, + CRParsingLocation *a_location) ; + + /** + *Is called to notify the end of a page statement. + *@param a_this a pointer to the current instance of + *#CRDocHandler. + *@param a_name the name of the page (if any, null otherwise). + *@param a_pseudo_page the pseudo page (if any, null otherwise). + */ + void (*end_page) (CRDocHandler *a_this, + CRString *a_name, + CRString *pseudo_page) ; + + /** + *Is Called to notify an unknown at-rule not supported + *by this parser. + */ + void (*ignorable_at_rule) (CRDocHandler *a_this, + CRString *a_name) ; + + /** + *Is called to notify a parsing error. After this error + *the application must ignore the rule being parsed, if + *any. After completion of this callback, + *the parser will then try to resume the parsing, + *ignoring the current error. + */ + void (*error) (CRDocHandler *a_this) ; + + /** + *Is called to notify an unrecoverable parsing error. + *This is the place to put emergency routines that free allocated + *resources. + */ + void (*unrecoverable_error) (CRDocHandler *a_this) ; + + gboolean resolve_import ; + gulong ref_count ; +} ; + +CRDocHandler * cr_doc_handler_new (void) ; + +enum CRStatus cr_doc_handler_set_result (CRDocHandler *a_this, gpointer a_result) ; + +enum CRStatus cr_doc_handler_get_result (CRDocHandler const *a_this, gpointer * a_result) ; + +enum CRStatus cr_doc_handler_set_ctxt (CRDocHandler *a_this, gpointer a_ctxt) ; + +enum CRStatus cr_doc_handler_get_ctxt (CRDocHandler const *a_this, gpointer * a_ctxt) ; + +enum CRStatus cr_doc_handler_set_default_sac_handler (CRDocHandler *a_this) ; + +void cr_doc_handler_associate_a_parser (CRDocHandler *a_this, + gpointer a_parser) ; + +void cr_doc_handler_ref (CRDocHandler *a_this) ; + +gboolean cr_doc_handler_unref (CRDocHandler *a_this) ; + +void cr_doc_handler_destroy (CRDocHandler *a_this) ; + +G_END_DECLS + +#endif /*__CR_DOC_HANDLER_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-enc-handler.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-enc-handler.h new file mode 100755 index 00000000..0727764c --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-enc-handler.h @@ -0,0 +1,94 @@ +/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ + +/* + * This file is part of The Croco Library + * + * Copyright (C) 2002-2003 Dodji Seketeli <dodji@seketeli.org> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ + +/* + *$Id$ + */ + +/** + *@file: + *The declaration of the #CREncHandler class. + * + */ + +#ifndef __CR_ENC_HANDLER_H__ +#define __CR_ENC_HANDLER_H__ + +#include "cr-utils.h" + +G_BEGIN_DECLS + + +typedef struct _CREncHandler CREncHandler ; + +typedef enum CRStatus (*CREncInputFunc) (const guchar * a_in, + gulong *a_in_len, + guchar *a_out, + gulong *a_out_len) ; + +typedef enum CRStatus (*CREncOutputFunc) (const guchar * a_in, + gulong *a_in_len, + guchar *a_out, + gulong *a_out_len) ; + +typedef enum CRStatus (*CREncInputStrLenAsUtf8Func) +(const guchar *a_in_start, + const guchar *a_in_end, + gulong *a_in_size); + +typedef enum CRStatus (*CREncUtf8StrLenAsOutputFunc) +(const guchar *a_in_start, + const guchar *a_in_end, + gulong *a_in_size) ; + +/** + *This class is responsible of the + *the encoding conversions stuffs in + *libcroco. + */ + +struct _CREncHandler +{ + enum CREncoding encoding ; + CREncInputFunc decode_input ; + CREncInputFunc encode_output ; + CREncInputStrLenAsUtf8Func enc_str_len_as_utf8 ; + CREncUtf8StrLenAsOutputFunc utf8_str_len_as_enc ; +} ; + +CREncHandler * +cr_enc_handler_get_instance (enum CREncoding a_enc) ; + +enum CRStatus +cr_enc_handler_resolve_enc_alias (const guchar *a_alias_name, + enum CREncoding *a_enc) ; + +enum CRStatus +cr_enc_handler_convert_input (CREncHandler *a_this, + const guchar *a_in, + gulong *a_in_len, + guchar **a_out, + gulong *a_out_len) ; + +G_END_DECLS + +#endif /*__CR_ENC_HANDLER_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-fonts.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-fonts.h new file mode 100755 index 00000000..9eaeeeb9 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-fonts.h @@ -0,0 +1,315 @@ +/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of + * the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the + * GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * Author: Dodji Seketeli + * See COPYRIGHTS file for copyright information. + */ + +#ifndef __CR_FONTS_H__ +#define __CR_FONTS_H__ + +#include "cr-utils.h" +#include "cr-num.h" + +/** + *@file + *Various type declarations about font selection related + *properties. + */ +G_BEGIN_DECLS + + +enum CRFontFamilyType +{ + FONT_FAMILY_SANS_SERIF, + FONT_FAMILY_SERIF, + FONT_FAMILY_CURSIVE, + FONT_FAMILY_FANTASY, + FONT_FAMILY_MONOSPACE, + FONT_FAMILY_NON_GENERIC, + FONT_FAMILY_INHERIT, + /**/ + NB_FONT_FAMILIE_TYPES +} ; + +typedef struct _CRFontFamily CRFontFamily ; + +struct _CRFontFamily +{ + enum CRFontFamilyType type ; + + /* + *The name of the font family, in case + *it is non generic. + *Is set only if the type is FONT_FAMILY_NON_GENERIC. + */ + guchar *name ; + + CRFontFamily *next ; + CRFontFamily *prev ; +} ; + + +/** + *The different types + *of absolute font size. + *This is used by the 'font-size' + *property defined in css2 spec + *in chapter 15.2.4 . + *These values a indexes of + *table of size so please, do not + *change their definition order unless + *you know what you are doing. + */ +enum CRPredefinedAbsoluteFontSize +{ + FONT_SIZE_XX_SMALL=0, + FONT_SIZE_X_SMALL, + FONT_SIZE_SMALL, + FONT_SIZE_MEDIUM, + FONT_SIZE_LARGE, + FONT_SIZE_X_LARGE, + FONT_SIZE_XX_LARGE, + FONT_SIZE_INHERIT, + NB_PREDEFINED_ABSOLUTE_FONT_SIZES +} ; + +/** + *The different types + *of relative font size. + *This is used by the 'font-size' + *property defined in css2 spec + *in chapter 15.2.4 . + *These values a indexes of + *table of size so please, do not + *change their definition order unless + *you know what you are doing. + */ +enum CRRelativeFontSize +{ + FONT_SIZE_LARGER, + FONT_SIZE_SMALLER, + NB_RELATIVE_FONT_SIZE +} ; + +/** + *The type of font-size property. + *Used to define the type of #CRFontSize . + *See css2 spec chapter 15.2.4 to understand. + */ +enum CRFontSizeType { + /** + *If the type of #CRFontSize is + *PREDEFINED_ABSOLUTE_FONT_SIZE, + *the CRFontSize::value.predefined_absolute + *field will be defined. + */ + PREDEFINED_ABSOLUTE_FONT_SIZE, + + /** + *If the type of #CRFontSize is + *ABSOLUTE_FONT_SIZE, + *the CRFontSize::value.absolute + *field will be defined. + */ + ABSOLUTE_FONT_SIZE, + + /** + *If the type of #CRFontSize is + *RELATIVE_FONT_SIZE, + *the CRFontSize::value.relative + *field will be defined. + */ + RELATIVE_FONT_SIZE, + + /** + *If the type of #CRFontSize is + *INHERITED_FONT_SIZE, + *the None of the field of the CRFontSize::value enum + *will be defined. + */ + INHERITED_FONT_SIZE, + + NB_FONT_SIZE_TYPE +} ; + +typedef struct _CRFontSize CRFontSize ; +struct _CRFontSize { + enum CRFontSizeType type ; + union { + enum CRPredefinedAbsoluteFontSize predefined ; + enum CRRelativeFontSize relative ; + CRNum absolute ; + } value; +} ; + +enum CRFontSizeAdjustType +{ + FONT_SIZE_ADJUST_NONE = 0, + FONT_SIZE_ADJUST_NUMBER, + FONT_SIZE_ADJUST_INHERIT +} ; +typedef struct _CRFontSizeAdjust CRFontSizeAdjust ; +struct _CRFontSizeAdjust +{ + enum CRFontSizeAdjustType type ; + CRNum *num ; +} ; + +enum CRFontStyle +{ + FONT_STYLE_NORMAL=0, + FONT_STYLE_ITALIC, + FONT_STYLE_OBLIQUE, + FONT_STYLE_INHERIT +} ; + +enum CRFontVariant +{ + FONT_VARIANT_NORMAL=0, + FONT_VARIANT_SMALL_CAPS, + FONT_VARIANT_INHERIT +} ; + +enum CRFontWeight +{ + FONT_WEIGHT_NORMAL = 1, + FONT_WEIGHT_BOLD = 1<<1, + FONT_WEIGHT_BOLDER = 1<<2, + FONT_WEIGHT_LIGHTER = 1<<3, + FONT_WEIGHT_100 = 1<<4, + FONT_WEIGHT_200 = 1<<5, + FONT_WEIGHT_300 = 1<<6, + FONT_WEIGHT_400 = 1<<7, + FONT_WEIGHT_500 = 1<<8, + FONT_WEIGHT_600 = 1<<9, + FONT_WEIGHT_700 = 1<<10, + FONT_WEIGHT_800 = 1<<11, + FONT_WEIGHT_900 = 1<<12, + FONT_WEIGHT_INHERIT = 1<<13, + NB_FONT_WEIGHTS +} ; + +enum CRFontStretch +{ + FONT_STRETCH_NORMAL=0, + FONT_STRETCH_WIDER, + FONT_STRETCH_NARROWER, + FONT_STRETCH_ULTRA_CONDENSED, + FONT_STRETCH_EXTRA_CONDENSED, + FONT_STRETCH_CONDENSED, + FONT_STRETCH_SEMI_CONDENSED, + FONT_STRETCH_SEMI_EXPANDED, + FONT_STRETCH_EXPANDED, + FONT_STRETCH_EXTRA_EXPANDED, + FONT_STRETCH_ULTRA_EXPANDED, + FONT_STRETCH_INHERIT +} ; + +/************************************** + *'font-family' manipulation functions + ***************************************/ +CRFontFamily * +cr_font_family_new (enum CRFontFamilyType a_type, guchar *a_name) ; + +CRFontFamily * +cr_font_family_append (CRFontFamily *a_this, + CRFontFamily *a_family_to_append) ; + +guchar * +cr_font_family_to_string (CRFontFamily const *a_this, + gboolean a_walk_font_family_list) ; + +CRFontFamily * +cr_font_family_prepend (CRFontFamily *a_this, + CRFontFamily *a_family_to_prepend); + +enum CRStatus +cr_font_family_destroy (CRFontFamily *a_this) ; + +enum CRStatus +cr_font_family_set_name (CRFontFamily *a_this, guchar *a_name) ; + + +/************************************ + *'font-size' manipulation functions + ***********************************/ + +CRFontSize * cr_font_size_new (void) ; + +enum CRStatus cr_font_size_clear (CRFontSize *a_this) ; + +enum CRStatus cr_font_size_copy (CRFontSize *a_dst, + CRFontSize const *a_src) ; +enum CRStatus cr_font_size_set_predefined_absolute_font_size (CRFontSize *a_this, + enum CRPredefinedAbsoluteFontSize a_predefined) ; +enum CRStatus cr_font_size_set_relative_font_size (CRFontSize *a_this, + enum CRRelativeFontSize a_relative) ; + +enum CRStatus cr_font_size_set_absolute_font_size (CRFontSize *a_this, + enum CRNumType a_num_type, + gdouble a_value) ; + +enum CRStatus cr_font_size_set_to_inherit (CRFontSize *a_this) ; + +gboolean cr_font_size_is_set_to_inherit (CRFontSize const *a_this) ; + +gchar* cr_font_size_to_string (CRFontSize const *a_this) ; + +void cr_font_size_destroy (CRFontSize *a_font_size) ; + +/******************************************************* + *'font-size-adjust' manipulation function declarations + *******************************************************/ + +CRFontSizeAdjust * cr_font_size_adjust_new (void) ; + +gchar * cr_font_size_adjust_to_string (CRFontSizeAdjust const *a_this) ; + +void cr_font_size_adjust_destroy (CRFontSizeAdjust *a_this) ; + +void +cr_font_size_get_smaller_predefined_font_size (enum CRPredefinedAbsoluteFontSize a_font_size, + enum CRPredefinedAbsoluteFontSize *a_smaller_size) ; +void +cr_font_size_get_larger_predefined_font_size (enum CRPredefinedAbsoluteFontSize a_font_size, + enum CRPredefinedAbsoluteFontSize *a_larger_size) ; + +gboolean +cr_font_size_is_predefined_absolute_font_size (enum CRPredefinedAbsoluteFontSize a_font_size) ; + +/*********************************** + *various other font related functions + ***********************************/ +const gchar * cr_font_style_to_string (enum CRFontStyle a_code) ; + +const gchar * cr_font_weight_to_string (enum CRFontWeight a_code) ; + +enum CRFontWeight +cr_font_weight_get_bolder (enum CRFontWeight a_weight) ; + +const gchar * cr_font_variant_to_string (enum CRFontVariant a_code) ; + +const gchar * cr_font_stretch_to_string (enum CRFontStretch a_code) ; + +G_END_DECLS + +#endif diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-input.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-input.h new file mode 100755 index 00000000..9eb402a8 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-input.h @@ -0,0 +1,174 @@ +/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset:8 -*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * Author: Dodji Seketeli + * See the COPYRIGHTS file for copyrights information. + */ + +#ifndef __CR_INPUT_SRC_H__ +#define __CR_INPUT_SRC_H__ + + +#include <glib.h> +#include "cr-utils.h" +#include "cr-parsing-location.h" + +G_BEGIN_DECLS + +/** + *@file + *The libcroco basic input stream class + *declaration file. + */ + +typedef struct _CRInput CRInput ; +typedef struct _CRInputPriv CRInputPriv ; + +/** + *The #CRInput class provides the abstraction of + *an utf8-encoded character stream. + */ +struct _CRInput +{ + CRInputPriv *priv ; +} ; + +typedef struct _CRInputPos CRInputPos ; + +struct _CRInputPos +{ + glong line ; + glong col ; + gboolean end_of_file ; + gboolean end_of_line ; + glong next_byte_index ; +} ; + +CRInput * +cr_input_new_from_buf (guchar *a_buf, gulong a_len, + enum CREncoding a_enc, gboolean a_free_buf) ; +CRInput * +cr_input_new_from_uri (const gchar *a_file_uri, + enum CREncoding a_enc) ; + +void +cr_input_destroy (CRInput *a_this) ; + +void +cr_input_ref (CRInput *a_this) ; + +gboolean +cr_input_unref (CRInput *a_this) ; + +enum CRStatus +cr_input_read_byte (CRInput *a_this, guchar *a_byte) ; + +enum CRStatus +cr_input_read_char (CRInput *a_this, guint32 *a_char) ; + +enum CRStatus +cr_input_consume_chars (CRInput *a_this, guint32 a_char, + gulong *a_nb_char) ; + +enum CRStatus +cr_input_consume_char (CRInput *a_this, guint32 a_char) ; + +enum CRStatus +cr_input_consume_white_spaces (CRInput *a_this, gulong *a_nb_chars) ; + +enum CRStatus +cr_input_peek_byte (CRInput const *a_this, enum CRSeekPos a_origin, + gulong a_offset, guchar *a_byte) ; + +guchar +cr_input_peek_byte2 (CRInput const *a_this, gulong a_offset, + gboolean *a_eof) ; + +enum CRStatus +cr_input_peek_char (CRInput const *a_this, guint32 *a_char) ; + +guchar * +cr_input_get_byte_addr (CRInput *a_this, + gulong a_offset) ; + +enum CRStatus +cr_input_get_cur_byte_addr (CRInput *a_this, guchar ** a_offset) ; + +enum CRStatus +cr_input_seek_index (CRInput *a_this, + enum CRSeekPos a_origin, gint a_pos) ; + +enum CRStatus +cr_input_get_cur_index (CRInput const *a_this, glong *a_index) ; + +enum CRStatus +cr_input_set_cur_index (CRInput *a_this, glong a_index) ; + +enum CRStatus +cr_input_get_cur_pos (CRInput const *a_this, CRInputPos * a_pos) ; + +enum CRStatus +cr_input_set_cur_pos (CRInput *a_this, CRInputPos const *a_pos) ; + +enum CRStatus +cr_input_get_parsing_location (CRInput const *a_this, + CRParsingLocation *a_loc) ; + +enum CRStatus +cr_input_get_end_of_line (CRInput const *a_this, gboolean *a_eol) ; + +enum CRStatus +cr_input_set_end_of_line (CRInput *a_this, gboolean a_eol) ; + +enum CRStatus +cr_input_get_end_of_file (CRInput const *a_this, gboolean *a_eof) ; + +enum CRStatus +cr_input_set_end_of_file (CRInput *a_this, gboolean a_eof) ; + +enum CRStatus +cr_input_set_line_num (CRInput *a_this, glong a_line_num) ; + +enum CRStatus +cr_input_get_line_num (CRInput const *a_this, glong *a_line_num) ; + +enum CRStatus +cr_input_set_column_num (CRInput *a_this, glong a_col) ; + +enum CRStatus +cr_input_get_column_num (CRInput const *a_this, glong *a_col) ; + +enum CRStatus +cr_input_increment_line_num (CRInput *a_this, + glong a_increment) ; + +enum CRStatus +cr_input_increment_col_num (CRInput *a_this, + glong a_increment) ; + +glong +cr_input_get_nb_bytes_left (CRInput const *a_this) ; + +enum CRStatus +cr_input_end_of_input (CRInput const *a_this, gboolean *a_end_of_input) ; + +G_END_DECLS + +#endif /*__CR_INPUT_SRC_H__*/ + diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-num.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-num.h new file mode 100755 index 00000000..2b73aaf7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-num.h @@ -0,0 +1,127 @@ +/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * Author: Dodji Seketeli + * See COPYRIGHTS file for copyright information + */ + + +/** + *@file + *The declaration + *of the #CRNum class. + */ + +#ifndef __CR_NUM_H__ +#define __CR_NUM_H__ + +#include <glib.h> +#include "cr-utils.h" +#include "cr-parsing-location.h" + +G_BEGIN_DECLS + +/** + *@file + *The declaration of the #CRNum class. + * + */ + +/** + *The different types + *of numbers. + *Please, do not modify + *the declaration order of the enum + *members, unless you know + *what you are doing. + */ +enum CRNumType +{ + NUM_AUTO = 0, + NUM_GENERIC, + NUM_LENGTH_EM, + NUM_LENGTH_EX, + NUM_LENGTH_PX, + NUM_LENGTH_IN, + NUM_LENGTH_CM, + NUM_LENGTH_MM, + NUM_LENGTH_PT, + NUM_LENGTH_PC, + NUM_ANGLE_DEG, + NUM_ANGLE_RAD, + NUM_ANGLE_GRAD, + NUM_TIME_MS, + NUM_TIME_S, + NUM_FREQ_HZ, + NUM_FREQ_KHZ, + NUM_PERCENTAGE, + NUM_INHERIT, + NUM_UNKNOWN_TYPE, + NB_NUM_TYPE +} ; + + +/** + *An abstraction of a number (num) + *as defined in the css2 spec. + */ +typedef struct _CRNum CRNum ; + +/** + *An abstraction of a number (num) + *as defined in the css2 spec. + */ +struct _CRNum +{ + enum CRNumType type ; + gdouble val ; + CRParsingLocation location ; +} ; + +CRNum * +cr_num_new (void) ; + +CRNum * +cr_num_new_with_val (gdouble a_val, + enum CRNumType a_type) ; + +CRNum * +cr_num_dup (CRNum const *a_this) ; + +guchar * +cr_num_to_string (CRNum const *a_this) ; + +enum CRStatus +cr_num_copy (CRNum *a_dest, CRNum const *a_src) ; + +enum CRStatus +cr_num_set (CRNum *a_this, gdouble a_val, + enum CRNumType a_type) ; + +gboolean +cr_num_is_fixed_length (CRNum const *a_this) ; + +void +cr_num_destroy (CRNum *a_this) ; + + +G_END_DECLS + + +#endif /*__CR_NUM_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-om-parser.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-om-parser.h new file mode 100755 index 00000000..13d35b1c --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-om-parser.h @@ -0,0 +1,98 @@ +/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */ + +/* + * This file is part of The Croco Library + * + * Copyright (C) 2002-2003 Dodji Seketeli <dodji@seketeli.org> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the + * GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ + +/* + *$Id$ + */ + +#ifndef __CR_OM_PARSER_H__ +#define __CR_OM_PARSER_H__ + +#include "cr-parser.h" +#include "cr-cascade.h" + + +/** + *@file + *The definition of the CSS Object Model Parser. + *This parser uses (and sits) the SAC api of libcroco defined + *in cr-parser.h and cr-doc-handler.h + */ + +G_BEGIN_DECLS + +typedef struct _CROMParser CROMParser ; +typedef struct _CROMParserPriv CROMParserPriv ; + +/** + *The Object model parser. + *Can parse a css file and build a css object model. + *This parser uses an instance of #CRParser and defines + *a set of SAC callbacks to build the Object Model. + */ +struct _CROMParser +{ + CROMParserPriv *priv ; +} ; + +CROMParser * cr_om_parser_new (CRInput *a_input) ; + + +enum CRStatus cr_om_parser_simply_parse_file (const guchar *a_file_path, + enum CREncoding a_enc, + CRStyleSheet **a_result) ; + +enum CRStatus cr_om_parser_parse_file (CROMParser *a_this, + const guchar *a_file_uri, + enum CREncoding a_enc, + CRStyleSheet **a_result) ; + +enum CRStatus cr_om_parser_simply_parse_buf (const guchar *a_buf, + gulong a_len, + enum CREncoding a_enc, + CRStyleSheet **a_result) ; + +enum CRStatus cr_om_parser_parse_buf (CROMParser *a_this, + const guchar *a_buf, + gulong a_len, + enum CREncoding a_enc, + CRStyleSheet **a_result) ; + +enum CRStatus cr_om_parser_parse_paths_to_cascade (CROMParser *a_this, + const guchar *a_author_path, + const guchar *a_user_path, + const guchar *a_ua_path, + enum CREncoding a_encoding, + CRCascade ** a_result) ; + +enum CRStatus cr_om_parser_simply_parse_paths_to_cascade (const guchar *a_author_path, + const guchar *a_user_path, + const guchar *a_ua_path, + enum CREncoding a_encoding, + CRCascade ** a_result) ; + +void cr_om_parser_destroy (CROMParser *a_this) ; + +G_END_DECLS + +#endif /*__CR_OM_PARSER_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-parser.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-parser.h new file mode 100755 index 00000000..6dce9439 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-parser.h @@ -0,0 +1,128 @@ +/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * Author: Dodji Seketeli + * See COPYRIGHTS file for copyrights information. + */ + +#ifndef __CR_PARSER_H__ +#define __CR_PARSER_H__ + +#include <glib.h> +#include "cr-input.h" +#include "cr-tknzr.h" +#include "cr-utils.h" +#include "cr-doc-handler.h" + +G_BEGIN_DECLS + +/** + *@file + *The declaration file + *of the #CRParser class. + */ +typedef struct _CRParser CRParser ; +typedef struct _CRParserPriv CRParserPriv ; + + +/** + *The implementation of + *the SAC parser. + *The Class is opaque + *and must be manipulated through + *the provided methods. + */ +struct _CRParser { + CRParserPriv *priv ; +} ; + + +CRParser * cr_parser_new (CRTknzr *a_tknzr) ; + +CRParser * cr_parser_new_from_buf (guchar *a_buf, gulong a_len, + enum CREncoding a_enc, + gboolean a_free_buf) ; + +CRParser * cr_parser_new_from_file (const guchar *a_file_uri, + enum CREncoding a_enc) ; + +CRParser * cr_parser_new_from_input (CRInput *a_input) ; + +enum CRStatus cr_parser_set_tknzr (CRParser *a_this, CRTknzr *a_tknzr) ; + +enum CRStatus cr_parser_get_tknzr (CRParser *a_this, CRTknzr **a_tknzr) ; + +enum CRStatus cr_parser_get_parsing_location (CRParser const *a_this, CRParsingLocation *a_loc) ; + +enum CRStatus cr_parser_try_to_skip_spaces_and_comments (CRParser *a_this) ; + + +enum CRStatus cr_parser_set_sac_handler (CRParser *a_this, + CRDocHandler *a_handler) ; + +enum CRStatus cr_parser_get_sac_handler (CRParser *a_this, + CRDocHandler **a_handler) ; + +enum CRStatus cr_parser_set_use_core_grammar (CRParser *a_this, + gboolean a_use_core_grammar) ; +enum CRStatus cr_parser_get_use_core_grammar (CRParser const *a_this, + gboolean *a_use_core_grammar) ; + +enum CRStatus cr_parser_parse (CRParser *a_this) ; + +enum CRStatus cr_parser_parse_file (CRParser *a_this, + const guchar *a_file_uri, + enum CREncoding a_enc) ; + +enum CRStatus cr_parser_parse_buf (CRParser *a_this, const guchar *a_buf, + gulong a_len, enum CREncoding a_enc) ; + +enum CRStatus cr_parser_set_default_sac_handler (CRParser *a_this) ; + +enum CRStatus cr_parser_parse_term (CRParser *a_this, CRTerm **a_term) ; + +enum CRStatus cr_parser_parse_expr (CRParser *a_this, CRTerm **a_expr) ; + +enum CRStatus cr_parser_parse_prio (CRParser *a_this, CRString **a_prio) ; + +enum CRStatus cr_parser_parse_declaration (CRParser *a_this, CRString **a_property, + CRTerm **a_expr, gboolean *a_important) ; + +enum CRStatus cr_parser_parse_statement_core (CRParser *a_this) ; + +enum CRStatus cr_parser_parse_ruleset (CRParser *a_this) ; + +enum CRStatus cr_parser_parse_import (CRParser *a_this, GList ** a_media_list, + CRString **a_import_string, + CRParsingLocation *a_location) ; + +enum CRStatus cr_parser_parse_media (CRParser *a_this) ; + +enum CRStatus cr_parser_parse_page (CRParser *a_this) ; + +enum CRStatus cr_parser_parse_charset (CRParser *a_this, CRString **a_value, + CRParsingLocation *a_charset_sym_location) ; + +enum CRStatus cr_parser_parse_font_face (CRParser *a_this) ; + +void cr_parser_destroy (CRParser *a_this) ; + +G_END_DECLS + +#endif /*__CR_PARSER_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-parsing-location.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-parsing-location.h new file mode 100755 index 00000000..b8064a56 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-parsing-location.h @@ -0,0 +1,70 @@ +/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * Author: Dodji Seketeli. + * See the COPYRIGHTS file for copyright information. + */ + +#ifndef __CR_PARSING_LOCATION_H__ +#define __CR_PARSING_LOCATION_H__ + +#include "cr-utils.h" + +G_BEGIN_DECLS + +/** + *@file + *The declaration of the CRParsingLocation + *object. This object keeps track of line/column/byte offset/ + *at which the parsing of a given CSS construction appears. + */ + +typedef struct _CRParsingLocation CRParsingLocation; +struct _CRParsingLocation { + guint line ; + guint column ; + guint byte_offset ; +} ; + + +enum CRParsingLocationSerialisationMask { + DUMP_LINE = 1, + DUMP_COLUMN = 1 << 1, + DUMP_BYTE_OFFSET = 1 << 2 +} ; + +CRParsingLocation * cr_parsing_location_new (void) ; + +enum CRStatus cr_parsing_location_init (CRParsingLocation *a_this) ; + +enum CRStatus cr_parsing_location_copy (CRParsingLocation *a_to, + CRParsingLocation const *a_from) ; + +gchar * cr_parsing_location_to_string (CRParsingLocation const *a_this, + enum CRParsingLocationSerialisationMask a_mask) ; +void cr_parsing_location_dump (CRParsingLocation const *a_this, + enum CRParsingLocationSerialisationMask a_mask, + FILE *a_fp) ; + +void cr_parsing_location_destroy (CRParsingLocation *a_this) ; + + + +G_END_DECLS +#endif diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-prop-list.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-prop-list.h new file mode 100755 index 00000000..797ba43e --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-prop-list.h @@ -0,0 +1,80 @@ +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * Author: Dodji Seketeli + * See COPYRIGHTS file for copyrights information. + */ + +#ifndef __CR_PROP_LIST_H__ +#define __CR_PROP_LIST_H__ + +#include "cr-utils.h" +#include "cr-declaration.h" +#include "cr-string.h" + +G_BEGIN_DECLS + +typedef struct _CRPropList CRPropList ; +typedef struct _CRPropListPriv CRPropListPriv ; + +struct _CRPropList +{ + CRPropListPriv * priv; +} ; + +CRPropList * cr_prop_list_append (CRPropList *a_this, + CRPropList *a_to_append) ; + +CRPropList * cr_prop_list_append2 (CRPropList *a_this, + CRString *a_prop, + CRDeclaration *a_decl) ; + +CRPropList * cr_prop_list_prepend (CRPropList *a_this, + CRPropList *a_to_append) ; + +CRPropList * cr_prop_list_prepend2 (CRPropList *a_this, + CRString *a_prop, + CRDeclaration *a_decl) ; + +enum CRStatus cr_prop_list_set_prop (CRPropList *a_this, + CRString *a_prop) ; + +enum CRStatus cr_prop_list_get_prop (CRPropList const *a_this, + CRString **a_prop) ; + +enum CRStatus cr_prop_list_lookup_prop (CRPropList *a_this, + CRString *a_prop, + CRPropList**a_pair) ; + +CRPropList * cr_prop_list_get_next (CRPropList *a_this) ; + +CRPropList * cr_prop_list_get_prev (CRPropList *a_this) ; + +enum CRStatus cr_prop_list_set_decl (CRPropList *a_this, + CRDeclaration *a_decl); + +enum CRStatus cr_prop_list_get_decl (CRPropList const *a_this, + CRDeclaration **a_decl) ; + +CRPropList * cr_prop_list_unlink (CRPropList *a_this, + CRPropList *a_pair) ; + +void cr_prop_list_destroy (CRPropList *a_this) ; + +G_END_DECLS + +#endif /*__CR_PROP_LIST_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-pseudo.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-pseudo.h new file mode 100755 index 00000000..8917da45 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-pseudo.h @@ -0,0 +1,64 @@ +/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * See COPYRIGHTS file for copyright information + */ + +#ifndef __CR_PSEUDO_H__ +#define __CR_PSEUDO_H__ + +#include <stdio.h> +#include <glib.h> +#include "cr-attr-sel.h" +#include "cr-parsing-location.h" + +G_BEGIN_DECLS + +enum CRPseudoType +{ + IDENT_PSEUDO = 0, + FUNCTION_PSEUDO +} ; + +typedef struct _CRPseudo CRPseudo ; + +/** + *The CRPseudo Class. + *Abstract a "pseudo" as defined by the css2 spec + *in appendix D.1 . + */ +struct _CRPseudo +{ + enum CRPseudoType type ; + CRString *name ; + CRString *extra ; + CRParsingLocation location ; +} ; + +CRPseudo * cr_pseudo_new (void) ; + +guchar * cr_pseudo_to_string (CRPseudo const *a_this) ; + +void cr_pseudo_dump (CRPseudo const *a_this, FILE *a_fp) ; + +void cr_pseudo_destroy (CRPseudo *a_this) ; + +G_END_DECLS + +#endif /*__CR_PSEUDO_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-rgb.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-rgb.h new file mode 100755 index 00000000..a127a440 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-rgb.h @@ -0,0 +1,94 @@ +/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * see COPYRIGHTS file for copyright information. + */ + +#ifndef __CR_RGB_H__ +#define __CR_RGB_H__ + +#include <stdio.h> +#include <glib.h> +#include "cr-utils.h" +#include "cr-parsing-location.h" + +G_BEGIN_DECLS + + +typedef struct _CRRgb CRRgb ; +struct _CRRgb +{ + /* + *the unit of the rgb. + *Either NO_UNIT (integer) or + *UNIT_PERCENTAGE (percentage). + */ + const guchar *name ; + glong red ; + glong green ; + glong blue ; + gboolean is_percentage ; + gboolean inherit ; + gboolean is_transparent ; + CRParsingLocation location ; +} ; + +CRRgb * cr_rgb_new (void) ; + +CRRgb * cr_rgb_new_with_vals (gulong a_red, gulong a_green, + gulong a_blue, gboolean a_is_percentage) ; + +CRRgb *cr_rgb_parse_from_buf(const guchar *a_str, + enum CREncoding a_enc); + +enum CRStatus cr_rgb_compute_from_percentage (CRRgb *a_this) ; + +enum CRStatus cr_rgb_set (CRRgb *a_this, gulong a_red, + gulong a_green, gulong a_blue, + gboolean a_is_percentage) ; + +enum CRStatus cr_rgb_copy (CRRgb *a_dest, CRRgb const *a_src) ; + +enum CRStatus cr_rgb_set_to_inherit (CRRgb *a_this, gboolean a_inherit) ; + +gboolean cr_rgb_is_set_to_inherit (CRRgb const *a_this) ; + +gboolean cr_rgb_is_set_to_transparent (CRRgb const *a_this) ; + +enum CRStatus cr_rgb_set_to_transparent (CRRgb *a_this, + gboolean a_is_transparent) ; +enum CRStatus cr_rgb_set_from_rgb (CRRgb *a_this, CRRgb const *a_rgb) ; + +enum CRStatus cr_rgb_set_from_name (CRRgb *a_this, const guchar *a_color_name) ; + +enum CRStatus cr_rgb_set_from_hex_str (CRRgb *a_this, const guchar * a_hex_value) ; + +struct _CRTerm; + +enum CRStatus cr_rgb_set_from_term (CRRgb *a_this, const struct _CRTerm *a_value); + +guchar * cr_rgb_to_string (CRRgb const *a_this) ; + +void cr_rgb_dump (CRRgb const *a_this, FILE *a_fp) ; + +void cr_rgb_destroy (CRRgb *a_this) ; + +G_END_DECLS + +#endif /*__CR_RGB_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-sel-eng.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-sel-eng.h new file mode 100755 index 00000000..cab3d14b --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-sel-eng.h @@ -0,0 +1,110 @@ +/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * Author: Dodji Seketeli + * See COPYRIGHTS file for copyrights information. + */ + +#ifndef __CR_SEL_ENG_H__ +#define __CR_SEL_ENG_H__ + +#include "cr-utils.h" +#include "cr-stylesheet.h" +#include "cr-cascade.h" +#include "cr-style.h" +#include "cr-prop-list.h" + +#include <libxml/tree.h> + +/** + *@file: + *The declaration of the #CRSelEng class. + *The #CRSelEng is actually the "Selection Engine" + *class. + */ + +G_BEGIN_DECLS + +typedef struct _CRSelEng CRSelEng ; +typedef struct _CRSelEngPriv CRSelEngPriv ; + +/** + *The Selection engine class. + *The main service provided by this class, is + *the ability to interpret a libcroco implementation + *of css2 selectors, and given an xml node, say if + *the selector matches the node or not. + */ +struct _CRSelEng +{ + CRSelEngPriv *priv ; +} ; + + +typedef gboolean (*CRPseudoClassSelectorHandler) (CRSelEng* a_this, + CRAdditionalSel *a_add_sel, + xmlNode *a_node) ; +CRSelEng * cr_sel_eng_new (void) ; + +enum CRStatus cr_sel_eng_register_pseudo_class_sel_handler (CRSelEng *a_this, + guchar *a_pseudo_class_sel_name, + enum CRPseudoType a_pseudo_class_type, + CRPseudoClassSelectorHandler a_handler) ; + +enum CRStatus cr_sel_eng_unregister_pseudo_class_sel_handler (CRSelEng *a_this, + guchar *a_pseudo_class_sel_name, + enum CRPseudoType a_pseudo_class_type) ; + +enum CRStatus cr_sel_eng_unregister_all_pseudo_class_sel_handlers (CRSelEng *a_this) ; + +enum CRStatus cr_sel_eng_get_pseudo_class_selector_handler (CRSelEng *a_this, + guchar *a_pseudo_class_sel_name, + enum CRPseudoType a_pseudo_class_type, + CRPseudoClassSelectorHandler *a_handler) ; + +enum CRStatus cr_sel_eng_matches_node (CRSelEng *a_this, + CRSimpleSel *a_sel, + xmlNode *a_node, + gboolean *a_result) ; + +enum CRStatus cr_sel_eng_get_matched_rulesets (CRSelEng *a_this, + CRStyleSheet *a_sheet, + xmlNode *a_node, + CRStatement ***a_rulesets, + gulong *a_len) ; + +enum CRStatus +cr_sel_eng_get_matched_properties_from_cascade (CRSelEng *a_this, + CRCascade *a_cascade, + xmlNode *a_node, + CRPropList **a_props) ; + +enum CRStatus cr_sel_eng_get_matched_style (CRSelEng *a_this, + CRCascade *a_cascade, + xmlNode *a_node, + CRStyle *a_parent_style, + CRStyle **a_style, + gboolean a_set_props_to_initial_values) ; + +void cr_sel_eng_destroy (CRSelEng *a_this) ; + +G_END_DECLS + + +#endif/*__CR_SEL_ENG_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-selector.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-selector.h new file mode 100755 index 00000000..dd6a7f78 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-selector.h @@ -0,0 +1,95 @@ +/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * + * Author: Dodji Seketeli + * See COPYRIGHTS file for copyright information. + */ + +#ifndef __CR_SELECTOR_H__ +#define __CR_SELECTOR_H__ + +#include <stdio.h> +#include "cr-utils.h" +#include "cr-simple-sel.h" +#include "cr-parsing-location.h" + +/** + *@file + *The declaration file of the #CRSelector file. + */ + +G_BEGIN_DECLS + +typedef struct _CRSelector CRSelector ; + +/** + *Abstracts a CSS2 selector as defined in the right part + *of the 'ruleset" production in the appendix D.1 of the + *css2 spec. + *It is actually the abstraction of a comma separated list + *of simple selectors list. + *In a css2 file, a selector is a list of simple selectors + *separated by a comma. + *e.g: sel0, sel1, sel2 ... + *Each seln is a simple selector + */ +struct _CRSelector +{ + /** + *A Selection expression. + *It is a list of basic selectors. + *Each basic selector can be either an element + *selector, an id selector, a class selector, an + *attribute selector, an universal selector etc ... + */ + CRSimpleSel *simple_sel ; + + /**The next selector list element*/ + CRSelector *next ; + CRSelector *prev ; + CRParsingLocation location ; + glong ref_count ; +}; + +CRSelector* cr_selector_new (CRSimpleSel *a_sel_expr) ; + +CRSelector * cr_selector_parse_from_buf (const guchar * a_char_buf, + enum CREncoding a_enc) ; + +CRSelector* cr_selector_append (CRSelector *a_this, CRSelector *a_new) ; + +CRSelector* cr_selector_append_simple_sel (CRSelector *a_this, + CRSimpleSel *a_simple_sel) ; + +CRSelector* cr_selector_prepend (CRSelector *a_this, CRSelector *a_new) ; + +guchar * cr_selector_to_string (CRSelector const *a_this) ; + +void cr_selector_dump (CRSelector const *a_this, FILE *a_fp) ; + +void cr_selector_ref (CRSelector *a_this) ; + +gboolean cr_selector_unref (CRSelector *a_this) ; + +void cr_selector_destroy (CRSelector *a_this) ; + +G_END_DECLS + +#endif /*__CR_SELECTOR_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-simple-sel.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-simple-sel.h new file mode 100755 index 00000000..d8edc002 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-simple-sel.h @@ -0,0 +1,130 @@ +/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * Author: Dodji Seketeli + * See COPYRIGHTS file for copyright information. + */ + + +#ifndef __CR_SEL_H__ +#define __CR_SEL_H__ + +#include <stdio.h> +#include <glib.h> +#include "cr-additional-sel.h" +#include "cr-parsing-location.h" + +G_BEGIN_DECLS + +/** + *@file + *the declaration of the #CRSimpleSel class. + * + */ +enum Combinator +{ + NO_COMBINATOR, + COMB_WS,/*whitespace: descendent*/ + COMB_PLUS,/*'+': preceded by*/ + COMB_GT/*greater than ('>'): child*/ +} ; + +enum SimpleSelectorType +{ + NO_SELECTOR_TYPE = 0, + UNIVERSAL_SELECTOR = 1, + TYPE_SELECTOR = 1 << 1 +} ; + +typedef struct _CRSimpleSel CRSimpleSel ; + +/** + *The abstraction of a css2 simple selection list + *as defined by the right part of the "selector" production in the + *appendix D.1 of the css2 spec. + *It is basically a list of simple selector, each + *simple selector being separated by a combinator. + * + *In the libcroco's implementation, each simple selector + *is made of at most two parts: + * + *1/An element name or 'type selector' (which can hold a '*' and + *then been called 'universal selector') + * + *2/An additional selector that "specializes" the preceding type or + *universal selector. The additionnal selector can be either + *an id selector, or a class selector, or an attribute selector. + */ +struct _CRSimpleSel +{ + enum SimpleSelectorType type_mask ; + gboolean is_case_sentive ; + CRString * name ; + /** + *The combinator that separates + *this simple selector from the previous + *one. + */ + enum Combinator combinator ; + + /** + *The additional selector list of the + *current simple selector. + *An additional selector may + *be a class selector, an id selector, + *or an attribute selector. + *Note that this field is a linked list. + */ + CRAdditionalSel *add_sel ; + + /* + *the specificity as specified by + *chapter 6.4.3 of the spec. + */ + gulong specificity ; + + CRSimpleSel *next ; + CRSimpleSel *prev ; + CRParsingLocation location ; +} ; + +CRSimpleSel * cr_simple_sel_new (void) ; + +CRSimpleSel * cr_simple_sel_append_simple_sel (CRSimpleSel *a_this, + CRSimpleSel *a_sel) ; + +CRSimpleSel * cr_simple_sel_prepend_simple_sel (CRSimpleSel *a_this, + CRSimpleSel *a_sel) ; + +guchar * cr_simple_sel_to_string (CRSimpleSel const *a_this) ; + +guchar * cr_simple_sel_one_to_string (CRSimpleSel const * a_this) ; + +enum CRStatus cr_simple_sel_dump (CRSimpleSel const *a_this, FILE *a_fp) ; + +enum CRStatus cr_simple_sel_dump_attr_sel_list (CRSimpleSel const *a_this) ; + +enum CRStatus cr_simple_sel_compute_specificity (CRSimpleSel *a_this) ; + +void cr_simple_sel_destroy (CRSimpleSel *a_this) ; + +G_END_DECLS + + +#endif /*__CR_SIMPLE_SEL_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-statement.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-statement.h new file mode 100755 index 00000000..74a23305 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-statement.h @@ -0,0 +1,440 @@ +/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * Author: Dodji Seketeli + * See COPYRIGHTS file for copyright information. + */ + +#include <stdio.h> +#include "cr-utils.h" +#include "cr-term.h" +#include "cr-selector.h" +#include "cr-declaration.h" + +#ifndef __CR_STATEMENT_H__ +#define __CR_STATEMENT_H__ + +G_BEGIN_DECLS + +/** + *@file + *Declaration of the #CRStatement class. + */ + +/* + *forward declaration of CRStyleSheet which is defined in + *cr-stylesheet.h + */ + +struct _CRStatement ; + +/* + *typedef struct _CRStatement CRStatement ; + *this is forward declared in + *cr-declaration.h already. + */ + +struct _CRAtMediaRule ; +typedef struct _CRAtMediaRule CRAtMediaRule ; + +typedef struct _CRRuleSet CRRuleSet ; + +/** + *The abstraction of a css ruleset. + *A ruleset is made of a list of selectors, + *followed by a list of declarations. + */ +struct _CRRuleSet +{ + /**A list of instances of #CRSimpeSel*/ + CRSelector *sel_list ; + + /**A list of instances of #CRDeclaration*/ + CRDeclaration *decl_list ; + + /** + *The parent media rule, or NULL if + *no parent media rule exists. + */ + CRStatement *parent_media_rule ; +} ; + +/* + *a forward declaration of CRStylesheet. + *CRStylesheet is actually declared in + *cr-stylesheet.h + */ +struct _CRStyleSheet ; +typedef struct _CRStyleSheet CRStyleSheet; + + +/**The \@import rule abstraction.*/ +typedef struct _CRAtImportRule CRAtImportRule ; +struct _CRAtImportRule +{ + /**the url of the import rule*/ + CRString *url ; + + GList *media_list ; + + /** + *the stylesheet fetched from the url, if any. + *this is not "owned" by #CRAtImportRule which means + *it is not destroyed by the destructor of #CRAtImportRule. + */ + CRStyleSheet * sheet; +}; + + +/**abstraction of an \@media rule*/ +struct _CRAtMediaRule +{ + GList *media_list ; + CRStatement *rulesets ; +} ; + + +typedef struct _CRAtPageRule CRAtPageRule ; +/**The \@page rule abstraction*/ +struct _CRAtPageRule +{ + /**a list of instances of #CRDeclaration*/ + CRDeclaration *decl_list ; + + /**page selector. Is a pseudo selector*/ + CRString *name ; + CRString *pseudo ; +} ; + +/**The \@charset rule abstraction*/ +typedef struct _CRAtCharsetRule CRAtCharsetRule ; +struct _CRAtCharsetRule +{ + CRString * charset ; +}; + +/**The abstaction of the \@font-face rule.*/ +typedef struct _CRAtFontFaceRule CRAtFontFaceRule ; +struct _CRAtFontFaceRule +{ + /*a list of instanaces of #CRDeclaration*/ + CRDeclaration *decl_list ; +} ; + + +/** + *The possible types of css2 statements. + */ +enum CRStatementType +{ + /** + *A generic css at-rule + *each unknown at-rule will + *be of this type. + */ + + /**A css at-rule*/ + AT_RULE_STMT = 0, + + /*A css ruleset*/ + RULESET_STMT, + + /**A css2 import rule*/ + AT_IMPORT_RULE_STMT, + + /**A css2 media rule*/ + AT_MEDIA_RULE_STMT, + + /**A css2 page rule*/ + AT_PAGE_RULE_STMT, + + /**A css2 charset rule*/ + AT_CHARSET_RULE_STMT, + + /**A css2 font face rule*/ + AT_FONT_FACE_RULE_STMT +} ; + + +/** + *The abstraction of css statement as defined + *in the chapter 4 and appendix D.1 of the css2 spec. + *A statement is actually a double chained list of + *statements.A statement can be a ruleset, an \@import + *rule, an \@page rule etc ... + */ +struct _CRStatement +{ + /** + *The type of the statement. + */ + enum CRStatementType type ; + + union + { + CRRuleSet *ruleset ; + CRAtImportRule *import_rule ; + CRAtMediaRule *media_rule ; + CRAtPageRule *page_rule ; + CRAtCharsetRule *charset_rule ; + CRAtFontFaceRule *font_face_rule ; + } kind ; + + /* + *the specificity of the selector + *that matched this statement. + *This is only used by the cascading + *order determination algorithm. + */ + gulong specificity ; + + /* + *the style sheet that contains + *this css statement. + */ + CRStyleSheet *parent_sheet ; + CRStatement *next ; + CRStatement *prev ; + + CRParsingLocation location ; + + /** + *a custom pointer useable by + *applications that use libcroco. + *libcroco itself will never modify + *this pointer. + */ + gpointer app_data ; + + /** + *a custom pointer used + *by the upper layers of libcroco. + *application should never use this + *pointer. + */ + gpointer croco_data ; + +} ; + + +gboolean +cr_statement_does_buf_parses_against_core (const guchar *a_buf, + enum CREncoding a_encoding) ; +CRStatement * +cr_statement_parse_from_buf (const guchar *a_buf, + enum CREncoding a_encoding) ; +CRStatement* +cr_statement_new_ruleset (CRStyleSheet *a_sheet, + CRSelector *a_sel_list, + CRDeclaration *a_decl_list, + CRStatement *a_media_rule) ; +CRStatement * +cr_statement_ruleset_parse_from_buf (const guchar * a_buf, + enum CREncoding a_enc) ; + +CRStatement* +cr_statement_new_at_import_rule (CRStyleSheet *a_container_sheet, + CRString *a_url, + GList *a_media_list, + CRStyleSheet *a_imported_sheet) ; + +CRStatement * +cr_statement_at_import_rule_parse_from_buf (const guchar * a_buf, + enum CREncoding a_encoding) ; + +CRStatement * +cr_statement_new_at_media_rule (CRStyleSheet *a_sheet, + CRStatement *a_ruleset, + GList *a_media) ; +CRStatement * +cr_statement_at_media_rule_parse_from_buf (const guchar *a_buf, + enum CREncoding a_enc) ; + +CRStatement * +cr_statement_new_at_charset_rule (CRStyleSheet *a_sheet, + CRString *a_charset) ; +CRStatement * +cr_statement_at_charset_rule_parse_from_buf (const guchar *a_buf, + enum CREncoding a_encoding); + + +CRStatement * +cr_statement_new_at_font_face_rule (CRStyleSheet *a_sheet, + CRDeclaration *a_font_decls) ; +CRStatement * +cr_statement_font_face_rule_parse_from_buf (const guchar *a_buf, + enum CREncoding a_encoding) ; + +CRStatement * +cr_statement_new_at_page_rule (CRStyleSheet *a_sheet, + CRDeclaration *a_decl_list, + CRString *a_name, + CRString *a_pseudo) ; +CRStatement * +cr_statement_at_page_rule_parse_from_buf (const guchar *a_buf, + enum CREncoding a_encoding) ; + +enum CRStatus +cr_statement_set_parent_sheet (CRStatement *a_this, + CRStyleSheet *a_sheet) ; + +enum CRStatus +cr_statement_get_parent_sheet (CRStatement *a_this, + CRStyleSheet **a_sheet) ; + +CRStatement * +cr_statement_append (CRStatement *a_this, + CRStatement *a_new) ; + +CRStatement* +cr_statement_prepend (CRStatement *a_this, + CRStatement *a_new) ; + +CRStatement * +cr_statement_unlink (CRStatement *a_stmt) ; + +enum CRStatus +cr_statement_ruleset_set_sel_list (CRStatement *a_this, + CRSelector *a_sel_list) ; + +enum CRStatus +cr_statement_ruleset_get_sel_list (CRStatement const *a_this, + CRSelector **a_list) ; + +enum CRStatus +cr_statement_ruleset_set_decl_list (CRStatement *a_this, + CRDeclaration *a_list) ; + +enum CRStatus +cr_statement_ruleset_get_declarations (CRStatement *a_this, + CRDeclaration **a_decl_list) ; + +enum CRStatus +cr_statement_ruleset_append_decl2 (CRStatement *a_this, + CRString *a_prop, CRTerm *a_value) ; + +enum CRStatus +cr_statement_ruleset_append_decl (CRStatement *a_this, + CRDeclaration *a_decl) ; + +enum CRStatus +cr_statement_at_import_rule_set_imported_sheet (CRStatement *a_this, + CRStyleSheet *a_sheet) ; + +enum CRStatus +cr_statement_at_import_rule_get_imported_sheet (CRStatement *a_this, + CRStyleSheet **a_sheet) ; + +enum CRStatus +cr_statement_at_import_rule_set_url (CRStatement *a_this, + CRString *a_url) ; + +enum CRStatus +cr_statement_at_import_rule_get_url (CRStatement const *a_this, + CRString **a_url) ; + +gint +cr_statement_at_media_nr_rules (CRStatement const *a_this) ; + +CRStatement * +cr_statement_at_media_get_from_list (CRStatement *a_this, int itemnr) ; + +enum CRStatus +cr_statement_at_page_rule_set_sel (CRStatement *a_this, + CRSelector *a_sel) ; + +enum CRStatus +cr_statement_at_page_rule_get_sel (CRStatement const *a_this, + CRSelector **a_sel) ; + +enum CRStatus +cr_statement_at_page_rule_set_declarations (CRStatement *a_this, + CRDeclaration *a_decl_list) ; + +enum CRStatus +cr_statement_at_page_rule_get_declarations (CRStatement *a_this, + CRDeclaration **a_decl_list) ; + +enum CRStatus +cr_statement_at_charset_rule_set_charset (CRStatement *a_this, + CRString *a_charset) ; + +enum CRStatus +cr_statement_at_charset_rule_get_charset (CRStatement const *a_this, + CRString **a_charset) ; + +enum CRStatus +cr_statement_at_font_face_rule_set_decls (CRStatement *a_this, + CRDeclaration *a_decls) ; + +enum CRStatus +cr_statement_at_font_face_rule_get_decls (CRStatement *a_this, + CRDeclaration **a_decls) ; + +enum CRStatus +cr_statement_at_font_face_rule_add_decl (CRStatement *a_this, + CRString *a_prop, + CRTerm *a_value) ; + +gchar * +cr_statement_to_string (CRStatement const * a_this, gulong a_indent) ; + +gchar* +cr_statement_list_to_string (CRStatement const *a_this, gulong a_indent) ; + +void +cr_statement_dump (CRStatement const *a_this, FILE *a_fp, gulong a_indent) ; + +void +cr_statement_dump_ruleset (CRStatement const * a_this, FILE * a_fp, + glong a_indent) ; + +void +cr_statement_dump_font_face_rule (CRStatement const * a_this, + FILE * a_fp, + glong a_indent) ; + +void +cr_statement_dump_page (CRStatement const * a_this, FILE * a_fp, + gulong a_indent) ; + + +void +cr_statement_dump_media_rule (CRStatement const * a_this, + FILE * a_fp, + gulong a_indent) ; + +void +cr_statement_dump_import_rule (CRStatement const * a_this, FILE * a_fp, + gulong a_indent) ; +void +cr_statement_dump_charset (CRStatement const * a_this, FILE * a_fp, + gulong a_indent) ; +gint +cr_statement_nr_rules (CRStatement const *a_this) ; + +CRStatement * +cr_statement_get_from_list (CRStatement *a_this, int itemnr) ; + +void +cr_statement_destroy (CRStatement *a_this) ; + +G_END_DECLS + +#endif /*__CR_STATEMENT_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-string.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-string.h new file mode 100755 index 00000000..2700f0e2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-string.h @@ -0,0 +1,76 @@ +/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * See COPYRIGHTS file for copyright information. + */ + +/** + *@file + *Declaration file of the #CRString class. + */ + +#ifndef __CR_STRING_H__ +#define __CR_STRING_H__ + +#include <glib.h> +#include "cr-utils.h" +#include "cr-parsing-location.h" + +G_BEGIN_DECLS + +typedef struct _CRString CRString ; + +/** + *This is a ship implementation of string based on GString. + *Actually, the aim of CRString is to store the parsing location + *(line,column,byte offset) at which a given string has been parsed + *in the input CSS. + *So this class has a gstring field of type GString that users can + *freely manipulate, and also a CRParginLocation type where the + *parsing location is store. If you don't want to deal with parsing + *location stuffs, then use GString instead. If we were in C++ for example, + *CRString would just inherit GString and just add accessors to + *the CRParsingLocation data ... but we are not and we still have + *to provide the parsing location information. + */ +struct _CRString { + /** + *The GString where all the string + *operation happen. + */ + GString *stryng ; + /** + *The parsing location storage area. + */ + CRParsingLocation location ; +} ; + +CRString * cr_string_new (void) ; + +CRString *cr_string_new_from_string (const gchar * a_string) ; +CRString * cr_string_new_from_gstring (GString const *a_string) ; +CRString *cr_string_dup (CRString const *a_this) ; +gchar *cr_string_dup2 (CRString const *a_this) ; +const gchar *cr_string_peek_raw_str (CRString const *a_this) ; +gint cr_string_peek_raw_str_len (CRString const *a_this) ; +void cr_string_destroy (CRString *a_this) ; + +G_END_DECLS + +#endif diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-style.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-style.h new file mode 100755 index 00000000..18aeaad0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-style.h @@ -0,0 +1,339 @@ +/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */ + +/* + * This file is part of The Croco Library + * + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * Author: Dodji Seketeli. + * See COPYRIGHTS file for copyright information. + */ + +#ifndef __CR_STYLE_H__ +#define __CR_STYLE_H__ + +#include "cr-utils.h" +#include "cr-statement.h" +#include "cr-fonts.h" + +/** + *@file + *The declaration of the #CRStyle class. + */ +G_BEGIN_DECLS + +typedef struct _CRStyle CRStyle ; + +enum CRBorderStyle +{ + BORDER_STYLE_NONE = 0, + BORDER_STYLE_HIDDEN, + BORDER_STYLE_DOTTED, + BORDER_STYLE_DASHED, + BORDER_STYLE_SOLID, + BORDER_STYLE_DOUBLE, + BORDER_STYLE_GROOVE, + BORDER_STYLE_RIDGE, + BORDER_STYLE_INSET, + BORDER_STYLE_OUTSET, + BORDER_STYLE_INHERIT +} ; + +enum CRDisplayType +{ + DISPLAY_NONE, + DISPLAY_INLINE, + DISPLAY_BLOCK, + DISPLAY_LIST_ITEM, + DISPLAY_RUN_IN, + DISPLAY_COMPACT, + DISPLAY_MARKER, + DISPLAY_TABLE, + DISPLAY_INLINE_TABLE, + DISPLAY_TABLE_ROW_GROUP, + DISPLAY_TABLE_HEADER_GROUP, + DISPLAY_TABLE_FOOTER_GROUP, + DISPLAY_TABLE_ROW, + DISPLAY_TABLE_COLUMN_GROUP, + DISPLAY_TABLE_COLUMN, + DISPLAY_TABLE_CELL, + DISPLAY_TABLE_CAPTION, + DISPLAY_INHERIT +} ; + +enum CRPositionType +{ + POSITION_STATIC, + POSITION_RELATIVE, + POSITION_ABSOLUTE, + POSITION_FIXED, + POSITION_INHERIT +} ; + +enum CRFloatType +{ + FLOAT_NONE, + FLOAT_LEFT, + FLOAT_RIGHT, + FLOAT_INHERIT +} ; + +enum CRWhiteSpaceType +{ + WHITE_SPACE_NORMAL, + WHITE_SPACE_PRE, + WHITE_SPACE_NOWRAP, + WHITE_SPACE_INHERIT +} ; + + +#define BORDER_THIN 2 +#define BORDER_MEDIUM 4 +#define BORDER_THICK 6 + + +/** + *A numerical css property value. + *This data type is actually split in 3 parts: + *1/the specified value + *2/the computed value + *3/the actual value. + *To understand the semantic of these three parts, + *see css2 spec chap 6.1 ("Specified, computed and actual values."). + */ +typedef struct _CRNumPropVal CRNumPropVal ; +struct _CRNumPropVal +{ + /**specified value*/ + CRNum sv ; + /**computed value*/ + CRNum cv ; + /**actual value*/ + CRNum av ; +} ; + +/** + *An rgb css property value. + *This data type is actually split in 3 parts: + *1/the specified value + *2/the computed value + *3/the actual value. + *To understand the semantic of these three parts, + *see css2 spec chap 6.1 ("Specified, computed and actual values."). + */ +typedef struct _CRRgbPropVal CRRgbPropVal ; +struct _CRRgbPropVal +{ + /**specified value*/ + CRRgb sv ; + /**computed value*/ + CRRgb cv ; + /**actual value*/ + CRRgb av ; +} ; + + +enum CRNumProp +{ + NUM_PROP_TOP=0, + NUM_PROP_RIGHT, + NUM_PROP_BOTTOM, + NUM_PROP_LEFT,/*3*/ + + NUM_PROP_PADDING_TOP, + NUM_PROP_PADDING_RIGHT, + NUM_PROP_PADDING_BOTTOM, + NUM_PROP_PADDING_LEFT,/*7*/ + + NUM_PROP_BORDER_TOP, + NUM_PROP_BORDER_RIGHT, + NUM_PROP_BORDER_BOTTOM, + NUM_PROP_BORDER_LEFT,/*11*/ + + NUM_PROP_MARGIN_TOP, + NUM_PROP_MARGIN_RIGHT, + NUM_PROP_MARGIN_BOTTOM, + NUM_PROP_MARGIN_LEFT,/*15*/ + + NUM_PROP_WIDTH, + + /*must be last*/ + NB_NUM_PROPS +} ; + +enum CRRgbProp +{ + RGB_PROP_BORDER_TOP_COLOR = 0, + RGB_PROP_BORDER_RIGHT_COLOR, + RGB_PROP_BORDER_BOTTOM_COLOR, + RGB_PROP_BORDER_LEFT_COLOR, + RGB_PROP_COLOR, + RGB_PROP_BACKGROUND_COLOR, + + /*must be last*/ + NB_RGB_PROPS +} ; + + +enum CRBorderStyleProp +{ + BORDER_STYLE_PROP_TOP = 0, + BORDER_STYLE_PROP_RIGHT, + BORDER_STYLE_PROP_BOTTOM, + BORDER_STYLE_PROP_LEFT, + + /*must be last*/ + NB_BORDER_STYLE_PROPS +} ; + +enum CRBoxOffsetProp +{ + BOX_OFFSET_PROP_TOP = 0, + BOX_OFFSET_PROP_RIGHT, + BOX_OFFSET_PROP_BOTTOM, + BOX_OFFSET_PROP_LEFT, + + /*must be last*/ + NB_BOX_OFFSET_PROPS +} ; + +typedef struct _CRFontSizeVal CRFontSizeVal ; +struct _CRFontSizeVal { + /*specified value*/ + CRFontSize sv ; + /*computed value*/ + CRFontSize cv ; + /*actual value*/ + CRFontSize av ; +} ; + +/** + *The css2 style class. + *Contains computed and actual values + *inferred from the declarations found + *in the stylesheets. + *See css2 spec chapter 6. + */ +struct _CRStyle +{ + /** + *numerical properties. + *the properties are indexed by + *enum #CRNumProp. + */ + CRNumPropVal num_props[NB_NUM_PROPS] ; + + /** + *color properties. + *They are indexed by enum #CRRgbProp . + */ + CRRgbPropVal rgb_props[NB_RGB_PROPS] ; + + /** + *border style properties. + *They are indexed by enum #CRBorderStyleProp . + */ + enum CRBorderStyle border_style_props[NB_BORDER_STYLE_PROPS] ; + + /**box display type*/ + enum CRDisplayType display ; + + /**the positioning scheme*/ + enum CRPositionType position ; + + /**the float property*/ + enum CRFloatType float_type ; + + /* + *the 'font-family' property. + */ + CRFontFamily *font_family ; + + /** + *the 'font-size' property. + */ + CRFontSizeVal font_size ; + CRFontSizeAdjust *font_size_adjust ; + enum CRFontStyle font_style ; + enum CRFontVariant font_variant ; + enum CRFontWeight font_weight ; + enum CRFontStretch font_stretch ; + + /** + * the 'tex' properties + */ + enum CRWhiteSpaceType white_space; + + gboolean inherited_props_resolved ; + CRStyle *parent_style ; + gulong ref_count ; +} ; + +enum CRStatus cr_style_white_space_type_to_string (enum CRWhiteSpaceType a_code, + GString * a_str, guint a_nb_indent) ; + +enum CRStatus cr_style_num_prop_val_to_string (CRNumPropVal *a_prop_val, + GString *a_str, + guint a_nb_indent) ; + +enum CRStatus cr_style_rgb_prop_val_to_string (CRRgbPropVal *a_prop_val, + GString *a_str, + guint a_nb_indent) ; + +enum CRStatus cr_style_border_style_to_string (enum CRBorderStyle a_prop, + GString *a_str, + guint a_nb_indent) ; + +enum CRStatus cr_style_display_type_to_string (enum CRDisplayType a_code, + GString *a_str, + guint a_nb_indent) ; + +enum CRStatus cr_style_position_type_to_string (enum CRPositionType a_code, + GString *a_str, + guint a_nb_indent) ; + +enum CRStatus cr_style_float_type_to_string (enum CRFloatType a_code, + GString *a_str, + guint a_nb_indent) ; + +CRStyle * cr_style_new (gboolean a_set_props_to_initial_values) ; + +enum CRStatus cr_style_set_props_to_default_values (CRStyle *a_this) ; +enum CRStatus cr_style_set_props_to_initial_values (CRStyle *a_this) ; +enum CRStatus cr_style_resolve_inherited_properties (CRStyle *a_this) ; +enum CRStatus cr_style_propagate_from_parent (CRStyle *a_this); + +enum CRStatus cr_style_set_style_from_decl (CRStyle *a_this, + CRDeclaration *a_decl) ; + + +enum CRStatus cr_style_copy (CRStyle *a_dest, CRStyle *a_src) ; + +enum CRStatus cr_style_ref (CRStyle *a_this) ; + +gboolean cr_style_unref (CRStyle *a_this) ; + +void cr_style_destroy (CRStyle *a_this) ; + +CRStyle * cr_style_dup (CRStyle *a_this) ; + +enum CRStatus cr_style_to_string (CRStyle *a_this, + GString **a_str, + guint a_nb_indent) ; + +G_END_DECLS + +#endif /*__CR_STYLE_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-stylesheet.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-stylesheet.h new file mode 100755 index 00000000..f35c94e3 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-stylesheet.h @@ -0,0 +1,102 @@ +/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * see COPYRIGHTS file for copyright information. + */ + + +#ifndef __CR_STYLESHEET_H__ +#define __CR_STYLESHEET_H__ + +#include "cr-utils.h" +#include "cr-statement.h" + +G_BEGIN_DECLS + +/** + *@file + *The declaration of the #CRStyleSheet class. + */ + + +enum CRStyleOrigin +{ + /*Please don't change the order of + *the values enumerated here ... + *New values should be added at the end, + *just before ORIGIN_END. + */ + ORIGIN_UA = 0, + ORIGIN_USER, + ORIGIN_AUTHOR, + + /*must always be the last one*/ + NB_ORIGINS +} ; + +/** + *An abstraction of a css stylesheet as defined + *by the css2 spec in chapter 4. + */ +struct _CRStyleSheet +{ + /**The css statements list*/ + CRStatement *statements ; + + enum CRStyleOrigin origin ; + + /*the parent import rule, if any.*/ + CRStatement *parent_import_rule ; + + /**custom data used by libcroco*/ + gpointer croco_data ; + + /** + *custom application data pointer + *Can be used by applications. + */ + gpointer app_data ; + + /** + *the reference count of this insance + *Please, don't never ever modify it + *directly. Use cr_stylesheet_ref() + *and cr_stylesheet_unref() instead. + */ + gulong ref_count ; +} ; + +CRStyleSheet * cr_stylesheet_new (CRStatement *a_stmts) ; + +gchar * cr_stylesheet_to_string (CRStyleSheet const *a_this) ; +void cr_stylesheet_dump (CRStyleSheet const *a_this, FILE *a_fp) ; + +gint cr_stylesheet_nr_rules (CRStyleSheet const *a_this) ; + +CRStatement * cr_stylesheet_statement_get_from_list (CRStyleSheet *a_this, int itemnr) ; + +void cr_stylesheet_ref (CRStyleSheet *a_this) ; + +gboolean cr_stylesheet_unref (CRStyleSheet *a_this) ; + +void cr_stylesheet_destroy (CRStyleSheet *a_this) ; + +G_END_DECLS + +#endif /*__CR_STYLESHEET_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-term.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-term.h new file mode 100755 index 00000000..0f22dda7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-term.h @@ -0,0 +1,190 @@ +/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * Author: Dodji Seketeli + * See COPYRIGHTS file for copyright information. + */ + +#include <stdio.h> +#include <glib.h> +#include "cr-utils.h" +#include "cr-rgb.h" +#include "cr-num.h" +#include "cr-string.h" + +#ifndef __CR_TERM_H__ +#define __CR_TERM_H__ + +G_BEGIN_DECLS + +/** + *@file + *Declaration of the #CRTem class. + */ + +enum CRTermType +{ + TERM_NO_TYPE = 0, + TERM_NUMBER, + TERM_FUNCTION, + TERM_STRING, + TERM_IDENT, + TERM_URI, + TERM_RGB, + TERM_UNICODERANGE, + TERM_HASH +} ; + + +enum UnaryOperator +{ + NO_UNARY_UOP = 0, + PLUS_UOP, + MINUS_UOP, + EMPTY_UNARY_UOP +} ; + +enum Operator +{ + NO_OP = 0, + DIVIDE, + COMMA +} ; + +struct _CRTerm ; +typedef struct _CRTerm CRTerm ; + +/** + *An abstraction of a css2 term as + *defined in the CSS2 spec in appendix D.1: + *term ::= + *[ NUMBER S* | PERCENTAGE S* | LENGTH S* | EMS S* | EXS S* + *| ANGLE S* | TIME S* | FREQ S* | function ] + * | STRING S* | IDENT S* | URI S* | RGB S* + *| UNICODERANGE S* | hexcolor + */ +struct _CRTerm +{ + /** + *The type of the term. + */ + enum CRTermType type ; + + /** + *The unary operator associated to + *the current term. + */ + enum UnaryOperator unary_op ; + + /** + *The operator associated to the current term. + */ + enum Operator the_operator ; + + + /** + *The content of the term. + *Depending of the type of the term, + *this holds either a number, a percentage ... + */ + union + { + CRNum *num ; + CRString * str ; + CRRgb * rgb ; + } content ; + + /** + *If the term is of type UNICODERANGE, + *this field holds the upper bound of the range. + *if the term is of type FUNCTION, this holds + *an instance of CRTerm that represents + * the expression which is the argument of the function. + */ + union + { + CRTerm *func_param ; + } ext_content ; + + /** + *A spare pointer, just in case. + *Can be used by the application. + */ + gpointer app_data ; + + glong ref_count ; + + /** + *A pointer to the next term, + *just in case this term is part of + *an expression. + */ + CRTerm *next ; + + /** + *A pointer to the previous + *term. + */ + CRTerm *prev ; + CRParsingLocation location ; +} ; + +CRTerm * cr_term_parse_expression_from_buf (const guchar *a_buf, + enum CREncoding a_encoding) ; +CRTerm * cr_term_new (void) ; + +enum CRStatus cr_term_set_number (CRTerm *a_this, CRNum *a_num) ; + +enum CRStatus cr_term_set_function (CRTerm *a_this, + CRString *a_func_name, + CRTerm *a_func_param) ; + +enum CRStatus cr_term_set_string (CRTerm *a_this, CRString *a_str) ; + +enum CRStatus cr_term_set_ident (CRTerm *a_this, CRString *a_str) ; + +enum CRStatus cr_term_set_uri (CRTerm *a_this, CRString *a_str) ; + +enum CRStatus cr_term_set_rgb (CRTerm *a_this, CRRgb *a_rgb) ; + +enum CRStatus cr_term_set_hash (CRTerm *a_this, CRString *a_str) ; + +CRTerm * cr_term_append_term (CRTerm *a_this, CRTerm *a_new_term) ; + +CRTerm * cr_term_prepend_term (CRTerm *a_this, CRTerm *a_new_term) ; + +guchar * cr_term_to_string (CRTerm const *a_this) ; + +guchar * cr_term_one_to_string (CRTerm const * a_this) ; + +void cr_term_dump (CRTerm const *a_this, FILE *a_fp) ; + +int cr_term_nr_values (CRTerm const *a_this) ; + +CRTerm * cr_term_get_from_list (CRTerm *a_this, int itemnr) ; + +void cr_term_ref (CRTerm *a_this) ; + +gboolean cr_term_unref (CRTerm *a_this) ; + +void cr_term_destroy (CRTerm * a_term) ; + +G_END_DECLS + +#endif /*__CR_TERM_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-tknzr.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-tknzr.h new file mode 100755 index 00000000..13985b30 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-tknzr.h @@ -0,0 +1,115 @@ +/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * Author: Dodji Seketeli + * See COPYRIGHTS file for coypyright information. + */ + +/** + *@file + *The declaration of the #CRTknzr (tokenizer) + *class. + */ + +#ifndef __CR_TKNZR_H__ +#define __CR_TKNZR_H__ + +#include "cr-utils.h" +#include "cr-input.h" +#include "cr-token.h" + +G_BEGIN_DECLS + + +typedef struct _CRTknzr CRTknzr ; +typedef struct _CRTknzrPriv CRTknzrPriv ; + +/** + *The tokenizer is the class that knows + *about all the css token. Its main job is + *to return the next token found in the character + *input stream. + */ +struct _CRTknzr +{ + /*the private data of the tokenizer.*/ + CRTknzrPriv *priv ; +} ; + +CRTknzr * cr_tknzr_new (CRInput *a_input) ; + +CRTknzr * cr_tknzr_new_from_uri (const guchar *a_file_uri, + enum CREncoding a_enc) ; + +CRTknzr * cr_tknzr_new_from_buf (guchar *a_buf, gulong a_len, + enum CREncoding a_enc, + gboolean a_free_at_destroy) ; + +gboolean cr_tknzr_unref (CRTknzr *a_this) ; + +void cr_tknzr_ref (CRTknzr *a_this) ; + +enum CRStatus cr_tknzr_read_byte (CRTknzr *a_this, guchar *a_byte) ; + +enum CRStatus cr_tknzr_read_char (CRTknzr *a_this, guint32 *a_char); + +enum CRStatus cr_tknzr_peek_char (CRTknzr *a_this, guint32 *a_char) ; + +enum CRStatus cr_tknzr_peek_byte (CRTknzr *a_this, gulong a_offset, + guchar *a_byte) ; + +guchar cr_tknzr_peek_byte2 (CRTknzr *a_this, gulong a_offset, + gboolean *a_eof) ; + +enum CRStatus cr_tknzr_set_cur_pos (CRTknzr *a_this, CRInputPos *a_pos) ; + +glong cr_tknzr_get_nb_bytes_left (CRTknzr *a_this) ; + +enum CRStatus cr_tknzr_get_cur_pos (CRTknzr *a_this, CRInputPos *a_pos) ; + +enum CRStatus cr_tknzr_get_parsing_location (CRTknzr *a_this, + CRParsingLocation *a_loc) ; + +enum CRStatus cr_tknzr_seek_index (CRTknzr *a_this, + enum CRSeekPos a_origin, + gint a_pos) ; + +enum CRStatus cr_tknzr_get_cur_byte_addr (CRTknzr *a_this, guchar **a_addr) ; + + +enum CRStatus cr_tknzr_consume_chars (CRTknzr *a_this, guint32 a_char, + glong *a_nb_char) ; + +enum CRStatus cr_tknzr_get_next_token (CRTknzr *a_this, CRToken ** a_tk) ; + +enum CRStatus cr_tknzr_unget_token (CRTknzr *a_this, CRToken *a_token) ; + + +enum CRStatus cr_tknzr_parse_token (CRTknzr *a_this, enum CRTokenType a_type, + enum CRTokenExtraType a_et, gpointer a_res, + gpointer a_extra_res) ; +enum CRStatus cr_tknzr_set_input (CRTknzr *a_this, CRInput *a_input) ; + +enum CRStatus cr_tknzr_get_input (CRTknzr *a_this, CRInput **a_input) ; + +void cr_tknzr_destroy (CRTknzr *a_this) ; + +G_END_DECLS + +#endif /*__CR_TKZNR_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-token.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-token.h new file mode 100755 index 00000000..f1257b7a --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-token.h @@ -0,0 +1,212 @@ +/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * Author: Dodji Seketeli + * See COPYRIGHTS file for copyright information. + */ + +#ifndef __CR_TOKEN_H__ +#define __CR_TOKEN_H__ + +#include "cr-utils.h" +#include "cr-input.h" +#include "cr-num.h" +#include "cr-rgb.h" +#include "cr-string.h" +#include "cr-parsing-location.h" + +G_BEGIN_DECLS + +enum CRTokenType +{ + NO_TK, + S_TK, + CDO_TK, + CDC_TK, + INCLUDES_TK, + DASHMATCH_TK, + COMMENT_TK, + STRING_TK, + IDENT_TK, + HASH_TK, + IMPORT_SYM_TK, + PAGE_SYM_TK, + MEDIA_SYM_TK, + FONT_FACE_SYM_TK, + CHARSET_SYM_TK, + ATKEYWORD_TK, + IMPORTANT_SYM_TK, + EMS_TK, + EXS_TK, + LENGTH_TK, + ANGLE_TK, + TIME_TK, + FREQ_TK, + DIMEN_TK, + PERCENTAGE_TK, + NUMBER_TK, + RGB_TK, + URI_TK, + FUNCTION_TK, + UNICODERANGE_TK, + SEMICOLON_TK, + CBO_TK, /*opening curly bracket*/ + CBC_TK, /*closing curly bracket*/ + PO_TK, /*opening parenthesis*/ + PC_TK, /*closing parenthesis*/ + BO_TK, /*opening bracket*/ + BC_TK, /*closing bracket*/ + DELIM_TK +} ; + +enum CRTokenExtraType +{ + NO_ET = 0, + LENGTH_PX_ET, + LENGTH_CM_ET, + LENGTH_MM_ET, + LENGTH_IN_ET, + LENGTH_PT_ET, + LENGTH_PC_ET, + ANGLE_DEG_ET, + ANGLE_RAD_ET, + ANGLE_GRAD_ET, + TIME_MS_ET, + TIME_S_ET, + FREQ_HZ_ET, + FREQ_KHZ_ET +} ; + +typedef struct _CRToken CRToken ; + +/** + *This class abstracts a css2 token. + */ +struct _CRToken +{ + enum CRTokenType type ; + enum CRTokenExtraType extra_type ; + CRInputPos pos ; + + union + { + CRString *str ; + CRRgb *rgb ; + CRNum *num ; + guint32 unichar ; + } u ; + + CRString * dimen ; + CRParsingLocation location ; +} ; + +CRToken* cr_token_new (void) ; + +enum CRStatus cr_token_set_s (CRToken *a_this) ; + +enum CRStatus cr_token_set_cdo (CRToken *a_this) ; + +enum CRStatus cr_token_set_cdc (CRToken *a_this) ; + +enum CRStatus cr_token_set_includes (CRToken *a_this) ; + +enum CRStatus cr_token_set_dashmatch (CRToken *a_this) ; + +enum CRStatus cr_token_set_comment (CRToken *a_this, CRString *a_str) ; + +enum CRStatus cr_token_set_string (CRToken *a_this, CRString *a_str) ; + +enum CRStatus cr_token_set_ident (CRToken *a_this, CRString * a_ident) ; + +enum CRStatus cr_token_set_hash (CRToken *a_this, CRString *a_hash) ; + +enum CRStatus cr_token_set_rgb (CRToken *a_this, CRRgb *a_rgb) ; + +enum CRStatus cr_token_set_import_sym (CRToken *a_this) ; + +enum CRStatus cr_token_set_page_sym (CRToken *a_this) ; + +enum CRStatus cr_token_set_media_sym (CRToken *a_this) ; + +enum CRStatus cr_token_set_font_face_sym (CRToken *a_this) ; + +enum CRStatus cr_token_set_charset_sym (CRToken *a_this) ; + +enum CRStatus cr_token_set_atkeyword (CRToken *a_this, CRString *a_atname) ; + +enum CRStatus cr_token_set_important_sym (CRToken *a_this) ; + +enum CRStatus cr_token_set_ems (CRToken *a_this, CRNum *a_num) ; + +enum CRStatus cr_token_set_exs (CRToken *a_this, CRNum *a_num) ; + +enum CRStatus cr_token_set_length (CRToken *a_this, CRNum *a_num, + enum CRTokenExtraType a_et) ; + +enum CRStatus cr_token_set_angle (CRToken *a_this, CRNum *a_num, + enum CRTokenExtraType a_et) ; + +enum CRStatus cr_token_set_time (CRToken *a_this, CRNum *a_num, + enum CRTokenExtraType a_et) ; + +enum CRStatus cr_token_set_freq (CRToken *a_this, CRNum *a_num, + enum CRTokenExtraType a_et) ; + +enum CRStatus cr_token_set_dimen (CRToken *a_this, CRNum *a_num, + CRString *a_dim) ; + +enum CRStatus cr_token_set_percentage (CRToken *a_this, CRNum *a_num) ; + +enum CRStatus cr_token_set_number (CRToken *a_this, CRNum *a_num) ; + +enum CRStatus cr_token_set_uri (CRToken *a_this, CRString *a_uri) ; + +enum CRStatus cr_token_set_function (CRToken *a_this, + CRString *a_fun_name) ; + +enum CRStatus cr_token_set_bc (CRToken *a_this) ; + +enum CRStatus cr_token_set_bo (CRToken *a_this) ; + +enum CRStatus cr_token_set_po (CRToken *a_this) ; + +enum CRStatus cr_token_set_pc (CRToken *a_this) ; + +enum CRStatus cr_token_set_cbc (CRToken *a_this) ; + +enum CRStatus cr_token_set_cbo (CRToken *a_this) ; + +enum CRStatus cr_token_set_semicolon (CRToken *a_this) ; + +enum CRStatus cr_token_set_delim (CRToken *a_this, guint32 a_char) ; + + +/* + enum CRStatus + cr_token_set_unicoderange (CRToken *a_this, + CRUnicodeRange *a_range) ; +*/ + +void +cr_token_destroy (CRToken *a_this) ; + + +G_END_DECLS + +#endif /*__CR_TOKEN_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-utils.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-utils.h new file mode 100755 index 00000000..54aa2497 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/cr-utils.h @@ -0,0 +1,246 @@ +/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ + +/* + * This file is part of The Croco Library + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * Author: Dodji Seketeli + * Look at file COPYRIGHTS for copyright information + */ + +#ifndef __CR_DEFS_H__ +#define __CR_DEFS_H__ + +#include <stdio.h> +#include <glib.h> +#include "libcroco-config.h" + +G_BEGIN_DECLS + +/** + *@file + *The Croco library basic types definitions + *And global definitions. + */ + +/** + *The status type returned + *by the methods of the croco library. + */ +enum CRStatus { + CR_OK, + CR_BAD_PARAM_ERROR, + CR_INSTANCIATION_FAILED_ERROR, + CR_UNKNOWN_TYPE_ERROR, + CR_UNKNOWN_PROP_ERROR, + CR_UNKNOWN_PROP_VAL_ERROR, + CR_UNEXPECTED_POSITION_SCHEME, + CR_START_OF_INPUT_ERROR, + CR_END_OF_INPUT_ERROR, + CR_OUTPUT_TOO_SHORT_ERROR, + CR_INPUT_TOO_SHORT_ERROR, + CR_OUT_OF_BOUNDS_ERROR, + CR_EMPTY_PARSER_INPUT_ERROR, + CR_ENCODING_ERROR, + CR_ENCODING_NOT_FOUND_ERROR, + CR_PARSING_ERROR, + CR_SYNTAX_ERROR, + CR_NO_ROOT_NODE_ERROR, + CR_NO_TOKEN, + CR_OUT_OF_MEMORY_ERROR, + CR_PSEUDO_CLASS_SEL_HANDLER_NOT_FOUND_ERROR, + CR_BAD_PSEUDO_CLASS_SEL_HANDLER_ERROR, + CR_ERROR, + CR_FILE_NOT_FOUND_ERROR, + CR_VALUE_NOT_FOUND_ERROR +} ; + +/** + *Values used by + *cr_input_seek_position() ; + */ +enum CRSeekPos { + CR_SEEK_CUR, + CR_SEEK_BEGIN, + CR_SEEK_END +} ; + +/** + *Encoding values. + */ +enum CREncoding +{ + CR_UCS_4 = 1/*Must be not NULL*/, + CR_UCS_1, + CR_ISO_8859_1, + CR_ASCII, + CR_UTF_8, + CR_UTF_16, + CR_AUTO/*should be the last one*/ +} ; + + + + +#define CROCO_LOG_DOMAIN "LIBCROCO" + +#ifdef __GNUC__ +#define cr_utils_trace(a_log_level, a_msg) \ +g_log (CROCO_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ + "file %s: line %d (%s): %s\n", \ + __FILE__, \ + __LINE__, \ + __PRETTY_FUNCTION__, \ + a_msg) +#else /*__GNUC__*/ + +#define cr_utils_trace(a_log_level, a_msg) \ +g_log (CROCO_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ + "file %s: line %d: %s\n", \ + __FILE__, \ + __LINE__, \ + a_msg) +#endif + +/** + *Traces an info message. + *The file, line and enclosing function + *of the message will be automatically + *added to the message. + *@param a_msg the msg to trace. + */ +#define cr_utils_trace_info(a_msg) \ +cr_utils_trace (G_LOG_LEVEL_INFO, a_msg) + +/** + *Trace a debug message. + *The file, line and enclosing function + *of the message will be automatically + *added to the message. + *@param a_msg the msg to trace. + */ +#define cr_utils_trace_debug(a_msg) \ +cr_utils_trace (G_LOG_LEVEL_DEBUG, a_msg) ; + + +/**************************** + *Encoding transformations and + *encoding helpers + ****************************/ + +enum CRStatus +cr_utils_read_char_from_utf8_buf (const guchar * a_in, gulong a_in_len, + guint32 *a_out, gulong *a_consumed) ; + +enum CRStatus +cr_utils_ucs1_to_utf8 (const guchar *a_in, gulong *a_in_len, + guchar *a_out, gulong *a_out_len) ; + +enum CRStatus +cr_utils_utf8_to_ucs1 (const guchar * a_in, gulong * a_in_len, + guchar *a_out, gulong *a_out_len) ; + +enum CRStatus +cr_utils_ucs4_to_utf8 (const guint32 *a_in, gulong *a_in_len, + guchar *a_out, gulong *a_out_len) ; + +enum CRStatus +cr_utils_utf8_str_len_as_ucs4 (const guchar *a_in_start, + const guchar *a_in_end, + gulong *a_len) ; +enum CRStatus +cr_utils_ucs1_str_len_as_utf8 (const guchar *a_in_start, + const guchar *a_in_end, + gulong *a_len) ; +enum CRStatus +cr_utils_utf8_str_len_as_ucs1 (const guchar *a_in_start, + const guchar *a_in_end, + gulong *a_len) ; +enum CRStatus +cr_utils_ucs4_str_len_as_utf8 (const guint32 *a_in_start, + const guint32 *a_in_end, + gulong *a_len) ; + +enum CRStatus +cr_utils_ucs1_str_to_utf8 (const guchar *a_in_start, + gulong *a_in_len, + guchar **a_out, + gulong *a_len) ; + +enum CRStatus +cr_utils_utf8_str_to_ucs1 (const guchar * a_in_start, + gulong * a_in_len, + guchar **a_out, + gulong *a_out_len) ; + +enum CRStatus +cr_utils_utf8_to_ucs4 (const guchar * a_in, + gulong * a_in_len, + guint32 *a_out, gulong *a_out_len) ; + +enum CRStatus +cr_utils_ucs4_str_to_utf8 (const guint32 *a_in, + gulong *a_in_len, + guchar **a_out, gulong *a_out_len) ; + +enum CRStatus +cr_utils_utf8_str_to_ucs4 (const guchar * a_in, + gulong *a_in_len, + guint32 **a_out, + gulong *a_out_len) ; + + +/***************************************** + *CSS basic types identification utilities + *****************************************/ + +gboolean +cr_utils_is_newline (guint32 a_char) ; + +gboolean +cr_utils_is_white_space (guint32 a_char) ; + +gboolean +cr_utils_is_nonascii (guint32 a_char) ; + +gboolean +cr_utils_is_hexa_char (guint32 a_char) ; + + +/********************************** + *Miscellaneous utility functions + ***********************************/ + +void +cr_utils_dump_n_chars (guchar a_char, + FILE *a_fp, + glong a_nb) ; + +void +cr_utils_dump_n_chars2 (guchar a_char, + GString *a_string, + glong a_nb) ; +GList * +cr_utils_dup_glist_of_string (GList const *a_list) ; + +GList * +cr_utils_dup_glist_of_cr_string (GList const * a_list_of_strings) ; + +G_END_DECLS + +#endif /*__CR_DEFS_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/libcroco-config.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/libcroco-config.h new file mode 100755 index 00000000..6cdce6d1 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/libcroco-config.h @@ -0,0 +1,17 @@ +#ifndef LIBCROCO_VERSION_NUMBER +#define LIBCROCO_VERSION_NUMBER 612 +#endif + +#ifndef LIBCROCO_VERSION +#define LIBCROCO_VERSION "0.6.12" +#endif + +#ifndef G_DISABLE_CHECKS +#if 0 +#define G_DISABLE_CHECKS 0 +#endif +#endif + +#ifndef CROCO_HAVE_LIBXML2 +#define CROCO_HAVE_LIBXML2 (1) +#endif diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/libcroco.h b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/libcroco.h new file mode 100755 index 00000000..eabc596a --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/include/libcroco-0.6/libcroco/libcroco.h @@ -0,0 +1,44 @@ +/* + * This file is part of The Croco Library + * + * Copyright (C) 2002-2003 Dodji Seketeli <dodji@seketeli.org> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ + +#ifndef __LIBCROCO_H__ +#define __LIBCROCO_H__ + +#include "libcroco-config.h" + +#include "cr-utils.h" +#include "cr-pseudo.h" +#include "cr-term.h" +#include "cr-attr-sel.h" +#include "cr-simple-sel.h" +#include "cr-selector.h" +#include "cr-enc-handler.h" +#include "cr-doc-handler.h" +#include "cr-input.h" +#include "cr-parser.h" +#include "cr-statement.h" +#include "cr-stylesheet.h" +#include "cr-om-parser.h" +#include "cr-prop-list.h" +#include "cr-sel-eng.h" +#include "cr-style.h" +#include "cr-string.h" + +#endif /*__LIBCROCO_H__*/ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/lib/libcroco-0.6.3.dylib b/frameworks/cairosvg/dependencies/libcroco/0.6.12/lib/libcroco-0.6.3.dylib new file mode 100755 index 00000000..74986e9f Binary files /dev/null and b/frameworks/cairosvg/dependencies/libcroco/0.6.12/lib/libcroco-0.6.3.dylib differ diff --git a/frameworks/cairosvg/dependencies/libcroco/0.6.12/lib/libcroco-0.6.dylib b/frameworks/cairosvg/dependencies/libcroco/0.6.12/lib/libcroco-0.6.dylib new file mode 120000 index 00000000..8b2c326b --- /dev/null +++ b/frameworks/cairosvg/dependencies/libcroco/0.6.12/lib/libcroco-0.6.dylib @@ -0,0 +1 @@ +libcroco-0.6.3.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/libffi/3.2.1/lib/libffi-3.2.1/include/ffi.h b/frameworks/cairosvg/dependencies/libffi/3.2.1/lib/libffi-3.2.1/include/ffi.h new file mode 100755 index 00000000..bb548995 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libffi/3.2.1/lib/libffi-3.2.1/include/ffi.h @@ -0,0 +1,487 @@ +/* -----------------------------------------------------------------*-C-*- + libffi 3.2.1 - Copyright (c) 2011, 2014 Anthony Green + - Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the ``Software''), to deal in the Software without + restriction, including without limitation the rights to use, copy, + modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + ----------------------------------------------------------------------- */ + +/* ------------------------------------------------------------------- + The basic API is described in the README file. + + The raw API is designed to bypass some of the argument packing + and unpacking on architectures for which it can be avoided. + + The closure API allows interpreted functions to be packaged up + inside a C function pointer, so that they can be called as C functions, + with no understanding on the client side that they are interpreted. + It can also be used in other cases in which it is necessary to package + up a user specified parameter and a function pointer as a single + function pointer. + + The closure API must be implemented in order to get its functionality, + e.g. for use by gij. Routines are provided to emulate the raw API + if the underlying platform doesn't allow faster implementation. + + More details on the raw and cloure API can be found in: + + http://gcc.gnu.org/ml/java/1999-q3/msg00138.html + + and + + http://gcc.gnu.org/ml/java/1999-q3/msg00174.html + -------------------------------------------------------------------- */ + +#ifndef LIBFFI_H +#define LIBFFI_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Specify which architecture libffi is configured for. */ +#ifndef X86_DARWIN +#define X86_DARWIN +#endif + +/* ---- System configuration information --------------------------------- */ + +#include <ffitarget.h> + +#ifndef LIBFFI_ASM + +#if defined(_MSC_VER) && !defined(__clang__) +#define __attribute__(X) +#endif + +#include <stddef.h> +#include <limits.h> + +/* LONG_LONG_MAX is not always defined (not if STRICT_ANSI, for example). + But we can find it either under the correct ANSI name, or under GNU + C's internal name. */ + +#define FFI_64_BIT_MAX 9223372036854775807 + +#ifdef LONG_LONG_MAX +# define FFI_LONG_LONG_MAX LONG_LONG_MAX +#else +# ifdef LLONG_MAX +# define FFI_LONG_LONG_MAX LLONG_MAX +# ifdef _AIX52 /* or newer has C99 LLONG_MAX */ +# undef FFI_64_BIT_MAX +# define FFI_64_BIT_MAX 9223372036854775807LL +# endif /* _AIX52 or newer */ +# else +# ifdef __GNUC__ +# define FFI_LONG_LONG_MAX __LONG_LONG_MAX__ +# endif +# ifdef _AIX /* AIX 5.1 and earlier have LONGLONG_MAX */ +# ifndef __PPC64__ +# if defined (__IBMC__) || defined (__IBMCPP__) +# define FFI_LONG_LONG_MAX LONGLONG_MAX +# endif +# endif /* __PPC64__ */ +# undef FFI_64_BIT_MAX +# define FFI_64_BIT_MAX 9223372036854775807LL +# endif +# endif +#endif + +/* The closure code assumes that this works on pointers, i.e. a size_t */ +/* can hold a pointer. */ + +typedef struct _ffi_type +{ + size_t size; + unsigned short alignment; + unsigned short type; + struct _ffi_type **elements; +} ffi_type; + +#ifndef LIBFFI_HIDE_BASIC_TYPES +#if SCHAR_MAX == 127 +# define ffi_type_uchar ffi_type_uint8 +# define ffi_type_schar ffi_type_sint8 +#else + #error "char size not supported" +#endif + +#if SHRT_MAX == 32767 +# define ffi_type_ushort ffi_type_uint16 +# define ffi_type_sshort ffi_type_sint16 +#elif SHRT_MAX == 2147483647 +# define ffi_type_ushort ffi_type_uint32 +# define ffi_type_sshort ffi_type_sint32 +#else + #error "short size not supported" +#endif + +#if INT_MAX == 32767 +# define ffi_type_uint ffi_type_uint16 +# define ffi_type_sint ffi_type_sint16 +#elif INT_MAX == 2147483647 +# define ffi_type_uint ffi_type_uint32 +# define ffi_type_sint ffi_type_sint32 +#elif INT_MAX == 9223372036854775807 +# define ffi_type_uint ffi_type_uint64 +# define ffi_type_sint ffi_type_sint64 +#else + #error "int size not supported" +#endif + +#if LONG_MAX == 2147483647 +# if FFI_LONG_LONG_MAX != FFI_64_BIT_MAX + #error "no 64-bit data type supported" +# endif +#elif LONG_MAX != FFI_64_BIT_MAX + #error "long size not supported" +#endif + +#if LONG_MAX == 2147483647 +# define ffi_type_ulong ffi_type_uint32 +# define ffi_type_slong ffi_type_sint32 +#elif LONG_MAX == FFI_64_BIT_MAX +# define ffi_type_ulong ffi_type_uint64 +# define ffi_type_slong ffi_type_sint64 +#else + #error "long size not supported" +#endif + +/* Need minimal decorations for DLLs to works on Windows. */ +/* GCC has autoimport and autoexport. Rely on Libtool to */ +/* help MSVC export from a DLL, but always declare data */ +/* to be imported for MSVC clients. This costs an extra */ +/* indirection for MSVC clients using the static version */ +/* of the library, but don't worry about that. Besides, */ +/* as a workaround, they can define FFI_BUILDING if they */ +/* *know* they are going to link with the static library. */ +#if defined _MSC_VER && !defined FFI_BUILDING +#define FFI_EXTERN extern __declspec(dllimport) +#else +#define FFI_EXTERN extern +#endif + +/* These are defined in types.c */ +FFI_EXTERN ffi_type ffi_type_void; +FFI_EXTERN ffi_type ffi_type_uint8; +FFI_EXTERN ffi_type ffi_type_sint8; +FFI_EXTERN ffi_type ffi_type_uint16; +FFI_EXTERN ffi_type ffi_type_sint16; +FFI_EXTERN ffi_type ffi_type_uint32; +FFI_EXTERN ffi_type ffi_type_sint32; +FFI_EXTERN ffi_type ffi_type_uint64; +FFI_EXTERN ffi_type ffi_type_sint64; +FFI_EXTERN ffi_type ffi_type_float; +FFI_EXTERN ffi_type ffi_type_double; +FFI_EXTERN ffi_type ffi_type_pointer; + +#if 1 +FFI_EXTERN ffi_type ffi_type_longdouble; +#else +#define ffi_type_longdouble ffi_type_double +#endif + +#ifdef FFI_TARGET_HAS_COMPLEX_TYPE +FFI_EXTERN ffi_type ffi_type_complex_float; +FFI_EXTERN ffi_type ffi_type_complex_double; +#if 1 +FFI_EXTERN ffi_type ffi_type_complex_longdouble; +#else +#define ffi_type_complex_longdouble ffi_type_complex_double +#endif +#endif +#endif /* LIBFFI_HIDE_BASIC_TYPES */ + +typedef enum { + FFI_OK = 0, + FFI_BAD_TYPEDEF, + FFI_BAD_ABI +} ffi_status; + +typedef unsigned FFI_TYPE; + +typedef struct { + ffi_abi abi; + unsigned nargs; + ffi_type **arg_types; + ffi_type *rtype; + unsigned bytes; + unsigned flags; +#ifdef FFI_EXTRA_CIF_FIELDS + FFI_EXTRA_CIF_FIELDS; +#endif +} ffi_cif; + +#if 0 +/* Used to adjust size/alignment of ffi types. */ +void ffi_prep_types (ffi_abi abi); +#endif + +/* Used internally, but overridden by some architectures */ +ffi_status ffi_prep_cif_core(ffi_cif *cif, + ffi_abi abi, + unsigned int isvariadic, + unsigned int nfixedargs, + unsigned int ntotalargs, + ffi_type *rtype, + ffi_type **atypes); + +/* ---- Definitions for the raw API -------------------------------------- */ + +#ifndef FFI_SIZEOF_ARG +# if LONG_MAX == 2147483647 +# define FFI_SIZEOF_ARG 4 +# elif LONG_MAX == FFI_64_BIT_MAX +# define FFI_SIZEOF_ARG 8 +# endif +#endif + +#ifndef FFI_SIZEOF_JAVA_RAW +# define FFI_SIZEOF_JAVA_RAW FFI_SIZEOF_ARG +#endif + +typedef union { + ffi_sarg sint; + ffi_arg uint; + float flt; + char data[FFI_SIZEOF_ARG]; + void* ptr; +} ffi_raw; + +#if FFI_SIZEOF_JAVA_RAW == 4 && FFI_SIZEOF_ARG == 8 +/* This is a special case for mips64/n32 ABI (and perhaps others) where + sizeof(void *) is 4 and FFI_SIZEOF_ARG is 8. */ +typedef union { + signed int sint; + unsigned int uint; + float flt; + char data[FFI_SIZEOF_JAVA_RAW]; + void* ptr; +} ffi_java_raw; +#else +typedef ffi_raw ffi_java_raw; +#endif + + +void ffi_raw_call (ffi_cif *cif, + void (*fn)(void), + void *rvalue, + ffi_raw *avalue); + +void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw); +void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args); +size_t ffi_raw_size (ffi_cif *cif); + +/* This is analogous to the raw API, except it uses Java parameter */ +/* packing, even on 64-bit machines. I.e. on 64-bit machines */ +/* longs and doubles are followed by an empty 64-bit word. */ + +void ffi_java_raw_call (ffi_cif *cif, + void (*fn)(void), + void *rvalue, + ffi_java_raw *avalue); + +void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw); +void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_java_raw *raw, void **args); +size_t ffi_java_raw_size (ffi_cif *cif); + +/* ---- Definitions for closures ----------------------------------------- */ + +#if FFI_CLOSURES + +#ifdef _MSC_VER +__declspec(align(8)) +#endif +typedef struct { +#if 0 + void *trampoline_table; + void *trampoline_table_entry; +#else + char tramp[FFI_TRAMPOLINE_SIZE]; +#endif + ffi_cif *cif; + void (*fun)(ffi_cif*,void*,void**,void*); + void *user_data; +#ifdef __GNUC__ +} ffi_closure __attribute__((aligned (8))); +#else +} ffi_closure; +# ifdef __sgi +# pragma pack 0 +# endif +#endif + +void *ffi_closure_alloc (size_t size, void **code); +void ffi_closure_free (void *); + +ffi_status +ffi_prep_closure (ffi_closure*, + ffi_cif *, + void (*fun)(ffi_cif*,void*,void**,void*), + void *user_data); + +ffi_status +ffi_prep_closure_loc (ffi_closure*, + ffi_cif *, + void (*fun)(ffi_cif*,void*,void**,void*), + void *user_data, + void*codeloc); + +#ifdef __sgi +# pragma pack 8 +#endif +typedef struct { +#if 0 + void *trampoline_table; + void *trampoline_table_entry; +#else + char tramp[FFI_TRAMPOLINE_SIZE]; +#endif + ffi_cif *cif; + +#if !FFI_NATIVE_RAW_API + + /* if this is enabled, then a raw closure has the same layout + as a regular closure. We use this to install an intermediate + handler to do the transaltion, void** -> ffi_raw*. */ + + void (*translate_args)(ffi_cif*,void*,void**,void*); + void *this_closure; + +#endif + + void (*fun)(ffi_cif*,void*,ffi_raw*,void*); + void *user_data; + +} ffi_raw_closure; + +typedef struct { +#if 0 + void *trampoline_table; + void *trampoline_table_entry; +#else + char tramp[FFI_TRAMPOLINE_SIZE]; +#endif + + ffi_cif *cif; + +#if !FFI_NATIVE_RAW_API + + /* if this is enabled, then a raw closure has the same layout + as a regular closure. We use this to install an intermediate + handler to do the transaltion, void** -> ffi_raw*. */ + + void (*translate_args)(ffi_cif*,void*,void**,void*); + void *this_closure; + +#endif + + void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*); + void *user_data; + +} ffi_java_raw_closure; + +ffi_status +ffi_prep_raw_closure (ffi_raw_closure*, + ffi_cif *cif, + void (*fun)(ffi_cif*,void*,ffi_raw*,void*), + void *user_data); + +ffi_status +ffi_prep_raw_closure_loc (ffi_raw_closure*, + ffi_cif *cif, + void (*fun)(ffi_cif*,void*,ffi_raw*,void*), + void *user_data, + void *codeloc); + +ffi_status +ffi_prep_java_raw_closure (ffi_java_raw_closure*, + ffi_cif *cif, + void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*), + void *user_data); + +ffi_status +ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*, + ffi_cif *cif, + void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*), + void *user_data, + void *codeloc); + +#endif /* FFI_CLOSURES */ + +/* ---- Public interface definition -------------------------------------- */ + +ffi_status ffi_prep_cif(ffi_cif *cif, + ffi_abi abi, + unsigned int nargs, + ffi_type *rtype, + ffi_type **atypes); + +ffi_status ffi_prep_cif_var(ffi_cif *cif, + ffi_abi abi, + unsigned int nfixedargs, + unsigned int ntotalargs, + ffi_type *rtype, + ffi_type **atypes); + +void ffi_call(ffi_cif *cif, + void (*fn)(void), + void *rvalue, + void **avalue); + +/* Useful for eliminating compiler warnings */ +#define FFI_FN(f) ((void (*)(void))f) + +/* ---- Definitions shared with assembly code ---------------------------- */ + +#endif + +/* If these change, update src/mips/ffitarget.h. */ +#define FFI_TYPE_VOID 0 +#define FFI_TYPE_INT 1 +#define FFI_TYPE_FLOAT 2 +#define FFI_TYPE_DOUBLE 3 +#if 1 +#define FFI_TYPE_LONGDOUBLE 4 +#else +#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE +#endif +#define FFI_TYPE_UINT8 5 +#define FFI_TYPE_SINT8 6 +#define FFI_TYPE_UINT16 7 +#define FFI_TYPE_SINT16 8 +#define FFI_TYPE_UINT32 9 +#define FFI_TYPE_SINT32 10 +#define FFI_TYPE_UINT64 11 +#define FFI_TYPE_SINT64 12 +#define FFI_TYPE_STRUCT 13 +#define FFI_TYPE_POINTER 14 +#define FFI_TYPE_COMPLEX 15 + +/* This should always refer to the last type code (for sanity checks) */ +#define FFI_TYPE_LAST FFI_TYPE_COMPLEX + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/frameworks/cairosvg/dependencies/libffi/3.2.1/lib/libffi-3.2.1/include/ffitarget.h b/frameworks/cairosvg/dependencies/libffi/3.2.1/lib/libffi-3.2.1/include/ffitarget.h new file mode 100755 index 00000000..a236677c --- /dev/null +++ b/frameworks/cairosvg/dependencies/libffi/3.2.1/lib/libffi-3.2.1/include/ffitarget.h @@ -0,0 +1,150 @@ +/* -----------------------------------------------------------------*-C-*- + ffitarget.h - Copyright (c) 2012, 2014 Anthony Green + Copyright (c) 1996-2003, 2010 Red Hat, Inc. + Copyright (C) 2008 Free Software Foundation, Inc. + + Target configuration macros for x86 and x86-64. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + ----------------------------------------------------------------------- */ + +#ifndef LIBFFI_TARGET_H +#define LIBFFI_TARGET_H + +#ifndef LIBFFI_H +#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead." +#endif + +/* ---- System specific configurations ----------------------------------- */ + +/* For code common to all platforms on x86 and x86_64. */ +#define X86_ANY + +#if defined (X86_64) && defined (__i386__) +#undef X86_64 +#define X86 +#endif + +#ifdef X86_WIN64 +#define FFI_SIZEOF_ARG 8 +#define USE_BUILTIN_FFS 0 /* not yet implemented in mingw-64 */ +#endif + +#define FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION +#define FFI_TARGET_HAS_COMPLEX_TYPE + +/* ---- Generic type definitions ----------------------------------------- */ + +#ifndef LIBFFI_ASM +#ifdef X86_WIN64 +#ifdef _MSC_VER +typedef unsigned __int64 ffi_arg; +typedef __int64 ffi_sarg; +#else +typedef unsigned long long ffi_arg; +typedef long long ffi_sarg; +#endif +#else +#if defined __x86_64__ && defined __ILP32__ +#define FFI_SIZEOF_ARG 8 +#define FFI_SIZEOF_JAVA_RAW 4 +typedef unsigned long long ffi_arg; +typedef long long ffi_sarg; +#else +typedef unsigned long ffi_arg; +typedef signed long ffi_sarg; +#endif +#endif + +typedef enum ffi_abi { + FFI_FIRST_ABI = 0, + + /* ---- Intel x86 Win32 ---------- */ +#ifdef X86_WIN32 + FFI_SYSV, + FFI_STDCALL, + FFI_THISCALL, + FFI_FASTCALL, + FFI_MS_CDECL, + FFI_PASCAL, + FFI_REGISTER, + FFI_LAST_ABI, +#ifdef _MSC_VER + FFI_DEFAULT_ABI = FFI_MS_CDECL +#else + FFI_DEFAULT_ABI = FFI_SYSV +#endif + +#elif defined(X86_WIN64) + FFI_WIN64, + FFI_LAST_ABI, + FFI_DEFAULT_ABI = FFI_WIN64 + +#else + /* ---- Intel x86 and AMD x86-64 - */ + FFI_SYSV, + FFI_UNIX64, /* Unix variants all use the same ABI for x86-64 */ + FFI_THISCALL, + FFI_FASTCALL, + FFI_STDCALL, + FFI_PASCAL, + FFI_REGISTER, + FFI_LAST_ABI, +#if defined(__i386__) || defined(__i386) + FFI_DEFAULT_ABI = FFI_SYSV +#else + FFI_DEFAULT_ABI = FFI_UNIX64 +#endif +#endif +} ffi_abi; +#endif + +/* ---- Definitions for closures ----------------------------------------- */ + +#define FFI_CLOSURES 1 +#define FFI_TYPE_SMALL_STRUCT_1B (FFI_TYPE_LAST + 1) +#define FFI_TYPE_SMALL_STRUCT_2B (FFI_TYPE_LAST + 2) +#define FFI_TYPE_SMALL_STRUCT_4B (FFI_TYPE_LAST + 3) +#define FFI_TYPE_MS_STRUCT (FFI_TYPE_LAST + 4) + +#if defined (X86_64) || (defined (__x86_64__) && defined (X86_DARWIN)) +#define FFI_TRAMPOLINE_SIZE 24 +#define FFI_NATIVE_RAW_API 0 +#else +#ifdef X86_WIN32 +#define FFI_TRAMPOLINE_SIZE 52 +#else +#ifdef X86_WIN64 +#define FFI_TRAMPOLINE_SIZE 29 +#define FFI_NATIVE_RAW_API 0 +#define FFI_NO_RAW_API 1 +#else +#define FFI_TRAMPOLINE_SIZE 10 +#endif +#endif +#ifndef X86_WIN64 +#define FFI_NATIVE_RAW_API 1 /* x86 has native raw api support */ +#endif +#endif + +#endif + diff --git a/frameworks/cairosvg/dependencies/libffi/3.2.1/lib/libffi.6.dylib b/frameworks/cairosvg/dependencies/libffi/3.2.1/lib/libffi.6.dylib new file mode 100755 index 00000000..5521e687 Binary files /dev/null and b/frameworks/cairosvg/dependencies/libffi/3.2.1/lib/libffi.6.dylib differ diff --git a/frameworks/cairosvg/dependencies/libffi/3.2.1/lib/libffi.dylib b/frameworks/cairosvg/dependencies/libffi/3.2.1/lib/libffi.dylib new file mode 120000 index 00000000..166f44a3 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libffi/3.2.1/lib/libffi.dylib @@ -0,0 +1 @@ +libffi.6.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/libpng/1.6.34/include/libpng16/png.h b/frameworks/cairosvg/dependencies/libpng/1.6.34/include/libpng16/png.h new file mode 100755 index 00000000..4c873f5c --- /dev/null +++ b/frameworks/cairosvg/dependencies/libpng/1.6.34/include/libpng16/png.h @@ -0,0 +1,3278 @@ + +/* png.h - header file for PNG reference library + * + * libpng version 1.6.34, September 29, 2017 + * + * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license (See LICENSE, below) + * + * Authors and maintainers: + * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat + * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger + * libpng versions 0.97, January 1998, through 1.6.34, September 29, 2017: + * Glenn Randers-Pehrson. + * See also "Contributing Authors", below. + */ + +/* + * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + * + * If you modify libpng you may insert additional notices immediately following + * this sentence. + * + * This code is released under the libpng license. + * + * libpng versions 1.0.7, July 1, 2000 through 1.6.34, September 29, 2017 are + * Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are + * derived from libpng-1.0.6, and are distributed according to the same + * disclaimer and license as libpng-1.0.6 with the following individuals + * added to the list of Contributing Authors: + * + * Simon-Pierre Cadieux + * Eric S. Raymond + * Mans Rullgard + * Cosmin Truta + * Gilles Vollant + * James Yu + * Mandar Sahastrabuddhe + * Google Inc. + * Vadim Barkov + * + * and with the following additions to the disclaimer: + * + * There is no warranty against interference with your enjoyment of the + * library or against infringement. There is no warranty that our + * efforts or the library will fulfill any of your particular purposes + * or needs. This library is provided with all faults, and the entire + * risk of satisfactory quality, performance, accuracy, and effort is with + * the user. + * + * Some files in the "contrib" directory and some configure-generated + * files that are distributed with libpng have other copyright owners and + * are released under other open source licenses. + * + * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are + * Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from + * libpng-0.96, and are distributed according to the same disclaimer and + * license as libpng-0.96, with the following individuals added to the list + * of Contributing Authors: + * + * Tom Lane + * Glenn Randers-Pehrson + * Willem van Schaik + * + * libpng versions 0.89, June 1996, through 0.96, May 1997, are + * Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, + * and are distributed according to the same disclaimer and license as + * libpng-0.88, with the following individuals added to the list of + * Contributing Authors: + * + * John Bowler + * Kevin Bracey + * Sam Bushell + * Magnus Holmgren + * Greg Roelofs + * Tom Tanner + * + * Some files in the "scripts" directory have other copyright owners + * but are released under this license. + * + * libpng versions 0.5, May 1995, through 0.88, January 1996, are + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * For the purposes of this copyright and license, "Contributing Authors" + * is defined as the following set of individuals: + * + * Andreas Dilger + * Dave Martindale + * Guy Eric Schalnat + * Paul Schmidt + * Tim Wegner + * + * The PNG Reference Library is supplied "AS IS". The Contributing Authors + * and Group 42, Inc. disclaim all warranties, expressed or implied, + * including, without limitation, the warranties of merchantability and of + * fitness for any purpose. The Contributing Authors and Group 42, Inc. + * assume no liability for direct, indirect, incidental, special, exemplary, + * or consequential damages, which may result from the use of the PNG + * Reference Library, even if advised of the possibility of such damage. + * + * Permission is hereby granted to use, copy, modify, and distribute this + * source code, or portions hereof, for any purpose, without fee, subject + * to the following restrictions: + * + * 1. The origin of this source code must not be misrepresented. + * + * 2. Altered versions must be plainly marked as such and must not + * be misrepresented as being the original source. + * + * 3. This Copyright notice may not be removed or altered from any + * source or altered source distribution. + * + * The Contributing Authors and Group 42, Inc. specifically permit, without + * fee, and encourage the use of this source code as a component to + * supporting the PNG file format in commercial products. If you use this + * source code in a product, acknowledgment is not required but would be + * appreciated. + * + * END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE. + * + * TRADEMARK: + * + * The name "libpng" has not been registered by the Copyright owner + * as a trademark in any jurisdiction. However, because libpng has + * been distributed and maintained world-wide, continually since 1995, + * the Copyright owner claims "common-law trademark protection" in any + * jurisdiction where common-law trademark is recognized. + * + * OSI CERTIFICATION: + * + * Libpng is OSI Certified Open Source Software. OSI Certified Open Source is + * a certification mark of the Open Source Initiative. OSI has not addressed + * the additional disclaimers inserted at version 1.0.7. + * + * EXPORT CONTROL: + * + * The Copyright owner believes that the Export Control Classification + * Number (ECCN) for libpng is EAR99, which means not subject to export + * controls or International Traffic in Arms Regulations (ITAR) because + * it is open source, publicly available software, that does not contain + * any encryption software. See the EAR, paragraphs 734.3(b)(3) and + * 734.7(b). + */ + +/* + * A "png_get_copyright" function is available, for convenient use in "about" + * boxes and the like: + * + * printf("%s", png_get_copyright(NULL)); + * + * Also, the PNG logo (in PNG format, of course) is supplied in the + * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). + */ + +/* + * The contributing authors would like to thank all those who helped + * with testing, bug fixes, and patience. This wouldn't have been + * possible without all of you. + * + * Thanks to Frank J. T. Wojcik for helping with the documentation. + */ + +/* Note about libpng version numbers: + * + * Due to various miscommunications, unforeseen code incompatibilities + * and occasional factors outside the authors' control, version numbering + * on the library has not always been consistent and straightforward. + * The following table summarizes matters since version 0.89c, which was + * the first widely used release: + * + * source png.h png.h shared-lib + * version string int version + * ------- ------ ----- ---------- + * 0.89c "1.0 beta 3" 0.89 89 1.0.89 + * 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90] + * 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95] + * 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96] + * 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97] + * 0.97c 0.97 97 2.0.97 + * 0.98 0.98 98 2.0.98 + * 0.99 0.99 98 2.0.99 + * 0.99a-m 0.99 99 2.0.99 + * 1.00 1.00 100 2.1.0 [100 should be 10000] + * 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000] + * 1.0.1 png.h string is 10001 2.1.0 + * 1.0.1a-e identical to the 10002 from here on, the shared library + * 1.0.2 source version) 10002 is 2.V where V is the source code + * 1.0.2a-b 10003 version, except as noted. + * 1.0.3 10003 + * 1.0.3a-d 10004 + * 1.0.4 10004 + * 1.0.4a-f 10005 + * 1.0.5 (+ 2 patches) 10005 + * 1.0.5a-d 10006 + * 1.0.5e-r 10100 (not source compatible) + * 1.0.5s-v 10006 (not binary compatible) + * 1.0.6 (+ 3 patches) 10006 (still binary incompatible) + * 1.0.6d-f 10007 (still binary incompatible) + * 1.0.6g 10007 + * 1.0.6h 10007 10.6h (testing xy.z so-numbering) + * 1.0.6i 10007 10.6i + * 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0) + * 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible) + * 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible) + * 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible) + * 1.0.7 1 10007 (still compatible) + * ... + * 1.0.19 10 10019 10.so.0.19[.0] + * ... + * 1.2.59 13 10257 12.so.0.59[.0] + * ... + * 1.5.30 15 10527 15.so.15.30[.0] + * ... + * 1.6.34 16 10633 16.so.16.34[.0] + * + * Henceforth the source version will match the shared-library major + * and minor numbers; the shared-library major version number will be + * used for changes in backward compatibility, as it is intended. The + * PNG_LIBPNG_VER macro, which is not used within libpng but is available + * for applications, is an unsigned integer of the form xyyzz corresponding + * to the source version x.y.z (leading zeros in y and z). Beta versions + * were given the previous public release number plus a letter, until + * version 1.0.6j; from then on they were given the upcoming public + * release number plus "betaNN" or "rcNN". + * + * Binary incompatibility exists only when applications make direct access + * to the info_ptr or png_ptr members through png.h, and the compiled + * application is loaded with a different version of the library. + * + * DLLNUM will change each time there are forward or backward changes + * in binary compatibility (e.g., when a new feature is added). + * + * See libpng.txt or libpng.3 for more information. The PNG specification + * is available as a W3C Recommendation and as an ISO Specification, + * <https://www.w3.org/TR/2003/REC-PNG-20031110/ + */ + +/* + * Y2K compliance in libpng: + * ========================= + * + * September 29, 2017 + * + * Since the PNG Development group is an ad-hoc body, we can't make + * an official declaration. + * + * This is your unofficial assurance that libpng from version 0.71 and + * upward through 1.6.34 are Y2K compliant. It is my belief that + * earlier versions were also Y2K compliant. + * + * Libpng only has two year fields. One is a 2-byte unsigned integer + * that will hold years up to 65535. The other, which is deprecated, + * holds the date in text format, and will hold years up to 9999. + * + * The integer is + * "png_uint_16 year" in png_time_struct. + * + * The string is + * "char time_buffer[29]" in png_struct. This is no longer used + * in libpng-1.6.x and will be removed from libpng-1.7.0. + * + * There are seven time-related functions: + * png.c: png_convert_to_rfc_1123_buffer() in png.c + * (formerly png_convert_to_rfc_1123() prior to libpng-1.5.x and + * png_convert_to_rfc_1152() in error prior to libpng-0.98) + * png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c + * png_convert_from_time_t() in pngwrite.c + * png_get_tIME() in pngget.c + * png_handle_tIME() in pngrutil.c, called in pngread.c + * png_set_tIME() in pngset.c + * png_write_tIME() in pngwutil.c, called in pngwrite.c + * + * All handle dates properly in a Y2K environment. The + * png_convert_from_time_t() function calls gmtime() to convert from system + * clock time, which returns (year - 1900), which we properly convert to + * the full 4-digit year. There is a possibility that libpng applications + * are not passing 4-digit years into the png_convert_to_rfc_1123_buffer() + * function, or that they are incorrectly passing only a 2-digit year + * instead of "year - 1900" into the png_convert_from_struct_tm() function, + * but this is not under our control. The libpng documentation has always + * stated that it works with 4-digit years, and the APIs have been + * documented as such. + * + * The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned + * integer to hold the year, and can hold years as large as 65535. + * + * zlib, upon which libpng depends, is also Y2K compliant. It contains + * no date-related code. + * + * Glenn Randers-Pehrson + * libpng maintainer + * PNG Development Group + */ + +#ifndef PNG_H +#define PNG_H + +/* This is not the place to learn how to use libpng. The file libpng-manual.txt + * describes how to use libpng, and the file example.c summarizes it + * with some code on which to build. This file is useful for looking + * at the actual function definitions and structure components. If that + * file has been stripped from your copy of libpng, you can find it at + * <http://www.libpng.org/pub/png/libpng-manual.txt> + * + * If you just need to read a PNG file and don't want to read the documentation + * skip to the end of this file and read the section entitled 'simplified API'. + */ + +/* Version information for png.h - this should match the version in png.c */ +#define PNG_LIBPNG_VER_STRING "1.6.34" +#define PNG_HEADER_VERSION_STRING " libpng version 1.6.34 - September 29, 2017\n" + +#define PNG_LIBPNG_VER_SONUM 16 +#define PNG_LIBPNG_VER_DLLNUM 16 + +/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ +#define PNG_LIBPNG_VER_MAJOR 1 +#define PNG_LIBPNG_VER_MINOR 6 +#define PNG_LIBPNG_VER_RELEASE 34 + +/* This should match the numeric part of the final component of + * PNG_LIBPNG_VER_STRING, omitting any leading zero: + */ + +#define PNG_LIBPNG_VER_BUILD 0 + +/* Release Status */ +#define PNG_LIBPNG_BUILD_ALPHA 1 +#define PNG_LIBPNG_BUILD_BETA 2 +#define PNG_LIBPNG_BUILD_RC 3 +#define PNG_LIBPNG_BUILD_STABLE 4 +#define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7 + +/* Release-Specific Flags */ +#define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with + PNG_LIBPNG_BUILD_STABLE only */ +#define PNG_LIBPNG_BUILD_PRIVATE 16 /* Cannot be OR'ed with + PNG_LIBPNG_BUILD_SPECIAL */ +#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with + PNG_LIBPNG_BUILD_PRIVATE */ + +#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE + +/* Careful here. At one time, Guy wanted to use 082, but that would be octal. + * We must not include leading zeros. + * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only + * version 1.0.0 was mis-numbered 100 instead of 10000). From + * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release + */ +#define PNG_LIBPNG_VER 10634 /* 1.6.34 */ + +/* Library configuration: these options cannot be changed after + * the library has been built. + */ +#ifndef PNGLCONF_H +/* If pnglibconf.h is missing, you can + * copy scripts/pnglibconf.h.prebuilt to pnglibconf.h + */ +# include "pnglibconf.h" +#endif + +#ifndef PNG_VERSION_INFO_ONLY +/* Machine specific configuration. */ +# include "pngconf.h" +#endif + +/* + * Added at libpng-1.2.8 + * + * Ref MSDN: Private as priority over Special + * VS_FF_PRIVATEBUILD File *was not* built using standard release + * procedures. If this value is given, the StringFileInfo block must + * contain a PrivateBuild string. + * + * VS_FF_SPECIALBUILD File *was* built by the original company using + * standard release procedures but is a variation of the standard + * file of the same version number. If this value is given, the + * StringFileInfo block must contain a SpecialBuild string. + */ + +#ifdef PNG_USER_PRIVATEBUILD /* From pnglibconf.h */ +# define PNG_LIBPNG_BUILD_TYPE \ + (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE) +#else +# ifdef PNG_LIBPNG_SPECIALBUILD +# define PNG_LIBPNG_BUILD_TYPE \ + (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL) +# else +# define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE) +# endif +#endif + +#ifndef PNG_VERSION_INFO_ONLY + +/* Inhibit C++ name-mangling for libpng functions but not for system calls. */ +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* Version information for C files, stored in png.c. This had better match + * the version above. + */ +#define png_libpng_ver png_get_header_ver(NULL) + +/* This file is arranged in several sections: + * + * 1. [omitted] + * 2. Any configuration options that can be specified by for the application + * code when it is built. (Build time configuration is in pnglibconf.h) + * 3. Type definitions (base types are defined in pngconf.h), structure + * definitions. + * 4. Exported library functions. + * 5. Simplified API. + * 6. Implementation options. + * + * The library source code has additional files (principally pngpriv.h) that + * allow configuration of the library. + */ + +/* Section 1: [omitted] */ + +/* Section 2: run time configuration + * See pnglibconf.h for build time configuration + * + * Run time configuration allows the application to choose between + * implementations of certain arithmetic APIs. The default is set + * at build time and recorded in pnglibconf.h, but it is safe to + * override these (and only these) settings. Note that this won't + * change what the library does, only application code, and the + * settings can (and probably should) be made on a per-file basis + * by setting the #defines before including png.h + * + * Use macros to read integers from PNG data or use the exported + * functions? + * PNG_USE_READ_MACROS: use the macros (see below) Note that + * the macros evaluate their argument multiple times. + * PNG_NO_USE_READ_MACROS: call the relevant library function. + * + * Use the alternative algorithm for compositing alpha samples that + * does not use division? + * PNG_READ_COMPOSITE_NODIV_SUPPORTED: use the 'no division' + * algorithm. + * PNG_NO_READ_COMPOSITE_NODIV: use the 'division' algorithm. + * + * How to handle benign errors if PNG_ALLOW_BENIGN_ERRORS is + * false? + * PNG_ALLOW_BENIGN_ERRORS: map calls to the benign error + * APIs to png_warning. + * Otherwise the calls are mapped to png_error. + */ + +/* Section 3: type definitions, including structures and compile time + * constants. + * See pngconf.h for base types that vary by machine/system + */ + +/* This triggers a compiler error in png.c, if png.c and png.h + * do not agree upon the version number. + */ +typedef char* png_libpng_version_1_6_34; + +/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info. + * + * png_struct is the cache of information used while reading or writing a single + * PNG file. One of these is always required, although the simplified API + * (below) hides the creation and destruction of it. + */ +typedef struct png_struct_def png_struct; +typedef const png_struct * png_const_structp; +typedef png_struct * png_structp; +typedef png_struct * * png_structpp; + +/* png_info contains information read from or to be written to a PNG file. One + * or more of these must exist while reading or creating a PNG file. The + * information is not used by libpng during read but is used to control what + * gets written when a PNG file is created. "png_get_" function calls read + * information during read and "png_set_" functions calls write information + * when creating a PNG. + * been moved into a separate header file that is not accessible to + * applications. Read libpng-manual.txt or libpng.3 for more info. + */ +typedef struct png_info_def png_info; +typedef png_info * png_infop; +typedef const png_info * png_const_infop; +typedef png_info * * png_infopp; + +/* Types with names ending 'p' are pointer types. The corresponding types with + * names ending 'rp' are identical pointer types except that the pointer is + * marked 'restrict', which means that it is the only pointer to the object + * passed to the function. Applications should not use the 'restrict' types; + * it is always valid to pass 'p' to a pointer with a function argument of the + * corresponding 'rp' type. Different compilers have different rules with + * regard to type matching in the presence of 'restrict'. For backward + * compatibility libpng callbacks never have 'restrict' in their parameters and, + * consequentially, writing portable application code is extremely difficult if + * an attempt is made to use 'restrict'. + */ +typedef png_struct * PNG_RESTRICT png_structrp; +typedef const png_struct * PNG_RESTRICT png_const_structrp; +typedef png_info * PNG_RESTRICT png_inforp; +typedef const png_info * PNG_RESTRICT png_const_inforp; + +/* Three color definitions. The order of the red, green, and blue, (and the + * exact size) is not important, although the size of the fields need to + * be png_byte or png_uint_16 (as defined below). + */ +typedef struct png_color_struct +{ + png_byte red; + png_byte green; + png_byte blue; +} png_color; +typedef png_color * png_colorp; +typedef const png_color * png_const_colorp; +typedef png_color * * png_colorpp; + +typedef struct png_color_16_struct +{ + png_byte index; /* used for palette files */ + png_uint_16 red; /* for use in red green blue files */ + png_uint_16 green; + png_uint_16 blue; + png_uint_16 gray; /* for use in grayscale files */ +} png_color_16; +typedef png_color_16 * png_color_16p; +typedef const png_color_16 * png_const_color_16p; +typedef png_color_16 * * png_color_16pp; + +typedef struct png_color_8_struct +{ + png_byte red; /* for use in red green blue files */ + png_byte green; + png_byte blue; + png_byte gray; /* for use in grayscale files */ + png_byte alpha; /* for alpha channel files */ +} png_color_8; +typedef png_color_8 * png_color_8p; +typedef const png_color_8 * png_const_color_8p; +typedef png_color_8 * * png_color_8pp; + +/* + * The following two structures are used for the in-core representation + * of sPLT chunks. + */ +typedef struct png_sPLT_entry_struct +{ + png_uint_16 red; + png_uint_16 green; + png_uint_16 blue; + png_uint_16 alpha; + png_uint_16 frequency; +} png_sPLT_entry; +typedef png_sPLT_entry * png_sPLT_entryp; +typedef const png_sPLT_entry * png_const_sPLT_entryp; +typedef png_sPLT_entry * * png_sPLT_entrypp; + +/* When the depth of the sPLT palette is 8 bits, the color and alpha samples + * occupy the LSB of their respective members, and the MSB of each member + * is zero-filled. The frequency member always occupies the full 16 bits. + */ + +typedef struct png_sPLT_struct +{ + png_charp name; /* palette name */ + png_byte depth; /* depth of palette samples */ + png_sPLT_entryp entries; /* palette entries */ + png_int_32 nentries; /* number of palette entries */ +} png_sPLT_t; +typedef png_sPLT_t * png_sPLT_tp; +typedef const png_sPLT_t * png_const_sPLT_tp; +typedef png_sPLT_t * * png_sPLT_tpp; + +#ifdef PNG_TEXT_SUPPORTED +/* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file, + * and whether that contents is compressed or not. The "key" field + * points to a regular zero-terminated C string. The "text" fields can be a + * regular C string, an empty string, or a NULL pointer. + * However, the structure returned by png_get_text() will always contain + * the "text" field as a regular zero-terminated C string (possibly + * empty), never a NULL pointer, so it can be safely used in printf() and + * other string-handling functions. Note that the "itxt_length", "lang", and + * "lang_key" members of the structure only exist when the library is built + * with iTXt chunk support. Prior to libpng-1.4.0 the library was built by + * default without iTXt support. Also note that when iTXt *is* supported, + * the "lang" and "lang_key" fields contain NULL pointers when the + * "compression" field contains * PNG_TEXT_COMPRESSION_NONE or + * PNG_TEXT_COMPRESSION_zTXt. Note that the "compression value" is not the + * same as what appears in the PNG tEXt/zTXt/iTXt chunk's "compression flag" + * which is always 0 or 1, or its "compression method" which is always 0. + */ +typedef struct png_text_struct +{ + int compression; /* compression value: + -1: tEXt, none + 0: zTXt, deflate + 1: iTXt, none + 2: iTXt, deflate */ + png_charp key; /* keyword, 1-79 character description of "text" */ + png_charp text; /* comment, may be an empty string (ie "") + or a NULL pointer */ + png_size_t text_length; /* length of the text string */ + png_size_t itxt_length; /* length of the itxt string */ + png_charp lang; /* language code, 0-79 characters + or a NULL pointer */ + png_charp lang_key; /* keyword translated UTF-8 string, 0 or more + chars or a NULL pointer */ +} png_text; +typedef png_text * png_textp; +typedef const png_text * png_const_textp; +typedef png_text * * png_textpp; +#endif + +/* Supported compression types for text in PNG files (tEXt, and zTXt). + * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. */ +#define PNG_TEXT_COMPRESSION_NONE_WR -3 +#define PNG_TEXT_COMPRESSION_zTXt_WR -2 +#define PNG_TEXT_COMPRESSION_NONE -1 +#define PNG_TEXT_COMPRESSION_zTXt 0 +#define PNG_ITXT_COMPRESSION_NONE 1 +#define PNG_ITXT_COMPRESSION_zTXt 2 +#define PNG_TEXT_COMPRESSION_LAST 3 /* Not a valid value */ + +/* png_time is a way to hold the time in an machine independent way. + * Two conversions are provided, both from time_t and struct tm. There + * is no portable way to convert to either of these structures, as far + * as I know. If you know of a portable way, send it to me. As a side + * note - PNG has always been Year 2000 compliant! + */ +typedef struct png_time_struct +{ + png_uint_16 year; /* full year, as in, 1995 */ + png_byte month; /* month of year, 1 - 12 */ + png_byte day; /* day of month, 1 - 31 */ + png_byte hour; /* hour of day, 0 - 23 */ + png_byte minute; /* minute of hour, 0 - 59 */ + png_byte second; /* second of minute, 0 - 60 (for leap seconds) */ +} png_time; +typedef png_time * png_timep; +typedef const png_time * png_const_timep; +typedef png_time * * png_timepp; + +#if defined(PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED) ||\ + defined(PNG_USER_CHUNKS_SUPPORTED) +/* png_unknown_chunk is a structure to hold queued chunks for which there is + * no specific support. The idea is that we can use this to queue + * up private chunks for output even though the library doesn't actually + * know about their semantics. + * + * The data in the structure is set by libpng on read and used on write. + */ +typedef struct png_unknown_chunk_t +{ + png_byte name[5]; /* Textual chunk name with '\0' terminator */ + png_byte *data; /* Data, should not be modified on read! */ + png_size_t size; + + /* On write 'location' must be set using the flag values listed below. + * Notice that on read it is set by libpng however the values stored have + * more bits set than are listed below. Always treat the value as a + * bitmask. On write set only one bit - setting multiple bits may cause the + * chunk to be written in multiple places. + */ + png_byte location; /* mode of operation at read time */ +} +png_unknown_chunk; + +typedef png_unknown_chunk * png_unknown_chunkp; +typedef const png_unknown_chunk * png_const_unknown_chunkp; +typedef png_unknown_chunk * * png_unknown_chunkpp; +#endif + +/* Flag values for the unknown chunk location byte. */ +#define PNG_HAVE_IHDR 0x01 +#define PNG_HAVE_PLTE 0x02 +#define PNG_AFTER_IDAT 0x08 + +/* Maximum positive integer used in PNG is (2^31)-1 */ +#define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL) +#define PNG_UINT_32_MAX ((png_uint_32)(-1)) +#define PNG_SIZE_MAX ((png_size_t)(-1)) + +/* These are constants for fixed point values encoded in the + * PNG specification manner (x100000) + */ +#define PNG_FP_1 100000 +#define PNG_FP_HALF 50000 +#define PNG_FP_MAX ((png_fixed_point)0x7fffffffL) +#define PNG_FP_MIN (-PNG_FP_MAX) + +/* These describe the color_type field in png_info. */ +/* color type masks */ +#define PNG_COLOR_MASK_PALETTE 1 +#define PNG_COLOR_MASK_COLOR 2 +#define PNG_COLOR_MASK_ALPHA 4 + +/* color types. Note that not all combinations are legal */ +#define PNG_COLOR_TYPE_GRAY 0 +#define PNG_COLOR_TYPE_PALETTE (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE) +#define PNG_COLOR_TYPE_RGB (PNG_COLOR_MASK_COLOR) +#define PNG_COLOR_TYPE_RGB_ALPHA (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA) +#define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA) +/* aliases */ +#define PNG_COLOR_TYPE_RGBA PNG_COLOR_TYPE_RGB_ALPHA +#define PNG_COLOR_TYPE_GA PNG_COLOR_TYPE_GRAY_ALPHA + +/* This is for compression type. PNG 1.0-1.2 only define the single type. */ +#define PNG_COMPRESSION_TYPE_BASE 0 /* Deflate method 8, 32K window */ +#define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE + +/* This is for filter type. PNG 1.0-1.2 only define the single type. */ +#define PNG_FILTER_TYPE_BASE 0 /* Single row per-byte filtering */ +#define PNG_INTRAPIXEL_DIFFERENCING 64 /* Used only in MNG datastreams */ +#define PNG_FILTER_TYPE_DEFAULT PNG_FILTER_TYPE_BASE + +/* These are for the interlacing type. These values should NOT be changed. */ +#define PNG_INTERLACE_NONE 0 /* Non-interlaced image */ +#define PNG_INTERLACE_ADAM7 1 /* Adam7 interlacing */ +#define PNG_INTERLACE_LAST 2 /* Not a valid value */ + +/* These are for the oFFs chunk. These values should NOT be changed. */ +#define PNG_OFFSET_PIXEL 0 /* Offset in pixels */ +#define PNG_OFFSET_MICROMETER 1 /* Offset in micrometers (1/10^6 meter) */ +#define PNG_OFFSET_LAST 2 /* Not a valid value */ + +/* These are for the pCAL chunk. These values should NOT be changed. */ +#define PNG_EQUATION_LINEAR 0 /* Linear transformation */ +#define PNG_EQUATION_BASE_E 1 /* Exponential base e transform */ +#define PNG_EQUATION_ARBITRARY 2 /* Arbitrary base exponential transform */ +#define PNG_EQUATION_HYPERBOLIC 3 /* Hyperbolic sine transformation */ +#define PNG_EQUATION_LAST 4 /* Not a valid value */ + +/* These are for the sCAL chunk. These values should NOT be changed. */ +#define PNG_SCALE_UNKNOWN 0 /* unknown unit (image scale) */ +#define PNG_SCALE_METER 1 /* meters per pixel */ +#define PNG_SCALE_RADIAN 2 /* radians per pixel */ +#define PNG_SCALE_LAST 3 /* Not a valid value */ + +/* These are for the pHYs chunk. These values should NOT be changed. */ +#define PNG_RESOLUTION_UNKNOWN 0 /* pixels/unknown unit (aspect ratio) */ +#define PNG_RESOLUTION_METER 1 /* pixels/meter */ +#define PNG_RESOLUTION_LAST 2 /* Not a valid value */ + +/* These are for the sRGB chunk. These values should NOT be changed. */ +#define PNG_sRGB_INTENT_PERCEPTUAL 0 +#define PNG_sRGB_INTENT_RELATIVE 1 +#define PNG_sRGB_INTENT_SATURATION 2 +#define PNG_sRGB_INTENT_ABSOLUTE 3 +#define PNG_sRGB_INTENT_LAST 4 /* Not a valid value */ + +/* This is for text chunks */ +#define PNG_KEYWORD_MAX_LENGTH 79 + +/* Maximum number of entries in PLTE/sPLT/tRNS arrays */ +#define PNG_MAX_PALETTE_LENGTH 256 + +/* These determine if an ancillary chunk's data has been successfully read + * from the PNG header, or if the application has filled in the corresponding + * data in the info_struct to be written into the output file. The values + * of the PNG_INFO_<chunk> defines should NOT be changed. + */ +#define PNG_INFO_gAMA 0x0001U +#define PNG_INFO_sBIT 0x0002U +#define PNG_INFO_cHRM 0x0004U +#define PNG_INFO_PLTE 0x0008U +#define PNG_INFO_tRNS 0x0010U +#define PNG_INFO_bKGD 0x0020U +#define PNG_INFO_hIST 0x0040U +#define PNG_INFO_pHYs 0x0080U +#define PNG_INFO_oFFs 0x0100U +#define PNG_INFO_tIME 0x0200U +#define PNG_INFO_pCAL 0x0400U +#define PNG_INFO_sRGB 0x0800U /* GR-P, 0.96a */ +#define PNG_INFO_iCCP 0x1000U /* ESR, 1.0.6 */ +#define PNG_INFO_sPLT 0x2000U /* ESR, 1.0.6 */ +#define PNG_INFO_sCAL 0x4000U /* ESR, 1.0.6 */ +#define PNG_INFO_IDAT 0x8000U /* ESR, 1.0.6 */ +#define PNG_INFO_eXIf 0x10000U /* GR-P, 1.6.31 */ + +/* This is used for the transformation routines, as some of them + * change these values for the row. It also should enable using + * the routines for other purposes. + */ +typedef struct png_row_info_struct +{ + png_uint_32 width; /* width of row */ + png_size_t rowbytes; /* number of bytes in row */ + png_byte color_type; /* color type of row */ + png_byte bit_depth; /* bit depth of row */ + png_byte channels; /* number of channels (1, 2, 3, or 4) */ + png_byte pixel_depth; /* bits per pixel (depth * channels) */ +} png_row_info; + +typedef png_row_info * png_row_infop; +typedef png_row_info * * png_row_infopp; + +/* These are the function types for the I/O functions and for the functions + * that allow the user to override the default I/O functions with his or her + * own. The png_error_ptr type should match that of user-supplied warning + * and error functions, while the png_rw_ptr type should match that of the + * user read/write data functions. Note that the 'write' function must not + * modify the buffer it is passed. The 'read' function, on the other hand, is + * expected to return the read data in the buffer. + */ +typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp)); +typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, png_size_t)); +typedef PNG_CALLBACK(void, *png_flush_ptr, (png_structp)); +typedef PNG_CALLBACK(void, *png_read_status_ptr, (png_structp, png_uint_32, + int)); +typedef PNG_CALLBACK(void, *png_write_status_ptr, (png_structp, png_uint_32, + int)); + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_infop)); +typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop)); + +/* The following callback receives png_uint_32 row_number, int pass for the + * png_bytep data of the row. When transforming an interlaced image the + * row number is the row number within the sub-image of the interlace pass, so + * the value will increase to the height of the sub-image (not the full image) + * then reset to 0 for the next pass. + * + * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to + * find the output pixel (x,y) given an interlaced sub-image pixel + * (row,col,pass). (See below for these macros.) + */ +typedef PNG_CALLBACK(void, *png_progressive_row_ptr, (png_structp, png_bytep, + png_uint_32, int)); +#endif + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +typedef PNG_CALLBACK(void, *png_user_transform_ptr, (png_structp, png_row_infop, + png_bytep)); +#endif + +#ifdef PNG_USER_CHUNKS_SUPPORTED +typedef PNG_CALLBACK(int, *png_user_chunk_ptr, (png_structp, + png_unknown_chunkp)); +#endif +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED +/* not used anywhere */ +/* typedef PNG_CALLBACK(void, *png_unknown_chunk_ptr, (png_structp)); */ +#endif + +#ifdef PNG_SETJMP_SUPPORTED +/* This must match the function definition in <setjmp.h>, and the application + * must include this before png.h to obtain the definition of jmp_buf. The + * function is required to be PNG_NORETURN, but this is not checked. If the + * function does return the application will crash via an abort() or similar + * system level call. + * + * If you get a warning here while building the library you may need to make + * changes to ensure that pnglibconf.h records the calling convention used by + * your compiler. This may be very difficult - try using a different compiler + * to build the library! + */ +PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef); +#endif + +/* Transform masks for the high-level interface */ +#define PNG_TRANSFORM_IDENTITY 0x0000 /* read and write */ +#define PNG_TRANSFORM_STRIP_16 0x0001 /* read only */ +#define PNG_TRANSFORM_STRIP_ALPHA 0x0002 /* read only */ +#define PNG_TRANSFORM_PACKING 0x0004 /* read and write */ +#define PNG_TRANSFORM_PACKSWAP 0x0008 /* read and write */ +#define PNG_TRANSFORM_EXPAND 0x0010 /* read only */ +#define PNG_TRANSFORM_INVERT_MONO 0x0020 /* read and write */ +#define PNG_TRANSFORM_SHIFT 0x0040 /* read and write */ +#define PNG_TRANSFORM_BGR 0x0080 /* read and write */ +#define PNG_TRANSFORM_SWAP_ALPHA 0x0100 /* read and write */ +#define PNG_TRANSFORM_SWAP_ENDIAN 0x0200 /* read and write */ +#define PNG_TRANSFORM_INVERT_ALPHA 0x0400 /* read and write */ +#define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* write only */ +/* Added to libpng-1.2.34 */ +#define PNG_TRANSFORM_STRIP_FILLER_BEFORE PNG_TRANSFORM_STRIP_FILLER +#define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* write only */ +/* Added to libpng-1.4.0 */ +#define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */ +/* Added to libpng-1.5.4 */ +#define PNG_TRANSFORM_EXPAND_16 0x4000 /* read only */ +#if INT_MAX >= 0x8000 /* else this might break */ +#define PNG_TRANSFORM_SCALE_16 0x8000 /* read only */ +#endif + +/* Flags for MNG supported features */ +#define PNG_FLAG_MNG_EMPTY_PLTE 0x01 +#define PNG_FLAG_MNG_FILTER_64 0x04 +#define PNG_ALL_MNG_FEATURES 0x05 + +/* NOTE: prior to 1.5 these functions had no 'API' style declaration, + * this allowed the zlib default functions to be used on Windows + * platforms. In 1.5 the zlib default malloc (which just calls malloc and + * ignores the first argument) should be completely compatible with the + * following. + */ +typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp, + png_alloc_size_t)); +typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp)); + +/* Section 4: exported functions + * Here are the function definitions most commonly used. This is not + * the place to find out how to use libpng. See libpng-manual.txt for the + * full explanation, see example.c for the summary. This just provides + * a simple one line description of the use of each function. + * + * The PNG_EXPORT() and PNG_EXPORTA() macros used below are defined in + * pngconf.h and in the *.dfn files in the scripts directory. + * + * PNG_EXPORT(ordinal, type, name, (args)); + * + * ordinal: ordinal that is used while building + * *.def files. The ordinal value is only + * relevant when preprocessing png.h with + * the *.dfn files for building symbol table + * entries, and are removed by pngconf.h. + * type: return type of the function + * name: function name + * args: function arguments, with types + * + * When we wish to append attributes to a function prototype we use + * the PNG_EXPORTA() macro instead. + * + * PNG_EXPORTA(ordinal, type, name, (args), attributes); + * + * ordinal, type, name, and args: same as in PNG_EXPORT(). + * attributes: function attributes + */ + +/* Returns the version number of the library */ +PNG_EXPORT(1, png_uint_32, png_access_version_number, (void)); + +/* Tell lib we have already handled the first <num_bytes> magic bytes. + * Handling more than 8 bytes from the beginning of the file is an error. + */ +PNG_EXPORT(2, void, png_set_sig_bytes, (png_structrp png_ptr, int num_bytes)); + +/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a + * PNG file. Returns zero if the supplied bytes match the 8-byte PNG + * signature, and non-zero otherwise. Having num_to_check == 0 or + * start > 7 will always fail (ie return non-zero). + */ +PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, png_size_t start, + png_size_t num_to_check)); + +/* Simple signature checking function. This is the same as calling + * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n). + */ +#define png_check_sig(sig, n) !png_sig_cmp((sig), 0, (n)) + +/* Allocate and initialize png_ptr struct for reading, and any other memory. */ +PNG_EXPORTA(4, png_structp, png_create_read_struct, + (png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn), + PNG_ALLOCATED); + +/* Allocate and initialize png_ptr struct for writing, and any other memory */ +PNG_EXPORTA(5, png_structp, png_create_write_struct, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn), + PNG_ALLOCATED); + +PNG_EXPORT(6, png_size_t, png_get_compression_buffer_size, + (png_const_structrp png_ptr)); + +PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structrp png_ptr, + png_size_t size)); + +/* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp + * match up. + */ +#ifdef PNG_SETJMP_SUPPORTED +/* This function returns the jmp_buf built in to *png_ptr. It must be + * supplied with an appropriate 'longjmp' function to use on that jmp_buf + * unless the default error function is overridden in which case NULL is + * acceptable. The size of the jmp_buf is checked against the actual size + * allocated by the library - the call will return NULL on a mismatch + * indicating an ABI mismatch. + */ +PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structrp png_ptr, + png_longjmp_ptr longjmp_fn, size_t jmp_buf_size)); +# define png_jmpbuf(png_ptr) \ + (*png_set_longjmp_fn((png_ptr), longjmp, (sizeof (jmp_buf)))) +#else +# define png_jmpbuf(png_ptr) \ + (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP) +#endif +/* This function should be used by libpng applications in place of + * longjmp(png_ptr->jmpbuf, val). If longjmp_fn() has been set, it + * will use it; otherwise it will call PNG_ABORT(). This function was + * added in libpng-1.5.0. + */ +PNG_EXPORTA(9, void, png_longjmp, (png_const_structrp png_ptr, int val), + PNG_NORETURN); + +#ifdef PNG_READ_SUPPORTED +/* Reset the compression stream */ +PNG_EXPORTA(10, int, png_reset_zstream, (png_structrp png_ptr), PNG_DEPRECATED); +#endif + +/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */ +#ifdef PNG_USER_MEM_SUPPORTED +PNG_EXPORTA(11, png_structp, png_create_read_struct_2, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), + PNG_ALLOCATED); +PNG_EXPORTA(12, png_structp, png_create_write_struct_2, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), + PNG_ALLOCATED); +#endif + +/* Write the PNG file signature. */ +PNG_EXPORT(13, void, png_write_sig, (png_structrp png_ptr)); + +/* Write a PNG chunk - size, type, (optional) data, CRC. */ +PNG_EXPORT(14, void, png_write_chunk, (png_structrp png_ptr, png_const_bytep + chunk_name, png_const_bytep data, png_size_t length)); + +/* Write the start of a PNG chunk - length and chunk name. */ +PNG_EXPORT(15, void, png_write_chunk_start, (png_structrp png_ptr, + png_const_bytep chunk_name, png_uint_32 length)); + +/* Write the data of a PNG chunk started with png_write_chunk_start(). */ +PNG_EXPORT(16, void, png_write_chunk_data, (png_structrp png_ptr, + png_const_bytep data, png_size_t length)); + +/* Finish a chunk started with png_write_chunk_start() (includes CRC). */ +PNG_EXPORT(17, void, png_write_chunk_end, (png_structrp png_ptr)); + +/* Allocate and initialize the info structure */ +PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_const_structrp png_ptr), + PNG_ALLOCATED); + +/* DEPRECATED: this function allowed init structures to be created using the + * default allocation method (typically malloc). Use is deprecated in 1.6.0 and + * the API will be removed in the future. + */ +PNG_EXPORTA(19, void, png_info_init_3, (png_infopp info_ptr, + png_size_t png_info_struct_size), PNG_DEPRECATED); + +/* Writes all the PNG information before the image. */ +PNG_EXPORT(20, void, png_write_info_before_PLTE, + (png_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(21, void, png_write_info, + (png_structrp png_ptr, png_const_inforp info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the information before the actual image data. */ +PNG_EXPORT(22, void, png_read_info, + (png_structrp png_ptr, png_inforp info_ptr)); +#endif + +#ifdef PNG_TIME_RFC1123_SUPPORTED + /* Convert to a US string format: there is no localization support in this + * routine. The original implementation used a 29 character buffer in + * png_struct, this will be removed in future versions. + */ +#if PNG_LIBPNG_VER < 10700 +/* To do: remove this from libpng17 (and from libpng17/png.c and pngstruct.h) */ +PNG_EXPORTA(23, png_const_charp, png_convert_to_rfc1123, (png_structrp png_ptr, + png_const_timep ptime),PNG_DEPRECATED); +#endif +PNG_EXPORT(241, int, png_convert_to_rfc1123_buffer, (char out[29], + png_const_timep ptime)); +#endif + +#ifdef PNG_CONVERT_tIME_SUPPORTED +/* Convert from a struct tm to png_time */ +PNG_EXPORT(24, void, png_convert_from_struct_tm, (png_timep ptime, + const struct tm * ttime)); + +/* Convert from time_t to png_time. Uses gmtime() */ +PNG_EXPORT(25, void, png_convert_from_time_t, (png_timep ptime, time_t ttime)); +#endif /* CONVERT_tIME */ + +#ifdef PNG_READ_EXPAND_SUPPORTED +/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */ +PNG_EXPORT(26, void, png_set_expand, (png_structrp png_ptr)); +PNG_EXPORT(27, void, png_set_expand_gray_1_2_4_to_8, (png_structrp png_ptr)); +PNG_EXPORT(28, void, png_set_palette_to_rgb, (png_structrp png_ptr)); +PNG_EXPORT(29, void, png_set_tRNS_to_alpha, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_EXPAND_16_SUPPORTED +/* Expand to 16-bit channels, forces conversion of palette to RGB and expansion + * of a tRNS chunk if present. + */ +PNG_EXPORT(221, void, png_set_expand_16, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +/* Use blue, green, red order for pixels. */ +PNG_EXPORT(30, void, png_set_bgr, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED +/* Expand the grayscale to 24-bit RGB if necessary. */ +PNG_EXPORT(31, void, png_set_gray_to_rgb, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +/* Reduce RGB to grayscale. */ +#define PNG_ERROR_ACTION_NONE 1 +#define PNG_ERROR_ACTION_WARN 2 +#define PNG_ERROR_ACTION_ERROR 3 +#define PNG_RGB_TO_GRAY_DEFAULT (-1)/*for red/green coefficients*/ + +PNG_FP_EXPORT(32, void, png_set_rgb_to_gray, (png_structrp png_ptr, + int error_action, double red, double green)) +PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structrp png_ptr, + int error_action, png_fixed_point red, png_fixed_point green)) + +PNG_EXPORT(34, png_byte, png_get_rgb_to_gray_status, (png_const_structrp + png_ptr)); +#endif + +#ifdef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED +PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth, + png_colorp palette)); +#endif + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED +/* How the alpha channel is interpreted - this affects how the color channels + * of a PNG file are returned to the calling application when an alpha channel, + * or a tRNS chunk in a palette file, is present. + * + * This has no effect on the way pixels are written into a PNG output + * datastream. The color samples in a PNG datastream are never premultiplied + * with the alpha samples. + * + * The default is to return data according to the PNG specification: the alpha + * channel is a linear measure of the contribution of the pixel to the + * corresponding composited pixel, and the color channels are unassociated + * (not premultiplied). The gamma encoded color channels must be scaled + * according to the contribution and to do this it is necessary to undo + * the encoding, scale the color values, perform the composition and reencode + * the values. This is the 'PNG' mode. + * + * The alternative is to 'associate' the alpha with the color information by + * storing color channel values that have been scaled by the alpha. + * image. These are the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' modes + * (the latter being the two common names for associated alpha color channels). + * + * For the 'OPTIMIZED' mode, a pixel is treated as opaque only if the alpha + * value is equal to the maximum value. + * + * The final choice is to gamma encode the alpha channel as well. This is + * broken because, in practice, no implementation that uses this choice + * correctly undoes the encoding before handling alpha composition. Use this + * choice only if other serious errors in the software or hardware you use + * mandate it; the typical serious error is for dark halos to appear around + * opaque areas of the composited PNG image because of arithmetic overflow. + * + * The API function png_set_alpha_mode specifies which of these choices to use + * with an enumerated 'mode' value and the gamma of the required output: + */ +#define PNG_ALPHA_PNG 0 /* according to the PNG standard */ +#define PNG_ALPHA_STANDARD 1 /* according to Porter/Duff */ +#define PNG_ALPHA_ASSOCIATED 1 /* as above; this is the normal practice */ +#define PNG_ALPHA_PREMULTIPLIED 1 /* as above */ +#define PNG_ALPHA_OPTIMIZED 2 /* 'PNG' for opaque pixels, else 'STANDARD' */ +#define PNG_ALPHA_BROKEN 3 /* the alpha channel is gamma encoded */ + +PNG_FP_EXPORT(227, void, png_set_alpha_mode, (png_structrp png_ptr, int mode, + double output_gamma)) +PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structrp png_ptr, + int mode, png_fixed_point output_gamma)) +#endif + +#if defined(PNG_GAMMA_SUPPORTED) || defined(PNG_READ_ALPHA_MODE_SUPPORTED) +/* The output_gamma value is a screen gamma in libpng terminology: it expresses + * how to decode the output values, not how they are encoded. + */ +#define PNG_DEFAULT_sRGB -1 /* sRGB gamma and color space */ +#define PNG_GAMMA_MAC_18 -2 /* Old Mac '1.8' gamma and color space */ +#define PNG_GAMMA_sRGB 220000 /* Television standards--matches sRGB gamma */ +#define PNG_GAMMA_LINEAR PNG_FP_1 /* Linear */ +#endif + +/* The following are examples of calls to png_set_alpha_mode to achieve the + * required overall gamma correction and, where necessary, alpha + * premultiplication. + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB); + * This is the default libpng handling of the alpha channel - it is not + * pre-multiplied into the color components. In addition the call states + * that the output is for a sRGB system and causes all PNG files without gAMA + * chunks to be assumed to be encoded using sRGB. + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC); + * In this case the output is assumed to be something like an sRGB conformant + * display preceeded by a power-law lookup table of power 1.45. This is how + * early Mac systems behaved. + * + * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_GAMMA_LINEAR); + * This is the classic Jim Blinn approach and will work in academic + * environments where everything is done by the book. It has the shortcoming + * of assuming that input PNG data with no gamma information is linear - this + * is unlikely to be correct unless the PNG files where generated locally. + * Most of the time the output precision will be so low as to show + * significant banding in dark areas of the image. + * + * png_set_expand_16(pp); + * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_DEFAULT_sRGB); + * This is a somewhat more realistic Jim Blinn inspired approach. PNG files + * are assumed to have the sRGB encoding if not marked with a gamma value and + * the output is always 16 bits per component. This permits accurate scaling + * and processing of the data. If you know that your input PNG files were + * generated locally you might need to replace PNG_DEFAULT_sRGB with the + * correct value for your system. + * + * png_set_alpha_mode(pp, PNG_ALPHA_OPTIMIZED, PNG_DEFAULT_sRGB); + * If you just need to composite the PNG image onto an existing background + * and if you control the code that does this you can use the optimization + * setting. In this case you just copy completely opaque pixels to the + * output. For pixels that are not completely transparent (you just skip + * those) you do the composition math using png_composite or png_composite_16 + * below then encode the resultant 8-bit or 16-bit values to match the output + * encoding. + * + * Other cases + * If neither the PNG nor the standard linear encoding work for you because + * of the software or hardware you use then you have a big problem. The PNG + * case will probably result in halos around the image. The linear encoding + * will probably result in a washed out, too bright, image (it's actually too + * contrasty.) Try the ALPHA_OPTIMIZED mode above - this will probably + * substantially reduce the halos. Alternatively try: + * + * png_set_alpha_mode(pp, PNG_ALPHA_BROKEN, PNG_DEFAULT_sRGB); + * This option will also reduce the halos, but there will be slight dark + * halos round the opaque parts of the image where the background is light. + * In the OPTIMIZED mode the halos will be light halos where the background + * is dark. Take your pick - the halos are unavoidable unless you can get + * your hardware/software fixed! (The OPTIMIZED approach is slightly + * faster.) + * + * When the default gamma of PNG files doesn't match the output gamma. + * If you have PNG files with no gamma information png_set_alpha_mode allows + * you to provide a default gamma, but it also sets the ouput gamma to the + * matching value. If you know your PNG files have a gamma that doesn't + * match the output you can take advantage of the fact that + * png_set_alpha_mode always sets the output gamma but only sets the PNG + * default if it is not already set: + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB); + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC); + * The first call sets both the default and the output gamma values, the + * second call overrides the output gamma without changing the default. This + * is easier than achieving the same effect with png_set_gamma. You must use + * PNG_ALPHA_PNG for the first call - internal checking in png_set_alpha will + * fire if more than one call to png_set_alpha_mode and png_set_background is + * made in the same read operation, however multiple calls with PNG_ALPHA_PNG + * are ignored. + */ + +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED +PNG_EXPORT(36, void, png_set_strip_alpha, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) +PNG_EXPORT(37, void, png_set_swap_alpha, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) +PNG_EXPORT(38, void, png_set_invert_alpha, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) +/* Add a filler byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */ +PNG_EXPORT(39, void, png_set_filler, (png_structrp png_ptr, png_uint_32 filler, + int flags)); +/* The values of the PNG_FILLER_ defines should NOT be changed */ +# define PNG_FILLER_BEFORE 0 +# define PNG_FILLER_AFTER 1 +/* Add an alpha byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */ +PNG_EXPORT(40, void, png_set_add_alpha, (png_structrp png_ptr, + png_uint_32 filler, int flags)); +#endif /* READ_FILLER || WRITE_FILLER */ + +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +/* Swap bytes in 16-bit depth files. */ +PNG_EXPORT(41, void, png_set_swap, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) +/* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */ +PNG_EXPORT(42, void, png_set_packing, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ + defined(PNG_WRITE_PACKSWAP_SUPPORTED) +/* Swap packing order of pixels in bytes. */ +PNG_EXPORT(43, void, png_set_packswap, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) +/* Converts files to legal bit depths. */ +PNG_EXPORT(44, void, png_set_shift, (png_structrp png_ptr, png_const_color_8p + true_bits)); +#endif + +#if defined(PNG_READ_INTERLACING_SUPPORTED) || \ + defined(PNG_WRITE_INTERLACING_SUPPORTED) +/* Have the code handle the interlacing. Returns the number of passes. + * MUST be called before png_read_update_info or png_start_read_image, + * otherwise it will not have the desired effect. Note that it is still + * necessary to call png_read_row or png_read_rows png_get_image_height + * times for each pass. +*/ +PNG_EXPORT(45, int, png_set_interlace_handling, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) +/* Invert monochrome files */ +PNG_EXPORT(46, void, png_set_invert_mono, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_BACKGROUND_SUPPORTED +/* Handle alpha and tRNS by replacing with a background color. Prior to + * libpng-1.5.4 this API must not be called before the PNG file header has been + * read. Doing so will result in unexpected behavior and possible warnings or + * errors if the PNG file contains a bKGD chunk. + */ +PNG_FP_EXPORT(47, void, png_set_background, (png_structrp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, double background_gamma)) +PNG_FIXED_EXPORT(215, void, png_set_background_fixed, (png_structrp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, png_fixed_point background_gamma)) +#endif +#ifdef PNG_READ_BACKGROUND_SUPPORTED +# define PNG_BACKGROUND_GAMMA_UNKNOWN 0 +# define PNG_BACKGROUND_GAMMA_SCREEN 1 +# define PNG_BACKGROUND_GAMMA_FILE 2 +# define PNG_BACKGROUND_GAMMA_UNIQUE 3 +#endif + +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED +/* Scale a 16-bit depth file down to 8-bit, accurately. */ +PNG_EXPORT(229, void, png_set_scale_16, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED +#define PNG_READ_16_TO_8_SUPPORTED /* Name prior to 1.5.4 */ +/* Strip the second byte of information from a 16-bit depth file. */ +PNG_EXPORT(48, void, png_set_strip_16, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +/* Turn on quantizing, and reduce the palette to the number of colors + * available. + */ +PNG_EXPORT(49, void, png_set_quantize, (png_structrp png_ptr, + png_colorp palette, int num_palette, int maximum_colors, + png_const_uint_16p histogram, int full_quantize)); +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED +/* The threshold on gamma processing is configurable but hard-wired into the + * library. The following is the floating point variant. + */ +#define PNG_GAMMA_THRESHOLD (PNG_GAMMA_THRESHOLD_FIXED*.00001) + +/* Handle gamma correction. Screen_gamma=(display_exponent). + * NOTE: this API simply sets the screen and file gamma values. It will + * therefore override the value for gamma in a PNG file if it is called after + * the file header has been read - use with care - call before reading the PNG + * file for best results! + * + * These routines accept the same gamma values as png_set_alpha_mode (described + * above). The PNG_GAMMA_ defines and PNG_DEFAULT_sRGB can be passed to either + * API (floating point or fixed.) Notice, however, that the 'file_gamma' value + * is the inverse of a 'screen gamma' value. + */ +PNG_FP_EXPORT(50, void, png_set_gamma, (png_structrp png_ptr, + double screen_gamma, double override_file_gamma)) +PNG_FIXED_EXPORT(208, void, png_set_gamma_fixed, (png_structrp png_ptr, + png_fixed_point screen_gamma, png_fixed_point override_file_gamma)) +#endif + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +/* Set how many lines between output flushes - 0 for no flushing */ +PNG_EXPORT(51, void, png_set_flush, (png_structrp png_ptr, int nrows)); +/* Flush the current PNG output buffer */ +PNG_EXPORT(52, void, png_write_flush, (png_structrp png_ptr)); +#endif + +/* Optional update palette with requested transformations */ +PNG_EXPORT(53, void, png_start_read_image, (png_structrp png_ptr)); + +/* Optional call to update the users info structure */ +PNG_EXPORT(54, void, png_read_update_info, (png_structrp png_ptr, + png_inforp info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read one or more rows of image data. */ +PNG_EXPORT(55, void, png_read_rows, (png_structrp png_ptr, png_bytepp row, + png_bytepp display_row, png_uint_32 num_rows)); +#endif + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read a row of data. */ +PNG_EXPORT(56, void, png_read_row, (png_structrp png_ptr, png_bytep row, + png_bytep display_row)); +#endif + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the whole image into memory at once. */ +PNG_EXPORT(57, void, png_read_image, (png_structrp png_ptr, png_bytepp image)); +#endif + +/* Write a row of image data */ +PNG_EXPORT(58, void, png_write_row, (png_structrp png_ptr, + png_const_bytep row)); + +/* Write a few rows of image data: (*row) is not written; however, the type + * is declared as writeable to maintain compatibility with previous versions + * of libpng and to allow the 'display_row' array from read_rows to be passed + * unchanged to write_rows. + */ +PNG_EXPORT(59, void, png_write_rows, (png_structrp png_ptr, png_bytepp row, + png_uint_32 num_rows)); + +/* Write the image data */ +PNG_EXPORT(60, void, png_write_image, (png_structrp png_ptr, png_bytepp image)); + +/* Write the end of the PNG file. */ +PNG_EXPORT(61, void, png_write_end, (png_structrp png_ptr, + png_inforp info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the end of the PNG file. */ +PNG_EXPORT(62, void, png_read_end, (png_structrp png_ptr, png_inforp info_ptr)); +#endif + +/* Free any memory associated with the png_info_struct */ +PNG_EXPORT(63, void, png_destroy_info_struct, (png_const_structrp png_ptr, + png_infopp info_ptr_ptr)); + +/* Free any memory associated with the png_struct and the png_info_structs */ +PNG_EXPORT(64, void, png_destroy_read_struct, (png_structpp png_ptr_ptr, + png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); + +/* Free any memory associated with the png_struct and the png_info_structs */ +PNG_EXPORT(65, void, png_destroy_write_struct, (png_structpp png_ptr_ptr, + png_infopp info_ptr_ptr)); + +/* Set the libpng method of handling chunk CRC errors */ +PNG_EXPORT(66, void, png_set_crc_action, (png_structrp png_ptr, int crit_action, + int ancil_action)); + +/* Values for png_set_crc_action() say how to handle CRC errors in + * ancillary and critical chunks, and whether to use the data contained + * therein. Note that it is impossible to "discard" data in a critical + * chunk. For versions prior to 0.90, the action was always error/quit, + * whereas in version 0.90 and later, the action for CRC errors in ancillary + * chunks is warn/discard. These values should NOT be changed. + * + * value action:critical action:ancillary + */ +#define PNG_CRC_DEFAULT 0 /* error/quit warn/discard data */ +#define PNG_CRC_ERROR_QUIT 1 /* error/quit error/quit */ +#define PNG_CRC_WARN_DISCARD 2 /* (INVALID) warn/discard data */ +#define PNG_CRC_WARN_USE 3 /* warn/use data warn/use data */ +#define PNG_CRC_QUIET_USE 4 /* quiet/use data quiet/use data */ +#define PNG_CRC_NO_CHANGE 5 /* use current value use current value */ + +#ifdef PNG_WRITE_SUPPORTED +/* These functions give the user control over the scan-line filtering in + * libpng and the compression methods used by zlib. These functions are + * mainly useful for testing, as the defaults should work with most users. + * Those users who are tight on memory or want faster performance at the + * expense of compression can modify them. See the compression library + * header file (zlib.h) for an explination of the compression functions. + */ + +/* Set the filtering method(s) used by libpng. Currently, the only valid + * value for "method" is 0. + */ +PNG_EXPORT(67, void, png_set_filter, (png_structrp png_ptr, int method, + int filters)); +#endif /* WRITE */ + +/* Flags for png_set_filter() to say which filters to use. The flags + * are chosen so that they don't conflict with real filter types + * below, in case they are supplied instead of the #defined constants. + * These values should NOT be changed. + */ +#define PNG_NO_FILTERS 0x00 +#define PNG_FILTER_NONE 0x08 +#define PNG_FILTER_SUB 0x10 +#define PNG_FILTER_UP 0x20 +#define PNG_FILTER_AVG 0x40 +#define PNG_FILTER_PAETH 0x80 +#define PNG_FAST_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP) +#define PNG_ALL_FILTERS (PNG_FAST_FILTERS | PNG_FILTER_AVG | PNG_FILTER_PAETH) + +/* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now. + * These defines should NOT be changed. + */ +#define PNG_FILTER_VALUE_NONE 0 +#define PNG_FILTER_VALUE_SUB 1 +#define PNG_FILTER_VALUE_UP 2 +#define PNG_FILTER_VALUE_AVG 3 +#define PNG_FILTER_VALUE_PAETH 4 +#define PNG_FILTER_VALUE_LAST 5 + +#ifdef PNG_WRITE_SUPPORTED +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* DEPRECATED */ +PNG_FP_EXPORT(68, void, png_set_filter_heuristics, (png_structrp png_ptr, + int heuristic_method, int num_weights, png_const_doublep filter_weights, + png_const_doublep filter_costs)) +PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed, + (png_structrp png_ptr, int heuristic_method, int num_weights, + png_const_fixed_point_p filter_weights, + png_const_fixed_point_p filter_costs)) +#endif /* WRITE_WEIGHTED_FILTER */ + +/* The following are no longer used and will be removed from libpng-1.7: */ +#define PNG_FILTER_HEURISTIC_DEFAULT 0 /* Currently "UNWEIGHTED" */ +#define PNG_FILTER_HEURISTIC_UNWEIGHTED 1 /* Used by libpng < 0.95 */ +#define PNG_FILTER_HEURISTIC_WEIGHTED 2 /* Experimental feature */ +#define PNG_FILTER_HEURISTIC_LAST 3 /* Not a valid value */ + +/* Set the library compression level. Currently, valid values range from + * 0 - 9, corresponding directly to the zlib compression levels 0 - 9 + * (0 - no compression, 9 - "maximal" compression). Note that tests have + * shown that zlib compression levels 3-6 usually perform as well as level 9 + * for PNG images, and do considerably fewer caclulations. In the future, + * these values may not correspond directly to the zlib compression levels. + */ +#ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED +PNG_EXPORT(69, void, png_set_compression_level, (png_structrp png_ptr, + int level)); + +PNG_EXPORT(70, void, png_set_compression_mem_level, (png_structrp png_ptr, + int mem_level)); + +PNG_EXPORT(71, void, png_set_compression_strategy, (png_structrp png_ptr, + int strategy)); + +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +PNG_EXPORT(72, void, png_set_compression_window_bits, (png_structrp png_ptr, + int window_bits)); + +PNG_EXPORT(73, void, png_set_compression_method, (png_structrp png_ptr, + int method)); +#endif /* WRITE_CUSTOMIZE_COMPRESSION */ + +#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED +/* Also set zlib parameters for compressing non-IDAT chunks */ +PNG_EXPORT(222, void, png_set_text_compression_level, (png_structrp png_ptr, + int level)); + +PNG_EXPORT(223, void, png_set_text_compression_mem_level, (png_structrp png_ptr, + int mem_level)); + +PNG_EXPORT(224, void, png_set_text_compression_strategy, (png_structrp png_ptr, + int strategy)); + +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +PNG_EXPORT(225, void, png_set_text_compression_window_bits, + (png_structrp png_ptr, int window_bits)); + +PNG_EXPORT(226, void, png_set_text_compression_method, (png_structrp png_ptr, + int method)); +#endif /* WRITE_CUSTOMIZE_ZTXT_COMPRESSION */ +#endif /* WRITE */ + +/* These next functions are called for input/output, memory, and error + * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c, + * and call standard C I/O routines such as fread(), fwrite(), and + * fprintf(). These functions can be made to use other I/O routines + * at run time for those applications that need to handle I/O in a + * different manner by calling png_set_???_fn(). See libpng-manual.txt for + * more information. + */ + +#ifdef PNG_STDIO_SUPPORTED +/* Initialize the input/output for the PNG file to the default functions. */ +PNG_EXPORT(74, void, png_init_io, (png_structrp png_ptr, png_FILE_p fp)); +#endif + +/* Replace the (error and abort), and warning functions with user + * supplied functions. If no messages are to be printed you must still + * write and use replacement functions. The replacement error_fn should + * still do a longjmp to the last setjmp location if you are using this + * method of error handling. If error_fn or warning_fn is NULL, the + * default function will be used. + */ + +PNG_EXPORT(75, void, png_set_error_fn, (png_structrp png_ptr, + png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn)); + +/* Return the user pointer associated with the error functions */ +PNG_EXPORT(76, png_voidp, png_get_error_ptr, (png_const_structrp png_ptr)); + +/* Replace the default data output functions with a user supplied one(s). + * If buffered output is not used, then output_flush_fn can be set to NULL. + * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time + * output_flush_fn will be ignored (and thus can be NULL). + * It is probably a mistake to use NULL for output_flush_fn if + * write_data_fn is not also NULL unless you have built libpng with + * PNG_WRITE_FLUSH_SUPPORTED undefined, because in this case libpng's + * default flush function, which uses the standard *FILE structure, will + * be used. + */ +PNG_EXPORT(77, void, png_set_write_fn, (png_structrp png_ptr, png_voidp io_ptr, + png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); + +/* Replace the default data input function with a user supplied one. */ +PNG_EXPORT(78, void, png_set_read_fn, (png_structrp png_ptr, png_voidp io_ptr, + png_rw_ptr read_data_fn)); + +/* Return the user pointer associated with the I/O functions */ +PNG_EXPORT(79, png_voidp, png_get_io_ptr, (png_const_structrp png_ptr)); + +PNG_EXPORT(80, void, png_set_read_status_fn, (png_structrp png_ptr, + png_read_status_ptr read_row_fn)); + +PNG_EXPORT(81, void, png_set_write_status_fn, (png_structrp png_ptr, + png_write_status_ptr write_row_fn)); + +#ifdef PNG_USER_MEM_SUPPORTED +/* Replace the default memory allocation functions with user supplied one(s). */ +PNG_EXPORT(82, void, png_set_mem_fn, (png_structrp png_ptr, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn)); +/* Return the user pointer associated with the memory functions */ +PNG_EXPORT(83, png_voidp, png_get_mem_ptr, (png_const_structrp png_ptr)); +#endif + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED +PNG_EXPORT(84, void, png_set_read_user_transform_fn, (png_structrp png_ptr, + png_user_transform_ptr read_user_transform_fn)); +#endif + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED +PNG_EXPORT(85, void, png_set_write_user_transform_fn, (png_structrp png_ptr, + png_user_transform_ptr write_user_transform_fn)); +#endif + +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +PNG_EXPORT(86, void, png_set_user_transform_info, (png_structrp png_ptr, + png_voidp user_transform_ptr, int user_transform_depth, + int user_transform_channels)); +/* Return the user pointer associated with the user transform functions */ +PNG_EXPORT(87, png_voidp, png_get_user_transform_ptr, + (png_const_structrp png_ptr)); +#endif + +#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED +/* Return information about the row currently being processed. Note that these + * APIs do not fail but will return unexpected results if called outside a user + * transform callback. Also note that when transforming an interlaced image the + * row number is the row number within the sub-image of the interlace pass, so + * the value will increase to the height of the sub-image (not the full image) + * then reset to 0 for the next pass. + * + * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to + * find the output pixel (x,y) given an interlaced sub-image pixel + * (row,col,pass). (See below for these macros.) + */ +PNG_EXPORT(217, png_uint_32, png_get_current_row_number, (png_const_structrp)); +PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structrp)); +#endif + +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED +/* This callback is called only for *unknown* chunks. If + * PNG_HANDLE_AS_UNKNOWN_SUPPORTED is set then it is possible to set known + * chunks to be treated as unknown, however in this case the callback must do + * any processing required by the chunk (e.g. by calling the appropriate + * png_set_ APIs.) + * + * There is no write support - on write, by default, all the chunks in the + * 'unknown' list are written in the specified position. + * + * The integer return from the callback function is interpreted thus: + * + * negative: An error occurred; png_chunk_error will be called. + * zero: The chunk was not handled, the chunk will be saved. A critical + * chunk will cause an error at this point unless it is to be saved. + * positive: The chunk was handled, libpng will ignore/discard it. + * + * See "INTERACTION WTIH USER CHUNK CALLBACKS" below for important notes about + * how this behavior will change in libpng 1.7 + */ +PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structrp png_ptr, + png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); +#endif + +#ifdef PNG_USER_CHUNKS_SUPPORTED +PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr, (png_const_structrp png_ptr)); +#endif + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +/* Sets the function callbacks for the push reader, and a pointer to a + * user-defined structure available to the callback functions. + */ +PNG_EXPORT(90, void, png_set_progressive_read_fn, (png_structrp png_ptr, + png_voidp progressive_ptr, png_progressive_info_ptr info_fn, + png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn)); + +/* Returns the user pointer associated with the push read functions */ +PNG_EXPORT(91, png_voidp, png_get_progressive_ptr, + (png_const_structrp png_ptr)); + +/* Function to be called when data becomes available */ +PNG_EXPORT(92, void, png_process_data, (png_structrp png_ptr, + png_inforp info_ptr, png_bytep buffer, png_size_t buffer_size)); + +/* A function which may be called *only* within png_process_data to stop the + * processing of any more data. The function returns the number of bytes + * remaining, excluding any that libpng has cached internally. A subsequent + * call to png_process_data must supply these bytes again. If the argument + * 'save' is set to true the routine will first save all the pending data and + * will always return 0. + */ +PNG_EXPORT(219, png_size_t, png_process_data_pause, (png_structrp, int save)); + +/* A function which may be called *only* outside (after) a call to + * png_process_data. It returns the number of bytes of data to skip in the + * input. Normally it will return 0, but if it returns a non-zero value the + * application must skip than number of bytes of input data and pass the + * following data to the next call to png_process_data. + */ +PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structrp)); + +/* Function that combines rows. 'new_row' is a flag that should come from + * the callback and be non-NULL if anything needs to be done; the library + * stores its own version of the new data internally and ignores the passed + * in value. + */ +PNG_EXPORT(93, void, png_progressive_combine_row, (png_const_structrp png_ptr, + png_bytep old_row, png_const_bytep new_row)); +#endif /* PROGRESSIVE_READ */ + +PNG_EXPORTA(94, png_voidp, png_malloc, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); +/* Added at libpng version 1.4.0 */ +PNG_EXPORTA(95, png_voidp, png_calloc, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); + +/* Added at libpng version 1.2.4 */ +PNG_EXPORTA(96, png_voidp, png_malloc_warn, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); + +/* Frees a pointer allocated by png_malloc() */ +PNG_EXPORT(97, void, png_free, (png_const_structrp png_ptr, png_voidp ptr)); + +/* Free data that was allocated internally */ +PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 free_me, int num)); + +/* Reassign responsibility for freeing existing data, whether allocated + * by libpng or by the application; this works on the png_info structure passed + * in, it does not change the state for other png_info structures. + * + * It is unlikely that this function works correctly as of 1.6.0 and using it + * may result either in memory leaks or double free of allocated data. + */ +PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr, + png_inforp info_ptr, int freer, png_uint_32 mask)); + +/* Assignments for png_data_freer */ +#define PNG_DESTROY_WILL_FREE_DATA 1 +#define PNG_SET_WILL_FREE_DATA 1 +#define PNG_USER_WILL_FREE_DATA 2 +/* Flags for png_ptr->free_me and info_ptr->free_me */ +#define PNG_FREE_HIST 0x0008U +#define PNG_FREE_ICCP 0x0010U +#define PNG_FREE_SPLT 0x0020U +#define PNG_FREE_ROWS 0x0040U +#define PNG_FREE_PCAL 0x0080U +#define PNG_FREE_SCAL 0x0100U +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +# define PNG_FREE_UNKN 0x0200U +#endif +/* PNG_FREE_LIST 0x0400U removed in 1.6.0 because it is ignored */ +#define PNG_FREE_PLTE 0x1000U +#define PNG_FREE_TRNS 0x2000U +#define PNG_FREE_TEXT 0x4000U +#define PNG_FREE_EXIF 0x8000U /* Added at libpng-1.6.31 */ +#define PNG_FREE_ALL 0xffffU +#define PNG_FREE_MUL 0x4220U /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */ + +#ifdef PNG_USER_MEM_SUPPORTED +PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED PNG_DEPRECATED); +PNG_EXPORTA(101, void, png_free_default, (png_const_structrp png_ptr, + png_voidp ptr), PNG_DEPRECATED); +#endif + +#ifdef PNG_ERROR_TEXT_SUPPORTED +/* Fatal error in PNG image of libpng - can't continue */ +PNG_EXPORTA(102, void, png_error, (png_const_structrp png_ptr, + png_const_charp error_message), PNG_NORETURN); + +/* The same, but the chunk name is prepended to the error string. */ +PNG_EXPORTA(103, void, png_chunk_error, (png_const_structrp png_ptr, + png_const_charp error_message), PNG_NORETURN); + +#else +/* Fatal error in PNG image of libpng - can't continue */ +PNG_EXPORTA(104, void, png_err, (png_const_structrp png_ptr), PNG_NORETURN); +# define png_error(s1,s2) png_err(s1) +# define png_chunk_error(s1,s2) png_err(s1) +#endif + +#ifdef PNG_WARNINGS_SUPPORTED +/* Non-fatal error in libpng. Can continue, but may have a problem. */ +PNG_EXPORT(105, void, png_warning, (png_const_structrp png_ptr, + png_const_charp warning_message)); + +/* Non-fatal error in libpng, chunk name is prepended to message. */ +PNG_EXPORT(106, void, png_chunk_warning, (png_const_structrp png_ptr, + png_const_charp warning_message)); +#else +# define png_warning(s1,s2) ((void)(s1)) +# define png_chunk_warning(s1,s2) ((void)(s1)) +#endif + +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +/* Benign error in libpng. Can continue, but may have a problem. + * User can choose whether to handle as a fatal error or as a warning. */ +PNG_EXPORT(107, void, png_benign_error, (png_const_structrp png_ptr, + png_const_charp warning_message)); + +#ifdef PNG_READ_SUPPORTED +/* Same, chunk name is prepended to message (only during read) */ +PNG_EXPORT(108, void, png_chunk_benign_error, (png_const_structrp png_ptr, + png_const_charp warning_message)); +#endif + +PNG_EXPORT(109, void, png_set_benign_errors, + (png_structrp png_ptr, int allowed)); +#else +# ifdef PNG_ALLOW_BENIGN_ERRORS +# define png_benign_error png_warning +# define png_chunk_benign_error png_chunk_warning +# else +# define png_benign_error png_error +# define png_chunk_benign_error png_chunk_error +# endif +#endif + +/* The png_set_<chunk> functions are for storing values in the png_info_struct. + * Similarly, the png_get_<chunk> calls are used to read values from the + * png_info_struct, either storing the parameters in the passed variables, or + * setting pointers into the png_info_struct where the data is stored. The + * png_get_<chunk> functions return a non-zero value if the data was available + * in info_ptr, or return zero and do not change any of the parameters if the + * data was not available. + * + * These functions should be used instead of directly accessing png_info + * to avoid problems with future changes in the size and internal layout of + * png_info_struct. + */ +/* Returns "flag" if chunk data is valid in info_ptr. */ +PNG_EXPORT(110, png_uint_32, png_get_valid, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 flag)); + +/* Returns number of bytes needed to hold a transformed row. */ +PNG_EXPORT(111, png_size_t, png_get_rowbytes, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +#ifdef PNG_INFO_IMAGE_SUPPORTED +/* Returns row_pointers, which is an array of pointers to scanlines that was + * returned from png_read_png(). + */ +PNG_EXPORT(112, png_bytepp, png_get_rows, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Set row_pointers, which is an array of pointers to scanlines for use + * by png_write_png(). + */ +PNG_EXPORT(113, void, png_set_rows, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytepp row_pointers)); +#endif + +/* Returns number of color channels in image. */ +PNG_EXPORT(114, png_byte, png_get_channels, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +#ifdef PNG_EASY_ACCESS_SUPPORTED +/* Returns image width in pixels. */ +PNG_EXPORT(115, png_uint_32, png_get_image_width, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image height in pixels. */ +PNG_EXPORT(116, png_uint_32, png_get_image_height, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image bit_depth. */ +PNG_EXPORT(117, png_byte, png_get_bit_depth, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image color_type. */ +PNG_EXPORT(118, png_byte, png_get_color_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image filter_type. */ +PNG_EXPORT(119, png_byte, png_get_filter_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image interlace_type. */ +PNG_EXPORT(120, png_byte, png_get_interlace_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image compression_type. */ +PNG_EXPORT(121, png_byte, png_get_compression_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image resolution in pixels per meter, from pHYs chunk data. */ +PNG_EXPORT(122, png_uint_32, png_get_pixels_per_meter, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(123, png_uint_32, png_get_x_pixels_per_meter, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(124, png_uint_32, png_get_y_pixels_per_meter, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +/* Returns pixel aspect ratio, computed from pHYs chunk data. */ +PNG_FP_EXPORT(125, float, png_get_pixel_aspect_ratio, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +PNG_FIXED_EXPORT(210, png_fixed_point, png_get_pixel_aspect_ratio_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) + +/* Returns image x, y offset in pixels or microns, from oFFs chunk data. */ +PNG_EXPORT(126, png_int_32, png_get_x_offset_pixels, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(127, png_int_32, png_get_y_offset_pixels, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(128, png_int_32, png_get_x_offset_microns, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(129, png_int_32, png_get_y_offset_microns, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +#endif /* EASY_ACCESS */ + +#ifdef PNG_READ_SUPPORTED +/* Returns pointer to signature string read from PNG header */ +PNG_EXPORT(130, png_const_bytep, png_get_signature, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); +#endif + +#ifdef PNG_bKGD_SUPPORTED +PNG_EXPORT(131, png_uint_32, png_get_bKGD, (png_const_structrp png_ptr, + png_inforp info_ptr, png_color_16p *background)); +#endif + +#ifdef PNG_bKGD_SUPPORTED +PNG_EXPORT(132, void, png_set_bKGD, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_color_16p background)); +#endif + +#ifdef PNG_cHRM_SUPPORTED +PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *white_x, double *white_y, double *red_x, + double *red_y, double *green_x, double *green_y, double *blue_x, + double *blue_y)) +PNG_FP_EXPORT(230, png_uint_32, png_get_cHRM_XYZ, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *red_X, double *red_Y, double *red_Z, + double *green_X, double *green_Y, double *green_Z, double *blue_X, + double *blue_Y, double *blue_Z)) +PNG_FIXED_EXPORT(134, png_uint_32, png_get_cHRM_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_white_x, png_fixed_point *int_white_y, + png_fixed_point *int_red_x, png_fixed_point *int_red_y, + png_fixed_point *int_green_x, png_fixed_point *int_green_y, + png_fixed_point *int_blue_x, png_fixed_point *int_blue_y)) +PNG_FIXED_EXPORT(231, png_uint_32, png_get_cHRM_XYZ_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_red_X, png_fixed_point *int_red_Y, + png_fixed_point *int_red_Z, png_fixed_point *int_green_X, + png_fixed_point *int_green_Y, png_fixed_point *int_green_Z, + png_fixed_point *int_blue_X, png_fixed_point *int_blue_Y, + png_fixed_point *int_blue_Z)) +#endif + +#ifdef PNG_cHRM_SUPPORTED +PNG_FP_EXPORT(135, void, png_set_cHRM, (png_const_structrp png_ptr, + png_inforp info_ptr, + double white_x, double white_y, double red_x, double red_y, double green_x, + double green_y, double blue_x, double blue_y)) +PNG_FP_EXPORT(232, void, png_set_cHRM_XYZ, (png_const_structrp png_ptr, + png_inforp info_ptr, double red_X, double red_Y, double red_Z, + double green_X, double green_Y, double green_Z, double blue_X, + double blue_Y, double blue_Z)) +PNG_FIXED_EXPORT(136, void, png_set_cHRM_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, png_fixed_point int_white_x, + png_fixed_point int_white_y, png_fixed_point int_red_x, + png_fixed_point int_red_y, png_fixed_point int_green_x, + png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)) +PNG_FIXED_EXPORT(233, void, png_set_cHRM_XYZ_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, png_fixed_point int_red_X, png_fixed_point int_red_Y, + png_fixed_point int_red_Z, png_fixed_point int_green_X, + png_fixed_point int_green_Y, png_fixed_point int_green_Z, + png_fixed_point int_blue_X, png_fixed_point int_blue_Y, + png_fixed_point int_blue_Z)) +#endif + +#ifdef PNG_eXIf_SUPPORTED +PNG_EXPORT(246, png_uint_32, png_get_eXIf, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytep *exif)); +PNG_EXPORT(247, void, png_set_eXIf, (png_const_structrp png_ptr, + png_inforp info_ptr, const png_bytep exif)); + +PNG_EXPORT(248, png_uint_32, png_get_eXIf_1, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *num_exif, png_bytep *exif)); +PNG_EXPORT(249, void, png_set_eXIf_1, (png_const_structrp png_ptr, + png_inforp info_ptr, const png_uint_32 num_exif, const png_bytep exif)); +#endif + +#ifdef PNG_gAMA_SUPPORTED +PNG_FP_EXPORT(137, png_uint_32, png_get_gAMA, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *file_gamma)) +PNG_FIXED_EXPORT(138, png_uint_32, png_get_gAMA_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_file_gamma)) +#endif + +#ifdef PNG_gAMA_SUPPORTED +PNG_FP_EXPORT(139, void, png_set_gAMA, (png_const_structrp png_ptr, + png_inforp info_ptr, double file_gamma)) +PNG_FIXED_EXPORT(140, void, png_set_gAMA_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, png_fixed_point int_file_gamma)) +#endif + +#ifdef PNG_hIST_SUPPORTED +PNG_EXPORT(141, png_uint_32, png_get_hIST, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_16p *hist)); +PNG_EXPORT(142, void, png_set_hIST, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_uint_16p hist)); +#endif + +PNG_EXPORT(143, png_uint_32, png_get_IHDR, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *width, png_uint_32 *height, + int *bit_depth, int *color_type, int *interlace_method, + int *compression_method, int *filter_method)); + +PNG_EXPORT(144, void, png_set_IHDR, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_method, int compression_method, + int filter_method)); + +#ifdef PNG_oFFs_SUPPORTED +PNG_EXPORT(145, png_uint_32, png_get_oFFs, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, + int *unit_type)); +#endif + +#ifdef PNG_oFFs_SUPPORTED +PNG_EXPORT(146, void, png_set_oFFs, (png_const_structrp png_ptr, + png_inforp info_ptr, png_int_32 offset_x, png_int_32 offset_y, + int unit_type)); +#endif + +#ifdef PNG_pCAL_SUPPORTED +PNG_EXPORT(147, png_uint_32, png_get_pCAL, (png_const_structrp png_ptr, + png_inforp info_ptr, png_charp *purpose, png_int_32 *X0, + png_int_32 *X1, int *type, int *nparams, png_charp *units, + png_charpp *params)); +#endif + +#ifdef PNG_pCAL_SUPPORTED +PNG_EXPORT(148, void, png_set_pCAL, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_charp purpose, png_int_32 X0, png_int_32 X1, + int type, int nparams, png_const_charp units, png_charpp params)); +#endif + +#ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(149, png_uint_32, png_get_pHYs, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, + int *unit_type)); +#endif + +#ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(150, void, png_set_pHYs, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); +#endif + +PNG_EXPORT(151, png_uint_32, png_get_PLTE, (png_const_structrp png_ptr, + png_inforp info_ptr, png_colorp *palette, int *num_palette)); + +PNG_EXPORT(152, void, png_set_PLTE, (png_structrp png_ptr, + png_inforp info_ptr, png_const_colorp palette, int num_palette)); + +#ifdef PNG_sBIT_SUPPORTED +PNG_EXPORT(153, png_uint_32, png_get_sBIT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_color_8p *sig_bit)); +#endif + +#ifdef PNG_sBIT_SUPPORTED +PNG_EXPORT(154, void, png_set_sBIT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_color_8p sig_bit)); +#endif + +#ifdef PNG_sRGB_SUPPORTED +PNG_EXPORT(155, png_uint_32, png_get_sRGB, (png_const_structrp png_ptr, + png_const_inforp info_ptr, int *file_srgb_intent)); +#endif + +#ifdef PNG_sRGB_SUPPORTED +PNG_EXPORT(156, void, png_set_sRGB, (png_const_structrp png_ptr, + png_inforp info_ptr, int srgb_intent)); +PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM, (png_const_structrp png_ptr, + png_inforp info_ptr, int srgb_intent)); +#endif + +#ifdef PNG_iCCP_SUPPORTED +PNG_EXPORT(158, png_uint_32, png_get_iCCP, (png_const_structrp png_ptr, + png_inforp info_ptr, png_charpp name, int *compression_type, + png_bytepp profile, png_uint_32 *proflen)); +#endif + +#ifdef PNG_iCCP_SUPPORTED +PNG_EXPORT(159, void, png_set_iCCP, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_charp name, int compression_type, + png_const_bytep profile, png_uint_32 proflen)); +#endif + +#ifdef PNG_sPLT_SUPPORTED +PNG_EXPORT(160, int, png_get_sPLT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_sPLT_tpp entries)); +#endif + +#ifdef PNG_sPLT_SUPPORTED +PNG_EXPORT(161, void, png_set_sPLT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_sPLT_tp entries, int nentries)); +#endif + +#ifdef PNG_TEXT_SUPPORTED +/* png_get_text also returns the number of text chunks in *num_text */ +PNG_EXPORT(162, int, png_get_text, (png_const_structrp png_ptr, + png_inforp info_ptr, png_textp *text_ptr, int *num_text)); +#endif + +/* Note while png_set_text() will accept a structure whose text, + * language, and translated keywords are NULL pointers, the structure + * returned by png_get_text will always contain regular + * zero-terminated C strings. They might be empty strings but + * they will never be NULL pointers. + */ + +#ifdef PNG_TEXT_SUPPORTED +PNG_EXPORT(163, void, png_set_text, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_textp text_ptr, int num_text)); +#endif + +#ifdef PNG_tIME_SUPPORTED +PNG_EXPORT(164, png_uint_32, png_get_tIME, (png_const_structrp png_ptr, + png_inforp info_ptr, png_timep *mod_time)); +#endif + +#ifdef PNG_tIME_SUPPORTED +PNG_EXPORT(165, void, png_set_tIME, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_timep mod_time)); +#endif + +#ifdef PNG_tRNS_SUPPORTED +PNG_EXPORT(166, png_uint_32, png_get_tRNS, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytep *trans_alpha, int *num_trans, + png_color_16p *trans_color)); +#endif + +#ifdef PNG_tRNS_SUPPORTED +PNG_EXPORT(167, void, png_set_tRNS, (png_structrp png_ptr, + png_inforp info_ptr, png_const_bytep trans_alpha, int num_trans, + png_const_color_16p trans_color)); +#endif + +#ifdef PNG_sCAL_SUPPORTED +PNG_FP_EXPORT(168, png_uint_32, png_get_sCAL, (png_const_structrp png_ptr, + png_const_inforp info_ptr, int *unit, double *width, double *height)) +#if defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) || \ + defined(PNG_FLOATING_POINT_SUPPORTED) +/* NOTE: this API is currently implemented using floating point arithmetic, + * consequently it can only be used on systems with floating point support. + * In any case the range of values supported by png_fixed_point is small and it + * is highly recommended that png_get_sCAL_s be used instead. + */ +PNG_FIXED_EXPORT(214, png_uint_32, png_get_sCAL_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit, + png_fixed_point *width, png_fixed_point *height)) +#endif +PNG_EXPORT(169, png_uint_32, png_get_sCAL_s, + (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit, + png_charpp swidth, png_charpp sheight)); + +PNG_FP_EXPORT(170, void, png_set_sCAL, (png_const_structrp png_ptr, + png_inforp info_ptr, int unit, double width, double height)) +PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, int unit, png_fixed_point width, + png_fixed_point height)) +PNG_EXPORT(171, void, png_set_sCAL_s, (png_const_structrp png_ptr, + png_inforp info_ptr, int unit, + png_const_charp swidth, png_const_charp sheight)); +#endif /* sCAL */ + +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED +/* Provide the default handling for all unknown chunks or, optionally, for + * specific unknown chunks. + * + * NOTE: prior to 1.6.0 the handling specified for particular chunks on read was + * ignored and the default was used, the per-chunk setting only had an effect on + * write. If you wish to have chunk-specific handling on read in code that must + * work on earlier versions you must use a user chunk callback to specify the + * desired handling (keep or discard.) + * + * The 'keep' parameter is a PNG_HANDLE_CHUNK_ value as listed below. The + * parameter is interpreted as follows: + * + * READ: + * PNG_HANDLE_CHUNK_AS_DEFAULT: + * Known chunks: do normal libpng processing, do not keep the chunk (but + * see the comments below about PNG_HANDLE_AS_UNKNOWN_SUPPORTED) + * Unknown chunks: for a specific chunk use the global default, when used + * as the default discard the chunk data. + * PNG_HANDLE_CHUNK_NEVER: + * Discard the chunk data. + * PNG_HANDLE_CHUNK_IF_SAFE: + * Keep the chunk data if the chunk is not critical else raise a chunk + * error. + * PNG_HANDLE_CHUNK_ALWAYS: + * Keep the chunk data. + * + * If the chunk data is saved it can be retrieved using png_get_unknown_chunks, + * below. Notice that specifying "AS_DEFAULT" as a global default is equivalent + * to specifying "NEVER", however when "AS_DEFAULT" is used for specific chunks + * it simply resets the behavior to the libpng default. + * + * INTERACTION WTIH USER CHUNK CALLBACKS: + * The per-chunk handling is always used when there is a png_user_chunk_ptr + * callback and the callback returns 0; the chunk is then always stored *unless* + * it is critical and the per-chunk setting is other than ALWAYS. Notice that + * the global default is *not* used in this case. (In effect the per-chunk + * value is incremented to at least IF_SAFE.) + * + * IMPORTANT NOTE: this behavior will change in libpng 1.7 - the global and + * per-chunk defaults will be honored. If you want to preserve the current + * behavior when your callback returns 0 you must set PNG_HANDLE_CHUNK_IF_SAFE + * as the default - if you don't do this libpng 1.6 will issue a warning. + * + * If you want unhandled unknown chunks to be discarded in libpng 1.6 and + * earlier simply return '1' (handled). + * + * PNG_HANDLE_AS_UNKNOWN_SUPPORTED: + * If this is *not* set known chunks will always be handled by libpng and + * will never be stored in the unknown chunk list. Known chunks listed to + * png_set_keep_unknown_chunks will have no effect. If it is set then known + * chunks listed with a keep other than AS_DEFAULT will *never* be processed + * by libpng, in addition critical chunks must either be processed by the + * callback or saved. + * + * The IHDR and IEND chunks must not be listed. Because this turns off the + * default handling for chunks that would otherwise be recognized the + * behavior of libpng transformations may well become incorrect! + * + * WRITE: + * When writing chunks the options only apply to the chunks specified by + * png_set_unknown_chunks (below), libpng will *always* write known chunks + * required by png_set_ calls and will always write the core critical chunks + * (as required for PLTE). + * + * Each chunk in the png_set_unknown_chunks list is looked up in the + * png_set_keep_unknown_chunks list to find the keep setting, this is then + * interpreted as follows: + * + * PNG_HANDLE_CHUNK_AS_DEFAULT: + * Write safe-to-copy chunks and write other chunks if the global + * default is set to _ALWAYS, otherwise don't write this chunk. + * PNG_HANDLE_CHUNK_NEVER: + * Do not write the chunk. + * PNG_HANDLE_CHUNK_IF_SAFE: + * Write the chunk if it is safe-to-copy, otherwise do not write it. + * PNG_HANDLE_CHUNK_ALWAYS: + * Write the chunk. + * + * Note that the default behavior is effectively the opposite of the read case - + * in read unknown chunks are not stored by default, in write they are written + * by default. Also the behavior of PNG_HANDLE_CHUNK_IF_SAFE is very different + * - on write the safe-to-copy bit is checked, on read the critical bit is + * checked and on read if the chunk is critical an error will be raised. + * + * num_chunks: + * =========== + * If num_chunks is positive, then the "keep" parameter specifies the manner + * for handling only those chunks appearing in the chunk_list array, + * otherwise the chunk list array is ignored. + * + * If num_chunks is 0 the "keep" parameter specifies the default behavior for + * unknown chunks, as described above. + * + * If num_chunks is negative, then the "keep" parameter specifies the manner + * for handling all unknown chunks plus all chunks recognized by libpng + * except for the IHDR, PLTE, tRNS, IDAT, and IEND chunks (which continue to + * be processed by libpng. + */ +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED +PNG_EXPORT(172, void, png_set_keep_unknown_chunks, (png_structrp png_ptr, + int keep, png_const_bytep chunk_list, int num_chunks)); +#endif /* HANDLE_AS_UNKNOWN */ + +/* The "keep" PNG_HANDLE_CHUNK_ parameter for the specified chunk is returned; + * the result is therefore true (non-zero) if special handling is required, + * false for the default handling. + */ +PNG_EXPORT(173, int, png_handle_as_unknown, (png_const_structrp png_ptr, + png_const_bytep chunk_name)); +#endif /* SET_UNKNOWN_CHUNKS */ + +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +PNG_EXPORT(174, void, png_set_unknown_chunks, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_unknown_chunkp unknowns, + int num_unknowns)); + /* NOTE: prior to 1.6.0 this routine set the 'location' field of the added + * unknowns to the location currently stored in the png_struct. This is + * invariably the wrong value on write. To fix this call the following API + * for each chunk in the list with the correct location. If you know your + * code won't be compiled on earlier versions you can rely on + * png_set_unknown_chunks(write-ptr, png_get_unknown_chunks(read-ptr)) doing + * the correct thing. + */ + +PNG_EXPORT(175, void, png_set_unknown_chunk_location, + (png_const_structrp png_ptr, png_inforp info_ptr, int chunk, int location)); + +PNG_EXPORT(176, int, png_get_unknown_chunks, (png_const_structrp png_ptr, + png_inforp info_ptr, png_unknown_chunkpp entries)); +#endif + +/* Png_free_data() will turn off the "valid" flag for anything it frees. + * If you need to turn it off for a chunk that your application has freed, + * you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); + */ +PNG_EXPORT(177, void, png_set_invalid, (png_const_structrp png_ptr, + png_inforp info_ptr, int mask)); + +#ifdef PNG_INFO_IMAGE_SUPPORTED +/* The "params" pointer is currently not used and is for future expansion. */ +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +PNG_EXPORT(178, void, png_read_png, (png_structrp png_ptr, png_inforp info_ptr, + int transforms, png_voidp params)); +#endif +#ifdef PNG_WRITE_SUPPORTED +PNG_EXPORT(179, void, png_write_png, (png_structrp png_ptr, png_inforp info_ptr, + int transforms, png_voidp params)); +#endif +#endif + +PNG_EXPORT(180, png_const_charp, png_get_copyright, + (png_const_structrp png_ptr)); +PNG_EXPORT(181, png_const_charp, png_get_header_ver, + (png_const_structrp png_ptr)); +PNG_EXPORT(182, png_const_charp, png_get_header_version, + (png_const_structrp png_ptr)); +PNG_EXPORT(183, png_const_charp, png_get_libpng_ver, + (png_const_structrp png_ptr)); + +#ifdef PNG_MNG_FEATURES_SUPPORTED +PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structrp png_ptr, + png_uint_32 mng_features_permitted)); +#endif + +/* For use in png_set_keep_unknown, added to version 1.2.6 */ +#define PNG_HANDLE_CHUNK_AS_DEFAULT 0 +#define PNG_HANDLE_CHUNK_NEVER 1 +#define PNG_HANDLE_CHUNK_IF_SAFE 2 +#define PNG_HANDLE_CHUNK_ALWAYS 3 +#define PNG_HANDLE_CHUNK_LAST 4 + +/* Strip the prepended error numbers ("#nnn ") from error and warning + * messages before passing them to the error or warning handler. + */ +#ifdef PNG_ERROR_NUMBERS_SUPPORTED +PNG_EXPORT(185, void, png_set_strip_error_numbers, (png_structrp png_ptr, + png_uint_32 strip_mode)); +#endif + +/* Added in libpng-1.2.6 */ +#ifdef PNG_SET_USER_LIMITS_SUPPORTED +PNG_EXPORT(186, void, png_set_user_limits, (png_structrp png_ptr, + png_uint_32 user_width_max, png_uint_32 user_height_max)); +PNG_EXPORT(187, png_uint_32, png_get_user_width_max, + (png_const_structrp png_ptr)); +PNG_EXPORT(188, png_uint_32, png_get_user_height_max, + (png_const_structrp png_ptr)); +/* Added in libpng-1.4.0 */ +PNG_EXPORT(189, void, png_set_chunk_cache_max, (png_structrp png_ptr, + png_uint_32 user_chunk_cache_max)); +PNG_EXPORT(190, png_uint_32, png_get_chunk_cache_max, + (png_const_structrp png_ptr)); +/* Added in libpng-1.4.1 */ +PNG_EXPORT(191, void, png_set_chunk_malloc_max, (png_structrp png_ptr, + png_alloc_size_t user_chunk_cache_max)); +PNG_EXPORT(192, png_alloc_size_t, png_get_chunk_malloc_max, + (png_const_structrp png_ptr)); +#endif + +#if defined(PNG_INCH_CONVERSIONS_SUPPORTED) +PNG_EXPORT(193, png_uint_32, png_get_pixels_per_inch, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +PNG_EXPORT(194, png_uint_32, png_get_x_pixels_per_inch, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +PNG_EXPORT(195, png_uint_32, png_get_y_pixels_per_inch, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +PNG_FP_EXPORT(196, float, png_get_x_offset_inches, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ +PNG_FIXED_EXPORT(211, png_fixed_point, png_get_x_offset_inches_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +#endif + +PNG_FP_EXPORT(197, float, png_get_y_offset_inches, (png_const_structrp png_ptr, + png_const_inforp info_ptr)) +#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ +PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +#endif + +# ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, + int *unit_type)); +# endif /* pHYs */ +#endif /* INCH_CONVERSIONS */ + +/* Added in libpng-1.4.0 */ +#ifdef PNG_IO_STATE_SUPPORTED +PNG_EXPORT(199, png_uint_32, png_get_io_state, (png_const_structrp png_ptr)); + +/* Removed from libpng 1.6; use png_get_io_chunk_type. */ +PNG_REMOVED(200, png_const_bytep, png_get_io_chunk_name, (png_structrp png_ptr), + PNG_DEPRECATED) + +PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type, + (png_const_structrp png_ptr)); + +/* The flags returned by png_get_io_state() are the following: */ +# define PNG_IO_NONE 0x0000 /* no I/O at this moment */ +# define PNG_IO_READING 0x0001 /* currently reading */ +# define PNG_IO_WRITING 0x0002 /* currently writing */ +# define PNG_IO_SIGNATURE 0x0010 /* currently at the file signature */ +# define PNG_IO_CHUNK_HDR 0x0020 /* currently at the chunk header */ +# define PNG_IO_CHUNK_DATA 0x0040 /* currently at the chunk data */ +# define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */ +# define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */ +# define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */ +#endif /* IO_STATE */ + +/* Interlace support. The following macros are always defined so that if + * libpng interlace handling is turned off the macros may be used to handle + * interlaced images within the application. + */ +#define PNG_INTERLACE_ADAM7_PASSES 7 + +/* Two macros to return the first row and first column of the original, + * full, image which appears in a given pass. 'pass' is in the range 0 + * to 6 and the result is in the range 0 to 7. + */ +#define PNG_PASS_START_ROW(pass) (((1&~(pass))<<(3-((pass)>>1)))&7) +#define PNG_PASS_START_COL(pass) (((1& (pass))<<(3-(((pass)+1)>>1)))&7) + +/* A macro to return the offset between pixels in the output row for a pair of + * pixels in the input - effectively the inverse of the 'COL_SHIFT' macro that + * follows. Note that ROW_OFFSET is the offset from one row to the next whereas + * COL_OFFSET is from one column to the next, within a row. + */ +#define PNG_PASS_ROW_OFFSET(pass) ((pass)>2?(8>>(((pass)-1)>>1)):8) +#define PNG_PASS_COL_OFFSET(pass) (1<<((7-(pass))>>1)) + +/* Two macros to help evaluate the number of rows or columns in each + * pass. This is expressed as a shift - effectively log2 of the number or + * rows or columns in each 8x8 tile of the original image. + */ +#define PNG_PASS_ROW_SHIFT(pass) ((pass)>2?(8-(pass))>>1:3) +#define PNG_PASS_COL_SHIFT(pass) ((pass)>1?(7-(pass))>>1:3) + +/* Hence two macros to determine the number of rows or columns in a given + * pass of an image given its height or width. In fact these macros may + * return non-zero even though the sub-image is empty, because the other + * dimension may be empty for a small image. + */ +#define PNG_PASS_ROWS(height, pass) (((height)+(((1<<PNG_PASS_ROW_SHIFT(pass))\ + -1)-PNG_PASS_START_ROW(pass)))>>PNG_PASS_ROW_SHIFT(pass)) +#define PNG_PASS_COLS(width, pass) (((width)+(((1<<PNG_PASS_COL_SHIFT(pass))\ + -1)-PNG_PASS_START_COL(pass)))>>PNG_PASS_COL_SHIFT(pass)) + +/* For the reader row callbacks (both progressive and sequential) it is + * necessary to find the row in the output image given a row in an interlaced + * image, so two more macros: + */ +#define PNG_ROW_FROM_PASS_ROW(y_in, pass) \ + (((y_in)<<PNG_PASS_ROW_SHIFT(pass))+PNG_PASS_START_ROW(pass)) +#define PNG_COL_FROM_PASS_COL(x_in, pass) \ + (((x_in)<<PNG_PASS_COL_SHIFT(pass))+PNG_PASS_START_COL(pass)) + +/* Two macros which return a boolean (0 or 1) saying whether the given row + * or column is in a particular pass. These use a common utility macro that + * returns a mask for a given pass - the offset 'off' selects the row or + * column version. The mask has the appropriate bit set for each column in + * the tile. + */ +#define PNG_PASS_MASK(pass,off) ( \ + ((0x110145AF>>(((7-(off))-(pass))<<2)) & 0xF) | \ + ((0x01145AF0>>(((7-(off))-(pass))<<2)) & 0xF0)) + +#define PNG_ROW_IN_INTERLACE_PASS(y, pass) \ + ((PNG_PASS_MASK(pass,0) >> ((y)&7)) & 1) +#define PNG_COL_IN_INTERLACE_PASS(x, pass) \ + ((PNG_PASS_MASK(pass,1) >> ((x)&7)) & 1) + +#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED +/* With these routines we avoid an integer divide, which will be slower on + * most machines. However, it does take more operations than the corresponding + * divide method, so it may be slower on a few RISC systems. There are two + * shifts (by 8 or 16 bits) and an addition, versus a single integer divide. + * + * Note that the rounding factors are NOT supposed to be the same! 128 and + * 32768 are correct for the NODIV code; 127 and 32767 are correct for the + * standard method. + * + * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ] + */ + + /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ + +# define png_composite(composite, fg, alpha, bg) \ + { \ + png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \ + * (png_uint_16)(alpha) \ + + (png_uint_16)(bg)*(png_uint_16)(255 \ + - (png_uint_16)(alpha)) + 128); \ + (composite) = (png_byte)(((temp + (temp >> 8)) >> 8) & 0xff); \ + } + +# define png_composite_16(composite, fg, alpha, bg) \ + { \ + png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) \ + * (png_uint_32)(alpha) \ + + (png_uint_32)(bg)*(65535 \ + - (png_uint_32)(alpha)) + 32768); \ + (composite) = (png_uint_16)(0xffff & ((temp + (temp >> 16)) >> 16)); \ + } + +#else /* Standard method using integer division */ + +# define png_composite(composite, fg, alpha, bg) \ + (composite) = \ + (png_byte)(0xff & (((png_uint_16)(fg) * (png_uint_16)(alpha) + \ + (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \ + 127) / 255)) + +# define png_composite_16(composite, fg, alpha, bg) \ + (composite) = \ + (png_uint_16)(0xffff & (((png_uint_32)(fg) * (png_uint_32)(alpha) + \ + (png_uint_32)(bg)*(png_uint_32)(65535 - (png_uint_32)(alpha)) + \ + 32767) / 65535)) +#endif /* READ_COMPOSITE_NODIV */ + +#ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(201, png_uint_32, png_get_uint_32, (png_const_bytep buf)); +PNG_EXPORT(202, png_uint_16, png_get_uint_16, (png_const_bytep buf)); +PNG_EXPORT(203, png_int_32, png_get_int_32, (png_const_bytep buf)); +#endif + +PNG_EXPORT(204, png_uint_32, png_get_uint_31, (png_const_structrp png_ptr, + png_const_bytep buf)); +/* No png_get_int_16 -- may be added if there's a real need for it. */ + +/* Place a 32-bit number into a buffer in PNG byte order (big-endian). */ +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(205, void, png_save_uint_32, (png_bytep buf, png_uint_32 i)); +#endif +#ifdef PNG_SAVE_INT_32_SUPPORTED +PNG_EXPORT(206, void, png_save_int_32, (png_bytep buf, png_int_32 i)); +#endif + +/* Place a 16-bit number into a buffer in PNG byte order. + * The parameter is declared unsigned int, not png_uint_16, + * just to avoid potential problems on pre-ANSI C compilers. + */ +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i)); +/* No png_save_int_16 -- may be added if there's a real need for it. */ +#endif + +#ifdef PNG_USE_READ_MACROS +/* Inline macros to do direct reads of bytes from the input buffer. + * The png_get_int_32() routine assumes we are using two's complement + * format for negative values, which is almost certainly true. + */ +# define PNG_get_uint_32(buf) \ + (((png_uint_32)(*(buf)) << 24) + \ + ((png_uint_32)(*((buf) + 1)) << 16) + \ + ((png_uint_32)(*((buf) + 2)) << 8) + \ + ((png_uint_32)(*((buf) + 3)))) + + /* From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the + * function) incorrectly returned a value of type png_uint_32. + */ +# define PNG_get_uint_16(buf) \ + ((png_uint_16) \ + (((unsigned int)(*(buf)) << 8) + \ + ((unsigned int)(*((buf) + 1))))) + +# define PNG_get_int_32(buf) \ + ((png_int_32)((*(buf) & 0x80) \ + ? -((png_int_32)(((png_get_uint_32(buf)^0xffffffffU)+1U)&0x7fffffffU)) \ + : (png_int_32)png_get_uint_32(buf))) + +/* If PNG_PREFIX is defined the same thing as below happens in pnglibconf.h, + * but defining a macro name prefixed with PNG_PREFIX. + */ +# ifndef PNG_PREFIX +# define png_get_uint_32(buf) PNG_get_uint_32(buf) +# define png_get_uint_16(buf) PNG_get_uint_16(buf) +# define png_get_int_32(buf) PNG_get_int_32(buf) +# endif +#else +# ifdef PNG_PREFIX + /* No macros; revert to the (redefined) function */ +# define PNG_get_uint_32 (png_get_uint_32) +# define PNG_get_uint_16 (png_get_uint_16) +# define PNG_get_int_32 (png_get_int_32) +# endif +#endif + +#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED +PNG_EXPORT(242, void, png_set_check_for_invalid_index, + (png_structrp png_ptr, int allowed)); +# ifdef PNG_GET_PALETTE_MAX_SUPPORTED +PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr, + png_const_infop info_ptr)); +# endif +#endif /* CHECK_FOR_INVALID_INDEX */ + +/******************************************************************************* + * Section 5: SIMPLIFIED API + ******************************************************************************* + * + * Please read the documentation in libpng-manual.txt (TODO: write said + * documentation) if you don't understand what follows. + * + * The simplified API hides the details of both libpng and the PNG file format + * itself. It allows PNG files to be read into a very limited number of + * in-memory bitmap formats or to be written from the same formats. If these + * formats do not accomodate your needs then you can, and should, use the more + * sophisticated APIs above - these support a wide variety of in-memory formats + * and a wide variety of sophisticated transformations to those formats as well + * as a wide variety of APIs to manipulate ancillary information. + * + * To read a PNG file using the simplified API: + * + * 1) Declare a 'png_image' structure (see below) on the stack, set the + * version field to PNG_IMAGE_VERSION and the 'opaque' pointer to NULL + * (this is REQUIRED, your program may crash if you don't do it.) + * 2) Call the appropriate png_image_begin_read... function. + * 3) Set the png_image 'format' member to the required sample format. + * 4) Allocate a buffer for the image and, if required, the color-map. + * 5) Call png_image_finish_read to read the image and, if required, the + * color-map into your buffers. + * + * There are no restrictions on the format of the PNG input itself; all valid + * color types, bit depths, and interlace methods are acceptable, and the + * input image is transformed as necessary to the requested in-memory format + * during the png_image_finish_read() step. The only caveat is that if you + * request a color-mapped image from a PNG that is full-color or makes + * complex use of an alpha channel the transformation is extremely lossy and the + * result may look terrible. + * + * To write a PNG file using the simplified API: + * + * 1) Declare a 'png_image' structure on the stack and memset() it to all zero. + * 2) Initialize the members of the structure that describe the image, setting + * the 'format' member to the format of the image samples. + * 3) Call the appropriate png_image_write... function with a pointer to the + * image and, if necessary, the color-map to write the PNG data. + * + * png_image is a structure that describes the in-memory format of an image + * when it is being read or defines the in-memory format of an image that you + * need to write: + */ +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) || \ + defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) + +#define PNG_IMAGE_VERSION 1 + +typedef struct png_control *png_controlp; +typedef struct +{ + png_controlp opaque; /* Initialize to NULL, free with png_image_free */ + png_uint_32 version; /* Set to PNG_IMAGE_VERSION */ + png_uint_32 width; /* Image width in pixels (columns) */ + png_uint_32 height; /* Image height in pixels (rows) */ + png_uint_32 format; /* Image format as defined below */ + png_uint_32 flags; /* A bit mask containing informational flags */ + png_uint_32 colormap_entries; + /* Number of entries in the color-map */ + + /* In the event of an error or warning the following field will be set to a + * non-zero value and the 'message' field will contain a '\0' terminated + * string with the libpng error or warning message. If both warnings and + * an error were encountered, only the error is recorded. If there + * are multiple warnings, only the first one is recorded. + * + * The upper 30 bits of this value are reserved, the low two bits contain + * a value as follows: + */ +# define PNG_IMAGE_WARNING 1 +# define PNG_IMAGE_ERROR 2 + /* + * The result is a two-bit code such that a value more than 1 indicates + * a failure in the API just called: + * + * 0 - no warning or error + * 1 - warning + * 2 - error + * 3 - error preceded by warning + */ +# define PNG_IMAGE_FAILED(png_cntrl) ((((png_cntrl).warning_or_error)&0x03)>1) + + png_uint_32 warning_or_error; + + char message[64]; +} png_image, *png_imagep; + +/* The samples of the image have one to four channels whose components have + * original values in the range 0 to 1.0: + * + * 1: A single gray or luminance channel (G). + * 2: A gray/luminance channel and an alpha channel (GA). + * 3: Three red, green, blue color channels (RGB). + * 4: Three color channels and an alpha channel (RGBA). + * + * The components are encoded in one of two ways: + * + * a) As a small integer, value 0..255, contained in a single byte. For the + * alpha channel the original value is simply value/255. For the color or + * luminance channels the value is encoded according to the sRGB specification + * and matches the 8-bit format expected by typical display devices. + * + * The color/gray channels are not scaled (pre-multiplied) by the alpha + * channel and are suitable for passing to color management software. + * + * b) As a value in the range 0..65535, contained in a 2-byte integer. All + * channels can be converted to the original value by dividing by 65535; all + * channels are linear. Color channels use the RGB encoding (RGB end-points) of + * the sRGB specification. This encoding is identified by the + * PNG_FORMAT_FLAG_LINEAR flag below. + * + * When the simplified API needs to convert between sRGB and linear colorspaces, + * the actual sRGB transfer curve defined in the sRGB specification (see the + * article at https://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2 + * approximation used elsewhere in libpng. + * + * When an alpha channel is present it is expected to denote pixel coverage + * of the color or luminance channels and is returned as an associated alpha + * channel: the color/gray channels are scaled (pre-multiplied) by the alpha + * value. + * + * The samples are either contained directly in the image data, between 1 and 8 + * bytes per pixel according to the encoding, or are held in a color-map indexed + * by bytes in the image data. In the case of a color-map the color-map entries + * are individual samples, encoded as above, and the image data has one byte per + * pixel to select the relevant sample from the color-map. + */ + +/* PNG_FORMAT_* + * + * #defines to be used in png_image::format. Each #define identifies a + * particular layout of sample data and, if present, alpha values. There are + * separate defines for each of the two component encodings. + * + * A format is built up using single bit flag values. All combinations are + * valid. Formats can be built up from the flag values or you can use one of + * the predefined values below. When testing formats always use the FORMAT_FLAG + * macros to test for individual features - future versions of the library may + * add new flags. + * + * When reading or writing color-mapped images the format should be set to the + * format of the entries in the color-map then png_image_{read,write}_colormap + * called to read or write the color-map and set the format correctly for the + * image data. Do not set the PNG_FORMAT_FLAG_COLORMAP bit directly! + * + * NOTE: libpng can be built with particular features disabled. If you see + * compiler errors because the definition of one of the following flags has been + * compiled out it is because libpng does not have the required support. It is + * possible, however, for the libpng configuration to enable the format on just + * read or just write; in that case you may see an error at run time. You can + * guard against this by checking for the definition of the appropriate + * "_SUPPORTED" macro, one of: + * + * PNG_SIMPLIFIED_{READ,WRITE}_{BGR,AFIRST}_SUPPORTED + */ +#define PNG_FORMAT_FLAG_ALPHA 0x01U /* format with an alpha channel */ +#define PNG_FORMAT_FLAG_COLOR 0x02U /* color format: otherwise grayscale */ +#define PNG_FORMAT_FLAG_LINEAR 0x04U /* 2-byte channels else 1-byte */ +#define PNG_FORMAT_FLAG_COLORMAP 0x08U /* image data is color-mapped */ + +#ifdef PNG_FORMAT_BGR_SUPPORTED +# define PNG_FORMAT_FLAG_BGR 0x10U /* BGR colors, else order is RGB */ +#endif + +#ifdef PNG_FORMAT_AFIRST_SUPPORTED +# define PNG_FORMAT_FLAG_AFIRST 0x20U /* alpha channel comes first */ +#endif + +#define PNG_FORMAT_FLAG_ASSOCIATED_ALPHA 0x40U /* alpha channel is associated */ + +/* Commonly used formats have predefined macros. + * + * First the single byte (sRGB) formats: + */ +#define PNG_FORMAT_GRAY 0 +#define PNG_FORMAT_GA PNG_FORMAT_FLAG_ALPHA +#define PNG_FORMAT_AG (PNG_FORMAT_GA|PNG_FORMAT_FLAG_AFIRST) +#define PNG_FORMAT_RGB PNG_FORMAT_FLAG_COLOR +#define PNG_FORMAT_BGR (PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_BGR) +#define PNG_FORMAT_RGBA (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_ALPHA) +#define PNG_FORMAT_ARGB (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_AFIRST) +#define PNG_FORMAT_BGRA (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_ALPHA) +#define PNG_FORMAT_ABGR (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_AFIRST) + +/* Then the linear 2-byte formats. When naming these "Y" is used to + * indicate a luminance (gray) channel. + */ +#define PNG_FORMAT_LINEAR_Y PNG_FORMAT_FLAG_LINEAR +#define PNG_FORMAT_LINEAR_Y_ALPHA (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_ALPHA) +#define PNG_FORMAT_LINEAR_RGB (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR) +#define PNG_FORMAT_LINEAR_RGB_ALPHA \ + (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA) + +/* With color-mapped formats the image data is one byte for each pixel, the byte + * is an index into the color-map which is formatted as above. To obtain a + * color-mapped format it is sufficient just to add the PNG_FOMAT_FLAG_COLORMAP + * to one of the above definitions, or you can use one of the definitions below. + */ +#define PNG_FORMAT_RGB_COLORMAP (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_BGR_COLORMAP (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_RGBA_COLORMAP (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_ARGB_COLORMAP (PNG_FORMAT_ARGB|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_BGRA_COLORMAP (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_ABGR_COLORMAP (PNG_FORMAT_ABGR|PNG_FORMAT_FLAG_COLORMAP) + +/* PNG_IMAGE macros + * + * These are convenience macros to derive information from a png_image + * structure. The PNG_IMAGE_SAMPLE_ macros return values appropriate to the + * actual image sample values - either the entries in the color-map or the + * pixels in the image. The PNG_IMAGE_PIXEL_ macros return corresponding values + * for the pixels and will always return 1 for color-mapped formats. The + * remaining macros return information about the rows in the image and the + * complete image. + * + * NOTE: All the macros that take a png_image::format parameter are compile time + * constants if the format parameter is, itself, a constant. Therefore these + * macros can be used in array declarations and case labels where required. + * Similarly the macros are also pre-processor constants (sizeof is not used) so + * they can be used in #if tests. + * + * First the information about the samples. + */ +#define PNG_IMAGE_SAMPLE_CHANNELS(fmt)\ + (((fmt)&(PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA))+1) + /* Return the total number of channels in a given format: 1..4 */ + +#define PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt)\ + ((((fmt) & PNG_FORMAT_FLAG_LINEAR) >> 2)+1) + /* Return the size in bytes of a single component of a pixel or color-map + * entry (as appropriate) in the image: 1 or 2. + */ + +#define PNG_IMAGE_SAMPLE_SIZE(fmt)\ + (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt)) + /* This is the size of the sample data for one sample. If the image is + * color-mapped it is the size of one color-map entry (and image pixels are + * one byte in size), otherwise it is the size of one image pixel. + */ + +#define PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(fmt)\ + (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * 256) + /* The maximum size of the color-map required by the format expressed in a + * count of components. This can be used to compile-time allocate a + * color-map: + * + * png_uint_16 colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(linear_fmt)]; + * + * png_byte colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(sRGB_fmt)]; + * + * Alternatively use the PNG_IMAGE_COLORMAP_SIZE macro below to use the + * information from one of the png_image_begin_read_ APIs and dynamically + * allocate the required memory. + */ + +/* Corresponding information about the pixels */ +#define PNG_IMAGE_PIXEL_(test,fmt)\ + (((fmt)&PNG_FORMAT_FLAG_COLORMAP)?1:test(fmt)) + +#define PNG_IMAGE_PIXEL_CHANNELS(fmt)\ + PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_CHANNELS,fmt) + /* The number of separate channels (components) in a pixel; 1 for a + * color-mapped image. + */ + +#define PNG_IMAGE_PIXEL_COMPONENT_SIZE(fmt)\ + PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_COMPONENT_SIZE,fmt) + /* The size, in bytes, of each component in a pixel; 1 for a color-mapped + * image. + */ + +#define PNG_IMAGE_PIXEL_SIZE(fmt) PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_SIZE,fmt) + /* The size, in bytes, of a complete pixel; 1 for a color-mapped image. */ + +/* Information about the whole row, or whole image */ +#define PNG_IMAGE_ROW_STRIDE(image)\ + (PNG_IMAGE_PIXEL_CHANNELS((image).format) * (image).width) + /* Return the total number of components in a single row of the image; this + * is the minimum 'row stride', the minimum count of components between each + * row. For a color-mapped image this is the minimum number of bytes in a + * row. + * + * WARNING: this macro overflows for some images with more than one component + * and very large image widths. libpng will refuse to process an image where + * this macro would overflow. + */ + +#define PNG_IMAGE_BUFFER_SIZE(image, row_stride)\ + (PNG_IMAGE_PIXEL_COMPONENT_SIZE((image).format)*(image).height*(row_stride)) + /* Return the size, in bytes, of an image buffer given a png_image and a row + * stride - the number of components to leave space for in each row. + * + * WARNING: this macro overflows a 32-bit integer for some large PNG images, + * libpng will refuse to process an image where such an overflow would occur. + */ + +#define PNG_IMAGE_SIZE(image)\ + PNG_IMAGE_BUFFER_SIZE(image, PNG_IMAGE_ROW_STRIDE(image)) + /* Return the size, in bytes, of the image in memory given just a png_image; + * the row stride is the minimum stride required for the image. + */ + +#define PNG_IMAGE_COLORMAP_SIZE(image)\ + (PNG_IMAGE_SAMPLE_SIZE((image).format) * (image).colormap_entries) + /* Return the size, in bytes, of the color-map of this image. If the image + * format is not a color-map format this will return a size sufficient for + * 256 entries in the given format; check PNG_FORMAT_FLAG_COLORMAP if + * you don't want to allocate a color-map in this case. + */ + +/* PNG_IMAGE_FLAG_* + * + * Flags containing additional information about the image are held in the + * 'flags' field of png_image. + */ +#define PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB 0x01 + /* This indicates the the RGB values of the in-memory bitmap do not + * correspond to the red, green and blue end-points defined by sRGB. + */ + +#define PNG_IMAGE_FLAG_FAST 0x02 + /* On write emphasise speed over compression; the resultant PNG file will be + * larger but will be produced significantly faster, particular for large + * images. Do not use this option for images which will be distributed, only + * used it when producing intermediate files that will be read back in + * repeatedly. For a typical 24-bit image the option will double the read + * speed at the cost of increasing the image size by 25%, however for many + * more compressible images the PNG file can be 10 times larger with only a + * slight speed gain. + */ + +#define PNG_IMAGE_FLAG_16BIT_sRGB 0x04 + /* On read if the image is a 16-bit per component image and there is no gAMA + * or sRGB chunk assume that the components are sRGB encoded. Notice that + * images output by the simplified API always have gamma information; setting + * this flag only affects the interpretation of 16-bit images from an + * external source. It is recommended that the application expose this flag + * to the user; the user can normally easily recognize the difference between + * linear and sRGB encoding. This flag has no effect on write - the data + * passed to the write APIs must have the correct encoding (as defined + * above.) + * + * If the flag is not set (the default) input 16-bit per component data is + * assumed to be linear. + * + * NOTE: the flag can only be set after the png_image_begin_read_ call, + * because that call initializes the 'flags' field. + */ + +#ifdef PNG_SIMPLIFIED_READ_SUPPORTED +/* READ APIs + * --------- + * + * The png_image passed to the read APIs must have been initialized by setting + * the png_controlp field 'opaque' to NULL (or, safer, memset the whole thing.) + */ +#ifdef PNG_STDIO_SUPPORTED +PNG_EXPORT(234, int, png_image_begin_read_from_file, (png_imagep image, + const char *file_name)); + /* The named file is opened for read and the image header is filled in + * from the PNG header in the file. + */ + +PNG_EXPORT(235, int, png_image_begin_read_from_stdio, (png_imagep image, + FILE* file)); + /* The PNG header is read from the stdio FILE object. */ +#endif /* STDIO */ + +PNG_EXPORT(236, int, png_image_begin_read_from_memory, (png_imagep image, + png_const_voidp memory, png_size_t size)); + /* The PNG header is read from the given memory buffer. */ + +PNG_EXPORT(237, int, png_image_finish_read, (png_imagep image, + png_const_colorp background, void *buffer, png_int_32 row_stride, + void *colormap)); + /* Finish reading the image into the supplied buffer and clean up the + * png_image structure. + * + * row_stride is the step, in byte or 2-byte units as appropriate, + * between adjacent rows. A positive stride indicates that the top-most row + * is first in the buffer - the normal top-down arrangement. A negative + * stride indicates that the bottom-most row is first in the buffer. + * + * background need only be supplied if an alpha channel must be removed from + * a png_byte format and the removal is to be done by compositing on a solid + * color; otherwise it may be NULL and any composition will be done directly + * onto the buffer. The value is an sRGB color to use for the background, + * for grayscale output the green channel is used. + * + * background must be supplied when an alpha channel must be removed from a + * single byte color-mapped output format, in other words if: + * + * 1) The original format from png_image_begin_read_from_* had + * PNG_FORMAT_FLAG_ALPHA set. + * 2) The format set by the application does not. + * 3) The format set by the application has PNG_FORMAT_FLAG_COLORMAP set and + * PNG_FORMAT_FLAG_LINEAR *not* set. + * + * For linear output removing the alpha channel is always done by compositing + * on black and background is ignored. + * + * colormap must be supplied when PNG_FORMAT_FLAG_COLORMAP is set. It must + * be at least the size (in bytes) returned by PNG_IMAGE_COLORMAP_SIZE. + * image->colormap_entries will be updated to the actual number of entries + * written to the colormap; this may be less than the original value. + */ + +PNG_EXPORT(238, void, png_image_free, (png_imagep image)); + /* Free any data allocated by libpng in image->opaque, setting the pointer to + * NULL. May be called at any time after the structure is initialized. + */ +#endif /* SIMPLIFIED_READ */ + +#ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED +/* WRITE APIS + * ---------- + * For write you must initialize a png_image structure to describe the image to + * be written. To do this use memset to set the whole structure to 0 then + * initialize fields describing your image. + * + * version: must be set to PNG_IMAGE_VERSION + * opaque: must be initialized to NULL + * width: image width in pixels + * height: image height in rows + * format: the format of the data (image and color-map) you wish to write + * flags: set to 0 unless one of the defined flags applies; set + * PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB for color format images where the RGB + * values do not correspond to the colors in sRGB. + * colormap_entries: set to the number of entries in the color-map (0 to 256) + */ +#ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED +PNG_EXPORT(239, int, png_image_write_to_file, (png_imagep image, + const char *file, int convert_to_8bit, const void *buffer, + png_int_32 row_stride, const void *colormap)); + /* Write the image to the named file. */ + +PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file, + int convert_to_8_bit, const void *buffer, png_int_32 row_stride, + const void *colormap)); + /* Write the image to the given (FILE*). */ +#endif /* SIMPLIFIED_WRITE_STDIO */ + +/* With all write APIs if image is in one of the linear formats with 16-bit + * data then setting convert_to_8_bit will cause the output to be an 8-bit PNG + * gamma encoded according to the sRGB specification, otherwise a 16-bit linear + * encoded PNG file is written. + * + * With color-mapped data formats the colormap parameter point to a color-map + * with at least image->colormap_entries encoded in the specified format. If + * the format is linear the written PNG color-map will be converted to sRGB + * regardless of the convert_to_8_bit flag. + * + * With all APIs row_stride is handled as in the read APIs - it is the spacing + * from one row to the next in component sized units (1 or 2 bytes) and if + * negative indicates a bottom-up row layout in the buffer. If row_stride is + * zero, libpng will calculate it for you from the image width and number of + * channels. + * + * Note that the write API does not support interlacing, sub-8-bit pixels or + * most ancillary chunks. If you need to write text chunks (e.g. for copyright + * notices) you need to use one of the other APIs. + */ + +PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory, + png_alloc_size_t * PNG_RESTRICT memory_bytes, int convert_to_8_bit, + const void *buffer, png_int_32 row_stride, const void *colormap)); + /* Write the image to the given memory buffer. The function both writes the + * whole PNG data stream to *memory and updates *memory_bytes with the count + * of bytes written. + * + * 'memory' may be NULL. In this case *memory_bytes is not read however on + * success the number of bytes which would have been written will still be + * stored in *memory_bytes. On failure *memory_bytes will contain 0. + * + * If 'memory' is not NULL it must point to memory[*memory_bytes] of + * writeable memory. + * + * If the function returns success memory[*memory_bytes] (if 'memory' is not + * NULL) contains the written PNG data. *memory_bytes will always be less + * than or equal to the original value. + * + * If the function returns false and *memory_bytes was not changed an error + * occured during write. If *memory_bytes was changed, or is not 0 if + * 'memory' was NULL, the write would have succeeded but for the memory + * buffer being too small. *memory_bytes contains the required number of + * bytes and will be bigger that the original value. + */ + +#define png_image_write_get_memory_size(image, size, convert_to_8_bit, buffer,\ + row_stride, colormap)\ + png_image_write_to_memory(&(image), 0, &(size), convert_to_8_bit, buffer,\ + row_stride, colormap) + /* Return the amount of memory in 'size' required to compress this image. + * The png_image structure 'image' must be filled in as in the above + * function and must not be changed before the actual write call, the buffer + * and all other parameters must also be identical to that in the final + * write call. The 'size' variable need not be initialized. + * + * NOTE: the macro returns true/false, if false is returned 'size' will be + * set to zero and the write failed and probably will fail if tried again. + */ + +/* You can pre-allocate the buffer by making sure it is of sufficient size + * regardless of the amount of compression achieved. The buffer size will + * always be bigger than the original image and it will never be filled. The + * following macros are provided to assist in allocating the buffer. + */ +#define PNG_IMAGE_DATA_SIZE(image) (PNG_IMAGE_SIZE(image)+(image).height) + /* The number of uncompressed bytes in the PNG byte encoding of the image; + * uncompressing the PNG IDAT data will give this number of bytes. + * + * NOTE: while PNG_IMAGE_SIZE cannot overflow for an image in memory this + * macro can because of the extra bytes used in the PNG byte encoding. You + * need to avoid this macro if your image size approaches 2^30 in width or + * height. The same goes for the remainder of these macros; they all produce + * bigger numbers than the actual in-memory image size. + */ +#ifndef PNG_ZLIB_MAX_SIZE +# define PNG_ZLIB_MAX_SIZE(b) ((b)+(((b)+7U)>>3)+(((b)+63U)>>6)+11U) + /* An upper bound on the number of compressed bytes given 'b' uncompressed + * bytes. This is based on deflateBounds() in zlib; different + * implementations of zlib compression may conceivably produce more data so + * if your zlib implementation is not zlib itself redefine this macro + * appropriately. + */ +#endif + +#define PNG_IMAGE_COMPRESSED_SIZE_MAX(image)\ + PNG_ZLIB_MAX_SIZE((png_alloc_size_t)PNG_IMAGE_DATA_SIZE(image)) + /* An upper bound on the size of the data in the PNG IDAT chunks. */ + +#define PNG_IMAGE_PNG_SIZE_MAX_(image, image_size)\ + ((8U/*sig*/+25U/*IHDR*/+16U/*gAMA*/+44U/*cHRM*/+12U/*IEND*/+\ + (((image).format&PNG_FORMAT_FLAG_COLORMAP)?/*colormap: PLTE, tRNS*/\ + 12U+3U*(image).colormap_entries/*PLTE data*/+\ + (((image).format&PNG_FORMAT_FLAG_ALPHA)?\ + 12U/*tRNS*/+(image).colormap_entries:0U):0U)+\ + 12U)+(12U*((image_size)/PNG_ZBUF_SIZE))/*IDAT*/+(image_size)) + /* A helper for the following macro; if your compiler cannot handle the + * following macro use this one with the result of + * PNG_IMAGE_COMPRESSED_SIZE_MAX(image) as the second argument (most + * compilers should handle this just fine.) + */ + +#define PNG_IMAGE_PNG_SIZE_MAX(image)\ + PNG_IMAGE_PNG_SIZE_MAX_(image, PNG_IMAGE_COMPRESSED_SIZE_MAX(image)) + /* An upper bound on the total length of the PNG data stream for 'image'. + * The result is of type png_alloc_size_t, on 32-bit systems this may + * overflow even though PNG_IMAGE_DATA_SIZE does not overflow; the write will + * run out of buffer space but return a corrected size which should work. + */ +#endif /* SIMPLIFIED_WRITE */ +/******************************************************************************* + * END OF SIMPLIFIED API + ******************************************************************************/ +#endif /* SIMPLIFIED_{READ|WRITE} */ + +/******************************************************************************* + * Section 6: IMPLEMENTATION OPTIONS + ******************************************************************************* + * + * Support for arbitrary implementation-specific optimizations. The API allows + * particular options to be turned on or off. 'Option' is the number of the + * option and 'onoff' is 0 (off) or non-0 (on). The value returned is given + * by the PNG_OPTION_ defines below. + * + * HARDWARE: normally hardware capabilites, such as the Intel SSE instructions, + * are detected at run time, however sometimes it may be impossible + * to do this in user mode, in which case it is necessary to discover + * the capabilities in an OS specific way. Such capabilities are + * listed here when libpng has support for them and must be turned + * ON by the application if present. + * + * SOFTWARE: sometimes software optimizations actually result in performance + * decrease on some architectures or systems, or with some sets of + * PNG images. 'Software' options allow such optimizations to be + * selected at run time. + */ +#ifdef PNG_SET_OPTION_SUPPORTED +#ifdef PNG_ARM_NEON_API_SUPPORTED +# define PNG_ARM_NEON 0 /* HARDWARE: ARM Neon SIMD instructions supported */ +#endif +#define PNG_MAXIMUM_INFLATE_WINDOW 2 /* SOFTWARE: force maximum window */ +#define PNG_SKIP_sRGB_CHECK_PROFILE 4 /* SOFTWARE: Check ICC profile for sRGB */ +#ifdef PNG_MIPS_MSA_API_SUPPORTED +# define PNG_MIPS_MSA 6 /* HARDWARE: MIPS Msa SIMD instructions supported */ +#endif +#define PNG_IGNORE_ADLER32 8 +#ifdef PNG_POWERPC_VSX_API_SUPPORTED +# define PNG_POWERPC_VSX 10 /* HARDWARE: PowerPC VSX SIMD instructions supported */ +#endif +#define PNG_OPTION_NEXT 12 /* Next option - numbers must be even */ + +/* Return values: NOTE: there are four values and 'off' is *not* zero */ +#define PNG_OPTION_UNSET 0 /* Unset - defaults to off */ +#define PNG_OPTION_INVALID 1 /* Option number out of range */ +#define PNG_OPTION_OFF 2 +#define PNG_OPTION_ON 3 + +PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option, + int onoff)); +#endif /* SET_OPTION */ + +/******************************************************************************* + * END OF HARDWARE AND SOFTWARE OPTIONS + ******************************************************************************/ + +/* Maintainer: Put new public prototypes here ^, in libpng.3, in project + * defs, and in scripts/symbols.def. + */ + +/* The last ordinal number (this is the *last* one already used; the next + * one to use is one more than this.) + */ +#ifdef PNG_EXPORT_LAST_ORDINAL + PNG_EXPORT_LAST_ORDINAL(249); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* PNG_VERSION_INFO_ONLY */ +/* Do not put anything past this line */ +#endif /* PNG_H */ diff --git a/frameworks/cairosvg/dependencies/libpng/1.6.34/include/libpng16/pngconf.h b/frameworks/cairosvg/dependencies/libpng/1.6.34/include/libpng16/pngconf.h new file mode 100755 index 00000000..d13b13e5 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libpng/1.6.34/include/libpng16/pngconf.h @@ -0,0 +1,622 @@ + +/* pngconf.h - machine configurable file for libpng + * + * libpng version 1.6.34, September 29, 2017 + * + * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * Any machine specific code is near the front of this file, so if you + * are configuring libpng for a machine, you may want to read the section + * starting here down to where it starts to typedef png_color, png_text, + * and png_info. + */ + +#ifndef PNGCONF_H +#define PNGCONF_H + +#ifndef PNG_BUILDING_SYMBOL_TABLE /* else includes may cause problems */ + +/* From libpng 1.6.0 libpng requires an ANSI X3.159-1989 ("ISOC90") compliant C + * compiler for correct compilation. The following header files are required by + * the standard. If your compiler doesn't provide these header files, or they + * do not match the standard, you will need to provide/improve them. + */ +#include <limits.h> +#include <stddef.h> + +/* Library header files. These header files are all defined by ISOC90; libpng + * expects conformant implementations, however, an ISOC90 conformant system need + * not provide these header files if the functionality cannot be implemented. + * In this case it will be necessary to disable the relevant parts of libpng in + * the build of pnglibconf.h. + * + * Prior to 1.6.0 string.h was included here; the API changes in 1.6.0 to not + * include this unnecessary header file. + */ + +#ifdef PNG_STDIO_SUPPORTED + /* Required for the definition of FILE: */ +# include <stdio.h> +#endif + +#ifdef PNG_SETJMP_SUPPORTED + /* Required for the definition of jmp_buf and the declaration of longjmp: */ +# include <setjmp.h> +#endif + +#ifdef PNG_CONVERT_tIME_SUPPORTED + /* Required for struct tm: */ +# include <time.h> +#endif + +#endif /* PNG_BUILDING_SYMBOL_TABLE */ + +/* Prior to 1.6.0 it was possible to turn off 'const' in declarations using + * PNG_NO_CONST; this is no longer supported except for data declarations which + * apparently still cause problems in 2011 on some compilers. + */ +#define PNG_CONST const /* backward compatibility only */ + +/* This controls optimization of the reading of 16-bit and 32-bit values + * from PNG files. It can be set on a per-app-file basis - it + * just changes whether a macro is used when the function is called. + * The library builder sets the default; if read functions are not + * built into the library the macro implementation is forced on. + */ +#ifndef PNG_READ_INT_FUNCTIONS_SUPPORTED +# define PNG_USE_READ_MACROS +#endif +#if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS) +# if PNG_DEFAULT_READ_MACROS +# define PNG_USE_READ_MACROS +# endif +#endif + +/* COMPILER SPECIFIC OPTIONS. + * + * These options are provided so that a variety of difficult compilers + * can be used. Some are fixed at build time (e.g. PNG_API_RULE + * below) but still have compiler specific implementations, others + * may be changed on a per-file basis when compiling against libpng. + */ + +/* The PNGARG macro was used in versions of libpng prior to 1.6.0 to protect + * against legacy (pre ISOC90) compilers that did not understand function + * prototypes. It is not required for modern C compilers. + */ +#ifndef PNGARG +# define PNGARG(arglist) arglist +#endif + +/* Function calling conventions. + * ============================= + * Normally it is not necessary to specify to the compiler how to call + * a function - it just does it - however on x86 systems derived from + * Microsoft and Borland C compilers ('IBM PC', 'DOS', 'Windows' systems + * and some others) there are multiple ways to call a function and the + * default can be changed on the compiler command line. For this reason + * libpng specifies the calling convention of every exported function and + * every function called via a user supplied function pointer. This is + * done in this file by defining the following macros: + * + * PNGAPI Calling convention for exported functions. + * PNGCBAPI Calling convention for user provided (callback) functions. + * PNGCAPI Calling convention used by the ANSI-C library (required + * for longjmp callbacks and sometimes used internally to + * specify the calling convention for zlib). + * + * These macros should never be overridden. If it is necessary to + * change calling convention in a private build this can be done + * by setting PNG_API_RULE (which defaults to 0) to one of the values + * below to select the correct 'API' variants. + * + * PNG_API_RULE=0 Use PNGCAPI - the 'C' calling convention - throughout. + * This is correct in every known environment. + * PNG_API_RULE=1 Use the operating system convention for PNGAPI and + * the 'C' calling convention (from PNGCAPI) for + * callbacks (PNGCBAPI). This is no longer required + * in any known environment - if it has to be used + * please post an explanation of the problem to the + * libpng mailing list. + * + * These cases only differ if the operating system does not use the C + * calling convention, at present this just means the above cases + * (x86 DOS/Windows sytems) and, even then, this does not apply to + * Cygwin running on those systems. + * + * Note that the value must be defined in pnglibconf.h so that what + * the application uses to call the library matches the conventions + * set when building the library. + */ + +/* Symbol export + * ============= + * When building a shared library it is almost always necessary to tell + * the compiler which symbols to export. The png.h macro 'PNG_EXPORT' + * is used to mark the symbols. On some systems these symbols can be + * extracted at link time and need no special processing by the compiler, + * on other systems the symbols are flagged by the compiler and just + * the declaration requires a special tag applied (unfortunately) in a + * compiler dependent way. Some systems can do either. + * + * A small number of older systems also require a symbol from a DLL to + * be flagged to the program that calls it. This is a problem because + * we do not know in the header file included by application code that + * the symbol will come from a shared library, as opposed to a statically + * linked one. For this reason the application must tell us by setting + * the magic flag PNG_USE_DLL to turn on the special processing before + * it includes png.h. + * + * Four additional macros are used to make this happen: + * + * PNG_IMPEXP The magic (if any) to cause a symbol to be exported from + * the build or imported if PNG_USE_DLL is set - compiler + * and system specific. + * + * PNG_EXPORT_TYPE(type) A macro that pre or appends PNG_IMPEXP to + * 'type', compiler specific. + * + * PNG_DLL_EXPORT Set to the magic to use during a libpng build to + * make a symbol exported from the DLL. Not used in the + * public header files; see pngpriv.h for how it is used + * in the libpng build. + * + * PNG_DLL_IMPORT Set to the magic to force the libpng symbols to come + * from a DLL - used to define PNG_IMPEXP when + * PNG_USE_DLL is set. + */ + +/* System specific discovery. + * ========================== + * This code is used at build time to find PNG_IMPEXP, the API settings + * and PNG_EXPORT_TYPE(), it may also set a macro to indicate the DLL + * import processing is possible. On Windows systems it also sets + * compiler-specific macros to the values required to change the calling + * conventions of the various functions. + */ +#if defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\ + defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) + /* Windows system (DOS doesn't support DLLs). Includes builds under Cygwin or + * MinGW on any architecture currently supported by Windows. Also includes + * Watcom builds but these need special treatment because they are not + * compatible with GCC or Visual C because of different calling conventions. + */ +# if PNG_API_RULE == 2 + /* If this line results in an error, either because __watcall is not + * understood or because of a redefine just below you cannot use *this* + * build of the library with the compiler you are using. *This* build was + * build using Watcom and applications must also be built using Watcom! + */ +# define PNGCAPI __watcall +# endif + +# if defined(__GNUC__) || (defined(_MSC_VER) && (_MSC_VER >= 800)) +# define PNGCAPI __cdecl +# if PNG_API_RULE == 1 + /* If this line results in an error __stdcall is not understood and + * PNG_API_RULE should not have been set to '1'. + */ +# define PNGAPI __stdcall +# endif +# else + /* An older compiler, or one not detected (erroneously) above, + * if necessary override on the command line to get the correct + * variants for the compiler. + */ +# ifndef PNGCAPI +# define PNGCAPI _cdecl +# endif +# if PNG_API_RULE == 1 && !defined(PNGAPI) +# define PNGAPI _stdcall +# endif +# endif /* compiler/api */ + + /* NOTE: PNGCBAPI always defaults to PNGCAPI. */ + +# if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD) +# error "PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed" +# endif + +# if (defined(_MSC_VER) && _MSC_VER < 800) ||\ + (defined(__BORLANDC__) && __BORLANDC__ < 0x500) + /* older Borland and MSC + * compilers used '__export' and required this to be after + * the type. + */ +# ifndef PNG_EXPORT_TYPE +# define PNG_EXPORT_TYPE(type) type PNG_IMPEXP +# endif +# define PNG_DLL_EXPORT __export +# else /* newer compiler */ +# define PNG_DLL_EXPORT __declspec(dllexport) +# ifndef PNG_DLL_IMPORT +# define PNG_DLL_IMPORT __declspec(dllimport) +# endif +# endif /* compiler */ + +#else /* !Windows */ +# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__) +# define PNGAPI _System +# else /* !Windows/x86 && !OS/2 */ + /* Use the defaults, or define PNG*API on the command line (but + * this will have to be done for every compile!) + */ +# endif /* other system, !OS/2 */ +#endif /* !Windows/x86 */ + +/* Now do all the defaulting . */ +#ifndef PNGCAPI +# define PNGCAPI +#endif +#ifndef PNGCBAPI +# define PNGCBAPI PNGCAPI +#endif +#ifndef PNGAPI +# define PNGAPI PNGCAPI +#endif + +/* PNG_IMPEXP may be set on the compilation system command line or (if not set) + * then in an internal header file when building the library, otherwise (when + * using the library) it is set here. + */ +#ifndef PNG_IMPEXP +# if defined(PNG_USE_DLL) && defined(PNG_DLL_IMPORT) + /* This forces use of a DLL, disallowing static linking */ +# define PNG_IMPEXP PNG_DLL_IMPORT +# endif + +# ifndef PNG_IMPEXP +# define PNG_IMPEXP +# endif +#endif + +/* In 1.5.2 the definition of PNG_FUNCTION has been changed to always treat + * 'attributes' as a storage class - the attributes go at the start of the + * function definition, and attributes are always appended regardless of the + * compiler. This considerably simplifies these macros but may cause problems + * if any compilers both need function attributes and fail to handle them as + * a storage class (this is unlikely.) + */ +#ifndef PNG_FUNCTION +# define PNG_FUNCTION(type, name, args, attributes) attributes type name args +#endif + +#ifndef PNG_EXPORT_TYPE +# define PNG_EXPORT_TYPE(type) PNG_IMPEXP type +#endif + + /* The ordinal value is only relevant when preprocessing png.h for symbol + * table entries, so we discard it here. See the .dfn files in the + * scripts directory. + */ + +#ifndef PNG_EXPORTA +# define PNG_EXPORTA(ordinal, type, name, args, attributes) \ + PNG_FUNCTION(PNG_EXPORT_TYPE(type), (PNGAPI name), PNGARG(args), \ + PNG_LINKAGE_API attributes) +#endif + +/* ANSI-C (C90) does not permit a macro to be invoked with an empty argument, + * so make something non-empty to satisfy the requirement: + */ +#define PNG_EMPTY /*empty list*/ + +#define PNG_EXPORT(ordinal, type, name, args) \ + PNG_EXPORTA(ordinal, type, name, args, PNG_EMPTY) + +/* Use PNG_REMOVED to comment out a removed interface. */ +#ifndef PNG_REMOVED +# define PNG_REMOVED(ordinal, type, name, args, attributes) +#endif + +#ifndef PNG_CALLBACK +# define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) PNGARG(args) +#endif + +/* Support for compiler specific function attributes. These are used + * so that where compiler support is available incorrect use of API + * functions in png.h will generate compiler warnings. + * + * Added at libpng-1.2.41. + */ + +#ifndef PNG_NO_PEDANTIC_WARNINGS +# ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED +# define PNG_PEDANTIC_WARNINGS_SUPPORTED +# endif +#endif + +#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED + /* Support for compiler specific function attributes. These are used + * so that where compiler support is available, incorrect use of API + * functions in png.h will generate compiler warnings. Added at libpng + * version 1.2.41. Disabling these removes the warnings but may also produce + * less efficient code. + */ +# if defined(__clang__) && defined(__has_attribute) + /* Clang defines both __clang__ and __GNUC__. Check __clang__ first. */ +# if !defined(PNG_USE_RESULT) && __has_attribute(__warn_unused_result__) +# define PNG_USE_RESULT __attribute__((__warn_unused_result__)) +# endif +# if !defined(PNG_NORETURN) && __has_attribute(__noreturn__) +# define PNG_NORETURN __attribute__((__noreturn__)) +# endif +# if !defined(PNG_ALLOCATED) && __has_attribute(__malloc__) +# define PNG_ALLOCATED __attribute__((__malloc__)) +# endif +# if !defined(PNG_DEPRECATED) && __has_attribute(__deprecated__) +# define PNG_DEPRECATED __attribute__((__deprecated__)) +# endif +# if !defined(PNG_PRIVATE) +# ifdef __has_extension +# if __has_extension(attribute_unavailable_with_message) +# define PNG_PRIVATE __attribute__((__unavailable__(\ + "This function is not exported by libpng."))) +# endif +# endif +# endif +# ifndef PNG_RESTRICT +# define PNG_RESTRICT __restrict +# endif + +# elif defined(__GNUC__) +# ifndef PNG_USE_RESULT +# define PNG_USE_RESULT __attribute__((__warn_unused_result__)) +# endif +# ifndef PNG_NORETURN +# define PNG_NORETURN __attribute__((__noreturn__)) +# endif +# if __GNUC__ >= 3 +# ifndef PNG_ALLOCATED +# define PNG_ALLOCATED __attribute__((__malloc__)) +# endif +# ifndef PNG_DEPRECATED +# define PNG_DEPRECATED __attribute__((__deprecated__)) +# endif +# ifndef PNG_PRIVATE +# if 0 /* Doesn't work so we use deprecated instead*/ +# define PNG_PRIVATE \ + __attribute__((warning("This function is not exported by libpng."))) +# else +# define PNG_PRIVATE \ + __attribute__((__deprecated__)) +# endif +# endif +# if ((__GNUC__ > 3) || !defined(__GNUC_MINOR__) || (__GNUC_MINOR__ >= 1)) +# ifndef PNG_RESTRICT +# define PNG_RESTRICT __restrict +# endif +# endif /* __GNUC__.__GNUC_MINOR__ > 3.0 */ +# endif /* __GNUC__ >= 3 */ + +# elif defined(_MSC_VER) && (_MSC_VER >= 1300) +# ifndef PNG_USE_RESULT +# define PNG_USE_RESULT /* not supported */ +# endif +# ifndef PNG_NORETURN +# define PNG_NORETURN __declspec(noreturn) +# endif +# ifndef PNG_ALLOCATED +# if (_MSC_VER >= 1400) +# define PNG_ALLOCATED __declspec(restrict) +# endif +# endif +# ifndef PNG_DEPRECATED +# define PNG_DEPRECATED __declspec(deprecated) +# endif +# ifndef PNG_PRIVATE +# define PNG_PRIVATE __declspec(deprecated) +# endif +# ifndef PNG_RESTRICT +# if (_MSC_VER >= 1400) +# define PNG_RESTRICT __restrict +# endif +# endif + +# elif defined(__WATCOMC__) +# ifndef PNG_RESTRICT +# define PNG_RESTRICT __restrict +# endif +# endif +#endif /* PNG_PEDANTIC_WARNINGS */ + +#ifndef PNG_DEPRECATED +# define PNG_DEPRECATED /* Use of this function is deprecated */ +#endif +#ifndef PNG_USE_RESULT +# define PNG_USE_RESULT /* The result of this function must be checked */ +#endif +#ifndef PNG_NORETURN +# define PNG_NORETURN /* This function does not return */ +#endif +#ifndef PNG_ALLOCATED +# define PNG_ALLOCATED /* The result of the function is new memory */ +#endif +#ifndef PNG_PRIVATE +# define PNG_PRIVATE /* This is a private libpng function */ +#endif +#ifndef PNG_RESTRICT +# define PNG_RESTRICT /* The C99 "restrict" feature */ +#endif + +#ifndef PNG_FP_EXPORT /* A floating point API. */ +# ifdef PNG_FLOATING_POINT_SUPPORTED +# define PNG_FP_EXPORT(ordinal, type, name, args)\ + PNG_EXPORT(ordinal, type, name, args); +# else /* No floating point APIs */ +# define PNG_FP_EXPORT(ordinal, type, name, args) +# endif +#endif +#ifndef PNG_FIXED_EXPORT /* A fixed point API. */ +# ifdef PNG_FIXED_POINT_SUPPORTED +# define PNG_FIXED_EXPORT(ordinal, type, name, args)\ + PNG_EXPORT(ordinal, type, name, args); +# else /* No fixed point APIs */ +# define PNG_FIXED_EXPORT(ordinal, type, name, args) +# endif +#endif + +#ifndef PNG_BUILDING_SYMBOL_TABLE +/* Some typedefs to get us started. These should be safe on most of the common + * platforms. + * + * png_uint_32 and png_int_32 may, currently, be larger than required to hold a + * 32-bit value however this is not normally advisable. + * + * png_uint_16 and png_int_16 should always be two bytes in size - this is + * verified at library build time. + * + * png_byte must always be one byte in size. + * + * The checks below use constants from limits.h, as defined by the ISOC90 + * standard. + */ +#if CHAR_BIT == 8 && UCHAR_MAX == 255 + typedef unsigned char png_byte; +#else +# error "libpng requires 8-bit bytes" +#endif + +#if INT_MIN == -32768 && INT_MAX == 32767 + typedef int png_int_16; +#elif SHRT_MIN == -32768 && SHRT_MAX == 32767 + typedef short png_int_16; +#else +# error "libpng requires a signed 16-bit type" +#endif + +#if UINT_MAX == 65535 + typedef unsigned int png_uint_16; +#elif USHRT_MAX == 65535 + typedef unsigned short png_uint_16; +#else +# error "libpng requires an unsigned 16-bit type" +#endif + +#if INT_MIN < -2147483646 && INT_MAX > 2147483646 + typedef int png_int_32; +#elif LONG_MIN < -2147483646 && LONG_MAX > 2147483646 + typedef long int png_int_32; +#else +# error "libpng requires a signed 32-bit (or more) type" +#endif + +#if UINT_MAX > 4294967294U + typedef unsigned int png_uint_32; +#elif ULONG_MAX > 4294967294U + typedef unsigned long int png_uint_32; +#else +# error "libpng requires an unsigned 32-bit (or more) type" +#endif + +/* Prior to 1.6.0 it was possible to disable the use of size_t, 1.6.0, however, + * requires an ISOC90 compiler and relies on consistent behavior of sizeof. + */ +typedef size_t png_size_t; +typedef ptrdiff_t png_ptrdiff_t; + +/* libpng needs to know the maximum value of 'size_t' and this controls the + * definition of png_alloc_size_t, below. This maximum value of size_t limits + * but does not control the maximum allocations the library makes - there is + * direct application control of this through png_set_user_limits(). + */ +#ifndef PNG_SMALL_SIZE_T + /* Compiler specific tests for systems where size_t is known to be less than + * 32 bits (some of these systems may no longer work because of the lack of + * 'far' support; see above.) + */ +# if (defined(__TURBOC__) && !defined(__FLAT__)) ||\ + (defined(_MSC_VER) && defined(MAXSEG_64K)) +# define PNG_SMALL_SIZE_T +# endif +#endif + +/* png_alloc_size_t is guaranteed to be no smaller than png_size_t, and no + * smaller than png_uint_32. Casts from png_size_t or png_uint_32 to + * png_alloc_size_t are not necessary; in fact, it is recommended not to use + * them at all so that the compiler can complain when something turns out to be + * problematic. + * + * Casts in the other direction (from png_alloc_size_t to png_size_t or + * png_uint_32) should be explicitly applied; however, we do not expect to + * encounter practical situations that require such conversions. + * + * PNG_SMALL_SIZE_T must be defined if the maximum value of size_t is less than + * 4294967295 - i.e. less than the maximum value of png_uint_32. + */ +#ifdef PNG_SMALL_SIZE_T + typedef png_uint_32 png_alloc_size_t; +#else + typedef png_size_t png_alloc_size_t; +#endif + +/* Prior to 1.6.0 libpng offered limited support for Microsoft C compiler + * implementations of Intel CPU specific support of user-mode segmented address + * spaces, where 16-bit pointers address more than 65536 bytes of memory using + * separate 'segment' registers. The implementation requires two different + * types of pointer (only one of which includes the segment value.) + * + * If required this support is available in version 1.2 of libpng and may be + * available in versions through 1.5, although the correctness of the code has + * not been verified recently. + */ + +/* Typedef for floating-point numbers that are converted to fixed-point with a + * multiple of 100,000, e.g., gamma + */ +typedef png_int_32 png_fixed_point; + +/* Add typedefs for pointers */ +typedef void * png_voidp; +typedef const void * png_const_voidp; +typedef png_byte * png_bytep; +typedef const png_byte * png_const_bytep; +typedef png_uint_32 * png_uint_32p; +typedef const png_uint_32 * png_const_uint_32p; +typedef png_int_32 * png_int_32p; +typedef const png_int_32 * png_const_int_32p; +typedef png_uint_16 * png_uint_16p; +typedef const png_uint_16 * png_const_uint_16p; +typedef png_int_16 * png_int_16p; +typedef const png_int_16 * png_const_int_16p; +typedef char * png_charp; +typedef const char * png_const_charp; +typedef png_fixed_point * png_fixed_point_p; +typedef const png_fixed_point * png_const_fixed_point_p; +typedef png_size_t * png_size_tp; +typedef const png_size_t * png_const_size_tp; + +#ifdef PNG_STDIO_SUPPORTED +typedef FILE * png_FILE_p; +#endif + +#ifdef PNG_FLOATING_POINT_SUPPORTED +typedef double * png_doublep; +typedef const double * png_const_doublep; +#endif + +/* Pointers to pointers; i.e. arrays */ +typedef png_byte * * png_bytepp; +typedef png_uint_32 * * png_uint_32pp; +typedef png_int_32 * * png_int_32pp; +typedef png_uint_16 * * png_uint_16pp; +typedef png_int_16 * * png_int_16pp; +typedef const char * * png_const_charpp; +typedef char * * png_charpp; +typedef png_fixed_point * * png_fixed_point_pp; +#ifdef PNG_FLOATING_POINT_SUPPORTED +typedef double * * png_doublepp; +#endif + +/* Pointers to pointers to pointers; i.e., pointer to array */ +typedef char * * * png_charppp; + +#endif /* PNG_BUILDING_SYMBOL_TABLE */ + +#endif /* PNGCONF_H */ diff --git a/frameworks/cairosvg/dependencies/libpng/1.6.34/include/libpng16/pnglibconf.h b/frameworks/cairosvg/dependencies/libpng/1.6.34/include/libpng16/pnglibconf.h new file mode 100755 index 00000000..cb4ea9e2 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libpng/1.6.34/include/libpng16/pnglibconf.h @@ -0,0 +1,218 @@ +/* pnglibconf.h - library build configuration */ + +/* libpng version 1.6.34, September 29, 2017 */ + +/* Copyright (c) 1998-2017 Glenn Randers-Pehrson */ + +/* This code is released under the libpng license. */ +/* For conditions of distribution and use, see the disclaimer */ +/* and license in png.h */ + +/* pnglibconf.h */ +/* Machine generated file: DO NOT EDIT */ +/* Derived from: scripts/pnglibconf.dfa */ +#ifndef PNGLCONF_H +#define PNGLCONF_H +/* options */ +#define PNG_16BIT_SUPPORTED +#define PNG_ALIGNED_MEMORY_SUPPORTED +/*#undef PNG_ARM_NEON_API_SUPPORTED*/ +/*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/ +#define PNG_BENIGN_ERRORS_SUPPORTED +#define PNG_BENIGN_READ_ERRORS_SUPPORTED +/*#undef PNG_BENIGN_WRITE_ERRORS_SUPPORTED*/ +#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED +#define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED +#define PNG_COLORSPACE_SUPPORTED +#define PNG_CONSOLE_IO_SUPPORTED +#define PNG_CONVERT_tIME_SUPPORTED +#define PNG_EASY_ACCESS_SUPPORTED +/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/ +#define PNG_ERROR_TEXT_SUPPORTED +#define PNG_FIXED_POINT_SUPPORTED +#define PNG_FLOATING_ARITHMETIC_SUPPORTED +#define PNG_FLOATING_POINT_SUPPORTED +#define PNG_FORMAT_AFIRST_SUPPORTED +#define PNG_FORMAT_BGR_SUPPORTED +#define PNG_GAMMA_SUPPORTED +#define PNG_GET_PALETTE_MAX_SUPPORTED +#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED +#define PNG_INCH_CONVERSIONS_SUPPORTED +#define PNG_INFO_IMAGE_SUPPORTED +#define PNG_IO_STATE_SUPPORTED +#define PNG_MNG_FEATURES_SUPPORTED +#define PNG_POINTER_INDEXING_SUPPORTED +/*#undef PNG_POWERPC_VSX_API_SUPPORTED*/ +/*#undef PNG_POWERPC_VSX_CHECK_SUPPORTED*/ +#define PNG_PROGRESSIVE_READ_SUPPORTED +#define PNG_READ_16BIT_SUPPORTED +#define PNG_READ_ALPHA_MODE_SUPPORTED +#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_READ_BACKGROUND_SUPPORTED +#define PNG_READ_BGR_SUPPORTED +#define PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED +#define PNG_READ_COMPOSITE_NODIV_SUPPORTED +#define PNG_READ_COMPRESSED_TEXT_SUPPORTED +#define PNG_READ_EXPAND_16_SUPPORTED +#define PNG_READ_EXPAND_SUPPORTED +#define PNG_READ_FILLER_SUPPORTED +#define PNG_READ_GAMMA_SUPPORTED +#define PNG_READ_GET_PALETTE_MAX_SUPPORTED +#define PNG_READ_GRAY_TO_RGB_SUPPORTED +#define PNG_READ_INTERLACING_SUPPORTED +#define PNG_READ_INT_FUNCTIONS_SUPPORTED +#define PNG_READ_INVERT_ALPHA_SUPPORTED +#define PNG_READ_INVERT_SUPPORTED +#define PNG_READ_OPT_PLTE_SUPPORTED +#define PNG_READ_PACKSWAP_SUPPORTED +#define PNG_READ_PACK_SUPPORTED +#define PNG_READ_QUANTIZE_SUPPORTED +#define PNG_READ_RGB_TO_GRAY_SUPPORTED +#define PNG_READ_SCALE_16_TO_8_SUPPORTED +#define PNG_READ_SHIFT_SUPPORTED +#define PNG_READ_STRIP_16_TO_8_SUPPORTED +#define PNG_READ_STRIP_ALPHA_SUPPORTED +#define PNG_READ_SUPPORTED +#define PNG_READ_SWAP_ALPHA_SUPPORTED +#define PNG_READ_SWAP_SUPPORTED +#define PNG_READ_TEXT_SUPPORTED +#define PNG_READ_TRANSFORMS_SUPPORTED +#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_READ_USER_CHUNKS_SUPPORTED +#define PNG_READ_USER_TRANSFORM_SUPPORTED +#define PNG_READ_bKGD_SUPPORTED +#define PNG_READ_cHRM_SUPPORTED +#define PNG_READ_eXIf_SUPPORTED +#define PNG_READ_gAMA_SUPPORTED +#define PNG_READ_hIST_SUPPORTED +#define PNG_READ_iCCP_SUPPORTED +#define PNG_READ_iTXt_SUPPORTED +#define PNG_READ_oFFs_SUPPORTED +#define PNG_READ_pCAL_SUPPORTED +#define PNG_READ_pHYs_SUPPORTED +#define PNG_READ_sBIT_SUPPORTED +#define PNG_READ_sCAL_SUPPORTED +#define PNG_READ_sPLT_SUPPORTED +#define PNG_READ_sRGB_SUPPORTED +#define PNG_READ_tEXt_SUPPORTED +#define PNG_READ_tIME_SUPPORTED +#define PNG_READ_tRNS_SUPPORTED +#define PNG_READ_zTXt_SUPPORTED +#define PNG_SAVE_INT_32_SUPPORTED +#define PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_SEQUENTIAL_READ_SUPPORTED +#define PNG_SETJMP_SUPPORTED +#define PNG_SET_OPTION_SUPPORTED +#define PNG_SET_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_SET_USER_LIMITS_SUPPORTED +#define PNG_SIMPLIFIED_READ_AFIRST_SUPPORTED +#define PNG_SIMPLIFIED_READ_BGR_SUPPORTED +#define PNG_SIMPLIFIED_READ_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_SUPPORTED +#define PNG_STDIO_SUPPORTED +#define PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_TEXT_SUPPORTED +#define PNG_TIME_RFC1123_SUPPORTED +#define PNG_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_USER_CHUNKS_SUPPORTED +#define PNG_USER_LIMITS_SUPPORTED +#define PNG_USER_MEM_SUPPORTED +#define PNG_USER_TRANSFORM_INFO_SUPPORTED +#define PNG_USER_TRANSFORM_PTR_SUPPORTED +#define PNG_WARNINGS_SUPPORTED +#define PNG_WRITE_16BIT_SUPPORTED +#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_WRITE_BGR_SUPPORTED +#define PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED +#define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED +#define PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED +#define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED +#define PNG_WRITE_FILLER_SUPPORTED +#define PNG_WRITE_FILTER_SUPPORTED +#define PNG_WRITE_FLUSH_SUPPORTED +#define PNG_WRITE_GET_PALETTE_MAX_SUPPORTED +#define PNG_WRITE_INTERLACING_SUPPORTED +#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED +#define PNG_WRITE_INVERT_ALPHA_SUPPORTED +#define PNG_WRITE_INVERT_SUPPORTED +#define PNG_WRITE_OPTIMIZE_CMF_SUPPORTED +#define PNG_WRITE_PACKSWAP_SUPPORTED +#define PNG_WRITE_PACK_SUPPORTED +#define PNG_WRITE_SHIFT_SUPPORTED +#define PNG_WRITE_SUPPORTED +#define PNG_WRITE_SWAP_ALPHA_SUPPORTED +#define PNG_WRITE_SWAP_SUPPORTED +#define PNG_WRITE_TEXT_SUPPORTED +#define PNG_WRITE_TRANSFORMS_SUPPORTED +#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_WRITE_USER_TRANSFORM_SUPPORTED +#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED +#define PNG_WRITE_bKGD_SUPPORTED +#define PNG_WRITE_cHRM_SUPPORTED +#define PNG_WRITE_eXIf_SUPPORTED +#define PNG_WRITE_gAMA_SUPPORTED +#define PNG_WRITE_hIST_SUPPORTED +#define PNG_WRITE_iCCP_SUPPORTED +#define PNG_WRITE_iTXt_SUPPORTED +#define PNG_WRITE_oFFs_SUPPORTED +#define PNG_WRITE_pCAL_SUPPORTED +#define PNG_WRITE_pHYs_SUPPORTED +#define PNG_WRITE_sBIT_SUPPORTED +#define PNG_WRITE_sCAL_SUPPORTED +#define PNG_WRITE_sPLT_SUPPORTED +#define PNG_WRITE_sRGB_SUPPORTED +#define PNG_WRITE_tEXt_SUPPORTED +#define PNG_WRITE_tIME_SUPPORTED +#define PNG_WRITE_tRNS_SUPPORTED +#define PNG_WRITE_zTXt_SUPPORTED +#define PNG_bKGD_SUPPORTED +#define PNG_cHRM_SUPPORTED +#define PNG_eXIf_SUPPORTED +#define PNG_gAMA_SUPPORTED +#define PNG_hIST_SUPPORTED +#define PNG_iCCP_SUPPORTED +#define PNG_iTXt_SUPPORTED +#define PNG_oFFs_SUPPORTED +#define PNG_pCAL_SUPPORTED +#define PNG_pHYs_SUPPORTED +#define PNG_sBIT_SUPPORTED +#define PNG_sCAL_SUPPORTED +#define PNG_sPLT_SUPPORTED +#define PNG_sRGB_SUPPORTED +#define PNG_tEXt_SUPPORTED +#define PNG_tIME_SUPPORTED +#define PNG_tRNS_SUPPORTED +#define PNG_zTXt_SUPPORTED +/* end of options */ +/* settings */ +#define PNG_API_RULE 0 +#define PNG_DEFAULT_READ_MACROS 1 +#define PNG_GAMMA_THRESHOLD_FIXED 5000 +#define PNG_IDAT_READ_SIZE PNG_ZBUF_SIZE +#define PNG_INFLATE_BUF_SIZE 1024 +#define PNG_LINKAGE_API extern +#define PNG_LINKAGE_CALLBACK extern +#define PNG_LINKAGE_DATA extern +#define PNG_LINKAGE_FUNCTION extern +#define PNG_MAX_GAMMA_8 11 +#define PNG_QUANTIZE_BLUE_BITS 5 +#define PNG_QUANTIZE_GREEN_BITS 5 +#define PNG_QUANTIZE_RED_BITS 5 +#define PNG_TEXT_Z_DEFAULT_COMPRESSION (-1) +#define PNG_TEXT_Z_DEFAULT_STRATEGY 0 +#define PNG_USER_CHUNK_CACHE_MAX 1000 +#define PNG_USER_CHUNK_MALLOC_MAX 8000000 +#define PNG_USER_HEIGHT_MAX 1000000 +#define PNG_USER_WIDTH_MAX 1000000 +#define PNG_ZBUF_SIZE 8192 +#define PNG_ZLIB_VERNUM 0x12b0 +#define PNG_Z_DEFAULT_COMPRESSION (-1) +#define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0 +#define PNG_Z_DEFAULT_STRATEGY 1 +#define PNG_sCAL_PRECISION 5 +#define PNG_sRGB_PROFILE_CHECKS 2 +/* end of settings */ +#endif /* PNGLCONF_H */ diff --git a/frameworks/cairosvg/dependencies/libpng/1.6.34/include/png.h b/frameworks/cairosvg/dependencies/libpng/1.6.34/include/png.h new file mode 120000 index 00000000..bbca0e80 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libpng/1.6.34/include/png.h @@ -0,0 +1 @@ +libpng16/png.h \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/libpng/1.6.34/include/pngconf.h b/frameworks/cairosvg/dependencies/libpng/1.6.34/include/pngconf.h new file mode 120000 index 00000000..addd8a14 --- /dev/null +++ b/frameworks/cairosvg/dependencies/libpng/1.6.34/include/pngconf.h @@ -0,0 +1 @@ +libpng16/pngconf.h \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/libpng/1.6.34/include/pnglibconf.h b/frameworks/cairosvg/dependencies/libpng/1.6.34/include/pnglibconf.h new file mode 120000 index 00000000..64d182ad --- /dev/null +++ b/frameworks/cairosvg/dependencies/libpng/1.6.34/include/pnglibconf.h @@ -0,0 +1 @@ +libpng16/pnglibconf.h \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/libpng/1.6.34/lib/libpng.dylib b/frameworks/cairosvg/dependencies/libpng/1.6.34/lib/libpng.dylib new file mode 120000 index 00000000..b44c8d6f --- /dev/null +++ b/frameworks/cairosvg/dependencies/libpng/1.6.34/lib/libpng.dylib @@ -0,0 +1 @@ +libpng16.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/libpng/1.6.34/lib/libpng16.16.dylib b/frameworks/cairosvg/dependencies/libpng/1.6.34/lib/libpng16.16.dylib new file mode 100755 index 00000000..c8addb93 Binary files /dev/null and b/frameworks/cairosvg/dependencies/libpng/1.6.34/lib/libpng16.16.dylib differ diff --git a/frameworks/cairosvg/dependencies/libpng/1.6.34/lib/libpng16.dylib b/frameworks/cairosvg/dependencies/libpng/1.6.34/lib/libpng16.dylib new file mode 120000 index 00000000..3a49222f --- /dev/null +++ b/frameworks/cairosvg/dependencies/libpng/1.6.34/lib/libpng16.dylib @@ -0,0 +1 @@ +libpng16.16.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/include/librsvg-2.0/librsvg/librsvg-enum-types.h b/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/include/librsvg-2.0/librsvg/librsvg-enum-types.h new file mode 100755 index 00000000..d365213e --- /dev/null +++ b/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/include/librsvg-2.0/librsvg/librsvg-enum-types.h @@ -0,0 +1,24 @@ + +/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */ + +#if !defined (__RSVG_RSVG_H_INSIDE__) && !defined (RSVG_COMPILATION) +#warning "Including <librsvg/librsvg-enum-types.h> directly is deprecated." +#endif + +#ifndef __LIBRSVG_ENUM_TYPES_H__ +#define __LIBRSVG_ENUM_TYPES_H__ + +#include <glib-object.h> + +G_BEGIN_DECLS +/* enumerations from "rsvg.h" */ +GType rsvg_error_get_type (void); +#define RSVG_TYPE_ERROR (rsvg_error_get_type()) +GType rsvg_handle_flags_get_type (void); +#define RSVG_TYPE_HANDLE_FLAGS (rsvg_handle_flags_get_type()) +G_END_DECLS + +#endif /* __LIBRSVG_ENUM_TYPES_H__ */ + +/* Generated data ends here */ + diff --git a/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/include/librsvg-2.0/librsvg/librsvg-features.h b/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/include/librsvg-2.0/librsvg/librsvg-features.h new file mode 100755 index 00000000..d3c26a9d --- /dev/null +++ b/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/include/librsvg-2.0/librsvg/librsvg-features.h @@ -0,0 +1,50 @@ +#if !defined (__RSVG_RSVG_H_INSIDE__) && !defined (RSVG_COMPILATION) +#warning "Including <librsvg/librsvg-features.h> directly is deprecated." +#endif + +#ifndef LIBRSVG_FEATURES_H +#define LIBRSVG_FEATURES_H + +#define LIBRSVG_MAJOR_VERSION (2) +#define LIBRSVG_MINOR_VERSION (42) +#define LIBRSVG_MICRO_VERSION (2) +#define LIBRSVG_VERSION "2.42.2" + +#define LIBRSVG_CHECK_VERSION(major,minor,micro) \ + (LIBRSVG_MAJOR_VERSION > (major) || \ + (LIBRSVG_MAJOR_VERSION == (major) && LIBRSVG_MINOR_VERSION > (minor)) || \ + (LIBRSVG_MAJOR_VERSION == (major) && LIBRSVG_MINOR_VERSION == (minor) && LIBRSVG_MICRO_VERSION >= (micro))) + +#ifndef __GI_SCANNER__ +#define LIBRSVG_HAVE_SVGZ (TRUE) +#define LIBRSVG_HAVE_CSS (TRUE) + +#define LIBRSVG_CHECK_FEATURE(FEATURE) (defined(LIBRSVG_HAVE_##FEATURE) && LIBRSVG_HAVE_##FEATURE) +#endif + +/* + * On Windows builds, we need to decorate variables that are exposed in the public API + * so that they can be properly exported and linked to, for DLL builds + */ +#ifndef RSVG_VAR +# ifdef G_PLATFORM_WIN32 +# ifndef RSVG_STATIC +# ifdef RSVG_COMPILATION +# define RSVG_VAR extern __declspec (dllexport) +# else /* RSVG_COMPILATION */ +# define RSVG_VAR extern __declspec (dllimport) +# endif /* !RSVG_COMPILATION */ +# else /* !RSVG_STATIC */ +# define RSVG_VAR extern +# endif /* RSVG_STATIC */ +# else /* G_PLATFORM_WIN32 */ +# define RSVG_VAR extern +# endif /* !G_PLATFORM_WIN32 */ +#endif + +RSVG_VAR const guint librsvg_major_version; +RSVG_VAR const guint librsvg_minor_version; +RSVG_VAR const guint librsvg_micro_version; +RSVG_VAR const char librsvg_version[]; + +#endif diff --git a/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/include/librsvg-2.0/librsvg/rsvg-cairo.h b/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/include/librsvg-2.0/librsvg/rsvg-cairo.h new file mode 100755 index 00000000..048ee104 --- /dev/null +++ b/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/include/librsvg-2.0/librsvg/rsvg-cairo.h @@ -0,0 +1,42 @@ +/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim: set sw=4 sts=4 expandtab: */ +/* + rsvg-cairo.h: SAX-based renderer for SVG files using cairo + + Copyright (C) 2005 Red Hat, Inc. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + Author: Carl Worth <cworth@cworth.org> +*/ + +#if !defined (__RSVG_RSVG_H_INSIDE__) && !defined (RSVG_COMPILATION) +#warning "Including <librsvg/rsvg-cairo.h> directly is deprecated." +#endif + +#ifndef RSVG_CAIRO_H +#define RSVG_CAIRO_H + +#include <cairo.h> + +G_BEGIN_DECLS + +gboolean rsvg_handle_render_cairo (RsvgHandle * handle, cairo_t * cr); +gboolean rsvg_handle_render_cairo_sub (RsvgHandle * handle, cairo_t * cr, const char *id); + +G_END_DECLS + +#endif diff --git a/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/include/librsvg-2.0/librsvg/rsvg.h b/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/include/librsvg-2.0/librsvg/rsvg.h new file mode 100755 index 00000000..94610853 --- /dev/null +++ b/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/include/librsvg-2.0/librsvg/rsvg.h @@ -0,0 +1,268 @@ +/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim: set sw=4 sts=4 expandtab: */ +/* + rsvg.h: SAX-based renderer for SVG files into a GdkPixbuf. + + Copyright (C) 2000 Eazel, Inc. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + Author: Raph Levien <raph@artofcode.com> +*/ + +#ifndef RSVG_H +#define RSVG_H + +#define __RSVG_RSVG_H_INSIDE__ + +#include <glib-object.h> +#include <gio/gio.h> + +#include <gdk-pixbuf/gdk-pixbuf.h> + +G_BEGIN_DECLS + +#if defined(RSVG_DISABLE_DEPRECATION_WARNINGS) || !GLIB_CHECK_VERSION (2, 31, 0) +#define RSVG_DEPRECATED +#define RSVG_DEPRECATED_FOR(f) +#else +#define RSVG_DEPRECATED G_DEPRECATED +#define RSVG_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) +#endif + +#define RSVG_TYPE_HANDLE (rsvg_handle_get_type ()) +#define RSVG_HANDLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RSVG_TYPE_HANDLE, RsvgHandle)) +#define RSVG_HANDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RSVG_TYPE_HANDLE, RsvgHandleClass)) +#define RSVG_IS_HANDLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RSVG_TYPE_HANDLE)) +#define RSVG_IS_HANDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RSVG_TYPE_HANDLE)) +#define RSVG_HANDLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RSVG_TYPE_HANDLE, RsvgHandleClass)) + +GType rsvg_handle_get_type (void); + +/** + * RsvgError: + * @RSVG_ERROR_FAILED: the request failed + * + * An enumeration representing possible errors + */ +typedef enum { + RSVG_ERROR_FAILED +} RsvgError; + +#define RSVG_ERROR (rsvg_error_quark ()) +GQuark rsvg_error_quark (void) G_GNUC_CONST; + +typedef struct _RsvgHandle RsvgHandle; +typedef struct RsvgHandlePrivate RsvgHandlePrivate; +typedef struct _RsvgHandleClass RsvgHandleClass; +typedef struct _RsvgDimensionData RsvgDimensionData; +typedef struct _RsvgPositionData RsvgPositionData; + +/** + * RsvgHandleClass: + * @parent: parent class + * + * Class structure for #RsvgHandle. + */ +struct _RsvgHandleClass { + GObjectClass parent; + + /*< private >*/ + gpointer _abi_padding[15]; +}; + +/** + * RsvgHandle: + * @parent: parent instance + * + * Lets you load SVG data and render it. + */ +struct _RsvgHandle { + GObject parent; + + /*< private >*/ + + RsvgHandlePrivate *priv; + + gpointer _abi_padding[15]; +}; + +/** + * RsvgDimensionData: + * @width: SVG's width, in pixels + * @height: SVG's height, in pixels + * @em: em + * @ex: ex + */ +struct _RsvgDimensionData { + int width; + int height; + gdouble em; + gdouble ex; +}; + +/** + * RsvgPositionData: + * @x: position on the x axis + * @y: position on the y axis + * + * Position of an SVG fragment. + */ +struct _RsvgPositionData { + int x; + int y; +}; + +void rsvg_cleanup (void); + +void rsvg_set_default_dpi (double dpi); +void rsvg_set_default_dpi_x_y (double dpi_x, double dpi_y); + +void rsvg_handle_set_dpi (RsvgHandle * handle, double dpi); +void rsvg_handle_set_dpi_x_y (RsvgHandle * handle, double dpi_x, double dpi_y); + +RsvgHandle *rsvg_handle_new (void); +gboolean rsvg_handle_write (RsvgHandle * handle, const guchar * buf, + gsize count, GError ** error); +gboolean rsvg_handle_close (RsvgHandle * handle, GError ** error); +GdkPixbuf *rsvg_handle_get_pixbuf (RsvgHandle * handle); +GdkPixbuf *rsvg_handle_get_pixbuf_sub (RsvgHandle * handle, const char *id); + +const char *rsvg_handle_get_base_uri (RsvgHandle * handle); +void rsvg_handle_set_base_uri (RsvgHandle * handle, const char *base_uri); + +void rsvg_handle_get_dimensions (RsvgHandle * handle, RsvgDimensionData * dimension_data); + +gboolean rsvg_handle_get_dimensions_sub (RsvgHandle * handle, RsvgDimensionData * dimension_data, const char *id); +gboolean rsvg_handle_get_position_sub (RsvgHandle * handle, RsvgPositionData * position_data, const char *id); + +gboolean rsvg_handle_has_sub (RsvgHandle * handle, const char *id); + +/* GIO APIs */ + +/** + * RsvgHandleFlags: + * @RSVG_HANDLE_FLAGS_NONE: none + * @RSVG_HANDLE_FLAG_UNLIMITED: Allow any SVG XML without size limitations. + * For security reasons, this should only be used for trusted input! + * Since: 2.40.3 + * @RSVG_HANDLE_FLAG_KEEP_IMAGE_DATA: Keeps the image data when loading images, + * for use by cairo when painting to e.g. a PDF surface. This will make the + * resulting PDF file smaller and faster. + * Since: 2.40.3 + */ +typedef enum /*< flags >*/ +{ + RSVG_HANDLE_FLAGS_NONE = 0, + RSVG_HANDLE_FLAG_UNLIMITED = 1 << 0, + RSVG_HANDLE_FLAG_KEEP_IMAGE_DATA = 1 << 1 +} RsvgHandleFlags; + +RsvgHandle *rsvg_handle_new_with_flags (RsvgHandleFlags flags); + +void rsvg_handle_set_base_gfile (RsvgHandle *handle, + GFile *base_file); + +gboolean rsvg_handle_read_stream_sync (RsvgHandle *handle, + GInputStream *stream, + GCancellable *cancellable, + GError **error); + +RsvgHandle *rsvg_handle_new_from_gfile_sync (GFile *file, + RsvgHandleFlags flags, + GCancellable *cancellable, + GError **error); + +RsvgHandle *rsvg_handle_new_from_stream_sync (GInputStream *input_stream, + GFile *base_file, + RsvgHandleFlags flags, + GCancellable *cancellable, + GError **error); + +RsvgHandle *rsvg_handle_new_from_data (const guint8 * data, gsize data_len, GError ** error); +RsvgHandle *rsvg_handle_new_from_file (const gchar * file_name, GError ** error); + +void rsvg_handle_internal_set_testing (RsvgHandle *handle, gboolean testing); + +/* BEGIN deprecated APIs. Do not use! */ + +#ifndef __GI_SCANNER__ + +RSVG_DEPRECATED_FOR(g_type_init) +void rsvg_init (void); +RSVG_DEPRECATED +void rsvg_term (void); + +RSVG_DEPRECATED_FOR(g_object_unref) +void rsvg_handle_free (RsvgHandle * handle); + +/** + * RsvgSizeFunc: + * @width: (out): the width of the SVG + * @height: (out): the height of the SVG + * @user_data: user data + * + * Function to let a user of the library specify the SVG's dimensions + * + * Deprecated: Set up a cairo matrix and use rsvg_handle_render_cairo() instead. + * See the documentation for rsvg_handle_set_size_callback() for an example. + */ +/* RSVG_DEPRECATED */ typedef void (*RsvgSizeFunc) (gint * width, gint * height, gpointer user_data); + +RSVG_DEPRECATED +void rsvg_handle_set_size_callback (RsvgHandle * handle, + RsvgSizeFunc size_func, + gpointer user_data, GDestroyNotify user_data_destroy); + +/* GdkPixbuf convenience API */ + +RSVG_DEPRECATED +GdkPixbuf *rsvg_pixbuf_from_file (const gchar * file_name, GError ** error); +RSVG_DEPRECATED +GdkPixbuf *rsvg_pixbuf_from_file_at_zoom (const gchar * file_name, + double x_zoom, double y_zoom, GError ** error); +RSVG_DEPRECATED +GdkPixbuf *rsvg_pixbuf_from_file_at_size (const gchar * file_name, gint width, gint height, + GError ** error); +RSVG_DEPRECATED +GdkPixbuf *rsvg_pixbuf_from_file_at_max_size (const gchar * file_name, + gint max_width, gint max_height, GError ** error); +RSVG_DEPRECATED +GdkPixbuf *rsvg_pixbuf_from_file_at_zoom_with_max (const gchar * file_name, + double x_zoom, + double y_zoom, + gint max_width, gint max_height, GError ** error); + +RSVG_DEPRECATED +const char *rsvg_handle_get_title (RsvgHandle * handle); +RSVG_DEPRECATED +const char *rsvg_handle_get_desc (RsvgHandle * handle); +RSVG_DEPRECATED +const char *rsvg_handle_get_metadata (RsvgHandle * handle); + +#endif /* !__GI_SCANNER__ */ + +/* END deprecated APIs. */ + +G_END_DECLS + +#include "librsvg-enum-types.h" +#include "librsvg-features.h" +#include "rsvg-cairo.h" + +#undef __RSVG_RSVG_H_INSIDE__ + +#endif /* RSVG_H */ diff --git a/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/lib/librsvg-2.2.dylib b/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/lib/librsvg-2.2.dylib new file mode 100755 index 00000000..b826cc4c Binary files /dev/null and b/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/lib/librsvg-2.2.dylib differ diff --git a/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/lib/librsvg-2.dylib b/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/lib/librsvg-2.dylib new file mode 120000 index 00000000..56fd079b --- /dev/null +++ b/frameworks/cairosvg/dependencies/librsvg/2.42.2_2/lib/librsvg-2.dylib @@ -0,0 +1 @@ +librsvg-2.2.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-attributes.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-attributes.h new file mode 100755 index 00000000..e9b19571 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-attributes.h @@ -0,0 +1,598 @@ +/* Pango + * pango-attributes.h: Attributed text + * + * Copyright (C) 2000 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_ATTRIBUTES_H__ +#define __PANGO_ATTRIBUTES_H__ + +#include <pango/pango-font.h> +#include <glib-object.h> + +G_BEGIN_DECLS + +/* PangoColor */ + +typedef struct _PangoColor PangoColor; + +/** + * PangoColor: + * @red: value of red component + * @green: value of green component + * @blue: value of blue component + * + * The #PangoColor structure is used to + * represent a color in an uncalibrated RGB color-space. + */ +struct _PangoColor +{ + guint16 red; + guint16 green; + guint16 blue; +}; + +/** + * PANGO_TYPE_COLOR: + * + * The #GObject type for #PangoColor. + */ +#define PANGO_TYPE_COLOR pango_color_get_type () +PANGO_AVAILABLE_IN_ALL +GType pango_color_get_type (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_ALL +PangoColor *pango_color_copy (const PangoColor *src); +PANGO_AVAILABLE_IN_ALL +void pango_color_free (PangoColor *color); +PANGO_AVAILABLE_IN_ALL +gboolean pango_color_parse (PangoColor *color, + const char *spec); +PANGO_AVAILABLE_IN_1_16 +gchar *pango_color_to_string(const PangoColor *color); + + +/* Attributes */ + +typedef struct _PangoAttribute PangoAttribute; +typedef struct _PangoAttrClass PangoAttrClass; + +typedef struct _PangoAttrString PangoAttrString; +typedef struct _PangoAttrLanguage PangoAttrLanguage; +typedef struct _PangoAttrInt PangoAttrInt; +typedef struct _PangoAttrSize PangoAttrSize; +typedef struct _PangoAttrFloat PangoAttrFloat; +typedef struct _PangoAttrColor PangoAttrColor; +typedef struct _PangoAttrFontDesc PangoAttrFontDesc; +typedef struct _PangoAttrShape PangoAttrShape; +typedef struct _PangoAttrFontFeatures PangoAttrFontFeatures; + +/** + * PANGO_TYPE_ATTR_LIST: + * + * The #GObject type for #PangoAttrList. + */ +#define PANGO_TYPE_ATTR_LIST pango_attr_list_get_type () +/** + * PangoAttrIterator: + * + * The #PangoAttrIterator structure is used to represent an + * iterator through a #PangoAttrList. A new iterator is created + * with pango_attr_list_get_iterator(). Once the iterator + * is created, it can be advanced through the style changes + * in the text using pango_attr_iterator_next(). At each + * style change, the range of the current style segment and the + * attributes currently in effect can be queried. + */ +/** + * PangoAttrList: + * + * The #PangoAttrList structure represents a list of attributes + * that apply to a section of text. The attributes are, in general, + * allowed to overlap in an arbitrary fashion, however, if the + * attributes are manipulated only through pango_attr_list_change(), + * the overlap between properties will meet stricter criteria. + * + * Since the #PangoAttrList structure is stored as a linear list, + * it is not suitable for storing attributes for large amounts + * of text. In general, you should not use a single #PangoAttrList + * for more than one paragraph of text. + */ +typedef struct _PangoAttrList PangoAttrList; +typedef struct _PangoAttrIterator PangoAttrIterator; + +/** + * PangoAttrType: + * @PANGO_ATTR_INVALID: does not happen + * @PANGO_ATTR_LANGUAGE: language (#PangoAttrLanguage) + * @PANGO_ATTR_FAMILY: font family name list (#PangoAttrString) + * @PANGO_ATTR_STYLE: font slant style (#PangoAttrInt) + * @PANGO_ATTR_WEIGHT: font weight (#PangoAttrInt) + * @PANGO_ATTR_VARIANT: font variant (normal or small caps) (#PangoAttrInt) + * @PANGO_ATTR_STRETCH: font stretch (#PangoAttrInt) + * @PANGO_ATTR_SIZE: font size in points scaled by %PANGO_SCALE (#PangoAttrInt) + * @PANGO_ATTR_FONT_DESC: font description (#PangoAttrFontDesc) + * @PANGO_ATTR_FOREGROUND: foreground color (#PangoAttrColor) + * @PANGO_ATTR_BACKGROUND: background color (#PangoAttrColor) + * @PANGO_ATTR_UNDERLINE: whether the text has an underline (#PangoAttrInt) + * @PANGO_ATTR_STRIKETHROUGH: whether the text is struck-through (#PangoAttrInt) + * @PANGO_ATTR_RISE: baseline displacement (#PangoAttrInt) + * @PANGO_ATTR_SHAPE: shape (#PangoAttrShape) + * @PANGO_ATTR_SCALE: font size scale factor (#PangoAttrFloat) + * @PANGO_ATTR_FALLBACK: whether fallback is enabled (#PangoAttrInt) + * @PANGO_ATTR_LETTER_SPACING: letter spacing (#PangoAttrInt) + * @PANGO_ATTR_UNDERLINE_COLOR: underline color (#PangoAttrColor) + * @PANGO_ATTR_STRIKETHROUGH_COLOR: strikethrough color (#PangoAttrColor) + * @PANGO_ATTR_ABSOLUTE_SIZE: font size in pixels scaled by %PANGO_SCALE (#PangoAttrInt) + * @PANGO_ATTR_GRAVITY: base text gravity (#PangoAttrInt) + * @PANGO_ATTR_GRAVITY_HINT: gravity hint (#PangoAttrInt) + * @PANGO_ATTR_FONT_FEATURES: OpenType font features (#PangoAttrString). Since 1.38 + * @PANGO_ATTR_FOREGROUND_ALPHA: foreground alpha (#PangoAttrInt). Since 1.38 + * @PANGO_ATTR_BACKGROUND_ALPHA: background alpha (#PangoAttrInt). Since 1.38 + * + * The #PangoAttrType + * distinguishes between different types of attributes. Along with the + * predefined values, it is possible to allocate additional values + * for custom attributes using pango_attr_type_register(). The predefined + * values are given below. The type of structure used to store the + * attribute is listed in parentheses after the description. + */ +typedef enum +{ + PANGO_ATTR_INVALID, /* 0 is an invalid attribute type */ + PANGO_ATTR_LANGUAGE, /* PangoAttrLanguage */ + PANGO_ATTR_FAMILY, /* PangoAttrString */ + PANGO_ATTR_STYLE, /* PangoAttrInt */ + PANGO_ATTR_WEIGHT, /* PangoAttrInt */ + PANGO_ATTR_VARIANT, /* PangoAttrInt */ + PANGO_ATTR_STRETCH, /* PangoAttrInt */ + PANGO_ATTR_SIZE, /* PangoAttrSize */ + PANGO_ATTR_FONT_DESC, /* PangoAttrFontDesc */ + PANGO_ATTR_FOREGROUND, /* PangoAttrColor */ + PANGO_ATTR_BACKGROUND, /* PangoAttrColor */ + PANGO_ATTR_UNDERLINE, /* PangoAttrInt */ + PANGO_ATTR_STRIKETHROUGH, /* PangoAttrInt */ + PANGO_ATTR_RISE, /* PangoAttrInt */ + PANGO_ATTR_SHAPE, /* PangoAttrShape */ + PANGO_ATTR_SCALE, /* PangoAttrFloat */ + PANGO_ATTR_FALLBACK, /* PangoAttrInt */ + PANGO_ATTR_LETTER_SPACING, /* PangoAttrInt */ + PANGO_ATTR_UNDERLINE_COLOR, /* PangoAttrColor */ + PANGO_ATTR_STRIKETHROUGH_COLOR,/* PangoAttrColor */ + PANGO_ATTR_ABSOLUTE_SIZE, /* PangoAttrSize */ + PANGO_ATTR_GRAVITY, /* PangoAttrInt */ + PANGO_ATTR_GRAVITY_HINT, /* PangoAttrInt */ + PANGO_ATTR_FONT_FEATURES, /* PangoAttrString */ + PANGO_ATTR_FOREGROUND_ALPHA, /* PangoAttrInt */ + PANGO_ATTR_BACKGROUND_ALPHA /* PangoAttrInt */ +} PangoAttrType; + +/** + * PangoUnderline: + * @PANGO_UNDERLINE_NONE: no underline should be drawn + * @PANGO_UNDERLINE_SINGLE: a single underline should be drawn + * @PANGO_UNDERLINE_DOUBLE: a double underline should be drawn + * @PANGO_UNDERLINE_LOW: a single underline should be drawn at a position + * beneath the ink extents of the text being + * underlined. This should be used only for underlining + * single characters, such as for keyboard + * accelerators. %PANGO_UNDERLINE_SINGLE should + * be used for extended portions of text. + * @PANGO_UNDERLINE_ERROR: a wavy underline should be drawn below. + * This underline is typically used to indicate + * an error such as a possilble mispelling; in some + * cases a contrasting color may automatically + * be used. This type of underlining is available since Pango 1.4. + * + * The #PangoUnderline enumeration is used to specify + * whether text should be underlined, and if so, the type + * of underlining. + */ +typedef enum { + PANGO_UNDERLINE_NONE, + PANGO_UNDERLINE_SINGLE, + PANGO_UNDERLINE_DOUBLE, + PANGO_UNDERLINE_LOW, + PANGO_UNDERLINE_ERROR +} PangoUnderline; + +/** + * PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING: + * + * This value can be used to set the start_index member of a #PangoAttribute + * such that the attribute covers from the beginning of the text. + * + * Since: 1.24 + */ +/** + * PANGO_ATTR_INDEX_TO_TEXT_END: + * + * This value can be used to set the end_index member of a #PangoAttribute + * such that the attribute covers to the end of the text. + * + * Since: 1.24 + */ +#define PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING 0 +#define PANGO_ATTR_INDEX_TO_TEXT_END G_MAXUINT + +/** + * PangoAttribute: + * @klass: the class structure holding information about the type of the attribute + * @start_index: the start index of the range (in bytes). + * @end_index: end index of the range (in bytes). The character at this index + * is not included in the range. + * + * The #PangoAttribute structure represents the common portions of all + * attributes. Particular types of attributes include this structure + * as their initial portion. The common portion of the attribute holds + * the range to which the value in the type-specific part of the attribute + * applies and should be initialized using pango_attribute_init(). + * By default an attribute will have an all-inclusive range of [0,%G_MAXUINT]. + */ +struct _PangoAttribute +{ + const PangoAttrClass *klass; + guint start_index; /* in bytes */ + guint end_index; /* in bytes. The character at this index is not included */ +}; + +/** + * PangoAttrFilterFunc: + * @attribute: a Pango attribute + * @user_data: user data passed to the function + * + * Type of a function filtering a list of attributes. + * + * Return value: %TRUE if the attribute should be selected for + * filtering, %FALSE otherwise. + **/ +typedef gboolean (*PangoAttrFilterFunc) (PangoAttribute *attribute, + gpointer user_data); + +/** + * PangoAttrDataCopyFunc: + * @user_data: user data to copy + * + * Type of a function that can duplicate user data for an attribute. + * + * Return value: new copy of @user_data. + **/ +typedef gpointer (*PangoAttrDataCopyFunc) (gconstpointer user_data); + +/** + * PangoAttrClass: + * @type: the type ID for this attribute + * @copy: function to duplicate an attribute of this type (see pango_attribute_copy()) + * @destroy: function to free an attribute of this type (see pango_attribute_destroy()) + * @equal: function to check two attributes of this type for equality (see pango_attribute_equal()) + * + * The #PangoAttrClass structure stores the type and operations for + * a particular type of attribute. The functions in this structure should + * not be called directly. Instead, one should use the wrapper functions + * provided for #PangoAttribute. + */ +struct _PangoAttrClass +{ + /*< public >*/ + PangoAttrType type; + PangoAttribute * (*copy) (const PangoAttribute *attr); + void (*destroy) (PangoAttribute *attr); + gboolean (*equal) (const PangoAttribute *attr1, const PangoAttribute *attr2); +}; + +/** + * PangoAttrString: + * @attr: the common portion of the attribute + * @value: the string which is the value of the attribute + * + * The #PangoAttrString structure is used to represent attributes with + * a string value. + */ +struct _PangoAttrString +{ + PangoAttribute attr; + char *value; +}; +/** + * PangoAttrLanguage: + * @attr: the common portion of the attribute + * @value: the #PangoLanguage which is the value of the attribute + * + * The #PangoAttrLanguage structure is used to represent attributes that + * are languages. + */ +struct _PangoAttrLanguage +{ + PangoAttribute attr; + PangoLanguage *value; +}; +/** + * PangoAttrInt: + * @attr: the common portion of the attribute + * @value: the value of the attribute + * + * The #PangoAttrInt structure is used to represent attributes with + * an integer or enumeration value. + */ +struct _PangoAttrInt +{ + PangoAttribute attr; + int value; +}; +/** + * PangoAttrFloat: + * @attr: the common portion of the attribute + * @value: the value of the attribute + * + * The #PangoAttrFloat structure is used to represent attributes with + * a float or double value. + */ +struct _PangoAttrFloat +{ + PangoAttribute attr; + double value; +}; +/** + * PangoAttrColor: + * @attr: the common portion of the attribute + * @color: the #PangoColor which is the value of the attribute + * + * The #PangoAttrColor structure is used to represent attributes that + * are colors. + */ +struct _PangoAttrColor +{ + PangoAttribute attr; + PangoColor color; +}; + +/** + * PangoAttrSize: + * @attr: the common portion of the attribute + * @size: size of font, in units of 1/%PANGO_SCALE of a point (for + * %PANGO_ATTR_SIZE) or of a device uni (for %PANGO_ATTR_ABSOLUTE_SIZE) + * @absolute: whether the font size is in device units or points. + * This field is only present for compatibility with Pango-1.8.0 + * (%PANGO_ATTR_ABSOLUTE_SIZE was added in 1.8.1); and always will + * be %FALSE for %PANGO_ATTR_SIZE and %TRUE for %PANGO_ATTR_ABSOLUTE_SIZE. + * + * The #PangoAttrSize structure is used to represent attributes which + * set font size. + */ +struct _PangoAttrSize +{ + PangoAttribute attr; + int size; + guint absolute : 1; +}; + +/** + * PangoAttrShape: + * @attr: the common portion of the attribute + * @ink_rect: the ink rectangle to restrict to + * @logical_rect: the logical rectangle to restrict to + * @data: user data set (see pango_attr_shape_new_with_data()) + * @copy_func: copy function for the user data + * @destroy_func: destroy function for the user data + * + * The #PangoAttrShape structure is used to represent attributes which + * impose shape restrictions. + */ +struct _PangoAttrShape +{ + PangoAttribute attr; + PangoRectangle ink_rect; + PangoRectangle logical_rect; + + gpointer data; + PangoAttrDataCopyFunc copy_func; + GDestroyNotify destroy_func; +}; + +/** + * PangoAttrFontDesc: + * @attr: the common portion of the attribute + * @desc: the font description which is the value of this attribute + * + * The #PangoAttrFontDesc structure is used to store an attribute that + * sets all aspects of the font description at once. + */ +struct _PangoAttrFontDesc +{ + PangoAttribute attr; + PangoFontDescription *desc; +}; + +/** + * PangoAttrFontFeatures: + * @attr: the common portion of the attribute + * @features: the featues, as a string in CSS syntax + * + * The #PangoAttrFontFeatures structure is used to represent OpenType + * font features as an attribute. + * + * Since: 1.38 + */ +struct _PangoAttrFontFeatures +{ + PangoAttribute attr; + gchar *features; +}; + +PANGO_AVAILABLE_IN_ALL +PangoAttrType pango_attr_type_register (const gchar *name); +PANGO_AVAILABLE_IN_1_22 +const char * pango_attr_type_get_name (PangoAttrType type) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_1_20 +void pango_attribute_init (PangoAttribute *attr, + const PangoAttrClass *klass); +PANGO_AVAILABLE_IN_ALL +PangoAttribute * pango_attribute_copy (const PangoAttribute *attr); +PANGO_AVAILABLE_IN_ALL +void pango_attribute_destroy (PangoAttribute *attr); +PANGO_AVAILABLE_IN_ALL +gboolean pango_attribute_equal (const PangoAttribute *attr1, + const PangoAttribute *attr2) G_GNUC_PURE; + +PANGO_AVAILABLE_IN_ALL +PangoAttribute *pango_attr_language_new (PangoLanguage *language); +PANGO_AVAILABLE_IN_ALL +PangoAttribute *pango_attr_family_new (const char *family); +PANGO_AVAILABLE_IN_ALL +PangoAttribute *pango_attr_foreground_new (guint16 red, + guint16 green, + guint16 blue); +PANGO_AVAILABLE_IN_ALL +PangoAttribute *pango_attr_background_new (guint16 red, + guint16 green, + guint16 blue); +PANGO_AVAILABLE_IN_ALL +PangoAttribute *pango_attr_size_new (int size); +PANGO_AVAILABLE_IN_1_8 +PangoAttribute *pango_attr_size_new_absolute (int size); +PANGO_AVAILABLE_IN_ALL +PangoAttribute *pango_attr_style_new (PangoStyle style); +PANGO_AVAILABLE_IN_ALL +PangoAttribute *pango_attr_weight_new (PangoWeight weight); +PANGO_AVAILABLE_IN_ALL +PangoAttribute *pango_attr_variant_new (PangoVariant variant); +PANGO_AVAILABLE_IN_ALL +PangoAttribute *pango_attr_stretch_new (PangoStretch stretch); +PANGO_AVAILABLE_IN_ALL +PangoAttribute *pango_attr_font_desc_new (const PangoFontDescription *desc); + +PANGO_AVAILABLE_IN_ALL +PangoAttribute *pango_attr_underline_new (PangoUnderline underline); +PANGO_AVAILABLE_IN_1_8 +PangoAttribute *pango_attr_underline_color_new (guint16 red, + guint16 green, + guint16 blue); +PANGO_AVAILABLE_IN_ALL +PangoAttribute *pango_attr_strikethrough_new (gboolean strikethrough); +PANGO_AVAILABLE_IN_1_8 +PangoAttribute *pango_attr_strikethrough_color_new (guint16 red, + guint16 green, + guint16 blue); + +PANGO_AVAILABLE_IN_ALL +PangoAttribute *pango_attr_rise_new (int rise); +PANGO_AVAILABLE_IN_ALL +PangoAttribute *pango_attr_scale_new (double scale_factor); +PANGO_AVAILABLE_IN_1_4 +PangoAttribute *pango_attr_fallback_new (gboolean enable_fallback); +PANGO_AVAILABLE_IN_1_6 +PangoAttribute *pango_attr_letter_spacing_new (int letter_spacing); + +PANGO_AVAILABLE_IN_ALL +PangoAttribute *pango_attr_shape_new (const PangoRectangle *ink_rect, + const PangoRectangle *logical_rect); +PANGO_AVAILABLE_IN_1_8 +PangoAttribute *pango_attr_shape_new_with_data (const PangoRectangle *ink_rect, + const PangoRectangle *logical_rect, + gpointer data, + PangoAttrDataCopyFunc copy_func, + GDestroyNotify destroy_func); + +PANGO_AVAILABLE_IN_1_16 +PangoAttribute *pango_attr_gravity_new (PangoGravity gravity); +PANGO_AVAILABLE_IN_1_16 +PangoAttribute *pango_attr_gravity_hint_new (PangoGravityHint hint); +PANGO_AVAILABLE_IN_1_38 +PangoAttribute *pango_attr_font_features_new (const gchar *features); +PANGO_AVAILABLE_IN_1_38 +PangoAttribute *pango_attr_foreground_alpha_new (guint16 alpha); +PANGO_AVAILABLE_IN_1_38 +PangoAttribute *pango_attr_background_alpha_new (guint16 alpha); + +PANGO_AVAILABLE_IN_ALL +GType pango_attr_list_get_type (void) G_GNUC_CONST; +PANGO_AVAILABLE_IN_ALL +PangoAttrList * pango_attr_list_new (void); +PANGO_AVAILABLE_IN_1_10 +PangoAttrList * pango_attr_list_ref (PangoAttrList *list); +PANGO_AVAILABLE_IN_ALL +void pango_attr_list_unref (PangoAttrList *list); +PANGO_AVAILABLE_IN_ALL +PangoAttrList * pango_attr_list_copy (PangoAttrList *list); +PANGO_AVAILABLE_IN_ALL +void pango_attr_list_insert (PangoAttrList *list, + PangoAttribute *attr); +PANGO_AVAILABLE_IN_ALL +void pango_attr_list_insert_before (PangoAttrList *list, + PangoAttribute *attr); +PANGO_AVAILABLE_IN_ALL +void pango_attr_list_change (PangoAttrList *list, + PangoAttribute *attr); +PANGO_AVAILABLE_IN_ALL +void pango_attr_list_splice (PangoAttrList *list, + PangoAttrList *other, + gint pos, + gint len); + +PANGO_AVAILABLE_IN_1_2 +PangoAttrList *pango_attr_list_filter (PangoAttrList *list, + PangoAttrFilterFunc func, + gpointer data); + +PANGO_AVAILABLE_IN_ALL +PangoAttrIterator *pango_attr_list_get_iterator (PangoAttrList *list); + +PANGO_AVAILABLE_IN_ALL +void pango_attr_iterator_range (PangoAttrIterator *iterator, + gint *start, + gint *end); +PANGO_AVAILABLE_IN_ALL +gboolean pango_attr_iterator_next (PangoAttrIterator *iterator); +PANGO_AVAILABLE_IN_ALL +PangoAttrIterator *pango_attr_iterator_copy (PangoAttrIterator *iterator); +PANGO_AVAILABLE_IN_ALL +void pango_attr_iterator_destroy (PangoAttrIterator *iterator); +PANGO_AVAILABLE_IN_ALL +PangoAttribute * pango_attr_iterator_get (PangoAttrIterator *iterator, + PangoAttrType type); +PANGO_AVAILABLE_IN_ALL +void pango_attr_iterator_get_font (PangoAttrIterator *iterator, + PangoFontDescription *desc, + PangoLanguage **language, + GSList **extra_attrs); +PANGO_AVAILABLE_IN_1_2 +GSList * pango_attr_iterator_get_attrs (PangoAttrIterator *iterator); + + +PANGO_AVAILABLE_IN_ALL +gboolean pango_parse_markup (const char *markup_text, + int length, + gunichar accel_marker, + PangoAttrList **attr_list, + char **text, + gunichar *accel_char, + GError **error); + +PANGO_AVAILABLE_IN_1_32 +GMarkupParseContext * pango_markup_parser_new (gunichar accel_marker); +PANGO_AVAILABLE_IN_1_32 +gboolean pango_markup_parser_finish (GMarkupParseContext *context, + PangoAttrList **attr_list, + char **text, + gunichar *accel_char, + GError **error); + +G_END_DECLS + +#endif /* __PANGO_ATTRIBUTES_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-bidi-type.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-bidi-type.h new file mode 100755 index 00000000..db0c1e0a --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-bidi-type.h @@ -0,0 +1,140 @@ +/* Pango + * pango-bidi-type.h: Bidirectional Character Types + * + * Copyright (C) 2008 JĂ¼rg Billeter <j@bitron.ch> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_BIDI_TYPE_H__ +#define __PANGO_BIDI_TYPE_H__ + +#include <glib.h> + +#include <pango/pango-version-macros.h> +G_BEGIN_DECLS + +/** + * PangoBidiType: + * @PANGO_BIDI_TYPE_L: Left-to-Right + * @PANGO_BIDI_TYPE_LRE: Left-to-Right Embedding + * @PANGO_BIDI_TYPE_LRO: Left-to-Right Override + * @PANGO_BIDI_TYPE_R: Right-to-Left + * @PANGO_BIDI_TYPE_AL: Right-to-Left Arabic + * @PANGO_BIDI_TYPE_RLE: Right-to-Left Embedding + * @PANGO_BIDI_TYPE_RLO: Right-to-Left Override + * @PANGO_BIDI_TYPE_PDF: Pop Directional Format + * @PANGO_BIDI_TYPE_EN: European Number + * @PANGO_BIDI_TYPE_ES: European Number Separator + * @PANGO_BIDI_TYPE_ET: European Number Terminator + * @PANGO_BIDI_TYPE_AN: Arabic Number + * @PANGO_BIDI_TYPE_CS: Common Number Separator + * @PANGO_BIDI_TYPE_NSM: Nonspacing Mark + * @PANGO_BIDI_TYPE_BN: Boundary Neutral + * @PANGO_BIDI_TYPE_B: Paragraph Separator + * @PANGO_BIDI_TYPE_S: Segment Separator + * @PANGO_BIDI_TYPE_WS: Whitespace + * @PANGO_BIDI_TYPE_ON: Other Neutrals + * + * The #PangoBidiType type represents the bidirectional character + * type of a Unicode character as specified by the + * <ulink url="http://www.unicode.org/reports/tr9/">Unicode bidirectional algorithm</ulink>. + * + * Since: 1.22 + **/ +typedef enum { + /* Strong types */ + PANGO_BIDI_TYPE_L, + PANGO_BIDI_TYPE_LRE, + PANGO_BIDI_TYPE_LRO, + PANGO_BIDI_TYPE_R, + PANGO_BIDI_TYPE_AL, + PANGO_BIDI_TYPE_RLE, + PANGO_BIDI_TYPE_RLO, + + /* Weak types */ + PANGO_BIDI_TYPE_PDF, + PANGO_BIDI_TYPE_EN, + PANGO_BIDI_TYPE_ES, + PANGO_BIDI_TYPE_ET, + PANGO_BIDI_TYPE_AN, + PANGO_BIDI_TYPE_CS, + PANGO_BIDI_TYPE_NSM, + PANGO_BIDI_TYPE_BN, + + /* Neutral types */ + PANGO_BIDI_TYPE_B, + PANGO_BIDI_TYPE_S, + PANGO_BIDI_TYPE_WS, + PANGO_BIDI_TYPE_ON +} PangoBidiType; + +PANGO_AVAILABLE_IN_1_22 +PangoBidiType pango_bidi_type_for_unichar (gunichar ch) G_GNUC_CONST; + +/** + * PangoDirection: + * @PANGO_DIRECTION_LTR: A strong left-to-right direction + * @PANGO_DIRECTION_RTL: A strong right-to-left direction + * @PANGO_DIRECTION_TTB_LTR: Deprecated value; treated the + * same as %PANGO_DIRECTION_RTL. + * @PANGO_DIRECTION_TTB_RTL: Deprecated value; treated the + * same as %PANGO_DIRECTION_LTR + * @PANGO_DIRECTION_WEAK_LTR: A weak left-to-right direction + * @PANGO_DIRECTION_WEAK_RTL: A weak right-to-left direction + * @PANGO_DIRECTION_NEUTRAL: No direction specified + * + * The #PangoDirection type represents a direction in the + * Unicode bidirectional algorithm; not every value in this + * enumeration makes sense for every usage of #PangoDirection; + * for example, the return value of pango_unichar_direction() + * and pango_find_base_dir() cannot be %PANGO_DIRECTION_WEAK_LTR + * or %PANGO_DIRECTION_WEAK_RTL, since every character is either + * neutral or has a strong direction; on the other hand + * %PANGO_DIRECTION_NEUTRAL doesn't make sense to pass + * to pango_itemize_with_base_dir(). + * + * The %PANGO_DIRECTION_TTB_LTR, %PANGO_DIRECTION_TTB_RTL + * values come from an earlier interpretation of this + * enumeration as the writing direction of a block of + * text and are no longer used; See #PangoGravity for how + * vertical text is handled in Pango. + **/ +typedef enum { + PANGO_DIRECTION_LTR, + PANGO_DIRECTION_RTL, + PANGO_DIRECTION_TTB_LTR, + PANGO_DIRECTION_TTB_RTL, + PANGO_DIRECTION_WEAK_LTR, + PANGO_DIRECTION_WEAK_RTL, + PANGO_DIRECTION_NEUTRAL +} PangoDirection; + +PANGO_AVAILABLE_IN_ALL +PangoDirection pango_unichar_direction (gunichar ch) G_GNUC_CONST; +PANGO_AVAILABLE_IN_1_4 +PangoDirection pango_find_base_dir (const gchar *text, + gint length); + +#ifndef PANGO_DISABLE_DEPRECATED +PANGO_DEPRECATED_FOR(g_unichar_get_mirror_char) +gboolean pango_get_mirror_char (gunichar ch, + gunichar *mirrored_ch); +#endif + +G_END_DECLS + +#endif /* __PANGO_BIDI_TYPE_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-break.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-break.h new file mode 100755 index 00000000..4c2cec8e --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-break.h @@ -0,0 +1,177 @@ +/* Pango + * pango-break.h: + * + * Copyright (C) 1999 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_BREAK_H__ +#define __PANGO_BREAK_H__ + +#include <glib.h> + +G_BEGIN_DECLS + +#include <pango/pango-item.h> + +/* Logical attributes of a character. + */ +/** + * PangoLogAttr: + * @is_line_break: if set, can break line in front of character + * @is_mandatory_break: if set, must break line in front of character + * @is_char_break: if set, can break here when doing character wrapping + * @is_white: is whitespace character + * @is_cursor_position: if set, cursor can appear in front of character. + * i.e. this is a grapheme boundary, or the first character + * in the text. + * This flag implements Unicode's + * <ulink url="http://www.unicode.org/reports/tr29/">Grapheme + * Cluster Boundaries</ulink> semantics. + * @is_word_start: is first character in a word + * @is_word_end: is first non-word char after a word + * Note that in degenerate cases, you could have both @is_word_start + * and @is_word_end set for some character. + * @is_sentence_boundary: is a sentence boundary. + * There are two ways to divide sentences. The first assigns all + * inter-sentence whitespace/control/format chars to some sentence, + * so all chars are in some sentence; @is_sentence_boundary denotes + * the boundaries there. The second way doesn't assign + * between-sentence spaces, etc. to any sentence, so + * @is_sentence_start/@is_sentence_end mark the boundaries of those sentences. + * @is_sentence_start: is first character in a sentence + * @is_sentence_end: is first char after a sentence. + * Note that in degenerate cases, you could have both @is_sentence_start + * and @is_sentence_end set for some character. (e.g. no space after a + * period, so the next sentence starts right away) + * @backspace_deletes_character: if set, backspace deletes one character + * rather than the entire grapheme cluster. This + * field is only meaningful on grapheme + * boundaries (where @is_cursor_position is + * set). In some languages, the full grapheme + * (e.g. letter + diacritics) is considered a + * unit, while in others, each decomposed + * character in the grapheme is a unit. In the + * default implementation of pango_break(), this + * bit is set on all grapheme boundaries except + * those following Latin, Cyrillic or Greek base characters. + * @is_expandable_space: is a whitespace character that can possibly be + * expanded for justification purposes. (Since: 1.18) + * @is_word_boundary: is a word boundary. + * More specifically, means that this is not a position in the middle + * of a word. For example, both sides of a punctuation mark are + * considered word boundaries. This flag is particularly useful when + * selecting text word-by-word. + * This flag implements Unicode's + * <ulink url="http://www.unicode.org/reports/tr29/">Word + * Boundaries</ulink> semantics. (Since: 1.22) + * + * The #PangoLogAttr structure stores information + * about the attributes of a single character. + */ +struct _PangoLogAttr +{ + guint is_line_break : 1; /* Can break line in front of character */ + + guint is_mandatory_break : 1; /* Must break line in front of character */ + + guint is_char_break : 1; /* Can break here when doing char wrap */ + + guint is_white : 1; /* Whitespace character */ + + /* Cursor can appear in front of character (i.e. this is a grapheme + * boundary, or the first character in the text). + */ + guint is_cursor_position : 1; + + /* Note that in degenerate cases, you could have both start/end set on + * some text, most likely for sentences (e.g. no space after a period, so + * the next sentence starts right away). + */ + + guint is_word_start : 1; /* first character in a word */ + guint is_word_end : 1; /* is first non-word char after a word */ + + /* There are two ways to divide sentences. The first assigns all + * intersentence whitespace/control/format chars to some sentence, + * so all chars are in some sentence; is_sentence_boundary denotes + * the boundaries there. The second way doesn't assign + * between-sentence spaces, etc. to any sentence, so + * is_sentence_start/is_sentence_end mark the boundaries of those + * sentences. + */ + guint is_sentence_boundary : 1; + guint is_sentence_start : 1; /* first character in a sentence */ + guint is_sentence_end : 1; /* first non-sentence char after a sentence */ + + /* If set, backspace deletes one character rather than + * the entire grapheme cluster. + */ + guint backspace_deletes_character : 1; + + /* Only few space variants (U+0020 and U+00A0) have variable + * width during justification. + */ + guint is_expandable_space : 1; + + /* Word boundary as defined by UAX#29 */ + guint is_word_boundary : 1; /* is NOT in the middle of a word */ +}; + +/* Determine information about cluster/word/line breaks in a string + * of Unicode text. + */ +PANGO_AVAILABLE_IN_ALL +void pango_break (const gchar *text, + int length, + PangoAnalysis *analysis, + PangoLogAttr *attrs, + int attrs_len); + +PANGO_AVAILABLE_IN_ALL +void pango_find_paragraph_boundary (const gchar *text, + gint length, + gint *paragraph_delimiter_index, + gint *next_paragraph_start); + +PANGO_AVAILABLE_IN_ALL +void pango_get_log_attrs (const char *text, + int length, + int level, + PangoLanguage *language, + PangoLogAttr *log_attrs, + int attrs_len); + +#ifdef PANGO_ENABLE_ENGINE + +/* This is the default break algorithm, used if no language + * engine overrides it. Normally you should use pango_break() + * instead; this function is mostly useful for chaining up + * from a language engine override. + */ +PANGO_AVAILABLE_IN_ALL +void pango_default_break (const gchar *text, + int length, + PangoAnalysis *analysis, + PangoLogAttr *attrs, + int attrs_len); + +#endif /* PANGO_ENABLE_ENGINE */ + +G_END_DECLS + +#endif /* __PANGO_BREAK_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-context.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-context.h new file mode 100755 index 00000000..439d0995 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-context.h @@ -0,0 +1,137 @@ +/* Pango + * pango-context.h: Rendering contexts + * + * Copyright (C) 2000 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_CONTEXT_H__ +#define __PANGO_CONTEXT_H__ + +#include <pango/pango-font.h> +#include <pango/pango-fontmap.h> +#include <pango/pango-attributes.h> + +G_BEGIN_DECLS + +/* Sort of like a GC - application set information about how + * to handle scripts + */ + +/* PangoContext typedefed in pango-fontmap.h */ +typedef struct _PangoContextClass PangoContextClass; + +#define PANGO_TYPE_CONTEXT (pango_context_get_type ()) +#define PANGO_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CONTEXT, PangoContext)) +#define PANGO_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_CONTEXT, PangoContextClass)) +#define PANGO_IS_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CONTEXT)) +#define PANGO_IS_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_CONTEXT)) +#define PANGO_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_CONTEXT, PangoContextClass)) + + +/* The PangoContext and PangoContextClass structs are private; if you + * need to create a subclass of these, file a bug. + */ + +PANGO_AVAILABLE_IN_ALL +GType pango_context_get_type (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_ALL +PangoContext *pango_context_new (void); +PANGO_AVAILABLE_IN_1_32 +void pango_context_changed (PangoContext *context); +PANGO_AVAILABLE_IN_ALL +void pango_context_set_font_map (PangoContext *context, + PangoFontMap *font_map); +PANGO_AVAILABLE_IN_1_6 +PangoFontMap *pango_context_get_font_map (PangoContext *context); +PANGO_AVAILABLE_IN_1_32 +guint pango_context_get_serial (PangoContext *context); +PANGO_AVAILABLE_IN_ALL +void pango_context_list_families (PangoContext *context, + PangoFontFamily ***families, + int *n_families); +PANGO_AVAILABLE_IN_ALL +PangoFont * pango_context_load_font (PangoContext *context, + const PangoFontDescription *desc); +PANGO_AVAILABLE_IN_ALL +PangoFontset *pango_context_load_fontset (PangoContext *context, + const PangoFontDescription *desc, + PangoLanguage *language); + +PANGO_AVAILABLE_IN_ALL +PangoFontMetrics *pango_context_get_metrics (PangoContext *context, + const PangoFontDescription *desc, + PangoLanguage *language); + +PANGO_AVAILABLE_IN_ALL +void pango_context_set_font_description (PangoContext *context, + const PangoFontDescription *desc); +PANGO_AVAILABLE_IN_ALL +PangoFontDescription * pango_context_get_font_description (PangoContext *context); +PANGO_AVAILABLE_IN_ALL +PangoLanguage *pango_context_get_language (PangoContext *context); +PANGO_AVAILABLE_IN_ALL +void pango_context_set_language (PangoContext *context, + PangoLanguage *language); +PANGO_AVAILABLE_IN_ALL +void pango_context_set_base_dir (PangoContext *context, + PangoDirection direction); +PANGO_AVAILABLE_IN_ALL +PangoDirection pango_context_get_base_dir (PangoContext *context); +PANGO_AVAILABLE_IN_1_16 +void pango_context_set_base_gravity (PangoContext *context, + PangoGravity gravity); +PANGO_AVAILABLE_IN_1_16 +PangoGravity pango_context_get_base_gravity (PangoContext *context); +PANGO_AVAILABLE_IN_1_16 +PangoGravity pango_context_get_gravity (PangoContext *context); +PANGO_AVAILABLE_IN_1_16 +void pango_context_set_gravity_hint (PangoContext *context, + PangoGravityHint hint); +PANGO_AVAILABLE_IN_1_16 +PangoGravityHint pango_context_get_gravity_hint (PangoContext *context); + +PANGO_AVAILABLE_IN_1_6 +void pango_context_set_matrix (PangoContext *context, + const PangoMatrix *matrix); +PANGO_AVAILABLE_IN_1_6 +const PangoMatrix * pango_context_get_matrix (PangoContext *context); + +/* Break a string of Unicode characters into segments with + * consistent shaping/language engine and bidrectional level. + * Returns a #GList of #PangoItem's + */ +PANGO_AVAILABLE_IN_ALL +GList *pango_itemize (PangoContext *context, + const char *text, + int start_index, + int length, + PangoAttrList *attrs, + PangoAttrIterator *cached_iter); +PANGO_AVAILABLE_IN_1_4 +GList *pango_itemize_with_base_dir (PangoContext *context, + PangoDirection base_dir, + const char *text, + int start_index, + int length, + PangoAttrList *attrs, + PangoAttrIterator *cached_iter); + +G_END_DECLS + +#endif /* __PANGO_CONTEXT_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-coverage.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-coverage.h new file mode 100755 index 00000000..b83d5108 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-coverage.h @@ -0,0 +1,90 @@ +/* Pango + * pango-coverage.h: Coverage sets for fonts + * + * Copyright (C) 2000 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_COVERAGE_H__ +#define __PANGO_COVERAGE_H__ + +#include <glib.h> + +#include <pango/pango-version-macros.h> + +G_BEGIN_DECLS + +/** + * PangoCoverage: + * + * The #PangoCoverage structure represents a map from Unicode characters + * to #PangoCoverageLevel. It is an opaque structure with no public fields. + */ +typedef struct _PangoCoverage PangoCoverage; + +/** + * PangoCoverageLevel: + * @PANGO_COVERAGE_NONE: The character is not representable with the font. + * @PANGO_COVERAGE_FALLBACK: The character is represented in a way that may be + * comprehensible but is not the correct graphical form. + * For instance, a Hangul character represented as a + * a sequence of Jamos, or a Latin transliteration of a Cyrillic word. + * @PANGO_COVERAGE_APPROXIMATE: The character is represented as basically the correct + * graphical form, but with a stylistic variant inappropriate for + * the current script. + * @PANGO_COVERAGE_EXACT: The character is represented as the correct graphical form. + * + * Used to indicate how well a font can represent a particular Unicode + * character point for a particular script. + */ +typedef enum { + PANGO_COVERAGE_NONE, + PANGO_COVERAGE_FALLBACK, + PANGO_COVERAGE_APPROXIMATE, + PANGO_COVERAGE_EXACT +} PangoCoverageLevel; + +PANGO_AVAILABLE_IN_ALL +PangoCoverage * pango_coverage_new (void); +PANGO_AVAILABLE_IN_ALL +PangoCoverage * pango_coverage_ref (PangoCoverage *coverage); +PANGO_AVAILABLE_IN_ALL +void pango_coverage_unref (PangoCoverage *coverage); +PANGO_AVAILABLE_IN_ALL +PangoCoverage * pango_coverage_copy (PangoCoverage *coverage); +PANGO_AVAILABLE_IN_ALL +PangoCoverageLevel pango_coverage_get (PangoCoverage *coverage, + int index_); +PANGO_AVAILABLE_IN_ALL +void pango_coverage_set (PangoCoverage *coverage, + int index_, + PangoCoverageLevel level); +PANGO_AVAILABLE_IN_ALL +void pango_coverage_max (PangoCoverage *coverage, + PangoCoverage *other); + +PANGO_AVAILABLE_IN_ALL +void pango_coverage_to_bytes (PangoCoverage *coverage, + guchar **bytes, + int *n_bytes); +PANGO_AVAILABLE_IN_ALL +PangoCoverage *pango_coverage_from_bytes (guchar *bytes, + int n_bytes); + +G_END_DECLS + +#endif /* __PANGO_COVERAGE_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-engine.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-engine.h new file mode 100755 index 00000000..a5c92d88 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-engine.h @@ -0,0 +1,451 @@ +/* Pango + * pango-engine.h: Engines for script and language specific processing + * + * Copyright (C) 2000,2003 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_ENGINE_H__ +#define __PANGO_ENGINE_H__ + +#include <pango/pango-types.h> +#include <pango/pango-item.h> +#include <pango/pango-font.h> +#include <pango/pango-glyph.h> +#include <pango/pango-script.h> + +G_BEGIN_DECLS + +#ifdef PANGO_ENABLE_ENGINE + +/** + * PANGO_RENDER_TYPE_NONE: + * + * A string constant defining the render type + * for engines that are not rendering-system specific. + * + * Deprecated: 1.38 + */ +#define PANGO_RENDER_TYPE_NONE "PangoRenderNone" + +#define PANGO_TYPE_ENGINE (pango_engine_get_type ()) +#define PANGO_ENGINE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_ENGINE, PangoEngine)) +#define PANGO_IS_ENGINE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_ENGINE)) +#define PANGO_ENGINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_ENGINE, PangoEngineClass)) +#define PANGO_IS_ENGINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_ENGINE)) +#define PANGO_ENGINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_ENGINE, PangoEngineClass)) + +typedef struct _PangoEngine PangoEngine; +typedef struct _PangoEngineClass PangoEngineClass; + +/** + * PangoEngine: + * + * #PangoEngine is the base class for all types of language and + * script specific engines. It has no functionality by itself. + * + * Deprecated: 1.38 + **/ +struct _PangoEngine +{ + /*< private >*/ + GObject parent_instance; +}; + +/** + * PangoEngineClass: + * + * Class structure for #PangoEngine + * + * Deprecated: 1.38 + **/ +struct _PangoEngineClass +{ + /*< private >*/ + GObjectClass parent_class; +}; + +PANGO_DEPRECATED_IN_1_38 +GType pango_engine_get_type (void) G_GNUC_CONST; + +/** + * PANGO_ENGINE_TYPE_LANG: + * + * A string constant defining the engine type for language engines. + * These engines derive from #PangoEngineLang. + * + * Deprecated: 1.38 + */ +#define PANGO_ENGINE_TYPE_LANG "PangoEngineLang" + +#define PANGO_TYPE_ENGINE_LANG (pango_engine_lang_get_type ()) +#define PANGO_ENGINE_LANG(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_ENGINE_LANG, PangoEngineLang)) +#define PANGO_IS_ENGINE_LANG(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_ENGINE_LANG)) +#define PANGO_ENGINE_LANG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_ENGINE_LANG, PangoEngineLangClass)) +#define PANGO_IS_ENGINE_LANG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_ENGINE_LANG)) +#define PANGO_ENGINE_LANG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_ENGINE_LANG, PangoEngineLangClass)) + +typedef struct _PangoEngineLangClass PangoEngineLangClass; + +/** + * PangoEngineLang: + * + * The #PangoEngineLang class is implemented by engines that + * customize the rendering-system independent part of the + * Pango pipeline for a particular script or language. For + * instance, a custom #PangoEngineLang could be provided for + * Thai to implement the dictionary-based word boundary + * lookups needed for that language. + * + * Deprecated: 1.38 + **/ +struct _PangoEngineLang +{ + /*< private >*/ + PangoEngine parent_instance; +}; + +/** + * PangoEngineLangClass: + * @script_break: (nullable): Provides a custom implementation of + * pango_break(). If %NULL, pango_default_break() is used instead. If + * not %NULL, for Pango versions before 1.16 (module interface version + * before 1.6.0), this was called instead of pango_default_break(), + * but in newer versions, pango_default_break() is always called and + * this is called after that to allow tailoring the breaking results. + * + * Class structure for #PangoEngineLang + * + * Deprecated: 1.38 + **/ +struct _PangoEngineLangClass +{ + /*< private >*/ + PangoEngineClass parent_class; + + /*< public >*/ + void (*script_break) (PangoEngineLang *engine, + const char *text, + int len, + PangoAnalysis *analysis, + PangoLogAttr *attrs, + int attrs_len); +}; + +PANGO_DEPRECATED_IN_1_38 +GType pango_engine_lang_get_type (void) G_GNUC_CONST; + +/** + * PANGO_ENGINE_TYPE_SHAPE: + * + * A string constant defining the engine type for shaping engines. + * These engines derive from #PangoEngineShape. + * + * Deprecated: 1.38 + */ +#define PANGO_ENGINE_TYPE_SHAPE "PangoEngineShape" + +#define PANGO_TYPE_ENGINE_SHAPE (pango_engine_shape_get_type ()) +#define PANGO_ENGINE_SHAPE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_ENGINE_SHAPE, PangoEngineShape)) +#define PANGO_IS_ENGINE_SHAPE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_ENGINE_SHAPE)) +#define PANGO_ENGINE_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_ENGINE_SHAPE, PangoEngine_ShapeClass)) +#define PANGO_IS_ENGINE_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_ENGINE_SHAPE)) +#define PANGO_ENGINE_SHAPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_ENGINE_SHAPE, PangoEngineShapeClass)) + +typedef struct _PangoEngineShapeClass PangoEngineShapeClass; + +/** + * PangoEngineShape: + * + * The #PangoEngineShape class is implemented by engines that + * customize the rendering-system dependent part of the + * Pango pipeline for a particular script or language. + * A #PangoEngineShape implementation is then specific to both + * a particular rendering system or group of rendering systems + * and to a particular script. For instance, there is one + * #PangoEngineShape implementation to handle shaping Arabic + * for Fontconfig-based backends. + * + * Deprecated: 1.38 + **/ +struct _PangoEngineShape +{ + PangoEngine parent_instance; +}; + +/** + * PangoEngineShapeClass: + * @script_shape: Given a font, a piece of text, and a #PangoAnalysis + * structure, converts characters to glyphs and positions the + * resulting glyphs. The results are stored in the #PangoGlyphString + * that is passed in. (The implementation should resize it + * appropriately using pango_glyph_string_set_size()). All fields + * of the @log_clusters and @glyphs array must be filled in, with + * the exception that Pango will automatically generate + * <literal>glyphs->glyphs[i].attr.is_cluster_start</literal> + * using the @log_clusters array. Each input character must occur in one + * of the output logical clusters; + * if no rendering is desired for a character, this may involve + * inserting glyphs with the #PangoGlyph ID #PANGO_GLYPH_EMPTY, which + * is guaranteed never to render. If the shaping fails for any reason, + * the shaper should return with an empty (zero-size) glyph string. + * If the shaper has not set the size on the glyph string yet, simply + * returning signals the failure too. + * @covers: Returns the characters that this engine can cover + * with a given font for a given language. If not overridden, the default + * implementation simply returns the coverage information for the + * font itself unmodified. + * + * Class structure for #PangoEngineShape + * + * Deprecated: 1.38 + **/ +struct _PangoEngineShapeClass +{ + /*< private >*/ + PangoEngineClass parent_class; + + /*< public >*/ + void (*script_shape) (PangoEngineShape *engine, + PangoFont *font, + const char *item_text, + unsigned int item_length, + const PangoAnalysis *analysis, + PangoGlyphString *glyphs, + const char *paragraph_text, + unsigned int paragraph_length); + PangoCoverageLevel (*covers) (PangoEngineShape *engine, + PangoFont *font, + PangoLanguage *language, + gunichar wc); +}; + +PANGO_DEPRECATED_IN_1_38 +GType pango_engine_shape_get_type (void) G_GNUC_CONST; + +typedef struct _PangoEngineInfo PangoEngineInfo; +typedef struct _PangoEngineScriptInfo PangoEngineScriptInfo; + +/** + * PangoEngineScriptInfo: + * @script: a #PangoScript. The value %PANGO_SCRIPT_COMMON has + * the special meaning here of "all scripts" + * @langs: a semicolon separated list of languages that this + * engine handles for this script. This may be empty, + * in which case the engine is saying that it is a + * fallback choice for all languages for this range, + * but should not be used if another engine + * indicates that it is specific for the language for + * a given code point. An entry in this list of "*" + * indicates that this engine is specific to all + * languages for this range. + * + * The #PangoEngineScriptInfo structure contains + * information about how the shaper covers a particular script. + * + * Deprecated: 1.38 + */ +struct _PangoEngineScriptInfo +{ + PangoScript script; + const gchar *langs; +}; + +/** + * PangoEngineInfo: + * @id: a unique string ID for the engine. + * @engine_type: a string identifying the engine type. + * @render_type: a string identifying the render type. + * @scripts: array of scripts this engine supports. + * @n_scripts: number of items in @scripts. + * + * The #PangoEngineInfo structure contains information about a particular + * engine. It contains the following fields: + * + * Deprecated: 1.38 + */ +struct _PangoEngineInfo +{ + const gchar *id; + const gchar *engine_type; + const gchar *render_type; + PangoEngineScriptInfo *scripts; + gint n_scripts; +}; + +/** + * script_engine_list: (skip) + * @engines: location to store a pointer to an array of engines. + * @n_engines: location to store the number of elements in @engines. + * + * Do not use. + * + * Deprecated: 1.38 + **/ +PANGO_DEPRECATED_IN_1_38 +void script_engine_list (PangoEngineInfo **engines, + int *n_engines); + +/** + * script_engine_init: (skip) + * @module: a #GTypeModule structure used to associate any + * GObject types created in this module with the module. + * + * Do not use. + * + * Deprecated: 1.38 + **/ +PANGO_DEPRECATED_IN_1_38 +void script_engine_init (GTypeModule *module); + + +/** + * script_engine_exit: (skip) + * + * Do not use. + * + * Deprecated: 1.38 + **/ +PANGO_DEPRECATED_IN_1_38 +void script_engine_exit (void); + +/** + * script_engine_create: (skip) + * @id: the ID of an engine as reported by script_engine_list. + * + * Do not use. + * + * Deprecated: 1.38 + **/ +PANGO_DEPRECATED_IN_1_38 +PangoEngine *script_engine_create (const char *id); + +/* Utility macro used by PANGO_ENGINE_LANG_DEFINE_TYPE and + * PANGO_ENGINE_LANG_DEFINE_TYPE + */ +#define PANGO_ENGINE_DEFINE_TYPE(name, prefix, class_init, instance_init, parent_type) \ +static GType prefix ## _type; \ +static void \ +prefix ## _register_type (GTypeModule *module) \ +{ \ + const GTypeInfo object_info = \ + { \ + sizeof (name ## Class), \ + (GBaseInitFunc) NULL, \ + (GBaseFinalizeFunc) NULL, \ + (GClassInitFunc) class_init, \ + (GClassFinalizeFunc) NULL, \ + NULL, /* class_data */ \ + sizeof (name), \ + 0, /* n_prelocs */ \ + (GInstanceInitFunc) instance_init, \ + NULL /* value_table */ \ + }; \ + \ + prefix ## _type = g_type_module_register_type (module, parent_type, \ + # name, \ + &object_info, 0); \ +} + +/** + * PANGO_ENGINE_LANG_DEFINE_TYPE: + * @name: Name of the the type to register (for example:, <literal>ArabicEngineFc</literal> + * @prefix: Prefix for symbols that will be defined (for example:, <literal>arabic_engine_fc</literal> + * @class_init: (nullable): Class initialization function for the new type, or %NULL + * @instance_init: (nullable): Instance initialization function for the new type, or %NULL + * + * Outputs the necessary code for GObject type registration for a + * #PangoEngineLang class defined in a module. Two static symbols + * are defined. + * + * <programlisting> + * static GType <replaceable>prefix</replaceable>_type; + * static void <replaceable>prefix</replaceable>_register_type (GTypeModule module); + * </programlisting> + * + * The <function><replaceable>prefix</replaceable>_register_type()</function> + * function should be called in your script_engine_init() function for + * each type that your module implements, and then your script_engine_create() + * function can create instances of the object as follows: + * + * <informalexample><programlisting> + * PangoEngine *engine = g_object_new (<replaceable>prefix</replaceable>_type, NULL); + * </programlisting></informalexample> + * + * Deprecated: 1.38 + **/ +#define PANGO_ENGINE_LANG_DEFINE_TYPE(name, prefix, class_init, instance_init) \ + PANGO_ENGINE_DEFINE_TYPE (name, prefix, \ + class_init, instance_init, \ + PANGO_TYPE_ENGINE_LANG) + +/** + * PANGO_ENGINE_SHAPE_DEFINE_TYPE: + * @name: Name of the the type to register (for example:, <literal>ArabicEngineFc</literal> + * @prefix: Prefix for symbols that will be defined (for example:, <literal>arabic_engine_fc</literal> + * @class_init: (nullable): Class initialization function for the new type, or %NULL + * @instance_init: (nullable): Instance initialization function for the new type, or %NULL + * + * Outputs the necessary code for GObject type registration for a + * #PangoEngineShape class defined in a module. Two static symbols + * are defined. + * + * <programlisting> + * static GType <replaceable>prefix</replaceable>_type; + * static void <replaceable>prefix</replaceable>_register_type (GTypeModule module); + * </programlisting> + * + * The <function><replaceable>prefix</replaceable>_register_type()</function> + * function should be called in your script_engine_init() function for + * each type that your module implements, and then your script_engine_create() + * function can create instances of the object as follows: + * + * <informalexample><programlisting> + * PangoEngine *engine = g_object_new (<replaceable>prefix</replaceable>_type, NULL); + * </programlisting></informalexample> + * + * Deprecated: 1.38 + **/ +#define PANGO_ENGINE_SHAPE_DEFINE_TYPE(name, prefix, class_init, instance_init) \ + PANGO_ENGINE_DEFINE_TYPE (name, prefix, \ + class_init, instance_init, \ + PANGO_TYPE_ENGINE_SHAPE) + +/* Macro used for possibly builtin Pango modules. Not useful + * for externally build modules. If we are compiling a module standalone, + * then we name the entry points script_engine_list, etc. But if we + * are compiling it for inclusion directly in Pango, then we need them to + * to have distinct names for this module, so we prepend a prefix. + * + * The two intermediate macros are to deal with details of the C + * preprocessor; token pasting tokens must be function arguments, + * and macro substitution isn't used on function arguments that + * are used for token pasting. + */ +#ifdef PANGO_MODULE_PREFIX +#define PANGO_MODULE_ENTRY(func) _PANGO_MODULE_ENTRY2(PANGO_MODULE_PREFIX,func) +#define _PANGO_MODULE_ENTRY2(prefix,func) _PANGO_MODULE_ENTRY3(prefix,func) +#define _PANGO_MODULE_ENTRY3(prefix,func) prefix##_script_engine_##func +#else +#define PANGO_MODULE_ENTRY(func) script_engine_##func +#endif + +#endif /* PANGO_ENABLE_ENGINE */ + +G_END_DECLS + +#endif /* __PANGO_ENGINE_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-enum-types.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-enum-types.h new file mode 100755 index 00000000..c4f62266 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-enum-types.h @@ -0,0 +1,89 @@ + +/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */ + +#ifndef __PANGO_ENUM_TYPES_H__ +#define __PANGO_ENUM_TYPES_H__ + +#include <glib-object.h> + +#include <pango/pango-version-macros.h> + +G_BEGIN_DECLS + +/* enumerations from "pango-attributes.h" */ +PANGO_AVAILABLE_IN_ALL +GType pango_attr_type_get_type (void) G_GNUC_CONST; +#define PANGO_TYPE_ATTR_TYPE (pango_attr_type_get_type ()) +PANGO_AVAILABLE_IN_ALL +GType pango_underline_get_type (void) G_GNUC_CONST; +#define PANGO_TYPE_UNDERLINE (pango_underline_get_type ()) + +/* enumerations from "pango-bidi-type.h" */ +PANGO_AVAILABLE_IN_ALL +GType pango_bidi_type_get_type (void) G_GNUC_CONST; +#define PANGO_TYPE_BIDI_TYPE (pango_bidi_type_get_type ()) +PANGO_AVAILABLE_IN_ALL +GType pango_direction_get_type (void) G_GNUC_CONST; +#define PANGO_TYPE_DIRECTION (pango_direction_get_type ()) + +/* enumerations from "pango-coverage.h" */ +PANGO_AVAILABLE_IN_ALL +GType pango_coverage_level_get_type (void) G_GNUC_CONST; +#define PANGO_TYPE_COVERAGE_LEVEL (pango_coverage_level_get_type ()) + +/* enumerations from "pango-font.h" */ +PANGO_AVAILABLE_IN_ALL +GType pango_style_get_type (void) G_GNUC_CONST; +#define PANGO_TYPE_STYLE (pango_style_get_type ()) +PANGO_AVAILABLE_IN_ALL +GType pango_variant_get_type (void) G_GNUC_CONST; +#define PANGO_TYPE_VARIANT (pango_variant_get_type ()) +PANGO_AVAILABLE_IN_ALL +GType pango_weight_get_type (void) G_GNUC_CONST; +#define PANGO_TYPE_WEIGHT (pango_weight_get_type ()) +PANGO_AVAILABLE_IN_ALL +GType pango_stretch_get_type (void) G_GNUC_CONST; +#define PANGO_TYPE_STRETCH (pango_stretch_get_type ()) +PANGO_AVAILABLE_IN_ALL +GType pango_font_mask_get_type (void) G_GNUC_CONST; +#define PANGO_TYPE_FONT_MASK (pango_font_mask_get_type ()) + +/* enumerations from "pango-gravity.h" */ +PANGO_AVAILABLE_IN_ALL +GType pango_gravity_get_type (void) G_GNUC_CONST; +#define PANGO_TYPE_GRAVITY (pango_gravity_get_type ()) +PANGO_AVAILABLE_IN_ALL +GType pango_gravity_hint_get_type (void) G_GNUC_CONST; +#define PANGO_TYPE_GRAVITY_HINT (pango_gravity_hint_get_type ()) + +/* enumerations from "pango-layout.h" */ +PANGO_AVAILABLE_IN_ALL +GType pango_alignment_get_type (void) G_GNUC_CONST; +#define PANGO_TYPE_ALIGNMENT (pango_alignment_get_type ()) +PANGO_AVAILABLE_IN_ALL +GType pango_wrap_mode_get_type (void) G_GNUC_CONST; +#define PANGO_TYPE_WRAP_MODE (pango_wrap_mode_get_type ()) +PANGO_AVAILABLE_IN_ALL +GType pango_ellipsize_mode_get_type (void) G_GNUC_CONST; +#define PANGO_TYPE_ELLIPSIZE_MODE (pango_ellipsize_mode_get_type ()) + +/* enumerations from "pango-renderer.h" */ +PANGO_AVAILABLE_IN_ALL +GType pango_render_part_get_type (void) G_GNUC_CONST; +#define PANGO_TYPE_RENDER_PART (pango_render_part_get_type ()) + +/* enumerations from "pango-script.h" */ +PANGO_AVAILABLE_IN_ALL +GType pango_script_get_type (void) G_GNUC_CONST; +#define PANGO_TYPE_SCRIPT (pango_script_get_type ()) + +/* enumerations from "pango-tabs.h" */ +PANGO_AVAILABLE_IN_ALL +GType pango_tab_align_get_type (void) G_GNUC_CONST; +#define PANGO_TYPE_TAB_ALIGN (pango_tab_align_get_type ()) +G_END_DECLS + +#endif /* __PANGO_ENUM_TYPES_H__ */ + +/* Generated data ends here */ + diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-features.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-features.h new file mode 100755 index 00000000..c8b66906 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-features.h @@ -0,0 +1,12 @@ +/* Generated by configure. Do not edit */ +#ifndef PANGO_FEATURES_H +#define PANGO_FEATURES_H + +#define PANGO_VERSION_MAJOR 1 +#define PANGO_VERSION_MINOR 42 +#define PANGO_VERSION_MICRO 1 + +#define PANGO_VERSION_STRING "1.42.1" + + +#endif diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-font.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-font.h new file mode 100755 index 00000000..4af31a95 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-font.h @@ -0,0 +1,696 @@ +/* Pango + * pango-font.h: Font handling + * + * Copyright (C) 2000 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_FONT_H__ +#define __PANGO_FONT_H__ + +#include <pango/pango-coverage.h> +#include <pango/pango-types.h> + +#include <glib-object.h> + +G_BEGIN_DECLS + +/** + * PangoFontDescription: + * + * The #PangoFontDescription structure represents the description + * of an ideal font. These structures are used both to list + * what fonts are available on the system and also for specifying + * the characteristics of a font to load. + */ +typedef struct _PangoFontDescription PangoFontDescription; +/** + * PangoFontMetrics: + * + * A #PangoFontMetrics structure holds the overall metric information + * for a font (possibly restricted to a script). The fields of this + * structure are private to implementations of a font backend. See + * the documentation of the corresponding getters for documentation + * of their meaning. + */ +typedef struct _PangoFontMetrics PangoFontMetrics; + +/** + * PangoStyle: + * @PANGO_STYLE_NORMAL: the font is upright. + * @PANGO_STYLE_OBLIQUE: the font is slanted, but in a roman style. + * @PANGO_STYLE_ITALIC: the font is slanted in an italic style. + * + * An enumeration specifying the various slant styles possible for a font. + **/ +typedef enum { + PANGO_STYLE_NORMAL, + PANGO_STYLE_OBLIQUE, + PANGO_STYLE_ITALIC +} PangoStyle; + +/** + * PangoVariant: + * @PANGO_VARIANT_NORMAL: A normal font. + * @PANGO_VARIANT_SMALL_CAPS: A font with the lower case characters + * replaced by smaller variants of the capital characters. + * + * An enumeration specifying capitalization variant of the font. + */ +typedef enum { + PANGO_VARIANT_NORMAL, + PANGO_VARIANT_SMALL_CAPS +} PangoVariant; + +/** + * PangoWeight: + * @PANGO_WEIGHT_THIN: the thin weight (= 100; Since: 1.24) + * @PANGO_WEIGHT_ULTRALIGHT: the ultralight weight (= 200) + * @PANGO_WEIGHT_LIGHT: the light weight (= 300) + * @PANGO_WEIGHT_SEMILIGHT: the semilight weight (= 350; Since: 1.36.7) + * @PANGO_WEIGHT_BOOK: the book weight (= 380; Since: 1.24) + * @PANGO_WEIGHT_NORMAL: the default weight (= 400) + * @PANGO_WEIGHT_MEDIUM: the normal weight (= 500; Since: 1.24) + * @PANGO_WEIGHT_SEMIBOLD: the semibold weight (= 600) + * @PANGO_WEIGHT_BOLD: the bold weight (= 700) + * @PANGO_WEIGHT_ULTRABOLD: the ultrabold weight (= 800) + * @PANGO_WEIGHT_HEAVY: the heavy weight (= 900) + * @PANGO_WEIGHT_ULTRAHEAVY: the ultraheavy weight (= 1000; Since: 1.24) + * + * An enumeration specifying the weight (boldness) of a font. This is a numerical + * value ranging from 100 to 1000, but there are some predefined values: + */ +typedef enum { + PANGO_WEIGHT_THIN = 100, + PANGO_WEIGHT_ULTRALIGHT = 200, + PANGO_WEIGHT_LIGHT = 300, + PANGO_WEIGHT_SEMILIGHT = 350, + PANGO_WEIGHT_BOOK = 380, + PANGO_WEIGHT_NORMAL = 400, + PANGO_WEIGHT_MEDIUM = 500, + PANGO_WEIGHT_SEMIBOLD = 600, + PANGO_WEIGHT_BOLD = 700, + PANGO_WEIGHT_ULTRABOLD = 800, + PANGO_WEIGHT_HEAVY = 900, + PANGO_WEIGHT_ULTRAHEAVY = 1000 +} PangoWeight; + +/** + * PangoStretch: + * @PANGO_STRETCH_ULTRA_CONDENSED: ultra condensed width + * @PANGO_STRETCH_EXTRA_CONDENSED: extra condensed width + * @PANGO_STRETCH_CONDENSED: condensed width + * @PANGO_STRETCH_SEMI_CONDENSED: semi condensed width + * @PANGO_STRETCH_NORMAL: the normal width + * @PANGO_STRETCH_SEMI_EXPANDED: semi expanded width + * @PANGO_STRETCH_EXPANDED: expanded width + * @PANGO_STRETCH_EXTRA_EXPANDED: extra expanded width + * @PANGO_STRETCH_ULTRA_EXPANDED: ultra expanded width + * + * An enumeration specifying the width of the font relative to other designs + * within a family. + */ +typedef enum { + PANGO_STRETCH_ULTRA_CONDENSED, + PANGO_STRETCH_EXTRA_CONDENSED, + PANGO_STRETCH_CONDENSED, + PANGO_STRETCH_SEMI_CONDENSED, + PANGO_STRETCH_NORMAL, + PANGO_STRETCH_SEMI_EXPANDED, + PANGO_STRETCH_EXPANDED, + PANGO_STRETCH_EXTRA_EXPANDED, + PANGO_STRETCH_ULTRA_EXPANDED +} PangoStretch; + +/** + * PangoFontMask: + * @PANGO_FONT_MASK_FAMILY: the font family is specified. + * @PANGO_FONT_MASK_STYLE: the font style is specified. + * @PANGO_FONT_MASK_VARIANT: the font variant is specified. + * @PANGO_FONT_MASK_WEIGHT: the font weight is specified. + * @PANGO_FONT_MASK_STRETCH: the font stretch is specified. + * @PANGO_FONT_MASK_SIZE: the font size is specified. + * @PANGO_FONT_MASK_GRAVITY: the font gravity is specified (Since: 1.16.) + * @PANGO_FONT_MASK_VARIATIONS: OpenType font variations are specified (Since: 1.42) + * + * The bits in a #PangoFontMask correspond to fields in a + * #PangoFontDescription that have been set. + */ +typedef enum { + PANGO_FONT_MASK_FAMILY = 1 << 0, + PANGO_FONT_MASK_STYLE = 1 << 1, + PANGO_FONT_MASK_VARIANT = 1 << 2, + PANGO_FONT_MASK_WEIGHT = 1 << 3, + PANGO_FONT_MASK_STRETCH = 1 << 4, + PANGO_FONT_MASK_SIZE = 1 << 5, + PANGO_FONT_MASK_GRAVITY = 1 << 6, + PANGO_FONT_MASK_VARIATIONS = 1 << 7, +} PangoFontMask; + +/* CSS scale factors (1.2 factor between each size) */ +/** + * PANGO_SCALE_XX_SMALL: + * + * The scale factor for three shrinking steps (1 / (1.2 * 1.2 * 1.2)). + */ +/** + * PANGO_SCALE_X_SMALL: + * + * The scale factor for two shrinking steps (1 / (1.2 * 1.2)). + */ +/** + * PANGO_SCALE_SMALL: + * + * The scale factor for one shrinking step (1 / 1.2). + */ +/** + * PANGO_SCALE_MEDIUM: + * + * The scale factor for normal size (1.0). + */ +/** + * PANGO_SCALE_LARGE: + * + * The scale factor for one magnification step (1.2). + */ +/** + * PANGO_SCALE_X_LARGE: + * + * The scale factor for two magnification steps (1.2 * 1.2). + */ +/** + * PANGO_SCALE_XX_LARGE: + * + * The scale factor for three magnification steps (1.2 * 1.2 * 1.2). + */ +#define PANGO_SCALE_XX_SMALL ((double)0.5787037037037) +#define PANGO_SCALE_X_SMALL ((double)0.6444444444444) +#define PANGO_SCALE_SMALL ((double)0.8333333333333) +#define PANGO_SCALE_MEDIUM ((double)1.0) +#define PANGO_SCALE_LARGE ((double)1.2) +#define PANGO_SCALE_X_LARGE ((double)1.4399999999999) +#define PANGO_SCALE_XX_LARGE ((double)1.728) + +/* + * PangoFontDescription + */ + +/** + * PANGO_TYPE_FONT_DESCRIPTION: + * + * The #GObject type for #PangoFontDescription. + */ +#define PANGO_TYPE_FONT_DESCRIPTION (pango_font_description_get_type ()) + +PANGO_AVAILABLE_IN_ALL +GType pango_font_description_get_type (void) G_GNUC_CONST; +PANGO_AVAILABLE_IN_ALL +PangoFontDescription *pango_font_description_new (void); +PANGO_AVAILABLE_IN_ALL +PangoFontDescription *pango_font_description_copy (const PangoFontDescription *desc); +PANGO_AVAILABLE_IN_ALL +PangoFontDescription *pango_font_description_copy_static (const PangoFontDescription *desc); +PANGO_AVAILABLE_IN_ALL +guint pango_font_description_hash (const PangoFontDescription *desc) G_GNUC_PURE; +PANGO_AVAILABLE_IN_ALL +gboolean pango_font_description_equal (const PangoFontDescription *desc1, + const PangoFontDescription *desc2) G_GNUC_PURE; +PANGO_AVAILABLE_IN_ALL +void pango_font_description_free (PangoFontDescription *desc); +PANGO_AVAILABLE_IN_ALL +void pango_font_descriptions_free (PangoFontDescription **descs, + int n_descs); + +PANGO_AVAILABLE_IN_ALL +void pango_font_description_set_family (PangoFontDescription *desc, + const char *family); +PANGO_AVAILABLE_IN_ALL +void pango_font_description_set_family_static (PangoFontDescription *desc, + const char *family); +PANGO_AVAILABLE_IN_ALL +const char *pango_font_description_get_family (const PangoFontDescription *desc) G_GNUC_PURE; +PANGO_AVAILABLE_IN_ALL +void pango_font_description_set_style (PangoFontDescription *desc, + PangoStyle style); +PANGO_AVAILABLE_IN_ALL +PangoStyle pango_font_description_get_style (const PangoFontDescription *desc) G_GNUC_PURE; +PANGO_AVAILABLE_IN_ALL +void pango_font_description_set_variant (PangoFontDescription *desc, + PangoVariant variant); +PANGO_AVAILABLE_IN_ALL +PangoVariant pango_font_description_get_variant (const PangoFontDescription *desc) G_GNUC_PURE; +PANGO_AVAILABLE_IN_ALL +void pango_font_description_set_weight (PangoFontDescription *desc, + PangoWeight weight); +PANGO_AVAILABLE_IN_ALL +PangoWeight pango_font_description_get_weight (const PangoFontDescription *desc) G_GNUC_PURE; +PANGO_AVAILABLE_IN_ALL +void pango_font_description_set_stretch (PangoFontDescription *desc, + PangoStretch stretch); +PANGO_AVAILABLE_IN_ALL +PangoStretch pango_font_description_get_stretch (const PangoFontDescription *desc) G_GNUC_PURE; +PANGO_AVAILABLE_IN_ALL +void pango_font_description_set_size (PangoFontDescription *desc, + gint size); +PANGO_AVAILABLE_IN_ALL +gint pango_font_description_get_size (const PangoFontDescription *desc) G_GNUC_PURE; +PANGO_AVAILABLE_IN_1_8 +void pango_font_description_set_absolute_size (PangoFontDescription *desc, + double size); +PANGO_AVAILABLE_IN_1_8 +gboolean pango_font_description_get_size_is_absolute (const PangoFontDescription *desc) G_GNUC_PURE; +PANGO_AVAILABLE_IN_1_16 +void pango_font_description_set_gravity (PangoFontDescription *desc, + PangoGravity gravity); +PANGO_AVAILABLE_IN_1_16 +PangoGravity pango_font_description_get_gravity (const PangoFontDescription *desc) G_GNUC_PURE; + +PANGO_AVAILABLE_IN_1_42 +void pango_font_description_set_variations_static (PangoFontDescription *desc, + const char *settings); +PANGO_AVAILABLE_IN_1_42 +void pango_font_description_set_variations (PangoFontDescription *desc, + const char *settings); +PANGO_AVAILABLE_IN_1_42 +const char *pango_font_description_get_variations (const PangoFontDescription *desc) G_GNUC_PURE; + +PANGO_AVAILABLE_IN_ALL +PangoFontMask pango_font_description_get_set_fields (const PangoFontDescription *desc) G_GNUC_PURE; +PANGO_AVAILABLE_IN_ALL +void pango_font_description_unset_fields (PangoFontDescription *desc, + PangoFontMask to_unset); + +PANGO_AVAILABLE_IN_ALL +void pango_font_description_merge (PangoFontDescription *desc, + const PangoFontDescription *desc_to_merge, + gboolean replace_existing); +PANGO_AVAILABLE_IN_ALL +void pango_font_description_merge_static (PangoFontDescription *desc, + const PangoFontDescription *desc_to_merge, + gboolean replace_existing); + +PANGO_AVAILABLE_IN_ALL +gboolean pango_font_description_better_match (const PangoFontDescription *desc, + const PangoFontDescription *old_match, + const PangoFontDescription *new_match) G_GNUC_PURE; + +PANGO_AVAILABLE_IN_ALL +PangoFontDescription *pango_font_description_from_string (const char *str); +PANGO_AVAILABLE_IN_ALL +char * pango_font_description_to_string (const PangoFontDescription *desc); +PANGO_AVAILABLE_IN_ALL +char * pango_font_description_to_filename (const PangoFontDescription *desc); + +/* + * PangoFontMetrics + */ + +/** + * PANGO_TYPE_FONT_METRICS: + * + * The #GObject type for #PangoFontMetrics. + */ +#define PANGO_TYPE_FONT_METRICS (pango_font_metrics_get_type ()) +PANGO_AVAILABLE_IN_ALL +GType pango_font_metrics_get_type (void) G_GNUC_CONST; +PANGO_AVAILABLE_IN_ALL +PangoFontMetrics *pango_font_metrics_ref (PangoFontMetrics *metrics); +PANGO_AVAILABLE_IN_ALL +void pango_font_metrics_unref (PangoFontMetrics *metrics); +PANGO_AVAILABLE_IN_ALL +int pango_font_metrics_get_ascent (PangoFontMetrics *metrics) G_GNUC_PURE; +PANGO_AVAILABLE_IN_ALL +int pango_font_metrics_get_descent (PangoFontMetrics *metrics) G_GNUC_PURE; +PANGO_AVAILABLE_IN_ALL +int pango_font_metrics_get_approximate_char_width (PangoFontMetrics *metrics) G_GNUC_PURE; +PANGO_AVAILABLE_IN_ALL +int pango_font_metrics_get_approximate_digit_width (PangoFontMetrics *metrics) G_GNUC_PURE; +PANGO_AVAILABLE_IN_1_6 +int pango_font_metrics_get_underline_position (PangoFontMetrics *metrics) G_GNUC_PURE; +PANGO_AVAILABLE_IN_1_6 +int pango_font_metrics_get_underline_thickness (PangoFontMetrics *metrics) G_GNUC_PURE; +PANGO_AVAILABLE_IN_1_6 +int pango_font_metrics_get_strikethrough_position (PangoFontMetrics *metrics) G_GNUC_PURE; +PANGO_AVAILABLE_IN_1_6 +int pango_font_metrics_get_strikethrough_thickness (PangoFontMetrics *metrics) G_GNUC_PURE; + +#ifdef PANGO_ENABLE_BACKEND + +PANGO_AVAILABLE_IN_ALL +PangoFontMetrics *pango_font_metrics_new (void); + +struct _PangoFontMetrics +{ + /* <private> */ + guint ref_count; + + int ascent; + int descent; + int approximate_char_width; + int approximate_digit_width; + int underline_position; + int underline_thickness; + int strikethrough_position; + int strikethrough_thickness; +}; + +#endif /* PANGO_ENABLE_BACKEND */ + +/* + * PangoFontFamily + */ + +/** + * PANGO_TYPE_FONT_FAMILY: + * + * The #GObject type for #PangoFontFamily. + */ +/** + * PANGO_FONT_FAMILY: + * @object: a #GObject. + * + * Casts a #GObject to a #PangoFontFamily. + */ +/** + * PANGO_IS_FONT_FAMILY: + * @object: a #GObject. + * + * Returns: %TRUE if @object is a #PangoFontFamily. + */ +#define PANGO_TYPE_FONT_FAMILY (pango_font_family_get_type ()) +#define PANGO_FONT_FAMILY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT_FAMILY, PangoFontFamily)) +#define PANGO_IS_FONT_FAMILY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT_FAMILY)) + +typedef struct _PangoFontFamily PangoFontFamily; +typedef struct _PangoFontFace PangoFontFace; + +PANGO_AVAILABLE_IN_ALL +GType pango_font_family_get_type (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_ALL +void pango_font_family_list_faces (PangoFontFamily *family, + PangoFontFace ***faces, + int *n_faces); +PANGO_AVAILABLE_IN_ALL +const char *pango_font_family_get_name (PangoFontFamily *family) G_GNUC_PURE; +PANGO_AVAILABLE_IN_1_4 +gboolean pango_font_family_is_monospace (PangoFontFamily *family) G_GNUC_PURE; + +#ifdef PANGO_ENABLE_BACKEND + +#define PANGO_FONT_FAMILY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FONT_FAMILY, PangoFontFamilyClass)) +#define PANGO_IS_FONT_FAMILY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FONT_FAMILY)) +#define PANGO_FONT_FAMILY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONT_FAMILY, PangoFontFamilyClass)) + +typedef struct _PangoFontFamilyClass PangoFontFamilyClass; + + +/** + * PangoFontFamily: + * + * The #PangoFontFamily structure is used to represent a family of related + * font faces. The faces in a family share a common design, but differ in + * slant, weight, width and other aspects. + */ +struct _PangoFontFamily +{ + GObject parent_instance; +}; + +struct _PangoFontFamilyClass +{ + GObjectClass parent_class; + + /*< public >*/ + + void (*list_faces) (PangoFontFamily *family, + PangoFontFace ***faces, + int *n_faces); + const char * (*get_name) (PangoFontFamily *family); + gboolean (*is_monospace) (PangoFontFamily *family); + + /*< private >*/ + + /* Padding for future expansion */ + void (*_pango_reserved2) (void); + void (*_pango_reserved3) (void); + void (*_pango_reserved4) (void); +}; + +#endif /* PANGO_ENABLE_BACKEND */ + +/* + * PangoFontFace + */ + +/** + * PANGO_TYPE_FONT_FACE: + * + * The #GObject type for #PangoFontFace. + */ +/** + * PANGO_FONT_FACE: + * @object: a #GObject. + * + * Casts a #GObject to a #PangoFontFace. + */ +/** + * PANGO_IS_FONT_FACE: + * @object: a #GObject. + * + * Returns: %TRUE if @object is a #PangoFontFace. + */ +#define PANGO_TYPE_FONT_FACE (pango_font_face_get_type ()) +#define PANGO_FONT_FACE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT_FACE, PangoFontFace)) +#define PANGO_IS_FONT_FACE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT_FACE)) + +PANGO_AVAILABLE_IN_ALL +GType pango_font_face_get_type (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_ALL +PangoFontDescription *pango_font_face_describe (PangoFontFace *face); +PANGO_AVAILABLE_IN_ALL +const char *pango_font_face_get_face_name (PangoFontFace *face) G_GNUC_PURE; +PANGO_AVAILABLE_IN_1_4 +void pango_font_face_list_sizes (PangoFontFace *face, + int **sizes, + int *n_sizes); +PANGO_AVAILABLE_IN_1_18 +gboolean pango_font_face_is_synthesized (PangoFontFace *face) G_GNUC_PURE; + +#ifdef PANGO_ENABLE_BACKEND + +#define PANGO_FONT_FACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FONT_FACE, PangoFontFaceClass)) +#define PANGO_IS_FONT_FACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FONT_FACE)) +#define PANGO_FONT_FACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONT_FACE, PangoFontFaceClass)) + +typedef struct _PangoFontFaceClass PangoFontFaceClass; + +/** + * PangoFontFace: + * + * The #PangoFontFace structure is used to represent a group of fonts with + * the same family, slant, weight, width, but varying sizes. + */ +struct _PangoFontFace +{ + GObject parent_instance; +}; + +struct _PangoFontFaceClass +{ + GObjectClass parent_class; + + /*< public >*/ + + const char * (*get_face_name) (PangoFontFace *face); + PangoFontDescription * (*describe) (PangoFontFace *face); + void (*list_sizes) (PangoFontFace *face, + int **sizes, + int *n_sizes); + gboolean (*is_synthesized) (PangoFontFace *face); + + /*< private >*/ + + /* Padding for future expansion */ + void (*_pango_reserved3) (void); + void (*_pango_reserved4) (void); +}; + +#endif /* PANGO_ENABLE_BACKEND */ + +/* + * PangoFont + */ + +/** + * PANGO_TYPE_FONT: + * + * The #GObject type for #PangoFont. + */ +/** + * PANGO_FONT: + * @object: a #GObject. + * + * Casts a #GObject to a #PangoFont. + */ +/** + * PANGO_IS_FONT: + * @object: a #GObject. + * + * Returns: %TRUE if @object is a #PangoFont. + */ +#define PANGO_TYPE_FONT (pango_font_get_type ()) +#define PANGO_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT, PangoFont)) +#define PANGO_IS_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT)) + +PANGO_AVAILABLE_IN_ALL +GType pango_font_get_type (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_ALL +PangoFontDescription *pango_font_describe (PangoFont *font); +PANGO_AVAILABLE_IN_1_14 +PangoFontDescription *pango_font_describe_with_absolute_size (PangoFont *font); +PANGO_AVAILABLE_IN_ALL +PangoCoverage * pango_font_get_coverage (PangoFont *font, + PangoLanguage *language); +PANGO_AVAILABLE_IN_ALL +PangoEngineShape * pango_font_find_shaper (PangoFont *font, + PangoLanguage *language, + guint32 ch); +PANGO_AVAILABLE_IN_ALL +PangoFontMetrics * pango_font_get_metrics (PangoFont *font, + PangoLanguage *language); +PANGO_AVAILABLE_IN_ALL +void pango_font_get_glyph_extents (PangoFont *font, + PangoGlyph glyph, + PangoRectangle *ink_rect, + PangoRectangle *logical_rect); +PANGO_AVAILABLE_IN_1_10 +PangoFontMap *pango_font_get_font_map (PangoFont *font); + +#ifdef PANGO_ENABLE_BACKEND + +#define PANGO_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FONT, PangoFontClass)) +#define PANGO_IS_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FONT)) +#define PANGO_FONT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONT, PangoFontClass)) + +typedef struct _PangoFontClass PangoFontClass; + +/** + * PangoFont: + * + * The #PangoFont structure is used to represent + * a font in a rendering-system-independent matter. + * To create an implementation of a #PangoFont, + * the rendering-system specific code should allocate + * a larger structure that contains a nested + * #PangoFont, fill in the <structfield>klass</structfield> member of + * the nested #PangoFont with a pointer to + * a appropriate #PangoFontClass, then call + * pango_font_init() on the structure. + * + * The #PangoFont structure contains one member + * which the implementation fills in. + */ +struct _PangoFont +{ + GObject parent_instance; +}; + +struct _PangoFontClass +{ + GObjectClass parent_class; + + /*< public >*/ + + PangoFontDescription *(*describe) (PangoFont *font); + PangoCoverage * (*get_coverage) (PangoFont *font, + PangoLanguage *language); + PangoEngineShape * (*find_shaper) (PangoFont *font, + PangoLanguage *language, + guint32 ch); + void (*get_glyph_extents) (PangoFont *font, + PangoGlyph glyph, + PangoRectangle *ink_rect, + PangoRectangle *logical_rect); + PangoFontMetrics * (*get_metrics) (PangoFont *font, + PangoLanguage *language); + PangoFontMap * (*get_font_map) (PangoFont *font); + PangoFontDescription *(*describe_absolute) (PangoFont *font); + /*< private >*/ + + /* Padding for future expansion */ + void (*_pango_reserved1) (void); + void (*_pango_reserved2) (void); +}; + +/* used for very rare and miserable situtations that we cannot even + * draw a hexbox + */ +#define PANGO_UNKNOWN_GLYPH_WIDTH 10 +#define PANGO_UNKNOWN_GLYPH_HEIGHT 14 + +#endif /* PANGO_ENABLE_BACKEND */ + +/** + * PANGO_GLYPH_EMPTY: + * + * The %PANGO_GLYPH_EMPTY macro represents a #PangoGlyph value that has a + * special meaning, which is a zero-width empty glyph. This is useful for + * example in shaper modules, to use as the glyph for various zero-width + * Unicode characters (those passing pango_is_zero_width()). + */ +/** + * PANGO_GLYPH_INVALID_INPUT: + * + * The %PANGO_GLYPH_INVALID_INPUT macro represents a #PangoGlyph value that has a + * special meaning of invalid input. #PangoLayout produces one such glyph + * per invalid input UTF-8 byte and such a glyph is rendered as a crossed + * box. + * + * Note that this value is defined such that it has the %PANGO_GLYPH_UNKNOWN_FLAG + * on. + * + * Since: 1.20 + */ +/** + * PANGO_GLYPH_UNKNOWN_FLAG: + * + * The %PANGO_GLYPH_UNKNOWN_FLAG macro is a flag value that can be added to + * a #gunichar value of a valid Unicode character, to produce a #PangoGlyph + * value, representing an unknown-character glyph for the respective #gunichar. + */ +/** + * PANGO_GET_UNKNOWN_GLYPH: + * @wc: a Unicode character + * + * The way this unknown glyphs are rendered is backend specific. For example, + * a box with the hexadecimal Unicode code-point of the character written in it + * is what is done in the most common backends. + * + * Returns: a #PangoGlyph value that means no glyph was found for @wc. + */ +#define PANGO_GLYPH_EMPTY ((PangoGlyph)0x0FFFFFFF) +#define PANGO_GLYPH_INVALID_INPUT ((PangoGlyph)0xFFFFFFFF) +#define PANGO_GLYPH_UNKNOWN_FLAG ((PangoGlyph)0x10000000) +#define PANGO_GET_UNKNOWN_GLYPH(wc) ((PangoGlyph)(wc)|PANGO_GLYPH_UNKNOWN_FLAG) + + +G_END_DECLS + +#endif /* __PANGO_FONT_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-fontmap.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-fontmap.h new file mode 100755 index 00000000..56128e9b --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-fontmap.h @@ -0,0 +1,175 @@ +/* Pango + * pango-font.h: Font handling + * + * Copyright (C) 2000 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_FONTMAP_H__ +#define __PANGO_FONTMAP_H__ + +#include <pango/pango-font.h> +#include <pango/pango-fontset.h> + +G_BEGIN_DECLS + +/** + * PANGO_TYPE_FONT_MAP: + * + * The #GObject type for #PangoFontMap. + */ +/** + * PANGO_FONT_MAP: + * @object: a #GObject. + * + * Casts a #GObject to a #PangoFontMap. + */ +/** + * PANGO_IS_FONT_MAP: + * @object: a #GObject. + * + * Returns: %TRUE if @object is a #PangoFontMap. + */ +#define PANGO_TYPE_FONT_MAP (pango_font_map_get_type ()) +#define PANGO_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT_MAP, PangoFontMap)) +#define PANGO_IS_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT_MAP)) + +typedef struct _PangoContext PangoContext; + +PANGO_AVAILABLE_IN_ALL +GType pango_font_map_get_type (void) G_GNUC_CONST; +PANGO_AVAILABLE_IN_1_22 +PangoContext * pango_font_map_create_context (PangoFontMap *fontmap); +PANGO_AVAILABLE_IN_ALL +PangoFont * pango_font_map_load_font (PangoFontMap *fontmap, + PangoContext *context, + const PangoFontDescription *desc); +PANGO_AVAILABLE_IN_ALL +PangoFontset *pango_font_map_load_fontset (PangoFontMap *fontmap, + PangoContext *context, + const PangoFontDescription *desc, + PangoLanguage *language); +PANGO_AVAILABLE_IN_ALL +void pango_font_map_list_families (PangoFontMap *fontmap, + PangoFontFamily ***families, + int *n_families); +PANGO_AVAILABLE_IN_1_32 +guint pango_font_map_get_serial (PangoFontMap *fontmap); +PANGO_AVAILABLE_IN_1_34 +void pango_font_map_changed (PangoFontMap *fontmap); + +#ifdef PANGO_ENABLE_BACKEND + +/** + * PANGO_FONT_MAP_CLASS: + * @klass: a #GObject. + * + * Casts a #GObject to a #PangoFontMapClass. + */ +/** + * PANGO_IS_FONT_MAP_CLASS: + * @klass: a #GObject. + * + * Returns: %TRUE if @klass is a subtype of #PangoFontMapClass. + */ +/** + * PANGO_FONT_MAP_GET_CLASS: + * @obj: a #PangoFontMap. + * + * Returns: class of @obj + */ +#define PANGO_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FONT_MAP, PangoFontMapClass)) +#define PANGO_IS_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FONT_MAP)) +#define PANGO_FONT_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONT_MAP, PangoFontMapClass)) + +typedef struct _PangoFontMapClass PangoFontMapClass; + +/** + * PangoFontMap: + * + * The #PangoFontMap represents the set of fonts available for a + * particular rendering system. This is a virtual object with + * implementations being specific to particular rendering systems. To + * create an implementation of a #PangoFontMap, the rendering-system + * specific code should allocate a larger structure that contains a nested + * #PangoFontMap, fill in the <structfield>klass</structfield> member of the nested #PangoFontMap with a + * pointer to a appropriate #PangoFontMapClass, then call + * pango_font_map_init() on the structure. + * + * The #PangoFontMap structure contains one member which the implementation + * fills in. + */ +struct _PangoFontMap +{ + GObject parent_instance; +}; + +/** + * PangoFontMapClass: + * @parent_class: parent #GObjectClass. + * @load_font: a function to load a font with a given description. See + * pango_font_map_load_font(). + * @list_families: A function to list available font families. See + * pango_font_map_list_families(). + * @load_fontset: a function to load a fontset with a given given description + * suitable for a particular language. See pango_font_map_load_fontset(). + * @shape_engine_type: the type of rendering-system-dependent engines that + * can handle fonts of this fonts loaded with this fontmap. + * @get_serial: a function to get the serial number of the fontmap. + * See pango_font_map_get_serial(). + * @changed: See pango_font_map_changed() + * + * The #PangoFontMapClass structure holds the virtual functions for + * a particular #PangoFontMap implementation. + */ +struct _PangoFontMapClass +{ + GObjectClass parent_class; + + /*< public >*/ + + PangoFont * (*load_font) (PangoFontMap *fontmap, + PangoContext *context, + const PangoFontDescription *desc); + void (*list_families) (PangoFontMap *fontmap, + PangoFontFamily ***families, + int *n_families); + PangoFontset *(*load_fontset) (PangoFontMap *fontmap, + PangoContext *context, + const PangoFontDescription *desc, + PangoLanguage *language); + + const char *shape_engine_type; + + guint (*get_serial) (PangoFontMap *fontmap); + void (*changed) (PangoFontMap *fontmap); + + /*< private >*/ + + /* Padding for future expansion */ + void (*_pango_reserved1) (void); + void (*_pango_reserved2) (void); +}; + +PANGO_DEPRECATED_IN_1_38 +const char *pango_font_map_get_shape_engine_type (PangoFontMap *fontmap); + +#endif /* PANGO_ENABLE_BACKEND */ + +G_END_DECLS + +#endif /* __PANGO_FONTMAP_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-fontset.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-fontset.h new file mode 100755 index 00000000..6ea16d8e --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-fontset.h @@ -0,0 +1,177 @@ +/* Pango + * pango-fontset.h: Font set handling + * + * Copyright (C) 2001 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_FONTSET_H__ +#define __PANGO_FONTSET_H__ + +#include <pango/pango-coverage.h> +#include <pango/pango-types.h> + +#include <glib-object.h> + +G_BEGIN_DECLS + +/* + * PangoFontset + */ + +/** + * PANGO_TYPE_FONTSET: + * + * The #GObject type for #PangoFontset. + */ +#define PANGO_TYPE_FONTSET (pango_fontset_get_type ()) +#define PANGO_FONTSET(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONTSET, PangoFontset)) +#define PANGO_IS_FONTSET(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONTSET)) + +PANGO_AVAILABLE_IN_ALL +GType pango_fontset_get_type (void) G_GNUC_CONST; + +typedef struct _PangoFontset PangoFontset; + +/** + * PangoFontsetForeachFunc: + * @fontset: a #PangoFontset + * @font: a font from @fontset + * @user_data: callback data + * + * A callback function used by pango_fontset_foreach() when enumerating + * the fonts in a fontset. + * + * Returns: if %TRUE, stop iteration and return immediately. + * + * Since: 1.4 + **/ +typedef gboolean (*PangoFontsetForeachFunc) (PangoFontset *fontset, + PangoFont *font, + gpointer user_data); + +PANGO_AVAILABLE_IN_ALL +PangoFont * pango_fontset_get_font (PangoFontset *fontset, + guint wc); +PANGO_AVAILABLE_IN_ALL +PangoFontMetrics *pango_fontset_get_metrics (PangoFontset *fontset); +PANGO_AVAILABLE_IN_1_4 +void pango_fontset_foreach (PangoFontset *fontset, + PangoFontsetForeachFunc func, + gpointer data); + +#ifdef PANGO_ENABLE_BACKEND + +typedef struct _PangoFontsetClass PangoFontsetClass; + +#define PANGO_FONTSET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FONTSET, PangoFontsetClass)) +#define PANGO_IS_FONTSET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FONTSET)) +#define PANGO_FONTSET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONTSET, PangoFontsetClass)) + +/** + * PangoFontset: + * + * A #PangoFontset represents a set of #PangoFont to use + * when rendering text. It is the result of resolving a + * #PangoFontDescription against a particular #PangoContext. + * It has operations for finding the component font for + * a particular Unicode character, and for finding a composite + * set of metrics for the entire fontset. + */ +struct _PangoFontset +{ + GObject parent_instance; +}; + +/** + * PangoFontsetClass: + * @parent_class: parent #GObjectClass. + * @get_font: a function to get the font in the fontset that contains the + * best glyph for the given Unicode character; see pango_fontset_get_font(). + * @get_metrics: a function to get overall metric information for the fonts + * in the fontset; see pango_fontset_get_metrics(). + * @get_language: a function to get the language of the fontset. + * @foreach: a function to loop over the fonts in the fontset. See + * pango_fontset_foreach(). + * + * The #PangoFontsetClass structure holds the virtual functions for + * a particular #PangoFontset implementation. + */ +struct _PangoFontsetClass +{ + GObjectClass parent_class; + + /*< public >*/ + + PangoFont * (*get_font) (PangoFontset *fontset, + guint wc); + + PangoFontMetrics *(*get_metrics) (PangoFontset *fontset); + PangoLanguage * (*get_language) (PangoFontset *fontset); + void (*foreach) (PangoFontset *fontset, + PangoFontsetForeachFunc func, + gpointer data); + + /*< private >*/ + + /* Padding for future expansion */ + void (*_pango_reserved1) (void); + void (*_pango_reserved2) (void); + void (*_pango_reserved3) (void); + void (*_pango_reserved4) (void); +}; + +/* + * PangoFontsetSimple + */ + +/** + * PANGO_TYPE_FONTSET_SIMPLE: + * + * The #GObject type for #PangoFontsetSimple. + */ +/** + * PangoFontsetSimple: + * + * #PangoFontsetSimple is a implementation of the abstract + * #PangoFontset base class in terms of an array of fonts, + * which the creator provides when constructing the + * #PangoFontsetSimple. + */ +#define PANGO_TYPE_FONTSET_SIMPLE (pango_fontset_simple_get_type ()) +#define PANGO_FONTSET_SIMPLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONTSET_SIMPLE, PangoFontsetSimple)) +#define PANGO_IS_FONTSET_SIMPLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONTSET_SIMPLE)) + +typedef struct _PangoFontsetSimple PangoFontsetSimple; +typedef struct _PangoFontsetSimpleClass PangoFontsetSimpleClass; + +PANGO_AVAILABLE_IN_ALL +GType pango_fontset_simple_get_type (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_ALL +PangoFontsetSimple * pango_fontset_simple_new (PangoLanguage *language); +PANGO_AVAILABLE_IN_ALL +void pango_fontset_simple_append (PangoFontsetSimple *fontset, + PangoFont *font); +PANGO_AVAILABLE_IN_ALL +int pango_fontset_simple_size (PangoFontsetSimple *fontset); + +#endif /* PANGO_ENABLE_BACKEND */ + +G_END_DECLS + +#endif /* __PANGO_FONTSET_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-glyph-item.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-glyph-item.h new file mode 100755 index 00000000..daf2b15f --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-glyph-item.h @@ -0,0 +1,174 @@ +/* Pango + * pango-glyph-item.h: Pair of PangoItem and a glyph string + * + * Copyright (C) 2002 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_GLYPH_ITEM_H__ +#define __PANGO_GLYPH_ITEM_H__ + +#include <pango/pango-attributes.h> +#include <pango/pango-break.h> +#include <pango/pango-item.h> +#include <pango/pango-glyph.h> + +G_BEGIN_DECLS + +/** + * PangoGlyphItem: + * @item: corresponding #PangoItem. + * @glyphs: corresponding #PangoGlyphString. + * + * A #PangoGlyphItem is a pair of a #PangoItem and the glyphs + * resulting from shaping the text corresponding to an item. + * As an example of the usage of #PangoGlyphItem, the results + * of shaping text with #PangoLayout is a list of #PangoLayoutLine, + * each of which contains a list of #PangoGlyphItem. + */ +typedef struct _PangoGlyphItem PangoGlyphItem; + +struct _PangoGlyphItem +{ + PangoItem *item; + PangoGlyphString *glyphs; +}; + +/** + * PANGO_TYPE_GLYPH_ITEM: + * + * The #GObject type for #PangoGlyphItem. + */ +#define PANGO_TYPE_GLYPH_ITEM (pango_glyph_item_get_type ()) + +PANGO_AVAILABLE_IN_ALL +GType pango_glyph_item_get_type (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_1_2 +PangoGlyphItem *pango_glyph_item_split (PangoGlyphItem *orig, + const char *text, + int split_index); +PANGO_AVAILABLE_IN_1_20 +PangoGlyphItem *pango_glyph_item_copy (PangoGlyphItem *orig); +PANGO_AVAILABLE_IN_1_6 +void pango_glyph_item_free (PangoGlyphItem *glyph_item); +PANGO_AVAILABLE_IN_1_2 +GSList * pango_glyph_item_apply_attrs (PangoGlyphItem *glyph_item, + const char *text, + PangoAttrList *list); +PANGO_AVAILABLE_IN_1_6 +void pango_glyph_item_letter_space (PangoGlyphItem *glyph_item, + const char *text, + PangoLogAttr *log_attrs, + int letter_spacing); +PANGO_AVAILABLE_IN_1_26 +void pango_glyph_item_get_logical_widths (PangoGlyphItem *glyph_item, + const char *text, + int *logical_widths); + + +/** + * PangoGlyphItemIter: + * + * A #PangoGlyphItemIter is an iterator over the clusters in a + * #PangoGlyphItem. The <firstterm>forward direction</firstterm> of the + * iterator is the logical direction of text. That is, with increasing + * @start_index and @start_char values. If @glyph_item is right-to-left + * (that is, if <literal>@glyph_item->item->analysis.level</literal> is odd), + * then @start_glyph decreases as the iterator moves forward. Moreover, + * in right-to-left cases, @start_glyph is greater than @end_glyph. + * + * An iterator should be initialized using either of + * pango_glyph_item_iter_init_start() and + * pango_glyph_item_iter_init_end(), for forward and backward iteration + * respectively, and walked over using any desired mixture of + * pango_glyph_item_iter_next_cluster() and + * pango_glyph_item_iter_prev_cluster(). A common idiom for doing a + * forward iteration over the clusters is: + * <programlisting> + * PangoGlyphItemIter cluster_iter; + * gboolean have_cluster; + * + * for (have_cluster = pango_glyph_item_iter_init_start (&cluster_iter, + * glyph_item, text); + * have_cluster; + * have_cluster = pango_glyph_item_iter_next_cluster (&cluster_iter)) + * { + * ... + * } + * </programlisting> + * + * Note that @text is the start of the text for layout, which is then + * indexed by <literal>@glyph_item->item->offset</literal> to get to the + * text of @glyph_item. The @start_index and @end_index values can directly + * index into @text. The @start_glyph, @end_glyph, @start_char, and @end_char + * values however are zero-based for the @glyph_item. For each cluster, the + * item pointed at by the start variables is included in the cluster while + * the one pointed at by end variables is not. + * + * None of the members of a #PangoGlyphItemIter should be modified manually. + * + * Since: 1.22 + */ +typedef struct _PangoGlyphItemIter PangoGlyphItemIter; + +struct _PangoGlyphItemIter +{ + PangoGlyphItem *glyph_item; + const gchar *text; + + int start_glyph; + int start_index; + int start_char; + + int end_glyph; + int end_index; + int end_char; +}; + +/** + * PANGO_TYPE_GLYPH_ITEM_ITER: + * + * The #GObject type for #PangoGlyphItemIter. + * + * Since: 1.22 + */ +#define PANGO_TYPE_GLYPH_ITEM_ITER (pango_glyph_item_iter_get_type ()) + +PANGO_AVAILABLE_IN_1_22 +GType pango_glyph_item_iter_get_type (void) G_GNUC_CONST; +PANGO_AVAILABLE_IN_1_22 +PangoGlyphItemIter *pango_glyph_item_iter_copy (PangoGlyphItemIter *orig); +PANGO_AVAILABLE_IN_1_22 +void pango_glyph_item_iter_free (PangoGlyphItemIter *iter); + +PANGO_AVAILABLE_IN_1_22 +gboolean pango_glyph_item_iter_init_start (PangoGlyphItemIter *iter, + PangoGlyphItem *glyph_item, + const char *text); +PANGO_AVAILABLE_IN_1_22 +gboolean pango_glyph_item_iter_init_end (PangoGlyphItemIter *iter, + PangoGlyphItem *glyph_item, + const char *text); +PANGO_AVAILABLE_IN_1_22 +gboolean pango_glyph_item_iter_next_cluster (PangoGlyphItemIter *iter); +PANGO_AVAILABLE_IN_1_22 +gboolean pango_glyph_item_iter_prev_cluster (PangoGlyphItemIter *iter); + +G_END_DECLS + +#endif /* __PANGO_GLYPH_ITEM_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-glyph.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-glyph.h new file mode 100755 index 00000000..f24812cf --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-glyph.h @@ -0,0 +1,216 @@ +/* Pango + * pango-glyph.h: Glyph storage + * + * Copyright (C) 2000 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_GLYPH_H__ +#define __PANGO_GLYPH_H__ + +#include <pango/pango-types.h> +#include <pango/pango-item.h> + +G_BEGIN_DECLS + +typedef struct _PangoGlyphGeometry PangoGlyphGeometry; +typedef struct _PangoGlyphVisAttr PangoGlyphVisAttr; +typedef struct _PangoGlyphInfo PangoGlyphInfo; +typedef struct _PangoGlyphString PangoGlyphString; + +/* 1024ths of a device unit */ +/** + * PangoGlyphUnit: + * + * The #PangoGlyphUnit type is used to store dimensions within + * Pango. Dimensions are stored in 1/%PANGO_SCALE of a device unit. + * (A device unit might be a pixel for screen display, or + * a point on a printer.) %PANGO_SCALE is currently 1024, and + * may change in the future (unlikely though), but you should not + * depend on its exact value. The PANGO_PIXELS() macro can be used + * to convert from glyph units into device units with correct rounding. + */ +typedef gint32 PangoGlyphUnit; + +/* Positioning information about a glyph + */ +/** + * PangoGlyphGeometry: + * @width: the logical width to use for the the character. + * @x_offset: horizontal offset from nominal character position. + * @y_offset: vertical offset from nominal character position. + * + * The #PangoGlyphGeometry structure contains width and positioning + * information for a single glyph. + */ +struct _PangoGlyphGeometry +{ + PangoGlyphUnit width; + PangoGlyphUnit x_offset; + PangoGlyphUnit y_offset; +}; + +/* Visual attributes of a glyph + */ +/** + * PangoGlyphVisAttr: + * @is_cluster_start: set for the first logical glyph in each cluster. (Clusters + * are stored in visual order, within the cluster, glyphs + * are always ordered in logical order, since visual + * order is meaningless; that is, in Arabic text, accent glyphs + * follow the glyphs for the base character.) + * + * The PangoGlyphVisAttr is used to communicate information between + * the shaping phase and the rendering phase. More attributes may be + * added in the future. + */ +struct _PangoGlyphVisAttr +{ + guint is_cluster_start : 1; +}; + +/* A single glyph + */ +/** + * PangoGlyphInfo: + * @glyph: the glyph itself. + * @geometry: the positional information about the glyph. + * @attr: the visual attributes of the glyph. + * + * The #PangoGlyphInfo structure represents a single glyph together with + * positioning information and visual attributes. + * It contains the following fields. + */ +struct _PangoGlyphInfo +{ + PangoGlyph glyph; + PangoGlyphGeometry geometry; + PangoGlyphVisAttr attr; +}; + +/* A string of glyphs with positional information and visual attributes - + * ready for drawing + */ +/** + * PangoGlyphString: + * @num_glyphs: number of the glyphs in this glyph string. + * @glyphs: (array length=num_glyphs): array of glyph information + * for the glyph string. + * @log_clusters: logical cluster info, indexed by the byte index + * within the text corresponding to the glyph string. + * + * The #PangoGlyphString structure is used to store strings + * of glyphs with geometry and visual attribute information. + * The storage for the glyph information is owned + * by the structure which simplifies memory management. + */ +struct _PangoGlyphString { + gint num_glyphs; + + PangoGlyphInfo *glyphs; + + /* This is a memory inefficient way of representing the information + * here - each value gives the byte index within the text + * corresponding to the glyph string of the start of the cluster to + * which the glyph belongs. + */ + gint *log_clusters; + + /*< private >*/ + gint space; +}; + +/** + * PANGO_TYPE_GLYPH_STRING: + * + * The #GObject type for #PangoGlyphString. + */ +#define PANGO_TYPE_GLYPH_STRING (pango_glyph_string_get_type ()) + +PANGO_AVAILABLE_IN_ALL +PangoGlyphString *pango_glyph_string_new (void); +PANGO_AVAILABLE_IN_ALL +void pango_glyph_string_set_size (PangoGlyphString *string, + gint new_len); +PANGO_AVAILABLE_IN_ALL +GType pango_glyph_string_get_type (void) G_GNUC_CONST; +PANGO_AVAILABLE_IN_ALL +PangoGlyphString *pango_glyph_string_copy (PangoGlyphString *string); +PANGO_AVAILABLE_IN_ALL +void pango_glyph_string_free (PangoGlyphString *string); +PANGO_AVAILABLE_IN_ALL +void pango_glyph_string_extents (PangoGlyphString *glyphs, + PangoFont *font, + PangoRectangle *ink_rect, + PangoRectangle *logical_rect); +PANGO_AVAILABLE_IN_1_14 +int pango_glyph_string_get_width(PangoGlyphString *glyphs); + +PANGO_AVAILABLE_IN_ALL +void pango_glyph_string_extents_range (PangoGlyphString *glyphs, + int start, + int end, + PangoFont *font, + PangoRectangle *ink_rect, + PangoRectangle *logical_rect); + +PANGO_AVAILABLE_IN_ALL +void pango_glyph_string_get_logical_widths (PangoGlyphString *glyphs, + const char *text, + int length, + int embedding_level, + int *logical_widths); + +PANGO_AVAILABLE_IN_ALL +void pango_glyph_string_index_to_x (PangoGlyphString *glyphs, + char *text, + int length, + PangoAnalysis *analysis, + int index_, + gboolean trailing, + int *x_pos); +PANGO_AVAILABLE_IN_ALL +void pango_glyph_string_x_to_index (PangoGlyphString *glyphs, + char *text, + int length, + PangoAnalysis *analysis, + int x_pos, + int *index_, + int *trailing); + +/* Turn a string of characters into a string of glyphs + */ +PANGO_AVAILABLE_IN_ALL +void pango_shape (const gchar *text, + gint length, + const PangoAnalysis *analysis, + PangoGlyphString *glyphs); + +PANGO_AVAILABLE_IN_1_32 +void pango_shape_full (const gchar *item_text, + gint item_length, + const gchar *paragraph_text, + gint paragraph_length, + const PangoAnalysis *analysis, + PangoGlyphString *glyphs); + +PANGO_AVAILABLE_IN_ALL +GList *pango_reorder_items (GList *logical_items); + +G_END_DECLS + +#endif /* __PANGO_GLYPH_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-gravity.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-gravity.h new file mode 100755 index 00000000..63c29e5e --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-gravity.h @@ -0,0 +1,132 @@ +/* Pango + * pango-gravity.h: Gravity routines + * + * Copyright (C) 2006, 2007 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_GRAVITY_H__ +#define __PANGO_GRAVITY_H__ + +#include <glib.h> + +G_BEGIN_DECLS + +/** + * PangoGravity: + * @PANGO_GRAVITY_SOUTH: Glyphs stand upright (default) + * @PANGO_GRAVITY_EAST: Glyphs are rotated 90 degrees clockwise + * @PANGO_GRAVITY_NORTH: Glyphs are upside-down + * @PANGO_GRAVITY_WEST: Glyphs are rotated 90 degrees counter-clockwise + * @PANGO_GRAVITY_AUTO: Gravity is resolved from the context matrix + * + * The #PangoGravity type represents the orientation of glyphs in a segment + * of text. This is useful when rendering vertical text layouts. In + * those situations, the layout is rotated using a non-identity PangoMatrix, + * and then glyph orientation is controlled using #PangoGravity. + * Not every value in this enumeration makes sense for every usage of + * #PangoGravity; for example, %PANGO_GRAVITY_AUTO only can be passed to + * pango_context_set_base_gravity() and can only be returned by + * pango_context_get_base_gravity(). + * + * See also: #PangoGravityHint + * + * Since: 1.16 + **/ +typedef enum { + PANGO_GRAVITY_SOUTH, + PANGO_GRAVITY_EAST, + PANGO_GRAVITY_NORTH, + PANGO_GRAVITY_WEST, + PANGO_GRAVITY_AUTO +} PangoGravity; + +/** + * PangoGravityHint: + * @PANGO_GRAVITY_HINT_NATURAL: scripts will take their natural gravity based + * on the base gravity and the script. This is the default. + * @PANGO_GRAVITY_HINT_STRONG: always use the base gravity set, regardless of + * the script. + * @PANGO_GRAVITY_HINT_LINE: for scripts not in their natural direction (eg. + * Latin in East gravity), choose per-script gravity such that every script + * respects the line progression. This means, Latin and Arabic will take + * opposite gravities and both flow top-to-bottom for example. + * + * The #PangoGravityHint defines how horizontal scripts should behave in a + * vertical context. That is, English excerpt in a vertical paragraph for + * example. + * + * See #PangoGravity. + * + * Since: 1.16 + **/ +typedef enum { + PANGO_GRAVITY_HINT_NATURAL, + PANGO_GRAVITY_HINT_STRONG, + PANGO_GRAVITY_HINT_LINE +} PangoGravityHint; + +/** + * PANGO_GRAVITY_IS_VERTICAL: + * @gravity: the #PangoGravity to check + * + * Whether a #PangoGravity represents vertical writing directions. + * + * Returns: %TRUE if @gravity is %PANGO_GRAVITY_EAST or %PANGO_GRAVITY_WEST, + * %FALSE otherwise. + * + * Since: 1.16 + **/ +#define PANGO_GRAVITY_IS_VERTICAL(gravity) \ + ((gravity) == PANGO_GRAVITY_EAST || (gravity) == PANGO_GRAVITY_WEST) + +/** + * PANGO_GRAVITY_IS_IMPROPER: + * @gravity: the #PangoGravity to check + * + * Whether a #PangoGravity represents a gravity that results in reversal of text direction. + * + * Returns: %TRUE if @gravity is %PANGO_GRAVITY_WEST or %PANGO_GRAVITY_NORTH, + * %FALSE otherwise. + * + * Since: 1.32 + **/ +#define PANGO_GRAVITY_IS_IMPROPER(gravity) \ + ((gravity) == PANGO_GRAVITY_WEST || (gravity) == PANGO_GRAVITY_NORTH) + +#include <pango/pango-matrix.h> +#include <pango/pango-script.h> + +PANGO_AVAILABLE_IN_1_16 +double pango_gravity_to_rotation (PangoGravity gravity) G_GNUC_CONST; +PANGO_AVAILABLE_IN_1_16 +PangoGravity pango_gravity_get_for_matrix (const PangoMatrix *matrix) G_GNUC_PURE; +PANGO_AVAILABLE_IN_1_16 +PangoGravity pango_gravity_get_for_script (PangoScript script, + PangoGravity base_gravity, + PangoGravityHint hint) G_GNUC_CONST; +PANGO_AVAILABLE_IN_1_26 +PangoGravity pango_gravity_get_for_script_and_width + (PangoScript script, + gboolean wide, + PangoGravity base_gravity, + PangoGravityHint hint) G_GNUC_CONST; + + +G_END_DECLS + +#endif /* __PANGO_GRAVITY_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-item.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-item.h new file mode 100755 index 00000000..cb6a7ed3 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-item.h @@ -0,0 +1,118 @@ +/* Pango + * pango-item.h: Structure for storing run information + * + * Copyright (C) 2000 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_ITEM_H__ +#define __PANGO_ITEM_H__ + +#include <pango/pango-types.h> + +G_BEGIN_DECLS + +typedef struct _PangoAnalysis PangoAnalysis; +typedef struct _PangoItem PangoItem; + +/** + * PANGO_ANALYSIS_FLAG_CENTERED_BASELINE: + * + * Whether the segment should be shifted to center around the baseline. + * Used in vertical writing directions mostly. + * + * Since: 1.16 + */ +#define PANGO_ANALYSIS_FLAG_CENTERED_BASELINE (1 << 0) + +/** + * PANGO_ANALYSIS_FLAG_IS_ELLIPSIS: + * + * This flag is used to mark runs that hold ellipsized text, + * in an ellipsized layout. + * + * Since: 1.36.7 + */ +#define PANGO_ANALYSIS_FLAG_IS_ELLIPSIS (1 << 1) + +/** + * PangoAnalysis: + * @shape_engine: the engine for doing rendering-system-dependent processing. + * @lang_engine: the engine for doing rendering-system-independent processing. + * @font: the font for this segment. + * @level: the bidirectional level for this segment. + * @gravity: the glyph orientation for this segment (A #PangoGravity). + * @flags: boolean flags for this segment (currently only one) (Since: 1.16). + * @script: the detected script for this segment (A #PangoScript) (Since: 1.18). + * @language: the detected language for this segment. + * @extra_attrs: extra attributes for this segment. + * + * The #PangoAnalysis structure stores information about + * the properties of a segment of text. + */ +struct _PangoAnalysis +{ + PangoEngineShape *shape_engine; + PangoEngineLang *lang_engine; + PangoFont *font; + + guint8 level; + guint8 gravity; /* PangoGravity */ + guint8 flags; + + guint8 script; /* PangoScript */ + PangoLanguage *language; + + GSList *extra_attrs; +}; + +/** + * PangoItem: + * @offset: byte offset of the start of this item in text. + * @length: length of this item in bytes. + * @num_chars: number of Unicode characters in the item. + * @analysis: analysis results for the item. + * + * The #PangoItem structure stores information about a segment of text. + */ +struct _PangoItem +{ + gint offset; + gint length; + gint num_chars; + PangoAnalysis analysis; +}; + +#define PANGO_TYPE_ITEM (pango_item_get_type ()) + +PANGO_AVAILABLE_IN_ALL +GType pango_item_get_type (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_ALL +PangoItem *pango_item_new (void); +PANGO_AVAILABLE_IN_ALL +PangoItem *pango_item_copy (PangoItem *item); +PANGO_AVAILABLE_IN_ALL +void pango_item_free (PangoItem *item); +PANGO_AVAILABLE_IN_ALL +PangoItem *pango_item_split (PangoItem *orig, + int split_index, + int split_offset); + +G_END_DECLS + +#endif /* __PANGO_ITEM_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-language.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-language.h new file mode 100755 index 00000000..2ab07bc0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-language.h @@ -0,0 +1,71 @@ +/* Pango + * pango-language.h: Language handling routines + * + * Copyright (C) 1999 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_LANGUAGE_H__ +#define __PANGO_LANGUAGE_H__ + +#include <glib.h> +#include <glib-object.h> + +#include <pango/pango-version-macros.h> + +G_BEGIN_DECLS + +typedef struct _PangoLanguage PangoLanguage; + +/** + * PANGO_TYPE_LANGUAGE: + * + * The #GObject type for #PangoLanguage. + */ +#define PANGO_TYPE_LANGUAGE (pango_language_get_type ()) + +PANGO_AVAILABLE_IN_ALL +GType pango_language_get_type (void) G_GNUC_CONST; +PANGO_AVAILABLE_IN_ALL +PangoLanguage *pango_language_from_string (const char *language); + +PANGO_AVAILABLE_IN_ALL +const char *pango_language_to_string (PangoLanguage *language) G_GNUC_CONST; +/* For back compat. Will have to keep indefinitely. */ +#define pango_language_to_string(language) ((const char *)language) + +PANGO_AVAILABLE_IN_ALL +const char *pango_language_get_sample_string (PangoLanguage *language) G_GNUC_CONST; +PANGO_AVAILABLE_IN_1_16 +PangoLanguage *pango_language_get_default (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_ALL +gboolean pango_language_matches (PangoLanguage *language, + const char *range_list) G_GNUC_PURE; + +#include <pango/pango-script.h> + +PANGO_AVAILABLE_IN_1_4 +gboolean pango_language_includes_script (PangoLanguage *language, + PangoScript script) G_GNUC_PURE; +PANGO_AVAILABLE_IN_1_22 +const PangoScript *pango_language_get_scripts (PangoLanguage *language, + int *num_scripts); + +G_END_DECLS + +#endif /* __PANGO_LANGUAGE_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-layout.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-layout.h new file mode 100755 index 00000000..b095a303 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-layout.h @@ -0,0 +1,430 @@ +/* Pango + * pango-layout.h: High-level layout driver + * + * Copyright (C) 2000 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_LAYOUT_H__ +#define __PANGO_LAYOUT_H__ + +#include <pango/pango-attributes.h> +#include <pango/pango-context.h> +#include <pango/pango-glyph-item.h> +#include <pango/pango-tabs.h> + +G_BEGIN_DECLS + +typedef struct _PangoLayout PangoLayout; +typedef struct _PangoLayoutClass PangoLayoutClass; +typedef struct _PangoLayoutLine PangoLayoutLine; + +/** + * PangoLayoutRun: + * + * The #PangoLayoutRun structure represents a single run within + * a #PangoLayoutLine; it is simply an alternate name for + * #PangoGlyphItem. + * See the #PangoGlyphItem docs for details on the fields. + */ +typedef PangoGlyphItem PangoLayoutRun; + +/** + * PangoAlignment: + * @PANGO_ALIGN_LEFT: Put all available space on the right + * @PANGO_ALIGN_CENTER: Center the line within the available space + * @PANGO_ALIGN_RIGHT: Put all available space on the left + * + * A #PangoAlignment describes how to align the lines of a #PangoLayout within the + * available space. If the #PangoLayout is set to justify + * using pango_layout_set_justify(), this only has effect for partial lines. + */ +typedef enum { + PANGO_ALIGN_LEFT, + PANGO_ALIGN_CENTER, + PANGO_ALIGN_RIGHT +} PangoAlignment; + +/** + * PangoWrapMode: + * @PANGO_WRAP_WORD: wrap lines at word boundaries. + * @PANGO_WRAP_CHAR: wrap lines at character boundaries. + * @PANGO_WRAP_WORD_CHAR: wrap lines at word boundaries, but fall back to character boundaries if there is not + * enough space for a full word. + * + * A #PangoWrapMode describes how to wrap the lines of a #PangoLayout to the desired width. + */ +typedef enum { + PANGO_WRAP_WORD, + PANGO_WRAP_CHAR, + PANGO_WRAP_WORD_CHAR +} PangoWrapMode; + +/** + * PangoEllipsizeMode: + * @PANGO_ELLIPSIZE_NONE: No ellipsization + * @PANGO_ELLIPSIZE_START: Omit characters at the start of the text + * @PANGO_ELLIPSIZE_MIDDLE: Omit characters in the middle of the text + * @PANGO_ELLIPSIZE_END: Omit characters at the end of the text + * + * The #PangoEllipsizeMode type describes what sort of (if any) + * ellipsization should be applied to a line of text. In + * the ellipsization process characters are removed from the + * text in order to make it fit to a given width and replaced + * with an ellipsis. + */ +typedef enum { + PANGO_ELLIPSIZE_NONE, + PANGO_ELLIPSIZE_START, + PANGO_ELLIPSIZE_MIDDLE, + PANGO_ELLIPSIZE_END +} PangoEllipsizeMode; + +/** + * PangoLayoutLine: + * @layout: (allow-none): the layout this line belongs to, might be %NULL + * @start_index: start of line as byte index into layout->text + * @length: length of line in bytes + * @runs: (allow-none) (element-type Pango.LayoutRun): list of runs in the + * line, from left to right + * @is_paragraph_start: #TRUE if this is the first line of the paragraph + * @resolved_dir: #Resolved PangoDirection of line + * + * The #PangoLayoutLine structure represents one of the lines resulting + * from laying out a paragraph via #PangoLayout. #PangoLayoutLine + * structures are obtained by calling pango_layout_get_line() and + * are only valid until the text, attributes, or settings of the + * parent #PangoLayout are modified. + * + * Routines for rendering PangoLayout objects are provided in + * code specific to each rendering system. + */ +struct _PangoLayoutLine +{ + PangoLayout *layout; + gint start_index; /* start of line as byte index into layout->text */ + gint length; /* length of line in bytes */ + GSList *runs; + guint is_paragraph_start : 1; /* TRUE if this is the first line of the paragraph */ + guint resolved_dir : 3; /* Resolved PangoDirection of line */ +}; + +#define PANGO_TYPE_LAYOUT (pango_layout_get_type ()) +#define PANGO_LAYOUT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_LAYOUT, PangoLayout)) +#define PANGO_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_LAYOUT, PangoLayoutClass)) +#define PANGO_IS_LAYOUT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_LAYOUT)) +#define PANGO_IS_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_LAYOUT)) +#define PANGO_LAYOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_LAYOUT, PangoLayoutClass)) + +/* The PangoLayout and PangoLayoutClass structs are private; if you + * need to create a subclass of these, file a bug. + */ + +PANGO_AVAILABLE_IN_ALL +GType pango_layout_get_type (void) G_GNUC_CONST; +PANGO_AVAILABLE_IN_ALL +PangoLayout *pango_layout_new (PangoContext *context); +PANGO_AVAILABLE_IN_ALL +PangoLayout *pango_layout_copy (PangoLayout *src); + +PANGO_AVAILABLE_IN_ALL +PangoContext *pango_layout_get_context (PangoLayout *layout); + +PANGO_AVAILABLE_IN_ALL +void pango_layout_set_attributes (PangoLayout *layout, + PangoAttrList *attrs); +PANGO_AVAILABLE_IN_ALL +PangoAttrList *pango_layout_get_attributes (PangoLayout *layout); + +PANGO_AVAILABLE_IN_ALL +void pango_layout_set_text (PangoLayout *layout, + const char *text, + int length); +PANGO_AVAILABLE_IN_ALL +const char *pango_layout_get_text (PangoLayout *layout); + +PANGO_AVAILABLE_IN_1_30 +gint pango_layout_get_character_count (PangoLayout *layout); + +PANGO_AVAILABLE_IN_ALL +void pango_layout_set_markup (PangoLayout *layout, + const char *markup, + int length); + +PANGO_AVAILABLE_IN_ALL +void pango_layout_set_markup_with_accel (PangoLayout *layout, + const char *markup, + int length, + gunichar accel_marker, + gunichar *accel_char); + +PANGO_AVAILABLE_IN_ALL +void pango_layout_set_font_description (PangoLayout *layout, + const PangoFontDescription *desc); + +PANGO_AVAILABLE_IN_1_8 +const PangoFontDescription *pango_layout_get_font_description (PangoLayout *layout); + +PANGO_AVAILABLE_IN_ALL +void pango_layout_set_width (PangoLayout *layout, + int width); +PANGO_AVAILABLE_IN_ALL +int pango_layout_get_width (PangoLayout *layout); +PANGO_AVAILABLE_IN_1_20 +void pango_layout_set_height (PangoLayout *layout, + int height); +PANGO_AVAILABLE_IN_1_20 +int pango_layout_get_height (PangoLayout *layout); +PANGO_AVAILABLE_IN_ALL +void pango_layout_set_wrap (PangoLayout *layout, + PangoWrapMode wrap); +PANGO_AVAILABLE_IN_ALL +PangoWrapMode pango_layout_get_wrap (PangoLayout *layout); +PANGO_AVAILABLE_IN_1_16 +gboolean pango_layout_is_wrapped (PangoLayout *layout); +PANGO_AVAILABLE_IN_ALL +void pango_layout_set_indent (PangoLayout *layout, + int indent); +PANGO_AVAILABLE_IN_ALL +int pango_layout_get_indent (PangoLayout *layout); +PANGO_AVAILABLE_IN_ALL +void pango_layout_set_spacing (PangoLayout *layout, + int spacing); +PANGO_AVAILABLE_IN_ALL +int pango_layout_get_spacing (PangoLayout *layout); +PANGO_AVAILABLE_IN_ALL +void pango_layout_set_justify (PangoLayout *layout, + gboolean justify); +PANGO_AVAILABLE_IN_ALL +gboolean pango_layout_get_justify (PangoLayout *layout); +PANGO_AVAILABLE_IN_1_4 +void pango_layout_set_auto_dir (PangoLayout *layout, + gboolean auto_dir); +PANGO_AVAILABLE_IN_1_4 +gboolean pango_layout_get_auto_dir (PangoLayout *layout); +PANGO_AVAILABLE_IN_ALL +void pango_layout_set_alignment (PangoLayout *layout, + PangoAlignment alignment); +PANGO_AVAILABLE_IN_ALL +PangoAlignment pango_layout_get_alignment (PangoLayout *layout); + +PANGO_AVAILABLE_IN_ALL +void pango_layout_set_tabs (PangoLayout *layout, + PangoTabArray *tabs); + +PANGO_AVAILABLE_IN_ALL +PangoTabArray* pango_layout_get_tabs (PangoLayout *layout); + +PANGO_AVAILABLE_IN_ALL +void pango_layout_set_single_paragraph_mode (PangoLayout *layout, + gboolean setting); +PANGO_AVAILABLE_IN_ALL +gboolean pango_layout_get_single_paragraph_mode (PangoLayout *layout); + +PANGO_AVAILABLE_IN_1_6 +void pango_layout_set_ellipsize (PangoLayout *layout, + PangoEllipsizeMode ellipsize); +PANGO_AVAILABLE_IN_1_6 +PangoEllipsizeMode pango_layout_get_ellipsize (PangoLayout *layout); +PANGO_AVAILABLE_IN_1_16 +gboolean pango_layout_is_ellipsized (PangoLayout *layout); + +PANGO_AVAILABLE_IN_1_16 +int pango_layout_get_unknown_glyphs_count (PangoLayout *layout); + +PANGO_AVAILABLE_IN_ALL +void pango_layout_context_changed (PangoLayout *layout); +PANGO_AVAILABLE_IN_1_32 +guint pango_layout_get_serial (PangoLayout *layout); + +PANGO_AVAILABLE_IN_ALL +void pango_layout_get_log_attrs (PangoLayout *layout, + PangoLogAttr **attrs, + gint *n_attrs); + +PANGO_AVAILABLE_IN_1_30 +const PangoLogAttr *pango_layout_get_log_attrs_readonly (PangoLayout *layout, + gint *n_attrs); + +PANGO_AVAILABLE_IN_ALL +void pango_layout_index_to_pos (PangoLayout *layout, + int index_, + PangoRectangle *pos); +PANGO_AVAILABLE_IN_ALL +void pango_layout_index_to_line_x (PangoLayout *layout, + int index_, + gboolean trailing, + int *line, + int *x_pos); +PANGO_AVAILABLE_IN_ALL +void pango_layout_get_cursor_pos (PangoLayout *layout, + int index_, + PangoRectangle *strong_pos, + PangoRectangle *weak_pos); +PANGO_AVAILABLE_IN_ALL +void pango_layout_move_cursor_visually (PangoLayout *layout, + gboolean strong, + int old_index, + int old_trailing, + int direction, + int *new_index, + int *new_trailing); +PANGO_AVAILABLE_IN_ALL +gboolean pango_layout_xy_to_index (PangoLayout *layout, + int x, + int y, + int *index_, + int *trailing); +PANGO_AVAILABLE_IN_ALL +void pango_layout_get_extents (PangoLayout *layout, + PangoRectangle *ink_rect, + PangoRectangle *logical_rect); +PANGO_AVAILABLE_IN_ALL +void pango_layout_get_pixel_extents (PangoLayout *layout, + PangoRectangle *ink_rect, + PangoRectangle *logical_rect); +PANGO_AVAILABLE_IN_ALL +void pango_layout_get_size (PangoLayout *layout, + int *width, + int *height); +PANGO_AVAILABLE_IN_ALL +void pango_layout_get_pixel_size (PangoLayout *layout, + int *width, + int *height); +PANGO_AVAILABLE_IN_1_22 +int pango_layout_get_baseline (PangoLayout *layout); + +PANGO_AVAILABLE_IN_ALL +int pango_layout_get_line_count (PangoLayout *layout); +PANGO_AVAILABLE_IN_ALL +PangoLayoutLine *pango_layout_get_line (PangoLayout *layout, + int line); +PANGO_AVAILABLE_IN_1_16 +PangoLayoutLine *pango_layout_get_line_readonly (PangoLayout *layout, + int line); +PANGO_AVAILABLE_IN_ALL +GSList * pango_layout_get_lines (PangoLayout *layout); +PANGO_AVAILABLE_IN_1_16 +GSList * pango_layout_get_lines_readonly (PangoLayout *layout); + + +#define PANGO_TYPE_LAYOUT_LINE (pango_layout_line_get_type ()) + +PANGO_AVAILABLE_IN_ALL +GType pango_layout_line_get_type (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_1_10 +PangoLayoutLine *pango_layout_line_ref (PangoLayoutLine *line); +PANGO_AVAILABLE_IN_ALL +void pango_layout_line_unref (PangoLayoutLine *line); + +PANGO_AVAILABLE_IN_ALL +gboolean pango_layout_line_x_to_index (PangoLayoutLine *line, + int x_pos, + int *index_, + int *trailing); +PANGO_AVAILABLE_IN_ALL +void pango_layout_line_index_to_x (PangoLayoutLine *line, + int index_, + gboolean trailing, + int *x_pos); +PANGO_AVAILABLE_IN_ALL +void pango_layout_line_get_x_ranges (PangoLayoutLine *line, + int start_index, + int end_index, + int **ranges, + int *n_ranges); +PANGO_AVAILABLE_IN_ALL +void pango_layout_line_get_extents (PangoLayoutLine *line, + PangoRectangle *ink_rect, + PangoRectangle *logical_rect); +PANGO_AVAILABLE_IN_ALL +void pango_layout_line_get_pixel_extents (PangoLayoutLine *layout_line, + PangoRectangle *ink_rect, + PangoRectangle *logical_rect); + +typedef struct _PangoLayoutIter PangoLayoutIter; + +#define PANGO_TYPE_LAYOUT_ITER (pango_layout_iter_get_type ()) + +PANGO_AVAILABLE_IN_ALL +GType pango_layout_iter_get_type (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_ALL +PangoLayoutIter *pango_layout_get_iter (PangoLayout *layout); +PANGO_AVAILABLE_IN_1_20 +PangoLayoutIter *pango_layout_iter_copy (PangoLayoutIter *iter); +PANGO_AVAILABLE_IN_ALL +void pango_layout_iter_free (PangoLayoutIter *iter); + +PANGO_AVAILABLE_IN_ALL +int pango_layout_iter_get_index (PangoLayoutIter *iter); +PANGO_AVAILABLE_IN_ALL +PangoLayoutRun *pango_layout_iter_get_run (PangoLayoutIter *iter); +PANGO_AVAILABLE_IN_1_16 +PangoLayoutRun *pango_layout_iter_get_run_readonly (PangoLayoutIter *iter); +PANGO_AVAILABLE_IN_ALL +PangoLayoutLine *pango_layout_iter_get_line (PangoLayoutIter *iter); +PANGO_AVAILABLE_IN_1_16 +PangoLayoutLine *pango_layout_iter_get_line_readonly (PangoLayoutIter *iter); +PANGO_AVAILABLE_IN_ALL +gboolean pango_layout_iter_at_last_line (PangoLayoutIter *iter); +PANGO_AVAILABLE_IN_1_20 +PangoLayout *pango_layout_iter_get_layout (PangoLayoutIter *iter); + +PANGO_AVAILABLE_IN_ALL +gboolean pango_layout_iter_next_char (PangoLayoutIter *iter); +PANGO_AVAILABLE_IN_ALL +gboolean pango_layout_iter_next_cluster (PangoLayoutIter *iter); +PANGO_AVAILABLE_IN_ALL +gboolean pango_layout_iter_next_run (PangoLayoutIter *iter); +PANGO_AVAILABLE_IN_ALL +gboolean pango_layout_iter_next_line (PangoLayoutIter *iter); + +PANGO_AVAILABLE_IN_ALL +void pango_layout_iter_get_char_extents (PangoLayoutIter *iter, + PangoRectangle *logical_rect); +PANGO_AVAILABLE_IN_ALL +void pango_layout_iter_get_cluster_extents (PangoLayoutIter *iter, + PangoRectangle *ink_rect, + PangoRectangle *logical_rect); +PANGO_AVAILABLE_IN_ALL +void pango_layout_iter_get_run_extents (PangoLayoutIter *iter, + PangoRectangle *ink_rect, + PangoRectangle *logical_rect); +PANGO_AVAILABLE_IN_ALL +void pango_layout_iter_get_line_extents (PangoLayoutIter *iter, + PangoRectangle *ink_rect, + PangoRectangle *logical_rect); +/* All the yranges meet, unlike the logical_rect's (i.e. the yranges + * assign between-line spacing to the nearest line) + */ +PANGO_AVAILABLE_IN_ALL +void pango_layout_iter_get_line_yrange (PangoLayoutIter *iter, + int *y0_, + int *y1_); +PANGO_AVAILABLE_IN_ALL +void pango_layout_iter_get_layout_extents (PangoLayoutIter *iter, + PangoRectangle *ink_rect, + PangoRectangle *logical_rect); +PANGO_AVAILABLE_IN_ALL +int pango_layout_iter_get_baseline (PangoLayoutIter *iter); + +G_END_DECLS + +#endif /* __PANGO_LAYOUT_H__ */ + diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-matrix.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-matrix.h new file mode 100755 index 00000000..9ec37042 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-matrix.h @@ -0,0 +1,132 @@ +/* Pango + * pango-matrix.h: Matrix manipulation routines + * + * Copyright (C) 2002, 2006 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_MATRIX_H__ +#define __PANGO_MATRIX_H__ + +#include <glib.h> +#include <glib-object.h> + +G_BEGIN_DECLS + +typedef struct _PangoMatrix PangoMatrix; + +/** + * PangoMatrix: + * @xx: 1st component of the transformation matrix + * @xy: 2nd component of the transformation matrix + * @yx: 3rd component of the transformation matrix + * @yy: 4th component of the transformation matrix + * @x0: x translation + * @y0: y translation + * + * A structure specifying a transformation between user-space + * coordinates and device coordinates. The transformation + * is given by + * + * <programlisting> + * x_device = x_user * matrix->xx + y_user * matrix->xy + matrix->x0; + * y_device = x_user * matrix->yx + y_user * matrix->yy + matrix->y0; + * </programlisting> + * + * Since: 1.6 + **/ +struct _PangoMatrix +{ + double xx; + double xy; + double yx; + double yy; + double x0; + double y0; +}; + +/** + * PANGO_TYPE_MATRIX: + * + * The GObject type for #PangoMatrix + **/ +#define PANGO_TYPE_MATRIX (pango_matrix_get_type ()) + +/** + * PANGO_MATRIX_INIT: + * + * Constant that can be used to initialize a PangoMatrix to + * the identity transform. + * + * <informalexample><programlisting> + * PangoMatrix matrix = PANGO_MATRIX_INIT; + * pango_matrix_rotate (&matrix, 45.); + * </programlisting></informalexample> + * + * Since: 1.6 + **/ +#define PANGO_MATRIX_INIT { 1., 0., 0., 1., 0., 0. } + +/* for PangoRectangle */ +#include <pango/pango-types.h> + +PANGO_AVAILABLE_IN_1_6 +GType pango_matrix_get_type (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_1_6 +PangoMatrix *pango_matrix_copy (const PangoMatrix *matrix); +PANGO_AVAILABLE_IN_1_6 +void pango_matrix_free (PangoMatrix *matrix); + +PANGO_AVAILABLE_IN_1_6 +void pango_matrix_translate (PangoMatrix *matrix, + double tx, + double ty); +PANGO_AVAILABLE_IN_1_6 +void pango_matrix_scale (PangoMatrix *matrix, + double scale_x, + double scale_y); +PANGO_AVAILABLE_IN_1_6 +void pango_matrix_rotate (PangoMatrix *matrix, + double degrees); +PANGO_AVAILABLE_IN_1_6 +void pango_matrix_concat (PangoMatrix *matrix, + const PangoMatrix *new_matrix); +PANGO_AVAILABLE_IN_1_16 +void pango_matrix_transform_point (const PangoMatrix *matrix, + double *x, + double *y); +PANGO_AVAILABLE_IN_1_16 +void pango_matrix_transform_distance (const PangoMatrix *matrix, + double *dx, + double *dy); +PANGO_AVAILABLE_IN_1_16 +void pango_matrix_transform_rectangle (const PangoMatrix *matrix, + PangoRectangle *rect); +PANGO_AVAILABLE_IN_1_16 +void pango_matrix_transform_pixel_rectangle (const PangoMatrix *matrix, + PangoRectangle *rect); +PANGO_AVAILABLE_IN_1_12 +double pango_matrix_get_font_scale_factor (const PangoMatrix *matrix) G_GNUC_PURE; +PANGO_AVAILABLE_IN_1_38 +void pango_matrix_get_font_scale_factors (const PangoMatrix *matrix, + double *xscale, double *yscale); + + +G_END_DECLS + +#endif /* __PANGO_MATRIX_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-modules.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-modules.h new file mode 100755 index 00000000..82230b6c --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-modules.h @@ -0,0 +1,77 @@ +/* Pango + * pango-modules.h: + * + * Copyright (C) 1999 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_MODULES_H__ +#define __PANGO_MODULES_H__ + +#include <pango/pango-engine.h> + +G_BEGIN_DECLS + +#ifdef PANGO_ENABLE_BACKEND + +typedef struct _PangoMap PangoMap; +typedef struct _PangoMapEntry PangoMapEntry; + +typedef struct _PangoIncludedModule PangoIncludedModule; + +/** + * PangoIncludedModule: + * @list: a function that lists the engines defined in this module. + * @init: a function to initialize the module. + * @exit: a function to finalize the module. + * @create: a function to create an engine, given the engine name. + * + * The #PangoIncludedModule structure for a statically linked module + * contains the functions that would otherwise be loaded from a dynamically + * loaded module. + * + * Deprecated: 1.38 + */ +struct _PangoIncludedModule +{ + void (*list) (PangoEngineInfo **engines, + int *n_engines); + void (*init) (GTypeModule *module); + void (*exit) (void); + PangoEngine *(*create) (const char *id); +}; + +PANGO_DEPRECATED_IN_1_38 +PangoMap * pango_find_map (PangoLanguage *language, + guint engine_type_id, + guint render_type_id); +PANGO_DEPRECATED_IN_1_38 +PangoEngine * pango_map_get_engine (PangoMap *map, + PangoScript script); +PANGO_DEPRECATED_IN_1_38 +void pango_map_get_engines (PangoMap *map, + PangoScript script, + GSList **exact_engines, + GSList **fallback_engines); +PANGO_DEPRECATED_IN_1_38 +void pango_module_register (PangoIncludedModule *module); + +#endif /* PANGO_ENABLE_BACKEND */ + +G_END_DECLS + +#endif /* __PANGO_MODULES_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-ot.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-ot.h new file mode 100755 index 00000000..45b1a1a6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-ot.h @@ -0,0 +1,396 @@ +/* Pango + * pango-ot.h: + * + * Copyright (C) 2000,2007 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_OT_H__ +#define __PANGO_OT_H__ + +/* Deprecated. Use HarfBuzz directly! */ + +#include <pango/pangofc-font.h> +#include <pango/pango-glyph.h> +#include <pango/pango-font.h> +#include <pango/pango-script.h> +#include <pango/pango-language.h> + +G_BEGIN_DECLS + +#ifdef PANGO_ENABLE_ENGINE + +/** + * PangoOTTag: + * + * The #PangoOTTag typedef is used to represent TrueType and OpenType + * four letter tags inside Pango. Use PANGO_OT_TAG_MAKE() + * or PANGO_OT_TAG_MAKE_FROM_STRING() macros to create <type>PangoOTTag</type>s manually. + */ +typedef guint32 PangoOTTag; + +/** + * PANGO_OT_TAG_MAKE: + * @c1: First character. + * @c2: Second character. + * @c3: Third character. + * @c4: Fourth character. + * + * Creates a #PangoOTTag from four characters. This is similar and + * compatible with the <function>FT_MAKE_TAG()</function> macro from FreeType. + */ +/** + * PANGO_OT_TAG_MAKE_FROM_STRING: + * @s: The string representation of the tag. + * + * Creates a #PangoOTTag from a string. The string should be at least + * four characters long (pad with space characters if needed), and need + * not be nul-terminated. This is a convenience wrapper around + * PANGO_OT_TAG_MAKE(), but cannot be used in certain situations, for + * example, as a switch expression, as it dereferences pointers. + */ +#define PANGO_OT_TAG_MAKE(c1,c2,c3,c4) ((PangoOTTag) FT_MAKE_TAG (c1, c2, c3, c4)) +#define PANGO_OT_TAG_MAKE_FROM_STRING(s) (PANGO_OT_TAG_MAKE(((const char *) s)[0], \ + ((const char *) s)[1], \ + ((const char *) s)[2], \ + ((const char *) s)[3])) + +typedef struct _PangoOTInfo PangoOTInfo; +typedef struct _PangoOTBuffer PangoOTBuffer; +typedef struct _PangoOTGlyph PangoOTGlyph; +typedef struct _PangoOTRuleset PangoOTRuleset; +typedef struct _PangoOTFeatureMap PangoOTFeatureMap; +typedef struct _PangoOTRulesetDescription PangoOTRulesetDescription; + +/** + * PangoOTTableType: + * @PANGO_OT_TABLE_GSUB: The GSUB table. + * @PANGO_OT_TABLE_GPOS: The GPOS table. + * + * The <type>PangoOTTableType</type> enumeration values are used to + * identify the various OpenType tables in the + * <function>pango_ot_info_*</function> functions. + */ +typedef enum +{ + PANGO_OT_TABLE_GSUB, + PANGO_OT_TABLE_GPOS +} PangoOTTableType; + +/** + * PANGO_OT_ALL_GLYPHS: + * + * This is used as the property bit in pango_ot_ruleset_add_feature() when a + * feature should be applied to all glyphs. + * + * Since: 1.16 + */ +/** + * PANGO_OT_NO_FEATURE: + * + * This is used as a feature index that represent no feature, that is, should be + * skipped. It may be returned as feature index by pango_ot_info_find_feature() + * if the feature is not found, and pango_ot_ruleset_add_feature() function + * automatically skips this value, so no special handling is required by the user. + * + * Since: 1.18 + */ +/** + * PANGO_OT_NO_SCRIPT: + * + * This is used as a script index that represent no script, that is, when the + * requested script was not found, and a default ('DFLT') script was not found + * either. It may be returned as script index by pango_ot_info_find_script() + * if the script or a default script are not found, all other functions + * taking a script index essentially return if the input script index is + * this value, so no special handling is required by the user. + * + * Since: 1.18 + */ +/** + * PANGO_OT_DEFAULT_LANGUAGE: + * + * This is used as the language index in pango_ot_info_find_feature() when + * the default language system of the script is desired. + * + * It is also returned by pango_ot_info_find_language() if the requested language + * is not found, or the requested language tag was PANGO_OT_TAG_DEFAULT_LANGUAGE. + * The end result is that one can always call pango_ot_tag_from_language() + * followed by pango_ot_info_find_language() and pass the result to + * pango_ot_info_find_feature() without having to worry about falling back to + * default language system explicitly. + * + * Since: 1.16 + */ +#define PANGO_OT_ALL_GLYPHS ((guint) 0xFFFF) +#define PANGO_OT_NO_FEATURE ((guint) 0xFFFF) +#define PANGO_OT_NO_SCRIPT ((guint) 0xFFFF) +#define PANGO_OT_DEFAULT_LANGUAGE ((guint) 0xFFFF) + +/** + * PANGO_OT_TAG_DEFAULT_SCRIPT: + * + * This is a #PangoOTTag representing the special script tag 'DFLT'. It is + * returned as script tag by pango_ot_tag_from_script() if the requested script + * is not found. + * + * Since: 1.18 + */ +/** + * PANGO_OT_TAG_DEFAULT_LANGUAGE: + * + * This is a #PangoOTTag representing a special language tag 'dflt'. It is + * returned as language tag by pango_ot_tag_from_language() if the requested + * language is not found. It is safe to pass this value to + * pango_ot_info_find_language() as that function falls back to returning default + * language-system if the requested language tag is not found. + * + * Since: 1.18 + */ +#define PANGO_OT_TAG_DEFAULT_SCRIPT PANGO_OT_TAG_MAKE ('D', 'F', 'L', 'T') +#define PANGO_OT_TAG_DEFAULT_LANGUAGE PANGO_OT_TAG_MAKE ('d', 'f', 'l', 't') + +/* Note that this must match hb_glyph_info_t */ +/** + * PangoOTGlyph: + * @glyph: the glyph itself. + * @properties: the properties value, identifying which features should be + * applied on this glyph. See pango_ot_ruleset_add_feature(). + * @cluster: the cluster that this glyph belongs to. + * @component: a component value, set by the OpenType layout engine. + * @ligID: a ligature index value, set by the OpenType layout engine. + * @internal: for Pango internal use + * + * The #PangoOTGlyph structure represents a single glyph together with + * information used for OpenType layout processing of the glyph. + * It contains the following fields. + */ +struct _PangoOTGlyph +{ + guint32 glyph; + guint properties; + guint cluster; + gushort component; + gushort ligID; + + guint internal; +}; + +/** + * PangoOTFeatureMap: + * @feature_name: feature tag in represented as four-letter ASCII string. + * @property_bit: the property bit to use for this feature. See + * pango_ot_ruleset_add_feature() for details. + * + * The #PangoOTFeatureMap typedef is used to represent an OpenType + * feature with the property bit associated with it. The feature tag is + * represented as a char array instead of a #PangoOTTag for convenience. + * + * Since: 1.18 + */ +struct _PangoOTFeatureMap +{ + char feature_name[5]; + gulong property_bit; +}; + +/** + * PangoOTRulesetDescription: + * @script: a #PangoScript. + * @language: a #PangoLanguage. + * @static_gsub_features: (nullable): static map of GSUB features, + * or %NULL. + * @n_static_gsub_features: length of @static_gsub_features, or 0. + * @static_gpos_features: (nullable): static map of GPOS features, + * or %NULL. + * @n_static_gpos_features: length of @static_gpos_features, or 0. + * @other_features: (nullable): map of extra features to add to both + * GSUB and GPOS, or %NULL. Unlike the static maps, this pointer + * need not live beyond the life of function calls taking this + * struct. + * @n_other_features: length of @other_features, or 0. + * + * The #PangoOTRuleset structure holds all the information needed + * to build a complete #PangoOTRuleset from an OpenType font. + * The main use of this struct is to act as the key for a per-font + * hash of rulesets. The user populates a ruleset description and + * gets the ruleset using pango_ot_ruleset_get_for_description() + * or create a new one using pango_ot_ruleset_new_from_description(). + * + * Since: 1.18 + */ +struct _PangoOTRulesetDescription { + PangoScript script; + PangoLanguage *language; + const PangoOTFeatureMap *static_gsub_features; + guint n_static_gsub_features; + const PangoOTFeatureMap *static_gpos_features; + guint n_static_gpos_features; + const PangoOTFeatureMap *other_features; + guint n_other_features; +}; + + +#define PANGO_TYPE_OT_INFO (pango_ot_info_get_type ()) +#define PANGO_OT_INFO(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_OT_INFO, PangoOTInfo)) +#define PANGO_IS_OT_INFO(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_OT_INFO)) +PANGO_DEPRECATED +GType pango_ot_info_get_type (void) G_GNUC_CONST; + +#define PANGO_TYPE_OT_RULESET (pango_ot_ruleset_get_type ()) +#define PANGO_OT_RULESET(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_OT_RULESET, PangoOTRuleset)) +#define PANGO_IS_OT_RULESET(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_OT_RULESET)) +PANGO_DEPRECATED +GType pango_ot_ruleset_get_type (void) G_GNUC_CONST; + + +PANGO_DEPRECATED +PangoOTInfo *pango_ot_info_get (FT_Face face); + +PANGO_DEPRECATED +gboolean pango_ot_info_find_script (PangoOTInfo *info, + PangoOTTableType table_type, + PangoOTTag script_tag, + guint *script_index); + +PANGO_DEPRECATED +gboolean pango_ot_info_find_language (PangoOTInfo *info, + PangoOTTableType table_type, + guint script_index, + PangoOTTag language_tag, + guint *language_index, + guint *required_feature_index); +PANGO_DEPRECATED +gboolean pango_ot_info_find_feature (PangoOTInfo *info, + PangoOTTableType table_type, + PangoOTTag feature_tag, + guint script_index, + guint language_index, + guint *feature_index); + +PANGO_DEPRECATED +PangoOTTag *pango_ot_info_list_scripts (PangoOTInfo *info, + PangoOTTableType table_type); +PANGO_DEPRECATED +PangoOTTag *pango_ot_info_list_languages (PangoOTInfo *info, + PangoOTTableType table_type, + guint script_index, + PangoOTTag language_tag); +PANGO_DEPRECATED +PangoOTTag *pango_ot_info_list_features (PangoOTInfo *info, + PangoOTTableType table_type, + PangoOTTag tag, + guint script_index, + guint language_index); + +PANGO_DEPRECATED +PangoOTBuffer *pango_ot_buffer_new (PangoFcFont *font); +PANGO_DEPRECATED +void pango_ot_buffer_destroy (PangoOTBuffer *buffer); +PANGO_DEPRECATED +void pango_ot_buffer_clear (PangoOTBuffer *buffer); +PANGO_DEPRECATED +void pango_ot_buffer_set_rtl (PangoOTBuffer *buffer, + gboolean rtl); +PANGO_DEPRECATED +void pango_ot_buffer_add_glyph (PangoOTBuffer *buffer, + guint glyph, + guint properties, + guint cluster); +PANGO_DEPRECATED +void pango_ot_buffer_get_glyphs (const PangoOTBuffer *buffer, + PangoOTGlyph **glyphs, + int *n_glyphs); +PANGO_DEPRECATED +void pango_ot_buffer_output (const PangoOTBuffer *buffer, + PangoGlyphString *glyphs); + +PANGO_DEPRECATED +void pango_ot_buffer_set_zero_width_marks (PangoOTBuffer *buffer, + gboolean zero_width_marks); + +PANGO_DEPRECATED +const PangoOTRuleset *pango_ot_ruleset_get_for_description (PangoOTInfo *info, + const PangoOTRulesetDescription *desc); +PANGO_DEPRECATED +PangoOTRuleset *pango_ot_ruleset_new (PangoOTInfo *info); +PANGO_DEPRECATED +PangoOTRuleset *pango_ot_ruleset_new_for (PangoOTInfo *info, + PangoScript script, + PangoLanguage *language); +PANGO_DEPRECATED +PangoOTRuleset *pango_ot_ruleset_new_from_description (PangoOTInfo *info, + const PangoOTRulesetDescription *desc); +PANGO_DEPRECATED +void pango_ot_ruleset_add_feature (PangoOTRuleset *ruleset, + PangoOTTableType table_type, + guint feature_index, + gulong property_bit); +PANGO_DEPRECATED +gboolean pango_ot_ruleset_maybe_add_feature (PangoOTRuleset *ruleset, + PangoOTTableType table_type, + PangoOTTag feature_tag, + gulong property_bit); +PANGO_DEPRECATED +guint pango_ot_ruleset_maybe_add_features (PangoOTRuleset *ruleset, + PangoOTTableType table_type, + const PangoOTFeatureMap *features, + guint n_features); +PANGO_DEPRECATED +guint pango_ot_ruleset_get_feature_count (const PangoOTRuleset *ruleset, + guint *n_gsub_features, + guint *n_gpos_features); + +PANGO_DEPRECATED +void pango_ot_ruleset_substitute (const PangoOTRuleset *ruleset, + PangoOTBuffer *buffer); + +PANGO_DEPRECATED +void pango_ot_ruleset_position (const PangoOTRuleset *ruleset, + PangoOTBuffer *buffer); + +PANGO_DEPRECATED +PangoScript pango_ot_tag_to_script (PangoOTTag script_tag) G_GNUC_CONST; + +PANGO_DEPRECATED +PangoOTTag pango_ot_tag_from_script (PangoScript script) G_GNUC_CONST; + +PANGO_DEPRECATED +PangoLanguage *pango_ot_tag_to_language (PangoOTTag language_tag) G_GNUC_CONST; + +PANGO_DEPRECATED +PangoOTTag pango_ot_tag_from_language (PangoLanguage *language) G_GNUC_CONST; + +PANGO_DEPRECATED +guint pango_ot_ruleset_description_hash (const PangoOTRulesetDescription *desc) G_GNUC_PURE; + +PANGO_DEPRECATED +gboolean pango_ot_ruleset_description_equal (const PangoOTRulesetDescription *desc1, + const PangoOTRulesetDescription *desc2) G_GNUC_PURE; + +PANGO_DEPRECATED +PangoOTRulesetDescription *pango_ot_ruleset_description_copy (const PangoOTRulesetDescription *desc); + +PANGO_DEPRECATED +void pango_ot_ruleset_description_free (PangoOTRulesetDescription *desc); + + +#endif /* PANGO_ENABLE_ENGINE */ + +G_END_DECLS + +#endif /* __PANGO_OT_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-renderer.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-renderer.h new file mode 100755 index 00000000..266cc3ed --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-renderer.h @@ -0,0 +1,287 @@ +/* Pango + * pango-renderer.h: Base class for rendering + * + * Copyright (C) 2004, Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#ifndef __PANGO_RENDERER_H_ +#define __PANGO_RENDERER_H_ + +#include <pango/pango-layout.h> + +G_BEGIN_DECLS + +#define PANGO_TYPE_RENDERER (pango_renderer_get_type()) +#define PANGO_RENDERER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_RENDERER, PangoRenderer)) +#define PANGO_IS_RENDERER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_RENDERER)) +#define PANGO_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_RENDERER, PangoRendererClass)) +#define PANGO_IS_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_RENDERER)) +#define PANGO_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_RENDERER, PangoRendererClass)) + +typedef struct _PangoRenderer PangoRenderer; +typedef struct _PangoRendererClass PangoRendererClass; +typedef struct _PangoRendererPrivate PangoRendererPrivate; + +/** + * PangoRenderPart: + * @PANGO_RENDER_PART_FOREGROUND: the text itself + * @PANGO_RENDER_PART_BACKGROUND: the area behind the text + * @PANGO_RENDER_PART_UNDERLINE: underlines + * @PANGO_RENDER_PART_STRIKETHROUGH: strikethrough lines + * + * #PangoRenderPart defines different items to render for such + * purposes as setting colors. + * + * Since: 1.8 + **/ +/* When extending, note N_RENDER_PARTS #define in pango-renderer.c */ +typedef enum +{ + PANGO_RENDER_PART_FOREGROUND, + PANGO_RENDER_PART_BACKGROUND, + PANGO_RENDER_PART_UNDERLINE, + PANGO_RENDER_PART_STRIKETHROUGH +} PangoRenderPart; + +/** + * PangoRenderer: + * @matrix: (nullable): the current transformation matrix for + * the Renderer; may be %NULL, which should be treated the + * same as the identity matrix. + * + * #PangoRenderer is a base class for objects that are used to + * render Pango objects such as #PangoGlyphString and + * #PangoLayout. + * + * Since: 1.8 + **/ +struct _PangoRenderer +{ + /*< private >*/ + GObject parent_instance; + + PangoUnderline underline; + gboolean strikethrough; + int active_count; + + /*< public >*/ + PangoMatrix *matrix; /* May be NULL */ + + /*< private >*/ + PangoRendererPrivate *priv; +}; + +/** + * PangoRendererClass: + * @draw_glyphs: draws a #PangoGlyphString + * @draw_rectangle: draws a rectangle + * @draw_error_underline: draws a squiggly line that approximately + * covers the given rectangle in the style of an underline used to + * indicate a spelling error. + * @draw_shape: draw content for a glyph shaped with #PangoAttrShape. + * @x, @y are the coordinates of the left edge of the baseline, + * in user coordinates. + * @draw_trapezoid: draws a trapezoidal filled area + * @draw_glyph: draws a single glyph + * @part_changed: do renderer specific processing when rendering + * attributes change + * @begin: Do renderer-specific initialization before drawing + * @end: Do renderer-specific cleanup after drawing + * @prepare_run: updates the renderer for a new run + * @draw_glyph_item: draws a #PangoGlyphItem + * + * Class structure for #PangoRenderer. + * + * Since: 1.8 + **/ +struct _PangoRendererClass +{ + /*< private >*/ + GObjectClass parent_class; + + /* vtable - not signals */ + /*< public >*/ + + /* All of the following have default implementations + * and take as coordinates user coordinates in Pango units + */ + void (*draw_glyphs) (PangoRenderer *renderer, + PangoFont *font, + PangoGlyphString *glyphs, + int x, + int y); + void (*draw_rectangle) (PangoRenderer *renderer, + PangoRenderPart part, + int x, + int y, + int width, + int height); + void (*draw_error_underline) (PangoRenderer *renderer, + int x, + int y, + int width, + int height); + + /* Nothing is drawn for shaped glyphs unless this is implemented */ + void (*draw_shape) (PangoRenderer *renderer, + PangoAttrShape *attr, + int x, + int y); + + /* These two must be implemented and take coordinates in + * device space as doubles. + */ + void (*draw_trapezoid) (PangoRenderer *renderer, + PangoRenderPart part, + double y1_, + double x11, + double x21, + double y2, + double x12, + double x22); + void (*draw_glyph) (PangoRenderer *renderer, + PangoFont *font, + PangoGlyph glyph, + double x, + double y); + + /* Notification of change in rendering attributes + */ + void (*part_changed) (PangoRenderer *renderer, + PangoRenderPart part); + + /* Paired around drawing operations + */ + void (*begin) (PangoRenderer *renderer); + void (*end) (PangoRenderer *renderer); + + /* Hooks into the details of layout rendering + */ + void (*prepare_run) (PangoRenderer *renderer, + PangoLayoutRun *run); + + /* All of the following have default implementations + * and take as coordinates user coordinates in Pango units + */ + void (*draw_glyph_item) (PangoRenderer *renderer, + const char *text, + PangoGlyphItem *glyph_item, + int x, + int y); + + /*< private >*/ + + /* Padding for future expansion */ + void (*_pango_reserved2) (void); + void (*_pango_reserved3) (void); + void (*_pango_reserved4) (void); +}; + +PANGO_AVAILABLE_IN_1_8 +GType pango_renderer_get_type (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_1_8 +void pango_renderer_draw_layout (PangoRenderer *renderer, + PangoLayout *layout, + int x, + int y); +PANGO_AVAILABLE_IN_1_8 +void pango_renderer_draw_layout_line (PangoRenderer *renderer, + PangoLayoutLine *line, + int x, + int y); +PANGO_AVAILABLE_IN_1_8 +void pango_renderer_draw_glyphs (PangoRenderer *renderer, + PangoFont *font, + PangoGlyphString *glyphs, + int x, + int y); +PANGO_AVAILABLE_IN_1_22 +void pango_renderer_draw_glyph_item (PangoRenderer *renderer, + const char *text, + PangoGlyphItem *glyph_item, + int x, + int y); +PANGO_AVAILABLE_IN_1_8 +void pango_renderer_draw_rectangle (PangoRenderer *renderer, + PangoRenderPart part, + int x, + int y, + int width, + int height); +PANGO_AVAILABLE_IN_1_8 +void pango_renderer_draw_error_underline (PangoRenderer *renderer, + int x, + int y, + int width, + int height); +PANGO_AVAILABLE_IN_1_8 +void pango_renderer_draw_trapezoid (PangoRenderer *renderer, + PangoRenderPart part, + double y1_, + double x11, + double x21, + double y2, + double x12, + double x22); +PANGO_AVAILABLE_IN_1_8 +void pango_renderer_draw_glyph (PangoRenderer *renderer, + PangoFont *font, + PangoGlyph glyph, + double x, + double y); + +PANGO_AVAILABLE_IN_1_8 +void pango_renderer_activate (PangoRenderer *renderer); +PANGO_AVAILABLE_IN_1_8 +void pango_renderer_deactivate (PangoRenderer *renderer); + +PANGO_AVAILABLE_IN_1_8 +void pango_renderer_part_changed (PangoRenderer *renderer, + PangoRenderPart part); + +PANGO_AVAILABLE_IN_1_8 +void pango_renderer_set_color (PangoRenderer *renderer, + PangoRenderPart part, + const PangoColor *color); +PANGO_AVAILABLE_IN_1_8 +PangoColor *pango_renderer_get_color (PangoRenderer *renderer, + PangoRenderPart part); + +PANGO_AVAILABLE_IN_1_38 +void pango_renderer_set_alpha (PangoRenderer *renderer, + PangoRenderPart part, + guint16 alpha); +PANGO_AVAILABLE_IN_1_38 +guint16 pango_renderer_get_alpha (PangoRenderer *renderer, + PangoRenderPart part); + +PANGO_AVAILABLE_IN_1_8 +void pango_renderer_set_matrix (PangoRenderer *renderer, + const PangoMatrix *matrix); +PANGO_AVAILABLE_IN_1_8 +const PangoMatrix *pango_renderer_get_matrix (PangoRenderer *renderer); + +PANGO_AVAILABLE_IN_1_20 +PangoLayout *pango_renderer_get_layout (PangoRenderer *renderer); +PANGO_AVAILABLE_IN_1_20 +PangoLayoutLine *pango_renderer_get_layout_line (PangoRenderer *renderer); + +G_END_DECLS + +#endif /* __PANGO_RENDERER_H_ */ + diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-script.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-script.h new file mode 100755 index 00000000..62876025 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-script.h @@ -0,0 +1,330 @@ +/* Pango + * pango-script.h: Script tag handling + * + * Copyright (C) 2002 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_SCRIPT_H__ +#define __PANGO_SCRIPT_H__ + +#include <glib.h> + +G_BEGIN_DECLS + +/** + * PangoScriptIter: + * + * A #PangoScriptIter is used to iterate through a string + * and identify ranges in different scripts. + **/ +typedef struct _PangoScriptIter PangoScriptIter; + +/** + * PangoScript: + * @PANGO_SCRIPT_INVALID_CODE: a value never returned from pango_script_for_unichar() + * @PANGO_SCRIPT_COMMON: a character used by multiple different scripts + * @PANGO_SCRIPT_INHERITED: a mark glyph that takes its script from the + * base glyph to which it is attached + * @PANGO_SCRIPT_ARABIC: Arabic + * @PANGO_SCRIPT_ARMENIAN: Armenian + * @PANGO_SCRIPT_BENGALI: Bengali + * @PANGO_SCRIPT_BOPOMOFO: Bopomofo + * @PANGO_SCRIPT_CHEROKEE: Cherokee + * @PANGO_SCRIPT_COPTIC: Coptic + * @PANGO_SCRIPT_CYRILLIC: Cyrillic + * @PANGO_SCRIPT_DESERET: Deseret + * @PANGO_SCRIPT_DEVANAGARI: Devanagari + * @PANGO_SCRIPT_ETHIOPIC: Ethiopic + * @PANGO_SCRIPT_GEORGIAN: Georgian + * @PANGO_SCRIPT_GOTHIC: Gothic + * @PANGO_SCRIPT_GREEK: Greek + * @PANGO_SCRIPT_GUJARATI: Gujarati + * @PANGO_SCRIPT_GURMUKHI: Gurmukhi + * @PANGO_SCRIPT_HAN: Han + * @PANGO_SCRIPT_HANGUL: Hangul + * @PANGO_SCRIPT_HEBREW: Hebrew + * @PANGO_SCRIPT_HIRAGANA: Hiragana + * @PANGO_SCRIPT_KANNADA: Kannada + * @PANGO_SCRIPT_KATAKANA: Katakana + * @PANGO_SCRIPT_KHMER: Khmer + * @PANGO_SCRIPT_LAO: Lao + * @PANGO_SCRIPT_LATIN: Latin + * @PANGO_SCRIPT_MALAYALAM: Malayalam + * @PANGO_SCRIPT_MONGOLIAN: Mongolian + * @PANGO_SCRIPT_MYANMAR: Myanmar + * @PANGO_SCRIPT_OGHAM: Ogham + * @PANGO_SCRIPT_OLD_ITALIC: Old Italic + * @PANGO_SCRIPT_ORIYA: Oriya + * @PANGO_SCRIPT_RUNIC: Runic + * @PANGO_SCRIPT_SINHALA: Sinhala + * @PANGO_SCRIPT_SYRIAC: Syriac + * @PANGO_SCRIPT_TAMIL: Tamil + * @PANGO_SCRIPT_TELUGU: Telugu + * @PANGO_SCRIPT_THAANA: Thaana + * @PANGO_SCRIPT_THAI: Thai + * @PANGO_SCRIPT_TIBETAN: Tibetan + * @PANGO_SCRIPT_CANADIAN_ABORIGINAL: Canadian Aboriginal + * @PANGO_SCRIPT_YI: Yi + * @PANGO_SCRIPT_TAGALOG: Tagalog + * @PANGO_SCRIPT_HANUNOO: Hanunoo + * @PANGO_SCRIPT_BUHID: Buhid + * @PANGO_SCRIPT_TAGBANWA: Tagbanwa + * @PANGO_SCRIPT_BRAILLE: Braille + * @PANGO_SCRIPT_CYPRIOT: Cypriot + * @PANGO_SCRIPT_LIMBU: Limbu + * @PANGO_SCRIPT_OSMANYA: Osmanya + * @PANGO_SCRIPT_SHAVIAN: Shavian + * @PANGO_SCRIPT_LINEAR_B: Linear B + * @PANGO_SCRIPT_TAI_LE: Tai Le + * @PANGO_SCRIPT_UGARITIC: Ugaritic + * @PANGO_SCRIPT_NEW_TAI_LUE: New Tai Lue. Since 1.10 + * @PANGO_SCRIPT_BUGINESE: Buginese. Since 1.10 + * @PANGO_SCRIPT_GLAGOLITIC: Glagolitic. Since 1.10 + * @PANGO_SCRIPT_TIFINAGH: Tifinagh. Since 1.10 + * @PANGO_SCRIPT_SYLOTI_NAGRI: Syloti Nagri. Since 1.10 + * @PANGO_SCRIPT_OLD_PERSIAN: Old Persian. Since 1.10 + * @PANGO_SCRIPT_KHAROSHTHI: Kharoshthi. Since 1.10 + * @PANGO_SCRIPT_UNKNOWN: an unassigned code point. Since 1.14 + * @PANGO_SCRIPT_BALINESE: Balinese. Since 1.14 + * @PANGO_SCRIPT_CUNEIFORM: Cuneiform. Since 1.14 + * @PANGO_SCRIPT_PHOENICIAN: Phoenician. Since 1.14 + * @PANGO_SCRIPT_PHAGS_PA: Phags-pa. Since 1.14 + * @PANGO_SCRIPT_NKO: N'Ko. Since 1.14 + * @PANGO_SCRIPT_KAYAH_LI: Kayah Li. Since 1.20.1 + * @PANGO_SCRIPT_LEPCHA: Lepcha. Since 1.20.1 + * @PANGO_SCRIPT_REJANG: Rejang. Since 1.20.1 + * @PANGO_SCRIPT_SUNDANESE: Sundanese. Since 1.20.1 + * @PANGO_SCRIPT_SAURASHTRA: Saurashtra. Since 1.20.1 + * @PANGO_SCRIPT_CHAM: Cham. Since 1.20.1 + * @PANGO_SCRIPT_OL_CHIKI: Ol Chiki. Since 1.20.1 + * @PANGO_SCRIPT_VAI: Vai. Since 1.20.1 + * @PANGO_SCRIPT_CARIAN: Carian. Since 1.20.1 + * @PANGO_SCRIPT_LYCIAN: Lycian. Since 1.20.1 + * @PANGO_SCRIPT_LYDIAN: Lydian. Since 1.20.1 + * @PANGO_SCRIPT_BATAK: Batak. Since 1.32 + * @PANGO_SCRIPT_BRAHMI: Brahmi. Since 1.32 + * @PANGO_SCRIPT_MANDAIC: Mandaic. Since 1.32 + * @PANGO_SCRIPT_CHAKMA: Chakma. Since: 1.32 + * @PANGO_SCRIPT_MEROITIC_CURSIVE: Meroitic Cursive. Since: 1.32 + * @PANGO_SCRIPT_MEROITIC_HIEROGLYPHS: Meroitic Hieroglyphs. Since: 1.32 + * @PANGO_SCRIPT_MIAO: Miao. Since: 1.32 + * @PANGO_SCRIPT_SHARADA: Sharada. Since: 1.32 + * @PANGO_SCRIPT_SORA_SOMPENG: Sora Sompeng. Since: 1.32 + * @PANGO_SCRIPT_TAKRI: Takri. Since: 1.32 + * @PANGO_SCRIPT_BASSA_VAH: Bassa. Since: 1.40 + * @PANGO_SCRIPT_CAUCASIAN_ALBANIAN: Caucasian Albanian. Since: 1.40 + * @PANGO_SCRIPT_DUPLOYAN: Duployan. Since: 1.40 + * @PANGO_SCRIPT_ELBASAN: Elbasan. Since: 1.40 + * @PANGO_SCRIPT_GRANTHA: Grantha. Since: 1.40 + * @PANGO_SCRIPT_KHOJKI: Kjohki. Since: 1.40 + * @PANGO_SCRIPT_KHUDAWADI: Khudawadi, Sindhi. Since: 1.40 + * @PANGO_SCRIPT_LINEAR_A: Linear A. Since: 1.40 + * @PANGO_SCRIPT_MAHAJANI: Mahajani. Since: 1.40 + * @PANGO_SCRIPT_MANICHAEAN: Manichaean. Since: 1.40 + * @PANGO_SCRIPT_MENDE_KIKAKUI: Mende Kikakui. Since: 1.40 + * @PANGO_SCRIPT_MODI: Modi. Since: 1.40 + * @PANGO_SCRIPT_MRO: Mro. Since: 1.40 + * @PANGO_SCRIPT_NABATAEAN: Nabataean. Since: 1.40 + * @PANGO_SCRIPT_OLD_NORTH_ARABIAN: Old North Arabian. Since: 1.40 + * @PANGO_SCRIPT_OLD_PERMIC: Old Permic. Since: 1.40 + * @PANGO_SCRIPT_PAHAWH_HMONG: Pahawh Hmong. Since: 1.40 + * @PANGO_SCRIPT_PALMYRENE: Palmyrene. Since: 1.40 + * @PANGO_SCRIPT_PAU_CIN_HAU: Pau Cin Hau. Since: 1.40 + * @PANGO_SCRIPT_PSALTER_PAHLAVI: Psalter Pahlavi. Since: 1.40 + * @PANGO_SCRIPT_SIDDHAM: Siddham. Since: 1.40 + * @PANGO_SCRIPT_TIRHUTA: Tirhuta. Since: 1.40 + * @PANGO_SCRIPT_WARANG_CITI: Warang Citi. Since: 1.40 + * @PANGO_SCRIPT_AHOM: Ahom. Since: 1.40 + * @PANGO_SCRIPT_ANATOLIAN_HIEROGLYPHS: Anatolian Hieroglyphs. Since: 1.40 + * @PANGO_SCRIPT_HATRAN: Hatran. Since: 1.40 + * @PANGO_SCRIPT_MULTANI: Multani. Since: 1.40 + * @PANGO_SCRIPT_OLD_HUNGARIAN: Old Hungarian. Since: 1.40 + * @PANGO_SCRIPT_SIGNWRITING: Signwriting. Since: 1.40 + * + * The #PangoScript enumeration identifies different writing + * systems. The values correspond to the names as defined in the + * Unicode standard. + * Note that new types may be added in the future. Applications should be ready + * to handle unknown values. This enumeration is interchangeable with + * #GUnicodeScript. See <ulink + * url="http://www.unicode.org/reports/tr24/">Unicode Standard Annex + * #24: Script names</ulink>. + */ +typedef enum { /* ISO 15924 code */ + PANGO_SCRIPT_INVALID_CODE = -1, + PANGO_SCRIPT_COMMON = 0, /* Zyyy */ + PANGO_SCRIPT_INHERITED, /* Qaai */ + PANGO_SCRIPT_ARABIC, /* Arab */ + PANGO_SCRIPT_ARMENIAN, /* Armn */ + PANGO_SCRIPT_BENGALI, /* Beng */ + PANGO_SCRIPT_BOPOMOFO, /* Bopo */ + PANGO_SCRIPT_CHEROKEE, /* Cher */ + PANGO_SCRIPT_COPTIC, /* Qaac */ + PANGO_SCRIPT_CYRILLIC, /* Cyrl (Cyrs) */ + PANGO_SCRIPT_DESERET, /* Dsrt */ + PANGO_SCRIPT_DEVANAGARI, /* Deva */ + PANGO_SCRIPT_ETHIOPIC, /* Ethi */ + PANGO_SCRIPT_GEORGIAN, /* Geor (Geon, Geoa) */ + PANGO_SCRIPT_GOTHIC, /* Goth */ + PANGO_SCRIPT_GREEK, /* Grek */ + PANGO_SCRIPT_GUJARATI, /* Gujr */ + PANGO_SCRIPT_GURMUKHI, /* Guru */ + PANGO_SCRIPT_HAN, /* Hani */ + PANGO_SCRIPT_HANGUL, /* Hang */ + PANGO_SCRIPT_HEBREW, /* Hebr */ + PANGO_SCRIPT_HIRAGANA, /* Hira */ + PANGO_SCRIPT_KANNADA, /* Knda */ + PANGO_SCRIPT_KATAKANA, /* Kana */ + PANGO_SCRIPT_KHMER, /* Khmr */ + PANGO_SCRIPT_LAO, /* Laoo */ + PANGO_SCRIPT_LATIN, /* Latn (Latf, Latg) */ + PANGO_SCRIPT_MALAYALAM, /* Mlym */ + PANGO_SCRIPT_MONGOLIAN, /* Mong */ + PANGO_SCRIPT_MYANMAR, /* Mymr */ + PANGO_SCRIPT_OGHAM, /* Ogam */ + PANGO_SCRIPT_OLD_ITALIC, /* Ital */ + PANGO_SCRIPT_ORIYA, /* Orya */ + PANGO_SCRIPT_RUNIC, /* Runr */ + PANGO_SCRIPT_SINHALA, /* Sinh */ + PANGO_SCRIPT_SYRIAC, /* Syrc (Syrj, Syrn, Syre) */ + PANGO_SCRIPT_TAMIL, /* Taml */ + PANGO_SCRIPT_TELUGU, /* Telu */ + PANGO_SCRIPT_THAANA, /* Thaa */ + PANGO_SCRIPT_THAI, /* Thai */ + PANGO_SCRIPT_TIBETAN, /* Tibt */ + PANGO_SCRIPT_CANADIAN_ABORIGINAL, /* Cans */ + PANGO_SCRIPT_YI, /* Yiii */ + PANGO_SCRIPT_TAGALOG, /* Tglg */ + PANGO_SCRIPT_HANUNOO, /* Hano */ + PANGO_SCRIPT_BUHID, /* Buhd */ + PANGO_SCRIPT_TAGBANWA, /* Tagb */ + + /* Unicode-4.0 additions */ + PANGO_SCRIPT_BRAILLE, /* Brai */ + PANGO_SCRIPT_CYPRIOT, /* Cprt */ + PANGO_SCRIPT_LIMBU, /* Limb */ + PANGO_SCRIPT_OSMANYA, /* Osma */ + PANGO_SCRIPT_SHAVIAN, /* Shaw */ + PANGO_SCRIPT_LINEAR_B, /* Linb */ + PANGO_SCRIPT_TAI_LE, /* Tale */ + PANGO_SCRIPT_UGARITIC, /* Ugar */ + + /* Unicode-4.1 additions */ + PANGO_SCRIPT_NEW_TAI_LUE, /* Talu */ + PANGO_SCRIPT_BUGINESE, /* Bugi */ + PANGO_SCRIPT_GLAGOLITIC, /* Glag */ + PANGO_SCRIPT_TIFINAGH, /* Tfng */ + PANGO_SCRIPT_SYLOTI_NAGRI, /* Sylo */ + PANGO_SCRIPT_OLD_PERSIAN, /* Xpeo */ + PANGO_SCRIPT_KHAROSHTHI, /* Khar */ + + /* Unicode-5.0 additions */ + PANGO_SCRIPT_UNKNOWN, /* Zzzz */ + PANGO_SCRIPT_BALINESE, /* Bali */ + PANGO_SCRIPT_CUNEIFORM, /* Xsux */ + PANGO_SCRIPT_PHOENICIAN, /* Phnx */ + PANGO_SCRIPT_PHAGS_PA, /* Phag */ + PANGO_SCRIPT_NKO, /* Nkoo */ + + /* Unicode-5.1 additions */ + PANGO_SCRIPT_KAYAH_LI, /* Kali */ + PANGO_SCRIPT_LEPCHA, /* Lepc */ + PANGO_SCRIPT_REJANG, /* Rjng */ + PANGO_SCRIPT_SUNDANESE, /* Sund */ + PANGO_SCRIPT_SAURASHTRA, /* Saur */ + PANGO_SCRIPT_CHAM, /* Cham */ + PANGO_SCRIPT_OL_CHIKI, /* Olck */ + PANGO_SCRIPT_VAI, /* Vaii */ + PANGO_SCRIPT_CARIAN, /* Cari */ + PANGO_SCRIPT_LYCIAN, /* Lyci */ + PANGO_SCRIPT_LYDIAN, /* Lydi */ + + /* Unicode-6.0 additions */ + PANGO_SCRIPT_BATAK, /* Batk */ + PANGO_SCRIPT_BRAHMI, /* Brah */ + PANGO_SCRIPT_MANDAIC, /* Mand */ + + /* Unicode-6.1 additions */ + PANGO_SCRIPT_CHAKMA, /* Cakm */ + PANGO_SCRIPT_MEROITIC_CURSIVE, /* Merc */ + PANGO_SCRIPT_MEROITIC_HIEROGLYPHS,/* Mero */ + PANGO_SCRIPT_MIAO, /* Plrd */ + PANGO_SCRIPT_SHARADA, /* Shrd */ + PANGO_SCRIPT_SORA_SOMPENG, /* Sora */ + PANGO_SCRIPT_TAKRI, /* Takr */ + + /* Unicode 7.0 additions */ + PANGO_SCRIPT_BASSA_VAH, /* Bass */ + PANGO_SCRIPT_CAUCASIAN_ALBANIAN, /* Aghb */ + PANGO_SCRIPT_DUPLOYAN, /* Dupl */ + PANGO_SCRIPT_ELBASAN, /* Elba */ + PANGO_SCRIPT_GRANTHA, /* Gran */ + PANGO_SCRIPT_KHOJKI, /* Khoj */ + PANGO_SCRIPT_KHUDAWADI, /* Sind */ + PANGO_SCRIPT_LINEAR_A, /* Lina */ + PANGO_SCRIPT_MAHAJANI, /* Mahj */ + PANGO_SCRIPT_MANICHAEAN, /* Manu */ + PANGO_SCRIPT_MENDE_KIKAKUI, /* Mend */ + PANGO_SCRIPT_MODI, /* Modi */ + PANGO_SCRIPT_MRO, /* Mroo */ + PANGO_SCRIPT_NABATAEAN, /* Nbat */ + PANGO_SCRIPT_OLD_NORTH_ARABIAN, /* Narb */ + PANGO_SCRIPT_OLD_PERMIC, /* Perm */ + PANGO_SCRIPT_PAHAWH_HMONG, /* Hmng */ + PANGO_SCRIPT_PALMYRENE, /* Palm */ + PANGO_SCRIPT_PAU_CIN_HAU, /* Pauc */ + PANGO_SCRIPT_PSALTER_PAHLAVI, /* Phlp */ + PANGO_SCRIPT_SIDDHAM, /* Sidd */ + PANGO_SCRIPT_TIRHUTA, /* Tirh */ + PANGO_SCRIPT_WARANG_CITI, /* Wara */ + + /* Unicode 8.0 additions */ + PANGO_SCRIPT_AHOM, /* Ahom */ + PANGO_SCRIPT_ANATOLIAN_HIEROGLYPHS, /* Hluw */ + PANGO_SCRIPT_HATRAN, /* Hatr */ + PANGO_SCRIPT_MULTANI, /* Mult */ + PANGO_SCRIPT_OLD_HUNGARIAN, /* Hung */ + PANGO_SCRIPT_SIGNWRITING /* Sgnw */ +} PangoScript; + +#include <pango/pango-version-macros.h> + +PANGO_AVAILABLE_IN_1_4 +PangoScript pango_script_for_unichar (gunichar ch) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_1_4 +PangoScriptIter *pango_script_iter_new (const char *text, + int length); +PANGO_AVAILABLE_IN_1_4 +void pango_script_iter_get_range (PangoScriptIter *iter, + const char **start, + const char **end, + PangoScript *script); +PANGO_AVAILABLE_IN_1_4 +gboolean pango_script_iter_next (PangoScriptIter *iter); +PANGO_AVAILABLE_IN_1_4 +void pango_script_iter_free (PangoScriptIter *iter); + +#include <pango/pango-language.h> + +PANGO_AVAILABLE_IN_1_4 +PangoLanguage *pango_script_get_sample_language (PangoScript script) G_GNUC_PURE; + +G_END_DECLS + +#endif /* __PANGO_SCRIPT_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-tabs.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-tabs.h new file mode 100755 index 00000000..664cedbb --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-tabs.h @@ -0,0 +1,98 @@ +/* Pango + * pango-tabs.h: Tab-related stuff + * + * Copyright (C) 2000 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_TABS_H__ +#define __PANGO_TABS_H__ + +#include <pango/pango-types.h> + +G_BEGIN_DECLS + +typedef struct _PangoTabArray PangoTabArray; + +/** + * PangoTabAlign: + * @PANGO_TAB_LEFT: the tab stop appears to the left of the text. + * + * A #PangoTabAlign specifies where a tab stop appears relative to the text. + */ +typedef enum +{ + PANGO_TAB_LEFT + + /* These are not supported now, but may be in the + * future. + * + * PANGO_TAB_RIGHT, + * PANGO_TAB_CENTER, + * PANGO_TAB_NUMERIC + */ +} PangoTabAlign; + +/** + * PANGO_TYPE_TAB_ARRAY: + * + * The #GObject type for #PangoTabArray. + */ +#define PANGO_TYPE_TAB_ARRAY (pango_tab_array_get_type ()) + +PANGO_AVAILABLE_IN_ALL +PangoTabArray *pango_tab_array_new (gint initial_size, + gboolean positions_in_pixels); +PANGO_AVAILABLE_IN_ALL +PangoTabArray *pango_tab_array_new_with_positions (gint size, + gboolean positions_in_pixels, + PangoTabAlign first_alignment, + gint first_position, + ...); +PANGO_AVAILABLE_IN_ALL +GType pango_tab_array_get_type (void) G_GNUC_CONST; +PANGO_AVAILABLE_IN_ALL +PangoTabArray *pango_tab_array_copy (PangoTabArray *src); +PANGO_AVAILABLE_IN_ALL +void pango_tab_array_free (PangoTabArray *tab_array); +PANGO_AVAILABLE_IN_ALL +gint pango_tab_array_get_size (PangoTabArray *tab_array); +PANGO_AVAILABLE_IN_ALL +void pango_tab_array_resize (PangoTabArray *tab_array, + gint new_size); +PANGO_AVAILABLE_IN_ALL +void pango_tab_array_set_tab (PangoTabArray *tab_array, + gint tab_index, + PangoTabAlign alignment, + gint location); +PANGO_AVAILABLE_IN_ALL +void pango_tab_array_get_tab (PangoTabArray *tab_array, + gint tab_index, + PangoTabAlign *alignment, + gint *location); +PANGO_AVAILABLE_IN_ALL +void pango_tab_array_get_tabs (PangoTabArray *tab_array, + PangoTabAlign **alignments, + gint **locations); + +PANGO_AVAILABLE_IN_ALL +gboolean pango_tab_array_get_positions_in_pixels (PangoTabArray *tab_array); + + +G_END_DECLS + +#endif /* __PANGO_TABS_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-types.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-types.h new file mode 100755 index 00000000..4662c71e --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-types.h @@ -0,0 +1,205 @@ +/* Pango + * pango-types.h: + * + * Copyright (C) 1999 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_TYPES_H__ +#define __PANGO_TYPES_H__ + +#include <glib.h> +#include <glib-object.h> + +#include <pango/pango-version-macros.h> + +G_BEGIN_DECLS + +typedef struct _PangoLogAttr PangoLogAttr; + +typedef struct _PangoEngineLang PangoEngineLang; +typedef struct _PangoEngineShape PangoEngineShape; + +typedef struct _PangoFont PangoFont; +typedef struct _PangoFontMap PangoFontMap; + +typedef struct _PangoRectangle PangoRectangle; + + + +/* A index of a glyph into a font. Rendering system dependent */ +/** + * PangoGlyph: + * + * A #PangoGlyph represents a single glyph in the output form of a string. + */ +typedef guint32 PangoGlyph; + + + +/** + * PANGO_SCALE: + * + * The %PANGO_SCALE macro represents the scale between dimensions used + * for Pango distances and device units. (The definition of device + * units is dependent on the output device; it will typically be pixels + * for a screen, and points for a printer.) %PANGO_SCALE is currently + * 1024, but this may be changed in the future. + * + * When setting font sizes, device units are always considered to be + * points (as in "12 point font"), rather than pixels. + */ +/** + * PANGO_PIXELS: + * @d: a dimension in Pango units. + * + * Converts a dimension to device units by rounding. + * + * Return value: rounded dimension in device units. + */ +/** + * PANGO_PIXELS_FLOOR: + * @d: a dimension in Pango units. + * + * Converts a dimension to device units by flooring. + * + * Return value: floored dimension in device units. + * Since: 1.14 + */ +/** + * PANGO_PIXELS_CEIL: + * @d: a dimension in Pango units. + * + * Converts a dimension to device units by ceiling. + * + * Return value: ceiled dimension in device units. + * Since: 1.14 + */ +#define PANGO_SCALE 1024 +#define PANGO_PIXELS(d) (((int)(d) + 512) >> 10) +#define PANGO_PIXELS_FLOOR(d) (((int)(d)) >> 10) +#define PANGO_PIXELS_CEIL(d) (((int)(d) + 1023) >> 10) +/* The above expressions are just slightly wrong for floating point d; + * For example we'd expect PANGO_PIXELS(-512.5) => -1 but instead we get 0. + * That's unlikely to matter for practical use and the expression is much + * more compact and faster than alternatives that work exactly for both + * integers and floating point. + * + * PANGO_PIXELS also behaves differently for +512 and -512. + */ + +/** + * PANGO_UNITS_ROUND: + * @d: a dimension in Pango units. + * + * Rounds a dimension to whole device units, but does not + * convert it to device units. + * + * Return value: rounded dimension in Pango units. + * Since: 1.18 + */ +#define PANGO_UNITS_ROUND(d) \ + (((d) + (PANGO_SCALE >> 1)) & ~(PANGO_SCALE - 1)) + + +PANGO_AVAILABLE_IN_1_16 +int pango_units_from_double (double d) G_GNUC_CONST; +PANGO_AVAILABLE_IN_1_16 +double pango_units_to_double (int i) G_GNUC_CONST; + + + +/** + * PangoRectangle: + * @x: X coordinate of the left side of the rectangle. + * @y: Y coordinate of the the top side of the rectangle. + * @width: width of the rectangle. + * @height: height of the rectangle. + * + * The #PangoRectangle structure represents a rectangle. It is frequently + * used to represent the logical or ink extents of a single glyph or section + * of text. (See, for instance, pango_font_get_glyph_extents()) + * + */ +struct _PangoRectangle +{ + int x; + int y; + int width; + int height; +}; + +/* Macros to translate from extents rectangles to ascent/descent/lbearing/rbearing + */ +/** + * PANGO_ASCENT: + * @rect: a #PangoRectangle + * + * Extracts the <firstterm>ascent</firstterm> from a #PangoRectangle + * representing glyph extents. The ascent is the distance from the + * baseline to the highest point of the character. This is positive if the + * glyph ascends above the baseline. + */ +/** + * PANGO_DESCENT: + * @rect: a #PangoRectangle + * + * Extracts the <firstterm>descent</firstterm> from a #PangoRectangle + * representing glyph extents. The descent is the distance from the + * baseline to the lowest point of the character. This is positive if the + * glyph descends below the baseline. + */ +/** + * PANGO_LBEARING: + * @rect: a #PangoRectangle + * + * Extracts the <firstterm>left bearing</firstterm> from a #PangoRectangle + * representing glyph extents. The left bearing is the distance from the + * horizontal origin to the farthest left point of the character. + * This is positive for characters drawn completely to the right of the + * glyph origin. + */ +/** + * PANGO_RBEARING: + * @rect: a #PangoRectangle + * + * Extracts the <firstterm>right bearing</firstterm> from a #PangoRectangle + * representing glyph extents. The right bearing is the distance from the + * horizontal origin to the farthest right point of the character. + * This is positive except for characters drawn completely to the left of the + * horizontal origin. + */ +#define PANGO_ASCENT(rect) (-(rect).y) +#define PANGO_DESCENT(rect) ((rect).y + (rect).height) +#define PANGO_LBEARING(rect) ((rect).x) +#define PANGO_RBEARING(rect) ((rect).x + (rect).width) + +PANGO_AVAILABLE_IN_1_16 +void pango_extents_to_pixels (PangoRectangle *inclusive, + PangoRectangle *nearest); + + +#include <pango/pango-gravity.h> +#include <pango/pango-language.h> +#include <pango/pango-matrix.h> +#include <pango/pango-script.h> +#include <pango/pango-bidi-type.h> + + +G_END_DECLS + +#endif /* __PANGO_TYPES_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-utils.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-utils.h new file mode 100755 index 00000000..bb9a4621 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-utils.h @@ -0,0 +1,211 @@ +/* Pango + * pango-utils.c: Utilities for internal functions and modules + * + * Copyright (C) 2000 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_UTILS_H__ +#define __PANGO_UTILS_H__ + +#include <stdio.h> +#include <glib.h> +#include <pango/pango-font.h> + +G_BEGIN_DECLS + +PANGO_DEPRECATED +char ** pango_split_file_list (const char *str); + +PANGO_DEPRECATED +char *pango_trim_string (const char *str); +PANGO_DEPRECATED +gint pango_read_line (FILE *stream, + GString *str); +PANGO_DEPRECATED +gboolean pango_skip_space (const char **pos); +PANGO_DEPRECATED +gboolean pango_scan_word (const char **pos, + GString *out); +PANGO_DEPRECATED +gboolean pango_scan_string (const char **pos, + GString *out); +PANGO_DEPRECATED +gboolean pango_scan_int (const char **pos, + int *out); + +#ifdef PANGO_ENABLE_BACKEND +PANGO_DEPRECATED_IN_1_38 +char * pango_config_key_get_system (const char *key); +PANGO_DEPRECATED_IN_1_38 +char * pango_config_key_get (const char *key); +PANGO_DEPRECATED_IN_1_32 +void pango_lookup_aliases (const char *fontname, + char ***families, + int *n_families); +#endif /* PANGO_ENABLE_BACKEND */ + +PANGO_DEPRECATED +gboolean pango_parse_enum (GType type, + const char *str, + int *value, + gboolean warn, + char **possible_values); + +/* Functions for parsing textual representations + * of PangoFontDescription fields. They return TRUE if the input string + * contains a valid value, which then has been assigned to the corresponding + * field in the PangoFontDescription. If the warn parameter is TRUE, + * a warning is printed (with g_warning) if the string does not + * contain a valid value. + */ +PANGO_AVAILABLE_IN_ALL +gboolean pango_parse_style (const char *str, + PangoStyle *style, + gboolean warn); +PANGO_AVAILABLE_IN_ALL +gboolean pango_parse_variant (const char *str, + PangoVariant *variant, + gboolean warn); +PANGO_AVAILABLE_IN_ALL +gboolean pango_parse_weight (const char *str, + PangoWeight *weight, + gboolean warn); +PANGO_AVAILABLE_IN_ALL +gboolean pango_parse_stretch (const char *str, + PangoStretch *stretch, + gboolean warn); + +#ifdef PANGO_ENABLE_BACKEND + +/* On Unix, return the name of the "pango" subdirectory of SYSCONFDIR + * (which is set at compile time). On Win32, return the Pango + * installation directory (which is set at installation time, and + * stored in the registry). The returned string should not be + * g_free'd. + */ +PANGO_DEPRECATED +const char * pango_get_sysconf_subdirectory (void) G_GNUC_PURE; + +/* Ditto for LIBDIR/pango. On Win32, use the same Pango + * installation directory. This returned string should not be + * g_free'd either. + */ +PANGO_DEPRECATED +const char * pango_get_lib_subdirectory (void) G_GNUC_PURE; + +#endif /* PANGO_ENABLE_BACKEND */ + +/* Hint line position and thickness. + */ +PANGO_AVAILABLE_IN_1_12 +void pango_quantize_line_geometry (int *thickness, + int *position); + +/* A routine from fribidi that we either wrap or provide ourselves. + */ +PANGO_AVAILABLE_IN_1_4 +guint8 * pango_log2vis_get_embedding_levels (const gchar *text, + int length, + PangoDirection *pbase_dir); + +/* Unicode characters that are zero-width and should not be rendered + * normally. + */ +PANGO_AVAILABLE_IN_1_10 +gboolean pango_is_zero_width (gunichar ch) G_GNUC_CONST; + +/* Pango version checking */ + +/* Encode a Pango version as an integer */ +/** + * PANGO_VERSION_ENCODE: + * @major: the major component of the version number + * @minor: the minor component of the version number + * @micro: the micro component of the version number + * + * This macro encodes the given Pango version into an integer. The numbers + * returned by %PANGO_VERSION and pango_version() are encoded using this macro. + * Two encoded version numbers can be compared as integers. + */ +#define PANGO_VERSION_ENCODE(major, minor, micro) ( \ + ((major) * 10000) \ + + ((minor) * 100) \ + + ((micro) * 1)) + +/* Encoded version of Pango at compile-time */ +/** + * PANGO_VERSION: + * + * The version of Pango available at compile-time, encoded using PANGO_VERSION_ENCODE(). + */ +/** + * PANGO_VERSION_STRING: + * + * A string literal containing the version of Pango available at compile-time. + */ +/** + * PANGO_VERSION_MAJOR: + * + * The major component of the version of Pango available at compile-time. + */ +/** + * PANGO_VERSION_MINOR: + * + * The minor component of the version of Pango available at compile-time. + */ +/** + * PANGO_VERSION_MICRO: + * + * The micro component of the version of Pango available at compile-time. + */ +#define PANGO_VERSION PANGO_VERSION_ENCODE( \ + PANGO_VERSION_MAJOR, \ + PANGO_VERSION_MINOR, \ + PANGO_VERSION_MICRO) + +/* Check that compile-time Pango is as new as required */ +/** + * PANGO_VERSION_CHECK: + * @major: the major component of the version number + * @minor: the minor component of the version number + * @micro: the micro component of the version number + * + * Checks that the version of Pango available at compile-time is not older than + * the provided version number. + */ +#define PANGO_VERSION_CHECK(major,minor,micro) \ + (PANGO_VERSION >= PANGO_VERSION_ENCODE(major,minor,micro)) + + +/* Return encoded version of Pango at run-time */ +PANGO_AVAILABLE_IN_1_16 +int pango_version (void) G_GNUC_CONST; + +/* Return run-time Pango version as an string */ +PANGO_AVAILABLE_IN_1_16 +const char * pango_version_string (void) G_GNUC_CONST; + +/* Check that run-time Pango is as new as required */ +PANGO_AVAILABLE_IN_1_16 +const char * pango_version_check (int required_major, + int required_minor, + int required_micro) G_GNUC_CONST; + +G_END_DECLS + +#endif /* __PANGO_UTILS_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-version-macros.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-version-macros.h new file mode 100755 index 00000000..5d66ab8c --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango-version-macros.h @@ -0,0 +1,636 @@ +/* Pango - Internationalized text layout and rendering library + * Copyright (C) 1999 Red Hat Software + * Copyright (C) 2012 Ryan Lortie, Matthias Clasen and Emmanuele Bassi + * Copyright (C) 2016 Chun-wei Fan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __PANGO_VERSION_H__ +#define __PANGO_VERSION_H__ + +#include <pango/pango-features.h> + +#include <glib.h> + +#ifndef _PANGO_EXTERN +#define _PANGO_EXTERN extern +#endif + +#define PANGO_AVAILABLE_IN_ALL _PANGO_EXTERN + +/* XXX: Every new stable minor release bump should add a macro here */ + +/** + * PANGO_VERSION_1_2: + * + * A macro that evaluates to the 1.2 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_2 (G_ENCODE_VERSION (1, 2)) + +/** + * PANGO_VERSION_1_4: + * + * A macro that evaluates to the 1.4 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_4 (G_ENCODE_VERSION (1, 4)) + +/** + * PANGO_VERSION_1_6: + * + * A macro that evaluates to the 1.6 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_6 (G_ENCODE_VERSION (1, 6)) + +/** + * PANGO_VERSION_1_8: + * + * A macro that evaluates to the 1.8 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_8 (G_ENCODE_VERSION (1, 8)) + +/** + * PANGO_VERSION_1_10: + * + * A macro that evaluates to the 1.10 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_10 (G_ENCODE_VERSION (1, 10)) + +/** + * PANGO_VERSION_1_12: + * + * A macro that evaluates to the 1.12 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_12 (G_ENCODE_VERSION (1, 12)) + +/** + * PANGO_VERSION_1_14: + * + * A macro that evaluates to the 1.14 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_14 (G_ENCODE_VERSION (1, 14)) + +/** + * PANGO_VERSION_1_16: + * + * A macro that evaluates to the 1.16 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_16 (G_ENCODE_VERSION (1, 16)) + +/** + * PANGO_VERSION_1_18: + * + * A macro that evaluates to the 1.18 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_18 (G_ENCODE_VERSION (1, 18)) + +/** + * PANGO_VERSION_1_20: + * + * A macro that evaluates to the 1.20 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_20 (G_ENCODE_VERSION (1, 20)) + +/** + * PANGO_VERSION_1_22: + * + * A macro that evaluates to the 1.22 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_22 (G_ENCODE_VERSION (1, 22)) + +/** + * PANGO_VERSION_1_24: + * + * A macro that evaluates to the 1.24 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_24 (G_ENCODE_VERSION (1, 24)) + +/** + * PANGO_VERSION_1_26: + * + * A macro that evaluates to the 1.26 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_26 (G_ENCODE_VERSION (1, 26)) + +/** + * PANGO_VERSION_1_28: + * + * A macro that evaluates to the 1.28 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_28 (G_ENCODE_VERSION (1, 28)) + +/** + * PANGO_VERSION_1_30: + * + * A macro that evaluates to the 1.30 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_30 (G_ENCODE_VERSION (1, 30)) + +/** + * PANGO_VERSION_1_32: + * + * A macro that evaluates to the 1.32 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_32 (G_ENCODE_VERSION (1, 32)) + +/** + * PANGO_VERSION_1_34: + * + * A macro that evaluates to the 1.34 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_34 (G_ENCODE_VERSION (1, 34)) + +/** + * PANGO_VERSION_1_36: + * + * A macro that evaluates to the 1.36 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_36 (G_ENCODE_VERSION (1, 36)) + +/** + * PANGO_VERSION_1_38: + * + * A macro that evaluates to the 1.38 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_38 (G_ENCODE_VERSION (1, 38)) + +/** + * PANGO_VERSION_1_40: + * + * A macro that evaluates to the 1.40 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_40 (G_ENCODE_VERSION (1, 40)) + +/** + * PANGO_VERSION_1_42: + * + * A macro that evaluates to the 2.38 version of Pango, in a format + * that can be used by the C pre-processor. + * + * Since: 1.42 + */ +#define PANGO_VERSION_1_42 (G_ENCODE_VERSION (1, 42)) + +/* evaluates to the current stable version; for development cycles, + * this means the next stable target + */ +#if (PANGO_VERSION_MINOR % 2) +#define PANGO_VERSION_CUR_STABLE (G_ENCODE_VERSION (PANGO_VERSION_MAJOR, PANGO_VERSION_MINOR + 1)) +#else +#define PANGO_VERSION_CUR_STABLE (G_ENCODE_VERSION (PANGO_VERSION_MAJOR, PANGO_VERSION_MINOR)) +#endif + +/* evaluates to the previous stable version */ +#if (PANGO_VERSION_MINOR % 2) +#define PANGO_VERSION_PREV_STABLE (G_ENCODE_VERSION (PANGO_VERSION_MAJOR, PANGO_VERSION_MINOR - 1)) +#else +#define PANGO_VERSION_PREV_STABLE (G_ENCODE_VERSION (PANGO_VERSION_MAJOR, PANGO_VERSION_MINOR - 2)) +#endif + +/** + * PANGO_VERSION_MIN_REQUIRED: + * + * A macro that should be defined by the user prior to including + * the pango.h header. + * The definition should be one of the predefined Pango version + * macros: %PANGO_VERSION_1_2, %PANGO_VERSION_1_4,... + * + * This macro defines the earliest version of Pango that the package is + * required to be able to compile against. + * + * If the compiler is configured to warn about the use of deprecated + * functions, then using functions that were deprecated in version + * %PANGO_VERSION_MIN_REQUIRED or earlier will cause warnings (but + * using functions deprecated in later releases will not). + * + * Since: 1.42 + */ +/* If the package sets PANGO_VERSION_MIN_REQUIRED to some future + * PANGO_VERSION_X_Y value that we don't know about, it will compare as + * 0 in preprocessor tests. + */ +#ifndef PANGO_VERSION_MIN_REQUIRED +# define PANGO_VERSION_MIN_REQUIRED (PANGO_VERSION_CUR_STABLE) +#elif PANGO_VERSION_MIN_REQUIRED == 0 +# undef PANGO_VERSION_MIN_REQUIRED +# define PANGO_VERSION_MIN_REQUIRED (PANGO_VERSION_CUR_STABLE + 2) +#endif + +/** + * PANGO_VERSION_MAX_ALLOWED: + * + * A macro that should be defined by the user prior to including + * the glib.h header. + * The definition should be one of the predefined Pango version + * macros: %PANGO_VERSION_1_2, %PANGO_VERSION_1_4,... + * + * This macro defines the latest version of the Pango API that the + * package is allowed to make use of. + * + * If the compiler is configured to warn about the use of deprecated + * functions, then using functions added after version + * %PANGO_VERSION_MAX_ALLOWED will cause warnings. + * + * Unless you are using PANGO_CHECK_VERSION() or the like to compile + * different code depending on the Pango version, then this should be + * set to the same value as %PANGO_VERSION_MIN_REQUIRED. + * + * Since: 1.42 + */ +#if !defined (PANGO_VERSION_MAX_ALLOWED) || (PANGO_VERSION_MAX_ALLOWED == 0) +# undef PANGO_VERSION_MAX_ALLOWED +# define PANGO_VERSION_MAX_ALLOWED (PANGO_VERSION_CUR_STABLE) +#endif + +/* sanity checks */ +#if PANGO_VERSION_MIN_REQUIRED > PANGO_VERSION_CUR_STABLE +#error "PANGO_VERSION_MIN_REQUIRED must be <= PANGO_VERSION_CUR_STABLE" +#endif +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_MIN_REQUIRED +#error "PANGO_VERSION_MAX_ALLOWED must be >= PANGO_VERSION_MIN_REQUIRED" +#endif +#if PANGO_VERSION_MIN_REQUIRED < PANGO_VERSION_1_2 +#error "PANGO_VERSION_MIN_REQUIRED must be >= PANGO_VERSION_1_2" +#endif + +/* These macros are used to mark deprecated functions in Pango headers, + * and thus have to be exposed in installed headers. + */ +#ifdef PANGO_DISABLE_DEPRECATION_WARNINGS +# define PANGO_DEPRECATED _PANGO_EXTERN +# define PANGO_DEPRECATED_FOR(f) _PANGO_EXTERN +# define PANGO_UNAVAILABLE(maj,min) _PANGO_EXTERN +#else +# define PANGO_DEPRECATED G_DEPRECATED _PANGO_EXTERN +# define PANGO_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _PANGO_EXTERN +# define PANGO_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _PANGO_EXTERN +#endif + +/* XXX: Every new stable minor release should add a set of macros here */ +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_2 +# define PANGO_DEPRECATED_IN_1_2 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_2_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_2 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_2_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_2 +# define PANGO_AVAILABLE_IN_1_2 PANGO_UNAVAILABLE(1, 2) +#else +# define PANGO_AVAILABLE_IN_1_2 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_4 +# define PANGO_DEPRECATED_IN_1_4 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_4_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_4 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_4_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_4 +# define PANGO_AVAILABLE_IN_1_4 PANGO_UNAVAILABLE(1, 4) +#else +# define PANGO_AVAILABLE_IN_1_4 _PANGO_EXTERN +#endif + + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_6 +# define PANGO_DEPRECATED_IN_1_6 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_6_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_6 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_6_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_6 +# define PANGO_AVAILABLE_IN_1_6 PANGO_UNAVAILABLE(1, 6) +#else +# define PANGO_AVAILABLE_IN_1_6 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_8 +# define PANGO_DEPRECATED_IN_1_8 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_8_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_8 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_8_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_8 +# define PANGO_AVAILABLE_IN_1_8 PANGO_UNAVAILABLE(1, 8) +#else +# define PANGO_AVAILABLE_IN_1_8 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_10 +# define PANGO_DEPRECATED_IN_1_10 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_10_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_10 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_10_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_10 +# define PANGO_AVAILABLE_IN_1_10 PANGO_UNAVAILABLE(1, 10) +#else +# define PANGO_AVAILABLE_IN_1_10 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_12 +# define PANGO_AVAILABLE_IN_1_12 PANGO_UNAVAILABLE(1, 12) +#else +# define PANGO_AVAILABLE_IN_1_12 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_12 +# define PANGO_DEPRECATED_IN_1_12 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_12_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_12 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_12_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_14 +# define PANGO_AVAILABLE_IN_1_14 PANGO_UNAVAILABLE(1, 14) +#else +# define PANGO_AVAILABLE_IN_1_14 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_14 +# define PANGO_DEPRECATED_IN_1_14 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_14_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_14 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_14_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_16 +# define PANGO_AVAILABLE_IN_1_16 PANGO_UNAVAILABLE(1, 16) +#else +# define PANGO_AVAILABLE_IN_1_16 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_16 +# define PANGO_DEPRECATED_IN_1_16 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_16_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_16 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_16_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_18 +# define PANGO_DEPRECATED_IN_1_18 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_18_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_18 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_18_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_18 +# define PANGO_AVAILABLE_IN_1_18 PANGO_UNAVAILABLE(1, 18) +#else +# define PANGO_AVAILABLE_IN_1_18 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_20 +# define PANGO_DEPRECATED_IN_1_20 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_20_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_20 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_20_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_20 +# define PANGO_AVAILABLE_IN_1_20 PANGO_UNAVAILABLE(1, 20) +#else +# define PANGO_AVAILABLE_IN_1_20 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_22 +# define PANGO_DEPRECATED_IN_1_22 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_22_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_22 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_22_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_22 +# define PANGO_AVAILABLE_IN_1_22 PANGO_UNAVAILABLE(1, 22) +#else +# define PANGO_AVAILABLE_IN_1_22 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_24 +# define PANGO_DEPRECATED_IN_1_24 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_24_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_24 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_24_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_24 +# define PANGO_AVAILABLE_IN_1_24 PANGO_UNAVAILABLE(1, 24) +#else +# define PANGO_AVAILABLE_IN_1_24 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_26 +# define PANGO_DEPRECATED_IN_1_26 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_26_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_26 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_26_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_26 +# define PANGO_AVAILABLE_IN_1_26 PANGO_UNAVAILABLE(1, 26) +#else +# define PANGO_AVAILABLE_IN_1_26 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_28 +# define PANGO_DEPRECATED_IN_1_28 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_28_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_28 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_28_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_28 +# define PANGO_AVAILABLE_IN_1_28 PANGO_UNAVAILABLE(1, 28) +#else +# define PANGO_AVAILABLE_IN_1_28 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_30 +# define PANGO_DEPRECATED_IN_1_30 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_30_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_30 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_30_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_30 +# define PANGO_AVAILABLE_IN_1_30 PANGO_UNAVAILABLE(1, 30) +#else +# define PANGO_AVAILABLE_IN_1_30 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_32 +# define PANGO_DEPRECATED_IN_1_32 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_32_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_32 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_32_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_32 +# define PANGO_AVAILABLE_IN_1_32 PANGO_UNAVAILABLE(1, 32) +#else +# define PANGO_AVAILABLE_IN_1_32 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_34 +# define PANGO_DEPRECATED_IN_1_34 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_34_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_34 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_34_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_34 +# define PANGO_AVAILABLE_IN_1_34 PANGO_UNAVAILABLE(1, 34) +#else +# define PANGO_AVAILABLE_IN_1_34 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_36 +# define PANGO_DEPRECATED_IN_1_36 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_36_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_36 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_36_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_36 +# define PANGO_AVAILABLE_IN_1_36 PANGO_UNAVAILABLE(1, 36) +#else +# define PANGO_AVAILABLE_IN_1_36 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_38 +# define PANGO_DEPRECATED_IN_1_38 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_38_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_38 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_38_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_38 +# define PANGO_AVAILABLE_IN_1_38 PANGO_UNAVAILABLE(1, 38) +#else +# define PANGO_AVAILABLE_IN_1_38 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_40 +# define PANGO_DEPRECATED_IN_1_40 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_40_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_40 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_40_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_40 +# define PANGO_AVAILABLE_IN_1_40 PANGO_UNAVAILABLE(1, 40) +#else +# define PANGO_AVAILABLE_IN_1_40 _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_42 +# define PANGO_DEPRECATED_IN_1_42 PANGO_DEPRECATED +# define PANGO_DEPRECATED_IN_1_42_FOR(f) PANGO_DEPRECATED_FOR(f) +#else +# define PANGO_DEPRECATED_IN_1_42 _PANGO_EXTERN +# define PANGO_DEPRECATED_IN_1_42_FOR(f) _PANGO_EXTERN +#endif + +#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_42 +# define PANGO_AVAILABLE_IN_1_42 PANGO_UNAVAILABLE(1, 42) +#else +# define PANGO_AVAILABLE_IN_1_42 _PANGO_EXTERN +#endif + +#endif /* __PANGO_VERSION_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango.h new file mode 100755 index 00000000..bf688323 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pango.h @@ -0,0 +1,49 @@ +/* Pango + * pango.h: + * + * Copyright (C) 1999 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_H__ +#define __PANGO_H__ + +#include <pango/pango-attributes.h> +#include <pango/pango-bidi-type.h> +#include <pango/pango-break.h> +#include <pango/pango-context.h> +#include <pango/pango-coverage.h> +#include <pango/pango-engine.h> +#include <pango/pango-enum-types.h> +#include <pango/pango-features.h> +#include <pango/pango-font.h> +#include <pango/pango-fontmap.h> +#include <pango/pango-fontset.h> +#include <pango/pango-glyph.h> +#include <pango/pango-glyph-item.h> +#include <pango/pango-gravity.h> +#include <pango/pango-item.h> +#include <pango/pango-layout.h> +#include <pango/pango-matrix.h> +#include <pango/pango-renderer.h> +#include <pango/pango-script.h> +#include <pango/pango-tabs.h> +#include <pango/pango-types.h> +#include <pango/pango-utils.h> +#include <pango/pango-version-macros.h> + +#endif /* __PANGO_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pangocairo.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pangocairo.h new file mode 100755 index 00000000..d15d879b --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pangocairo.h @@ -0,0 +1,198 @@ +/* Pango + * pangocairo.h: + * + * Copyright (C) 1999, 2004 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGOCAIRO_H__ +#define __PANGOCAIRO_H__ + +#include <pango/pango.h> +#include <cairo.h> + +G_BEGIN_DECLS + +/** + * PangoCairoFont: + * + * #PangoCairoFont is an interface exported by fonts for + * use with Cairo. The actual type of the font will depend + * on the particular font technology Cairo was compiled to use. + * + * Since: 1.18 + **/ +typedef struct _PangoCairoFont PangoCairoFont; +#define PANGO_TYPE_CAIRO_FONT (pango_cairo_font_get_type ()) +#define PANGO_CAIRO_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CAIRO_FONT, PangoCairoFont)) +#define PANGO_IS_CAIRO_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CAIRO_FONT)) + +/** + * PangoCairoFontMap: + * + * #PangoCairoFontMap is an interface exported by font maps for + * use with Cairo. The actual type of the font map will depend + * on the particular font technology Cairo was compiled to use. + * + * Since: 1.10 + **/ +typedef struct _PangoCairoFontMap PangoCairoFontMap; +#define PANGO_TYPE_CAIRO_FONT_MAP (pango_cairo_font_map_get_type ()) +#define PANGO_CAIRO_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CAIRO_FONT_MAP, PangoCairoFontMap)) +#define PANGO_IS_CAIRO_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CAIRO_FONT_MAP)) + +/** + * PangoCairoShapeRendererFunc: + * @cr: a Cairo context with current point set to where the shape should + * be rendered + * @attr: the %PANGO_ATTR_SHAPE to render + * @do_path: whether only the shape path should be appended to current + * path of @cr and no filling/stroking done. This will be set + * to %TRUE when called from pango_cairo_layout_path() and + * pango_cairo_layout_line_path() rendering functions. + * @data: user data passed to pango_cairo_context_set_shape_renderer() + * + * Function type for rendering attributes of type %PANGO_ATTR_SHAPE + * with Pango's Cairo renderer. + */ +typedef void (* PangoCairoShapeRendererFunc) (cairo_t *cr, + PangoAttrShape *attr, + gboolean do_path, + gpointer data); + +/* + * PangoCairoFontMap + */ +PANGO_AVAILABLE_IN_1_10 +GType pango_cairo_font_map_get_type (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_1_10 +PangoFontMap *pango_cairo_font_map_new (void); +PANGO_AVAILABLE_IN_1_18 +PangoFontMap *pango_cairo_font_map_new_for_font_type (cairo_font_type_t fonttype); +PANGO_AVAILABLE_IN_1_10 +PangoFontMap *pango_cairo_font_map_get_default (void); +PANGO_AVAILABLE_IN_1_22 +void pango_cairo_font_map_set_default (PangoCairoFontMap *fontmap); +PANGO_AVAILABLE_IN_1_18 +cairo_font_type_t pango_cairo_font_map_get_font_type (PangoCairoFontMap *fontmap); + +PANGO_AVAILABLE_IN_1_10 +void pango_cairo_font_map_set_resolution (PangoCairoFontMap *fontmap, + double dpi); +PANGO_AVAILABLE_IN_1_10 +double pango_cairo_font_map_get_resolution (PangoCairoFontMap *fontmap); +#ifndef PANGO_DISABLE_DEPRECATED +PANGO_DEPRECATED_IN_1_22_FOR(pango_font_map_create_context) +PangoContext *pango_cairo_font_map_create_context (PangoCairoFontMap *fontmap); +#endif + +/* + * PangoCairoFont + */ +PANGO_AVAILABLE_IN_1_18 +GType pango_cairo_font_get_type (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_1_18 +cairo_scaled_font_t *pango_cairo_font_get_scaled_font (PangoCairoFont *font); + +/* Update a Pango context for the current state of a cairo context + */ +PANGO_AVAILABLE_IN_1_10 +void pango_cairo_update_context (cairo_t *cr, + PangoContext *context); + +PANGO_AVAILABLE_IN_1_10 +void pango_cairo_context_set_font_options (PangoContext *context, + const cairo_font_options_t *options); +PANGO_AVAILABLE_IN_1_10 +const cairo_font_options_t *pango_cairo_context_get_font_options (PangoContext *context); + +PANGO_AVAILABLE_IN_1_10 +void pango_cairo_context_set_resolution (PangoContext *context, + double dpi); +PANGO_AVAILABLE_IN_1_10 +double pango_cairo_context_get_resolution (PangoContext *context); + +PANGO_AVAILABLE_IN_1_18 +void pango_cairo_context_set_shape_renderer (PangoContext *context, + PangoCairoShapeRendererFunc func, + gpointer data, + GDestroyNotify dnotify); +PANGO_AVAILABLE_IN_1_18 +PangoCairoShapeRendererFunc pango_cairo_context_get_shape_renderer (PangoContext *context, + gpointer *data); + +/* Convenience + */ +PANGO_AVAILABLE_IN_1_22 +PangoContext *pango_cairo_create_context (cairo_t *cr); +PANGO_AVAILABLE_IN_ALL +PangoLayout *pango_cairo_create_layout (cairo_t *cr); +PANGO_AVAILABLE_IN_1_10 +void pango_cairo_update_layout (cairo_t *cr, + PangoLayout *layout); + +/* + * Rendering + */ +PANGO_AVAILABLE_IN_1_10 +void pango_cairo_show_glyph_string (cairo_t *cr, + PangoFont *font, + PangoGlyphString *glyphs); +PANGO_AVAILABLE_IN_1_22 +void pango_cairo_show_glyph_item (cairo_t *cr, + const char *text, + PangoGlyphItem *glyph_item); +PANGO_AVAILABLE_IN_1_10 +void pango_cairo_show_layout_line (cairo_t *cr, + PangoLayoutLine *line); +PANGO_AVAILABLE_IN_1_10 +void pango_cairo_show_layout (cairo_t *cr, + PangoLayout *layout); + +PANGO_AVAILABLE_IN_1_14 +void pango_cairo_show_error_underline (cairo_t *cr, + double x, + double y, + double width, + double height); + +/* + * Rendering to a path + */ +PANGO_AVAILABLE_IN_1_10 +void pango_cairo_glyph_string_path (cairo_t *cr, + PangoFont *font, + PangoGlyphString *glyphs); +PANGO_AVAILABLE_IN_1_10 +void pango_cairo_layout_line_path (cairo_t *cr, + PangoLayoutLine *line); +PANGO_AVAILABLE_IN_1_10 +void pango_cairo_layout_path (cairo_t *cr, + PangoLayout *layout); + +PANGO_AVAILABLE_IN_1_14 +void pango_cairo_error_underline_path (cairo_t *cr, + double x, + double y, + double width, + double height); + +G_END_DECLS + +#endif /* __PANGOCAIRO_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pangocoretext.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pangocoretext.h new file mode 100755 index 00000000..3bb9fcd6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pangocoretext.h @@ -0,0 +1,87 @@ +/* Pango + * pangocoretext.h: + * + * Copyright (C) 2005 Imendio AB + * Copyright (C) 2010 Kristian Rietveld <kris@gtk.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGOCORETEXT_H__ +#define __PANGOCORETEXT_H__ + +#include <pango/pango.h> +#include <Carbon/Carbon.h> + +G_BEGIN_DECLS + +#define PANGO_TYPE_CORE_TEXT_FONT (pango_core_text_font_get_type ()) +#define PANGO_CORE_TEXT_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CORE_TEXT_FONT, PangoCoreTextFont)) +#define PANGO_IS_CORE_TEXT_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CORE_TEXT_FONT)) + +typedef struct _PangoCoreTextFont PangoCoreTextFont; +typedef struct _PangoCoreTextFontClass PangoCoreTextFontClass; + +#if defined(PANGO_ENABLE_ENGINE) || defined(PANGO_ENABLE_BACKEND) + +/** + * PANGO_RENDER_TYPE_CORE_TEXT: + * + * A string constant identifying the CoreText renderer. The associated quark (see + * g_quark_from_string()) is used to identify the renderer in pango_find_map(). + */ +#define PANGO_RENDER_TYPE_CORE_TEXT "PangoRenderCoreText" + +#ifdef PANGO_ENABLE_BACKEND + +#define PANGO_CORE_TEXT_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_CORE_TEXT_FONT, PangoCoreTextFontClass)) +#define PANGO_IS_CORE_TEXT_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_CORE_TEXT_FONT)) +#define PANGO_CORE_TEXT_FONT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_CORE_TEXT_FONT, PangoCoreTextFontClass)) + +typedef struct _PangoCoreTextFontPrivate PangoCoreTextFontPrivate; + +struct _PangoCoreTextFont +{ + PangoFont parent_instance; + PangoCoreTextFontPrivate *priv; +}; + +struct _PangoCoreTextFontClass +{ + PangoFontClass parent_class; + + /*< private >*/ + + /* Padding for future expansion */ + void (*_pango_reserved1) (void); + void (*_pango_reserved2) (void); + void (*_pango_reserved3) (void); + void (*_pango_reserved4) (void); +}; + +#endif /* PANGO_ENABLE_BACKEND */ + +PANGO_AVAILABLE_IN_1_24 +CTFontRef pango_core_text_font_get_ctfont (PangoCoreTextFont *font); + +#endif /* PANGO_ENABLE_ENGINE || PANGO_ENABLE_BACKEND */ + +PANGO_AVAILABLE_IN_ALL +GType pango_core_text_font_get_type (void) G_GNUC_CONST; + +G_END_DECLS + +#endif /* __PANGOCORETEXT_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pangofc-decoder.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pangofc-decoder.h new file mode 100755 index 00000000..f4b8cc86 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pangofc-decoder.h @@ -0,0 +1,113 @@ +/* Pango + * pangofc-decoder.h: Custom encoders/decoders on a per-font basis. + * + * Copyright (C) 2004 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_DECODER_H_ +#define __PANGO_DECODER_H_ + +#include <pango/pangofc-font.h> + +G_BEGIN_DECLS + +#define PANGO_TYPE_FC_DECODER (pango_fc_decoder_get_type()) +#define PANGO_FC_DECODER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FC_DECODER, PangoFcDecoder)) +#define PANGO_IS_FC_DECODER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FC_DECODER)) + +typedef struct _PangoFcDecoder PangoFcDecoder; +typedef struct _PangoFcDecoderClass PangoFcDecoderClass; + +#define PANGO_FC_DECODER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FC_DECODER, PangoFcDecoderClass)) +#define PANGO_IS_FC_DECODER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FC_DECODER)) +#define PANGO_FC_DECODER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FC_DECODER, PangoFcDecoderClass)) + +/** + * PangoFcDecoder: + * + * #PangoFcDecoder is a virtual base class that implementations will + * inherit from. It's the interface that is used to define a custom + * encoding for a font. These objects are created in your code from a + * function callback that was originally registered with + * pango_fc_font_map_add_decoder_find_func(). Pango requires + * information about the supported charset for a font as well as the + * individual character to glyph conversions. Pango gets that + * information via the #get_charset and #get_glyph callbacks into your + * object implementation. + * + * Since: 1.6 + **/ +struct _PangoFcDecoder +{ + /*< private >*/ + GObject parent_instance; +}; + +/** + * PangoFcDecoderClass: + * @get_charset: This returns an #FcCharset given a #PangoFcFont that + * includes a list of supported characters in the font. The + * #FcCharSet that is returned should be an internal reference to your + * code. Pango will not free this structure. It is important that + * you make this callback fast because this callback is called + * separately for each character to determine Unicode coverage. + * @get_glyph: This returns a single #PangoGlyph for a given Unicode + * code point. + * + * Class structure for #PangoFcDecoder. + * + * Since: 1.6 + **/ +struct _PangoFcDecoderClass +{ + /*< private >*/ + GObjectClass parent_class; + + /* vtable - not signals */ + /*< public >*/ + FcCharSet *(*get_charset) (PangoFcDecoder *decoder, + PangoFcFont *fcfont); + PangoGlyph (*get_glyph) (PangoFcDecoder *decoder, + PangoFcFont *fcfont, + guint32 wc); + + /*< private >*/ + + /* Padding for future expansion */ + void (*_pango_reserved1) (void); + void (*_pango_reserved2) (void); + void (*_pango_reserved3) (void); + void (*_pango_reserved4) (void); +}; + +PANGO_AVAILABLE_IN_1_6 +GType pango_fc_decoder_get_type (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_1_6 +FcCharSet *pango_fc_decoder_get_charset (PangoFcDecoder *decoder, + PangoFcFont *fcfont); + +PANGO_AVAILABLE_IN_1_6 +PangoGlyph pango_fc_decoder_get_glyph (PangoFcDecoder *decoder, + PangoFcFont *fcfont, + guint32 wc); + +G_END_DECLS + +#endif /* __PANGO_DECODER_H_ */ + diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pangofc-font.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pangofc-font.h new file mode 100755 index 00000000..954abdcb --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pangofc-font.h @@ -0,0 +1,166 @@ +/* Pango + * pangofc-font.h: Base fontmap type for fontconfig-based backends + * + * Copyright (C) 2003 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_FC_FONT_H__ +#define __PANGO_FC_FONT_H__ + +#include <pango/pango.h> + +/* Freetype has undefined macros in its header */ +#ifdef PANGO_COMPILATION +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wundef" +#endif + +#include <ft2build.h> +#include FT_FREETYPE_H +#include <fontconfig/fontconfig.h> + +#ifdef PANGO_COMPILATION +#pragma GCC diagnostic pop +#endif + +G_BEGIN_DECLS + +#define PANGO_TYPE_FC_FONT (pango_fc_font_get_type ()) +#define PANGO_FC_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FC_FONT, PangoFcFont)) +#define PANGO_IS_FC_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FC_FONT)) + +typedef struct _PangoFcFont PangoFcFont; +typedef struct _PangoFcFontClass PangoFcFontClass; + +#if defined(PANGO_ENABLE_ENGINE) || defined(PANGO_ENABLE_BACKEND) + +/** + * PANGO_RENDER_TYPE_FC: + * + * A string constant used to identify shape engines that work + * with the fontconfig based backends. See the @engine_type field + * of #PangoEngineInfo. + **/ +#define PANGO_RENDER_TYPE_FC "PangoRenderFc" + +#ifdef PANGO_ENABLE_BACKEND + +#define PANGO_FC_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FC_FONT, PangoFcFontClass)) +#define PANGO_IS_FC_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FC_FONT)) +#define PANGO_FC_FONT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FC_FONT, PangoFcFontClass)) + +/** + * PangoFcFont: + * + * #PangoFcFont is a base class for font implementations + * using the Fontconfig and FreeType libraries and is used in + * conjunction with #PangoFcFontMap. When deriving from this + * class, you need to implement all of its virtual functions + * other than shutdown() along with the get_glyph_extents() + * virtual function from #PangoFont. + **/ +struct _PangoFcFont +{ + PangoFont parent_instance; + + FcPattern *font_pattern; /* fully resolved pattern */ + PangoFontMap *fontmap; /* associated map */ + gpointer priv; /* used internally */ + PangoMatrix matrix; /* used internally */ + PangoFontDescription *description; + + GSList *metrics_by_lang; + + guint is_hinted : 1; + guint is_transformed : 1; +}; + +/** + * PangoFcFontClass: + * @lock_face: Returns the FT_Face of the font and increases + * the reference count for the face by one. + * @unlock_face: Decreases the reference count for the + * FT_Face of the font by one. When the count is zero, + * the #PangoFcFont subclass is allowed to free the + * FT_Face. + * @has_char: Return %TRUE if the the font contains a glyph + * corresponding to the specified character. + * @get_glyph: Gets the glyph that corresponds to the given + * Unicode character. + * @get_unknown_glyph: (nullable): Gets the glyph that + * should be used to display an unknown-glyph indication + * for the specified Unicode character. May be %NULL. + * @shutdown: (nullable): Performs any font-specific + * shutdown code that needs to be done when + * pango_fc_font_map_shutdown is called. May be %NULL. + * + * Class structure for #PangoFcFont. + **/ +struct _PangoFcFontClass +{ + /*< private >*/ + PangoFontClass parent_class; + + /*< public >*/ + FT_Face (*lock_face) (PangoFcFont *font); + void (*unlock_face) (PangoFcFont *font); + gboolean (*has_char) (PangoFcFont *font, + gunichar wc); + guint (*get_glyph) (PangoFcFont *font, + gunichar wc); + PangoGlyph (*get_unknown_glyph) (PangoFcFont *font, + gunichar wc); + void (*shutdown) (PangoFcFont *font); + /*< private >*/ + + /* Padding for future expansion */ + void (*_pango_reserved1) (void); + void (*_pango_reserved2) (void); + void (*_pango_reserved3) (void); + void (*_pango_reserved4) (void); +}; + +#endif /* PANGO_ENABLE_BACKEND */ + +PANGO_AVAILABLE_IN_1_4 +gboolean pango_fc_font_has_char (PangoFcFont *font, + gunichar wc); +PANGO_AVAILABLE_IN_1_4 +guint pango_fc_font_get_glyph (PangoFcFont *font, + gunichar wc); +#ifndef PANGO_DISABLE_DEPRECATED +PANGO_DEPRECATED_FOR(PANGO_GET_UNKNOWN_GLYPH) +PangoGlyph pango_fc_font_get_unknown_glyph (PangoFcFont *font, + gunichar wc); +PANGO_DEPRECATED_IN_1_32 +void pango_fc_font_kern_glyphs (PangoFcFont *font, + PangoGlyphString *glyphs); +#endif /* PANGO_DISABLE_DEPRECATED */ + +#endif /* PANGO_ENABLE_ENGINE || PANGO_ENABLE_BACKEND */ + +PANGO_AVAILABLE_IN_ALL +GType pango_fc_font_get_type (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_1_4 +FT_Face pango_fc_font_lock_face (PangoFcFont *font); +PANGO_AVAILABLE_IN_1_4 +void pango_fc_font_unlock_face (PangoFcFont *font); + +G_END_DECLS +#endif /* __PANGO_FC_FONT_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pangofc-fontmap.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pangofc-fontmap.h new file mode 100755 index 00000000..bff288b6 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pangofc-fontmap.h @@ -0,0 +1,329 @@ +/* Pango + * pangofc-fontmap.h: Base fontmap type for fontconfig-based backends + * + * Copyright (C) 2003 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGO_FC_FONT_MAP_H__ +#define __PANGO_FC_FONT_MAP_H__ + +#include <pango/pango.h> +#include <fontconfig/fontconfig.h> +#include <pango/pangofc-decoder.h> +#include <pango/pangofc-font.h> + +G_BEGIN_DECLS + + +#ifdef PANGO_ENABLE_BACKEND + +/** + * PangoFcFontsetKey: + * + * An opaque structure containing all the information needed for + * loading a fontset with the PangoFc fontmap. + * + * Since: 1.24 + **/ +typedef struct _PangoFcFontsetKey PangoFcFontsetKey; + +PANGO_AVAILABLE_IN_1_24 +PangoLanguage *pango_fc_fontset_key_get_language (const PangoFcFontsetKey *key); +PANGO_AVAILABLE_IN_1_24 +const PangoFontDescription *pango_fc_fontset_key_get_description (const PangoFcFontsetKey *key); +PANGO_AVAILABLE_IN_1_24 +const PangoMatrix *pango_fc_fontset_key_get_matrix (const PangoFcFontsetKey *key); +PANGO_AVAILABLE_IN_1_24 +double pango_fc_fontset_key_get_absolute_size (const PangoFcFontsetKey *key); +PANGO_AVAILABLE_IN_1_24 +double pango_fc_fontset_key_get_resolution (const PangoFcFontsetKey *key); +PANGO_AVAILABLE_IN_1_24 +gpointer pango_fc_fontset_key_get_context_key (const PangoFcFontsetKey *key); + +/** + * PangoFcFontKey: + * + * An opaque structure containing all the information needed for + * loading a font with the PangoFc fontmap. + * + * Since: 1.24 + **/ +typedef struct _PangoFcFontKey PangoFcFontKey; + +PANGO_AVAILABLE_IN_1_24 +const FcPattern *pango_fc_font_key_get_pattern (const PangoFcFontKey *key); +PANGO_AVAILABLE_IN_1_24 +const PangoMatrix *pango_fc_font_key_get_matrix (const PangoFcFontKey *key); +PANGO_AVAILABLE_IN_1_24 +gpointer pango_fc_font_key_get_context_key (const PangoFcFontKey *key); +PANGO_AVAILABLE_IN_1_40 +const char *pango_fc_font_key_get_variations (const PangoFcFontKey *key); + +#endif + + +/* + * PangoFcFontMap + */ + +#define PANGO_TYPE_FC_FONT_MAP (pango_fc_font_map_get_type ()) +#define PANGO_FC_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FC_FONT_MAP, PangoFcFontMap)) +#define PANGO_IS_FC_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FC_FONT_MAP)) + +typedef struct _PangoFcFontMap PangoFcFontMap; +typedef struct _PangoFcFontMapClass PangoFcFontMapClass; +typedef struct _PangoFcFontMapPrivate PangoFcFontMapPrivate; + +#ifdef PANGO_ENABLE_BACKEND + +#define PANGO_FC_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FC_FONT_MAP, PangoFcFontMapClass)) +#define PANGO_IS_FC_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FC_FONT_MAP)) +#define PANGO_FC_FONT_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FC_FONT_MAP, PangoFcFontMapClass)) + +/** + * PangoFcFontMap: + * + * #PangoFcFontMap is a base class for font map implementations + * using the Fontconfig and FreeType libraries. To create a new + * backend using Fontconfig and FreeType, you derive from this class + * and implement a new_font() virtual function that creates an + * instance deriving from #PangoFcFont. + **/ +struct _PangoFcFontMap +{ + PangoFontMap parent_instance; + + PangoFcFontMapPrivate *priv; +}; + +/** + * PangoFcFontMapClass: + * @default_substitute: (nullable): Substitutes in default + * values for unspecified fields in a #FcPattern. This will + * be called prior to creating a font for the pattern. May be + * %NULL. Deprecated in favor of @font_key_substitute(). + * @new_font: Creates a new #PangoFcFont for the specified + * pattern of the appropriate type for this font map. The + * @pattern argument must be passed to the "pattern" property + * of #PangoFcFont when you call g_object_new(). Deprecated + * in favor of @create_font(). + * @get_resolution: Gets the resolution (the scale factor + * between logical and absolute font sizes) that the backend + * will use for a particular fontmap and context. @context + * may be null. + * @context_key_get: Gets an opaque key holding backend + * specific options for the context that will affect + * fonts created by @create_font(). The result must point to + * persistant storage owned by the fontmap. This key + * is used to index hash tables used to look up fontsets + * and fonts. + * @context_key_copy: Copies a context key. Pango uses this + * to make a persistant copy of the value returned from + * @context_key_get. + * @context_key_free: Frees a context key copied with + * @context_key_copy. + * @context_key_hash: Gets a hash value for a context key + * @context_key_equal: Compares two context keys for equality. + * @fontset_key_substitute: (nullable): Substitutes in + * default values for unspecified fields in a + * #FcPattern. This will be called prior to creating a font + * for the pattern. May be %NULL. (Since: 1.24) + * @create_font: (nullable): Creates a new #PangoFcFont for + * the specified pattern of the appropriate type for this + * font map using information from the font key that is + * passed in. The @pattern member of @font_key can be + * retrieved using pango_fc_font_key_get_pattern() and must + * be passed to the "pattern" property of #PangoFcFont when + * you call g_object_new(). If %NULL, new_font() is used. + * (Since: 1.24) + * + * Class structure for #PangoFcFontMap. + **/ +struct _PangoFcFontMapClass +{ + /*< private >*/ + PangoFontMapClass parent_class; + + /*< public >*/ + /* Deprecated in favor of fontset_key_substitute */ + void (*default_substitute) (PangoFcFontMap *fontmap, + FcPattern *pattern); + /* Deprecated in favor of create_font */ + PangoFcFont *(*new_font) (PangoFcFontMap *fontmap, + FcPattern *pattern); + + double (*get_resolution) (PangoFcFontMap *fcfontmap, + PangoContext *context); + + gconstpointer (*context_key_get) (PangoFcFontMap *fcfontmap, + PangoContext *context); + gpointer (*context_key_copy) (PangoFcFontMap *fcfontmap, + gconstpointer key); + void (*context_key_free) (PangoFcFontMap *fcfontmap, + gpointer key); + guint32 (*context_key_hash) (PangoFcFontMap *fcfontmap, + gconstpointer key); + gboolean (*context_key_equal) (PangoFcFontMap *fcfontmap, + gconstpointer key_a, + gconstpointer key_b); + void (*fontset_key_substitute)(PangoFcFontMap *fontmap, + + PangoFcFontsetKey *fontsetkey, + FcPattern *pattern); + PangoFcFont *(*create_font) (PangoFcFontMap *fontmap, + PangoFcFontKey *fontkey); + /*< private >*/ + + /* Padding for future expansion */ + void (*_pango_reserved1) (void); + void (*_pango_reserved2) (void); + void (*_pango_reserved3) (void); + void (*_pango_reserved4) (void); +}; + +#ifndef PANGO_DISABLE_DEPRECATED +PANGO_DEPRECATED_IN_1_22_FOR(pango_font_map_create_context) +PangoContext * pango_fc_font_map_create_context (PangoFcFontMap *fcfontmap); +#endif +PANGO_AVAILABLE_IN_1_4 +void pango_fc_font_map_shutdown (PangoFcFontMap *fcfontmap); + +#endif + +PANGO_AVAILABLE_IN_ALL +GType pango_fc_font_map_get_type (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_1_4 +void pango_fc_font_map_cache_clear (PangoFcFontMap *fcfontmap); + +PANGO_AVAILABLE_IN_1_38 +void +pango_fc_font_map_config_changed (PangoFcFontMap *fcfontmap); + +PANGO_AVAILABLE_IN_1_38 +void +pango_fc_font_map_set_config (PangoFcFontMap *fcfontmap, + FcConfig *fcconfig); +PANGO_AVAILABLE_IN_1_38 +FcConfig * +pango_fc_font_map_get_config (PangoFcFontMap *fcfontmap); + +/** + * PangoFcDecoderFindFunc: + * @pattern: a fully resolved #FcPattern specifying the font on the system + * @user_data: user data passed to pango_fc_font_map_add_decoder_find_func() + * + * Callback function passed to pango_fc_font_map_add_decoder_find_func(). + * + * Return value: a new reference to a custom decoder for this pattern, + * or %NULL if the default decoder handling should be used. + **/ +typedef PangoFcDecoder * (*PangoFcDecoderFindFunc) (FcPattern *pattern, + gpointer user_data); + +PANGO_AVAILABLE_IN_1_6 +void pango_fc_font_map_add_decoder_find_func (PangoFcFontMap *fcfontmap, + PangoFcDecoderFindFunc findfunc, + gpointer user_data, + GDestroyNotify dnotify); +PANGO_AVAILABLE_IN_1_26 +PangoFcDecoder *pango_fc_font_map_find_decoder (PangoFcFontMap *fcfontmap, + FcPattern *pattern); + +PANGO_AVAILABLE_IN_1_4 +PangoFontDescription *pango_fc_font_description_from_pattern (FcPattern *pattern, + gboolean include_size); + +/** + * PANGO_FC_GRAVITY: + * + * String representing a fontconfig property name that Pango sets on any + * fontconfig pattern it passes to fontconfig if a #PangoGravity other + * than %PANGO_GRAVITY_SOUTH is desired. + * + * The property will have a #PangoGravity value as a string, like "east". + * This can be used to write fontconfig configuration rules to choose + * different fonts for horizontal and vertical writing directions. + * + * Since: 1.20 + */ +#define PANGO_FC_GRAVITY "pangogravity" + +/** + * PANGO_FC_VERSION: + * + * String representing a fontconfig property name that Pango sets on any + * fontconfig pattern it passes to fontconfig. + * + * The property will have an integer value equal to what + * pango_version() returns. + * This can be used to write fontconfig configuration rules that only affect + * certain pango versions (or only pango-using applications, or only + * non-pango-using applications). + * + * Since: 1.20 + */ +#define PANGO_FC_VERSION "pangoversion" + +/** + * PANGO_FC_PRGNAME: + * + * String representing a fontconfig property name that Pango sets on any + * fontconfig pattern it passes to fontconfig. + * + * The property will have a string equal to what + * g_get_prgname() returns. + * This can be used to write fontconfig configuration rules that only affect + * certain applications. + * + * This is equivalent to FC_PRGNAME in versions of fontconfig that have that. + * + * Since: 1.24 + */ +#define PANGO_FC_PRGNAME "prgname" + +/** + * PANGO_FC_FONT_FEATURES: + * + * String representing a fontconfig property name that Pango reads from font + * patterns to populate list of OpenType features to be enabled for the font + * by default. + * + * The property will have a number of string elements, each of which is the + * OpenType feature tag of one feature to enable. + * + * This is equivalent to FC_FONT_FEATURES in versions of fontconfig that have that. + * + * Since: 1.34 + */ +#define PANGO_FC_FONT_FEATURES "fontfeatures" + +/** + * PANGO_FC_FONT_VARIATIONS: + * + * String representing a fontconfig property name that Pango reads from font + * patterns to populate list of OpenType font variations to be used for a font. + * + * The property will have a string elements, each of which a comma-separated + * list of OpenType axis setting of the form AXIS=VALUE. + */ +#define PANGO_FC_FONT_VARIATIONS "fontvariations" + +G_END_DECLS + +#endif /* __PANGO_FC_FONT_MAP_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pangoft2.h b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pangoft2.h new file mode 100755 index 00000000..c0830327 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/include/pango-1.0/pango/pangoft2.h @@ -0,0 +1,144 @@ +/* Pango + * pangoft2.h: + * + * Copyright (C) 1999 Red Hat Software + * Copyright (C) 2000 Tor Lillqvist + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PANGOFT2_H__ +#define __PANGOFT2_H__ + +#include <fontconfig/fontconfig.h> + +#include <pango/pango-layout.h> +#include <pango/pangofc-font.h> + +G_BEGIN_DECLS + +#ifndef PANGO_DISABLE_DEPRECATED +/** + * PANGO_RENDER_TYPE_FT2: + * + * A string constant that was used to identify shape engines that work + * with the FreeType backend. See %PANGO_RENDER_TYPE_FC for the replacement. + */ +#define PANGO_RENDER_TYPE_FT2 "PangoRenderFT2" +#endif + +#define PANGO_TYPE_FT2_FONT_MAP (pango_ft2_font_map_get_type ()) +#define PANGO_FT2_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FT2_FONT_MAP, PangoFT2FontMap)) +#define PANGO_FT2_IS_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FT2_FONT_MAP)) + +typedef struct _PangoFT2FontMap PangoFT2FontMap; + +/** + * PangoFT2SubstituteFunc: + * @pattern: the <type>FcPattern</type> to tweak. + * @data: user data. + * + * Function type for doing final config tweaking on prepared FcPatterns. + */ +typedef void (*PangoFT2SubstituteFunc) (FcPattern *pattern, + gpointer data); + +/* Calls for applications */ + +PANGO_AVAILABLE_IN_ALL +void pango_ft2_render (FT_Bitmap *bitmap, + PangoFont *font, + PangoGlyphString *glyphs, + gint x, + gint y); +PANGO_AVAILABLE_IN_1_6 +void pango_ft2_render_transformed (FT_Bitmap *bitmap, + const PangoMatrix *matrix, + PangoFont *font, + PangoGlyphString *glyphs, + int x, + int y); + +PANGO_AVAILABLE_IN_ALL +void pango_ft2_render_layout_line (FT_Bitmap *bitmap, + PangoLayoutLine *line, + int x, + int y); +PANGO_AVAILABLE_IN_1_6 +void pango_ft2_render_layout_line_subpixel (FT_Bitmap *bitmap, + PangoLayoutLine *line, + int x, + int y); +PANGO_AVAILABLE_IN_ALL +void pango_ft2_render_layout (FT_Bitmap *bitmap, + PangoLayout *layout, + int x, + int y); +PANGO_AVAILABLE_IN_1_6 +void pango_ft2_render_layout_subpixel (FT_Bitmap *bitmap, + PangoLayout *layout, + int x, + int y); + +PANGO_AVAILABLE_IN_ALL +GType pango_ft2_font_map_get_type (void) G_GNUC_CONST; + +PANGO_AVAILABLE_IN_1_2 +PangoFontMap *pango_ft2_font_map_new (void); +PANGO_AVAILABLE_IN_1_2 +void pango_ft2_font_map_set_resolution (PangoFT2FontMap *fontmap, + double dpi_x, + double dpi_y); +PANGO_AVAILABLE_IN_1_2 +void pango_ft2_font_map_set_default_substitute (PangoFT2FontMap *fontmap, + PangoFT2SubstituteFunc func, + gpointer data, + GDestroyNotify notify); +PANGO_AVAILABLE_IN_1_2 +void pango_ft2_font_map_substitute_changed (PangoFT2FontMap *fontmap); +#ifndef PANGO_DISABLE_DEPRECATED +PANGO_DEPRECATED_IN_1_22_FOR(pango_font_map_create_context) +PangoContext *pango_ft2_font_map_create_context (PangoFT2FontMap *fontmap); +#endif + + +/* API for rendering modules + */ +#ifndef PANGO_DISABLE_DEPRECATED +PANGO_DEPRECATED_FOR(pango_font_map_create_context) +PangoContext *pango_ft2_get_context (double dpi_x, + double dpi_y); +PANGO_DEPRECATED_FOR(pango_ft2_font_map_new) +PangoFontMap *pango_ft2_font_map_for_display (void); +PANGO_DEPRECATED +void pango_ft2_shutdown_display (void); + +PANGO_DEPRECATED_FOR(PANGO_GET_UNKNOWN_GLYPH) +PangoGlyph pango_ft2_get_unknown_glyph (PangoFont *font); +PANGO_DEPRECATED_FOR(pango_fc_font_kern_glyphs) +int pango_ft2_font_get_kerning (PangoFont *font, + PangoGlyph left, + PangoGlyph right); +PANGO_DEPRECATED_FOR(pango_fc_font_lock_face) +FT_Face pango_ft2_font_get_face (PangoFont *font); +PANGO_DEPRECATED_FOR(pango_font_get_coverage) +PangoCoverage *pango_ft2_font_get_coverage (PangoFont *font, + PangoLanguage *language); +#endif /* PANGO_DISABLE_DEPRECATED */ + +G_END_DECLS + +#endif /* __PANGOFT2_H__ */ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/lib/libpango-1.0.0.dylib b/frameworks/cairosvg/dependencies/pango/1.42.1/lib/libpango-1.0.0.dylib new file mode 100755 index 00000000..72ee3c3e Binary files /dev/null and b/frameworks/cairosvg/dependencies/pango/1.42.1/lib/libpango-1.0.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/lib/libpango-1.0.dylib b/frameworks/cairosvg/dependencies/pango/1.42.1/lib/libpango-1.0.dylib new file mode 120000 index 00000000..8289b5b5 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/lib/libpango-1.0.dylib @@ -0,0 +1 @@ +libpango-1.0.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/lib/libpangocairo-1.0.0.dylib b/frameworks/cairosvg/dependencies/pango/1.42.1/lib/libpangocairo-1.0.0.dylib new file mode 100755 index 00000000..11ecfdec Binary files /dev/null and b/frameworks/cairosvg/dependencies/pango/1.42.1/lib/libpangocairo-1.0.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/lib/libpangocairo-1.0.dylib b/frameworks/cairosvg/dependencies/pango/1.42.1/lib/libpangocairo-1.0.dylib new file mode 120000 index 00000000..5fbdbb73 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/lib/libpangocairo-1.0.dylib @@ -0,0 +1 @@ +libpangocairo-1.0.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/lib/libpangoft2-1.0.0.dylib b/frameworks/cairosvg/dependencies/pango/1.42.1/lib/libpangoft2-1.0.0.dylib new file mode 100755 index 00000000..ae93b209 Binary files /dev/null and b/frameworks/cairosvg/dependencies/pango/1.42.1/lib/libpangoft2-1.0.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/pango/1.42.1/lib/libpangoft2-1.0.dylib b/frameworks/cairosvg/dependencies/pango/1.42.1/lib/libpangoft2-1.0.dylib new file mode 120000 index 00000000..98fb14f7 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pango/1.42.1/lib/libpangoft2-1.0.dylib @@ -0,0 +1 @@ +libpangoft2-1.0.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/pcre/8.42/include/pcre.h b/frameworks/cairosvg/dependencies/pcre/8.42/include/pcre.h new file mode 100755 index 00000000..0efad3f9 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pcre/8.42/include/pcre.h @@ -0,0 +1,677 @@ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* This is the public header file for the PCRE library, to be #included by +applications that call the PCRE functions. + + Copyright (c) 1997-2014 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + +#ifndef _PCRE_H +#define _PCRE_H + +/* The current PCRE version information. */ + +#define PCRE_MAJOR 8 +#define PCRE_MINOR 42 +#define PCRE_PRERELEASE +#define PCRE_DATE 2018-03-20 + +/* When an application links to a PCRE DLL in Windows, the symbols that are +imported have to be identified as such. When building PCRE, the appropriate +export setting is defined in pcre_internal.h, which includes this file. So we +don't change existing definitions of PCRE_EXP_DECL and PCRECPP_EXP_DECL. */ + +#if defined(_WIN32) && !defined(PCRE_STATIC) +# ifndef PCRE_EXP_DECL +# define PCRE_EXP_DECL extern __declspec(dllimport) +# endif +# ifdef __cplusplus +# ifndef PCRECPP_EXP_DECL +# define PCRECPP_EXP_DECL extern __declspec(dllimport) +# endif +# ifndef PCRECPP_EXP_DEFN +# define PCRECPP_EXP_DEFN __declspec(dllimport) +# endif +# endif +#endif + +/* By default, we use the standard "extern" declarations. */ + +#ifndef PCRE_EXP_DECL +# ifdef __cplusplus +# define PCRE_EXP_DECL extern "C" +# else +# define PCRE_EXP_DECL extern +# endif +#endif + +#ifdef __cplusplus +# ifndef PCRECPP_EXP_DECL +# define PCRECPP_EXP_DECL extern +# endif +# ifndef PCRECPP_EXP_DEFN +# define PCRECPP_EXP_DEFN +# endif +#endif + +/* Have to include stdlib.h in order to ensure that size_t is defined; +it is needed here for malloc. */ + +#include <stdlib.h> + +/* Allow for C++ users */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Public options. Some are compile-time only, some are run-time only, and some +are both. Most of the compile-time options are saved with the compiled regex so +that they can be inspected during studying (and therefore JIT compiling). Note +that pcre_study() has its own set of options. Originally, all the options +defined here used distinct bits. However, almost all the bits in a 32-bit word +are now used, so in order to conserve them, option bits that were previously +only recognized at matching time (i.e. by pcre_exec() or pcre_dfa_exec()) may +also be used for compile-time options that affect only compiling and are not +relevant for studying or JIT compiling. + +Some options for pcre_compile() change its behaviour but do not affect the +behaviour of the execution functions. Other options are passed through to the +execution functions and affect their behaviour, with or without affecting the +behaviour of pcre_compile(). + +Options that can be passed to pcre_compile() are tagged Cx below, with these +variants: + +C1 Affects compile only +C2 Does not affect compile; affects exec, dfa_exec +C3 Affects compile, exec, dfa_exec +C4 Affects compile, exec, dfa_exec, study +C5 Affects compile, exec, study + +Options that can be set for pcre_exec() and/or pcre_dfa_exec() are flagged with +E and D, respectively. They take precedence over C3, C4, and C5 settings passed +from pcre_compile(). Those that are compatible with JIT execution are flagged +with J. */ + +#define PCRE_CASELESS 0x00000001 /* C1 */ +#define PCRE_MULTILINE 0x00000002 /* C1 */ +#define PCRE_DOTALL 0x00000004 /* C1 */ +#define PCRE_EXTENDED 0x00000008 /* C1 */ +#define PCRE_ANCHORED 0x00000010 /* C4 E D */ +#define PCRE_DOLLAR_ENDONLY 0x00000020 /* C2 */ +#define PCRE_EXTRA 0x00000040 /* C1 */ +#define PCRE_NOTBOL 0x00000080 /* E D J */ +#define PCRE_NOTEOL 0x00000100 /* E D J */ +#define PCRE_UNGREEDY 0x00000200 /* C1 */ +#define PCRE_NOTEMPTY 0x00000400 /* E D J */ +#define PCRE_UTF8 0x00000800 /* C4 ) */ +#define PCRE_UTF16 0x00000800 /* C4 ) Synonyms */ +#define PCRE_UTF32 0x00000800 /* C4 ) */ +#define PCRE_NO_AUTO_CAPTURE 0x00001000 /* C1 */ +#define PCRE_NO_UTF8_CHECK 0x00002000 /* C1 E D J ) */ +#define PCRE_NO_UTF16_CHECK 0x00002000 /* C1 E D J ) Synonyms */ +#define PCRE_NO_UTF32_CHECK 0x00002000 /* C1 E D J ) */ +#define PCRE_AUTO_CALLOUT 0x00004000 /* C1 */ +#define PCRE_PARTIAL_SOFT 0x00008000 /* E D J ) Synonyms */ +#define PCRE_PARTIAL 0x00008000 /* E D J ) */ + +/* This pair use the same bit. */ +#define PCRE_NEVER_UTF 0x00010000 /* C1 ) Overlaid */ +#define PCRE_DFA_SHORTEST 0x00010000 /* D ) Overlaid */ + +/* This pair use the same bit. */ +#define PCRE_NO_AUTO_POSSESS 0x00020000 /* C1 ) Overlaid */ +#define PCRE_DFA_RESTART 0x00020000 /* D ) Overlaid */ + +#define PCRE_FIRSTLINE 0x00040000 /* C3 */ +#define PCRE_DUPNAMES 0x00080000 /* C1 */ +#define PCRE_NEWLINE_CR 0x00100000 /* C3 E D */ +#define PCRE_NEWLINE_LF 0x00200000 /* C3 E D */ +#define PCRE_NEWLINE_CRLF 0x00300000 /* C3 E D */ +#define PCRE_NEWLINE_ANY 0x00400000 /* C3 E D */ +#define PCRE_NEWLINE_ANYCRLF 0x00500000 /* C3 E D */ +#define PCRE_BSR_ANYCRLF 0x00800000 /* C3 E D */ +#define PCRE_BSR_UNICODE 0x01000000 /* C3 E D */ +#define PCRE_JAVASCRIPT_COMPAT 0x02000000 /* C5 */ +#define PCRE_NO_START_OPTIMIZE 0x04000000 /* C2 E D ) Synonyms */ +#define PCRE_NO_START_OPTIMISE 0x04000000 /* C2 E D ) */ +#define PCRE_PARTIAL_HARD 0x08000000 /* E D J */ +#define PCRE_NOTEMPTY_ATSTART 0x10000000 /* E D J */ +#define PCRE_UCP 0x20000000 /* C3 */ + +/* Exec-time and get/set-time error codes */ + +#define PCRE_ERROR_NOMATCH (-1) +#define PCRE_ERROR_NULL (-2) +#define PCRE_ERROR_BADOPTION (-3) +#define PCRE_ERROR_BADMAGIC (-4) +#define PCRE_ERROR_UNKNOWN_OPCODE (-5) +#define PCRE_ERROR_UNKNOWN_NODE (-5) /* For backward compatibility */ +#define PCRE_ERROR_NOMEMORY (-6) +#define PCRE_ERROR_NOSUBSTRING (-7) +#define PCRE_ERROR_MATCHLIMIT (-8) +#define PCRE_ERROR_CALLOUT (-9) /* Never used by PCRE itself */ +#define PCRE_ERROR_BADUTF8 (-10) /* Same for 8/16/32 */ +#define PCRE_ERROR_BADUTF16 (-10) /* Same for 8/16/32 */ +#define PCRE_ERROR_BADUTF32 (-10) /* Same for 8/16/32 */ +#define PCRE_ERROR_BADUTF8_OFFSET (-11) /* Same for 8/16 */ +#define PCRE_ERROR_BADUTF16_OFFSET (-11) /* Same for 8/16 */ +#define PCRE_ERROR_PARTIAL (-12) +#define PCRE_ERROR_BADPARTIAL (-13) +#define PCRE_ERROR_INTERNAL (-14) +#define PCRE_ERROR_BADCOUNT (-15) +#define PCRE_ERROR_DFA_UITEM (-16) +#define PCRE_ERROR_DFA_UCOND (-17) +#define PCRE_ERROR_DFA_UMLIMIT (-18) +#define PCRE_ERROR_DFA_WSSIZE (-19) +#define PCRE_ERROR_DFA_RECURSE (-20) +#define PCRE_ERROR_RECURSIONLIMIT (-21) +#define PCRE_ERROR_NULLWSLIMIT (-22) /* No longer actually used */ +#define PCRE_ERROR_BADNEWLINE (-23) +#define PCRE_ERROR_BADOFFSET (-24) +#define PCRE_ERROR_SHORTUTF8 (-25) +#define PCRE_ERROR_SHORTUTF16 (-25) /* Same for 8/16 */ +#define PCRE_ERROR_RECURSELOOP (-26) +#define PCRE_ERROR_JIT_STACKLIMIT (-27) +#define PCRE_ERROR_BADMODE (-28) +#define PCRE_ERROR_BADENDIANNESS (-29) +#define PCRE_ERROR_DFA_BADRESTART (-30) +#define PCRE_ERROR_JIT_BADOPTION (-31) +#define PCRE_ERROR_BADLENGTH (-32) +#define PCRE_ERROR_UNSET (-33) + +/* Specific error codes for UTF-8 validity checks */ + +#define PCRE_UTF8_ERR0 0 +#define PCRE_UTF8_ERR1 1 +#define PCRE_UTF8_ERR2 2 +#define PCRE_UTF8_ERR3 3 +#define PCRE_UTF8_ERR4 4 +#define PCRE_UTF8_ERR5 5 +#define PCRE_UTF8_ERR6 6 +#define PCRE_UTF8_ERR7 7 +#define PCRE_UTF8_ERR8 8 +#define PCRE_UTF8_ERR9 9 +#define PCRE_UTF8_ERR10 10 +#define PCRE_UTF8_ERR11 11 +#define PCRE_UTF8_ERR12 12 +#define PCRE_UTF8_ERR13 13 +#define PCRE_UTF8_ERR14 14 +#define PCRE_UTF8_ERR15 15 +#define PCRE_UTF8_ERR16 16 +#define PCRE_UTF8_ERR17 17 +#define PCRE_UTF8_ERR18 18 +#define PCRE_UTF8_ERR19 19 +#define PCRE_UTF8_ERR20 20 +#define PCRE_UTF8_ERR21 21 +#define PCRE_UTF8_ERR22 22 /* Unused (was non-character) */ + +/* Specific error codes for UTF-16 validity checks */ + +#define PCRE_UTF16_ERR0 0 +#define PCRE_UTF16_ERR1 1 +#define PCRE_UTF16_ERR2 2 +#define PCRE_UTF16_ERR3 3 +#define PCRE_UTF16_ERR4 4 /* Unused (was non-character) */ + +/* Specific error codes for UTF-32 validity checks */ + +#define PCRE_UTF32_ERR0 0 +#define PCRE_UTF32_ERR1 1 +#define PCRE_UTF32_ERR2 2 /* Unused (was non-character) */ +#define PCRE_UTF32_ERR3 3 + +/* Request types for pcre_fullinfo() */ + +#define PCRE_INFO_OPTIONS 0 +#define PCRE_INFO_SIZE 1 +#define PCRE_INFO_CAPTURECOUNT 2 +#define PCRE_INFO_BACKREFMAX 3 +#define PCRE_INFO_FIRSTBYTE 4 +#define PCRE_INFO_FIRSTCHAR 4 /* For backwards compatibility */ +#define PCRE_INFO_FIRSTTABLE 5 +#define PCRE_INFO_LASTLITERAL 6 +#define PCRE_INFO_NAMEENTRYSIZE 7 +#define PCRE_INFO_NAMECOUNT 8 +#define PCRE_INFO_NAMETABLE 9 +#define PCRE_INFO_STUDYSIZE 10 +#define PCRE_INFO_DEFAULT_TABLES 11 +#define PCRE_INFO_OKPARTIAL 12 +#define PCRE_INFO_JCHANGED 13 +#define PCRE_INFO_HASCRORLF 14 +#define PCRE_INFO_MINLENGTH 15 +#define PCRE_INFO_JIT 16 +#define PCRE_INFO_JITSIZE 17 +#define PCRE_INFO_MAXLOOKBEHIND 18 +#define PCRE_INFO_FIRSTCHARACTER 19 +#define PCRE_INFO_FIRSTCHARACTERFLAGS 20 +#define PCRE_INFO_REQUIREDCHAR 21 +#define PCRE_INFO_REQUIREDCHARFLAGS 22 +#define PCRE_INFO_MATCHLIMIT 23 +#define PCRE_INFO_RECURSIONLIMIT 24 +#define PCRE_INFO_MATCH_EMPTY 25 + +/* Request types for pcre_config(). Do not re-arrange, in order to remain +compatible. */ + +#define PCRE_CONFIG_UTF8 0 +#define PCRE_CONFIG_NEWLINE 1 +#define PCRE_CONFIG_LINK_SIZE 2 +#define PCRE_CONFIG_POSIX_MALLOC_THRESHOLD 3 +#define PCRE_CONFIG_MATCH_LIMIT 4 +#define PCRE_CONFIG_STACKRECURSE 5 +#define PCRE_CONFIG_UNICODE_PROPERTIES 6 +#define PCRE_CONFIG_MATCH_LIMIT_RECURSION 7 +#define PCRE_CONFIG_BSR 8 +#define PCRE_CONFIG_JIT 9 +#define PCRE_CONFIG_UTF16 10 +#define PCRE_CONFIG_JITTARGET 11 +#define PCRE_CONFIG_UTF32 12 +#define PCRE_CONFIG_PARENS_LIMIT 13 + +/* Request types for pcre_study(). Do not re-arrange, in order to remain +compatible. */ + +#define PCRE_STUDY_JIT_COMPILE 0x0001 +#define PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE 0x0002 +#define PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE 0x0004 +#define PCRE_STUDY_EXTRA_NEEDED 0x0008 + +/* Bit flags for the pcre[16|32]_extra structure. Do not re-arrange or redefine +these bits, just add new ones on the end, in order to remain compatible. */ + +#define PCRE_EXTRA_STUDY_DATA 0x0001 +#define PCRE_EXTRA_MATCH_LIMIT 0x0002 +#define PCRE_EXTRA_CALLOUT_DATA 0x0004 +#define PCRE_EXTRA_TABLES 0x0008 +#define PCRE_EXTRA_MATCH_LIMIT_RECURSION 0x0010 +#define PCRE_EXTRA_MARK 0x0020 +#define PCRE_EXTRA_EXECUTABLE_JIT 0x0040 + +/* Types */ + +struct real_pcre8_or_16; /* declaration; the definition is private */ +typedef struct real_pcre8_or_16 pcre; + +struct real_pcre8_or_16; /* declaration; the definition is private */ +typedef struct real_pcre8_or_16 pcre16; + +struct real_pcre32; /* declaration; the definition is private */ +typedef struct real_pcre32 pcre32; + +struct real_pcre_jit_stack; /* declaration; the definition is private */ +typedef struct real_pcre_jit_stack pcre_jit_stack; + +struct real_pcre16_jit_stack; /* declaration; the definition is private */ +typedef struct real_pcre16_jit_stack pcre16_jit_stack; + +struct real_pcre32_jit_stack; /* declaration; the definition is private */ +typedef struct real_pcre32_jit_stack pcre32_jit_stack; + +/* If PCRE is compiled with 16 bit character support, PCRE_UCHAR16 must contain +a 16 bit wide signed data type. Otherwise it can be a dummy data type since +pcre16 functions are not implemented. There is a check for this in pcre_internal.h. */ +#ifndef PCRE_UCHAR16 +#define PCRE_UCHAR16 unsigned short +#endif + +#ifndef PCRE_SPTR16 +#define PCRE_SPTR16 const PCRE_UCHAR16 * +#endif + +/* If PCRE is compiled with 32 bit character support, PCRE_UCHAR32 must contain +a 32 bit wide signed data type. Otherwise it can be a dummy data type since +pcre32 functions are not implemented. There is a check for this in pcre_internal.h. */ +#ifndef PCRE_UCHAR32 +#define PCRE_UCHAR32 unsigned int +#endif + +#ifndef PCRE_SPTR32 +#define PCRE_SPTR32 const PCRE_UCHAR32 * +#endif + +/* When PCRE is compiled as a C++ library, the subject pointer type can be +replaced with a custom type. For conventional use, the public interface is a +const char *. */ + +#ifndef PCRE_SPTR +#define PCRE_SPTR const char * +#endif + +/* The structure for passing additional data to pcre_exec(). This is defined in +such as way as to be extensible. Always add new fields at the end, in order to +remain compatible. */ + +typedef struct pcre_extra { + unsigned long int flags; /* Bits for which fields are set */ + void *study_data; /* Opaque data from pcre_study() */ + unsigned long int match_limit; /* Maximum number of calls to match() */ + void *callout_data; /* Data passed back in callouts */ + const unsigned char *tables; /* Pointer to character tables */ + unsigned long int match_limit_recursion; /* Max recursive calls to match() */ + unsigned char **mark; /* For passing back a mark pointer */ + void *executable_jit; /* Contains a pointer to a compiled jit code */ +} pcre_extra; + +/* Same structure as above, but with 16 bit char pointers. */ + +typedef struct pcre16_extra { + unsigned long int flags; /* Bits for which fields are set */ + void *study_data; /* Opaque data from pcre_study() */ + unsigned long int match_limit; /* Maximum number of calls to match() */ + void *callout_data; /* Data passed back in callouts */ + const unsigned char *tables; /* Pointer to character tables */ + unsigned long int match_limit_recursion; /* Max recursive calls to match() */ + PCRE_UCHAR16 **mark; /* For passing back a mark pointer */ + void *executable_jit; /* Contains a pointer to a compiled jit code */ +} pcre16_extra; + +/* Same structure as above, but with 32 bit char pointers. */ + +typedef struct pcre32_extra { + unsigned long int flags; /* Bits for which fields are set */ + void *study_data; /* Opaque data from pcre_study() */ + unsigned long int match_limit; /* Maximum number of calls to match() */ + void *callout_data; /* Data passed back in callouts */ + const unsigned char *tables; /* Pointer to character tables */ + unsigned long int match_limit_recursion; /* Max recursive calls to match() */ + PCRE_UCHAR32 **mark; /* For passing back a mark pointer */ + void *executable_jit; /* Contains a pointer to a compiled jit code */ +} pcre32_extra; + +/* The structure for passing out data via the pcre_callout_function. We use a +structure so that new fields can be added on the end in future versions, +without changing the API of the function, thereby allowing old clients to work +without modification. */ + +typedef struct pcre_callout_block { + int version; /* Identifies version of block */ + /* ------------------------ Version 0 ------------------------------- */ + int callout_number; /* Number compiled into pattern */ + int *offset_vector; /* The offset vector */ + PCRE_SPTR subject; /* The subject being matched */ + int subject_length; /* The length of the subject */ + int start_match; /* Offset to start of this match attempt */ + int current_position; /* Where we currently are in the subject */ + int capture_top; /* Max current capture */ + int capture_last; /* Most recently closed capture */ + void *callout_data; /* Data passed in with the call */ + /* ------------------- Added for Version 1 -------------------------- */ + int pattern_position; /* Offset to next item in the pattern */ + int next_item_length; /* Length of next item in the pattern */ + /* ------------------- Added for Version 2 -------------------------- */ + const unsigned char *mark; /* Pointer to current mark or NULL */ + /* ------------------------------------------------------------------ */ +} pcre_callout_block; + +/* Same structure as above, but with 16 bit char pointers. */ + +typedef struct pcre16_callout_block { + int version; /* Identifies version of block */ + /* ------------------------ Version 0 ------------------------------- */ + int callout_number; /* Number compiled into pattern */ + int *offset_vector; /* The offset vector */ + PCRE_SPTR16 subject; /* The subject being matched */ + int subject_length; /* The length of the subject */ + int start_match; /* Offset to start of this match attempt */ + int current_position; /* Where we currently are in the subject */ + int capture_top; /* Max current capture */ + int capture_last; /* Most recently closed capture */ + void *callout_data; /* Data passed in with the call */ + /* ------------------- Added for Version 1 -------------------------- */ + int pattern_position; /* Offset to next item in the pattern */ + int next_item_length; /* Length of next item in the pattern */ + /* ------------------- Added for Version 2 -------------------------- */ + const PCRE_UCHAR16 *mark; /* Pointer to current mark or NULL */ + /* ------------------------------------------------------------------ */ +} pcre16_callout_block; + +/* Same structure as above, but with 32 bit char pointers. */ + +typedef struct pcre32_callout_block { + int version; /* Identifies version of block */ + /* ------------------------ Version 0 ------------------------------- */ + int callout_number; /* Number compiled into pattern */ + int *offset_vector; /* The offset vector */ + PCRE_SPTR32 subject; /* The subject being matched */ + int subject_length; /* The length of the subject */ + int start_match; /* Offset to start of this match attempt */ + int current_position; /* Where we currently are in the subject */ + int capture_top; /* Max current capture */ + int capture_last; /* Most recently closed capture */ + void *callout_data; /* Data passed in with the call */ + /* ------------------- Added for Version 1 -------------------------- */ + int pattern_position; /* Offset to next item in the pattern */ + int next_item_length; /* Length of next item in the pattern */ + /* ------------------- Added for Version 2 -------------------------- */ + const PCRE_UCHAR32 *mark; /* Pointer to current mark or NULL */ + /* ------------------------------------------------------------------ */ +} pcre32_callout_block; + +/* Indirection for store get and free functions. These can be set to +alternative malloc/free functions if required. Special ones are used in the +non-recursive case for "frames". There is also an optional callout function +that is triggered by the (?) regex item. For Virtual Pascal, these definitions +have to take another form. */ + +#ifndef VPCOMPAT +PCRE_EXP_DECL void *(*pcre_malloc)(size_t); +PCRE_EXP_DECL void (*pcre_free)(void *); +PCRE_EXP_DECL void *(*pcre_stack_malloc)(size_t); +PCRE_EXP_DECL void (*pcre_stack_free)(void *); +PCRE_EXP_DECL int (*pcre_callout)(pcre_callout_block *); +PCRE_EXP_DECL int (*pcre_stack_guard)(void); + +PCRE_EXP_DECL void *(*pcre16_malloc)(size_t); +PCRE_EXP_DECL void (*pcre16_free)(void *); +PCRE_EXP_DECL void *(*pcre16_stack_malloc)(size_t); +PCRE_EXP_DECL void (*pcre16_stack_free)(void *); +PCRE_EXP_DECL int (*pcre16_callout)(pcre16_callout_block *); +PCRE_EXP_DECL int (*pcre16_stack_guard)(void); + +PCRE_EXP_DECL void *(*pcre32_malloc)(size_t); +PCRE_EXP_DECL void (*pcre32_free)(void *); +PCRE_EXP_DECL void *(*pcre32_stack_malloc)(size_t); +PCRE_EXP_DECL void (*pcre32_stack_free)(void *); +PCRE_EXP_DECL int (*pcre32_callout)(pcre32_callout_block *); +PCRE_EXP_DECL int (*pcre32_stack_guard)(void); +#else /* VPCOMPAT */ +PCRE_EXP_DECL void *pcre_malloc(size_t); +PCRE_EXP_DECL void pcre_free(void *); +PCRE_EXP_DECL void *pcre_stack_malloc(size_t); +PCRE_EXP_DECL void pcre_stack_free(void *); +PCRE_EXP_DECL int pcre_callout(pcre_callout_block *); +PCRE_EXP_DECL int pcre_stack_guard(void); + +PCRE_EXP_DECL void *pcre16_malloc(size_t); +PCRE_EXP_DECL void pcre16_free(void *); +PCRE_EXP_DECL void *pcre16_stack_malloc(size_t); +PCRE_EXP_DECL void pcre16_stack_free(void *); +PCRE_EXP_DECL int pcre16_callout(pcre16_callout_block *); +PCRE_EXP_DECL int pcre16_stack_guard(void); + +PCRE_EXP_DECL void *pcre32_malloc(size_t); +PCRE_EXP_DECL void pcre32_free(void *); +PCRE_EXP_DECL void *pcre32_stack_malloc(size_t); +PCRE_EXP_DECL void pcre32_stack_free(void *); +PCRE_EXP_DECL int pcre32_callout(pcre32_callout_block *); +PCRE_EXP_DECL int pcre32_stack_guard(void); +#endif /* VPCOMPAT */ + +/* User defined callback which provides a stack just before the match starts. */ + +typedef pcre_jit_stack *(*pcre_jit_callback)(void *); +typedef pcre16_jit_stack *(*pcre16_jit_callback)(void *); +typedef pcre32_jit_stack *(*pcre32_jit_callback)(void *); + +/* Exported PCRE functions */ + +PCRE_EXP_DECL pcre *pcre_compile(const char *, int, const char **, int *, + const unsigned char *); +PCRE_EXP_DECL pcre16 *pcre16_compile(PCRE_SPTR16, int, const char **, int *, + const unsigned char *); +PCRE_EXP_DECL pcre32 *pcre32_compile(PCRE_SPTR32, int, const char **, int *, + const unsigned char *); +PCRE_EXP_DECL pcre *pcre_compile2(const char *, int, int *, const char **, + int *, const unsigned char *); +PCRE_EXP_DECL pcre16 *pcre16_compile2(PCRE_SPTR16, int, int *, const char **, + int *, const unsigned char *); +PCRE_EXP_DECL pcre32 *pcre32_compile2(PCRE_SPTR32, int, int *, const char **, + int *, const unsigned char *); +PCRE_EXP_DECL int pcre_config(int, void *); +PCRE_EXP_DECL int pcre16_config(int, void *); +PCRE_EXP_DECL int pcre32_config(int, void *); +PCRE_EXP_DECL int pcre_copy_named_substring(const pcre *, const char *, + int *, int, const char *, char *, int); +PCRE_EXP_DECL int pcre16_copy_named_substring(const pcre16 *, PCRE_SPTR16, + int *, int, PCRE_SPTR16, PCRE_UCHAR16 *, int); +PCRE_EXP_DECL int pcre32_copy_named_substring(const pcre32 *, PCRE_SPTR32, + int *, int, PCRE_SPTR32, PCRE_UCHAR32 *, int); +PCRE_EXP_DECL int pcre_copy_substring(const char *, int *, int, int, + char *, int); +PCRE_EXP_DECL int pcre16_copy_substring(PCRE_SPTR16, int *, int, int, + PCRE_UCHAR16 *, int); +PCRE_EXP_DECL int pcre32_copy_substring(PCRE_SPTR32, int *, int, int, + PCRE_UCHAR32 *, int); +PCRE_EXP_DECL int pcre_dfa_exec(const pcre *, const pcre_extra *, + const char *, int, int, int, int *, int , int *, int); +PCRE_EXP_DECL int pcre16_dfa_exec(const pcre16 *, const pcre16_extra *, + PCRE_SPTR16, int, int, int, int *, int , int *, int); +PCRE_EXP_DECL int pcre32_dfa_exec(const pcre32 *, const pcre32_extra *, + PCRE_SPTR32, int, int, int, int *, int , int *, int); +PCRE_EXP_DECL int pcre_exec(const pcre *, const pcre_extra *, PCRE_SPTR, + int, int, int, int *, int); +PCRE_EXP_DECL int pcre16_exec(const pcre16 *, const pcre16_extra *, + PCRE_SPTR16, int, int, int, int *, int); +PCRE_EXP_DECL int pcre32_exec(const pcre32 *, const pcre32_extra *, + PCRE_SPTR32, int, int, int, int *, int); +PCRE_EXP_DECL int pcre_jit_exec(const pcre *, const pcre_extra *, + PCRE_SPTR, int, int, int, int *, int, + pcre_jit_stack *); +PCRE_EXP_DECL int pcre16_jit_exec(const pcre16 *, const pcre16_extra *, + PCRE_SPTR16, int, int, int, int *, int, + pcre16_jit_stack *); +PCRE_EXP_DECL int pcre32_jit_exec(const pcre32 *, const pcre32_extra *, + PCRE_SPTR32, int, int, int, int *, int, + pcre32_jit_stack *); +PCRE_EXP_DECL void pcre_free_substring(const char *); +PCRE_EXP_DECL void pcre16_free_substring(PCRE_SPTR16); +PCRE_EXP_DECL void pcre32_free_substring(PCRE_SPTR32); +PCRE_EXP_DECL void pcre_free_substring_list(const char **); +PCRE_EXP_DECL void pcre16_free_substring_list(PCRE_SPTR16 *); +PCRE_EXP_DECL void pcre32_free_substring_list(PCRE_SPTR32 *); +PCRE_EXP_DECL int pcre_fullinfo(const pcre *, const pcre_extra *, int, + void *); +PCRE_EXP_DECL int pcre16_fullinfo(const pcre16 *, const pcre16_extra *, int, + void *); +PCRE_EXP_DECL int pcre32_fullinfo(const pcre32 *, const pcre32_extra *, int, + void *); +PCRE_EXP_DECL int pcre_get_named_substring(const pcre *, const char *, + int *, int, const char *, const char **); +PCRE_EXP_DECL int pcre16_get_named_substring(const pcre16 *, PCRE_SPTR16, + int *, int, PCRE_SPTR16, PCRE_SPTR16 *); +PCRE_EXP_DECL int pcre32_get_named_substring(const pcre32 *, PCRE_SPTR32, + int *, int, PCRE_SPTR32, PCRE_SPTR32 *); +PCRE_EXP_DECL int pcre_get_stringnumber(const pcre *, const char *); +PCRE_EXP_DECL int pcre16_get_stringnumber(const pcre16 *, PCRE_SPTR16); +PCRE_EXP_DECL int pcre32_get_stringnumber(const pcre32 *, PCRE_SPTR32); +PCRE_EXP_DECL int pcre_get_stringtable_entries(const pcre *, const char *, + char **, char **); +PCRE_EXP_DECL int pcre16_get_stringtable_entries(const pcre16 *, PCRE_SPTR16, + PCRE_UCHAR16 **, PCRE_UCHAR16 **); +PCRE_EXP_DECL int pcre32_get_stringtable_entries(const pcre32 *, PCRE_SPTR32, + PCRE_UCHAR32 **, PCRE_UCHAR32 **); +PCRE_EXP_DECL int pcre_get_substring(const char *, int *, int, int, + const char **); +PCRE_EXP_DECL int pcre16_get_substring(PCRE_SPTR16, int *, int, int, + PCRE_SPTR16 *); +PCRE_EXP_DECL int pcre32_get_substring(PCRE_SPTR32, int *, int, int, + PCRE_SPTR32 *); +PCRE_EXP_DECL int pcre_get_substring_list(const char *, int *, int, + const char ***); +PCRE_EXP_DECL int pcre16_get_substring_list(PCRE_SPTR16, int *, int, + PCRE_SPTR16 **); +PCRE_EXP_DECL int pcre32_get_substring_list(PCRE_SPTR32, int *, int, + PCRE_SPTR32 **); +PCRE_EXP_DECL const unsigned char *pcre_maketables(void); +PCRE_EXP_DECL const unsigned char *pcre16_maketables(void); +PCRE_EXP_DECL const unsigned char *pcre32_maketables(void); +PCRE_EXP_DECL int pcre_refcount(pcre *, int); +PCRE_EXP_DECL int pcre16_refcount(pcre16 *, int); +PCRE_EXP_DECL int pcre32_refcount(pcre32 *, int); +PCRE_EXP_DECL pcre_extra *pcre_study(const pcre *, int, const char **); +PCRE_EXP_DECL pcre16_extra *pcre16_study(const pcre16 *, int, const char **); +PCRE_EXP_DECL pcre32_extra *pcre32_study(const pcre32 *, int, const char **); +PCRE_EXP_DECL void pcre_free_study(pcre_extra *); +PCRE_EXP_DECL void pcre16_free_study(pcre16_extra *); +PCRE_EXP_DECL void pcre32_free_study(pcre32_extra *); +PCRE_EXP_DECL const char *pcre_version(void); +PCRE_EXP_DECL const char *pcre16_version(void); +PCRE_EXP_DECL const char *pcre32_version(void); + +/* Utility functions for byte order swaps. */ +PCRE_EXP_DECL int pcre_pattern_to_host_byte_order(pcre *, pcre_extra *, + const unsigned char *); +PCRE_EXP_DECL int pcre16_pattern_to_host_byte_order(pcre16 *, pcre16_extra *, + const unsigned char *); +PCRE_EXP_DECL int pcre32_pattern_to_host_byte_order(pcre32 *, pcre32_extra *, + const unsigned char *); +PCRE_EXP_DECL int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *, + PCRE_SPTR16, int, int *, int); +PCRE_EXP_DECL int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *, + PCRE_SPTR32, int, int *, int); + +/* JIT compiler related functions. */ + +PCRE_EXP_DECL pcre_jit_stack *pcre_jit_stack_alloc(int, int); +PCRE_EXP_DECL pcre16_jit_stack *pcre16_jit_stack_alloc(int, int); +PCRE_EXP_DECL pcre32_jit_stack *pcre32_jit_stack_alloc(int, int); +PCRE_EXP_DECL void pcre_jit_stack_free(pcre_jit_stack *); +PCRE_EXP_DECL void pcre16_jit_stack_free(pcre16_jit_stack *); +PCRE_EXP_DECL void pcre32_jit_stack_free(pcre32_jit_stack *); +PCRE_EXP_DECL void pcre_assign_jit_stack(pcre_extra *, + pcre_jit_callback, void *); +PCRE_EXP_DECL void pcre16_assign_jit_stack(pcre16_extra *, + pcre16_jit_callback, void *); +PCRE_EXP_DECL void pcre32_assign_jit_stack(pcre32_extra *, + pcre32_jit_callback, void *); +PCRE_EXP_DECL void pcre_jit_free_unused_memory(void); +PCRE_EXP_DECL void pcre16_jit_free_unused_memory(void); +PCRE_EXP_DECL void pcre32_jit_free_unused_memory(void); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* End of pcre.h */ diff --git a/frameworks/cairosvg/dependencies/pcre/8.42/include/pcre_scanner.h b/frameworks/cairosvg/dependencies/pcre/8.42/include/pcre_scanner.h new file mode 100755 index 00000000..5617e451 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pcre/8.42/include/pcre_scanner.h @@ -0,0 +1,172 @@ +// Copyright (c) 2005, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Author: Sanjay Ghemawat +// +// Regular-expression based scanner for parsing an input stream. +// +// Example 1: parse a sequence of "var = number" entries from input: +// +// Scanner scanner(input); +// string var; +// int number; +// scanner.SetSkipExpression("\\s+"); // Skip any white space we encounter +// while (scanner.Consume("(\\w+) = (\\d+)", &var, &number)) { +// ...; +// } + +#ifndef _PCRE_SCANNER_H +#define _PCRE_SCANNER_H + +#include <assert.h> +#include <string> +#include <vector> + +#include <pcrecpp.h> +#include <pcre_stringpiece.h> + +namespace pcrecpp { + +class PCRECPP_EXP_DEFN Scanner { + public: + Scanner(); + explicit Scanner(const std::string& input); + ~Scanner(); + + // Return current line number. The returned line-number is + // one-based. I.e. it returns 1 + the number of consumed newlines. + // + // Note: this method may be slow. It may take time proportional to + // the size of the input. + int LineNumber() const; + + // Return the byte-offset that the scanner is looking in the + // input data; + int Offset() const; + + // Return true iff the start of the remaining input matches "re" + bool LookingAt(const RE& re) const; + + // Return true iff all of the following are true + // a. the start of the remaining input matches "re", + // b. if any arguments are supplied, matched sub-patterns can be + // parsed and stored into the arguments. + // If it returns true, it skips over the matched input and any + // following input that matches the "skip" regular expression. + bool Consume(const RE& re, + const Arg& arg0 = RE::no_arg, + const Arg& arg1 = RE::no_arg, + const Arg& arg2 = RE::no_arg + // TODO: Allow more arguments? + ); + + // Set the "skip" regular expression. If after consuming some data, + // a prefix of the input matches this RE, it is automatically + // skipped. For example, a programming language scanner would use + // a skip RE that matches white space and comments. + // + // scanner.SetSkipExpression("\\s+|//.*|/[*](.|\n)*?[*]/"); + // + // Skipping repeats as long as it succeeds. We used to let people do + // this by writing "(...)*" in the regular expression, but that added + // up to lots of recursive calls within the pcre library, so now we + // control repetition explicitly via the function call API. + // + // You can pass NULL for "re" if you do not want any data to be skipped. + void Skip(const char* re); // DEPRECATED; does *not* repeat + void SetSkipExpression(const char* re); + + // Temporarily pause "skip"ing. This + // Skip("Foo"); code ; DisableSkip(); code; EnableSkip() + // is similar to + // Skip("Foo"); code ; Skip(NULL); code ; Skip("Foo"); + // but avoids creating/deleting new RE objects. + void DisableSkip(); + + // Reenable previously paused skipping. Any prefix of the input + // that matches the skip pattern is immediately dropped. + void EnableSkip(); + + /***** Special wrappers around SetSkip() for some common idioms *****/ + + // Arranges to skip whitespace, C comments, C++ comments. + // The overall RE is a disjunction of the following REs: + // \\s whitespace + // //.*\n C++ comment + // /[*](.|\n)*?[*]/ C comment (x*? means minimal repetitions of x) + // We get repetition via the semantics of SetSkipExpression, not by using * + void SkipCXXComments() { + SetSkipExpression("\\s|//.*\n|/[*](?:\n|.)*?[*]/"); + } + + void set_save_comments(bool comments) { + save_comments_ = comments; + } + + bool save_comments() { + return save_comments_; + } + + // Append to vector ranges the comments found in the + // byte range [start,end] (inclusive) of the input data. + // Only comments that were extracted entirely within that + // range are returned: no range splitting of atomically-extracted + // comments is performed. + void GetComments(int start, int end, std::vector<StringPiece> *ranges); + + // Append to vector ranges the comments added + // since the last time this was called. This + // functionality is provided for efficiency when + // interleaving scanning with parsing. + void GetNextComments(std::vector<StringPiece> *ranges); + + private: + std::string data_; // All the input data + StringPiece input_; // Unprocessed input + RE* skip_; // If non-NULL, RE for skipping input + bool should_skip_; // If true, use skip_ + bool skip_repeat_; // If true, repeat skip_ as long as it works + bool save_comments_; // If true, aggregate the skip expression + + // the skipped comments + // TODO: later consider requiring that the StringPieces be added + // in order by their start position + std::vector<StringPiece> *comments_; + + // the offset into comments_ that has been returned by GetNextComments + int comments_offset_; + + // helper function to consume *skip_ and honour + // save_comments_ + void ConsumeSkip(); +}; + +} // namespace pcrecpp + +#endif /* _PCRE_SCANNER_H */ diff --git a/frameworks/cairosvg/dependencies/pcre/8.42/include/pcre_stringpiece.h b/frameworks/cairosvg/dependencies/pcre/8.42/include/pcre_stringpiece.h new file mode 100755 index 00000000..cb94f52a --- /dev/null +++ b/frameworks/cairosvg/dependencies/pcre/8.42/include/pcre_stringpiece.h @@ -0,0 +1,180 @@ +// Copyright (c) 2005, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Author: Sanjay Ghemawat +// +// A string like object that points into another piece of memory. +// Useful for providing an interface that allows clients to easily +// pass in either a "const char*" or a "string". +// +// Arghh! I wish C++ literals were automatically of type "string". + +#ifndef _PCRE_STRINGPIECE_H +#define _PCRE_STRINGPIECE_H + +#include <cstring> +#include <string> +#include <iosfwd> // for ostream forward-declaration + +#if 0 +#define HAVE_TYPE_TRAITS +#include <type_traits.h> +#elif 0 +#define HAVE_TYPE_TRAITS +#include <bits/type_traits.h> +#endif + +#include <pcre.h> + +namespace pcrecpp { + +using std::memcmp; +using std::strlen; +using std::string; + +class PCRECPP_EXP_DEFN StringPiece { + private: + const char* ptr_; + int length_; + + public: + // We provide non-explicit singleton constructors so users can pass + // in a "const char*" or a "string" wherever a "StringPiece" is + // expected. + StringPiece() + : ptr_(NULL), length_(0) { } + StringPiece(const char* str) + : ptr_(str), length_(static_cast<int>(strlen(ptr_))) { } + StringPiece(const unsigned char* str) + : ptr_(reinterpret_cast<const char*>(str)), + length_(static_cast<int>(strlen(ptr_))) { } + StringPiece(const string& str) + : ptr_(str.data()), length_(static_cast<int>(str.size())) { } + StringPiece(const char* offset, int len) + : ptr_(offset), length_(len) { } + + // data() may return a pointer to a buffer with embedded NULs, and the + // returned buffer may or may not be null terminated. Therefore it is + // typically a mistake to pass data() to a routine that expects a NUL + // terminated string. Use "as_string().c_str()" if you really need to do + // this. Or better yet, change your routine so it does not rely on NUL + // termination. + const char* data() const { return ptr_; } + int size() const { return length_; } + bool empty() const { return length_ == 0; } + + void clear() { ptr_ = NULL; length_ = 0; } + void set(const char* buffer, int len) { ptr_ = buffer; length_ = len; } + void set(const char* str) { + ptr_ = str; + length_ = static_cast<int>(strlen(str)); + } + void set(const void* buffer, int len) { + ptr_ = reinterpret_cast<const char*>(buffer); + length_ = len; + } + + char operator[](int i) const { return ptr_[i]; } + + void remove_prefix(int n) { + ptr_ += n; + length_ -= n; + } + + void remove_suffix(int n) { + length_ -= n; + } + + bool operator==(const StringPiece& x) const { + return ((length_ == x.length_) && + (memcmp(ptr_, x.ptr_, length_) == 0)); + } + bool operator!=(const StringPiece& x) const { + return !(*this == x); + } + +#define STRINGPIECE_BINARY_PREDICATE(cmp,auxcmp) \ + bool operator cmp (const StringPiece& x) const { \ + int r = memcmp(ptr_, x.ptr_, length_ < x.length_ ? length_ : x.length_); \ + return ((r auxcmp 0) || ((r == 0) && (length_ cmp x.length_))); \ + } + STRINGPIECE_BINARY_PREDICATE(<, <); + STRINGPIECE_BINARY_PREDICATE(<=, <); + STRINGPIECE_BINARY_PREDICATE(>=, >); + STRINGPIECE_BINARY_PREDICATE(>, >); +#undef STRINGPIECE_BINARY_PREDICATE + + int compare(const StringPiece& x) const { + int r = memcmp(ptr_, x.ptr_, length_ < x.length_ ? length_ : x.length_); + if (r == 0) { + if (length_ < x.length_) r = -1; + else if (length_ > x.length_) r = +1; + } + return r; + } + + string as_string() const { + return string(data(), size()); + } + + void CopyToString(string* target) const { + target->assign(ptr_, length_); + } + + // Does "this" start with "x" + bool starts_with(const StringPiece& x) const { + return ((length_ >= x.length_) && (memcmp(ptr_, x.ptr_, x.length_) == 0)); + } +}; + +} // namespace pcrecpp + +// ------------------------------------------------------------------ +// Functions used to create STL containers that use StringPiece +// Remember that a StringPiece's lifetime had better be less than +// that of the underlying string or char*. If it is not, then you +// cannot safely store a StringPiece into an STL container +// ------------------------------------------------------------------ + +#ifdef HAVE_TYPE_TRAITS +// This makes vector<StringPiece> really fast for some STL implementations +template<> struct __type_traits<pcrecpp::StringPiece> { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; +#endif + +// allow StringPiece to be logged +PCRECPP_EXP_DECL std::ostream& operator<<(std::ostream& o, + const pcrecpp::StringPiece& piece); + +#endif /* _PCRE_STRINGPIECE_H */ diff --git a/frameworks/cairosvg/dependencies/pcre/8.42/include/pcrecpp.h b/frameworks/cairosvg/dependencies/pcre/8.42/include/pcrecpp.h new file mode 100755 index 00000000..3e594b0d --- /dev/null +++ b/frameworks/cairosvg/dependencies/pcre/8.42/include/pcrecpp.h @@ -0,0 +1,710 @@ +// Copyright (c) 2005, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Author: Sanjay Ghemawat +// Support for PCRE_XXX modifiers added by Giuseppe Maxia, July 2005 + +#ifndef _PCRECPP_H +#define _PCRECPP_H + +// C++ interface to the pcre regular-expression library. RE supports +// Perl-style regular expressions (with extensions like \d, \w, \s, +// ...). +// +// ----------------------------------------------------------------------- +// REGEXP SYNTAX: +// +// This module is part of the pcre library and hence supports its syntax +// for regular expressions. +// +// The syntax is pretty similar to Perl's. For those not familiar +// with Perl's regular expressions, here are some examples of the most +// commonly used extensions: +// +// "hello (\\w+) world" -- \w matches a "word" character +// "version (\\d+)" -- \d matches a digit +// "hello\\s+world" -- \s matches any whitespace character +// "\\b(\\w+)\\b" -- \b matches empty string at a word boundary +// "(?i)hello" -- (?i) turns on case-insensitive matching +// "/\\*(.*?)\\*/" -- .*? matches . minimum no. of times possible +// +// ----------------------------------------------------------------------- +// MATCHING INTERFACE: +// +// The "FullMatch" operation checks that supplied text matches a +// supplied pattern exactly. +// +// Example: successful match +// pcrecpp::RE re("h.*o"); +// re.FullMatch("hello"); +// +// Example: unsuccessful match (requires full match): +// pcrecpp::RE re("e"); +// !re.FullMatch("hello"); +// +// Example: creating a temporary RE object: +// pcrecpp::RE("h.*o").FullMatch("hello"); +// +// You can pass in a "const char*" or a "string" for "text". The +// examples below tend to use a const char*. +// +// You can, as in the different examples above, store the RE object +// explicitly in a variable or use a temporary RE object. The +// examples below use one mode or the other arbitrarily. Either +// could correctly be used for any of these examples. +// +// ----------------------------------------------------------------------- +// MATCHING WITH SUB-STRING EXTRACTION: +// +// You can supply extra pointer arguments to extract matched subpieces. +// +// Example: extracts "ruby" into "s" and 1234 into "i" +// int i; +// string s; +// pcrecpp::RE re("(\\w+):(\\d+)"); +// re.FullMatch("ruby:1234", &s, &i); +// +// Example: does not try to extract any extra sub-patterns +// re.FullMatch("ruby:1234", &s); +// +// Example: does not try to extract into NULL +// re.FullMatch("ruby:1234", NULL, &i); +// +// Example: integer overflow causes failure +// !re.FullMatch("ruby:1234567891234", NULL, &i); +// +// Example: fails because there aren't enough sub-patterns: +// !pcrecpp::RE("\\w+:\\d+").FullMatch("ruby:1234", &s); +// +// Example: fails because string cannot be stored in integer +// !pcrecpp::RE("(.*)").FullMatch("ruby", &i); +// +// The provided pointer arguments can be pointers to any scalar numeric +// type, or one of +// string (matched piece is copied to string) +// StringPiece (StringPiece is mutated to point to matched piece) +// T (where "bool T::ParseFrom(const char*, int)" exists) +// NULL (the corresponding matched sub-pattern is not copied) +// +// CAVEAT: An optional sub-pattern that does not exist in the matched +// string is assigned the empty string. Therefore, the following will +// return false (because the empty string is not a valid number): +// int number; +// pcrecpp::RE::FullMatch("abc", "[a-z]+(\\d+)?", &number); +// +// ----------------------------------------------------------------------- +// DO_MATCH +// +// The matching interface supports at most 16 arguments per call. +// If you need more, consider using the more general interface +// pcrecpp::RE::DoMatch(). See pcrecpp.h for the signature for DoMatch. +// +// ----------------------------------------------------------------------- +// PARTIAL MATCHES +// +// You can use the "PartialMatch" operation when you want the pattern +// to match any substring of the text. +// +// Example: simple search for a string: +// pcrecpp::RE("ell").PartialMatch("hello"); +// +// Example: find first number in a string: +// int number; +// pcrecpp::RE re("(\\d+)"); +// re.PartialMatch("x*100 + 20", &number); +// assert(number == 100); +// +// ----------------------------------------------------------------------- +// UTF-8 AND THE MATCHING INTERFACE: +// +// By default, pattern and text are plain text, one byte per character. +// The UTF8 flag, passed to the constructor, causes both pattern +// and string to be treated as UTF-8 text, still a byte stream but +// potentially multiple bytes per character. In practice, the text +// is likelier to be UTF-8 than the pattern, but the match returned +// may depend on the UTF8 flag, so always use it when matching +// UTF8 text. E.g., "." will match one byte normally but with UTF8 +// set may match up to three bytes of a multi-byte character. +// +// Example: +// pcrecpp::RE_Options options; +// options.set_utf8(); +// pcrecpp::RE re(utf8_pattern, options); +// re.FullMatch(utf8_string); +// +// Example: using the convenience function UTF8(): +// pcrecpp::RE re(utf8_pattern, pcrecpp::UTF8()); +// re.FullMatch(utf8_string); +// +// NOTE: The UTF8 option is ignored if pcre was not configured with the +// --enable-utf8 flag. +// +// ----------------------------------------------------------------------- +// PASSING MODIFIERS TO THE REGULAR EXPRESSION ENGINE +// +// PCRE defines some modifiers to change the behavior of the regular +// expression engine. +// The C++ wrapper defines an auxiliary class, RE_Options, as a vehicle +// to pass such modifiers to a RE class. +// +// Currently, the following modifiers are supported +// +// modifier description Perl corresponding +// +// PCRE_CASELESS case insensitive match /i +// PCRE_MULTILINE multiple lines match /m +// PCRE_DOTALL dot matches newlines /s +// PCRE_DOLLAR_ENDONLY $ matches only at end N/A +// PCRE_EXTRA strict escape parsing N/A +// PCRE_EXTENDED ignore whitespaces /x +// PCRE_UTF8 handles UTF8 chars built-in +// PCRE_UNGREEDY reverses * and *? N/A +// PCRE_NO_AUTO_CAPTURE disables matching parens N/A (*) +// +// (For a full account on how each modifier works, please check the +// PCRE API reference manual). +// +// (*) Both Perl and PCRE allow non matching parentheses by means of the +// "?:" modifier within the pattern itself. e.g. (?:ab|cd) does not +// capture, while (ab|cd) does. +// +// For each modifier, there are two member functions whose name is made +// out of the modifier in lowercase, without the "PCRE_" prefix. For +// instance, PCRE_CASELESS is handled by +// bool caseless(), +// which returns true if the modifier is set, and +// RE_Options & set_caseless(bool), +// which sets or unsets the modifier. +// +// Moreover, PCRE_EXTRA_MATCH_LIMIT can be accessed through the +// set_match_limit() and match_limit() member functions. +// Setting match_limit to a non-zero value will limit the executation of +// pcre to keep it from doing bad things like blowing the stack or taking +// an eternity to return a result. A value of 5000 is good enough to stop +// stack blowup in a 2MB thread stack. Setting match_limit to zero will +// disable match limiting. Alternately, you can set match_limit_recursion() +// which uses PCRE_EXTRA_MATCH_LIMIT_RECURSION to limit how much pcre +// recurses. match_limit() caps the number of matches pcre does; +// match_limit_recrusion() caps the depth of recursion. +// +// Normally, to pass one or more modifiers to a RE class, you declare +// a RE_Options object, set the appropriate options, and pass this +// object to a RE constructor. Example: +// +// RE_options opt; +// opt.set_caseless(true); +// +// if (RE("HELLO", opt).PartialMatch("hello world")) ... +// +// RE_options has two constructors. The default constructor takes no +// arguments and creates a set of flags that are off by default. +// +// The optional parameter 'option_flags' is to facilitate transfer +// of legacy code from C programs. This lets you do +// RE(pattern, RE_Options(PCRE_CASELESS|PCRE_MULTILINE)).PartialMatch(str); +// +// But new code is better off doing +// RE(pattern, +// RE_Options().set_caseless(true).set_multiline(true)).PartialMatch(str); +// (See below) +// +// If you are going to pass one of the most used modifiers, there are some +// convenience functions that return a RE_Options class with the +// appropriate modifier already set: +// CASELESS(), UTF8(), MULTILINE(), DOTALL(), EXTENDED() +// +// If you need to set several options at once, and you don't want to go +// through the pains of declaring a RE_Options object and setting several +// options, there is a parallel method that give you such ability on the +// fly. You can concatenate several set_xxxxx member functions, since each +// of them returns a reference to its class object. e.g.: to pass +// PCRE_CASELESS, PCRE_EXTENDED, and PCRE_MULTILINE to a RE with one +// statement, you may write +// +// RE(" ^ xyz \\s+ .* blah$", RE_Options() +// .set_caseless(true) +// .set_extended(true) +// .set_multiline(true)).PartialMatch(sometext); +// +// ----------------------------------------------------------------------- +// SCANNING TEXT INCREMENTALLY +// +// The "Consume" operation may be useful if you want to repeatedly +// match regular expressions at the front of a string and skip over +// them as they match. This requires use of the "StringPiece" type, +// which represents a sub-range of a real string. Like RE, StringPiece +// is defined in the pcrecpp namespace. +// +// Example: read lines of the form "var = value" from a string. +// string contents = ...; // Fill string somehow +// pcrecpp::StringPiece input(contents); // Wrap in a StringPiece +// +// string var; +// int value; +// pcrecpp::RE re("(\\w+) = (\\d+)\n"); +// while (re.Consume(&input, &var, &value)) { +// ...; +// } +// +// Each successful call to "Consume" will set "var/value", and also +// advance "input" so it points past the matched text. +// +// The "FindAndConsume" operation is similar to "Consume" but does not +// anchor your match at the beginning of the string. For example, you +// could extract all words from a string by repeatedly calling +// pcrecpp::RE("(\\w+)").FindAndConsume(&input, &word) +// +// ----------------------------------------------------------------------- +// PARSING HEX/OCTAL/C-RADIX NUMBERS +// +// By default, if you pass a pointer to a numeric value, the +// corresponding text is interpreted as a base-10 number. You can +// instead wrap the pointer with a call to one of the operators Hex(), +// Octal(), or CRadix() to interpret the text in another base. The +// CRadix operator interprets C-style "0" (base-8) and "0x" (base-16) +// prefixes, but defaults to base-10. +// +// Example: +// int a, b, c, d; +// pcrecpp::RE re("(.*) (.*) (.*) (.*)"); +// re.FullMatch("100 40 0100 0x40", +// pcrecpp::Octal(&a), pcrecpp::Hex(&b), +// pcrecpp::CRadix(&c), pcrecpp::CRadix(&d)); +// will leave 64 in a, b, c, and d. +// +// ----------------------------------------------------------------------- +// REPLACING PARTS OF STRINGS +// +// You can replace the first match of "pattern" in "str" with +// "rewrite". Within "rewrite", backslash-escaped digits (\1 to \9) +// can be used to insert text matching corresponding parenthesized +// group from the pattern. \0 in "rewrite" refers to the entire +// matching text. E.g., +// +// string s = "yabba dabba doo"; +// pcrecpp::RE("b+").Replace("d", &s); +// +// will leave "s" containing "yada dabba doo". The result is true if +// the pattern matches and a replacement occurs, or false otherwise. +// +// GlobalReplace() is like Replace(), except that it replaces all +// occurrences of the pattern in the string with the rewrite. +// Replacements are not subject to re-matching. E.g., +// +// string s = "yabba dabba doo"; +// pcrecpp::RE("b+").GlobalReplace("d", &s); +// +// will leave "s" containing "yada dada doo". It returns the number +// of replacements made. +// +// Extract() is like Replace(), except that if the pattern matches, +// "rewrite" is copied into "out" (an additional argument) with +// substitutions. The non-matching portions of "text" are ignored. +// Returns true iff a match occurred and the extraction happened +// successfully. If no match occurs, the string is left unaffected. + + +#include <string> +#include <pcre.h> +#include <pcrecpparg.h> // defines the Arg class +// This isn't technically needed here, but we include it +// anyway so folks who include pcrecpp.h don't have to. +#include <pcre_stringpiece.h> + +namespace pcrecpp { + +#define PCRE_SET_OR_CLEAR(b, o) \ + if (b) all_options_ |= (o); else all_options_ &= ~(o); \ + return *this + +#define PCRE_IS_SET(o) \ + (all_options_ & o) == o + +/***** Compiling regular expressions: the RE class *****/ + +// RE_Options allow you to set options to be passed along to pcre, +// along with other options we put on top of pcre. +// Only 9 modifiers, plus match_limit and match_limit_recursion, +// are supported now. +class PCRECPP_EXP_DEFN RE_Options { + public: + // constructor + RE_Options() : match_limit_(0), match_limit_recursion_(0), all_options_(0) {} + + // alternative constructor. + // To facilitate transfer of legacy code from C programs + // + // This lets you do + // RE(pattern, RE_Options(PCRE_CASELESS|PCRE_MULTILINE)).PartialMatch(str); + // But new code is better off doing + // RE(pattern, + // RE_Options().set_caseless(true).set_multiline(true)).PartialMatch(str); + RE_Options(int option_flags) : match_limit_(0), match_limit_recursion_(0), + all_options_(option_flags) {} + // we're fine with the default destructor, copy constructor, etc. + + // accessors and mutators + int match_limit() const { return match_limit_; }; + RE_Options &set_match_limit(int limit) { + match_limit_ = limit; + return *this; + } + + int match_limit_recursion() const { return match_limit_recursion_; }; + RE_Options &set_match_limit_recursion(int limit) { + match_limit_recursion_ = limit; + return *this; + } + + bool caseless() const { + return PCRE_IS_SET(PCRE_CASELESS); + } + RE_Options &set_caseless(bool x) { + PCRE_SET_OR_CLEAR(x, PCRE_CASELESS); + } + + bool multiline() const { + return PCRE_IS_SET(PCRE_MULTILINE); + } + RE_Options &set_multiline(bool x) { + PCRE_SET_OR_CLEAR(x, PCRE_MULTILINE); + } + + bool dotall() const { + return PCRE_IS_SET(PCRE_DOTALL); + } + RE_Options &set_dotall(bool x) { + PCRE_SET_OR_CLEAR(x, PCRE_DOTALL); + } + + bool extended() const { + return PCRE_IS_SET(PCRE_EXTENDED); + } + RE_Options &set_extended(bool x) { + PCRE_SET_OR_CLEAR(x, PCRE_EXTENDED); + } + + bool dollar_endonly() const { + return PCRE_IS_SET(PCRE_DOLLAR_ENDONLY); + } + RE_Options &set_dollar_endonly(bool x) { + PCRE_SET_OR_CLEAR(x, PCRE_DOLLAR_ENDONLY); + } + + bool extra() const { + return PCRE_IS_SET(PCRE_EXTRA); + } + RE_Options &set_extra(bool x) { + PCRE_SET_OR_CLEAR(x, PCRE_EXTRA); + } + + bool ungreedy() const { + return PCRE_IS_SET(PCRE_UNGREEDY); + } + RE_Options &set_ungreedy(bool x) { + PCRE_SET_OR_CLEAR(x, PCRE_UNGREEDY); + } + + bool utf8() const { + return PCRE_IS_SET(PCRE_UTF8); + } + RE_Options &set_utf8(bool x) { + PCRE_SET_OR_CLEAR(x, PCRE_UTF8); + } + + bool no_auto_capture() const { + return PCRE_IS_SET(PCRE_NO_AUTO_CAPTURE); + } + RE_Options &set_no_auto_capture(bool x) { + PCRE_SET_OR_CLEAR(x, PCRE_NO_AUTO_CAPTURE); + } + + RE_Options &set_all_options(int opt) { + all_options_ = opt; + return *this; + } + int all_options() const { + return all_options_ ; + } + + // TODO: add other pcre flags + + private: + int match_limit_; + int match_limit_recursion_; + int all_options_; +}; + +// These functions return some common RE_Options +static inline RE_Options UTF8() { + return RE_Options().set_utf8(true); +} + +static inline RE_Options CASELESS() { + return RE_Options().set_caseless(true); +} +static inline RE_Options MULTILINE() { + return RE_Options().set_multiline(true); +} + +static inline RE_Options DOTALL() { + return RE_Options().set_dotall(true); +} + +static inline RE_Options EXTENDED() { + return RE_Options().set_extended(true); +} + +// Interface for regular expression matching. Also corresponds to a +// pre-compiled regular expression. An "RE" object is safe for +// concurrent use by multiple threads. +class PCRECPP_EXP_DEFN RE { + public: + // We provide implicit conversions from strings so that users can + // pass in a string or a "const char*" wherever an "RE" is expected. + RE(const string& pat) { Init(pat, NULL); } + RE(const string& pat, const RE_Options& option) { Init(pat, &option); } + RE(const char* pat) { Init(pat, NULL); } + RE(const char* pat, const RE_Options& option) { Init(pat, &option); } + RE(const unsigned char* pat) { + Init(reinterpret_cast<const char*>(pat), NULL); + } + RE(const unsigned char* pat, const RE_Options& option) { + Init(reinterpret_cast<const char*>(pat), &option); + } + + // Copy constructor & assignment - note that these are expensive + // because they recompile the expression. + RE(const RE& re) { Init(re.pattern_, &re.options_); } + const RE& operator=(const RE& re) { + if (this != &re) { + Cleanup(); + + // This is the code that originally came from Google + // Init(re.pattern_.c_str(), &re.options_); + + // This is the replacement from Ari Pollak + Init(re.pattern_, &re.options_); + } + return *this; + } + + + ~RE(); + + // The string specification for this RE. E.g. + // RE re("ab*c?d+"); + // re.pattern(); // "ab*c?d+" + const string& pattern() const { return pattern_; } + + // If RE could not be created properly, returns an error string. + // Else returns the empty string. + const string& error() const { return *error_; } + + /***** The useful part: the matching interface *****/ + + // This is provided so one can do pattern.ReplaceAll() just as + // easily as ReplaceAll(pattern-text, ....) + + bool FullMatch(const StringPiece& text, + const Arg& ptr1 = no_arg, + const Arg& ptr2 = no_arg, + const Arg& ptr3 = no_arg, + const Arg& ptr4 = no_arg, + const Arg& ptr5 = no_arg, + const Arg& ptr6 = no_arg, + const Arg& ptr7 = no_arg, + const Arg& ptr8 = no_arg, + const Arg& ptr9 = no_arg, + const Arg& ptr10 = no_arg, + const Arg& ptr11 = no_arg, + const Arg& ptr12 = no_arg, + const Arg& ptr13 = no_arg, + const Arg& ptr14 = no_arg, + const Arg& ptr15 = no_arg, + const Arg& ptr16 = no_arg) const; + + bool PartialMatch(const StringPiece& text, + const Arg& ptr1 = no_arg, + const Arg& ptr2 = no_arg, + const Arg& ptr3 = no_arg, + const Arg& ptr4 = no_arg, + const Arg& ptr5 = no_arg, + const Arg& ptr6 = no_arg, + const Arg& ptr7 = no_arg, + const Arg& ptr8 = no_arg, + const Arg& ptr9 = no_arg, + const Arg& ptr10 = no_arg, + const Arg& ptr11 = no_arg, + const Arg& ptr12 = no_arg, + const Arg& ptr13 = no_arg, + const Arg& ptr14 = no_arg, + const Arg& ptr15 = no_arg, + const Arg& ptr16 = no_arg) const; + + bool Consume(StringPiece* input, + const Arg& ptr1 = no_arg, + const Arg& ptr2 = no_arg, + const Arg& ptr3 = no_arg, + const Arg& ptr4 = no_arg, + const Arg& ptr5 = no_arg, + const Arg& ptr6 = no_arg, + const Arg& ptr7 = no_arg, + const Arg& ptr8 = no_arg, + const Arg& ptr9 = no_arg, + const Arg& ptr10 = no_arg, + const Arg& ptr11 = no_arg, + const Arg& ptr12 = no_arg, + const Arg& ptr13 = no_arg, + const Arg& ptr14 = no_arg, + const Arg& ptr15 = no_arg, + const Arg& ptr16 = no_arg) const; + + bool FindAndConsume(StringPiece* input, + const Arg& ptr1 = no_arg, + const Arg& ptr2 = no_arg, + const Arg& ptr3 = no_arg, + const Arg& ptr4 = no_arg, + const Arg& ptr5 = no_arg, + const Arg& ptr6 = no_arg, + const Arg& ptr7 = no_arg, + const Arg& ptr8 = no_arg, + const Arg& ptr9 = no_arg, + const Arg& ptr10 = no_arg, + const Arg& ptr11 = no_arg, + const Arg& ptr12 = no_arg, + const Arg& ptr13 = no_arg, + const Arg& ptr14 = no_arg, + const Arg& ptr15 = no_arg, + const Arg& ptr16 = no_arg) const; + + bool Replace(const StringPiece& rewrite, + string *str) const; + + int GlobalReplace(const StringPiece& rewrite, + string *str) const; + + bool Extract(const StringPiece &rewrite, + const StringPiece &text, + string *out) const; + + // Escapes all potentially meaningful regexp characters in + // 'unquoted'. The returned string, used as a regular expression, + // will exactly match the original string. For example, + // 1.5-2.0? + // may become: + // 1\.5\-2\.0\? + // Note QuoteMeta behaves the same as perl's QuoteMeta function, + // *except* that it escapes the NUL character (\0) as backslash + 0, + // rather than backslash + NUL. + static string QuoteMeta(const StringPiece& unquoted); + + + /***** Generic matching interface *****/ + + // Type of match (TODO: Should be restructured as part of RE_Options) + enum Anchor { + UNANCHORED, // No anchoring + ANCHOR_START, // Anchor at start only + ANCHOR_BOTH // Anchor at start and end + }; + + // General matching routine. Stores the length of the match in + // "*consumed" if successful. + bool DoMatch(const StringPiece& text, + Anchor anchor, + int* consumed, + const Arg* const* args, int n) const; + + // Return the number of capturing subpatterns, or -1 if the + // regexp wasn't valid on construction. + int NumberOfCapturingGroups() const; + + // The default value for an argument, to indicate the end of the argument + // list. This must be used only in optional argument defaults. It should NOT + // be passed explicitly. Some people have tried to use it like this: + // + // FullMatch(x, y, &z, no_arg, &w); + // + // This is a mistake, and will not work. + static Arg no_arg; + + private: + + void Init(const string& pattern, const RE_Options* options); + void Cleanup(); + + // Match against "text", filling in "vec" (up to "vecsize" * 2/3) with + // pairs of integers for the beginning and end positions of matched + // text. The first pair corresponds to the entire matched text; + // subsequent pairs correspond, in order, to parentheses-captured + // matches. Returns the number of pairs (one more than the number of + // the last subpattern with a match) if matching was successful + // and zero if the match failed. + // I.e. for RE("(foo)|(bar)|(baz)") it will return 2, 3, and 4 when matching + // against "foo", "bar", and "baz" respectively. + // When matching RE("(foo)|hello") against "hello", it will return 1. + // But the values for all subpattern are filled in into "vec". + int TryMatch(const StringPiece& text, + int startpos, + Anchor anchor, + bool empty_ok, + int *vec, + int vecsize) const; + + // Append the "rewrite" string, with backslash subsitutions from "text" + // and "vec", to string "out". + bool Rewrite(string *out, + const StringPiece& rewrite, + const StringPiece& text, + int *vec, + int veclen) const; + + // internal implementation for DoMatch + bool DoMatchImpl(const StringPiece& text, + Anchor anchor, + int* consumed, + const Arg* const args[], + int n, + int* vec, + int vecsize) const; + + // Compile the regexp for the specified anchoring mode + pcre* Compile(Anchor anchor); + + string pattern_; + RE_Options options_; + pcre* re_full_; // For full matches + pcre* re_partial_; // For partial matches + const string* error_; // Error indicator (or points to empty string) +}; + +} // namespace pcrecpp + +#endif /* _PCRECPP_H */ diff --git a/frameworks/cairosvg/dependencies/pcre/8.42/include/pcrecpparg.h b/frameworks/cairosvg/dependencies/pcre/8.42/include/pcrecpparg.h new file mode 100755 index 00000000..b4f9c3f4 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pcre/8.42/include/pcrecpparg.h @@ -0,0 +1,174 @@ +// Copyright (c) 2005, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Author: Sanjay Ghemawat + +#ifndef _PCRECPPARG_H +#define _PCRECPPARG_H + +#include <stdlib.h> // for NULL +#include <string> + +#include <pcre.h> + +namespace pcrecpp { + +class StringPiece; + +// Hex/Octal/Binary? + +// Special class for parsing into objects that define a ParseFrom() method +template <class T> +class _RE_MatchObject { + public: + static inline bool Parse(const char* str, int n, void* dest) { + if (dest == NULL) return true; + T* object = reinterpret_cast<T*>(dest); + return object->ParseFrom(str, n); + } +}; + +class PCRECPP_EXP_DEFN Arg { + public: + // Empty constructor so we can declare arrays of Arg + Arg(); + + // Constructor specially designed for NULL arguments + Arg(void*); + + typedef bool (*Parser)(const char* str, int n, void* dest); + +// Type-specific parsers +#define PCRE_MAKE_PARSER(type,name) \ + Arg(type* p) : arg_(p), parser_(name) { } \ + Arg(type* p, Parser parser) : arg_(p), parser_(parser) { } + + + PCRE_MAKE_PARSER(char, parse_char); + PCRE_MAKE_PARSER(unsigned char, parse_uchar); + PCRE_MAKE_PARSER(short, parse_short); + PCRE_MAKE_PARSER(unsigned short, parse_ushort); + PCRE_MAKE_PARSER(int, parse_int); + PCRE_MAKE_PARSER(unsigned int, parse_uint); + PCRE_MAKE_PARSER(long, parse_long); + PCRE_MAKE_PARSER(unsigned long, parse_ulong); +#if 1 + PCRE_MAKE_PARSER(long long, parse_longlong); +#endif +#if 1 + PCRE_MAKE_PARSER(unsigned long long, parse_ulonglong); +#endif + PCRE_MAKE_PARSER(float, parse_float); + PCRE_MAKE_PARSER(double, parse_double); + PCRE_MAKE_PARSER(std::string, parse_string); + PCRE_MAKE_PARSER(StringPiece, parse_stringpiece); + +#undef PCRE_MAKE_PARSER + + // Generic constructor + template <class T> Arg(T*, Parser parser); + // Generic constructor template + template <class T> Arg(T* p) + : arg_(p), parser_(_RE_MatchObject<T>::Parse) { + } + + // Parse the data + bool Parse(const char* str, int n) const; + + private: + void* arg_; + Parser parser_; + + static bool parse_null (const char* str, int n, void* dest); + static bool parse_char (const char* str, int n, void* dest); + static bool parse_uchar (const char* str, int n, void* dest); + static bool parse_float (const char* str, int n, void* dest); + static bool parse_double (const char* str, int n, void* dest); + static bool parse_string (const char* str, int n, void* dest); + static bool parse_stringpiece (const char* str, int n, void* dest); + +#define PCRE_DECLARE_INTEGER_PARSER(name) \ + private: \ + static bool parse_ ## name(const char* str, int n, void* dest); \ + static bool parse_ ## name ## _radix( \ + const char* str, int n, void* dest, int radix); \ + public: \ + static bool parse_ ## name ## _hex(const char* str, int n, void* dest); \ + static bool parse_ ## name ## _octal(const char* str, int n, void* dest); \ + static bool parse_ ## name ## _cradix(const char* str, int n, void* dest) + + PCRE_DECLARE_INTEGER_PARSER(short); + PCRE_DECLARE_INTEGER_PARSER(ushort); + PCRE_DECLARE_INTEGER_PARSER(int); + PCRE_DECLARE_INTEGER_PARSER(uint); + PCRE_DECLARE_INTEGER_PARSER(long); + PCRE_DECLARE_INTEGER_PARSER(ulong); + PCRE_DECLARE_INTEGER_PARSER(longlong); + PCRE_DECLARE_INTEGER_PARSER(ulonglong); + +#undef PCRE_DECLARE_INTEGER_PARSER +}; + +inline Arg::Arg() : arg_(NULL), parser_(parse_null) { } +inline Arg::Arg(void* p) : arg_(p), parser_(parse_null) { } + +inline bool Arg::Parse(const char* str, int n) const { + return (*parser_)(str, n, arg_); +} + +// This part of the parser, appropriate only for ints, deals with bases +#define MAKE_INTEGER_PARSER(type, name) \ + inline Arg Hex(type* ptr) { \ + return Arg(ptr, Arg::parse_ ## name ## _hex); } \ + inline Arg Octal(type* ptr) { \ + return Arg(ptr, Arg::parse_ ## name ## _octal); } \ + inline Arg CRadix(type* ptr) { \ + return Arg(ptr, Arg::parse_ ## name ## _cradix); } + +MAKE_INTEGER_PARSER(short, short) /* */ +MAKE_INTEGER_PARSER(unsigned short, ushort) /* */ +MAKE_INTEGER_PARSER(int, int) /* Don't use semicolons */ +MAKE_INTEGER_PARSER(unsigned int, uint) /* after these statement */ +MAKE_INTEGER_PARSER(long, long) /* because they can cause */ +MAKE_INTEGER_PARSER(unsigned long, ulong) /* compiler warnings if */ +#if 1 /* the checking level is */ +MAKE_INTEGER_PARSER(long long, longlong) /* turned up high enough. */ +#endif /* */ +#if 1 /* */ +MAKE_INTEGER_PARSER(unsigned long long, ulonglong) /* */ +#endif + +#undef PCRE_IS_SET +#undef PCRE_SET_OR_CLEAR +#undef MAKE_INTEGER_PARSER + +} // namespace pcrecpp + + +#endif /* _PCRECPPARG_H */ diff --git a/frameworks/cairosvg/dependencies/pcre/8.42/include/pcreposix.h b/frameworks/cairosvg/dependencies/pcre/8.42/include/pcreposix.h new file mode 100755 index 00000000..c77c0b05 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pcre/8.42/include/pcreposix.h @@ -0,0 +1,146 @@ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +#ifndef _PCREPOSIX_H +#define _PCREPOSIX_H + +/* This is the header for the POSIX wrapper interface to the PCRE Perl- +Compatible Regular Expression library. It defines the things POSIX says should +be there. I hope. + + Copyright (c) 1997-2012 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + +/* Have to include stdlib.h in order to ensure that size_t is defined. */ + +#include <stdlib.h> + +/* Allow for C++ users */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Options, mostly defined by POSIX, but with some extras. */ + +#define REG_ICASE 0x0001 /* Maps to PCRE_CASELESS */ +#define REG_NEWLINE 0x0002 /* Maps to PCRE_MULTILINE */ +#define REG_NOTBOL 0x0004 /* Maps to PCRE_NOTBOL */ +#define REG_NOTEOL 0x0008 /* Maps to PCRE_NOTEOL */ +#define REG_DOTALL 0x0010 /* NOT defined by POSIX; maps to PCRE_DOTALL */ +#define REG_NOSUB 0x0020 /* Maps to PCRE_NO_AUTO_CAPTURE */ +#define REG_UTF8 0x0040 /* NOT defined by POSIX; maps to PCRE_UTF8 */ +#define REG_STARTEND 0x0080 /* BSD feature: pass subject string by so,eo */ +#define REG_NOTEMPTY 0x0100 /* NOT defined by POSIX; maps to PCRE_NOTEMPTY */ +#define REG_UNGREEDY 0x0200 /* NOT defined by POSIX; maps to PCRE_UNGREEDY */ +#define REG_UCP 0x0400 /* NOT defined by POSIX; maps to PCRE_UCP */ + +/* This is not used by PCRE, but by defining it we make it easier +to slot PCRE into existing programs that make POSIX calls. */ + +#define REG_EXTENDED 0 + +/* Error values. Not all these are relevant or used by the wrapper. */ + +enum { + REG_ASSERT = 1, /* internal error ? */ + REG_BADBR, /* invalid repeat counts in {} */ + REG_BADPAT, /* pattern error */ + REG_BADRPT, /* ? * + invalid */ + REG_EBRACE, /* unbalanced {} */ + REG_EBRACK, /* unbalanced [] */ + REG_ECOLLATE, /* collation error - not relevant */ + REG_ECTYPE, /* bad class */ + REG_EESCAPE, /* bad escape sequence */ + REG_EMPTY, /* empty expression */ + REG_EPAREN, /* unbalanced () */ + REG_ERANGE, /* bad range inside [] */ + REG_ESIZE, /* expression too big */ + REG_ESPACE, /* failed to get memory */ + REG_ESUBREG, /* bad back reference */ + REG_INVARG, /* bad argument */ + REG_NOMATCH /* match failed */ +}; + + +/* The structure representing a compiled regular expression. */ + +typedef struct { + void *re_pcre; + size_t re_nsub; + size_t re_erroffset; +} regex_t; + +/* The structure in which a captured offset is returned. */ + +typedef int regoff_t; + +typedef struct { + regoff_t rm_so; + regoff_t rm_eo; +} regmatch_t; + +/* When an application links to a PCRE DLL in Windows, the symbols that are +imported have to be identified as such. When building PCRE, the appropriate +export settings are needed, and are set in pcreposix.c before including this +file. */ + +#if defined(_WIN32) && !defined(PCRE_STATIC) && !defined(PCREPOSIX_EXP_DECL) +# define PCREPOSIX_EXP_DECL extern __declspec(dllimport) +# define PCREPOSIX_EXP_DEFN __declspec(dllimport) +#endif + +/* By default, we use the standard "extern" declarations. */ + +#ifndef PCREPOSIX_EXP_DECL +# ifdef __cplusplus +# define PCREPOSIX_EXP_DECL extern "C" +# define PCREPOSIX_EXP_DEFN extern "C" +# else +# define PCREPOSIX_EXP_DECL extern +# define PCREPOSIX_EXP_DEFN extern +# endif +#endif + +/* The functions */ + +PCREPOSIX_EXP_DECL int regcomp(regex_t *, const char *, int); +PCREPOSIX_EXP_DECL int regexec(const regex_t *, const char *, size_t, + regmatch_t *, int); +PCREPOSIX_EXP_DECL size_t regerror(int, const regex_t *, char *, size_t); +PCREPOSIX_EXP_DECL void regfree(regex_t *); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* End of pcreposix.h */ diff --git a/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcre.1.dylib b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcre.1.dylib new file mode 100755 index 00000000..f922bb0f Binary files /dev/null and b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcre.1.dylib differ diff --git a/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcre.dylib b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcre.dylib new file mode 120000 index 00000000..8bcb5af4 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcre.dylib @@ -0,0 +1 @@ +libpcre.1.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcre16.0.dylib b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcre16.0.dylib new file mode 100755 index 00000000..029b40cd Binary files /dev/null and b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcre16.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcre16.dylib b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcre16.dylib new file mode 120000 index 00000000..c1494e90 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcre16.dylib @@ -0,0 +1 @@ +libpcre16.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcre32.0.dylib b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcre32.0.dylib new file mode 100755 index 00000000..abad64d7 Binary files /dev/null and b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcre32.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcre32.dylib b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcre32.dylib new file mode 120000 index 00000000..8aa097c0 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcre32.dylib @@ -0,0 +1 @@ +libpcre32.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcrecpp.0.dylib b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcrecpp.0.dylib new file mode 100755 index 00000000..2697674c Binary files /dev/null and b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcrecpp.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcrecpp.dylib b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcrecpp.dylib new file mode 120000 index 00000000..81c5c4ec --- /dev/null +++ b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcrecpp.dylib @@ -0,0 +1 @@ +libpcrecpp.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcreposix.0.dylib b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcreposix.0.dylib new file mode 100755 index 00000000..2338316c Binary files /dev/null and b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcreposix.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcreposix.dylib b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcreposix.dylib new file mode 120000 index 00000000..80b3c25d --- /dev/null +++ b/frameworks/cairosvg/dependencies/pcre/8.42/lib/libpcreposix.dylib @@ -0,0 +1 @@ +libpcreposix.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/dependencies/pixman/0.34.0_1/include/pixman-1/pixman-version.h b/frameworks/cairosvg/dependencies/pixman/0.34.0_1/include/pixman-1/pixman-version.h new file mode 100755 index 00000000..c31b001f --- /dev/null +++ b/frameworks/cairosvg/dependencies/pixman/0.34.0_1/include/pixman-1/pixman-version.h @@ -0,0 +1,50 @@ +/* + * Copyright © 2008 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Author: Carl D. Worth <cworth@cworth.org> + */ + +#ifndef PIXMAN_VERSION_H__ +#define PIXMAN_VERSION_H__ + +#ifndef PIXMAN_H__ +# error pixman-version.h should only be included by pixman.h +#endif + +#define PIXMAN_VERSION_MAJOR 0 +#define PIXMAN_VERSION_MINOR 34 +#define PIXMAN_VERSION_MICRO 0 + +#define PIXMAN_VERSION_STRING "0.34.0" + +#define PIXMAN_VERSION_ENCODE(major, minor, micro) ( \ + ((major) * 10000) \ + + ((minor) * 100) \ + + ((micro) * 1)) + +#define PIXMAN_VERSION PIXMAN_VERSION_ENCODE( \ + PIXMAN_VERSION_MAJOR, \ + PIXMAN_VERSION_MINOR, \ + PIXMAN_VERSION_MICRO) + +#endif /* PIXMAN_VERSION_H__ */ diff --git a/frameworks/cairosvg/dependencies/pixman/0.34.0_1/include/pixman-1/pixman.h b/frameworks/cairosvg/dependencies/pixman/0.34.0_1/include/pixman-1/pixman.h new file mode 100755 index 00000000..509ba5e5 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pixman/0.34.0_1/include/pixman-1/pixman.h @@ -0,0 +1,1111 @@ +/*********************************************************** + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ +/* + * Copyright © 1998, 2004 Keith Packard + * Copyright 2007 Red Hat, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef PIXMAN_H__ +#define PIXMAN_H__ + +#include <pixman-version.h> + +#ifdef __cplusplus +#define PIXMAN_BEGIN_DECLS extern "C" { +#define PIXMAN_END_DECLS } +#else +#define PIXMAN_BEGIN_DECLS +#define PIXMAN_END_DECLS +#endif + +PIXMAN_BEGIN_DECLS + +/* + * Standard integers + */ + +#if !defined (PIXMAN_DONT_DEFINE_STDINT) + +#if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || defined (_sgi) || defined (__sun) || defined (sun) || defined (__digital__) || defined (__HP_cc) +# include <inttypes.h> +/* VS 2010 (_MSC_VER 1600) has stdint.h */ +#elif defined (_MSC_VER) && _MSC_VER < 1600 +typedef __int8 int8_t; +typedef unsigned __int8 uint8_t; +typedef __int16 int16_t; +typedef unsigned __int16 uint16_t; +typedef __int32 int32_t; +typedef unsigned __int32 uint32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +#elif defined (_AIX) +# include <sys/inttypes.h> +#else +# include <stdint.h> +#endif + +#endif + +/* + * Boolean + */ +typedef int pixman_bool_t; + +/* + * Fixpoint numbers + */ +typedef int64_t pixman_fixed_32_32_t; +typedef pixman_fixed_32_32_t pixman_fixed_48_16_t; +typedef uint32_t pixman_fixed_1_31_t; +typedef uint32_t pixman_fixed_1_16_t; +typedef int32_t pixman_fixed_16_16_t; +typedef pixman_fixed_16_16_t pixman_fixed_t; + +#define pixman_fixed_e ((pixman_fixed_t) 1) +#define pixman_fixed_1 (pixman_int_to_fixed(1)) +#define pixman_fixed_1_minus_e (pixman_fixed_1 - pixman_fixed_e) +#define pixman_fixed_minus_1 (pixman_int_to_fixed(-1)) +#define pixman_fixed_to_int(f) ((int) ((f) >> 16)) +#define pixman_int_to_fixed(i) ((pixman_fixed_t) ((i) << 16)) +#define pixman_fixed_to_double(f) (double) ((f) / (double) pixman_fixed_1) +#define pixman_double_to_fixed(d) ((pixman_fixed_t) ((d) * 65536.0)) +#define pixman_fixed_frac(f) ((f) & pixman_fixed_1_minus_e) +#define pixman_fixed_floor(f) ((f) & ~pixman_fixed_1_minus_e) +#define pixman_fixed_ceil(f) pixman_fixed_floor ((f) + pixman_fixed_1_minus_e) +#define pixman_fixed_fraction(f) ((f) & pixman_fixed_1_minus_e) +#define pixman_fixed_mod_2(f) ((f) & (pixman_fixed1 | pixman_fixed_1_minus_e)) +#define pixman_max_fixed_48_16 ((pixman_fixed_48_16_t) 0x7fffffff) +#define pixman_min_fixed_48_16 (-((pixman_fixed_48_16_t) 1 << 31)) + +/* + * Misc structs + */ +typedef struct pixman_color pixman_color_t; +typedef struct pixman_point_fixed pixman_point_fixed_t; +typedef struct pixman_line_fixed pixman_line_fixed_t; +typedef struct pixman_vector pixman_vector_t; +typedef struct pixman_transform pixman_transform_t; + +struct pixman_color +{ + uint16_t red; + uint16_t green; + uint16_t blue; + uint16_t alpha; +}; + +struct pixman_point_fixed +{ + pixman_fixed_t x; + pixman_fixed_t y; +}; + +struct pixman_line_fixed +{ + pixman_point_fixed_t p1, p2; +}; + +/* + * Fixed point matrices + */ + +struct pixman_vector +{ + pixman_fixed_t vector[3]; +}; + +struct pixman_transform +{ + pixman_fixed_t matrix[3][3]; +}; + +/* forward declaration (sorry) */ +struct pixman_box16; +typedef union pixman_image pixman_image_t; + +void pixman_transform_init_identity (struct pixman_transform *matrix); +pixman_bool_t pixman_transform_point_3d (const struct pixman_transform *transform, + struct pixman_vector *vector); +pixman_bool_t pixman_transform_point (const struct pixman_transform *transform, + struct pixman_vector *vector); +pixman_bool_t pixman_transform_multiply (struct pixman_transform *dst, + const struct pixman_transform *l, + const struct pixman_transform *r); +void pixman_transform_init_scale (struct pixman_transform *t, + pixman_fixed_t sx, + pixman_fixed_t sy); +pixman_bool_t pixman_transform_scale (struct pixman_transform *forward, + struct pixman_transform *reverse, + pixman_fixed_t sx, + pixman_fixed_t sy); +void pixman_transform_init_rotate (struct pixman_transform *t, + pixman_fixed_t cos, + pixman_fixed_t sin); +pixman_bool_t pixman_transform_rotate (struct pixman_transform *forward, + struct pixman_transform *reverse, + pixman_fixed_t c, + pixman_fixed_t s); +void pixman_transform_init_translate (struct pixman_transform *t, + pixman_fixed_t tx, + pixman_fixed_t ty); +pixman_bool_t pixman_transform_translate (struct pixman_transform *forward, + struct pixman_transform *reverse, + pixman_fixed_t tx, + pixman_fixed_t ty); +pixman_bool_t pixman_transform_bounds (const struct pixman_transform *matrix, + struct pixman_box16 *b); +pixman_bool_t pixman_transform_invert (struct pixman_transform *dst, + const struct pixman_transform *src); +pixman_bool_t pixman_transform_is_identity (const struct pixman_transform *t); +pixman_bool_t pixman_transform_is_scale (const struct pixman_transform *t); +pixman_bool_t pixman_transform_is_int_translate (const struct pixman_transform *t); +pixman_bool_t pixman_transform_is_inverse (const struct pixman_transform *a, + const struct pixman_transform *b); + +/* + * Floating point matrices + */ +typedef struct pixman_f_transform pixman_f_transform_t; +typedef struct pixman_f_vector pixman_f_vector_t; + +struct pixman_f_vector +{ + double v[3]; +}; + +struct pixman_f_transform +{ + double m[3][3]; +}; + +pixman_bool_t pixman_transform_from_pixman_f_transform (struct pixman_transform *t, + const struct pixman_f_transform *ft); +void pixman_f_transform_from_pixman_transform (struct pixman_f_transform *ft, + const struct pixman_transform *t); +pixman_bool_t pixman_f_transform_invert (struct pixman_f_transform *dst, + const struct pixman_f_transform *src); +pixman_bool_t pixman_f_transform_point (const struct pixman_f_transform *t, + struct pixman_f_vector *v); +void pixman_f_transform_point_3d (const struct pixman_f_transform *t, + struct pixman_f_vector *v); +void pixman_f_transform_multiply (struct pixman_f_transform *dst, + const struct pixman_f_transform *l, + const struct pixman_f_transform *r); +void pixman_f_transform_init_scale (struct pixman_f_transform *t, + double sx, + double sy); +pixman_bool_t pixman_f_transform_scale (struct pixman_f_transform *forward, + struct pixman_f_transform *reverse, + double sx, + double sy); +void pixman_f_transform_init_rotate (struct pixman_f_transform *t, + double cos, + double sin); +pixman_bool_t pixman_f_transform_rotate (struct pixman_f_transform *forward, + struct pixman_f_transform *reverse, + double c, + double s); +void pixman_f_transform_init_translate (struct pixman_f_transform *t, + double tx, + double ty); +pixman_bool_t pixman_f_transform_translate (struct pixman_f_transform *forward, + struct pixman_f_transform *reverse, + double tx, + double ty); +pixman_bool_t pixman_f_transform_bounds (const struct pixman_f_transform *t, + struct pixman_box16 *b); +void pixman_f_transform_init_identity (struct pixman_f_transform *t); + +typedef enum +{ + PIXMAN_REPEAT_NONE, + PIXMAN_REPEAT_NORMAL, + PIXMAN_REPEAT_PAD, + PIXMAN_REPEAT_REFLECT +} pixman_repeat_t; + +typedef enum +{ + PIXMAN_FILTER_FAST, + PIXMAN_FILTER_GOOD, + PIXMAN_FILTER_BEST, + PIXMAN_FILTER_NEAREST, + PIXMAN_FILTER_BILINEAR, + PIXMAN_FILTER_CONVOLUTION, + + /* The SEPARABLE_CONVOLUTION filter takes the following parameters: + * + * width: integer given as 16.16 fixpoint number + * height: integer given as 16.16 fixpoint number + * x_phase_bits: integer given as 16.16 fixpoint + * y_phase_bits: integer given as 16.16 fixpoint + * xtables: (1 << x_phase_bits) tables of size width + * ytables: (1 << y_phase_bits) tables of size height + * + * When sampling at (x, y), the location is first rounded to one of + * n_x_phases * n_y_phases subpixel positions. These subpixel positions + * determine an xtable and a ytable to use. + * + * Conceptually a width x height matrix is then formed in which each entry + * is the product of the corresponding entries in the x and y tables. + * This matrix is then aligned with the image pixels such that its center + * is as close as possible to the subpixel location chosen earlier. Then + * the image is convolved with the matrix and the resulting pixel returned. + */ + PIXMAN_FILTER_SEPARABLE_CONVOLUTION +} pixman_filter_t; + +typedef enum +{ + PIXMAN_OP_CLEAR = 0x00, + PIXMAN_OP_SRC = 0x01, + PIXMAN_OP_DST = 0x02, + PIXMAN_OP_OVER = 0x03, + PIXMAN_OP_OVER_REVERSE = 0x04, + PIXMAN_OP_IN = 0x05, + PIXMAN_OP_IN_REVERSE = 0x06, + PIXMAN_OP_OUT = 0x07, + PIXMAN_OP_OUT_REVERSE = 0x08, + PIXMAN_OP_ATOP = 0x09, + PIXMAN_OP_ATOP_REVERSE = 0x0a, + PIXMAN_OP_XOR = 0x0b, + PIXMAN_OP_ADD = 0x0c, + PIXMAN_OP_SATURATE = 0x0d, + + PIXMAN_OP_DISJOINT_CLEAR = 0x10, + PIXMAN_OP_DISJOINT_SRC = 0x11, + PIXMAN_OP_DISJOINT_DST = 0x12, + PIXMAN_OP_DISJOINT_OVER = 0x13, + PIXMAN_OP_DISJOINT_OVER_REVERSE = 0x14, + PIXMAN_OP_DISJOINT_IN = 0x15, + PIXMAN_OP_DISJOINT_IN_REVERSE = 0x16, + PIXMAN_OP_DISJOINT_OUT = 0x17, + PIXMAN_OP_DISJOINT_OUT_REVERSE = 0x18, + PIXMAN_OP_DISJOINT_ATOP = 0x19, + PIXMAN_OP_DISJOINT_ATOP_REVERSE = 0x1a, + PIXMAN_OP_DISJOINT_XOR = 0x1b, + + PIXMAN_OP_CONJOINT_CLEAR = 0x20, + PIXMAN_OP_CONJOINT_SRC = 0x21, + PIXMAN_OP_CONJOINT_DST = 0x22, + PIXMAN_OP_CONJOINT_OVER = 0x23, + PIXMAN_OP_CONJOINT_OVER_REVERSE = 0x24, + PIXMAN_OP_CONJOINT_IN = 0x25, + PIXMAN_OP_CONJOINT_IN_REVERSE = 0x26, + PIXMAN_OP_CONJOINT_OUT = 0x27, + PIXMAN_OP_CONJOINT_OUT_REVERSE = 0x28, + PIXMAN_OP_CONJOINT_ATOP = 0x29, + PIXMAN_OP_CONJOINT_ATOP_REVERSE = 0x2a, + PIXMAN_OP_CONJOINT_XOR = 0x2b, + + PIXMAN_OP_MULTIPLY = 0x30, + PIXMAN_OP_SCREEN = 0x31, + PIXMAN_OP_OVERLAY = 0x32, + PIXMAN_OP_DARKEN = 0x33, + PIXMAN_OP_LIGHTEN = 0x34, + PIXMAN_OP_COLOR_DODGE = 0x35, + PIXMAN_OP_COLOR_BURN = 0x36, + PIXMAN_OP_HARD_LIGHT = 0x37, + PIXMAN_OP_SOFT_LIGHT = 0x38, + PIXMAN_OP_DIFFERENCE = 0x39, + PIXMAN_OP_EXCLUSION = 0x3a, + PIXMAN_OP_HSL_HUE = 0x3b, + PIXMAN_OP_HSL_SATURATION = 0x3c, + PIXMAN_OP_HSL_COLOR = 0x3d, + PIXMAN_OP_HSL_LUMINOSITY = 0x3e + +#ifdef PIXMAN_USE_INTERNAL_API + , + PIXMAN_N_OPERATORS, + PIXMAN_OP_NONE = PIXMAN_N_OPERATORS +#endif +} pixman_op_t; + +/* + * Regions + */ +typedef struct pixman_region16_data pixman_region16_data_t; +typedef struct pixman_box16 pixman_box16_t; +typedef struct pixman_rectangle16 pixman_rectangle16_t; +typedef struct pixman_region16 pixman_region16_t; + +struct pixman_region16_data { + long size; + long numRects; +/* pixman_box16_t rects[size]; in memory but not explicitly declared */ +}; + +struct pixman_rectangle16 +{ + int16_t x, y; + uint16_t width, height; +}; + +struct pixman_box16 +{ + int16_t x1, y1, x2, y2; +}; + +struct pixman_region16 +{ + pixman_box16_t extents; + pixman_region16_data_t *data; +}; + +typedef enum +{ + PIXMAN_REGION_OUT, + PIXMAN_REGION_IN, + PIXMAN_REGION_PART +} pixman_region_overlap_t; + +/* This function exists only to make it possible to preserve + * the X ABI - it should go away at first opportunity. + */ +void pixman_region_set_static_pointers (pixman_box16_t *empty_box, + pixman_region16_data_t *empty_data, + pixman_region16_data_t *broken_data); + +/* creation/destruction */ +void pixman_region_init (pixman_region16_t *region); +void pixman_region_init_rect (pixman_region16_t *region, + int x, + int y, + unsigned int width, + unsigned int height); +pixman_bool_t pixman_region_init_rects (pixman_region16_t *region, + const pixman_box16_t *boxes, + int count); +void pixman_region_init_with_extents (pixman_region16_t *region, + pixman_box16_t *extents); +void pixman_region_init_from_image (pixman_region16_t *region, + pixman_image_t *image); +void pixman_region_fini (pixman_region16_t *region); + + +/* manipulation */ +void pixman_region_translate (pixman_region16_t *region, + int x, + int y); +pixman_bool_t pixman_region_copy (pixman_region16_t *dest, + pixman_region16_t *source); +pixman_bool_t pixman_region_intersect (pixman_region16_t *new_reg, + pixman_region16_t *reg1, + pixman_region16_t *reg2); +pixman_bool_t pixman_region_union (pixman_region16_t *new_reg, + pixman_region16_t *reg1, + pixman_region16_t *reg2); +pixman_bool_t pixman_region_union_rect (pixman_region16_t *dest, + pixman_region16_t *source, + int x, + int y, + unsigned int width, + unsigned int height); +pixman_bool_t pixman_region_intersect_rect (pixman_region16_t *dest, + pixman_region16_t *source, + int x, + int y, + unsigned int width, + unsigned int height); +pixman_bool_t pixman_region_subtract (pixman_region16_t *reg_d, + pixman_region16_t *reg_m, + pixman_region16_t *reg_s); +pixman_bool_t pixman_region_inverse (pixman_region16_t *new_reg, + pixman_region16_t *reg1, + pixman_box16_t *inv_rect); +pixman_bool_t pixman_region_contains_point (pixman_region16_t *region, + int x, + int y, + pixman_box16_t *box); +pixman_region_overlap_t pixman_region_contains_rectangle (pixman_region16_t *region, + pixman_box16_t *prect); +pixman_bool_t pixman_region_not_empty (pixman_region16_t *region); +pixman_box16_t * pixman_region_extents (pixman_region16_t *region); +int pixman_region_n_rects (pixman_region16_t *region); +pixman_box16_t * pixman_region_rectangles (pixman_region16_t *region, + int *n_rects); +pixman_bool_t pixman_region_equal (pixman_region16_t *region1, + pixman_region16_t *region2); +pixman_bool_t pixman_region_selfcheck (pixman_region16_t *region); +void pixman_region_reset (pixman_region16_t *region, + pixman_box16_t *box); +void pixman_region_clear (pixman_region16_t *region); +/* + * 32 bit regions + */ +typedef struct pixman_region32_data pixman_region32_data_t; +typedef struct pixman_box32 pixman_box32_t; +typedef struct pixman_rectangle32 pixman_rectangle32_t; +typedef struct pixman_region32 pixman_region32_t; + +struct pixman_region32_data { + long size; + long numRects; +/* pixman_box32_t rects[size]; in memory but not explicitly declared */ +}; + +struct pixman_rectangle32 +{ + int32_t x, y; + uint32_t width, height; +}; + +struct pixman_box32 +{ + int32_t x1, y1, x2, y2; +}; + +struct pixman_region32 +{ + pixman_box32_t extents; + pixman_region32_data_t *data; +}; + +/* creation/destruction */ +void pixman_region32_init (pixman_region32_t *region); +void pixman_region32_init_rect (pixman_region32_t *region, + int x, + int y, + unsigned int width, + unsigned int height); +pixman_bool_t pixman_region32_init_rects (pixman_region32_t *region, + const pixman_box32_t *boxes, + int count); +void pixman_region32_init_with_extents (pixman_region32_t *region, + pixman_box32_t *extents); +void pixman_region32_init_from_image (pixman_region32_t *region, + pixman_image_t *image); +void pixman_region32_fini (pixman_region32_t *region); + + +/* manipulation */ +void pixman_region32_translate (pixman_region32_t *region, + int x, + int y); +pixman_bool_t pixman_region32_copy (pixman_region32_t *dest, + pixman_region32_t *source); +pixman_bool_t pixman_region32_intersect (pixman_region32_t *new_reg, + pixman_region32_t *reg1, + pixman_region32_t *reg2); +pixman_bool_t pixman_region32_union (pixman_region32_t *new_reg, + pixman_region32_t *reg1, + pixman_region32_t *reg2); +pixman_bool_t pixman_region32_intersect_rect (pixman_region32_t *dest, + pixman_region32_t *source, + int x, + int y, + unsigned int width, + unsigned int height); +pixman_bool_t pixman_region32_union_rect (pixman_region32_t *dest, + pixman_region32_t *source, + int x, + int y, + unsigned int width, + unsigned int height); +pixman_bool_t pixman_region32_subtract (pixman_region32_t *reg_d, + pixman_region32_t *reg_m, + pixman_region32_t *reg_s); +pixman_bool_t pixman_region32_inverse (pixman_region32_t *new_reg, + pixman_region32_t *reg1, + pixman_box32_t *inv_rect); +pixman_bool_t pixman_region32_contains_point (pixman_region32_t *region, + int x, + int y, + pixman_box32_t *box); +pixman_region_overlap_t pixman_region32_contains_rectangle (pixman_region32_t *region, + pixman_box32_t *prect); +pixman_bool_t pixman_region32_not_empty (pixman_region32_t *region); +pixman_box32_t * pixman_region32_extents (pixman_region32_t *region); +int pixman_region32_n_rects (pixman_region32_t *region); +pixman_box32_t * pixman_region32_rectangles (pixman_region32_t *region, + int *n_rects); +pixman_bool_t pixman_region32_equal (pixman_region32_t *region1, + pixman_region32_t *region2); +pixman_bool_t pixman_region32_selfcheck (pixman_region32_t *region); +void pixman_region32_reset (pixman_region32_t *region, + pixman_box32_t *box); +void pixman_region32_clear (pixman_region32_t *region); + + +/* Copy / Fill / Misc */ +pixman_bool_t pixman_blt (uint32_t *src_bits, + uint32_t *dst_bits, + int src_stride, + int dst_stride, + int src_bpp, + int dst_bpp, + int src_x, + int src_y, + int dest_x, + int dest_y, + int width, + int height); +pixman_bool_t pixman_fill (uint32_t *bits, + int stride, + int bpp, + int x, + int y, + int width, + int height, + uint32_t _xor); + +int pixman_version (void); +const char* pixman_version_string (void); + +/* + * Images + */ +typedef struct pixman_indexed pixman_indexed_t; +typedef struct pixman_gradient_stop pixman_gradient_stop_t; + +typedef uint32_t (* pixman_read_memory_func_t) (const void *src, int size); +typedef void (* pixman_write_memory_func_t) (void *dst, uint32_t value, int size); + +typedef void (* pixman_image_destroy_func_t) (pixman_image_t *image, void *data); + +struct pixman_gradient_stop { + pixman_fixed_t x; + pixman_color_t color; +}; + +#define PIXMAN_MAX_INDEXED 256 /* XXX depth must be <= 8 */ + +#if PIXMAN_MAX_INDEXED <= 256 +typedef uint8_t pixman_index_type; +#endif + +struct pixman_indexed +{ + pixman_bool_t color; + uint32_t rgba[PIXMAN_MAX_INDEXED]; + pixman_index_type ent[32768]; +}; + +/* + * While the protocol is generous in format support, the + * sample implementation allows only packed RGB and GBR + * representations for data to simplify software rendering, + */ +#define PIXMAN_FORMAT(bpp,type,a,r,g,b) (((bpp) << 24) | \ + ((type) << 16) | \ + ((a) << 12) | \ + ((r) << 8) | \ + ((g) << 4) | \ + ((b))) + +#define PIXMAN_FORMAT_BPP(f) (((f) >> 24) ) +#define PIXMAN_FORMAT_TYPE(f) (((f) >> 16) & 0xff) +#define PIXMAN_FORMAT_A(f) (((f) >> 12) & 0x0f) +#define PIXMAN_FORMAT_R(f) (((f) >> 8) & 0x0f) +#define PIXMAN_FORMAT_G(f) (((f) >> 4) & 0x0f) +#define PIXMAN_FORMAT_B(f) (((f) ) & 0x0f) +#define PIXMAN_FORMAT_RGB(f) (((f) ) & 0xfff) +#define PIXMAN_FORMAT_VIS(f) (((f) ) & 0xffff) +#define PIXMAN_FORMAT_DEPTH(f) (PIXMAN_FORMAT_A(f) + \ + PIXMAN_FORMAT_R(f) + \ + PIXMAN_FORMAT_G(f) + \ + PIXMAN_FORMAT_B(f)) + +#define PIXMAN_TYPE_OTHER 0 +#define PIXMAN_TYPE_A 1 +#define PIXMAN_TYPE_ARGB 2 +#define PIXMAN_TYPE_ABGR 3 +#define PIXMAN_TYPE_COLOR 4 +#define PIXMAN_TYPE_GRAY 5 +#define PIXMAN_TYPE_YUY2 6 +#define PIXMAN_TYPE_YV12 7 +#define PIXMAN_TYPE_BGRA 8 +#define PIXMAN_TYPE_RGBA 9 +#define PIXMAN_TYPE_ARGB_SRGB 10 + +#define PIXMAN_FORMAT_COLOR(f) \ + (PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_ARGB || \ + PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_ABGR || \ + PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_BGRA || \ + PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_RGBA) + +/* 32bpp formats */ +typedef enum { + PIXMAN_a8r8g8b8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,8,8,8,8), + PIXMAN_x8r8g8b8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,0,8,8,8), + PIXMAN_a8b8g8r8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,8,8,8,8), + PIXMAN_x8b8g8r8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,0,8,8,8), + PIXMAN_b8g8r8a8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_BGRA,8,8,8,8), + PIXMAN_b8g8r8x8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_BGRA,0,8,8,8), + PIXMAN_r8g8b8a8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_RGBA,8,8,8,8), + PIXMAN_r8g8b8x8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_RGBA,0,8,8,8), + PIXMAN_x14r6g6b6 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,0,6,6,6), + PIXMAN_x2r10g10b10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,0,10,10,10), + PIXMAN_a2r10g10b10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,2,10,10,10), + PIXMAN_x2b10g10r10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,0,10,10,10), + PIXMAN_a2b10g10r10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,2,10,10,10), + +/* sRGB formats */ + PIXMAN_a8r8g8b8_sRGB = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB_SRGB,8,8,8,8), + +/* 24bpp formats */ + PIXMAN_r8g8b8 = PIXMAN_FORMAT(24,PIXMAN_TYPE_ARGB,0,8,8,8), + PIXMAN_b8g8r8 = PIXMAN_FORMAT(24,PIXMAN_TYPE_ABGR,0,8,8,8), + +/* 16bpp formats */ + PIXMAN_r5g6b5 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ARGB,0,5,6,5), + PIXMAN_b5g6r5 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ABGR,0,5,6,5), + + PIXMAN_a1r5g5b5 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ARGB,1,5,5,5), + PIXMAN_x1r5g5b5 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ARGB,0,5,5,5), + PIXMAN_a1b5g5r5 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ABGR,1,5,5,5), + PIXMAN_x1b5g5r5 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ABGR,0,5,5,5), + PIXMAN_a4r4g4b4 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ARGB,4,4,4,4), + PIXMAN_x4r4g4b4 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ARGB,0,4,4,4), + PIXMAN_a4b4g4r4 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ABGR,4,4,4,4), + PIXMAN_x4b4g4r4 = PIXMAN_FORMAT(16,PIXMAN_TYPE_ABGR,0,4,4,4), + +/* 8bpp formats */ + PIXMAN_a8 = PIXMAN_FORMAT(8,PIXMAN_TYPE_A,8,0,0,0), + PIXMAN_r3g3b2 = PIXMAN_FORMAT(8,PIXMAN_TYPE_ARGB,0,3,3,2), + PIXMAN_b2g3r3 = PIXMAN_FORMAT(8,PIXMAN_TYPE_ABGR,0,3,3,2), + PIXMAN_a2r2g2b2 = PIXMAN_FORMAT(8,PIXMAN_TYPE_ARGB,2,2,2,2), + PIXMAN_a2b2g2r2 = PIXMAN_FORMAT(8,PIXMAN_TYPE_ABGR,2,2,2,2), + + PIXMAN_c8 = PIXMAN_FORMAT(8,PIXMAN_TYPE_COLOR,0,0,0,0), + PIXMAN_g8 = PIXMAN_FORMAT(8,PIXMAN_TYPE_GRAY,0,0,0,0), + + PIXMAN_x4a4 = PIXMAN_FORMAT(8,PIXMAN_TYPE_A,4,0,0,0), + + PIXMAN_x4c4 = PIXMAN_FORMAT(8,PIXMAN_TYPE_COLOR,0,0,0,0), + PIXMAN_x4g4 = PIXMAN_FORMAT(8,PIXMAN_TYPE_GRAY,0,0,0,0), + +/* 4bpp formats */ + PIXMAN_a4 = PIXMAN_FORMAT(4,PIXMAN_TYPE_A,4,0,0,0), + PIXMAN_r1g2b1 = PIXMAN_FORMAT(4,PIXMAN_TYPE_ARGB,0,1,2,1), + PIXMAN_b1g2r1 = PIXMAN_FORMAT(4,PIXMAN_TYPE_ABGR,0,1,2,1), + PIXMAN_a1r1g1b1 = PIXMAN_FORMAT(4,PIXMAN_TYPE_ARGB,1,1,1,1), + PIXMAN_a1b1g1r1 = PIXMAN_FORMAT(4,PIXMAN_TYPE_ABGR,1,1,1,1), + + PIXMAN_c4 = PIXMAN_FORMAT(4,PIXMAN_TYPE_COLOR,0,0,0,0), + PIXMAN_g4 = PIXMAN_FORMAT(4,PIXMAN_TYPE_GRAY,0,0,0,0), + +/* 1bpp formats */ + PIXMAN_a1 = PIXMAN_FORMAT(1,PIXMAN_TYPE_A,1,0,0,0), + + PIXMAN_g1 = PIXMAN_FORMAT(1,PIXMAN_TYPE_GRAY,0,0,0,0), + +/* YUV formats */ + PIXMAN_yuy2 = PIXMAN_FORMAT(16,PIXMAN_TYPE_YUY2,0,0,0,0), + PIXMAN_yv12 = PIXMAN_FORMAT(12,PIXMAN_TYPE_YV12,0,0,0,0) +} pixman_format_code_t; + +/* Querying supported format values. */ +pixman_bool_t pixman_format_supported_destination (pixman_format_code_t format); +pixman_bool_t pixman_format_supported_source (pixman_format_code_t format); + +/* Constructors */ +pixman_image_t *pixman_image_create_solid_fill (const pixman_color_t *color); +pixman_image_t *pixman_image_create_linear_gradient (const pixman_point_fixed_t *p1, + const pixman_point_fixed_t *p2, + const pixman_gradient_stop_t *stops, + int n_stops); +pixman_image_t *pixman_image_create_radial_gradient (const pixman_point_fixed_t *inner, + const pixman_point_fixed_t *outer, + pixman_fixed_t inner_radius, + pixman_fixed_t outer_radius, + const pixman_gradient_stop_t *stops, + int n_stops); +pixman_image_t *pixman_image_create_conical_gradient (const pixman_point_fixed_t *center, + pixman_fixed_t angle, + const pixman_gradient_stop_t *stops, + int n_stops); +pixman_image_t *pixman_image_create_bits (pixman_format_code_t format, + int width, + int height, + uint32_t *bits, + int rowstride_bytes); +pixman_image_t *pixman_image_create_bits_no_clear (pixman_format_code_t format, + int width, + int height, + uint32_t * bits, + int rowstride_bytes); + +/* Destructor */ +pixman_image_t *pixman_image_ref (pixman_image_t *image); +pixman_bool_t pixman_image_unref (pixman_image_t *image); + +void pixman_image_set_destroy_function (pixman_image_t *image, + pixman_image_destroy_func_t function, + void *data); +void * pixman_image_get_destroy_data (pixman_image_t *image); + +/* Set properties */ +pixman_bool_t pixman_image_set_clip_region (pixman_image_t *image, + pixman_region16_t *region); +pixman_bool_t pixman_image_set_clip_region32 (pixman_image_t *image, + pixman_region32_t *region); +void pixman_image_set_has_client_clip (pixman_image_t *image, + pixman_bool_t clien_clip); +pixman_bool_t pixman_image_set_transform (pixman_image_t *image, + const pixman_transform_t *transform); +void pixman_image_set_repeat (pixman_image_t *image, + pixman_repeat_t repeat); +pixman_bool_t pixman_image_set_filter (pixman_image_t *image, + pixman_filter_t filter, + const pixman_fixed_t *filter_params, + int n_filter_params); +void pixman_image_set_source_clipping (pixman_image_t *image, + pixman_bool_t source_clipping); +void pixman_image_set_alpha_map (pixman_image_t *image, + pixman_image_t *alpha_map, + int16_t x, + int16_t y); +void pixman_image_set_component_alpha (pixman_image_t *image, + pixman_bool_t component_alpha); +pixman_bool_t pixman_image_get_component_alpha (pixman_image_t *image); +void pixman_image_set_accessors (pixman_image_t *image, + pixman_read_memory_func_t read_func, + pixman_write_memory_func_t write_func); +void pixman_image_set_indexed (pixman_image_t *image, + const pixman_indexed_t *indexed); +uint32_t *pixman_image_get_data (pixman_image_t *image); +int pixman_image_get_width (pixman_image_t *image); +int pixman_image_get_height (pixman_image_t *image); +int pixman_image_get_stride (pixman_image_t *image); /* in bytes */ +int pixman_image_get_depth (pixman_image_t *image); +pixman_format_code_t pixman_image_get_format (pixman_image_t *image); + +typedef enum +{ + PIXMAN_KERNEL_IMPULSE, + PIXMAN_KERNEL_BOX, + PIXMAN_KERNEL_LINEAR, + PIXMAN_KERNEL_CUBIC, + PIXMAN_KERNEL_GAUSSIAN, + PIXMAN_KERNEL_LANCZOS2, + PIXMAN_KERNEL_LANCZOS3, + PIXMAN_KERNEL_LANCZOS3_STRETCHED /* Jim Blinn's 'nice' filter */ +} pixman_kernel_t; + +/* Create the parameter list for a SEPARABLE_CONVOLUTION filter + * with the given kernels and scale parameters. + */ +pixman_fixed_t * +pixman_filter_create_separable_convolution (int *n_values, + pixman_fixed_t scale_x, + pixman_fixed_t scale_y, + pixman_kernel_t reconstruct_x, + pixman_kernel_t reconstruct_y, + pixman_kernel_t sample_x, + pixman_kernel_t sample_y, + int subsample_bits_x, + int subsample_bits_y); + +pixman_bool_t pixman_image_fill_rectangles (pixman_op_t op, + pixman_image_t *image, + const pixman_color_t *color, + int n_rects, + const pixman_rectangle16_t *rects); +pixman_bool_t pixman_image_fill_boxes (pixman_op_t op, + pixman_image_t *dest, + const pixman_color_t *color, + int n_boxes, + const pixman_box32_t *boxes); + +/* Composite */ +pixman_bool_t pixman_compute_composite_region (pixman_region16_t *region, + pixman_image_t *src_image, + pixman_image_t *mask_image, + pixman_image_t *dest_image, + int16_t src_x, + int16_t src_y, + int16_t mask_x, + int16_t mask_y, + int16_t dest_x, + int16_t dest_y, + uint16_t width, + uint16_t height); +void pixman_image_composite (pixman_op_t op, + pixman_image_t *src, + pixman_image_t *mask, + pixman_image_t *dest, + int16_t src_x, + int16_t src_y, + int16_t mask_x, + int16_t mask_y, + int16_t dest_x, + int16_t dest_y, + uint16_t width, + uint16_t height); +void pixman_image_composite32 (pixman_op_t op, + pixman_image_t *src, + pixman_image_t *mask, + pixman_image_t *dest, + int32_t src_x, + int32_t src_y, + int32_t mask_x, + int32_t mask_y, + int32_t dest_x, + int32_t dest_y, + int32_t width, + int32_t height); + +/* Executive Summary: This function is a no-op that only exists + * for historical reasons. + * + * There used to be a bug in the X server where it would rely on + * out-of-bounds accesses when it was asked to composite with a + * window as the source. It would create a pixman image pointing + * to some bogus position in memory, but then set a clip region + * to the position where the actual bits were. + * + * Due to a bug in old versions of pixman, where it would not clip + * against the image bounds when a clip region was set, this would + * actually work. So when the pixman bug was fixed, a workaround was + * added to allow certain out-of-bound accesses. This function disabled + * those workarounds. + * + * Since 0.21.2, pixman doesn't do these workarounds anymore, so now this + * function is a no-op. + */ +void pixman_disable_out_of_bounds_workaround (void); + +/* + * Glyphs + */ +typedef struct pixman_glyph_cache_t pixman_glyph_cache_t; +typedef struct +{ + int x, y; + const void *glyph; +} pixman_glyph_t; + +pixman_glyph_cache_t *pixman_glyph_cache_create (void); +void pixman_glyph_cache_destroy (pixman_glyph_cache_t *cache); +void pixman_glyph_cache_freeze (pixman_glyph_cache_t *cache); +void pixman_glyph_cache_thaw (pixman_glyph_cache_t *cache); +const void * pixman_glyph_cache_lookup (pixman_glyph_cache_t *cache, + void *font_key, + void *glyph_key); +const void * pixman_glyph_cache_insert (pixman_glyph_cache_t *cache, + void *font_key, + void *glyph_key, + int origin_x, + int origin_y, + pixman_image_t *glyph_image); +void pixman_glyph_cache_remove (pixman_glyph_cache_t *cache, + void *font_key, + void *glyph_key); +void pixman_glyph_get_extents (pixman_glyph_cache_t *cache, + int n_glyphs, + pixman_glyph_t *glyphs, + pixman_box32_t *extents); +pixman_format_code_t pixman_glyph_get_mask_format (pixman_glyph_cache_t *cache, + int n_glyphs, + const pixman_glyph_t *glyphs); +void pixman_composite_glyphs (pixman_op_t op, + pixman_image_t *src, + pixman_image_t *dest, + pixman_format_code_t mask_format, + int32_t src_x, + int32_t src_y, + int32_t mask_x, + int32_t mask_y, + int32_t dest_x, + int32_t dest_y, + int32_t width, + int32_t height, + pixman_glyph_cache_t *cache, + int n_glyphs, + const pixman_glyph_t *glyphs); +void pixman_composite_glyphs_no_mask (pixman_op_t op, + pixman_image_t *src, + pixman_image_t *dest, + int32_t src_x, + int32_t src_y, + int32_t dest_x, + int32_t dest_y, + pixman_glyph_cache_t *cache, + int n_glyphs, + const pixman_glyph_t *glyphs); + +/* + * Trapezoids + */ +typedef struct pixman_edge pixman_edge_t; +typedef struct pixman_trapezoid pixman_trapezoid_t; +typedef struct pixman_trap pixman_trap_t; +typedef struct pixman_span_fix pixman_span_fix_t; +typedef struct pixman_triangle pixman_triangle_t; + +/* + * An edge structure. This represents a single polygon edge + * and can be quickly stepped across small or large gaps in the + * sample grid + */ +struct pixman_edge +{ + pixman_fixed_t x; + pixman_fixed_t e; + pixman_fixed_t stepx; + pixman_fixed_t signdx; + pixman_fixed_t dy; + pixman_fixed_t dx; + + pixman_fixed_t stepx_small; + pixman_fixed_t stepx_big; + pixman_fixed_t dx_small; + pixman_fixed_t dx_big; +}; + +struct pixman_trapezoid +{ + pixman_fixed_t top, bottom; + pixman_line_fixed_t left, right; +}; + +struct pixman_triangle +{ + pixman_point_fixed_t p1, p2, p3; +}; + +/* whether 't' is a well defined not obviously empty trapezoid */ +#define pixman_trapezoid_valid(t) \ + ((t)->left.p1.y != (t)->left.p2.y && \ + (t)->right.p1.y != (t)->right.p2.y && \ + ((t)->bottom > (t)->top)) + +struct pixman_span_fix +{ + pixman_fixed_t l, r, y; +}; + +struct pixman_trap +{ + pixman_span_fix_t top, bot; +}; + +pixman_fixed_t pixman_sample_ceil_y (pixman_fixed_t y, + int bpp); +pixman_fixed_t pixman_sample_floor_y (pixman_fixed_t y, + int bpp); +void pixman_edge_step (pixman_edge_t *e, + int n); +void pixman_edge_init (pixman_edge_t *e, + int bpp, + pixman_fixed_t y_start, + pixman_fixed_t x_top, + pixman_fixed_t y_top, + pixman_fixed_t x_bot, + pixman_fixed_t y_bot); +void pixman_line_fixed_edge_init (pixman_edge_t *e, + int bpp, + pixman_fixed_t y, + const pixman_line_fixed_t *line, + int x_off, + int y_off); +void pixman_rasterize_edges (pixman_image_t *image, + pixman_edge_t *l, + pixman_edge_t *r, + pixman_fixed_t t, + pixman_fixed_t b); +void pixman_add_traps (pixman_image_t *image, + int16_t x_off, + int16_t y_off, + int ntrap, + const pixman_trap_t *traps); +void pixman_add_trapezoids (pixman_image_t *image, + int16_t x_off, + int y_off, + int ntraps, + const pixman_trapezoid_t *traps); +void pixman_rasterize_trapezoid (pixman_image_t *image, + const pixman_trapezoid_t *trap, + int x_off, + int y_off); +void pixman_composite_trapezoids (pixman_op_t op, + pixman_image_t * src, + pixman_image_t * dst, + pixman_format_code_t mask_format, + int x_src, + int y_src, + int x_dst, + int y_dst, + int n_traps, + const pixman_trapezoid_t * traps); +void pixman_composite_triangles (pixman_op_t op, + pixman_image_t * src, + pixman_image_t * dst, + pixman_format_code_t mask_format, + int x_src, + int y_src, + int x_dst, + int y_dst, + int n_tris, + const pixman_triangle_t * tris); +void pixman_add_triangles (pixman_image_t *image, + int32_t x_off, + int32_t y_off, + int n_tris, + const pixman_triangle_t *tris); + +PIXMAN_END_DECLS + +#endif /* PIXMAN_H__ */ diff --git a/frameworks/cairosvg/dependencies/pixman/0.34.0_1/lib/libpixman-1.0.dylib b/frameworks/cairosvg/dependencies/pixman/0.34.0_1/lib/libpixman-1.0.dylib new file mode 100755 index 00000000..f63523e0 Binary files /dev/null and b/frameworks/cairosvg/dependencies/pixman/0.34.0_1/lib/libpixman-1.0.dylib differ diff --git a/frameworks/cairosvg/dependencies/pixman/0.34.0_1/lib/libpixman-1.dylib b/frameworks/cairosvg/dependencies/pixman/0.34.0_1/lib/libpixman-1.dylib new file mode 120000 index 00000000..f1cfeb63 --- /dev/null +++ b/frameworks/cairosvg/dependencies/pixman/0.34.0_1/lib/libpixman-1.dylib @@ -0,0 +1 @@ +libpixman-1.0.dylib \ No newline at end of file diff --git a/frameworks/cairosvg/rsvg.h b/frameworks/cairosvg/rsvg.h new file mode 100644 index 00000000..fdd7ae5b --- /dev/null +++ b/frameworks/cairosvg/rsvg.h @@ -0,0 +1,20 @@ +// +// rsvg.h +// Speculid +// +// Created by Leo Dion on 10/13/17. +// Copyright © 2017 Bright Digit, LLC. All rights reserved. +// + +#ifndef rsvg_h +#define rsvg_h + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdocumentation" + +#import <librsvg/rsvg.h> + +// turn the warnings back on +#pragma clang diagnostic pop + +#endif /* rsvg_h */ diff --git a/frameworks/speculid/Controllers/AnalyticsSessionManager.swift b/frameworks/speculid/Controllers/AnalyticsSessionManager.swift new file mode 100644 index 00000000..8a415407 --- /dev/null +++ b/frameworks/speculid/Controllers/AnalyticsSessionManager.swift @@ -0,0 +1,58 @@ +// +// AnalyticsSessionManager.swift +// speculid +// +// Created by Leo Dion on 10/17/16. +// +// +import Foundation + +public struct AnalyticsSessionManager: AnalyticsSessionManagerProtocol { + #if DEBUG + public static let defaultBaseUrl = URL(string: "https://www.google-analytics.com/debug/collect")! + #else + public static let defaultBaseUrl = URL(string: "https://www.google-analytics.com/collect")! + #endif + + public let baseUrl: URL + public let timeoutInterval: TimeInterval = 5 + public let session: URLSession + + public static func createSession(withDelegate delegate: URLSessionDelegate? = nil, inQueue queue: OperationQueue? = nil, withUserAgent userAgent: String? = nil) -> URLSession { + let configuration = URLSessionConfiguration.ephemeral + // configuration.httpAdditionalHeaders = + configuration.httpMaximumConnectionsPerHost = 1 + if let userAgent = userAgent { + configuration.httpAdditionalHeaders = ["User-Agent": userAgent] + } + return URLSession(configuration: configuration, delegate: delegate, delegateQueue: queue) + } + + public init(baseUrl: URL? = nil) { + self.baseUrl = baseUrl ?? AnalyticsSessionManager.defaultBaseUrl + session = AnalyticsSessionManager.createSession(withDelegate: nil, inQueue: nil, withUserAgent: nil) + } + + public func send(_ parameters: AnalyticsParameterDictionary) { + let semaphore = DispatchSemaphore(value: 0) + var request = URLRequest(url: baseUrl, cachePolicy: .useProtocolCachePolicy, timeoutInterval: timeoutInterval) + let parameterString = parameters.map { "\($0.key.rawValue)=\(String(describing: $0.value).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!)" }.joined(separator: "&") + + request.httpBody = parameterString.data(using: .utf8) + request.httpMethod = "POST" + + let dataTask = session.dataTask(with: request, completionHandler: { data, _, _ in + if let data = data { + #if DEBUG + if let text = String(data: data, encoding: .utf8) { + debugPrint(text) + } + #endif + } + semaphore.signal() + }) + + dataTask.resume() + semaphore.wait() + } +} diff --git a/frameworks/speculid/Controllers/AnalyticsTracker.swift b/frameworks/speculid/Controllers/AnalyticsTracker.swift new file mode 100644 index 00000000..6ac22565 --- /dev/null +++ b/frameworks/speculid/Controllers/AnalyticsTracker.swift @@ -0,0 +1,72 @@ +import Foundation + +// TODO: Separate Files +public enum AnalyticsHitType: String, CustomStringConvertible { + case timing, event, exception + + public var description: String { + return rawValue + } +} + +public struct AnalyticsEvent: AnalyticsEventProtocol { + public let category: String + public let action: String + public let label: String? + public let value: Int? + + public init(category: String, action: String, label: String? = nil, value: Int? = nil) { + self.category = category + self.action = action + self.label = label + self.value = value + } +} + +public struct AnalyticsTracker: AnalyticsTrackerProtocol { + public func track(error: Error, isFatal: Bool) { + var parameters = configuration.parameters + + parameters[.hitType] = AnalyticsHitType.exception + parameters[.exceptionDescription] = error.localizedDescription + parameters[.exceptionFatal] = isFatal ? 1 : 0 + + sessionManager.send(parameters) + } + + public func track(event: AnalyticsEventProtocol) { + var parameters = configuration.parameters + + parameters[.hitType] = AnalyticsHitType.event + parameters[.eventCategory] = event.category + parameters[.eventAction] = event.action + + if let label = event.label { + parameters[.eventLabel] = label + } + + if let value = event.value { + parameters[.eventValue] = value + } + + sessionManager.send(parameters) + } + + let configuration: AnalyticsConfigurationProtocol + let sessionManager: AnalyticsSessionManagerProtocol + + public func track(time: TimeInterval, withCategory category: String, withVariable variable: String, withLabel label: String?) { + var parameters = configuration.parameters + + parameters[.hitType] = AnalyticsHitType.timing + parameters[.userTimingCategory] = category + parameters[.userTimingVariable] = variable + parameters[.timing] = Int(round(time * 1000.0)) + + if let label = label { + parameters[.userTimingLabel] = label + } + + sessionManager.send(parameters) + } +} diff --git a/frameworks/speculid/Controllers/Application.swift b/frameworks/speculid/Controllers/Application.swift new file mode 100644 index 00000000..9b576c42 --- /dev/null +++ b/frameworks/speculid/Controllers/Application.swift @@ -0,0 +1,180 @@ +import AppKit +import Foundation +import SwiftVer + +extension OperatingSystemVersion { + var fullDescription: String { + return [self.majorVersion, self.minorVersion, self.patchVersion].map { + String(describing: $0) + }.joined(separator: ".") + } +} + +var exceptionHandler: ((NSException) -> Void)? + +func exceptionHandlerMethod(exception: NSException) { + if let handler = exceptionHandler { + handler(exception) + } +} + +public typealias RegularExpressionArgumentSet = (String, options: NSRegularExpression.Options) +open class Application: NSApplication, ApplicationProtocol { + public func document(url: URL) throws -> SpeculidDocumentProtocol { + return try SpeculidDocument(url: url, decoder: jsonDecoder, configuration: configuration) + } + + open static var current: ApplicationProtocol! { + return NSApplication.shared as? ApplicationProtocol + } + + open static let unknownCommandMessagePrefix = "Unknown Command Arguments" + + public static func unknownCommandMessage(fromArguments arguments: [String]) -> String { + return "\(unknownCommandMessagePrefix): \(arguments.joined(separator: " "))" + } + + open static let helpText: String! = { + guard let url = Application.bundle.url(forResource: "help", withExtension: "txt") else { + return nil + } + + guard let text = try? String(contentsOf: url) else { + return nil + } + + return text + }() + open private(set) var commandLineActivity: CommandLineActivityProtocol? + open private(set) var statusItem: NSStatusItem? + open private(set) var service: ServiceProtocol! + open private(set) var regularExpressions: RegularExpressionSetProtocol! + open private(set) var tracker: AnalyticsTrackerProtocol! + open private(set) var configuration: SpeculidConfigurationProtocol! + open private(set) var builder: SpeculidBuilderProtocol! + + open let statusItemProvider: StatusItemProviderProtocol + open let remoteObjectInterfaceProvider: RemoteObjectInterfaceProviderProtocol + open let regularExpressionBuilder: RegularExpressionSetBuilderProtocol + open let configurationBuilder: SpeculidConfigurationBuilderProtocol + open let jsonDecoder: JSONDecoder + open let imageSpecificationBuilder: SpeculidImageSpecificationBuilderProtocol + open var commandLineRunner: CommandLineRunnerProtocol + + public override init() { + statusItemProvider = StatusItemProvider() + remoteObjectInterfaceProvider = RemoteObjectInterfaceProvider() + regularExpressionBuilder = RegularExpressionSetBuilder() + configurationBuilder = SpeculidConfigurationBuilder() + jsonDecoder = JSONDecoder() + imageSpecificationBuilder = SpeculidImageSpecificationBuilder() + commandLineRunner = CommandLineRunner( + outputStream: FileHandle.standardOutput, + errorStream: FileHandle.standardError + ) + + super.init() + } + + public required init?(coder: NSCoder) { + statusItemProvider = StatusItemProvider() + remoteObjectInterfaceProvider = RemoteObjectInterfaceProvider() + regularExpressionBuilder = RegularExpressionSetBuilder() + configurationBuilder = SpeculidConfigurationBuilder(coder: coder) + jsonDecoder = JSONDecoder() + imageSpecificationBuilder = SpeculidImageSpecificationBuilder() + commandLineRunner = CommandLineRunner( + outputStream: FileHandle.standardOutput, + errorStream: FileHandle.standardError + ) + + super.init(coder: coder) + } + + open override func finishLaunching() { + super.finishLaunching() + + configuration = configurationBuilder.configuration(fromCommandLine: CommandLineArgumentProvider()) + + let operatingSystem = ProcessInfo.processInfo.operatingSystemVersion.fullDescription + let applicationVersion: String + if let version = self.version { + applicationVersion = (try? version.fullDescription(withLocale: nil)) ?? "" + } else { + applicationVersion = "" + } + + let analyticsConfiguration = AnalyticsConfiguration( + trackingIdentifier: "UA-33667276-6", + applicationName: "speculid", + applicationVersion: applicationVersion, + customParameters: [.operatingSystemVersion: operatingSystem, .model: Sysctl.model] + ) + + remoteObjectInterfaceProvider.remoteObjectProxyWithHandler { result in + switch result { + case let .error(error): + preconditionFailure("Could not connect to XPS Service: \(error)") + case let .success(service): + self.service = service + } + } + + builder = SpeculidBuilder(tracker: self.tracker, configuration: configuration, imageSpecificationBuilder: imageSpecificationBuilder) + let tracker = AnalyticsTracker(configuration: analyticsConfiguration, sessionManager: AnalyticsSessionManager()) + NSSetUncaughtExceptionHandler(exceptionHandlerMethod) + + exceptionHandler = tracker.track + + tracker.track(event: AnalyticsEvent(category: "main", action: "launch", label: "application")) + + self.tracker = tracker + + do { + regularExpressions = try regularExpressionBuilder.buildRegularExpressions(fromDictionary: [ + .geometry: ("x?(\\d+)", options: [.caseInsensitive]), + .integer: ("\\d+", options: []), + .scale: ("(\\d+)x", options: []), + .size: ("(\\d+\\.?\\d*)x(\\d+\\.?\\d*)", options: []), + .number: ("\\d", options: []) + ]) + } catch let error { + assertionFailure("Failed to parse regular expression: \(error)") + } + + if case let .command(arguments) = configuration.mode { + let commandLineActivity = self.commandLineRunner.activity(withArguments: arguments, self.commandLineActivity(_:hasCompletedWithError:)) + self.commandLineActivity = commandLineActivity + commandLineActivity.start() + return + } + + statusItem = statusItemProvider.statusItem(for: self) + } + + public func commandLineActivity(_: CommandLineActivityProtocol, hasCompletedWithError error: Error?) { + if let error = error { + FileHandle.standardError.write(error.localizedDescription) + exit(1) + } else { + exit(0) + } + } + + public func quit(_ sender: Any?) { + terminate(sender) + } + + public static let bundle = Bundle(for: Application.self) + + public static let vcs = VersionControlInfo(jsonResource: "autorevision", fromBundle: Application.bundle) + + public static let sbd = + Stage.dictionary(fromPlistAtURL: Application.bundle.url(forResource: "versions", withExtension: "plist")!)! + + public let version = Version( + bundle: bundle, + dictionary: sbd, + versionControl: vcs + ) +} diff --git a/frameworks/speculid/Controllers/AsyncBlockOperation.swift b/frameworks/speculid/Controllers/AsyncBlockOperation.swift new file mode 100644 index 00000000..302e54fb --- /dev/null +++ b/frameworks/speculid/Controllers/AsyncBlockOperation.swift @@ -0,0 +1,53 @@ +import Foundation + +open class AsyncBlockOperation: Operation { + typealias Block = (() -> Void) -> Void + + private let block: Block + private var _executing = false + private var _finished = false + + init(block: @escaping Block) { + self.block = block + super.init() + } + + open override func start() { + guard (isExecuting || isCancelled) == false else { return } + _executing = true + block(finish) + } + + private func finish() { + _executing = false + _finished = true + + if let completionBlock = self.completionBlock { + DispatchQueue.main.async(execute: completionBlock) + } + } + + open override var isAsynchronous: Bool { + return true + } + + open override var isExecuting: Bool { + get { return _executing } + set { + let key = "isExecuting" + willChangeValue(forKey: key) + _executing = newValue + didChangeValue(forKey: key) + } + } + + open override var isFinished: Bool { + get { return _finished } + set { + let key = "isFinished" + willChangeValue(forKey: key) + _finished = newValue + didChangeValue(forKey: key) + } + } +} diff --git a/frameworks/speculid/Controllers/CairoConversionSet.swift b/frameworks/speculid/Controllers/CairoConversionSet.swift new file mode 100644 index 00000000..5ce75f7b --- /dev/null +++ b/frameworks/speculid/Controllers/CairoConversionSet.swift @@ -0,0 +1,7 @@ +import CairoSVG +import Foundation + +public struct CairoConversionSet: ImageConversionSetProtocol { + public func run(_: @escaping (Error?) -> Void) { + } +} diff --git a/frameworks/speculid/Controllers/CairoConversionSetBuilder.swift b/frameworks/speculid/Controllers/CairoConversionSetBuilder.swift new file mode 100644 index 00000000..43f54300 --- /dev/null +++ b/frameworks/speculid/Controllers/CairoConversionSetBuilder.swift @@ -0,0 +1,8 @@ +import CairoSVG +import Foundation + +public struct CairoConversionSetBuilder: ImageConversionSetBuilderProtocol { + public func buildConversions(forDocument _: SpeculidDocumentProtocol, withConfiguration _: SpeculidConfigurationProtocol) -> ImageConversionSetProtocol? { + return nil + } +} diff --git a/frameworks/speculid/Controllers/ClientIdentifier.swift b/frameworks/speculid/Controllers/ClientIdentifier.swift new file mode 100644 index 00000000..3e258d9d --- /dev/null +++ b/frameworks/speculid/Controllers/ClientIdentifier.swift @@ -0,0 +1,27 @@ +// +// ClientIdentifier.swift +// speculid +// +// Created by Leo Dion on 10/18/16. +// +// +import Foundation + +public struct ClientIdentifier: ClientIdentifierDelegate { + public static let shared = ClientIdentifier() + public let clientIdentifier: String + + public static func calculateIdentifier() -> String { + guard let clientIdentifier = UserDefaults.standard.string(forKey: "clientIdentifier") else { + let uuid = UUID() + UserDefaults.standard.set(uuid.uuidString, forKey: "clientIdentifier") + return uuid.uuidString + } + + return clientIdentifier + } + + public init() { + clientIdentifier = ClientIdentifier.calculateIdentifier() + } +} diff --git a/frameworks/speculid/Controllers/CommandLineRunner.swift b/frameworks/speculid/Controllers/CommandLineRunner.swift new file mode 100644 index 00000000..d7a70a47 --- /dev/null +++ b/frameworks/speculid/Controllers/CommandLineRunner.swift @@ -0,0 +1,66 @@ +import Foundation + +public struct InvalidDocumentURL: Error { + public let url: URL +} +extension Operation: CommandLineActivityProtocol { +} + +public struct UnknownArgumentsError: Error { + public let arguments: [String] +} +public class CommandLineRunner: CommandLineRunnerProtocol { + public var errorStream: TextOutputStream + public var outputStream: TextOutputStream + private let _versionProvider: VersionProvider? + + public var versionProvider: VersionProvider { + return _versionProvider ?? Application.current + } + public init(outputStream: TextOutputStream, errorStream: TextOutputStream, versionProvider: VersionProvider? = nil) { + self.outputStream = outputStream + self.errorStream = errorStream + _versionProvider = versionProvider + } + + public func activity(withArguments arguments: SpeculidCommandArgumentSet, _ completed: @escaping (CommandLineActivityProtocol, Error?) -> Void) -> CommandLineActivityProtocol { + var error: Error? + let operation = AsyncBlockOperation { completed in + switch arguments { + case .help: + self.outputStream.write(Application.helpText) + return completed() + case let .unknown(arguments): + self.errorStream.write(Application.unknownCommandMessage(fromArguments: arguments)) + self.outputStream.write(Application.helpText) + error = UnknownArgumentsError(arguments: arguments) + return completed() + case .version: + if let version = self.versionProvider.version { + self.outputStream.write(version.developmentDescription) + } else { + self.outputStream.write("\(Application.bundle.infoDictionary?["CFBundleShortVersionString"]) (\(Application.bundle.infoDictionary?["CFBundleVersion"]))") + } + return completed() + case let .process(url): + let tryDocument: SpeculidDocumentProtocol? + do { + tryDocument = try Application.current.document(url: url) + } catch let caughtError { + error = caughtError + return completed() + } + guard let document = tryDocument else { + error = InvalidDocumentURL(url: url) + return completed() + } + error = Application.current.builder.build(document: document) + return completed() + } + } + operation.completionBlock = { + completed(operation, error) + } + return operation + } +} diff --git a/frameworks/speculid/Controllers/ImageConversionBuilder.swift b/frameworks/speculid/Controllers/ImageConversionBuilder.swift new file mode 100644 index 00000000..00857900 --- /dev/null +++ b/frameworks/speculid/Controllers/ImageConversionBuilder.swift @@ -0,0 +1,29 @@ +import Foundation + +public struct ImageConversionBuilder: ImageConversionBuilderProtocol { + public static let defaultBuilders: [ImageConversionBuilderProtocol] = [] + public static let sharedInstance: ImageConversionBuilderProtocol = ImageConversionBuilder() + + public let builders: [ImageConversionBuilderProtocol] + + public func conversion( + forImage imageSpecification: AssetSpecificationProtocol, + withSpecifications specifications: SpeculidSpecificationsFileProtocol, + andConfiguration configuration: SpeculidConfigurationProtocol + ) -> Result<ImageConversionTaskProtocol>? { + for builders in builders { + if let conversion = builders.conversion( + forImage: imageSpecification, + withSpecifications: specifications, + andConfiguration: configuration + ) { + return conversion + } + } + return nil + } + + public init(builders: [ImageConversionBuilderProtocol]? = nil) { + self.builders = builders ?? ImageConversionBuilder.defaultBuilders + } +} diff --git a/frameworks/speculid/Controllers/ImageConversionSetBuilder.swift b/frameworks/speculid/Controllers/ImageConversionSetBuilder.swift new file mode 100644 index 00000000..2690c288 --- /dev/null +++ b/frameworks/speculid/Controllers/ImageConversionSetBuilder.swift @@ -0,0 +1,21 @@ +import Foundation + +public struct ImageConversionSetBuilder: ImageConversionSetBuilderProtocol { + public static let defaultBuilders: [ImageConversionSetBuilderProtocol] = [] + public static let sharedInstance: ImageConversionSetBuilderProtocol = ImageConversionSetBuilder() + + public let builders: [ImageConversionSetBuilderProtocol] + + public func buildConversions(forDocument document: SpeculidDocumentProtocol, withConfiguration configuration: SpeculidConfigurationProtocol) -> ImageConversionSetProtocol? { + for builder in builders { + if let conversionSet = builder.buildConversions(forDocument: document, withConfiguration: configuration) { + return conversionSet + } + } + return nil + } + + public init(builders: [ImageConversionSetBuilderProtocol]? = nil) { + self.builders = builders ?? ImageConversionSetBuilder.defaultBuilders + } +} diff --git a/frameworks/speculid/Controllers/QuitMenuItem.swift b/frameworks/speculid/Controllers/QuitMenuItem.swift new file mode 100644 index 00000000..067ac0f2 --- /dev/null +++ b/frameworks/speculid/Controllers/QuitMenuItem.swift @@ -0,0 +1,17 @@ +import Cocoa + +public class QuitMenuItem: NSMenuItem { + public init() { + super.init(title: "Quit", action: #selector(exit(_:)), keyEquivalent: "") + target = self + } + + public required init(coder decoder: NSCoder) { + super.init(coder: decoder) + } + + @objc public func exit(_ sender: QuitMenuItem) { + precondition(sender == self) + Application.current.quit(self) + } +} diff --git a/frameworks/speculid/Controllers/RegularExpressionSet.swift b/frameworks/speculid/Controllers/RegularExpressionSet.swift new file mode 100644 index 00000000..d4451d09 --- /dev/null +++ b/frameworks/speculid/Controllers/RegularExpressionSet.swift @@ -0,0 +1,9 @@ +import Foundation + +public struct RegularExpressionSet: RegularExpressionSetProtocol { + public func regularExpression(for key: RegularExpressionKey) -> NSRegularExpression! { + return dictionary[key] + } + + public let dictionary: [RegularExpressionKey: NSRegularExpression] +} diff --git a/frameworks/speculid/Controllers/RegularExpressionSetBuilder.swift b/frameworks/speculid/Controllers/RegularExpressionSetBuilder.swift new file mode 100644 index 00000000..26764ac2 --- /dev/null +++ b/frameworks/speculid/Controllers/RegularExpressionSetBuilder.swift @@ -0,0 +1,14 @@ +import Foundation + +public struct RegularExpressionSetBuilder: RegularExpressionSetBuilderProtocol { + public func buildRegularExpressions(fromDictionary dictionary: [RegularExpressionKey: RegularExpressionArgumentSet]) throws -> RegularExpressionSetProtocol { + let values = try dictionary.reduce([RegularExpressionKey: NSRegularExpression]()) { (values, arguments) -> [RegularExpressionKey: NSRegularExpression] in + var values = values + let regularExpression = try NSRegularExpression(pattern: arguments.value.0, options: arguments.value.1) + values[arguments.key] = regularExpression + return values + } + + return RegularExpressionSet(dictionary: values) + } +} diff --git a/frameworks/speculid/Controllers/RemoteObjectInterfaceProvider.swift b/frameworks/speculid/Controllers/RemoteObjectInterfaceProvider.swift new file mode 100644 index 00000000..e6c98e17 --- /dev/null +++ b/frameworks/speculid/Controllers/RemoteObjectInterfaceProvider.swift @@ -0,0 +1,32 @@ +import Foundation + +public struct NoServiceReturnedError: Error { +} + +public struct RemoteObjectInterfaceProvider: RemoteObjectInterfaceProviderProtocol { + public func remoteObjectProxyWithHandler(_ handler: (Result<ServiceProtocol>) -> Void) { + let interface = NSXPCInterface(with: ServiceProtocol.self) + let connection = NSXPCConnection(serviceName: "com.brightdigit.Speculid-Mac-XPC") + + connection.remoteObjectInterface = interface + connection.resume() + + var error: Error? + + let proxy = connection.remoteObjectProxyWithErrorHandler { handlerError in + error = handlerError + } + + let result: Result<ServiceProtocol> + + if let error = error { + result = .error(error) + } else if let service = proxy as? ServiceProtocol { + result = .success(service) + } else { + result = .error(NoServiceReturnedError()) + } + + handler(result) + } +} diff --git a/frameworks/speculid/Controllers/Service.swift b/frameworks/speculid/Controllers/Service.swift new file mode 100644 index 00000000..d67ab1e1 --- /dev/null +++ b/frameworks/speculid/Controllers/Service.swift @@ -0,0 +1,38 @@ +import CairoSVG +import Cocoa + +public final class Service: NSObject, ServiceProtocol { + public func exportImageAtURL(_ url: URL, toSpecifications specifications: [ImageSpecification], _ callback: @escaping ((NSError?) -> Void)) { + let imageFile = ImageFile(url: url, fileFormat: .svg) + let builtImageHandle: ImageHandle? + do { + builtImageHandle = try ImageHandleBuilder.shared.imageHandle(fromFile: imageFile) + } catch let error as NSError { + callback(error) + return + } + + guard let imageHandle = builtImageHandle else { + return + } + + let group = DispatchGroup() + var errors = [NSError]() + + for specs in specifications { + DispatchQueue.main.async { + group.enter() + do { + try CairoInterface.exportImage(imageHandle, withSpecification: specs) + } catch let error as NSError { + errors.append(error) + } + group.leave() + } + } + + group.notify(queue: .main) { + callback(ErrorCollection(errors: errors)) + } + } +} diff --git a/frameworks/speculid/Controllers/SpeculidApplicationModeParser.swift b/frameworks/speculid/Controllers/SpeculidApplicationModeParser.swift new file mode 100644 index 00000000..dea1ef3c --- /dev/null +++ b/frameworks/speculid/Controllers/SpeculidApplicationModeParser.swift @@ -0,0 +1,44 @@ +import Foundation + +public struct SpeculidApplicationModeParser: SpeculidApplicationModeParserProtocol { + public func parseMode(fromCommandLine commandLine: CommandLineArgumentProviderProtocol) -> SpeculidApplicationMode { + var indicies = [Int]() + if commandLine.arguments.first == Bundle.main.executablePath { + indicies.append(commandLine.arguments.startIndex) + } + if let index = commandLine.arguments.index(of: "-NSDocumentRevisionsDebugMode") { + indicies.append(index) + indicies.append(index.advanced(by: 1)) + } + let arguments = indicies.sorted().reversed().reduce(commandLine.arguments) { (arguments, index) -> [String] in + var arguments = arguments + arguments.remove(at: index) + return arguments + } + if arguments.count > 0 { + if arguments.contains("--help") { + return .command(.help) + } else if arguments.contains("--version") { + return .command(.version) + } else if let index = arguments.firstIndex(of: "--process") { + let filePath = arguments[arguments.index(after: index)] + if FileManager.default.fileExists(atPath: filePath) { + return .command(.process(URL(fileURLWithPath: filePath))) + } else { + return .command(.unknown(arguments)) + } + } else { + return .command(.unknown(arguments)) + } + } else { + return .cocoa + } + } +} + +@available(swift, obsoleted: 4.2) +extension Array where Element: Equatable { + func firstIndex(of element: Element) -> Index? { + return index(of: element) + } +} diff --git a/frameworks/speculid/Controllers/SpeculidBuilder.swift b/frameworks/speculid/Controllers/SpeculidBuilder.swift new file mode 100644 index 00000000..8119f5c1 --- /dev/null +++ b/frameworks/speculid/Controllers/SpeculidBuilder.swift @@ -0,0 +1,61 @@ +import Foundation + +// TODO: Separate into Files +public typealias ImageConversionPair = (image: AssetSpecificationProtocol, conversion: Result<ImageConversionTaskProtocol>?) +public typealias ImageConversionDictionary = [String: ImageConversionPair] + +public extension SpeculidDocumentProtocol { + public var sourceImageURL: URL { + return url.deletingLastPathComponent().appendingPathComponent(specificationsFile.sourceImageRelativePath) + } + public func destinationName(forImage image: AssetSpecificationProtocol) -> String { + if let filename = image.filename { + return filename + } else if let scale = image.scale { + if let size = image.size { + return + sourceImageURL.deletingPathExtension().appendingPathExtension("\(size.width.cleanValue)x\(size.height.cleanValue)@\(scale.cleanValue)x~\(image.idiom.rawValue).png").lastPathComponent + } else { + return sourceImageURL.deletingPathExtension().appendingPathExtension("\(scale.cleanValue)x~\(image.idiom.rawValue).png").lastPathComponent + } + } else { + return sourceImageURL.deletingPathExtension().appendingPathExtension("pdf").lastPathComponent + } + } + + public func destinationURL(forImage image: AssetSpecificationProtocol) -> URL { + return url.deletingLastPathComponent().appendingPathComponent(specificationsFile.assetDirectoryRelativePath, isDirectory: true).appendingPathComponent(destinationName(forImage: image)) + } +} + +public struct SpeculidBuilder: SpeculidBuilderProtocol { + public let tracker: AnalyticsTrackerProtocol? + public let configuration: SpeculidConfigurationProtocol + public let imageSpecificationBuilder: SpeculidImageSpecificationBuilderProtocol + + public func build(document: SpeculidDocumentProtocol, callback: @escaping ((Error?) -> Void)) { + let imageSpecifications: [ImageSpecification] + do { + imageSpecifications = try document.asset.images.map { (asset) -> ImageSpecification in + return try self.imageSpecificationBuilder.imageSpecification(forURL: document.destinationURL(forImage: asset), withSpecifications: document.specificationsFile, andAsset: asset) + } + } catch let error { + return callback(error) + } + Application.current.service.exportImageAtURL(document.sourceImageURL, toSpecifications: imageSpecifications, callback) + } +} + +public extension SpeculidBuilderProtocol { + @available(*, deprecated: 2.0.0) + func build(document: SpeculidDocumentProtocol) -> Error? { + var result: Error? + let semaphone = DispatchSemaphore(value: 0) + build(document: document) { error in + result = error + semaphone.signal() + } + semaphone.wait() + return result + } +} diff --git a/frameworks/speculid/Controllers/SpeculidConfigurationBuilder.swift b/frameworks/speculid/Controllers/SpeculidConfigurationBuilder.swift new file mode 100644 index 00000000..7b062806 --- /dev/null +++ b/frameworks/speculid/Controllers/SpeculidConfigurationBuilder.swift @@ -0,0 +1,14 @@ +import Foundation + +public struct SpeculidConfigurationBuilder: SpeculidConfigurationBuilderProtocol { + public let applicationModeParser: SpeculidApplicationModeParserProtocol + + public func configuration(fromCommandLine commandLine: CommandLineArgumentProviderProtocol) -> SpeculidConfigurationProtocol { + let mode = applicationModeParser.parseMode(fromCommandLine: commandLine) + return SpeculidConfiguration(mode: mode) + } + + public init(applicationModeParser: SpeculidApplicationModeParserProtocol? = nil, coder _: NSCoder? = nil) { + self.applicationModeParser = applicationModeParser ?? SpeculidApplicationModeParser() + } +} diff --git a/frameworks/speculid/Controllers/SpeculidImageSpecificationBuilder.swift b/frameworks/speculid/Controllers/SpeculidImageSpecificationBuilder.swift new file mode 100644 index 00000000..3a6149f8 --- /dev/null +++ b/frameworks/speculid/Controllers/SpeculidImageSpecificationBuilder.swift @@ -0,0 +1,47 @@ +import Foundation + +@available(*, deprecated: 2.0.0) +public struct NoGeometrySpecifiedError: Error { + public let asset: AssetSpecificationProtocol + public let specification: SpeculidSpecificationsFileProtocol + + public init(forAsset asset: AssetSpecificationProtocol, withSpecs specification: SpeculidSpecificationsFileProtocol) { + self.asset = asset + self.specification = specification + } +} +public struct SpeculidImageSpecificationBuilder: SpeculidImageSpecificationBuilderProtocol { + public func imageSpecification( + forURL destinationURL: URL, + withSpecifications specifications: SpeculidSpecificationsFileProtocol, + andAsset asset: AssetSpecificationProtocol + ) throws -> ImageSpecification { + let destinationFile = try ImageFile(url: destinationURL) + + let geometryObj: GeometryProtocol? + + if let size = asset.size { + geometryObj = try Geometry(size: size, preferWidth: true).scaling(by: asset.scale) + } else if let specificationsGeomtetry = specifications.geometry { + geometryObj = specificationsGeomtetry.scaling(by: asset.scale) + } else if let scale = asset.scale { + geometryObj = Geometry(value: .scale(scale)) + } else { + geometryObj = nil + } + + let geometry: Geometry? + if let geometryValue = geometryObj?.value { + geometry = Geometry(value: geometryValue) + } else { + geometry = nil + } + + return ImageSpecification( + file: destinationFile, + geometryDimension: geometry, + removeAlphaChannel: specifications.removeAlpha, + backgroundColor: specifications.background + ) + } +} diff --git a/frameworks/speculid/Controllers/StatusItemProvider.swift b/frameworks/speculid/Controllers/StatusItemProvider.swift new file mode 100644 index 00000000..199c7b81 --- /dev/null +++ b/frameworks/speculid/Controllers/StatusItemProvider.swift @@ -0,0 +1,16 @@ +import AppKit +import Foundation + +public struct StatusItemProvider: StatusItemProviderProtocol { + public func statusItem(for _: Any?) -> NSStatusItem { + let menu = NSMenu(title: "Speculid") + let item = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength) + menu.addItem(VersionMenuItem()) + menu.addItem(NSMenuItem.separator()) + menu.addItem(QuitMenuItem()) + item.image = #imageLiteral(resourceName: "TrayIcon") + item.menu = menu + + return item + } +} diff --git a/frameworks/speculid/Controllers/VersionMenuItem.swift b/frameworks/speculid/Controllers/VersionMenuItem.swift new file mode 100644 index 00000000..7bf3e7c8 --- /dev/null +++ b/frameworks/speculid/Controllers/VersionMenuItem.swift @@ -0,0 +1,34 @@ +import Cocoa +import SwiftVer + +extension Version { + public var buildHexidecimal: String { + return String(format: "%05x", build) + } +} + +public class VersionMenuItem: NSMenuItem { + public static func buildNumbers(fromResource resource: String?, withExtension extension: String?) -> Set<Int>? { + if let url = Application.bundle.url(forResource: resource, withExtension: `extension`) { + if let text = try? String(contentsOf: url) { + return Set(text.components(separatedBy: CharacterSet.newlines).flatMap { Int($0) }) + } + } + return nil + } + + public init() { + let title: String + + if let version = Application.current.version, Application.vcs != nil { + title = version.developmentDescription + } else { + title = "\(String(describing: Application.bundle.infoDictionary?["CFBundleShortVersionString"])) (\(String(describing: Application.bundle.infoDictionary?["CFBundleVersion"])))" + } + super.init(title: title, action: nil, keyEquivalent: "") + } + + public required init(coder decoder: NSCoder) { + super.init(coder: decoder) + } +} diff --git a/frameworks/speculid/Errors/ArrayError.swift b/frameworks/speculid/Errors/ArrayError.swift new file mode 100644 index 00000000..9c592e80 --- /dev/null +++ b/frameworks/speculid/Errors/ArrayError.swift @@ -0,0 +1,13 @@ +import Foundation + +public struct ArrayError: Error { + public let errors: [Error] + + public static func error(for errors: [Error]) -> Error? { + if errors.count > 1 { + return ArrayError(errors: errors) + } else { + return errors.first + } + } +} diff --git a/frameworks/speculid/Errors/MissingRequiredInstallationError.swift b/frameworks/speculid/Errors/MissingRequiredInstallationError.swift new file mode 100644 index 00000000..98a98b96 --- /dev/null +++ b/frameworks/speculid/Errors/MissingRequiredInstallationError.swift @@ -0,0 +1,5 @@ +import Foundation + +public struct MissingRequiredInstallationError: Error { + public let name: String +} diff --git a/frameworks/speculid/Errors/ProcessError.swift b/frameworks/speculid/Errors/ProcessError.swift new file mode 100644 index 00000000..d088244b --- /dev/null +++ b/frameworks/speculid/Errors/ProcessError.swift @@ -0,0 +1,14 @@ +import Foundation + +public struct ProcessError: Error, CustomStringConvertible { + public let process: Process + public let message: String + + public var localizedDescription: String { + return message + } + + public var description: String { + return message + } +} diff --git a/frameworks/speculid/Errors/UnknownConversionError.swift b/frameworks/speculid/Errors/UnknownConversionError.swift new file mode 100644 index 00000000..c557aeab --- /dev/null +++ b/frameworks/speculid/Errors/UnknownConversionError.swift @@ -0,0 +1,9 @@ +import Foundation + +public struct UnknownConversionError: Error { + let document: SpeculidDocumentProtocol + + public init(fromDocument document: SpeculidDocumentProtocol) { + self.document = document + } +} diff --git a/frameworks/speculid/Extensions/CGFloat.swift b/frameworks/speculid/Extensions/CGFloat.swift new file mode 100644 index 00000000..2b55c803 --- /dev/null +++ b/frameworks/speculid/Extensions/CGFloat.swift @@ -0,0 +1,7 @@ +import Foundation + +extension CGFloat { + var cleanValue: String { + return truncatingRemainder(dividingBy: 1) == 0 ? String(format: "%.0f", self) : String(describing: self) + } +} diff --git a/frameworks/speculid/Extensions/FileHandle.swift b/frameworks/speculid/Extensions/FileHandle.swift new file mode 100644 index 00000000..efc58f96 --- /dev/null +++ b/frameworks/speculid/Extensions/FileHandle.swift @@ -0,0 +1,8 @@ +import Foundation + +extension FileHandle: TextOutputStream { + public func write(_ string: String) { + guard let data = string.data(using: .utf8) else { return } + write(data) + } +} diff --git a/frameworks/speculid/Extensions/GeometryValue.Multiply.swift b/frameworks/speculid/Extensions/GeometryValue.Multiply.swift new file mode 100644 index 00000000..3455b5e3 --- /dev/null +++ b/frameworks/speculid/Extensions/GeometryValue.Multiply.swift @@ -0,0 +1,14 @@ +import Foundation + +public extension GeometryValue { + public static func * (left: GeometryValue, right: CGFloat) -> GeometryValue { + switch left { + case let .height(value): + return .height(value * right) + case let .width(value): + return .width(value * right) + case let .scale(value): + return .scale(value * right) + } + } +} diff --git a/frameworks/speculid/Extensions/NSColor.swift b/frameworks/speculid/Extensions/NSColor.swift new file mode 100644 index 00000000..d7d48386 --- /dev/null +++ b/frameworks/speculid/Extensions/NSColor.swift @@ -0,0 +1,178 @@ +import AppKit +import CairoSVG +import Foundation +/** + MissingHashMarkAsPrefix: "Invalid RGB string, missing '#' as prefix" + UnableToScanHexValue: "Scan hex error" + MismatchedHexStringLength: "Invalid RGB string, number of characters after '#' should be either 3, 4, 6 or 8" + */ +public enum UIColorInputError: Error { + case missingHashMarkAsPrefix, + unableToScanHexValue, + mismatchedHexStringLength +} + +extension NSColor { + /** + The shorthand three-digit hexadecimal representation of color. + #RGB defines to the color #RRGGBB. + + - parameter hex3: Three-digit hexadecimal value. + - parameter alpha: 0.0 - 1.0. The default is 1.0. + */ + public convenience init(hex3: UInt16, alpha: CGFloat = 1) { + let divisor = CGFloat(15) + let red = CGFloat((hex3 & 0xF00) >> 8) / divisor + let green = CGFloat((hex3 & 0x0F0) >> 4) / divisor + let blue = CGFloat(hex3 & 0x00F) / divisor + self.init(red: red, green: green, blue: blue, alpha: alpha) + } + + /** + The shorthand four-digit hexadecimal representation of color with alpha. + #RGBA defines to the color #RRGGBBAA. + + - parameter hex4: Four-digit hexadecimal value. + */ + public convenience init(hex4: UInt16) { + let divisor = CGFloat(15) + let red = CGFloat((hex4 & 0xF000) >> 12) / divisor + let green = CGFloat((hex4 & 0x0F00) >> 8) / divisor + let blue = CGFloat((hex4 & 0x00F0) >> 4) / divisor + let alpha = CGFloat(hex4 & 0x000F) / divisor + self.init(red: red, green: green, blue: blue, alpha: alpha) + } + + /** + The six-digit hexadecimal representation of color of the form #RRGGBB. + + - parameter hex6: Six-digit hexadecimal value. + */ + public convenience init(hex6: UInt32, alpha: CGFloat = 1) { + let divisor = CGFloat(255) + let red = CGFloat((hex6 & 0xFF0000) >> 16) / divisor + let green = CGFloat((hex6 & 0x00FF00) >> 8) / divisor + let blue = CGFloat(hex6 & 0x0000FF) / divisor + self.init(red: red, green: green, blue: blue, alpha: alpha) + } + + /** + The six-digit hexadecimal representation of color with alpha of the form #RRGGBBAA. + + - parameter hex8: Eight-digit hexadecimal value. + */ + public convenience init(hex8: UInt32) { + let divisor = CGFloat(255) + let red = CGFloat((hex8 & 0xFF00_0000) >> 24) / divisor + let green = CGFloat((hex8 & 0x00FF_0000) >> 16) / divisor + let blue = CGFloat((hex8 & 0x0000_FF00) >> 8) / divisor + let alpha = CGFloat(hex8 & 0x0000_00FF) / divisor + self.init(red: red, green: green, blue: blue, alpha: alpha) + } + + /** + The rgba string representation of color with alpha of the form #RRGGBBAA/#RRGGBB, throws error. + + - parameter rgba: String value. + */ + public convenience init(rgba_throws rgba: String) throws { + guard rgba.hasPrefix("#") else { + throw UIColorInputError.missingHashMarkAsPrefix + } + + let index = rgba.index(rgba.startIndex, offsetBy: 1) + let hexString = rgba[index...] + var hexValue: UInt32 = 0 + + guard Scanner(string: String(hexString)).scanHexInt32(&hexValue) else { + throw UIColorInputError.unableToScanHexValue + } + + switch hexString.characters.count { + case 3: + self.init(hex3: UInt16(hexValue)) + case 4: + self.init(hex4: UInt16(hexValue)) + case 6: + self.init(hex6: hexValue) + case 8: + self.init(hex8: hexValue) + default: + throw UIColorInputError.mismatchedHexStringLength + } + } + + /** + The rgba string representation of color with alpha of the form #RRGGBBAA/#RRGGBB, fails to default color. + + - parameter rgba: String value. + */ + public convenience init?(_ rgba: String, defaultColor: NSColor = NSColor.clear) { + guard let color = try? NSColor(rgba_throws: rgba) else { + self.init(cgColor: defaultColor.cgColor) + return + } + self.init(cgColor: color.cgColor) + } + + /** + Hex string of a UIColor instance. + + - parameter includeAlpha: Whether the alpha should be included. + */ + // swiftlint:disable identifier_name + public func hexString(_ includeAlpha: Bool = true) -> String { + var r: CGFloat = 0 + var g: CGFloat = 0 + var b: CGFloat = 0 + var a: CGFloat = 0 + getRed(&r, green: &g, blue: &b, alpha: &a) + + if includeAlpha { + return String(format: "#%02X%02X%02X%02X", Int(r * 255), Int(g * 255), Int(b * 255), Int(a * 255)) + } else { + return String(format: "#%02X%02X%02X", Int(r * 255), Int(g * 255), Int(b * 255)) + } + } + // swiftlint:enable identifier_name +} + +extension NSColor: CairoColorProtocol { + public var red: Double { + return Double(redComponent) + } + + public var green: Double { + return Double(greenComponent) + } + + public var blue: Double { + return Double(blueComponent) + } +} + +extension String { + /** + Convert argb string to rgba string. + */ + public func argb2rgba() -> String? { + guard hasPrefix("#") else { + return nil + } + + let index = self.index(startIndex, offsetBy: 1) + let hexString = self[index...] + switch hexString.characters.count { + case 4: + return "#" + + hexString.substring(from: characters.index(startIndex, offsetBy: 1)) + + hexString.substring(to: characters.index(startIndex, offsetBy: 1)) + case 8: + return "#" + + hexString.substring(from: characters.index(startIndex, offsetBy: 2)) + + hexString.substring(to: characters.index(startIndex, offsetBy: 2)) + default: + return nil + } + } +} diff --git a/frameworks/speculid/Extensions/String.swift b/frameworks/speculid/Extensions/String.swift new file mode 100644 index 00000000..bc1e8d1b --- /dev/null +++ b/frameworks/speculid/Extensions/String.swift @@ -0,0 +1,17 @@ +import Foundation + +extension String { + public func firstMatchGroups(regex: NSRegularExpression) -> [String]? { + let range = NSRange(0 ..< characters.count) + + guard let result = regex.firstMatch(in: self, options: [], range: range) else { + return nil + } + return (0 ..< result.numberOfRanges).flatMap { (index) -> String? in + guard let range = Range(result.range(at: index), in: self) else { + return nil + } + return String(self[range]) + } + } +} diff --git a/frameworks/speculid/Extensions/Version.swift b/frameworks/speculid/Extensions/Version.swift new file mode 100644 index 00000000..b64df234 --- /dev/null +++ b/frameworks/speculid/Extensions/Version.swift @@ -0,0 +1,15 @@ +import Foundation +import SwiftVer + +public extension Version { + public var developmentDescription: String { + let buildnumbers = VersionMenuItem.buildNumbers(fromResource: "build", withExtension: "list") + let title: String + if buildnumbers?.contains(build) == true { + title = "Speculid v\(self) [\(buildHexidecimal)]" + } else { + title = "Speculid v\(fullDescription) [dev-\(buildHexidecimal)]" + } + return title + } +} diff --git a/frameworks/speculid/Info.plist b/frameworks/speculid/Info.plist new file mode 100644 index 00000000..21f6822c --- /dev/null +++ b/frameworks/speculid/Info.plist @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>$(PRODUCT_NAME)</string> + <key>CFBundlePackageType</key> + <string>FMWK</string> + <key>CFBundleShortVersionString</key> + <string>$(DEFAULT_SEMVER_VERSION)</string> + <key>CFBundleVersion</key> + <string>$(CURRENT_PROJECT_VERSION)</string> + <key>NSHumanReadableCopyright</key> + <string>Copyright © 2017 Bright Digit, LLC. All rights reserved.</string> + <key>NSPrincipalClass</key> + <string></string> +</dict> +</plist> diff --git a/frameworks/speculid/Models/AnalyticsConfiguration.swift b/frameworks/speculid/Models/AnalyticsConfiguration.swift new file mode 100644 index 00000000..f44fd6de --- /dev/null +++ b/frameworks/speculid/Models/AnalyticsConfiguration.swift @@ -0,0 +1,34 @@ +// +// AnalyticsConfiguration.swift +// speculid +// +// Created by Leo Dion on 10/17/16. +// +// +import Foundation + +public struct AnalyticsConfiguration: AnalyticsConfigurationProtocol { + public let version = 1 + public let trackingIdentifier: String + public let clientIdentifier: String + public let applicationName: String + public let applicationVersion: String + public let userLanguage: String? + public let customParameters: AnalyticsParameterDictionary + + public init( + trackingIdentifier: String, + applicationName: String, + applicationVersion: String, + customParameters: AnalyticsParameterDictionary? = nil, + clientIdentifierDelegate: ClientIdentifierDelegate? = nil, + userLanguage: String? = nil + ) { + self.trackingIdentifier = trackingIdentifier + self.applicationVersion = applicationVersion + self.applicationName = applicationName + self.userLanguage = userLanguage ?? Locale.preferredLanguages.first + clientIdentifier = clientIdentifierDelegate?.clientIdentifier ?? ClientIdentifier.shared.clientIdentifier + self.customParameters = customParameters ?? AnalyticsParameterDictionary() + } +} diff --git a/frameworks/speculid/Models/AnalyticsParameterDictionary.swift b/frameworks/speculid/Models/AnalyticsParameterDictionary.swift new file mode 100644 index 00000000..f164091f --- /dev/null +++ b/frameworks/speculid/Models/AnalyticsParameterDictionary.swift @@ -0,0 +1 @@ +public typealias AnalyticsParameterDictionary = [AnalyticsParameterKey: Any] diff --git a/frameworks/speculid/Models/AnalyticsParameterKey.swift b/frameworks/speculid/Models/AnalyticsParameterKey.swift new file mode 100644 index 00000000..7f927c97 --- /dev/null +++ b/frameworks/speculid/Models/AnalyticsParameterKey.swift @@ -0,0 +1,9 @@ +public enum AnalyticsParameterKey: String { + case hitType = "t", version = "v", trackingId = "tid", + userTimingCategory = "utc", userTimingLabel = "utl", timing = "utt", clientId = "cid", + userTimingVariable = "utv", + applicationName = "an", applicationVersion = "av", eventAction = "ea", + eventCategory = "ec", eventLabel = "el", eventValue = "ev", + userLanguage = "ul", operatingSystemVersion = "cd1", model = "cd2", + exceptionDescription = "exd", exceptionFatal = "exf" +} diff --git a/frameworks/speculid/Models/AssetSpecification.swift b/frameworks/speculid/Models/AssetSpecification.swift new file mode 100644 index 00000000..2c6b4789 --- /dev/null +++ b/frameworks/speculid/Models/AssetSpecification.swift @@ -0,0 +1,78 @@ +import Foundation + +public struct AssetSpecification: AssetSpecificationProtocol, Codable { + public let idiom: ImageIdiom + public let scale: CGFloat? + public let size: CGSize? + public let filename: String? + + enum CodingKeys: String, CodingKey { + case idiom + case scale + case size + case filename + } + public init(idiom: ImageIdiom, scale: CGFloat? = nil, size: CGSize? = nil, filename: String? = nil) { + self.idiom = idiom + self.scale = scale + self.size = size + self.filename = filename + } + + public init(specifications: AssetSpecificationProtocol) { + idiom = specifications.idiom + scale = specifications.scale + size = specifications.size + filename = specifications.filename + } + + public init(from decoder: Decoder) throws { + let scaleRegex: NSRegularExpression = Application.current.regularExpressions.regularExpression(for: .scale) + let sizeRegex: NSRegularExpression = Application.current.regularExpressions.regularExpression(for: .size) + + let container = try decoder.container(keyedBy: CodingKeys.self) + + idiom = try container.decode(ImageIdiom.self, forKey: .idiom) + filename = try container.decodeIfPresent(String.self, forKey: .filename) + if let scaleString = try container.decodeIfPresent(String.self, forKey: .scale) { + guard let scaleValueString = scaleString.firstMatchGroups(regex: scaleRegex)?[1], let scale = Double(scaleValueString) else { + throw DecodingError.dataCorruptedError(forKey: .scale, in: container, debugDescription: scaleString) + } + self.scale = CGFloat(scale) + } else { + scale = nil + } + + if let sizeString = try container.decodeIfPresent(String.self, forKey: .size) { + guard let sizeValueStrings = sizeString.firstMatchGroups(regex: sizeRegex), let width = Double(sizeValueStrings[1]), let height = Double(sizeValueStrings[2]) else { + throw DecodingError.dataCorruptedError(forKey: .size, in: container, debugDescription: sizeString) + } + size = CGSize(width: width, height: height) + } else { + size = nil + } + + // + // + // if let scaleString = dictionary["scale"]?.firstMatchGroups(regex: scaleRegex)?[1], let value = Double(scaleString) { + // scale = CGFloat(value) + // } else { + // scale = nil + // } + // + // guard let idiomString = dictionary["idiom"], let idiom = ImageIdiom(rawValue: idiomString) else { + // return nil + // } + // + // + // + // if let dimensionStrings = dictionary["size"]?.firstMatchGroups(regex: sizeRegex), let width = Double(dimensionStrings[1]), let height = Double(dimensionStrings[2]) { + // size = CGSize(width: width, height: height) + // } else { + // size = nil + // } + } + + public func encode(to _: Encoder) throws { + } +} diff --git a/frameworks/speculid/Models/AssetSpecificationDocument.swift b/frameworks/speculid/Models/AssetSpecificationDocument.swift new file mode 100644 index 00000000..7540b0f8 --- /dev/null +++ b/frameworks/speculid/Models/AssetSpecificationDocument.swift @@ -0,0 +1,20 @@ +import Foundation + +public struct AssetSpecificationDocument: AssetSpecificationDocumentProtocol, Codable { + public let images: [AssetSpecificationProtocol] + + public enum CodingKeys: String, CodingKey { + case images + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + let images = try container.decode([AssetSpecification].self, forKey: CodingKeys.images) + self.images = images + } + + public func encode(to encoder: Encoder) throws { + var container = try encoder.container(keyedBy: CodingKeys.self) + try container.encode(images.map(AssetSpecification.init(specifications:)), forKey: .images) + } +} diff --git a/frameworks/speculid/Models/CommandLineArgumentProvider.swift b/frameworks/speculid/Models/CommandLineArgumentProvider.swift new file mode 100644 index 00000000..c6d69bf3 --- /dev/null +++ b/frameworks/speculid/Models/CommandLineArgumentProvider.swift @@ -0,0 +1,13 @@ +import Foundation + +public struct CommandLineArgumentProvider: CommandLineArgumentProviderProtocol { + public let commandLine: CommandLine.Type + + public init(commandLine: CommandLine.Type? = nil) { + self.commandLine = commandLine ?? CommandLine.self + } + + public var arguments: [String] { + return commandLine.arguments + } +} diff --git a/frameworks/speculid/Models/CwlSysctl.swift b/frameworks/speculid/Models/CwlSysctl.swift new file mode 100644 index 00000000..1de4c5ca --- /dev/null +++ b/frameworks/speculid/Models/CwlSysctl.swift @@ -0,0 +1,153 @@ +import Foundation + +// swiftlint:disable all + +/// A "static"-only namespace around a series of functions that operate on buffers returned from the `Darwin.sysctl` function +public struct Sysctl { + /// Possible errors. + public enum Error: Swift.Error { + case unknown + case malformedUTF8 + case invalidSize + case posixError(POSIXErrorCode) + } + + /// Access the raw data for an array of sysctl identifiers. + public static func dataForKeys(_ keys: [Int32]) throws -> [Int8] { + return try keys.withUnsafeBufferPointer { keysPointer throws -> [Int8] in + // Preflight the request to get the required data size + var requiredSize = 0 + let preFlightResult = Darwin.sysctl(UnsafeMutablePointer<Int32>(mutating: keysPointer.baseAddress), UInt32(keys.count), nil, &requiredSize, nil, 0) + if preFlightResult != 0 { + throw POSIXErrorCode(rawValue: errno).map { + print($0.rawValue) + return Error.posixError($0) + } ?? Error.unknown + } + + // Run the actual request with an appropriately sized array buffer + let data = Array<Int8>(repeating: 0, count: requiredSize) + let result = data.withUnsafeBufferPointer { dataBuffer -> Int32 in + return Darwin.sysctl(UnsafeMutablePointer<Int32>(mutating: keysPointer.baseAddress), UInt32(keys.count), UnsafeMutableRawPointer(mutating: dataBuffer.baseAddress), &requiredSize, nil, 0) + } + if result != 0 { + throw POSIXErrorCode(rawValue: errno).map { Error.posixError($0) } ?? Error.unknown + } + + return data + } + } + + /// Convert a sysctl name string like "hw.memsize" to the array of `sysctl` identifiers (e.g. [CTL_HW, HW_MEMSIZE]) + public static func keysForName(_ name: String) throws -> [Int32] { + var keysBufferSize = Int(CTL_MAXNAME) + var keysBuffer = Array<Int32>(repeating: 0, count: keysBufferSize) + try keysBuffer.withUnsafeMutableBufferPointer { (lbp: inout UnsafeMutableBufferPointer<Int32>) throws in + try name.withCString { (nbp: UnsafePointer<Int8>) throws in + guard sysctlnametomib(nbp, lbp.baseAddress, &keysBufferSize) == 0 else { + throw POSIXErrorCode(rawValue: errno).map { Error.posixError($0) } ?? Error.unknown + } + } + } + if keysBuffer.count > keysBufferSize { + keysBuffer.removeSubrange(keysBufferSize ..< keysBuffer.count) + } + return keysBuffer + } + + /// Invoke `sysctl` with an array of identifers, interpreting the returned buffer as the specified type. This function will throw `Error.invalidSize` if the size of buffer returned from `sysctl` fails to match the size of `T`. + public static func valueOfType<T>(_: T.Type, forKeys keys: [Int32]) throws -> T { + let buffer = try dataForKeys(keys) + if buffer.count != MemoryLayout<T>.size { + throw Error.invalidSize + } + return try buffer.withUnsafeBufferPointer { bufferPtr throws -> T in + guard let baseAddress = bufferPtr.baseAddress else { throw Error.unknown } + return baseAddress.withMemoryRebound(to: T.self, capacity: 1) { $0.pointee } + } + } + + /// Invoke `sysctl` with an array of identifers, interpreting the returned buffer as the specified type. This function will throw `Error.invalidSize` if the size of buffer returned from `sysctl` fails to match the size of `T`. + public static func valueOfType<T>(_ type: T.Type, forKeys keys: Int32...) throws -> T { + return try valueOfType(type, forKeys: keys) + } + + /// Invoke `sysctl` with the specified name, interpreting the returned buffer as the specified type. This function will throw `Error.invalidSize` if the size of buffer returned from `sysctl` fails to match the size of `T`. + public static func valueOfType<T>(_ type: T.Type, forName name: String) throws -> T { + return try valueOfType(type, forKeys: keysForName(name)) + } + + /// Invoke `sysctl` with an array of identifers, interpreting the returned buffer as a `String`. This function will throw `Error.malformedUTF8` if the buffer returned from `sysctl` cannot be interpreted as a UTF8 buffer. + public static func stringForKeys(_ keys: [Int32]) throws -> String { + let optionalString = try dataForKeys(keys).withUnsafeBufferPointer { dataPointer -> String? in + dataPointer.baseAddress.flatMap { String(validatingUTF8: $0) } + } + guard let s = optionalString else { + throw Error.malformedUTF8 + } + return s + } + + /// Invoke `sysctl` with an array of identifers, interpreting the returned buffer as a `String`. This function will throw `Error.malformedUTF8` if the buffer returned from `sysctl` cannot be interpreted as a UTF8 buffer. + public static func stringForKeys(_ keys: Int32...) throws -> String { + return try stringForKeys(keys) + } + + /// Invoke `sysctl` with the specified name, interpreting the returned buffer as a `String`. This function will throw `Error.malformedUTF8` if the buffer returned from `sysctl` cannot be interpreted as a UTF8 buffer. + public static func stringForName(_ name: String) throws -> String { + return try stringForKeys(keysForName(name)) + } + + /// e.g. "MyComputer.local" (from System Preferences -> Sharing -> Computer Name) or + /// "My-Name-iPhone" (from Settings -> General -> About -> Name) + public static var hostName: String { return try! Sysctl.stringForKeys([CTL_KERN, KERN_HOSTNAME]) } + + /// e.g. "x86_64" or "N71mAP" + /// NOTE: this is *corrected* on iOS devices to fetch hw.model + public static var machine: String { + #if os(iOS) && !arch(x86_64) && !arch(i386) + return try! Sysctl.stringForKeys([CTL_HW, HW_MODEL]) + #else + return try! Sysctl.stringForKeys([CTL_HW, HW_MACHINE]) + #endif + } + + /// e.g. "MacPro4,1" or "iPhone8,1" + /// NOTE: this is *corrected* on iOS devices to fetch hw.machine + public static var model: String { + #if os(iOS) && !arch(x86_64) && !arch(i386) + return try! Sysctl.stringForKeys([CTL_HW, HW_MACHINE]) + #else + return try! Sysctl.stringForKeys([CTL_HW, HW_MODEL]) + #endif + } + + /// e.g. "8" or "2" + public static var activeCPUs: Int32 { return try! Sysctl.valueOfType(Int32.self, forKeys: [CTL_HW, HW_AVAILCPU]) } + + /// e.g. "15.3.0" or "15.0.0" + public static var osRelease: String { return try! Sysctl.stringForKeys([CTL_KERN, KERN_OSRELEASE]) } + + /// e.g. "Darwin" or "Darwin" + public static var osType: String { return try! Sysctl.stringForKeys([CTL_KERN, KERN_OSTYPE]) } + + /// e.g. "15D21" or "13D20" + public static var osVersion: String { return try! Sysctl.stringForKeys([CTL_KERN, KERN_OSVERSION]) } + + /// e.g. "Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64" or + /// "Darwin Kernel Version 15.0.0: Wed Dec 9 22:19:38 PST 2015; root:xnu-3248.31.3~2/RELEASE_ARM64_S8000" + public static var version: String { return try! Sysctl.stringForKeys([CTL_KERN, KERN_VERSION]) } + + #if os(macOS) + /// e.g. 199506 (not available on iOS) + public static var osRev: Int32 { return try! Sysctl.valueOfType(Int32.self, forKeys: [CTL_KERN, KERN_OSREV]) } + + /// e.g. 2659000000 (not available on iOS) + public static var cpuFreq: Int64 { return try! Sysctl.valueOfType(Int64.self, forName: "hw.cpufrequency") } + + /// e.g. 25769803776 (not available on iOS) + public static var memSize: UInt64 { return try! Sysctl.valueOfType(UInt64.self, forKeys: [CTL_HW, HW_MEMSIZE]) } + #endif +} + +// swiftlint:enable all diff --git a/frameworks/speculid/Models/ErrorCollection.swift b/frameworks/speculid/Models/ErrorCollection.swift new file mode 100644 index 00000000..a6cc09e6 --- /dev/null +++ b/frameworks/speculid/Models/ErrorCollection.swift @@ -0,0 +1,26 @@ +import Cocoa + +public class ErrorCollection: NSError { + public let errors: [NSError] + + public init?(errors: [NSError]) { + guard errors.count > 0 else { + return nil + } + self.errors = errors + super.init(domain: Bundle(for: type(of: self)).bundleIdentifier!, code: 800, userInfo: nil) + } + + public required init?(coder aDecoder: NSCoder) { + guard let errors = aDecoder.decodeObject(forKey: "errors") as? [NSError] else { + return nil + } + self.errors = errors + super.init(coder: aDecoder) + } + + public override func encode(with aCoder: NSCoder) { + super.encode(with: aCoder) + aCoder.encode(errors, forKey: "errors") + } +} diff --git a/frameworks/speculid/Models/FileFormat.swift b/frameworks/speculid/Models/FileFormat.swift new file mode 100644 index 00000000..f8cd5e74 --- /dev/null +++ b/frameworks/speculid/Models/FileFormat.swift @@ -0,0 +1,18 @@ +import CairoSVG +import Cocoa + +public enum FileFormat: UInt { + case png + case svg + case pdf +} + +extension FileFormat { + var imageFileFormat: ImageFileFormat { + switch self { + case .pdf: return ImageFileFormat.pdf + case .png: return ImageFileFormat.png + case .svg: return ImageFileFormat.svg + } + } +} diff --git a/frameworks/speculid/Models/Geometry.swift b/frameworks/speculid/Models/Geometry.swift new file mode 100644 index 00000000..ee787ff9 --- /dev/null +++ b/frameworks/speculid/Models/Geometry.swift @@ -0,0 +1,92 @@ +import CairoSVG +import Foundation + +public struct BadGeometryStringValueError: Error { + public let stringValue: String +} + +public struct BadGeometryCGSizeValueError: Error { + public let size: CGSize +} +extension GeometryValue { + func scaledBy(_ scale: CGFloat) -> GeometryValue { + switch self { + case let .width(value): return .width(value * scale) + case let .height(value): return .height(value * scale) + case let .scale(value): return .scale(CGFloat(scale) * value) + } + } + + public var description: String { + switch self { + case let .width(value): return "\(value)" + case let .height(value): return "x\(value)" + case let .scale(value): return "\(value)x" + } + } + + public init?(string: String) { + if let intValue = Double(string) { + self = .width(CGFloat(intValue)) + } else if let intValue = Double(String(string[string.index(after: string.startIndex)...])), string[string.startIndex] == "x" { + self = .height(CGFloat(intValue)) + } else { + return nil + } + } +} + +extension Geometry { + public init(size: CGSize, preferWidth: Bool? = true) throws { + if preferWidth == nil, size.height != size.width { + throw BadGeometryCGSizeValueError(size: size) + } + + if preferWidth == false { + value = .height(size.height) + } else { + value = .width(size.width) + } + } +} + +public struct Geometry: GeometryProtocol, Codable { + public let value: GeometryValue + public func text(scaledBy scale: CGFloat) -> String { + return value.scaledBy(scale).description + } + + public init(string: String) throws { + guard let value = GeometryValue(string: string) else { + throw BadGeometryStringValueError(stringValue: string) + } + self.value = value + } + + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + let stringValue = try container.decode(String.self) + guard let value = GeometryValue(string: stringValue) else { + throw BadGeometryStringValueError(stringValue: stringValue) + } + self.value = value + } + + public func encode(to encoder: Encoder) throws { + var container = try encoder.singleValueContainer() + try container.encode(value.description) + } + + public init(value: GeometryValue) { + self.value = value + } + + internal init?(dimension: CairoSVG.Dimension, value: CGFloat) { + switch dimension { + case .height: self.value = .height(value) + case .width: self.value = .width(value) + case .scale: self.value = .scale(value) + case .unspecified: return nil + } + } +} diff --git a/frameworks/speculid/Models/GeometryValue.swift b/frameworks/speculid/Models/GeometryValue.swift new file mode 100644 index 00000000..dcd47399 --- /dev/null +++ b/frameworks/speculid/Models/GeometryValue.swift @@ -0,0 +1,8 @@ +import Foundation + +@available(*, deprecated: 2.0.0) +public enum GeometryValue { + case width(CGFloat) + case height(CGFloat) + case scale(CGFloat) +} diff --git a/frameworks/speculid/Models/ImageFile.swift b/frameworks/speculid/Models/ImageFile.swift new file mode 100644 index 00000000..0ed12443 --- /dev/null +++ b/frameworks/speculid/Models/ImageFile.swift @@ -0,0 +1,61 @@ +import CairoSVG +import Cocoa + +public struct UnknownFileFormatError: Error { + public let url: URL + + public init(forURL url: URL) { + self.url = url + } +} + +public class ImageFile: NSObject, ImageFileProtocol, NSSecureCoding { + public static let supportsSecureCoding: Bool = true + + public func encode(with aCoder: NSCoder) { + aCoder.encode(url, forKey: "url") + aCoder.encode(fileFormat.imageFileFormat.rawValue, forKey: "fileFormatValue") + } + + // swiftlint:disable identifier_name + public required init?(coder aDecoder: NSCoder) { + let _url = aDecoder.decodeObject(forKey: "url") as? URL + let _fileFormatValue = aDecoder.decodeObject(forKey: "fileFormatValue") as? UInt + + guard let url = _url, let fileFormatValue = _fileFormatValue, let fileFormat = FileFormat(rawValue: fileFormatValue) else { + return nil + } + + self.url = url + self.fileFormat = fileFormat + } + // swiftlint:enable identifier_name + public let url: URL + public let fileFormat: FileFormat + public init(url: URL, fileFormat: FileFormat) { + self.url = url + self.fileFormat = fileFormat + super.init() + } + + public var format: ImageFileFormat { + return fileFormat.imageFileFormat + } +} + +extension ImageFile { + public convenience init(url: URL) throws { + let pathExtension = url.pathExtension + let fileFormat: FileFormat + if pathExtension.caseInsensitiveCompare("png") == .orderedSame { + fileFormat = .png + } else if pathExtension.caseInsensitiveCompare("svg") == .orderedSame { + fileFormat = .svg + } else if pathExtension.caseInsensitiveCompare("pdf") == .orderedSame { + fileFormat = .pdf + } else { + throw UnknownFileFormatError(forURL: url) + } + self.init(url: url, fileFormat: fileFormat) + } +} diff --git a/frameworks/speculid/Models/ImageIdiom.swift b/frameworks/speculid/Models/ImageIdiom.swift new file mode 100644 index 00000000..a456ca3d --- /dev/null +++ b/frameworks/speculid/Models/ImageIdiom.swift @@ -0,0 +1,13 @@ +import Foundation + +public enum ImageIdiom: String, Codable { + case universal, + iphone, + ipad, + mac, + tv, + watch, + car, + watchMarketing = "watch-marketing", + iosMarketing = "ios-marketing" +} diff --git a/frameworks/speculid/Models/ImageSpecification.swift b/frameworks/speculid/Models/ImageSpecification.swift new file mode 100644 index 00000000..89a1cb03 --- /dev/null +++ b/frameworks/speculid/Models/ImageSpecification.swift @@ -0,0 +1,56 @@ +import CairoSVG +import Cocoa + +@objc open class ImageSpecification: NSObject, ImageSpecificationProtocol, NSSecureCoding { + public static let supportsSecureCoding: Bool = true + + public func encode(with aCoder: NSCoder) { + aCoder.encode(file, forKey: "file") + aCoder.encode(geometry.dimension.rawValue, forKey: "geometryDimensionValue") + aCoder.encode(geometry.value, forKey: "geometryValue") + aCoder.encode(backgroundColor, forKey: "backgroundColor") + aCoder.encode(removeAlphaChannel, forKey: "removeAlphaChannel") + } + + // swiftlint:disable identifier_name + public required init?(coder aDecoder: NSCoder) { + let _file = aDecoder.decodeObject(forKey: "file") as? ImageFileProtocol + let _dimensionValue = aDecoder.decodeObject(forKey: "geometryDimensionValue") as? UInt + let _value = aDecoder.decodeObject(forKey: "geometryValue") as? CGFloat + let backgroundColor = aDecoder.decodeObject(forKey: "backgroundColor") as? CairoColorProtocol + let _removeAlphaChannel = aDecoder.decodeObject(forKey: "removeAlphaChannel") as? Bool + + guard let file = _file, let dimensionValue = _dimensionValue, let value = _value, let removeAlphaChannel = _removeAlphaChannel, let dimension = CairoSVG.Dimension(rawValue: dimensionValue) else { + return nil + } + + self.file = file + geometryDimension = Geometry(dimension: dimension, value: value) + self.backgroundColor = backgroundColor + self.removeAlphaChannel = removeAlphaChannel + } + // swiftlint:enable identifier_name + + public let file: ImageFileProtocol + public let geometryDimension: Geometry? + public let removeAlphaChannel: Bool + public let backgroundColor: CairoColorProtocol? + public init(file: ImageFileProtocol, geometryDimension: Geometry? = nil, removeAlphaChannel: Bool = false, backgroundColor: CairoColorProtocol? = nil) { + self.file = file + self.geometryDimension = geometryDimension + self.removeAlphaChannel = removeAlphaChannel + self.backgroundColor = backgroundColor + super.init() + } + + public var geometry: CairoSVG.GeometryDimension { + guard let geometryDimension = self.geometryDimension else { + return CairoSVG.GeometryDimension(value: 0, dimension: .unspecified) + } + switch geometryDimension.value { + case let .height(value): return CairoSVG.GeometryDimension(value: value, dimension: .height) + case let .width(value): return CairoSVG.GeometryDimension(value: value, dimension: .width) + case let .scale(value): return CairoSVG.GeometryDimension(value: value, dimension: .scale) + } + } +} diff --git a/frameworks/speculid/Models/RegularExpressions.swift b/frameworks/speculid/Models/RegularExpressions.swift new file mode 100644 index 00000000..cff4119f --- /dev/null +++ b/frameworks/speculid/Models/RegularExpressions.swift @@ -0,0 +1,13 @@ +import Foundation + +public enum RegularExpressionKey { +} + +public typealias RegularExpressionParameters = (String, NSRegularExpression.Options) + +public struct RegularExpressions { + public let dictionary: [RegularExpressionKey: NSRegularExpression] + + public init(dictionary _: [RegularExpressionKey: RegularExpressionParameters]) { + } +} diff --git a/frameworks/speculid/Models/Result.swift b/frameworks/speculid/Models/Result.swift new file mode 100644 index 00000000..e5fb341f --- /dev/null +++ b/frameworks/speculid/Models/Result.swift @@ -0,0 +1,6 @@ +import Foundation + +public enum Result<T> { + case error(Error) + case success(T) +} diff --git a/frameworks/speculid/Models/ScaledGeometry.swift b/frameworks/speculid/Models/ScaledGeometry.swift new file mode 100644 index 00000000..7f3c1f08 --- /dev/null +++ b/frameworks/speculid/Models/ScaledGeometry.swift @@ -0,0 +1,14 @@ +import Foundation +public struct ScaledGeometry: GeometryProtocol { + public let base: GeometryProtocol + public let scale: Int + + public init(_ base: GeometryProtocol, byScale scale: Int) { + self.base = base + self.scale = scale + } + + public var value: GeometryValue { + return base.value * CGFloat(scale) + } +} diff --git a/frameworks/speculid/Models/SpeculidApplicationMode.swift b/frameworks/speculid/Models/SpeculidApplicationMode.swift new file mode 100644 index 00000000..70fa11c0 --- /dev/null +++ b/frameworks/speculid/Models/SpeculidApplicationMode.swift @@ -0,0 +1,14 @@ +import Foundation + +public enum SpeculidApplicationMode: Equatable { + public static func == (lhs: SpeculidApplicationMode, rhs: SpeculidApplicationMode) -> Bool { + switch (lhs, rhs) { + case (.cocoa, .cocoa): return true + case let (.command(left), .command(right)): return left == right + default: return false + } + } + + case command(SpeculidCommandArgumentSet) + case cocoa +} diff --git a/frameworks/speculid/Models/SpeculidCommandArgumentSet.swift b/frameworks/speculid/Models/SpeculidCommandArgumentSet.swift new file mode 100644 index 00000000..58c8f8a7 --- /dev/null +++ b/frameworks/speculid/Models/SpeculidCommandArgumentSet.swift @@ -0,0 +1,18 @@ +import Foundation + +public enum SpeculidCommandArgumentSet: Equatable { + public static func == (lhs: SpeculidCommandArgumentSet, rhs: SpeculidCommandArgumentSet) -> Bool { + switch (lhs, rhs) { + case (.help, .help): return true + case (.unknown, .unknown): return true + case (.version, .version): return true + case let (.process(left), .process(right)): return left == right + default: return false + } + } + + case help + case unknown([String]) + case version + case process(URL) +} diff --git a/frameworks/speculid/Models/SpeculidConfiguration.swift b/frameworks/speculid/Models/SpeculidConfiguration.swift new file mode 100644 index 00000000..87a68f73 --- /dev/null +++ b/frameworks/speculid/Models/SpeculidConfiguration.swift @@ -0,0 +1,5 @@ +import Foundation + +public struct SpeculidConfiguration: SpeculidConfigurationProtocol { + public var mode: SpeculidApplicationMode +} diff --git a/frameworks/speculid/Models/SpeculidDocument.swift b/frameworks/speculid/Models/SpeculidDocument.swift new file mode 100644 index 00000000..5659d1d5 --- /dev/null +++ b/frameworks/speculid/Models/SpeculidDocument.swift @@ -0,0 +1,68 @@ +import Foundation + +public struct SpeculidDocument: SpeculidDocumentProtocol { + public let url: URL + public let specificationsFile: SpeculidSpecificationsFileProtocol + public let asset: AssetSpecificationDocumentProtocol + + public init(url: URL, decoder: JSONDecoder, configuration _: SpeculidConfigurationProtocol? = nil) throws { + let specificationsFileData = try Data(contentsOf: url) + let specificationsFile = try decoder.decode(SpeculidSpecificationsFile.self, from: specificationsFileData) + + let contentsJSONURL = url.deletingLastPathComponent().appendingPathComponent(specificationsFile.assetDirectoryRelativePath, isDirectory: true).appendingPathComponent("Contents.json") + + let assetData = try Data(contentsOf: contentsJSONURL) + let asset = try decoder.decode(AssetSpecificationDocument.self, from: assetData) + + self.specificationsFile = specificationsFile + self.asset = asset + self.url = url + // + // guard let specifications = SpeculidSpecifications(url: url) else { + // return nil + // } + // + // guard let contentsJSONData = try? Data(contentsOf: specifications.contentsDirectoryURL.appendingPathComponent("Contents.json")) else { + // return nil + // } + // + // guard let contentsJSON = try? JSONSerialization.jsonObject(with: contentsJSONData, options: []) as? [String: Any] else { + // return nil + // } + // + // guard let images = contentsJSON?["images"] as? [[String: String]] else { + // return nil + // } + // + // self.images = images.flatMap { (dictionary) -> AssetSpecification? in + // let scale: CGFloat? + // let size: CGSize? + // + // let scaleRegex: NSRegularExpression = Application.current.regularExpressions.regularExpression(for: .scale) + // + // if let scaleString = dictionary["scale"]?.firstMatchGroups(regex: scaleRegex)?[1], let value = Double(scaleString) { + // scale = CGFloat(value) + // } else { + // scale = nil + // } + // + // guard let idiomString = dictionary["idiom"], let idiom = ImageIdiom(rawValue: idiomString) else { + // return nil + // } + // + // let sizeRegex: NSRegularExpression = Application.current.regularExpressions.regularExpression(for: .size) + // + // if let dimensionStrings = dictionary["size"]?.firstMatchGroups(regex: sizeRegex), let width = Double(dimensionStrings[1]), let height = Double(dimensionStrings[2]) { + // size = CGSize(width: width, height: height) + // } else { + // size = nil + // } + // + // let filename = dictionary["filename"] + // + // return AssetSpecification(idiom: idiom, scale: scale, size: size, filename: filename) + // } + // + // self.specifications = specifications + } +} diff --git a/frameworks/speculid/Models/SpeculidSpecificationsFile.swift b/frameworks/speculid/Models/SpeculidSpecificationsFile.swift new file mode 100644 index 00000000..2bb32211 --- /dev/null +++ b/frameworks/speculid/Models/SpeculidSpecificationsFile.swift @@ -0,0 +1,108 @@ +import AppKit +import Foundation + +public struct SpeculidSpecificationsFile: SpeculidSpecificationsFileProtocol, Codable { + public let assetDirectoryRelativePath: String + public let sourceImageRelativePath: String + public let geometry: Geometry? + public let background: NSColor? + public let removeAlpha: Bool + + public enum CodingKeys: String, CodingKey { + case assetDirectoryRelativePath = "set" + case sourceImageRelativePath = "source" + case geometry + case background + case removeAlpha = "remove-alpha" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + assetDirectoryRelativePath = try container.decode(String.self, forKey: CodingKeys.assetDirectoryRelativePath) + sourceImageRelativePath = try container.decode(String.self, forKey: CodingKeys.sourceImageRelativePath) + removeAlpha = try container.decodeIfPresent(Bool.self, forKey: CodingKeys.removeAlpha) ?? false + + let geometry: Geometry? + + if let geometryString = try container.decodeIfPresent(String.self, forKey: CodingKeys.geometry) { + geometry = try Geometry(string: geometryString) + } else { + geometry = nil + } + + let background: NSColor? + if let colorString = try container.decodeIfPresent(String.self, forKey: CodingKeys.background) { + background = try NSColor(rgba_throws: colorString) + } else { + background = nil + } + + self.background = background + self.geometry = geometry + } + + public func encode(to encoder: Encoder) throws { + var container = try encoder.container(keyedBy: CodingKeys.self) + + try container.encode(assetDirectoryRelativePath, forKey: CodingKeys.assetDirectoryRelativePath) + try container.encode(sourceImageRelativePath, forKey: CodingKeys.sourceImageRelativePath) + try container.encode(geometry, forKey: CodingKeys.geometry) + try container.encode(removeAlpha, forKey: CodingKeys.removeAlpha) + try container.encode(background?.hexString(), forKey: CodingKeys.background) + } + // + // public init(assetSetRelativePath: String, + // sourceImageRelativePath: URL, + // geometry: Geometry? = nil, + // background: NSColor? = nil, + // removeAlpha: Bool = false) { + // self.contentsDirectoryURL = contentsDirectoryURL + // self.geometry = geometry + // self.sourceImageURL = sourceImageURL + // self.background = background + // self.removeAlpha = removeAlpha + // } + // + // public init?(url: URL) { + // let geometry: Geometry? + // let background: NSColor? + // + // guard let data = try? Data(contentsOf: url) else { + // return nil + // } + // + // guard let json = try? JSONSerialization.jsonObject(with: data, options: []) else { + // return nil + // } + // + // guard let dictionary = json as? [String: Any] else { + // return nil + // } + // + // guard let setRelativePath = dictionary["set"] as? String, let sourceRelativePath = dictionary["source"] as? String else { + // return nil + // } + // + // if let backgroundString = dictionary["background"] as? String { + // background = NSColor(backgroundString) + // } else { + // background = nil + // } + // + // if let geometryString = dictionary["geometry"] as? String { + // geometry = Geometry(string: geometryString) + // } else { + // geometry = nil + // } + // + // let contentsJSONURL = url.deletingLastPathComponent().appendingPathComponent(setRelativePath, isDirectory: true).appendingPathComponent("Contents.json") + // + // let sourceImageURL = url.deletingLastPathComponent().appendingPathComponent(sourceRelativePath) + // + // contentsDirectoryURL = contentsJSONURL.deletingLastPathComponent() + // self.sourceImageURL = sourceImageURL + // self.geometry = geometry + // self.background = background + // removeAlpha = dictionary["remove-alpha"] as? Bool ?? false + // } +} diff --git a/frameworks/speculid/Protocols/AnalyticsConfigurationProtocol.swift b/frameworks/speculid/Protocols/AnalyticsConfigurationProtocol.swift new file mode 100644 index 00000000..a3e75c7d --- /dev/null +++ b/frameworks/speculid/Protocols/AnalyticsConfigurationProtocol.swift @@ -0,0 +1,34 @@ +import Foundation + +public protocol AnalyticsConfigurationProtocol { + var applicationVersion: String { get } + var applicationName: String { get } + var trackingIdentifier: String { get } + var clientIdentifier: String { get } + var version: Int { get } + var userLanguage: String? { get } + var customParameters: AnalyticsParameterDictionary { get } +} + +public extension AnalyticsConfigurationProtocol { + public var parameters: AnalyticsParameterDictionary { + var dictionary = customParameters + + let mainParameters: AnalyticsParameterDictionary = [ + .trackingId: self.trackingIdentifier, + .clientId: self.clientIdentifier, + .version: self.version, + .applicationName: self.applicationName, + .applicationVersion: self.applicationVersion + ] + mainParameters.forEach { + dictionary[$0.0] = $0.1 + } + + if let userLanguage = self.userLanguage { + dictionary[.userLanguage] = userLanguage + } + + return dictionary + } +} diff --git a/frameworks/speculid/Protocols/AnalyticsEventProtocol.swift b/frameworks/speculid/Protocols/AnalyticsEventProtocol.swift new file mode 100644 index 00000000..c679f538 --- /dev/null +++ b/frameworks/speculid/Protocols/AnalyticsEventProtocol.swift @@ -0,0 +1,8 @@ +import Foundation + +public protocol AnalyticsEventProtocol { + var category: String { get } + var action: String { get } + var label: String? { get } + var value: Int? { get } +} diff --git a/frameworks/speculid/Protocols/AnalyticsSessionManagerProtocol.swift b/frameworks/speculid/Protocols/AnalyticsSessionManagerProtocol.swift new file mode 100644 index 00000000..88f83813 --- /dev/null +++ b/frameworks/speculid/Protocols/AnalyticsSessionManagerProtocol.swift @@ -0,0 +1,5 @@ +import Foundation + +public protocol AnalyticsSessionManagerProtocol { + func send(_ parameters: AnalyticsParameterDictionary) +} diff --git a/frameworks/speculid/Protocols/AnalyticsTrackerProtocol.swift b/frameworks/speculid/Protocols/AnalyticsTrackerProtocol.swift new file mode 100644 index 00000000..dddc145e --- /dev/null +++ b/frameworks/speculid/Protocols/AnalyticsTrackerProtocol.swift @@ -0,0 +1,18 @@ +import Foundation + +public protocol AnalyticsTrackerProtocol { + func track(time: TimeInterval, withCategory category: String, withVariable variable: String, withLabel label: String?) + + func track(event: AnalyticsEventProtocol) + + func track(error: Error, isFatal: Bool) +} + +public extension AnalyticsTrackerProtocol { + func track(exception: NSException) { + track(error: exception, isFatal: true) + } +} + +extension NSException: Error { +} diff --git a/frameworks/speculid/Protocols/ApplicationProtocol.swift b/frameworks/speculid/Protocols/ApplicationProtocol.swift new file mode 100644 index 00000000..001b9820 --- /dev/null +++ b/frameworks/speculid/Protocols/ApplicationProtocol.swift @@ -0,0 +1,11 @@ +import Foundation +import SwiftVer + +public protocol ApplicationProtocol: VersionProvider { + func document(url: URL) throws -> SpeculidDocumentProtocol + var builder: SpeculidBuilderProtocol! { get } + var service: ServiceProtocol! { get } + var regularExpressions: RegularExpressionSetProtocol! { get } + var tracker: AnalyticsTrackerProtocol! { get } + func quit(_ sender: Any?) +} diff --git a/frameworks/speculid/Protocols/AssetSpecificationDocumentProtocol.swift b/frameworks/speculid/Protocols/AssetSpecificationDocumentProtocol.swift new file mode 100644 index 00000000..7438236a --- /dev/null +++ b/frameworks/speculid/Protocols/AssetSpecificationDocumentProtocol.swift @@ -0,0 +1,5 @@ +import Foundation + +public protocol AssetSpecificationDocumentProtocol: Codable { + var images: [AssetSpecificationProtocol] { get } +} diff --git a/frameworks/speculid/Protocols/AssetSpecificationProtocol.swift b/frameworks/speculid/Protocols/AssetSpecificationProtocol.swift new file mode 100644 index 00000000..de1f7556 --- /dev/null +++ b/frameworks/speculid/Protocols/AssetSpecificationProtocol.swift @@ -0,0 +1,15 @@ +// +// ImageSpecificationProtocol.swift +// speculid +// +// Created by Leo Dion on 9/26/16. +// +// +import Foundation + +public protocol AssetSpecificationProtocol { + var idiom: ImageIdiom { get } + var scale: CGFloat? { get } + var size: CGSize? { get } + var filename: String? { get } +} diff --git a/frameworks/speculid/Protocols/ClientIdentifierDelegate.swift b/frameworks/speculid/Protocols/ClientIdentifierDelegate.swift new file mode 100644 index 00000000..ae714d1d --- /dev/null +++ b/frameworks/speculid/Protocols/ClientIdentifierDelegate.swift @@ -0,0 +1,5 @@ +import Foundation + +public protocol ClientIdentifierDelegate { + var clientIdentifier: String { get } +} diff --git a/frameworks/speculid/Protocols/CommandLineActivityProtocol.swift b/frameworks/speculid/Protocols/CommandLineActivityProtocol.swift new file mode 100644 index 00000000..ba0bc31b --- /dev/null +++ b/frameworks/speculid/Protocols/CommandLineActivityProtocol.swift @@ -0,0 +1,5 @@ +import Foundation + +public protocol CommandLineActivityProtocol { + func start() +} diff --git a/frameworks/speculid/Protocols/CommandLineArgumentProviderProtocol.swift b/frameworks/speculid/Protocols/CommandLineArgumentProviderProtocol.swift new file mode 100644 index 00000000..ed62a1d9 --- /dev/null +++ b/frameworks/speculid/Protocols/CommandLineArgumentProviderProtocol.swift @@ -0,0 +1,5 @@ +import Foundation + +public protocol CommandLineArgumentProviderProtocol { + var arguments: [String] { get } +} diff --git a/frameworks/speculid/Protocols/CommandLineRunnerProtocol.swift b/frameworks/speculid/Protocols/CommandLineRunnerProtocol.swift new file mode 100644 index 00000000..08a236cf --- /dev/null +++ b/frameworks/speculid/Protocols/CommandLineRunnerProtocol.swift @@ -0,0 +1,5 @@ +import Foundation + +public protocol CommandLineRunnerProtocol { + func activity(withArguments arguments: SpeculidCommandArgumentSet, _ completed: @escaping (CommandLineActivityProtocol, Error?) -> Void) -> CommandLineActivityProtocol +} diff --git a/frameworks/speculid/Protocols/GeometryProtocol.swift b/frameworks/speculid/Protocols/GeometryProtocol.swift new file mode 100644 index 00000000..61dd8dd6 --- /dev/null +++ b/frameworks/speculid/Protocols/GeometryProtocol.swift @@ -0,0 +1,19 @@ +import Foundation + +public protocol GeometryProtocol { + var value: GeometryValue { + get + } +} + +extension GeometryProtocol { + public func scaling(by scale: Int) -> GeometryProtocol { + return ScaledGeometry(self, byScale: scale) + } + public func scaling(by scale: CGFloat?) -> GeometryProtocol { + guard let scale = scale else { + return self + } + return scaling(by: Int(scale)) + } +} diff --git a/frameworks/speculid/Protocols/ImageConversionBuilderProtocol.swift b/frameworks/speculid/Protocols/ImageConversionBuilderProtocol.swift new file mode 100644 index 00000000..8f012fa2 --- /dev/null +++ b/frameworks/speculid/Protocols/ImageConversionBuilderProtocol.swift @@ -0,0 +1,8 @@ +@available(*, deprecated: 2.0.0) +public protocol ImageConversionBuilderProtocol { + func conversion( + forImage imageSpecification: AssetSpecificationProtocol, + withSpecifications specifications: SpeculidSpecificationsFileProtocol, + andConfiguration configuration: SpeculidConfigurationProtocol + ) -> Result<ImageConversionTaskProtocol>? +} diff --git a/frameworks/speculid/Protocols/ImageConversionSetBuilderProtocol.swift b/frameworks/speculid/Protocols/ImageConversionSetBuilderProtocol.swift new file mode 100644 index 00000000..527c437a --- /dev/null +++ b/frameworks/speculid/Protocols/ImageConversionSetBuilderProtocol.swift @@ -0,0 +1,6 @@ +import Foundation + +@available(*, deprecated: 2.0.0) +public protocol ImageConversionSetBuilderProtocol { + func buildConversions(forDocument document: SpeculidDocumentProtocol, withConfiguration configuration: SpeculidConfigurationProtocol) -> ImageConversionSetProtocol? +} diff --git a/frameworks/speculid/Protocols/ImageConversionSetProtocol.swift b/frameworks/speculid/Protocols/ImageConversionSetProtocol.swift new file mode 100644 index 00000000..d4a8a006 --- /dev/null +++ b/frameworks/speculid/Protocols/ImageConversionSetProtocol.swift @@ -0,0 +1,5 @@ +import Foundation +@available(*, deprecated: 2.0.0) +public protocol ImageConversionSetProtocol { + func run(_ callback: @escaping (Error?) -> Void) +} diff --git a/frameworks/speculid/Protocols/ImageConversionTaskProtocol.swift b/frameworks/speculid/Protocols/ImageConversionTaskProtocol.swift new file mode 100644 index 00000000..1948e9bf --- /dev/null +++ b/frameworks/speculid/Protocols/ImageConversionTaskProtocol.swift @@ -0,0 +1,4 @@ +@available(*, deprecated: 2.0.0) +public protocol ImageConversionTaskProtocol { + func start(callback: @escaping (Error?) -> Void) +} diff --git a/frameworks/speculid/Protocols/RegularExpressionSetBuilderProtocol.swift b/frameworks/speculid/Protocols/RegularExpressionSetBuilderProtocol.swift new file mode 100644 index 00000000..c314ceed --- /dev/null +++ b/frameworks/speculid/Protocols/RegularExpressionSetBuilderProtocol.swift @@ -0,0 +1,5 @@ +import Foundation + +public protocol RegularExpressionSetBuilderProtocol { + func buildRegularExpressions(fromDictionary dictionary: [RegularExpressionKey: RegularExpressionArgumentSet]) throws -> RegularExpressionSetProtocol +} diff --git a/frameworks/speculid/Protocols/RegularExpressionSetProtocol.swift b/frameworks/speculid/Protocols/RegularExpressionSetProtocol.swift new file mode 100644 index 00000000..34bf234d --- /dev/null +++ b/frameworks/speculid/Protocols/RegularExpressionSetProtocol.swift @@ -0,0 +1,13 @@ +import Foundation + +public enum RegularExpressionKey: Int { + case geometry + case integer + case scale + case size + case number +} + +public protocol RegularExpressionSetProtocol { + func regularExpression(for key: RegularExpressionKey) -> NSRegularExpression! +} diff --git a/frameworks/speculid/Protocols/RemoteObjectInterfaceProviderProtocol.swift b/frameworks/speculid/Protocols/RemoteObjectInterfaceProviderProtocol.swift new file mode 100644 index 00000000..38639ea2 --- /dev/null +++ b/frameworks/speculid/Protocols/RemoteObjectInterfaceProviderProtocol.swift @@ -0,0 +1,5 @@ +import Foundation + +public protocol RemoteObjectInterfaceProviderProtocol { + func remoteObjectProxyWithHandler(_ handler: (Result<ServiceProtocol>) -> Void) +} diff --git a/frameworks/speculid/Protocols/ServiceProtocol.swift b/frameworks/speculid/Protocols/ServiceProtocol.swift new file mode 100644 index 00000000..d1e5e1bd --- /dev/null +++ b/frameworks/speculid/Protocols/ServiceProtocol.swift @@ -0,0 +1,6 @@ +import Foundation + +@objc +public protocol ServiceProtocol { + func exportImageAtURL(_ url: URL, toSpecifications specifications: [ImageSpecification], _ callback: @escaping ((NSError?) -> Void)) +} diff --git a/frameworks/speculid/Protocols/SpeculidApplicationModeParserProtocol.swift b/frameworks/speculid/Protocols/SpeculidApplicationModeParserProtocol.swift new file mode 100644 index 00000000..c0ed0b04 --- /dev/null +++ b/frameworks/speculid/Protocols/SpeculidApplicationModeParserProtocol.swift @@ -0,0 +1,5 @@ +import Foundation + +public protocol SpeculidApplicationModeParserProtocol { + func parseMode(fromCommandLine commandLine: CommandLineArgumentProviderProtocol) -> SpeculidApplicationMode +} diff --git a/frameworks/speculid/Protocols/SpeculidArgumentsProtocol.swift b/frameworks/speculid/Protocols/SpeculidArgumentsProtocol.swift new file mode 100644 index 00000000..1c3c1b62 --- /dev/null +++ b/frameworks/speculid/Protocols/SpeculidArgumentsProtocol.swift @@ -0,0 +1,4 @@ +import Foundation + +public protocol SpeculidArgumentsProtocol { +} diff --git a/frameworks/speculid/Protocols/SpeculidBuilderProtocol.swift b/frameworks/speculid/Protocols/SpeculidBuilderProtocol.swift new file mode 100644 index 00000000..74112877 --- /dev/null +++ b/frameworks/speculid/Protocols/SpeculidBuilderProtocol.swift @@ -0,0 +1,3 @@ +public protocol SpeculidBuilderProtocol { + func build(document: SpeculidDocumentProtocol, callback: @escaping ((Error?) -> Void)) +} diff --git a/frameworks/speculid/Protocols/SpeculidConfigurationBuilderProtocol.swift b/frameworks/speculid/Protocols/SpeculidConfigurationBuilderProtocol.swift new file mode 100644 index 00000000..7541250c --- /dev/null +++ b/frameworks/speculid/Protocols/SpeculidConfigurationBuilderProtocol.swift @@ -0,0 +1,5 @@ +import Foundation + +public protocol SpeculidConfigurationBuilderProtocol { + func configuration(fromCommandLine commandLine: CommandLineArgumentProviderProtocol) -> SpeculidConfigurationProtocol +} diff --git a/frameworks/speculid/Protocols/SpeculidConfigurationProtocol.swift b/frameworks/speculid/Protocols/SpeculidConfigurationProtocol.swift new file mode 100644 index 00000000..3847619a --- /dev/null +++ b/frameworks/speculid/Protocols/SpeculidConfigurationProtocol.swift @@ -0,0 +1,3 @@ +public protocol SpeculidConfigurationProtocol { + var mode: SpeculidApplicationMode { get } +} diff --git a/frameworks/speculid/Protocols/SpeculidDocumentProtocol.swift b/frameworks/speculid/Protocols/SpeculidDocumentProtocol.swift new file mode 100644 index 00000000..b55a1750 --- /dev/null +++ b/frameworks/speculid/Protocols/SpeculidDocumentProtocol.swift @@ -0,0 +1,7 @@ +import Foundation + +public protocol SpeculidDocumentProtocol { + var url: URL { get } + var specificationsFile: SpeculidSpecificationsFileProtocol { get } + var asset: AssetSpecificationDocumentProtocol { get } +} diff --git a/frameworks/speculid/Protocols/SpeculidImageSpecificationBuilderProtocol.swift b/frameworks/speculid/Protocols/SpeculidImageSpecificationBuilderProtocol.swift new file mode 100644 index 00000000..9171383e --- /dev/null +++ b/frameworks/speculid/Protocols/SpeculidImageSpecificationBuilderProtocol.swift @@ -0,0 +1,9 @@ +import Foundation + +public protocol SpeculidImageSpecificationBuilderProtocol { + func imageSpecification( + forURL destinationURL: URL, + withSpecifications specifications: SpeculidSpecificationsFileProtocol, + andAsset asset: AssetSpecificationProtocol + ) throws -> ImageSpecification +} diff --git a/frameworks/speculid/Protocols/SpeculidSpecificationsFileProtocol.swift b/frameworks/speculid/Protocols/SpeculidSpecificationsFileProtocol.swift new file mode 100644 index 00000000..b9d46f78 --- /dev/null +++ b/frameworks/speculid/Protocols/SpeculidSpecificationsFileProtocol.swift @@ -0,0 +1,10 @@ +import AppKit +import Foundation + +public protocol SpeculidSpecificationsFileProtocol { + var assetDirectoryRelativePath: String { get } + var sourceImageRelativePath: String { get } + var geometry: Geometry? { get } + var background: NSColor? { get } + var removeAlpha: Bool { get } +} diff --git a/frameworks/speculid/Protocols/StatusItemProviderProtocol.swift b/frameworks/speculid/Protocols/StatusItemProviderProtocol.swift new file mode 100644 index 00000000..6f483e31 --- /dev/null +++ b/frameworks/speculid/Protocols/StatusItemProviderProtocol.swift @@ -0,0 +1,6 @@ +import AppKit +import Foundation + +public protocol StatusItemProviderProtocol { + func statusItem(for sender: Any?) -> NSStatusItem +} diff --git a/frameworks/speculid/Protocols/VersionProvider.swift b/frameworks/speculid/Protocols/VersionProvider.swift new file mode 100644 index 00000000..ab1217f5 --- /dev/null +++ b/frameworks/speculid/Protocols/VersionProvider.swift @@ -0,0 +1,6 @@ +import Foundation +import SwiftVer + +public protocol VersionProvider { + var version: Version? { get } +} diff --git a/application/help.txt b/frameworks/speculid/Resources/help.txt similarity index 86% rename from application/help.txt rename to frameworks/speculid/Resources/help.txt index 009e1c68..3047c62c 100644 --- a/application/help.txt +++ b/frameworks/speculid/Resources/help.txt @@ -3,12 +3,12 @@ Build Xcode Image and App Icon Assets from Graphic Files. $ speculid # opens file dialog in macOS $ speculid <file> -$ speculid -h | --help -$ speculid --version +$ speculid -help +$ speculid -version Options: ---help Show this screen. ---version Show version. +-help Show this screen. +-version Show version. The <file> is a `json` file with the image set or app icon path, the graphic file source, and optionally the basic image geometry (width or height). Such as: diff --git a/frameworks/speculid/Speculid_Mac_Framework.h b/frameworks/speculid/Speculid_Mac_Framework.h new file mode 100644 index 00000000..924b5d22 --- /dev/null +++ b/frameworks/speculid/Speculid_Mac_Framework.h @@ -0,0 +1,19 @@ +// +// Speculid_Mac_Framework.h +// Speculid-Mac-Framework +// +// Created by Leo Dion on 10/9/17. +// Copyright © 2017 Bright Digit, LLC. All rights reserved. +// + +#import <Cocoa/Cocoa.h> + +//! Project version number for Speculid_Mac_Framework. +FOUNDATION_EXPORT double SpeculidVersionNumber; + +//! Project version string for Speculid_Mac_Framework. +FOUNDATION_EXPORT const unsigned char SpeculidVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import <Speculid_Mac_Framework/PublicHeader.h> + + diff --git a/frameworks/speculid/build.list b/frameworks/speculid/build.list new file mode 100644 index 00000000..0cfbf088 --- /dev/null +++ b/frameworks/speculid/build.list @@ -0,0 +1 @@ +2 diff --git a/frameworks/speculid/versions.plist b/frameworks/speculid/versions.plist new file mode 100644 index 00000000..0c364e14 --- /dev/null +++ b/frameworks/speculid/versions.plist @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>2.0.0</key> + <dict> + <key>alpha</key> + <integer>2</integer> + </dict> +</dict> +</plist> diff --git a/readme-toc.sh b/readme-toc.sh deleted file mode 100644 index 831c869d..00000000 --- a/readme-toc.sh +++ /dev/null @@ -1 +0,0 @@ -doctoc --maxlevel 3 README.md diff --git a/scripts/build-keychain.sh b/scripts/build-keychain.sh new file mode 100755 index 00000000..a77c263c --- /dev/null +++ b/scripts/build-keychain.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +# build-keychain.sh +# Speculid +# +# Created by Leo Dion on 10/26/17. +# Copyright © 2017 Bright Digit, LLC. All rights reserved. +# Create custom keychain +security create-keychain -p $CUSTOM_KEYCHAIN_PASSWORD macos-build.keychain +# Make the ios-build.keychain default, so xcodebuild will use it +security default-keychain -s macos-build.keychain +# Unlock the keychain +security unlock-keychain -p $CUSTOM_KEYCHAIN_PASSWORD macos-build.keychain +# Set keychain timeout to 1 hour for long builds +# see here +security set-keychain-settings -lut 7200 macos-build.keychain + +#security import ./certs/AppleWWDRCA.cer -k macos-build.keychain -A +#security import ./tmp/certs/mac_app-cert.cer -k macos-build.keychain -A +#security import ./certs/mac_development.cer -k macos-build.keychain -P $CERTIFICATE_PASSWORD -A +security import ./certs/mac_development.p12 -k macos-build.keychain -P $CERTIFICATE_PASSWORD -A +security import ./certs/mac_development.cer -k macos-build.keychain -A +security import ./tmp/certs/developer_id.p12 -k macos-build.keychain -P $CERTIFICATE_PASSWORD -A +security import ./tmp/certs/developer_id.cer -k macos-build.keychain -A +#security import ./tmp/certs/mac_development-key.p12 -k macos-build.keychain -P $SECURITY_PASSWORD -A +#security import ./tmp/certs/mac_development-cert.cer -k macos-build.keychain -A +#security import ./tmp/certs/3rd_party_mac_development-key.p12 -k macos-build.keychain -P $SECURITY_PASSWORD -A +#security import ./tmp/certs/3rd_party_mac_development-cert.cer -k macos-build.keychain -A +# Fix for OS X Sierra that hungs in the codesign step +security set-key-partition-list -S apple-tool:,apple: -s -k $CUSTOM_KEYCHAIN_PASSWORD macos-build.keychain diff --git a/scripts/codesign-framework.sh b/scripts/codesign-framework.sh new file mode 100755 index 00000000..b75284c5 --- /dev/null +++ b/scripts/codesign-framework.sh @@ -0,0 +1,86 @@ +#!/bin/sh + +# WARNING: You may have to run Clean in Xcode after changing CODE_SIGN_IDENTITY! + +# Verify that $CODE_SIGN_IDENTITY is set +if [ -z "${CODE_SIGN_IDENTITY}" ] ; then +echo "CODE_SIGN_IDENTITY needs to be set for framework code-signing!" + +if [ "${CONFIGURATION}" = "Release" ] ; then +exit 1 +else +# Code-signing is optional for non-release builds. +exit 0 +fi +fi + +if [ -z "${CODE_SIGN_ENTITLEMENTS}" ] ; then +echo "CODE_SIGN_ENTITLEMENTS needs to be set for framework code-signing!" + +if [ "${CONFIGURATION}" = "Release" ] ; then +exit 1 +else +# Code-signing is optional for non-release builds. +exit 0 +fi +fi + +ITEMS="" + +FRAMEWORKS_DIR="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +if [ -d "$FRAMEWORKS_DIR" ] ; then +FRAMEWORKS=$(find "${FRAMEWORKS_DIR}" -depth -type d -name "*.framework" -or -name "*.dylib" -or -name "*.bundle") +RESULT=$? +if [[ $RESULT != 0 ]] ; then +exit 1 +fi + +ITEMS="${FRAMEWORKS}" +fi + +LOGINITEMS_DIR="${TARGET_BUILD_DIR}/${CONTENTS_FOLDER_PATH}/Library/LoginItems/" +if [ -d "$LOGINITEMS_DIR" ] ; then +LOGINITEMS=$(find "${LOGINITEMS_DIR}" -depth -type d -name "*.app") +RESULT=$? +if [[ $RESULT != 0 ]] ; then +exit 1 +fi + +ITEMS="${ITEMS}"$'\n'"${LOGINITEMS}" +fi + +# Prefer the expanded name, if available. +CODE_SIGN_IDENTITY_FOR_ITEMS="${EXPANDED_CODE_SIGN_IDENTITY_NAME}" +if [ "${CODE_SIGN_IDENTITY_FOR_ITEMS}" = "" ] ; then +# Fall back to old behavior. +CODE_SIGN_IDENTITY_FOR_ITEMS="${CODE_SIGN_IDENTITY}" +fi + +echo "Identity:" +echo "${CODE_SIGN_IDENTITY_FOR_ITEMS}" + +echo "Entitlements:" +echo "${CODE_SIGN_ENTITLEMENTS}" + +echo "Found:" +echo "${ITEMS}" + +# Change the Internal Field Separator (IFS) so that spaces in paths will not cause problems below. +SAVED_IFS=$IFS +#IFS=$(echo -en "\n\b") + +# Loop through all items. +for ITEM in $ITEMS; +do +echo "Signing '${ITEM}'" +codesign --force --verbose --sign "${CODE_SIGN_IDENTITY_FOR_ITEMS}" --entitlements "${CODE_SIGN_ENTITLEMENTS}" "${ITEM}" +RESULT=$? +if [[ $RESULT != 0 ]] ; then +echo "Failed to sign '${ITEM}'." +IFS=$SAVED_IFS +exit 1 +fi +done + +# Restore $IFS. +IFS=$SAVED_IFS diff --git a/scripts/decrypt-certs.sh b/scripts/decrypt-certs.sh new file mode 100755 index 00000000..c95cffb2 --- /dev/null +++ b/scripts/decrypt-certs.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# decrypt-certs.sh +# Speculid +# +# Created by Leo Dion on 10/26/17. +# Copyright © 2017 Bright Digit, LLC. All rights reserved. +mkdir -p tmp/certs +#openssl aes-256-cbc -k "$SECURITY_PASSWORD" -in certs/mac_app-cert.cer.enc -d -a -out tmp/certs/mac_app-cert.cer +#openssl aes-256-cbc -k "$SECURITY_PASSWORD" -in certs/mac_development-key.p12.enc -d -a -out tmp/certs/mac_development-key.p12 +#openssl aes-256-cbc -k "$SECURITY_PASSWORD" -in certs/mac_development-cert.cer.enc -d -a -out tmp/certs/mac_development-cert.cer +#openssl aes-256-cbc -k "$CERTIFICATE_PASSWORD" -in certs/mac_developer.p12.enc -d -a -out tmp/certs/mac_developer.p12 +#openssl aes-256-cbc -k "$CERTIFICATE_PASSWORD" -in certs/mac_developer.cer.enc -d -a -out tmp/certs/mac_developer.cer +openssl aes-256-cbc -K $encrypted_3e2d534a03f2_key -iv $encrypted_3e2d534a03f2_iv -in certs/mac_development.p12.enc -out certs/mac_development.p12 -d +openssl aes-256-cbc -K $encrypted_3e2d534a03f2_key -iv $encrypted_3e2d534a03f2_iv -in certs/mac_development.cer.enc -out certs/mac_development.cer -d +openssl aes-256-cbc -k "$CERTIFICATE_PASSWORD" -in certs/developer_id.p12.enc -d -a -out tmp/certs/developer_id.p12 +openssl aes-256-cbc -k "$CERTIFICATE_PASSWORD" -in certs/developer_id.cer.enc -d -a -out tmp/certs/developer_id.cer +#openssl aes-256-cbc -k "$SECURITY_PASSWORD" -in certs/3rd_party_mac_development-key.p12.enc -d -a -out tmp/certs/3rd_party_mac_development-key.p12 +#openssl aes-256-cbc -k "$SECURITY_PASSWORD" -in certs/3rd_party_mac_development-cert.cer.enc -d -a -out tmp/certs/3rd_party_mac_development-cert.cer diff --git a/scripts/fix_dylibs.sh b/scripts/fix_dylibs.sh new file mode 100755 index 00000000..9cc8d138 --- /dev/null +++ b/scripts/fix_dylibs.sh @@ -0,0 +1,86 @@ +#!/bin/sh + +LIBS=`otool -L "$1" | grep "/opt\|Cellar" | awk -F' ' '{ print $1 }'` +for lib in $LIBS; do + echo $lib + install_name_tool -id @rpath/`basename $lib` "`dirname $1`/Frameworks/`basename $lib`" + install_name_tool -change $lib @rpath/`basename $lib` "$1" +# dylib="`dirname $1`/Frameworks/`basename $lib`" +# deps=`otool -L "$dylib" | grep "/opt\|Cellar" | awk -F' ' '{ print $1 }'` +# for dependency in $DEPS; do +# echo "Fixing $dependency" +# install_name_tool -id @rpath/`basename $dependency` "$dylib" +# install_name_tool -change $dependency @rpath/`basename $dependency` "$dylib" +# #DEPCOUNT=$((DEPCOUNT+1)) +# done +done + +FRAMEWORKS_FOLDER_PATH="`dirname $1`/Frameworks/" +deps=`ls "$FRAMEWORKS_FOLDER_PATH" | awk -F' ' '{ print $1 }'` +for lib in $deps; do + echo "Fixing $dependency" +# install_name_tool -id @rpath/`basename $dependency` "$dylib" +# install_name_tool -change $dependency @rpath/`basename $dependency` "$dylib" +# #DEPCOUNT=$((DEPCOUNT+1)) +echo $lib + install_name_tool -id @rpath/`basename $lib` "`dirname $1`/Frameworks/`basename $lib`" + install_name_tool -change $lib @rpath/`basename $lib` "$1" + dylib="`dirname $1`/Frameworks/`basename $lib`" + deps=`otool -L "$dylib" | grep "/opt\|Cellar" | awk -F' ' '{ print $1 }'` + for dependency in $deps; do + echo "Fixing $dependency" +#install_name_tool -id @rpath/`basename $dependency` "$dylib" + install_name_tool -change $dependency @rpath/`basename $dependency` "$dylib" +#DEPCOUNT=$((DEPCOUNT+1)) + done +done +## +### fix_dylibs.sh +### speculid +### +### Created by Leo Dion on 11/27/17. +### Copyright © 2017 Bright Digit, LLC. All rights reserved. +## +# +#for (( c=1; c<=10; c++ )) +#do +# echo "Iteration: $c" +# DEPCOUNT=0 +# DYLIBS=`ls "$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH"` +# for dylib in $DYLIBS; do +#otool -L "$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH/$dylib" +# DEPS=`otool -L "$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH/$dylib" | grep "/opt\|Cellar" | awk -F' ' '{ print $1 }'` +# +## for dependency in $DEPS; do +## echo "Installing $dependency" +##install -m 755 $dependency "$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH" +# +## done +# for dependency in $DEPS; do +# echo "Fixing $dependency" +# install_name_tool -id @rpath/`basename $dependency` "$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH/$dylib" +# install_name_tool -change $dependency @rpath/`basename $dependency` "$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH/$dylib" +# DEPCOUNT=$((DEPCOUNT+1)) +# done +# done +# echo "Dependency Count: $DEPCOUNT" +# if [ $DEPCOUNT -eq 0 ]; then exit; fi +#done +# +# +#DEPS=`otool -L "$TARGET" | grep "/opt\|Cellar" | awk -F' ' '{ print $1 }'` +#for dependency in $DEPS; do +# echo "Installing $dependency" +## install -m 755 $dependency "$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH" +# install_name_tool -id @rpath/`basename $dependency` "$BUILT_PRODUCTS_DIR/$FRAMEWORKS_FOLDER_PATH/`basename $dependency`" +# install_name_tool -change $dependency @rpath/`basename $dependency` "$BUILT_PRODUCTS_DIR/$EXECUTABLE_PATH" +# otool -L "$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH/`basename $dependency`" +# BASENAME=`basename $dependency` +## SUBDEPS=`otool -L "$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH/$BASENAME" | grep "/opt\|Cellar" | awk -F' ' '{ print $1 }'` +## for subdependency in $SUBDEPS; do +## echo "Installing `basename $subdependency` for $BASENAME" +## install_name_tool -id @rpath/`basename $subdependency` "$BUILT_PRODUCTS_DIR/$FRAMEWORKS_FOLDER_PATH/`basename $subdependency`" +## install_name_tool -change $dependency @rpath/`basename $subdependency` "$BUILT_PRODUCTS_DIR/$FRAMEWORKS_FOLDER_PATH/$BASENAME" +## done +# +#done diff --git a/scripts/shasum.sh b/scripts/shasum.sh new file mode 100755 index 00000000..691693a7 --- /dev/null +++ b/scripts/shasum.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +speculid_path=${1:-./Build/Products/App/Speculid.app/Contents/MacOS/Speculid} +assets_dir=${2:-examples/Assets/.} + +find $assets_dir -name "*.speculid" -print0 | +while IFS= read -r -d $'\0' line; do + $speculid_path --process "$line" >/dev/null +done +wait +(cd $assets_dir && find . -type f \( -iname \*.icns -o -iname \*.png \) -print0 | sort -z | xargs -0 shasum -a 512 | shasum -a 512) diff --git a/shasum.sh b/shasum.sh deleted file mode 100755 index 16f7c194..00000000 --- a/shasum.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -speculid_path=${1:-./build/Build/Products/Release/Speculid.app/Contents/MacOS/Speculid} -assets_dir=${2:-examples/Assets/.} - -find $assets_dir -name "*.speculid" -print0 | -while IFS= read -r -d $'\0' line; do - $speculid_path "$line" >/dev/null -done -wait -(cd $assets_dir && find . -type f \( -iname \*.icns -o -iname \*.png \) -print0 | sort -z | xargs -0 shasum -a 512 | shasum -a 512) \ No newline at end of file diff --git a/speculid.xcodeproj/project.pbxproj b/speculid.xcodeproj/project.pbxproj deleted file mode 100644 index 6b0cf9d0..00000000 --- a/speculid.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1236 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 3A1ABCFA753C493935FD8F95 /* Pods_Speculid_App_Speculid.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA8C8B36DBAD28741A274EDD /* Pods_Speculid_App_Speculid.framework */; }; - 90A44E85D7852C743AC3ED1B /* Pods_SpeculidTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 386203CFE7D8B9BA4D80ADA4 /* Pods_SpeculidTests.framework */; }; - B30005BC1DB51310000A8166 /* SpeculidConfigurationLoaderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B30005BB1DB51310000A8166 /* SpeculidConfigurationLoaderProtocol.swift */; }; - B30005BE1DB51446000A8166 /* SpeculidConfigurationLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = B30005BD1DB51446000A8166 /* SpeculidConfigurationLoader.swift */; }; - B30005C01DB518B2000A8166 /* ApplicationPathDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = B30005BF1DB518B2000A8166 /* ApplicationPathDataSource.swift */; }; - B30005C31DB52F84000A8166 /* DefaultApplicationPathDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = B30005C21DB52F84000A8166 /* DefaultApplicationPathDataSource.swift */; }; - B30005C51DB52FCD000A8166 /* ConfiguredApplicationPathDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = B30005C41DB52FCD000A8166 /* ConfiguredApplicationPathDataSource.swift */; }; - B310EE401D94BF6D00C4A30E /* Speculid.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B310EE361D94BF6D00C4A30E /* Speculid.framework */; }; - B310EE451D94BF6D00C4A30E /* SpeculidTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B310EE441D94BF6D00C4A30E /* SpeculidTests.swift */; }; - B310EE471D94BF6D00C4A30E /* Speculid.h in Headers */ = {isa = PBXBuildFile; fileRef = B310EE391D94BF6D00C4A30E /* Speculid.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B32AD7C41D98112100B871CE /* SpeculidSpecifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = B32AD7C31D98112100B871CE /* SpeculidSpecifications.swift */; }; - B32AD7C61D982E8D00B871CE /* ProcessImageConversionTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = B32AD7C51D982E8D00B871CE /* ProcessImageConversionTask.swift */; }; - B32AD7C81D982E9F00B871CE /* ImageConversionBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B32AD7C71D982E9F00B871CE /* ImageConversionBuilder.swift */; }; - B32AD7CA1D982F7F00B871CE /* ImageConversionBuilderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B32AD7C91D982F7F00B871CE /* ImageConversionBuilderProtocol.swift */; }; - B32AD7CC1D98307200B871CE /* ImageConversionTaskProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B32AD7CB1D98307200B871CE /* ImageConversionTaskProtocol.swift */; }; - B32AD7CE1D98453E00B871CE /* SpeculidConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = B32AD7CD1D98453E00B871CE /* SpeculidConfiguration.swift */; }; - B33C70371DA6E72D002BC291 /* help.txt in Resources */ = {isa = PBXBuildFile; fileRef = B33C70361DA6E72D002BC291 /* help.txt */; }; - B33D98221DB5A28200CB21C3 /* AnalyticsTrackerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B33D98211DB5A28200CB21C3 /* AnalyticsTrackerProtocol.swift */; }; - B33D98241DB5A74A00CB21C3 /* AnalyticsTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = B33D98231DB5A74A00CB21C3 /* AnalyticsTracker.swift */; }; - B33D98261DB5AEBE00CB21C3 /* AnalyticsConfigurationProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B33D98251DB5AEBE00CB21C3 /* AnalyticsConfigurationProtocol.swift */; }; - B33D98281DB5AED400CB21C3 /* AnalyticsSessionManagerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B33D98271DB5AED400CB21C3 /* AnalyticsSessionManagerProtocol.swift */; }; - B33D982A1DB5B0A700CB21C3 /* AnalyticsConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = B33D98291DB5B0A700CB21C3 /* AnalyticsConfiguration.swift */; }; - B33D982C1DB5B17300CB21C3 /* AnalyticsSessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B33D982B1DB5B17300CB21C3 /* AnalyticsSessionManager.swift */; }; - B34201691D9975DC004C49D6 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34201681D9975DC004C49D6 /* String.swift */; }; - B342016B1D997602004C49D6 /* CGFloat.swift in Sources */ = {isa = PBXBuildFile; fileRef = B342016A1D997602004C49D6 /* CGFloat.swift */; }; - B34201CA1D99A379004C49D6 /* SpeculidDocumentProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34201C91D99A379004C49D6 /* SpeculidDocumentProtocol.swift */; }; - B34201CC1D99A3BD004C49D6 /* SpeculidSpecificationsProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34201CB1D99A3BD004C49D6 /* SpeculidSpecificationsProtocol.swift */; }; - B34201CE1D99A3F5004C49D6 /* ImageSpecificationProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34201CD1D99A3F5004C49D6 /* ImageSpecificationProtocol.swift */; }; - B34201D01D99A5CD004C49D6 /* ImageIdiom.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34201CF1D99A5CD004C49D6 /* ImageIdiom.swift */; }; - B34201D21D99A5EA004C49D6 /* ProcessError.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34201D11D99A5EA004C49D6 /* ProcessError.swift */; }; - B34201D41D99A604004C49D6 /* SVGImageConversionBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34201D31D99A604004C49D6 /* SVGImageConversionBuilder.swift */; }; - B34201D61D99A61B004C49D6 /* PDFConversionBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34201D51D99A61B004C49D6 /* PDFConversionBuilder.swift */; }; - B34201D81D99A62D004C49D6 /* RasterConversionBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34201D71D99A62D004C49D6 /* RasterConversionBuilder.swift */; }; - B34388771DB0061C003CB3BC /* SpeculidApplicationProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34388761DB0061C003CB3BC /* SpeculidApplicationProtocol.swift */; }; - B34388791DB006BE003CB3BC /* SpeculidArgumentsProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34388781DB006BE003CB3BC /* SpeculidArgumentsProtocol.swift */; }; - B343887B1DB035C3003CB3BC /* SpeculidApplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = B343887A1DB035C3003CB3BC /* SpeculidApplication.swift */; }; - B34507841D9E9FD900C80225 /* VCS.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34507831D9E9FD900C80225 /* VCS.swift */; }; - B346F7071DB7A35000CA74C0 /* ApplicationPathDataSourceTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = B346F7061DB7A35000CA74C0 /* ApplicationPathDataSourceTest.swift */; }; - B362A4241D9BFCCB00FF74FC /* Geometry.swift in Sources */ = {isa = PBXBuildFile; fileRef = B362A4231D9BFCCB00FF74FC /* Geometry.swift */; }; - B362A4261D9C0B4000FF74FC /* ScaledGeometry.swift in Sources */ = {isa = PBXBuildFile; fileRef = B362A4251D9C0B4000FF74FC /* ScaledGeometry.swift */; }; - B362A4281D9C0B4C00FF74FC /* GeometryProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B362A4271D9C0B4C00FF74FC /* GeometryProtocol.swift */; }; - B36AD1B81DB6C19D00D33AD7 /* AnalyticsParameterKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = B36AD1B71DB6C19D00D33AD7 /* AnalyticsParameterKey.swift */; }; - B36AD1BA1DB6C1B400D33AD7 /* AnalyticsParameterDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = B36AD1B91DB6C1B400D33AD7 /* AnalyticsParameterDictionary.swift */; }; - B36AD1BC1DB6C1E100D33AD7 /* AnalyticsEventProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B36AD1BB1DB6C1E100D33AD7 /* AnalyticsEventProtocol.swift */; }; - B36AD1BE1DB6C20900D33AD7 /* GeometryValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = B36AD1BD1DB6C20900D33AD7 /* GeometryValue.swift */; }; - B36AD1C01DB6C24600D33AD7 /* ConversionResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = B36AD1BF1DB6C24600D33AD7 /* ConversionResult.swift */; }; - B36AD1C21DB6C3AB00D33AD7 /* ApplicationPathDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = B36AD1C11DB6C3AB00D33AD7 /* ApplicationPathDictionary.swift */; }; - B36AD1C41DB6C3C100D33AD7 /* ApplicationPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = B36AD1C31DB6C3C100D33AD7 /* ApplicationPath.swift */; }; - B36AD1C71DB6E9DF00D33AD7 /* PDFConversionBuilderTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = B36AD1C61DB6E9DF00D33AD7 /* PDFConversionBuilderTest.swift */; }; - B370914C1DFB020E007DD54C /* versions.plist in Resources */ = {isa = PBXBuildFile; fileRef = B370914B1DFB020E007DD54C /* versions.plist */; }; - B37996B91DB7E36C00B8CA3B /* SearchApplicationPathDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = B37996B81DB7E36C00B8CA3B /* SearchApplicationPathDataSource.swift */; }; - B38086001D9AA76E000BC05A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B38085FF1D9AA76E000BC05A /* Assets.xcassets */; }; - B38086091D9AA78E000BC05A /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = B38086081D9AA78E000BC05A /* main.swift */; }; - B380860A1D9AA7B2000BC05A /* Speculid.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B310EE361D94BF6D00C4A30E /* Speculid.framework */; }; - B380860B1D9AA7B2000BC05A /* Speculid.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B310EE361D94BF6D00C4A30E /* Speculid.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - B3880DE41E0AB5180093117D /* NSColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3880DE31E0AB5180093117D /* NSColor.swift */; }; - B38F734D1DA2A928008469FE /* Speculid.swift in Sources */ = {isa = PBXBuildFile; fileRef = B38F734C1DA2A928008469FE /* Speculid.swift */; }; - B3951DA11DA4319B00A6FCF2 /* ProcessProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3951DA01DA4319B00A6FCF2 /* ProcessProtocol.swift */; }; - B3951DA41DA4334A00A6FCF2 /* ProcessImageConversionTaskTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3951DA31DA4334A00A6FCF2 /* ProcessImageConversionTaskTests.swift */; }; - B3951DA61DA4395600A6FCF2 /* ImageConversionBuilderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3951DA51DA4395600A6FCF2 /* ImageConversionBuilderTests.swift */; }; - B39970121DB817550026FEA3 /* terminal.scpt in Resources */ = {isa = PBXBuildFile; fileRef = B39970111DB817550026FEA3 /* terminal.scpt */; }; - B3B746FE1D974C4A0044809F /* SpeculidDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B746FD1D974C4A0044809F /* SpeculidDocument.swift */; }; - B3B747001D9751080044809F /* ImageSpecification.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B746FF1D9751080044809F /* ImageSpecification.swift */; }; - B3DC29A41D9AAC4E00646E86 /* ArrayError.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3DC29A31D9AAC4E00646E86 /* ArrayError.swift */; }; - B3DC29A81D9AAE1D00646E86 /* MissingRequiredInstallationError.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3DC29A71D9AAE1D00646E86 /* MissingRequiredInstallationError.swift */; }; - B3EDA6601D985ACA00F4E77F /* SpeculidConfigurationProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3EDA65F1D985ACA00F4E77F /* SpeculidConfigurationProtocol.swift */; }; - B3EDA6621D98A13F00F4E77F /* SpeculidBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3EDA6611D98A13F00F4E77F /* SpeculidBuilder.swift */; }; - B3EDA6641D98A16A00F4E77F /* SpeculidBuilderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3EDA6631D98A16A00F4E77F /* SpeculidBuilderProtocol.swift */; }; - B3EE812D1DB6624A00F0D9A7 /* ClientIdentifierDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3EE812C1DB6624A00F0D9A7 /* ClientIdentifierDelegate.swift */; }; - B3EE812F1DB6626900F0D9A7 /* ClientIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3EE812E1DB6626900F0D9A7 /* ClientIdentifier.swift */; }; - FA2CD792E10A6102D66AEB00 /* Pods_Speculid_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 769F32ABB131CDEE204D90AC /* Pods_Speculid_App.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - B310EE411D94BF6D00C4A30E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = B310EE2B1D94BF5000C4A30E /* Project object */; - proxyType = 1; - remoteGlobalIDString = B310EE351D94BF6D00C4A30E; - remoteInfo = Speculid; - }; - B380860C1D9AA7B2000BC05A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = B310EE2B1D94BF5000C4A30E /* Project object */; - proxyType = 1; - remoteGlobalIDString = B310EE351D94BF6D00C4A30E; - remoteInfo = Speculid; - }; - B38F734E1DA2AA2B008469FE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = B310EE2B1D94BF5000C4A30E /* Project object */; - proxyType = 1; - remoteGlobalIDString = B38085F81D9AA76E000BC05A; - remoteInfo = "Speculid-App"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - B380860E1D9AA7B2000BC05A /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - B380860B1D9AA7B2000BC05A /* Speculid.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 16C110D021B16DF74774248F /* Pods-Speculid-App-Speculid.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Speculid-App-Speculid.release.xcconfig"; path = "Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid.release.xcconfig"; sourceTree = "<group>"; }; - 1F3FED6FBB20B152C826989D /* Pods-Speculid-App-Speculid.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Speculid-App-Speculid.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid.debug.xcconfig"; sourceTree = "<group>"; }; - 2DB7226F66B034963BD7F05D /* Pods-SpeculidTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SpeculidTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests.debug.xcconfig"; sourceTree = "<group>"; }; - 386203CFE7D8B9BA4D80ADA4 /* Pods_SpeculidTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SpeculidTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 3B8747C1F338E0ADE9DFD69B /* Pods-SpeculidTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SpeculidTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests.release.xcconfig"; sourceTree = "<group>"; }; - 407E8C50424541751746E1EB /* Pods-Speculid-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Speculid-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App.debug.xcconfig"; sourceTree = "<group>"; }; - 4931B3201EAC0FD92C614AF8 /* Pods-Speculid-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Speculid-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App.release.xcconfig"; sourceTree = "<group>"; }; - 769F32ABB131CDEE204D90AC /* Pods_Speculid_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Speculid_App.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - B30005BB1DB51310000A8166 /* SpeculidConfigurationLoaderProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeculidConfigurationLoaderProtocol.swift; sourceTree = "<group>"; }; - B30005BD1DB51446000A8166 /* SpeculidConfigurationLoader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeculidConfigurationLoader.swift; sourceTree = "<group>"; }; - B30005BF1DB518B2000A8166 /* ApplicationPathDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ApplicationPathDataSource.swift; sourceTree = "<group>"; }; - B30005C21DB52F84000A8166 /* DefaultApplicationPathDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DefaultApplicationPathDataSource.swift; sourceTree = "<group>"; }; - B30005C41DB52FCD000A8166 /* ConfiguredApplicationPathDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConfiguredApplicationPathDataSource.swift; sourceTree = "<group>"; }; - B310EE361D94BF6D00C4A30E /* Speculid.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Speculid.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - B310EE391D94BF6D00C4A30E /* Speculid.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Speculid.h; path = ../framework/Speculid.h; sourceTree = "<group>"; }; - B310EE3A1D94BF6D00C4A30E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = ../framework/Info.plist; sourceTree = "<group>"; }; - B310EE3F1D94BF6D00C4A30E /* SpeculidTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SpeculidTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - B310EE441D94BF6D00C4A30E /* SpeculidTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpeculidTests.swift; sourceTree = "<group>"; }; - B310EE461D94BF6D00C4A30E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; - B32AD7C31D98112100B871CE /* SpeculidSpecifications.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = SpeculidSpecifications.swift; sourceTree = "<group>"; }; - B32AD7C51D982E8D00B871CE /* ProcessImageConversionTask.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProcessImageConversionTask.swift; sourceTree = "<group>"; }; - B32AD7C71D982E9F00B871CE /* ImageConversionBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageConversionBuilder.swift; sourceTree = "<group>"; }; - B32AD7C91D982F7F00B871CE /* ImageConversionBuilderProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = ImageConversionBuilderProtocol.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; - B32AD7CB1D98307200B871CE /* ImageConversionTaskProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageConversionTaskProtocol.swift; sourceTree = "<group>"; }; - B32AD7CD1D98453E00B871CE /* SpeculidConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = SpeculidConfiguration.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; - B33C70361DA6E72D002BC291 /* help.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = help.txt; sourceTree = "<group>"; }; - B33D98211DB5A28200CB21C3 /* AnalyticsTrackerProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsTrackerProtocol.swift; sourceTree = "<group>"; }; - B33D98231DB5A74A00CB21C3 /* AnalyticsTracker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsTracker.swift; sourceTree = "<group>"; }; - B33D98251DB5AEBE00CB21C3 /* AnalyticsConfigurationProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsConfigurationProtocol.swift; sourceTree = "<group>"; }; - B33D98271DB5AED400CB21C3 /* AnalyticsSessionManagerProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsSessionManagerProtocol.swift; sourceTree = "<group>"; }; - B33D98291DB5B0A700CB21C3 /* AnalyticsConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsConfiguration.swift; sourceTree = "<group>"; }; - B33D982B1DB5B17300CB21C3 /* AnalyticsSessionManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsSessionManager.swift; sourceTree = "<group>"; }; - B34201681D9975DC004C49D6 /* String.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = "<group>"; }; - B342016A1D997602004C49D6 /* CGFloat.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CGFloat.swift; sourceTree = "<group>"; }; - B34201C91D99A379004C49D6 /* SpeculidDocumentProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeculidDocumentProtocol.swift; sourceTree = "<group>"; }; - B34201CB1D99A3BD004C49D6 /* SpeculidSpecificationsProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeculidSpecificationsProtocol.swift; sourceTree = "<group>"; }; - B34201CD1D99A3F5004C49D6 /* ImageSpecificationProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageSpecificationProtocol.swift; sourceTree = "<group>"; }; - B34201CF1D99A5CD004C49D6 /* ImageIdiom.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageIdiom.swift; sourceTree = "<group>"; }; - B34201D11D99A5EA004C49D6 /* ProcessError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProcessError.swift; sourceTree = "<group>"; }; - B34201D31D99A604004C49D6 /* SVGImageConversionBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SVGImageConversionBuilder.swift; sourceTree = "<group>"; }; - B34201D51D99A61B004C49D6 /* PDFConversionBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PDFConversionBuilder.swift; sourceTree = "<group>"; }; - B34201D71D99A62D004C49D6 /* RasterConversionBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RasterConversionBuilder.swift; sourceTree = "<group>"; }; - B34388761DB0061C003CB3BC /* SpeculidApplicationProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeculidApplicationProtocol.swift; sourceTree = "<group>"; }; - B34388781DB006BE003CB3BC /* SpeculidArgumentsProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeculidArgumentsProtocol.swift; sourceTree = "<group>"; }; - B343887A1DB035C3003CB3BC /* SpeculidApplication.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeculidApplication.swift; sourceTree = "<group>"; }; - B34507831D9E9FD900C80225 /* VCS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = VCS.swift; path = ../framework/VCS.swift; sourceTree = "<group>"; }; - B346F7061DB7A35000CA74C0 /* ApplicationPathDataSourceTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ApplicationPathDataSourceTest.swift; sourceTree = "<group>"; }; - B362A4231D9BFCCB00FF74FC /* Geometry.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Geometry.swift; sourceTree = "<group>"; }; - B362A4251D9C0B4000FF74FC /* ScaledGeometry.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScaledGeometry.swift; sourceTree = "<group>"; }; - B362A4271D9C0B4C00FF74FC /* GeometryProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeometryProtocol.swift; sourceTree = "<group>"; }; - B36AD1B71DB6C19D00D33AD7 /* AnalyticsParameterKey.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsParameterKey.swift; sourceTree = "<group>"; }; - B36AD1B91DB6C1B400D33AD7 /* AnalyticsParameterDictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsParameterDictionary.swift; sourceTree = "<group>"; }; - B36AD1BB1DB6C1E100D33AD7 /* AnalyticsEventProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsEventProtocol.swift; sourceTree = "<group>"; }; - B36AD1BD1DB6C20900D33AD7 /* GeometryValue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeometryValue.swift; sourceTree = "<group>"; }; - B36AD1BF1DB6C24600D33AD7 /* ConversionResult.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConversionResult.swift; sourceTree = "<group>"; }; - B36AD1C11DB6C3AB00D33AD7 /* ApplicationPathDictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ApplicationPathDictionary.swift; sourceTree = "<group>"; }; - B36AD1C31DB6C3C100D33AD7 /* ApplicationPath.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ApplicationPath.swift; sourceTree = "<group>"; }; - B36AD1C61DB6E9DF00D33AD7 /* PDFConversionBuilderTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PDFConversionBuilderTest.swift; path = Builders/PDFConversionBuilderTest.swift; sourceTree = "<group>"; }; - B370914B1DFB020E007DD54C /* versions.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = versions.plist; sourceTree = "<group>"; }; - B37996B81DB7E36C00B8CA3B /* SearchApplicationPathDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchApplicationPathDataSource.swift; sourceTree = "<group>"; }; - B38085F91D9AA76E000BC05A /* Speculid.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Speculid.app; sourceTree = BUILT_PRODUCTS_DIR; }; - B38085FF1D9AA76E000BC05A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; - B38086041D9AA76E000BC05A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; - B38086081D9AA78E000BC05A /* main.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = main.swift; path = ../application/main.swift; sourceTree = "<group>"; }; - B3880DE31E0AB5180093117D /* NSColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSColor.swift; sourceTree = "<group>"; }; - B38F734C1DA2A928008469FE /* Speculid.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Speculid.swift; sourceTree = "<group>"; }; - B3951DA01DA4319B00A6FCF2 /* ProcessProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProcessProtocol.swift; sourceTree = "<group>"; }; - B3951DA31DA4334A00A6FCF2 /* ProcessImageConversionTaskTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProcessImageConversionTaskTests.swift; sourceTree = "<group>"; }; - B3951DA51DA4395600A6FCF2 /* ImageConversionBuilderTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageConversionBuilderTests.swift; sourceTree = "<group>"; }; - B39970111DB817550026FEA3 /* terminal.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = terminal.scpt; sourceTree = "<group>"; }; - B3B746FD1D974C4A0044809F /* SpeculidDocument.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = SpeculidDocument.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; - B3B746FF1D9751080044809F /* ImageSpecification.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageSpecification.swift; sourceTree = "<group>"; }; - B3DC29A31D9AAC4E00646E86 /* ArrayError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ArrayError.swift; sourceTree = "<group>"; }; - B3DC29A71D9AAE1D00646E86 /* MissingRequiredInstallationError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MissingRequiredInstallationError.swift; sourceTree = "<group>"; }; - B3EDA65F1D985ACA00F4E77F /* SpeculidConfigurationProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = SpeculidConfigurationProtocol.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; - B3EDA6611D98A13F00F4E77F /* SpeculidBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeculidBuilder.swift; sourceTree = "<group>"; }; - B3EDA6631D98A16A00F4E77F /* SpeculidBuilderProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeculidBuilderProtocol.swift; sourceTree = "<group>"; }; - B3EE812C1DB6624A00F0D9A7 /* ClientIdentifierDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClientIdentifierDelegate.swift; sourceTree = "<group>"; }; - B3EE812E1DB6626900F0D9A7 /* ClientIdentifier.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClientIdentifier.swift; sourceTree = "<group>"; }; - DA8C8B36DBAD28741A274EDD /* Pods_Speculid_App_Speculid.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Speculid_App_Speculid.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - B310EE321D94BF6D00C4A30E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 3A1ABCFA753C493935FD8F95 /* Pods_Speculid_App_Speculid.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B310EE3C1D94BF6D00C4A30E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - B310EE401D94BF6D00C4A30E /* Speculid.framework in Frameworks */, - 90A44E85D7852C743AC3ED1B /* Pods_SpeculidTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B38085F61D9AA76E000BC05A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - B380860A1D9AA7B2000BC05A /* Speculid.framework in Frameworks */, - FA2CD792E10A6102D66AEB00 /* Pods_Speculid_App.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 2B9D3D68E4619D5AB016A80F /* Pods */ = { - isa = PBXGroup; - children = ( - 407E8C50424541751746E1EB /* Pods-Speculid-App.debug.xcconfig */, - 4931B3201EAC0FD92C614AF8 /* Pods-Speculid-App.release.xcconfig */, - 1F3FED6FBB20B152C826989D /* Pods-Speculid-App-Speculid.debug.xcconfig */, - 16C110D021B16DF74774248F /* Pods-Speculid-App-Speculid.release.xcconfig */, - 2DB7226F66B034963BD7F05D /* Pods-SpeculidTests.debug.xcconfig */, - 3B8747C1F338E0ADE9DFD69B /* Pods-SpeculidTests.release.xcconfig */, - ); - name = Pods; - sourceTree = "<group>"; - }; - B30005C11DB52F6E000A8166 /* ApplicationPathDataSources */ = { - isa = PBXGroup; - children = ( - B30005C21DB52F84000A8166 /* DefaultApplicationPathDataSource.swift */, - B30005C41DB52FCD000A8166 /* ConfiguredApplicationPathDataSource.swift */, - B37996B81DB7E36C00B8CA3B /* SearchApplicationPathDataSource.swift */, - ); - name = ApplicationPathDataSources; - sourceTree = "<group>"; - }; - B310EE2A1D94BF5000C4A30E = { - isa = PBXGroup; - children = ( - B310EE381D94BF6D00C4A30E /* framework */, - B310EE431D94BF6D00C4A30E /* tests */, - B38085FA1D9AA76E000BC05A /* application */, - B310EE371D94BF6D00C4A30E /* Products */, - 2B9D3D68E4619D5AB016A80F /* Pods */, - F3EDEE6E94F5A50D64872E46 /* Frameworks */, - ); - sourceTree = "<group>"; - }; - B310EE371D94BF6D00C4A30E /* Products */ = { - isa = PBXGroup; - children = ( - B310EE361D94BF6D00C4A30E /* Speculid.framework */, - B310EE3F1D94BF6D00C4A30E /* SpeculidTests.xctest */, - B38085F91D9AA76E000BC05A /* Speculid.app */, - ); - name = Products; - sourceTree = "<group>"; - }; - B310EE381D94BF6D00C4A30E /* framework */ = { - isa = PBXGroup; - children = ( - B39970101DB817550026FEA3 /* Resources */, - B33D98201DB5A26800CB21C3 /* Analytics */, - B3DC29A51D9AACFA00646E86 /* Builders */, - B38F73491DA2A6B9008469FE /* Controllers */, - B3DC29A61D9AAD0300646E86 /* Errors */, - B362A4221D9BF8BC00FF74FC /* Extensions */, - B38F734B1DA2A6F7008469FE /* Models */, - B38F734A1DA2A6E4008469FE /* Protocols */, - B310EE391D94BF6D00C4A30E /* Speculid.h */, - B310EE3A1D94BF6D00C4A30E /* Info.plist */, - B34507831D9E9FD900C80225 /* VCS.swift */, - ); - path = framework; - sourceTree = "<group>"; - }; - B310EE431D94BF6D00C4A30E /* tests */ = { - isa = PBXGroup; - children = ( - B36AD1C51DB6E9C300D33AD7 /* Builders */, - B3951DA21DA432FB00A6FCF2 /* Controllers */, - B310EE461D94BF6D00C4A30E /* Info.plist */, - ); - path = tests; - sourceTree = "<group>"; - }; - B33D98201DB5A26800CB21C3 /* Analytics */ = { - isa = PBXGroup; - children = ( - ); - name = Analytics; - sourceTree = "<group>"; - }; - B362A4221D9BF8BC00FF74FC /* Extensions */ = { - isa = PBXGroup; - children = ( - B34201681D9975DC004C49D6 /* String.swift */, - B342016A1D997602004C49D6 /* CGFloat.swift */, - B3880DE31E0AB5180093117D /* NSColor.swift */, - ); - path = Extensions; - sourceTree = "<group>"; - }; - B36AD1C51DB6E9C300D33AD7 /* Builders */ = { - isa = PBXGroup; - children = ( - B36AD1C61DB6E9DF00D33AD7 /* PDFConversionBuilderTest.swift */, - ); - name = Builders; - sourceTree = "<group>"; - }; - B38085FA1D9AA76E000BC05A /* application */ = { - isa = PBXGroup; - children = ( - B38085FF1D9AA76E000BC05A /* Assets.xcassets */, - B38086041D9AA76E000BC05A /* Info.plist */, - B38086081D9AA78E000BC05A /* main.swift */, - B33C70361DA6E72D002BC291 /* help.txt */, - B370914B1DFB020E007DD54C /* versions.plist */, - ); - path = application; - sourceTree = "<group>"; - }; - B38F73491DA2A6B9008469FE /* Controllers */ = { - isa = PBXGroup; - children = ( - B30005C11DB52F6E000A8166 /* ApplicationPathDataSources */, - B38F734C1DA2A928008469FE /* Speculid.swift */, - B32AD7C51D982E8D00B871CE /* ProcessImageConversionTask.swift */, - B32AD7C71D982E9F00B871CE /* ImageConversionBuilder.swift */, - B3EDA6611D98A13F00F4E77F /* SpeculidBuilder.swift */, - B343887A1DB035C3003CB3BC /* SpeculidApplication.swift */, - B30005BD1DB51446000A8166 /* SpeculidConfigurationLoader.swift */, - B33D98231DB5A74A00CB21C3 /* AnalyticsTracker.swift */, - B33D982B1DB5B17300CB21C3 /* AnalyticsSessionManager.swift */, - B3EE812E1DB6626900F0D9A7 /* ClientIdentifier.swift */, - ); - path = Controllers; - sourceTree = "<group>"; - }; - B38F734A1DA2A6E4008469FE /* Protocols */ = { - isa = PBXGroup; - children = ( - B32AD7C91D982F7F00B871CE /* ImageConversionBuilderProtocol.swift */, - B32AD7CB1D98307200B871CE /* ImageConversionTaskProtocol.swift */, - B34201CD1D99A3F5004C49D6 /* ImageSpecificationProtocol.swift */, - B3EDA6631D98A16A00F4E77F /* SpeculidBuilderProtocol.swift */, - B3EDA65F1D985ACA00F4E77F /* SpeculidConfigurationProtocol.swift */, - B34201C91D99A379004C49D6 /* SpeculidDocumentProtocol.swift */, - B34201CB1D99A3BD004C49D6 /* SpeculidSpecificationsProtocol.swift */, - B362A4271D9C0B4C00FF74FC /* GeometryProtocol.swift */, - B3951DA01DA4319B00A6FCF2 /* ProcessProtocol.swift */, - B34388761DB0061C003CB3BC /* SpeculidApplicationProtocol.swift */, - B34388781DB006BE003CB3BC /* SpeculidArgumentsProtocol.swift */, - B30005BB1DB51310000A8166 /* SpeculidConfigurationLoaderProtocol.swift */, - B30005BF1DB518B2000A8166 /* ApplicationPathDataSource.swift */, - B33D98211DB5A28200CB21C3 /* AnalyticsTrackerProtocol.swift */, - B33D98251DB5AEBE00CB21C3 /* AnalyticsConfigurationProtocol.swift */, - B33D98271DB5AED400CB21C3 /* AnalyticsSessionManagerProtocol.swift */, - B3EE812C1DB6624A00F0D9A7 /* ClientIdentifierDelegate.swift */, - B36AD1BB1DB6C1E100D33AD7 /* AnalyticsEventProtocol.swift */, - ); - path = Protocols; - sourceTree = "<group>"; - }; - B38F734B1DA2A6F7008469FE /* Models */ = { - isa = PBXGroup; - children = ( - B34201CF1D99A5CD004C49D6 /* ImageIdiom.swift */, - B3B746FF1D9751080044809F /* ImageSpecification.swift */, - B32AD7CD1D98453E00B871CE /* SpeculidConfiguration.swift */, - B3B746FD1D974C4A0044809F /* SpeculidDocument.swift */, - B32AD7C31D98112100B871CE /* SpeculidSpecifications.swift */, - B362A4231D9BFCCB00FF74FC /* Geometry.swift */, - B362A4251D9C0B4000FF74FC /* ScaledGeometry.swift */, - B33D98291DB5B0A700CB21C3 /* AnalyticsConfiguration.swift */, - B36AD1B71DB6C19D00D33AD7 /* AnalyticsParameterKey.swift */, - B36AD1B91DB6C1B400D33AD7 /* AnalyticsParameterDictionary.swift */, - B36AD1BD1DB6C20900D33AD7 /* GeometryValue.swift */, - B36AD1BF1DB6C24600D33AD7 /* ConversionResult.swift */, - B36AD1C11DB6C3AB00D33AD7 /* ApplicationPathDictionary.swift */, - B36AD1C31DB6C3C100D33AD7 /* ApplicationPath.swift */, - ); - path = Models; - sourceTree = "<group>"; - }; - B3951DA21DA432FB00A6FCF2 /* Controllers */ = { - isa = PBXGroup; - children = ( - B310EE441D94BF6D00C4A30E /* SpeculidTests.swift */, - B3951DA31DA4334A00A6FCF2 /* ProcessImageConversionTaskTests.swift */, - B3951DA51DA4395600A6FCF2 /* ImageConversionBuilderTests.swift */, - B346F7061DB7A35000CA74C0 /* ApplicationPathDataSourceTest.swift */, - ); - path = Controllers; - sourceTree = "<group>"; - }; - B39970101DB817550026FEA3 /* Resources */ = { - isa = PBXGroup; - children = ( - B39970111DB817550026FEA3 /* terminal.scpt */, - ); - path = Resources; - sourceTree = "<group>"; - }; - B3DC29A51D9AACFA00646E86 /* Builders */ = { - isa = PBXGroup; - children = ( - B34201D31D99A604004C49D6 /* SVGImageConversionBuilder.swift */, - B34201D51D99A61B004C49D6 /* PDFConversionBuilder.swift */, - B34201D71D99A62D004C49D6 /* RasterConversionBuilder.swift */, - ); - path = Builders; - sourceTree = "<group>"; - }; - B3DC29A61D9AAD0300646E86 /* Errors */ = { - isa = PBXGroup; - children = ( - B34201D11D99A5EA004C49D6 /* ProcessError.swift */, - B3DC29A31D9AAC4E00646E86 /* ArrayError.swift */, - B3DC29A71D9AAE1D00646E86 /* MissingRequiredInstallationError.swift */, - ); - path = Errors; - sourceTree = "<group>"; - }; - F3EDEE6E94F5A50D64872E46 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 769F32ABB131CDEE204D90AC /* Pods_Speculid_App.framework */, - DA8C8B36DBAD28741A274EDD /* Pods_Speculid_App_Speculid.framework */, - 386203CFE7D8B9BA4D80ADA4 /* Pods_SpeculidTests.framework */, - ); - name = Frameworks; - sourceTree = "<group>"; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - B310EE331D94BF6D00C4A30E /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - B310EE471D94BF6D00C4A30E /* Speculid.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - B310EE351D94BF6D00C4A30E /* Speculid */ = { - isa = PBXNativeTarget; - buildConfigurationList = B310EE481D94BF6D00C4A30E /* Build configuration list for PBXNativeTarget "Speculid" */; - buildPhases = ( - B90673C66D6CDE5A62FD8FB7 /* [CP] Check Pods Manifest.lock */, - B3F795961D9F7C9500FC557C /* Autorevision */, - B310EE311D94BF6D00C4A30E /* Sources */, - B310EE321D94BF6D00C4A30E /* Frameworks */, - B310EE331D94BF6D00C4A30E /* Headers */, - B310EE341D94BF6D00C4A30E /* Resources */, - CD1D04F255007577F6F62838 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Speculid; - productName = Speculid; - productReference = B310EE361D94BF6D00C4A30E /* Speculid.framework */; - productType = "com.apple.product-type.framework"; - }; - B310EE3E1D94BF6D00C4A30E /* SpeculidTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = B310EE4B1D94BF6D00C4A30E /* Build configuration list for PBXNativeTarget "SpeculidTests" */; - buildPhases = ( - FC6E4DC6F306E5D5F16C94E6 /* [CP] Check Pods Manifest.lock */, - B310EE3B1D94BF6D00C4A30E /* Sources */, - B310EE3C1D94BF6D00C4A30E /* Frameworks */, - B310EE3D1D94BF6D00C4A30E /* Resources */, - 7213C78CF5792A61D45F51B1 /* [CP] Embed Pods Frameworks */, - BF7DD1E83825C1D52B868983 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - B310EE421D94BF6D00C4A30E /* PBXTargetDependency */, - B38F734F1DA2AA2B008469FE /* PBXTargetDependency */, - ); - name = SpeculidTests; - productName = SpeculidTests; - productReference = B310EE3F1D94BF6D00C4A30E /* SpeculidTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - B38085F81D9AA76E000BC05A /* Speculid-App */ = { - isa = PBXNativeTarget; - buildConfigurationList = B38086051D9AA76E000BC05A /* Build configuration list for PBXNativeTarget "Speculid-App" */; - buildPhases = ( - A3F8F713D1C9A7C6203C9A7E /* [CP] Check Pods Manifest.lock */, - B38085F51D9AA76E000BC05A /* Sources */, - B38085F61D9AA76E000BC05A /* Frameworks */, - B38085F71D9AA76E000BC05A /* Resources */, - B380860E1D9AA7B2000BC05A /* Embed Frameworks */, - A6C6CB2D563329968516A76B /* [CP] Embed Pods Frameworks */, - 1CB5FABA6E870350CEEDEC8E /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - B380860D1D9AA7B2000BC05A /* PBXTargetDependency */, - ); - name = "Speculid-App"; - productName = "Speculid-App"; - productReference = B38085F91D9AA76E000BC05A /* Speculid.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - B310EE2B1D94BF5000C4A30E /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 0810; - TargetAttributes = { - B310EE351D94BF6D00C4A30E = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 0800; - ProvisioningStyle = Manual; - }; - B310EE3E1D94BF6D00C4A30E = { - CreatedOnToolsVersion = 8.0; - DevelopmentTeam = MLT7M394S7; - ProvisioningStyle = Automatic; - }; - B38085F81D9AA76E000BC05A = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 0800; - ProvisioningStyle = Manual; - }; - }; - }; - buildConfigurationList = B310EE2E1D94BF5000C4A30E /* Build configuration list for PBXProject "speculid" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = B310EE2A1D94BF5000C4A30E; - productRefGroup = B310EE371D94BF6D00C4A30E /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - B310EE351D94BF6D00C4A30E /* Speculid */, - B310EE3E1D94BF6D00C4A30E /* SpeculidTests */, - B38085F81D9AA76E000BC05A /* Speculid-App */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - B310EE341D94BF6D00C4A30E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B39970121DB817550026FEA3 /* terminal.scpt in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B310EE3D1D94BF6D00C4A30E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B38085F71D9AA76E000BC05A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B38086001D9AA76E000BC05A /* Assets.xcassets in Resources */, - B370914C1DFB020E007DD54C /* versions.plist in Resources */, - B33C70371DA6E72D002BC291 /* help.txt in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 1CB5FABA6E870350CEEDEC8E /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 7213C78CF5792A61D45F51B1 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - A3F8F713D1C9A7C6203C9A7E /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - A6C6CB2D563329968516A76B /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Speculid-App/Pods-Speculid-App-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - B3F795961D9F7C9500FC557C /* Autorevision */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = Autorevision; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "if git rev-parse --git-dir > /dev/null 2>&1; then\ntouch ${SRCROOT}/.version\nstart=1\nversion_file=`< ${SRCROOT}/.version`\nversion=${version_file:-${start}}\nexport VCS_EXTRA=$version\necho \"Incrementing Version Number\"\n\"${SRCROOT}/autorevision.sh\" -t swift > \"${SRCROOT}/framework/VCS.swift\"\necho `expr ${VCS_EXTRA} + 1` >${SRCROOT}/.version\nfi"; - }; - B90673C66D6CDE5A62FD8FB7 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - BF7DD1E83825C1D52B868983 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SpeculidTests/Pods-SpeculidTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - CD1D04F255007577F6F62838 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Speculid-App-Speculid/Pods-Speculid-App-Speculid-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - FC6E4DC6F306E5D5F16C94E6 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - B310EE311D94BF6D00C4A30E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B34201D61D99A61B004C49D6 /* PDFConversionBuilder.swift in Sources */, - B343887B1DB035C3003CB3BC /* SpeculidApplication.swift in Sources */, - B32AD7CC1D98307200B871CE /* ImageConversionTaskProtocol.swift in Sources */, - B36AD1BC1DB6C1E100D33AD7 /* AnalyticsEventProtocol.swift in Sources */, - B38F734D1DA2A928008469FE /* Speculid.swift in Sources */, - B30005BE1DB51446000A8166 /* SpeculidConfigurationLoader.swift in Sources */, - B34201CC1D99A3BD004C49D6 /* SpeculidSpecificationsProtocol.swift in Sources */, - B30005C51DB52FCD000A8166 /* ConfiguredApplicationPathDataSource.swift in Sources */, - B34201CE1D99A3F5004C49D6 /* ImageSpecificationProtocol.swift in Sources */, - B34201D81D99A62D004C49D6 /* RasterConversionBuilder.swift in Sources */, - B36AD1BA1DB6C1B400D33AD7 /* AnalyticsParameterDictionary.swift in Sources */, - B34201D41D99A604004C49D6 /* SVGImageConversionBuilder.swift in Sources */, - B36AD1C01DB6C24600D33AD7 /* ConversionResult.swift in Sources */, - B32AD7C61D982E8D00B871CE /* ProcessImageConversionTask.swift in Sources */, - B34201D01D99A5CD004C49D6 /* ImageIdiom.swift in Sources */, - B3EDA6641D98A16A00F4E77F /* SpeculidBuilderProtocol.swift in Sources */, - B3B746FE1D974C4A0044809F /* SpeculidDocument.swift in Sources */, - B36AD1B81DB6C19D00D33AD7 /* AnalyticsParameterKey.swift in Sources */, - B3B747001D9751080044809F /* ImageSpecification.swift in Sources */, - B30005C31DB52F84000A8166 /* DefaultApplicationPathDataSource.swift in Sources */, - B36AD1BE1DB6C20900D33AD7 /* GeometryValue.swift in Sources */, - B32AD7CA1D982F7F00B871CE /* ImageConversionBuilderProtocol.swift in Sources */, - B33D98281DB5AED400CB21C3 /* AnalyticsSessionManagerProtocol.swift in Sources */, - B34201691D9975DC004C49D6 /* String.swift in Sources */, - B33D98221DB5A28200CB21C3 /* AnalyticsTrackerProtocol.swift in Sources */, - B362A4241D9BFCCB00FF74FC /* Geometry.swift in Sources */, - B30005BC1DB51310000A8166 /* SpeculidConfigurationLoaderProtocol.swift in Sources */, - B34201CA1D99A379004C49D6 /* SpeculidDocumentProtocol.swift in Sources */, - B33D982A1DB5B0A700CB21C3 /* AnalyticsConfiguration.swift in Sources */, - B3DC29A81D9AAE1D00646E86 /* MissingRequiredInstallationError.swift in Sources */, - B3EE812F1DB6626900F0D9A7 /* ClientIdentifier.swift in Sources */, - B3951DA11DA4319B00A6FCF2 /* ProcessProtocol.swift in Sources */, - B34388791DB006BE003CB3BC /* SpeculidArgumentsProtocol.swift in Sources */, - B32AD7CE1D98453E00B871CE /* SpeculidConfiguration.swift in Sources */, - B32AD7C41D98112100B871CE /* SpeculidSpecifications.swift in Sources */, - B36AD1C21DB6C3AB00D33AD7 /* ApplicationPathDictionary.swift in Sources */, - B342016B1D997602004C49D6 /* CGFloat.swift in Sources */, - B362A4281D9C0B4C00FF74FC /* GeometryProtocol.swift in Sources */, - B34201D21D99A5EA004C49D6 /* ProcessError.swift in Sources */, - B3DC29A41D9AAC4E00646E86 /* ArrayError.swift in Sources */, - B3880DE41E0AB5180093117D /* NSColor.swift in Sources */, - B37996B91DB7E36C00B8CA3B /* SearchApplicationPathDataSource.swift in Sources */, - B32AD7C81D982E9F00B871CE /* ImageConversionBuilder.swift in Sources */, - B34388771DB0061C003CB3BC /* SpeculidApplicationProtocol.swift in Sources */, - B33D98261DB5AEBE00CB21C3 /* AnalyticsConfigurationProtocol.swift in Sources */, - B34507841D9E9FD900C80225 /* VCS.swift in Sources */, - B3EDA6621D98A13F00F4E77F /* SpeculidBuilder.swift in Sources */, - B3EDA6601D985ACA00F4E77F /* SpeculidConfigurationProtocol.swift in Sources */, - B362A4261D9C0B4000FF74FC /* ScaledGeometry.swift in Sources */, - B33D98241DB5A74A00CB21C3 /* AnalyticsTracker.swift in Sources */, - B30005C01DB518B2000A8166 /* ApplicationPathDataSource.swift in Sources */, - B36AD1C41DB6C3C100D33AD7 /* ApplicationPath.swift in Sources */, - B3EE812D1DB6624A00F0D9A7 /* ClientIdentifierDelegate.swift in Sources */, - B33D982C1DB5B17300CB21C3 /* AnalyticsSessionManager.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B310EE3B1D94BF6D00C4A30E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B36AD1C71DB6E9DF00D33AD7 /* PDFConversionBuilderTest.swift in Sources */, - B3951DA41DA4334A00A6FCF2 /* ProcessImageConversionTaskTests.swift in Sources */, - B310EE451D94BF6D00C4A30E /* SpeculidTests.swift in Sources */, - B3951DA61DA4395600A6FCF2 /* ImageConversionBuilderTests.swift in Sources */, - B346F7071DB7A35000CA74C0 /* ApplicationPathDataSourceTest.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B38085F51D9AA76E000BC05A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B38086091D9AA78E000BC05A /* main.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - B310EE421D94BF6D00C4A30E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = B310EE351D94BF6D00C4A30E /* Speculid */; - targetProxy = B310EE411D94BF6D00C4A30E /* PBXContainerItemProxy */; - }; - B380860D1D9AA7B2000BC05A /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = B310EE351D94BF6D00C4A30E /* Speculid */; - targetProxy = B380860C1D9AA7B2000BC05A /* PBXContainerItemProxy */; - }; - B38F734F1DA2AA2B008469FE /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = B38085F81D9AA76E000BC05A /* Speculid-App */; - targetProxy = B38F734E1DA2AA2B008469FE /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - B310EE2F1D94BF5000C4A30E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 1; - DEFAULT_VERSION_SEMVER = 1.0.2; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.10; - ONLY_ACTIVE_ARCH = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "BETA DEBUG"; - }; - name = Debug; - }; - B310EE301D94BF5000C4A30E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 1; - DEFAULT_VERSION_SEMVER = 1.0.2; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.10; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = BETA; - }; - name = Release; - }; - B310EE491D94BF6D00C4A30E /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1F3FED6FBB20B152C826989D /* Pods-Speculid-App-Speculid.debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - FRAMEWORK_VERSION = A; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/framework/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.brightdigit.Speculid; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - B310EE4A1D94BF6D00C4A30E /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 16C110D021B16DF74774248F /* Pods-Speculid-App-Speculid.release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_VERSION = A; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/framework/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.brightdigit.Speculid; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - B310EE4C1D94BF6D00C4A30E /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 2DB7226F66B034963BD7F05D /* Pods-SpeculidTests.debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.12; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.brightdigit.SpeculidTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - }; - name = Debug; - }; - B310EE4D1D94BF6D00C4A30E /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3B8747C1F338E0ADE9DFD69B /* Pods-SpeculidTests.release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.12; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.brightdigit.SpeculidTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; - }; - name = Release; - }; - B38086061D9AA76E000BC05A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 407E8C50424541751746E1EB /* Pods-Speculid-App.debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - INFOPLIST_FILE = "$(SRCROOT)/application/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "com.brightdigit.Speculid-App"; - PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; - PRODUCT_NAME = Speculid; - SDKROOT = macosx; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - }; - name = Debug; - }; - B38086071D9AA76E000BC05A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4931B3201EAC0FD92C614AF8 /* Pods-Speculid-App.release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - INFOPLIST_FILE = "$(SRCROOT)/application/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "com.brightdigit.Speculid-App"; - PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; - PRODUCT_NAME = Speculid; - SDKROOT = macosx; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - B310EE2E1D94BF5000C4A30E /* Build configuration list for PBXProject "speculid" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B310EE2F1D94BF5000C4A30E /* Debug */, - B310EE301D94BF5000C4A30E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - B310EE481D94BF6D00C4A30E /* Build configuration list for PBXNativeTarget "Speculid" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B310EE491D94BF6D00C4A30E /* Debug */, - B310EE4A1D94BF6D00C4A30E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - B310EE4B1D94BF6D00C4A30E /* Build configuration list for PBXNativeTarget "SpeculidTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B310EE4C1D94BF6D00C4A30E /* Debug */, - B310EE4D1D94BF6D00C4A30E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - B38086051D9AA76E000BC05A /* Build configuration list for PBXNativeTarget "Speculid-App" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B38086061D9AA76E000BC05A /* Debug */, - B38086071D9AA76E000BC05A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = B310EE2B1D94BF5000C4A30E /* Project object */; -} diff --git a/speculid.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/speculid.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index f80b5414..00000000 --- a/speculid.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Workspace - version = "1.0"> - <FileRef - location = "self:speculid.xcodeproj"> - </FileRef> -</Workspace> diff --git a/speculid.xcodeproj/xcshareddata/xcschemes/Speculid Application.xcscheme b/speculid.xcodeproj/xcshareddata/xcschemes/Speculid Application.xcscheme deleted file mode 100644 index e2d64e8a..00000000 --- a/speculid.xcodeproj/xcshareddata/xcschemes/Speculid Application.xcscheme +++ /dev/null @@ -1,107 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Scheme - LastUpgradeVersion = "0810" - version = "1.3"> - <BuildAction - parallelizeBuildables = "YES" - buildImplicitDependencies = "YES"> - <BuildActionEntries> - <BuildActionEntry - buildForTesting = "YES" - buildForRunning = "YES" - buildForProfiling = "YES" - buildForArchiving = "YES" - buildForAnalyzing = "YES"> - <BuildableReference - BuildableIdentifier = "primary" - BlueprintIdentifier = "B38085F81D9AA76E000BC05A" - BuildableName = "Speculid.app" - BlueprintName = "Speculid-App" - ReferencedContainer = "container:speculid.xcodeproj"> - </BuildableReference> - </BuildActionEntry> - </BuildActionEntries> - </BuildAction> - <TestAction - buildConfiguration = "Debug" - selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" - selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> - <Testables> - <TestableReference - skipped = "NO"> - <BuildableReference - BuildableIdentifier = "primary" - BlueprintIdentifier = "B310EE3E1D94BF6D00C4A30E" - BuildableName = "SpeculidTests.xctest" - BlueprintName = "SpeculidTests" - ReferencedContainer = "container:speculid.xcodeproj"> - </BuildableReference> - </TestableReference> - </Testables> - <MacroExpansion> - <BuildableReference - BuildableIdentifier = "primary" - BlueprintIdentifier = "B38085F81D9AA76E000BC05A" - BuildableName = "Speculid.app" - BlueprintName = "Speculid-App" - ReferencedContainer = "container:speculid.xcodeproj"> - </BuildableReference> - </MacroExpansion> - <AdditionalOptions> - </AdditionalOptions> - </TestAction> - <LaunchAction - buildConfiguration = "Debug" - selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" - selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - launchStyle = "0" - useCustomWorkingDirectory = "NO" - ignoresPersistentStateOnLaunch = "NO" - debugDocumentVersioning = "NO" - debugServiceExtension = "internal" - allowLocationSimulation = "YES"> - <BuildableProductRunnable - runnableDebuggingMode = "0"> - <BuildableReference - BuildableIdentifier = "primary" - BlueprintIdentifier = "B38085F81D9AA76E000BC05A" - BuildableName = "Speculid.app" - BlueprintName = "Speculid-App" - ReferencedContainer = "container:speculid.xcodeproj"> - </BuildableReference> - </BuildableProductRunnable> - <CommandLineArguments> - <CommandLineArgument - argument = "--version" - isEnabled = "YES"> - </CommandLineArgument> - </CommandLineArguments> - <AdditionalOptions> - </AdditionalOptions> - </LaunchAction> - <ProfileAction - buildConfiguration = "Release" - shouldUseLaunchSchemeArgsEnv = "YES" - savedToolIdentifier = "" - useCustomWorkingDirectory = "NO" - debugDocumentVersioning = "YES"> - <BuildableProductRunnable - runnableDebuggingMode = "0"> - <BuildableReference - BuildableIdentifier = "primary" - BlueprintIdentifier = "B38085F81D9AA76E000BC05A" - BuildableName = "Speculid.app" - BlueprintName = "Speculid-App" - ReferencedContainer = "container:speculid.xcodeproj"> - </BuildableReference> - </BuildableProductRunnable> - </ProfileAction> - <AnalyzeAction - buildConfiguration = "Debug"> - </AnalyzeAction> - <ArchiveAction - buildConfiguration = "Release" - revealArchiveInOrganizer = "YES"> - </ArchiveAction> -</Scheme> diff --git a/speculid.xcworkspace/contents.xcworkspacedata b/speculid.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index fab09eeb..00000000 --- a/speculid.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Workspace - version = "1.0"> - <FileRef - location = "group:README.md"> - </FileRef> - <FileRef - location = "group:speculid.xcodeproj"> - </FileRef> - <FileRef - location = "group:examples/examples.xcodeproj"> - </FileRef> - <FileRef - location = "group:Pods/Pods.xcodeproj"> - </FileRef> -</Workspace> diff --git a/tests/Builders/PDFConversionBuilderTest.swift b/tests/Builders/PDFConversionBuilderTest.swift deleted file mode 100644 index 16876706..00000000 --- a/tests/Builders/PDFConversionBuilderTest.swift +++ /dev/null @@ -1,112 +0,0 @@ -// -// PDFConversionBuilderTest.swift -// speculid -// -// Created by Leo Dion on 10/18/16. -// -// - -import XCTest -import RandomKit -@testable import Speculid - -class PDFConversionBuilderTest: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testConversionWithScale () { - let imageSpec = ImageSpecification(idiom: .universal, scale: 2.0, size: nil, filename: nil) - let inkscapeURL = URL.random() - - let configuration = SpeculidConfiguration(applicationPaths : [.inkscape : inkscapeURL]) - let contentsDirectoryURL = URL.random() - let sourceImageURL = URL.random() - let specs = SpeculidSpecifications(contentsDirectoryURL: contentsDirectoryURL, sourceImageURL: sourceImageURL) - let builder = PDFConversionBuilder() - - let result = builder.conversion(forImage: imageSpec, withSpecifications: specs, andConfiguration: configuration) - - XCTAssertNotNil(imageSpec.scale) - XCTAssertEqual(configuration.inkscapeURL, inkscapeURL) - XCTAssertNil(result) - - } - - func testConversionWithNoInkscape () { - - let imageSpec = ImageSpecification(idiom: .universal, scale: nil, size: nil, filename: nil) - - let configuration = SpeculidConfiguration() - let contentsDirectoryURL = URL.random() - let sourceImageURL = URL.random() - let specs = SpeculidSpecifications(contentsDirectoryURL: contentsDirectoryURL, sourceImageURL: sourceImageURL) - let builder = PDFConversionBuilder() - - XCTAssertNil(imageSpec.scale) - XCTAssertNil(configuration.inkscapeURL) - - guard let result = builder.conversion(forImage: imageSpec, withSpecifications: specs, andConfiguration: configuration) else { - XCTFail("no result returned") - return - } - - guard case .Error(let error) = result else { - XCTFail("result is not error") - return - } - - guard let missingReqError = error as? MissingRequiredInstallationError else { - XCTFail("error is not right type") - return - } - - XCTAssertEqual(missingReqError.name, "inkscape") - } - - func testConversionSuccess () { - let inkscapeURL = URL.random() - let imageSpecification = ImageSpecification(idiom: .universal, scale: nil, size: nil, filename: nil) - - let configuration = SpeculidConfiguration(applicationPaths : [.inkscape : inkscapeURL]) - let contentsDirectoryURL = URL.random() - let sourceImageURL = URL.random() - let specifications = SpeculidSpecifications(contentsDirectoryURL: contentsDirectoryURL, sourceImageURL: sourceImageURL) - let builder = PDFConversionBuilder() - - - guard let result = builder.conversion(forImage: imageSpecification, withSpecifications: specifications, andConfiguration: configuration) else { - XCTFail("no result returned") - return - } - - guard case .Task(let task) = result else { - XCTFail("result is not task") - return - } - - - guard let processTask = task as? ProcessImageConversionTask else { - XCTFail("task is not a process task") - return - } - - guard let process = processTask.process as? Process else { - XCTFail("process task is not a process") - return - } - - - XCTAssertEqual(process.launchPath, inkscapeURL.path) - - XCTAssertEqual(process.arguments!, ["--without-gui","--export-area-drawing","--export-pdf", - specifications.contentsDirectoryURL.appendingPathComponent(specifications.destination(forImage: imageSpecification)).path,specifications.sourceImageURL.absoluteURL.path]) - } -} diff --git a/tests/Controllers/ApplicationPathDataSourceTest.swift b/tests/Controllers/ApplicationPathDataSourceTest.swift deleted file mode 100644 index 63ff3ed9..00000000 --- a/tests/Controllers/ApplicationPathDataSourceTest.swift +++ /dev/null @@ -1,55 +0,0 @@ -// -// ApplicationPathDataSourceTest.swift -// speculid -// -// Created by Leo Dion on 10/19/16. -// -// - -import XCTest -@testable import Speculid - -public struct MockApplicationPathDataSource : ApplicationPathDataSource { - public func applicationPaths(_ closure: @escaping (ApplicationPathDictionary) -> Void) { - closure(self.applicationPaths) - } - - public let applicationPaths : ApplicationPathDictionary - -} - -class ApplicationPathDataSourceTest: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testLoad() { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - let expectation = self.expectation(description: "Waiting for loading to finish") - let dictionary : ApplicationPathDictionary = [.inkscape : URL.random(), .convert : URL.random()] - let loader = SpeculidConfigurationLoader(dataSources: [MockApplicationPathDataSource(applicationPaths: dictionary)]) - loader.load { (configuration) in - XCTAssertEqual(configuration.applicationPaths, dictionary) - expectation.fulfill() - } - self.waitForExpectations(timeout: 5.0) { (error) in - XCTAssertNil(error) - } - } - - func testPerformanceExample() { - // This is an example of a performance test case. - self.measure { - // Put the code you want to measure the time of here. - } - } - -} diff --git a/tests/Controllers/ImageConversionBuilderTests.swift b/tests/Controllers/ImageConversionBuilderTests.swift deleted file mode 100644 index 0f69ef26..00000000 --- a/tests/Controllers/ImageConversionBuilderTests.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// ImageConversionBuilderTests.swift -// speculid -// -// Created by Leo Dion on 10/4/16. -// -// - -import XCTest -@testable import Speculid - -var count = 0 - -struct MockImageConverter : ImageConversionBuilderProtocol { - public let value = arc4random_uniform(UINT32_MAX) - func conversion(forImage imageSpecification: ImageSpecificationProtocol, withSpecifications specifications: SpeculidSpecificationsProtocol, andConfiguration configuration: SpeculidConfigurationProtocol) -> ConversionResult? { - count = count + 1 - return ConversionResult.Error(UInt32(value)) - } -} - -class ImageConversionBuilderTests: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - let builderChild = MockImageConverter() - let builder = ImageConversionBuilder(builders: [builderChild]) - let bundle = Bundle(for: type(of: self)) - - let taskOrErrorsOpt = builder.conversion(forImage: ImageSpecification(idiom: .watch, scale: nil, size: nil, filename: nil) , withSpecifications: SpeculidSpecifications(contentsDirectoryURL: bundle.bundleURL, sourceImageURL: bundle.bundleURL), andConfiguration: SpeculidConfiguration()) - - guard let taskOrErrors = taskOrErrorsOpt else { - return XCTFail() - } - - guard case let .Error(error) = taskOrErrors else { - return XCTFail() - } - - guard let value = error as? UInt32 else { - return XCTFail() - } - - XCTAssertEqual(builderChild.value, value) - XCTAssertEqual(count, 1) - } -} diff --git a/tests/Controllers/ProcessImageConversionTaskTests.swift b/tests/Controllers/ProcessImageConversionTaskTests.swift deleted file mode 100644 index dbb081f6..00000000 --- a/tests/Controllers/ProcessImageConversionTaskTests.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// ProcessImageConversionTaskTests.swift -// speculid -// -// Created by Leo Dion on 10/4/16. -// -// - -import XCTest -@testable import Speculid - -extension UInt32 : Error { - -} - -public struct MockProcess : ProcessProtocol { - public func launch(_ callback: @escaping (Error?) -> Void) { - callback(self.error) - } - - public let error: Error? -} - -class ProcessImageConversionTaskTests: XCTestCase { - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - let count = Int(arc4random_uniform(10)) - - let mockProcesses = (0...count).map{index -> (MockProcess, XCTestExpectation) in - let isNil = arc4random_uniform(UINT32_MAX) % UInt32(2) > 0 - let value : UInt32? = isNil ? nil : arc4random_uniform(UINT32_MAX) - let p = MockProcess(error: value) - let exp = self.expectation(description: "\(index): \(value)" ) - return (p,exp) - } - - mockProcesses.forEach { (process, expectation) in - let task = ProcessImageConversionTask(process: process) - task.start(callback: { (error) in - if let expected = process.error as? UInt32, let actual = error as? UInt32 { - XCTAssertEqual(expected, actual) - } else { - XCTAssertNil(error) - XCTAssertNil(process.error) - } - expectation.fulfill() - }) - } - - self.waitForExpectations(timeout: TimeInterval(count), handler: nil) - } -} diff --git a/tests/Controllers/SpeculidTests.swift b/tests/Controllers/SpeculidTests.swift deleted file mode 100644 index 37654075..00000000 --- a/tests/Controllers/SpeculidTests.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// SpeculidTests.swift -// SpeculidTests -// -// Created by Leo Dion on 9/22/16. -// -// - -import XCTest -@testable import Speculid - -class SpeculidTests: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testValidVersion() { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - XCTAssertNotNil(Speculid.version) - XCTAssertNotNil(Speculid.version.versionControl) - } - -} diff --git a/tests/Info.plist b/tests/Info.plist deleted file mode 100644 index 6c6c23c4..00000000 --- a/tests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleDevelopmentRegion</key> - <string>en</string> - <key>CFBundleExecutable</key> - <string>$(EXECUTABLE_NAME)</string> - <key>CFBundleIdentifier</key> - <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundleName</key> - <string>$(PRODUCT_NAME)</string> - <key>CFBundlePackageType</key> - <string>BNDL</string> - <key>CFBundleShortVersionString</key> - <string>1.0</string> - <key>CFBundleVersion</key> - <string>1</string> -</dict> -</plist> diff --git a/tests/cairosvg/CairoSVGTests.swift b/tests/cairosvg/CairoSVGTests.swift new file mode 100644 index 00000000..20ea28c7 --- /dev/null +++ b/tests/cairosvg/CairoSVGTests.swift @@ -0,0 +1,25 @@ +import XCTest + +class CairoSVGTests: XCTestCase { + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + measure { + // Put the code you want to measure the time of here. + } + } +} diff --git a/tests/cairosvg/Info.plist b/tests/cairosvg/Info.plist new file mode 100644 index 00000000..6c40a6cd --- /dev/null +++ b/tests/cairosvg/Info.plist @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>$(PRODUCT_NAME)</string> + <key>CFBundlePackageType</key> + <string>BNDL</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleVersion</key> + <string>1</string> +</dict> +</plist> diff --git a/tests/speculid/Controllers/CommandLineRunnerTest.swift b/tests/speculid/Controllers/CommandLineRunnerTest.swift new file mode 100644 index 00000000..be3b0833 --- /dev/null +++ b/tests/speculid/Controllers/CommandLineRunnerTest.swift @@ -0,0 +1,110 @@ +@testable import Speculid +import SwiftVer +import XCTest + +class RecordedOutputStream: TextOutputStream { + public private(set) var strings = [String]() + func write(_ string: String) { + strings.append(string) + } +} + +struct MockVersionProvider: VersionProvider { + public static let vcs = VersionControlInfo(jsonResource: "autorevision", fromBundle: Application.bundle) + + public static let sbd = + Stage.dictionary(fromPlistAtURL: Application.bundle.url(forResource: "versions", withExtension: "plist")!)! + + public let version = Version( + bundle: Application.bundle, + dictionary: sbd, + versionControl: vcs + ) +} + +class CommandLineRunnerTest: XCTestCase { + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testUnknown() { + let argumentStrings = (0 ..< 100).map { _ in String.randomAlphanumeric(ofLength: 100) } + + let expectations = argumentStrings.map("Run Command Line Activity: ".appending).map(XCTestExpectation.init) + + let setOfArgumentLists = argumentStrings.map { Array<String>.init(repeating: $0, count: 1) } + for (arguments, expectation) in zip(setOfArgumentLists, expectations) { + let outputStream = RecordedOutputStream() + let errorStream = RecordedOutputStream() + let commandLineRunner = CommandLineRunner(outputStream: outputStream, errorStream: errorStream) + let argumentSet = SpeculidCommandArgumentSet.unknown(arguments) + let errorString = Application.unknownCommandMessage(fromArguments: arguments) + let activity = commandLineRunner.activity(withArguments: argumentSet) { activity, error in + XCTAssertNotNil(activity) + XCTAssertNotNil(error) + XCTAssertEqual( + outputStream.strings, + [Application.helpText] + ) + XCTAssertEqual(errorStream.strings, [errorString]) + expectation.fulfill() + } + + activity.start() + } + + wait(for: expectations, timeout: 10.0) + } + + func testHelp() { + let expectation = XCTestExpectation(description: "Run Command Line Activity") + let outputStream = RecordedOutputStream() + let errorStream = RecordedOutputStream() + let argument = SpeculidCommandArgumentSet.help + let commandLineRunner = CommandLineRunner(outputStream: outputStream, errorStream: errorStream) + + let activity = commandLineRunner.activity(withArguments: argument) { activity, error in + XCTAssertNotNil(activity) + XCTAssertNil(error) + XCTAssertEqual( + outputStream.strings, + [Application.helpText] + ) + XCTAssertEqual(errorStream.strings, []) + expectation.fulfill() + } + + activity.start() + wait(for: [expectation], timeout: 10.0) + } + + func testVersion() { + let expectation = XCTestExpectation(description: "Run Command Line Activity") + let outputStream = RecordedOutputStream() + let errorStream = RecordedOutputStream() + let argument = SpeculidCommandArgumentSet.version + let versionProvider = MockVersionProvider() + let commandLineRunner = CommandLineRunner(outputStream: outputStream, errorStream: errorStream, versionProvider: versionProvider) + + let activity = commandLineRunner.activity(withArguments: argument) { activity, error in + XCTAssertNotNil(activity) + XCTAssertNil(error) + XCTAssertEqual( + outputStream.strings, + [versionProvider.version!.developmentDescription] + ) + XCTAssertEqual(errorStream.strings, []) + expectation.fulfill() + } + + activity.start() + + wait(for: [expectation], timeout: 10.0) + } +} diff --git a/tests/speculid/Controllers/SpeculidApplicationModeParserTest.swift b/tests/speculid/Controllers/SpeculidApplicationModeParserTest.swift new file mode 100644 index 00000000..7e8c0f14 --- /dev/null +++ b/tests/speculid/Controllers/SpeculidApplicationModeParserTest.swift @@ -0,0 +1,120 @@ +@testable import Speculid +import XCTest + +private let _alphanumericcharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + +extension String { + static func randomAlphanumeric(ofLength length: Int) -> String { + let randomCharacters = (0 ..< length).map { _ in _alphanumericcharacters.randomElement()! } + return String(randomCharacters) + } +} + +extension Array where Element == String { + static func randomElements(ofCount count: Int) -> Array { + return (0 ..< count).map { _ in String.randomAlphanumeric(ofLength: 100) } + } +} + +@available(swift, obsoleted: 4.2) +extension Array { + func randomElement() -> Element? { + guard count > 0 else { + return nil + } + let index = Index(arc4random_uniform(UInt32(count))) + return self[index] + } +} + +@available(swift, obsoleted: 4.2) +extension String { + func randomElement() -> Character? { + guard count > 0 else { + return nil + } + let offset = Int(arc4random_uniform(UInt32(count))) + let index = self.index(startIndex, offsetBy: offset) + return self[index] + } +} + +struct SimpleCommandLineArgumentProvider: CommandLineArgumentProviderProtocol { + public let arguments: [String] + public init(arguments: [String]) { + self.arguments = arguments + } + public init(randomWithCount count: Int) { + arguments = (0 ..< count).map { _ in String.randomAlphanumeric(ofLength: 100) } + } +} + +class SpeculidApplicationModeParserTest: XCTestCase { + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testParseModeUnknownWithExecutable() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + let arguments = [String].randomElements(ofCount: 7) + let provider = SimpleCommandLineArgumentProvider(arguments: [Bundle.main.executablePath!] + arguments) + let parser = SpeculidApplicationModeParser() + let actual = parser.parseMode(fromCommandLine: provider) + let expected = SpeculidApplicationMode.command(SpeculidCommandArgumentSet.unknown(arguments)) + XCTAssertEqual(actual, expected) + } + + func testParseModeUnknown() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + let provider = SimpleCommandLineArgumentProvider(randomWithCount: 7) + let parser = SpeculidApplicationModeParser() + let actual = parser.parseMode(fromCommandLine: provider) + let expected = SpeculidApplicationMode.command(SpeculidCommandArgumentSet.unknown(provider.arguments)) + XCTAssertEqual(actual, expected) + } + + func testParseModeHelp() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + let arguments = SimpleCommandLineArgumentProvider(arguments: ["--help"]) + let parser = SpeculidApplicationModeParser() + let actual = parser.parseMode(fromCommandLine: arguments) + let expected = SpeculidApplicationMode.command(SpeculidCommandArgumentSet.help) + XCTAssertEqual(actual, expected) + } + + func testParseModeVersion() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + let arguments = SimpleCommandLineArgumentProvider(arguments: ["--version"]) + let parser = SpeculidApplicationModeParser() + let actual = parser.parseMode(fromCommandLine: arguments) + let expected = SpeculidApplicationMode.command(SpeculidCommandArgumentSet.version) + XCTAssertEqual(actual, expected) + } + + func testParseModeCocoa() { + let arguments = SimpleCommandLineArgumentProvider(arguments: []) + let parser = SpeculidApplicationModeParser() + let actual = parser.parseMode(fromCommandLine: arguments) + let expected = SpeculidApplicationMode.cocoa + XCTAssertEqual(actual, expected) + } + + func testParseModeFile() { + let fileURL = Bundle(for: type(of: self)).url(forResource: "dummy", withExtension: nil)! + let arguments = SimpleCommandLineArgumentProvider(arguments: ["--process", fileURL.path]) + let parser = SpeculidApplicationModeParser() + let actual = parser.parseMode(fromCommandLine: arguments) + let expected = SpeculidApplicationMode.command(SpeculidCommandArgumentSet.process(fileURL)) + XCTAssertEqual(actual, expected) + } +} diff --git a/tests/speculid/Controllers/dummy b/tests/speculid/Controllers/dummy new file mode 100644 index 00000000..e69de29b diff --git a/tests/speculid/Info.plist b/tests/speculid/Info.plist new file mode 100644 index 00000000..6c40a6cd --- /dev/null +++ b/tests/speculid/Info.plist @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>$(PRODUCT_NAME)</string> + <key>CFBundlePackageType</key> + <string>BNDL</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleVersion</key> + <string>1</string> +</dict> +</plist> diff --git a/tests/ui/Info.plist b/tests/ui/Info.plist new file mode 100644 index 00000000..6c40a6cd --- /dev/null +++ b/tests/ui/Info.plist @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>$(PRODUCT_NAME)</string> + <key>CFBundlePackageType</key> + <string>BNDL</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleVersion</key> + <string>1</string> +</dict> +</plist> diff --git a/tests/ui/SpeculidUITests.swift b/tests/ui/SpeculidUITests.swift new file mode 100644 index 00000000..ebe7004c --- /dev/null +++ b/tests/ui/SpeculidUITests.swift @@ -0,0 +1,26 @@ +import XCTest + +class SpeculidUITests: XCTestCase { + override func setUp() { + super.setUp() + + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + XCUIApplication().launch() + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } +}